From 0c46504c2a3a67ae15a6336e1fce75326fbbc6d3 Mon Sep 17 00:00:00 2001 From: yabause Date: Fri, 5 Dec 2008 22:50:45 +0000 Subject: [PATCH] Fixed compilation for linux, I guess it's still broke on mac. (AFAIK, there's no need for *GetProcAddress on mac) --- desmume/src/OGLRender.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/desmume/src/OGLRender.cpp b/desmume/src/OGLRender.cpp index 5319b300f..95ba44225 100644 --- a/desmume/src/OGLRender.cpp +++ b/desmume/src/OGLRender.cpp @@ -112,7 +112,8 @@ static bool isTranslucent; #ifdef _WIN32 #define INITOGLEXT(x,y) y = (x)wglGetProcAddress(#y); #else -#define INITOGLEXT(x,y) y = (x)glXGetProcAddress(#y); +#include +#define INITOGLEXT(x,y) y = (x)glXGetProcAddress((const GLubyte *) #y); #endif OGLEXT(PFNGLCREATESHADERPROC,glCreateShader) @@ -133,7 +134,9 @@ OGLEXT(PFNGLVALIDATEPROGRAMPROC,glValidateProgram) OGLEXT(PFNGLBLENDFUNCSEPARATEEXTPROC,glBlendFuncSeparateEXT) OGLEXT(PFNGLGETUNIFORMLOCATIONPROC,glGetUniformLocation) OGLEXT(PFNGLUNIFORM1IPROC,glUniform1i) +#ifdef _WIN32 OGLEXT(PFNGLACTIVETEXTUREPROC,glActiveTexture) +#endif //opengl state caching: @@ -411,7 +414,9 @@ static char Init(void) INITOGLEXT(PFNGLBLENDFUNCSEPARATEEXTPROC,glBlendFuncSeparateEXT) INITOGLEXT(PFNGLGETUNIFORMLOCATIONPROC,glGetUniformLocation) INITOGLEXT(PFNGLUNIFORM1IPROC,glUniform1i) +#ifdef _WIN32 INITOGLEXT(PFNGLACTIVETEXTUREPROC,glActiveTexture) +#endif /* Create the shaders */ createShaders();