summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2013-02-27 15:22:59 +0000
committerRobert Bragg <robert@linux.intel.com>2013-03-24 23:55:10 +0000
commitaf8803baab104ce9430191858d16410a0c7f2454 (patch)
tree30f1487fd4d9f1b52161d0832bace4e0cbb255de
parent61f510ea6f587a03de9fb5e5658951433a4a5d67 (diff)
downloadcogl-af8803baab104ce9430191858d16410a0c7f2454.tar.gz
egl: define missing EGL_KHR_create_context enums
This makes sure the EGL_KHR_create_context enums are always defined in cogl-winsys-egl.c so we will build with drivers that don't support this extension. Cogl will do runtime checks to explicitly check that the extension is available before ever referencing these enums so this is safe to do. https://bugzilla.gnome.org/show_bug.cgi?id=694537 Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit bd034b7451e7d9c602bcc91f1a00f6aaa7b05ec0)
-rw-r--r--cogl/winsys/cogl-winsys-egl.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
index af8181bb..99476523 100644
--- a/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/winsys/cogl-winsys-egl.c
@@ -51,6 +51,24 @@
#include <glib/gi18n-lib.h>
+
+#ifndef EGL_KHR_create_context
+#define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098
+#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB
+#define EGL_CONTEXT_FLAGS_KHR 0x30FC
+#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD
+#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD
+#define EGL_OPENGL_ES3_BIT_KHR 0x0040
+#define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE
+#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF
+#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001
+#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
+#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004
+#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001
+#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
+#endif
+
+
#define MAX_EGL_CONFIG_ATTRIBS 30
/* Define a set of arrays containing the functions required from GL