#include <string.h>
-#ifdef WIN32
-#include <windows.h>
-#endif
-
-#if !defined( WIN32 ) && !defined( __APPLE__ )
-#include <dlfcn.h>
-#endif
-
#include "extensions.hxx"
bool SGSearchExtensionsString(char *extString, char *extName) {
#ifndef __SG_EXTENSIONS_HXX
#define __SG_EXTENSIONS_HXX 1
+#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
+# include <windows.h>
+#else
+# include <dlfcn.h>
+#endif
+
#include <GL/gl.h>
+
#if defined(__cplusplus)
extern "C" {
#endif
inline void (*SGLookupFunction(const char *func))() {
-#if defined( WIN32 )
+#if defined( WIN32 ) && !defined(__CYGWIN__) && !defined(__MINGW32__)
return (void (*)()) wglGetProcAddress(func);
#elif defined( __APPLE__ )
// 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 )
+ #if defined( linux ) || defined ( sgi ) || defined(__CYGWIN__) || defined(__MINGW32__)
void *libHandle;
void (*fptr)();
libHandle = dlopen("libGL.so", RTLD_LAZY);