2012-03-17 09:49:15 +00:00
|
|
|
/*
|
|
|
|
* This file is part of MPlayer.
|
|
|
|
*
|
|
|
|
* MPlayer is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* MPlayer is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
|
|
|
* You can alternatively redistribute this file and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
2013-03-03 12:02:10 +00:00
|
|
|
#ifdef MP_GET_GL_WORKAROUNDS
|
|
|
|
|
2012-03-17 09:49:15 +00:00
|
|
|
// workaround for some gl.h headers
|
|
|
|
#ifndef GLAPIENTRY
|
|
|
|
#ifdef APIENTRY
|
|
|
|
#define GLAPIENTRY APIENTRY
|
2013-07-16 11:28:28 +00:00
|
|
|
#elif HAVE_GL_WIN32
|
2012-03-17 09:49:15 +00:00
|
|
|
#define GLAPIENTRY __stdcall
|
|
|
|
#else
|
|
|
|
#define GLAPIENTRY
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef GL_TEXTURE_RECTANGLE
|
|
|
|
#define GL_TEXTURE_RECTANGLE 0x84F5
|
|
|
|
#endif
|
|
|
|
#ifndef GL_UNSIGNED_SHORT_8_8
|
|
|
|
#define GL_UNSIGNED_SHORT_8_8 0x85BA
|
|
|
|
#endif
|
|
|
|
#ifndef GL_UNSIGNED_SHORT_8_8_REV
|
|
|
|
#define GL_UNSIGNED_SHORT_8_8_REV 0x85BB
|
|
|
|
#endif
|
|
|
|
|
2013-07-16 11:28:28 +00:00
|
|
|
#if HAVE_GL_WIN32 && !defined(WGL_CONTEXT_MAJOR_VERSION_ARB)
|
2012-03-17 09:49:15 +00:00
|
|
|
/* these are supposed to be defined in wingdi.h but mingw's is too old */
|
|
|
|
/* only the bits actually used by mplayer are defined */
|
|
|
|
/* reference: http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt */
|
|
|
|
|
|
|
|
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
|
|
|
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
|
|
|
|
#define WGL_CONTEXT_FLAGS_ARB 0x2094
|
|
|
|
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
|
|
|
|
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
|
|
|
|
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
|
|
|
#endif
|
2012-10-07 17:22:18 +00:00
|
|
|
|
2013-11-05 21:39:19 +00:00
|
|
|
#ifndef GL_NV_vdpau_interop
|
2013-11-05 21:06:48 +00:00
|
|
|
#define GLvdpauSurfaceNV GLintptr
|
|
|
|
#endif
|
|
|
|
|
2014-12-23 02:12:37 +00:00
|
|
|
#ifndef GL_DEBUG_SEVERITY_HIGH
|
|
|
|
#define GL_DEBUG_SEVERITY_HIGH 0x9146
|
|
|
|
#define GL_DEBUG_SEVERITY_MEDIUM 0x9147
|
|
|
|
#define GL_DEBUG_SEVERITY_LOW 0x9148
|
|
|
|
#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
|
|
|
|
#endif
|
2014-12-17 21:17:11 +00:00
|
|
|
|
2013-03-03 12:02:10 +00:00
|
|
|
#undef MP_GET_GL_WORKAROUNDS
|
|
|
|
|
2015-01-22 07:27:03 +00:00
|
|
|
#endif // MP_GET_GL_WORKAROUNDS
|
2013-03-03 12:02:10 +00:00
|
|
|
|
|
|
|
#ifdef MP_GET_GLX_WORKAROUNDS
|
|
|
|
|
2012-10-19 16:05:09 +00:00
|
|
|
// 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
|
2012-11-12 22:24:01 +00:00
|
|
|
#ifndef __APPLE__
|
|
|
|
// These are respectively 0x00000001 and 0x00000002 on OSX
|
2012-10-19 16:05:09 +00:00
|
|
|
#define GLX_CONTEXT_DEBUG_BIT_ARB 0x0001
|
|
|
|
#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
|
2012-11-12 22:24:01 +00:00
|
|
|
#endif
|
2012-10-19 16:05:09 +00:00
|
|
|
#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
|
|
|
#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
|
|
|
#endif
|
2014-12-19 19:29:31 +00:00
|
|
|
// GLX_EXT_create_context_es2_profile
|
|
|
|
#ifndef GLX_CONTEXT_ES2_PROFILE_BIT_EXT
|
|
|
|
#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
|
|
|
|
#endif
|
2013-03-03 12:02:10 +00:00
|
|
|
|
|
|
|
#undef MP_GET_GLX_WORKAROUNDS
|
|
|
|
|
|
|
|
#endif
|