[cogl/wip/android: 9/12] framebuffer: Checks if glBindFramebuffer() exists when using GLES1
- From: Damien Lespiau <dlespiau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/android: 9/12] framebuffer: Checks if glBindFramebuffer() exists when using GLES1
- Date: Mon, 16 May 2011 16:55:11 +0000 (UTC)
commit 57498c3626c0c7b84481c8aa819d8cca2d57ec35
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]