From bde6979c066c60639f05749a2de73c8554eeecc9 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Mon, 16 May 2011 16:12:00 +0100 Subject: [PATCH] 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. --- cogl/cogl-framebuffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c index cfdb2656d..9dc0fbc6f 100644 --- a/cogl/cogl-framebuffer.c +++ b/cogl/cogl-framebuffer.c @@ -1373,7 +1373,9 @@ bind_gl_framebuffer (CoglContext *ctx, _cogl_framebuffer_get_winsys (framebuffer); winsys->onscreen_bind (COGL_ONSCREEN (framebuffer)); #endif - GE (glBindFramebuffer (target, 0)); + /* glBindFramebuffer is an an extension with OpenGL ES 1.1 */ + if (cogl_features_available (COGL_FEATURE_OFFSCREEN)) + GE (glBindFramebuffer (target, 0)); } }