Many updates from John Fay. (freeglut.h may need a small change to allow Win32 DLL...
[freeglut] / include / GL / freeglut.h
1 /*
2  * freeglut.h
3  *
4  * The freeglut library include file
5  *
6  * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
7  * Written by Pawel W. Olszta, <olszta@sourceforge.net>
8  * Creation date: Thu Dec 2 1999
9  *
10  * Permission is hereby granted, free of charge, to any person obtaining a
11  * copy of this software and associated documentation files (the "Software"),
12  * to deal in the Software without restriction, including without limitation
13  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
14  * and/or sell copies of the Software, and to permit persons to whom the
15  * Software is furnished to do so, subject to the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be included
18  * in all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
23  * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
24  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26  */
27
28 #ifndef  FREEGLUT_H
29 #define  FREEGLUT_H
30
31 #ifdef __cplusplus
32     extern "C" {
33 #endif
34
35 /*
36  * Under windows, we've got some issues to solve
37  */
38 #if defined(WIN32)
39 #if 0
40 #       if defined(FREEGLUT_LIBRARY_BUILD)
41 #               define FGAPI __declspec(dllexport)
42 #       else
43 #               define FGAPI __declspec(dllimport)
44 #       endif
45 #       define FGAPIENTRY __stdcall
46 #else
47 #    include <windows.h>
48 #    include <windowsx.h>
49 #    include <mmsystem.h>
50 #    define WINDOWS
51 #    define FGAPI
52 #    define FGAPIENTRY
53 #endif
54
55 #pragma comment (lib, "winmm.lib")       /* link with Windows MultiMedia lib */
56 #pragma comment (lib, "opengl32.lib")    /* link with Microsoft OpenGL lib */
57 #pragma comment (lib, "glu32.lib")       /* link with OpenGL Utility lib */
58 #pragma comment (lib, "freeglut.lib")    /* link with Win32 freeglut lib */
59
60 #else
61 #       define FGAPI
62 #       define FGAPIENTRY
63 #endif
64
65 /*
66  * The freeglut and GLUT API versions
67  */
68 #define  FREEGLUT          1
69 #define  GLUT_API_VERSION  4
70
71 /*
72  * Always include OpenGL and GLU headers
73  */
74 #include <GL/gl.h>
75 #include <GL/glu.h>
76
77 /*
78  * GLUT API macro definitions -- the special key codes:
79  */
80 #define  GLUT_KEY_F1                        0x0001
81 #define  GLUT_KEY_F2                        0x0002
82 #define  GLUT_KEY_F3                        0x0003
83 #define  GLUT_KEY_F4                        0x0004
84 #define  GLUT_KEY_F5                        0x0005
85 #define  GLUT_KEY_F6                        0x0006
86 #define  GLUT_KEY_F7                        0x0007
87 #define  GLUT_KEY_F8                        0x0008
88 #define  GLUT_KEY_F9                        0x0009
89 #define  GLUT_KEY_F10                       0x000A
90 #define  GLUT_KEY_F11                       0x000B
91 #define  GLUT_KEY_F12                       0x000C
92 #define  GLUT_KEY_LEFT                      0x0064
93 #define  GLUT_KEY_UP                        0x0065
94 #define  GLUT_KEY_RIGHT                     0x0066
95 #define  GLUT_KEY_DOWN                      0x0067
96 #define  GLUT_KEY_PAGE_UP                   0x0068
97 #define  GLUT_KEY_PAGE_DOWN                 0x0069
98 #define  GLUT_KEY_HOME                      0x006A
99 #define  GLUT_KEY_END                       0x006B
100 #define  GLUT_KEY_INSERT                    0x006C
101
102 /*
103  * GLUT API macro definitions -- mouse state definitions
104  */
105 #define  GLUT_LEFT_BUTTON                   0x0000
106 #define  GLUT_MIDDLE_BUTTON                 0x0001
107 #define  GLUT_RIGHT_BUTTON                  0x0002
108 #define  GLUT_DOWN                          0x0000
109 #define  GLUT_UP                            0x0001
110 #define  GLUT_LEFT                          0x0000
111 #define  GLUT_ENTERED                       0x0001
112
113 /*
114  * GLUT API macro definitions -- the display mode definitions
115  */
116 #define  GLUT_RGB                           0x0000
117 #define  GLUT_RGBA                          0x0000
118 #define  GLUT_INDEX                         0x0001
119 #define  GLUT_SINGLE                        0x0000
120 #define  GLUT_DOUBLE                        0x0002
121 #define  GLUT_ACCUM                         0x0004
122 #define  GLUT_ALPHA                         0x0008
123 #define  GLUT_DEPTH                         0x0010
124 #define  GLUT_STENCIL                       0x0020
125 #define  GLUT_MULTISAMPLE                   0x0080
126 #define  GLUT_STEREO                        0x0100
127 #define  GLUT_LUMINANCE                     0x0200
128
129 /*
130  * GLUT API macro definitions -- windows and menu related definitions
131  */
132 #define  GLUT_MENU_NOT_IN_USE               0x0000
133 #define  GLUT_MENU_IN_USE                   0x0001
134 #define  GLUT_NOT_VISIBLE                   0x0000
135 #define  GLUT_VISIBLE                       0x0001
136 #define  GLUT_HIDDEN                        0x0000
137 #define  GLUT_FULLY_RETAINED                0x0001
138 #define  GLUT_PARTIALLY_RETAINED            0x0002
139 #define  GLUT_FULLY_COVERED                 0x0003
140
141 /*
142  * GLUT API macro definitions -- fonts definitions
143  *
144  * Steve Baker suggested to make it binary compatible with GLUT:
145  */
146 #if defined(WIN32)
147 #   define  GLUT_STROKE_ROMAN               ((void *)0x0000)
148 #   define  GLUT_STROKE_MONO_ROMAN          ((void *)0x0001)
149 #   define  GLUT_BITMAP_9_BY_15             ((void *)0x0002)
150 #   define  GLUT_BITMAP_8_BY_13             ((void *)0x0003)
151 #   define  GLUT_BITMAP_TIMES_ROMAN_10      ((void *)0x0004)
152 #   define  GLUT_BITMAP_TIMES_ROMAN_24      ((void *)0x0005)
153 #   define  GLUT_BITMAP_HELVETICA_10        ((void *)0x0006)
154 #   define  GLUT_BITMAP_HELVETICA_12        ((void *)0x0007)
155 #   define  GLUT_BITMAP_HELVETICA_18        ((void *)0x0008)
156 #else
157     /*
158      * I don't really know if it's a good idea... But here it goes:
159      */
160     extern void* glutStrokeRoman;
161     extern void* glutStrokeMonoRoman;
162     extern void* glutBitmap9By15;
163     extern void* glutBitmap8By13;
164     extern void* glutBitmapTimesRoman10;
165     extern void* glutBitmapTimesRoman24;
166     extern void* glutBitmapHelvetica10;
167     extern void* glutBitmapHelvetica12;
168     extern void* glutBitmapHelvetica18;
169
170     /*
171      * Those pointers will be used by following definitions:
172      */
173 #   define  GLUT_STROKE_ROMAN               ((void *) &glutStrokeRoman)
174 #   define  GLUT_STROKE_MONO_ROMAN          ((void *) &glutStrokeMonoRoman)
175 #   define  GLUT_BITMAP_9_BY_15             ((void *) &glutBitmap9By15)
176 #   define  GLUT_BITMAP_8_BY_13             ((void *) &glutBitmap8By13)
177 #   define  GLUT_BITMAP_TIMES_ROMAN_10      ((void *) &glutBitmapTimesRoman10)
178 #   define  GLUT_BITMAP_TIMES_ROMAN_24      ((void *) &glutBitmapTimesRoman24)
179 #   define  GLUT_BITMAP_HELVETICA_10        ((void *) &glutBitmapHelvetica10)
180 #   define  GLUT_BITMAP_HELVETICA_12        ((void *) &glutBitmapHelvetica12)
181 #   define  GLUT_BITMAP_HELVETICA_18        ((void *) &glutBitmapHelvetica18)
182 #endif
183
184 /*
185  * GLUT API Extension macro definitions -- behaviour when the user clicks on an "x" to close a window
186  */
187 #define GLUT_ACTION_EXIT                         0
188 #define GLUT_ACTION_GLUTMAINLOOP_RETURNS         1
189 #define GLUT_ACTION_CONTINUE_EXECUTION           2
190
191 /*
192  * GLUT API macro definitions -- the glutGet parameters
193  */
194 #define  GLUT_WINDOW_X                      0x0064
195 #define  GLUT_WINDOW_Y                      0x0065
196 #define  GLUT_WINDOW_WIDTH                  0x0066
197 #define  GLUT_WINDOW_HEIGHT                 0x0067
198 #define  GLUT_WINDOW_BUFFER_SIZE            0x0068
199 #define  GLUT_WINDOW_STENCIL_SIZE           0x0069
200 #define  GLUT_WINDOW_DEPTH_SIZE             0x006A
201 #define  GLUT_WINDOW_RED_SIZE               0x006B
202 #define  GLUT_WINDOW_GREEN_SIZE             0x006C
203 #define  GLUT_WINDOW_BLUE_SIZE              0x006D
204 #define  GLUT_WINDOW_ALPHA_SIZE             0x006E
205 #define  GLUT_WINDOW_ACCUM_RED_SIZE         0x006F
206 #define  GLUT_WINDOW_ACCUM_GREEN_SIZE       0x0070
207 #define  GLUT_WINDOW_ACCUM_BLUE_SIZE        0x0071
208 #define  GLUT_WINDOW_ACCUM_ALPHA_SIZE       0x0072
209 #define  GLUT_WINDOW_DOUBLEBUFFER           0x0073
210 #define  GLUT_WINDOW_RGBA                   0x0074
211 #define  GLUT_WINDOW_PARENT                 0x0075
212 #define  GLUT_WINDOW_NUM_CHILDREN           0x0076
213 #define  GLUT_WINDOW_COLORMAP_SIZE          0x0077
214 #define  GLUT_WINDOW_NUM_SAMPLES            0x0078
215 #define  GLUT_WINDOW_STEREO                 0x0079
216 #define  GLUT_WINDOW_CURSOR                 0x007A
217
218 #define  GLUT_SCREEN_WIDTH                  0x00C8
219 #define  GLUT_SCREEN_HEIGHT                 0x00C9
220 #define  GLUT_SCREEN_WIDTH_MM               0x00CA
221 #define  GLUT_SCREEN_HEIGHT_MM              0x00CB
222 #define  GLUT_MENU_NUM_ITEMS                0x012C
223 #define  GLUT_DISPLAY_MODE_POSSIBLE         0x0190
224 #define  GLUT_INIT_WINDOW_X                 0x01F4
225 #define  GLUT_INIT_WINDOW_Y                 0x01F5
226 #define  GLUT_INIT_WINDOW_WIDTH             0x01F6
227 #define  GLUT_INIT_WINDOW_HEIGHT            0x01F7
228 #define  GLUT_INIT_DISPLAY_MODE             0x01F8
229 #define  GLUT_ELAPSED_TIME                  0x02BC
230 #define  GLUT_WINDOW_FORMAT_ID              0x007B
231
232 #define  GLUT_ACTION_ON_WINDOW_CLOSE        0x01F9
233
234 /*
235  * GLUT API macro definitions -- the glutDeviceGet parameters
236  */
237 #define  GLUT_HAS_KEYBOARD                  0x0258
238 #define  GLUT_HAS_MOUSE                     0x0259
239 #define  GLUT_HAS_SPACEBALL                 0x025A
240 #define  GLUT_HAS_DIAL_AND_BUTTON_BOX       0x025B
241 #define  GLUT_HAS_TABLET                    0x025C
242 #define  GLUT_NUM_MOUSE_BUTTONS             0x025D
243 #define  GLUT_NUM_SPACEBALL_BUTTONS         0x025E
244 #define  GLUT_NUM_BUTTON_BOX_BUTTONS        0x025F
245 #define  GLUT_NUM_DIALS                     0x0260
246 #define  GLUT_NUM_TABLET_BUTTONS            0x0261
247 #define  GLUT_DEVICE_IGNORE_KEY_REPEAT      0x0262
248 #define  GLUT_DEVICE_KEY_REPEAT             0x0263
249 #define  GLUT_HAS_JOYSTICK                  0x0264
250 #define  GLUT_OWNS_JOYSTICK                 0x0265
251 #define  GLUT_JOYSTICK_BUTTONS              0x0266
252 #define  GLUT_JOYSTICK_AXES                 0x0267
253 #define  GLUT_JOYSTICK_POLL_RATE            0x0268
254
255 /*
256  * GLUT API macro definitions -- the glutLayerGet parameters
257  */
258 #define  GLUT_OVERLAY_POSSIBLE              0x0320
259 #define  GLUT_LAYER_IN_USE                  0x0321
260 #define  GLUT_HAS_OVERLAY                   0x0322
261 #define  GLUT_TRANSPARENT_INDEX             0x0323
262 #define  GLUT_NORMAL_DAMAGED                0x0324
263 #define  GLUT_OVERLAY_DAMAGED               0x0325
264
265 /*
266  * GLUT API macro definitions -- the glutVideoResizeGet parameters
267  */
268 #define  GLUT_VIDEO_RESIZE_POSSIBLE         0x0384
269 #define  GLUT_VIDEO_RESIZE_IN_USE           0x0385
270 #define  GLUT_VIDEO_RESIZE_X_DELTA          0x0386
271 #define  GLUT_VIDEO_RESIZE_Y_DELTA          0x0387
272 #define  GLUT_VIDEO_RESIZE_WIDTH_DELTA      0x0388
273 #define  GLUT_VIDEO_RESIZE_HEIGHT_DELTA     0x0389
274 #define  GLUT_VIDEO_RESIZE_X                0x038A
275 #define  GLUT_VIDEO_RESIZE_Y                0x038B
276 #define  GLUT_VIDEO_RESIZE_WIDTH            0x038C
277 #define  GLUT_VIDEO_RESIZE_HEIGHT           0x038D
278
279 /*
280  * GLUT API macro definitions -- the glutUseLayer parameters
281  */
282 #define  GLUT_NORMAL                        0x0000
283 #define  GLUT_OVERLAY                       0x0001
284
285 /*
286  * GLUT API macro definitions -- the glutGetModifiers parameters
287  */
288 #define  GLUT_ACTIVE_SHIFT                  0x0001
289 #define  GLUT_ACTIVE_CTRL                   0x0002
290 #define  GLUT_ACTIVE_ALT                    0x0004
291
292 /*
293  * GLUT API macro definitions -- the glutSetCursor parameters
294  */
295 #define  GLUT_CURSOR_RIGHT_ARROW            0x0000
296 #define  GLUT_CURSOR_LEFT_ARROW             0x0001
297 #define  GLUT_CURSOR_INFO                   0x0002
298 #define  GLUT_CURSOR_DESTROY                0x0003
299 #define  GLUT_CURSOR_HELP                   0x0004
300 #define  GLUT_CURSOR_CYCLE                  0x0005
301 #define  GLUT_CURSOR_SPRAY                  0x0006
302 #define  GLUT_CURSOR_WAIT                   0x0007
303 #define  GLUT_CURSOR_TEXT                   0x0008
304 #define  GLUT_CURSOR_CROSSHAIR              0x0009
305 #define  GLUT_CURSOR_UP_DOWN                0x000A
306 #define  GLUT_CURSOR_LEFT_RIGHT             0x000B
307 #define  GLUT_CURSOR_TOP_SIDE               0x000C
308 #define  GLUT_CURSOR_BOTTOM_SIDE            0x000D
309 #define  GLUT_CURSOR_LEFT_SIDE              0x000E
310 #define  GLUT_CURSOR_RIGHT_SIDE             0x000F
311 #define  GLUT_CURSOR_TOP_LEFT_CORNER        0x0010
312 #define  GLUT_CURSOR_TOP_RIGHT_CORNER       0x0011
313 #define  GLUT_CURSOR_BOTTOM_RIGHT_CORNER    0x0012
314 #define  GLUT_CURSOR_BOTTOM_LEFT_CORNER     0x0013
315 #define  GLUT_CURSOR_INHERIT                0x0064
316 #define  GLUT_CURSOR_NONE                   0x0065
317 #define  GLUT_CURSOR_FULL_CROSSHAIR         0x0066
318
319 /*
320  * GLUT API macro definitions -- RGB color component specification definitions
321  */
322 #define  GLUT_RED                           0x0000
323 #define  GLUT_GREEN                         0x0001
324 #define  GLUT_BLUE                          0x0002
325
326 /*
327  * GLUT API macro definitions -- additional keyboard and joystick definitions
328  */
329 #define  GLUT_KEY_REPEAT_OFF                0x0000
330 #define  GLUT_KEY_REPEAT_ON                 0x0001
331 #define  GLUT_KEY_REPEAT_DEFAULT            0x0002
332
333 #define  GLUT_JOYSTICK_BUTTON_A             0x0001
334 #define  GLUT_JOYSTICK_BUTTON_B             0x0002
335 #define  GLUT_JOYSTICK_BUTTON_C             0x0004
336 #define  GLUT_JOYSTICK_BUTTON_D             0x0008
337
338 /*
339  * GLUT API macro definitions -- game mode definitions
340  */
341 #define  GLUT_GAME_MODE_ACTIVE              0x0000
342 #define  GLUT_GAME_MODE_POSSIBLE            0x0001
343 #define  GLUT_GAME_MODE_WIDTH               0x0002
344 #define  GLUT_GAME_MODE_HEIGHT              0x0003
345 #define  GLUT_GAME_MODE_PIXEL_DEPTH         0x0004
346 #define  GLUT_GAME_MODE_REFRESH_RATE        0x0005
347 #define  GLUT_GAME_MODE_DISPLAY_CHANGED     0x0006
348
349 /*
350  * Initialization functions, see fglut_init.c
351  */
352 FGAPI void    FGAPIENTRY glutInit( int* pargc, char** argv );
353 FGAPI void    FGAPIENTRY glutInitWindowPosition( int x, int y );
354 FGAPI void    FGAPIENTRY glutInitWindowSize( int width, int height );
355 FGAPI void    FGAPIENTRY glutInitDisplayMode( int displayMode );
356 FGAPI void    FGAPIENTRY glutInitDisplayString( char* displayMode );
357
358 /*
359  * Process loop function, see freeglut_main.c
360  */
361 FGAPI void    FGAPIENTRY glutMainLoop( void );
362 FGAPI void    FGAPIENTRY glutMainLoopEvent( void );
363 FGAPI void    FGAPIENTRY glutLeaveMainLoop( void );
364
365 /*
366  * Window management functions, see freeglut_window.c
367  */
368 FGAPI int     FGAPIENTRY glutCreateWindow( const char* title );
369 FGAPI int     FGAPIENTRY glutCreateSubWindow( int window, int x, int y, int width, int height );
370 FGAPI void    FGAPIENTRY glutDestroyWindow( int window );
371 FGAPI void    FGAPIENTRY glutSetWindow( int window );
372 FGAPI int     FGAPIENTRY glutGetWindow( void );
373 FGAPI void    FGAPIENTRY glutSetWindowTitle( char* title );
374 FGAPI void    FGAPIENTRY glutSetIconTitle( char* title );
375 FGAPI void    FGAPIENTRY glutReshapeWindow( int width, int height );
376 FGAPI void    FGAPIENTRY glutPositionWindow( int x, int y );
377 FGAPI void    FGAPIENTRY glutShowWindow( void );
378 FGAPI void    FGAPIENTRY glutHideWindow( void );
379 FGAPI void    FGAPIENTRY glutIconifyWindow( void );
380 FGAPI void    FGAPIENTRY glutPushWindow( void );
381 FGAPI void    FGAPIENTRY glutPopWindow( void );
382 FGAPI void    FGAPIENTRY glutFullScreen( void );
383
384 /*
385  * Display-connected functions, see freeglut_display.c
386  */
387 FGAPI void    FGAPIENTRY glutPostWindowRedisplay( int window );
388 FGAPI void    FGAPIENTRY glutPostRedisplay( void );
389 FGAPI void    FGAPIENTRY glutSwapBuffers( void );
390
391 /*
392  * Mouse cursor functions, see freeglut_cursor.c
393  */
394 FGAPI void    FGAPIENTRY glutWarpPointer( int x, int y );
395 FGAPI void    FGAPIENTRY glutSetCursor( int cursor );
396
397 /*
398  * Overlay stuff, see freeglut_overlay.c
399  */
400 FGAPI void    FGAPIENTRY glutEstablishOverlay( void );
401 FGAPI void    FGAPIENTRY glutRemoveOverlay( void );
402 FGAPI void    FGAPIENTRY glutUseLayer( GLenum layer );
403 FGAPI void    FGAPIENTRY glutPostOverlayRedisplay( void );
404 FGAPI void    FGAPIENTRY glutPostWindowOverlayRedisplay( int window );
405 FGAPI void    FGAPIENTRY glutShowOverlay( void );
406 FGAPI void    FGAPIENTRY glutHideOverlay( void );
407
408 /*
409  * Menu stuff, see freeglut_menu.c
410  */
411 FGAPI int     FGAPIENTRY glutCreateMenu( void (* callback)( int menu ) );
412 FGAPI void    FGAPIENTRY glutDestroyMenu( int menu );
413 FGAPI int     FGAPIENTRY glutGetMenu( void );
414 FGAPI void    FGAPIENTRY glutSetMenu( int menu );
415 FGAPI void    FGAPIENTRY glutAddMenuEntry( const char* label, int value );
416 FGAPI void    FGAPIENTRY glutAddSubMenu( const char* label, int subMenu );
417 FGAPI void    FGAPIENTRY glutChangeToMenuEntry( int item, const char* label, int value );
418 FGAPI void    FGAPIENTRY glutChangeToSubMenu( int item, const char* label, int value );
419 FGAPI void    FGAPIENTRY glutRemoveMenuItem( int item );
420 FGAPI void    FGAPIENTRY glutAttachMenu( int button );
421 FGAPI void    FGAPIENTRY glutDetachMenu( int button );
422
423 /*
424  * Global callback functions, see freeglut_callbacks.c
425  */
426 FGAPI void    FGAPIENTRY glutTimerFunc( unsigned int time, void (* callback)( int ), int value );
427 FGAPI void    FGAPIENTRY glutIdleFunc( void (* callback)( void ) );
428
429 /*
430  * Window-specific callback functions, see freeglut_callbacks.c
431  */
432 FGAPI void    FGAPIENTRY glutKeyboardFunc( void (* callback)( unsigned char, int, int ) );
433 FGAPI void    FGAPIENTRY glutSpecialFunc( void (* callback)( int, int, int ) );
434 FGAPI void    FGAPIENTRY glutReshapeFunc( void (* callback)( int, int ) );
435 FGAPI void    FGAPIENTRY glutVisibilityFunc( void (* callback)( int ) );
436 FGAPI void    FGAPIENTRY glutDisplayFunc( void (* callback)( void ) );
437 FGAPI void    FGAPIENTRY glutMouseFunc( void (* callback)( int, int, int, int ) );
438 FGAPI void    FGAPIENTRY glutMotionFunc( void (* callback)( int, int ) );
439 FGAPI void    FGAPIENTRY glutPassiveMotionFunc( void (* callback)( int, int ) );
440 FGAPI void    FGAPIENTRY glutEntryFunc( void (* callback)( int ) );
441 FGAPI void    FGAPIENTRY glutCloseFunc( void (* callback)( void ) );
442 FGAPI void    FGAPIENTRY glutWMCloseFunc( void (* callback)( void ) );
443
444 FGAPI void    FGAPIENTRY glutKeyboardUpFunc( void (* callback)( unsigned char, int, int ) );
445 FGAPI void    FGAPIENTRY glutSpecialUpFunc( void (* callback)( int, int, int ) );
446 FGAPI void    FGAPIENTRY glutJoystickFunc( void (* callback)( unsigned int, int, int, int ), int pollInterval );
447 FGAPI void    FGAPIENTRY glutMenuStateFunc( void (* callback)( int ) );
448 FGAPI void    FGAPIENTRY glutMenuStatusFunc( void (* callback)( int, int, int ) );
449 FGAPI void    FGAPIENTRY glutOverlayDisplayFunc( void (* callback)( void ) );
450 FGAPI void    FGAPIENTRY glutWindowStatusFunc( void (* callback)( int ) );
451
452 FGAPI void    FGAPIENTRY glutSpaceballMotionFunc( void (* callback)( int, int, int ) );
453 FGAPI void    FGAPIENTRY glutSpaceballRotateFunc( void (* callback)( int, int, int ) );
454 FGAPI void    FGAPIENTRY glutSpaceballButtonFunc( void (* callback)( int, int ) );
455 FGAPI void    FGAPIENTRY glutButtonBoxFunc( void (* callback)( int, int ) );
456 FGAPI void    FGAPIENTRY glutDialsFunc( void (* callback)( int, int ) );
457 FGAPI void    FGAPIENTRY glutTabletMotionFunc( void (* callback)( int, int ) );
458 FGAPI void    FGAPIENTRY glutTabletButtonFunc( void (* callback)( int, int, int, int ) );
459
460 /*
461  * State setting and retrieval functions, see freeglut_state.c
462  */
463 FGAPI void    FGAPIENTRY glutSetOption ( GLenum option_flag, int value ) ;
464
465 FGAPI int     FGAPIENTRY glutGet( GLenum query );
466 FGAPI int     FGAPIENTRY glutDeviceGet( GLenum query );
467 FGAPI int     FGAPIENTRY glutGetModifiers( void );
468 FGAPI int     FGAPIENTRY glutLayerGet( GLenum query );
469
470 /*
471  * Font stuff, see freeglut_font.c
472  */
473 FGAPI void    FGAPIENTRY glutBitmapCharacter( void* font, int character );
474 FGAPI int     FGAPIENTRY glutBitmapWidth( void* font, int character );
475 FGAPI void    FGAPIENTRY glutStrokeCharacter( void* font, int character );
476 FGAPI int     FGAPIENTRY glutStrokeWidth( void* font, int character );
477 FGAPI int     FGAPIENTRY glutBitmapLength( void* font, const char* string );
478 FGAPI int     FGAPIENTRY glutStrokeLength( void* font, const char* string );
479 FGAPI int     FGAPIENTRY glutBitmapHeight( void* font );
480 FGAPI GLfloat FGAPIENTRY glutStrokeHeight( void* font );
481 FGAPI void    FGAPIENTRY glutBitmapString( void* font, const char *string );
482 FGAPI void    FGAPIENTRY glutStrokeString( void* font, const char *string );
483
484 /*
485  * Geometry functions, see freeglut_geometry.c
486  */
487 FGAPI void    FGAPIENTRY glutWireCube( GLdouble size );
488 FGAPI void    FGAPIENTRY glutSolidCube( GLdouble size );
489 FGAPI void    FGAPIENTRY glutWireSphere( GLdouble radius, GLint slices, GLint stacks );
490 FGAPI void    FGAPIENTRY glutSolidSphere( GLdouble radius, GLint slices, GLint stacks );
491 FGAPI void    FGAPIENTRY glutWireCone( GLdouble base, GLdouble height, GLint slices, GLint stacks );
492 FGAPI void    FGAPIENTRY glutSolidCone( GLdouble base, GLdouble height, GLint slices, GLint stacks );
493
494 FGAPI void    FGAPIENTRY glutWireTorus( GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings );
495 FGAPI void    FGAPIENTRY glutSolidTorus( GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings );
496 FGAPI void    FGAPIENTRY glutWireDodecahedron( void );
497 FGAPI void    FGAPIENTRY glutSolidDodecahedron( void );
498 FGAPI void    FGAPIENTRY glutWireOctahedron( void );
499 FGAPI void    FGAPIENTRY glutSolidOctahedron( void );
500 FGAPI void    FGAPIENTRY glutWireTetrahedron( void );
501 FGAPI void    FGAPIENTRY glutSolidTetrahedron( void );
502 FGAPI void    FGAPIENTRY glutWireIcosahedron( void );
503 FGAPI void    FGAPIENTRY glutSolidIcosahedron( void );
504 FGAPI void    FGAPIENTRY glutWireRhombicDodecahedron( void );
505 FGAPI void    FGAPIENTRY glutSolidRhombicDodecahedron( void );
506 FGAPI void    FGAPIENTRY glutWireSierpinskiSponge ( int num_levels, GLfloat offset[3], GLfloat scale ) ;
507 FGAPI void    FGAPIENTRY glutSolidSierpinskiSponge ( int num_levels, GLfloat offset[3], GLfloat scale ) ;
508
509 /*
510  * Teapot rendering functions, found in freeglut_teapot.c
511  */
512 FGAPI void    FGAPIENTRY glutWireTeapot( GLdouble size );
513 FGAPI void    FGAPIENTRY glutSolidTeapot( GLdouble size );
514
515 /*
516  * Game mode functions, see freeglut_gamemode.c
517  */
518 FGAPI void    FGAPIENTRY glutGameModeString( const char* string );
519 FGAPI int     FGAPIENTRY glutEnterGameMode( void );
520 FGAPI void    FGAPIENTRY glutLeaveGameMode( void );
521 FGAPI int     FGAPIENTRY glutGameModeGet( GLenum query );
522
523 /*
524  * Video resize functions, see freeglut_videoresize.c
525  */
526 FGAPI int     FGAPIENTRY glutVideoResizeGet( GLenum query );
527 FGAPI void    FGAPIENTRY glutSetupVideoResizing( void );
528 FGAPI void    FGAPIENTRY glutStopVideoResizing( void );
529 FGAPI void    FGAPIENTRY glutVideoResize( int x, int y, int width, int height );
530 FGAPI void    FGAPIENTRY glutVideoPan( int x, int y, int width, int height );
531
532 /*
533  * Colormap functions, see freeglut_misc.c
534  */
535 FGAPI void    FGAPIENTRY glutSetColor( int color, GLfloat red, GLfloat green, GLfloat blue );
536 FGAPI GLfloat FGAPIENTRY glutGetColor( int color, int component );
537 FGAPI void    FGAPIENTRY glutCopyColormap( int window );
538
539 /*
540  * Misc keyboard and joystick functions, see freeglut_misc.c
541  */
542 FGAPI void    FGAPIENTRY glutIgnoreKeyRepeat( int ignore );
543 FGAPI void    FGAPIENTRY glutSetKeyRepeat( int repeatMode );  /* DEPRECATED 11/4/02 - Do not use */
544 FGAPI void    FGAPIENTRY glutForceJoystickFunc( void );
545
546 /*
547  * Misc functions, see freeglut_misc.c
548  */
549 FGAPI int     FGAPIENTRY glutExtensionSupported( const char* extension );
550 FGAPI void    FGAPIENTRY glutReportErrors( void );
551
552 #ifdef __cplusplus
553     }
554 #endif
555
556 #endif /* FREEGLUT_H */
557
558 /*** END OF FILE ***/