]> git.mxchange.org Git - simgear.git/blobdiff - simgear/screen/extensions.hxx
performance monitor: start measurement interval with a fresh timestamp.
[simgear.git] / simgear / screen / extensions.hxx
index 77efd3c3af93a584cce905e880780660170773be..ab5a929fdde01055ae6969e9fc07bd10c1c194e1 100644 (file)
 #ifndef __SG_EXTENSIONS_HXX
 #define __SG_EXTENSIONS_HXX 1
 
-#include <GL/gl.h>
 
-#if defined(__cplusplus)
-extern "C" {
-#endif
+#include <simgear/compiler.h>
 
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-
-static bool SGSearchExtensionsString(char *extString, char *extName);
-bool SGIsOpenGLExtensionSupported(char *extName);
-
-inline void (*SGLookupFunction(const char *func))() {
-
-#if defined( WIN32 )
-        return (void (*)()) wglGetProcAddress(func);
-
-#else
-
-  // If the target system s UNIX and the ARB_get_proc_address
-  // GLX extension is *not* guaranteed to be supported. An alternative
-  // dlsym-based approach will be used instead.
-  #if defined( linux ) || defined ( sgi )
-        void *libHandle;
-        void (*fptr)();
-        libHandle = dlopen("libGL.so", RTLD_LAZY);
-        fptr = (void (*)()) dlsym(libHandle, func);
-        dlclose(libHandle);
-        return fptr;
-  #else
-        return glXGetProcAddressARB(func);
-  #endif
-#endif
-}
-
-
-
-/* OpenGL extension declarations */
-typedef void (APIENTRY * glPointParameterfProc)(GLenum pname, GLfloat param);
-typedef void (APIENTRY * glPointParameterfvProc)(GLenum pname, const GLfloat *params);
-
-#if defined(__cplusplus)
-}
-#endif
+bool SGSearchExtensionsString(const char *extString, const char *extName);
+bool SGIsOpenGLExtensionSupported(const char *extName);
 
 #endif // !__SG_EXTENSIONS_HXX