source: GTP/trunk/Lib/Illum/GPUObscurancesGT/Libraries/glut-3.7.6-bin/glut.h @ 1648

Revision 1648, 27.1 KB checked in by igarcia, 18 years ago (diff)
Line 
1#ifndef __glut_h__
2#define __glut_h__
3
4/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
5
6/* This program is freely distributable without licensing fees  and is
7   provided without guarantee or warrantee expressed or  implied. This
8   program is -not- in the public domain. */
9
10#if defined(_WIN32)
11
12/* GLUT 3.7 now tries to avoid including <windows.h>
13   to avoid name space pollution, but Win32's <GL/gl.h>
14   needs APIENTRY and WINGDIAPI defined properly. */
15# if 0
16   /* This would put tons of macros and crap in our clean name space. */
17#  define  WIN32_LEAN_AND_MEAN
18#  include <windows.h>
19# else
20   /* XXX This is from Win32's <windef.h> */
21#  ifndef APIENTRY
22#   define GLUT_APIENTRY_DEFINED
23#   if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__)
24#    define APIENTRY    __stdcall
25#   else
26#    define APIENTRY
27#   endif
28#  endif
29   /* XXX This is from Win32's <winnt.h> */
30#  ifndef CALLBACK
31#   if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS) || defined(__LCC__)
32#    define CALLBACK __stdcall
33#   else
34#    define CALLBACK
35#   endif
36#  endif
37   /* XXX Hack for lcc compiler.  It doesn't support __declspec(dllimport), just __stdcall. */
38#  if defined( __LCC__ )
39#   undef WINGDIAPI
40#   define WINGDIAPI __stdcall
41#  else
42   /* XXX This is from Win32's <wingdi.h> and <winnt.h> */
43#   ifndef WINGDIAPI
44#    define GLUT_WINGDIAPI_DEFINED
45#    define WINGDIAPI __declspec(dllimport)
46#   endif
47#  endif
48   /* XXX This is from Win32's <ctype.h> */
49#  ifndef _WCHAR_T_DEFINED
50typedef unsigned short wchar_t;
51#   define _WCHAR_T_DEFINED
52#  endif
53# endif
54
55/* To disable automatic library usage for GLUT, define GLUT_NO_LIB_PRAGMA
56   in your compile preprocessor options. */
57# if !defined(GLUT_BUILDING_LIB) && !defined(GLUT_NO_LIB_PRAGMA)
58#  pragma comment (lib, "winmm.lib")      /* link with Windows MultiMedia lib */
59/* To enable automatic SGI OpenGL for Windows library usage for GLUT,
60   define GLUT_USE_SGI_OPENGL in your compile preprocessor options.  */
61#  ifdef GLUT_USE_SGI_OPENGL
62#   pragma comment (lib, "opengl.lib")    /* link with SGI OpenGL for Windows lib */
63#   pragma comment (lib, "glu.lib")       /* link with SGI OpenGL Utility lib */
64#   pragma comment (lib, "glut.lib")      /* link with Win32 GLUT for SGI OpenGL lib */
65#  else
66#   pragma comment (lib, "opengl32.lib")  /* link with Microsoft OpenGL lib */
67#   pragma comment (lib, "glu32.lib")     /* link with Microsoft OpenGL Utility lib */
68#   pragma comment (lib, "glut32.lib")    /* link with Win32 GLUT lib */
69#  endif
70# endif
71
72/* To disable supression of annoying warnings about floats being promoted
73   to doubles, define GLUT_NO_WARNING_DISABLE in your compile preprocessor
74   options. */
75# ifndef GLUT_NO_WARNING_DISABLE
76#  pragma warning (disable:4244)  /* Disable bogus VC++ 4.2 conversion warnings. */
77#  pragma warning (disable:4305)  /* VC++ 5.0 version of above warning. */
78# endif
79
80/* Win32 has an annoying issue where there are multiple C run-time
81   libraries (CRTs).  If the executable is linked with a different CRT
82   from the GLUT DLL, the GLUT DLL will not share the same CRT static
83   data seen by the executable.  In particular, atexit callbacks registered
84   in the executable will not be called if GLUT calls its (different)
85   exit routine).  GLUT is typically built with the
86   "/MD" option (the CRT with multithreading DLL support), but the Visual
87   C++ linker default is "/ML" (the single threaded CRT).
88
89   One workaround to this issue is requiring users to always link with
90   the same CRT as GLUT is compiled with.  That requires users supply a
91   non-standard option.  GLUT 3.7 has its own built-in workaround where
92   the executable's "exit" function pointer is covertly passed to GLUT.
93   GLUT then calls the executable's exit function pointer to ensure that
94   any "atexit" calls registered by the application are called if GLUT
95   needs to exit.
96
97   Note that the __glut*WithExit routines should NEVER be called directly.
98   To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */
99
100/* XXX This is from Win32's <process.h> */
101# if !defined(_MSC_VER) && !defined(__cdecl)
102   /* Define __cdecl for non-Microsoft compilers. */
103#  define __cdecl
104#  define GLUT_DEFINED___CDECL
105# endif
106# ifndef _CRTIMP
107#  ifdef _NTSDK
108    /* Definition compatible with NT SDK */
109#   define _CRTIMP
110#  else
111    /* Current definition */
112#   ifdef _DLL
113#    define _CRTIMP __declspec(dllimport)
114#   else
115#    define _CRTIMP
116#   endif
117#  endif
118#  define GLUT_DEFINED__CRTIMP
119# endif
120
121/* GLUT API entry point declarations for Win32. */
122# ifdef GLUT_BUILDING_LIB
123#  define GLUTAPI __declspec(dllexport)
124# else
125#  ifdef _DLL
126#   define GLUTAPI __declspec(dllimport)
127#  else
128#   define GLUTAPI extern
129#  endif
130# endif
131
132/* GLUT callback calling convention for Win32. */
133# define GLUTCALLBACK __cdecl
134
135#endif  /* _WIN32 */
136
137#include <GL/gl.h>
138#include <GL/glu.h>
139
140#ifdef __cplusplus
141extern "C" {
142#endif
143
144#if defined(_WIN32)
145# ifndef GLUT_BUILDING_LIB
146//extern _CRTIMP void __cdecl exit(int);
147_CRTIMP __declspec(noreturn) void   __cdecl exit(int);
148# endif
149#else
150/* non-Win32 case. */
151/* Define APIENTRY and CALLBACK to nothing if we aren't on Win32. */
152# define APIENTRY
153# define GLUT_APIENTRY_DEFINED
154# define CALLBACK
155/* Define GLUTAPI and GLUTCALLBACK as below if we aren't on Win32. */
156# define GLUTAPI extern
157# define GLUTCALLBACK
158/* Prototype exit for the non-Win32 case (see above). */
159extern void exit(int);
160#endif
161
162/**
163 GLUT API revision history:
164 
165 GLUT_API_VERSION is updated to reflect incompatible GLUT
166 API changes (interface changes, semantic changes, deletions,
167 or additions).
168 
169 GLUT_API_VERSION=1  First public release of GLUT.  11/29/94
170
171 GLUT_API_VERSION=2  Added support for OpenGL/GLX multisampling,
172 extension.  Supports new input devices like tablet, dial and button
173 box, and Spaceball.  Easy to query OpenGL extensions.
174
175 GLUT_API_VERSION=3  glutMenuStatus added.
176
177 GLUT_API_VERSION=4  glutInitDisplayString, glutWarpPointer,
178 glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic
179 video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc,
180 glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat,
181 glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!).
182**/
183#ifndef GLUT_API_VERSION  /* allow this to be overriden */
184#define GLUT_API_VERSION                3
185#endif
186
187/**
188 GLUT implementation revision history:
189 
190 GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT
191 API revisions and implementation revisions (ie, bug fixes).
192
193 GLUT_XLIB_IMPLEMENTATION=1  mjk's first public release of
194 GLUT Xlib-based implementation.  11/29/94
195
196 GLUT_XLIB_IMPLEMENTATION=2  mjk's second public release of
197 GLUT Xlib-based implementation providing GLUT version 2
198 interfaces.
199
200 GLUT_XLIB_IMPLEMENTATION=3  mjk's GLUT 2.2 images. 4/17/95
201
202 GLUT_XLIB_IMPLEMENTATION=4  mjk's GLUT 2.3 images. 6/?/95
203
204 GLUT_XLIB_IMPLEMENTATION=5  mjk's GLUT 3.0 images. 10/?/95
205
206 GLUT_XLIB_IMPLEMENTATION=7  mjk's GLUT 3.1+ with glutWarpPoitner.  7/24/96
207
208 GLUT_XLIB_IMPLEMENTATION=8  mjk's GLUT 3.1+ with glutWarpPoitner
209 and video resize.  1/3/97
210
211 GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routines.
212
213 GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release.
214
215 GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routines + signal handling.
216
217 GLUT_XLIB_IMPLEMENTATION=13 mjk's GLUT 3.7 beta with GameGLUT support.
218
219 GLUT_XLIB_IMPLEMENTATION=14 mjk's GLUT 3.7 beta with f90gl friend interface.
220
221 GLUT_XLIB_IMPLEMENTATION=15 mjk's GLUT 3.7 beta sync'ed with Mesa <GL/glut.h>
222**/
223#ifndef GLUT_XLIB_IMPLEMENTATION  /* Allow this to be overriden. */
224#define GLUT_XLIB_IMPLEMENTATION        15
225#endif
226
227/* Display mode bit masks. */
228#define GLUT_RGB                        0
229#define GLUT_RGBA                       GLUT_RGB
230#define GLUT_INDEX                      1
231#define GLUT_SINGLE                     0
232#define GLUT_DOUBLE                     2
233#define GLUT_ACCUM                      4
234#define GLUT_ALPHA                      8
235#define GLUT_DEPTH                      16
236#define GLUT_STENCIL                    32
237#if (GLUT_API_VERSION >= 2)
238#define GLUT_MULTISAMPLE                128
239#define GLUT_STEREO                     256
240#endif
241#if (GLUT_API_VERSION >= 3)
242#define GLUT_LUMINANCE                  512
243#endif
244
245/* Mouse buttons. */
246#define GLUT_LEFT_BUTTON                0
247#define GLUT_MIDDLE_BUTTON              1
248#define GLUT_RIGHT_BUTTON               2
249
250/* Mouse button  state. */
251#define GLUT_DOWN                       0
252#define GLUT_UP                         1
253
254#if (GLUT_API_VERSION >= 2)
255/* function keys */
256#define GLUT_KEY_F1                     1
257#define GLUT_KEY_F2                     2
258#define GLUT_KEY_F3                     3
259#define GLUT_KEY_F4                     4
260#define GLUT_KEY_F5                     5
261#define GLUT_KEY_F6                     6
262#define GLUT_KEY_F7                     7
263#define GLUT_KEY_F8                     8
264#define GLUT_KEY_F9                     9
265#define GLUT_KEY_F10                    10
266#define GLUT_KEY_F11                    11
267#define GLUT_KEY_F12                    12
268/* directional keys */
269#define GLUT_KEY_LEFT                   100
270#define GLUT_KEY_UP                     101
271#define GLUT_KEY_RIGHT                  102
272#define GLUT_KEY_DOWN                   103
273#define GLUT_KEY_PAGE_UP                104
274#define GLUT_KEY_PAGE_DOWN              105
275#define GLUT_KEY_HOME                   106
276#define GLUT_KEY_END                    107
277#define GLUT_KEY_INSERT                 108
278#endif
279
280/* Entry/exit  state. */
281#define GLUT_LEFT                       0
282#define GLUT_ENTERED                    1
283
284/* Menu usage  state. */
285#define GLUT_MENU_NOT_IN_USE            0
286#define GLUT_MENU_IN_USE                1
287
288/* Visibility  state. */
289#define GLUT_NOT_VISIBLE                0
290#define GLUT_VISIBLE                    1
291
292/* Window status  state. */
293#define GLUT_HIDDEN                     0
294#define GLUT_FULLY_RETAINED             1
295#define GLUT_PARTIALLY_RETAINED         2
296#define GLUT_FULLY_COVERED              3
297
298/* Color index component selection values. */
299#define GLUT_RED                        0
300#define GLUT_GREEN                      1
301#define GLUT_BLUE                       2
302
303#if defined(_WIN32)
304/* Stroke font constants (use these in GLUT program). */
305#define GLUT_STROKE_ROMAN               ((void*)0)
306#define GLUT_STROKE_MONO_ROMAN          ((void*)1)
307
308/* Bitmap font constants (use these in GLUT program). */
309#define GLUT_BITMAP_9_BY_15             ((void*)2)
310#define GLUT_BITMAP_8_BY_13             ((void*)3)
311#define GLUT_BITMAP_TIMES_ROMAN_10      ((void*)4)
312#define GLUT_BITMAP_TIMES_ROMAN_24      ((void*)5)
313#if (GLUT_API_VERSION >= 3)
314#define GLUT_BITMAP_HELVETICA_10        ((void*)6)
315#define GLUT_BITMAP_HELVETICA_12        ((void*)7)
316#define GLUT_BITMAP_HELVETICA_18        ((void*)8)
317#endif
318#else
319/* Stroke font opaque addresses (use constants instead in source code). */
320GLUTAPI void *glutStrokeRoman;
321GLUTAPI void *glutStrokeMonoRoman;
322
323/* Stroke font constants (use these in GLUT program). */
324#define GLUT_STROKE_ROMAN               (&glutStrokeRoman)
325#define GLUT_STROKE_MONO_ROMAN          (&glutStrokeMonoRoman)
326
327/* Bitmap font opaque addresses (use constants instead in source code). */
328GLUTAPI void *glutBitmap9By15;
329GLUTAPI void *glutBitmap8By13;
330GLUTAPI void *glutBitmapTimesRoman10;
331GLUTAPI void *glutBitmapTimesRoman24;
332GLUTAPI void *glutBitmapHelvetica10;
333GLUTAPI void *glutBitmapHelvetica12;
334GLUTAPI void *glutBitmapHelvetica18;
335
336/* Bitmap font constants (use these in GLUT program). */
337#define GLUT_BITMAP_9_BY_15             (&glutBitmap9By15)
338#define GLUT_BITMAP_8_BY_13             (&glutBitmap8By13)
339#define GLUT_BITMAP_TIMES_ROMAN_10      (&glutBitmapTimesRoman10)
340#define GLUT_BITMAP_TIMES_ROMAN_24      (&glutBitmapTimesRoman24)
341#if (GLUT_API_VERSION >= 3)
342#define GLUT_BITMAP_HELVETICA_10        (&glutBitmapHelvetica10)
343#define GLUT_BITMAP_HELVETICA_12        (&glutBitmapHelvetica12)
344#define GLUT_BITMAP_HELVETICA_18        (&glutBitmapHelvetica18)
345#endif
346#endif
347
348/* glutGet parameters. */
349#define GLUT_WINDOW_X                   ((GLenum) 100)
350#define GLUT_WINDOW_Y                   ((GLenum) 101)
351#define GLUT_WINDOW_WIDTH               ((GLenum) 102)
352#define GLUT_WINDOW_HEIGHT              ((GLenum) 103)
353#define GLUT_WINDOW_BUFFER_SIZE         ((GLenum) 104)
354#define GLUT_WINDOW_STENCIL_SIZE        ((GLenum) 105)
355#define GLUT_WINDOW_DEPTH_SIZE          ((GLenum) 106)
356#define GLUT_WINDOW_RED_SIZE            ((GLenum) 107)
357#define GLUT_WINDOW_GREEN_SIZE          ((GLenum) 108)
358#define GLUT_WINDOW_BLUE_SIZE           ((GLenum) 109)
359#define GLUT_WINDOW_ALPHA_SIZE          ((GLenum) 110)
360#define GLUT_WINDOW_ACCUM_RED_SIZE      ((GLenum) 111)
361#define GLUT_WINDOW_ACCUM_GREEN_SIZE    ((GLenum) 112)
362#define GLUT_WINDOW_ACCUM_BLUE_SIZE     ((GLenum) 113)
363#define GLUT_WINDOW_ACCUM_ALPHA_SIZE    ((GLenum) 114)
364#define GLUT_WINDOW_DOUBLEBUFFER        ((GLenum) 115)
365#define GLUT_WINDOW_RGBA                ((GLenum) 116)
366#define GLUT_WINDOW_PARENT              ((GLenum) 117)
367#define GLUT_WINDOW_NUM_CHILDREN        ((GLenum) 118)
368#define GLUT_WINDOW_COLORMAP_SIZE       ((GLenum) 119)
369#if (GLUT_API_VERSION >= 2)
370#define GLUT_WINDOW_NUM_SAMPLES         ((GLenum) 120)
371#define GLUT_WINDOW_STEREO              ((GLenum) 121)
372#endif
373#if (GLUT_API_VERSION >= 3)
374#define GLUT_WINDOW_CURSOR              ((GLenum) 122)
375#endif
376#define GLUT_SCREEN_WIDTH               ((GLenum) 200)
377#define GLUT_SCREEN_HEIGHT              ((GLenum) 201)
378#define GLUT_SCREEN_WIDTH_MM            ((GLenum) 202)
379#define GLUT_SCREEN_HEIGHT_MM           ((GLenum) 203)
380#define GLUT_MENU_NUM_ITEMS             ((GLenum) 300)
381#define GLUT_DISPLAY_MODE_POSSIBLE      ((GLenum) 400)
382#define GLUT_INIT_WINDOW_X              ((GLenum) 500)
383#define GLUT_INIT_WINDOW_Y              ((GLenum) 501)
384#define GLUT_INIT_WINDOW_WIDTH          ((GLenum) 502)
385#define GLUT_INIT_WINDOW_HEIGHT         ((GLenum) 503)
386#define GLUT_INIT_DISPLAY_MODE          ((GLenum) 504)
387#if (GLUT_API_VERSION >= 2)
388#define GLUT_ELAPSED_TIME               ((GLenum) 700)
389#endif
390#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
391#define GLUT_WINDOW_FORMAT_ID           ((GLenum) 123)
392#endif
393
394#if (GLUT_API_VERSION >= 2)
395/* glutDeviceGet parameters. */
396#define GLUT_HAS_KEYBOARD               ((GLenum) 600)
397#define GLUT_HAS_MOUSE                  ((GLenum) 601)
398#define GLUT_HAS_SPACEBALL              ((GLenum) 602)
399#define GLUT_HAS_DIAL_AND_BUTTON_BOX    ((GLenum) 603)
400#define GLUT_HAS_TABLET                 ((GLenum) 604)
401#define GLUT_NUM_MOUSE_BUTTONS          ((GLenum) 605)
402#define GLUT_NUM_SPACEBALL_BUTTONS      ((GLenum) 606)
403#define GLUT_NUM_BUTTON_BOX_BUTTONS     ((GLenum) 607)
404#define GLUT_NUM_DIALS                  ((GLenum) 608)
405#define GLUT_NUM_TABLET_BUTTONS         ((GLenum) 609)
406#endif
407#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
408#define GLUT_DEVICE_IGNORE_KEY_REPEAT   ((GLenum) 610)
409#define GLUT_DEVICE_KEY_REPEAT          ((GLenum) 611)
410#define GLUT_HAS_JOYSTICK               ((GLenum) 612)
411#define GLUT_OWNS_JOYSTICK              ((GLenum) 613)
412#define GLUT_JOYSTICK_BUTTONS           ((GLenum) 614)
413#define GLUT_JOYSTICK_AXES              ((GLenum) 615)
414#define GLUT_JOYSTICK_POLL_RATE         ((GLenum) 616)
415#endif
416
417#if (GLUT_API_VERSION >= 3)
418/* glutLayerGet parameters. */
419#define GLUT_OVERLAY_POSSIBLE           ((GLenum) 800)
420#define GLUT_LAYER_IN_USE               ((GLenum) 801)
421#define GLUT_HAS_OVERLAY                ((GLenum) 802)
422#define GLUT_TRANSPARENT_INDEX          ((GLenum) 803)
423#define GLUT_NORMAL_DAMAGED             ((GLenum) 804)
424#define GLUT_OVERLAY_DAMAGED            ((GLenum) 805)
425
426#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
427/* glutVideoResizeGet parameters. */
428#define GLUT_VIDEO_RESIZE_POSSIBLE      ((GLenum) 900)
429#define GLUT_VIDEO_RESIZE_IN_USE        ((GLenum) 901)
430#define GLUT_VIDEO_RESIZE_X_DELTA       ((GLenum) 902)
431#define GLUT_VIDEO_RESIZE_Y_DELTA       ((GLenum) 903)
432#define GLUT_VIDEO_RESIZE_WIDTH_DELTA   ((GLenum) 904)
433#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA  ((GLenum) 905)
434#define GLUT_VIDEO_RESIZE_X             ((GLenum) 906)
435#define GLUT_VIDEO_RESIZE_Y             ((GLenum) 907)
436#define GLUT_VIDEO_RESIZE_WIDTH         ((GLenum) 908)
437#define GLUT_VIDEO_RESIZE_HEIGHT        ((GLenum) 909)
438#endif
439
440/* glutUseLayer parameters. */
441#define GLUT_NORMAL                     ((GLenum) 0)
442#define GLUT_OVERLAY                    ((GLenum) 1)
443
444/* glutGetModifiers return mask. */
445#define GLUT_ACTIVE_SHIFT               1
446#define GLUT_ACTIVE_CTRL                2
447#define GLUT_ACTIVE_ALT                 4
448
449/* glutSetCursor parameters. */
450/* Basic arrows. */
451#define GLUT_CURSOR_RIGHT_ARROW         0
452#define GLUT_CURSOR_LEFT_ARROW          1
453/* Symbolic cursor shapes. */
454#define GLUT_CURSOR_INFO                2
455#define GLUT_CURSOR_DESTROY             3
456#define GLUT_CURSOR_HELP                4
457#define GLUT_CURSOR_CYCLE               5
458#define GLUT_CURSOR_SPRAY               6
459#define GLUT_CURSOR_WAIT                7
460#define GLUT_CURSOR_TEXT                8
461#define GLUT_CURSOR_CROSSHAIR           9
462/* Directional cursors. */
463#define GLUT_CURSOR_UP_DOWN             10
464#define GLUT_CURSOR_LEFT_RIGHT          11
465/* Sizing cursors. */
466#define GLUT_CURSOR_TOP_SIDE            12
467#define GLUT_CURSOR_BOTTOM_SIDE         13
468#define GLUT_CURSOR_LEFT_SIDE           14
469#define GLUT_CURSOR_RIGHT_SIDE          15
470#define GLUT_CURSOR_TOP_LEFT_CORNER     16
471#define GLUT_CURSOR_TOP_RIGHT_CORNER    17
472#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18
473#define GLUT_CURSOR_BOTTOM_LEFT_CORNER  19
474/* Inherit from parent window. */
475#define GLUT_CURSOR_INHERIT             100
476/* Blank cursor. */
477#define GLUT_CURSOR_NONE                101
478/* Fullscreen crosshair (if available). */
479#define GLUT_CURSOR_FULL_CROSSHAIR      102
480#endif
481
482/* GLUT initialization sub-API. */
483GLUTAPI void APIENTRY glutInit(int *argcp, char **argv);
484#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
485GLUTAPI void APIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int));
486#ifndef GLUT_BUILDING_LIB
487static void APIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); }
488#define glutInit glutInit_ATEXIT_HACK
489#endif
490#endif
491GLUTAPI void APIENTRY glutInitDisplayMode(unsigned int mode);
492#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
493GLUTAPI void APIENTRY glutInitDisplayString(const char *string);
494#endif
495GLUTAPI void APIENTRY glutInitWindowPosition(int x, int y);
496GLUTAPI void APIENTRY glutInitWindowSize(int width, int height);
497GLUTAPI void APIENTRY glutMainLoop(void);
498
499/* GLUT window sub-API. */
500GLUTAPI int APIENTRY glutCreateWindow(const char *title);
501#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
502GLUTAPI int APIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int));
503#ifndef GLUT_BUILDING_LIB
504static int APIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); }
505#define glutCreateWindow glutCreateWindow_ATEXIT_HACK
506#endif
507#endif
508GLUTAPI int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height);
509GLUTAPI void APIENTRY glutDestroyWindow(int win);
510GLUTAPI void APIENTRY glutPostRedisplay(void);
511#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
512GLUTAPI void APIENTRY glutPostWindowRedisplay(int win);
513#endif
514GLUTAPI void APIENTRY glutSwapBuffers(void);
515GLUTAPI int APIENTRY glutGetWindow(void);
516GLUTAPI void APIENTRY glutSetWindow(int win);
517GLUTAPI void APIENTRY glutSetWindowTitle(const char *title);
518GLUTAPI void APIENTRY glutSetIconTitle(const char *title);
519GLUTAPI void APIENTRY glutPositionWindow(int x, int y);
520GLUTAPI void APIENTRY glutReshapeWindow(int width, int height);
521GLUTAPI void APIENTRY glutPopWindow(void);
522GLUTAPI void APIENTRY glutPushWindow(void);
523GLUTAPI void APIENTRY glutIconifyWindow(void);
524GLUTAPI void APIENTRY glutShowWindow(void);
525GLUTAPI void APIENTRY glutHideWindow(void);
526#if (GLUT_API_VERSION >= 3)
527GLUTAPI void APIENTRY glutFullScreen(void);
528GLUTAPI void APIENTRY glutSetCursor(int cursor);
529#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
530GLUTAPI void APIENTRY glutWarpPointer(int x, int y);
531#endif
532
533/* GLUT overlay sub-API. */
534GLUTAPI void APIENTRY glutEstablishOverlay(void);
535GLUTAPI void APIENTRY glutRemoveOverlay(void);
536GLUTAPI void APIENTRY glutUseLayer(GLenum layer);
537GLUTAPI void APIENTRY glutPostOverlayRedisplay(void);
538#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
539GLUTAPI void APIENTRY glutPostWindowOverlayRedisplay(int win);
540#endif
541GLUTAPI void APIENTRY glutShowOverlay(void);
542GLUTAPI void APIENTRY glutHideOverlay(void);
543#endif
544
545/* GLUT menu sub-API. */
546GLUTAPI int APIENTRY glutCreateMenu(void (GLUTCALLBACK *func)(int));
547#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
548GLUTAPI int APIENTRY __glutCreateMenuWithExit(void (GLUTCALLBACK *func)(int), void (__cdecl *exitfunc)(int));
549#ifndef GLUT_BUILDING_LIB
550static int APIENTRY glutCreateMenu_ATEXIT_HACK(void (GLUTCALLBACK *func)(int)) { return __glutCreateMenuWithExit(func, exit); }
551#define glutCreateMenu glutCreateMenu_ATEXIT_HACK
552#endif
553#endif
554GLUTAPI void APIENTRY glutDestroyMenu(int menu);
555GLUTAPI int APIENTRY glutGetMenu(void);
556GLUTAPI void APIENTRY glutSetMenu(int menu);
557GLUTAPI void APIENTRY glutAddMenuEntry(const char *label, int value);
558GLUTAPI void APIENTRY glutAddSubMenu(const char *label, int submenu);
559GLUTAPI void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value);
560GLUTAPI void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu);
561GLUTAPI void APIENTRY glutRemoveMenuItem(int item);
562GLUTAPI void APIENTRY glutAttachMenu(int button);
563GLUTAPI void APIENTRY glutDetachMenu(int button);
564
565/* GLUT window callback sub-API. */
566GLUTAPI void APIENTRY glutDisplayFunc(void (GLUTCALLBACK *func)(void));
567GLUTAPI void APIENTRY glutReshapeFunc(void (GLUTCALLBACK *func)(int width, int height));
568GLUTAPI void APIENTRY glutKeyboardFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y));
569GLUTAPI void APIENTRY glutMouseFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y));
570GLUTAPI void APIENTRY glutMotionFunc(void (GLUTCALLBACK *func)(int x, int y));
571GLUTAPI void APIENTRY glutPassiveMotionFunc(void (GLUTCALLBACK *func)(int x, int y));
572GLUTAPI void APIENTRY glutEntryFunc(void (GLUTCALLBACK *func)(int state));
573GLUTAPI void APIENTRY glutVisibilityFunc(void (GLUTCALLBACK *func)(int state));
574GLUTAPI void APIENTRY glutIdleFunc(void (GLUTCALLBACK *func)(void));
575GLUTAPI void APIENTRY glutTimerFunc(unsigned int millis, void (GLUTCALLBACK *func)(int value), int value);
576GLUTAPI void APIENTRY glutMenuStateFunc(void (GLUTCALLBACK *func)(int state));
577#if (GLUT_API_VERSION >= 2)
578GLUTAPI void APIENTRY glutSpecialFunc(void (GLUTCALLBACK *func)(int key, int x, int y));
579GLUTAPI void APIENTRY glutSpaceballMotionFunc(void (GLUTCALLBACK *func)(int x, int y, int z));
580GLUTAPI void APIENTRY glutSpaceballRotateFunc(void (GLUTCALLBACK *func)(int x, int y, int z));
581GLUTAPI void APIENTRY glutSpaceballButtonFunc(void (GLUTCALLBACK *func)(int button, int state));
582GLUTAPI void APIENTRY glutButtonBoxFunc(void (GLUTCALLBACK *func)(int button, int state));
583GLUTAPI void APIENTRY glutDialsFunc(void (GLUTCALLBACK *func)(int dial, int value));
584GLUTAPI void APIENTRY glutTabletMotionFunc(void (GLUTCALLBACK *func)(int x, int y));
585GLUTAPI void APIENTRY glutTabletButtonFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y));
586#if (GLUT_API_VERSION >= 3)
587GLUTAPI void APIENTRY glutMenuStatusFunc(void (GLUTCALLBACK *func)(int status, int x, int y));
588GLUTAPI void APIENTRY glutOverlayDisplayFunc(void (GLUTCALLBACK *func)(void));
589#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
590GLUTAPI void APIENTRY glutWindowStatusFunc(void (GLUTCALLBACK *func)(int state));
591#endif
592#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
593GLUTAPI void APIENTRY glutKeyboardUpFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y));
594GLUTAPI void APIENTRY glutSpecialUpFunc(void (GLUTCALLBACK *func)(int key, int x, int y));
595GLUTAPI void APIENTRY glutJoystickFunc(void (GLUTCALLBACK *func)(unsigned int buttonMask, int x, int y, int z), int pollInterval);
596#endif
597#endif
598#endif
599
600/* GLUT color index sub-API. */
601GLUTAPI void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
602GLUTAPI GLfloat APIENTRY glutGetColor(int ndx, int component);
603GLUTAPI void APIENTRY glutCopyColormap(int win);
604
605/* GLUT state retrieval sub-API. */
606GLUTAPI int APIENTRY glutGet(GLenum type);
607GLUTAPI int APIENTRY glutDeviceGet(GLenum type);
608#if (GLUT_API_VERSION >= 2)
609/* GLUT extension support sub-API */
610GLUTAPI int APIENTRY glutExtensionSupported(const char *name);
611#endif
612#if (GLUT_API_VERSION >= 3)
613GLUTAPI int APIENTRY glutGetModifiers(void);
614GLUTAPI int APIENTRY glutLayerGet(GLenum type);
615#endif
616
617/* GLUT font sub-API */
618GLUTAPI void APIENTRY glutBitmapCharacter(void *font, int character);
619GLUTAPI int APIENTRY glutBitmapWidth(void *font, int character);
620GLUTAPI void APIENTRY glutStrokeCharacter(void *font, int character);
621GLUTAPI int APIENTRY glutStrokeWidth(void *font, int character);
622#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
623GLUTAPI int APIENTRY glutBitmapLength(void *font, const unsigned char *string);
624GLUTAPI int APIENTRY glutStrokeLength(void *font, const unsigned char *string);
625#endif
626
627/* GLUT pre-built models sub-API */
628GLUTAPI void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
629GLUTAPI void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
630GLUTAPI void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
631GLUTAPI void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
632GLUTAPI void APIENTRY glutWireCube(GLdouble size);
633GLUTAPI void APIENTRY glutSolidCube(GLdouble size);
634GLUTAPI void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
635GLUTAPI void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
636GLUTAPI void APIENTRY glutWireDodecahedron(void);
637GLUTAPI void APIENTRY glutSolidDodecahedron(void);
638GLUTAPI void APIENTRY glutWireTeapot(GLdouble size);
639GLUTAPI void APIENTRY glutSolidTeapot(GLdouble size);
640GLUTAPI void APIENTRY glutWireOctahedron(void);
641GLUTAPI void APIENTRY glutSolidOctahedron(void);
642GLUTAPI void APIENTRY glutWireTetrahedron(void);
643GLUTAPI void APIENTRY glutSolidTetrahedron(void);
644GLUTAPI void APIENTRY glutWireIcosahedron(void);
645GLUTAPI void APIENTRY glutSolidIcosahedron(void);
646
647#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
648/* GLUT video resize sub-API. */
649GLUTAPI int APIENTRY glutVideoResizeGet(GLenum param);
650GLUTAPI void APIENTRY glutSetupVideoResizing(void);
651GLUTAPI void APIENTRY glutStopVideoResizing(void);
652GLUTAPI void APIENTRY glutVideoResize(int x, int y, int width, int height);
653GLUTAPI void APIENTRY glutVideoPan(int x, int y, int width, int height);
654
655/* GLUT debugging sub-API. */
656GLUTAPI void APIENTRY glutReportErrors(void);
657#endif
658
659#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
660/* GLUT device control sub-API. */
661/* glutSetKeyRepeat modes. */
662#define GLUT_KEY_REPEAT_OFF             0
663#define GLUT_KEY_REPEAT_ON              1
664#define GLUT_KEY_REPEAT_DEFAULT         2
665
666/* Joystick button masks. */
667#define GLUT_JOYSTICK_BUTTON_A          1
668#define GLUT_JOYSTICK_BUTTON_B          2
669#define GLUT_JOYSTICK_BUTTON_C          4
670#define GLUT_JOYSTICK_BUTTON_D          8
671
672GLUTAPI void APIENTRY glutIgnoreKeyRepeat(int ignore);
673GLUTAPI void APIENTRY glutSetKeyRepeat(int repeatMode);
674GLUTAPI void APIENTRY glutForceJoystickFunc(void);
675
676/* GLUT game mode sub-API. */
677/* glutGameModeGet. */
678#define GLUT_GAME_MODE_ACTIVE           ((GLenum) 0)
679#define GLUT_GAME_MODE_POSSIBLE         ((GLenum) 1)
680#define GLUT_GAME_MODE_WIDTH            ((GLenum) 2)
681#define GLUT_GAME_MODE_HEIGHT           ((GLenum) 3)
682#define GLUT_GAME_MODE_PIXEL_DEPTH      ((GLenum) 4)
683#define GLUT_GAME_MODE_REFRESH_RATE     ((GLenum) 5)
684#define GLUT_GAME_MODE_DISPLAY_CHANGED  ((GLenum) 6)
685
686GLUTAPI void APIENTRY glutGameModeString(const char *string);
687GLUTAPI int APIENTRY glutEnterGameMode(void);
688GLUTAPI void APIENTRY glutLeaveGameMode(void);
689GLUTAPI int APIENTRY glutGameModeGet(GLenum mode);
690#endif
691
692#ifdef __cplusplus
693}
694
695#endif
696
697#ifdef GLUT_APIENTRY_DEFINED
698# undef GLUT_APIENTRY_DEFINED
699# undef APIENTRY
700#endif
701
702#ifdef GLUT_WINGDIAPI_DEFINED
703# undef GLUT_WINGDIAPI_DEFINED
704# undef WINGDIAPI
705#endif
706
707#ifdef GLUT_DEFINED___CDECL
708# undef GLUT_DEFINED___CDECL
709# undef __cdecl
710#endif
711
712#ifdef GLUT_DEFINED__CRTIMP
713# undef GLUT_DEFINED__CRTIMP
714# undef _CRTIMP
715#endif
716
717#endif                  /* __glut_h__ */
Note: See TracBrowser for help on using the repository browser.