diff --git a/source/lib/ogl.cpp b/source/lib/ogl.cpp index 2e34077811..21cfee2819 100644 --- a/source/lib/ogl.cpp +++ b/source/lib/ogl.cpp @@ -228,13 +228,13 @@ static void importExtensionFunctions() // checking for the extension. // (TODO: this calls ogl_HaveVersion far more times than is necessary - // we should probably use the have_* variables instead) -#define FUNC(ret, name, params) *(void**)&p##name = SDL_GL_GetProcAddress(#name); +#define FUNC(ret, name, params) p##name = (ret (*) params)SDL_GL_GetProcAddress(#name); #define FUNC2(ret, nameARB, nameCore, version, params) \ p##nameARB = NULL; \ if(ogl_HaveVersion(version)) \ - *(void**)&p##nameARB = SDL_GL_GetProcAddress(#nameCore); \ + p##nameARB = (ret (*) params)SDL_GL_GetProcAddress(#nameCore); \ if(!p##nameARB) /* use the ARB name if the driver lied about what version it supports */ \ - *(void**)&p##nameARB = SDL_GL_GetProcAddress(#nameARB); + p##nameARB = (ret (*) params)SDL_GL_GetProcAddress(#nameARB); #include "glext_funcs.h" #undef FUNC2 #undef FUNC