]> git.sesse.net Git - movit/commitdiff
Fix a case with non-float input textures.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 13 Oct 2012 13:26:08 +0000 (15:26 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 13 Oct 2012 13:26:08 +0000 (15:26 +0200)
flat_input.cpp

index 6481bc25e9543927480999cb32c838781db6b082..089008344c3f457468146203b84fbad5a638e527 100644 (file)
@@ -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();