root/trunk/gl/glut.d

Revision 158, 36.7 kB (checked in by jpelcis, 6 years ago)

Improved Mac OS X support.

Line 
1 module c.gl.glut;
2
3 /*
4  * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
5  * Written by Pawel W. Olszta, <olszta@sourceforge.net>
6  * Creation date: Thu Dec 2 1999
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining a
9  * copy of this software and associated documentation files (the "Software"),
10  * to deal in the Software without restriction, including without limitation
11  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12  * and/or sell copies of the Software, and to permit persons to whom the
13  * Software is furnished to do so, subject to the following conditions:
14  *
15  * The above copyright notice and this permission notice shall be included
16  * in all copies or substantial portions of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
21  * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
22  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24  */
25
26 /*
27  *Uncomment the following line to enable new freeglut features
28  */
29 //version = FREEGLUT_EXTRAS;
30
31 import c.gl._glextern;
32 private import c.gl.gl;
33 private import std.loader;
34
35 /*
36  * The freeglut and GLUT API versions
37  */
38 const GLuint FREEGLUT               = 1;
39 const GLuint GLUT_API_VERSION           = 4;
40 const GLuint FREEGLUT_VERSION_2_0       = 1;
41 const GLuint GLUT_XLIB_IMPLEMENTATION       = 13;
42
43 /*
44  * GLUT API macro definitions -- the special key codes:
45  */
46 const GLuint GLUT_KEY_F1            = 0x0001;
47 const GLuint GLUT_KEY_F2            = 0x0002;
48 const GLuint GLUT_KEY_F3            = 0x0003;
49 const GLuint GLUT_KEY_F4            = 0x0004;
50 const GLuint GLUT_KEY_F5            = 0x0005;
51 const GLuint GLUT_KEY_F6            = 0x0006;
52 const GLuint GLUT_KEY_F7            = 0x0007;
53 const GLuint GLUT_KEY_F8            = 0x0008;
54 const GLuint GLUT_KEY_F9            = 0x0009;
55 const GLuint GLUT_KEY_F10           = 0x000A;
56 const GLuint GLUT_KEY_F11           = 0x000B;
57 const GLuint GLUT_KEY_F12           = 0x000C;
58 const GLuint GLUT_KEY_LEFT          = 0x0064;
59 const GLuint GLUT_KEY_UP            = 0x0065;
60 const GLuint GLUT_KEY_RIGHT         = 0x0066;
61 const GLuint GLUT_KEY_DOWN          = 0x0067;
62 const GLuint GLUT_KEY_PAGE_UP           = 0x0068;
63 const GLuint GLUT_KEY_PAGE_DOWN         = 0x0069;
64 const GLuint GLUT_KEY_HOME          = 0x006A;
65 const GLuint GLUT_KEY_END           = 0x006B;
66 const GLuint GLUT_KEY_INSERT            = 0x006C;
67
68 /*
69  * GLUT API macro definitions -- mouse state definitions
70  */
71 const GLuint GLUT_LEFT_BUTTON           = 0x0000;
72 const GLuint GLUT_MIDDLE_BUTTON         = 0x0001;
73 const GLuint GLUT_RIGHT_BUTTON          = 0x0002;
74 const GLuint GLUT_DOWN              = 0x0000;
75 const GLuint GLUT_UP                = 0x0001;
76 const GLuint GLUT_LEFT              = 0x0000;
77 const GLuint GLUT_ENTERED           = 0x0001;
78
79 /*
80  * GLUT API macro definitions -- the display mode definitions
81  */
82 const GLuint GLUT_RGB               = 0x0000;
83 const GLuint GLUT_RGBA              = 0x0000;
84 const GLuint GLUT_INDEX             = 0x0001;
85 const GLuint GLUT_SINGLE            = 0x0000;
86 const GLuint GLUT_DOUBLE            = 0x0002;
87 const GLuint GLUT_ACCUM             = 0x0004;
88 const GLuint GLUT_ALPHA             = 0x0008;
89 const GLuint GLUT_DEPTH             = 0x0010;
90 const GLuint GLUT_STENCIL           = 0x0020;
91 const GLuint GLUT_MULTISAMPLE           = 0x0080;
92 const GLuint GLUT_STEREO            = 0x0100;
93 const GLuint GLUT_LUMINANCE         = 0x0200;
94
95 /*
96  * GLUT API macro definitions -- windows and menu related definitions
97  */
98 const GLuint GLUT_MENU_NOT_IN_USE       = 0x0000;
99 const GLuint GLUT_MENU_IN_USE           = 0x0001;
100 const GLuint GLUT_NOT_VISIBLE           = 0x0000;
101 const GLuint GLUT_VISIBLE           = 0x0001;
102 const GLuint GLUT_HIDDEN            = 0x0000;
103 const GLuint GLUT_FULLY_RETAINED        = 0x0001;
104 const GLuint GLUT_PARTIALLY_RETAINED        = 0x0002;
105 const GLuint GLUT_FULLY_COVERED         = 0x0003;
106
107 /*
108  * GLUT API macro definitions
109  * Steve Baker suggested to make it binary compatible with GLUT:
110  */
111 version (Windows) {
112     const GLvoid* GLUT_STROKE_ROMAN     = cast(GLvoid*)0x0000;
113     const GLvoid* GLUT_STROKE_MONO_ROMAN    = cast(GLvoid*)0x0001;
114     const GLvoid* GLUT_BITMAP_9_BY_15   = cast(GLvoid*)0x0002;
115     const GLvoid* GLUT_BITMAP_8_BY_13   = cast(GLvoid*)0x0003;
116     const GLvoid* GLUT_BITMAP_TIMES_ROMAN_10= cast(GLvoid*)0x0004;
117     const GLvoid* GLUT_BITMAP_TIMES_ROMAN_24= cast(GLvoid*)0x0005;
118     const GLvoid* GLUT_BITMAP_HELVETICA_10  = cast(GLvoid*)0x0006;
119     const GLvoid* GLUT_BITMAP_HELVETICA_12  = cast(GLvoid*)0x0007;
120     const GLvoid* GLUT_BITMAP_HELVETICA_18  = cast(GLvoid*)0x0008;
121 } else {
122     // Those pointers will be used by following definitions:
123     const GLvoid* GLUT_STROKE_ROMAN     = cast(GLvoid*)&glutStrokeRoman;
124     const GLvoid* GLUT_STROKE_MONO_ROMAN    = cast(GLvoid*)&glutStrokeMonoRoman;
125     const GLvoid* GLUT_BITMAP_9_BY_15   = cast(GLvoid*)&glutBitmap9By15;
126     const GLvoid* GLUT_BITMAP_8_BY_13   = cast(GLvoid*)&glutBitmap8By13;
127     const GLvoid* GLUT_BITMAP_TIMES_ROMAN_10= cast(GLvoid*)&glutBitmapTimesRoman10;
128     const GLvoid* GLUT_BITMAP_TIMES_ROMAN_24= cast(GLvoid*)&glutBitmapTimesRoman24;
129     const GLvoid* GLUT_BITMAP_HELVETICA_10  = cast(GLvoid*)&glutBitmapHelvetica10;
130     const GLvoid* GLUT_BITMAP_HELVETICA_12  = cast(GLvoid*)&glutBitmapHelvetica12;
131     const GLvoid* GLUT_BITMAP_HELVETICA_18  = cast(GLvoid*)&glutBitmapHelvetica18;
132 }
133
134 // GLUT API macro definitions -- the glutGet parameters
135 const GLuint GLUT_WINDOW_X          = 0x0064;
136 const GLuint GLUT_WINDOW_Y          = 0x0065;
137 const GLuint GLUT_WINDOW_WIDTH          = 0x0066;
138 const GLuint GLUT_WINDOW_HEIGHT         = 0x0067;
139 const GLuint GLUT_WINDOW_BUFFER_SIZE        = 0x0068;
140 const GLuint GLUT_WINDOW_STENCIL_SIZE       = 0x0069;
141 const GLuint GLUT_WINDOW_DEPTH_SIZE     = 0x006A;
142 const GLuint GLUT_WINDOW_RED_SIZE       = 0x006B;
143 const GLuint GLUT_WINDOW_GREEN_SIZE     = 0x006C;
144 const GLuint GLUT_WINDOW_BLUE_SIZE      = 0x006D;
145 const GLuint GLUT_WINDOW_ALPHA_SIZE     = 0x006E;
146 const GLuint GLUT_WINDOW_ACCUM_RED_SIZE     = 0x006F;
147 const GLuint GLUT_WINDOW_ACCUM_GREEN_SIZE   = 0x0070;
148 const GLuint GLUT_WINDOW_ACCUM_BLUE_SIZE    = 0x0071;
149 const GLuint GLUT_WINDOW_ACCUM_ALPHA_SIZE   = 0x0072;
150 const GLuint GLUT_WINDOW_DOUBLEBUFFER       = 0x0073;
151 const GLuint GLUT_WINDOW_RGBA           = 0x0074;
152 const GLuint GLUT_WINDOW_PARENT         = 0x0075;
153 const GLuint GLUT_WINDOW_NUM_CHILDREN       = 0x0076;
154 const GLuint GLUT_WINDOW_COLORMAP_SIZE      = 0x0077;
155 const GLuint GLUT_WINDOW_NUM_SAMPLES        = 0x0078;
156 const GLuint GLUT_WINDOW_STEREO         = 0x0079;
157 const GLuint GLUT_WINDOW_CURSOR         = 0x007A;
158
159 const GLuint GLUT_SCREEN_WIDTH          = 0x00C8;
160 const GLuint GLUT_SCREEN_HEIGHT         = 0x00C9;
161 const GLuint GLUT_SCREEN_WIDTH_MM       = 0x00CA;
162 const GLuint GLUT_SCREEN_HEIGHT_MM      = 0x00CB;
163 const GLuint GLUT_MENU_NUM_ITEMS        = 0x012C;
164 const GLuint GLUT_DISPLAY_MODE_POSSIBLE     = 0x0190;
165 const GLuint GLUT_INIT_WINDOW_X         = 0x01F4;
166 const GLuint GLUT_INIT_WINDOW_Y         = 0x01F5;
167 const GLuint GLUT_INIT_WINDOW_WIDTH     = 0x01F6;
168 const GLuint GLUT_INIT_WINDOW_HEIGHT        = 0x01F7;
169 const GLuint GLUT_INIT_DISPLAY_MODE     = 0x01F8;
170 const GLuint GLUT_ELAPSED_TIME          = 0x02BC;
171 const GLuint GLUT_WINDOW_FORMAT_ID      = 0x007B;
172 const GLuint GLUT_INIT_STATE            = 0x007C;
173
174 // GLUT API macro definitions -- the glutDeviceGet parameters
175 const GLuint GLUT_HAS_KEYBOARD          = 0x0258;
176 const GLuint GLUT_HAS_MOUSE         = 0x0259;
177 const GLuint GLUT_HAS_SPACEBALL         = 0x025A;
178 const GLuint GLUT_HAS_DIAL_AND_BUTTON_BOX   = 0x025B;
179 const GLuint GLUT_HAS_TABLET            = 0x025C;
180 const GLuint GLUT_NUM_MOUSE_BUTTONS     = 0x025D;
181 const GLuint GLUT_NUM_SPACEBALL_BUTTONS     = 0x025E;
182 const GLuint GLUT_NUM_BUTTON_BOX_BUTTONS    = 0x025F;
183 const GLuint GLUT_NUM_DIALS         = 0x0260;
184 const GLuint GLUT_NUM_TABLET_BUTTONS        = 0x0261;
185 const GLuint GLUT_DEVICE_IGNORE_KEY_REPEAT  = 0x0262;
186 const GLuint GLUT_DEVICE_KEY_REPEAT     = 0x0263;
187 const GLuint GLUT_HAS_JOYSTICK          = 0x0264;
188 const GLuint GLUT_OWNS_JOYSTICK         = 0x0265;
189 const GLuint GLUT_JOYSTICK_BUTTONS      = 0x0266;
190 const GLuint GLUT_JOYSTICK_AXES         = 0x0267;
191 const GLuint GLUT_JOYSTICK_POLL_RATE        = 0x0268;
192
193 // GLUT API macro definitions -- the glutLayerGet parameters
194 const GLuint GLUT_OVERLAY_POSSIBLE      = 0x0320;
195 const GLuint GLUT_LAYER_IN_USE          = 0x0321;
196 const GLuint GLUT_HAS_OVERLAY           = 0x0322;
197 const GLuint GLUT_TRANSPARENT_INDEX     = 0x0323;
198 const GLuint GLUT_NORMAL_DAMAGED        = 0x0324;
199 const GLuint GLUT_OVERLAY_DAMAGED       = 0x0325;
200
201 // GLUT API macro definitions -- the glutVideoResizeGet parameters
202 const GLuint GLUT_VIDEO_RESIZE_POSSIBLE     = 0x0384;
203 const GLuint GLUT_VIDEO_RESIZE_IN_USE       = 0x0385;
204 const GLuint GLUT_VIDEO_RESIZE_X_DELTA      = 0x0386;
205 const GLuint GLUT_VIDEO_RESIZE_Y_DELTA      = 0x0387;
206 const GLuint GLUT_VIDEO_RESIZE_WIDTH_DELTA  = 0x0388;
207 const GLuint GLUT_VIDEO_RESIZE_HEIGHT_DELTA = 0x0389;
208 const GLuint GLUT_VIDEO_RESIZE_X        = 0x038A;
209 const GLuint GLUT_VIDEO_RESIZE_Y        = 0x038B;
210 const GLuint GLUT_VIDEO_RESIZE_WIDTH        = 0x038C;
211 const GLuint GLUT_VIDEO_RESIZE_HEIGHT       = 0x038D;
212
213 // GLUT API macro definitions -- the glutUseLayer parameters
214 const GLuint GLUT_NORMAL            = 0x0000;
215 const GLuint GLUT_OVERLAY           = 0x0001;
216
217 // GLUT API macro definitions -- the glutGetModifiers parameters
218 const GLuint GLUT_ACTIVE_SHIFT          = 0x0001;
219 const GLuint GLUT_ACTIVE_CTRL           = 0x0002;
220 const GLuint GLUT_ACTIVE_ALT            = 0x0004;
221
222 // GLUT API macro definitions -- the glutSetCursor parameters
223 const GLuint GLUT_CURSOR_RIGHT_ARROW        = 0x0000;
224 const GLuint GLUT_CURSOR_LEFT_ARROW     = 0x0001;
225 const GLuint GLUT_CURSOR_INFO           = 0x0002;
226 const GLuint GLUT_CURSOR_DESTROY        = 0x0003;
227 const GLuint GLUT_CURSOR_HELP           = 0x0004;
228 const GLuint GLUT_CURSOR_CYCLE          = 0x0005;
229 const GLuint GLUT_CURSOR_SPRAY          = 0x0006;
230 const GLuint GLUT_CURSOR_WAIT           = 0x0007;
231 const GLuint GLUT_CURSOR_TEXT           = 0x0008;
232 const GLuint GLUT_CURSOR_CROSSHAIR      = 0x0009;
233 const GLuint GLUT_CURSOR_UP_DOWN        = 0x000A;
234 const GLuint GLUT_CURSOR_LEFT_RIGHT     = 0x000B;
235 const GLuint GLUT_CURSOR_TOP_SIDE       = 0x000C;
236 const GLuint GLUT_CURSOR_BOTTOM_SIDE        = 0x000D;
237 const GLuint GLUT_CURSOR_LEFT_SIDE      = 0x000E;
238 const GLuint GLUT_CURSOR_RIGHT_SIDE     = 0x000F;
239 const GLuint GLUT_CURSOR_TOP_LEFT_CORNER    = 0x0010;
240 const GLuint GLUT_CURSOR_TOP_RIGHT_CORNER   = 0x0011;
241 const GLuint GLUT_CURSOR_BOTTOM_RIGHT_CORNER    = 0x0012;
242 const GLuint GLUT_CURSOR_BOTTOM_LEFT_CORNER = 0x0013;
243 const GLuint GLUT_CURSOR_INHERIT        = 0x0064;
244 const GLuint GLUT_CURSOR_NONE           = 0x0065;
245 const GLuint GLUT_CURSOR_FULL_CROSSHAIR     = 0x0066;
246
247 // GLUT API macro definitions -- RGB color component specification definitions
248 const GLuint GLUT_RED               = 0x0000;
249 const GLuint GLUT_GREEN             = 0x0001;
250 const GLuint GLUT_BLUE              = 0x0002;
251
252 // GLUT API macro definitions -- additional keyboard and joystick definitions
253 const GLuint GLUT_KEY_REPEAT_OFF        = 0x0000;
254 const GLuint GLUT_KEY_REPEAT_ON         = 0x0001;
255 const GLuint GLUT_KEY_REPEAT_DEFAULT        = 0x0002;
256
257 const GLuint GLUT_JOYSTICK_BUTTON_A     = 0x0001;
258 const GLuint GLUT_JOYSTICK_BUTTON_B     = 0x0002;
259 const GLuint GLUT_JOYSTICK_BUTTON_C     = 0x0004;
260 const GLuint GLUT_JOYSTICK_BUTTON_D     = 0x0008;
261
262 // GLUT API macro definitions -- game mode definitions
263 const GLuint GLUT_GAME_MODE_ACTIVE      = 0x0000;
264 const GLuint GLUT_GAME_MODE_POSSIBLE        = 0x0001;
265 const GLuint GLUT_GAME_MODE_WIDTH       = 0x0002;
266 const GLuint GLUT_GAME_MODE_HEIGHT      = 0x0003;
267 const GLuint GLUT_GAME_MODE_PIXEL_DEPTH     = 0x0004;
268 const GLuint GLUT_GAME_MODE_REFRESH_RATE    = 0x0005;
269 const GLuint GLUT_GAME_MODE_DISPLAY_CHANGED = 0x0006;
270
271 // FreeGlut extra definitions
272 version (FREEGLUT_EXTRAS) {
273     /*
274      * GLUT API Extension macro definitions -- behaviour when the user clicks on an "x" to close a window
275      */
276     const GLuint GLUT_ACTION_EXIT       = 0;
277     const GLuint GLUT_ACTION_GLUTMAINLOOP_RETURNS= 1;
278     const GLuint GLUT_ACTION_CONTINUE_EXECUTION= 2;
279
280     /*
281      * Create a new rendering context when the user opens a new window?
282      */
283     const GLuint GLUT_CREATE_NEW_CONTEXT    = 0;
284     const GLuint GLUT_USE_CURRENT_CONTEXT   = 1;
285
286     /*
287      * Direct/Indirect rendering context options (has meaning only in Unix/X11)
288      */
289     const GLuint GLUT_FORCE_INDIRECT_CONTEXT= 0;
290     const GLuint GLUT_ALLOW_DIRECT_CONTEXT  = 1;
291     const GLuint GLUT_TRY_DIRECT_CONTEXT    = 2;
292     const GLuint GLUT_FORCE_DIRECT_CONTEXT  = 3;
293
294     /*
295      * GLUT API Extension macro definitions -- the glutGet parameters
296      */
297     const GLuint GLUT_ACTION_ON_WINDOW_CLOSE= 0x01F9;
298     const GLuint GLUT_WINDOW_BORDER_WIDTH   = 0x01FA;
299     const GLuint GLUT_WINDOW_HEADER_HEIGHT  = 0x01FB;
300     const GLuint GLUT_VERSION       = 0x01FC;
301     const GLuint GLUT_RENDERING_CONTEXT = 0x01FD;
302     const GLuint GLUT_DIRECT_RENDERING  = 0x01FE;
303
304     /*
305      * New tokens for glutInitDisplayMode.
306      * Only one GLUT_AUXn bit may be used at a time.
307      * Value 0x0400 is defined in OpenGLUT.
308      */
309     const GLuint GLUT_AUX1          = 0x1000;
310     const GLuint GLUT_AUX2          = 0x2000;
311     const GLuint GLUT_AUX3          = 0x4000;
312     const GLuint GLUT_AUX4          = 0x8000;
313 }
314
315 /*
316  * Functions
317  */
318 private HXModule glutdrv;
319
320 private void* getProc (char[] procname) {
321     void* symbol = ExeModule_GetSymbol(glutdrv, procname);
322     if (symbol is null) {
323         printf ("Failed to load GLUT proc address " ~ procname ~ ".\n");
324     }
325     return symbol;
326 }
327
328 static this() {
329     version (Windows) {
330         glutdrv = ExeModule_Load("glut32.dll");
331     } else version (linux) {
332         glutdrv = ExeModule_Load("libglut.so");
333     } else version (darwin) {
334         glutdrv = ExeModule_Load("/System/Library/Frameworks/GLUT.framework");
335     }
336     glutInit = cast(pfglutInit)getProc("glutInit");
337     glutInitWindowPosition = cast(pfglutInitWindowPosition)getProc("glutInitWindowPosition");
338     glutInitWindowSize = cast(pfglutInitWindowSize)getProc("glutInitWindowSize");
339     glutInitDisplayMode = cast(pfglutInitDisplayMode)getProc("glutInitDisplayMode");
340     glutInitDisplayString = cast(pfglutInitDisplayString)getProc("glutInitDisplayString");
341     glutMainLoop = cast(pfglutMainLoop)getProc("glutMainLoop");
342     glutCreateWindow = cast(pfglutCreateWindow)getProc("glutCreateWindow");
343     glutCreateSubWindow = cast(pfglutCreateSubWindow)getProc("glutCreateSubWindow");
344     glutDestroyWindow = cast(pfglutDestroyWindow)getProc("glutDestroyWindow");
345     glutSetWindow = cast(pfglutSetWindow)getProc("glutSetWindow");
346     glutGetWindow = cast(pfglutGetWindow)getProc("glutGetWindow");
347     glutSetWindowTitle = cast(pfglutSetWindowTitle)getProc("glutSetWindowTitle");
348     glutSetIconTitle = cast(pfglutSetIconTitle)getProc("glutSetIconTitle");
349     glutReshapeWindow = cast(pfglutReshapeWindow)getProc("glutReshapeWindow");
350     glutPositionWindow = cast(pfglutPositionWindow)getProc("glutPositionWindow");
351     glutShowWindow = cast(pfglutShowWindow)getProc("glutShowWindow");
352     glutHideWindow = cast(pfglutHideWindow)getProc("glutHideWindow");
353     glutIconifyWindow = cast(pfglutIconifyWindow)getProc("glutIconifyWindow");
354     glutPushWindow = cast(pfglutPushWindow)getProc("glutPushWindow");
355     glutPopWindow = cast(pfglutPopWindow)getProc("glutPopWindow");
356     glutFullScreen = cast(pfglutFullScreen)getProc("glutFullScreen");
357     glutPostWindowRedisplay = cast(pfglutPostWindowRedisplay)getProc("glutPostWindowRedisplay");
358     glutPostRedisplay = cast(pfglutPostRedisplay)getProc("glutPostRedisplay");
359     glutSwapBuffers = cast(pfglutSwapBuffers)getProc("glutSwapBuffers");
360     glutWarpPointer = cast(pfglutWarpPointer)getProc("glutWarpPointer");
361     glutSetCursor = cast(pfglutSetCursor)getProc("glutSetCursor");
362     glutEstablishOverlay = cast(pfglutEstablishOverlay)getProc("glutEstablishOverlay");
363     glutRemoveOverlay = cast(pfglutRemoveOverlay)getProc("glutRemoveOverlay");
364     glutUseLayer = cast(pfglutUseLayer)getProc("glutUseLayer");
365     glutPostOverlayRedisplay = cast(pfglutPostOverlayRedisplay)getProc("glutPostOverlayRedisplay");
366     glutPostWindowOverlayRedisplay = cast(pfglutPostWindowOverlayRedisplay)getProc("glutPostWindowOverlayRedisplay");
367     glutHideOverlay = cast(pfglutHideOverlay)getProc("glutHideOverlay");
368     glutCreateMenu = cast(pfglutCreateMenu)getProc("glutCreateMenu");
369     glutDestroyMenu = cast(pfglutDestroyMenu)getProc("glutDestroyMenu");
370     glutGetMenu = cast(pfglutGetMenu)getProc("glutGetMenu");
371     glutSetMenu = cast(pfglutSetMenu)getProc("glutSetMenu");
372     glutAddMenuEntry = cast(pfglutAddMenuEntry)getProc("glutAddMenuEntry");
373     glutAddSubMenu = cast(pfglutAddSubMenu)getProc("glutAddSubMenu");
374     glutChangeToMenuEntry = cast(pfglutChangeToMenuEntry)getProc("glutChangeToMenuEntry");
375     glutChangeToSubMenu = cast(pfglutChangeToSubMenu)getProc("glutChangeToSubMenu");
376     glutRemoveMenuItem = cast(pfglutRemoveMenuItem)getProc("glutRemoveMenuItem");
377     glutAttachMenu = cast(pfglutAttachMenu)getProc("glutAttachMenu");
378     glutDetachMenu = cast(pfglutDetachMenu)getProc("glutDetachMenu");
379     glutTimerFunc = cast(pfglutTimerFunc)getProc("glutTimerFunc");
380     glutIdleFunc = cast(pfglutIdleFunc)getProc("glutIdleFunc");
381     glutKeyboardFunc = cast(pfglutKeyboardFunc)getProc("glutKeyboardFunc");
382     glutSpecialFunc = cast(pfglutSpecialFunc)getProc("glutSpecialFunc");
383     glutReshapeFunc = cast(pfglutReshapeFunc)getProc("glutReshapeFunc");
384     glutVisibilityFunc = cast(pfglutVisibilityFunc)getProc("glutVisibilityFunc");
385     glutDisplayFunc = cast(pfglutDisplayFunc)getProc("glutDisplayFunc");
386     glutMouseFunc = cast(pfglutMouseFunc)getProc("glutMouseFunc");
387     glutMotionFunc = cast(pfglutMotionFunc)getProc("glutMotionFunc");
388     glutPassiveMotionFunc = cast(pfglutPassiveMotionFunc)getProc("glutPassiveMotionFunc");
389     glutEntryFunc = cast(pfglutEntryFunc)getProc("glutEntryFunc");
390     glutKeyboardUpFunc = cast(pfglutKeyboardUpFunc)getProc("glutKeyboardUpFunc");
391     glutSpecialUpFunc = cast(pfglutSpecialUpFunc)getProc("glutSpecialUpFunc");
392     glutJoystickFunc = cast(pfglutJoystickFunc)getProc("glutJoystickFunc");
393     glutMenuStateFunc = cast(pfglutMenuStateFunc)getProc("glutMenuStateFunc");
394     glutMenuStatusFunc = cast(pfglutMenuStatusFunc)getProc("glutMenuStatusFunc");
395     glutOverlayDisplayFunc = cast(pfglutOverlayDisplayFunc)getProc("glutOverlayDisplayFunc");
396     glutWindowStatusFunc = cast(pfglutWindowStatusFunc)getProc("glutWindowStatusFunc");
397     glutSpaceballMotionFunc = cast(pfglutSpaceballMotionFunc)getProc("glutSpaceballMotionFunc");
398     glutSpaceballRotateFunc = cast(pfglutSpaceballRotateFunc)getProc("glutSpaceballRotateFunc");
399     glutSpaceballButtonFunc = cast(pfglutSpaceballButtonFunc)getProc("glutSpaceballButtonFunc");
400     glutButtonBoxFunc = cast(pfglutButtonBoxFunc)getProc("glutButtonBoxFunc");
401     glutDialsFunc = cast(pfglutDialsFunc)getProc("glutDialsFunc");
402     glutTabletMotionFunc = cast(pfglutTabletMotionFunc)getProc("glutTabletMotionFunc");
403     glutTabletButtonFunc = cast(pfglutTabletButtonFunc)getProc("glutTabletButtonFunc");
404     glutGet = cast(pfglutGet)getProc("glutGet");
405     glutDeviceGet = cast(pfglutDeviceGet)getProc("glutDeviceGet");
406     glutGetModifiers = cast(pfglutGetModifiers)getProc("glutGetModifiers");
407     glutLayerGet = cast(pfglutLayerGet)getProc("glutLayerGet");
408     glutBitmapCharacter = cast(pfglutBitmapCharacter)getProc("glutBitmapCharacter");
409     glutBitmapWidth = cast(pfglutBitmapWidth)getProc("glutBitmapWidth");
410     glutStrokeCharacter = cast(pfglutStrokeCharacter)getProc("glutStrokeCharacter");
411     glutStrokeWidth = cast(pfglutStrokeWidth)getProc("glutStrokeWidth");
412     glutBitmapLength = cast(pfglutBitmapLength)getProc("glutBitmapLength");
413     glutStrokeLength = cast(pfglutStrokeLength)getProc("glutStrokeLength");
414     glutWireCube = cast(pfglutWireCube)getProc("glutWireCube");
415     glutSolidCube = cast(pfglutSolidCube)getProc("glutSolidCube");
416     glutWireSphere = cast(pfglutWireSphere)getProc("glutWireSphere");
417     glutSolidSphere = cast(pfglutSolidSphere)getProc("glutSolidSphere");
418     glutWireCone = cast(pfglutWireCone)getProc("glutWireCone");
419     glutSolidCone = cast(pfglutSolidCone)getProc("glutSolidCone");
420     glutWireTorus = cast(pfglutWireTorus)getProc("glutWireTorus");
421     glutSolidTorus = cast(pfglutSolidTorus)getProc("glutSolidTorus");
422     glutWireDodecahedron = cast(pfglutWireDodecahedron)getProc("glutWireDodecahedron");
423     glutSolidDodecahedron = cast(pfglutSolidDodecahedron)getProc("glutSolidDodecahedron");
424     glutWireOctahedron = cast(pfglutWireOctahedron)getProc("glutWireOctahedron");
425     glutSolidOctahedron = cast(pfglutSolidOctahedron)getProc("glutSolidOctahedron");
426     glutWireTetrahedron = cast(pfglutWireTetrahedron)getProc("glutWireTetrahedron");
427     glutSolidTetrahedron = cast(pfglutSolidTetrahedron)getProc("glutSolidTetrahedron");
428     glutWireIcosahedron = cast(pfglutWireIcosahedron)getProc("glutWireIcosahedron");
429     glutSolidIcosahedron = cast(pfglutSolidIcosahedron)getProc("glutSolidIcosahedron");
430     glutWireTeapot = cast(pfglutWireTeapot)getProc("glutWireTeapot");
431     glutSolidTeapot = cast(pfglutSolidTeapot)getProc("glutSolidTeapot");
432     glutGameModeString = cast(pfglutGameModeString)getProc("glutGameModeString");
433     glutEnterGameMode = cast(pfglutEnterGameMode)getProc("glutEnterGameMode");
434     glutLeaveGameMode = cast(pfglutLeaveGameMode)getProc("glutLeaveGameMode");
435     glutGameModeGet = cast(pfglutGameModeGet)getProc("glutGameModeGet");
436     glutVideoResizeGet = cast(pfglutVideoResizeGet)getProc("glutVideoResizeGet");
437     glutSetupVideoResizing = cast(pfglutSetupVideoResizing)getProc("glutSetupVideoResizing");
438     glutStopVideoResizing = cast(pfglutStopVideoResizing)getProc("glutStopVideoResizing");
439     glutVideoResize = cast(pfglutVideoResize)getProc("glutVideoResize");
440     glutVideoPan = cast(pfglutVideoPan)getProc("glutVideoPan");
441     glutSetColor = cast(pfglutSetColor)getProc("glutSetColor");
442     glutGetColor = cast(pfglutGetColor)getProc("glutGetColor");
443     glutCopyColormap = cast(pfglutCopyColormap)getProc("glutCopyColormap");
444     glutIgnoreKeyRepeat = cast(pfglutIgnoreKeyRepeat)getProc("glutIgnoreKeyRepeat");
445     glutSetKeyRepeat = cast(pfglutSetKeyRepeat)getProc("glutSetKeyRepeat");
446     glutForceJoystickFunc = cast(pfglutForceJoystickFunc)getProc("glutForceJoystickFunc");
447     glutExtensionSupported = cast(pfglutExtensionSupported)getProc("glutExtensionSupported");
448     glutReportErrors = cast(pfglutReportErrors)getProc("glutReportErrors");
449
450     version (FREEGLUT_EXTRAS) {
451         glutMainLoopEvent = cast(pfglutMainLoopEvent)getProc("glutMainLoopEvent");
452         glutLeaveMainLoop = cast(pfglutLeaveMainLoop)getProc("glutLeaveMainLoop");
453         glutMouseWheelFunc = cast(pfglutMouseWheelFunc)getProc("glutMouseWheelFunc");
454         glutCloseFunc = cast(pfglutCloseFunc)getProc("glutCloseFunc");
455         glutWMCloseFunc = cast(pfglutWMCloseFunc)getProc("glutWMCloseFunc");
456         glutMenuDestroyFunc = cast(pfglutMenuDestroyFunc)getProc("glutMenuDestroyFunc");
457         glutSetOption = cast(pfglutSetOption)getProc("glutSetOption");
458         glutGetWindowData = cast(pfglutGetWindowData)getProc("glutGetWindowData");
459         glutSetWindowData = cast(pfglutSetWindowData)getProc("glutSetWindowData");
460         glutGetMenuData = cast(pfglutGetMenuData)getProc("glutGetMenuData");
461         glutSetMenuData = cast(pfglutSetMenuData)getProc("glutSetMenuData");
462         glutBitmapHeight = cast(pfglutBitmapHeight)getProc("glutBitmapHeight");
463         glutStrokeHeight = cast(pfglutStrokeHeight)getProc("glutStrokeHeight");
464         glutBitmapString = cast(pfglutBitmapString)getProc("glutBitmapString");
465         glutStrokeString = cast(pfglutStrokeString)getProc("glutStrokeString");
466         glutWireRhombicDodecahedron = cast(pfglutWireRhombicDodecahedron)getProc("glutWireRhombicDodecahedron");
467         glutSolidRhombicDodecahedron = cast(pfglutSolidRhombicDodecahedron)getProc("glutSolidRhombicDodecahedron");
468         glutWireSierpinskiSponge = cast(pfglutWireSierpinskiSponge)getProc("glutWireSierpinskiSponge");
469         glutSolidSierpinskiSponge = cast(pfglutSolidSierpinskiSponge)getProc("glutSolidSierpinskiSponge");
470         glutWireCylinder = cast(pfglutWireCylinder)getProc("glutWireCylinder");
471         glutSolidCylinder = cast(pfglutSolidCylinder)getProc("glutSolidCylinder");
472         glutGetProcAddress = cast(pfglutGetProcAddress)getProc("glutGetProcAddress");
473     }
474 }
475
476 static ~this() {
477     ExeModule_Release(glutdrv);
478 }
479
480 typedef GLvoid function(GLchar, GLint, GLint) KB_callback;
481 typedef GLvoid function() Display_callback;
482 typedef GLvoid function() GLUTproc;
483
484 private alias GLvoid function() fn_V;
485 private alias GLvoid function(GLubyte, GLint, GLint) fn_VuBII;
486 private alias GLvoid function(GLint) fn_VI;
487 private alias GLvoid function(GLint, GLint) fn_VII;
488 private alias GLvoid function(GLint, GLint, GLint) fn_VIII;
489 private alias GLvoid function(GLint, GLint, GLint, GLint) fn_VIIII;
490 private alias GLvoid function(GLuint, GLint, GLint, GLint) fn_VuIIII;
491
492 version (Windows) {
493     extern (Windows):
494 } else {
495     extern (C):
496 }
497 typedef GLvoid function(GLint*, GLchar**) pfglutInit;
498 typedef GLvoid function(GLint, GLint) pfglutInitWindowPosition;
499 typedef GLvoid function(GLint, GLint) pfglutInitWindowSize;
500 typedef GLvoid function(GLuint) pfglutInitDisplayMode;
501 typedef GLvoid function(GLchar*) pfglutInitDisplayString;
502 typedef GLvoid function() pfglutMainLoop;
503 typedef GLint function(GLchar*) pfglutCreateWindow;
504 typedef GLint function(GLint, GLint, GLint, GLint, GLint) pfglutCreateSubWindow;
505 typedef GLvoid function(GLint) pfglutDestroyWindow;
506 typedef GLvoid function(GLint) pfglutSetWindow;
507 typedef GLint function() pfglutGetWindow;
508 typedef GLvoid function(GLchar*) pfglutSetWindowTitle;
509 typedef GLvoid function(GLchar*) pfglutSetIconTitle;
510 typedef GLvoid function(GLint, GLint) pfglutReshapeWindow;
511 typedef GLvoid function(GLint, GLint) pfglutPositionWindow;
512 typedef GLvoid function() pfglutShowWindow;
513 typedef GLvoid function() pfglutHideWindow;
514 typedef GLvoid function() pfglutIconifyWindow;
515 typedef GLvoid function() pfglutPushWindow;
516 typedef GLvoid function() pfglutPopWindow;
517 typedef GLvoid function() pfglutFullScreen;
518 typedef GLvoid function(GLint) pfglutPostWindowRedisplay;
519 typedef GLvoid function() pfglutPostRedisplay;
520 typedef GLvoid function() pfglutSwapBuffers;
521 typedef GLvoid function(GLint, GLint) pfglutWarpPointer;
522 typedef GLvoid function(GLint) pfglutSetCursor;
523 typedef GLvoid function() pfglutEstablishOverlay;
524 typedef GLvoid function() pfglutRemoveOverlay;
525 typedef GLvoid function(GLenum) pfglutUseLayer;
526 typedef GLvoid function() pfglutPostOverlayRedisplay;
527 typedef GLvoid function(GLint) pfglutPostWindowOverlayRedisplay;
528 typedef GLvoid function() pfglutShowOverlay;
529 typedef GLvoid function() pfglutHideOverlay;
530 typedef GLint function(fn_VI) pfglutCreateMenu;
531 typedef GLvoid function(GLint) pfglutDestroyMenu;
532 typedef GLint function() pfglutGetMenu;
533 typedef GLvoid function(GLint) pfglutSetMenu;
534 typedef GLvoid function(GLchar*, GLint) pfglutAddMenuEntry;
535 typedef GLvoid function(GLchar*, GLint) pfglutAddSubMenu;
536 typedef GLvoid function(GLint, GLchar*, GLint) pfglutChangeToMenuEntry;
537 typedef GLvoid function(GLint, GLchar*, GLint) pfglutChangeToSubMenu;
538 typedef GLvoid function(GLint) pfglutRemoveMenuItem;
539 typedef GLvoid function(GLint) pfglutAttachMenu;
540 typedef GLvoid function(GLint) pfglutDetachMenu;
541 typedef GLvoid function(GLuint, fn_VI, GLint) pfglutTimerFunc;
542 typedef GLvoid function(fn_V) pfglutIdleFunc;
543 typedef GLvoid function(KB_callback) pfglutKeyboardFunc;
544 typedef GLvoid function(fn_VIII) pfglutSpecialFunc;
545 typedef GLvoid function(fn_VII) pfglutReshapeFunc;
546 typedef GLvoid function(fn_VI) pfglutVisibilityFunc;
547 typedef GLvoid function(Display_callback) pfglutDisplayFunc;
548 typedef GLvoid function(fn_VIIII) pfglutMouseFunc;
549 typedef GLvoid function(fn_VII) pfglutMotionFunc;
550 typedef GLvoid function(fn_VII) pfglutPassiveMotionFunc;
551 typedef GLvoid function(fn_VI) pfglutEntryFunc;
552 typedef GLvoid function(fn_VuBII) pfglutKeyboardUpFunc;
553 typedef GLvoid function(KB_callback) pfglutSpecialUpFunc;
554 typedef GLvoid function(fn_VuIIII, GLint) pfglutJoystickFunc;
555 typedef GLvoid function(fn_VI) pfglutMenuStateFunc;
556 typedef GLvoid function(fn_VIII) pfglutMenuStatusFunc;
557 typedef GLvoid function(Display_callback) pfglutOverlayDisplayFunc;
558 typedef GLvoid function(fn_VI) pfglutWindowStatusFunc;
559 typedef GLvoid function(fn_VIII) pfglutSpaceballMotionFunc;
560 typedef GLvoid function(fn_VIII) pfglutSpaceballRotateFunc;
561 typedef GLvoid function(fn_VII) pfglutSpaceballButtonFunc;
562 typedef GLvoid function(fn_VII) pfglutButtonBoxFunc;
563 typedef GLvoid function(fn_VII) pfglutDialsFunc;
564 typedef GLvoid function(fn_VII) pfglutTabletMotionFunc;
565 typedef GLvoid function(fn_VIIII) pfglutTabletButtonFunc;
566 typedef GLint function(GLenum) pfglutGet;
567 typedef GLint function(GLenum) pfglutDeviceGet;
568 typedef GLint function() pfglutGetModifiers;
569 typedef GLint function(GLenum) pfglutLayerGet;
570 typedef GLvoid function(GLvoid*, GLint) pfglutBitmapCharacter;
571 typedef GLint function(GLvoid*, GLint) pfglutBitmapWidth;
572 typedef GLvoid function(GLvoid*, GLint) pfglutStrokeCharacter;
573 typedef GLint function(GLvoid*, GLint) pfglutStrokeWidth;
574 typedef GLint function(GLvoid*, GLubyte*) pfglutBitmapLength;
575 typedef GLint function(GLvoid*, GLubyte*) pfglutStrokeLength;
576 typedef GLvoid function(GLdouble) pfglutWireCube;
577 typedef GLvoid function(GLdouble) pfglutSolidCube;
578 typedef GLvoid function(GLdouble, GLint, GLint) pfglutWireSphere;
579 typedef GLvoid function(GLdouble, GLint, GLint) pfglutSolidSphere;
580 typedef GLvoid function(GLdouble, GLdouble, GLint, GLint) pfglutWireCone;
581 typedef GLvoid function(GLdouble, GLdouble, GLint, GLint) pfglutSolidCone;
582 typedef GLvoid function(GLdouble, GLdouble, GLint, GLint) pfglutWireTorus;
583 typedef GLvoid function(GLdouble, GLdouble, GLint, GLint) pfglutSolidTorus;
584 typedef GLvoid function() pfglutWireDodecahedron;
585 typedef GLvoid function() pfglutSolidDodecahedron;
586 typedef GLvoid function() pfglutWireOctahedron;
587 typedef GLvoid function() pfglutSolidOctahedron;
588 typedef GLvoid function() pfglutWireTetrahedron;
589 typedef GLvoid function() pfglutSolidTetrahedron;
590 typedef GLvoid function() pfglutWireIcosahedron;
591 typedef GLvoid function() pfglutSolidIcosahedron;
592 typedef GLvoid function(GLdouble) pfglutWireTeapot;
593 typedef GLvoid function(GLdouble) pfglutSolidTeapot;
594 typedef GLvoid function(GLchar*) pfglutGameModeString;
595 typedef GLint function() pfglutEnterGameMode;
596 typedef GLvoid function() pfglutLeaveGameMode;
597 typedef GLint function(GLenum) pfglutGameModeGet;
598 typedef GLint function(GLenum) pfglutVideoResizeGet;
599 typedef GLvoid function() pfglutSetupVideoResizing;
600 typedef GLvoid function() pfglutStopVideoResizing;
601 typedef GLvoid function(GLint, GLint, GLint, GLint) pfglutVideoResize;
602 typedef GLvoid function(GLint, GLint, GLint, GLint) pfglutVideoPan;
603 typedef GLvoid function(GLint, GLfloat, GLfloat, GLfloat) pfglutSetColor;
604 typedef GLfloat function(GLint, GLint) pfglutGetColor;
605 typedef GLvoid function(GLint) pfglutCopyColormap;
606 typedef GLvoid function(GLint) pfglutIgnoreKeyRepeat;
607 typedef GLvoid function(GLint) pfglutSetKeyRepeat;
608 typedef GLvoid function() pfglutForceJoystickFunc;
609 typedef GLint function(GLchar*) pfglutExtensionSupported;
610 typedef GLvoid function() pfglutReportErrors;
611
612 pfglutInit          glutInit;
613 pfglutInitWindowPosition    glutInitWindowPosition;
614 pfglutInitWindowSize        glutInitWindowSize;
615 pfglutInitDisplayMode       glutInitDisplayMode;
616 pfglutInitDisplayString     glutInitDisplayString;
617 pfglutMainLoop          glutMainLoop;
618 pfglutCreateWindow      glutCreateWindow;
619 pfglutCreateSubWindow       glutCreateSubWindow;
620 pfglutDestroyWindow     glutDestroyWindow;
621 pfglutSetWindow         glutSetWindow;
622 pfglutGetWindow         glutGetWindow;
623 pfglutSetWindowTitle        glutSetWindowTitle;
624 pfglutSetIconTitle      glutSetIconTitle;
625 pfglutReshapeWindow     glutReshapeWindow;
626 pfglutPositionWindow        glutPositionWindow;
627 pfglutShowWindow        glutShowWindow;
628 pfglutHideWindow        glutHideWindow;
629 pfglutIconifyWindow     glutIconifyWindow;
630 pfglutPushWindow        glutPushWindow;
631 pfglutPopWindow         glutPopWindow;
632 pfglutFullScreen        glutFullScreen;
633 pfglutPostWindowRedisplay   glutPostWindowRedisplay;
634 pfglutPostRedisplay     glutPostRedisplay;
635 pfglutSwapBuffers       glutSwapBuffers;
636 pfglutWarpPointer       glutWarpPointer;
637 pfglutSetCursor         glutSetCursor;
638 pfglutEstablishOverlay      glutEstablishOverlay;
639 pfglutRemoveOverlay     glutRemoveOverlay;
640 pfglutUseLayer          glutUseLayer;
641 pfglutPostOverlayRedisplay  glutPostOverlayRedisplay;
642 pfglutPostWindowOverlayRedisplay glutPostWindowOverlayRedisplay;
643 pfglutShowOverlay       glutShowOverlay;
644 pfglutHideOverlay       glutHideOverlay;
645 pfglutCreateMenu        glutCreateMenu;
646 pfglutDestroyMenu       glutDestroyMenu;
647 pfglutGetMenu           glutGetMenu;
648 pfglutSetMenu           glutSetMenu;
649 pfglutAddMenuEntry      glutAddMenuEntry;
650 pfglutAddSubMenu        glutAddSubMenu;
651 pfglutChangeToMenuEntry     glutChangeToMenuEntry;
652 pfglutChangeToSubMenu       glutChangeToSubMenu;
653 pfglutRemoveMenuItem        glutRemoveMenuItem;
654 pfglutAttachMenu        glutAttachMenu;
655 pfglutDetachMenu        glutDetachMenu;
656 pfglutTimerFunc         glutTimerFunc;
657 pfglutIdleFunc          glutIdleFunc;
658 pfglutKeyboardFunc      glutKeyboardFunc;
659 pfglutSpecialFunc       glutSpecialFunc;
660 pfglutReshapeFunc       glutReshapeFunc;
661 pfglutVisibilityFunc        glutVisibilityFunc;
662 pfglutDisplayFunc       glutDisplayFunc;
663 pfglutMouseFunc         glutMouseFunc;
664 pfglutMotionFunc        glutMotionFunc;
665 pfglutPassiveMotionFunc     glutPassiveMotionFunc;
666 pfglutEntryFunc         glutEntryFunc;
667 pfglutKeyboardUpFunc        glutKeyboardUpFunc;
668 pfglutSpecialUpFunc     glutSpecialUpFunc;
669 pfglutJoystickFunc      glutJoystickFunc;
670 pfglutMenuStateFunc     glutMenuStateFunc;
671 pfglutMenuStatusFunc        glutMenuStatusFunc;
672 pfglutOverlayDisplayFunc    glutOverlayDisplayFunc;
673 pfglutWindowStatusFunc      glutWindowStatusFunc;
674 pfglutSpaceballMotionFunc   glutSpaceballMotionFunc;
675 pfglutSpaceballRotateFunc   glutSpaceballRotateFunc;
676 pfglutSpaceballButtonFunc   glutSpaceballButtonFunc;
677 pfglutButtonBoxFunc     glutButtonBoxFunc;
678 pfglutDialsFunc         glutDialsFunc;
679 pfglutTabletMotionFunc      glutTabletMotionFunc;
680 pfglutTabletButtonFunc      glutTabletButtonFunc;
681 pfglutGet           glutGet;
682 pfglutDeviceGet         glutDeviceGet;
683 pfglutGetModifiers      glutGetModifiers;
684 pfglutLayerGet          glutLayerGet;
685 pfglutBitmapCharacter       glutBitmapCharacter;
686 pfglutBitmapWidth       glutBitmapWidth;
687 pfglutStrokeCharacter       glutStrokeCharacter;
688 pfglutStrokeWidth       glutStrokeWidth;
689 pfglutBitmapLength      glutBitmapLength;
690 pfglutStrokeLength      glutStrokeLength;
691 pfglutWireCube          glutWireCube;
692 pfglutSolidCube         glutSolidCube;
693 pfglutWireSphere        glutWireSphere;
694 pfglutSolidSphere       glutSolidSphere;
695 pfglutWireCone          glutWireCone;
696 pfglutSolidCone         glutSolidCone;
697 pfglutWireTorus         glutWireTorus;
698 pfglutSolidTorus        glutSolidTorus;
699 pfglutWireDodecahedron      glutWireDodecahedron;
700 pfglutSolidDodecahedron     glutSolidDodecahedron;
701 pfglutWireOctahedron        glutWireOctahedron;
702 pfglutSolidOctahedron       glutSolidOctahedron;
703 pfglutWireTetrahedron       glutWireTetrahedron;
704 pfglutSolidTetrahedron      glutSolidTetrahedron;
705 pfglutWireIcosahedron       glutWireIcosahedron;
706 pfglutSolidIcosahedron      glutSolidIcosahedron;
707 pfglutWireTeapot        glutWireTeapot;
708 pfglutSolidTeapot       glutSolidTeapot;
709 pfglutGameModeString        glutGameModeString;
710 pfglutEnterGameMode     glutEnterGameMode;
711 pfglutLeaveGameMode     glutLeaveGameMode;
712 pfglutGameModeGet       glutGameModeGet;
713 pfglutVideoResizeGet        glutVideoResizeGet;
714 pfglutSetupVideoResizing    glutSetupVideoResizing;
715 pfglutStopVideoResizing     glutStopVideoResizing;
716 pfglutVideoResize       glutVideoResize;
717 pfglutVideoPan          glutVideoPan;
718 pfglutSetColor          glutSetColor;
719 pfglutGetColor          glutGetColor;
720 pfglutCopyColormap      glutCopyColormap;
721 pfglutIgnoreKeyRepeat       glutIgnoreKeyRepeat;
722 pfglutSetKeyRepeat      glutSetKeyRepeat;
723 pfglutForceJoystickFunc     glutForceJoystickFunc;
724 pfglutExtensionSupported    glutExtensionSupported;
725 pfglutReportErrors      glutReportErrors;
726
727 /*
728  * FreeGlut extra functions
729  */
730 version (FREEGLUT_EXTRAS) {
731     typedef GLvoid function() pfglutMainLoopEvent;
732     typedef GLvoid function() pfglutLeaveMainLoop;
733     typedef GLvoid function(fn_VIIII) pfglutMouseWheelFunc;
734     typedef GLvoid function(fn_V) pfglutCloseFunc;
735     typedef GLvoid function(fn_V) pfglutWMCloseFunc;
736     typedef GLvoid function(fn_V) pfglutMenuDestroyFunc;
737     typedef GLvoid function(GLenum, GLint) pfglutSetOption;
738     typedef GLvoid* function() pfglutGetWindowData;
739     typedef GLvoid function(GLvoid*) pfglutSetWindowData;
740     typedef GLvoid* function() pfglutGetMenuData;
741     typedef GLvoid function(GLvoid*) pfglutSetMenuData;
742     typedef GLint function(GLvoid*) pfglutBitmapHeight;
743     typedef GLfloat function(GLvoid*) pfglutStrokeHeight;
744     typedef GLvoid function(GLvoid*, GLchar*) pfglutBitmapString;
745     typedef GLvoid function(GLvoid*, GLchar*) pfglutStrokeString;
746     typedef GLvoid function() pfglutWireRhombicDodecahedron;
747     typedef GLvoid function() pfglutSolidRhombicDodecahedron;
748     typedef GLvoid function(GLint, GLdouble[3], GLdouble) pfglutWireSierpinskiSponge;
749     typedef GLvoid function(GLint, GLdouble[3], GLdouble) pfglutSolidSierpinskiSponge;
750     typedef GLvoid function(GLdouble, GLdouble, GLint, GLint) pfglutWireCylinder;
751     typedef GLvoid function(GLdouble, GLdouble, GLint, GLint) pfglutSolidCylinder;
752     typedef GLUTproc function(GLchar*) pfglutGetProcAddress;
753
754     pfglutMainLoopEvent     glutMainLoopEvent;
755     pfglutLeaveMainLoop     glutLeaveMainLoop;
756     pfglutMouseWheelFunc        glutMouseWheelFunc;
757     pfglutCloseFunc         glutCloseFunc;
758     pfglutWMCloseFunc       glutWMCloseFunc;
759     pfglutMenuDestroyFunc       glutMenuDestroyFunc;
760     pfglutSetOption         glutSetOption;
761     pfglutGetWindowData     glutGetWindowData;
762     pfglutSetWindowData     glutSetWindowData;
763     pfglutGetMenuData       glutGetMenuData;
764     pfglutSetMenuData       glutSetMenuData;
765     pfglutBitmapHeight      glutBitmapHeight;
766     pfglutStrokeHeight      glutStrokeHeight;
767     pfglutBitmapString      glutBitmapString;
768     pfglutStrokeString      glutStrokeString;
769     pfglutWireRhombicDodecahedron   glutWireRhombicDodecahedron;
770     pfglutSolidRhombicDodecahedron  glutSolidRhombicDodecahedron;
771     pfglutWireSierpinskiSponge  glutWireSierpinskiSponge;
772     pfglutSolidSierpinskiSponge glutSolidSierpinskiSponge;
773     pfglutWireCylinder      glutWireCylinder;
774     pfglutSolidCylinder     glutSolidCylinder;
775     pfglutGetProcAddress        glutGetProcAddress;
776 }
Note: See TracBrowser for help on using the browser.