]> git.sesse.net Git - movit/commitdiff
Do not send uninitialized memory as a texture.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 3 Oct 2012 12:40:13 +0000 (14:40 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 3 Oct 2012 12:40:13 +0000 (14:40 +0200)
effect_chain.cpp

index 19c485c32aea33acb2d6fc8fd57cf848288380f5..0985ee4ef185432a959472b149daf29dc8249d2f 100644 (file)
@@ -221,6 +221,7 @@ void EffectChain::finalize()
                glGenTextures(num_textures, temp_textures);
 
                unsigned char *empty = new unsigned char[width * height * 4];
+               memset(empty, 0, width * height * 4);
                for (unsigned i = 0; i < num_textures; ++i) {
                        glBindTexture(GL_TEXTURE_2D, temp_textures[i]);
                        check_error();