DEADSOFTWARE

Use SDL for GetProcAddress
authormittorn <mittorn@sibmail.com>
Thu, 16 Jun 2016 07:41:51 +0000 (14:41 +0700)
committermittorn <mittorn@sibmail.com>
Thu, 16 Jun 2016 07:41:51 +0000 (14:41 +0700)
nanogl.cpp

index bd699da41c968ebe4af9455963bb0afac9e2b35a..0f4bc6a2de12c0744ebfea90fb41a2cb3e1c1972 100644 (file)
@@ -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);
 }
-