diff src/video/x11/SDL_x11gl_c.h @ 1191:2bd4cec0de63

Seperate glX from HAVE_OPENGL, for platforms that have both an X server and a more official way to do OpenGL, explicitly check for glX on Mac OS X, and use SDL_LoadObject for platforms that have glX but don't have dlopen().
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 23 Nov 2005 11:46:36 +0000
parents b8d311d90021
children c9b51268668f
line wrap: on
line diff
--- a/src/video/x11/SDL_x11gl_c.h	Wed Nov 23 07:29:56 2005 +0000
+++ b/src/video/x11/SDL_x11gl_c.h	Wed Nov 23 11:46:36 2005 +0000
@@ -25,19 +25,21 @@
  "@(#) $Id$";
 #endif
 
-#ifdef HAVE_OPENGL
+#ifdef HAVE_OPENGL_X11
 #include <GL/glx.h>
+#ifdef USE_DLOPEN
 #include <dlfcn.h>
-#if defined(__OpenBSD__) && !defined(__ELF__)
-#define dlsym(x,y) dlsym(x, "_" y)
+#else
+#include "SDL_loadso.h"
 #endif
 #endif
+
 #include "SDL_sysvideo.h"
 
 struct SDL_PrivateGLData {
     int gl_active; /* to stop switching drivers while we have a valid context */
 
-#ifdef HAVE_OPENGL
+#ifdef HAVE_OPENGL_X11
     GLXContext glx_context;	/* Current GL context */
     XVisualInfo* glx_visualinfo; /* XVisualInfo* returned by glXChooseVisual */
 
@@ -82,7 +84,7 @@
 	      int screen);
 
     
-#endif /* HAVE_OPENGL */
+#endif /* HAVE_OPENGL_X11 */
 };
 
 /* Old variable names */
@@ -95,7 +97,7 @@
 extern int X11_GL_CreateWindow(_THIS, int w, int h);
 extern int X11_GL_CreateContext(_THIS);
 extern void X11_GL_Shutdown(_THIS);
-#ifdef HAVE_OPENGL
+#ifdef HAVE_OPENGL_X11
 extern int X11_GL_MakeCurrent(_THIS);
 extern int X11_GL_GetAttribute(_THIS, SDL_GLattr attrib, int* value);
 extern void X11_GL_SwapBuffers(_THIS);