[cogl/cogl-1.14] egl: define missing EGL_KHR_create_context enums



commit af8803baab104ce9430191858d16410a0c7f2454
Author: Robert Bragg <robert linux intel com>
Date:   Wed Feb 27 15:22:59 2013 +0000

    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)

 cogl/winsys/cogl-winsys-egl.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
index af8181b..9947652 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]