[MPlayer-cvslog] r31073 - trunk/libvo/gl_common.c

reimar subversion at mplayerhq.hu
Sun Apr 25 09:32:42 CEST 2010


Author: reimar
Date: Sun Apr 25 09:32:42 2010
New Revision: 31073

Log:
Use SDL_GL_ProcAddress to work around conflicts between -lGL
and -framework OpenGL.

Modified:
   trunk/libvo/gl_common.c

Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c	Sun Apr 25 08:52:13 2010	(r31072)
+++ trunk/libvo/gl_common.c	Sun Apr 25 09:32:42 2010	(r31073)
@@ -1854,6 +1854,15 @@ static void swapGlBuffers_sdl(MPGLContex
   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, e
 #ifdef CONFIG_GL_SDL
   case GLTYPE_SDL:
     SDL_Init(SDL_INIT_VIDEO);
+    ctx->setGlWindow = setGlWindow_sdl;
     ctx->swapGlBuffers = swapGlBuffers_sdl;
     return 1;
 #endif


More information about the MPlayer-cvslog mailing list