framebuffer: Checks if glBindFramebuffer() exists when using GLES1

With GLES 1, frame buffers are a optional extensions. We need to make
sure the pointer exist before calling the function and do that by just
checkout the corresponding feature.
This commit is contained in:
Damien Lespiau 2011-05-16 16:12:00 +01:00
parent d384466a58
commit bde6979c06

View File

@ -1373,6 +1373,8 @@ bind_gl_framebuffer (CoglContext *ctx,
_cogl_framebuffer_get_winsys (framebuffer);
winsys->onscreen_bind (COGL_ONSCREEN (framebuffer));
#endif
/* glBindFramebuffer is an an extension with OpenGL ES 1.1 */
if (cogl_features_available (COGL_FEATURE_OFFSCREEN))
GE (glBindFramebuffer (target, 0));
}
}