diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2011-05-16 16:12:00 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2011-05-17 15:24:54 +0100 |
commit | bde6979c066c60639f05749a2de73c8554eeecc9 (patch) | |
tree | a34df950e01492662663d660dd8c569fbf6b9726 | |
parent | d384466a580108b6163de5beb77dfc3c143fa2d4 (diff) | |
download | cogl-bde6979c066c60639f05749a2de73c8554eeecc9.tar.gz |
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.
-rw-r--r-- | cogl/cogl-framebuffer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c index cfdb2656..9dc0fbc6 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)); } } |