aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan.akhgari@gmail.com>2012-01-28 14:20:48 -0500
committerEhsan Akhgari <ehsan.akhgari@gmail.com>2012-01-28 14:20:48 -0500
commit60f50b53e7b27c79bfd0888b44db2a78fa6344ba (patch)
tree7bdbf4068d42b726836201ce0ade6a96f1a4ac75
parente254b0fdf6e011f497e4ec12743aecc572a1020c (diff)
Use the freeglut header
-rw-r--r--system/include/GL/freeglut_std.h628
-rw-r--r--system/include/GL/glut.h617
2 files changed, 649 insertions, 596 deletions
diff --git a/system/include/GL/freeglut_std.h b/system/include/GL/freeglut_std.h
new file mode 100644
index 00000000..ba1b7165
--- /dev/null
+++ b/system/include/GL/freeglut_std.h
@@ -0,0 +1,628 @@
+#ifndef __FREEGLUT_STD_H__
+#define __FREEGLUT_STD_H__
+
+/*
+ * freeglut_std.h
+ *
+ * The GLUT-compatible part of the freeglut library include file
+ *
+ * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
+ * Written by Pawel W. Olszta, <olszta@sourceforge.net>
+ * Creation date: Thu Dec 2 1999
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/*
+ * Under windows, we have to differentiate between static and dynamic libraries
+ */
+#ifdef _WIN32
+/* #pragma may not be supported by some compilers.
+ * Discussion by FreeGLUT developers suggests that
+ * Visual C++ specific code involving pragmas may
+ * need to move to a separate header. 24th Dec 2003
+ */
+
+/* Define FREEGLUT_LIB_PRAGMAS to 1 to include library
+ * pragmas or to 0 to exclude library pragmas.
+ * The default behavior depends on the compiler/platform.
+ */
+# ifndef FREEGLUT_LIB_PRAGMAS
+# if ( defined(_MSC_VER) || defined(__WATCOMC__) ) && !defined(_WIN32_WCE)
+# define FREEGLUT_LIB_PRAGMAS 1
+# else
+# define FREEGLUT_LIB_PRAGMAS 0
+# endif
+# endif
+
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN 1
+# endif
+# ifndef NOMINMAX
+# define NOMINMAX
+# endif
+# include <windows.h>
+
+/* Windows static library */
+# ifdef FREEGLUT_STATIC
+
+# define FGAPI
+# define FGAPIENTRY
+
+ /* Link with Win32 static freeglut lib */
+# if FREEGLUT_LIB_PRAGMAS
+# pragma comment (lib, "freeglut_static.lib")
+# endif
+
+/* Windows shared library (DLL) */
+# else
+
+# define FGAPIENTRY __stdcall
+# if defined(FREEGLUT_EXPORTS)
+# define FGAPI __declspec(dllexport)
+# else
+# define FGAPI __declspec(dllimport)
+
+ /* Link with Win32 shared freeglut lib */
+# if FREEGLUT_LIB_PRAGMAS
+# pragma comment (lib, "freeglut.lib")
+# endif
+
+# endif
+
+# endif
+
+/* Drag in other Windows libraries as required by FreeGLUT */
+# if FREEGLUT_LIB_PRAGMAS
+# pragma comment (lib, "glu32.lib") /* link OpenGL Utility lib */
+# pragma comment (lib, "opengl32.lib") /* link Microsoft OpenGL lib */
+# pragma comment (lib, "gdi32.lib") /* link Windows GDI lib */
+# pragma comment (lib, "winmm.lib") /* link Windows MultiMedia lib */
+# pragma comment (lib, "user32.lib") /* link Windows user lib */
+# endif
+
+#else
+
+/* Non-Windows definition of FGAPI and FGAPIENTRY */
+# define FGAPI
+# define FGAPIENTRY
+
+#endif
+
+/*
+ * The freeglut and GLUT API versions
+ */
+#define FREEGLUT 1
+#define GLUT_API_VERSION 4
+#define FREEGLUT_VERSION_2_0 1
+#define GLUT_XLIB_IMPLEMENTATION 13
+
+/*
+ * Always include OpenGL and GLU headers
+ */
+#include <GL/gl.h>
+#include <GL/glu.h>
+
+/*
+ * GLUT API macro definitions -- the special key codes:
+ */
+#define GLUT_KEY_F1 0x0001
+#define GLUT_KEY_F2 0x0002
+#define GLUT_KEY_F3 0x0003
+#define GLUT_KEY_F4 0x0004
+#define GLUT_KEY_F5 0x0005
+#define GLUT_KEY_F6 0x0006
+#define GLUT_KEY_F7 0x0007
+#define GLUT_KEY_F8 0x0008
+#define GLUT_KEY_F9 0x0009
+#define GLUT_KEY_F10 0x000A
+#define GLUT_KEY_F11 0x000B
+#define GLUT_KEY_F12 0x000C
+#define GLUT_KEY_LEFT 0x0064
+#define GLUT_KEY_UP 0x0065
+#define GLUT_KEY_RIGHT 0x0066
+#define GLUT_KEY_DOWN 0x0067
+#define GLUT_KEY_PAGE_UP 0x0068
+#define GLUT_KEY_PAGE_DOWN 0x0069
+#define GLUT_KEY_HOME 0x006A
+#define GLUT_KEY_END 0x006B
+#define GLUT_KEY_INSERT 0x006C
+
+/*
+ * GLUT API macro definitions -- mouse state definitions
+ */
+#define GLUT_LEFT_BUTTON 0x0000
+#define GLUT_MIDDLE_BUTTON 0x0001
+#define GLUT_RIGHT_BUTTON 0x0002
+#define GLUT_DOWN 0x0000
+#define GLUT_UP 0x0001
+#define GLUT_LEFT 0x0000
+#define GLUT_ENTERED 0x0001
+
+/*
+ * GLUT API macro definitions -- the display mode definitions
+ */
+#define GLUT_RGB 0x0000
+#define GLUT_RGBA 0x0000
+#define GLUT_INDEX 0x0001
+#define GLUT_SINGLE 0x0000
+#define GLUT_DOUBLE 0x0002
+#define GLUT_ACCUM 0x0004
+#define GLUT_ALPHA 0x0008
+#define GLUT_DEPTH 0x0010
+#define GLUT_STENCIL 0x0020
+#define GLUT_MULTISAMPLE 0x0080
+#define GLUT_STEREO 0x0100
+#define GLUT_LUMINANCE 0x0200
+
+/*
+ * GLUT API macro definitions -- windows and menu related definitions
+ */
+#define GLUT_MENU_NOT_IN_USE 0x0000
+#define GLUT_MENU_IN_USE 0x0001
+#define GLUT_NOT_VISIBLE 0x0000
+#define GLUT_VISIBLE 0x0001
+#define GLUT_HIDDEN 0x0000
+#define GLUT_FULLY_RETAINED 0x0001
+#define GLUT_PARTIALLY_RETAINED 0x0002
+#define GLUT_FULLY_COVERED 0x0003
+
+/*
+ * GLUT API macro definitions -- fonts definitions
+ *
+ * Steve Baker suggested to make it binary compatible with GLUT:
+ */
+#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__WATCOMC__)
+# define GLUT_STROKE_ROMAN ((void *)0x0000)
+# define GLUT_STROKE_MONO_ROMAN ((void *)0x0001)
+# define GLUT_BITMAP_9_BY_15 ((void *)0x0002)
+# define GLUT_BITMAP_8_BY_13 ((void *)0x0003)
+# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *)0x0004)
+# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *)0x0005)
+# define GLUT_BITMAP_HELVETICA_10 ((void *)0x0006)
+# define GLUT_BITMAP_HELVETICA_12 ((void *)0x0007)
+# define GLUT_BITMAP_HELVETICA_18 ((void *)0x0008)
+#else
+ /*
+ * I don't really know if it's a good idea... But here it goes:
+ */
+ extern void* glutStrokeRoman;
+ extern void* glutStrokeMonoRoman;
+ extern void* glutBitmap9By15;
+ extern void* glutBitmap8By13;
+ extern void* glutBitmapTimesRoman10;
+ extern void* glutBitmapTimesRoman24;
+ extern void* glutBitmapHelvetica10;
+ extern void* glutBitmapHelvetica12;
+ extern void* glutBitmapHelvetica18;
+
+ /*
+ * Those pointers will be used by following definitions:
+ */
+# define GLUT_STROKE_ROMAN ((void *) &glutStrokeRoman)
+# define GLUT_STROKE_MONO_ROMAN ((void *) &glutStrokeMonoRoman)
+# define GLUT_BITMAP_9_BY_15 ((void *) &glutBitmap9By15)
+# define GLUT_BITMAP_8_BY_13 ((void *) &glutBitmap8By13)
+# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *) &glutBitmapTimesRoman10)
+# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *) &glutBitmapTimesRoman24)
+# define GLUT_BITMAP_HELVETICA_10 ((void *) &glutBitmapHelvetica10)
+# define GLUT_BITMAP_HELVETICA_12 ((void *) &glutBitmapHelvetica12)
+# define GLUT_BITMAP_HELVETICA_18 ((void *) &glutBitmapHelvetica18)
+#endif
+
+/*
+ * GLUT API macro definitions -- the glutGet parameters
+ */
+#define GLUT_WINDOW_X 0x0064
+#define GLUT_WINDOW_Y 0x0065
+#define GLUT_WINDOW_WIDTH 0x0066
+#define GLUT_WINDOW_HEIGHT 0x0067
+#define GLUT_WINDOW_BUFFER_SIZE 0x0068
+#define GLUT_WINDOW_STENCIL_SIZE 0x0069
+#define GLUT_WINDOW_DEPTH_SIZE 0x006A
+#define GLUT_WINDOW_RED_SIZE 0x006B
+#define GLUT_WINDOW_GREEN_SIZE 0x006C
+#define GLUT_WINDOW_BLUE_SIZE 0x006D
+#define GLUT_WINDOW_ALPHA_SIZE 0x006E
+#define GLUT_WINDOW_ACCUM_RED_SIZE 0x006F
+#define GLUT_WINDOW_ACCUM_GREEN_SIZE 0x0070
+#define GLUT_WINDOW_ACCUM_BLUE_SIZE 0x0071
+#define GLUT_WINDOW_ACCUM_ALPHA_SIZE 0x0072
+#define GLUT_WINDOW_DOUBLEBUFFER 0x0073
+#define GLUT_WINDOW_RGBA 0x0074
+#define GLUT_WINDOW_PARENT 0x0075
+#define GLUT_WINDOW_NUM_CHILDREN 0x0076
+#define GLUT_WINDOW_COLORMAP_SIZE 0x0077
+#define GLUT_WINDOW_NUM_SAMPLES 0x0078
+#define GLUT_WINDOW_STEREO 0x0079
+#define GLUT_WINDOW_CURSOR 0x007A
+
+#define GLUT_SCREEN_WIDTH 0x00C8
+#define GLUT_SCREEN_HEIGHT 0x00C9
+#define GLUT_SCREEN_WIDTH_MM 0x00CA
+#define GLUT_SCREEN_HEIGHT_MM 0x00CB
+#define GLUT_MENU_NUM_ITEMS 0x012C
+#define GLUT_DISPLAY_MODE_POSSIBLE 0x0190
+#define GLUT_INIT_WINDOW_X 0x01F4
+#define GLUT_INIT_WINDOW_Y 0x01F5
+#define GLUT_INIT_WINDOW_WIDTH 0x01F6
+#define GLUT_INIT_WINDOW_HEIGHT 0x01F7
+#define GLUT_INIT_DISPLAY_MODE 0x01F8
+#define GLUT_ELAPSED_TIME 0x02BC
+#define GLUT_WINDOW_FORMAT_ID 0x007B
+
+/*
+ * GLUT API macro definitions -- the glutDeviceGet parameters
+ */
+#define GLUT_HAS_KEYBOARD 0x0258
+#define GLUT_HAS_MOUSE 0x0259
+#define GLUT_HAS_SPACEBALL 0x025A
+#define GLUT_HAS_DIAL_AND_BUTTON_BOX 0x025B
+#define GLUT_HAS_TABLET 0x025C
+#define GLUT_NUM_MOUSE_BUTTONS 0x025D
+#define GLUT_NUM_SPACEBALL_BUTTONS 0x025E
+#define GLUT_NUM_BUTTON_BOX_BUTTONS 0x025F
+#define GLUT_NUM_DIALS 0x0260
+#define GLUT_NUM_TABLET_BUTTONS 0x0261
+#define GLUT_DEVICE_IGNORE_KEY_REPEAT 0x0262
+#define GLUT_DEVICE_KEY_REPEAT 0x0263
+#define GLUT_HAS_JOYSTICK 0x0264
+#define GLUT_OWNS_JOYSTICK 0x0265
+#define GLUT_JOYSTICK_BUTTONS 0x0266
+#define GLUT_JOYSTICK_AXES 0x0267
+#define GLUT_JOYSTICK_POLL_RATE 0x0268
+
+/*
+ * GLUT API macro definitions -- the glutLayerGet parameters
+ */
+#define GLUT_OVERLAY_POSSIBLE 0x0320
+#define GLUT_LAYER_IN_USE 0x0321
+#define GLUT_HAS_OVERLAY 0x0322
+#define GLUT_TRANSPARENT_INDEX 0x0323
+#define GLUT_NORMAL_DAMAGED 0x0324
+#define GLUT_OVERLAY_DAMAGED 0x0325
+
+/*
+ * GLUT API macro definitions -- the glutVideoResizeGet parameters
+ */
+#define GLUT_VIDEO_RESIZE_POSSIBLE 0x0384
+#define GLUT_VIDEO_RESIZE_IN_USE 0x0385
+#define GLUT_VIDEO_RESIZE_X_DELTA 0x0386
+#define GLUT_VIDEO_RESIZE_Y_DELTA 0x0387
+#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 0x0388
+#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 0x0389
+#define GLUT_VIDEO_RESIZE_X 0x038A
+#define GLUT_VIDEO_RESIZE_Y 0x038B
+#define GLUT_VIDEO_RESIZE_WIDTH 0x038C
+#define GLUT_VIDEO_RESIZE_HEIGHT 0x038D
+
+/*
+ * GLUT API macro definitions -- the glutUseLayer parameters
+ */
+#define GLUT_NORMAL 0x0000
+#define GLUT_OVERLAY 0x0001
+
+/*
+ * GLUT API macro definitions -- the glutGetModifiers parameters
+ */
+#define GLUT_ACTIVE_SHIFT 0x0001
+#define GLUT_ACTIVE_CTRL 0x0002
+#define GLUT_ACTIVE_ALT 0x0004
+
+/*
+ * GLUT API macro definitions -- the glutSetCursor parameters
+ */
+#define GLUT_CURSOR_RIGHT_ARROW 0x0000
+#define GLUT_CURSOR_LEFT_ARROW 0x0001
+#define GLUT_CURSOR_INFO 0x0002
+#define GLUT_CURSOR_DESTROY 0x0003
+#define GLUT_CURSOR_HELP 0x0004
+#define GLUT_CURSOR_CYCLE 0x0005
+#define GLUT_CURSOR_SPRAY 0x0006
+#define GLUT_CURSOR_WAIT 0x0007
+#define GLUT_CURSOR_TEXT 0x0008
+#define GLUT_CURSOR_CROSSHAIR 0x0009
+#define GLUT_CURSOR_UP_DOWN 0x000A
+#define GLUT_CURSOR_LEFT_RIGHT 0x000B
+#define GLUT_CURSOR_TOP_SIDE 0x000C
+#define GLUT_CURSOR_BOTTOM_SIDE 0x000D
+#define GLUT_CURSOR_LEFT_SIDE 0x000E
+#define GLUT_CURSOR_RIGHT_SIDE 0x000F
+#define GLUT_CURSOR_TOP_LEFT_CORNER 0x0010
+#define GLUT_CURSOR_TOP_RIGHT_CORNER 0x0011
+#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 0x0012
+#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 0x0013
+#define GLUT_CURSOR_INHERIT 0x0064
+#define GLUT_CURSOR_NONE 0x0065
+#define GLUT_CURSOR_FULL_CROSSHAIR 0x0066
+
+/*
+ * GLUT API macro definitions -- RGB color component specification definitions
+ */
+#define GLUT_RED 0x0000
+#define GLUT_GREEN 0x0001
+#define GLUT_BLUE 0x0002
+
+/*
+ * GLUT API macro definitions -- additional keyboard and joystick definitions
+ */
+#define GLUT_KEY_REPEAT_OFF 0x0000
+#define GLUT_KEY_REPEAT_ON 0x0001
+#define GLUT_KEY_REPEAT_DEFAULT 0x0002
+
+#define GLUT_JOYSTICK_BUTTON_A 0x0001
+#define GLUT_JOYSTICK_BUTTON_B 0x0002
+#define GLUT_JOYSTICK_BUTTON_C 0x0004
+#define GLUT_JOYSTICK_BUTTON_D 0x0008
+
+/*
+ * GLUT API macro definitions -- game mode definitions
+ */
+#define GLUT_GAME_MODE_ACTIVE 0x0000
+#define GLUT_GAME_MODE_POSSIBLE 0x0001
+#define GLUT_GAME_MODE_WIDTH 0x0002
+#define GLUT_GAME_MODE_HEIGHT 0x0003
+#define GLUT_GAME_MODE_PIXEL_DEPTH 0x0004
+#define GLUT_GAME_MODE_REFRESH_RATE 0x0005
+#define GLUT_GAME_MODE_DISPLAY_CHANGED 0x0006
+
+/*
+ * Initialization functions, see fglut_init.c
+ */
+FGAPI void FGAPIENTRY glutInit( int* pargc, char** argv );
+FGAPI void FGAPIENTRY glutInitWindowPosition( int x, int y );
+FGAPI void FGAPIENTRY glutInitWindowSize( int width, int height );
+FGAPI void FGAPIENTRY glutInitDisplayMode( unsigned int displayMode );
+FGAPI void FGAPIENTRY glutInitDisplayString( const char* displayMode );
+
+/*
+ * Process loop function, see freeglut_main.c
+ */
+FGAPI void FGAPIENTRY glutMainLoop( void );
+
+/*
+ * Window management functions, see freeglut_window.c
+ */
+FGAPI int FGAPIENTRY glutCreateWindow( const char* title );
+FGAPI int FGAPIENTRY glutCreateSubWindow( int window, int x, int y, int width, int height );
+FGAPI void FGAPIENTRY glutDestroyWindow( int window );
+FGAPI void FGAPIENTRY glutSetWindow( int window );
+FGAPI int FGAPIENTRY glutGetWindow( void );
+FGAPI void FGAPIENTRY glutSetWindowTitle( const char* title );
+FGAPI void FGAPIENTRY glutSetIconTitle( const char* title );
+FGAPI void FGAPIENTRY glutReshapeWindow( int width, int height );
+FGAPI void FGAPIENTRY glutPositionWindow( int x, int y );
+FGAPI void FGAPIENTRY glutShowWindow( void );
+FGAPI void FGAPIENTRY glutHideWindow( void );
+FGAPI void FGAPIENTRY glutIconifyWindow( void );
+FGAPI void FGAPIENTRY glutPushWindow( void );
+FGAPI void FGAPIENTRY glutPopWindow( void );
+FGAPI void FGAPIENTRY glutFullScreen( void );
+
+/*
+ * Display-connected functions, see freeglut_display.c
+ */
+FGAPI void FGAPIENTRY glutPostWindowRedisplay( int window );
+FGAPI void FGAPIENTRY glutPostRedisplay( void );
+FGAPI void FGAPIENTRY glutSwapBuffers( void );
+
+/*
+ * Mouse cursor functions, see freeglut_cursor.c
+ */
+FGAPI void FGAPIENTRY glutWarpPointer( int x, int y );
+FGAPI void FGAPIENTRY glutSetCursor( int cursor );
+
+/*
+ * Overlay stuff, see freeglut_overlay.c
+ */
+FGAPI void FGAPIENTRY glutEstablishOverlay( void );
+FGAPI void FGAPIENTRY glutRemoveOverlay( void );
+FGAPI void FGAPIENTRY glutUseLayer( GLenum layer );
+FGAPI void FGAPIENTRY glutPostOverlayRedisplay( void );
+FGAPI void FGAPIENTRY glutPostWindowOverlayRedisplay( int window );
+FGAPI void FGAPIENTRY glutShowOverlay( void );
+FGAPI void FGAPIENTRY glutHideOverlay( void );
+
+/*
+ * Menu stuff, see freeglut_menu.c
+ */
+FGAPI int FGAPIENTRY glutCreateMenu( void (* callback)( int menu ) );
+FGAPI void FGAPIENTRY glutDestroyMenu( int menu );
+FGAPI int FGAPIENTRY glutGetMenu( void );
+FGAPI void FGAPIENTRY glutSetMenu( int menu );
+FGAPI void FGAPIENTRY glutAddMenuEntry( const char* label, int value );
+FGAPI void FGAPIENTRY glutAddSubMenu( const char* label, int subMenu );
+FGAPI void FGAPIENTRY glutChangeToMenuEntry( int item, const char* label, int value );
+FGAPI void FGAPIENTRY glutChangeToSubMenu( int item, const char* label, int value );
+FGAPI void FGAPIENTRY glutRemoveMenuItem( int item );
+FGAPI void FGAPIENTRY glutAttachMenu( int button );
+FGAPI void FGAPIENTRY glutDetachMenu( int button );
+
+/*
+ * Global callback functions, see freeglut_callbacks.c
+ */
+FGAPI void FGAPIENTRY glutTimerFunc( unsigned int time, void (* callback)( int ), int value );
+FGAPI void FGAPIENTRY glutIdleFunc( void (* callback)( void ) );
+
+/*
+ * Window-specific callback functions, see freeglut_callbacks.c
+ */
+FGAPI void FGAPIENTRY glutKeyboardFunc( void (* callback)( unsigned char, int, int ) );
+FGAPI void FGAPIENTRY glutSpecialFunc( void (* callback)( int, int, int ) );
+FGAPI void FGAPIENTRY glutReshapeFunc( void (* callback)( int, int ) );
+FGAPI void FGAPIENTRY glutVisibilityFunc( void (* callback)( int ) );
+FGAPI void FGAPIENTRY glutDisplayFunc( void (* callback)( void ) );
+FGAPI void FGAPIENTRY glutMouseFunc( void (* callback)( int, int, int, int ) );
+FGAPI void FGAPIENTRY glutMotionFunc( void (* callback)( int, int ) );
+FGAPI void FGAPIENTRY glutPassiveMotionFunc( void (* callback)( int, int ) );
+FGAPI void FGAPIENTRY glutEntryFunc( void (* callback)( int ) );
+
+FGAPI void FGAPIENTRY glutKeyboardUpFunc( void (* callback)( unsigned char, int, int ) );
+FGAPI void FGAPIENTRY glutSpecialUpFunc( void (* callback)( int, int, int ) );
+FGAPI void FGAPIENTRY glutJoystickFunc( void (* callback)( unsigned int, int, int, int ), int pollInterval );
+FGAPI void FGAPIENTRY glutMenuStateFunc( void (* callback)( int ) );
+FGAPI void FGAPIENTRY glutMenuStatusFunc( void (* callback)( int, int, int ) );
+FGAPI void FGAPIENTRY glutOverlayDisplayFunc( void (* callback)( void ) );
+FGAPI void FGAPIENTRY glutWindowStatusFunc( void (* callback)( int ) );
+
+FGAPI void FGAPIENTRY glutSpaceballMotionFunc( void (* callback)( int, int, int ) );
+FGAPI void FGAPIENTRY glutSpaceballRotateFunc( void (* callback)( int, int, int ) );
+FGAPI void FGAPIENTRY glutSpaceballButtonFunc( void (* callback)( int, int ) );
+FGAPI void FGAPIENTRY glutButtonBoxFunc( void (* callback)( int, int ) );
+FGAPI void FGAPIENTRY glutDialsFunc( void (* callback)( int, int ) );
+FGAPI void FGAPIENTRY glutTabletMotionFunc( void (* callback)( int, int ) );
+FGAPI void FGAPIENTRY glutTabletButtonFunc( void (* callback)( int, int, int, int ) );
+
+/*
+ * State setting and retrieval functions, see freeglut_state.c
+ */
+FGAPI int FGAPIENTRY glutGet( GLenum query );
+FGAPI int FGAPIENTRY glutDeviceGet( GLenum query );
+FGAPI int FGAPIENTRY glutGetModifiers( void );
+FGAPI int FGAPIENTRY glutLayerGet( GLenum query );
+
+/*
+ * Font stuff, see freeglut_font.c
+ */
+FGAPI void FGAPIENTRY glutBitmapCharacter( void* font, int character );
+FGAPI int FGAPIENTRY glutBitmapWidth( void* font, int character );
+FGAPI void FGAPIENTRY glutStrokeCharacter( void* font, int character );
+FGAPI int FGAPIENTRY glutStrokeWidth( void* font, int character );
+FGAPI int FGAPIENTRY glutBitmapLength( void* font, const unsigned char* string );
+FGAPI int FGAPIENTRY glutStrokeLength( void* font, const unsigned char* string );
+
+/*
+ * Geometry functions, see freeglut_geometry.c
+ */
+FGAPI void FGAPIENTRY glutWireCube( GLdouble size );
+FGAPI void FGAPIENTRY glutSolidCube( GLdouble size );
+FGAPI void FGAPIENTRY glutWireSphere( GLdouble radius, GLint slices, GLint stacks );
+FGAPI void FGAPIENTRY glutSolidSphere( GLdouble radius, GLint slices, GLint stacks );
+FGAPI void FGAPIENTRY glutWireCone( GLdouble base, GLdouble height, GLint slices, GLint stacks );
+FGAPI void FGAPIENTRY glutSolidCone( GLdouble base, GLdouble height, GLint slices, GLint stacks );
+
+FGAPI void FGAPIENTRY glutWireTorus( GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings );
+FGAPI void FGAPIENTRY glutSolidTorus( GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings );
+FGAPI void FGAPIENTRY glutWireDodecahedron( void );
+FGAPI void FGAPIENTRY glutSolidDodecahedron( void );
+FGAPI void FGAPIENTRY glutWireOctahedron( void );
+FGAPI void FGAPIENTRY glutSolidOctahedron( void );
+FGAPI void FGAPIENTRY glutWireTetrahedron( void );
+FGAPI void FGAPIENTRY glutSolidTetrahedron( void );
+FGAPI void FGAPIENTRY glutWireIcosahedron( void );
+FGAPI void FGAPIENTRY glutSolidIcosahedron( void );
+
+/*
+ * Teapot rendering functions, found in freeglut_teapot.c
+ */
+FGAPI void FGAPIENTRY glutWireTeapot( GLdouble size );
+FGAPI void FGAPIENTRY glutSolidTeapot( GLdouble size );
+
+/*
+ * Game mode functions, see freeglut_gamemode.c
+ */
+FGAPI void FGAPIENTRY glutGameModeString( const char* string );
+FGAPI int FGAPIENTRY glutEnterGameMode( void );
+FGAPI void FGAPIENTRY glutLeaveGameMode( void );
+FGAPI int FGAPIENTRY glutGameModeGet( GLenum query );
+
+/*
+ * Video resize functions, see freeglut_videoresize.c
+ */
+FGAPI int FGAPIENTRY glutVideoResizeGet( GLenum query );
+FGAPI void FGAPIENTRY glutSetupVideoResizing( void );
+FGAPI void FGAPIENTRY glutStopVideoResizing( void );
+FGAPI void FGAPIENTRY glutVideoResize( int x, int y, int width, int height );
+FGAPI void FGAPIENTRY glutVideoPan( int x, int y, int width, int height );
+
+/*
+ * Colormap functions, see freeglut_misc.c
+ */
+FGAPI void FGAPIENTRY glutSetColor( int color, GLfloat red, GLfloat green, GLfloat blue );
+FGAPI GLfloat FGAPIENTRY glutGetColor( int color, int component );
+FGAPI void FGAPIENTRY glutCopyColormap( int window );
+
+/*
+ * Misc keyboard and joystick functions, see freeglut_misc.c
+ */
+FGAPI void FGAPIENTRY glutIgnoreKeyRepeat( int ignore );
+FGAPI void FGAPIENTRY glutSetKeyRepeat( int repeatMode );
+FGAPI void FGAPIENTRY glutForceJoystickFunc( void );
+
+/*
+ * Misc functions, see freeglut_misc.c
+ */
+FGAPI int FGAPIENTRY glutExtensionSupported( const char* extension );
+FGAPI void FGAPIENTRY glutReportErrors( void );
+
+/* Comment from glut.h of classic GLUT:
+
+ Win32 has an annoying issue where there are multiple C run-time
+ libraries (CRTs). If the executable is linked with a different CRT
+ from the GLUT DLL, the GLUT DLL will not share the same CRT static
+ data seen by the executable. In particular, atexit callbacks registered
+ in the executable will not be called if GLUT calls its (different)
+ exit routine). GLUT is typically built with the
+ "/MD" option (the CRT with multithreading DLL support), but the Visual
+ C++ linker default is "/ML" (the single threaded CRT).
+
+ One workaround to this issue is requiring users to always link with
+ the same CRT as GLUT is compiled with. That requires users supply a
+ non-standard option. GLUT 3.7 has its own built-in workaround where
+ the executable's "exit" function pointer is covertly passed to GLUT.
+ GLUT then calls the executable's exit function pointer to ensure that
+ any "atexit" calls registered by the application are called if GLUT
+ needs to exit.
+
+ Note that the __glut*WithExit routines should NEVER be called directly.
+ To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */
+
+/* to get the prototype for exit() */
+#include <stdlib.h>
+
+#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) && !defined(__WATCOMC__)
+FGAPI void FGAPIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int));
+FGAPI int FGAPIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int));
+FGAPI int FGAPIENTRY __glutCreateMenuWithExit(void (* func)(int), void (__cdecl *exitfunc)(int));
+#ifndef FREEGLUT_BUILDING_LIB
+#if defined(__GNUC__)
+#define FGUNUSED __attribute__((unused))
+#else
+#define FGUNUSED
+#endif
+static void FGAPIENTRY FGUNUSED glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); }
+#define glutInit glutInit_ATEXIT_HACK
+static int FGAPIENTRY FGUNUSED glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); }
+#define glutCreateWindow glutCreateWindow_ATEXIT_HACK
+static int FGAPIENTRY FGUNUSED glutCreateMenu_ATEXIT_HACK(void (* func)(int)) { return __glutCreateMenuWithExit(func, exit); }
+#define glutCreateMenu glutCreateMenu_ATEXIT_HACK
+#endif
+#endif
+
+#ifdef __cplusplus
+ }
+#endif
+
+/*** END OF FILE ***/
+
+#endif /* __FREEGLUT_STD_H__ */
+
diff --git a/system/include/GL/glut.h b/system/include/GL/glut.h
index e0692adb..6191f77b 100644
--- a/system/include/GL/glut.h
+++ b/system/include/GL/glut.h
@@ -1,596 +1,21 @@
-#ifndef __glut_h__
-#define __glut_h__
-
-/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
-
-/* This program is freely distributable without licensing fees and is
- provided without guarantee or warrantee expressed or implied. This
- program is -not- in the public domain. */
-
-#if defined(_WIN32)
-
-/* GLUT 3.7 now tries to avoid including <windows.h>
- to avoid name space pollution, but Win32's <GL/gl.h>
- needs APIENTRY and WINGDIAPI defined properly. */
-# if 0
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-# else
- /* XXX This is from Win32's <windef.h> */
-# ifndef APIENTRY
-# define GLUT_APIENTRY_DEFINED
-# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
-# define APIENTRY __stdcall
-# else
-# define APIENTRY
-# endif
-# endif
- /* XXX This is from Win32's <winnt.h> */
-# ifndef CALLBACK
-# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
-# define CALLBACK __stdcall
-# else
-# define CALLBACK
-# endif
-# endif
- /* XXX This is from Win32's <wingdi.h> and <winnt.h> */
-# ifndef WINGDIAPI
-# define GLUT_WINGDIAPI_DEFINED
-# define WINGDIAPI __declspec(dllimport)
-# endif
- /* XXX This is from Win32's <ctype.h> */
-# ifndef _WCHAR_T_DEFINED
-typedef unsigned short wchar_t;
-# define _WCHAR_T_DEFINED
-# endif
-# endif
-
-#pragma comment (lib, "winmm.lib") /* link with Windows MultiMedia lib */
-#pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */
-#pragma comment (lib, "glu32.lib") /* link with OpenGL Utility lib */
-#pragma comment (lib, "glut32.lib") /* link with Win32 GLUT lib */
-
-#pragma warning (disable:4244) /* Disable bogus conversion warnings. */
-#pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */
-
-#endif
-
-#include <GL/gl.h>
-#include <GL/glu.h>
-
-/* define APIENTRY and CALLBACK to null string if we aren't on Win32 */
-#if !defined(_WIN32)
-#define APIENTRY
-#define GLUT_APIENTRY_DEFINED
-#define CALLBACK
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- GLUT API revision history:
-
- GLUT_API_VERSION is updated to reflect incompatible GLUT
- API changes (interface changes, semantic changes, deletions,
- or additions).
-
- GLUT_API_VERSION=1 First public release of GLUT. 11/29/94
-
- GLUT_API_VERSION=2 Added support for OpenGL/GLX multisampling,
- extension. Supports new input devices like tablet, dial and button
- box, and Spaceball. Easy to query OpenGL extensions.
-
- GLUT_API_VERSION=3 glutMenuStatus added.
-
- GLUT_API_VERSION=4 glutInitDisplayString, glutWarpPointer,
- glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic
- video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc,
- glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat,
- glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!).
-**/
-#ifndef GLUT_API_VERSION /* allow this to be overriden */
-#define GLUT_API_VERSION 3
-#endif
-
-/**
- GLUT implementation revision history:
-
- GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT
- API revisions and implementation revisions (ie, bug fixes).
-
- GLUT_XLIB_IMPLEMENTATION=1 mjk's first public release of
- GLUT Xlib-based implementation. 11/29/94
-
- GLUT_XLIB_IMPLEMENTATION=2 mjk's second public release of
- GLUT Xlib-based implementation providing GLUT version 2
- interfaces.
-
- GLUT_XLIB_IMPLEMENTATION=3 mjk's GLUT 2.2 images. 4/17/95
-
- GLUT_XLIB_IMPLEMENTATION=4 mjk's GLUT 2.3 images. 6/?/95
-
- GLUT_XLIB_IMPLEMENTATION=5 mjk's GLUT 3.0 images. 10/?/95
-
- GLUT_XLIB_IMPLEMENTATION=7 mjk's GLUT 3.1+ with glutWarpPoitner. 7/24/96
-
- GLUT_XLIB_IMPLEMENTATION=8 mjk's GLUT 3.1+ with glutWarpPoitner
- and video resize. 1/3/97
-
- GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routines.
-
- GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release.
-
- GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routines + signal handling.
-
- GLUT_XLIB_IMPLEMENTATION=13 mjk's GLUT 3.7 release with GameGLUT support.
-**/
-#ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overriden. */
-#define GLUT_XLIB_IMPLEMENTATION 13
-#endif
-
-/* Display mode bit masks. */
-#define GLUT_RGB 0
-#define GLUT_RGBA GLUT_RGB
-#define GLUT_INDEX 1
-#define GLUT_SINGLE 0
-#define GLUT_DOUBLE 2
-#define GLUT_ACCUM 4
-#define GLUT_ALPHA 8
-#define GLUT_DEPTH 16
-#define GLUT_STENCIL 32
-#if (GLUT_API_VERSION >= 2)
-#define GLUT_MULTISAMPLE 128
-#define GLUT_STEREO 256
-#endif
-#if (GLUT_API_VERSION >= 3)
-#define GLUT_LUMINANCE 512
-#endif
-
-/* Mouse buttons. */
-#define GLUT_LEFT_BUTTON 0
-#define GLUT_MIDDLE_BUTTON 1
-#define GLUT_RIGHT_BUTTON 2
-
-/* Mouse button state. */
-#define GLUT_DOWN 0
-#define GLUT_UP 1
-
-#if (GLUT_API_VERSION >= 2)
-/* function keys */
-#define GLUT_KEY_F1 1
-#define GLUT_KEY_F2 2
-#define GLUT_KEY_F3 3
-#define GLUT_KEY_F4 4
-#define GLUT_KEY_F5 5
-#define GLUT_KEY_F6 6
-#define GLUT_KEY_F7 7
-#define GLUT_KEY_F8 8
-#define GLUT_KEY_F9 9
-#define GLUT_KEY_F10 10
-#define GLUT_KEY_F11 11
-#define GLUT_KEY_F12 12
-/* directional keys */
-#define GLUT_KEY_LEFT 100
-#define GLUT_KEY_UP 101
-#define GLUT_KEY_RIGHT 102
-#define GLUT_KEY_DOWN 103
-#define GLUT_KEY_PAGE_UP 104
-#define GLUT_KEY_PAGE_DOWN 105
-#define GLUT_KEY_HOME 106
-#define GLUT_KEY_END 107
-#define GLUT_KEY_INSERT 108
-#endif
-
-/* Entry/exit state. */
-#define GLUT_LEFT 0
-#define GLUT_ENTERED 1
-
-/* Menu usage state. */
-#define GLUT_MENU_NOT_IN_USE 0
-#define GLUT_MENU_IN_USE 1
-
-/* Visibility state. */
-#define GLUT_NOT_VISIBLE 0
-#define GLUT_VISIBLE 1
-
-/* Window status state. */
-#define GLUT_HIDDEN 0
-#define GLUT_FULLY_RETAINED 1
-#define GLUT_PARTIALLY_RETAINED 2
-#define GLUT_FULLY_COVERED 3
-
-/* Color index component selection values. */
-#define GLUT_RED 0
-#define GLUT_GREEN 1
-#define GLUT_BLUE 2
-
-/* Layers for use. */
-#define GLUT_NORMAL 0
-#define GLUT_OVERLAY 1
-
-#if defined(_WIN32)
-/* Stroke font constants (use these in GLUT program). */
-#define GLUT_STROKE_ROMAN ((void*)0)
-#define GLUT_STROKE_MONO_ROMAN ((void*)1)
-
-/* Bitmap font constants (use these in GLUT program). */
-#define GLUT_BITMAP_9_BY_15 ((void*)2)
-#define GLUT_BITMAP_8_BY_13 ((void*)3)
-#define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4)
-#define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5)
-#if (GLUT_API_VERSION >= 3)
-#define GLUT_BITMAP_HELVETICA_10 ((void*)6)
-#define GLUT_BITMAP_HELVETICA_12 ((void*)7)
-#define GLUT_BITMAP_HELVETICA_18 ((void*)8)
-#endif
-#else
-/* Stroke font opaque addresses (use constants instead in source code). */
-extern void *glutStrokeRoman;
-extern void *glutStrokeMonoRoman;
-
-/* Stroke font constants (use these in GLUT program). */
-#define GLUT_STROKE_ROMAN (&glutStrokeRoman)
-#define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman)
-
-/* Bitmap font opaque addresses (use constants instead in source code). */
-extern void *glutBitmap9By15;
-extern void *glutBitmap8By13;
-extern void *glutBitmapTimesRoman10;
-extern void *glutBitmapTimesRoman24;
-extern void *glutBitmapHelvetica10;
-extern void *glutBitmapHelvetica12;
-extern void *glutBitmapHelvetica18;
-
-/* Bitmap font constants (use these in GLUT program). */
-#define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15)
-#define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13)
-#define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10)
-#define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24)
-#if (GLUT_API_VERSION >= 3)
-#define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10)
-#define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12)
-#define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18)
-#endif
-#endif
-
-/* glutGet parameters. */
-#define GLUT_WINDOW_X 100
-#define GLUT_WINDOW_Y 101
-#define GLUT_WINDOW_WIDTH 102
-#define GLUT_WINDOW_HEIGHT 103
-#define GLUT_WINDOW_BUFFER_SIZE 104
-#define GLUT_WINDOW_STENCIL_SIZE 105
-#define GLUT_WINDOW_DEPTH_SIZE 106
-#define GLUT_WINDOW_RED_SIZE 107
-#define GLUT_WINDOW_GREEN_SIZE 108
-#define GLUT_WINDOW_BLUE_SIZE 109
-#define GLUT_WINDOW_ALPHA_SIZE 110
-#define GLUT_WINDOW_ACCUM_RED_SIZE 111
-#define GLUT_WINDOW_ACCUM_GREEN_SIZE 112
-#define GLUT_WINDOW_ACCUM_BLUE_SIZE 113
-#define GLUT_WINDOW_ACCUM_ALPHA_SIZE 114
-#define GLUT_WINDOW_DOUBLEBUFFER 115
-#define GLUT_WINDOW_RGBA 116
-#define GLUT_WINDOW_PARENT 117
-#define GLUT_WINDOW_NUM_CHILDREN 118
-#define GLUT_WINDOW_COLORMAP_SIZE 119
-#if (GLUT_API_VERSION >= 2)
-#define GLUT_WINDOW_NUM_SAMPLES 120
-#define GLUT_WINDOW_STEREO 121
-#endif
-#if (GLUT_API_VERSION >= 3)
-#define GLUT_WINDOW_CURSOR 122
-#endif
-#define GLUT_SCREEN_WIDTH 200
-#define GLUT_SCREEN_HEIGHT 201
-#define GLUT_SCREEN_WIDTH_MM 202
-#define GLUT_SCREEN_HEIGHT_MM 203
-#define GLUT_MENU_NUM_ITEMS 300
-#define GLUT_DISPLAY_MODE_POSSIBLE 400
-#define GLUT_INIT_WINDOW_X 500
-#define GLUT_INIT_WINDOW_Y 501
-#define GLUT_INIT_WINDOW_WIDTH 502
-#define GLUT_INIT_WINDOW_HEIGHT 503
-#define GLUT_INIT_DISPLAY_MODE 504
-#if (GLUT_API_VERSION >= 2)
-#define GLUT_ELAPSED_TIME 700
-#endif
-#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
-#define GLUT_WINDOW_FORMAT_ID 123
-#endif
-
-#if (GLUT_API_VERSION >= 2)
-/* glutDeviceGet parameters. */
-#define GLUT_HAS_KEYBOARD 600
-#define GLUT_HAS_MOUSE 601
-#define GLUT_HAS_SPACEBALL 602
-#define GLUT_HAS_DIAL_AND_BUTTON_BOX 603
-#define GLUT_HAS_TABLET 604
-#define GLUT_NUM_MOUSE_BUTTONS 605
-#define GLUT_NUM_SPACEBALL_BUTTONS 606
-#define GLUT_NUM_BUTTON_BOX_BUTTONS 607
-#define GLUT_NUM_DIALS 608
-#define GLUT_NUM_TABLET_BUTTONS 609
-#endif
-#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
-#define GLUT_DEVICE_IGNORE_KEY_REPEAT 610
-#define GLUT_DEVICE_KEY_REPEAT 611
-#define GLUT_HAS_JOYSTICK 612
-#define GLUT_OWNS_JOYSTICK 613
-#define GLUT_JOYSTICK_BUTTONS 614
-#define GLUT_JOYSTICK_AXES 615
-#define GLUT_JOYSTICK_POLL_RATE 616
-#endif
-
-#if (GLUT_API_VERSION >= 3)
-/* glutLayerGet parameters. */
-#define GLUT_OVERLAY_POSSIBLE 800
-#define GLUT_LAYER_IN_USE 801
-#define GLUT_HAS_OVERLAY 802
-#define GLUT_TRANSPARENT_INDEX 803
-#define GLUT_NORMAL_DAMAGED 804
-#define GLUT_OVERLAY_DAMAGED 805
-
-#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
-/* glutVideoResizeGet parameters. */
-#define GLUT_VIDEO_RESIZE_POSSIBLE 900
-#define GLUT_VIDEO_RESIZE_IN_USE 901
-#define GLUT_VIDEO_RESIZE_X_DELTA 902
-#define GLUT_VIDEO_RESIZE_Y_DELTA 903
-#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 904
-#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 905
-#define GLUT_VIDEO_RESIZE_X 906
-#define GLUT_VIDEO_RESIZE_Y 907
-#define GLUT_VIDEO_RESIZE_WIDTH 908
-#define GLUT_VIDEO_RESIZE_HEIGHT 909
-#endif
-
-/* glutUseLayer parameters. */
-#define GLUT_NORMAL 0
-#define GLUT_OVERLAY 1
-
-/* glutGetModifiers return mask. */
-#define GLUT_ACTIVE_SHIFT 1
-#define GLUT_ACTIVE_CTRL 2
-#define GLUT_ACTIVE_ALT 4
-
-/* glutSetCursor parameters. */
-/* Basic arrows. */
-#define GLUT_CURSOR_RIGHT_ARROW 0
-#define GLUT_CURSOR_LEFT_ARROW 1
-/* Symbolic cursor shapes. */
-#define GLUT_CURSOR_INFO 2
-#define GLUT_CURSOR_DESTROY 3
-#define GLUT_CURSOR_HELP 4
-#define GLUT_CURSOR_CYCLE 5
-#define GLUT_CURSOR_SPRAY 6
-#define GLUT_CURSOR_WAIT 7
-#define GLUT_CURSOR_TEXT 8
-#define GLUT_CURSOR_CROSSHAIR 9
-/* Directional cursors. */
-#define GLUT_CURSOR_UP_DOWN 10
-#define GLUT_CURSOR_LEFT_RIGHT 11
-/* Sizing cursors. */
-#define GLUT_CURSOR_TOP_SIDE 12
-#define GLUT_CURSOR_BOTTOM_SIDE 13
-#define GLUT_CURSOR_LEFT_SIDE 14
-#define GLUT_CURSOR_RIGHT_SIDE 15
-#define GLUT_CURSOR_TOP_LEFT_CORNER 16
-#define GLUT_CURSOR_TOP_RIGHT_CORNER 17
-#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18
-#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 19
-/* Inherit from parent window. */
-#define GLUT_CURSOR_INHERIT 100
-/* Blank cursor. */
-#define GLUT_CURSOR_NONE 101
-/* Fullscreen crosshair (if available). */
-#define GLUT_CURSOR_FULL_CROSSHAIR 102
-#endif
-
-/* GLUT initialization sub-API. */
-extern void APIENTRY glutInit(int *argcp, char **argv);
-extern void APIENTRY glutInitDisplayMode(unsigned int mode);
-#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
-extern void APIENTRY glutInitDisplayString(const char *string);
-#endif
-extern void APIENTRY glutInitWindowPosition(int x, int y);
-extern void APIENTRY glutInitWindowSize(int width, int height);
-extern void APIENTRY glutMainLoop(void);
-
-/* GLUT window sub-API. */
-extern int APIENTRY glutCreateWindow(const char *title);
-extern int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height);
-extern void APIENTRY glutDestroyWindow(int win);
-extern void APIENTRY glutPostRedisplay(void);
-#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
-extern void APIENTRY glutPostWindowRedisplay(int win);
-#endif
-extern void APIENTRY glutSwapBuffers(void);
-extern int APIENTRY glutGetWindow(void);
-extern void APIENTRY glutSetWindow(int win);
-extern void APIENTRY glutSetWindowTitle(const char *title);
-extern void APIENTRY glutSetIconTitle(const char *title);
-extern void APIENTRY glutPositionWindow(int x, int y);
-extern void APIENTRY glutReshapeWindow(int width, int height);
-extern void APIENTRY glutPopWindow(void);
-extern void APIENTRY glutPushWindow(void);
-extern void APIENTRY glutIconifyWindow(void);
-extern void APIENTRY glutShowWindow(void);
-extern void APIENTRY glutHideWindow(void);
-#if (GLUT_API_VERSION >= 3)
-extern void APIENTRY glutFullScreen(void);
-extern void APIENTRY glutSetCursor(int cursor);
-#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
-extern void APIENTRY glutWarpPointer(int x, int y);
-#endif
-
-/* GLUT overlay sub-API. */
-extern void APIENTRY glutEstablishOverlay(void);
-extern void APIENTRY glutRemoveOverlay(void);
-extern void APIENTRY glutUseLayer(GLenum layer);
-extern void APIENTRY glutPostOverlayRedisplay(void);
-#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
-extern void APIENTRY glutPostWindowOverlayRedisplay(int win);
-#endif
-extern void APIENTRY glutShowOverlay(void);
-extern void APIENTRY glutHideOverlay(void);
-#endif
-
-/* GLUT menu sub-API. */
-extern int APIENTRY glutCreateMenu(void (*)(int));
-extern void APIENTRY glutDestroyMenu(int menu);
-extern int APIENTRY glutGetMenu(void);
-extern void APIENTRY glutSetMenu(int menu);
-extern void APIENTRY glutAddMenuEntry(const char *label, int value);
-extern void APIENTRY glutAddSubMenu(const char *label, int submenu);
-extern void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value);
-extern void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu);
-extern void APIENTRY glutRemoveMenuItem(int item);
-extern void APIENTRY glutAttachMenu(int button);
-extern void APIENTRY glutDetachMenu(int button);
-
-/* GLUT window callback sub-API. */
-extern void APIENTRY glutDisplayFunc(void (*func)(void));
-extern void APIENTRY glutReshapeFunc(void (*func)(int width, int height));
-extern void APIENTRY glutKeyboardFunc(void (*func)(unsigned char key, int x, int y));
-extern void APIENTRY glutMouseFunc(void (*func)(int button, int state, int x, int y));
-extern void APIENTRY glutMotionFunc(void (*func)(int x, int y));
-extern void APIENTRY glutPassiveMotionFunc(void (*func)(int x, int y));
-extern void APIENTRY glutEntryFunc(void (*func)(int state));
-extern void APIENTRY glutVisibilityFunc(void (*func)(int state));
-extern void APIENTRY glutIdleFunc(void (*func)(void));
-extern void APIENTRY glutTimerFunc(unsigned int millis, void (*func)(int value), int value);
-extern void APIENTRY glutMenuStateFunc(void (*func)(int state));
-#if (GLUT_API_VERSION >= 2)
-extern void APIENTRY glutSpecialFunc(void (*func)(int key, int x, int y));
-extern void APIENTRY glutSpaceballMotionFunc(void (*func)(int x, int y, int z));
-extern void APIENTRY glutSpaceballRotateFunc(void (*func)(int x, int y, int z));
-extern void APIENTRY glutSpaceballButtonFunc(void (*func)(int button, int state));
-extern void APIENTRY glutButtonBoxFunc(void (*func)(int button, int state));
-extern void APIENTRY glutDialsFunc(void (*func)(int dial, int value));
-extern void APIENTRY glutTabletMotionFunc(void (*func)(int x, int y));
-extern void APIENTRY glutTabletButtonFunc(void (*func)(int button, int state, int x, int y));
-#if (GLUT_API_VERSION >= 3)
-extern void APIENTRY glutMenuStatusFunc(void (*func)(int status, int x, int y));
-extern void APIENTRY glutOverlayDisplayFunc(void (*func)(void));
-#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
-extern void APIENTRY glutWindowStatusFunc(void (*func)(int state));
-#endif
-#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
-extern void APIENTRY glutKeyboardUpFunc(void (*func)(unsigned char key, int x, int y));
-extern void APIENTRY glutSpecialUpFunc(void (*func)(int key, int x, int y));
-extern void APIENTRY glutJoystickFunc(void (*func)(unsigned int buttonMask, int x, int y, int z), int pollInterval);
-#endif
-#endif
-#endif
-
-/* GLUT color index sub-API. */
-extern void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
-extern GLfloat APIENTRY glutGetColor(int ndx, int component);
-extern void APIENTRY glutCopyColormap(int win);
-
-/* GLUT state retrieval sub-API. */
-extern int APIENTRY glutGet(GLenum type);
-extern int APIENTRY glutDeviceGet(GLenum type);
-#if (GLUT_API_VERSION >= 2)
-/* GLUT extension support sub-API */
-extern int APIENTRY glutExtensionSupported(const char *name);
-#endif
-#if (GLUT_API_VERSION >= 3)
-extern int APIENTRY glutGetModifiers(void);
-extern int APIENTRY glutLayerGet(GLenum type);
-#endif
-
-/* GLUT font sub-API */
-extern void APIENTRY glutBitmapCharacter(void *font, int character);
-extern int APIENTRY glutBitmapWidth(void *font, int character);
-extern void APIENTRY glutStrokeCharacter(void *font, int character);
-extern int APIENTRY glutStrokeWidth(void *font, int character);
-#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
-extern int APIENTRY glutBitmapLength(void *font, const unsigned char *string);
-extern int APIENTRY glutStrokeLength(void *font, const unsigned char *string);
-#endif
-
-/* GLUT pre-built models sub-API */
-extern void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
-extern void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
-extern void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
-extern void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
-extern void APIENTRY glutWireCube(GLdouble size);
-extern void APIENTRY glutSolidCube(GLdouble size);
-extern void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
-extern void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
-extern void APIENTRY glutWireDodecahedron(void);
-extern void APIENTRY glutSolidDodecahedron(void);
-extern void APIENTRY glutWireTeapot(GLdouble size);
-extern void APIENTRY glutSolidTeapot(GLdouble size);
-extern void APIENTRY glutWireOctahedron(void);
-extern void APIENTRY glutSolidOctahedron(void);
-extern void APIENTRY glutWireTetrahedron(void);
-extern void APIENTRY glutSolidTetrahedron(void);
-extern void APIENTRY glutWireIcosahedron(void);
-extern void APIENTRY glutSolidIcosahedron(void);
-
-#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
-/* GLUT video resize sub-API. */
-extern int APIENTRY glutVideoResizeGet(GLenum param);
-extern void APIENTRY glutSetupVideoResizing(void);
-extern void APIENTRY glutStopVideoResizing(void);
-extern void APIENTRY glutVideoResize(int x, int y, int width, int height);
-extern void APIENTRY glutVideoPan(int x, int y, int width, int height);
-
-/* GLUT debugging sub-API. */
-extern void APIENTRY glutReportErrors(void);
-#endif
-
-#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
-/* GLUT device control sub-API. */
-/* glutSetKeyRepeat modes. */
-#define GLUT_KEY_REPEAT_OFF 0
-#define GLUT_KEY_REPEAT_ON 1
-#define GLUT_KEY_REPEAT_DEFAULT 2
-
-/* Joystick button masks. */
-#define GLUT_JOYSTICK_BUTTON_A 1
-#define GLUT_JOYSTICK_BUTTON_B 2
-#define GLUT_JOYSTICK_BUTTON_C 4
-#define GLUT_JOYSTICK_BUTTON_D 8
-
-extern void APIENTRY glutIgnoreKeyRepeat(int ignore);
-extern void APIENTRY glutSetKeyRepeat(int repeatMode);
-extern void APIENTRY glutForceJoystickFunc(void);
-
-/* GLUT game mode sub-API. */
-/* glutGameModeGet. */
-#define GLUT_GAME_MODE_ACTIVE 0
-#define GLUT_GAME_MODE_POSSIBLE 1
-#define GLUT_GAME_MODE_WIDTH 2
-#define GLUT_GAME_MODE_HEIGHT 3
-#define GLUT_GAME_MODE_PIXEL_DEPTH 4
-#define GLUT_GAME_MODE_REFRESH_RATE 5
-#define GLUT_GAME_MODE_DISPLAY_CHANGED 6
-
-extern void APIENTRY glutGameModeString(const char *string);
-extern int APIENTRY glutEnterGameMode(void);
-extern void APIENTRY glutLeaveGameMode(void);
-extern int APIENTRY glutGameModeGet(GLenum mode);
-#endif
-
-#ifdef __cplusplus
-}
-
-#endif
-
-#ifdef GLUT_APIENTRY_DEFINED
-# undef GLUT_APIENTRY_DEFINED
-# undef APIENTRY
-#endif
-
-#ifdef GLUT_WINGDIAPI_DEFINED
-# undef GLUT_WINGDIAPI_DEFINED
-# undef WINGDIAPI
-#endif
-
-#endif /* __glut_h__ */
+#ifndef __GLUT_H__
+#define __GLUT_H__
+
+/*
+ * glut.h
+ *
+ * The freeglut library include file
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "freeglut_std.h"
+
+/*** END OF FILE ***/
+
+#endif /* __GLUT_H__ */