summaryrefslogtreecommitdiffstats
path: root/libvo/gl_header_fixes.h
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2012-10-07 19:22:18 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2012-10-07 19:22:18 +0200
commitdb984edf24c16121b04f798e06d0ea509c7b3d88 (patch)
tree79ae025c23089a18a32d0373c53cd24799263e97 /libvo/gl_header_fixes.h
parentabc0ab8f618afe9474d580c3d7f496e487c0e32d (diff)
downloadmpv-db984edf24c16121b04f798e06d0ea509c7b3d88.tar.bz2
mpv-db984edf24c16121b04f798e06d0ea509c7b3d88.tar.xz
gl_common: allow compilation on Mac OS 10.6
Define just enough constants to allow compilation on OS X Snow Leopard. mpv's OpenGL autodetection features should make the rest.
Diffstat (limited to 'libvo/gl_header_fixes.h')
-rw-r--r--libvo/gl_header_fixes.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libvo/gl_header_fixes.h b/libvo/gl_header_fixes.h
index c6f260b289..ebdbbb35b4 100644
--- a/libvo/gl_header_fixes.h
+++ b/libvo/gl_header_fixes.h
@@ -229,3 +229,17 @@
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
#endif
+
+// Define just enough constants to make the OpenGL 3 code compile against
+// older SDKs. Values are taken straight from OpenGL/gl3.h
+#if defined __APPLE__ && !(defined GL_VERSION_3_0)
+#define GL_RGBA16F 0x881A
+#define GL_RGB16F 0x881B
+#define GL_MAJOR_VERSION 0x821B
+#define GL_MINOR_VERSION 0x821C
+#define GL_NUM_EXTENSIONS 0x821D
+
+#ifndef GL_ARB_framebuffer_sRGB
+#define GL_FRAMEBUFFER_SRGB 0x8DB9
+#endif
+#endif