[clutter] Include cogl/cogl-egl.h from clutter-egl-headers.h



commit cda4493f99c1d8699d4ddcd79d309f337292b8df
Author: Neil Roberts <neil linux intel com>
Date:   Mon Sep 3 15:11:22 2012 +0100

    Include cogl/cogl-egl.h from clutter-egl-headers.h
    
    Since Cogl version 1.11.2, Cogl no longer includes the EGL headers
    from cogl.h if COGL_ENABLE_EXPERIMENTAL_2_0_API is defined. Instead
    the application needs to include cogl-egl.h so that we can avoid
    polluting the global namespace with X defines. Clutter defines the 2.0
    define in its configure.ac and it is relying on Cogl to include the
    right EGL header in clutter-egl-headers.h so we need to change which
    header it includes.

 clutter/egl/clutter-egl-headers.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/clutter/egl/clutter-egl-headers.h b/clutter/egl/clutter-egl-headers.h
index 15ec994..d7b2f3f 100644
--- a/clutter/egl/clutter-egl-headers.h
+++ b/clutter/egl/clutter-egl-headers.h
@@ -25,6 +25,17 @@
 /* Clutter relies on Cogl to abstract GLES1/2/OpenGL and GLX/EGL etc
  * so we simply include the Cogl header to pull in the appropriate EGL
  * header. */
+
 #include <cogl/cogl.h>
 
+/* Since Cogl 1.11.2, the EGL headers are no longer included from
+ * cogl.h when the experimental 2.0 API is requested. Clutter requests
+ * this in its configure script so we need to switch the header we
+ * include in that case. COGL_VERSION_CHECK is also new in 1.11.2 */
+#ifdef COGL_VERSION_CHECK
+#if COGL_VERSION_CHECK (1, 11, 2)
+#include <cogl/cogl-egl.h>
+#endif
+#endif
+
 #endif /* __CLUTTER_EGL_HEADERS_H__ */



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