]> git.mxchange.org Git - simgear.git/blobdiff - simgear/screen/extensions.hxx
restore some part of the code to prevent an untwanted segmentationf fault.
[simgear.git] / simgear / screen / extensions.hxx
index fe40550a32e0903ad34d71fd0c9620f56e8f7ff2..c58f441605f0c891b04cc9f28368e42ecebfa450 100644 (file)
 # include <windows.h>
 #endif
 
-#if !defined(WIN32)
-# include <GL/glx.h>
-#endif
-
 #include <simgear/compiler.h>
 
-#include SG_GL_H
+#include <osg/GL>
 
+#if !defined(__APPLE__) && !defined(WIN32)
+#  include <GL/glx.h>
+#endif
 
 #if defined(__cplusplus)
 extern "C" {
@@ -50,13 +49,13 @@ extern "C" {
 #endif
 
 bool SGSearchExtensionsString(const char *extString, const char *extName);
-bool SGIsOpenGLExtensionSupported(char *extName);
+bool SGIsOpenGLExtensionSupported(const char *extName);
 
 #ifdef __APPLE__
   // don't use an inline function for symbol lookup, since it is too big
   void* macosxGetGLProcAddress(const char *func);
 
-#elif !defined( WIN32 ) && !defined( GLX_VERSION_1_4 )
+#elif !defined( WIN32 )
 
   void *SGGetGLProcAddress(const char *func);
   
@@ -70,9 +69,6 @@ inline void (*SGLookupFunction(const char *func))()
 #elif defined( __APPLE__ )
     return (void (*)()) macosxGetGLProcAddress(func);
 
-#elif defined( GLX_VERSION_1_4 )
-    return glXGetProcAddress((const GLubyte*)func);
-
 #else // UNIX, default
     return (void (*)()) SGGetGLProcAddress(func);
 #endif