[Cogl] [PATCH] gl: #ifdef guard ARB_sync api in cogl-all-functions.h

Robert Bragg robert at sixbynine.org
Tue May 28 15:32:43 PDT 2013


From: Robert Bragg <robert at linux.intel.com>

The ARB_sync api depends on a GLsync type which may not be available if
GL_ARB_sync isn't defined, such as when building for gles2 only. This
guards the prototypes with #ifdef GL_ARB_sync to fix compilation when a
GLsync type isn't defined.
---
 cogl/gl-prototypes/cogl-all-functions.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cogl/gl-prototypes/cogl-all-functions.h b/cogl/gl-prototypes/cogl-all-functions.h
index d774e45..392f8c8 100644
--- a/cogl/gl-prototypes/cogl-all-functions.h
+++ b/cogl/gl-prototypes/cogl-all-functions.h
@@ -298,6 +298,7 @@ COGL_EXT_FUNCTION (GLvoid *, glMapBufferRange,
                     GLbitfield access))
 COGL_EXT_END ()
 
+#ifdef GL_ARB_sync
 COGL_EXT_BEGIN (sync, 3, 2,
                 0, /* not in either GLES */
                 "ARB:\0",
@@ -309,3 +310,4 @@ COGL_EXT_FUNCTION (GLenum, glClientWaitSync,
 COGL_EXT_FUNCTION (void, glDeleteSync,
                    (GLsync sync))
 COGL_EXT_END ()
+#endif
-- 
1.8.2.1



More information about the Cogl mailing list