X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_ext.c;h=bcda7a2500c856dea818dc7fbcef935591af6aa3;hb=91fa73f22d66ddca47d3402ffaac09cebfb36190;hp=5b2ca928b14cdd515232fb03afd2f34b2d0829ec;hpb=7c1f2d267626b937acdb59e18c0e22fabbc6d339;p=freeglut diff --git a/src/freeglut_ext.c b/src/freeglut_ext.c index 5b2ca92..bcda7a2 100644 --- a/src/freeglut_ext.c +++ b/src/freeglut_ext.c @@ -29,7 +29,9 @@ #include "config.h" #endif -#include "../include/GL/freeglut.h" +#define GLX_GLXEXT_PROTOTYPES + +#include #include "freeglut_internal.h" @@ -109,7 +111,9 @@ static struct name_address_pair glut_functions[] = { "glutWindowStatusFunc", (void *) glutWindowStatusFunc }, { "glutKeyboardUpFunc", (void *) glutKeyboardUpFunc }, { "glutSpecialUpFunc", (void *) glutSpecialUpFunc }, +#if !TARGET_HOST_WINCE { "glutJoystickFunc", (void *) glutJoystickFunc }, +#endif /* !TARGET_HOST_WINCE */ { "glutSetColor", (void *) glutSetColor }, { "glutGetColor", (void *) glutGetColor }, { "glutCopyColormap", (void *) glutCopyColormap }, @@ -150,11 +154,13 @@ static struct name_address_pair glut_functions[] = { "glutReportErrors", (void *) glutReportErrors }, { "glutIgnoreKeyRepeat", (void *) glutIgnoreKeyRepeat }, { "glutSetKeyRepeat", (void *) glutSetKeyRepeat }, +#if !TARGET_HOST_WINCE { "glutForceJoystickFunc", (void *) glutForceJoystickFunc }, { "glutGameModeString", (void *) glutGameModeString }, { "glutEnterGameMode", (void *) glutEnterGameMode }, { "glutLeaveGameMode", (void *) glutLeaveGameMode }, { "glutGameModeGet", (void *) glutGameModeGet }, +#endif /* !TARGET_HOST_WINCE */ /* freeglut extensions */ { "glutMainLoopEvent", (void *) glutMainLoopEvent }, { "glutLeaveMainLoop", (void *) glutLeaveMainLoop }, @@ -172,12 +178,14 @@ static struct name_address_pair glut_functions[] = { "glutStrokeString", (void *) glutStrokeString }, { "glutWireRhombicDodecahedron", (void *) glutWireRhombicDodecahedron }, { "glutSolidRhombicDodecahedron", (void *) glutSolidRhombicDodecahedron }, - { "glutWireSierpinskiSponge ", (void *) glutWireSierpinskiSponge }, - { "glutSolidSierpinskiSponge ", (void *) glutSolidSierpinskiSponge }, + { "glutWireSierpinskiSponge", (void *) glutWireSierpinskiSponge }, + { "glutSolidSierpinskiSponge", (void *) glutSolidSierpinskiSponge }, + { "glutWireCylinder", (void *) glutWireCylinder }, + { "glutSolidCylinder", (void *) glutSolidCylinder }, { "glutGetProcAddress", (void *) glutGetProcAddress }, { "glutMouseWheelFunc", (void *) glutMouseWheelFunc }, { NULL, NULL } -}; +}; void *FGAPIENTRY glutGetProcAddress( const char *procName ) @@ -185,11 +193,11 @@ void *FGAPIENTRY glutGetProcAddress( const char *procName ) /* Try GLUT functions first */ int i; for( i = 0; glut_functions[ i ].name; i++ ) - if( strcmp( glut_functions[ i ].name, procName ) == 0) - return glut_functions[ i ].address; + if( strcmp( glut_functions[ i ].name, procName ) == 0) + return glut_functions[ i ].address; /* Try core GL functions */ -#if TARGET_HOST_WIN32 +#if TARGET_HOST_WIN32 || TARGET_HOST_WINCE return( void * )wglGetProcAddress( ( LPCSTR )procName ); #elif TARGET_HOST_UNIX_X11 && defined( GLX_ARB_get_proc_address ) return(void * )glXGetProcAddressARB( ( const GLubyte * )procName );