From: mittorn Date: Thu, 16 Jun 2016 07:41:51 +0000 (+0700) Subject: Use SDL for GetProcAddress X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=3bfb0b2c9c04f5463e75b604fd11c042eb3b3ff1;p=nanogl.git Use SDL for GetProcAddress --- diff --git a/nanogl.cpp b/nanogl.cpp index bd699da..0f4bc6a 100644 --- a/nanogl.cpp +++ b/nanogl.cpp @@ -89,21 +89,13 @@ void APIENTRY gl_unimplemented(GLenum none) { void *nanoGL_GetProcAddress(const char *name) { -#if defined(__MULTITEXTURE_SUPPORT__) - if (!strcmp(procname, "glMultiTexCoord2fARB")) - { - return (void*)&glMultiTexCoord2fARB; - } - else if (!strcmp(procname, "glActiveTextureARB")) - { - return (void*)&glActiveTexture; - } - else if (!strcmp(procname, "glClientActiveTextureARB")) - { - return (void*)&glClientActiveTexture; - } + void *addr = NULL; +#ifdef XASH_SDL + addr = SDL_GL_GetProcAddress( name ); + if( !addr ) #endif - return dlsym(glesLib, name); + addr = dlsym(glesLib, name); + return addr; } static int CreateGlEsInterface( const char * name, void * lib, void * lib1, void * default_func ) @@ -303,4 +295,3 @@ void nanoGL_Destroy() // release lib dlclose(glesLib); } -