From: Steinar H. Gunderson Date: Sun, 22 Dec 2013 22:47:02 +0000 (+0100) Subject: Properly check framebuffer status when generating FBOs. X-Git-Tag: 1.0~109 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=09cf0231a4da74583b9c5ea7a54a2cf6efca3515;hp=4a55a7fdc6a0e184dda9c19052654989f21163cc Properly check framebuffer status when generating FBOs. --- diff --git a/effect_chain.cpp b/effect_chain.cpp index 0015197..574c44e 100644 --- a/effect_chain.cpp +++ b/effect_chain.cpp @@ -1559,6 +1559,8 @@ void EffectChain::render_to_fbo(GLuint dest_fbo, unsigned width, unsigned height // Last phase goes to the output the user specified. glBindFramebuffer(GL_FRAMEBUFFER, dest_fbo); check_error(); + GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); + assert(status == GL_FRAMEBUFFER_COMPLETE); glViewport(x, y, width, height); if (dither_effect != NULL) { CHECK(dither_effect->set_int("output_width", width)); @@ -1573,6 +1575,8 @@ void EffectChain::render_to_fbo(GLuint dest_fbo, unsigned width, unsigned height output_node->output_texture, 0); check_error(); + GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); + assert(status == GL_FRAMEBUFFER_COMPLETE); glViewport(0, 0, phases[phase]->output_width, phases[phase]->output_height); }