diff options
-rw-r--r-- | video/out/gl_common.c | 4 | ||||
-rw-r--r-- | video/out/gl_common.h | 1 | ||||
-rw-r--r-- | video/out/gl_header_fixes.h | 12 |
3 files changed, 17 insertions, 0 deletions
diff --git a/video/out/gl_common.c b/video/out/gl_common.c index 1f7b51de5b..89ed0cbbd3 100644 --- a/video/out/gl_common.c +++ b/video/out/gl_common.c @@ -1060,8 +1060,12 @@ static void swapGlBuffers_w32(MPGLContext *ctx) #ifdef CONFIG_GL_X11 #include <X11/Xlib.h> #include <GL/glx.h> + #include "x11_common.h" +#define MP_GET_GLX_WORKAROUNDS +#include "gl_header_fixes.h" + struct glx_context { XVisualInfo *vinfo; GLXContext context; diff --git a/video/out/gl_common.h b/video/out/gl_common.h index 415e31e941..0150e9319c 100644 --- a/video/out/gl_common.h +++ b/video/out/gl_common.h @@ -47,6 +47,7 @@ #include <GL/glext.h> #endif +#define MP_GET_GL_WORKAROUNDS #include "video/out/gl_header_fixes.h" struct GL; diff --git a/video/out/gl_header_fixes.h b/video/out/gl_header_fixes.h index 41a3aabcd3..7f859defbf 100644 --- a/video/out/gl_header_fixes.h +++ b/video/out/gl_header_fixes.h @@ -21,6 +21,8 @@ * version 2.1 of the License, or (at your option) any later version. */ +#ifdef MP_GET_GL_WORKAROUNDS + // workaround for some gl.h headers #ifndef GLAPIENTRY #ifdef APIENTRY @@ -244,6 +246,12 @@ #endif #endif +#undef MP_GET_GL_WORKAROUNDS + +#endif + +#ifdef MP_GET_GLX_WORKAROUNDS + // 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 @@ -258,3 +266,7 @@ #define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 #define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 #endif + +#undef MP_GET_GLX_WORKAROUNDS + +#endif |