diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-04-25 07:32:42 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-04-25 07:32:42 +0000 |
commit | 5cdca550058a667f8f5aa643dc0ef9f1099605db (patch) | |
tree | 589b759629392703e61f3689167c67e8a547c785 /libvo | |
parent | 7fc3b782eab00e27f0b9eb260b52b1dc1dabb9c2 (diff) | |
download | mpv-5cdca550058a667f8f5aa643dc0ef9f1099605db.tar.bz2 mpv-5cdca550058a667f8f5aa643dc0ef9f1099605db.tar.xz |
Use SDL_GL_ProcAddress to work around conflicts between -lGL
and -framework OpenGL.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31073 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/gl_common.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c index c0c414f812..e21d40f9d2 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -1854,6 +1854,15 @@ static void swapGlBuffers_sdl(MPGLContext *ctx) { SDL_GL_SwapBuffers(); } +static void *sdlgpa(const GLubyte *name) { + return SDL_GL_GetProcAddress(name); +} + +static int setGlWindow_sdl(MPGLContext *ctx) { + SDL_GL_LoadLibrary(NULL); + getFunctions(sdlgpa, NULL); + return SET_WINDOW_OK; +} #endif static int setGlWindow_dummy(MPGLContext *ctx) { @@ -1902,6 +1911,7 @@ int init_mpglcontext(MPGLContext *ctx, enum MPGLType type) { #ifdef CONFIG_GL_SDL case GLTYPE_SDL: SDL_Init(SDL_INIT_VIDEO); + ctx->setGlWindow = setGlWindow_sdl; ctx->swapGlBuffers = swapGlBuffers_sdl; return 1; #endif |