aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-09-01 13:17:32 +0100
committerChad Versace <chad.versace@intel.com>2015-11-09 16:45:45 -0800
commitfe1186281ea7511cadffde3f7c81039ec329ce28 (patch)
tree00ef6f67b16215032fde73a450cd3d80fb9e457b
parent750a0a23ce3406c318fc79cbdd15ee8b7a4a55da (diff)
downloadwaffle-fe1186281ea7511cadffde3f7c81039ec329ce28.tar.gz
glx: Provide our own GLX_ARB_create_context_profile defines
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. Issue: http://github.com/waffle-gl/waffle/issues/31 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Chad Versace <chad.versace@intel.com>
-rw-r--r--src/waffle/glx/glx_context.c8
1 files changed, 8 insertions, 0 deletions
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>