]> git.jsancho.org Git - lugaru.git/blobdiff - Source/OpenGL_Windows.cpp
mingw: Temporarily disable glstubs logic to fix build
[lugaru.git] / Source / OpenGL_Windows.cpp
index 5c32c25ecd6d3f1d3da9ce40447b75d8af1503ba..d74b557c4aeb66f87a6f046389e9812d2792dca6 100644 (file)
@@ -21,29 +21,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 
 #ifdef WIN32
-#define UINT8 WIN32API_UINT8
-#define UINT16 WIN32API_UINT16
-#define boolean WIN32API_boolean
 #include <windows.h>
-#undef UINT8
-#undef UINT16
-#undef boolean
 #endif
 
-
-
 #include "Game.h"
-extern "C" {
-#include "zlib.h"
-#include "png.h"
-#ifdef WIN32
-#define INT32 INT32_jpeg
-#include "jpeglib.h"
-#undef INT32
-#else
-#include "jpeglib.h"
-#endif
-}
+
+#include <jpeglib.h>
+#include <png.h>
+#include <zlib.h>
 
 using namespace Game;
 
@@ -107,6 +92,7 @@ void CleanUp (void);
 #pragma warning(disable: 4273)
 #endif
 
+#ifndef __MINGW32__ // FIXME: Temporary workaround for GL-8
 #define GL_FUNC(ret,fn,params,call,rt) \
     extern "C" { \
         static ret (GLAPIENTRY *p##fn) params = NULL; \
@@ -114,6 +100,7 @@ void CleanUp (void);
     }
 #include "glstubs.h"
 #undef GL_FUNC
+#endif // __MINGW32__
 
 #ifdef _MSC_VER
 #pragma warning(pop)
@@ -132,10 +119,12 @@ static bool lookup_glsym(const char *funcname, void **func)
 static bool lookup_all_glsyms(void)
 {
     bool retval = true;
+#ifndef __MINGW32__ // FIXME: Temporary workaround for GL-8
 #define GL_FUNC(ret,fn,params,call,rt) \
         if (!lookup_glsym(#fn, (void **) &p##fn)) retval = false;
 #include "glstubs.h"
 #undef GL_FUNC
+#endif // __MINGW32__
     return retval;
 }
 
@@ -592,12 +581,14 @@ void CleanUp (void)
     LOGFUNC;
 
     SDL_Quit();
+#ifndef __MINGW32__ // FIXME: Temporary workaround for GL-8
 #define GL_FUNC(ret,fn,params,call,rt) p##fn = NULL;
 #include "glstubs.h"
 #undef GL_FUNC
     // cheat here...static destructors are calling glDeleteTexture() after
     //  the context is destroyed and libGL unloaded by SDL_Quit().
     pglDeleteTextures = glDeleteTextures_doNothing;
+#endif // __MINGW32__
 
 }