mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
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.
This commit is contained in:
parent
1d6c6f0dad
commit
dd5a1c888b
@ -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
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
||||
|
13
configure.ac
13
configure.ac
@ -336,6 +336,19 @@ AS_IF([test "x$enable_gles1" = "xyes"],
|
||||
[AC_MSG_ERROR([Unable to locate GLES/glext.h])],
|
||||
[#include <GLES/gl.h>])
|
||||
|
||||
# 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.
|
||||
AC_CHECK_HEADERS([GLES/egl.h EGL/egl.h])
|
||||
|
||||
AS_IF([test "x$ac_cv_header_GLES_egl_h" = "xyes"],
|
||||
[COGL_GLES1_EGL_INCLUDE="#include <GLES/egl.h>"],
|
||||
[AS_IF([test "x$ac_cv_header_EGL_egl_h" = "xyes"],
|
||||
[COGL_GLES1_EGL_INCLUDE="#include <EGL/egl.h>"],
|
||||
[AC_MSG_ERROR([Unable to locate EGL header])])])
|
||||
AC_SUBST([COGL_GLES1_EGL_INCLUDE])
|
||||
|
||||
# Check for a GLES 1.x Common Profile library with/without EGL.
|
||||
#
|
||||
# Note: historically GLES 1 libraries shipped with the
|
||||
|
Loading…
Reference in New Issue
Block a user