#include <GL/gl.h>
#include <GL/glu.h>
+#if defined(__MINGW32__)
+#include <GL/mesa_wgl.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
and redifinition of Windows system defs, also removes requirement of
pretty much any standard windows header from this file */
-#if (_MSC_VER >= 800) || defined(__MINGW32__) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__)
+#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__)
# define GLUTAPIENTRY __stdcall
#else
# define GLUTAPIENTRY
#endif
/* GLUT API entry point declarations for Win32. */
-#if defined(GLUT_BUILDING_LIB) && defined(_DLL)
+#if (defined(BUILD_GLUT32) || defined(GLUT_BUILDING_LIB)) && defined(_DLL)
# define GLUTAPI __declspec(dllexport)
#elif defined(_DLL)
# define GLUTAPI __declspec(dllimport)
# pragma message( "----: being multiply defined you should include WINDOWS.H priot to gl/glut.h" )
# endif
# define CALLBACK __stdcall
-typedef int (GLUTAPIENTRY *PROC)();
-typedef void *HGLRC;
-typedef void *HDC;
+
+#if !defined(__MINGW32__)
+ typedef int (GLUTAPIENTRY *PROC)();
+ typedef void *HGLRC;
+ typedef void *HDC;
+#endif
typedef unsigned long COLORREF;
#endif
#else /* _WIN32 not defined */
/* Define GLUTAPIENTRY and GLUTCALLBACK to nothing if we aren't on Win32. */
-# define GLUTAPIENTRY
+# define GLUTAPIENTRY GLAPIENTRY
# define GLUTAPIENTRYV
-# define GLUT_APIENTRY_DEFINED
# define GLUTCALLBACK
# define GLUTAPI extern
-/* Prototype exit for the non-Win32 case (see above). */
-/*extern void exit(int); this screws up gcc -ansi -pedantic! */
+
#endif
GLUTAPI int GLUTAPIENTRY glutLayerGet(GLenum type);
#endif
#if (GLUT_API_VERSION >= 5)
-GLUTAPI void * GLUTAPIENTRY glutGetProcAddress(const char *procName);
+typedef void (*GLUTproc)();
+GLUTAPI GLUTproc GLUTAPIENTRY glutGetProcAddress(const char *procName);
#endif
/* GLUT font sub-API */
}
#endif
-#if 0
-#ifdef GLUT_APIENTRY_DEFINED
-# undef GLUT_APIENTRY_DEFINED
-# undef APIENTRY
-#endif
-
-#ifdef GLUT_WINGDIAPI_DEFINED
-# undef GLUT_WINGDIAPI_DEFINED
-# undef WINGDIAPI
-#endif
-
-#ifdef GLUT_DEFINED___CDECL
-# undef GLUT_DEFINED___CDECL
-# undef __cdecl
-#endif
-
-#ifdef GLUT_DEFINED__CRTIMP
-# undef GLUT_DEFINED__CRTIMP
-# undef _CRTIMP
-#endif
-#endif
-
#endif /* __glut_h__ */