X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect_chain.cpp;h=85c8be374a0702118c74ce2faa3c9c5e6d175674;hp=0985ee4ef185432a959472b149daf29dc8249d2f;hb=3dbe1e7c09766c2437d92a8c2cbbaeea7de3f610;hpb=0a3c9320e21fc211f0c61a4bda1c6932920c6883 diff --git a/effect_chain.cpp b/effect_chain.cpp index 0985ee4..85c8be3 100644 --- a/effect_chain.cpp +++ b/effect_chain.cpp @@ -267,6 +267,7 @@ void EffectChain::finalize() void *mapped_pbo = glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, GL_WRITE_ONLY); memset(mapped_pbo, 0, width * height * bytes_per_pixel); glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB); + check_error(); glGenTextures(1, &source_image_num); check_error(); @@ -330,6 +331,7 @@ void EffectChain::render_to_screen(unsigned char *src) for (unsigned phase = 0; phase < phases.size(); ++phase) { // Set up inputs and outputs for this phase. + glActiveTexture(GL_TEXTURE0); if (phase == 0) { // First phase reads from the input texture (which is already bound). } else { @@ -357,6 +359,7 @@ void EffectChain::render_to_screen(unsigned char *src) GL_TEXTURE_2D, temp_textures[phase % 2], 0); + check_error(); } // We have baked an upside-down transform into the quad coordinates,