simgear/screen/extensions.cxx simgear/screen/extensions.hxx:
use glXGetProcAddress if approriate
#include "extensions.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) {
// Returns GL_TRUE if the *extName string appears in the *extString string,
return function;
}
-#elif !defined( WIN32 )
+#elif !defined( WIN32 ) && !defined(GLX_VERSION_1_4)
void *SGGetGLProcAddress(const char *func) {
static void *libHandle = NULL;
#endif
#if !defined(WIN32)
-# include <dlfcn.h>
+# include <GL/glx.h>
#endif
#include <simgear/compiler.h>
// don't use an inline function for symbol lookup, since it is too big
void* macosxGetGLProcAddress(const char *func);
-#elif !defined( WIN32 )
+#elif !defined( WIN32 ) && !defined( GLX_VERSION_1_4 )
void *SGGetGLProcAddress(const char *func);
#elif defined( __APPLE__ )
return (void (*)()) macosxGetGLProcAddress(func);
-#else // UNIX
+#elif defined( GLX_VERSION_1_4 )
+ return glXGetProcAddress((const GLubyte*)func);
+#else // UNIX, default
return (void (*)()) SGGetGLProcAddress(func);
#endif
}