From 672bc337ba9e5755df975ff6ee332259737e89c7 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Mon, 18 Jul 2011 16:39:43 +0100 Subject: [PATCH] build: don't explicitly include and egl or gl headers This avoids explicitly including gl or egl headers in clutter-egl-headers.h. We were getting build failures when building clutter against a libcogl that has runtime support for GL and GLES because cogl-defines.h was including gl.h and then clutter-egl-headers.h was later including GLES2/gl.h with typedef conflicts. Clutter relies on Cogl to abstract GL and GLES and the winsys APIs like EGL and GLX so Clutter should just rely on cogl.h to include the appropriate egl.h in clutter-egl-headers.h. Reviewed-by: Emmanuele Bassi Reviewed-by: Neil Roberts --- clutter/cogl/clutter-egl-headers.h | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/clutter/cogl/clutter-egl-headers.h b/clutter/cogl/clutter-egl-headers.h index 402ded259..15ec994f2 100644 --- a/clutter/cogl/clutter-egl-headers.h +++ b/clutter/cogl/clutter-egl-headers.h @@ -22,25 +22,9 @@ #ifndef __CLUTTER_EGL_HEADERS_H__ #define __CLUTTER_EGL_HEADERS_H__ +/* 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 -#if defined(COGL_HAS_GLES1) -#include -#include -#else - -#include -#define NativeDisplayType EGLNativeDisplayType -#define NativeWindowType EGLNativeWindowType - -#if defined(COGL_HAS_GLES2) -#include -#elif defined(COGL_HAS_GL) -#include -#else -#error Unknown Cogl backend -#endif - -#endif /* !COGL_HAS_GLES1 */ - #endif /* __CLUTTER_EGL_HEADERS_H__ */