* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "../include/GL/freeglut.h"
+#define GLX_GLXEXT_PROTOTYPES
+#include <GL/freeglut.h>
#include "freeglut_internal.h"
-
struct name_address_pair
{
const char *name;
{ "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 },
{ "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 },
{ "glutGetProcAddress", (void *) glutGetProcAddress },
{ "glutMouseWheelFunc", (void *) glutMouseWheelFunc },
{ NULL, NULL }
-};
+};
void *FGAPIENTRY glutGetProcAddress( const char *procName )
{
/* Try GLUT functions first */
int i;
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutGetProcAddress" );
for( i = 0; glut_functions[ i ].name; i++ )
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 );