* Hopefully I did THIS one right (used 'cvs update' to Merge)
[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> (freeglut)</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 freeglut Programming Consortium</h2>
35  </center>
36     
37 <center>  
38 <h2> November, 2002</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 freeglut 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 menu 
343 state callback (with one argument, distinct from the menu status callback 
344 which has three arguments), and a window status callback <br>
345  (also with one argument).&nbsp; Unsupported callbacks are the three Spaceball 
346 callbacks, the ButtonBox callback, the Dials callback, and the two Tablet 
347 callbacks.&nbsp; If the user has a need for an unsupported callback he should 
348 contact the <i>freeglut</i> development team.<br>
349                                    
350                                   <h3>3.4.4&nbsp; String Rendering<br>
351                                    </h3>
352  New functions have been added to render full character strings (including 
353 carriage returns) rather than rendering one character at a time.&nbsp; More 
354 functions return the widths of character strings and the font heights, in 
355 pixels for bitmapped fonts and in OpenGL units for the stroke fonts.<br>
356                                    
357                                   <h3>3.4.5&nbsp; Geometry Rendering<br>
358                                    </h3>
359  Two functions have been added to render a wireframe and a solid rhombic
360 dodecahedron.                                    
361                                   <h3> 3.4.5&nbsp; Extension Function Queries</h3>
362  glutGetProcAddress is a wrapper for the glXGetProcAddressARB and wglGetProcAddress
363 functions. 
364                                   <h1> 4.0&nbsp;<a name="Initialization"></a>
365   Initialization Functions</h1>
366                                       
367                                   <h2> 4.1&nbsp; glutInit</h2>
368                                       
369                                   <h2> 4.2&nbsp; glutInitWindowPosition, glutInitWindowSize</h2>
370   The "<tt>glutInitWindowPosition</tt> " and "<tt>glutInitWindowSize</tt>
371 "  functions specify a desired position and size for windows that <i>freeglut</i>
372   will create in the future.                                    
373                                   <p><b>Usage</b> </p>
374                                    
375                                   <p><tt>void glutInitWindowPosition ( int 
376 x, int y ) ;</tt> <br>
377                                    <tt>void glutInitWindowSize ( int width, 
378 int height ) ;</tt> </p>
379                                    
380                                   <p><b>Description</b> </p>
381                                    
382                                   <p>The "<tt>glutInitWindowPosition</tt>
383   " and "<tt>glutInitWindowSize</tt>" functions specify a desired position 
384 and size for windows that <i>freeglut</i> will create in the future.&nbsp; 
385 The position is measured in pixels from the upper left hand corner of the 
386 screen, with "x" increasing to the right and "y" increasing towards the bottom 
387 of the screen.&nbsp; The size is measured in pixels.&nbsp; <i>Freeglut</i>
388   does not promise to follow these specifications in creating its windows, 
389 it certainly makes an attempt to. </p>
390                                    
391                                   <p>The position and size of a window are 
392 a matter of some subtlety.&nbsp; Most windows have a usable area surrounded 
393 by a border and with a title bar on the top.&nbsp; The border and title bar 
394 are commonly called "decorations."&nbsp; The position of the window unfortunately 
395 varies with the operating system.&nbsp; On Linux, it is the coordinates of 
396 the upper left-hand corner of its decorations.&nbsp; On Windows, it is the 
397 coordinates of the upper left hand corner of its usable interior.&nbsp; For 
398 both operating systems, the size of the window is the size of the usable interior.
399                                   </p>
400                                    
401                                   <p>Windows has some additional quirks which 
402 the application programmer should know about.&nbsp; First, the minimum y-coordinate 
403 of a window decoration is zero.&nbsp; (This is a feature of <i>freeglut</i>
404   and can be adjusted if so desired.)&nbsp; Second, there appears to be a 
405 minimum window width on Windows which is 104 pixels.&nbsp; The user may specify 
406 a smaller width, but the Windows system calls ignore it.&nbsp; It is also 
407 impossible to make a window narrower than this by dragging on its corner.
408                                    </p>
409                                    
410                                   <p><b>Changes From GLUT</b> </p>
411                                    
412                                   <p>For some reason, GLUT is not affected 
413 by the 104-pixel minimum window width.&nbsp; If the user clicks on the corner 
414 of a window which is narrower than this amount, the window will immediately 
415 snap out to this width, but the application can call "<tt>glutReshapeWindow</tt>
416   " and make a window narrower again. </p>
417                                    
418                                   <h2> 4.3&nbsp; glutInitDisplayMode</h2>
419                                       
420                                   <h2> 4.4&nbsp; glutInitDisplayString</h2>
421                                       
422                                   <h1> 5.0&nbsp;<a name="EventProcessing"></a>
423   Event Processing Functions</h1>
424   After an application has finished initializing its windows and menus, it
425  enters an event loop.&nbsp; Within this loop, <i>freeglut</i> polls the
426 data entry devices (keyboard, mouse, etc.) and calls the application's appropriate 
427 callbacks.                                    
428                                   <p>In GLUT, control never returned from 
429 the event loop (as invoked by the "<tt>glutMainLoop</tt>" function) to the 
430 calling function.&nbsp; This prevented an application from having re-entrant 
431 code, in which GLUT could be invoked from within a callback, and it prevented 
432 the application from doing any post-processing (such as freeing allocated 
433 memory) after GLUT had closed down.&nbsp; <i>Freeglut</i> allows the application 
434 programmer to specify more direct control over the event loop by means of 
435 two new functions.&nbsp; The first, "<tt>glutMainLoopEvent</tt>", processes 
436 a single iteration of the event loop and allows the application to use a different
437 event loop controller or to contain re-entrant code.&nbsp; The second, "<tt>
438 glutLeaveMainLoop</tt>", causes the event loop to exit nicely; this is preferable
439 to the application's calling "<tt>exit</tt>" from within a GLUT callback.
440                                   </p>
441                                    
442                                   <h2> 5.1&nbsp; glutMainLoop</h2>
443   The "<tt>glutMainLoop</tt>" function enters the event loop.           
444                         
445                                   <p><b>Usage</b> </p>
446                                    
447                                   <p><tt>void glutMainLoop ( void ) ;</tt>
448   </p>
449                                    
450                                   <p><b>Description</b> </p>
451                                    
452                                   <p>The&nbsp; "<tt>glutMainLoop</tt>" function 
453 causes the program to enter the window event loop.&nbsp; An application should 
454 call this function at most once.&nbsp; It will call any application callback 
455 functions as required to process mouse clicks, mouse motion, key presses, 
456 and so on. </p>
457                                    
458                                   <p><b>Changes From GLUT</b> </p>
459                                    
460                                   <p>In GLUT, there was absolutely no way 
461 for the application programmer to have control return from the "<tt>glutMainLoop</tt>
462   " function to the calling function.&nbsp; <i>Freeglut</i> allows the programmer 
463 to force this by setting the "<tt>GLUT_ACTION_ON_WINDOW_CLOSE</tt>" option 
464 and invoking the "<tt>glutLeaveMainLoop</tt>" function from one of the callbacks.&nbsp;
465  Stopping the program this way is preferable to simply calling "<tt>exit</tt>
466   " from within a callback because this allows <i>freeglut</i> to free allocated
467  memory and otherwise clean up after itself.&nbsp; (I know I just said this,
468  but I think it is important enough that it bears repeating.) </p>
469                                    
470                                   <h2> 5.2&nbsp; glutMainLoopEvent</h2>
471   The "<tt>glutMainLoopEvent</tt>" function processes a single iteration
472 in the <i>freeglut</i> event loop.                                    
473                                   <p><b>Usage</b> </p>
474                                    
475                                   <p><tt>void glutMainLoopEvent ( void ) ;</tt>
476  </p>
477                                    
478                                   <p><b>Description</b> </p>
479                                    
480                                   <p>The&nbsp; "<tt>glutMainLoopEvent</tt>
481   " function causes <i>freeglut</i> to process one iteration's worth of events 
482 in its event loop.&nbsp; This allows the application to control its own event 
483 loop and still use the <i>freeglut</i> windowing system. </p>
484                                    
485                                   <p><b>Changes From GLUT</b> </p>
486                                    
487                                   <p>GLUT does not include this function.
488                                    </p>
489                                    
490                                   <h2> 5.3&nbsp; glutLeaveMainLoop</h2>
491   The "<tt>glutLeaveMainLoop</tt>" function causes <i>freeglut</i> to stop
492  its event loop.                                    
493                                   <p><b>Usage</b> </p>
494                                    
495                                   <p><tt>void glutLeaveMainLoop ( void ) ;</tt>
496  </p>
497                                    
498                                   <p><b>Description</b> </p>
499                                    
500                                   <p>The&nbsp; "<tt>glutLeaveMainLoop</tt>
501   " function causes <i>freeglut</i> to stop the event loop.&nbsp; If the
502 "<tt>  GLUT_ACTION_ON_WINDOW_CLOSE</tt>" option has been set to "<tt>GLUT_ACTION_CONTINUE_EXECUTION</tt>
503   ", control will return to the function which called "<tt>glutMainLoop</tt>
504   "; otherwise the application will exit. </p>
505                                    
506                                   <p>If the application has two nested calls 
507 to "<tt>glutMainLoop</tt>" and calls "<tt>glutLeaveMainLoop</tt>", the behaviour 
508 of <i>freeglut</i> is undefined.&nbsp; It may leave only the inner nested 
509 loop or it may leave both loops.&nbsp; If the reader has a strong preference 
510 for one behaviour over the other he should contact the <i>freeglut</i> Programming 
511 Consortium and ask for the code to be fixed. </p>
512                                    
513                                   <p><b>Changes From GLUT</b> </p>
514                                    
515                                   <p>GLUT does not include this function.
516                                    </p>
517                                    
518                                   <h1> 6.0&nbsp;<a name="Window"></a>
519   Window Functions</h1>
520                                       
521                                   <h2> 6.1&nbsp; glutCreateWindow</h2>
522                                       
523                                   <h2> 6.2&nbsp; glutCreateSubwindow</h2>
524                                       
525                                   <h2> 6.3&nbsp; glutDestroyWindow</h2>
526                                       
527                                   <h2> 6.4&nbsp; glutSetWindow, glutGetWindow</h2>
528                                       
529                                   <h2> 6.5&nbsp; glutSetWindowTitle, glutSetIconTitle</h2>
530                                       
531                                   <h2> 6.6&nbsp; glutReshapeWindow</h2>
532                                       
533                                   <h2> 6.7&nbsp; glutPositionWindow</h2>
534                                       
535                                   <h2> 6.8&nbsp; glutShowWindow, glutHideWindow, 
536 glutIconifyWindow</h2>
537                                       
538                                   <h2> 6.9&nbsp; glutPushWindow, glutPopWindow</h2>
539                                       
540                                   <h2> 6.10&nbsp; glutFullScreen</h2>
541                                       
542                                   <h1> 7.0&nbsp;<a name="Display"></a>
543   Display Functions</h1>
544                                       
545                                   <h2> 7.1&nbsp; glutPostRedisplay</h2>
546                                       
547                                   <h2> 7.2&nbsp; glutPostWindowRedisplay</h2>
548                                       
549                                   <h2> 7.3&nbsp; glutSwapBuffers</h2>
550                                       
551                                   <h1> 8.0&nbsp;<a name="MouseCursor"></a>
552   Mouse Cursor Functions</h1>
553                                       
554                                   <h2> 8.1&nbsp; glutSetCursor</h2>
555                                       
556                                   <h2> 8.2&nbsp; glutWarpPointer</h2>
557                                       
558                                   <h1> 9.0&nbsp;<a name="Overlay"></a>
559   Overlay Functions</h1>
560   <i>Freeglut</i> does not allow overlays, although it does "answer the mail"
561  with function stubs so that GLUT-based programs can compile and link against
562                                    <i>freeglut</i> without modification.&nbsp; 
563 If the reader needs overlays, he should contact the <i>freeglut</i> Programming 
564 Consortium and ask for them to be implemented.&nbsp; He should also be prepared 
565 to assist in the implementation.                                    
566                                   <h2> 9.1&nbsp; glutEstablishOverlay</h2>
567   The "<tt>glutEstablishOverlay</tt>" function is not implemented in <i>freeglut</i>
568  .                                    
569                                   <p><b>Usage</b> </p>
570                                    
571                                   <p><tt>void glutEstablishOverlay ( void 
572 ) ;</tt> </p>
573                                    
574                                   <p><b>Description</b> </p>
575                                    
576                                   <p>The "<tt>glutEstablishOverlay</tt>" function
577 is not implemented in <i>freeglut</i>. </p>
578                                    
579                                   <p><b>Changes From GLUT</b> </p>
580                                    
581                                   <p>GLUT implements this function. </p>
582                                    
583                                   <h2> 9.2&nbsp; glutRemoveOverlay</h2>
584   The "<tt>glutRemoveOverlay</tt>" function is not implemented in <i>freeglut</i>
585  .                                    
586                                   <p><b>Usage</b> </p>
587                                    
588                                   <p><tt>void glutRemoveOverlay ( void ) ;</tt>
589  </p>
590                                    
591                                   <p><b>Description</b> </p>
592                                    
593                                   <p>The "<tt>glutRemoveOverlay</tt>" function 
594 is not implemented in <i>freeglut</i>. </p>
595                                    
596                                   <p><b>Changes From GLUT</b> </p>
597                                    
598                                   <p>GLUT implements this function. </p>
599                                    
600                                   <h2> 9.3&nbsp; glutUseLayer</h2>
601   The "<tt>glutUseLayer</tt>" function is not implemented in <i>freeglut</i>
602  .                                    
603                                   <p><b>Usage</b> </p>
604                                    
605                                   <p><tt>void glutUseLayer (&nbsp; GLenum 
606 layer ) ;</tt> </p>
607                                    
608                                   <p><b>Description</b> </p>
609                                    
610                                   <p>The "<tt>glutUseLayer</tt>" function 
611 is not implemented in <i>freeglut</i>. </p>
612                                    
613                                   <p><b>Changes From GLUT</b> </p>
614                                    
615                                   <p>GLUT implements this function. </p>
616                                    
617                                   <h2> 9.4&nbsp; glutPostOverlayRedisplay</h2>
618   The "<tt>glutPostOverlayRedisplay</tt> " function is not implemented in
619                                   <i> freeglut</i>.                     
620               
621                                   <p><b>Usage</b> </p>
622                                    
623                                   <p><tt>void glutPostOverlayRedisplay ( void
624 ) ;</tt> </p>
625                                    
626                                   <p><b>Description</b> </p>
627                                    
628                                   <p>The "<tt>glutPostOverlayRedisplay</tt>
629   " function is not implemented in <i>freeglut</i>. </p>
630                                    
631                                   <p><b>Changes From GLUT</b> </p>
632                                    
633                                   <p>GLUT implements this function. </p>
634                                    
635                                   <h2> 9.5&nbsp; glutPostWindowOverlayRedisplay</h2>
636   The "<tt>glutPostWindowOverlayRedisplay</tt> " function is not implemented
637  in <i>freeglut</i>.                                    
638                                   <p><b>Usage</b> </p>
639                                    
640                                   <p><tt>void glutPostWindowOverlayRedisplay 
641 ( int window ) ;</tt> </p>
642                                    
643                                   <p><b>Description</b> </p>
644                                    
645                                   <p>The "<tt>glutPostWindowOverlayRedisplay</tt>
646   " function is not implemented in <i>freeglut</i>. </p>
647                                    
648                                   <p><b>Changes From GLUT</b> </p>
649                                    
650                                   <p>GLUT implements this function. </p>
651                                    
652                                   <h2> 9.6&nbsp; glutShowOverlay, glutHideOverlay</h2>
653   The "<tt>glutShowOverlay</tt>" and "<tt>glutHideOverlay</tt>" functions
654 are not implemented in <i>freeglut</i> .                                
655    
656                                   <p><b>Usage</b> </p>
657                                    
658                                   <p><tt>void glutShowOverlay( void ) ;</tt>
659   <br>
660                                    <tt>void glutHideOverlay( void ) ;</tt>
661   </p>
662                                    
663                                   <p><b>Description</b> </p>
664                                    
665                                   <p>The "<tt>glutShowOverlay</tt>" and "<tt>
666 glutHideOverlay</tt>" functions are not implemented in <i>freeglut</i> .
667                                   </p>
668                                    
669                                   <p><b>Changes From GLUT</b> </p>
670                                    
671                                   <p>GLUT implements these functions. </p>
672                                    
673                                   <h1> 10.0&nbsp;<a name="Menu"></a>
674   Menu Functions</h1>
675                                       
676                                   <h2> 10.1&nbsp; glutCreateMenu</h2>
677                                       
678                                   <h2> 10.2&nbsp; glutDestroyMenu</h2>
679                                       
680                                   <h2> 10.3&nbsp; glutGetMenu, glutSetMenu</h2>
681                                       
682                                   <h2> 10.4&nbsp; glutAddMenuEntry</h2>
683                                       
684                                   <h2> 10.5&nbsp; glutAddSubMenu</h2>
685                                       
686                                   <h2> 10.6&nbsp; glutChangeToMenuEntry</h2>
687                                       
688                                   <h2> 10.7&nbsp; glutChangeToSubMenu</h2>
689                                       
690                                   <h2> 10.8&nbsp; glutRemoveMenuItem</h2>
691                                       
692                                   <h2> 10.9&nbsp; glutAttachMenu, glutDetachMenu</h2>
693                                       
694                                   <h1> 11.0&nbsp;<a name="GlobalCallback"></a>
695   Global Callback Registration Functions</h1>
696                                       
697                                   <h2> 11.1&nbsp; glutTimerFunc</h2>
698                                       
699                                   <h2> 11.2&nbsp; glutIdleFunc</h2>
700   The "<tt>glutIdleFunc</tt>" function sets the global idle callback. <i>
701 Freeglut</i>  calls the idle callback when there are no inputs from the user.
702                                    
703                                   <p><b>Usage</b> </p>
704                                    
705                                   <p><tt>void glutIdleFunc ( void (*func) 
706 ( void ) ) ;</tt> </p>
707                                    
708                                   <p><tt>func&nbsp;&nbsp;&nbsp; </tt>The new
709 global idle callback function </p>
710                                    
711                                   <p><b>Description</b> </p>
712                                    
713                                   <p>The&nbsp; "<tt>glutIdleFunc</tt>" function 
714 specifies the function that <i>freeglut</i> will call to perform background 
715 processing tasks such as continuous animation when window system events are 
716 not being received.&nbsp; If enabled, this function is called continuously 
717 from <i>freeglut</i> while no events are received.&nbsp; The callback function 
718 has no parameters and returns no value.&nbsp; <i>Freeglut</i> does not change 
719 the <i>current window</i> or the <i>current menu</i> before invoking the idle
720 callback; programs with multiple windows or menus must explicitly set the
721                                   <i>current window</i> and <i>current menu</i>
722  and not rely on its current setting. <br>
723  &nbsp;&nbsp;&nbsp; The amount of computation and rendering done in an idle 
724 callback should be minimized to avoid affecting the program's interactive
725  response.&nbsp; In general, no more than a single frame of rendering should
726  be done in a single invocation of an idle callback. <br>
727  &nbsp;&nbsp;&nbsp; Calling "<tt>glutIdleFunc</tt>" with a NULL argument
728 disables the call to an idle callback. </p>
729                                    
730                                   <p><b>Changes From GLUT</b> </p>
731                                    
732                                   <p>Application programmers should note that
733 if they have specified the "continue execution" action on window closure, 
734                                   <i>freeglut</i> will continue to call the 
735 idle callback after the user has closed a window by clicking on the "x" in 
736 the window header bar.&nbsp; If the idle callback renders a particular window 
737 (this is considered bad form but is frequently done anyway), the programmer 
738 should supply a window closure callback for that window which changes or disables
739 the idle callback. </p>
740                                    
741                                   <h1> 12.0&nbsp;<a name="WindowCallback"></a>
742   Window-Specific Callback Registration Functions</h1>
743                                       
744                                   <h2> 12.1&nbsp; glutDisplayFunc</h2>
745                                       
746                                   <h2> 12.2&nbsp; glutOverlayDisplayFunc</h2>
747                                       
748                                   <h2> 12.3&nbsp; glutReshapeFunc</h2>
749                                       
750                                   <h2> 12.4&nbsp; glutCloseFunc</h2>
751                                       
752                                   <h2> 12.5&nbsp; glutKeyboardFunc</h2>
753                                       
754                                   <h2> 12.6&nbsp; glutSpecialFunc</h2>
755   The "<tt>glutSpecialFunc</tt>" function sets the window's special key press
756  callback. <i>Freeglut</i> calls the special key press callback when the
757 user presses a special key.                                    
758                                   <p><b>Usage</b> </p>
759                                    
760                                   <p><tt>void glutSpecialFunc ( void (*func) 
761 ( int key, int x, int y ) ) ;</tt> </p>
762                                    
763                                   <p><tt>func&nbsp;&nbsp;&nbsp; </tt>The window's
764 new special key press callback function <br>
765                                    <tt>key&nbsp;&nbsp;&nbsp;&nbsp; </tt>The 
766 key whose press triggers the callback <br>
767                                    <tt>x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
768                                   </tt>The x-coordinate of the mouse relative 
769 to the window at the time the key is pressed <br>
770                                    <tt>y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
771                                   </tt>The y-coordinate of the mouse relative 
772 to the window at the time the key is pressed </p>
773                                    
774                                   <p><b>Description</b> </p>
775                                    
776                                   <p>The&nbsp; "<tt>glutSpecialFunc</tt>" 
777 function specifies the function that <i>freeglut</i> will call when the user 
778 presses a special key on the keyboard.&nbsp; The callback function has one 
779 argument:&nbsp; the name of the function to be invoked ("called back") at 
780 the time at which the special key is pressed.&nbsp; The function returns no
781 value.&nbsp; <i>Freeglut</i> sets the <i>current window</i> to the window 
782 which is active when the callback is invoked.&nbsp; "Special keys" are the 
783 function keys, the arrow keys, the Page Up and Page Down keys, and the Insert 
784 key.&nbsp; The Delete key is considered to be a regular key. <br>
785  &nbsp;&nbsp;&nbsp; Calling "<tt>glutSpecialUpFunc</tt>" with a NULL argument 
786 disables the call to the window's special key press callback. </p>
787                                    
788                                   <p>&nbsp;&nbsp;&nbsp; The "<tt>key</tt>
789 " argument may take one of the following defined constant values: </p>
790                                    
791                                   <ul>
792   <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;
793  - F1 through F12 keys</li>
794    <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;
795  - Page Up and Page Down keys</li>
796    <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;
797  - Home and End keys</li>
798    <li> <tt>GLUT_KEY_LEFT, GLUT_KEY_RIGHT, GLUT_KEY_UP, GLUT_KEY_DOWN</tt>
799   - arrow keys</li>
800    <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;
801  - Insert key</li>
802                                      
803                                   </ul>
804   <b>Changes From GLUT</b>                                    
805                                   <p>None. </p>
806                                    
807                                   <h2> 12.7&nbsp; glutKeyboardUpFunc</h2>
808   The "<tt>glutKeyboardUpFunc</tt>" function sets the window's key release
809  callback. <i>Freeglut</i> calls the key release callback when the user releases 
810 a key.                                    
811                                   <p><b>Usage</b> </p>
812                                    
813                                   <p><tt>void glutKeyboardUpFunc ( void (*func) 
814 ( unsigned char key, int x, int y ) ) ;</tt> </p>
815                                    
816                                   <p><tt>func&nbsp;&nbsp;&nbsp; </tt>The window's
817 new key release callback function <br>
818                                    <tt>key&nbsp;&nbsp;&nbsp;&nbsp; </tt>The 
819 key whose release triggers the callback <br>
820                                    <tt>x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
821                                   </tt>The x-coordinate of the mouse relative 
822 to the window at the time the key is released <br>
823                                    <tt>y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
824                                   </tt>The y-coordinate of the mouse relative 
825 to the window at the time the key is released </p>
826                                    
827                                   <p><b>Description</b> </p>
828                                    
829                                   <p>The&nbsp; "<tt>glutKeyboardUpFunc</tt>
830 " function specifies the function that <i>freeglut</i> will call when the 
831 user releases a key from the keyboard.&nbsp; The callback function has one 
832 argument:&nbsp; the name of the function to be invoked ("called back") at 
833 the time at which the key is released.&nbsp; The function returns no value.&nbsp; 
834                                   <i>Freeglut</i> sets the <i>current window</i>
835   to the window which is active when the callback is invoked. <br>
836  &nbsp;&nbsp;&nbsp; While <i>freeglut</i> checks for upper or lower case
837 letters, it does not do so for non-alphabetical characters.&nbsp; Nor does
838 it account for the Caps-Lock key being on.&nbsp; The operating system may
839 send some unexpected characters to <i>freeglut</i>, such as "8" when the
840 user is pressing the Shift key.&nbsp; <i>Freeglut</i> also invokes the callback
841 when the user releases the Control, Alt, or Shift keys, among others.&nbsp;
842 Releasing the Delete key causes this function to be invoked with a value
843 of 127 for "<tt>key</tt>". <br>
844  &nbsp;&nbsp;&nbsp; Calling "<tt>glutKeyboardUpFunc</tt>" with a NULL argument 
845 disables the call to the window's key release callback. </p>
846                                    
847                                   <p><b>Changes From GLUT</b> </p>
848                                    
849                                   <p>This function is not implemented in GLUT
850 versions before Version 4.&nbsp; It has been designed to be as close to GLUT
851 as possible.&nbsp; Users who find differences should contact the        
852                           <i>freeglut</i>&nbsp;Programming Consortium  to
853 have them fixed. </p>
854                                    
855                                   <h2> 12.8&nbsp; glutSpecialUpFunc</h2>
856   The "<tt>glutSpecialUpFunc</tt>" function sets the window's special key
857 release callback. <i>Freeglut</i> calls the special key release callback
858 when the user releases a special key.                                   
859                                   <p><b>Usage</b> </p>
860                                    
861                                   <p><tt>void glutSpecialUpFunc ( void (*func) 
862 ( int key, int x, int y ) ) ;</tt> </p>
863                                    
864                                   <p><tt>func&nbsp;&nbsp;&nbsp; </tt>The window's
865 new special key release callback function <br>
866                                    <tt>key&nbsp;&nbsp;&nbsp;&nbsp; </tt>The 
867 key whose release triggers the callback <br>
868                                    <tt>x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
869                                   </tt>The x-coordinate of the mouse relative 
870 to the window at the time the key is released <br>
871                                    <tt>y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
872                                   </tt>The y-coordinate of the mouse relative 
873 to the window at the time the key is released </p>
874                                    
875                                   <p><b>Description</b> </p>
876                                    
877                                   <p>The&nbsp; "<tt>glutSpecialUpFunc</tt>
878 " function specifies the function that <i>freeglut</i> will call when the 
879 user releases a special key from the keyboard.&nbsp; The callback function 
880 has one argument:&nbsp; the name of the function to be invoked ("called back") 
881 at the time at which the special key is released.&nbsp; The function returns 
882 no value.&nbsp; <i>Freeglut</i> sets the <i>current window</i> to the window 
883 which is active when the callback is invoked.&nbsp; "Special keys" are the 
884 function keys, the arrow keys, the Page Up and Page Down keys, and the Insert 
885 key.&nbsp; The Delete key is considered to be a regular key. <br>
886  &nbsp;&nbsp;&nbsp; Calling "<tt>glutSpecialUpFunc</tt>" with a NULL argument 
887 disables the call to the window's special key release callback. </p>
888                                    
889                                   <p>&nbsp;&nbsp;&nbsp; The "<tt>key</tt>
890 " argument may take one of the following defined constant values: </p>
891                                    
892                                   <ul>
893   <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;
894  - F1 through F12 keys</li>
895    <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;
896  - Page Up and Page Down keys</li>
897    <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;
898  - Home and End keys</li>
899    <li> <tt>GLUT_KEY_LEFT, GLUT_KEY_RIGHT, GLUT_KEY_UP, GLUT_KEY_DOWN</tt>
900   - arrow keys</li>
901    <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;
902  - Insert key</li>
903                                      
904                                   </ul>
905   <b>Changes From GLUT</b>                                    
906                                   <p>This function is not implemented in GLUT
907 versions before Version 4.&nbsp; It has been designed to be as close to GLUT
908 as possible.&nbsp; Users who find differences should contact the        
909                           <i>freeglut</i>&nbsp;Programming Consortium  to
910 have them fixed. </p>
911                                    
912                                   <h2> 12.9&nbsp; glutMouseFunc</h2>
913                                       
914                                   <h2> 12.10&nbsp; glutMotionFunc, glutPassiveMotionFunc</h2>
915                                       
916                                   <h2> 12.11&nbsp; glutVisibilityFunc</h2>
917                                       
918                                   <h2> 12.12&nbsp; glutEntryFunc</h2>
919                                       
920                                   <h2> 12.13&nbsp; glutJoystickFunc</h2>
921                                       
922                                   <h2> 12.14&nbsp; glutSpaceballMotionFunc</h2>
923     The "<tt>glutSpaceballMotionFunc</tt>" function is not implemented in 
924                                   <i>freeglut</i>, although the library does 
925 "answer the mail" to the extent that a call to the function will not produce 
926 an error..                                    
927                                   <p><b>Usage</b></p>
928                                    
929                                   <p><tt>void glutSpaceballMotionFunc ( void 
930 (* callback)( int x, int y, int z )</tt><tt> ) ;</tt></p>
931                                    
932                                   <p><b>Description</b></p>
933                                    
934                                   <p>The "<tt>glutSpaceballMotionFunc</tt>
935  " function is not implemented in <i>freeglut</i>. </p>
936                                    
937                                   <p><b>Changes From GLUT</b></p>
938                                    
939                                   <p>GLUT implements this function. </p>
940                                    
941                                   <h2> 12.15&nbsp; glutSpaceballRotateFunc</h2>
942     The "<tt>glutSpaceballRotateFunc</tt>" function is not implemented in 
943                                   <i>freeglut</i>, although the library does 
944 "answer the mail" to the extent that a call to the function will not produce 
945 an error..                                     
946                                   <p><b>Usage</b></p>
947                                    
948                                   <p><tt>void glutSpaceballRotateFunc ( void 
949 (* callback)( int x, int y, int z )</tt><tt> ) ;</tt></p>
950                                    
951                                   <p><b>Description</b></p>
952                                    
953                                   <p>The "<tt>glutSpaceballRotateFunc</tt>
954  " function is not implemented in <i>freeglut</i>. </p>
955                                    
956                                   <p><b>Changes From GLUT</b></p>
957                                    
958                                   <p>GLUT implements this function. </p>
959                                    
960                                   <h2> 12.16&nbsp; glutSpaceballButtonFunc</h2>
961     The "<tt>glutSpaceballButtonFunc</tt>" function is not implemented in 
962                                   <i>freeglut</i>, although the library does 
963 "answer the mail" to the extent that a call to the function will not produce 
964 an error..                                     
965                                   <p><b>Usage</b></p>
966                                    
967                                   <p><tt>void glutSpaceballButtonFunc ( void 
968 (* callback)( int button, int updown )</tt><tt> ) ;</tt></p>
969                                    
970                                   <p><b>Description</b></p>
971                                    
972                                   <p>The "<tt>glutSpaceballButtonFunc</tt>
973  " function is not implemented in <i>freeglut</i>. </p>
974                                    
975                                   <p><b>Changes From GLUT</b></p>
976                                    
977                                   <p>GLUT implements this function. </p>
978                                    
979                                   <h2> 12.17&nbsp; glutButtonBoxFunc</h2>
980     The "<tt>glutSpaceballButtonBoxFunc</tt>" function is not implemented 
981 in <i>freeglut</i>, although the library does "answer the mail" to the extent 
982 that a call to the function will not produce an error..                 
983                    
984                                   <p><b>Usage</b></p>
985                                    
986                                   <p><tt>void glutSpaceballButtonBoxFunc (
987 void (* callback)( int button, int updown )</tt><tt> ) ;</tt></p>
988                                    
989                                   <p><b>Description</b></p>
990                                    
991                                   <p>The "<tt>glutSpaceballButtonBoxFunc</tt>
992  " function is not implemented in <i>freeglut</i>. </p>
993                                    
994                                   <p><b>Changes From GLUT</b></p>
995                                    
996                                   <p>GLUT implements this function. </p>
997                                    
998                                   <h2> 12.18&nbsp; glutDialsFunc</h2>
999     The "<tt>glutDialsFunc</tt>" function is not implemented in <i>freeglut</i>
1000  , although the library does "answer the mail" to the extent that a call
1001 to the function will not produce an error..                             
1002        
1003                                   <p><b>Usage</b></p>
1004                                    
1005                                   <p><tt>void glutDialsFunc ( void (* callback)( 
1006 int dial, int value )</tt><tt> ) ;</tt></p>
1007                                    
1008                                   <p><b>Description</b></p>
1009                                    
1010                                   <p>The "<tt>glutDialsFunc</tt>" function 
1011 is not implemented in <i>freeglut</i>. </p>
1012                                    
1013                                   <p><b>Changes From GLUT</b></p>
1014                                    
1015                                   <p>GLUT implements this function. </p>
1016                                    
1017                                   <h2> 12.19&nbsp; glutTabletMotionFunc</h2>
1018     The "<tt>glutTabletMotionFunc</tt>" function is not implemented in <i>
1019  freeglut</i>, although the library does "answer the mail" to the extent
1020 that a call to the function will not produce an error..                 
1021                     
1022                                   <p><b>Usage</b></p>
1023                                    
1024                                   <p><tt>void glutTabletMotionFunc ( void 
1025 (* callback)( int x, int y )</tt><tt> ) ;</tt></p>
1026                                    
1027                                   <p><b>Description</b></p>
1028                                    
1029                                   <p>The "<tt>glutTabletMotionFunc</tt>" function
1030 is not implemented in <i>freeglut</i>. </p>
1031                                    
1032                                   <p><b>Changes From GLUT</b></p>
1033                                    
1034                                   <p>GLUT implements this function. </p>
1035                                    
1036                                   <h2> 12.20&nbsp; glutTabletButtonFunc</h2>
1037     The "<tt>glutTabletButtonFunc</tt>" function is not implemented in <i>
1038  freeglut</i>, although the library does "answer the mail" to the extent
1039 that a call to the function will not produce an error..                 
1040                    
1041                                   <p><b>Usage</b></p>
1042                                    
1043                                   <p><tt>void glutTabletButtonFunc ( void 
1044 (* callback)( int button, int updown, int x, int y )</tt><tt> ) ;</tt></p>
1045                                    
1046                                   <p><b>Description</b></p>
1047                                    
1048                                   <p>The "<tt>glutTabletButtonFunc</tt>" function
1049 is not implemented in <i>freeglut</i>. </p>
1050                                    
1051                                   <p><b>Changes From GLUT</b></p>
1052                                    
1053                                   <p>GLUT implements this function. </p>
1054                                    
1055                                   <h2> 12.21&nbsp; glutMenuStatusFunc</h2>
1056                                       
1057                                   <h2> 12.22&nbsp; glutWindowStatusFunc</h2>
1058                                       
1059                                   <h1> 13.0&nbsp;<a name="StateSetting"></a>
1060   State Setting and Retrieval Functions</h1>
1061                                       
1062                                   <h2> 13.1&nbsp; glutSetOption</h2>
1063                                       
1064                                   <h2> 13.2&nbsp; glutGet</h2>
1065                                       
1066                                   <h2> 13.3&nbsp; glutDeviceGet</h2>
1067                                       
1068                                   <h2> 13.4&nbsp; glutGetModifiers</h2>
1069                                       
1070                                   <h2> 13.5&nbsp; glutLayerGet</h2>
1071                                       
1072                                   <h2> 13.6&nbsp; glutExtensionSupported</h2>
1073                                       
1074                                   <h2> 13.7&nbsp; glutGetProcAddress</h2>
1075                                   <p><tt>glutGetProcAddress</tt> returns
1076 a pointer to a named GL or FreeGLUT function. </p>
1077                                   <p><b>Usage</b></p>
1078                                   <p><tt>void *glutGetProcAddress ( const
1079 char *procName ) ;</tt></p>
1080                                   <p><tt>procName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1081                                   </tt>Name of an OpenGL or GLUT function. 
1082                                   </p>
1083                                   <p><b>Description</b></p>
1084                                   <p><tt>glutGetProcAddress</tt> is useful
1085 for dealing with OpenGL extensions. If an application calls OpenGL extension
1086 functions directly, that application will only link/run with an OpenGL library
1087 that supports the extension. By using a function pointer returned from glutGetProcAddress(),
1088 the application will avoid this hard dependency and be more portable and interoperate
1089 better with various implementations of OpenGL. </p>
1090                                   <p> Both OpenGL functions and FreeGLUT
1091 functions can be queried with this function. </p>
1092                                   <p><b>NOTE</b>: this function is not supported
1093 in GLUT. </p>
1094                                   <h1> 14.0&nbsp;<a name="FontRendering"></a>
1095   Font Rendering Functions</h1>
1096   <i>Freeglut</i> supports two types of font rendering:&nbsp; bitmap fonts,
1097  which are rendered using the "<tt>glBitmap</tt>" function call, and stroke
1098  fonts, which are rendered as sequences of OpenGL line segments.&nbsp; Because
1099  they are rendered as bitmaps, the bitmap fonts tend to render more quickly
1100  than stroke fonts, but they are less flexible in terms of scaling and rendering.&nbsp;
1101  Bitmap font characters are positioned with calls to the "<tt>glRasterPos*</tt>
1102   " functions while stroke font characters use the OpenGL transformations
1103 to position characters.                                    
1104                                   <p>&nbsp;&nbsp;&nbsp; It should be noted 
1105 that <i>freeglut</i> fonts are similar but not identical to GLUT fonts.&nbsp; 
1106 At the moment, <i>freeglut</i> fonts do not support the "`" (backquote) and 
1107 "|" (vertical line) characters; in their place it renders asterisks. </p>
1108                                    
1109                                   <p>&nbsp;&nbsp;&nbsp; <i>Freeglut</i> supports 
1110 the following bitmap fonts: </p>
1111                                    
1112                                   <ul>
1113   <li> <tt>GLUT_BITMAP_8_BY_13</tt> - A variable-width font with every character
1114  fitting in a rectangle of 13 pixels high by at most 8 pixels wide.</li>
1115    <li> <tt>GLUT_BITMAP_9_BY_15</tt> - A variable-width font with every character
1116  fitting in a rectangle of 15 pixels high by at most 9 pixels wide.</li>
1117    <li> <tt>GLUT_BITMAP_TIMES_ROMAN_10</tt> - A 10-point variable-width Times 
1118 Roman font.</li>
1119    <li> <tt>GLUT_BITMAP_TIMES_ROMAN_24</tt> - A 24-point variable-width Times 
1120 Roman font.</li>
1121    <li> <tt>GLUT_BITMAP_HELVETICA_10</tt> - A 10-point variable-width Helvetica
1122  font.</li>
1123    <li> <tt>GLUT_BITMAP_HELVETICA_12</tt> - A 12-point variable-width Helvetica
1124  font.</li>
1125    <li> <tt>GLUT_BITMAP_HELVETICA_18</tt> - A 18-point variable-width Helvetica
1126  font.</li>
1127                                      
1128                                   </ul>
1129   <i>Freeglut</i> calls "<tt>glRasterPos4v</tt>" to advance the cursor by
1130 the width of a character and to render carriage returns when appropriate.&nbsp;
1131  It does not use any display lists in it rendering in bitmap fonts.     
1132                               
1133                                   <p>&nbsp;&nbsp;&nbsp; <i>Freeglut</i> supports 
1134 the following stroke fonts: </p>
1135                                    
1136                                   <ul>
1137   <li> <tt>GLUT_STROKE_ROMAN</tt> - A proportionally-spaced Roman Simplex 
1138 font</li>
1139    <li> <tt>GLUT_STROKE_MONO_ROMAN</tt> - A fixed-width Roman Simplex font</li>
1140                                      
1141                                   </ul>
1142   <i>Freeglut</i> does not use any display lists in its rendering of stroke
1143  fonts.&nbsp; It calls "<tt>glTranslatef</tt>" to advance the cursor by the 
1144 width of a character and to render carriage returns when appropriate.   
1145                                 
1146                                   <h2> 14.1&nbsp; glutBitmapCharacter</h2>
1147   The "<tt>glutBitmapCharacter</tt>" function renders a single bitmapped
1148 character in the <i>current window</i> using the specified font.        
1149                            
1150                                   <p><b>Usage</b> </p>
1151                                    
1152                                   <p><tt>void glutBitmapCharacter ( void *font,
1153 int character ) ;</tt> </p>
1154                                    
1155                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1156                                   </tt>The bitmapped font to use in rendering 
1157 the character <br>
1158                                    <tt>character&nbsp;&nbsp; </tt>The ASCII 
1159 code of the character to be rendered </p>
1160                                    
1161                                   <p><b>Description</b> </p>
1162                                    
1163                                   <p>The&nbsp; "<tt>glutBitmapCharacter</tt>
1164   " function renders the given character in the specified bitmap font.&nbsp; 
1165                                   <i>Freeglut</i> automatically sets the necessary
1166 pixel unpack storage modes and restores the existing modes when it has finished.&nbsp;
1167 Before the first call to "<tt>glutBitMapCharacter</tt>  " the application
1168 program should call "<tt>glRasterPos*</tt>" to set the  position of the character
1169 in the window.&nbsp; The "<tt>glutBitmapCharacter</tt> " function advances
1170 the cursor position as part of its call to "<tt>glBitmap</tt> " and so the
1171 application does not need to call "<tt>glRasterPos*</tt>" again  for successive
1172 characters on the same line. </p>
1173                                    
1174                                   <p><b>Changes From GLUT</b> </p>
1175                                    
1176                                   <p>Nonexistent characters are rendered as
1177 asterisks.&nbsp; The rendering position in <i>freeglut</i> is apparently off
1178 from GLUT's position by a few pixels vertically and one or two pixels horizontally.
1179                                   </p>
1180                                    
1181                                   <h2> 14.2&nbsp; glutBitmapString</h2>
1182   The "<tt>glutBitmapString</tt>" function renders a string of bitmapped
1183 characters in the <i>current window</i> using the specified font.       
1184                             
1185                                   <p><b>Usage</b> </p>
1186                                    
1187                                   <p><tt>void glutBitmapString ( void *font, 
1188 char *string ) ;</tt> </p>
1189                                    
1190                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1191                                   </tt>The bitmapped font to use in rendering 
1192 the character string <br>
1193                                    <tt>string&nbsp;&nbsp;&nbsp; </tt>String 
1194 of characters to be rendered </p>
1195                                    
1196                                   <p><b>Description</b> </p>
1197                                    
1198                                   <p>The&nbsp; "<tt>glutBitmapString</tt>
1199   " function renders the given character string in the specified bitmap font.&nbsp; 
1200                                   <i>Freeglut</i> automatically sets the necessary
1201 pixel unpack storage modes and restores the existing modes when it has finished.&nbsp;
1202 Before calling "<tt>glutBitMapString</tt>" the application program should
1203 call "<tt>glRasterPos*</tt>" to set the position of the string in the window.&nbsp;
1204 The "<tt>glutBitmapString</tt>" function handles carriage returns.&nbsp;
1205 Nonexistent characters are rendered as asterisks. </p>
1206                                    
1207                                   <p><b>Changes From GLUT</b> </p>
1208                                    
1209                                   <p>GLUT does not include this function.
1210                                    </p>
1211                                    
1212                                   <h2> 14.3&nbsp; glutBitmapWidth</h2>
1213   The "<tt>glutBitmapWidth</tt>" function returns the width in pixels of
1214 a single bitmapped character in the specified font.                     
1215               
1216                                   <p><b>Usage</b> </p>
1217                                    
1218                                   <p><tt>int glutBitmapWidth ( void *font, 
1219 int character ) ;</tt> </p>
1220                                    
1221                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1222                                   </tt>The bitmapped font to use in calculating 
1223 the character width <br>
1224                                    <tt>character&nbsp;&nbsp; </tt>The ASCII 
1225 code of the character </p>
1226                                    
1227                                   <p><b>Description</b> </p>
1228                                    
1229                                   <p>The&nbsp; "<tt>glutBitmapWidth</tt>" 
1230 function returns the width of the given character in the specified bitmap 
1231 font.&nbsp; Because the font is bitmapped, the width is an exact integer.
1232                                    </p>
1233                                    
1234                                   <p><b>Changes From GLUT</b> </p>
1235                                    
1236                                   <p>Nonexistent characters return the width 
1237 of an asterisk. </p>
1238                                    
1239                                   <h2> 14.4&nbsp; glutBitmapLength</h2>
1240   The "<tt>glutBitmapLength</tt>" function returns the width in pixels of
1241 a string of bitmapped characters in the specified font.                 
1242                   
1243                                   <p><b>Usage</b> </p>
1244                                    
1245                                   <p><tt>int glutBitmapLength ( void *font, 
1246 char *string ) ;</tt> </p>
1247                                    
1248                                   <p><tt>font&nbsp;&nbsp;&nbsp; </tt>The bitmapped
1249 font to use in calculating the character width <br>
1250                                    <tt>string&nbsp; </tt>String of characters 
1251 whose width is to be calculated </p>
1252                                    
1253                                   <p><b>Description</b> </p>
1254                                    
1255                                   <p>The&nbsp; "<tt>glutBitmapLength</tt>
1256   " function returns the width in pixels of the given character string in 
1257 the specified bitmap font.&nbsp; Because the font is bitmapped, the width 
1258 is an exact integer:&nbsp; the return value is identical to the sum of the 
1259 character widths returned by a series of calls to "<tt>glutBitmapWidth</tt>
1260 ".&nbsp; The width of nonexistent characters is counted to be the width of 
1261 an asterisk. </p>
1262                                    
1263                                   <p>&nbsp;&nbsp;&nbsp; If the string contains 
1264 one or more carriage returns, <i>freeglut</i> calculates the widths in pixels 
1265 of the lines separately and returns the largest width. </p>
1266                                    
1267                                   <p><b>Changes From GLUT</b> </p>
1268                                    
1269                                   <p>GLUT does not include this function.
1270                                    </p>
1271                                    
1272                                   <h2> 14.5&nbsp; glutBitmapHeight</h2>
1273   The "<tt>glutBitmapHeight</tt>" function returns the height in pixels of
1274  the specified font.                                    
1275                                   <p><b>Usage</b> </p>
1276                                    
1277                                   <p><tt>int glutBitmapHeight ( void *font 
1278 ) ;</tt> </p>
1279                                    
1280                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1281                                   </tt>The bitmapped font to use in calculating 
1282 the character height </p>
1283                                    
1284                                   <p><b>Description</b> </p>
1285                                    
1286                                   <p>The&nbsp; "<tt>glutBitmapHeight</tt>
1287   " function returns the height of a character in the specified bitmap font.&nbsp; 
1288 Because the font is bitmapped, the height is an exact integer.&nbsp; The fonts
1289 are designed such that all characters have (nominally) the same height.  
1290                                  </p>
1291                                    
1292                                   <p><b>Changes From GLUT</b> </p>
1293                                    
1294                                   <p>GLUT does not include this function.
1295                                    </p>
1296                                    
1297                                   <h2> 14.6&nbsp; glutStrokeCharacter</h2>
1298   The "<tt>glutStrokeCharacter</tt>" function renders a single stroke character
1299  in the <i>current window</i> using the specified font.                 
1300                   
1301                                   <p><b>Usage</b> </p>
1302                                    
1303                                   <p><tt>void glutStrokeCharacter ( void *font,
1304 int character ) ;</tt> </p>
1305                                    
1306                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1307                                   </tt>The stroke font to use in rendering 
1308 the character <br>
1309                                    <tt>character&nbsp;&nbsp; </tt>The ASCII 
1310 code of the character to be rendered </p>
1311                                    
1312                                   <p><b>Description</b> </p>
1313                                    
1314                                   <p>The&nbsp; "<tt>glutStrokeCharacter</tt>
1315   " function renders the given character in the specified stroke font.&nbsp; 
1316 Before the first call to "<tt>glutStrokeCharacter</tt>" the application program 
1317 should call the OpenGL transformation (positioning and scaling) functions 
1318 to set the position of the character in the window.&nbsp; The "<tt>glutStrokeCharacter</tt>
1319   " function advances the cursor position by a call to "<tt>glTranslatef</tt>
1320   " and so the application does not need to call the OpenGL positioning functions
1321  again for successive characters on the same line. </p>
1322                                    
1323                                   <p><b>Changes From GLUT</b> </p>
1324                                    
1325                                   <p>Nonexistent characters are rendered as
1326 asterisks. </p>
1327                                    
1328                                   <h2> 14.7&nbsp; glutStrokeString</h2>
1329   The "<tt>glutStrokeString</tt>" function renders a string of characters
1330 in the <i>current window</i> using the specified stroke font.           
1331                         
1332                                   <p><b>Usage</b> </p>
1333                                    
1334                                   <p><tt>void glutStrokeString ( void *font, 
1335 char *string ) ;</tt> </p>
1336                                    
1337                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1338                                   </tt>The stroke font to use in rendering 
1339 the character string <br>
1340                                    <tt>string&nbsp;&nbsp;&nbsp; </tt>String 
1341 of characters to be rendered </p>
1342                                    
1343                                   <p><b>Description</b> </p>
1344                                    
1345                                   <p>The&nbsp; "<tt>glutStrokeString</tt>
1346   " function renders the given character string in the specified stroke font.&nbsp; 
1347 Before calling "<tt>glutStrokeString</tt>" the application program should 
1348 call the OpenGL transformation (positioning and scaling) functions to set 
1349 the position of the string in the window.&nbsp; The "<tt>glutStrokeString</tt>
1350   " function handles carriage returns.&nbsp; Nonexistent characters are rendered 
1351 as asterisks. </p>
1352                                    
1353                                   <p><b>Changes From GLUT</b> </p>
1354                                    
1355                                   <p>GLUT does not include this function.
1356                                    </p>
1357                                    
1358                                   <h2> 14.8&nbsp; glutStrokeWidth</h2>
1359   The "<tt>glutStrokeWidth</tt>" function returns the width in pixels of
1360 a single character in the specified stroke font.                        
1361            
1362                                   <p><b>Usage</b> </p>
1363                                    
1364                                   <p><tt>int glutStrokeWidth ( void *font, 
1365 int character ) ;</tt> </p>
1366                                    
1367                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1368                                   </tt>The stroke font to use in calculating 
1369 the character width <br>
1370                                    <tt>character&nbsp;&nbsp; </tt>The ASCII 
1371 code of the character </p>
1372                                    
1373                                   <p><b>Description</b> </p>
1374                                    
1375                                   <p>The&nbsp; "<tt>glutStrokeWidth</tt>" 
1376 function returns the width of the given character in the specified stroke 
1377 font.&nbsp; Because the font is a stroke font, the width is actually a floating-point 
1378 number; the function rounds it to the nearest integer for the return value.
1379                                    </p>
1380                                    
1381                                   <p><b>Changes From GLUT</b> </p>
1382                                    
1383                                   <p>Nonexistent characters return the width 
1384 of an asterisk. </p>
1385                                    
1386                                   <h2> 14.9&nbsp; glutStrokeLength</h2>
1387   The "<tt>glutStrokeLength</tt>" function returns the width in pixels of
1388 a string of characters in the specified stroke font.                    
1389                
1390                                   <p><b>Usage</b> </p>
1391                                    
1392                                   <p><tt>int glutStrokeLength ( void *font, 
1393 char *string ) ;</tt> </p>
1394                                    
1395                                   <p><tt>font&nbsp;&nbsp;&nbsp; </tt>The stroke
1396 font to use in calculating the character width <br>
1397                                    <tt>string&nbsp; </tt>String of characters 
1398 whose width is to be calculated </p>
1399                                    
1400                                   <p><b>Description</b> </p>
1401                                    
1402                                   <p>The&nbsp; "<tt>glutStrokeLength</tt>
1403   " function returns the width in pixels of the given character string in 
1404 the specified stroke font.&nbsp; Because the font is a stroke font, the width 
1405 of an individual character is a floating-point number.&nbsp; <i>Freeglut</i>
1406   adds the floating-point widths and rounds the funal result to return the 
1407 integer value.&nbsp; Thus the return value may differ from the sum of the 
1408 character widths returned by a series of calls to "<tt>glutStrokeWidth</tt>
1409   ".&nbsp; The width of nonexistent characters is counted to be the width 
1410 of an asterisk. </p>
1411                                    
1412                                   <p>&nbsp;&nbsp;&nbsp; If the string contains 
1413 one or more carriage returns, <i>freeglut</i> calculates the widths in pixels 
1414 of the lines separately and returns the largest width. </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.10&nbsp; glutStrokeHeight</h2>
1422   The "<tt>glutStrokeHeight</tt>" function returns the height in pixels of
1423  the specified font.                                    
1424                                   <p><b>Usage</b> </p>
1425                                    
1426                                   <p><tt>GLfloat glutStrokeHeight ( void *font
1427 ) ;</tt> </p>
1428                                    
1429                                   <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1430                                   </tt>The stroke font to use in calculating 
1431 the character height </p>
1432                                    
1433                                   <p><b>Description</b> </p>
1434                                    
1435                                   <p>The&nbsp; "<tt>glutStrokeHeight</tt>
1436   " function returns the height of a character in the specified stroke font.&nbsp; 
1437 The application programmer should note that, unlike the other <i>freeglut</i>
1438   font functions, this one returns a floating-point number.&nbsp; The fonts 
1439 are designed such that all characters have (nominally) the same height. </p>
1440                                    
1441                                   <p><b>Changes From GLUT</b> </p>
1442                                    
1443                                   <p>GLUT does not include this function.
1444                                    </p>
1445                                    
1446                                   <h1> 15.0&nbsp;<a name="GeometricObject"></a>
1447   Geometric Object Rendering Functions</h1>
1448   <i>Freeglut</i> includes eighteen routines for generating easily-recognizable
1449  3-d geometric objects.&nbsp; These routines are effectively the same ones
1450  that are included in the GLUT library, and reflect the functionality available
1451  in the <i>aux</i> toolkit described in the <i>OpenGL Programmer's Guide</i>
1452   .&nbsp; They are included to allow programmers to create with a single
1453 line of code a three-dimensional object which can be used to test a variety
1454 of OpenGL functionality.&nbsp; None of the routines generates a display list 
1455 for the object which it draws.&nbsp; The functions generate normals appropriate 
1456 for lighting but, except for the teapon functions, do not generate texture 
1457 coordinates.                                    
1458                                   <h2> 15.1&nbsp; glutWireSphere, glutSolidSphere</h2>
1459   The "<tt>glutWireSphere</tt>" and "<tt>glutSolidSphere</tt>" functions
1460 draw a wireframe and solid sphere respectively.                         
1461           
1462                                   <p><b>Usage</b> </p>
1463                                    
1464                                   <p><tt>void glutWireSphere ( GLdouble dRadius, 
1465 GLint slices, GLint stacks ) ;</tt> </p>
1466                                    
1467                                   <p><tt>void glutSolidSphere ( GLdouble dRadius,
1468 GLint slices, GLint stacks ) ;</tt> </p>
1469                                    
1470                                   <p><tt>dRadius&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1471                                   </tt>The desired radius of the sphere </p>
1472                                    
1473                                   <p><tt>slices&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1474                                   </tt>The desired number of slices (divisions 
1475 in the longitudinal direction) in the sphere </p>
1476                                    
1477                                   <p><tt>stacks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1478                                   </tt>The desired number of stacks (divisions 
1479 in the latitudinal direction) in the sphere.&nbsp; The number of points in 
1480 this direction, including the north and south poles, is <tt>stacks+1</tt>
1481   </p>
1482                                    
1483                                   <p><b>Description</b> </p>
1484                                    
1485                                   <p>The "<tt>glutWireSphere</tt>" and "<tt>
1486   glutSolidSphere</tt>" functions render a sphere centered at the origin
1487 of the modeling coordinate system.&nbsp; The north and south poles of the
1488 sphere are on the positive and negative Z-axes respectively and the prime
1489 meridian crosses the positive X-axis. </p>
1490                                    
1491                                   <p><b>Changes From GLUT</b> </p>
1492                                    
1493                                   <p>None that we know of. </p>
1494                                    
1495                                   <h2> 15.2&nbsp; glutWireTorus, glutSolidTorus</h2>
1496   The "<tt>glutWireTorus</tt>" and "<tt>glutSolidTorus</tt>" functions draw
1497  a wireframe and solid torus (donut shape) respectively.                
1498                    
1499                                   <p><b>Usage</b> </p>
1500                                    
1501                                   <p><tt>void glutWireTorus ( GLdouble dInnerRadius, 
1502 GLdouble dOuterRadius, GLint nSides, GLint nRings ) ;</tt> </p>
1503                                    
1504                                   <p><tt>void glutSolidTorus ( GLdouble dInnerRadius, 
1505 GLdouble dOuterRadius, GLint nSides, GLint nRings ) ;</tt> </p>
1506                                    
1507                                   <p><tt>dInnerRadius&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1508                                   </tt>The desired inner radius of the torus, 
1509 from the origin to the circle defining the centers of the outer circles </p>
1510                                    
1511                                   <p><tt>dOuterRadius&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1512                                   </tt>The desired outer radius of the torus, 
1513 from the center of the outer circle to the actual surface of the torus </p>
1514                                    
1515                                   <p><tt>nSides&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1516                                   </tt>The desired number of segments in a
1517 single outer circle of the torus </p>
1518                                    
1519                                   <p><tt>nRings&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1520                                   </tt>The desired number of outer circles 
1521 around the origin of the torus </p>
1522                                    
1523                                   <p><b>Description</b> </p>
1524                                    
1525                                   <p>The "<tt>glutWireTorus</tt>" and "<tt>
1526   glutSolidTorus</tt>" functions render a torus centered at the origin of 
1527 the modeling coordinate system.&nbsp; The torus is circularly symmetric about 
1528 the Z-axis and starts at the positive X-axis. </p>
1529                                    
1530                                   <p><b>Changes From GLUT</b> </p>
1531                                    
1532                                   <p>None that we know of. </p>
1533                                    
1534                                   <h2> 15.3&nbsp; glutWireCone, glutSolidCone</h2>
1535   The "<tt>glutWireCone</tt>" and "<tt>glutSolidCone</tt>" functions draw
1536 a wireframe and solid cone respectively.                                
1537    
1538                                   <p><b>Usage</b> </p>
1539                                    
1540                                   <p><tt>void glutWireCone ( GLdouble base, 
1541 GLdouble height, GLint slices, GLint stacks ) ;</tt> </p>
1542                                    
1543                                   <p><tt>void glutSolidCone ( GLdouble base, 
1544 GLdouble height, GLint slices, GLint stacks ) ;</tt> </p>
1545                                    
1546                                   <p><tt>base&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1547                                   </tt>The desired radius of the base of the
1548 cone </p>
1549                                    
1550                                   <p><tt>height&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1551                                   </tt>The desired height of the cone </p>
1552                                    
1553                                   <p><tt>slices&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1554                                   </tt>The desired number of slices around 
1555 the base of the cone </p>
1556                                    
1557                                   <p><tt>stacks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1558                                   </tt>The desired number of segments between 
1559 the base and the tip of the cone (the number of points, including the tip, 
1560 is <tt>stacks + 1</tt>) </p>
1561                                    
1562                                   <p><b>Description</b> </p>
1563                                    
1564                                   <p>The "<tt>glutWireCone</tt>" and "<tt>
1565   glutSolidCone</tt>" functions render a right circular cone with a base
1566 centered at the origin and in the X-Y plane and its tip on the positive Z-axis.&nbsp; 
1567 The wire cone is rendered with triangular elements. </p>
1568                                    
1569                                   <p><b>Changes From GLUT</b> </p>
1570                                    
1571                                   <p>None that we know of. </p>
1572                                    
1573                                   <h2> 15.4&nbsp; glutWireCube, glutSolidCube</h2>
1574   The "<tt>glutWireCube</tt>" and "<tt>glutSolidCube</tt>" functions draw
1575 a wireframe and solid cube respectively.                                
1576    
1577                                   <p><b>Usage</b> </p>
1578                                    
1579                                   <p><tt>void glutWireCube ( GLdouble dSize 
1580 ) ;</tt> </p>
1581                                    
1582                                   <p><tt>void glutSolidCube ( GLdouble dSize 
1583 ) ;</tt> </p>
1584                                    
1585                                   <p><tt>dSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1586                                   </tt>The desired length of an edge of the 
1587 cube </p>
1588                                    
1589                                   <p><b>Description</b> </p>
1590                                    
1591                                   <p>The "<tt>glutWireCube</tt>" and "<tt>
1592   glutSolidCube</tt>" functions render a cube of the desired size, centered 
1593 at the origin.&nbsp; Its faces are normal to the coordinate directions. </p>
1594                                    
1595                                   <p><b>Changes From GLUT</b> </p>
1596                                    
1597                                   <p>None that we know of. </p>
1598                                    
1599                                   <h2> 15.5&nbsp; glutWireTetrahedron, glutSolidTetrahedron</h2>
1600   The "<tt>glutWireTetrahedron</tt>" and "<tt>glutSolidTetrahedron</tt>"
1601 functions draw a wireframe and solid tetrahedron (four-sided Platonic solid)
1602 respectively.                                    
1603                                   <p><b>Usage</b> </p>
1604                                    
1605                                   <p><tt>void glutWireTetrahedron ( void )
1606 ;</tt> </p>
1607                                    
1608                                   <p><tt>void glutSolidTetrahedron ( void 
1609 ) ;</tt> </p>
1610                                    
1611                                   <p><b>Description</b> </p>
1612                                    
1613                                   <p>The "<tt>glutWireTetrahedron</tt>" and 
1614 "<tt>glutSolidTetrahedron</tt>" functions render a tetrahedron whose corners 
1615 are each a distance of one from the origin.&nbsp; The length of each side 
1616 is 2/3 sqrt(6).&nbsp; One corner is on the positive X-axis and another is 
1617 in the X-Y plane with a positive Y-coordinate. </p>
1618                                    
1619                                   <p><b>Changes From GLUT</b> </p>
1620                                    
1621                                   <p>None that we know of. </p>
1622                                    
1623                                   <h2> 15.6&nbsp; glutWireOctahedron, glutSolidOctahedron</h2>
1624   The "<tt>glutWireOctahedron</tt>" and "<tt>glutSolidOctahedron</tt>" functions
1625  draw a wireframe and solid octahedron (eight-sided Platonic solid) respectively.
1626                                    
1627                                   <p><b>Usage</b> </p>
1628                                    
1629                                   <p><tt>void glutWireOctahedron ( void ) 
1630 ;</tt> </p>
1631                                    
1632                                   <p><tt>void glutSolidOctahedron ( void )
1633 ;</tt> </p>
1634                                    
1635                                   <p><b>Description</b> </p>
1636                                    
1637                                   <p>The "<tt>glutWireOctahedron</tt>" and 
1638 "<tt>glutSolidOctahedron</tt>" functions render an octahedron whose corners 
1639 are each a distance of one from the origin.&nbsp; The length of each side 
1640 is sqrt(2).&nbsp; The corners are on the positive and negative coordinate 
1641 axes. </p>
1642                                    
1643                                   <p><b>Changes From GLUT</b> </p>
1644                                    
1645                                   <p>None that we know of. </p>
1646                                    
1647                                   <h2> 15.7&nbsp; glutWireDodecahedron, glutSolidDodecahedron</h2>
1648   The "<tt>glutWireDodecahedron</tt>" and "<tt>glutSolidDodecahedron</tt>
1649 "  functions draw a wireframe and solid dodecahedron (twelve-sided Platonic
1650 solid) respectively.                                    
1651                                   <p><b>Usage</b> </p>
1652                                    
1653                                   <p><tt>void glutWireDodecahedron ( void 
1654 ) ;</tt> </p>
1655                                    
1656                                   <p><tt>void glutSolidDodecahedron ( void 
1657 ) ;</tt> </p>
1658                                    
1659                                   <p><b>Description</b> </p>
1660                                    
1661                                   <p>The "<tt>glutWireDodecahedron</tt>" and
1662 "<tt>glutSolidDodecahedron</tt>" functions render a dodecahedron whose corners
1663 are each a distance of sqrt(3) from the origin.&nbsp; The length of each
1664 side is sqrt(5)-1.&nbsp; There are twenty corners; interestingly enough,
1665 eight of them coincide with the corners of a cube with sizes of length 2.
1666                                   </p>
1667                                    
1668                                   <p><b>Changes From GLUT</b> </p>
1669                                    
1670                                   <p>None that we know of. </p>
1671                                    
1672                                   <h2> 15.8&nbsp; glutWireIcosahedron, glutSolidIcosahedron</h2>
1673   The "<tt>glutWireIcosahedron</tt>" and "<tt>glutSolidIcosahedron</tt>"
1674 functions draw a wireframe and solid icosahedron (twenty-sided Platonic solid)
1675 respectively.                                    
1676                                   <p><b>Usage</b> </p>
1677                                    
1678                                   <p><tt>void glutWireIcosahedron ( void )
1679 ;</tt> </p>
1680                                    
1681                                   <p><tt>void glutSolidIcosahedron ( void 
1682 ) ;</tt> </p>
1683                                    
1684                                   <p><b>Description</b> </p>
1685                                    
1686                                   <p>The "<tt>glutWireIcosahedron</tt>" and 
1687 "<tt>glutSolidIcosahedron</tt>" functions render an icosahedron whose corners 
1688 are each a unit distance from the origin.&nbsp; The length of each side is 
1689 slightly greater than one.&nbsp; Two of the corners lie on the positive and 
1690 negative X-axes. </p>
1691                                    
1692                                   <p><b>Changes From GLUT</b> </p>
1693                                    
1694                                   <p>None that we know of. </p>
1695                                    
1696                                   <h2> 15.7&nbsp; glutWireRhombicDodecahedron, 
1697 glutSolidRhombicDodecahedron</h2>
1698   The "<tt>glutWireRhombicDodecahedron</tt>" and "<tt>glutSolidRhombicDodecahedron</tt>
1699   " functions draw a wireframe and solid rhombic dodecahedron (twelve-sided
1700  semi-regular solid) respectively.                                    
1701                                   <p><b>Usage</b> </p>
1702                                    
1703                                   <p><tt>void glutWireRhombicDodecahedron 
1704 ( void ) ;</tt> </p>
1705                                    
1706                                   <p><tt>void glutSolidRhombicDodecahedron 
1707 ( void ) ;</tt> </p>
1708                                    
1709                                   <p><b>Description</b> </p>
1710                                    
1711                                   <p>The "<tt>glutWireRhombicDodecahedron</tt>
1712   " and "<tt>glutSolidRhombicDodecahedron</tt>" functions render a rhombic 
1713 dodecahedron whose corners are at most a distance of one from the origin.&nbsp; 
1714 The rhombic dodecahedron has faces which are identical rhombuses (rhombi?) 
1715 but which have some vertices at which three faces meet and some vertices at
1716 which four faces meet.&nbsp; The length of each side is sqrt(3)/2.&nbsp; Vertices
1717 at which four faces meet are found at (0, 0, <u>+</u>1) and (<u>  +</u>sqrt(2)/2,
1718                                   <u>+</u>sqrt(2)/2, 0). </p>
1719                                    
1720                                   <p><b>Changes From GLUT</b> </p>
1721                                    
1722                                   <p>GLUT does not include these functions.
1723                                    </p>
1724                                    
1725                                   <h2> 15.10&nbsp; glutWireTeapot, glutSolidTeapot</h2>
1726   The "<tt>glutWireTeapot</tt>" and "<tt>glutSolidTeapot</tt>" functions
1727 draw a wireframe and solid teapot respectively.                         
1728           
1729                                   <p><b>Usage</b> </p>
1730                                    
1731                                   <p><tt>void glutWireTeapot ( GLdouble dSize 
1732 ) ;</tt> </p>
1733                                    
1734                                   <p><tt>void glutSolidTeapot ( GLdouble dSize
1735 ) ;</tt> </p>
1736                                    
1737                                   <p><tt>dSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1738                                   </tt>The desired size of the teapot </p>
1739                                    
1740                                   <p><b>Description</b> </p>
1741                                    
1742                                   <p>The "<tt>glutWireTeapot</tt>" and "<tt>
1743   glutSolidTeapot</tt>" functions render a teapot of the desired size, centered 
1744 at the origin.&nbsp; This is the famous OpenGL teapot [add reference]. </p>
1745                                    
1746                                   <p><b>Changes From GLUT</b> </p>
1747                                    
1748                                   <p>None that we know of. </p>
1749                                    
1750                                   <h1> 16.0&nbsp;<a name="GameMode"></a>
1751   Game Mode Functions</h1>
1752                                       
1753                                   <h2> 16.1&nbsp; glutGameModeString</h2>
1754                                       
1755                                   <h2> 16.2&nbsp; glutEnterGameMode, glutLeaveGameMode</h2>
1756                                       
1757                                   <h2> 16.3&nbsp; glutGameModeGet</h2>
1758                                       
1759                                   <h1> 17.0&nbsp;<a name="VideoResize"></a>
1760   Video Resize Functions</h1>
1761                                       
1762                                   <h2> 17.1&nbsp; glutVideoResizeGet</h2>
1763                                       
1764                                   <h2> 17.2&nbsp; glutSetupVideoResizing, 
1765 glutStopVideoResizing</h2>
1766                                       
1767                                   <h2> 17.3&nbsp; glutVideoResize</h2>
1768                                       
1769                                   <h2> 17.4&nbsp; glutVideoPan</h2>
1770                                       
1771                                   <h1> 18.0&nbsp;<a name="ColorMap"></a>
1772   Color Map Functions</h1>
1773                                       
1774                                   <h2> 18.1&nbsp; glutSetColor, glutGetColor</h2>
1775                                       
1776                                   <h2> 18.2&nbsp; glutCopyColormap</h2>
1777                                       
1778                                   <h1> 19.0&nbsp;<a name="Miscellaneous"></a>
1779   Miscellaneous Functions</h1>
1780                                       
1781                                   <h2> 19.1&nbsp; glutIgnoreKeyRepeat, glutSetKeyRepeat</h2>
1782                                       
1783                                   <h2> 19.2&nbsp; glutForceJoystickFunc</h2>
1784                                       
1785                                   <h2> 19.3&nbsp; glutReportErrors</h2>
1786                                       
1787                                   <h1> 20.0&nbsp;<a name="UsageNotes"></a>
1788   Usage Notes</h1>
1789                                       
1790                                   <p> The following environment variables
1791 are recognized by <i>freeglut</i>: </p>
1792                                   <ul>
1793                                     <li>DISPLAY - specifies a display name.<br>
1794                                     </li>
1795                                     <li>GLUT_FPS - specifies a time interval
1796 (in milliseconds) for reporting framerate messages to stderr.  For example,
1797 if FREEGLUT_FPS is set to 5000, every 5 seconds a message will be printed
1798 to stderr showing the current frame rate.  The frame rate is measured by counting
1799 the number of times glutSwapBuffers() is called over the time interval.</li>
1800                                     <li>GLUT_ICON - specifies the icon that
1801 goes in the upper left-hand corner of the <i>freeglut</i><i> </i>windows </li>
1802                                   </ul>
1803                                   <h1> 21.0&nbsp;<a name="ImplementationNotes"></a>
1804   Implementation Notes</h1>
1805                                       
1806                                   <h1> 22.0&nbsp;<a name="GLUT_State"></a>
1807   GLUT State</h1>
1808                                       
1809                                   <h1> 23.0&nbsp;<a name="Freeglut.h_Header"></a>
1810   "freeglut.h" Header File</h1>
1811                                       
1812                                   <h1> 24.0&nbsp;<a name="References"></a>
1813   References</h1>
1814                                       
1815                                   <h1> 25.0&nbsp;<a name="Index"></a>
1816   Index</h1>
1817   &nbsp;                                    
1818                                   <p>&nbsp; <br>
1819  &nbsp; <br>
1820  &nbsp; <br>
1821  &nbsp; <br>
1822  &nbsp; <br>
1823  &nbsp; <br>
1824  &nbsp; <br>
1825  &nbsp; <br>
1826  &nbsp; <br>
1827  &nbsp; <br>
1828  &nbsp; <br>
1829  &nbsp; <br>
1830  &nbsp; <br>
1831  &nbsp; <br>
1832  &nbsp; <br>
1833  &nbsp; <br>
1834  &nbsp; <br>
1835  &nbsp; <br>
1836  &nbsp; <br>
1837  &nbsp; <br>
1838  &nbsp; <br>
1839  &nbsp; <br>
1840  &nbsp; </p>
1841                                    
1842                                   </body>
1843                                   </html>