aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/libraries/i686-win32/include/GL/glut.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/libraries/i686-win32/include/GL/glut.h')
-rw-r--r--linden/libraries/i686-win32/include/GL/glut.h596
1 files changed, 596 insertions, 0 deletions
diff --git a/linden/libraries/i686-win32/include/GL/glut.h b/linden/libraries/i686-win32/include/GL/glut.h
new file mode 100644
index 0000000..e0692ad
--- /dev/null
+++ b/linden/libraries/i686-win32/include/GL/glut.h
@@ -0,0 +1,596 @@
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# define WIN32_LEAN_AND_MEAN
17# include <windows.h>
18# else
19 /* XXX This is from Win32's <windef.h> */
20# ifndef APIENTRY
21# define GLUT_APIENTRY_DEFINED
22# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
23# define APIENTRY __stdcall
24# else
25# define APIENTRY
26# endif
27# endif
28 /* XXX This is from Win32's <winnt.h> */
29# ifndef CALLBACK
30# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
31# define CALLBACK __stdcall
32# else
33# define CALLBACK
34# endif
35# endif
36 /* XXX This is from Win32's <wingdi.h> and <winnt.h> */
37# ifndef WINGDIAPI
38# define GLUT_WINGDIAPI_DEFINED
39# define WINGDIAPI __declspec(dllimport)
40# endif
41 /* XXX This is from Win32's <ctype.h> */
42# ifndef _WCHAR_T_DEFINED
43typedef unsigned short wchar_t;
44# define _WCHAR_T_DEFINED
45# endif
46# endif
47
48#pragma comment (lib, "winmm.lib") /* link with Windows MultiMedia lib */
49#pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */
50#pragma comment (lib, "glu32.lib") /* link with OpenGL Utility lib */
51#pragma comment (lib, "glut32.lib") /* link with Win32 GLUT lib */
52
53#pragma warning (disable:4244) /* Disable bogus conversion warnings. */
54#pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */
55
56#endif
57
58#include <GL/gl.h>
59#include <GL/glu.h>
60
61/* define APIENTRY and CALLBACK to null string if we aren't on Win32 */
62#if !defined(_WIN32)
63#define APIENTRY
64#define GLUT_APIENTRY_DEFINED
65#define CALLBACK
66#endif
67
68#ifdef __cplusplus
69extern "C" {
70#endif
71
72/**
73 GLUT API revision history:
74
75 GLUT_API_VERSION is updated to reflect incompatible GLUT
76 API changes (interface changes, semantic changes, deletions,
77 or additions).
78
79 GLUT_API_VERSION=1 First public release of GLUT. 11/29/94
80
81 GLUT_API_VERSION=2 Added support for OpenGL/GLX multisampling,
82 extension. Supports new input devices like tablet, dial and button
83 box, and Spaceball. Easy to query OpenGL extensions.
84
85 GLUT_API_VERSION=3 glutMenuStatus added.
86
87 GLUT_API_VERSION=4 glutInitDisplayString, glutWarpPointer,
88 glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic
89 video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc,
90 glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat,
91 glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!).
92**/
93#ifndef GLUT_API_VERSION /* allow this to be overriden */
94#define GLUT_API_VERSION 3
95#endif
96
97/**
98 GLUT implementation revision history:
99
100 GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT
101 API revisions and implementation revisions (ie, bug fixes).
102
103 GLUT_XLIB_IMPLEMENTATION=1 mjk's first public release of
104 GLUT Xlib-based implementation. 11/29/94
105
106 GLUT_XLIB_IMPLEMENTATION=2 mjk's second public release of
107 GLUT Xlib-based implementation providing GLUT version 2
108 interfaces.
109
110 GLUT_XLIB_IMPLEMENTATION=3 mjk's GLUT 2.2 images. 4/17/95
111
112 GLUT_XLIB_IMPLEMENTATION=4 mjk's GLUT 2.3 images. 6/?/95
113
114 GLUT_XLIB_IMPLEMENTATION=5 mjk's GLUT 3.0 images. 10/?/95
115
116 GLUT_XLIB_IMPLEMENTATION=7 mjk's GLUT 3.1+ with glutWarpPoitner. 7/24/96
117
118 GLUT_XLIB_IMPLEMENTATION=8 mjk's GLUT 3.1+ with glutWarpPoitner
119 and video resize. 1/3/97
120
121 GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routines.
122
123 GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release.
124
125 GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routines + signal handling.
126
127 GLUT_XLIB_IMPLEMENTATION=13 mjk's GLUT 3.7 release with GameGLUT support.
128**/
129#ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overriden. */
130#define GLUT_XLIB_IMPLEMENTATION 13
131#endif
132
133/* Display mode bit masks. */
134#define GLUT_RGB 0
135#define GLUT_RGBA GLUT_RGB
136#define GLUT_INDEX 1
137#define GLUT_SINGLE 0
138#define GLUT_DOUBLE 2
139#define GLUT_ACCUM 4
140#define GLUT_ALPHA 8
141#define GLUT_DEPTH 16
142#define GLUT_STENCIL 32
143#if (GLUT_API_VERSION >= 2)
144#define GLUT_MULTISAMPLE 128
145#define GLUT_STEREO 256
146#endif
147#if (GLUT_API_VERSION >= 3)
148#define GLUT_LUMINANCE 512
149#endif
150
151/* Mouse buttons. */
152#define GLUT_LEFT_BUTTON 0
153#define GLUT_MIDDLE_BUTTON 1
154#define GLUT_RIGHT_BUTTON 2
155
156/* Mouse button state. */
157#define GLUT_DOWN 0
158#define GLUT_UP 1
159
160#if (GLUT_API_VERSION >= 2)
161/* function keys */
162#define GLUT_KEY_F1 1
163#define GLUT_KEY_F2 2
164#define GLUT_KEY_F3 3
165#define GLUT_KEY_F4 4
166#define GLUT_KEY_F5 5
167#define GLUT_KEY_F6 6
168#define GLUT_KEY_F7 7
169#define GLUT_KEY_F8 8
170#define GLUT_KEY_F9 9
171#define GLUT_KEY_F10 10
172#define GLUT_KEY_F11 11
173#define GLUT_KEY_F12 12
174/* directional keys */
175#define GLUT_KEY_LEFT 100
176#define GLUT_KEY_UP 101
177#define GLUT_KEY_RIGHT 102
178#define GLUT_KEY_DOWN 103
179#define GLUT_KEY_PAGE_UP 104
180#define GLUT_KEY_PAGE_DOWN 105
181#define GLUT_KEY_HOME 106
182#define GLUT_KEY_END 107
183#define GLUT_KEY_INSERT 108
184#endif
185
186/* Entry/exit state. */
187#define GLUT_LEFT 0
188#define GLUT_ENTERED 1
189
190/* Menu usage state. */
191#define GLUT_MENU_NOT_IN_USE 0
192#define GLUT_MENU_IN_USE 1
193
194/* Visibility state. */
195#define GLUT_NOT_VISIBLE 0
196#define GLUT_VISIBLE 1
197
198/* Window status state. */
199#define GLUT_HIDDEN 0
200#define GLUT_FULLY_RETAINED 1
201#define GLUT_PARTIALLY_RETAINED 2
202#define GLUT_FULLY_COVERED 3
203
204/* Color index component selection values. */
205#define GLUT_RED 0
206#define GLUT_GREEN 1
207#define GLUT_BLUE 2
208
209/* Layers for use. */
210#define GLUT_NORMAL 0
211#define GLUT_OVERLAY 1
212
213#if defined(_WIN32)
214/* Stroke font constants (use these in GLUT program). */
215#define GLUT_STROKE_ROMAN ((void*)0)
216#define GLUT_STROKE_MONO_ROMAN ((void*)1)
217
218/* Bitmap font constants (use these in GLUT program). */
219#define GLUT_BITMAP_9_BY_15 ((void*)2)
220#define GLUT_BITMAP_8_BY_13 ((void*)3)
221#define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4)
222#define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5)
223#if (GLUT_API_VERSION >= 3)
224#define GLUT_BITMAP_HELVETICA_10 ((void*)6)
225#define GLUT_BITMAP_HELVETICA_12 ((void*)7)
226#define GLUT_BITMAP_HELVETICA_18 ((void*)8)
227#endif
228#else
229/* Stroke font opaque addresses (use constants instead in source code). */
230extern void *glutStrokeRoman;
231extern void *glutStrokeMonoRoman;
232
233/* Stroke font constants (use these in GLUT program). */
234#define GLUT_STROKE_ROMAN (&glutStrokeRoman)
235#define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman)
236
237/* Bitmap font opaque addresses (use constants instead in source code). */
238extern void *glutBitmap9By15;
239extern void *glutBitmap8By13;
240extern void *glutBitmapTimesRoman10;
241extern void *glutBitmapTimesRoman24;
242extern void *glutBitmapHelvetica10;
243extern void *glutBitmapHelvetica12;
244extern void *glutBitmapHelvetica18;
245
246/* Bitmap font constants (use these in GLUT program). */
247#define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15)
248#define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13)
249#define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10)
250#define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24)
251#if (GLUT_API_VERSION >= 3)
252#define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10)
253#define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12)
254#define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18)
255#endif
256#endif
257
258/* glutGet parameters. */
259#define GLUT_WINDOW_X 100
260#define GLUT_WINDOW_Y 101
261#define GLUT_WINDOW_WIDTH 102
262#define GLUT_WINDOW_HEIGHT 103
263#define GLUT_WINDOW_BUFFER_SIZE 104
264#define GLUT_WINDOW_STENCIL_SIZE 105
265#define GLUT_WINDOW_DEPTH_SIZE 106
266#define GLUT_WINDOW_RED_SIZE 107
267#define GLUT_WINDOW_GREEN_SIZE 108
268#define GLUT_WINDOW_BLUE_SIZE 109
269#define GLUT_WINDOW_ALPHA_SIZE 110
270#define GLUT_WINDOW_ACCUM_RED_SIZE 111
271#define GLUT_WINDOW_ACCUM_GREEN_SIZE 112
272#define GLUT_WINDOW_ACCUM_BLUE_SIZE 113
273#define GLUT_WINDOW_ACCUM_ALPHA_SIZE 114
274#define GLUT_WINDOW_DOUBLEBUFFER 115
275#define GLUT_WINDOW_RGBA 116
276#define GLUT_WINDOW_PARENT 117
277#define GLUT_WINDOW_NUM_CHILDREN 118
278#define GLUT_WINDOW_COLORMAP_SIZE 119
279#if (GLUT_API_VERSION >= 2)
280#define GLUT_WINDOW_NUM_SAMPLES 120
281#define GLUT_WINDOW_STEREO 121
282#endif
283#if (GLUT_API_VERSION >= 3)
284#define GLUT_WINDOW_CURSOR 122
285#endif
286#define GLUT_SCREEN_WIDTH 200
287#define GLUT_SCREEN_HEIGHT 201
288#define GLUT_SCREEN_WIDTH_MM 202
289#define GLUT_SCREEN_HEIGHT_MM 203
290#define GLUT_MENU_NUM_ITEMS 300
291#define GLUT_DISPLAY_MODE_POSSIBLE 400
292#define GLUT_INIT_WINDOW_X 500
293#define GLUT_INIT_WINDOW_Y 501
294#define GLUT_INIT_WINDOW_WIDTH 502
295#define GLUT_INIT_WINDOW_HEIGHT 503
296#define GLUT_INIT_DISPLAY_MODE 504
297#if (GLUT_API_VERSION >= 2)
298#define GLUT_ELAPSED_TIME 700
299#endif
300#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
301#define GLUT_WINDOW_FORMAT_ID 123
302#endif
303
304#if (GLUT_API_VERSION >= 2)
305/* glutDeviceGet parameters. */
306#define GLUT_HAS_KEYBOARD 600
307#define GLUT_HAS_MOUSE 601
308#define GLUT_HAS_SPACEBALL 602
309#define GLUT_HAS_DIAL_AND_BUTTON_BOX 603
310#define GLUT_HAS_TABLET 604
311#define GLUT_NUM_MOUSE_BUTTONS 605
312#define GLUT_NUM_SPACEBALL_BUTTONS 606
313#define GLUT_NUM_BUTTON_BOX_BUTTONS 607
314#define GLUT_NUM_DIALS 608
315#define GLUT_NUM_TABLET_BUTTONS 609
316#endif
317#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
318#define GLUT_DEVICE_IGNORE_KEY_REPEAT 610
319#define GLUT_DEVICE_KEY_REPEAT 611
320#define GLUT_HAS_JOYSTICK 612
321#define GLUT_OWNS_JOYSTICK 613
322#define GLUT_JOYSTICK_BUTTONS 614
323#define GLUT_JOYSTICK_AXES 615
324#define GLUT_JOYSTICK_POLL_RATE 616
325#endif
326
327#if (GLUT_API_VERSION >= 3)
328/* glutLayerGet parameters. */
329#define GLUT_OVERLAY_POSSIBLE 800
330#define GLUT_LAYER_IN_USE 801
331#define GLUT_HAS_OVERLAY 802
332#define GLUT_TRANSPARENT_INDEX 803
333#define GLUT_NORMAL_DAMAGED 804
334#define GLUT_OVERLAY_DAMAGED 805
335
336#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
337/* glutVideoResizeGet parameters. */
338#define GLUT_VIDEO_RESIZE_POSSIBLE 900
339#define GLUT_VIDEO_RESIZE_IN_USE 901
340#define GLUT_VIDEO_RESIZE_X_DELTA 902
341#define GLUT_VIDEO_RESIZE_Y_DELTA 903
342#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 904
343#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 905
344#define GLUT_VIDEO_RESIZE_X 906
345#define GLUT_VIDEO_RESIZE_Y 907
346#define GLUT_VIDEO_RESIZE_WIDTH 908
347#define GLUT_VIDEO_RESIZE_HEIGHT 909
348#endif
349
350/* glutUseLayer parameters. */
351#define GLUT_NORMAL 0
352#define GLUT_OVERLAY 1
353
354/* glutGetModifiers return mask. */
355#define GLUT_ACTIVE_SHIFT 1
356#define GLUT_ACTIVE_CTRL 2
357#define GLUT_ACTIVE_ALT 4
358
359/* glutSetCursor parameters. */
360/* Basic arrows. */
361#define GLUT_CURSOR_RIGHT_ARROW 0
362#define GLUT_CURSOR_LEFT_ARROW 1
363/* Symbolic cursor shapes. */
364#define GLUT_CURSOR_INFO 2
365#define GLUT_CURSOR_DESTROY 3
366#define GLUT_CURSOR_HELP 4
367#define GLUT_CURSOR_CYCLE 5
368#define GLUT_CURSOR_SPRAY 6
369#define GLUT_CURSOR_WAIT 7
370#define GLUT_CURSOR_TEXT 8
371#define GLUT_CURSOR_CROSSHAIR 9
372/* Directional cursors. */
373#define GLUT_CURSOR_UP_DOWN 10
374#define GLUT_CURSOR_LEFT_RIGHT 11
375/* Sizing cursors. */
376#define GLUT_CURSOR_TOP_SIDE 12
377#define GLUT_CURSOR_BOTTOM_SIDE 13
378#define GLUT_CURSOR_LEFT_SIDE 14
379#define GLUT_CURSOR_RIGHT_SIDE 15
380#define GLUT_CURSOR_TOP_LEFT_CORNER 16
381#define GLUT_CURSOR_TOP_RIGHT_CORNER 17
382#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18
383#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 19
384/* Inherit from parent window. */
385#define GLUT_CURSOR_INHERIT 100
386/* Blank cursor. */
387#define GLUT_CURSOR_NONE 101
388/* Fullscreen crosshair (if available). */
389#define GLUT_CURSOR_FULL_CROSSHAIR 102
390#endif
391
392/* GLUT initialization sub-API. */
393extern void APIENTRY glutInit(int *argcp, char **argv);
394extern void APIENTRY glutInitDisplayMode(unsigned int mode);
395#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
396extern void APIENTRY glutInitDisplayString(const char *string);
397#endif
398extern void APIENTRY glutInitWindowPosition(int x, int y);
399extern void APIENTRY glutInitWindowSize(int width, int height);
400extern void APIENTRY glutMainLoop(void);
401
402/* GLUT window sub-API. */
403extern int APIENTRY glutCreateWindow(const char *title);
404extern int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height);
405extern void APIENTRY glutDestroyWindow(int win);
406extern void APIENTRY glutPostRedisplay(void);
407#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
408extern void APIENTRY glutPostWindowRedisplay(int win);
409#endif
410extern void APIENTRY glutSwapBuffers(void);
411extern int APIENTRY glutGetWindow(void);
412extern void APIENTRY glutSetWindow(int win);
413extern void APIENTRY glutSetWindowTitle(const char *title);
414extern void APIENTRY glutSetIconTitle(const char *title);
415extern void APIENTRY glutPositionWindow(int x, int y);
416extern void APIENTRY glutReshapeWindow(int width, int height);
417extern void APIENTRY glutPopWindow(void);
418extern void APIENTRY glutPushWindow(void);
419extern void APIENTRY glutIconifyWindow(void);
420extern void APIENTRY glutShowWindow(void);
421extern void APIENTRY glutHideWindow(void);
422#if (GLUT_API_VERSION >= 3)
423extern void APIENTRY glutFullScreen(void);
424extern void APIENTRY glutSetCursor(int cursor);
425#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
426extern void APIENTRY glutWarpPointer(int x, int y);
427#endif
428
429/* GLUT overlay sub-API. */
430extern void APIENTRY glutEstablishOverlay(void);
431extern void APIENTRY glutRemoveOverlay(void);
432extern void APIENTRY glutUseLayer(GLenum layer);
433extern void APIENTRY glutPostOverlayRedisplay(void);
434#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
435extern void APIENTRY glutPostWindowOverlayRedisplay(int win);
436#endif
437extern void APIENTRY glutShowOverlay(void);
438extern void APIENTRY glutHideOverlay(void);
439#endif
440
441/* GLUT menu sub-API. */
442extern int APIENTRY glutCreateMenu(void (*)(int));
443extern void APIENTRY glutDestroyMenu(int menu);
444extern int APIENTRY glutGetMenu(void);
445extern void APIENTRY glutSetMenu(int menu);
446extern void APIENTRY glutAddMenuEntry(const char *label, int value);
447extern void APIENTRY glutAddSubMenu(const char *label, int submenu);
448extern void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value);
449extern void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu);
450extern void APIENTRY glutRemoveMenuItem(int item);
451extern void APIENTRY glutAttachMenu(int button);
452extern void APIENTRY glutDetachMenu(int button);
453
454/* GLUT window callback sub-API. */
455extern void APIENTRY glutDisplayFunc(void (*func)(void));
456extern void APIENTRY glutReshapeFunc(void (*func)(int width, int height));
457extern void APIENTRY glutKeyboardFunc(void (*func)(unsigned char key, int x, int y));
458extern void APIENTRY glutMouseFunc(void (*func)(int button, int state, int x, int y));
459extern void APIENTRY glutMotionFunc(void (*func)(int x, int y));
460extern void APIENTRY glutPassiveMotionFunc(void (*func)(int x, int y));
461extern void APIENTRY glutEntryFunc(void (*func)(int state));
462extern void APIENTRY glutVisibilityFunc(void (*func)(int state));
463extern void APIENTRY glutIdleFunc(void (*func)(void));
464extern void APIENTRY glutTimerFunc(unsigned int millis, void (*func)(int value), int value);
465extern void APIENTRY glutMenuStateFunc(void (*func)(int state));
466#if (GLUT_API_VERSION >= 2)
467extern void APIENTRY glutSpecialFunc(void (*func)(int key, int x, int y));
468extern void APIENTRY glutSpaceballMotionFunc(void (*func)(int x, int y, int z));
469extern void APIENTRY glutSpaceballRotateFunc(void (*func)(int x, int y, int z));
470extern void APIENTRY glutSpaceballButtonFunc(void (*func)(int button, int state));
471extern void APIENTRY glutButtonBoxFunc(void (*func)(int button, int state));
472extern void APIENTRY glutDialsFunc(void (*func)(int dial, int value));
473extern void APIENTRY glutTabletMotionFunc(void (*func)(int x, int y));
474extern void APIENTRY glutTabletButtonFunc(void (*func)(int button, int state, int x, int y));
475#if (GLUT_API_VERSION >= 3)
476extern void APIENTRY glutMenuStatusFunc(void (*func)(int status, int x, int y));
477extern void APIENTRY glutOverlayDisplayFunc(void (*func)(void));
478#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
479extern void APIENTRY glutWindowStatusFunc(void (*func)(int state));
480#endif
481#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
482extern void APIENTRY glutKeyboardUpFunc(void (*func)(unsigned char key, int x, int y));
483extern void APIENTRY glutSpecialUpFunc(void (*func)(int key, int x, int y));
484extern void APIENTRY glutJoystickFunc(void (*func)(unsigned int buttonMask, int x, int y, int z), int pollInterval);
485#endif
486#endif
487#endif
488
489/* GLUT color index sub-API. */
490extern void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
491extern GLfloat APIENTRY glutGetColor(int ndx, int component);
492extern void APIENTRY glutCopyColormap(int win);
493
494/* GLUT state retrieval sub-API. */
495extern int APIENTRY glutGet(GLenum type);
496extern int APIENTRY glutDeviceGet(GLenum type);
497#if (GLUT_API_VERSION >= 2)
498/* GLUT extension support sub-API */
499extern int APIENTRY glutExtensionSupported(const char *name);
500#endif
501#if (GLUT_API_VERSION >= 3)
502extern int APIENTRY glutGetModifiers(void);
503extern int APIENTRY glutLayerGet(GLenum type);
504#endif
505
506/* GLUT font sub-API */
507extern void APIENTRY glutBitmapCharacter(void *font, int character);
508extern int APIENTRY glutBitmapWidth(void *font, int character);
509extern void APIENTRY glutStrokeCharacter(void *font, int character);
510extern int APIENTRY glutStrokeWidth(void *font, int character);
511#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
512extern int APIENTRY glutBitmapLength(void *font, const unsigned char *string);
513extern int APIENTRY glutStrokeLength(void *font, const unsigned char *string);
514#endif
515
516/* GLUT pre-built models sub-API */
517extern void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
518extern void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
519extern void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
520extern void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
521extern void APIENTRY glutWireCube(GLdouble size);
522extern void APIENTRY glutSolidCube(GLdouble size);
523extern void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
524extern void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
525extern void APIENTRY glutWireDodecahedron(void);
526extern void APIENTRY glutSolidDodecahedron(void);
527extern void APIENTRY glutWireTeapot(GLdouble size);
528extern void APIENTRY glutSolidTeapot(GLdouble size);
529extern void APIENTRY glutWireOctahedron(void);
530extern void APIENTRY glutSolidOctahedron(void);
531extern void APIENTRY glutWireTetrahedron(void);
532extern void APIENTRY glutSolidTetrahedron(void);
533extern void APIENTRY glutWireIcosahedron(void);
534extern void APIENTRY glutSolidIcosahedron(void);
535
536#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
537/* GLUT video resize sub-API. */
538extern int APIENTRY glutVideoResizeGet(GLenum param);
539extern void APIENTRY glutSetupVideoResizing(void);
540extern void APIENTRY glutStopVideoResizing(void);
541extern void APIENTRY glutVideoResize(int x, int y, int width, int height);
542extern void APIENTRY glutVideoPan(int x, int y, int width, int height);
543
544/* GLUT debugging sub-API. */
545extern void APIENTRY glutReportErrors(void);
546#endif
547
548#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
549/* GLUT device control sub-API. */
550/* glutSetKeyRepeat modes. */
551#define GLUT_KEY_REPEAT_OFF 0
552#define GLUT_KEY_REPEAT_ON 1
553#define GLUT_KEY_REPEAT_DEFAULT 2
554
555/* Joystick button masks. */
556#define GLUT_JOYSTICK_BUTTON_A 1
557#define GLUT_JOYSTICK_BUTTON_B 2
558#define GLUT_JOYSTICK_BUTTON_C 4
559#define GLUT_JOYSTICK_BUTTON_D 8
560
561extern void APIENTRY glutIgnoreKeyRepeat(int ignore);
562extern void APIENTRY glutSetKeyRepeat(int repeatMode);
563extern void APIENTRY glutForceJoystickFunc(void);
564
565/* GLUT game mode sub-API. */
566/* glutGameModeGet. */
567#define GLUT_GAME_MODE_ACTIVE 0
568#define GLUT_GAME_MODE_POSSIBLE 1
569#define GLUT_GAME_MODE_WIDTH 2
570#define GLUT_GAME_MODE_HEIGHT 3
571#define GLUT_GAME_MODE_PIXEL_DEPTH 4
572#define GLUT_GAME_MODE_REFRESH_RATE 5
573#define GLUT_GAME_MODE_DISPLAY_CHANGED 6
574
575extern void APIENTRY glutGameModeString(const char *string);
576extern int APIENTRY glutEnterGameMode(void);
577extern void APIENTRY glutLeaveGameMode(void);
578extern int APIENTRY glutGameModeGet(GLenum mode);
579#endif
580
581#ifdef __cplusplus
582}
583
584#endif
585
586#ifdef GLUT_APIENTRY_DEFINED
587# undef GLUT_APIENTRY_DEFINED
588# undef APIENTRY
589#endif
590
591#ifdef GLUT_WINGDIAPI_DEFINED
592# undef GLUT_WINGDIAPI_DEFINED
593# undef WINGDIAPI
594#endif
595
596#endif /* __glut_h__ */