From: Steinar H. Gunderson Date: Tue, 31 Dec 2013 12:27:28 +0000 (+0100) Subject: When doing glReadPixels(), make sure we read from the right FBO. X-Git-Url: https://git.sesse.net/?p=mlt;a=commitdiff_plain;h=a78570e29a3fe77ebb9b885c339f9a65c55b0b0d When doing glReadPixels(), make sure we read from the right FBO. Newer versions of Movit clear the FBO attachment after rendering to an FBO (so that it's harder to accidentally attach to the same FBO from multiple threads), so we need to explicitly choose one to read from. --- diff --git a/src/modules/opengl/filter_glsl_manager.cpp b/src/modules/opengl/filter_glsl_manager.cpp index cd479b74..468e3b04 100644 --- a/src/modules/opengl/filter_glsl_manager.cpp +++ b/src/modules/opengl/filter_glsl_manager.cpp @@ -422,6 +422,8 @@ int GlslManager::render_frame_rgba(mlt_service service, mlt_frame frame, int wid render_fbo( service, chain, fbo->fbo, width, height ); // Read FBO into PBO + glBindFramebuffer( GL_FRAMEBUFFER, fbo->fbo ); + check_error(); glBindBuffer( GL_PIXEL_PACK_BUFFER_ARB, pbo->pbo ); check_error(); glBufferData( GL_PIXEL_PACK_BUFFER_ARB, img_size, NULL, GL_STREAM_READ );