From: John F. Fay Date: Sat, 4 Feb 2012 13:37:52 +0000 (+0000) Subject: Fixing the "glutGetProcAddress" snafu -- thank you, Evan Felix, for finding this X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=1359ef1242ec8e5310430da3373a0b013ac71af6;p=freeglut Fixing the "glutGetProcAddress" snafu -- thank you, Evan Felix, for finding this git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1040 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/Common/freeglut_ext.c b/src/Common/freeglut_ext.c index 49ff88b..917839a 100644 --- a/src/Common/freeglut_ext.c +++ b/src/Common/freeglut_ext.c @@ -29,8 +29,8 @@ #include #include "freeglut_internal.h" -extern SFG_Proc fghGetProcAddress( const char *procName ); -extern GLUTproc fgPlatformGlutGetProcAddress( const char *procName ); +extern SFG_Proc fgPlatformGetProcAddress( const char *procName ); +extern GLUTproc fgPlatformGetGLUTProcAddress( const char *procName ); static GLUTproc fghGetGLUTProcAddress( const char* procName ) { @@ -204,7 +204,7 @@ static GLUTproc fghGetGLUTProcAddress( const char* procName ) #if TARGET_HOST_POSIX_X11 -static GLUTproc fghGetGLUTProcAddress( const char* procName ) +static GLUTproc fgPlatformGetGLUTProcAddress( const char* procName ) { /* optimization: quick initial check */ if( strncmp( procName, "glut", 4 ) != 0 ) @@ -223,13 +223,7 @@ static GLUTproc fghGetGLUTProcAddress( const char* procName ) } -GLUTproc fgPlatformGlutGetProcAddress( const char* procName ) -{ - return NULL; -} - - -SFG_Proc fghGetProcAddress( const char *procName ) +SFG_Proc fgPlatformGetProcAddress( const char *procName ) { #if defined( GLX_ARB_get_proc_address ) return (SFG_Proc)glXGetProcAddressARB( ( const GLubyte * )procName ); @@ -251,7 +245,7 @@ glutGetProcAddress( const char *procName ) /* Some GLUT functions are platform-specific: */ if ( !p ) - p = fgPlatformGlutGetProcAddress( procName ); + p = fgPlatformGetGLUTProcAddress( procName ); - return ( p != NULL ) ? p : fghGetProcAddress( procName ); + return ( p != NULL ) ? p : fgPlatformGetProcAddress( procName ); } diff --git a/src/mswin/freeglut_ext_mswin.c b/src/mswin/freeglut_ext_mswin.c index c08c840..6b09f9d 100644 --- a/src/mswin/freeglut_ext_mswin.c +++ b/src/mswin/freeglut_ext_mswin.c @@ -28,7 +28,7 @@ #include #include "../Common/freeglut_internal.h" -GLUTproc fgPlatformGlutGetProcAddress( const char* procName ) +GLUTproc fgPlatformGetGLUTProcAddress( const char* procName ) { #if !defined(_WIN32_WCE) /* optimization: quick initial check */ @@ -50,7 +50,7 @@ GLUTproc fgPlatformGlutGetProcAddress( const char* procName ) -SFG_Proc fghGetProcAddress( const char *procName ) +SFG_Proc fgPlatformGetProcAddress( const char *procName ) { return (SFG_Proc)wglGetProcAddress( ( LPCSTR )procName ); }