[waffle] [PATCH] glx: provide our own GLX_ARB_create_context_profile defines

Emil Velikov emil.l.velikov at gmail.com
Tue Sep 1 05:17:32 PDT 2015


As of recently the official Nvidia driver does provide its own GL
headers. Although they seem to be missing the defines needed to manage
desktop GL contexts.

Include them for now to fix the build as mentioned in github issue #31.
Tested against version 304.125, although later should also be ok.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/waffle/glx/glx_context.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/waffle/glx/glx_context.c b/src/waffle/glx/glx_context.c
index 57db2ba..1f9290b 100644
--- a/src/waffle/glx/glx_context.c
+++ b/src/waffle/glx/glx_context.c
@@ -29,6 +29,14 @@
 // It is an alias of GLX_CONTEXT_ES2_PROFILE_BIT_EXT.
 #define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
 
+// The official headers provided by nvidia do not provide these via glxext.h
+#ifndef GLX_ARB_create_context_profile
+#define GLX_ARB_create_context_profile 1
+#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB  0x00000001
+#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
+#define GLX_CONTEXT_PROFILE_MASK_ARB      0x9126
+#endif /* GLX_ARB_create_context_profile */
+
 #include <assert.h>
 #include <stdlib.h>
 
-- 
2.5.0



More information about the waffle mailing list