From: frohlich Date: Tue, 31 Oct 2006 05:36:50 +0000 (+0000) Subject: Modified Files: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=63c4873d8a138562acfdbe1a7f14df44dcadd522;p=simgear.git Modified Files: simgear/screen/extensions.cxx simgear/screen/extensions.hxx: use glXGetProcAddress if approriate --- diff --git a/simgear/screen/extensions.cxx b/simgear/screen/extensions.cxx index a317bda4..49161812 100644 --- a/simgear/screen/extensions.cxx +++ b/simgear/screen/extensions.cxx @@ -26,6 +26,9 @@ #include "extensions.hxx" #include +#if !defined(WIN32) && !defined( GLX_VERSION_1_4 ) +# include +#endif bool SGSearchExtensionsString(const char *extString, const char *extName) { // Returns GL_TRUE if the *extName string appears in the *extString string, @@ -96,7 +99,7 @@ void* macosxGetGLProcAddress(const char *func) { return function; } -#elif !defined( WIN32 ) +#elif !defined( WIN32 ) && !defined(GLX_VERSION_1_4) void *SGGetGLProcAddress(const char *func) { static void *libHandle = NULL; diff --git a/simgear/screen/extensions.hxx b/simgear/screen/extensions.hxx index aa5dd3c7..fe40550a 100644 --- a/simgear/screen/extensions.hxx +++ b/simgear/screen/extensions.hxx @@ -33,7 +33,7 @@ #endif #if !defined(WIN32) -# include +# include #endif #include @@ -56,7 +56,7 @@ bool SGIsOpenGLExtensionSupported(char *extName); // 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); @@ -70,8 +70,10 @@ inline void (*SGLookupFunction(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 }