mirror of
https://github.com/brl/mutter.git
synced 2025-01-11 12:12:25 +00:00
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 <ebassi@linux.intel.com> Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
parent
90aa7b9446
commit
672bc337ba
@ -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 <cogl/cogl.h>
|
||||
|
||||
#if defined(COGL_HAS_GLES1)
|
||||
#include <GLES/gl.h>
|
||||
#include <GLES/egl.h>
|
||||
#else
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#define NativeDisplayType EGLNativeDisplayType
|
||||
#define NativeWindowType EGLNativeWindowType
|
||||
|
||||
#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__ */
|
||||
|
Loading…
Reference in New Issue
Block a user