]> git.sesse.net Git - movit/commitdiff
Revert "Slight cleanup in texture upload format selection."
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 2 Oct 2012 09:46:59 +0000 (11:46 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 2 Oct 2012 09:46:59 +0000 (11:46 +0200)
This reverts commit 7ead6f1c15daf8e5a70df583198a8ce58251b0d6.

effect_chain.cpp

index 4dfa6921b4d610296d899dca4a6021e654f5798e..85832db88541cfb90748dd55f8aca171a6621673 100644 (file)
@@ -213,12 +213,7 @@ void EffectChain::render_to_screen(unsigned char *src)
                assert(false);
        }
 
-       static bool first = true;
-       if (first) {
-               glTexImage2D(GL_TEXTURE_2D, 0, internal_format, width, height, 0, format, GL_UNSIGNED_BYTE, src);
-       } else {
-               glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, 0, format, GL_UNSIGNED_BYTE, src);
-       }
+       glTexImage2D(GL_TEXTURE_2D, 0, internal_format, width, height, 0, format, GL_UNSIGNED_BYTE, src);
        check_error();
        glUniform1i(glGetUniformLocation(glsl_program_num, "input_tex"), 0);