egl: Fix build for --with-flavour=opengl-egl-xlib
authornobled <nobled@dreamwidth.org>
Tue, 4 Jan 2011 13:56:05 +0000 (13:56 +0000)
committerDamien Lespiau <damien.lespiau@intel.com>
Thu, 6 Jan 2011 17:16:51 +0000 (17:16 +0000)
Make sure the EGL backend doesn't forget to include desktop OpenGL headers.

clutter/egl/clutter-egl-headers.h

index f2d89e1..402ded2 100644 (file)
 
 #include <cogl/cogl.h>
 
-#ifdef COGL_HAS_GLES2
-#include <GLES2/gl2.h>
-#include <EGL/egl.h>
-#else /* COGL_HAS_GLES2 */
+#if defined(COGL_HAS_GLES1)
 #include <GLES/gl.h>
 #include <GLES/egl.h>
-#endif /* COGL_HAS_GLES2 */
+#else
 
-#ifdef COGL_HAS_GLES2
+#include <EGL/egl.h>
 #define NativeDisplayType EGLNativeDisplayType
 #define NativeWindowType EGLNativeWindowType
-#endif /* COGL_HAS_GLES2 */
+
+#if defined(COGL_HAS_GLES2)
+#include <GLES2/gl2.h>
+#elif defined(COGL_HAS_GL)
+#include <GL/gl.h>
+#else
+#error Unknown Cogl backend
+#endif
+
+#endif /* !COGL_HAS_GLES1 */
 
 #endif /* __CLUTTER_EGL_HEADERS_H__ */