Added on behalf of John Fay.
[freeglut] / doc / freeglut_user_interface.html
1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2 <html>
3 <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5    <meta name="Author" content="John F. Fay">
6    <meta name="GENERATOR" content="Mozilla/4.77 [en] (Windows NT 5.0; U) [Netscape]">
7    <title>FREEGLUT Application Program Interface</title>
8 </head>
9 <body>
10
11 <dl>
12 <center>
13 <h1>
14 The Open-Source</h1></center>
15
16 <center>
17 <h1>
18 OpenGL Utility Toolkit</h1></center>
19
20 <center>
21 <h1>
22 (freeglut)</h1></center>
23
24 <center>
25 <h1>
26 Application Programming Interface</h1></center>
27 </dl>
28
29 <center>
30 <h1>
31 Version 4.0</h1></center>
32
33 <center>
34 <h2>
35 The freeglut Programming Consortium</h2></center>
36
37 <center>
38 <h2>
39 November, 2002</h2></center>
40
41 <p><br>OpenGL is a trademark of Silicon Graphics, Inc. X Window System
42 is a trademark of X Consortium, Inc.&nbsp; Spaceball is a registered trademark
43 of Spatial Systems Inc.
44 <br>The authors have taken care in preparation of this documentation but
45 make no expressed or implied warranty of any kind and assumes no responsibility
46 for errors or omissions. No liability is assumed for incidental or consequential
47 damages in connection with or arising from the use of information or programs
48 contained herein.
49 <br>&nbsp;
50 <h1>
51 1.0&nbsp;<a NAME="Contents"></a>Contents</h1>
52 1.0&nbsp; <a href="#Contents">Contents</a>
53 <p>2.0&nbsp; <a href="#Introduction">Introduction</a>
54 <p>3.0&nbsp; <a href="#Background">Background</a>
55 <blockquote>3.1&nbsp; Design Philosophy
56 <br>3.2&nbsp; Conventions
57 <br>3.3&nbsp; Terminology
58 <br>3.4&nbsp; Differences from GLUT 3.7</blockquote>
59
60 <p><br>4.0&nbsp; <a href="#Initialization">Initialization Functions</a>
61 <blockquote>4.1&nbsp; glutInit
62 <br>4.2&nbsp; glutInitWindowPosition, glutInitWindowSize
63 <br>4.3&nbsp; glutInitDisplayMode
64 <br>4.4&nbsp; glutInitDisplayString</blockquote>
65
66 <p><br>5.0&nbsp; <a href="#EventProcessing">Event Processing Functions</a>
67 <blockquote>5.1&nbsp; glutMainLoop
68 <br>5.2&nbsp; glutMainLoopEvent
69 <br>5.3&nbsp; glutLeaveMainLoop</blockquote>
70
71 <p><br>6.0&nbsp; <a href="#Window">Window Functions</a>
72 <blockquote>6.1&nbsp; glutCreateWindow
73 <br>6.2&nbsp; glutCreateSubwindow
74 <br>6.3&nbsp; glutDestroyWindow
75 <br>6.4&nbsp; glutSetWindow, glutGetWindow
76 <br>6.5&nbsp; glutSetWindowTitle, glutSetIconTitle
77 <br>6.6&nbsp; glutReshapeWindow
78 <br>6.7&nbsp; glutPositionWindow
79 <br>6.8&nbsp; glutShowWindow, glutHideWindow, glutIconifyWindow
80 <br>6.9&nbsp; glutPushWindow, glutPopWindow
81 <br>6.10&nbsp; glutFullScreen</blockquote>
82
83 <p><br>7.0&nbsp; <a href="#Display">Display Functions</a>
84 <blockquote>7.1&nbsp; glutPostRedisplay
85 <br>7.2&nbsp; glutPostWindowRedisplay
86 <br>7.3&nbsp; glutSwapBuffers</blockquote>
87
88 <p><br>8.0&nbsp; <a href="#MouseCursor">Mouse Cursor Functions</a>
89 <blockquote>8.1&nbsp; glutSetCursor
90 <br>8.2&nbsp; glutWarpPointer</blockquote>
91
92 <p><br>9.0&nbsp; <a href="#Overlay">Overlay Functions</a>
93 <blockquote>9.1&nbsp; glutEstablishOverlay
94 <br>9.2&nbsp; glutRemoveOverlay
95 <br>9.3&nbsp; glutUseLayer
96 <br>9.4&nbsp; glutPostOverlayRedisplay
97 <br>9.5&nbsp; glutPostWindowOverlayRedisplay
98 <br>9.6&nbsp; glutShowOverlay, glutHideOverlay</blockquote>
99
100 <p><br>10.0&nbsp; <a href="#Menu">Menu Functions</a>
101 <blockquote>10.1&nbsp; glutCreateMenu
102 <br>10.2&nbsp; glutDestroyMenu
103 <br>10.3&nbsp; glutGetMenu, glutSetMenu
104 <br>10.4&nbsp; glutAddMenuEntry
105 <br>10.5&nbsp; glutAddSubMenu
106 <br>10.6&nbsp; glutChangeToMenuEntry
107 <br>10.7&nbsp; glutChangeToSubMenu
108 <br>10.8&nbsp; glutRemoveMenuItem
109 <br>10.9&nbsp; glutAttachMenu, glutDetachMenu</blockquote>
110
111 <p><br>11.0&nbsp; <a href="#GlobalCallback">Global Callback Registration
112 Functions</a>
113 <blockquote>11.1&nbsp; glutTimerFunc
114 <br>11.2&nbsp; glutIdleFunc</blockquote>
115
116 <p><br>12.0&nbsp; <a href="#WindowCallback">Window-Specific Callback Registration
117 Functions</a>
118 <blockquote>12.1&nbsp; glutDisplayFunc
119 <br>12.2&nbsp; glutOverlayDisplayFunc
120 <br>12.3&nbsp; glutReshapeFunc
121 <br>12.4&nbsp; glutCloseFunc
122 <br>12.5&nbsp; glutKeyboardFunc
123 <br>12.6&nbsp; glutSpecialFunc
124 <br>12.7&nbsp; glutKeyboardUpFunc
125 <br>12.8&nbsp; glutSpecialUpFunc
126 <br>12.9&nbsp; glutMouseFunc
127 <br>12.10&nbsp; glutMotionFunc, glutPassiveMotionFunc
128 <br>12.11&nbsp; glutVisibilityFunc
129 <br>12.12&nbsp; glutEntryFunc
130 <br>12.13&nbsp; glutJoystickFunc
131 <br>12.14&nbsp; glutSpaceballMotionFunc
132 <br>12.15&nbsp; glutSpaceballRotateFunc
133 <br>12.16&nbsp; glutSpaceballButtonFunc
134 <br>12.17&nbsp; glutButtonBoxFunc
135 <br>12.18&nbsp; glutDialsFunc
136 <br>12.19&nbsp; glutTabletMotionFunc
137 <br>12.20&nbsp; glutTabletButtonFunc
138 <p>12.21&nbsp; glutMenuStatusFunc
139 <br>12.22&nbsp; glutWindowStatusFunc</blockquote>
140
141 <p><br>13.0&nbsp; <a href="#StateSetting">State Setting and Retrieval Functions</a>
142 <blockquote>13.1&nbsp; glutSetOption
143 <br>13.2&nbsp; glutGet
144 <br>13.3&nbsp; glutDeviceGet
145 <br>13.4&nbsp; glutGetModifiers
146 <br>13.5&nbsp; glutLayerGet
147 <br>13.6&nbsp; glutExtensionSupported</blockquote>
148
149 <p><br>14.0&nbsp; <a href="#FontRendering">Font Rendering Functions</a>
150 <blockquote>14.1&nbsp; glutBitmapCharacter
151 <br>14.2&nbsp; glutBitmapString
152 <br>14.3&nbsp; glutBitmapWidth
153 <br>14.4&nbsp; glutBitmapLength
154 <br>14.5&nbsp; glutBitmapHeight
155 <br>14.6&nbsp; glutStrokeCharacter
156 <br>14.7&nbsp; glutStrokeString
157 <br>14.8&nbsp; glutStrokeWidth
158 <br>14.9&nbsp; glutStrokeLength
159 <br>14.10&nbsp; glutStrokeHeight</blockquote>
160
161 <p><br>15.0&nbsp; <a href="#GeometricObject">Geometric Object Rendering
162 Functions</a>
163 <blockquote>15.1&nbsp; glutWireSphere, glutSolidSphere
164 <br>15.2&nbsp; glutWireTorus, glutSolidTorus
165 <br>15.3&nbsp; glutWireCone, glutSolidCone
166 <br>15.4&nbsp; glutWireCube, glutSolidCube
167 <br>15.5&nbsp; glutWireTetrahedron, glutSolidTetrahedron
168 <br>15.6&nbsp; glutWireOctahedron, glutSolidOctahedron
169 <br>15.7&nbsp; glutWireDodecahedron, glutSolidDodecahedron
170 <br>15.8&nbsp; glutWireIcosahedron, glutSolidIcosahedron
171 <br>15.9&nbsp; glutWireRhombicDodecahedron, glutSolidRhombicDodecahedron
172 <br>15.10&nbsp; glutWireTeapot, glutSolidTeapot</blockquote>
173
174 <p><br>16.0&nbsp; <a href="#GameMode">Game Mode Functions</a>
175 <blockquote>16.1&nbsp; glutGameModeString
176 <br>16.2&nbsp; glutEnterGameMode, glutLeaveGameMode
177 <br>16.3&nbsp; glutGameModeGet</blockquote>
178
179 <p><br>17.0&nbsp; <a href="#VideoResize">Video Resize Functions</a>
180 <blockquote>17.1&nbsp; glutVideoResizeGet
181 <br>17.2&nbsp; glutSetupVideoResizing, glutStopVideoResizing
182 <br>17.3&nbsp; glutVideoResize
183 <br>17.4&nbsp; glutVideoPan</blockquote>
184
185 <p><br>18.0&nbsp; <a href="#ColorMap">Color Map Functions</a>
186 <blockquote>18.1&nbsp; glutSetColor, glutGetColor
187 <br>18.2&nbsp; glutCopyColormap</blockquote>
188
189 <p><br>19.0&nbsp; <a href="#Miscellaneous">Miscellaneous Functions</a>
190 <blockquote>19.1&nbsp; glutIgnoreKeyRepeat, glutSetKeyRepeat
191 <br>19.2&nbsp; glutForceJoystickFunc
192 <br>19.3&nbsp; glutReportErrors</blockquote>
193
194 <p><br>20.0&nbsp; <a href="#UsageNotes">Usage Notes</a>
195 <p>21.0&nbsp; <a href="#ImplementationNotes">Implementation Notes</a>
196 <p>22.0&nbsp; <a href="#GLUT_State">GLUT State</a>
197 <p>23.0&nbsp; <a href="#Freeglut.h_Header">"freeglut.h" Header File</a>
198 <p>24.0&nbsp; <a href="#References">References</a>
199 <p>25.0&nbsp; <a href="#Index">Index</a>
200 <br>&nbsp;
201 <br>&nbsp;
202 <h1>
203 2.0&nbsp;<a NAME="Introduction"></a>Introduction</h1>
204 &nbsp;
205 <h1>
206 3.0&nbsp;<a NAME="Background"></a>Background</h1>
207 The OpenGL programming world owes a tremendous debt to Mr. Mark J. Kilgard
208 for writing the OpenGL Utility Toolkit, or GLUT.&nbsp; The GLUT library
209 of functions allows an application programmer to create, control, and manipulate
210 windows independent of what operating system the program is running on.&nbsp;
211 By hiding the dependency on the operating system from the application programmer,
212 he allowed people to write truly portable OpenGL applications.
213 <p>&nbsp;&nbsp;&nbsp; Mr. Kilgard copyrighted his library and gave it a
214 rather unusual license.&nbsp; Under his license, people are allowed freely
215 to copy and distribute the libraries and the source code, but they are
216 not allowed to modify it.&nbsp; For a long time this did not matter because
217 the GLUT library worked so well and because Mr. Kilgard was releasing updates
218 on a regular basis.&nbsp; But with the passage of time, people started
219 wanting some slightly different behaviours in their windowing system.&nbsp;
220 When Mr. Kilgard stopped supporting the GLUT library in 1999, having moved
221 on to bigger and better things, this started to become a problem.
222 <p>&nbsp;&nbsp;&nbsp; In December 1999, Mr. Pawel Olzsta started work on
223 an open-source clone of the GLUT library.&nbsp; This open-source clone,
224 which does not use any of the GLUT source code, has evolved into the present
225 <i>freeglut</i>
226 library.&nbsp; This documentation specifies the application program interface
227 to the <i>freeglut</i> library.
228 <h2>
229 3.1&nbsp; Design Philosophy</h2>
230
231 <h2>
232 3.2&nbsp; Conventions</h2>
233
234 <h2>
235 3.3&nbsp; Terminology</h2>
236
237 <h2>
238 3.4&nbsp; Differences from GLUT 3.7</h2>
239 Since the <i>freeglut</i> library was developed in order to update GLUT,
240 it is natural that there will be some differences between the two.&nbsp;
241 Each function in the API notes any differences between the GLUT and the
242 <i>freeglut</i>
243 function behaviours.&nbsp; The important ones are summarized here.
244 <h3>
245 3.4.1&nbsp; glutMainLoop Behaviour</h3>
246 One of the commonest complaints about the GLUT library was that once an
247 application called "<tt>glutMainLoop</tt>", it never got control back.&nbsp;
248 There was no way for an application to loop in GLUT for a while, possibly
249 as a subloop while a specific window was open, and then return to the calling
250 function.&nbsp; A new function, "<tt>glutMainLoopEvent</tt>", has been
251 added to allow this functionality.&nbsp; Another function, "<tt>glutLeaveMainLoop</tt>",
252 has also been added to allow the application to tell freeglut to clean
253 up and close down.
254 <h3>
255 3.4.2&nbsp; Action on Window Closure</h3>
256 Another difficulty with GLUT, especially with multiple-window programs,
257 is that if the user clicks on the "x" in the window header the application
258 exits immediately.&nbsp; The application programmer can now set an option,
259 "<tt>GLUT_ACTION_ON_WINDOW_CLOSE</tt>", to specify whether execution should
260 continue, whether GLUT should return control to the main program, or whether
261 GLUT should simply exit (the default).
262 <h3>
263 3.4.3&nbsp; String Rendering</h3>
264 New functions have been added to render full character strings (including
265 carriage returns) rather than rendering one character at a time.&nbsp;
266 More functions return the widths of character strings and the font heights,
267 in pixels for bitmapped fonts and in OpenGL units for the stroke fonts.
268 <h3>
269 3.4.4&nbsp; Geometry Rendering</h3>
270 Two functions have been added to render a wireframe and a solid rhombic
271 dodecahedron.
272 <h1>
273 4.0&nbsp;<a NAME="Initialization"></a>Initialization Functions</h1>
274
275 <h2>
276 4.1&nbsp; glutInit</h2>
277
278 <h2>
279 4.2&nbsp; glutInitWindowPosition, glutInitWindowSize</h2>
280
281 <h2>
282 4.3&nbsp; glutInitDisplayMode</h2>
283
284 <h2>
285 4.4&nbsp; glutInitDisplayString</h2>
286
287 <h1>
288 5.0&nbsp;<a NAME="EventProcessing"></a>Event Processing Functions</h1>
289 After an application has finished initializing its windows and menus, it
290 enters an event loop.&nbsp; Within this loop, <i>freeglut</i> polls the
291 data entry devices (keyboard, mouse, etc.) and calls the application's
292 appropriate callbacks.
293 <p>In GLUT, control never returned from the event loop (as invoked by the
294 "<tt>glutMainLoop</tt>" function) to the calling function.&nbsp; This prevented
295 an application from having re-entrant code, in which GLUT could be invoked
296 from within a callback, and it prevented the application from doing any
297 post-processing (such as freeing allocated memory) after GLUT had closed
298 down.&nbsp; <i>Freeglut</i> allows the application programmer to specify
299 more direct control over the event loop by means of two new functions.&nbsp;
300 The first, "<tt>glutMainLoopEvent</tt>", processes a single iteration of
301 the event loop and allows the application to use a different event loop
302 controller or to contain re-entrant code.&nbsp; The second, "<tt>glutLeaveMainLoop</tt>",
303 causes the event loop to exit nicely; this is preferable to the application's
304 calling "<tt>exit</tt>" from within a GLUT callback.
305 <h2>
306 5.1&nbsp; glutMainLoop</h2>
307 The "<tt>glutMainLoop</tt>" function enters the event loop.
308 <p><b>Usage</b>
309 <p><tt>void glutMainLoop ( void ) ;</tt>
310 <p><b>Description</b>
311 <p>The&nbsp; "<tt>glutMainLoop</tt>" function causes the program to enter
312 the window event loop.&nbsp; An application should call this function at
313 most once.&nbsp; It will call any application callback functions as required
314 to process mouse clicks, mouse motion, key presses, and so on.
315 <p><b>Changes From GLUT</b>
316 <p>In GLUT, there was absolutely no way for the application programmer
317 to have control return from the "<tt>glutMainLoop</tt>" function to the
318 calling function.&nbsp; <i>Freeglut</i> allows the programmer to force
319 this by setting the "<tt>GLUT_ACTION_ON_WINDOW_CLOSE</tt>" option and invoking
320 the "<tt>glutLeaveMainLoop</tt>" function from one of the callbacks.&nbsp;
321 Stopping the program this way is preferable to simply calling "<tt>exit</tt>"
322 from within a callback because this allows <i>freeglut</i> to free allocated
323 memory and otherwise clean up after itself.&nbsp; (I know I just said this,
324 but I think it is important enough that it bears repeating.)
325 <h2>
326 5.2&nbsp; glutMainLoopEvent</h2>
327 The "<tt>glutMainLoopEvent</tt>" function processes a single iteration
328 in the <i>freeglut</i> event loop.
329 <p><b>Usage</b>
330 <p><tt>void glutMainLoopEvent ( void ) ;</tt>
331 <p><b>Description</b>
332 <p>The&nbsp; "<tt>glutMainLoopEvent</tt>" function causes <i>freeglut</i>
333 to process one iteration's worth of events in its event loop.&nbsp; This
334 allows the application to control its own event loop and still use the
335 <i>freeglut</i> windowing system.
336 <p><b>Changes From GLUT</b>
337 <p>GLUT does not include this function.
338 <h2>
339 5.3&nbsp; glutLeaveMainLoop</h2>
340 The "<tt>glutLeaveMainLoop</tt>" function causes <i>freeglut</i> to stop
341 its event loop.
342 <p><b>Usage</b>
343 <p><tt>void glutLeaveMainLoop ( void ) ;</tt>
344 <p><b>Description</b>
345 <p>The&nbsp; "<tt>glutLeaveMainLoop</tt>" function causes <i>freeglut</i>
346 to stop the event loop.&nbsp; If the "<tt>GLUT_ACTION_ON_WINDOW_CLOSE</tt>"
347 option has been set to "<tt>GLUT_ACTION_CONTINUE_EXECUTION</tt>", control
348 will return to the function which called "<tt>glutMainLoop</tt>"; otherwise
349 the application will exit.
350 <p><b>Changes From GLUT</b>
351 <p>GLUT does not include this function.
352 <h1>
353 6.0&nbsp;<a NAME="Window"></a>Window Functions</h1>
354
355 <h2>
356 6.1&nbsp; glutCreateWindow</h2>
357
358 <h2>
359 6.2&nbsp; glutCreateSubwindow</h2>
360
361 <h2>
362 6.3&nbsp; glutDestroyWindow</h2>
363
364 <h2>
365 6.4&nbsp; glutSetWindow, glutGetWindow</h2>
366
367 <h2>
368 6.5&nbsp; glutSetWindowTitle, glutSetIconTitle</h2>
369
370 <h2>
371 6.6&nbsp; glutReshapeWindow</h2>
372
373 <h2>
374 6.7&nbsp; glutPositionWindow</h2>
375
376 <h2>
377 6.8&nbsp; glutShowWindow, glutHideWindow, glutIconifyWindow</h2>
378
379 <h2>
380 6.9&nbsp; glutPushWindow, glutPopWindow</h2>
381
382 <h2>
383 6.10&nbsp; glutFullScreen</h2>
384
385 <h1>
386 7.0&nbsp;<a NAME="Display"></a>Display Functions</h1>
387
388 <h2>
389 7.1&nbsp; glutPostRedisplay</h2>
390
391 <h2>
392 7.2&nbsp; glutPostWindowRedisplay</h2>
393
394 <h2>
395 7.3&nbsp; glutSwapBuffers</h2>
396
397 <h1>
398 8.0&nbsp;<a NAME="MouseCursor"></a>Mouse Cursor Functions</h1>
399
400 <h2>
401 8.1&nbsp; glutSetCursor</h2>
402
403 <h2>
404 8.2&nbsp; glutWarpPointer</h2>
405
406 <h1>
407 9.0&nbsp;<a NAME="Overlay"></a>Overlay Functions</h1>
408
409 <h2>
410 9.1&nbsp; glutEstablishOverlay</h2>
411
412 <h2>
413 9.2&nbsp; glutRemoveOverlay</h2>
414
415 <h2>
416 9.3&nbsp; glutUseLayer</h2>
417
418 <h2>
419 9.4&nbsp; glutPostOverlayRedisplay</h2>
420
421 <h2>
422 9.5&nbsp; glutPostWindowOverlayRedisplay</h2>
423
424 <h2>
425 9.6&nbsp; glutShowOverlay, glutHideOverlay</h2>
426
427 <h1>
428 10.0&nbsp;<a NAME="Menu"></a>Menu Functions</h1>
429
430 <h2>
431 10.1&nbsp; glutCreateMenu</h2>
432
433 <h2>
434 10.2&nbsp; glutDestroyMenu</h2>
435
436 <h2>
437 10.3&nbsp; glutGetMenu, glutSetMenu</h2>
438
439 <h2>
440 10.4&nbsp; glutAddMenuEntry</h2>
441
442 <h2>
443 10.5&nbsp; glutAddSubMenu</h2>
444
445 <h2>
446 10.6&nbsp; glutChangeToMenuEntry</h2>
447
448 <h2>
449 10.7&nbsp; glutChangeToSubMenu</h2>
450
451 <h2>
452 10.8&nbsp; glutRemoveMenuItem</h2>
453
454 <h2>
455 10.9&nbsp; glutAttachMenu, glutDetachMenu</h2>
456
457 <h1>
458 11.0&nbsp;<a NAME="GlobalCallback"></a>Global Callback Registration Functions</h1>
459
460 <h2>
461 11.1&nbsp; glutTimerFunc</h2>
462
463 <h2>
464 11.2&nbsp; glutIdleFunc</h2>
465 The "<tt>glutIdleFunc</tt>" function sets the global idle callback. <i>Freeglut</i>
466 calls the idle callback when there are no inputs from the user.
467 <p><b>Usage</b>
468 <p><tt>void glutIdleFunc ( void (*func) ( void ) ) ;</tt>
469 <p><tt>func&nbsp;&nbsp;&nbsp; </tt>The new global idle callback function
470 <p><b>Description</b>
471 <p>The&nbsp; "<tt>glutIdleFunc</tt>" function specifies the function that
472 <i>freeglut</i>
473 will call to perform background processing tasks such as continuous animation
474 when window system events are not being received.&nbsp; If enabled, this
475 function is called continuously from <i>freeglut</i> while no events are
476 received.&nbsp; The callback function has no parameters and returns no
477 value.&nbsp; <i>Freeglut</i> does not change the <i>current window</i>
478 or the <i>current menu</i> before invoking the idle callback; programs
479 with multiple windows or menus must explicitly set the <i>current window</i>
480 and <i>current menu</i> and not rely on its current setting.
481 <br>&nbsp;&nbsp;&nbsp; The amount of computation and rendering done in
482 an idle callback should be minimized to avoid affecting the program's interactive
483 response.&nbsp; In general, no more than a single frame of rendering should
484 be done in a single invocation of an idle callback.
485 <br>&nbsp;&nbsp;&nbsp; Calling "<tt>glutIdleFunc</tt>" with a NULL argument
486 disables the call to an idle callback.
487 <p><b>Changes From GLUT</b>
488 <p>Application programmers should note that if they have specified the
489 "continue execution" action on window closure, <i>freeglut</i> will continue
490 to call the idle callback after the user has closed a window by clicking
491 on the "x" in the window header bar.&nbsp; If the idle callback renders
492 a particular window (this is considered bad form but is frequently done
493 anyway), the programmer should supply a window closure callback for that
494 window which changes or disables the idle callback.
495 <h1>
496 12.0&nbsp;<a NAME="WindowCallback"></a>Window-Specific Callback Registration
497 Functions</h1>
498
499 <h2>
500 12.1&nbsp; glutDisplayFunc</h2>
501
502 <h2>
503 12.2&nbsp; glutOverlayDisplayFunc</h2>
504
505 <h2>
506 12.3&nbsp; glutReshapeFunc</h2>
507
508 <h2>
509 12.4&nbsp; glutCloseFunc</h2>
510
511 <h2>
512 12.5&nbsp; glutKeyboardFunc</h2>
513
514 <h2>
515 12.6&nbsp; glutSpecialFunc</h2>
516
517 <h2>
518 12.7&nbsp; glutKeyboardUpFunc</h2>
519
520 <h2>
521 12.8&nbsp; glutSpecialUpFunc</h2>
522
523 <h2>
524 12.9&nbsp; glutMouseFunc</h2>
525
526 <h2>
527 12.10&nbsp; glutMotionFunc, glutPassiveMotionFunc</h2>
528
529 <h2>
530 12.11&nbsp; glutVisibilityFunc</h2>
531
532 <h2>
533 12.12&nbsp; glutEntryFunc</h2>
534
535 <h2>
536 12.13&nbsp; glutJoystickFunc</h2>
537
538 <h2>
539 12.14&nbsp; glutSpaceballMotionFunc</h2>
540
541 <h2>
542 12.15&nbsp; glutSpaceballRotateFunc</h2>
543
544 <h2>
545 12.16&nbsp; glutSpaceballButtonFunc</h2>
546
547 <h2>
548 12.17&nbsp; glutButtonBoxFunc</h2>
549
550 <h2>
551 12.18&nbsp; glutDialsFunc</h2>
552
553 <h2>
554 12.19&nbsp; glutTabletMotionFunc</h2>
555
556 <h2>
557 12.20&nbsp; glutTabletButtonFunc</h2>
558
559 <h2>
560 12.21&nbsp; glutMenuStatusFunc</h2>
561
562 <h2>
563 12.22&nbsp; glutWindowStatusFunc</h2>
564
565 <h1>
566 13.0&nbsp;<a NAME="StateSetting"></a>State Setting and Retrieval Functions</h1>
567
568 <h2>
569 13.1&nbsp; glutSetOption</h2>
570
571 <h2>
572 13.2&nbsp; glutGet</h2>
573
574 <h2>
575 13.3&nbsp; glutDeviceGet</h2>
576
577 <h2>
578 13.4&nbsp; glutGetModifiers</h2>
579
580 <h2>
581 13.5&nbsp; glutLayerGet</h2>
582
583 <h2>
584 13.6&nbsp; glutExtensionSupported</h2>
585
586 <h1>
587 14.0&nbsp;<a NAME="FontRendering"></a>Font Rendering Functions</h1>
588 <i>Freeglut</i> supports two types of font rendering:&nbsp; bitmap fonts,
589 which are rendered using the "<tt>glBitmap</tt>" function call, and stroke
590 fonts, which are rendered as sequences of OpenGL line segments.&nbsp; Because
591 they are rendered as bitmaps, the bitmap fonts tend to render more quickly
592 than stroke fonts, but they are less flexible in terms of scaling and rendering.&nbsp;
593 Bitmap font characters are positioned with calls to the "<tt>glRasterPos*</tt>"
594 functions while stroke font characters use the OpenGL transformations to
595 position characters.
596 <p>&nbsp;&nbsp;&nbsp; It should be noted that <i>freeglut</i> fonts are
597 similar but not identical to GLUT fonts.&nbsp; At the moment, <i>freeglut</i>
598 fonts do not support the "`" (backquote) and "|" (vertical line) characters;
599 in their place it renders asterisks.
600 <p>&nbsp;&nbsp;&nbsp; <i>Freeglut</i> supports the following bitmap fonts:
601 <ul>
602 <li>
603 <tt>GLUT_BITMAP_8_BY_13</tt> - A variable-width font with every character
604 fitting in a rectangle of 13 pixels high by at most 8 pixels wide.</li>
605
606 <li>
607 <tt>GLUT_BITMAP_9_BY_15</tt> - A variable-width font with every character
608 fitting in a rectangle of 15 pixels high by at most 9 pixels wide.</li>
609
610 <li>
611 <tt>GLUT_BITMAP_TIMES_ROMAN_10</tt> - A 10-point variable-width Times Roman
612 font.</li>
613
614 <li>
615 <tt>GLUT_BITMAP_TIMES_ROMAN_24</tt> - A 24-point variable-width Times Roman
616 font.</li>
617
618 <li>
619 <tt>GLUT_BITMAP_HELVETICA_10</tt> - A 10-point variable-width Helvetica
620 font.</li>
621
622 <li>
623 <tt>GLUT_BITMAP_HELVETICA_12</tt> - A 12-point variable-width Helvetica
624 font.</li>
625
626 <li>
627 <tt>GLUT_BITMAP_HELVETICA_18</tt> - A 18-point variable-width Helvetica
628 font.</li>
629 </ul>
630 <i>Freeglut</i> calls "<tt>glRasterPos4v</tt>" to advance the cursor by
631 the width of a character and to render carriage returns when appropriate.&nbsp;
632 It does not use any display lists in it rendering in bitmap fonts.
633 <p>&nbsp;&nbsp;&nbsp; <i>Freeglut</i> supports the following stroke fonts:
634 <ul>
635 <li>
636 <tt>GLUT_STROKE_ROMAN</tt> - A proportionally-spaced Roman Simplex font</li>
637
638 <li>
639 <tt>GLUT_STROKE_MONO_ROMAN</tt> - A fixed-width Roman Simplex font</li>
640 </ul>
641 <i>Freeglut</i> does not use any display lists in its rendering of stroke
642 fonts.&nbsp; It calls "<tt>glTranslatef</tt>" to advance the cursor by
643 the width of a character and to render carriage returns when appropriate.
644 <h2>
645 14.1&nbsp; glutBitmapCharacter</h2>
646 The "<tt>glutBitmapCharacter</tt>" function renders a single bitmapped
647 character in the <i>current window</i> using the specified font.
648 <p><b>Usage</b>
649 <p><tt>void glutBitmapCharacter ( void *font, int character ) ;</tt>
650 <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The bitmapped
651 font to use in rendering the character
652 <br><tt>character&nbsp;&nbsp; </tt>The ASCII code of the character to be
653 rendered
654 <p><b>Description</b>
655 <p>The&nbsp; "<tt>glutBitmapCharacter</tt>" function renders the given
656 character in the specified bitmap font.&nbsp; <i>Freeglut</i> automatically
657 sets the necessary pixel unpack storage modes and restores the existing
658 modes when it has finished.&nbsp; Before the first call to "<tt>glutBitMapCharacter</tt>"
659 the application program should call "<tt>glRasterPos*</tt>" to set the
660 position of the character in the window.&nbsp; The "<tt>glutBitmapCharacter</tt>"
661 function advances the cursor position as part of its call to "<tt>glBitmap</tt>"
662 and so the application does not need to call "<tt>glRasterPos*</tt>" again
663 for successive characters on the same line.
664 <p><b>Changes From GLUT</b>
665 <p>Nonexistent characters are rendered as asterisks.&nbsp; The rendering
666 position in <i>freeglut</i> is apparently off from GLUT's position by a
667 few pixels vertically and one or two pixels horizontally.
668 <h2>
669 14.2&nbsp; glutBitmapString</h2>
670 The "<tt>glutBitmapString</tt>" function renders a string of bitmapped
671 characters in the <i>current window</i> using the specified font.
672 <p><b>Usage</b>
673 <p><tt>void glutBitmapString ( void *font, char *string ) ;</tt>
674 <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The bitmapped font to use
675 in rendering the character string
676 <br><tt>string&nbsp;&nbsp;&nbsp; </tt>String of characters to be rendered
677 <p><b>Description</b>
678 <p>The&nbsp; "<tt>glutBitmapString</tt>" function renders the given character
679 string in the specified bitmap font.&nbsp; <i>Freeglut</i> automatically
680 sets the necessary pixel unpack storage modes and restores the existing
681 modes when it has finished.&nbsp; Before calling "<tt>glutBitMapString</tt>"
682 the application program should call "<tt>glRasterPos*</tt>" to set the
683 position of the string in the window.&nbsp; The "<tt>glutBitmapString</tt>"
684 function handles carriage returns.&nbsp; Nonexistent characters are rendered
685 as asterisks.
686 <p><b>Changes From GLUT</b>
687 <p>GLUT does not include this function.
688 <h2>
689 14.3&nbsp; glutBitmapWidth</h2>
690 The "<tt>glutBitmapWidth</tt>" function returns the width in pixels of
691 a single bitmapped character in the specified font.
692 <p><b>Usage</b>
693 <p><tt>int glutBitmapWidth ( void *font, int character ) ;</tt>
694 <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The bitmapped
695 font to use in calculating the character width
696 <br><tt>character&nbsp;&nbsp; </tt>The ASCII code of the character
697 <p><b>Description</b>
698 <p>The&nbsp; "<tt>glutBitmapWidth</tt>" function returns the width of the
699 given character in the specified bitmap font.&nbsp; Because the font is
700 bitmapped, the width is an exact integer.
701 <p><b>Changes From GLUT</b>
702 <p>Nonexistent characters return the width of an asterisk.
703 <h2>
704 14.4&nbsp; glutBitmapLength</h2>
705 The "<tt>glutBitmapLength</tt>" function returns the width in pixels of
706 a string of bitmapped characters in the specified font.
707 <p><b>Usage</b>
708 <p><tt>int glutBitmapLength ( void *font, char *string ) ;</tt>
709 <p><tt>font&nbsp;&nbsp;&nbsp; </tt>The bitmapped font to use in calculating
710 the character width
711 <br><tt>string&nbsp; </tt>String of characters whose width is to be calculated
712 <p><b>Description</b>
713 <p>The&nbsp; "<tt>glutBitmapLength</tt>" function returns the width in
714 pixels of the given character string in the specified bitmap font.&nbsp;
715 Because the font is bitmapped, the width is an exact integer:&nbsp; the
716 return value is identical to the sum of the character widths returned by
717 a series of calls to "<tt>glutBitmapWidth</tt>".&nbsp; The width of nonexistent
718 characters is counted to be the width of an asterisk.
719 <p>&nbsp;&nbsp;&nbsp; If the string contains one or more carriage returns,
720 <i>freeglut</i>
721 calculates the widths in pixels of the lines separately and returns the
722 largest width.
723 <p><b>Changes From GLUT</b>
724 <p>GLUT does not include this function.
725 <h2>
726 14.5&nbsp; glutBitmapHeight</h2>
727 The "<tt>glutBitmapHeight</tt>" function returns the height in pixels of
728 the specified font.
729 <p><b>Usage</b>
730 <p><tt>int glutBitmapHeight ( void *font ) ;</tt>
731 <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The bitmapped
732 font to use in calculating the character height
733 <p><b>Description</b>
734 <p>The&nbsp; "<tt>glutBitmapHeight</tt>" function returns the height of
735 a character in the specified bitmap font.&nbsp; Because the font is bitmapped,
736 the height is an exact integer.&nbsp; The fonts are designed such that
737 all characters have (nominally) the same height.
738 <p><b>Changes From GLUT</b>
739 <p>GLUT does not include this function.
740 <h2>
741 14.6&nbsp; glutStrokeCharacter</h2>
742 The "<tt>glutStrokeCharacter</tt>" function renders a single stroke character
743 in the <i>current window</i> using the specified font.
744 <p><b>Usage</b>
745 <p><tt>void glutStrokeCharacter ( void *font, int character ) ;</tt>
746 <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The stroke font
747 to use in rendering the character
748 <br><tt>character&nbsp;&nbsp; </tt>The ASCII code of the character to be
749 rendered
750 <p><b>Description</b>
751 <p>The&nbsp; "<tt>glutStrokeCharacter</tt>" function renders the given
752 character in the specified stroke font.&nbsp; Before the first call to
753 "<tt>glutStrokeCharacter</tt>" the application program should call the
754 OpenGL transformation (positioning and scaling) functions to set the position
755 of the character in the window.&nbsp; The "<tt>glutStrokeCharacter</tt>"
756 function advances the cursor position by a call to "<tt>glTranslatef</tt>"
757 and so the application does not need to call the OpenGL positioning functions
758 again for successive characters on the same line.
759 <p><b>Changes From GLUT</b>
760 <p>Nonexistent characters are rendered as asterisks.
761 <h2>
762 14.7&nbsp; glutStrokeString</h2>
763 The "<tt>glutStrokeString</tt>" function renders a string of characters
764 in the <i>current window</i> using the specified stroke font.
765 <p><b>Usage</b>
766 <p><tt>void glutStrokeString ( void *font, char *string ) ;</tt>
767 <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The stroke font to use in
768 rendering the character string
769 <br><tt>string&nbsp;&nbsp;&nbsp; </tt>String of characters to be rendered
770 <p><b>Description</b>
771 <p>The&nbsp; "<tt>glutStrokeString</tt>" function renders the given character
772 string in the specified stroke font.&nbsp; Before calling "<tt>glutStrokeString</tt>"
773 the application program should call the OpenGL transformation (positioning
774 and scaling) functions to set the position of the string in the window.&nbsp;
775 The "<tt>glutStrokeString</tt>" function handles carriage returns.&nbsp;
776 Nonexistent characters are rendered as asterisks.
777 <p><b>Changes From GLUT</b>
778 <p>GLUT does not include this function.
779 <h2>
780 14.8&nbsp; glutStrokeWidth</h2>
781 The "<tt>glutStrokeWidth</tt>" function returns the width in pixels of
782 a single character in the specified stroke font.
783 <p><b>Usage</b>
784 <p><tt>int glutStrokeWidth ( void *font, int character ) ;</tt>
785 <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The stroke font
786 to use in calculating the character width
787 <br><tt>character&nbsp;&nbsp; </tt>The ASCII code of the character
788 <p><b>Description</b>
789 <p>The&nbsp; "<tt>glutStrokeWidth</tt>" function returns the width of the
790 given character in the specified stroke font.&nbsp; Because the font is
791 a stroke font, the width is actually a floating-point number; the function
792 rounds it to the nearest integer for the return value.
793 <p><b>Changes From GLUT</b>
794 <p>Nonexistent characters return the width of an asterisk.
795 <h2>
796 14.9&nbsp; glutStrokeLength</h2>
797 The "<tt>glutStrokeLength</tt>" function returns the width in pixels of
798 a string of characters in the specified stroke font.
799 <p><b>Usage</b>
800 <p><tt>int glutStrokeLength ( void *font, char *string ) ;</tt>
801 <p><tt>font&nbsp;&nbsp;&nbsp; </tt>The stroke font to use in calculating
802 the character width
803 <br><tt>string&nbsp; </tt>String of characters whose width is to be calculated
804 <p><b>Description</b>
805 <p>The&nbsp; "<tt>glutStrokeLength</tt>" function returns the width in
806 pixels of the given character string in the specified stroke font.&nbsp;
807 Because the font is a stroke font, the width of an individual character
808 is a floating-point number.&nbsp; <i>Freeglut</i> adds the floating-point
809 widths and rounds the funal result to return the integer value.&nbsp; Thus
810 the return value may differ from the sum of the character widths returned
811 by a series of calls to "<tt>glutStrokeWidth</tt>".&nbsp; The width of
812 nonexistent characters is counted to be the width of an asterisk.
813 <p>&nbsp;&nbsp;&nbsp; If the string contains one or more carriage returns,
814 <i>freeglut</i>
815 calculates the widths in pixels of the lines separately and returns the
816 largest width.
817 <p><b>Changes From GLUT</b>
818 <p>GLUT does not include this function.
819 <h2>
820 14.10&nbsp; glutStrokeHeight</h2>
821 The "<tt>glutStrokeHeight</tt>" function returns the height in pixels of
822 the specified font.
823 <p><b>Usage</b>
824 <p><tt>GLfloat glutStrokeHeight ( void *font ) ;</tt>
825 <p><tt>font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The stroke font
826 to use in calculating the character height
827 <p><b>Description</b>
828 <p>The&nbsp; "<tt>glutStrokeHeight</tt>" function returns the height of
829 a character in the specified stroke font.&nbsp; The application programmer
830 should note that, unlike the other <i>freeglut</i> font functions, this
831 one returns a floating-point number.&nbsp; The fonts are designed such
832 that all characters have (nominally) the same height.
833 <p><b>Changes From GLUT</b>
834 <p>GLUT does not include this function.
835 <h1>
836 15.0&nbsp;<a NAME="GeometricObject"></a>Geometric Object Rendering Functions</h1>
837 <i>Freeglut</i> includes eighteen routines for generating easily-recognizable
838 3-d geometric objects.&nbsp; These routines are effectively the same ones
839 that are included in the GLUT library, and reflect the functionality available
840 in the <i>aux</i> toolkit described in the <i>OpenGL Programmer's Guide</i>.&nbsp;
841 They are included to allow programmers to create with a single line of
842 code a three-dimensional object which can be used to test a variety of
843 OpenGL functionality.&nbsp; None of the routines generates a display list
844 for the object which it draws.&nbsp; The functions generate normals appropriate
845 for lighting but, except for the teapon functions, do not generate texture
846 coordinates.
847 <h2>
848 15.1&nbsp; glutWireSphere, glutSolidSphere</h2>
849 The "<tt>glutWireSphere</tt>" and "<tt>glutSolidSphere</tt>" functions
850 draw a wireframe and solid sphere respectively.
851 <p><b>Usage</b>
852 <p><tt>void glutWireSphere ( GLdouble dRadius, GLint slices, GLint stacks
853 ) ;</tt>
854 <p><tt>void glutSolidSphere ( GLdouble dRadius, GLint slices, GLint stacks
855 ) ;</tt>
856 <p><tt>dRadius&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The desired radius
857 of the sphere
858 <p><tt>slices&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The desired
859 number of slices (divisions in the longitudinal direction) in the sphere
860 <p><tt>stacks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The desired
861 number of stacks (divisions in the latitudinal direction) in the sphere.&nbsp;
862 The number of points in this direction, including the north and south poles,
863 is <tt>stacks+1</tt>
864 <p><b>Description</b>
865 <p>The "<tt>glutWireSphere</tt>" and "<tt>glutSolidSphere</tt>" functions
866 render a sphere centered at the origin of the modeling coordinate system.&nbsp;
867 The north and south poles of the sphere are on the positive and negative
868 Z-axes respectively and the prime meridian crosses the positive X-axis.
869 <p><b>Changes From GLUT</b>
870 <p>None that we know of.
871 <h2>
872 15.2&nbsp; glutWireTorus, glutSolidTorus</h2>
873 The "<tt>glutWireTorus</tt>" and "<tt>glutSolidTorus</tt>" functions draw
874 a wireframe and solid torus (donut shape) respectively.
875 <p><b>Usage</b>
876 <p><tt>void glutWireTorus ( GLdouble dInnerRadius, GLdouble dOuterRadius,
877 GLint nSides, GLint nRings ) ;</tt>
878 <p><tt>void glutSolidTorus ( GLdouble dInnerRadius, GLdouble dOuterRadius,
879 GLint nSides, GLint nRings ) ;</tt>
880 <p><tt>dInnerRadius&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The
881 desired inner radius of the torus, from the origin to the circle defining
882 the centers of the outer circles
883 <p><tt>dOuterRadius&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The
884 desired outer radius of the torus, from the center of the outer circle
885 to the actual surface of the torus
886 <p><tt>nSides&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The desired
887 number of segments in a single outer circle of the torus
888 <p><tt>nRings&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The desired
889 number of outer circles around the origin of the torus
890 <p><b>Description</b>
891 <p>The "<tt>glutWireTorus</tt>" and "<tt>glutSolidTorus</tt>" functions
892 render a torus centered at the origin of the modeling coordinate system.&nbsp;
893 The torus is circularly symmetric about the Z-axis and starts at the positive
894 X-axis.
895 <p><b>Changes From GLUT</b>
896 <p>None that we know of.
897 <h2>
898 15.3&nbsp; glutWireCone, glutSolidCone</h2>
899 The "<tt>glutWireCone</tt>" and "<tt>glutSolidCone</tt>" functions draw
900 a wireframe and solid cone respectively.
901 <p><b>Usage</b>
902 <p><tt>void glutWireCone ( GLdouble base, GLdouble height, GLint slices,
903 GLint stacks ) ;</tt>
904 <p><tt>void glutSolidCone ( GLdouble base, GLdouble height, GLint slices,
905 GLint stacks ) ;</tt>
906 <p><tt>base&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The
907 desired radius of the base of the cone
908 <p><tt>height&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The desired
909 height of the cone
910 <p><tt>slices&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The desired
911 number of slices around the base of the cone
912 <p><tt>stacks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The desired
913 number of segments between the base and the tip of the cone (the number
914 of points, including the tip, is <tt>stacks + 1</tt>)
915 <p><b>Description</b>
916 <p>The "<tt>glutWireCone</tt>" and "<tt>glutSolidCone</tt>" functions render
917 a right circular cone with a base centered at the origin and in the X-Y
918 plane and its tip on the positive Z-axis.&nbsp; The wire cone is rendered
919 with triangular elements.
920 <p><b>Changes From GLUT</b>
921 <p>None that we know of.
922 <h2>
923 15.4&nbsp; glutWireCube, glutSolidCube</h2>
924 The "<tt>glutWireCube</tt>" and "<tt>glutSolidCube</tt>" functions draw
925 a wireframe and solid cube respectively.
926 <p><b>Usage</b>
927 <p><tt>void glutWireCube ( GLdouble dSize ) ;</tt>
928 <p><tt>void glutSolidCube ( GLdouble dSize ) ;</tt>
929 <p><tt>dSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The desired
930 length of an edge of the cube
931 <p><b>Description</b>
932 <p>The "<tt>glutWireCube</tt>" and "<tt>glutSolidCube</tt>" functions render
933 a cube of the desired size, centered at the origin.&nbsp; Its faces are
934 normal to the coordinate directions.
935 <p><b>Changes From GLUT</b>
936 <p>None that we know of.
937 <h2>
938 15.5&nbsp; glutWireTetrahedron, glutSolidTetrahedron</h2>
939 The "<tt>glutWireTetrahedron</tt>" and "<tt>glutSolidTetrahedron</tt>"
940 functions draw a wireframe and solid tetrahedron (four-sided Platonic solid)
941 respectively.
942 <p><b>Usage</b>
943 <p><tt>void glutWireTetrahedron ( void ) ;</tt>
944 <p><tt>void glutSolidTetrahedron ( void ) ;</tt>
945 <p><b>Description</b>
946 <p>The "<tt>glutWireTetrahedron</tt>" and "<tt>glutSolidTetrahedron</tt>"
947 functions render a tetrahedron whose corners are each a distance of one
948 from the origin.&nbsp; The length of each side is 2/3 sqrt(6).&nbsp; One
949 corner is on the positive X-axis and another is in the X-Y plane with a
950 positive Y-coordinate.
951 <p><b>Changes From GLUT</b>
952 <p>None that we know of.
953 <h2>
954 15.6&nbsp; glutWireOctahedron, glutSolidOctahedron</h2>
955 The "<tt>glutWireOctahedron</tt>" and "<tt>glutSolidOctahedron</tt>" functions
956 draw a wireframe and solid octahedron (eight-sided Platonic solid) respectively.
957 <p><b>Usage</b>
958 <p><tt>void glutWireOctahedron ( void ) ;</tt>
959 <p><tt>void glutSolidOctahedron ( void ) ;</tt>
960 <p><b>Description</b>
961 <p>The "<tt>glutWireOctahedron</tt>" and "<tt>glutSolidOctahedron</tt>"
962 functions render an octahedron whose corners are each a distance of one
963 from the origin.&nbsp; The length of each side is sqrt(2).&nbsp; The corners
964 are on the positive and negative coordinate axes.
965 <p><b>Changes From GLUT</b>
966 <p>None that we know of.
967 <h2>
968 15.7&nbsp; glutWireDodecahedron, glutSolidDodecahedron</h2>
969 The "<tt>glutWireDodecahedron</tt>" and "<tt>glutSolidDodecahedron</tt>"
970 functions draw a wireframe and solid dodecahedron (twelve-sided Platonic
971 solid) respectively.
972 <p><b>Usage</b>
973 <p><tt>void glutWireDodecahedron ( void ) ;</tt>
974 <p><tt>void glutSolidDodecahedron ( void ) ;</tt>
975 <p><b>Description</b>
976 <p>The "<tt>glutWireDodecahedron</tt>" and "<tt>glutSolidDodecahedron</tt>"
977 functions render a dodecahedron whose corners are each a distance of sqrt(3)
978 from the origin.&nbsp; The length of each side is sqrt(5)-1.&nbsp; There
979 are twenty corners; interestingly enough, eight of them coincide with the
980 corners of a cube with sizes of length 2.
981 <p><b>Changes From GLUT</b>
982 <p>None that we know of.
983 <h2>
984 15.8&nbsp; glutWireIcosahedron, glutSolidIcosahedron</h2>
985 The "<tt>glutWireIcosahedron</tt>" and "<tt>glutSolidIcosahedron</tt>"
986 functions draw a wireframe and solid icosahedron (twenty-sided Platonic
987 solid) respectively.
988 <p><b>Usage</b>
989 <p><tt>void glutWireIcosahedron ( void ) ;</tt>
990 <p><tt>void glutSolidIcosahedron ( void ) ;</tt>
991 <p><b>Description</b>
992 <p>The "<tt>glutWireIcosahedron</tt>" and "<tt>glutSolidIcosahedron</tt>"
993 functions render an icosahedron whose corners are each a unit distance
994 from the origin.&nbsp; The length of each side is slightly greater than
995 one.&nbsp; Two of the corners lie on the positive and negative X-axes.
996 <p><b>Changes From GLUT</b>
997 <p>None that we know of.
998 <h2>
999 15.7&nbsp; glutWireRhombicDodecahedron, glutSolidRhombicDodecahedron</h2>
1000 The "<tt>glutWireRhombicDodecahedron</tt>" and "<tt>glutSolidRhombicDodecahedron</tt>"
1001 functions draw a wireframe and solid rhombic dodecahedron (twelve-sided
1002 semi-regular solid) respectively.
1003 <p><b>Usage</b>
1004 <p><tt>void glutWireRhombicDodecahedron ( void ) ;</tt>
1005 <p><tt>void glutSolidRhombicDodecahedron ( void ) ;</tt>
1006 <p><b>Description</b>
1007 <p>The "<tt>glutWireRhombicDodecahedron</tt>" and "<tt>glutSolidRhombicDodecahedron</tt>"
1008 functions render a rhombic dodecahedron whose corners are at most a distance
1009 of one from the origin.&nbsp; The rhombic dodecahedron has faces which
1010 are identical rhombuses (rhombi?) but which have some vertices at which
1011 three faces meet and some vertices at which four faces meet.&nbsp; The
1012 length of each side is sqrt(3)/2.&nbsp; Vertices at which four faces meet
1013 are found at (0, 0, <u>+</u>1) and (<u>+</u>sqrt(2)/2, <u>+</u>sqrt(2)/2,
1014 0).
1015 <p><b>Changes From GLUT</b>
1016 <p>GLUT does not include these functions.
1017 <h2>
1018 15.10&nbsp; glutWireTeapot, glutSolidTeapot</h2>
1019 The "<tt>glutWireTeapot</tt>" and "<tt>glutSolidTeapot</tt>" functions
1020 draw a wireframe and solid teapot respectively.
1021 <p><b>Usage</b>
1022 <p><tt>void glutWireTeapot ( GLdouble dSize ) ;</tt>
1023 <p><tt>void glutSolidTeapot ( GLdouble dSize ) ;</tt>
1024 <p><tt>dSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt>The desired
1025 size of the teapot
1026 <p><b>Description</b>
1027 <p>The "<tt>glutWireTeapot</tt>" and "<tt>glutSolidTeapot</tt>" functions
1028 render a teapot of the desired size, centered at the origin.&nbsp; This
1029 is the famous OpenGL teapot [add reference].
1030 <p><b>Changes From GLUT</b>
1031 <p>None that we know of.
1032 <h1>
1033 16.0&nbsp;<a NAME="GameMode"></a>Game Mode Functions</h1>
1034
1035 <h2>
1036 16.1&nbsp; glutGameModeString</h2>
1037
1038 <h2>
1039 16.2&nbsp; glutEnterGameMode, glutLeaveGameMode</h2>
1040
1041 <h2>
1042 16.3&nbsp; glutGameModeGet</h2>
1043
1044 <h1>
1045 17.0&nbsp;<a NAME="VideoResize"></a>Video Resize Functions</h1>
1046
1047 <h2>
1048 17.1&nbsp; glutVideoResizeGet</h2>
1049
1050 <h2>
1051 17.2&nbsp; glutSetupVideoResizing, glutStopVideoResizing</h2>
1052
1053 <h2>
1054 17.3&nbsp; glutVideoResize</h2>
1055
1056 <h2>
1057 17.4&nbsp; glutVideoPan</h2>
1058
1059 <h1>
1060 18.0&nbsp;<a NAME="ColorMap"></a>Color Map Functions</h1>
1061
1062 <h2>
1063 18.1&nbsp; glutSetColor, glutGetColor</h2>
1064
1065 <h2>
1066 18.2&nbsp; glutCopyColormap</h2>
1067
1068 <h1>
1069 19.0&nbsp;<a NAME="Miscellaneous"></a>Miscellaneous Functions</h1>
1070
1071 <h2>
1072 19.1&nbsp; glutIgnoreKeyRepeat, glutSetKeyRepeat</h2>
1073
1074 <h2>
1075 19.2&nbsp; glutForceJoystickFunc</h2>
1076
1077 <h2>
1078 19.3&nbsp; glutReportErrors</h2>
1079
1080 <h1>
1081 20.0&nbsp;<a NAME="UsageNotes"></a>Usage Notes</h1>
1082
1083 <h1>
1084 21.0&nbsp;<a NAME="ImplementationNotes"></a>Implementation Notes</h1>
1085
1086 <h1>
1087 22.0&nbsp;<a NAME="GLUT_State"></a>GLUT State</h1>
1088
1089 <h1>
1090 23.0&nbsp;<a NAME="Freeglut.h_Header"></a>"freeglut.h" Header File</h1>
1091
1092 <h1>
1093 24.0&nbsp;<a NAME="References"></a>References</h1>
1094
1095 <h1>
1096 25.0&nbsp;<a NAME="Index"></a>Index</h1>
1097 &nbsp;
1098 <p>&nbsp;
1099 <br>&nbsp;
1100 <br>&nbsp;
1101 <br>&nbsp;
1102 <br>&nbsp;
1103 <br>&nbsp;
1104 <br>&nbsp;
1105 <br>&nbsp;
1106 <br>&nbsp;
1107 <br>&nbsp;
1108 <br>&nbsp;
1109 <br>&nbsp;
1110 <br>&nbsp;
1111 <br>&nbsp;
1112 <br>&nbsp;
1113 <br>&nbsp;
1114 <br>&nbsp;
1115 </body>
1116 </html>