diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2011-05-13 08:04:47 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2011-05-17 15:24:54 +0100 |
commit | dd5a1c888b68e3d8a4f41212cb257c1e8dc3833b (patch) | |
tree | e124c0f4361492102868d3e49b5272b1f6327dfc /cogl | |
parent | 1d6c6f0dad79e73fa719eb4b91d0f6455f6d921c (diff) | |
download | cogl-dd5a1c888b68e3d8a4f41212cb257c1e8dc3833b.tar.gz |
gles1: Include GLES/egl.h or EGL/egl.h depending on the implementation
Early implementations provided only a GLES/egl.h while Khronos's
implementer guide now states EGL/egl.h is the One. Some implementations
keep a GLES/egl.h wrapper around EGL/egl.h for backward compatibility
while others provide EGL/egl.h only.
Also took the opportunity to factorize a bit this inclusion in
cogl-defines.h.
Diffstat (limited to 'cogl')
-rw-r--r-- | cogl/cogl-context.h | 12 | ||||
-rw-r--r-- | cogl/cogl-defines.h.in | 11 | ||||
-rw-r--r-- | cogl/winsys/cogl-winsys-egl.c | 16 |
3 files changed, 12 insertions, 27 deletions
diff --git a/cogl/cogl-context.h b/cogl/cogl-context.h index 7cd0785d..bce47f1f 100644 --- a/cogl/cogl-context.h +++ b/cogl/cogl-context.h @@ -31,19 +31,9 @@ #ifndef __COGL_CONTEXT_H__ #define __COGL_CONTEXT_H__ +#include <cogl/cogl-defines.h> #include <cogl/cogl-display.h> -#ifdef COGL_HAS_EGL_SUPPORT -#ifdef COGL_HAS_GLES1 -#include <GLES/gl.h> -#include <GLES/egl.h> -#else -#include <EGL/egl.h> -#define NativeDisplayType EGLNativeDisplayType -#define NativeWindowType EGLNativeWindowType -#endif -#endif - G_BEGIN_DECLS /** diff --git a/cogl/cogl-defines.h.in b/cogl/cogl-defines.h.in index ccc7673a..0803463a 100644 --- a/cogl/cogl-defines.h.in +++ b/cogl/cogl-defines.h.in @@ -31,6 +31,17 @@ G_BEGIN_DECLS @COGL_DEFINES@ +#ifdef COGL_HAS_EGL_SUPPORT +#ifdef COGL_HAS_GLES1 +#include <GLES/gl.h> +@COGL_GLES1_EGL_INCLUDE@ +#else +#include <EGL/egl.h> +#define NativeDisplayType EGLNativeDisplayType +#define NativeWindowType EGLNativeWindowType +#endif +#endif + G_END_DECLS #endif diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c index f503cd18..133e127f 100644 --- a/cogl/winsys/cogl-winsys-egl.c +++ b/cogl/winsys/cogl-winsys-egl.c @@ -55,22 +55,6 @@ #include <glib/gi18n-lib.h> -#ifdef COGL_HAS_GLES1 - -#include <GLES/gl.h> -#include <GLES/egl.h> - -#else - -#include <EGL/egl.h> -#define NativeDisplayType EGLNativeDisplayType -#define NativeWindowType EGLNativeWindowType - -#endif - - -#include <EGL/egl.h> - #ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT #include <X11/Xlib.h> |