1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-10-04 13:27:14 +00:00

fix MSVC OpenGL linkage warnings & mingw linker problems. use SDL.lib also for MinGW.

This commit is contained in:
fgenesis 2011-08-11 04:56:27 +02:00
commit 827e8f2a4b
7 changed files with 14 additions and 52 deletions

View file

@ -1797,7 +1797,7 @@ void Core::setSDLGLAttributes()
#define GLAPIENTRY
#endif
#if BBGE_BUILD_OPENGL_DYNAMIC
#ifdef BBGE_BUILD_OPENGL_DYNAMIC
#define GL_FUNC(ret,fn,params,call,rt) \
extern "C" { \
static ret (GLAPIENTRY *p##fn) params = NULL; \

View file

@ -32,9 +32,7 @@ GLuint emptyTexture() // Create An Empty Texture
// Create Storage Space For Texture Data (128x128x4)
data = (unsigned int*)new GLuint[((quality * quality)* 4 * sizeof(unsigned int))];
#ifdef BBGE_BUILD_WINDOWS
ZeroMemory(data,((quality * quality)* 4 * sizeof(unsigned int))); // Clear Storage Memory
#endif
memset(data, 0, ((quality * quality)* 4 * sizeof(unsigned int))); // Clear Storage Memory
#ifdef BBGE_BUILD_OPENGL
glGenTextures(1, &txtnumber); // Create 1 Texture

View file

@ -35,9 +35,18 @@ extern "C" {
#define APIENTRY
#endif
#ifndef WIN32
// BBGE HACK:
// Because Win32 uses __declspec(dllimport) for OpenGL function imports,
// although Core.cpp defines its own functions using the same names, which are just accessing
// OpenGL function pointers acquired elsewhere, this leads to inconsistent linkage between
// declaration in gl.h and the actual function definition in Core.cpp.
// So, we use this little hack to disable external linkage globally.
#undef WINGDIAPI
#define WINGDIAPI extern
/*#ifndef WIN32
#define WINGDIAPI
#endif
#endif*/
#ifndef GLAPI
# ifdef _WIN32