Modified Files:

simgear/screen/extensions.cxx simgear/screen/extensions.hxx:
	use glXGetProcAddress if approriate
This commit is contained in:
frohlich
2006-10-31 05:36:50 +00:00
parent 1a85dcd890
commit 63c4873d8a
2 changed files with 9 additions and 4 deletions
+4 -1
View File
@@ -26,6 +26,9 @@
#include "extensions.hxx" #include "extensions.hxx"
#include <simgear/debug/logstream.hxx> #include <simgear/debug/logstream.hxx>
#if !defined(WIN32) && !defined( GLX_VERSION_1_4 )
# include <dlfcn.h>
#endif
bool SGSearchExtensionsString(const char *extString, const char *extName) { bool SGSearchExtensionsString(const char *extString, const char *extName) {
// Returns GL_TRUE if the *extName string appears in the *extString string, // Returns GL_TRUE if the *extName string appears in the *extString string,
@@ -96,7 +99,7 @@ void* macosxGetGLProcAddress(const char *func) {
return function; return function;
} }
#elif !defined( WIN32 ) #elif !defined( WIN32 ) && !defined(GLX_VERSION_1_4)
void *SGGetGLProcAddress(const char *func) { void *SGGetGLProcAddress(const char *func) {
static void *libHandle = NULL; static void *libHandle = NULL;
+5 -3
View File
@@ -33,7 +33,7 @@
#endif #endif
#if !defined(WIN32) #if !defined(WIN32)
# include <dlfcn.h> # include <GL/glx.h>
#endif #endif
#include <simgear/compiler.h> #include <simgear/compiler.h>
@@ -56,7 +56,7 @@ bool SGIsOpenGLExtensionSupported(char *extName);
// don't use an inline function for symbol lookup, since it is too big // don't use an inline function for symbol lookup, since it is too big
void* macosxGetGLProcAddress(const char *func); void* macosxGetGLProcAddress(const char *func);
#elif !defined( WIN32 ) #elif !defined( WIN32 ) && !defined( GLX_VERSION_1_4 )
void *SGGetGLProcAddress(const char *func); void *SGGetGLProcAddress(const char *func);
@@ -70,8 +70,10 @@ inline void (*SGLookupFunction(const char *func))()
#elif defined( __APPLE__ ) #elif defined( __APPLE__ )
return (void (*)()) macosxGetGLProcAddress(func); return (void (*)()) macosxGetGLProcAddress(func);
#else // UNIX #elif defined( GLX_VERSION_1_4 )
return glXGetProcAddress((const GLubyte*)func);
#else // UNIX, default
return (void (*)()) SGGetGLProcAddress(func); return (void (*)()) SGGetGLProcAddress(func);
#endif #endif
} }