From 86b456fd6112ba54dd890c4f8be408d297de07d5 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Wed, 3 Oct 2012 14:40:13 +0200 Subject: [PATCH] Do not send uninitialized memory as a texture. --- effect_chain.cpp | 1 + 1 file changed, 1 insertion(+) 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(); -- 2.39.2