[cogl/wip/android: 9/13] framebuffer: Checks if glBindFramebuffer() exists when using GLES1



commit 6ec998e7e7bd4be53621dfac2c18d26fbcc0181b
Author: Damien Lespiau <damien lespiau intel com>
Date:   Mon May 16 16:12:00 2011 +0100

    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.

 cogl/cogl-framebuffer.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index cfdb265..b962069 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -1373,7 +1373,11 @@ bind_gl_framebuffer (CoglContext *ctx,
         _cogl_framebuffer_get_winsys (framebuffer);
       winsys->onscreen_bind (COGL_ONSCREEN (framebuffer));
 #endif
-      GE (glBindFramebuffer (target, 0));
+#ifdef COGL_HAS_GLES1
+      /* glBindFramebuffer is an an extension with OpenGL ES 1.1 */
+      if (glBindFramebuffer)
+#endif
+        GE (glBindFramebuffer (target, 0));
     }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]