source: GTP/trunk/App/Demos/Vis/FriendlyCulling/libs/GL/glut.h @ 2642

Revision 2642, 27.2 KB checked in by mattausch, 17 years ago (diff)

new demo

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