Mercurial > mplayer.hg
changeset 31031:d94eeec25c47
Use SDL_GL_ProcAddress to work around conflicts between -lGL
and -framework OpenGL.
author | reimar |
---|---|
date | Sun, 25 Apr 2010 07:32:42 +0000 |
parents | 9a02edff6c50 |
children | 362425fe3de8 |
files | libvo/gl_common.c |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/gl_common.c Sun Apr 25 06:52:13 2010 +0000 +++ b/libvo/gl_common.c Sun Apr 25 07:32:42 2010 +0000 @@ -1854,6 +1854,15 @@ 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 @@ #ifdef CONFIG_GL_SDL case GLTYPE_SDL: SDL_Init(SDL_INIT_VIDEO); + ctx->setGlWindow = setGlWindow_sdl; ctx->swapGlBuffers = swapGlBuffers_sdl; return 1; #endif