diff options
Diffstat (limited to 'linden/libraries/i686-win32/include/GL/glut.h')
-rw-r--r-- | linden/libraries/i686-win32/include/GL/glut.h | 596 |
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 | ||
43 | typedef 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 | ||
69 | extern "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). */ | ||
230 | extern void *glutStrokeRoman; | ||
231 | extern 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). */ | ||
238 | extern void *glutBitmap9By15; | ||
239 | extern void *glutBitmap8By13; | ||
240 | extern void *glutBitmapTimesRoman10; | ||
241 | extern void *glutBitmapTimesRoman24; | ||
242 | extern void *glutBitmapHelvetica10; | ||
243 | extern void *glutBitmapHelvetica12; | ||
244 | extern 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. */ | ||
393 | extern void APIENTRY glutInit(int *argcp, char **argv); | ||
394 | extern void APIENTRY glutInitDisplayMode(unsigned int mode); | ||
395 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) | ||
396 | extern void APIENTRY glutInitDisplayString(const char *string); | ||
397 | #endif | ||
398 | extern void APIENTRY glutInitWindowPosition(int x, int y); | ||
399 | extern void APIENTRY glutInitWindowSize(int width, int height); | ||
400 | extern void APIENTRY glutMainLoop(void); | ||
401 | |||
402 | /* GLUT window sub-API. */ | ||
403 | extern int APIENTRY glutCreateWindow(const char *title); | ||
404 | extern int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height); | ||
405 | extern void APIENTRY glutDestroyWindow(int win); | ||
406 | extern void APIENTRY glutPostRedisplay(void); | ||
407 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11) | ||
408 | extern void APIENTRY glutPostWindowRedisplay(int win); | ||
409 | #endif | ||
410 | extern void APIENTRY glutSwapBuffers(void); | ||
411 | extern int APIENTRY glutGetWindow(void); | ||
412 | extern void APIENTRY glutSetWindow(int win); | ||
413 | extern void APIENTRY glutSetWindowTitle(const char *title); | ||
414 | extern void APIENTRY glutSetIconTitle(const char *title); | ||
415 | extern void APIENTRY glutPositionWindow(int x, int y); | ||
416 | extern void APIENTRY glutReshapeWindow(int width, int height); | ||
417 | extern void APIENTRY glutPopWindow(void); | ||
418 | extern void APIENTRY glutPushWindow(void); | ||
419 | extern void APIENTRY glutIconifyWindow(void); | ||
420 | extern void APIENTRY glutShowWindow(void); | ||
421 | extern void APIENTRY glutHideWindow(void); | ||
422 | #if (GLUT_API_VERSION >= 3) | ||
423 | extern void APIENTRY glutFullScreen(void); | ||
424 | extern void APIENTRY glutSetCursor(int cursor); | ||
425 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) | ||
426 | extern void APIENTRY glutWarpPointer(int x, int y); | ||
427 | #endif | ||
428 | |||
429 | /* GLUT overlay sub-API. */ | ||
430 | extern void APIENTRY glutEstablishOverlay(void); | ||
431 | extern void APIENTRY glutRemoveOverlay(void); | ||
432 | extern void APIENTRY glutUseLayer(GLenum layer); | ||
433 | extern void APIENTRY glutPostOverlayRedisplay(void); | ||
434 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11) | ||
435 | extern void APIENTRY glutPostWindowOverlayRedisplay(int win); | ||
436 | #endif | ||
437 | extern void APIENTRY glutShowOverlay(void); | ||
438 | extern void APIENTRY glutHideOverlay(void); | ||
439 | #endif | ||
440 | |||
441 | /* GLUT menu sub-API. */ | ||
442 | extern int APIENTRY glutCreateMenu(void (*)(int)); | ||
443 | extern void APIENTRY glutDestroyMenu(int menu); | ||
444 | extern int APIENTRY glutGetMenu(void); | ||
445 | extern void APIENTRY glutSetMenu(int menu); | ||
446 | extern void APIENTRY glutAddMenuEntry(const char *label, int value); | ||
447 | extern void APIENTRY glutAddSubMenu(const char *label, int submenu); | ||
448 | extern void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value); | ||
449 | extern void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu); | ||
450 | extern void APIENTRY glutRemoveMenuItem(int item); | ||
451 | extern void APIENTRY glutAttachMenu(int button); | ||
452 | extern void APIENTRY glutDetachMenu(int button); | ||
453 | |||
454 | /* GLUT window callback sub-API. */ | ||
455 | extern void APIENTRY glutDisplayFunc(void (*func)(void)); | ||
456 | extern void APIENTRY glutReshapeFunc(void (*func)(int width, int height)); | ||
457 | extern void APIENTRY glutKeyboardFunc(void (*func)(unsigned char key, int x, int y)); | ||
458 | extern void APIENTRY glutMouseFunc(void (*func)(int button, int state, int x, int y)); | ||
459 | extern void APIENTRY glutMotionFunc(void (*func)(int x, int y)); | ||
460 | extern void APIENTRY glutPassiveMotionFunc(void (*func)(int x, int y)); | ||
461 | extern void APIENTRY glutEntryFunc(void (*func)(int state)); | ||
462 | extern void APIENTRY glutVisibilityFunc(void (*func)(int state)); | ||
463 | extern void APIENTRY glutIdleFunc(void (*func)(void)); | ||
464 | extern void APIENTRY glutTimerFunc(unsigned int millis, void (*func)(int value), int value); | ||
465 | extern void APIENTRY glutMenuStateFunc(void (*func)(int state)); | ||
466 | #if (GLUT_API_VERSION >= 2) | ||
467 | extern void APIENTRY glutSpecialFunc(void (*func)(int key, int x, int y)); | ||
468 | extern void APIENTRY glutSpaceballMotionFunc(void (*func)(int x, int y, int z)); | ||
469 | extern void APIENTRY glutSpaceballRotateFunc(void (*func)(int x, int y, int z)); | ||
470 | extern void APIENTRY glutSpaceballButtonFunc(void (*func)(int button, int state)); | ||
471 | extern void APIENTRY glutButtonBoxFunc(void (*func)(int button, int state)); | ||
472 | extern void APIENTRY glutDialsFunc(void (*func)(int dial, int value)); | ||
473 | extern void APIENTRY glutTabletMotionFunc(void (*func)(int x, int y)); | ||
474 | extern void APIENTRY glutTabletButtonFunc(void (*func)(int button, int state, int x, int y)); | ||
475 | #if (GLUT_API_VERSION >= 3) | ||
476 | extern void APIENTRY glutMenuStatusFunc(void (*func)(int status, int x, int y)); | ||
477 | extern void APIENTRY glutOverlayDisplayFunc(void (*func)(void)); | ||
478 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) | ||
479 | extern void APIENTRY glutWindowStatusFunc(void (*func)(int state)); | ||
480 | #endif | ||
481 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) | ||
482 | extern void APIENTRY glutKeyboardUpFunc(void (*func)(unsigned char key, int x, int y)); | ||
483 | extern void APIENTRY glutSpecialUpFunc(void (*func)(int key, int x, int y)); | ||
484 | extern 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. */ | ||
490 | extern void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue); | ||
491 | extern GLfloat APIENTRY glutGetColor(int ndx, int component); | ||
492 | extern void APIENTRY glutCopyColormap(int win); | ||
493 | |||
494 | /* GLUT state retrieval sub-API. */ | ||
495 | extern int APIENTRY glutGet(GLenum type); | ||
496 | extern int APIENTRY glutDeviceGet(GLenum type); | ||
497 | #if (GLUT_API_VERSION >= 2) | ||
498 | /* GLUT extension support sub-API */ | ||
499 | extern int APIENTRY glutExtensionSupported(const char *name); | ||
500 | #endif | ||
501 | #if (GLUT_API_VERSION >= 3) | ||
502 | extern int APIENTRY glutGetModifiers(void); | ||
503 | extern int APIENTRY glutLayerGet(GLenum type); | ||
504 | #endif | ||
505 | |||
506 | /* GLUT font sub-API */ | ||
507 | extern void APIENTRY glutBitmapCharacter(void *font, int character); | ||
508 | extern int APIENTRY glutBitmapWidth(void *font, int character); | ||
509 | extern void APIENTRY glutStrokeCharacter(void *font, int character); | ||
510 | extern int APIENTRY glutStrokeWidth(void *font, int character); | ||
511 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) | ||
512 | extern int APIENTRY glutBitmapLength(void *font, const unsigned char *string); | ||
513 | extern int APIENTRY glutStrokeLength(void *font, const unsigned char *string); | ||
514 | #endif | ||
515 | |||
516 | /* GLUT pre-built models sub-API */ | ||
517 | extern void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks); | ||
518 | extern void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks); | ||
519 | extern void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); | ||
520 | extern void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); | ||
521 | extern void APIENTRY glutWireCube(GLdouble size); | ||
522 | extern void APIENTRY glutSolidCube(GLdouble size); | ||
523 | extern void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); | ||
524 | extern void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); | ||
525 | extern void APIENTRY glutWireDodecahedron(void); | ||
526 | extern void APIENTRY glutSolidDodecahedron(void); | ||
527 | extern void APIENTRY glutWireTeapot(GLdouble size); | ||
528 | extern void APIENTRY glutSolidTeapot(GLdouble size); | ||
529 | extern void APIENTRY glutWireOctahedron(void); | ||
530 | extern void APIENTRY glutSolidOctahedron(void); | ||
531 | extern void APIENTRY glutWireTetrahedron(void); | ||
532 | extern void APIENTRY glutSolidTetrahedron(void); | ||
533 | extern void APIENTRY glutWireIcosahedron(void); | ||
534 | extern void APIENTRY glutSolidIcosahedron(void); | ||
535 | |||
536 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) | ||
537 | /* GLUT video resize sub-API. */ | ||
538 | extern int APIENTRY glutVideoResizeGet(GLenum param); | ||
539 | extern void APIENTRY glutSetupVideoResizing(void); | ||
540 | extern void APIENTRY glutStopVideoResizing(void); | ||
541 | extern void APIENTRY glutVideoResize(int x, int y, int width, int height); | ||
542 | extern void APIENTRY glutVideoPan(int x, int y, int width, int height); | ||
543 | |||
544 | /* GLUT debugging sub-API. */ | ||
545 | extern 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 | |||
561 | extern void APIENTRY glutIgnoreKeyRepeat(int ignore); | ||
562 | extern void APIENTRY glutSetKeyRepeat(int repeatMode); | ||
563 | extern 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 | |||
575 | extern void APIENTRY glutGameModeString(const char *string); | ||
576 | extern int APIENTRY glutEnterGameMode(void); | ||
577 | extern void APIENTRY glutLeaveGameMode(void); | ||
578 | extern 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__ */ | ||