From: Steinar H. Gunderson Date: Wed, 3 Oct 2012 12:40:13 +0000 (+0200) Subject: Do not send uninitialized memory as a texture. X-Git-Tag: 1.0~408 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=86b456fd6112ba54dd890c4f8be408d297de07d5 Do not send uninitialized memory as a texture. --- diff --git a/effect_chain.cpp b/effect_chain.cpp index 19c485c..0985ee4 100644 --- a/effect_chain.cpp +++ b/effect_chain.cpp @@ -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();