+#ifndef __FREEGLUT_STD_H__\r
+#define __FREEGLUT_STD_H__\r
+\r
+/*\r
+ * freeglut_std.h\r
+ *\r
+ * The GLUT-compatible part of the freeglut library include file\r
+ *\r
+ * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.\r
+ * Written by Pawel W. Olszta, <olszta@sourceforge.net>\r
+ * Creation date: Thu Dec 2 1999\r
+ *\r
+ * Permission is hereby granted, free of charge, to any person obtaining a\r
+ * copy of this software and associated documentation files (the "Software"),\r
+ * to deal in the Software without restriction, including without limitation\r
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,\r
+ * and/or sell copies of the Software, and to permit persons to whom the\r
+ * Software is furnished to do so, subject to the following conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be included\r
+ * in all copies or substantial portions of the Software.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS\r
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\r
+ * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+ */\r
+\r
+#ifdef __cplusplus\r
+ extern "C" {\r
+#endif\r
+\r
+/*\r
+ * Under windows, we have to differentiate between static and dynamic libraries\r
+ */\r
+#ifdef _WIN32\r
+/* #pragma may not be supported by some compilers.\r
+ * Discussion by FreeGLUT developers suggests that\r
+ * Visual C++ specific code involving pragmas may\r
+ * need to move to a separate header. 24th Dec 2003\r
+ */\r
+\r
+/* Define FREEGLUT_LIB_PRAGMAS to 1 to include library\r
+ * pragmas or to 0 to exclude library pragmas.\r
+ * The default behavior depends on the compiler/platform.\r
+ */\r
+# ifndef FREEGLUT_LIB_PRAGMAS\r
+# if ( defined(_MSC_VER) || defined(__WATCOMC__) ) && !defined(_WIN32_WCE)\r
+# define FREEGLUT_LIB_PRAGMAS 1\r
+# else\r
+# define FREEGLUT_LIB_PRAGMAS 0\r
+# endif\r
+# endif\r
+\r
+# ifndef WIN32_LEAN_AND_MEAN\r
+# define WIN32_LEAN_AND_MEAN 1\r
+# endif\r
+# ifndef NOMINMAX\r
+# define NOMINMAX\r
+# endif\r
+# include <windows.h>\r
+\r
+/* Windows static library */\r
+# ifdef FREEGLUT_STATIC\r
+\r
+# define FGAPI\r
+# define FGAPIENTRY\r
+\r
+ /* Link with Win32 static freeglut lib */\r
+# if FREEGLUT_LIB_PRAGMAS\r
+# pragma comment (lib, "freeglut_static.lib")\r
+# endif\r
+\r
+/* Windows shared library (DLL) */\r
+# else\r
+\r
+# define FGAPIENTRY __stdcall\r
+# if defined(FREEGLUT_EXPORTS)\r
+# define FGAPI __declspec(dllexport)\r
+# else\r
+# define FGAPI __declspec(dllimport)\r
+\r
+// /* Link with Win32 shared freeglut lib */\r
+//# if FREEGLUT_LIB_PRAGMAS\r
+//# pragma comment (lib, "freeglut.lib")\r
+//# endif\r
+\r
+# endif\r
+\r
+# endif\r
+\r
+/* Drag in other Windows libraries as required by FreeGLUT */\r
+# if FREEGLUT_LIB_PRAGMAS\r
+# pragma comment (lib, "glu32.lib") /* link OpenGL Utility lib */\r
+# pragma comment (lib, "opengl32.lib") /* link Microsoft OpenGL lib */\r
+# pragma comment (lib, "gdi32.lib") /* link Windows GDI lib */\r
+# pragma comment (lib, "winmm.lib") /* link Windows MultiMedia lib */\r
+# pragma comment (lib, "user32.lib") /* link Windows user lib */\r
+# endif\r
+\r
+#else\r
+\r
+/* Non-Windows definition of FGAPI and FGAPIENTRY */\r
+# define FGAPI\r
+# define FGAPIENTRY\r
+\r
+#endif\r
+\r
+/*\r
+ * The freeglut and GLUT API versions\r
+ */\r
+#define FREEGLUT 1\r
+#define GLUT_API_VERSION 4\r
+#define FREEGLUT_VERSION_2_0 1\r
+#define GLUT_XLIB_IMPLEMENTATION 13\r
+\r
+/*\r
+ * Always include OpenGL and GLU headers\r
+ */\r
+#include <GL/gl.h>\r
+#include <GL/glu.h>\r
+\r
+/*\r
+ * GLUT API macro definitions -- the special key codes:\r
+ */\r
+#define GLUT_KEY_F1 0x0001\r
+#define GLUT_KEY_F2 0x0002\r
+#define GLUT_KEY_F3 0x0003\r
+#define GLUT_KEY_F4 0x0004\r
+#define GLUT_KEY_F5 0x0005\r
+#define GLUT_KEY_F6 0x0006\r
+#define GLUT_KEY_F7 0x0007\r
+#define GLUT_KEY_F8 0x0008\r
+#define GLUT_KEY_F9 0x0009\r
+#define GLUT_KEY_F10 0x000A\r
+#define GLUT_KEY_F11 0x000B\r
+#define GLUT_KEY_F12 0x000C\r
+#define GLUT_KEY_LEFT 0x0064\r
+#define GLUT_KEY_UP 0x0065\r
+#define GLUT_KEY_RIGHT 0x0066\r
+#define GLUT_KEY_DOWN 0x0067\r
+#define GLUT_KEY_PAGE_UP 0x0068\r
+#define GLUT_KEY_PAGE_DOWN 0x0069\r
+#define GLUT_KEY_HOME 0x006A\r
+#define GLUT_KEY_END 0x006B\r
+#define GLUT_KEY_INSERT 0x006C\r
+\r
+/*\r
+ * GLUT API macro definitions -- mouse state definitions\r
+ */\r
+#define GLUT_LEFT_BUTTON 0x0000\r
+#define GLUT_MIDDLE_BUTTON 0x0001\r
+#define GLUT_RIGHT_BUTTON 0x0002\r
+#define GLUT_DOWN 0x0000\r
+#define GLUT_UP 0x0001\r
+#define GLUT_LEFT 0x0000\r
+#define GLUT_ENTERED 0x0001\r
+\r
+/*\r
+ * GLUT API macro definitions -- the display mode definitions\r
+ */\r
+#define GLUT_RGB 0x0000\r
+#define GLUT_RGBA 0x0000\r
+#define GLUT_INDEX 0x0001\r
+#define GLUT_SINGLE 0x0000\r
+#define GLUT_DOUBLE 0x0002\r
+#define GLUT_ACCUM 0x0004\r
+#define GLUT_ALPHA 0x0008\r
+#define GLUT_DEPTH 0x0010\r
+#define GLUT_STENCIL 0x0020\r
+#define GLUT_MULTISAMPLE 0x0080\r
+#define GLUT_STEREO 0x0100\r
+#define GLUT_LUMINANCE 0x0200\r
+\r
+/*\r
+ * GLUT API macro definitions -- windows and menu related definitions\r
+ */\r
+#define GLUT_MENU_NOT_IN_USE 0x0000\r
+#define GLUT_MENU_IN_USE 0x0001\r
+#define GLUT_NOT_VISIBLE 0x0000\r
+#define GLUT_VISIBLE 0x0001\r
+#define GLUT_HIDDEN 0x0000\r
+#define GLUT_FULLY_RETAINED 0x0001\r
+#define GLUT_PARTIALLY_RETAINED 0x0002\r
+#define GLUT_FULLY_COVERED 0x0003\r
+\r
+/*\r
+ * GLUT API macro definitions -- fonts definitions\r
+ *\r
+ * Steve Baker suggested to make it binary compatible with GLUT:\r
+ */\r
+#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__WATCOMC__)\r
+# define GLUT_STROKE_ROMAN ((void *)0x0000)\r
+# define GLUT_STROKE_MONO_ROMAN ((void *)0x0001)\r
+# define GLUT_BITMAP_9_BY_15 ((void *)0x0002)\r
+# define GLUT_BITMAP_8_BY_13 ((void *)0x0003)\r
+# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *)0x0004)\r
+# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *)0x0005)\r
+# define GLUT_BITMAP_HELVETICA_10 ((void *)0x0006)\r
+# define GLUT_BITMAP_HELVETICA_12 ((void *)0x0007)\r
+# define GLUT_BITMAP_HELVETICA_18 ((void *)0x0008)\r
+#else\r
+ /*\r
+ * I don't really know if it's a good idea... But here it goes:\r
+ */\r
+ extern void* glutStrokeRoman;\r
+ extern void* glutStrokeMonoRoman;\r
+ extern void* glutBitmap9By15;\r
+ extern void* glutBitmap8By13;\r
+ extern void* glutBitmapTimesRoman10;\r
+ extern void* glutBitmapTimesRoman24;\r
+ extern void* glutBitmapHelvetica10;\r
+ extern void* glutBitmapHelvetica12;\r
+ extern void* glutBitmapHelvetica18;\r
+\r
+ /*\r
+ * Those pointers will be used by following definitions:\r
+ */\r
+# define GLUT_STROKE_ROMAN ((void *) &glutStrokeRoman)\r
+# define GLUT_STROKE_MONO_ROMAN ((void *) &glutStrokeMonoRoman)\r
+# define GLUT_BITMAP_9_BY_15 ((void *) &glutBitmap9By15)\r
+# define GLUT_BITMAP_8_BY_13 ((void *) &glutBitmap8By13)\r
+# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *) &glutBitmapTimesRoman10)\r
+# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *) &glutBitmapTimesRoman24)\r
+# define GLUT_BITMAP_HELVETICA_10 ((void *) &glutBitmapHelvetica10)\r
+# define GLUT_BITMAP_HELVETICA_12 ((void *) &glutBitmapHelvetica12)\r
+# define GLUT_BITMAP_HELVETICA_18 ((void *) &glutBitmapHelvetica18)\r
+#endif\r
+\r
+/*\r
+ * GLUT API macro definitions -- the glutGet parameters\r
+ */\r
+#define GLUT_WINDOW_X 0x0064\r
+#define GLUT_WINDOW_Y 0x0065\r
+#define GLUT_WINDOW_WIDTH 0x0066\r
+#define GLUT_WINDOW_HEIGHT 0x0067\r
+#define GLUT_WINDOW_BUFFER_SIZE 0x0068\r
+#define GLUT_WINDOW_STENCIL_SIZE 0x0069\r
+#define GLUT_WINDOW_DEPTH_SIZE 0x006A\r
+#define GLUT_WINDOW_RED_SIZE 0x006B\r
+#define GLUT_WINDOW_GREEN_SIZE 0x006C\r
+#define GLUT_WINDOW_BLUE_SIZE 0x006D\r
+#define GLUT_WINDOW_ALPHA_SIZE 0x006E\r
+#define GLUT_WINDOW_ACCUM_RED_SIZE 0x006F\r
+#define GLUT_WINDOW_ACCUM_GREEN_SIZE 0x0070\r
+#define GLUT_WINDOW_ACCUM_BLUE_SIZE 0x0071\r
+#define GLUT_WINDOW_ACCUM_ALPHA_SIZE 0x0072\r
+#define GLUT_WINDOW_DOUBLEBUFFER 0x0073\r
+#define GLUT_WINDOW_RGBA 0x0074\r
+#define GLUT_WINDOW_PARENT 0x0075\r
+#define GLUT_WINDOW_NUM_CHILDREN 0x0076\r
+#define GLUT_WINDOW_COLORMAP_SIZE 0x0077\r
+#define GLUT_WINDOW_NUM_SAMPLES 0x0078\r
+#define GLUT_WINDOW_STEREO 0x0079\r
+#define GLUT_WINDOW_CURSOR 0x007A\r
+\r
+#define GLUT_SCREEN_WIDTH 0x00C8\r
+#define GLUT_SCREEN_HEIGHT 0x00C9\r
+#define GLUT_SCREEN_WIDTH_MM 0x00CA\r
+#define GLUT_SCREEN_HEIGHT_MM 0x00CB\r
+#define GLUT_MENU_NUM_ITEMS 0x012C\r
+#define GLUT_DISPLAY_MODE_POSSIBLE 0x0190\r
+#define GLUT_INIT_WINDOW_X 0x01F4\r
+#define GLUT_INIT_WINDOW_Y 0x01F5\r
+#define GLUT_INIT_WINDOW_WIDTH 0x01F6\r
+#define GLUT_INIT_WINDOW_HEIGHT 0x01F7\r
+#define GLUT_INIT_DISPLAY_MODE 0x01F8\r
+#define GLUT_ELAPSED_TIME 0x02BC\r
+#define GLUT_WINDOW_FORMAT_ID 0x007B\r
+\r
+/*\r
+ * GLUT API macro definitions -- the glutDeviceGet parameters\r
+ */\r
+#define GLUT_HAS_KEYBOARD 0x0258\r
+#define GLUT_HAS_MOUSE 0x0259\r
+#define GLUT_HAS_SPACEBALL 0x025A\r
+#define GLUT_HAS_DIAL_AND_BUTTON_BOX 0x025B\r
+#define GLUT_HAS_TABLET 0x025C\r
+#define GLUT_NUM_MOUSE_BUTTONS 0x025D\r
+#define GLUT_NUM_SPACEBALL_BUTTONS 0x025E\r
+#define GLUT_NUM_BUTTON_BOX_BUTTONS 0x025F\r
+#define GLUT_NUM_DIALS 0x0260\r
+#define GLUT_NUM_TABLET_BUTTONS 0x0261\r
+#define GLUT_DEVICE_IGNORE_KEY_REPEAT 0x0262\r
+#define GLUT_DEVICE_KEY_REPEAT 0x0263\r
+#define GLUT_HAS_JOYSTICK 0x0264\r
+#define GLUT_OWNS_JOYSTICK 0x0265\r
+#define GLUT_JOYSTICK_BUTTONS 0x0266\r
+#define GLUT_JOYSTICK_AXES 0x0267\r
+#define GLUT_JOYSTICK_POLL_RATE 0x0268\r
+\r
+/*\r
+ * GLUT API macro definitions -- the glutLayerGet parameters\r
+ */\r
+#define GLUT_OVERLAY_POSSIBLE 0x0320\r
+#define GLUT_LAYER_IN_USE 0x0321\r
+#define GLUT_HAS_OVERLAY 0x0322\r
+#define GLUT_TRANSPARENT_INDEX 0x0323\r
+#define GLUT_NORMAL_DAMAGED 0x0324\r
+#define GLUT_OVERLAY_DAMAGED 0x0325\r
+\r
+/*\r
+ * GLUT API macro definitions -- the glutVideoResizeGet parameters\r
+ */\r
+#define GLUT_VIDEO_RESIZE_POSSIBLE 0x0384\r
+#define GLUT_VIDEO_RESIZE_IN_USE 0x0385\r
+#define GLUT_VIDEO_RESIZE_X_DELTA 0x0386\r
+#define GLUT_VIDEO_RESIZE_Y_DELTA 0x0387\r
+#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 0x0388\r
+#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 0x0389\r
+#define GLUT_VIDEO_RESIZE_X 0x038A\r
+#define GLUT_VIDEO_RESIZE_Y 0x038B\r
+#define GLUT_VIDEO_RESIZE_WIDTH 0x038C\r
+#define GLUT_VIDEO_RESIZE_HEIGHT 0x038D\r
+\r
+/*\r
+ * GLUT API macro definitions -- the glutUseLayer parameters\r
+ */\r
+#define GLUT_NORMAL 0x0000\r
+#define GLUT_OVERLAY 0x0001\r
+\r
+/*\r
+ * GLUT API macro definitions -- the glutGetModifiers parameters\r
+ */\r
+#define GLUT_ACTIVE_SHIFT 0x0001\r
+#define GLUT_ACTIVE_CTRL 0x0002\r
+#define GLUT_ACTIVE_ALT 0x0004\r
+\r
+/*\r
+ * GLUT API macro definitions -- the glutSetCursor parameters\r
+ */\r
+#define GLUT_CURSOR_RIGHT_ARROW 0x0000\r
+#define GLUT_CURSOR_LEFT_ARROW 0x0001\r
+#define GLUT_CURSOR_INFO 0x0002\r
+#define GLUT_CURSOR_DESTROY 0x0003\r
+#define GLUT_CURSOR_HELP 0x0004\r
+#define GLUT_CURSOR_CYCLE 0x0005\r
+#define GLUT_CURSOR_SPRAY 0x0006\r
+#define GLUT_CURSOR_WAIT 0x0007\r
+#define GLUT_CURSOR_TEXT 0x0008\r
+#define GLUT_CURSOR_CROSSHAIR 0x0009\r
+#define GLUT_CURSOR_UP_DOWN 0x000A\r
+#define GLUT_CURSOR_LEFT_RIGHT 0x000B\r
+#define GLUT_CURSOR_TOP_SIDE 0x000C\r
+#define GLUT_CURSOR_BOTTOM_SIDE 0x000D\r
+#define GLUT_CURSOR_LEFT_SIDE 0x000E\r
+#define GLUT_CURSOR_RIGHT_SIDE 0x000F\r
+#define GLUT_CURSOR_TOP_LEFT_CORNER 0x0010\r
+#define GLUT_CURSOR_TOP_RIGHT_CORNER 0x0011\r
+#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 0x0012\r
+#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 0x0013\r
+#define GLUT_CURSOR_INHERIT 0x0064\r
+#define GLUT_CURSOR_NONE 0x0065\r
+#define GLUT_CURSOR_FULL_CROSSHAIR 0x0066\r
+\r
+/*\r
+ * GLUT API macro definitions -- RGB color component specification definitions\r
+ */\r
+#define GLUT_RED 0x0000\r
+#define GLUT_GREEN 0x0001\r
+#define GLUT_BLUE 0x0002\r
+\r
+/*\r
+ * GLUT API macro definitions -- additional keyboard and joystick definitions\r
+ */\r
+#define GLUT_KEY_REPEAT_OFF 0x0000\r
+#define GLUT_KEY_REPEAT_ON 0x0001\r
+#define GLUT_KEY_REPEAT_DEFAULT 0x0002\r
+\r
+#define GLUT_JOYSTICK_BUTTON_A 0x0001\r
+#define GLUT_JOYSTICK_BUTTON_B 0x0002\r
+#define GLUT_JOYSTICK_BUTTON_C 0x0004\r
+#define GLUT_JOYSTICK_BUTTON_D 0x0008\r
+\r
+/*\r
+ * GLUT API macro definitions -- game mode definitions\r
+ */\r
+#define GLUT_GAME_MODE_ACTIVE 0x0000\r
+#define GLUT_GAME_MODE_POSSIBLE 0x0001\r
+#define GLUT_GAME_MODE_WIDTH 0x0002\r
+#define GLUT_GAME_MODE_HEIGHT 0x0003\r
+#define GLUT_GAME_MODE_PIXEL_DEPTH 0x0004\r
+#define GLUT_GAME_MODE_REFRESH_RATE 0x0005\r
+#define GLUT_GAME_MODE_DISPLAY_CHANGED 0x0006\r
+\r
+/*\r
+ * Initialization functions, see fglut_init.c\r
+ */\r
+FGAPI void FGAPIENTRY glutInit( int* pargc, char** argv );\r
+FGAPI void FGAPIENTRY glutInitWindowPosition( int x, int y );\r
+FGAPI void FGAPIENTRY glutInitWindowSize( int width, int height );\r
+FGAPI void FGAPIENTRY glutInitDisplayMode( unsigned int displayMode );\r
+FGAPI void FGAPIENTRY glutInitDisplayString( const char* displayMode );\r
+\r
+/*\r
+ * Process loop function, see freeglut_main.c\r
+ */\r
+FGAPI void FGAPIENTRY glutMainLoop( void );\r
+\r
+/*\r
+ * Window management functions, see freeglut_window.c\r
+ */\r
+FGAPI int FGAPIENTRY glutCreateWindow( const char* title );\r
+FGAPI int FGAPIENTRY glutCreateSubWindow( int window, int x, int y, int width, int height );\r
+FGAPI void FGAPIENTRY glutDestroyWindow( int window );\r
+FGAPI void FGAPIENTRY glutSetWindow( int window );\r
+FGAPI int FGAPIENTRY glutGetWindow( void );\r
+FGAPI void FGAPIENTRY glutSetWindowTitle( const char* title );\r
+FGAPI void FGAPIENTRY glutSetIconTitle( const char* title );\r
+FGAPI void FGAPIENTRY glutReshapeWindow( int width, int height );\r
+FGAPI void FGAPIENTRY glutPositionWindow( int x, int y );\r
+FGAPI void FGAPIENTRY glutShowWindow( void );\r
+FGAPI void FGAPIENTRY glutHideWindow( void );\r
+FGAPI void FGAPIENTRY glutIconifyWindow( void );\r
+FGAPI void FGAPIENTRY glutPushWindow( void );\r
+FGAPI void FGAPIENTRY glutPopWindow( void );\r
+FGAPI void FGAPIENTRY glutFullScreen( void );\r
+\r
+/*\r
+ * Display-connected functions, see freeglut_display.c\r
+ */\r
+FGAPI void FGAPIENTRY glutPostWindowRedisplay( int window );\r
+FGAPI void FGAPIENTRY glutPostRedisplay( void );\r
+FGAPI void FGAPIENTRY glutSwapBuffers( void );\r
+\r
+/*\r
+ * Mouse cursor functions, see freeglut_cursor.c\r
+ */\r
+FGAPI void FGAPIENTRY glutWarpPointer( int x, int y );\r
+FGAPI void FGAPIENTRY glutSetCursor( int cursor );\r
+\r
+/*\r
+ * Overlay stuff, see freeglut_overlay.c\r
+ */\r
+FGAPI void FGAPIENTRY glutEstablishOverlay( void );\r
+FGAPI void FGAPIENTRY glutRemoveOverlay( void );\r
+FGAPI void FGAPIENTRY glutUseLayer( GLenum layer );\r
+FGAPI void FGAPIENTRY glutPostOverlayRedisplay( void );\r
+FGAPI void FGAPIENTRY glutPostWindowOverlayRedisplay( int window );\r
+FGAPI void FGAPIENTRY glutShowOverlay( void );\r
+FGAPI void FGAPIENTRY glutHideOverlay( void );\r
+\r
+/*\r
+ * Menu stuff, see freeglut_menu.c\r
+ */\r
+FGAPI int FGAPIENTRY glutCreateMenu( void (* callback)( int menu ) );\r
+FGAPI void FGAPIENTRY glutDestroyMenu( int menu );\r
+FGAPI int FGAPIENTRY glutGetMenu( void );\r
+FGAPI void FGAPIENTRY glutSetMenu( int menu );\r
+FGAPI void FGAPIENTRY glutAddMenuEntry( const char* label, int value );\r
+FGAPI void FGAPIENTRY glutAddSubMenu( const char* label, int subMenu );\r
+FGAPI void FGAPIENTRY glutChangeToMenuEntry( int item, const char* label, int value );\r
+FGAPI void FGAPIENTRY glutChangeToSubMenu( int item, const char* label, int value );\r
+FGAPI void FGAPIENTRY glutRemoveMenuItem( int item );\r
+FGAPI void FGAPIENTRY glutAttachMenu( int button );\r
+FGAPI void FGAPIENTRY glutDetachMenu( int button );\r
+\r
+/*\r
+ * Global callback functions, see freeglut_callbacks.c\r
+ */\r
+FGAPI void FGAPIENTRY glutTimerFunc( unsigned int time, void (* callback)( int ), int value );\r
+FGAPI void FGAPIENTRY glutIdleFunc( void (* callback)( void ) );\r
+\r
+/*\r
+ * Window-specific callback functions, see freeglut_callbacks.c\r
+ */\r
+FGAPI void FGAPIENTRY glutKeyboardFunc( void (* callback)( unsigned char, int, int ) );\r
+FGAPI void FGAPIENTRY glutSpecialFunc( void (* callback)( int, int, int ) );\r
+FGAPI void FGAPIENTRY glutReshapeFunc( void (* callback)( int, int ) );\r
+FGAPI void FGAPIENTRY glutVisibilityFunc( void (* callback)( int ) );\r
+FGAPI void FGAPIENTRY glutDisplayFunc( void (* callback)( void ) );\r
+FGAPI void FGAPIENTRY glutMouseFunc( void (* callback)( int, int, int, int ) );\r
+FGAPI void FGAPIENTRY glutMotionFunc( void (* callback)( int, int ) );\r
+FGAPI void FGAPIENTRY glutPassiveMotionFunc( void (* callback)( int, int ) );\r
+FGAPI void FGAPIENTRY glutEntryFunc( void (* callback)( int ) );\r
+\r
+FGAPI void FGAPIENTRY glutKeyboardUpFunc( void (* callback)( unsigned char, int, int ) );\r
+FGAPI void FGAPIENTRY glutSpecialUpFunc( void (* callback)( int, int, int ) );\r
+FGAPI void FGAPIENTRY glutJoystickFunc( void (* callback)( unsigned int, int, int, int ), int pollInterval );\r
+FGAPI void FGAPIENTRY glutMenuStateFunc( void (* callback)( int ) );\r
+FGAPI void FGAPIENTRY glutMenuStatusFunc( void (* callback)( int, int, int ) );\r
+FGAPI void FGAPIENTRY glutOverlayDisplayFunc( void (* callback)( void ) );\r
+FGAPI void FGAPIENTRY glutWindowStatusFunc( void (* callback)( int ) );\r
+\r
+FGAPI void FGAPIENTRY glutSpaceballMotionFunc( void (* callback)( int, int, int ) );\r
+FGAPI void FGAPIENTRY glutSpaceballRotateFunc( void (* callback)( int, int, int ) );\r
+FGAPI void FGAPIENTRY glutSpaceballButtonFunc( void (* callback)( int, int ) );\r
+FGAPI void FGAPIENTRY glutButtonBoxFunc( void (* callback)( int, int ) );\r
+FGAPI void FGAPIENTRY glutDialsFunc( void (* callback)( int, int ) );\r
+FGAPI void FGAPIENTRY glutTabletMotionFunc( void (* callback)( int, int ) );\r
+FGAPI void FGAPIENTRY glutTabletButtonFunc( void (* callback)( int, int, int, int ) );\r
+\r
+/*\r
+ * State setting and retrieval functions, see freeglut_state.c\r
+ */\r
+FGAPI int FGAPIENTRY glutGet( GLenum query );\r
+FGAPI int FGAPIENTRY glutDeviceGet( GLenum query );\r
+FGAPI int FGAPIENTRY glutGetModifiers( void );\r
+FGAPI int FGAPIENTRY glutLayerGet( GLenum query );\r
+\r
+/*\r
+ * Font stuff, see freeglut_font.c\r
+ */\r
+FGAPI void FGAPIENTRY glutBitmapCharacter( void* font, int character );\r
+FGAPI int FGAPIENTRY glutBitmapWidth( void* font, int character );\r
+FGAPI void FGAPIENTRY glutStrokeCharacter( void* font, int character );\r
+FGAPI int FGAPIENTRY glutStrokeWidth( void* font, int character );\r
+FGAPI int FGAPIENTRY glutBitmapLength( void* font, const unsigned char* string );\r
+FGAPI int FGAPIENTRY glutStrokeLength( void* font, const unsigned char* string );\r
+\r
+/*\r
+ * Geometry functions, see freeglut_geometry.c\r
+ */\r
+FGAPI void FGAPIENTRY glutWireCube( GLdouble size );\r
+FGAPI void FGAPIENTRY glutSolidCube( GLdouble size );\r
+FGAPI void FGAPIENTRY glutWireSphere( GLdouble radius, GLint slices, GLint stacks );\r
+FGAPI void FGAPIENTRY glutSolidSphere( GLdouble radius, GLint slices, GLint stacks );\r
+FGAPI void FGAPIENTRY glutWireCone( GLdouble base, GLdouble height, GLint slices, GLint stacks );\r
+FGAPI void FGAPIENTRY glutSolidCone( GLdouble base, GLdouble height, GLint slices, GLint stacks );\r
+\r
+FGAPI void FGAPIENTRY glutWireTorus( GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings );\r
+FGAPI void FGAPIENTRY glutSolidTorus( GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings );\r
+FGAPI void FGAPIENTRY glutWireDodecahedron( void );\r
+FGAPI void FGAPIENTRY glutSolidDodecahedron( void );\r
+FGAPI void FGAPIENTRY glutWireOctahedron( void );\r
+FGAPI void FGAPIENTRY glutSolidOctahedron( void );\r
+FGAPI void FGAPIENTRY glutWireTetrahedron( void );\r
+FGAPI void FGAPIENTRY glutSolidTetrahedron( void );\r
+FGAPI void FGAPIENTRY glutWireIcosahedron( void );\r
+FGAPI void FGAPIENTRY glutSolidIcosahedron( void );\r
+\r
+/*\r
+ * Teapot rendering functions, found in freeglut_teapot.c\r
+ */\r
+FGAPI void FGAPIENTRY glutWireTeapot( GLdouble size );\r
+FGAPI void FGAPIENTRY glutSolidTeapot( GLdouble size );\r
+\r
+/*\r
+ * Game mode functions, see freeglut_gamemode.c\r
+ */\r
+FGAPI void FGAPIENTRY glutGameModeString( const char* string );\r
+FGAPI int FGAPIENTRY glutEnterGameMode( void );\r
+FGAPI void FGAPIENTRY glutLeaveGameMode( void );\r
+FGAPI int FGAPIENTRY glutGameModeGet( GLenum query );\r
+\r
+/*\r
+ * Video resize functions, see freeglut_videoresize.c\r
+ */\r
+FGAPI int FGAPIENTRY glutVideoResizeGet( GLenum query );\r
+FGAPI void FGAPIENTRY glutSetupVideoResizing( void );\r
+FGAPI void FGAPIENTRY glutStopVideoResizing( void );\r
+FGAPI void FGAPIENTRY glutVideoResize( int x, int y, int width, int height );\r
+FGAPI void FGAPIENTRY glutVideoPan( int x, int y, int width, int height );\r
+\r
+/*\r
+ * Colormap functions, see freeglut_misc.c\r
+ */\r
+FGAPI void FGAPIENTRY glutSetColor( int color, GLfloat red, GLfloat green, GLfloat blue );\r
+FGAPI GLfloat FGAPIENTRY glutGetColor( int color, int component );\r
+FGAPI void FGAPIENTRY glutCopyColormap( int window );\r
+\r
+/*\r
+ * Misc keyboard and joystick functions, see freeglut_misc.c\r
+ */\r
+FGAPI void FGAPIENTRY glutIgnoreKeyRepeat( int ignore );\r
+FGAPI void FGAPIENTRY glutSetKeyRepeat( int repeatMode );\r
+FGAPI void FGAPIENTRY glutForceJoystickFunc( void );\r
+\r
+/*\r
+ * Misc functions, see freeglut_misc.c\r
+ */\r
+FGAPI int FGAPIENTRY glutExtensionSupported( const char* extension );\r
+FGAPI void FGAPIENTRY glutReportErrors( void );\r
+\r
+/* Comment from glut.h of classic GLUT:\r
+\r
+ Win32 has an annoying issue where there are multiple C run-time\r
+ libraries (CRTs). If the executable is linked with a different CRT\r
+ from the GLUT DLL, the GLUT DLL will not share the same CRT static\r
+ data seen by the executable. In particular, atexit callbacks registered\r
+ in the executable will not be called if GLUT calls its (different)\r
+ exit routine). GLUT is typically built with the\r
+ "/MD" option (the CRT with multithreading DLL support), but the Visual\r
+ C++ linker default is "/ML" (the single threaded CRT).\r
+\r
+ One workaround to this issue is requiring users to always link with\r
+ the same CRT as GLUT is compiled with. That requires users supply a\r
+ non-standard option. GLUT 3.7 has its own built-in workaround where\r
+ the executable's "exit" function pointer is covertly passed to GLUT.\r
+ GLUT then calls the executable's exit function pointer to ensure that\r
+ any "atexit" calls registered by the application are called if GLUT\r
+ needs to exit.\r
+\r
+ Note that the __glut*WithExit routines should NEVER be called directly.\r
+ To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */\r
+\r
+/* to get the prototype for exit() */\r
+#include <stdlib.h>\r
+\r
+#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) && !defined(__WATCOMC__)\r
+FGAPI void FGAPIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int));\r
+FGAPI int FGAPIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int));\r
+FGAPI int FGAPIENTRY __glutCreateMenuWithExit(void (* func)(int), void (__cdecl *exitfunc)(int));\r
+#ifndef FREEGLUT_BUILDING_LIB\r
+#if defined(__GNUC__)\r
+#define FGUNUSED __attribute__((unused))\r
+#else\r
+#define FGUNUSED\r
+#endif\r
+static void FGAPIENTRY FGUNUSED glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); }\r
+#define glutInit glutInit_ATEXIT_HACK\r
+static int FGAPIENTRY FGUNUSED glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); }\r
+#define glutCreateWindow glutCreateWindow_ATEXIT_HACK\r
+static int FGAPIENTRY FGUNUSED glutCreateMenu_ATEXIT_HACK(void (* func)(int)) { return __glutCreateMenuWithExit(func, exit); }\r
+#define glutCreateMenu glutCreateMenu_ATEXIT_HACK\r
+#endif\r
+#endif\r
+\r
+#ifdef __cplusplus\r
+ }\r
+#endif\r
+\r
+/*** END OF FILE ***/\r
+\r
+#endif /* __FREEGLUT_STD_H__ */\r
+\r