Works around #8, but we lose the functionality to lookup the gl symbols
that we need on mingw. Also, I have no clue about the disabled pglDeleteTextures
"cheat".
#pragma warning(disable: 4273)
#endif
#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; \
#define GL_FUNC(ret,fn,params,call,rt) \
extern "C" { \
static ret (GLAPIENTRY *p##fn) params = NULL; \
}
#include "glstubs.h"
#undef GL_FUNC
}
#include "glstubs.h"
#undef GL_FUNC
#ifdef _MSC_VER
#pragma warning(pop)
#ifdef _MSC_VER
#pragma warning(pop)
static bool lookup_all_glsyms(void)
{
bool retval = true;
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
#define GL_FUNC(ret,fn,params,call,rt) \
if (!lookup_glsym(#fn, (void **) &p##fn)) retval = false;
#include "glstubs.h"
#undef GL_FUNC
+#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;
#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;