fg_geometry: add a couple comments
[freeglut] / doc / freeglut_user_interface.html
1 <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
2 <html>
3 <head>
4         
5   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6         
7   <meta name="Author" content="John F. Fay">
8         
9   <meta name="GENERATOR" content="Mozilla/4.77 [en] (Windows NT 5.0; U) [Netscape]">
10   <title>FREEGLUT Application Program Interface</title>
11 </head>
12   <body>
13     
14 <dl>
15 <center>  
16 <h1> The Open-Source</h1>
17  </center>
18 <center>  
19 <h1> OpenGL Utility Toolkit</h1>
20  </center>
21 <center>  
22 <h1> (<i>freeglut</i> 2.0.0)</h1>
23  </center>
24 <center>  
25 <h1> Application Programming Interface</h1>
26  </center>
27 </dl>
28     
29 <center>  
30 <h1> Version 4.0</h1>
31  </center>
32     
33 <center>  
34 <h2> The <i>freeglut</i> Programming Consortium</h2>
35  </center>
36     
37 <center>  
38 <h2> July, 2003</h2>
39  </center>
40     
41 <p><br>
42  OpenGL is a trademark of Silicon Graphics, Inc. X Window System is a trademark 
43 of X Consortium, Inc.&nbsp; Spaceball is a registered trademark of Spatial 
44 Systems Inc. <br>
45  The authors have taken care in preparation of this documentation but make 
46 no expressed or implied warranty of any kind and assumes no responsibility
47  for errors or omissions. No liability is assumed for incidental or consequential
48  damages in connection with or arising from the use of information or programs
49  contained herein. <br>
50  &nbsp; </p>
51  
52 <h1> 1.0&nbsp;<a name="Contents"></a>
53   Contents</h1>
54   1.0&nbsp; <a href="#Contents">Contents</a>
55    
56 <p>2.0&nbsp; <a href="#Introduction">Introduction</a>
57   </p>
58  
59 <p>3.0&nbsp; <a href="#Background">Background</a>
60   </p>
61  
62 <blockquote>3.1&nbsp; Design Philosophy <br>
63  3.2&nbsp; Conventions <br>
64  3.3&nbsp; Terminology <br>
65  3.4&nbsp; Differences from GLUT 3.7</blockquote>
66       
67   <p><br>
68  4.0&nbsp; <a href="#Initialization">Initialization Functions</a>
69   </p>
70    
71   <blockquote>4.1&nbsp; glutInit <br>
72  4.2&nbsp; glutInitWindowPosition, glutInitWindowSize <br>
73  4.3&nbsp; glutInitDisplayMode <br>
74  4.4&nbsp; glutInitDisplayString</blockquote>
75         
76     <p><br>
77  5.0&nbsp; <a href="#EventProcessing">Event Processing Functions</a>
78   </p>
79      
80     <blockquote>5.1&nbsp; glutMainLoop <br>
81  5.2&nbsp; glutMainLoopEvent <br>
82  5.3&nbsp; glutLeaveMainLoop</blockquote>
83           
84       <p><br>
85  6.0&nbsp; <a href="#Window">Window Functions</a>
86   </p>
87        
88       <blockquote>6.1&nbsp; glutCreateWindow <br>
89  6.2&nbsp; glutCreateSubwindow <br>
90  6.3&nbsp; glutDestroyWindow <br>
91  6.4&nbsp; glutSetWindow, glutGetWindow <br>
92  6.5&nbsp; glutSetWindowTitle, glutSetIconTitle <br>
93  6.6&nbsp; glutReshapeWindow <br>
94  6.7&nbsp; glutPositionWindow <br>
95  6.8&nbsp; glutShowWindow, glutHideWindow, glutIconifyWindow <br>
96  6.9&nbsp; glutPushWindow, glutPopWindow <br>
97  6.10&nbsp; glutFullScreen</blockquote>
98             
99         <p><br>
100  7.0&nbsp; <a href="#Display">Display Functions</a>
101   </p>
102          
103         <blockquote>7.1&nbsp; glutPostRedisplay <br>
104  7.2&nbsp; glutPostWindowRedisplay <br>
105  7.3&nbsp; glutSwapBuffers</blockquote>
106               
107           <p><br>
108  8.0&nbsp; <a href="#MouseCursor">Mouse Cursor Functions</a>
109   </p>
110            
111           <blockquote>8.1&nbsp; glutSetCursor <br>
112  8.2&nbsp; glutWarpPointer</blockquote>
113                 
114             <p><br>
115  9.0&nbsp; <a href="#Overlay">Overlay Functions</a>
116   </p>
117              
118             <blockquote>9.1&nbsp; glutEstablishOverlay <br>
119  9.2&nbsp; glutRemoveOverlay <br>
120  9.3&nbsp; glutUseLayer <br>
121  9.4&nbsp; glutPostOverlayRedisplay <br>
122  9.5&nbsp; glutPostWindowOverlayRedisplay <br>
123  9.6&nbsp; glutShowOverlay, glutHideOverlay</blockquote>
124                   
125               <p><br>
126  10.0&nbsp; <a href="#Menu">Menu Functions</a>
127   </p>
128                
129               <blockquote>10.1&nbsp; glutCreateMenu <br>
130  10.2&nbsp; glutDestroyMenu <br>
131  10.3&nbsp; glutGetMenu, glutSetMenu <br>
132  10.4&nbsp; glutAddMenuEntry <br>
133  10.5&nbsp; glutAddSubMenu <br>
134  10.6&nbsp; glutChangeToMenuEntry <br>
135  10.7&nbsp; glutChangeToSubMenu <br>
136  10.8&nbsp; glutRemoveMenuItem <br>
137  10.9&nbsp; glutAttachMenu, glutDetachMenu</blockquote>
138                     
139                 <p><br>
140  11.0&nbsp; <a href="#GlobalCallback">Global Callback Registration Functions</a>
141   </p>
142                  
143                 <blockquote>11.1&nbsp; glutTimerFunc <br>
144  11.2&nbsp; glutIdleFunc</blockquote>
145                       
146                   <p><br>
147  12.0&nbsp; <a href="#WindowCallback">Window-Specific Callback Registration
148  Functions</a>
149   </p>
150                    
151                   <blockquote>12.1&nbsp; glutDisplayFunc <br>
152  12.2&nbsp; glutOverlayDisplayFunc <br>
153  12.3&nbsp; glutReshapeFunc <br>
154  12.4&nbsp; glutCloseFunc <br>
155  12.5&nbsp; glutKeyboardFunc <br>
156  12.6&nbsp; glutSpecialFunc <br>
157  12.7&nbsp; glutKeyboardUpFunc <br>
158  12.8&nbsp; glutSpecialUpFunc <br>
159  12.9&nbsp; glutMouseFunc <br>
160  12.10&nbsp; glutMotionFunc, glutPassiveMotionFunc <br>
161  12.11&nbsp; glutVisibilityFunc <br>
162  12.12&nbsp; glutEntryFunc <br>
163  12.13&nbsp; glutJoystickFunc <br>
164  12.14&nbsp; glutSpaceballMotionFunc <br>
165  12.15&nbsp; glutSpaceballRotateFunc <br>
166  12.16&nbsp; glutSpaceballButtonFunc <br>
167  12.17&nbsp; glutButtonBoxFunc <br>
168  12.18&nbsp; glutDialsFunc <br>
169  12.19&nbsp; glutTabletMotionFunc <br>
170  12.20&nbsp; glutTabletButtonFunc                      
171                     <p>12.21&nbsp; glutMenuStatusFunc <br>
172  12.22&nbsp; glutWindowStatusFunc</p>
173                      </blockquote>
174                         
175                     <p><br>
176  13.0&nbsp; <a href="#StateSetting">State Setting and Retrieval Functions</a>
177   </p>
178                      
179                     <blockquote>13.1&nbsp; glutSetOption <br>
180  13.2&nbsp; glutGet <br>
181  13.3&nbsp; glutDeviceGet <br>
182  13.4&nbsp; glutGetModifiers <br>
183  13.5&nbsp; glutLayerGet <br>
184  13.6&nbsp; glutExtensionSupported<br>
185 13.7 &nbsp;glutGetProcAddress<br>
186                       </blockquote>
187                        
188                       <p><br>
189  14.0&nbsp; <a href="#FontRendering">Font Rendering Functions</a>
190   </p>
191                        
192                       <blockquote>14.1&nbsp; glutBitmapCharacter <br>
193  14.2&nbsp; glutBitmapString <br>
194  14.3&nbsp; glutBitmapWidth <br>
195  14.4&nbsp; glutBitmapLength <br>
196  14.5&nbsp; glutBitmapHeight <br>
197  14.6&nbsp; glutStrokeCharacter <br>
198  14.7&nbsp; glutStrokeString <br>
199  14.8&nbsp; glutStrokeWidth <br>
200  14.9&nbsp; glutStrokeLength <br>
201  14.10&nbsp; glutStrokeHeight</blockquote>
202                             
203                         <p><br>
204  15.0&nbsp; <a href="#GeometricObject">Geometric Object Rendering Functions</a>
205   </p>
206                          
207                         <blockquote>15.1&nbsp; glutWireSphere, glutSolidSphere
208                            <br>
209  15.2&nbsp; glutWireTorus, glutSolidTorus <br>
210  15.3&nbsp; glutWireCone, glutSolidCone <br>
211  15.4&nbsp; glutWireCube, glutSolidCube <br>
212  15.5&nbsp; glutWireTetrahedron, glutSolidTetrahedron <br>
213  15.6&nbsp; glutWireOctahedron, glutSolidOctahedron <br>
214  15.7&nbsp; glutWireDodecahedron, glutSolidDodecahedron <br>
215  15.8&nbsp; glutWireIcosahedron, glutSolidIcosahedron <br>
216  15.9&nbsp; glutWireRhombicDodecahedron, glutSolidRhombicDodecahedron <br>
217  15.10&nbsp; glutWireTeapot, glutSolidTeapot</blockquote>
218                               
219                           <p><br>
220  16.0&nbsp; <a href="#GameMode">Game Mode Functions</a>
221   </p>
222                            
223                           <blockquote>16.1&nbsp; glutGameModeString <br>
224  16.2&nbsp; glutEnterGameMode, glutLeaveGameMode <br>
225  16.3&nbsp; glutGameModeGet</blockquote>
226                                 
227                             <p><br>
228  17.0&nbsp; <a href="#VideoResize">Video Resize Functions</a>
229   </p>
230                              
231                             <blockquote>17.1&nbsp; glutVideoResizeGet <br>
232  17.2&nbsp; glutSetupVideoResizing, glutStopVideoResizing <br>
233  17.3&nbsp; glutVideoResize <br>
234  17.4&nbsp; glutVideoPan</blockquote>
235                                   
236                               <p><br>
237  18.0&nbsp; <a href="#ColorMap">Color Map Functions</a>
238   </p>
239                                
240                               <blockquote>18.1&nbsp; glutSetColor, glutGetColor
241                                  <br>
242  18.2&nbsp; glutCopyColormap</blockquote>
243                                     
244                                 <p><br>
245  19.0&nbsp; <a href="#Miscellaneous">Miscellaneous Functions</a>
246   </p>
247                                  
248                                 <blockquote>19.1&nbsp; glutIgnoreKeyRepeat, 
249 glutSetKeyRepeat <br>
250  19.2&nbsp; glutForceJoystickFunc <br>
251  19.3&nbsp; glutReportErrors</blockquote>
252                                       
253                                   <p><br>
254  20.0&nbsp; <a href="#UsageNotes">Usage Notes</a>
255   </p>
256                                    
257                                   <p>21.0&nbsp; <a href="#ImplementationNotes">
258  Implementation Notes</a>
259   </p>
260                                    
261                                   <p>22.0&nbsp; <a href="#GLUT_State">GLUT 
262 State</a>
263   </p>
264                                    
265                                   <p>23.0&nbsp; <a href="#Freeglut.h_Header">
266  "freeglut.h" Header File</a>
267   </p>
268                                    
269                                   <p>24.0&nbsp; <a href="#References">References</a>
270   </p>
271                                    
272                                   <p>25.0&nbsp; <a href="#Index">Index</a>
273   <br>
274  &nbsp; <br>
275  &nbsp; </p>
276                                    
277                                   <h1> 2.0&nbsp;<a name="Introduction"></a>
278   Introduction</h1>
279   &nbsp;                                    
280                                   <h1> 3.0&nbsp;<a name="Background"></a>
281   Background</h1>
282   The OpenGL programming world owes a tremendous debt to Mr. Mark J. Kilgard
283  for writing the OpenGL Utility Toolkit, or GLUT.&nbsp; The GLUT library
284 of functions allows an application programmer to create, control, and manipulate
285  windows independent of what operating system the program is running on.&nbsp;
286  By hiding the dependency on the operating system from the application programmer,
287  he allowed people to write truly portable OpenGL applications.         
288                           
289                                   <p>&nbsp;&nbsp;&nbsp; Mr. Kilgard copyrighted 
290 his library and gave it a rather unusual license.&nbsp; Under his license, 
291 people are allowed freely to copy and distribute the libraries and the source 
292 code, but they are not allowed to modify it.&nbsp; For a long time this did 
293 not matter because the GLUT library worked so well and because Mr. Kilgard 
294 was releasing updates on a regular basis.&nbsp; But with the passage of time, 
295 people started wanting some slightly different behaviours in their windowing 
296 system.&nbsp; When Mr. Kilgard stopped supporting the GLUT library in 1999, 
297 having moved on to bigger and better things, this started to become a problem.
298                                    </p>
299                                    
300                                   <p>&nbsp;&nbsp;&nbsp; In December 1999, 
301 Mr. Pawel Olzsta started work on an open-source clone of the GLUT library.&nbsp; 
302 This open-source clone, which does not use any of the GLUT source code, has 
303 evolved into the present <i>freeglut</i> library.&nbsp; This documentation 
304 specifies the application program interface to the <i>freeglut</i> library.
305                                    </p>
306                                    
307                                   <h2> 3.1&nbsp; Design Philosophy</h2>
308                                       
309                                   <h2> 3.2&nbsp; Conventions</h2>
310                                       
311                                   <h2> 3.3&nbsp; Terminology</h2>
312                                       
313                                   <h2> 3.4&nbsp; Differences from GLUT 3.7</h2>
314   Since the <i>freeglut</i> library was developed in order to update GLUT,
315  it is natural that there will be some differences between the two.&nbsp;
316 Each function in the API notes any differences between the GLUT and the <i>
317 freeglut</i>  function behaviours.&nbsp; The important ones are summarized
318 here.                                    
319                                   <h3> 3.4.1&nbsp; glutMainLoop Behaviour</h3>
320   One of the commonest complaints about the GLUT library was that once an
321 application called "<tt>glutMainLoop</tt>", it never got control back.&nbsp;
322 There was no way for an application to loop in GLUT for a while, possibly
323 as a subloop while a specific window was open, and then return to the calling
324 function.&nbsp; A new function, "<tt>glutMainLoopEvent</tt>", has been added
325 to allow this functionality.&nbsp; Another function, "<tt>glutLeaveMainLoop</tt>
326 ", has also been added to allow the application to tell <i>freeglut</i> to clean
327 up and close down.                                    
328                                   <h3> 3.4.2&nbsp; Action on Window Closure</h3>
329   Another difficulty with GLUT, especially with multiple-window programs,
330 is that if the user clicks on the "x" in the window header the application
331 exits immediately.&nbsp; The application programmer can now set an option,
332 "<tt> GLUT_ACTION_ON_WINDOW_CLOSE</tt>", to specify whether execution should
333 continue, whether GLUT should return control to the main program, or whether
334 GLUT should simply exit (the default).                                  
335  
336                                   <h3>3.4.3&nbsp; Changes to Callbacks<br>
337                                    </h3>
338  Several new callbacks have been added and several callbacks which were specific 
339 to Silicon Graphics hardware have not been implemented.&nbsp; Most or all 
340 of the new callbacks are listed in the GLUT Version 4 "glut.h" header file 
341 but did not make it into the documentation.&nbsp; The new callbacks consist 
342 of regular and special key release callbacks, a joystick callback, a window 
343 status callback, window closure callbacks, a menu closure callback, and a
344 mouse wheel callback.&nbsp; Unsupported callbacks are the three Spaceball 
345 callbacks, the ButtonBox callback, and the two Tablet 
346 callbacks.&nbsp; If the user has a need for an unsupported callback he should 
347 contact the <i>freeglut</i> development team.<br>
348                                    
349                                   <h3>3.4.4&nbsp; String Rendering<br>
350                                    </h3>
351  New functions have been added to render full character strings (including 
352 carriage returns) rather than rendering one character at a time.&nbsp; More 
353 functions return the widths of character strings and the font heights, in 
354 pixels for bitmapped fonts and in OpenGL units for the stroke fonts.<br>
355                                    
356                                   <h3>3.4.5&nbsp; Geometry Rendering<br>
357                                    </h3>
358  Functions have been added to render a wireframe and a solid rhombic
359 dodecahedron, a cylinder, and a Sierpinski sponge.                                    
360                                   <h3> 3.4.5&nbsp; Extension Function Queries</h3>
361  glutGetProcAddress is a wrapper for the glXGetProcAddressARB and wglGetProcAddress
362 functions. 
363                                   <h1> 4.0&nbsp;<a name="Initialization"></a>
364   Initialization Functions</h1>
365                                       
366                                   <h2> 4.1&nbsp; glutInit</h2>
367                                       
368                                   <h2> 4.2&nbsp; glutInitWindowPosition, glutInitWindowSize</h2>
369   The "<tt>glutInitWindowPosition</tt> " and "<tt>glutInitWindowSize</tt>
370 "  functions specify a desired position and size for windows that <i>freeglut</i>
371   will create in the future.                                    
372                                   <p><b>Usage</b> </p>
373                                    
374                                   <p><tt>void glutInitWindowPosition ( int 
375 x, int y ) ;</tt> <br>
376                                    <tt>void glutInitWindowSize ( int width, 
377 int height ) ;</tt> </p>
378                                    
379                                   <p><b>Description</b> </p>
380                                    
381                                   <p>The "<tt>glutInitWindowPosition</tt>
382   " and "<tt>glutInitWindowSize</tt>" functions specify a desired position 
383 and size for windows that <i>freeglut</i> will create in the future.&nbsp; 
384 The position is measured in pixels from the upper left hand corner of the 
385 screen, with "x" increasing to the right and "y" increasing towards the bottom 
386 of the screen.&nbsp; The size is measured in pixels.&nbsp; <i>Freeglut</i>
387   does not promise to follow these specifications in creating its windows, 
388 it certainly makes an attempt to. </p>
389                                    
390                                   <p>The position and size of a window are 
391 a matter of some subtlety.&nbsp; Most windows have a usable area surrounded 
392 by a border and with a title bar on the top.&nbsp; The border and title bar 
393 are commonly called "decorations."&nbsp; The position of the window unfortunately 
394 varies with the operating system.&nbsp; On Linux, it is the coordinates of 
395 the upper left-hand corner of its decorations.&nbsp; On Windows, it is the 
396 coordinates of the upper left hand corner of its usable interior.&nbsp; For 
397 both operating systems, the size of the window is the size of the usable interior.
398                                   </p>
399                                    
400                                   <p>Windows has some additional quirks which 
401 the application programmer should know about.&nbsp; First, the minimum y-coordinate 
402 of a window decoration is zero.&nbsp; (This is a feature of <i>freeglut</i>
403   and can be adjusted if so desired.)&nbsp; Second, there appears to be a 
404 minimum window width on Windows which is 104 pixels.&nbsp; The user may specify 
405 a smaller width, but the Windows system calls ignore it.&nbsp; It is also 
406 impossible to make a window narrower than this by dragging on its corner.
407                                    </p>
408                                    
409                                   <p><b>Changes From GLUT</b> </p>
410                                    
411                                   <p>For some reason, GLUT is not affected 
412 by the 104-pixel minimum window width.&nbsp; If the user clicks on the corner 
413 of a window which is narrower than this amount, the window will immediately 
414 snap out to this width, but the application can call "<tt>glutReshapeWindow</tt>
415   " and make a window narrower again. </p>
416                                    
417                                   <h2> 4.3&nbsp; glutInitDisplayMode</h2>
418                                       
419                                   <h2> 4.4&nbsp; glutInitDisplayString</h2>
420                                       
421                                   <h1> 5.0&nbsp;<a name="EventProcessing"></a>
422   Event Processing Functions</h1>
423   After an application has finished initializing its windows and menus, it
424  enters an event loop.&nbsp; Within this loop, <i>freeglut</i> polls the
425 data entry devices (keyboard, mouse, etc.) and calls the application's appropriate 
426 callbacks.                                    
427                                   <p>In GLUT, control never returned from 
428 the event loop (as invoked by the "<tt>glutMainLoop</tt>" function) to the 
429 calling function.&nbsp; This prevented an application from having re-entrant 
430 code, in which GLUT could be invoked from within a callback, and it prevented 
431 the application from doing any post-processing (such as freeing allocated 
432 memory) after GLUT had closed down.&nbsp; <i>Freeglut</i> allows the application 
433 programmer to specify more direct control over the event loop by means of 
434 two new functions.&nbsp; The first, "<tt>glutMainLoopEvent</tt>", processes 
435 a single iteration of the event loop and allows the application to use a different
436 event loop controller or to contain re-entrant code.&nbsp; The second, "<tt>
437 glutLeaveMainLoop</tt>", causes the event loop to exit nicely; this is preferable
438 to the application's calling "<tt>exit</tt>" from within a GLUT callback.
439                                   </p>
440                                    
441                                   <h2> 5.1&nbsp; glutMainLoop</h2>
442   The "<tt>glutMainLoop</tt>" function enters the event loop.           
443                         
444                                   <p><b>Usage</b> </p>
445                                    
446                                   <p><tt>void glutMainLoop ( void ) ;</tt>
447   </p>
448                                    
449                                   <p><b>Description</b> </p>
450                                    
451                                   <p>The&nbsp; "<tt>glutMainLoop</tt>" function 
452 causes the program to enter the window event loop.&nbsp; An application should 
453 call this function at most once.&nbsp; It will call any application callback 
454 functions as required to process mouse clicks, mouse motion, key presses, 
455 and so on. </p>
456                                    
457                                   <p><b>Changes From GLUT</b> </p>
458                                    
459                                   <p>In GLUT, there was absolutely no way 
460 for the application programmer to have control return from the "<tt>glutMainLoop</tt>
461   " function to the calling function.&nbsp; <i>Freeglut</i> allows the programmer 
462 to force this by setting the "<tt>GLUT_ACTION_ON_WINDOW_CLOSE</tt>" option 
463 and invoking the "<tt>glutLeaveMainLoop</tt>" function from one of the callbacks.&nbsp;
464  Stopping the program this way is preferable to simply calling "<tt>exit</tt>
465   " from within a callback because this allows <i>freeglut</i> to free allocated
466  memory and otherwise clean up after itself.&nbsp; (I know I just said this,
467  but I think it is important enough that it bears repeating.) </p>
468                                    
469                                   <h2> 5.2&nbsp; glutMainLoopEvent</h2>
470   The "<tt>glutMainLoopEvent</tt>" function processes a single iteration
471 in the <i>freeglut</i> event loop.                                    
472                                   <p><b>Usage</b> </p>
473                                    
474                                   <p><tt>void glutMainLoopEvent ( void ) ;</tt>
475  </p>
476                                    
477                                   <p><b>Description</b> </p>
478                                    
479                                   <p>The&nbsp; "<tt>glutMainLoopEvent</tt>
480   " function causes <i>freeglut</i> to process one iteration's worth of events 
481 in its event loop.&nbsp; This allows the application to control its own event 
482 loop and still use the <i>freeglut</i> windowing system. </p>
483                                    
484                                   <p><b>Changes From GLUT</b> </p>
485                                    
486                                   <p>GLUT does not include this function.
487                                    </p>
488                                    
489                                   <h2> 5.3&nbsp; glutLeaveMainLoop</h2>
490   The "<tt>glutLeaveMainLoop</tt>" function causes <i>freeglut</i> to stop
491  its event loop.                                    
492                                   <p><b>Usage</b> </p>
493                                    
494                                   <p><tt>void glutLeaveMainLoop ( void ) ;</tt>
495  </p>
496                                    
497                                   <p><b>Description</b> </p>
498                                    
499                                   <p>The&nbsp; "<tt>glutLeaveMainLoop</tt>
500   " function causes <i>freeglut</i> to stop the event loop.&nbsp; If the
501 "<tt>  GLUT_ACTION_ON_WINDOW_CLOSE</tt>" option has been set to "<tt>GLUT_ACTION_CONTINUE_EXECUTION</tt>
502   ", control will return to the function which called "<tt>glutMainLoop</tt>
503   "; otherwise the application will exit. </p>
504                                    
505                                   <p>If the application has two nested calls 
506 to "<tt>glutMainLoop</tt>" and calls "<tt>glutLeaveMainLoop</tt>", the behaviour 
507 of <i>freeglut</i> is undefined.&nbsp; It may leave only the inner nested 
508 loop or it may leave both loops.&nbsp; If the reader has a strong preference 
509 for one behaviour over the other he should contact the <i>freeglut</i> Programming 
510 Consortium and ask for the code to be fixed. </p>
511                                    
512                                   <p><b>Changes From GLUT</b> </p>
513                                    
514                                   <p>GLUT does not include this function.
515                                    </p>
516                                    
517                                   <h1> 6.0&nbsp;<a name="Window"></a>
518   Window Functions</h1>
519                                       
520                                   <h2> 6.1&nbsp; glutCreateWindow</h2>
521                                       
522                                   <h2> 6.2&nbsp; glutCreateSubwindow</h2>
523                                       
524                                   <h2> 6.3&nbsp; glutDestroyWindow</h2>
525                                       
526                                   <h2> 6.4&nbsp; glutSetWindow, glutGetWindow</h2>
527                                       
528                                   <h2> 6.5&nbsp; glutSetWindowTitle, glutSetIconTitle</h2>
529                                       
530                                   <h2> 6.6&nbsp; glutReshapeWindow</h2>
531                                       
532                                   <h2> 6.7&nbsp; glutPositionWindow</h2>
533                                       
534                                   <h2> 6.8&nbsp; glutShowWindow, glutHideWindow, 
535 glutIconifyWindow</h2>
536                                       
537                                   <h2> 6.9&nbsp; glutPushWindow, glutPopWindow</h2>
538                                       
539                                   <h2> 6.10&nbsp; glutFullScreen</h2>
540                                       
541                                   <h1> 7.0&nbsp;<a name="Display"></a>
542   Display Functions</h1>
543                                       
544                                   <h2> 7.1&nbsp; glutPostRedisplay</h2>
545                                       
546                                   <h2> 7.2&nbsp; glutPostWindowRedisplay</h2>
547                                       
548                                   <h2> 7.3&nbsp; glutSwapBuffers</h2>
549                                       
550                                   <h1> 8.0&nbsp;<a name="MouseCursor"></a>
551   Mouse Cursor Functions</h1>
552                                       
553                                   <h2> 8.1&nbsp; glutSetCursor</h2>
554                                       
555                                   <h2> 8.2&nbsp; glutWarpPointer</h2>
556                                       
557                                   <h1> 9.0&nbsp;<a name="Overlay"></a>
558   Overlay Functions</h1>
559   <i>Freeglut</i> does not allow overlays, although it does "answer the mail"
560  with function stubs so that GLUT-based programs can compile and link against
561                                    <i>freeglut</i> without modification.&nbsp; 
562 If the reader needs overlays, he should contact the <i>freeglut</i> Programming 
563 Consortium and ask for them to be implemented.&nbsp; He should also be prepared 
564 to assist in the implementation.                                    
565                                   <h2> 9.1&nbsp; glutEstablishOverlay</h2>
566   The "<tt>glutEstablishOverlay</tt>" function is not implemented in <i>freeglut</i>
567  .                                    
568                                   <p><b>Usage</b> </p>
569                                    
570                                   <p><tt>void glutEstablishOverlay ( void 
571 ) ;</tt> </p>
572                                    
573                                   <p><b>Description</b> </p>
574                                    
575                                   <p>The "<tt>glutEstablishOverlay</tt>" function
576 is not implemented in <i>freeglut</i>. </p>
577                                    
578                                   <p><b>Changes From GLUT</b> </p>
579                                    
580                                   <p>GLUT implements this function. </p>
581                                    
582                                   <h2> 9.2&nbsp; glutRemoveOverlay</h2>
583   The "<tt>glutRemoveOverlay</tt>" function is not implemented in <i>freeglut</i>
584  .                                    
585                                   <p><b>Usage</b> </p>
586                                    
587                                   <p><tt>void glutRemoveOverlay ( void ) ;</tt>
588  </p>
589                                    
590                                   <p><b>Description</b> </p>
591                                    
592                                   <p>The "<tt>glutRemoveOverlay</tt>" function 
593 is not implemented in <i>freeglut</i>. </p>
594                                    
595                                   <p><b>Changes From GLUT</b> </p>
596                                    
597                                   <p>GLUT implements this function. </p>
598                                    
599                                   <h2> 9.3&nbsp; glutUseLayer</h2>
600   The "<tt>glutUseLayer</tt>" function is not implemented in <i>freeglut</i>
601  .                                    
602                                   <p><b>Usage</b> </p>
603                                    
604                                   <p><tt>void glutUseLayer (&nbsp; GLenum 
605 layer ) ;</tt> </p>
606                                    
607                                   <p><b>Description</b> </p>
608                                    
609                                   <p>The "<tt>glutUseLayer</tt>" function 
610 is not implemented in <i>freeglut</i>. </p>
611                                    
612                                   <p><b>Changes From GLUT</b> </p>
613                                    
614                                   <p>GLUT implements this function. </p>
615                                    
616                                   <h2> 9.4&nbsp; glutPostOverlayRedisplay</h2>
617   The "<tt>glutPostOverlayRedisplay</tt> " function is not implemented in
618                                   <i> freeglut</i>.                     
619               
620                                   <p><b>Usage</b> </p>
621                                    
622                                   <p><tt>void glutPostOverlayRedisplay ( void
623 ) ;</tt> </p>
624                                    
625                                   <p><b>Description</b> </p>
626                                    
627                                   <p>The "<tt>glutPostOverlayRedisplay</tt>
628   " function is not implemented in <i>freeglut</i>. </p>
629                                    
630                                   <p><b>Changes From GLUT</b> </p>
631                                    
632                                   <p>GLUT implements this function. </p>
633                                    
634                                   <h2> 9.5&nbsp; glutPostWindowOverlayRedisplay</h2>
635   The "<tt>glutPostWindowOverlayRedisplay</tt> " function is not implemented
636  in <i>freeglut</i>.                                    
637                                   <p><b>Usage</b> </p>
638                                    
639                                   <p><tt>void glutPostWindowOverlayRedisplay 
640 ( int window ) ;</tt> </p>
641                                    
642                                   <p><b>Description</b> </p>
643                                    
644                                   <p>The "<tt>glutPostWindowOverlayRedisplay</tt>
645   " function is not implemented in <i>freeglut</i>. </p>
646                                    
647                                   <p><b>Changes From GLUT</b> </p>
648                                    
649                                   <p>GLUT implements this function. </p>
650                                    
651                                   <h2> 9.6&nbsp; glutShowOverlay, glutHideOverlay</h2>
652   The "<tt>glutShowOverlay</tt>" and "<tt>glutHideOverlay</tt>" functions
653 are not implemented in <i>freeglut</i> .                                
654    
655                                   <p><b>Usage</b> </p>
656                                    
657                                   <p><tt>void glutShowOverlay( void ) ;</tt>
658   <br>
659                                    <tt>void glutHideOverlay( void ) ;</tt>
660   </p>
661                                    
662                                   <p><b>Description</b> </p>
663                                    
664                                   <p>The "<tt>glutShowOverlay</tt>" and "<tt>
665 glutHideOverlay</tt>" functions are not implemented in <i>freeglut</i> .
666                                   </p>
667                                    
668                                   <p><b>Changes From GLUT</b> </p>
669                                    
670                                   <p>GLUT implements these functions. </p>
671                                    
672                                   <h1> 10.0&nbsp;<a name="Menu"></a>
673   Menu Functions</h1>
674                                       
675                                   <h2> 10.1&nbsp; glutCreateMenu</h2>
676                                       
677                                   <h2> 10.2&nbsp; glutDestroyMenu</h2>
678                                       
679                                   <h2> 10.3&nbsp; glutGetMenu, glutSetMenu</h2>
680                                       
681                                   <h2> 10.4&nbsp; glutAddMenuEntry</h2>
682                                       
683                                   <h2> 10.5&nbsp; glutAddSubMenu</h2>
684                                       
685                                   <h2> 10.6&nbsp; glutChangeToMenuEntry</h2>
686                                       
687                                   <h2> 10.7&nbsp; glutChangeToSubMenu</h2>
688                                       
689                                   <h2> 10.8&nbsp; glutRemoveMenuItem</h2>
690                                       
691                                   <h2> 10.9&nbsp; glutAttachMenu, glutDetachMenu</h2>
692                                       
693                                   <h1> 11.0&nbsp;<a name="GlobalCallback"></a>
694   Global Callback Registration Functions</h1>
695                                       
696                                   <h2> 11.1&nbsp; glutTimerFunc</h2>
697                                       
698                                   <h2> 11.2&nbsp; glutIdleFunc</h2>
699   The "<tt>glutIdleFunc</tt>" function sets the global idle callback. <i>
700 Freeglut</i>  calls the idle callback when there are no inputs from the user.
701                                    
702                                   <p><b>Usage</b> </p>
703                                    
704                                   <p><tt>void glutIdleFunc ( void (*func) 
705 ( void ) ) ;</tt> </p>
706                                    
707                                   <p><tt>func&nbsp;&nbsp;&nbsp; </tt>The new
708 global idle callback function </p>
709                                    
710                                   <p><b>Description</b> </p>
711                                    
712                                   <p>The&nbsp; "<tt>glutIdleFunc</tt>" function 
713 specifies the function that <i>freeglut</i> will call to perform background 
714 processing tasks such as continuous animation when window system events are 
715 not being received.&nbsp; If enabled, this function is called continuously 
716 from <i>freeglut</i> while no events are received.&nbsp; The callback function 
717 has no parameters and returns no value.&nbsp; <i>Freeglut</i> does not change 
718 the <i>current window</i> or the <i>current menu</i> before invoking the idle
719 callback; programs with multiple windows or menus must explicitly set the
720                                   <i>current window</i> and <i>current menu</i>
721  and not rely on its current setting. <br>
722  &nbsp;&nbsp;&nbsp; The amount of computation and rendering done in an idle 
723 callback should be minimized to avoid affecting the program's interactive
724  response.&nbsp; In general, no more than a single frame of rendering should
725  be done in a single invocation of an idle callback. <br>
726  &nbsp;&nbsp;&nbsp; Calling "<tt>glutIdleFunc</tt>" with a NULL argument
727 disables the call to an idle callback. </p>
728                                    
729                                   <p><b>Changes From GLUT</b> </p>
730                                    
731                                   <p>Application programmers should note that
732 if they have specified the "continue execution" action on window closure, 
733                                   <i>freeglut</i> will continue to call the 
734 idle callback after the user has closed a window by clicking on the "x" in 
735 the window header bar.&nbsp; If the idle callback renders a particular window 
736 (this is considered bad form but is frequently done anyway), the programmer 
737 should supply a window closure callback for that window which changes or disables
738 the idle callback. </p>
739                                    
740                                   <h1> 12.0&nbsp;<a name="WindowCallback"></a>
741   Window-Specific Callback Registration Functions</h1>
742                                       
743                                   <h2> 12.1&nbsp; glutDisplayFunc</h2>
744                                       
745                                   <h2> 12.2&nbsp; glutOverlayDisplayFunc</h2>
746                                       
747                                   <h2> 12.3&nbsp; glutReshapeFunc</h2>
748                                       
749                                   <h2> 12.4&nbsp; glutCloseFunc</h2>
750                                       
751                                   <h2> 12.5&nbsp; glutKeyboardFunc</h2>
752                                       
753                                   <h2> 12.6&nbsp; glutSpecialFunc</h2>
754   The "<tt>glutSpecialFunc</tt>" function sets the window's special key press
755  callback. <i>Freeglut</i> calls the special key press callback when the
756 user presses a special key.                                    
757                                   <p><b>Usage</b> </p>
758                                    
759                                   <p><tt>void glutSpecialFunc ( void (*func) 
760 ( int key, int x, int y ) ) ;</tt> </p>
761                                    
762                                   <p><tt>func&nbsp;&nbsp;&nbsp; </tt>The window's
763 new special key press callback function <br>
764                                    <tt>key&nbsp;&nbsp;&nbsp;&nbsp; </tt>The 
765 key whose press triggers the callback <br>
766                                    <tt>x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
767                                   </tt>The x-coordinate of the mouse relative 
768 to the window at the time the key is pressed <br>
769                                    <tt>y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
770                                   </tt>The y-coordinate of the mouse relative 
771 to the window at the time the key is pressed </p>
772                                    
773                                   <p><b>Description</b> </p>
774                                    
775                                   <p>The&nbsp; "<tt>glutSpecialFunc</tt>" 
776 function specifies the function that <i>freeglut</i> will call when the user 
777 presses a special key on the keyboard.&nbsp; The callback function has one 
778 argument:&nbsp; the name of the function to be invoked ("called back") at 
779 the time at which the special key is pressed.&nbsp; The function returns no
780 value.&nbsp; <i>Freeglut</i> sets the <i>current window</i> to the window 
781 which is active when the callback is invoked.&nbsp; "Special keys" are the 
782 function keys, the arrow keys, the Page Up and Page Down keys, and the Insert 
783 key.&nbsp; The Delete key is considered to be a regular key. <br>
784  &nbsp;&nbsp;&nbsp; Calling "<tt>glutSpecialUpFunc</tt>" with a NULL argument 
785 disables the call to the window's special key press callback. </p>
786                                    
787                                   <p>&nbsp;&nbsp;&nbsp; The "<tt>key</tt>
788 " argument may take one of the following defined constant values: </p>
789                                    
790                                   <ul>
791   <li> <tt>GLUT_KEY_F1, GLUT_KEY_F2, ..., GLUT_KEY_F12</tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
792  - F1 through F12 keys</li>
793    <li> <tt>GLUT_KEY_PAGE_UP, GLUT_KEY_PAGE_DOWN</tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
794  - Page Up and Page Down keys</li>
795    <li> <tt>GLUT_KEY_HOME, GLUT_KEY_END</tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
796  - Home and End keys</li>
797    <li> <tt>GLUT_KEY_LEFT, GLUT_KEY_RIGHT, GLUT_KEY_UP, GLUT_KEY_DOWN</tt>
798   - arrow keys</li>
799    <li> <tt>GLUT_KEY_INSERT</tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
800  - Insert key</li>
801                                      
802                                   </ul>
803   <b>Changes From GLUT</b>                                    
804                                   <p>None. </p>
805                                    
806                                   <h2> 12.7&nbsp; glutKeyboardUpFunc</h2>
807   The "<tt>glutKeyboardUpFunc</tt>" function sets the window's key release
808  callback. <i>Freeglut</i> calls the key release callback when the user releases 
809 a key.                                    
810                                   <p><b>Usage</b> </p>
811                                    
812                                   <p><tt>void glutKeyboardUpFunc ( void (*func) 
813 ( unsigned char key, int x, int y ) ) ;</tt> </p>
814                                    
815                                   <p><tt>func&nbsp;&nbsp;&nbsp; </tt>The window's
816 new key release callback function <br>
817                                    <tt>key&nbsp;&nbsp;&nbsp;&nbsp; </tt>The 
818 key whose release triggers the callback <br>
819                                    <tt>x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
820                                   </tt>The x-coordinate of the mouse relative 
821 to the window at the time the key is released <br>
822                                    <tt>y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
823                                   </tt>The y-coordinate of the mouse relative 
824 to the window at the time the key is released </p>
825                                    
826                                   <p><b>Description</b> </p>
827                                    
828                                   <p>The&nbsp; "<tt>glutKeyboardUpFunc</tt>
829 " function specifies the function that <i>freeglut</i> will call when the 
830 user releases a key from the keyboard.&nbsp; The callback function has one 
831 argument:&nbsp; the name of the function to be invoked ("called back") at 
832 the time at which the key is released.&nbsp; The function returns no value.&nbsp; 
833                                   <i>Freeglut</i> sets the <i>current window</i>
834   to the window which is active when the callback is invoked. <br>
835  &nbsp;&nbsp;&nbsp; While <i>freeglut</i> checks for upper or lower case
836 letters, it does not do so for non-alphabetical characters.&nbsp; Nor does
837 it account for the Caps-Lock key being on.&nbsp; The operating system may
838 send some unexpected characters to <i>freeglut</i>, such as "8" when the
839 user is pressing the Shift key.&nbsp; <i>Freeglut</i> also invokes the callback
840 when the user releases the Control, Alt, or Shift keys, among others.&nbsp;
841 Releasing the Delete key causes this function to be invoked with a value
842 of 127 for "<tt>key</tt>". <br>
843  &nbsp;&nbsp;&nbsp; Calling "<tt>glutKeyboardUpFunc</tt>" with a NULL argument 
844 disables the call to the window's key release callback. </p>
845                                    
846                                   <p><b>Changes From GLUT</b> </p>
847                                    
848                                   <p>This function is not implemented in GLUT
849 versions before Version 4.&nbsp; It has been designed to be as close to GLUT
850 as possible.&nbsp; Users who find differences should contact the        
851                           <i>freeglut</i>&nbsp;Programming Consortium  to
852 have them fixed. </p>
853                                    
854                                   <h2> 12.8&nbsp; glutSpecialUpFunc</h2>
855   The "<tt>glutSpecialUpFunc</tt>" function sets the window's special key
856 release callback. <i>Freeglut</i> calls the special key release callback
857 when the user releases a special key.                                   
858                                   <p><b>Usage</b> </p>
859                                    
860                                   <p><tt>void glutSpecialUpFunc ( void (*func) 
861 ( int key, int x, int y ) ) ;</tt> </p>
862                                    
863                                   <p><tt>func&nbsp;&nbsp;&nbsp; </tt>The window's
864 new special key release callback function <br>
865                                    <tt>key&nbsp;&nbsp;&nbsp;&nbsp; </tt>The 
866 key whose release triggers the callback <br>
867                                    <tt>x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
868                                   </tt>The x-coordinate of the mouse relative 
869 to the window at the time the key is released <br>
870                                    <tt>y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
871                                   </tt>The y-coordinate of the mouse relative 
872 to the window at the time the key is released </p>
873                                    
874                                   <p><b>Description</b> </p>
875                                    
876                                   <p>The&nbsp; "<tt>glutSpecialUpFunc</tt>
877 " function specifies the function that <i>freeglut</i> will call when the 
878 user releases a special key from the keyboard.&nbsp; The callback function 
879 has one argument:&nbsp; the name of the function to be invoked ("called back") 
880 at the time at which the special key is released.&nbsp; The function returns 
881 no value.&nbsp; <i>Freeglut</i> sets the <i>current window</i> to the window 
882 which is active when the callback is invoked.&nbsp; "Special keys" are the 
883 function keys, the arrow keys, the Page Up and Page Down keys, and the Insert 
884 key.&nbsp; The Delete key is considered to be a regular key. <br>
885  &nbsp;&nbsp;&nbsp; Calling "<tt>glutSpecialUpFunc</tt>" with a NULL argument 
886 disables the call to the window's special key release callback. </p>
887                                    
888                                   <p>&nbsp;&nbsp;&nbsp; The "<tt>key</tt>
889 " argument may take one of the following defined constant values: </p>
890                                    
891                                   <ul>
892   <li> <tt>GLUT_KEY_F1, GLUT_KEY_F2, ..., GLUT_KEY_F12</tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
893  - F1 through F12 keys</li>
894    <li> <tt>GLUT_KEY_PAGE_UP, GLUT_KEY_PAGE_DOWN</tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
895  - Page Up and Page Down keys</li>
896    <li> <tt>GLUT_KEY_HOME, GLUT_KEY_END</tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
897  - Home and End keys</li>
898    <li> <tt>GLUT_KEY_LEFT, GLUT_KEY_RIGHT, GLUT_KEY_UP, GLUT_KEY_DOWN</tt>
899   - arrow keys</li>
900    <li> <tt>GLUT_KEY_INSERT</tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
901  - Insert key</li>
902                                      
903                                   </ul>
904   <b>Changes From GLUT</b>                                    
905                                   <p>This function is not implemented in GLUT
906 versions before Version 4.&nbsp; It has been designed to be as close to GLUT
907 as possible.&nbsp; Users who find differences should contact the        
908                           <i>freeglut</i>&nbsp;Programming Consortium  to
909 have them fixed. </p>
910                                    
911                                   <h2> 12.9&nbsp; glutMouseFunc</h2>
912                                       
913                                   <h2> 12.10&nbsp; glutMotionFunc, glutPassiveMotionFunc</h2>
914                                       
915                                   <h2> 12.11&nbsp; glutVisibilityFunc</h2>
916                                       
917                                   <h2> 12.12&nbsp; glutEntryFunc</h2>
918                                       
919                                   <h2> 12.13&nbsp; glutJoystickFunc</h2>
920                                       
921                                   <h2> 12.14&nbsp; glutSpaceballMotionFunc</h2>
922     The "<tt>glutSpaceballMotionFunc</tt>" function is not implemented in 
923                                   <i>freeglut</i>, although the library does 
924 "answer the mail" to the extent that a call to the function will not produce 
925 an error..                                    
926                                   <p><b>Usage</b></p>
927                                    
928                                   <p><tt>void glutSpaceballMotionFunc ( void 
929 (* callback)( int x, int y, int z )</tt><tt> ) ;</tt></p>
930                                    
931                                   <p><b>Description</b></p>
932                                    
933                                   <p>The "<tt>glutSpaceballMotionFunc</tt>
934  " function is not implemented in <i>freeglut</i>. </p>
935                                    
936                                   <p><b>Changes From GLUT</b></p>
937                                    
938                                   <p>GLUT implements this function. </p>
939                                    
940                                   <h2> 12.15&nbsp; glutSpaceballRotateFunc</h2>
941     The "<tt>glutSpaceballRotateFunc</tt>" function is not implemented in 
942                                   <i>freeglut</i>, although the library does 
943 "answer the mail" to the extent that a call to the function will not produce 
944 an error..                                     
945                                   <p><b>Usage</b></p>
946                                    
947                                   <p><tt>void glutSpaceballRotateFunc ( void 
948 (* callback)( int x, int y, int z )</tt><tt> ) ;</tt></p>
949                                    
950                                   <p><b>Description</b></p>
951                                    
952                                   <p>The "<tt>glutSpaceballRotateFunc</tt>
953  " function is not implemented in <i>freeglut</i>. </p>
954                                    
955                                   <p><b>Changes From GLUT</b></p>
956                                    
957                                   <p>GLUT implements this function. </p>
958                                    
959                                   <h2> 12.16&nbsp; glutSpaceballButtonFunc</h2>
960     The "<tt>glutSpaceballButtonFunc</tt>" function is not implemented in 
961                                   <i>freeglut</i>, although the library does 
962 "answer the mail" to the extent that a call to the function will not produce 
963 an error..                                     
964                                   <p><b>Usage</b></p>
965                                    
966                                   <p><tt>void glutSpaceballButtonFunc ( void 
967 (* callback)( int button, int updown )</tt><tt> ) ;</tt></p>
968                                    
969                                   <p><b>Description</b></p>
970                                    
971                                   <p>The "<tt>glutSpaceballButtonFunc</tt>
972  " function is not implemented in <i>freeglut</i>. </p>
973                                    
974                                   <p><b>Changes From GLUT</b></p>
975                                    
976                                   <p>GLUT implements this function. </p>
977                                    
978                                   <h2> 12.17&nbsp; glutButtonBoxFunc</h2>
979     The "<tt>glutSpaceballButtonBoxFunc</tt>" function is not implemented 
980 in <i>freeglut</i>, although the library does "answer the mail" to the extent 
981 that a call to the function will not produce an error..                 
982                    
983                                   <p><b>Usage</b></p>
984                                    
985                                   <p><tt>void glutSpaceballButtonBoxFunc (
986 void (* callback)( int button, int updown )</tt><tt> ) ;</tt></p>
987                                    
988                                   <p><b>Description</b></p>
989                                    
990                                   <p>The "<tt>glutSpaceballButtonBoxFunc</tt>
991  " function is not implemented in <i>freeglut</i>. </p>
992                                    
993                                   <p><b>Changes From GLUT</b></p>
994                                    
995                                   <p>GLUT implements this function. </p>
996                                    
997                                   <h2> 12.18&nbsp; glutDialsFunc</h2>
998     The "<tt>glutDialsFunc</tt>" function is not implemented in <i>freeglut</i>
999  , although the library does "answer the mail" to the extent that a call
1000 to the function will not produce an error..                             
1001        
1002                                   <p><b>Usage</b></p>
1003                                    
1004                                   <p><tt>void glutDialsFunc ( void (* callback)( 
1005 int dial, int value )</tt><tt> ) ;</tt></p>
1006                                    
1007                                   <p><b>Description</b></p>
1008                                    
1009                                   <p>The "<tt>glutDialsFunc</tt>" function 
1010 is not implemented in <i>freeglut</i>. </p>
1011                                    
1012                                   <p><b>Changes From GLUT</b></p>
1013                                    
1014                                   <p>GLUT implements this function. </p>
1015                                    
1016                                   <h2> 12.19&nbsp; glutTabletMotionFunc</h2>
1017     The "<tt>glutTabletMotionFunc</tt>" function is not implemented in <i>
1018  freeglut</i>, although the library does "answer the mail" to the extent
1019 that a call to the function will not produce an error..                 
1020                     
1021                                   <p><b>Usage</b></p>
1022                                    
1023                                   <p><tt>void glutTabletMotionFunc ( void 
1024 (* callback)( int x, int y )</tt><tt> ) ;</tt></p>
1025                                    
1026                                   <p><b>Description</b></p>
1027                                    
1028                                   <p>The "<tt>glutTabletMotionFunc</tt>" function
1029 is not implemented in <i>freeglut</i>. </p>
1030                                    
1031                                   <p><b>Changes From GLUT</b></p>
1032                                    
1033                                   <p>GLUT implements this function. </p>
1034                                    
1035                                   <h2> 12.20&nbsp; glutTabletButtonFunc</h2>
1036     The "<tt>glutTabletButtonFunc</tt>" function is not implemented in <i>
1037  freeglut</i>, although the library does "answer the mail" to the extent
1038 that a call to the function will not produce an error..                 
1039                    
1040                                   <p><b>Usage</b></p>
1041                                    
1042                                   <p><tt>void glutTabletButtonFunc ( void 
1043 (* callback)( int button, int updown, int x, int y )</tt><tt> ) ;</tt></p>
1044                                    
1045                                   <p><b>Description</b></p>
1046                                    
1047                                   <p>The "<tt>glutTabletButtonFunc</tt>" function
1048 is not implemented in <i>freeglut</i>. </p>
1049                                    
1050                                   <p><b>Changes From GLUT</b></p>
1051                                    
1052                                   <p>GLUT implements this function. </p>
1053                                    
1054                                   <h2> 12.21&nbsp; glutMenuStatusFunc</h2>
1055                                       
1056                                   <h2> 12.22&nbsp; glutWindowStatusFunc</h2>
1057                                       
1058                                   <h1> 13.0&nbsp;<a name="StateSetting"></a>
1059   State Setting and Retrieval Functions</h1>
1060                                       
1061                                   <h2> 13.1&nbsp; glutSetOption</h2>
1062                                       
1063                                   <h2> 13.2&nbsp; glutGet</h2>
1064                                       
1065
1066 <p>
1067 The following state variables may be queried with "<tt>glutGet</tt>".
1068 The returned value is an integer.
1069 </p>
1070
1071 <p>
1072 These queries are with respect to the current window:
1073 </p>
1074
1075 <ul>
1076 <li>GLUT_WINDOW_X - window X position
1077 <li>GLUT_WINDOW_Y - window Y position
1078 <li>GLUT_WINDOW_WIDTH - window width
1079 <li>GLUT_WINDOW_HEIGHT - window height
1080 <li>GLUT_WINDOW_BUFFER_SIZE - number of color or color index bits per pixel
1081 <li>GLUT_WINDOW_STENCIL_SIZE - number of bits per stencil value
1082 <li>GLUT_WINDOW_DEPTH_SIZE - number of bits per depth value
1083 <li>GLUT_WINDOW_RED_SIZE - number of bits per red value
1084 <li>GLUT_WINDOW_GREEN_SIZE - number of bits per green value
1085 <li>GLUT_WINDOW_BLUE_SIZE - number of bits per blue value
1086 <li>GLUT_WINDOW_ALPHA_SIZE - number of bits per alpha value
1087 <li>GLUT_WINDOW_ACCUM_RED_SIZE - number of red bits in the accumulation buffer
1088 <li>GLUT_WINDOW_ACCUM_GREEN_SIZE - number of green bits in the accumulation buffer
1089 <li>GLUT_WINDOW_ACCUM_BLUE_SIZE - number of blue bits in the accumulation buffer
1090 <li>GLUT_WINDOW_ACCUM_ALPHA_SIZE - number of alpha bits in the accumulation buffer
1091 <li>GLUT_WINDOW_DOUBLEBUFFER - 1 if the color buffer is double buffered, 0 otherwise
1092 <li>GLUT_WINDOW_RGBA - 1 if the color buffers are RGB[A], 0 for color index
1093 <li>GLUT_WINDOW_PARENT - parent window ID
1094 <li>GLUT_WINDOW_NUM_CHILDREN - number of child windows
1095 <li>GLUT_WINDOW_COLORMAP_SIZE - number of entries in the window's colormap
1096 <li>GLUT_WINDOW_NUM_SAMPLES - number of samples per pixel if using multisampling
1097 <li>GLUT_WINDOW_STEREO - 1 if the window supports stereo, 0 otherwise
1098 <li>GLUT_WINDOW_CURSOR - current cursor
1099 <li>GLUT_WINDOW_FORMAT_ID - on Windows, return the pixel format number of the current window
1100 </ul>
1101
1102 <p>
1103 These queries do not depend on the current window.
1104 </p>
1105
1106 <ul>
1107 <li>GLUT_SCREEN_WIDTH - width of the screen in pixels
1108 <li>GLUT_SCREEN_HEIGHT - height of the screen in pixels
1109 <li>GLUT_SCREEN_WIDTH_MM - width of the screen in millimeters
1110 <li>GLUT_SCREEN_HEIGHT_MM - height of the screen in millimeters
1111 <li>GLUT_MENU_NUM_ITEMS - number of items in the current menu
1112 <li>GLUT_DISPLAY_MODE_POSSIBLE - return 1 if the current display mode is supported, 0 otherwise
1113 <li>GLUT_INIT_WINDOW_X - X position last set by glutInitWindowPosition
1114 <li>GLUT_INIT_WINDOW_Y - Y position last set by glutInitWindowPosition
1115 <li>GLUT_INIT_WINDOW_WIDTH - width last set by glutInitWindowSize
1116 <li>GLUT_INIT_WINDOW_HEIGHT - height last set by glutInitWindowSize
1117 <li>GLUT_INIT_DISPLAY_MODE - display mode last set by glutInitDisplayMode
1118 <li>GLUT_ELAPSED_TIME - time (in milliseconds) elapsed since glutInit or glutGet(GLUT_ELAPSED_TIME) was first called
1119 <li>GLUT_INIT_STATE - ?
1120 <li>GLUT_VERSION - Return value will be X*10000+Y*100+Z where X is the
1121     major version, Y is the minor version and Z is the patch level.
1122     This query is only supported in <i>freeglut</i> (version 2.0.0 or later).
1123 </ul>
1124
1125
1126                                   <h2> 13.3&nbsp; glutDeviceGet</h2>
1127                                       
1128                                   <h2> 13.4&nbsp; glutGetModifiers</h2>
1129                                       
1130                                   <h2> 13.5&nbsp; glutLayerGet</h2>
1131                                       
1132                                   <h2> 13.6&nbsp; glutExtensionSupported</h2>
1133                                       
1134                                   <h2> 13.7&nbsp; glutGetProcAddress</h2>
1135                                   <p><tt>glutGetProcAddress</tt> returns
1136 a pointer to a named GL or <i>freeglut</i> function. </p>
1137                                   <p><b>Usage</b></p>
1138                                   <p><tt>void *glutGetProcAddress ( const
1139 char *procName ) ;</tt></p>
1140                                   <p><tt>procName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1141                                   </tt>Name of an OpenGL or GLUT function. 
1142                                   </p>
1143                                   <p><b>Description</b></p>
1144                                   <p><tt>glutGetProcAddress</tt> is useful
1145 for dealing with OpenGL extensions. If an application calls OpenGL extension
1146 functions directly, that application will only link/run with an OpenGL library
1147 that supports the extension. By using a function pointer returned from glutGetProcAddress(),
1148 the application will avoid this hard dependency and be more portable and interoperate
1149 better with various implementations of OpenGL. </p>
1150                                   <p> Both OpenGL functions and <i>freeglut</i>
1151 functions can be queried with this function. </p>
1152                                   <p><b>Changes From GLUT</b> </p>
1153                                    
1154                                   <p>GLUT does not include this function.
1155                                    </p>
1156                                    
1157                                   <h1> 14.0&nbsp;<a name="FontRendering"></a>
1158   Font Rendering Functions</h1>
1159   <i>Freeglut</i> supports two types of font rendering:&nbsp; bitmap fonts,
1160  which are rendered using the "<tt>glBitmap</tt>" function call, and stroke
1161  fonts, which are rendered as sequences of OpenGL line segments.&nbsp; Because
1162  they are rendered as bitmaps, the bitmap fonts tend to render more quickly
1163  than stroke fonts, but they are less flexible in terms of scaling and rendering.&nbsp;
1164  Bitmap font characters are positioned with calls to the "<tt>glRasterPos*</tt>
1165   " functions while stroke font characters use the OpenGL transformations
1166 to position characters.                                    
1167                                   <p>&nbsp;&nbsp;&nbsp; It should be noted 
1168 that <i>freeglut</i> fonts are similar but not identical to GLUT fonts.&nbsp; 
1169 At the moment, <i>freeglut</i> fonts do not support the "`" (backquote) and 
1170 "|" (vertical line) characters; in their place it renders asterisks. </p>
1171                                    
1172                                   <p>&nbsp;&nbsp;&nbsp; <i>Freeglut</i> supports 
1173 the following bitmap fonts: </p>
1174                                    
1175                                   <ul>
1176   <li> <tt>GLUT_BITMAP_8_BY_13</tt> - A variable-width font with every character
1177  fitting in a rectangle of 13 pixels high by at most 8 pixels wide.</li>
1178    <li> <tt>GLUT_BITMAP_9_BY_15</tt> - A variable-width font with every character
1179  fitting in a rectangle of 15 pixels high by at most 9 pixels wide.</li>
1180    <li> <tt>GLUT_BITMAP_TIMES_ROMAN_10</tt> - A 10-point variable-width Times 
1181 Roman font.</li>
1182    <li> <tt>GLUT_BITMAP_TIMES_ROMAN_24</tt> - A 24-point variable-width Times 
1183 Roman font.</li>
1184    <li> <tt>GLUT_BITMAP_HELVETICA_10</tt> - A 10-point variable-width Helvetica
1185  font.</li>
1186    <li> <tt>GLUT_BITMAP_HELVETICA_12</tt> - A 12-point variable-width Helvetica
1187  font.</li>
1188    <li> <tt>GLUT_BITMAP_HELVETICA_18</tt> - A 18-point variable-width Helvetica
1189  font.</li>
1190                                      
1191                                   </ul>
1192   <i>Freeglut</i> calls "<tt>glRasterPos4v</tt>" to advance the cursor by
1193 the width of a character and to render carriage returns when appropriate.&nbsp;
1194  It does not use any display lists in it rendering in bitmap fonts.     
1195                               
1196                                   <p>&nbsp;&nbsp;&nbsp; <i>Freeglut</i> supports 
1197 the following stroke fonts: </p>
1198                                    
1199                                   <ul>
1200   <li> <tt>GLUT_STROKE_ROMAN</tt> - A proportionally-spaced Roman Simplex 
1201 font</li>
1202    <li> <tt>GLUT_STROKE_MONO_ROMAN</tt> - A fixed-width Roman Simplex font</li>
1203                                      
1204                                   </ul>
1205   <i>Freeglut</i> does not use any display lists in its rendering of stroke
1206  fonts.&nbsp; It calls "<tt>glTranslatef</tt>" to advance the cursor by the 
1207 width of a character and to render carriage returns when appropriate.   
1208                                 
1209                                   <h2> 14.1&nbsp; glutBitmapCharacter</h2>
1210   The "<tt>glutBitmapCharacter</tt>" function renders a single bitmapped
1211 character in the <i>current window</i> using the specified font.        
1212                            
1213                                   <p><b>Usage</b> </p>
1214                                    
1215                                   <p><tt>void glutBitmapCharacter ( void *font,
1216 int character ) ;</tt> </p>
1217                                    
1218                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1219                                   </tt>The bitmapped font to use in rendering 
1220 the character <br>
1221                                    <tt>character&nbsp;&nbsp; </tt>The ASCII 
1222 code of the character to be rendered </p>
1223                                    
1224                                   <p><b>Description</b> </p>
1225                                    
1226                                   <p>The&nbsp; "<tt>glutBitmapCharacter</tt>
1227   " function renders the given character in the specified bitmap font.&nbsp; 
1228                                   <i>Freeglut</i> automatically sets the necessary
1229 pixel unpack storage modes and restores the existing modes when it has finished.&nbsp;
1230 Before the first call to "<tt>glutBitMapCharacter</tt>  " the application
1231 program should call "<tt>glRasterPos*</tt>" to set the  position of the character
1232 in the window.&nbsp; The "<tt>glutBitmapCharacter</tt> " function advances
1233 the cursor position as part of its call to "<tt>glBitmap</tt> " and so the
1234 application does not need to call "<tt>glRasterPos*</tt>" again  for successive
1235 characters on the same line. </p>
1236                                    
1237                                   <p><b>Changes From GLUT</b> </p>
1238                                    
1239                                   <p>Nonexistent characters are rendered as
1240 asterisks.&nbsp; The rendering position in <i>freeglut</i> is apparently off
1241 from GLUT's position by a few pixels vertically and one or two pixels horizontally.
1242                                   </p>
1243                                    
1244                                   <h2> 14.2&nbsp; glutBitmapString</h2>
1245   The "<tt>glutBitmapString</tt>" function renders a string of bitmapped
1246 characters in the <i>current window</i> using the specified font.       
1247                             
1248                                   <p><b>Usage</b> </p>
1249                                    
1250                                   <p><tt>void glutBitmapString ( void *font, 
1251 char *string ) ;</tt> </p>
1252                                    
1253                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1254                                   </tt>The bitmapped font to use in rendering 
1255 the character string <br>
1256                                    <tt>string&nbsp;&nbsp;&nbsp; </tt>String 
1257 of characters to be rendered </p>
1258                                    
1259                                   <p><b>Description</b> </p>
1260                                    
1261                                   <p>The&nbsp; "<tt>glutBitmapString</tt>
1262   " function renders the given character string in the specified bitmap font.&nbsp; 
1263                                   <i>Freeglut</i> automatically sets the necessary
1264 pixel unpack storage modes and restores the existing modes when it has finished.&nbsp;
1265 Before calling "<tt>glutBitMapString</tt>" the application program should
1266 call "<tt>glRasterPos*</tt>" to set the position of the string in the window.&nbsp;
1267 The "<tt>glutBitmapString</tt>" function handles carriage returns.&nbsp;
1268 Nonexistent characters are rendered as asterisks. </p>
1269                                    
1270                                   <p><b>Changes From GLUT</b> </p>
1271                                    
1272                                   <p>GLUT does not include this function.
1273                                    </p>
1274                                    
1275                                   <h2> 14.3&nbsp; glutBitmapWidth</h2>
1276   The "<tt>glutBitmapWidth</tt>" function returns the width in pixels of
1277 a single bitmapped character in the specified font.                     
1278               
1279                                   <p><b>Usage</b> </p>
1280                                    
1281                                   <p><tt>int glutBitmapWidth ( void *font, 
1282 int character ) ;</tt> </p>
1283                                    
1284                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1285                                   </tt>The bitmapped font to use in calculating 
1286 the character width <br>
1287                                    <tt>character&nbsp;&nbsp; </tt>The ASCII 
1288 code of the character </p>
1289                                    
1290                                   <p><b>Description</b> </p>
1291                                    
1292                                   <p>The&nbsp; "<tt>glutBitmapWidth</tt>" 
1293 function returns the width of the given character in the specified bitmap 
1294 font.&nbsp; Because the font is bitmapped, the width is an exact integer.
1295                                    </p>
1296                                    
1297                                   <p><b>Changes From GLUT</b> </p>
1298                                    
1299                                   <p>Nonexistent characters return the width 
1300 of an asterisk. </p>
1301                                    
1302                                   <h2> 14.4&nbsp; glutBitmapLength</h2>
1303   The "<tt>glutBitmapLength</tt>" function returns the width in pixels of
1304 a string of bitmapped characters in the specified font.                 
1305                   
1306                                   <p><b>Usage</b> </p>
1307                                    
1308                                   <p><tt>int glutBitmapLength ( void *font, 
1309 char *string ) ;</tt> </p>
1310                                    
1311                                   <p><tt>font&nbsp;&nbsp;&nbsp; </tt>The bitmapped
1312 font to use in calculating the character width <br>
1313                                    <tt>string&nbsp; </tt>String of characters 
1314 whose width is to be calculated </p>
1315                                    
1316                                   <p><b>Description</b> </p>
1317                                    
1318                                   <p>The&nbsp; "<tt>glutBitmapLength</tt>
1319   " function returns the width in pixels of the given character string in 
1320 the specified bitmap font.&nbsp; Because the font is bitmapped, the width 
1321 is an exact integer:&nbsp; the return value is identical to the sum of the 
1322 character widths returned by a series of calls to "<tt>glutBitmapWidth</tt>
1323 ".&nbsp; The width of nonexistent characters is counted to be the width of 
1324 an asterisk. </p>
1325                                    
1326                                   <p>&nbsp;&nbsp;&nbsp; If the string contains 
1327 one or more carriage returns, <i>freeglut</i> calculates the widths in pixels 
1328 of the lines separately and returns the largest width. </p>
1329                                    
1330                                   <p><b>Changes From GLUT</b> </p>
1331                                    
1332                                   <p>GLUT does not include this function.
1333                                    </p>
1334                                    
1335                                   <h2> 14.5&nbsp; glutBitmapHeight</h2>
1336   The "<tt>glutBitmapHeight</tt>" function returns the height in pixels of
1337  the specified font.                                    
1338                                   <p><b>Usage</b> </p>
1339                                    
1340                                   <p><tt>int glutBitmapHeight ( void *font 
1341 ) ;</tt> </p>
1342                                    
1343                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1344                                   </tt>The bitmapped font to use in calculating 
1345 the character height </p>
1346                                    
1347                                   <p><b>Description</b> </p>
1348                                    
1349                                   <p>The&nbsp; "<tt>glutBitmapHeight</tt>
1350   " function returns the height of a character in the specified bitmap font.&nbsp; 
1351 Because the font is bitmapped, the height is an exact integer.&nbsp; The fonts
1352 are designed such that all characters have (nominally) the same height.  
1353                                  </p>
1354                                    
1355                                   <p><b>Changes From GLUT</b> </p>
1356                                    
1357                                   <p>GLUT does not include this function.
1358                                    </p>
1359                                    
1360                                   <h2> 14.6&nbsp; glutStrokeCharacter</h2>
1361   The "<tt>glutStrokeCharacter</tt>" function renders a single stroke character
1362  in the <i>current window</i> using the specified font.                 
1363                   
1364                                   <p><b>Usage</b> </p>
1365                                    
1366                                   <p><tt>void glutStrokeCharacter ( void *font,
1367 int character ) ;</tt> </p>
1368                                    
1369                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1370                                   </tt>The stroke font to use in rendering 
1371 the character <br>
1372                                    <tt>character&nbsp;&nbsp; </tt>The ASCII 
1373 code of the character to be rendered </p>
1374                                    
1375                                   <p><b>Description</b> </p>
1376                                    
1377                                   <p>The&nbsp; "<tt>glutStrokeCharacter</tt>
1378   " function renders the given character in the specified stroke font.&nbsp; 
1379 Before the first call to "<tt>glutStrokeCharacter</tt>" the application program 
1380 should call the OpenGL transformation (positioning and scaling) functions 
1381 to set the position of the character in the window.&nbsp; The "<tt>glutStrokeCharacter</tt>
1382   " function advances the cursor position by a call to "<tt>glTranslatef</tt>
1383   " and so the application does not need to call the OpenGL positioning functions
1384  again for successive characters on the same line. </p>
1385                                    
1386                                   <p><b>Changes From GLUT</b> </p>
1387                                    
1388                                   <p>Nonexistent characters are rendered as
1389 asterisks. </p>
1390                                    
1391                                   <h2> 14.7&nbsp; glutStrokeString</h2>
1392   The "<tt>glutStrokeString</tt>" function renders a string of characters
1393 in the <i>current window</i> using the specified stroke font.           
1394                         
1395                                   <p><b>Usage</b> </p>
1396                                    
1397                                   <p><tt>void glutStrokeString ( void *font, 
1398 char *string ) ;</tt> </p>
1399                                    
1400                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1401                                   </tt>The stroke font to use in rendering 
1402 the character string <br>
1403                                    <tt>string&nbsp;&nbsp;&nbsp; </tt>String 
1404 of characters to be rendered </p>
1405                                    
1406                                   <p><b>Description</b> </p>
1407                                    
1408                                   <p>The&nbsp; "<tt>glutStrokeString</tt>
1409   " function renders the given character string in the specified stroke font.&nbsp; 
1410 Before calling "<tt>glutStrokeString</tt>" the application program should 
1411 call the OpenGL transformation (positioning and scaling) functions to set 
1412 the position of the string in the window.&nbsp; The "<tt>glutStrokeString</tt>
1413   " function handles carriage returns.&nbsp; Nonexistent characters are rendered 
1414 as asterisks. </p>
1415                                    
1416                                   <p><b>Changes From GLUT</b> </p>
1417                                    
1418                                   <p>GLUT does not include this function.
1419                                    </p>
1420                                    
1421                                   <h2> 14.8&nbsp; glutStrokeWidth</h2>
1422   The "<tt>glutStrokeWidth</tt>" function returns the width in pixels of
1423 a single character in the specified stroke font.                        
1424            
1425                                   <p><b>Usage</b> </p>
1426                                    
1427                                   <p><tt>int glutStrokeWidth ( void *font, 
1428 int character ) ;</tt> </p>
1429                                    
1430                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1431                                   </tt>The stroke font to use in calculating 
1432 the character width <br>
1433                                    <tt>character&nbsp;&nbsp; </tt>The ASCII 
1434 code of the character </p>
1435                                    
1436                                   <p><b>Description</b> </p>
1437                                    
1438                                   <p>The&nbsp; "<tt>glutStrokeWidth</tt>" 
1439 function returns the width of the given character in the specified stroke 
1440 font.&nbsp; Because the font is a stroke font, the width is actually a floating-point 
1441 number; the function rounds it to the nearest integer for the return value.
1442                                    </p>
1443                                    
1444                                   <p><b>Changes From GLUT</b> </p>
1445                                    
1446                                   <p>Nonexistent characters return the width 
1447 of an asterisk. </p>
1448                                    
1449                                   <h2> 14.9&nbsp; glutStrokeLength</h2>
1450   The "<tt>glutStrokeLength</tt>" function returns the width in pixels of
1451 a string of characters in the specified stroke font.                    
1452                
1453                                   <p><b>Usage</b> </p>
1454                                    
1455                                   <p><tt>int glutStrokeLength ( void *font, 
1456 char *string ) ;</tt> </p>
1457                                    
1458                                   <p><tt>font&nbsp;&nbsp;&nbsp; </tt>The stroke
1459 font to use in calculating the character width <br>
1460                                    <tt>string&nbsp; </tt>String of characters 
1461 whose width is to be calculated </p>
1462                                    
1463                                   <p><b>Description</b> </p>
1464                                    
1465                                   <p>The&nbsp; "<tt>glutStrokeLength</tt>
1466   " function returns the width in pixels of the given character string in 
1467 the specified stroke font.&nbsp; Because the font is a stroke font, the width 
1468 of an individual character is a floating-point number.&nbsp; <i>Freeglut</i>
1469   adds the floating-point widths and rounds the funal result to return the 
1470 integer value.&nbsp; Thus the return value may differ from the sum of the 
1471 character widths returned by a series of calls to "<tt>glutStrokeWidth</tt>
1472   ".&nbsp; The width of nonexistent characters is counted to be the width 
1473 of an asterisk. </p>
1474                                    
1475                                   <p>&nbsp;&nbsp;&nbsp; If the string contains 
1476 one or more carriage returns, <i>freeglut</i> calculates the widths in pixels 
1477 of the lines separately and returns the largest width. </p>
1478                                    
1479                                   <p><b>Changes From GLUT</b> </p>
1480                                    
1481                                   <p>GLUT does not include this function.
1482                                    </p>
1483                                    
1484                                   <h2> 14.10&nbsp; glutStrokeHeight</h2>
1485   The "<tt>glutStrokeHeight</tt>" function returns the height in pixels of
1486  the specified font.                                    
1487                                   <p><b>Usage</b> </p>
1488                                    
1489                                   <p><tt>GLfloat glutStrokeHeight ( void *font
1490 ) ;</tt> </p>
1491                                    
1492                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1493                                   </tt>The stroke font to use in calculating 
1494 the character height </p>
1495                                    
1496                                   <p><b>Description</b> </p>
1497                                    
1498                                   <p>The&nbsp; "<tt>glutStrokeHeight</tt>
1499   " function returns the height of a character in the specified stroke font.&nbsp; 
1500 The application programmer should note that, unlike the other <i>freeglut</i>
1501   font functions, this one returns a floating-point number.&nbsp; The fonts 
1502 are designed such that all characters have (nominally) the same height. </p>
1503                                    
1504                                   <p><b>Changes From GLUT</b> </p>
1505                                    
1506                                   <p>GLUT does not include this function.
1507                                    </p>
1508                                    
1509                                   <h1> 15.0&nbsp;<a name="GeometricObject"></a>
1510   Geometric Object Rendering Functions</h1>
1511   <i>Freeglut</i> includes eighteen routines for generating easily-recognizable
1512  3-d geometric objects.&nbsp; These routines are effectively the same ones
1513  that are included in the GLUT library, and reflect the functionality available
1514  in the <i>aux</i> toolkit described in the <i>OpenGL Programmer's Guide</i>
1515   .&nbsp; They are included to allow programmers to create with a single
1516 line of code a three-dimensional object which can be used to test a variety
1517 of OpenGL functionality.&nbsp; None of the routines generates a display list 
1518 for the object which it draws.&nbsp; The functions generate normals appropriate 
1519 for lighting but, except for the teapon functions, do not generate texture 
1520 coordinates.                                    
1521                                   <h2> 15.1&nbsp; glutWireSphere, glutSolidSphere</h2>
1522   The "<tt>glutWireSphere</tt>" and "<tt>glutSolidSphere</tt>" functions
1523 draw a wireframe and solid sphere respectively.                         
1524           
1525                                   <p><b>Usage</b> </p>
1526                                    
1527                                   <p><tt>void glutWireSphere ( GLdouble dRadius, 
1528 GLint slices, GLint stacks ) ;</tt> </p>
1529                                    
1530                                   <p><tt>void glutSolidSphere ( GLdouble dRadius,
1531 GLint slices, GLint stacks ) ;</tt> </p>
1532                                    
1533                                   <p><tt>dRadius&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1534                                   </tt>The desired radius of the sphere </p>
1535                                    
1536                                   <p><tt>slices&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1537                                   </tt>The desired number of slices (divisions 
1538 in the longitudinal direction) in the sphere </p>
1539                                    
1540                                   <p><tt>stacks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1541                                   </tt>The desired number of stacks (divisions 
1542 in the latitudinal direction) in the sphere.&nbsp; The number of points in 
1543 this direction, including the north and south poles, is <tt>stacks+1</tt>
1544   </p>
1545                                    
1546                                   <p><b>Description</b> </p>
1547                                    
1548                                   <p>The "<tt>glutWireSphere</tt>" and "<tt>
1549   glutSolidSphere</tt>" functions render a sphere centered at the origin
1550 of the modeling coordinate system.&nbsp; The north and south poles of the
1551 sphere are on the positive and negative Z-axes respectively and the prime
1552 meridian crosses the positive X-axis. </p>
1553                                    
1554                                   <p><b>Changes From GLUT</b> </p>
1555                                    
1556                                   <p>None that we know of. </p>
1557                                    
1558                                   <h2> 15.2&nbsp; glutWireTorus, glutSolidTorus</h2>
1559   The "<tt>glutWireTorus</tt>" and "<tt>glutSolidTorus</tt>" functions draw
1560  a wireframe and solid torus (donut shape) respectively.                
1561                    
1562                                   <p><b>Usage</b> </p>
1563                                    
1564                                   <p><tt>void glutWireTorus ( GLdouble dInnerRadius, 
1565 GLdouble dOuterRadius, GLint nSides, GLint nRings ) ;</tt> </p>
1566                                    
1567                                   <p><tt>void glutSolidTorus ( GLdouble dInnerRadius, 
1568 GLdouble dOuterRadius, GLint nSides, GLint nRings ) ;</tt> </p>
1569                                    
1570                                   <p><tt>dInnerRadius&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1571                                   </tt>The desired inner radius of the torus, 
1572 from the origin to the circle defining the centers of the outer circles </p>
1573                                    
1574                                   <p><tt>dOuterRadius&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1575                                   </tt>The desired outer radius of the torus, 
1576 from the center of the outer circle to the actual surface of the torus </p>
1577                                    
1578                                   <p><tt>nSides&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1579                                   </tt>The desired number of segments in a
1580 single outer circle of the torus </p>
1581                                    
1582                                   <p><tt>nRings&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1583                                   </tt>The desired number of outer circles 
1584 around the origin of the torus </p>
1585                                    
1586                                   <p><b>Description</b> </p>
1587                                    
1588                                   <p>The "<tt>glutWireTorus</tt>" and "<tt>
1589   glutSolidTorus</tt>" functions render a torus centered at the origin of 
1590 the modeling coordinate system.&nbsp; The torus is circularly symmetric about 
1591 the Z-axis and starts at the positive X-axis. </p>
1592                                    
1593                                   <p><b>Changes From GLUT</b> </p>
1594                                    
1595                                   <p>None that we know of. </p>
1596                                    
1597                                   <h2> 15.3&nbsp; glutWireCone, glutSolidCone</h2>
1598   The "<tt>glutWireCone</tt>" and "<tt>glutSolidCone</tt>" functions draw
1599 a wireframe and solid cone respectively.                                
1600    
1601                                   <p><b>Usage</b> </p>
1602                                    
1603                                   <p><tt>void glutWireCone ( GLdouble base, 
1604 GLdouble height, GLint slices, GLint stacks ) ;</tt> </p>
1605                                    
1606                                   <p><tt>void glutSolidCone ( GLdouble base, 
1607 GLdouble height, GLint slices, GLint stacks ) ;</tt> </p>
1608                                    
1609                                   <p><tt>base&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1610                                   </tt>The desired radius of the base of the
1611 cone </p>
1612                                    
1613                                   <p><tt>height&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1614                                   </tt>The desired height of the cone </p>
1615                                    
1616                                   <p><tt>slices&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1617                                   </tt>The desired number of slices around 
1618 the base of the cone </p>
1619                                    
1620                                   <p><tt>stacks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1621                                   </tt>The desired number of segments between 
1622 the base and the tip of the cone (the number of points, including the tip, 
1623 is <tt>stacks + 1</tt>) </p>
1624                                    
1625                                   <p><b>Description</b> </p>
1626                                    
1627                                   <p>The "<tt>glutWireCone</tt>" and "<tt>
1628   glutSolidCone</tt>" functions render a right circular cone with a base
1629 centered at the origin and in the X-Y plane and its tip on the positive Z-axis.&nbsp; 
1630 The wire cone is rendered with triangular elements. </p>
1631                                    
1632                                   <p><b>Changes From GLUT</b> </p>
1633                                    
1634                                   <p>None that we know of. </p>
1635                                    
1636                                   <h2> 15.4&nbsp; glutWireCube, glutSolidCube</h2>
1637   The "<tt>glutWireCube</tt>" and "<tt>glutSolidCube</tt>" functions draw
1638 a wireframe and solid cube respectively.                                
1639    
1640                                   <p><b>Usage</b> </p>
1641                                    
1642                                   <p><tt>void glutWireCube ( GLdouble dSize 
1643 ) ;</tt> </p>
1644                                    
1645                                   <p><tt>void glutSolidCube ( GLdouble dSize 
1646 ) ;</tt> </p>
1647                                    
1648                                   <p><tt>dSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1649                                   </tt>The desired length of an edge of the 
1650 cube </p>
1651                                    
1652                                   <p><b>Description</b> </p>
1653                                    
1654                                   <p>The "<tt>glutWireCube</tt>" and "<tt>
1655   glutSolidCube</tt>" functions render a cube of the desired size, centered 
1656 at the origin.&nbsp; Its faces are normal to the coordinate directions. </p>
1657                                    
1658                                   <p><b>Changes From GLUT</b> </p>
1659                                    
1660                                   <p>None that we know of. </p>
1661                                    
1662                                   <h2> 15.5&nbsp; glutWireTetrahedron, glutSolidTetrahedron</h2>
1663   The "<tt>glutWireTetrahedron</tt>" and "<tt>glutSolidTetrahedron</tt>"
1664 functions draw a wireframe and solid tetrahedron (four-sided Platonic solid)
1665 respectively.                                    
1666                                   <p><b>Usage</b> </p>
1667                                    
1668                                   <p><tt>void glutWireTetrahedron ( void )
1669 ;</tt> </p>
1670                                    
1671                                   <p><tt>void glutSolidTetrahedron ( void 
1672 ) ;</tt> </p>
1673                                    
1674                                   <p><b>Description</b> </p>
1675                                    
1676                                   <p>The "<tt>glutWireTetrahedron</tt>" and 
1677 "<tt>glutSolidTetrahedron</tt>" functions render a tetrahedron whose corners 
1678 are each a distance of one from the origin.&nbsp; The length of each side 
1679 is 2/3 sqrt(6).&nbsp; One corner is on the positive X-axis and another is 
1680 in the X-Y plane with a positive Y-coordinate. </p>
1681                                    
1682                                   <p><b>Changes From GLUT</b> </p>
1683                                    
1684                                   <p>None that we know of. </p>
1685                                    
1686                                   <h2> 15.6&nbsp; glutWireOctahedron, glutSolidOctahedron</h2>
1687   The "<tt>glutWireOctahedron</tt>" and "<tt>glutSolidOctahedron</tt>" functions
1688  draw a wireframe and solid octahedron (eight-sided Platonic solid) respectively.
1689                                    
1690                                   <p><b>Usage</b> </p>
1691                                    
1692                                   <p><tt>void glutWireOctahedron ( void ) 
1693 ;</tt> </p>
1694                                    
1695                                   <p><tt>void glutSolidOctahedron ( void )
1696 ;</tt> </p>
1697                                    
1698                                   <p><b>Description</b> </p>
1699                                    
1700                                   <p>The "<tt>glutWireOctahedron</tt>" and 
1701 "<tt>glutSolidOctahedron</tt>" functions render an octahedron whose corners 
1702 are each a distance of one from the origin.&nbsp; The length of each side 
1703 is sqrt(2).&nbsp; The corners are on the positive and negative coordinate 
1704 axes. </p>
1705                                    
1706                                   <p><b>Changes From GLUT</b> </p>
1707                                    
1708                                   <p>None that we know of. </p>
1709                                    
1710                                   <h2> 15.7&nbsp; glutWireDodecahedron, glutSolidDodecahedron</h2>
1711   The "<tt>glutWireDodecahedron</tt>" and "<tt>glutSolidDodecahedron</tt>
1712 "  functions draw a wireframe and solid dodecahedron (twelve-sided Platonic
1713 solid) respectively.                                    
1714                                   <p><b>Usage</b> </p>
1715                                    
1716                                   <p><tt>void glutWireDodecahedron ( void 
1717 ) ;</tt> </p>
1718                                    
1719                                   <p><tt>void glutSolidDodecahedron ( void 
1720 ) ;</tt> </p>
1721                                    
1722                                   <p><b>Description</b> </p>
1723                                    
1724                                   <p>The "<tt>glutWireDodecahedron</tt>" and
1725 "<tt>glutSolidDodecahedron</tt>" functions render a dodecahedron whose corners
1726 are each a distance of sqrt(3) from the origin.&nbsp; The length of each
1727 side is sqrt(5)-1.&nbsp; There are twenty corners; interestingly enough,
1728 eight of them coincide with the corners of a cube with sizes of length 2.
1729                                   </p>
1730                                    
1731                                   <p><b>Changes From GLUT</b> </p>
1732                                    
1733                                   <p>None that we know of. </p>
1734                                    
1735                                   <h2> 15.8&nbsp; glutWireIcosahedron, glutSolidIcosahedron</h2>
1736   The "<tt>glutWireIcosahedron</tt>" and "<tt>glutSolidIcosahedron</tt>"
1737 functions draw a wireframe and solid icosahedron (twenty-sided Platonic solid)
1738 respectively.                                    
1739                                   <p><b>Usage</b> </p>
1740                                    
1741                                   <p><tt>void glutWireIcosahedron ( void )
1742 ;</tt> </p>
1743                                    
1744                                   <p><tt>void glutSolidIcosahedron ( void 
1745 ) ;</tt> </p>
1746                                    
1747                                   <p><b>Description</b> </p>
1748                                    
1749                                   <p>The "<tt>glutWireIcosahedron</tt>" and 
1750 "<tt>glutSolidIcosahedron</tt>" functions render an icosahedron whose corners 
1751 are each a unit distance from the origin.&nbsp; The length of each side is 
1752 slightly greater than one.&nbsp; Two of the corners lie on the positive and 
1753 negative X-axes. </p>
1754                                    
1755                                   <p><b>Changes From GLUT</b> </p>
1756                                    
1757                                   <p>None that we know of. </p>
1758                                    
1759                                   <h2> 15.7&nbsp; glutWireRhombicDodecahedron, 
1760 glutSolidRhombicDodecahedron</h2>
1761   The "<tt>glutWireRhombicDodecahedron</tt>" and "<tt>glutSolidRhombicDodecahedron</tt>
1762   " functions draw a wireframe and solid rhombic dodecahedron (twelve-sided
1763  semi-regular solid) respectively.                                    
1764                                   <p><b>Usage</b> </p>
1765                                    
1766                                   <p><tt>void glutWireRhombicDodecahedron 
1767 ( void ) ;</tt> </p>
1768                                    
1769                                   <p><tt>void glutSolidRhombicDodecahedron 
1770 ( void ) ;</tt> </p>
1771                                    
1772                                   <p><b>Description</b> </p>
1773                                    
1774                                   <p>The "<tt>glutWireRhombicDodecahedron</tt>
1775   " and "<tt>glutSolidRhombicDodecahedron</tt>" functions render a rhombic 
1776 dodecahedron whose corners are at most a distance of one from the origin.&nbsp; 
1777 The rhombic dodecahedron has faces which are identical rhombuses (rhombi?) 
1778 but which have some vertices at which three faces meet and some vertices at
1779 which four faces meet.&nbsp; The length of each side is sqrt(3)/2.&nbsp; Vertices
1780 at which four faces meet are found at (0, 0, <u>+</u>1) and (<u>  +</u>sqrt(2)/2,
1781                                   <u>+</u>sqrt(2)/2, 0). </p>
1782                                    
1783                                   <p><b>Changes From GLUT</b> </p>
1784                                    
1785                                   <p>GLUT does not include these functions.
1786                                    </p>
1787                                    
1788                                   <h2> 15.10&nbsp; glutWireTeapot, glutSolidTeapot</h2>
1789   The "<tt>glutWireTeapot</tt>" and "<tt>glutSolidTeapot</tt>" functions
1790 draw a wireframe and solid teapot respectively.                         
1791           
1792                                   <p><b>Usage</b> </p>
1793                                    
1794                                   <p><tt>void glutWireTeapot ( GLdouble dSize 
1795 ) ;</tt> </p>
1796                                    
1797                                   <p><tt>void glutSolidTeapot ( GLdouble dSize
1798 ) ;</tt> </p>
1799                                    
1800                                   <p><tt>dSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1801                                   </tt>The desired size of the teapot </p>
1802                                    
1803                                   <p><b>Description</b> </p>
1804                                    
1805                                   <p>The "<tt>glutWireTeapot</tt>" and "<tt>
1806   glutSolidTeapot</tt>" functions render a teapot of the desired size, centered 
1807 at the origin.&nbsp; This is the famous OpenGL teapot [add reference]. </p>
1808                                    
1809                                   <p><b>Changes From GLUT</b> </p>
1810                                    
1811                                   <p>None that we know of. </p>
1812                                    
1813                                   <h1> 16.0&nbsp;<a name="GameMode"></a>
1814   Game Mode Functions</h1>
1815                                       
1816                                   <h2> 16.1&nbsp; glutGameModeString</h2>
1817                                       
1818                                   <h2> 16.2&nbsp; glutEnterGameMode, glutLeaveGameMode</h2>
1819                                       
1820                                   <h2> 16.3&nbsp; glutGameModeGet</h2>
1821                                       
1822                                   <h1> 17.0&nbsp;<a name="VideoResize"></a>
1823   Video Resize Functions</h1>
1824                                       
1825                                   <h2> 17.1&nbsp; glutVideoResizeGet</h2>
1826                                       
1827                                   <h2> 17.2&nbsp; glutSetupVideoResizing, 
1828 glutStopVideoResizing</h2>
1829                                       
1830                                   <h2> 17.3&nbsp; glutVideoResize</h2>
1831                                       
1832                                   <h2> 17.4&nbsp; glutVideoPan</h2>
1833                                       
1834                                   <h1> 18.0&nbsp;<a name="ColorMap"></a>
1835   Color Map Functions</h1>
1836                                       
1837                                   <h2> 18.1&nbsp; glutSetColor, glutGetColor</h2>
1838                                       
1839                                   <h2> 18.2&nbsp; glutCopyColormap</h2>
1840                                       
1841                                   <h1> 19.0&nbsp;<a name="Miscellaneous"></a>
1842   Miscellaneous Functions</h1>
1843                                       
1844                                   <h2> 19.1&nbsp; glutIgnoreKeyRepeat, glutSetKeyRepeat</h2>
1845                                       
1846                                   <h2> 19.2&nbsp; glutForceJoystickFunc</h2>
1847                                       
1848                                   <h2> 19.3&nbsp; glutReportErrors</h2>
1849                                       
1850                                   <h1> 20.0&nbsp;<a name="UsageNotes"></a>
1851   Usage Notes</h1>
1852                                       
1853                                   <p> The following environment variables
1854 are recognized by <i>freeglut</i>: </p>
1855                                   <ul>
1856                                     <li>DISPLAY - specifies a display name.<br>
1857                                     </li>
1858                                     <li>GLUT_FPS - specifies a time interval
1859 (in milliseconds) for reporting framerate messages to stderr.  For example,
1860 if FREEGLUT_FPS is set to 5000, every 5 seconds a message will be printed
1861 to stderr showing the current frame rate.  The frame rate is measured by counting
1862 the number of times glutSwapBuffers() is called over the time interval.</li>
1863                                     <li>GLUT_ICON - specifies the icon that
1864 goes in the upper left-hand corner of the <i>freeglut</i><i> </i>windows </li>
1865                                   </ul>
1866                                   <h1> 21.0&nbsp;<a name="ImplementationNotes"></a>
1867   Implementation Notes</h1>
1868                                       
1869 <h1> 22.0&nbsp;<a name="GLUT_State"></a>
1870 GLUT State</h1>
1871                                       
1872 <h1> 23.0&nbsp;<a name="Freeglut.h_Header"></a>
1873 "freeglut.h" Header File</h1>
1874                                       
1875
1876 <p>
1877 Application programmers who are porting their GLUT programs to <i>freeglut</i> may continue
1878 to include <tt>&lt;GL/glut.h&gt;</tt> in their programs.
1879 Programs which use the <i>freeglut</i>-specific extensions to GLUT should include
1880 <tt>&lt;GL/freeglut.h&gt;</tt>.  One possible arrangement is as follows:
1881 </p>
1882
1883 <pre>
1884 #ifdef FREEGLUT
1885 #include &lt;GL/freeglut_ext.h&gt;
1886 #else
1887 #include &lt;GL/glut.h&gt;
1888 #endif
1889 </pre>
1890
1891 <p>
1892 Compile-time <i>freeglut</i> version testing can be done as follows:
1893 </p>
1894
1895 <pre>
1896 #ifdef FREEGLUT_VERSION_2_0
1897   code specific to freeglut 2.0 or later here
1898 #endif
1899 </pre>
1900
1901 <p>
1902 In future releases, FREEGLUT_VERSION_2_1, FREEGLUT_VERSION_2_2, etc will
1903 be defined.  This scheme mimics OpenGL conventions.
1904 </p>
1905
1906 <p>
1907 The <i>freeglut</i> version can be queried at runtime by calling
1908 glutGet(GLUT_VERSION).
1909 The result will be X*10000+Y*100+Z where X is the major version, Y is the
1910 minor version and Z is the patch level.
1911 </p>
1912 <p>
1913 This may be used as follows:
1914 </p>
1915
1916 <pre>
1917 if (glutGet(GLUT_VERSION) < 20001) {
1918     printf("Sorry, you need freeglut version 2.0.1 or later to run this program.\n");
1919     exit(1);
1920 }
1921 </pre>
1922
1923
1924
1925 <h1> 24.0&nbsp;<a name="References"></a>
1926 References</h1>
1927                                       
1928 <h1> 25.0&nbsp;<a name="Index"></a>
1929 Index</h1>
1930 &nbsp;                                    
1931 <p>&nbsp; <br>
1932  &nbsp; <br>
1933  &nbsp; <br>
1934  &nbsp; <br>
1935  &nbsp; <br>
1936  &nbsp; <br>
1937  &nbsp; <br>
1938  &nbsp; <br>
1939  &nbsp; <br>
1940  &nbsp; <br>
1941  &nbsp; <br>
1942  &nbsp; <br>
1943  &nbsp; <br>
1944  &nbsp; <br>
1945  &nbsp; <br>
1946  &nbsp; <br>
1947  &nbsp; <br>
1948  &nbsp; <br>
1949  &nbsp; <br>
1950  &nbsp; <br>
1951  &nbsp; <br>
1952  &nbsp; <br>
1953  &nbsp; </p>
1954                                    
1955                                   </body>
1956                                   </html>