summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-19 18:05:09 +0200
committerwm4 <wm4@nowhere>2012-10-20 17:31:25 +0200
commit842402c6ca61efcb9d681e86e70d9136bd8d2bf7 (patch)
tree909a77270cf3d57b450234531adf87e45e6097a8
parentcc6ca112e0c614c0265485439cd6640acaa616aa (diff)
downloadmpv-842402c6ca61efcb9d681e86e70d9136bd8d2bf7.tar.bz2
mpv-842402c6ca61efcb9d681e86e70d9136bd8d2bf7.tar.xz
gl_common: hack to support compilation on FreeBSD
It seems FreeBSD 10.0-CURRENT as of this time doesn't include the GLX extension and header file definitions for creating OpenGL 3.x core contexts. Dump some more hacks into gl_header_fixes.h.
-rw-r--r--libvo/gl_header_fixes.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libvo/gl_header_fixes.h b/libvo/gl_header_fixes.h
index ebdbbb35b4..d149a9970a 100644
--- a/libvo/gl_header_fixes.h
+++ b/libvo/gl_header_fixes.h
@@ -243,3 +243,15 @@
#define GL_FRAMEBUFFER_SRGB 0x8DB9
#endif
#endif
+
+// FreeBSD 10.0-CURRENT lacks the GLX_ARB_create_context extension completely
+#ifndef GLX_CONTEXT_MAJOR_VERSION_ARB
+#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
+#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
+#define GLX_CONTEXT_FLAGS_ARB 0x2094
+#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
+#define GLX_CONTEXT_DEBUG_BIT_ARB 0x0001
+#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
+#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
+#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
+#endif