From 42b10f3a940eb05016764d1a30417ae7f21ae1f3 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 13 Oct 2012 15:26:08 +0200 Subject: [PATCH] Fix a case with non-float input textures. --- flat_input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flat_input.cpp b/flat_input.cpp index 6481bc2..0890083 100644 --- a/flat_input.cpp +++ b/flat_input.cpp @@ -107,7 +107,7 @@ void FlatInput::set_gl_state(GLuint glsl_program_num, const std::string& prefix, // Re-upload the texture from the PBO. glPixelStorei(GL_UNPACK_ROW_LENGTH, pitch); check_error(); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, format, GL_FLOAT, BUFFER_OFFSET(0)); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, format, type, BUFFER_OFFSET(0)); check_error(); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); check_error(); -- 2.39.2