[500/906] gldisplay: do not call glCheckFramebufferStatus if 0 is bound

Indeed it may return GL_FRAMEBUFFER_UNDEFINED if there is no
default framebuffer.
It seems to be the case on MacOSX
This commit is contained in:
Julien Isorce 2012-04-20 12:33:38 +02:00 committed by Tim-Philipp Müller
parent 67bc74ec3f
commit 20c429684e

View file

@ -2177,6 +2177,10 @@ gst_gl_display_check_framebuffer_status (void)
GST_ERROR ("GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS");
break;
case GL_FRAMEBUFFER_UNDEFINED:
GST_ERROR ("GL_FRAMEBUFFER_UNDEFINED");
break;
default:
GST_ERROR ("General FBO error");
}
@ -3286,9 +3290,9 @@ gst_gl_display_thread_do_upload_draw (GstGLDisplay * display)
viewport_dim[3]);
#endif
glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, 0);
gst_gl_display_check_framebuffer_status ();
glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, 0);
}
@ -3578,10 +3582,10 @@ gst_gl_display_thread_do_download_draw_yuv (GstGLDisplay * display)
viewport_dim[3]);
#endif
glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, 0);
gst_gl_display_check_framebuffer_status ();
glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, 0);
glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, display->download_fbo);
#ifndef OPENGL_ES2
glReadBuffer (GL_COLOR_ATTACHMENT0_EXT);
@ -3627,6 +3631,7 @@ gst_gl_display_thread_do_download_draw_yuv (GstGLDisplay * display)
glReadBuffer (GL_NONE);
#endif
glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, 0);
gst_gl_display_check_framebuffer_status ();
glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, 0);
}