Main Page | File List | Globals

glutes.h

Go to the documentation of this file.
00001 #ifndef  __GLUTES_H__
00002 #define  __GLUTES_H__
00003 
00004 /*
00005  * glutes.h
00006  *
00007  * The GLUT|ES library include file
00008  *
00009  * Copyright (c) 2005 Joachim Pouderoux and Jean-Eudes Marvie. All Rights Reserved.
00010  * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
00011  * Written by Pawel W. Olszta, <olszta@sourceforge.net>
00012  * Creation date: Thu Dec 2 1999
00013  *
00014  * Permission is hereby granted, free of charge, to any person obtaining a
00015  * copy of this software and associated documentation files (the "Software"),
00016  * to deal in the Software without restriction, including without limitation
00017  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00018  * the Software, and to permit persons to whom the Software is furnished 
00019  * to do so, subject to the following conditions:
00020  *
00021  * The above copyright notice and this permission notice shall be included
00022  * in all copies or substantial portions of the Software.
00023  *
00024  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00025  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00026  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00027  * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
00028  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00029  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00030  */
00031 
00032 #ifdef __cplusplus
00033         extern "C" {
00034 #endif
00035 
00036 /*
00037  * Under windows, we have to differentiate between static and dynamic libraries
00038  */
00039 
00040 #if defined(_WIN32)
00041 #       include <windows.h>
00042 #       include <windowsx.h>
00043 #       include <mmsystem.h>
00044 #       define WINDOWS
00045 #       ifndef _WIN32_WCE
00046 #               pragma comment (lib, "winmm.lib")                       /* link with Windows MultiMedia lib */
00047 #               pragma comment (lib, "user32.lib")                      /* link with Windows user lib           */
00048 #               pragma comment (lib, "gdi32.lib")                       /* link with Windows GDI lib            */
00049 #       else
00050 #               pragma comment (lib, "aygshell.lib")            /* link with AYGShell API lib           */
00051 #       endif
00052 #       ifndef _LIB
00053 #               ifndef GLES_CL
00054 #                       pragma comment (lib, "libGLES_CM.lib")          /* link with OpenGL|ES Common lib       */
00055 #               else
00056 #                       pragma comment (lib, "libGLES_CL.lib")          /* link with OpenGL|ES Common Light lib*/
00057 #               endif
00058 #       endif
00059 #       ifdef GLUTES_STATIC
00060 #               define FGAPI
00061 #               define FGAPIENTRY
00062 #               pragma comment (lib, "glutes_static.lib")       /* link with Win32 static glutes lib*/
00063 #       else
00064 #               if defined(GLUTES_EXPORTS)
00065 #                       define FGAPI __declspec(dllexport)
00066 #               else
00067 #                       define FGAPI __declspec(dllimport)
00068 #                       pragma comment (lib, "glutes.lib")              /* link with Win32 glutes lib           */
00069 #               endif
00070 #               define FGAPIENTRY __stdcall
00071 #       endif
00072 #else
00073 #       define FGAPI
00074 #       define FGAPIENTRY
00075 #endif
00076 
00077 /*
00078  * The GLUT|ES, freeglut and GLUT API versions
00079  */
00080 #define  GLUTES                                 1
00081 #define  FREEGLUT                               1
00082 #define  GLUT_API_VERSION               4
00083 #define  FREEGLUTES_VERSION_1_0 1
00084 #define  FREEGLUT_VERSION_2_0   1
00085 
00086 #define  GERBERA_ES_1_1                 /* Request OpenGL|ES 1.1 for extensions */
00087 
00088 /*
00089  * Always include OpenGL|ES and EGL headers
00090  */
00091 #include <GLES/gl.h>
00092 #include <GLES/egl.h>
00093 
00094 typedef GLfloat GLdouble;       /* trick to garanty same function prototypes */
00095 
00096 /*
00097  * GLUT API macro definitions -- the special key codes:
00098  */
00099 #define  GLUT_KEY_F1                        0x0001
00100 #define  GLUT_KEY_F2                        0x0002
00101 #define  GLUT_KEY_F3                        0x0003
00102 #define  GLUT_KEY_F4                        0x0004
00103 #define  GLUT_KEY_F5                        0x0005
00104 #define  GLUT_KEY_F6                        0x0006
00105 #define  GLUT_KEY_F7                        0x0007
00106 #define  GLUT_KEY_F8                        0x0008
00107 #define  GLUT_KEY_F9                        0x0009
00108 #define  GLUT_KEY_F10                       0x000A
00109 #define  GLUT_KEY_F11                       0x000B
00110 #define  GLUT_KEY_F12                       0x000C
00111 #define  GLUT_KEY_LEFT                      0x0064
00112 #define  GLUT_KEY_UP                        0x0065
00113 #define  GLUT_KEY_RIGHT                     0x0066
00114 #define  GLUT_KEY_DOWN                      0x0067
00115 #define  GLUT_KEY_PAGE_UP                   0x0068
00116 #define  GLUT_KEY_PAGE_DOWN                 0x0069
00117 #define  GLUT_KEY_HOME                      0x006A
00118 #define  GLUT_KEY_END                       0x006B
00119 #define  GLUT_KEY_INSERT                    0x006C
00120 
00121 /*
00122  * GLUT API macro definitions -- mouse state definitions
00123  */
00124 #define  GLUT_LEFT_BUTTON                   0x0000
00125 #define  GLUT_MIDDLE_BUTTON                 0x0001
00126 #define  GLUT_RIGHT_BUTTON                  0x0002
00127 #define  GLUT_DOWN                          0x0000
00128 #define  GLUT_UP                            0x0001
00129 #define  GLUT_LEFT                          0x0000
00130 #define  GLUT_ENTERED                       0x0001
00131 
00132 /*
00133  * GLUT API macro definitions -- the display mode definitions
00134  */
00135 #define  GLUT_RGB                           0x0000
00136 #define  GLUT_RGBA                          0x0000
00137 #define  GLUT_INDEX                         0x0001
00138 #define  GLUT_SINGLE                        0x0000
00139 #define  GLUT_DOUBLE                        0x0002
00140 #define  GLUT_ACCUM                         0x0004
00141 #define  GLUT_ALPHA                         0x0008
00142 #define  GLUT_DEPTH                         0x0010
00143 #define  GLUT_STENCIL                       0x0020
00144 #define  GLUT_MULTISAMPLE                   0x0080
00145 #define  GLUT_STEREO                        0x0100
00146 #define  GLUT_LUMINANCE                     0x0200
00147 
00148 /*
00149  * GLUT API macro definitions -- windows and menu related definitions
00150  */
00151 #define  GLUT_MENU_NOT_IN_USE               0x0000
00152 #define  GLUT_MENU_IN_USE                   0x0001
00153 #define  GLUT_NOT_VISIBLE                   0x0000
00154 #define  GLUT_VISIBLE                       0x0001
00155 #define  GLUT_HIDDEN                        0x0000
00156 #define  GLUT_FULLY_RETAINED                0x0001
00157 #define  GLUT_PARTIALLY_RETAINED            0x0002
00158 #define  GLUT_FULLY_COVERED                 0x0003
00159 
00160 /*
00161  * GLUT API macro definitions -- fonts definitions
00162  *
00163  * Steve Baker suggested to make it binary compatible with GLUT:
00164  */
00165 #if defined(_WIN32)
00166 #   define  GLUT_STROKE_ROMAN               ((void *)0x0000)
00167 #   define  GLUT_STROKE_MONO_ROMAN          ((void *)0x0001)
00168 #   define  GLUT_BITMAP_9_BY_15             ((void *)0x0002)
00169 #   define  GLUT_BITMAP_8_BY_13             ((void *)0x0003)
00170 #   define  GLUT_BITMAP_TIMES_ROMAN_10      ((void *)0x0004)
00171 #   define  GLUT_BITMAP_TIMES_ROMAN_24      ((void *)0x0005)
00172 #   define  GLUT_BITMAP_HELVETICA_10        ((void *)0x0006)
00173 #   define  GLUT_BITMAP_HELVETICA_12        ((void *)0x0007)
00174 #   define  GLUT_BITMAP_HELVETICA_18        ((void *)0x0008)
00175 #else
00176     /*
00177      * I don't really know if it's a good idea... But here it goes:
00178      */
00179     extern void* glutStrokeRoman;
00180     extern void* glutStrokeMonoRoman;
00181     extern void* glutBitmap9By15;
00182     extern void* glutBitmap8By13;
00183     extern void* glutBitmapTimesRoman10;
00184     extern void* glutBitmapTimesRoman24;
00185     extern void* glutBitmapHelvetica10;
00186     extern void* glutBitmapHelvetica12;
00187     extern void* glutBitmapHelvetica18;
00188 
00189     /*
00190      * Those pointers will be used by following definitions:
00191      */
00192 #   define  GLUT_STROKE_ROMAN               ((void *) &glutStrokeRoman)
00193 #   define  GLUT_STROKE_MONO_ROMAN          ((void *) &glutStrokeMonoRoman)
00194 #   define  GLUT_BITMAP_9_BY_15             ((void *) &glutBitmap9By15)
00195 #   define  GLUT_BITMAP_8_BY_13             ((void *) &glutBitmap8By13)
00196 #   define  GLUT_BITMAP_TIMES_ROMAN_10      ((void *) &glutBitmapTimesRoman10)
00197 #   define  GLUT_BITMAP_TIMES_ROMAN_24      ((void *) &glutBitmapTimesRoman24)
00198 #   define  GLUT_BITMAP_HELVETICA_10        ((void *) &glutBitmapHelvetica10)
00199 #   define  GLUT_BITMAP_HELVETICA_12        ((void *) &glutBitmapHelvetica12)
00200 #   define  GLUT_BITMAP_HELVETICA_18        ((void *) &glutBitmapHelvetica18)
00201 #endif
00202 
00203 /*
00204  * GLUT API macro definitions -- the glutGet parameters
00205  */
00206 #define  GLUT_WINDOW_X                      0x0064
00207 #define  GLUT_WINDOW_Y                      0x0065
00208 #define  GLUT_WINDOW_WIDTH                  0x0066
00209 #define  GLUT_WINDOW_HEIGHT                 0x0067
00210 #define  GLUT_WINDOW_BUFFER_SIZE            0x0068
00211 #define  GLUT_WINDOW_STENCIL_SIZE           0x0069
00212 #define  GLUT_WINDOW_DEPTH_SIZE             0x006A
00213 #define  GLUT_WINDOW_RED_SIZE               0x006B
00214 #define  GLUT_WINDOW_GREEN_SIZE             0x006C
00215 #define  GLUT_WINDOW_BLUE_SIZE              0x006D
00216 #define  GLUT_WINDOW_ALPHA_SIZE             0x006E
00217 #define  GLUT_WINDOW_ACCUM_RED_SIZE         0x006F
00218 #define  GLUT_WINDOW_ACCUM_GREEN_SIZE       0x0070
00219 #define  GLUT_WINDOW_ACCUM_BLUE_SIZE        0x0071
00220 #define  GLUT_WINDOW_ACCUM_ALPHA_SIZE       0x0072
00221 #define  GLUT_WINDOW_DOUBLEBUFFER           0x0073
00222 #define  GLUT_WINDOW_RGBA                   0x0074
00223 #define  GLUT_WINDOW_PARENT                 0x0075
00224 #define  GLUT_WINDOW_NUM_CHILDREN           0x0076
00225 #define  GLUT_WINDOW_COLORMAP_SIZE          0x0077
00226 #define  GLUT_WINDOW_NUM_SAMPLES            0x0078
00227 #define  GLUT_WINDOW_STEREO                 0x0079
00228 #define  GLUT_WINDOW_CURSOR                 0x007A
00229 
00230 #define  GLUT_SCREEN_WIDTH                  0x00C8
00231 #define  GLUT_SCREEN_HEIGHT                 0x00C9
00232 #define  GLUT_SCREEN_WIDTH_MM               0x00CA
00233 #define  GLUT_SCREEN_HEIGHT_MM              0x00CB
00234 #define  GLUT_MENU_NUM_ITEMS                0x012C
00235 #define  GLUT_DISPLAY_MODE_POSSIBLE         0x0190
00236 #define  GLUT_INIT_WINDOW_X                 0x01F4
00237 #define  GLUT_INIT_WINDOW_Y                 0x01F5
00238 #define  GLUT_INIT_WINDOW_WIDTH             0x01F6
00239 #define  GLUT_INIT_WINDOW_HEIGHT            0x01F7
00240 #define  GLUT_INIT_DISPLAY_MODE             0x01F8
00241 #define  GLUT_ELAPSED_TIME                  0x02BC
00242 #define  GLUT_WINDOW_FORMAT_ID              0x007B
00243 #define  GLUT_INIT_STATE                    0x007C
00244 
00245 /*
00246  * GLUT API macro definitions -- the glutDeviceGet parameters
00247  */
00248 #define  GLUT_HAS_KEYBOARD                  0x0258
00249 #define  GLUT_HAS_MOUSE                     0x0259
00250 #define  GLUT_HAS_SPACEBALL                 0x025A
00251 #define  GLUT_HAS_DIAL_AND_BUTTON_BOX       0x025B
00252 #define  GLUT_HAS_TABLET                    0x025C
00253 #define  GLUT_NUM_MOUSE_BUTTONS             0x025D
00254 #define  GLUT_NUM_SPACEBALL_BUTTONS         0x025E
00255 #define  GLUT_NUM_BUTTON_BOX_BUTTONS        0x025F
00256 #define  GLUT_NUM_DIALS                     0x0260
00257 #define  GLUT_NUM_TABLET_BUTTONS            0x0261
00258 #define  GLUT_DEVICE_IGNORE_KEY_REPEAT      0x0262
00259 #define  GLUT_DEVICE_KEY_REPEAT             0x0263
00260 #define  GLUT_HAS_JOYSTICK                  0x0264
00261 #define  GLUT_OWNS_JOYSTICK                 0x0265
00262 #define  GLUT_JOYSTICK_BUTTONS              0x0266
00263 #define  GLUT_JOYSTICK_AXES                 0x0267
00264 #define  GLUT_JOYSTICK_POLL_RATE            0x0268
00265 
00266 /*
00267  * GLUT API macro definitions -- the glutLayerGet parameters
00268  */
00269 #define  GLUT_OVERLAY_POSSIBLE              0x0320
00270 #define  GLUT_LAYER_IN_USE                  0x0321
00271 #define  GLUT_HAS_OVERLAY                   0x0322
00272 #define  GLUT_TRANSPARENT_INDEX             0x0323
00273 #define  GLUT_NORMAL_DAMAGED                0x0324
00274 #define  GLUT_OVERLAY_DAMAGED               0x0325
00275 
00276 /*
00277  * GLUT API macro definitions -- the glutVideoResizeGet parameters
00278  */
00279 #define  GLUT_VIDEO_RESIZE_POSSIBLE         0x0384
00280 #define  GLUT_VIDEO_RESIZE_IN_USE           0x0385
00281 #define  GLUT_VIDEO_RESIZE_X_DELTA          0x0386
00282 #define  GLUT_VIDEO_RESIZE_Y_DELTA          0x0387
00283 #define  GLUT_VIDEO_RESIZE_WIDTH_DELTA      0x0388
00284 #define  GLUT_VIDEO_RESIZE_HEIGHT_DELTA     0x0389
00285 #define  GLUT_VIDEO_RESIZE_X                0x038A
00286 #define  GLUT_VIDEO_RESIZE_Y                0x038B
00287 #define  GLUT_VIDEO_RESIZE_WIDTH            0x038C
00288 #define  GLUT_VIDEO_RESIZE_HEIGHT           0x038D
00289 
00290 /*
00291  * GLUT API macro definitions -- the glutUseLayer parameters
00292  */
00293 #define  GLUT_NORMAL                        0x0000
00294 #define  GLUT_OVERLAY                       0x0001
00295 
00296 /*
00297  * GLUT API macro definitions -- the glutGetModifiers parameters
00298  */
00299 #define  GLUT_ACTIVE_SHIFT                  0x0001
00300 #define  GLUT_ACTIVE_CTRL                   0x0002
00301 #define  GLUT_ACTIVE_ALT                    0x0004
00302 
00303 /*
00304  * GLUT API macro definitions -- the glutSetCursor parameters
00305  */
00306 #define  GLUT_CURSOR_RIGHT_ARROW            0x0000
00307 #define  GLUT_CURSOR_LEFT_ARROW             0x0001
00308 #define  GLUT_CURSOR_INFO                   0x0002
00309 #define  GLUT_CURSOR_DESTROY                0x0003
00310 #define  GLUT_CURSOR_HELP                   0x0004
00311 #define  GLUT_CURSOR_CYCLE                  0x0005
00312 #define  GLUT_CURSOR_SPRAY                  0x0006
00313 #define  GLUT_CURSOR_WAIT                   0x0007
00314 #define  GLUT_CURSOR_TEXT                   0x0008
00315 #define  GLUT_CURSOR_CROSSHAIR              0x0009
00316 #define  GLUT_CURSOR_UP_DOWN                0x000A
00317 #define  GLUT_CURSOR_LEFT_RIGHT             0x000B
00318 #define  GLUT_CURSOR_TOP_SIDE               0x000C
00319 #define  GLUT_CURSOR_BOTTOM_SIDE            0x000D
00320 #define  GLUT_CURSOR_LEFT_SIDE              0x000E
00321 #define  GLUT_CURSOR_RIGHT_SIDE             0x000F
00322 #define  GLUT_CURSOR_TOP_LEFT_CORNER        0x0010
00323 #define  GLUT_CURSOR_TOP_RIGHT_CORNER       0x0011
00324 #define  GLUT_CURSOR_BOTTOM_RIGHT_CORNER    0x0012
00325 #define  GLUT_CURSOR_BOTTOM_LEFT_CORNER     0x0013
00326 #define  GLUT_CURSOR_INHERIT                0x0064
00327 #define  GLUT_CURSOR_NONE                   0x0065
00328 #define  GLUT_CURSOR_FULL_CROSSHAIR         0x0066
00329 
00330 /*
00331  * GLUT API macro definitions -- RGB color component specification definitions
00332  */
00333 #define  GLUT_RED                           0x0000
00334 #define  GLUT_GREEN                         0x0001
00335 #define  GLUT_BLUE                          0x0002
00336 
00337 /*
00338  * GLUT API macro definitions -- additional keyboard and joystick definitions
00339  */
00340 #define  GLUT_KEY_REPEAT_OFF                0x0000
00341 #define  GLUT_KEY_REPEAT_ON                 0x0001
00342 #define  GLUT_KEY_REPEAT_DEFAULT            0x0002
00343 
00344 #define  GLUT_JOYSTICK_BUTTON_A             0x0001
00345 #define  GLUT_JOYSTICK_BUTTON_B             0x0002
00346 #define  GLUT_JOYSTICK_BUTTON_C             0x0004
00347 #define  GLUT_JOYSTICK_BUTTON_D             0x0008
00348 
00349 /*
00350  * GLUT API macro definitions -- game mode definitions
00351  */
00352 #define  GLUT_GAME_MODE_ACTIVE              0x0000
00353 #define  GLUT_GAME_MODE_POSSIBLE            0x0001
00354 #define  GLUT_GAME_MODE_WIDTH               0x0002
00355 #define  GLUT_GAME_MODE_HEIGHT              0x0003
00356 #define  GLUT_GAME_MODE_PIXEL_DEPTH         0x0004
00357 #define  GLUT_GAME_MODE_REFRESH_RATE        0x0005
00358 #define  GLUT_GAME_MODE_DISPLAY_CHANGED     0x0006
00359 
00360 /*
00361  * Initialization functions, see fglut_init.c
00362  */
00363 FGAPI void    FGAPIENTRY glutInit( int* pargc, char** argv );
00364 FGAPI void    FGAPIENTRY glutInitWindowPosition( int x, int y );
00365 FGAPI void    FGAPIENTRY glutInitWindowSize( int width, int height );
00366 FGAPI void    FGAPIENTRY glutInitDisplayMode( unsigned int displayMode );
00367 FGAPI void    FGAPIENTRY glutInitDisplayString( const char* displayMode );
00368 
00369 /*
00370  * Process loop function, see glutes_main.c
00371  */
00372 FGAPI void    FGAPIENTRY glutMainLoop( void );
00373 
00374 /*
00375  * Window management functions, see glutes_window.c
00376  */
00377 FGAPI int     FGAPIENTRY glutCreateWindow( const char* title );
00378 FGAPI int     FGAPIENTRY glutCreateSubWindow( int window, int x, int y, int width, int height );
00379 FGAPI void    FGAPIENTRY glutDestroyWindow( int window );
00380 FGAPI void    FGAPIENTRY glutSetWindow( int window );
00381 FGAPI int     FGAPIENTRY glutGetWindow( void );
00382 FGAPI void    FGAPIENTRY glutSetWindowTitle( const char* title );
00383 FGAPI void    FGAPIENTRY glutSetIconTitle( const char* title );
00384 FGAPI void    FGAPIENTRY glutReshapeWindow( int width, int height );
00385 FGAPI void    FGAPIENTRY glutPositionWindow( int x, int y );
00386 FGAPI void    FGAPIENTRY glutShowWindow( void );
00387 FGAPI void    FGAPIENTRY glutHideWindow( void );
00388 FGAPI void    FGAPIENTRY glutIconifyWindow( void );
00389 FGAPI void    FGAPIENTRY glutPushWindow( void );
00390 FGAPI void    FGAPIENTRY glutPopWindow( void );
00391 FGAPI void    FGAPIENTRY glutFullScreen( void );
00392 
00393 /*
00394  * Display-connected functions, see glutes_display.c
00395  */
00396 FGAPI void    FGAPIENTRY glutPostWindowRedisplay( int window );
00397 FGAPI void    FGAPIENTRY glutPostRedisplay( void );
00398 FGAPI void    FGAPIENTRY glutSwapBuffers( void );
00399 
00400 /*
00401  * Mouse cursor functions, see glutes_cursor.c
00402  */
00403 FGAPI void    FGAPIENTRY glutWarpPointer( int x, int y );
00404 FGAPI void    FGAPIENTRY glutSetCursor( int cursor );
00405 
00406 /*
00407  * Overlay stuff, see glutes_overlay.c
00408  */
00409 FGAPI void    FGAPIENTRY glutEstablishOverlay( void );
00410 FGAPI void    FGAPIENTRY glutRemoveOverlay( void );
00411 FGAPI void    FGAPIENTRY glutUseLayer( GLenum layer );
00412 FGAPI void    FGAPIENTRY glutPostOverlayRedisplay( void );
00413 FGAPI void    FGAPIENTRY glutPostWindowOverlayRedisplay( int window );
00414 FGAPI void    FGAPIENTRY glutShowOverlay( void );
00415 FGAPI void    FGAPIENTRY glutHideOverlay( void );
00416 
00417 /*
00418  * Menu stuff, see glutes_menu.c
00419  */
00420 FGAPI int     FGAPIENTRY glutCreateMenu( void (* callback)( int menu ) );
00421 FGAPI void    FGAPIENTRY glutDestroyMenu( int menu );
00422 FGAPI int     FGAPIENTRY glutGetMenu( void );
00423 FGAPI void    FGAPIENTRY glutSetMenu( int menu );
00424 FGAPI void    FGAPIENTRY glutAddMenuEntry( const char* label, int value );
00425 FGAPI void    FGAPIENTRY glutAddSubMenu( const char* label, int subMenu );
00426 FGAPI void    FGAPIENTRY glutChangeToMenuEntry( int item, const char* label, int value );
00427 FGAPI void    FGAPIENTRY glutChangeToSubMenu( int item, const char* label, int value );
00428 FGAPI void    FGAPIENTRY glutRemoveMenuItem( int item );
00429 FGAPI void    FGAPIENTRY glutAttachMenu( int button );
00430 FGAPI void    FGAPIENTRY glutDetachMenu( int button );
00431 
00432 /*
00433  * Global callback functions, see glutes_callbacks.c
00434  */
00435 FGAPI void    FGAPIENTRY glutTimerFunc( unsigned int time, void (* callback)( int ), int value );
00436 FGAPI void    FGAPIENTRY glutIdleFunc( void (* callback)( void ) );
00437 
00438 /*
00439  * Window-specific callback functions, see glutes_callbacks.c
00440  */
00441 FGAPI void    FGAPIENTRY glutKeyboardFunc( void (* callback)( unsigned char, int, int ) );
00442 FGAPI void    FGAPIENTRY glutSpecialFunc( void (* callback)( int, int, int ) );
00443 FGAPI void    FGAPIENTRY glutReshapeFunc( void (* callback)( int, int ) );
00444 FGAPI void    FGAPIENTRY glutVisibilityFunc( void (* callback)( int ) );
00445 FGAPI void    FGAPIENTRY glutDisplayFunc( void (* callback)( void ) );
00446 FGAPI void    FGAPIENTRY glutMouseFunc( void (* callback)( int, int, int, int ) );
00447 FGAPI void    FGAPIENTRY glutMotionFunc( void (* callback)( int, int ) );
00448 FGAPI void    FGAPIENTRY glutPassiveMotionFunc( void (* callback)( int, int ) );
00449 FGAPI void    FGAPIENTRY glutEntryFunc( void (* callback)( int ) );
00450 
00451 FGAPI void    FGAPIENTRY glutKeyboardUpFunc( void (* callback)( unsigned char, int, int ) );
00452 FGAPI void    FGAPIENTRY glutSpecialUpFunc( void (* callback)( int, int, int ) );
00453 FGAPI void    FGAPIENTRY glutJoystickFunc( void (* callback)( unsigned int, int, int, int ), int pollInterval );
00454 FGAPI void    FGAPIENTRY glutMenuStateFunc( void (* callback)( int ) );
00455 FGAPI void    FGAPIENTRY glutMenuStatusFunc( void (* callback)( int, int, int ) );
00456 FGAPI void    FGAPIENTRY glutOverlayDisplayFunc( void (* callback)( void ) );
00457 FGAPI void    FGAPIENTRY glutWindowStatusFunc( void (* callback)( int ) );
00458 
00459 FGAPI void    FGAPIENTRY glutSpaceballMotionFunc( void (* callback)( int, int, int ) );
00460 FGAPI void    FGAPIENTRY glutSpaceballRotateFunc( void (* callback)( int, int, int ) );
00461 FGAPI void    FGAPIENTRY glutSpaceballButtonFunc( void (* callback)( int, int ) );
00462 FGAPI void    FGAPIENTRY glutButtonBoxFunc( void (* callback)( int, int ) );
00463 FGAPI void    FGAPIENTRY glutDialsFunc( void (* callback)( int, int ) );
00464 FGAPI void    FGAPIENTRY glutTabletMotionFunc( void (* callback)( int, int ) );
00465 FGAPI void    FGAPIENTRY glutTabletButtonFunc( void (* callback)( int, int, int, int ) );
00466 
00467 /*
00468  * State setting and retrieval functions, see glutes_state.c
00469  */
00470 FGAPI int     FGAPIENTRY glutGet( GLenum query );
00471 FGAPI int     FGAPIENTRY glutDeviceGet( GLenum query );
00472 FGAPI int     FGAPIENTRY glutGetModifiers( void );
00473 FGAPI int     FGAPIENTRY glutLayerGet( GLenum query );
00474 
00475 /*
00476  * Font stuff, see glutes_font.c
00477  */
00478 FGAPI void    FGAPIENTRY glutBitmapCharacterPoints( void* font, int x, int y, int character );
00479 FGAPI void    FGAPIENTRY glutBitmapCharacterTex( void* font, int x, int y, int character );
00480 FGAPI int     FGAPIENTRY glutBitmapWidth( void* font, int character );
00481 FGAPI void    FGAPIENTRY glutStrokeCharacter( void* font, int character );
00482 FGAPI int     FGAPIENTRY glutStrokeWidth( void* font, int character );
00483 FGAPI int     FGAPIENTRY glutBitmapLength( void* font, const char* string );
00484 FGAPI int     FGAPIENTRY glutStrokeLength( void* font, const char* string );
00485 
00486 /* Disable textured fonts if the GL_OES_draw_texture extension is not defined */
00487 #if defined(GLUTES_USE_TEXTURED_FONTS) && defined(GL_OES_draw_texture)
00488 #       define glutBitmapCharacter glutBitmapCharacterTex
00489 #else
00490 #       define glutBitmapCharacter glutBitmapCharacterPoints
00491 #endif
00492 /*
00493  * Geometry functions, see glutes_shape.c
00494  */
00495 
00496 #if !defined(GLES_CL) || defined(GLUTES_STATIC)
00497 // double versions are disabled for CL profile & DLL linkeage only
00498 FGAPI void    FGAPIENTRY glutWireCube( GLdouble size );
00499 FGAPI void    FGAPIENTRY glutSolidCube( GLdouble size );
00500 FGAPI void    FGAPIENTRY glutWireSphere( GLdouble radius, GLint slices, GLint stacks );
00501 FGAPI void    FGAPIENTRY glutSolidSphere( GLdouble radius, GLint slices, GLint stacks );
00502 FGAPI void    FGAPIENTRY glutSolidCone( GLdouble base, GLdouble height, GLint slices, GLint stacks );
00503 FGAPI void    FGAPIENTRY glutSolidTorus( GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings );
00504 //FGAPI void    FGAPIENTRY glutWireTorus( GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings );
00505 //FGAPI void    FGAPIENTRY glutWireCone( GLdouble base, GLdouble height, GLint slices, GLint stacks );
00506 //FGAPI void    FGAPIENTRY glutWireDodecahedron( void );
00507 //FGAPI void    FGAPIENTRY glutSolidDodecahedron( void );
00508 //FGAPI void    FGAPIENTRY glutWireOctahedron( void );
00509 //FGAPI void    FGAPIENTRY glutSolidOctahedron( void );
00510 //FGAPI void    FGAPIENTRY glutWireTetrahedron( void );
00511 //FGAPI void    FGAPIENTRY glutSolidTetrahedron( void );
00512 //FGAPI void    FGAPIENTRY glutWireIcosahedron( void );
00513 //FGAPI void    FGAPIENTRY glutSolidIcosahedron( void );
00514 #endif
00515 
00516 FGAPI void    FGAPIENTRY glutWireCubex( GLfixed size );
00517 FGAPI void    FGAPIENTRY glutSolidCubex( GLfixed size );
00518 FGAPI void    FGAPIENTRY glutWireSpherex( GLfixed radius, GLint slices, GLint stacks );
00519 FGAPI void    FGAPIENTRY glutSolidSpherex( GLfixed radius, GLint slices, GLint stacks );
00520 FGAPI void    FGAPIENTRY glutSolidConex( GLfixed base, GLfixed height, GLint slices, GLint stacks );
00521 FGAPI void    FGAPIENTRY glutSolidTorusx( GLfixed innerRadius, GLfixed outerRadius, GLint sides, GLint rings );
00522 
00523 /*
00524  * Game mode functions, see glutes_gamemode.c
00525  */
00526 FGAPI void    FGAPIENTRY glutGameModeString( const char* string );
00527 FGAPI int     FGAPIENTRY glutEnterGameMode( void );
00528 FGAPI void    FGAPIENTRY glutLeaveGameMode( void );
00529 FGAPI int     FGAPIENTRY glutGameModeGet( GLenum query );
00530 
00531 /*
00532  * Video resize functions, see glutes_videoresize.c
00533  */
00534 FGAPI int     FGAPIENTRY glutVideoResizeGet( GLenum query );
00535 FGAPI void    FGAPIENTRY glutSetupVideoResizing( void );
00536 FGAPI void    FGAPIENTRY glutStopVideoResizing( void );
00537 FGAPI void    FGAPIENTRY glutVideoResize( int x, int y, int width, int height );
00538 FGAPI void    FGAPIENTRY glutVideoPan( int x, int y, int width, int height );
00539 
00540 /*
00541  * Colormap functions, see glutes_misc.c
00542  */
00543 FGAPI void    FGAPIENTRY glutSetColor( int color, GLfloat red, GLfloat green, GLfloat blue );
00544 FGAPI GLfloat FGAPIENTRY glutGetColor( int color, int component );
00545 FGAPI void    FGAPIENTRY glutCopyColormap( int window );
00546 
00547 /*
00548  * Misc keyboard and joystick functions, see glutes_misc.c
00549  */
00550 FGAPI void    FGAPIENTRY glutIgnoreKeyRepeat( int ignore );
00551 FGAPI void    FGAPIENTRY glutSetKeyRepeat( int repeatMode );  /* DEPRECATED 11/4/02 - Do not use */
00552 FGAPI void    FGAPIENTRY glutForceJoystickFunc( void );
00553 
00554 /*
00555  * Misc functions, see glutes_misc.c
00556  */
00557 FGAPI int     FGAPIENTRY glutExtensionSupported( const char* extension );
00558 FGAPI void    FGAPIENTRY glutReportErrors( void );
00559 
00560 
00561 /*
00562  * ****************************************************************************
00563  * The non-GLUT-compatible extensions to the GLUT|ES library include file
00564  * ****************************************************************************
00565  */
00566 
00567 
00568 /*
00569  * GLUT API Extension macro definitions -- behaviour when the user clicks on an "x" to close a window
00570  */
00571 #define GLUT_ACTION_EXIT                         0
00572 #define GLUT_ACTION_GLUTMAINLOOP_RETURNS         1
00573 #define GLUT_ACTION_CONTINUE_EXECUTION           2
00574 
00575 /*
00576  * Create a new rendering context when the user opens a new window?
00577  */
00578 #define GLUT_CREATE_NEW_CONTEXT                  0
00579 #define GLUT_USE_CURRENT_CONTEXT                 1
00580 
00581 /*
00582  * GLUT API Extension macro definitions -- the glutGet parameters
00583  */
00584 #define  GLUT_ACTION_ON_WINDOW_CLOSE        0x01F9
00585 
00586 #define  GLUT_WINDOW_BORDER_WIDTH           0x01FA
00587 #define  GLUT_WINDOW_HEADER_HEIGHT          0x01FB
00588 
00589 #define  GLUT_VERSION                       0x01FC
00590 
00591 #define  GLUT_RENDERING_CONTEXT             0x01FD
00592 
00593 /*
00594  * Process loop function, see glutes_main.c
00595  */
00596 FGAPI void    FGAPIENTRY glutMainLoopEvent( void );
00597 FGAPI void    FGAPIENTRY glutLeaveMainLoop( void );
00598 
00599 /*
00600  * Window-specific callback functions, see glutes_callbacks.c
00601  */
00602 FGAPI void    FGAPIENTRY glutMouseWheelFunc( void (* callback)( int, int, int, int ) );
00603 FGAPI void    FGAPIENTRY glutCloseFunc( void (* callback)( void ) );
00604 FGAPI void    FGAPIENTRY glutWMCloseFunc( void (* callback)( void ) );
00605 FGAPI void    FGAPIENTRY glutMenuDestroyFunc( void (* callback)( void ) );
00606 
00607 /*
00608  * Misc functions, see glutes_misc.c
00609  */
00610 FGAPI void    FGAPIENTRY glutSimulateButton(int button, int x, int y);
00611 
00612 /*
00613  * State setting and retrieval functions, see glutes_state.c
00614  */
00615 FGAPI void    FGAPIENTRY glutSetOption ( GLenum option_flag, int value ) ;
00616 FGAPI void*   FGAPIENTRY glutGetWindowData( void );
00617 FGAPI void    FGAPIENTRY glutSetWindowData(void* data);
00618 FGAPI void*   FGAPIENTRY glutGetMenuData( void );
00619 FGAPI void    FGAPIENTRY glutSetMenuData(void* data);
00620 
00621 /*
00622  * Font stuff, see glutes_font.c
00623  */
00624 FGAPI int     FGAPIENTRY glutBitmapHeight( void* font );
00625 FGAPI GLfloat FGAPIENTRY glutStrokeHeight( void* font );
00626 FGAPI void    FGAPIENTRY glutBitmapStringPoints( void* font, int x, int y, const char *string );
00627 FGAPI void    FGAPIENTRY glutBitmapStringTex( void* font, int x, int y, const char *string );
00628 FGAPI void    FGAPIENTRY glutStrokeString( void* font, const char *string );
00629 // style bits signification:  1:italic | 2:bold | 4:underlined
00630 FGAPI void        FGAPIENTRY glutTrueTypeStringPoints(WCHAR *fontname, int fontsize, int style, int x, int y, const WCHAR *string);
00631 
00632 
00633 /* Disable textured fonts if the GL_OES_draw_texture extension is not defined */
00634 #if defined(GLUTES_USE_TEXTURED_FONTS) && defined(GL_OES_draw_texture)
00635 #       define glutBitmapString         glutBitmapStringTex
00636 #       define glutTrueTypeString       glutTrueTypeStringPoints
00637 #else
00638 #       define glutBitmapString         glutBitmapStringPoints
00639 #       define glutTrueTypeString       glutTrueTypeStringPoints
00640 #endif
00641 
00642 /*
00643  * Extension functions, see glutes_ext.c
00644  */
00645 FGAPI void *  FGAPIENTRY glutGetProcAddress( const char *procName );
00646 FGAPI int         FGAPIENTRY glutSelectFile(char *filename, const char *filter, const char *title);
00647 
00648 
00649 #ifdef __cplusplus
00650     }
00651 #endif
00652 
00653 
00654 
00655 /*** END OF FILE ***/
00656 
00657 #endif /* __GLUTES_H__ */
00658 

Generated on Mon Sep 12 12:06:53 2005 for GLUT|ES by doxygen 1.3.6