1 ;;; figl -*- mode: scheme; coding: utf-8 -*-
2 ;;; Copyright (C) 2013 Andy Wingo <wingo@pobox.com>
4 ;;; Figl is free software: you can redistribute it and/or modify it
5 ;;; under the terms of the GNU Lesser General Public License as
6 ;;; published by the Free Software Foundation, either version 3 of the
7 ;;; License, or (at your option) any later version.
9 ;;; Figl is distributed in the hope that it will be useful, but WITHOUT
10 ;;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 ;;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
12 ;;; Public License for more details.
14 ;;; You should have received a copy of the GNU Lesser General Public
15 ;;; License along with this program. If not, see
16 ;;; <http://www.gnu.org/licenses/>.
18 ;;; Derived from upstream OpenGL documentation.
23 ;;; Copyright (C) 1991-2006 Silicon Graphics, Inc. This document is licensed
24 ;;; under the SGI Free Software B License. For details, see
25 ;;; http://oss.sgi.com/projects/FreeB/ (http://oss.sgi.com/projects/FreeB/).
27 ;;; Automatically generated; you probably don't want to edit this. To
28 ;;; update, run "make update" in the top-level build tree.
34 (figl low-level support)
40 gluBuild1DMipmapLevels
42 gluBuild2DMipmapLevels
44 gluBuild3DMipmapLevels
48 gluDeleteNurbsRenderer
56 gluLoadSamplingMatrices
62 gluNurbsCallbackDataEXT
96 (funcdef "void " (function "gluBeginCurve"))
97 (paramdef "GLUnurbs* " (parameter "nurb"))))
99 (heading "delimit a NURBS curve definition")
100 (heading "Parameters")
101 (table (% (formatter (asis)))
102 (entry (% (heading (var "nurb")))
104 Specifies the NURBS object (created with "
105 (code "gluNewNurbsRenderer")
107 (heading "Description")
110 (code "gluBeginCurve")
111 " to mark the beginning of a NURBS
115 (code "gluBeginCurve")
116 ", make one or more calls to "
117 (code "gluNurbsCurve")
118 " to define the attributes of the curve.
119 Exactly one of the calls to "
120 (code "gluNurbsCurve")
123 (code "GLU_MAP1_VERTEX_3")
125 (code "GLU_MAP1_VERTEX_4")
127 To mark the end of the NURBS curve definition, call "
131 GL evaluators are used to render the NURBS curve as a series of line
133 Evaluator state is preserved during rendering
135 (code "glPushAttrib")
137 (code "GLU_EVAL_BIT")
142 (code "glPushAttrib")
143 " reference page for details on exactly what state
144 these calls preserve. ")))
151 (funcdef "void " (function "gluBeginPolygon"))
152 (paramdef "GLUtesselator* " (parameter "tess"))))
154 (heading "delimit a polygon description")
155 (heading "Parameters")
156 (table (% (formatter (asis)))
157 (entry (% (heading (var "tess")))
159 Specifies the tessellation object (created with "
162 (heading "Description")
163 (para (code "gluBeginPolygon")
165 (code "gluEndPolygon")
166 " delimit the definition of a
168 To define such a polygon, first call "
169 (code "gluBeginPolygon")
171 Then define the contours of the polygon
173 (code "gluTessVertex")
176 (code "gluNextContour")
177 " to start each new contour.
179 (code "gluEndPolygon")
181 to signal the end of the definition.
183 (code "gluTessVertex")
185 (code "gluNextContour")
186 " reference pages for more details. ")
189 (code "gluEndPolygon")
190 " is called, the polygon is tessellated, and the
191 resulting triangles are described through callbacks.
193 (code "gluTessCallback")
194 " for descriptions of the callback functions. ")))
201 (funcdef "void " (function "gluBeginSurface"))
202 (paramdef "GLUnurbs* " (parameter "nurb"))))
204 (heading "delimit a NURBS surface definition")
205 (heading "Parameters")
206 (table (% (formatter (asis)))
207 (entry (% (heading (var "nurb")))
209 Specifies the NURBS object (created with "
210 (code "gluNewNurbsRenderer")
212 (heading "Description")
215 (code "gluBeginSurface")
216 " to mark the beginning of a NURBS
217 surface definition. After
219 (code "gluBeginSurface")
220 ", make one or more calls to "
221 (code "gluNurbsSurface")
222 " to define the attributes of the surface.
223 Exactly one of these calls to "
224 (code "gluNurbsSurface")
227 (code "GLU_MAP2_VERTEX_3")
229 (code "GLU_MAP2_VERTEX_4")
231 To mark the end of the NURBS surface definition, call "
232 (code "gluEndSurface")
235 Trimming of NURBS surfaces is supported with "
236 (code "gluBeginTrim")
240 (code "gluNurbsCurve")
244 (code "gluBeginTrim")
245 " reference page for details. ")
247 GL evaluators are used to render the NURBS surface as a set of polygons.
248 Evaluator state is preserved during rendering
250 (code "glPushAttrib")
252 (code "GLU_EVAL_BIT")
257 (code "glPushAttrib")
258 " reference page for details on exactly what state
259 these calls preserve. ")))
266 (funcdef "void " (function "gluBeginTrim"))
267 (paramdef "GLUnurbs* " (parameter "nurb"))))
270 "delimit a NURBS trimming loop definition")
271 (heading "Parameters")
272 (table (% (formatter (asis)))
273 (entry (% (heading (var "nurb")))
275 Specifies the NURBS object (created with "
276 (code "gluNewNurbsRenderer")
278 (heading "Description")
281 (code "gluBeginTrim")
282 " to mark the beginning of a
286 of a trimming loop. A trimming loop is
287 a set of oriented curve segments (forming a closed curve) that
288 define boundaries of a NURBS surface. You include these
289 trimming loops in the definition of a NURBS
290 surface, between calls to "
291 (code "gluBeginSurface")
293 (code "gluEndSurface")
296 The definition for a NURBS surface can contain many
297 trimming loops. For example, if you wrote a definition
298 for a NURBS surface that resembled a rectangle with
299 a hole punched out, the definition would contain two
300 trimming loops. One loop would define the outer edge
301 of the rectangle; the other would define
302 the hole punched out of the rectangle. The definitions
303 of each of these trimming loops would be bracketed by a "
304 (code "gluBeginTrim")
309 The definition of a single closed trimming loop can consist
310 of multiple curve segments, each described as a piecewise
313 ") or as a single NURBS
315 (code "gluNurbsCurve")
316 "), or as a combination of
317 both in any order. The only library calls that can
318 appear in a trimming loop definition (between the calls
320 (code "gluBeginTrim")
326 (code "gluNurbsCurve")
329 The area of the NURBS surface that is displayed is the
330 region in the domain to the left of the trimming curve
331 as the curve parameter increases. Thus, the retained
332 region of the NURBS surface is inside a
333 counterclockwise trimming loop and outside a clockwise
334 trimming loop. For the rectangle mentioned earlier,
335 the trimming loop for the outer edge of the rectangle runs
336 counterclockwise, while the trimming loop for the punched-out hole
339 If you use more than one curve to define a single trimming
340 loop, the curve segments must form a closed loop (that is,
341 the endpoint of each curve must be the starting point of the
342 next curve, and the endpoint of the final curve must
343 be the starting point of the first curve). If the
344 endpoints of the curve are sufficiently close together
345 but not exactly coincident, they will be coerced to match.
346 If the endpoints are not sufficiently close, an error results
348 (code "gluNurbsCallback")
351 If a trimming loop definition contains multiple curves,
352 the direction of the curves must be consistent (that is, the
353 inside must be to the left of all of the curves). Nested
354 trimming loops are legal as long as the curve orientations
356 If trimming curves are self-intersecting,
357 or intersect one another, an error results. ")
359 If no trimming information is given
360 for a NURBS surface, the entire surface is drawn. ")))
363 gluBuild1DMipmapLevels
364 "gluBuild1DMipmapLevels"
369 (function "gluBuild1DMipmapLevels"))
370 (paramdef "GLenum " (parameter "target"))
371 (paramdef "GLint " (parameter "internalFormat"))
372 (paramdef "GLsizei " (parameter "width"))
373 (paramdef "GLenum " (parameter "format"))
374 (paramdef "GLenum " (parameter "type"))
375 (paramdef "GLint " (parameter "level"))
376 (paramdef "GLint " (parameter "base"))
377 (paramdef "GLint " (parameter "max"))
378 (paramdef "const void * " (parameter "data"))))
381 "builds a subset of one-dimensional mipmap levels")
382 (heading "Parameters")
383 (table (% (formatter (asis)))
384 (entry (% (heading (var "target")))
386 Specifies the target texture. Must be "
387 (code "GLU_TEXTURE_1D")
389 (entry (% (heading (var "internalFormat")))
391 Requests the internal storage format of the texture image. The most
392 current version of the SGI implementation of GLU does not check this
393 value for validity before passing it on to the underlying OpenGL
394 implementation. A value that is not accepted by the OpenGL
395 implementation will lead to an OpenGL error. The benefit of not
396 checking this value at the GLU level is that OpenGL extensions can add
397 new internal texture formats without requiring a revision of the GLU
398 implementation. Older implementations of GLU check this value and
399 raise a GLU error if it is not 1, 2, 3, or 4 or one of the following
400 symbolic constants: "
411 (code "GLU_LUMINANCE")
413 (code "GLU_LUMINANCE4")
415 (code "GLU_LUMINANCE8")
417 (code "GLU_LUMINANCE12")
419 (code "GLU_LUMINANCE16")
421 (code "GLU_LUMINANCE_ALPHA")
423 (code "GLU_LUMINANCE4_ALPHA4")
425 (code "GLU_LUMINANCE6_ALPHA2")
427 (code "GLU_LUMINANCE8_ALPHA8")
429 (code "GLU_LUMINANCE12_ALPHA4")
431 (code "GLU_LUMINANCE12_ALPHA12")
433 (code "GLU_LUMINANCE16_ALPHA16")
435 (code "GLU_INTENSITY")
437 (code "GLU_INTENSITY4")
439 (code "GLU_INTENSITY8")
441 (code "GLU_INTENSITY12")
443 (code "GLU_INTENSITY16")
447 (code "GLU_R3_G3_B2")
471 (code "GLU_RGB10_A2")
477 (entry (% (heading (var "width")))
479 Specifies the width in pixels of the texture image.
480 This should be a power of 2. "))
481 (entry (% (heading (var "format")))
483 Specifies the format of the pixel data.
485 (code "GLU_COLOR_INDEX")
487 (code "GLU_DEPTH_COMPONENT")
505 (code "GLU_LUMINANCE")
507 (code "GLU_LUMINANCE_ALPHA")
509 (entry (% (heading (var "type")))
511 Specifies the data type for "
515 (code "GLU_UNSIGNED_BYTE")
521 (code "GLU_UNSIGNED_SHORT")
525 (code "GLU_UNSIGNED_INT")
531 (code "GLU_UNSIGNED_BYTE_3_3_2")
533 (code "GLU_UNSIGNED_BYTE_2_3_3_REV")
535 (code "GLU_UNSIGNED_SHORT_5_6_5")
537 (code "GLU_UNSIGNED_SHORT_5_6_5_REV")
539 (code "GLU_UNSIGNED_SHORT_4_4_4_4")
541 (code "GLU_UNSIGNED_SHORT_4_4_4_4_REV")
543 (code "GLU_UNSIGNED_SHORT_5_5_5_1")
545 (code "GLU_UNSIGNED_SHORT_1_5_5_5_REV")
547 (code "GLU_UNSIGNED_INT_8_8_8_8")
549 (code "GLU_UNSIGNED_INT_8_8_8_8_REV")
551 (code "GLU_UNSIGNED_INT_10_10_10_2")
553 (code "GLU_UNSIGNED_INT_2_10_10_10_REV")
555 (entry (% (heading (var "level")))
557 Specifies the mipmap level of the image data. "))
558 (entry (% (heading (var "base")))
560 Specifies the minimum mipmap level to pass to "
561 (code "glTexImage1D")
563 (entry (% (heading (var "max")))
565 Specifies the maximum mipmap level to pass to "
566 (code "glTexImage1D")
568 (entry (% (heading (var "data")))
570 Specifies a pointer to the image data in memory. ")))
571 (heading "Description")
572 (para (code "gluBuild1DMipmapLevels")
573 " builds a subset of prefiltered one-dimensional texture maps of decreasing
574 resolutions called a mipmap. This is used for the antialiasing of
575 texture mapped primitives. ")
577 A return value of zero indicates success, otherwise a GLU error code is
579 (code "gluErrorString")
582 A series of mipmap levels from "
586 " is built by decimating "
592 is reached. At each level, each texel in the
593 halved mipmap level is an average of the corresponding two texels in the larger
595 (code "glTexImage1D")
596 " is called to load these mipmap levels from "
603 " is larger than the highest mipmap level for the
604 texture of the specified size, then a GLU error code is returned (see "
605 (code "gluErrorString")
606 ") and nothing is loaded. ")
613 following levels are possible: "
625 to levels 2 through 6 respectively.
630 " is 5, then only mipmap levels "
639 loaded. However, if "
641 " is 7, then an error is returned and nothing is
644 " is larger than the highest mipmap level which is, in
647 The highest mipmap level can be derived from the formula "
663 (code "glTexImage1D")
664 " reference page for a description of the
665 acceptable values for "
667 " parameter. See the "
668 (code "glDrawPixels")
669 " reference page for a description of the acceptable values
674 (para (code "GLU_INVALID_VALUE")
687 " is > the highest mipmap level for "
690 (para (code "GLU_INVALID_VALUE")
694 (para (code "GLU_INVALID_ENUM")
696 (var "internalFormat")
703 (para (code "GLU_INVALID_OPERATION")
707 (code "GLU_UNSIGNED_BYTE_3_3_2")
709 (code "GLU_UNSIGNED_BYTE_2_3_3_REV")
716 (para (code "GLU_INVALID_OPERATION")
720 (code "GLU_UNSIGNED_SHORT_5_6_5")
722 (code "GLU_UNSIGNED_SHORT_5_6_5_REV")
729 (para (code "GLU_INVALID_OPERATION")
733 (code "GLU_UNSIGNED_SHORT_4_4_4_4")
735 (code "GLU_UNSIGNED_SHORT_4_4_4_4_REV")
744 (para (code "GLU_INVALID_OPERATION")
748 (code "GLU_UNSIGNED_SHORT_5_5_5_1")
750 (code "GLU_UNSIGNED_SHORT_1_5_5_5_REV")
759 (para (code "GLU_INVALID_OPERATION")
763 (code "GLU_UNSIGNED_INT_8_8_8_8")
765 (code "GLU_UNSIGNED_INT_8_8_8_8_REV")
774 (para (code "GLU_INVALID_OPERATION")
778 (code "GLU_UNSIGNED_INT_10_10_10_2")
780 (code "GLU_UNSIGNED_INT_2_10_10_10_REV")
795 (funcdef "GLint " (function "gluBuild1DMipmaps"))
796 (paramdef "GLenum " (parameter "target"))
797 (paramdef "GLint " (parameter "internalFormat"))
798 (paramdef "GLsizei " (parameter "width"))
799 (paramdef "GLenum " (parameter "format"))
800 (paramdef "GLenum " (parameter "type"))
801 (paramdef "const void * " (parameter "data"))))
803 (heading "builds a one-dimensional mipmap")
804 (heading "Parameters")
805 (table (% (formatter (asis)))
806 (entry (% (heading (var "target")))
808 Specifies the target texture. Must be "
809 (code "GLU_TEXTURE_1D")
811 (entry (% (heading (var "internalFormat")))
813 Requests the internal storage format of the texture image. The most
814 current version of the SGI implementation of GLU does not check this
815 value for validity before passing it on to the underlying OpenGL
816 implementation. A value that is not accepted by the OpenGL
817 implementation will lead to an OpenGL error. The benefit of not
818 checking this value at the GLU level is that OpenGL extensions can add
819 new internal texture formats without requiring a revision of the GLU
820 implementation. Older implementations of GLU check this value and
821 raise a GLU error if it is not 1, 2, 3, or 4 or one of the following
822 symbolic constants: "
833 (code "GLU_LUMINANCE")
835 (code "GLU_LUMINANCE4")
837 (code "GLU_LUMINANCE8")
839 (code "GLU_LUMINANCE12")
841 (code "GLU_LUMINANCE16")
843 (code "GLU_LUMINANCE_ALPHA")
845 (code "GLU_LUMINANCE4_ALPHA4")
847 (code "GLU_LUMINANCE6_ALPHA2")
849 (code "GLU_LUMINANCE8_ALPHA8")
851 (code "GLU_LUMINANCE12_ALPHA4")
853 (code "GLU_LUMINANCE12_ALPHA12")
855 (code "GLU_LUMINANCE16_ALPHA16")
857 (code "GLU_INTENSITY")
859 (code "GLU_INTENSITY4")
861 (code "GLU_INTENSITY8")
863 (code "GLU_INTENSITY12")
865 (code "GLU_INTENSITY16")
869 (code "GLU_R3_G3_B2")
893 (code "GLU_RGB10_A2")
899 (entry (% (heading (var "width")))
901 Specifies the width, in pixels, of the texture image. "))
902 (entry (% (heading (var "format")))
904 Specifies the format of the pixel data.
906 (code "GLU_COLOR_INDEX")
908 (code "GLU_DEPTH_COMPONENT")
926 (code "GLU_LUMINANCE")
928 (code "GLU_LUMINANCE_ALPHA")
930 (entry (% (heading (var "type")))
932 Specifies the data type for "
936 (code "GLU_UNSIGNED_BYTE")
942 (code "GLU_UNSIGNED_SHORT")
946 (code "GLU_UNSIGNED_INT")
952 (code "GLU_UNSIGNED_BYTE_3_3_2")
954 (code "GLU_UNSIGNED_BYTE_2_3_3_REV")
956 (code "GLU_UNSIGNED_SHORT_5_6_5")
958 (code "GLU_UNSIGNED_SHORT_5_6_5_REV")
960 (code "GLU_UNSIGNED_SHORT_4_4_4_4")
962 (code "GLU_UNSIGNED_SHORT_4_4_4_4_REV")
964 (code "GLU_UNSIGNED_SHORT_5_5_5_1")
966 (code "GLU_UNSIGNED_SHORT_1_5_5_5_REV")
968 (code "GLU_UNSIGNED_INT_8_8_8_8")
970 (code "GLU_UNSIGNED_INT_8_8_8_8_REV")
972 (code "GLU_UNSIGNED_INT_10_10_10_2")
974 (code "GLU_UNSIGNED_INT_2_10_10_10_REV")
976 (entry (% (heading (var "data")))
978 Specifies a pointer to the image data in memory. ")))
979 (heading "Description")
980 (para (code "gluBuild1DMipmaps")
981 " builds a series of prefiltered one-dimensional texture maps of decreasing
982 resolutions called a mipmap. This is used for the antialiasing of
983 texture mapped primitives. ")
985 A return value of zero indicates success, otherwise a GLU error code is
987 (code "gluErrorString")
994 " is checked to see if it is
995 a power of 2. If not, a copy of "
997 " is scaled up or down to the
998 nearest power of 2. (If "
1000 " is exactly between powers of 2, then
1003 " will scale upwards.) This copy will be used for
1004 subsequent mipmapping operations described below.
1007 " is 57, then a copy of "
1010 will scale up to 64 before mipmapping
1013 Then, proxy textures (see "
1014 (code "glTexImage1D")
1015 ") are used to determine if
1016 the implementation can fit the requested texture. If not, "
1019 continually halved until it fits. ")
1021 Next, a series of mipmap levels is built by decimating a copy of "
1027 is reached. At each level, each texel in the
1028 halved mipmap level is an average of the corresponding two texels in the larger
1030 (para (code "glTexImage1D")
1031 " is called to load each of these mipmap levels.
1032 Level 0 is a copy of "
1035 The highest level is "
1048 " is 64 and the implementation can store a texture of
1049 this size, the following mipmap levels are
1051 (math "64" "×" "1")
1053 (math "32" "×" "1")
1055 (math "16" "×" "1")
1067 levels 0 through 6, respectively. ")
1070 (code "glTexImage1D")
1071 " reference page for a description of the
1072 acceptable values for the "
1074 " parameter. See the "
1075 (code "glDrawPixels")
1076 " reference page for a description of the acceptable values
1081 (para (code "GLU_INVALID_VALUE")
1085 (para (code "GLU_INVALID_ENUM")
1091 (para (code "GLU_INVALID_OPERATION")
1095 (code "GLU_UNSIGNED_BYTE_3_3_2")
1097 (code "GLU_UNSIGNED_BYTE_2_3_3_REV")
1104 (para (code "GLU_INVALID_OPERATION")
1108 (code "GLU_UNSIGNED_SHORT_5_6_5")
1110 (code "GLU_UNSIGNED_SHORT_5_6_5_REV")
1117 (para (code "GLU_INVALID_OPERATION")
1121 (code "GLU_UNSIGNED_SHORT_4_4_4_4")
1123 (code "GLU_UNSIGNED_SHORT_4_4_4_4_REV")
1132 (para (code "GLU_INVALID_OPERATION")
1136 (code "GLU_UNSIGNED_SHORT_5_5_5_1")
1138 (code "GLU_UNSIGNED_SHORT_1_5_5_5_REV")
1147 (para (code "GLU_INVALID_OPERATION")
1151 (code "GLU_UNSIGNED_INT_8_8_8_8")
1153 (code "GLU_UNSIGNED_INT_8_8_8_8_REV")
1162 (para (code "GLU_INVALID_OPERATION")
1166 (code "GLU_UNSIGNED_INT_10_10_10_2")
1168 (code "GLU_UNSIGNED_INT_2_10_10_10_REV")
1178 (define-gl-procedure
1179 gluBuild2DMipmapLevels
1180 "gluBuild2DMipmapLevels"
1185 (function "gluBuild2DMipmapLevels"))
1186 (paramdef "GLenum " (parameter "target"))
1187 (paramdef "GLint " (parameter "internalFormat"))
1188 (paramdef "GLsizei " (parameter "width"))
1189 (paramdef "GLsizei " (parameter "height"))
1190 (paramdef "GLenum " (parameter "format"))
1191 (paramdef "GLenum " (parameter "type"))
1192 (paramdef "GLint " (parameter "level"))
1193 (paramdef "GLint " (parameter "base"))
1194 (paramdef "GLint " (parameter "max"))
1195 (paramdef "const void * " (parameter "data"))))
1198 "builds a subset of two-dimensional mipmap levels")
1199 (heading "Parameters")
1200 (table (% (formatter (asis)))
1201 (entry (% (heading (var "target")))
1203 Specifies the target texture. Must be "
1204 (code "GLU_TEXTURE_2D")
1206 (entry (% (heading (var "internalFormat")))
1208 Requests the internal storage format of the texture image. The most
1209 current version of the SGI implementation of GLU does not check this
1210 value for validity before passing it on to the underlying OpenGL
1211 implementation. A value that is not accepted by the OpenGL
1212 implementation will lead to an OpenGL error. The benefit of not
1213 checking this value at the GLU level is that OpenGL extensions can add
1214 new internal texture formats without requiring a revision of the GLU
1215 implementation. Older implementations of GLU check this value and
1216 raise a GLU error if it is not 1, 2, 3, or 4 or one of the following
1217 symbolic constants: "
1224 (code "GLU_ALPHA12")
1226 (code "GLU_ALPHA16")
1228 (code "GLU_LUMINANCE")
1230 (code "GLU_LUMINANCE4")
1232 (code "GLU_LUMINANCE8")
1234 (code "GLU_LUMINANCE12")
1236 (code "GLU_LUMINANCE16")
1238 (code "GLU_LUMINANCE_ALPHA")
1240 (code "GLU_LUMINANCE4_ALPHA4")
1242 (code "GLU_LUMINANCE6_ALPHA2")
1244 (code "GLU_LUMINANCE8_ALPHA8")
1246 (code "GLU_LUMINANCE12_ALPHA4")
1248 (code "GLU_LUMINANCE12_ALPHA12")
1250 (code "GLU_LUMINANCE16_ALPHA16")
1252 (code "GLU_INTENSITY")
1254 (code "GLU_INTENSITY4")
1256 (code "GLU_INTENSITY8")
1258 (code "GLU_INTENSITY12")
1260 (code "GLU_INTENSITY16")
1264 (code "GLU_R3_G3_B2")
1284 (code "GLU_RGB5_A1")
1288 (code "GLU_RGB10_A2")
1294 (entry (% (heading (var "width")))
1295 (itemx (var "height"))
1297 Specifies the width and height, respectively, in pixels of the texture image.
1298 These should be a power of 2. "))
1299 (entry (% (heading (var "format")))
1301 Specifies the format of the pixel data.
1303 (code "GLU_COLOR_INDEX")
1305 (code "GLU_DEPTH_COMPONENT")
1323 (code "GLU_LUMINANCE")
1325 (code "GLU_LUMINANCE_ALPHA")
1327 (entry (% (heading (var "type")))
1329 Specifies the data type for "
1333 (code "GLU_UNSIGNED_BYTE")
1339 (code "GLU_UNSIGNED_SHORT")
1343 (code "GLU_UNSIGNED_INT")
1349 (code "GLU_UNSIGNED_BYTE_3_3_2")
1351 (code "GLU_UNSIGNED_BYTE_2_3_3_REV")
1353 (code "GLU_UNSIGNED_SHORT_5_6_5")
1355 (code "GLU_UNSIGNED_SHORT_5_6_5_REV")
1357 (code "GLU_UNSIGNED_SHORT_4_4_4_4")
1359 (code "GLU_UNSIGNED_SHORT_4_4_4_4_REV")
1361 (code "GLU_UNSIGNED_SHORT_5_5_5_1")
1363 (code "GLU_UNSIGNED_SHORT_1_5_5_5_REV")
1365 (code "GLU_UNSIGNED_INT_8_8_8_8")
1367 (code "GLU_UNSIGNED_INT_8_8_8_8_REV")
1369 (code "GLU_UNSIGNED_INT_10_10_10_2")
1371 (code "GLU_UNSIGNED_INT_2_10_10_10_REV")
1373 (entry (% (heading (var "level")))
1375 Specifies the mipmap level of the image data. "))
1376 (entry (% (heading (var "base")))
1378 Specifies the minimum mipmap level to pass to "
1379 (code "glTexImage2D")
1381 (entry (% (heading (var "max")))
1383 Specifies the maximum mipmap level to pass to "
1384 (code "glTexImage2D")
1386 (entry (% (heading (var "data")))
1388 Specifies a pointer to the image data in memory. ")))
1389 (heading "Description")
1390 (para (code "gluBuild2DMipmapLevels")
1391 " builds a subset of prefiltered two-dimensional texture maps of decreasing
1392 resolutions called a mipmap. This is used for the antialiasing of
1393 texture mapped primitives. ")
1395 A return value of zero indicates success, otherwise a GLU error code is
1397 (code "gluErrorString")
1400 A series of mipmap levels from "
1404 " is built by decimating "
1407 both dimensions until size "
1410 is reached. At each level, each texel in the
1411 halved mipmap level is an average of the corresponding four texels in the larger
1412 mipmap level. (In the case of rectangular images, the decimation will ultimately
1414 (math (var "N") "×" "1")
1417 (math "1" "×" (var "N"))
1419 configuration. Here, two texels are
1420 averaged instead.) "
1421 (code "glTexImage2D")
1422 " is called to load these mipmap levels from "
1429 " is larger than the highest mipmap level for the
1430 texture of the specified size, then a GLU error code is returned (see "
1431 (code "gluErrorString")
1432 ") and nothing is loaded. ")
1441 following levels are possible: "
1442 (math "16" "×" "8")
1452 These correspond to levels 2 through 6
1457 " is 5, then only mipmap levels "
1465 are loaded. However, if "
1468 is 7, then an error is returned and nothing is loaded since "
1471 larger than the highest mipmap level which is, in this case, 6. ")
1473 The highest mipmap level can be derived from the formula "
1495 (code "glTexImage1D")
1496 " reference page for a description of the
1497 acceptable values for "
1499 " parameter. See the "
1500 (code "glDrawPixels")
1501 " reference page for a description of the acceptable values
1506 (para (code "GLU_INVALID_VALUE")
1519 " is > the highest mipmap level for "
1522 (para (code "GLU_INVALID_VALUE")
1528 (para (code "GLU_INVALID_ENUM")
1530 (var "internalFormat")
1537 (para (code "GLU_INVALID_OPERATION")
1541 (code "GLU_UNSIGNED_BYTE_3_3_2")
1543 (code "GLU_UNSIGNED_BYTE_2_3_3_REV")
1550 (para (code "GLU_INVALID_OPERATION")
1554 (code "GLU_UNSIGNED_SHORT_5_6_5")
1556 (code "GLU_UNSIGNED_SHORT_5_6_5_REV")
1563 (para (code "GLU_INVALID_OPERATION")
1567 (code "GLU_UNSIGNED_SHORT_4_4_4_4")
1569 (code "GLU_UNSIGNED_SHORT_4_4_4_4_REV")
1578 (para (code "GLU_INVALID_OPERATION")
1582 (code "GLU_UNSIGNED_SHORT_5_5_5_1")
1584 (code "GLU_UNSIGNED_SHORT_1_5_5_5_REV")
1593 (para (code "GLU_INVALID_OPERATION")
1597 (code "GLU_UNSIGNED_INT_8_8_8_8")
1599 (code "GLU_UNSIGNED_INT_8_8_8_8_REV")
1608 (para (code "GLU_INVALID_OPERATION")
1612 (code "GLU_UNSIGNED_INT_10_10_10_2")
1614 (code "GLU_UNSIGNED_INT_2_10_10_10_REV")
1624 (define-gl-procedure
1629 (funcdef "GLint " (function "gluBuild2DMipmaps"))
1630 (paramdef "GLenum " (parameter "target"))
1631 (paramdef "GLint " (parameter "internalFormat"))
1632 (paramdef "GLsizei " (parameter "width"))
1633 (paramdef "GLsizei " (parameter "height"))
1634 (paramdef "GLenum " (parameter "format"))
1635 (paramdef "GLenum " (parameter "type"))
1636 (paramdef "const void * " (parameter "data"))))
1638 (heading "builds a two-dimensional mipmap")
1639 (heading "Parameters")
1640 (table (% (formatter (asis)))
1641 (entry (% (heading (var "target")))
1643 Specifies the target texture. Must be "
1644 (code "GLU_TEXTURE_2D")
1646 (entry (% (heading (var "internalFormat")))
1648 Requests the internal storage format of the texture image. The most
1649 current version of the SGI implementation of GLU does not check this
1650 value for validity before passing it on to the underlying OpenGL
1651 implementation. A value that is not accepted by the OpenGL
1652 implementation will lead to an OpenGL error. The benefit of not
1653 checking this value at the GLU level is that OpenGL extensions can add
1654 new internal texture formats without requiring a revision of the GLU
1655 implementation. Older implementations of GLU check this value and
1656 raise a GLU error if it is not 1, 2, 3, or 4 or one of the following
1657 symbolic constants: "
1664 (code "GLU_ALPHA12")
1666 (code "GLU_ALPHA16")
1668 (code "GLU_LUMINANCE")
1670 (code "GLU_LUMINANCE4")
1672 (code "GLU_LUMINANCE8")
1674 (code "GLU_LUMINANCE12")
1676 (code "GLU_LUMINANCE16")
1678 (code "GLU_LUMINANCE_ALPHA")
1680 (code "GLU_LUMINANCE4_ALPHA4")
1682 (code "GLU_LUMINANCE6_ALPHA2")
1684 (code "GLU_LUMINANCE8_ALPHA8")
1686 (code "GLU_LUMINANCE12_ALPHA4")
1688 (code "GLU_LUMINANCE12_ALPHA12")
1690 (code "GLU_LUMINANCE16_ALPHA16")
1692 (code "GLU_INTENSITY")
1694 (code "GLU_INTENSITY4")
1696 (code "GLU_INTENSITY8")
1698 (code "GLU_INTENSITY12")
1700 (code "GLU_INTENSITY16")
1704 (code "GLU_R3_G3_B2")
1724 (code "GLU_RGB5_A1")
1728 (code "GLU_RGB10_A2")
1734 (entry (% (heading (var "width")))
1735 (itemx (var "height"))
1737 Specifies in pixels the width and height, respectively, of the texture image. "))
1738 (entry (% (heading (var "format")))
1740 Specifies the format of the pixel data.
1742 (code "GLU_COLOR_INDEX")
1744 (code "GLU_DEPTH_COMPONENT")
1762 (code "GLU_LUMINANCE")
1764 (code "GLU_LUMINANCE_ALPHA")
1766 (entry (% (heading (var "type")))
1768 Specifies the data type for "
1772 (code "GLU_UNSIGNED_BYTE")
1778 (code "GLU_UNSIGNED_SHORT")
1782 (code "GLU_UNSIGNED_INT")
1788 (code "GLU_UNSIGNED_BYTE_3_3_2")
1790 (code "GLU_UNSIGNED_BYTE_2_3_3_REV")
1792 (code "GLU_UNSIGNED_SHORT_5_6_5")
1794 (code "GLU_UNSIGNED_SHORT_5_6_5_REV")
1796 (code "GLU_UNSIGNED_SHORT_4_4_4_4")
1798 (code "GLU_UNSIGNED_SHORT_4_4_4_4_REV")
1800 (code "GLU_UNSIGNED_SHORT_5_5_5_1")
1802 (code "GLU_UNSIGNED_SHORT_1_5_5_5_REV")
1804 (code "GLU_UNSIGNED_INT_8_8_8_8")
1806 (code "GLU_UNSIGNED_INT_8_8_8_8_REV")
1808 (code "GLU_UNSIGNED_INT_10_10_10_2")
1810 (code "GLU_UNSIGNED_INT_2_10_10_10_REV")
1812 (entry (% (heading (var "data")))
1814 Specifies a pointer to the image data in memory. ")))
1815 (heading "Description")
1816 (para (code "gluBuild2DMipmaps")
1817 " builds a series of prefiltered two-dimensional texture maps of decreasing
1818 resolutions called a mipmap. This is used for the antialiasing of
1819 texture-mapped primitives. ")
1821 A return value of zero indicates success, otherwise a GLU error code is
1823 (code "gluErrorString")
1832 " are checked to see if they
1833 are a power of 2. If not, a copy of "
1838 or down to the nearest power of 2. This copy will be used for subsequent
1839 mipmapping operations described below. (If "
1844 between powers of 2, then the copy of "
1846 " will scale upwards.) For
1851 " is 23, then a copy of "
1856 " and down to 16 in depth, before mipmapping takes
1859 Then, proxy textures (see "
1860 (code "glTexImage2D")
1861 ") are used to determine if
1862 the implementation can fit the requested texture. If not, both dimensions
1863 are continually halved until it fits. (If the OpenGL version is \\(<= 1.0,
1864 both maximum texture dimensions are clamped to the value returned
1866 (code "glGetIntegerv")
1867 " with the argument "
1868 (code "GLU_MAX_TEXTURE_SIZE")
1871 Next, a series of mipmap levels is built by decimating a copy of "
1874 in half along both dimensions until size "
1879 each texel in the halved mipmap level is an average of the corresponding
1880 four texels in the larger mipmap level. (In the case of rectangular
1881 images, the decimation will ultimately reach an "
1882 (math (var "N") "×" "1")
1885 (math "1" "×" (var "N"))
1887 configuration. Here, two texels are averaged instead.) ")
1888 (para (code "glTexImage2D")
1889 " is called to load each of these mipmap levels.
1890 Level 0 is a copy of "
1892 ". The highest level is "
1915 and the implementation can store a texture of this size, the following
1916 mipmap levels are built: "
1917 (math "64" "×" "16")
1919 (math "32" "×" "8")
1921 (math "16" "×" "4")
1933 correspond to levels 0 through 6, respectively. ")
1936 (code "glTexImage1D")
1937 " reference page for a description of the
1938 acceptable values for "
1940 " parameter. See the "
1941 (code "glDrawPixels")
1942 " reference page for a description of the acceptable values
1947 (para (code "GLU_INVALID_VALUE")
1953 (para (code "GLU_INVALID_ENUM")
1955 (var "internalFormat")
1962 (para (code "GLU_INVALID_OPERATION")
1966 (code "GLU_UNSIGNED_BYTE_3_3_2")
1968 (code "GLU_UNSIGNED_BYTE_2_3_3_REV")
1975 (para (code "GLU_INVALID_OPERATION")
1979 (code "GLU_UNSIGNED_SHORT_5_6_5")
1981 (code "GLU_UNSIGNED_SHORT_5_6_5_REV")
1988 (para (code "GLU_INVALID_OPERATION")
1992 (code "GLU_UNSIGNED_SHORT_4_4_4_4")
1994 (code "GLU_UNSIGNED_SHORT_4_4_4_4_REV")
2003 (para (code "GLU_INVALID_OPERATION")
2007 (code "GLU_UNSIGNED_SHORT_5_5_5_1")
2009 (code "GLU_UNSIGNED_SHORT_1_5_5_5_REV")
2018 (para (code "GLU_INVALID_OPERATION")
2022 (code "GLU_UNSIGNED_INT_8_8_8_8")
2024 (code "GLU_UNSIGNED_INT_8_8_8_8_REV")
2033 (para (code "GLU_INVALID_OPERATION")
2037 (code "GLU_UNSIGNED_INT_10_10_10_2")
2039 (code "GLU_UNSIGNED_INT_2_10_10_10_REV")
2049 (define-gl-procedure
2050 gluBuild3DMipmapLevels
2051 "gluBuild3DMipmapLevels"
2056 (function "gluBuild3DMipmapLevels"))
2057 (paramdef "GLenum " (parameter "target"))
2058 (paramdef "GLint " (parameter "internalFormat"))
2059 (paramdef "GLsizei " (parameter "width"))
2060 (paramdef "GLsizei " (parameter "height"))
2061 (paramdef "GLsizei " (parameter "depth"))
2062 (paramdef "GLenum " (parameter "format"))
2063 (paramdef "GLenum " (parameter "type"))
2064 (paramdef "GLint " (parameter "level"))
2065 (paramdef "GLint " (parameter "base"))
2066 (paramdef "GLint " (parameter "max"))
2067 (paramdef "const void * " (parameter "data"))))
2070 "builds a subset of three-dimensional mipmap levels")
2071 (heading "Parameters")
2072 (table (% (formatter (asis)))
2073 (entry (% (heading (var "target")))
2075 Specifies the target texture. Must be "
2076 (code "GLU_TEXTURE_3D")
2078 (entry (% (heading (var "internalFormat")))
2080 Requests the internal storage format of the texture image. The most
2081 current version of the SGI implementation of GLU does not check this
2082 value for validity before passing it on to the underlying OpenGL
2083 implementation. A value that is not accepted by the OpenGL
2084 implementation will lead to an OpenGL error. The benefit of not
2085 checking this value at the GLU level is that OpenGL extensions can add
2086 new internal texture formats without requiring a revision of the GLU
2087 implementation. Older implementations of GLU check this value and
2088 raise a GLU error if it is not 1, 2, 3, or 4 or one of the following
2089 symbolic constants: "
2096 (code "GLU_ALPHA12")
2098 (code "GLU_ALPHA16")
2100 (code "GLU_LUMINANCE")
2102 (code "GLU_LUMINANCE4")
2104 (code "GLU_LUMINANCE8")
2106 (code "GLU_LUMINANCE12")
2108 (code "GLU_LUMINANCE16")
2110 (code "GLU_LUMINANCE_ALPHA")
2112 (code "GLU_LUMINANCE4_ALPHA4")
2114 (code "GLU_LUMINANCE6_ALPHA2")
2116 (code "GLU_LUMINANCE8_ALPHA8")
2118 (code "GLU_LUMINANCE12_ALPHA4")
2120 (code "GLU_LUMINANCE12_ALPHA12")
2122 (code "GLU_LUMINANCE16_ALPHA16")
2124 (code "GLU_INTENSITY")
2126 (code "GLU_INTENSITY4")
2128 (code "GLU_INTENSITY8")
2130 (code "GLU_INTENSITY12")
2132 (code "GLU_INTENSITY16")
2136 (code "GLU_R3_G3_B2")
2156 (code "GLU_RGB5_A1")
2160 (code "GLU_RGB10_A2")
2166 (entry (% (heading (var "width")))
2167 (itemx (var "height"))
2168 (itemx (var "depth"))
2170 Specifies in pixels the width, height and depth respectively, of the texture
2171 image. These should be a power of 2. "))
2172 (entry (% (heading (var "format")))
2174 Specifies the format of the pixel data.
2176 (code "GLU_COLOR_INDEX")
2178 (code "GLU_DEPTH_COMPONENT")
2196 (code "GLU_LUMINANCE")
2198 (code "GLU_LUMINANCE_ALPHA")
2200 (entry (% (heading (var "type")))
2202 Specifies the data type for "
2206 (code "GLU_UNSIGNED_BYTE")
2212 (code "GLU_UNSIGNED_SHORT")
2216 (code "GLU_UNSIGNED_INT")
2222 (code "GLU_UNSIGNED_BYTE_3_3_2")
2224 (code "GLU_UNSIGNED_BYTE_2_3_3_REV")
2226 (code "GLU_UNSIGNED_SHORT_5_6_5")
2228 (code "GLU_UNSIGNED_SHORT_5_6_5_REV")
2230 (code "GLU_UNSIGNED_SHORT_4_4_4_4")
2232 (code "GLU_UNSIGNED_SHORT_4_4_4_4_REV")
2234 (code "GLU_UNSIGNED_SHORT_5_5_5_1")
2236 (code "GLU_UNSIGNED_SHORT_1_5_5_5_REV")
2238 (code "GLU_UNSIGNED_INT_8_8_8_8")
2240 (code "GLU_UNSIGNED_INT_8_8_8_8_REV")
2242 (code "GLU_UNSIGNED_INT_10_10_10_2")
2244 (code "GLU_UNSIGNED_INT_2_10_10_10_REV")
2246 (entry (% (heading (var "level")))
2248 Specifies the mipmap level of the image data. "))
2249 (entry (% (heading (var "base")))
2251 Specifies the minimum mipmap level to pass to "
2252 (code "glTexImage3D")
2254 (entry (% (heading (var "max")))
2256 Specifies the maximum mipmap level to pass to "
2257 (code "glTexImage3D")
2259 (entry (% (heading (var "data")))
2261 Specifies a pointer to the image data in memory. ")))
2262 (heading "Description")
2263 (para (code "gluBuild3DMipmapLevels")
2264 " builds a subset of prefiltered three-dimensional texture maps of
2265 decreasing resolutions called a mipmap. This is used for the antialiasing of
2266 texture mapped primitives. ")
2268 A return value of zero indicates success, otherwise a GLU error code is
2270 (code "gluErrorString")
2273 A series of mipmap levels from "
2280 " in half along both dimensions until size "
2281 (math "1" "×" "1" "×" "1")
2283 is reached. At each level, each texel in the halved mipmap
2284 level is an average of the corresponding eight texels in the larger
2285 mipmap level. (If exactly one of the dimensions is 1, four texels are
2286 averaged. If exactly two of the dimensions are 1, two texels are
2288 (code "glTexImage3D")
2289 " is called to load these mipmap levels
2296 " is larger than the highest mipmap
2297 level for the texture of the specified size, then a GLU error code is
2299 (code "gluErrorString")
2300 ") and nothing is loaded. ")
2311 is 4, the following levels are possible: "
2312 (math "16" "×" "8" "×" "4")
2314 (math "8" "×" "4" "×" "2")
2316 (math "4" "×" "2" "×" "1")
2318 (math "2" "×" "1" "×" "1")
2320 (math "1" "×" "1" "×" "1")
2322 These correspond to levels 2 through 6 respectively. If "
2327 " is 5, then only mipmap levels "
2328 (math "8" "×" "4" "×" "2")
2330 (math "4" "×" "2" "×" "1")
2333 (math "2" "×" "1" "×" "1")
2335 are loaded. However, if "
2337 " is 7, then an error is returned and nothing is loaded, since "
2339 " is larger than the highest mipmap level which is, in this case,
2342 The highest mipmap level can be derived from the formula "
2365 (code "glTexImage1D")
2366 " reference page for a description of the
2367 acceptable values for "
2369 " parameter. See the "
2370 (code "glDrawPixels")
2371 " reference page for a description of the acceptable values
2376 (para (code "GLU_INVALID_VALUE")
2389 " is > the highest mipmap level for "
2392 (para (code "GLU_INVALID_VALUE")
2400 (para (code "GLU_INVALID_ENUM")
2402 (var "internalFormat")
2409 (para (code "GLU_INVALID_OPERATION")
2413 (code "GLU_UNSIGNED_BYTE_3_3_2")
2415 (code "GLU_UNSIGNED_BYTE_2_3_3_REV")
2422 (para (code "GLU_INVALID_OPERATION")
2426 (code "GLU_UNSIGNED_SHORT_5_6_5")
2428 (code "GLU_UNSIGNED_SHORT_5_6_5_REV")
2435 (para (code "GLU_INVALID_OPERATION")
2439 (code "GLU_UNSIGNED_SHORT_4_4_4_4")
2441 (code "GLU_UNSIGNED_SHORT_4_4_4_4_REV")
2450 (para (code "GLU_INVALID_OPERATION")
2454 (code "GLU_UNSIGNED_SHORT_5_5_5_1")
2456 (code "GLU_UNSIGNED_SHORT_1_5_5_5_REV")
2465 (para (code "GLU_INVALID_OPERATION")
2469 (code "GLU_UNSIGNED_INT_8_8_8_8")
2471 (code "GLU_UNSIGNED_INT_8_8_8_8_REV")
2480 (para (code "GLU_INVALID_OPERATION")
2484 (code "GLU_UNSIGNED_INT_10_10_10_2")
2486 (code "GLU_UNSIGNED_INT_2_10_10_10_REV")
2496 (define-gl-procedure
2501 (funcdef "GLint " (function "gluBuild3DMipmaps"))
2502 (paramdef "GLenum " (parameter "target"))
2503 (paramdef "GLint " (parameter "internalFormat"))
2504 (paramdef "GLsizei " (parameter "width"))
2505 (paramdef "GLsizei " (parameter "height"))
2506 (paramdef "GLsizei " (parameter "depth"))
2507 (paramdef "GLenum " (parameter "format"))
2508 (paramdef "GLenum " (parameter "type"))
2509 (paramdef "const void * " (parameter "data"))))
2511 (heading "builds a three-dimensional mipmap")
2512 (heading "Parameters")
2513 (table (% (formatter (asis)))
2514 (entry (% (heading (var "target")))
2516 Specifies the target texture. Must be "
2517 (code "GLU_TEXTURE_3D")
2519 (entry (% (heading (var "internalFormat")))
2521 Requests the internal storage format of the texture image. The most
2522 current version of the SGI implementation of GLU does not check this
2523 value for validity before passing it on to the underlying OpenGL
2524 implementation. A value that is not accepted by the OpenGL
2525 implementation will lead to an OpenGL error. The benefit of not
2526 checking this value at the GLU level is that OpenGL extensions can add
2527 new internal texture formats without requiring a revision of the GLU
2528 implementation. Older implementations of GLU check this value and
2529 raise a GLU error if it is not 1, 2, 3, or 4 or one of the following
2530 symbolic constants: "
2537 (code "GLU_ALPHA12")
2539 (code "GLU_ALPHA16")
2541 (code "GLU_LUMINANCE")
2543 (code "GLU_LUMINANCE4")
2545 (code "GLU_LUMINANCE8")
2547 (code "GLU_LUMINANCE12")
2549 (code "GLU_LUMINANCE16")
2551 (code "GLU_LUMINANCE_ALPHA")
2553 (code "GLU_LUMINANCE4_ALPHA4")
2555 (code "GLU_LUMINANCE6_ALPHA2")
2557 (code "GLU_LUMINANCE8_ALPHA8")
2559 (code "GLU_LUMINANCE12_ALPHA4")
2561 (code "GLU_LUMINANCE12_ALPHA12")
2563 (code "GLU_LUMINANCE16_ALPHA16")
2565 (code "GLU_INTENSITY")
2567 (code "GLU_INTENSITY4")
2569 (code "GLU_INTENSITY8")
2571 (code "GLU_INTENSITY12")
2573 (code "GLU_INTENSITY16")
2577 (code "GLU_R3_G3_B2")
2597 (code "GLU_RGB5_A1")
2601 (code "GLU_RGB10_A2")
2607 (entry (% (heading (var "width")))
2608 (itemx (var "height"))
2609 (itemx (var "depth"))
2611 Specifies in pixels the width, height and depth respectively, in pixels
2612 of the texture image. "))
2613 (entry (% (heading (var "format")))
2615 Specifies the format of the pixel data.
2617 (code "GLU_COLOR_INDEX")
2619 (code "GLU_DEPTH_COMPONENT")
2637 (code "GLU_LUMINANCE")
2639 (code "GLU_LUMINANCE_ALPHA")
2641 (entry (% (heading (var "type")))
2643 Specifies the data type for "
2647 (code "GLU_UNSIGNED_BYTE")
2653 (code "GLU_UNSIGNED_SHORT")
2657 (code "GLU_UNSIGNED_INT")
2663 (code "GLU_UNSIGNED_BYTE_3_3_2")
2665 (code "GLU_UNSIGNED_BYTE_2_3_3_REV")
2667 (code "GLU_UNSIGNED_SHORT_5_6_5")
2669 (code "GLU_UNSIGNED_SHORT_5_6_5_REV")
2671 (code "GLU_UNSIGNED_SHORT_4_4_4_4")
2673 (code "GLU_UNSIGNED_SHORT_4_4_4_4_REV")
2675 (code "GLU_UNSIGNED_SHORT_5_5_5_1")
2677 (code "GLU_UNSIGNED_SHORT_1_5_5_5_REV")
2679 (code "GLU_UNSIGNED_INT_8_8_8_8")
2681 (code "GLU_UNSIGNED_INT_8_8_8_8_REV")
2683 (code "GLU_UNSIGNED_INT_10_10_10_2")
2685 (code "GLU_UNSIGNED_INT_2_10_10_10_REV")
2687 (entry (% (heading (var "data")))
2689 Specifies a pointer to the image data in memory. ")))
2690 (heading "Description")
2691 (para (code "gluBuild3DMipmaps")
2692 " builds a series of prefiltered three-dimensional texture maps of
2693 decreasing resolutions called a mipmap. This is used for the antialiasing of
2694 texture-mapped primitives. ")
2696 A return value of zero indicates success, otherwise a GLU error code is
2698 (code "gluErrorString")
2710 see if they are a power of 2. If not, a copy of "
2713 scaled up or down to the nearest power of 2. (If "
2719 " is exactly between powers of 2, then the copy of "
2722 scale upwards.) This copy will be used for subsequent mipmapping
2723 operations described below. For example, if "
2730 " is 24, then a copy of "
2732 " will scale up to 64 in
2733 width, down to 16 in height, and up to 32 in depth before mipmapping
2736 Then, proxy textures (see "
2737 (code "glTexImage3D")
2738 ") are used to determine if
2739 the implementation can fit the requested texture. If not, all three dimensions
2740 are continually halved until it fits. ")
2742 Next, a series of mipmap levels is built by decimating a copy of "
2745 in half along all three dimensions until size "
2746 (math "1" "×" "1" "×" "1")
2749 reached. At each level, each texel in the halved mipmap level is an
2750 average of the corresponding eight texels in the larger mipmap
2751 level. (If exactly one of the dimensions is 1, four texels are averaged.
2752 If exactly two of the dimensions are 1, two texels are averaged.) ")
2753 (para (code "glTexImage3D")
2754 " is called to load each of these mipmap levels.
2755 Level 0 is a copy of "
2757 ". The highest level is "
2782 " is 32, and the implementation can store a texture of this
2783 size, the following mipmap levels are built: "
2784 (math "64" "×" "16" "×" "32")
2786 (math "32" "×" "8" "×" "16")
2788 (math "16" "×" "4" "×" "8")
2790 (math "8" "×" "2" "×" "4")
2792 (math "4" "×" "1" "×" "2")
2794 (math "2" "×" "1" "×" "1")
2797 (math "1" "×" "1" "×" "1")
2800 to levels 0 through 6, respectively. ")
2803 (code "glTexImage1D")
2804 " reference page for a description of the
2805 acceptable values for "
2807 " parameter. See the "
2808 (code "glDrawPixels")
2809 " reference page for a description of the acceptable values
2814 (para (code "GLU_INVALID_VALUE")
2822 (para (code "GLU_INVALID_ENUM")
2824 (var "internalFormat")
2831 (para (code "GLU_INVALID_OPERATION")
2835 (code "GLU_UNSIGNED_BYTE_3_3_2")
2837 (code "GLU_UNSIGNED_BYTE_2_3_3_REV")
2844 (para (code "GLU_INVALID_OPERATION")
2848 (code "GLU_UNSIGNED_SHORT_5_6_5")
2850 (code "GLU_UNSIGNED_SHORT_5_6_5_REV")
2857 (para (code "GLU_INVALID_OPERATION")
2861 (code "GLU_UNSIGNED_SHORT_4_4_4_4")
2863 (code "GLU_UNSIGNED_SHORT_4_4_4_4_REV")
2872 (para (code "GLU_INVALID_OPERATION")
2876 (code "GLU_UNSIGNED_SHORT_5_5_5_1")
2878 (code "GLU_UNSIGNED_SHORT_1_5_5_5_REV")
2887 (para (code "GLU_INVALID_OPERATION")
2891 (code "GLU_UNSIGNED_INT_8_8_8_8")
2893 (code "GLU_UNSIGNED_INT_8_8_8_8_REV")
2902 (para (code "GLU_INVALID_OPERATION")
2906 (code "GLU_UNSIGNED_INT_10_10_10_2")
2908 (code "GLU_UNSIGNED_INT_2_10_10_10_REV")
2918 (define-gl-procedure
2925 (function "gluCheckExtension"))
2928 (parameter "extName"))
2931 (parameter "extString"))))
2934 "determines if an extension name is supported")
2935 (heading "Parameters")
2936 (table (% (formatter (asis)))
2937 (entry (% (heading (var "extName")))
2939 Specifies an extension name. "))
2940 (entry (% (heading (var "extString")))
2942 Specifies a space-separated list of extension names supported. ")))
2943 (heading "Description")
2944 (para (code "gluCheckExtension")
2949 " is supported otherwise "
2953 This is used to check for the presence for OpenGL, GLU, or GLX extension names
2954 by passing the extension strings returned by "
2955 (code "glGetString")
2957 (code "gluGetString")
2959 (code "glXGetClientString")
2961 (code "glXQueryExtensionsString")
2963 (code "glXQueryServerString")
2969 (define-gl-procedure
2974 (funcdef "void " (function "gluCylinder"))
2975 (paramdef "GLUquadric* " (parameter "quad"))
2976 (paramdef "GLdouble " (parameter "base"))
2977 (paramdef "GLdouble " (parameter "top"))
2978 (paramdef "GLdouble " (parameter "height"))
2979 (paramdef "GLint " (parameter "slices"))
2980 (paramdef "GLint " (parameter "stacks"))))
2982 (heading "draw a cylinder")
2983 (heading "Parameters")
2984 (table (% (formatter (asis)))
2985 (entry (% (heading (var "quad")))
2987 Specifies the quadrics object (created with "
2988 (code "gluNewQuadric")
2990 (entry (% (heading (var "base")))
2992 Specifies the radius of the cylinder at "
2995 (entry (% (heading (var "top")))
2997 Specifies the radius of the cylinder at "
3002 (entry (% (heading (var "height")))
3004 Specifies the height of the cylinder. "))
3005 (entry (% (heading (var "slices")))
3007 Specifies the number of subdivisions around the "
3010 (entry (% (heading (var "stacks")))
3012 Specifies the number of subdivisions along the "
3015 (heading "Description")
3016 (para (code "gluCylinder")
3017 " draws a cylinder oriented along the "
3019 " axis. The base of the cylinder
3022 " = 0 and the top at "
3023 (math (var "z") "=" (var "height"))
3026 a cylinder is subdivided around the "
3028 " axis into slices and along the "
3030 " axis into stacks. ")
3034 " is set to 0.0, this routine generates a cone. ")
3036 If the orientation is set to "
3037 (code "GLU_OUTSIDE")
3039 (code "gluQuadricOrientation")
3040 "), then any generated normals
3041 point away from the "
3043 " axis. Otherwise, they point toward the "
3047 If texturing is turned on (with "
3048 (code "gluQuadricTexture")
3050 coordinates are generated so that "
3052 " ranges linearly from 0.0
3061 " ranges from 0.0 at the +"
3063 " axis, to 0.25 at the +"
3068 " axis, to 0.75 at the \\-"
3071 and back to 1.0 at the +"
3075 (define-gl-procedure
3076 gluDeleteNurbsRenderer
3077 "gluDeleteNurbsRenderer"
3082 (function "gluDeleteNurbsRenderer"))
3083 (paramdef "GLUnurbs* " (parameter "nurb"))))
3085 (heading "destroy a NURBS object")
3086 (heading "Parameters")
3087 (table (% (formatter (asis)))
3088 (entry (% (heading (var "nurb")))
3090 Specifies the NURBS object to be destroyed. ")))
3091 (heading "Description")
3092 (para (code "gluDeleteNurbsRenderer")
3093 " destroys the NURBS object (which was created with "
3094 (code "gluNewNurbsRenderer")
3095 ") and frees any memory it uses.
3097 (code "gluDeleteNurbsRenderer")
3098 " has been called, "
3100 " cannot be used again. ")))
3102 (define-gl-procedure
3107 (funcdef "void " (function "gluDeleteQuadric"))
3108 (paramdef "GLUquadric* " (parameter "quad"))))
3110 (heading "destroy a quadrics object")
3111 (heading "Parameters")
3112 (table (% (formatter (asis)))
3113 (entry (% (heading (var "quad")))
3115 Specifies the quadrics object to be destroyed. ")))
3116 (heading "Description")
3117 (para (code "gluDeleteQuadric")
3118 " destroys the quadrics object (created with "
3119 (code "gluNewQuadric")
3121 and frees any memory it uses.
3123 (code "gluDeleteQuadric")
3124 " has been called, "
3126 " cannot be used again. ")))
3128 (define-gl-procedure
3133 (funcdef "void " (function "gluDeleteTess"))
3134 (paramdef "GLUtesselator* " (parameter "tess"))))
3136 (heading "destroy a tessellation object")
3137 (heading "Parameters")
3138 (table (% (formatter (asis)))
3139 (entry (% (heading (var "tess")))
3141 Specifies the tessellation object to destroy. ")))
3142 (heading "Description")
3143 (para (code "gluDeleteTess")
3144 " destroys the indicated tessellation object (which was created
3147 ") and frees any memory that it used. ")))
3149 (define-gl-procedure
3154 (funcdef "void " (function "gluDisk"))
3155 (paramdef "GLUquadric* " (parameter "quad"))
3156 (paramdef "GLdouble " (parameter "inner"))
3157 (paramdef "GLdouble " (parameter "outer"))
3158 (paramdef "GLint " (parameter "slices"))
3159 (paramdef "GLint " (parameter "loops"))))
3161 (heading "draw a disk")
3162 (heading "Parameters")
3163 (table (% (formatter (asis)))
3164 (entry (% (heading (var "quad")))
3166 Specifies the quadrics object (created with "
3167 (code "gluNewQuadric")
3169 (entry (% (heading (var "inner")))
3171 Specifies the inner radius of the disk (may be 0). "))
3172 (entry (% (heading (var "outer")))
3174 Specifies the outer radius of the disk. "))
3175 (entry (% (heading (var "slices")))
3177 Specifies the number of subdivisions around the "
3180 (entry (% (heading (var "loops")))
3182 Specifies the number of concentric rings about the origin into which
3183 the disk is subdivided. ")))
3184 (heading "Description")
3185 (para (code "gluDisk")
3186 " renders a disk on the "
3188 " = 0 plane. The disk has a radius of "
3190 " and contains a concentric circular hole with a radius
3195 " is 0, then no hole is generated. The disk is
3196 subdivided around the "
3198 " axis into slices (like pizza slices) and also
3206 ", respectively). ")
3208 With respect to orientation, the +"
3210 " side of the disk is considered to be
3212 (code "gluQuadricOrientation")
3214 This means that if the
3215 orientation is set to "
3216 (code "GLU_OUTSIDE")
3217 ", then any normals generated
3220 " axis. Otherwise, they point along the \\-"
3224 If texturing has been turned on (with "
3225 (code "gluQuadricTexture")
3227 texture coordinates are generated
3228 linearly such that where "
3229 (math (var "r") "=" (var "outer"))
3236 ", 0) it is (0.5, 1), at (\\-"
3242 ", 0) it is (0.5, 0). ")))
3244 (define-gl-procedure
3251 (function "gluErrorString"))
3252 (paramdef "GLenum " (parameter "error"))))
3255 "produce an error string from a GL or GLU error code")
3256 (heading "Parameters")
3257 (table (% (formatter (asis)))
3258 (entry (% (heading (var "error")))
3260 Specifies a GL or GLU error code. ")))
3261 (heading "Description")
3262 (para (code "gluErrorString")
3263 " produces an error string from a GL or GLU error code. The string
3264 is in ISO Latin 1 format. For example, "
3265 (code "gluErrorString")
3267 (code "GLU_OUT_OF_MEMORY")
3268 ") returns the string "
3269 (var "out of memory")
3272 The standard GLU error codes are "
3273 (code "GLU_INVALID_ENUM")
3275 (code "GLU_INVALID_VALUE")
3278 (code "GLU_OUT_OF_MEMORY")
3280 Certain other GLU functions can return specialized error codes
3284 " reference page for the list of
3290 " is not a valid GL or GLU error code. ")))
3292 (define-gl-procedure
3294 "gluGetNurbsProperty"
3299 (function "gluGetNurbsProperty"))
3300 (paramdef "GLUnurbs* " (parameter "nurb"))
3301 (paramdef "GLenum " (parameter "property"))
3302 (paramdef "GLfloat* " (parameter "data"))))
3304 (heading "get a NURBS property")
3305 (heading "Parameters")
3306 (table (% (formatter (asis)))
3307 (entry (% (heading (var "nurb")))
3309 Specifies the NURBS object (created with "
3310 (code "gluNewNurbsRenderer")
3312 (entry (% (heading (var "property")))
3314 Specifies the property whose value is to be fetched. Valid values are "
3315 (code "GLU_CULLING")
3317 (code "GLU_SAMPLING_TOLERANCE")
3319 (code "GLU_DISPLAY_MODE")
3321 (code "GLU_AUTO_LOAD_MATRIX")
3323 (code "GLU_PARAMETRIC_TOLERANCE")
3325 (code "GLU_SAMPLING_METHOD")
3331 (code "GLU_NURBS_MODE")
3333 (entry (% (heading (var "data")))
3335 Specifies a pointer to the location into which the value of the
3336 named property is written. ")))
3337 (heading "Description")
3338 (para (code "gluGetNurbsProperty")
3339 " retrieves properties stored in a NURBS object. These
3340 properties affect the way that NURBS curves and surfaces
3341 are rendered. See the "
3342 (code "gluNurbsProperty")
3343 " reference page for information about what the
3344 properties are and what they do. ")))
3346 (define-gl-procedure
3353 (function "gluGetString"))
3354 (paramdef "GLenum " (parameter "name"))))
3357 "return a string describing the GLU version or GLU extensions ")
3358 (heading "Parameters")
3359 (table (% (formatter (asis)))
3360 (entry (% (heading (var "name")))
3362 Specifies a symbolic constant, one of "
3363 (code "GLU_VERSION")
3365 (code "GLU_EXTENSIONS")
3367 (heading "Description")
3368 (para (code "gluGetString")
3369 " returns a pointer to a static string describing the
3370 GLU version or the GLU extensions that are supported. ")
3372 The version number is one of the following
3374 (para (var "major_number.minor_number")
3375 (var "major_number.minor_number.release_number")
3378 The version string is of the following form: ")
3379 (para (var "version number<space>vendor-specific information"))
3381 Vendor-specific information is optional.
3382 Its format and contents depend on the implementation. ")
3384 The standard GLU contains a basic set of features and capabilities.
3385 If a company or group of companies wish to support other features,
3386 these may be included as extensions to the GLU.
3390 (code "GLU_EXTENSIONS")
3392 (code "gluGetString")
3394 returns a space-separated list of names of supported GLU extensions.
3395 (Extension names never contain spaces.) ")
3397 All strings are null-terminated. ")
3400 NULL is returned if "
3403 (code "GLU_VERSION")
3405 (code "GLU_EXTENSIONS")
3409 (define-gl-procedure
3411 "gluGetTessProperty"
3414 (funcdef "void " (function "gluGetTessProperty"))
3415 (paramdef "GLUtesselator* " (parameter "tess"))
3416 (paramdef "GLenum " (parameter "which"))
3417 (paramdef "GLdouble* " (parameter "data"))))
3419 (heading "get a tessellation object property")
3420 (heading "Parameters")
3421 (table (% (formatter (asis)))
3422 (entry (% (heading (var "tess")))
3424 Specifies the tessellation object (created with "
3427 (entry (% (heading (var "which")))
3429 Specifies the property whose value is to be fetched. Valid values are "
3430 (code "GLU_TESS_WINDING_RULE")
3432 (code "GLU_TESS_BOUNDARY_ONLY")
3434 (code "GLU_TESS_TOLERANCE")
3436 (entry (% (heading (var "data")))
3438 Specifies a pointer to the location into which the value of the
3439 named property is written. ")))
3440 (heading "Description")
3441 (para (code "gluGetTessProperty")
3442 " retrieves properties stored in a tessellation object. These
3443 properties affect the way that tessellation objects
3444 are interpreted and rendered. See the "
3445 (code "gluTessProperty")
3446 " reference page for information about the
3447 properties and what they do. ")))
3449 (define-gl-procedure
3450 gluLoadSamplingMatrices
3451 "gluLoadSamplingMatrices"
3456 (function "gluLoadSamplingMatrices"))
3457 (paramdef "GLUnurbs* " (parameter "nurb"))
3458 (paramdef "const GLfloat * " (parameter "model"))
3461 (parameter "perspective"))
3462 (paramdef "const GLint * " (parameter "view"))))
3465 "load NURBS sampling and culling matrices")
3466 (heading "Parameters")
3467 (table (% (formatter (asis)))
3468 (entry (% (heading (var "nurb")))
3470 Specifies the NURBS object (created with "
3471 (code "gluNewNurbsRenderer")
3473 (entry (% (heading (var "model")))
3475 Specifies a modelview matrix (as from a "
3476 (code "glGetFloatv")
3478 (entry (% (heading (var "perspective")))
3480 Specifies a projection matrix (as from a "
3481 (code "glGetFloatv")
3483 (entry (% (heading (var "view")))
3485 Specifies a viewport (as from a "
3486 (code "glGetIntegerv")
3488 (heading "Description")
3489 (para (code "gluLoadSamplingMatrices")
3496 " to recompute the sampling and culling
3497 matrices stored in "
3500 The sampling matrix determines how finely a NURBS curve or surface
3501 must be tessellated to satisfy the sampling tolerance (as determined by the "
3502 (code "GLU_SAMPLING_TOLERANCE")
3504 The culling matrix is used in deciding if a NURBS curve or surface
3505 should be culled before
3506 rendering (when the "
3507 (code "GLU_CULLING")
3508 " property is turned on). ")
3509 (para (code "gluLoadSamplingMatrices")
3510 " is necessary only if the "
3511 (code "GLU_AUTO_LOAD_MATRIX")
3512 " property is turned
3514 (code "gluNurbsProperty")
3516 Although it can be convenient to leave the "
3517 (code "GLU_AUTO_LOAD_MATRIX")
3519 property turned on, there can be a performance penalty for doing so.
3520 (A round trip to the GL server is needed to fetch the current values
3521 of the modelview matrix, projection matrix, and viewport.) ")))
3523 (define-gl-procedure
3528 (funcdef "void " (function "gluLookAt"))
3529 (paramdef "GLdouble " (parameter "eyeX"))
3530 (paramdef "GLdouble " (parameter "eyeY"))
3531 (paramdef "GLdouble " (parameter "eyeZ"))
3532 (paramdef "GLdouble " (parameter "centerX"))
3533 (paramdef "GLdouble " (parameter "centerY"))
3534 (paramdef "GLdouble " (parameter "centerZ"))
3535 (paramdef "GLdouble " (parameter "upX"))
3536 (paramdef "GLdouble " (parameter "upY"))
3537 (paramdef "GLdouble " (parameter "upZ"))))
3539 (heading "define a viewing transformation")
3540 (heading "Parameters")
3541 (table (% (formatter (asis)))
3542 (entry (% (heading (var "eyeX")))
3543 (itemx (var "eyeY"))
3544 (itemx (var "eyeZ"))
3546 Specifies the position of the eye point. "))
3547 (entry (% (heading (var "centerX")))
3548 (itemx (var "centerY"))
3549 (itemx (var "centerZ"))
3551 Specifies the position of the reference point. "))
3552 (entry (% (heading (var "upX")))
3556 Specifies the direction of the "
3559 (heading "Description")
3560 (para (code "gluLookAt")
3561 " creates a viewing matrix derived from an eye point, a reference
3562 point indicating the center of the scene, and an "
3567 maps the reference point to the negative "
3570 eye point to the origin.
3571 When a typical projection matrix is used,
3572 the center of the scene therefore maps to the center of the viewport.
3573 Similarly, the direction described by the "
3576 vector projected onto the viewing plane is mapped to the positive "
3578 " axis so that it points upward in the viewport.
3581 " vector must not be parallel to the line of sight from the
3582 eye point to the reference point. ")
3585 (para (math (var "F")
3620 Then normalize as follows: "
3630 (para (math (var "UP")
3653 (math (var "u") "=" (var "s") "×" (var "f"))
3657 M is then constructed as follows: "
3753 " is equivalent to ")
3757 glTranslated(-eyex, -eyey, -eyez); ")))
3759 (define-gl-procedure
3761 "gluNewNurbsRenderer"
3766 (function "gluNewNurbsRenderer"))))
3768 (heading "create a NURBS object")
3769 (heading "Description")
3770 (para (code "gluNewNurbsRenderer")
3771 " creates and returns a pointer to
3773 This object must be referred to when calling
3774 NURBS rendering and control functions. A return value of
3775 0 means that there is not enough memory to allocate the object. ")))
3777 (define-gl-procedure
3784 (function "gluNewQuadric"))))
3786 (heading "create a quadrics object")
3787 (heading "Description")
3788 (para (code "gluNewQuadric")
3789 " creates and returns a pointer to
3790 a new quadrics object. This object must be referred to when
3791 calling quadrics rendering and control functions. A return value of
3792 0 means that there is not enough memory to allocate the object. ")))
3794 (define-gl-procedure
3801 (function "gluNewTess"))))
3803 (heading "create a tessellation object")
3804 (heading "Description")
3805 (para (code "gluNewTess")
3806 " creates and returns a pointer to a new tessellation object.
3807 This object must be referred to when calling
3808 tessellation functions. A return value of
3809 0 means that there is not enough memory to allocate the object. ")))
3811 (define-gl-procedure
3816 (funcdef "void " (function "gluNextContour"))
3817 (paramdef "GLUtesselator* " (parameter "tess"))
3818 (paramdef "GLenum " (parameter "type"))))
3820 (heading "mark the beginning of another contour")
3821 (heading "Parameters")
3822 (table (% (formatter (asis)))
3823 (entry (% (heading (var "tess")))
3825 Specifies the tessellation object (created with "
3828 (entry (% (heading (var "type")))
3830 Specifies the type of the contour being defined. Valid values are "
3831 (code "GLU_EXTERIOR")
3833 (code "GLU_INTERIOR")
3835 (code "GLU_UNKNOWN")
3841 (heading "Description")
3842 (para (code "gluNextContour")
3843 " is used in describing polygons with multiple contours. After the first
3844 contour has been described through a series of "
3845 (code "gluTessVertex")
3848 (code "gluNextContour")
3849 " call indicates that the previous contour is complete and that the
3850 next contour is about to begin.
3852 (code "gluTessVertex")
3853 " calls is then used to describe the new
3854 contour. This process can be repeated until all contours have been described. ")
3856 " defines what type of contour follows.
3857 The legal contour types are as follows: ")
3858 (table (% (formatter (asis)))
3859 (entry (% (heading (code "GLU_EXTERIOR")))
3861 An exterior contour defines an exterior boundary of the polygon. "))
3862 (entry (% (heading (code "GLU_INTERIOR")))
3864 An interior contour defines an interior boundary of the polygon (such as
3866 (entry (% (heading (code "GLU_UNKNOWN")))
3868 An unknown contour is analyzed by the library to determine if it is interior
3870 (entry (% (heading (code "GLU_CCW") ", ")))
3871 (entry (% (heading (code "GLU_CW")))
3877 " contour defined is considered to
3878 be exterior. All other contours are considered to be exterior if they
3879 are oriented in the same direction (clockwise or counterclockwise) as
3880 the first contour, and interior if they are not. ")))
3882 If one contour is of type "
3887 contours must be of the same type (if they are not, then all "
3892 " contours will be changed to "
3893 (code "GLU_UNKNOWN")
3896 Note that there is no real difference between the "
3902 Before the first contour is described, "
3903 (code "gluNextContour")
3905 define the type of the first contour.
3907 (code "gluNextContour")
3908 " is not called before the first contour, then the first contour is
3910 (code "GLU_EXTERIOR")
3913 This command is obsolete and is provided for backward compatibility
3915 (code "gluNextContour")
3917 (code "gluTessEndContour")
3920 (code "gluTessBeginContour")
3923 (define-gl-procedure
3924 gluNurbsCallbackDataEXT
3925 "gluNurbsCallbackDataEXT"
3930 (function "gluNurbsCallbackDataEXT"))
3931 (paramdef "GLUnurbs* " (parameter "nurb"))
3932 (paramdef "GLvoid* " (parameter "userData"))))
3934 (heading "set a user data pointer")
3935 (heading "Parameters")
3936 (table (% (formatter (asis)))
3937 (entry (% (heading (var "nurb")))
3939 Specifies the NURBS object (created with "
3940 (code "gluNewNurbsRenderer")
3942 (entry (% (heading (var "userData")))
3944 Specifies a pointer to the user's data. ")))
3945 (heading "Description")
3946 (para (code "gluNurbsCallbackDataEXT")
3947 " is used to pass a pointer to the application's data to NURBS
3948 tessellator. A copy of this pointer will be passed by the tessellator
3949 in the NURBS callback functions (set by "
3950 (code "gluNurbsCallback")
3953 (define-gl-procedure
3954 gluNurbsCallbackData
3955 "gluNurbsCallbackData"
3960 (function "gluNurbsCallbackData"))
3961 (paramdef "GLUnurbs* " (parameter "nurb"))
3962 (paramdef "GLvoid* " (parameter "userData"))))
3964 (heading "set a user data pointer")
3965 (heading "Parameters")
3966 (table (% (formatter (asis)))
3967 (entry (% (heading (var "nurb")))
3969 Specifies the NURBS object (created with "
3970 (code "gluNewNurbsRenderer")
3972 (entry (% (heading (var "userData")))
3974 Specifies a pointer to the user's data. ")))
3975 (heading "Description")
3976 (para (code "gluNurbsCallbackData")
3977 " is used to pass a pointer to the application's data to NURBS
3978 tessellator. A copy of this pointer will be passed by the tessellator
3979 in the NURBS callback functions (set by "
3980 (code "gluNurbsCallback")
3983 (define-gl-procedure
3988 (funcdef "void " (function "gluNurbsCallback"))
3989 (paramdef "GLUnurbs* " (parameter "nurb"))
3990 (paramdef "GLenum " (parameter "which"))
3993 (parameter "CallBackFunc"))))
3995 (heading "define a callback for a NURBS object")
3996 (heading "Parameters")
3997 (table (% (formatter (asis)))
3998 (entry (% (heading (var "nurb")))
4000 Specifies the NURBS object (created with "
4001 (code "gluNewNurbsRenderer")
4003 (entry (% (heading (var "which")))
4005 Specifies the callback being defined.
4007 (code "GLU_NURBS_BEGIN")
4009 (code "GLU_NURBS_VERTEX")
4011 (code "GLU_NURBS_NORMAL")
4013 (code "GLU_NURBS_COLOR")
4015 (code "GLU_NURBS_TEXTURE_COORD")
4017 (code "GLU_NURBS_END")
4019 (code "GLU_NURBS_BEGIN_DATA")
4021 (code "GLU_NURBS_VERTEX_DATA")
4023 (code "GLU_NURBS_NORMAL_DATA")
4025 (code "GLU_NURBS_COLOR_DATA")
4027 (code "GLU_NURBS_TEXTURE_COORD_DATA")
4029 (code "GLU_NURBS_END_DATA")
4031 (code "GLU_NURBS_ERROR")
4033 (entry (% (heading (var "CallBackFunc")))
4035 Specifies the function that the callback calls. ")))
4036 (heading "Description")
4037 (para (code "gluNurbsCallback")
4038 " is used to define a callback to be used by a NURBS
4040 If the specified callback is already defined, then it is replaced. If "
4041 (var "CallBackFunc")
4042 " is NULL, then this callback will not get
4043 invoked and the related data, if any, will be lost. ")
4045 Except the error callback, these callbacks are used by NURBS tessellator (when "
4046 (code "GLU_NURBS_MODE")
4048 (code "GLU_NURBS_TESSELLATOR")
4049 ") to return back the OpenGL
4050 polygon primitives resulting from the tessellation. Note that there are two
4051 versions of each callback: one with a user data pointer and one without. If both versions for a particular callback are specified then the callback with
4052 the user data pointer will be used. Note that ``userData'' is a copy of the pointer that was specified at the last call to "
4053 (code "gluNurbsCallbackData")
4056 The error callback function is effective no matter which value that "
4057 (code "GLU_NURBS_MODE")
4059 All other callback functions are effective only when "
4060 (code "GLU_NURBS_MODE")
4063 (code "GLU_NURBS_TESSELLATOR")
4066 The legal callbacks are as follows: ")
4067 (table (% (formatter (asis)))
4068 (entry (% (heading (code "GLU_NURBS_BEGIN")))
4071 The begin callback indicates the start of a primitive. The function
4072 takes a single argument of type GLenum, which can be one of "
4075 (code "GLU_LINE_STRIP")
4077 (code "GLU_TRIANGLE_FAN")
4079 (code "GLU_TRIANGLE_STRIP")
4081 (code "GLU_TRIANGLES")
4083 (code "GLU_QUAD_STRIP")
4085 default begin callback function is NULL. The function prototype
4086 for this callback looks like: "))
4087 (entry (% (heading (code "GLU_NURBS_BEGIN_DATA")))
4091 (code "GLU_NURBS_BEGIN")
4092 " callback except that it takes an
4093 additional pointer argument. This pointer is a copy of the pointer that
4094 was specified at the last call to "
4095 (code "gluNurbsCallbackData")
4097 default callback function is NULL. The function prototype for this
4098 callback function looks like: "))
4099 (entry (% (heading (code "GLU_NURBS_VERTEX")))
4102 The vertex callback indicates a vertex of the primitive. The
4103 coordinates of the vertex are stored in the parameter ``vertex''. All
4104 the generated vertices have dimension 3; that is, homogeneous
4105 coordinates have been transformed into affine coordinates. The default
4106 vertex callback function is NULL. The function prototype for this
4107 callback function looks like: "))
4108 (entry (% (heading (code "GLU_NURBS_VERTEX_DATA")))
4111 This is the same as the "
4112 (code "GLU_NURBS_VERTEX")
4113 " callback, except that
4114 it takes an additional pointer argument. This pointer is a copy of the
4115 pointer that was specified at the last call to "
4116 (code "gluNurbsCallbackData")
4117 ". The default callback function is NULL. The
4118 function prototype for this callback function looks like: "))
4119 (entry (% (heading (code "GLU_NURBS_NORMAL")))
4122 The normal callback is invoked as the vertex normal is generated.
4123 The components of the normal are stored in the parameter ``normal.''
4124 In the case of a NURBS curve, the callback function is effective only when
4125 the user provides a normal map ("
4126 (code "GLU_MAP1_NORMAL")
4128 In the case of a NURBS surface, if a normal map ("
4129 (code "GLU_MAP2_NORMAL")
4131 is provided, then the generated normal is computed from the normal map.
4132 If a normal map is not provided, then a surface normal is computed in
4133 a manner similar to that described for evaluators when "
4134 (code "GLU_AUTO_NORMAL")
4137 The default normal callback function is NULL. The function
4138 prototype for this callback function looks like: "))
4139 (entry (% (heading (code "GLU_NURBS_NORMAL_DATA")))
4143 (code "GLU_NURBS_NORMAL")
4144 " callback except that it
4145 takes an additional pointer argument. This pointer is a copy of the pointer
4146 that was specified at the last call to "
4147 (code "gluNurbsCallbackData")
4148 ". The default callback function is NULL. The function prototype for this callback function looks like: "))
4149 (entry (% (heading (code "GLU_NURBS_COLOR")))
4152 The color callback is invoked as the color of a vertex is generated.
4153 The components of the color are stored in the parameter ``color.''
4154 This callback is effective only when the user provides a color map
4156 (code "GLU_MAP1_COLOR_4")
4158 (code "GLU_MAP2_COLOR_4")
4159 "). ``color'' contains four
4160 components: R, G, B, A. The default color callback function is NULL.
4161 The prototype for this callback function looks like: "))
4162 (entry (% (heading (code "GLU_NURBS_COLOR_DATA")))
4166 (code "GLU_NURBS_COLOR")
4167 " callback except that it
4168 takes an additional pointer argument. This pointer is a copy of the pointer
4169 that was specified at the last call to "
4170 (code "gluNurbsCallbackData")
4171 ". The default callback function is NULL. The function prototype for this callback function looks like: "))
4172 (entry (% (heading (code "GLU_NURBS_TEXTURE_COORD")))
4175 The texture callback is invoked as the texture coordinates
4176 of a vertex are generated. These coordinates are stored in the parameter
4177 ``texCoord.'' The number of texture coordinates can be 1, 2, 3, or 4 depending
4178 on which type of texture map is specified
4180 (code "GLU_MAP1_TEXTURE_COORD_1")
4182 (code "GLU_MAP1_TEXTURE_COORD_2")
4184 (code "GLU_MAP1_TEXTURE_COORD_3")
4186 (code "GLU_MAP1_TEXTURE_COORD_4")
4188 (code "GLU_MAP2_TEXTURE_COORD_1")
4190 (code "GLU_MAP2_TEXTURE_COORD_2")
4192 (code "GLU_MAP2_TEXTURE_COORD_3")
4194 (code "GLU_MAP2_TEXTURE_COORD_4")
4196 If no texture map is specified, this callback function will not be called.
4197 The default texture callback function is NULL. The function prototype
4198 for this callback function looks like: "))
4199 (entry (% (heading (code "GLU_NURBS_TEXTURE_COORD_DATA")))
4202 This is the same as the "
4203 (code "GLU_NURBS_TEXTURE_COORD")
4204 " callback, except that it
4205 takes an additional pointer argument. This pointer is a copy of the pointer
4206 that was specified at the last call to "
4207 (code "gluNurbsCallbackData")
4208 ". The default callback function is NULL. The function prototype for this callback function looks like: "))
4209 (entry (% (heading (code "GLU_NURBS_END")))
4212 The end callback is invoked at the end of a primitive. The default end callback function is NULL. The function prototype for this callback function looks like: "))
4213 (entry (% (heading (code "GLU_NURBS_END_DATA")))
4216 This is the same as the "
4217 (code "GLU_NURBS_END")
4218 " callback, except that it
4219 takes an additional pointer argument. This pointer is a copy of the pointer
4220 that was specified at the last call to "
4221 (code "gluNurbsCallbackData")
4222 ". The default callback function is NULL. The function prototype for this callback function looks like: "))
4223 (entry (% (heading (code "GLU_NURBS_ERROR")))
4226 The error function is called when an error is encountered.
4228 is of type GLenum, and it indicates the specific error that occurred.
4229 There are 37 errors unique to NURBS, named "
4230 (code "GLU_NURBS_ERROR1")
4232 (code "GLU_NURBS_ERROR37")
4234 Character strings describing these errors can be retrieved with "
4235 (code "gluErrorString")
4238 void begin( GLenum type ); ")
4241 void beginData(GLenum type, void *userData); ")
4243 void vertex( GLfloat *vertex ); ")
4246 void vertexData( GLfloat *vertex, void *userData ); ")
4248 void normal( GLfloat *normal ); ")
4251 void normalData( GLfloat *normal, void *userData ); ")
4253 void color( GLfloat *color ); ")
4256 void colorData( GLfloat *color, void *userData ); ")
4258 void texCoord( GLfloat *texCoord ); ")
4261 void texCoordData( GLfloat *texCoord, void *userData ); ")
4263 void end( void ); ")
4265 void endData( void *userData ); ")))
4267 (define-gl-procedure
4272 (funcdef "void " (function "gluNurbsCurve"))
4273 (paramdef "GLUnurbs* " (parameter "nurb"))
4274 (paramdef "GLint " (parameter "knotCount"))
4275 (paramdef "GLfloat * " (parameter "knots"))
4276 (paramdef "GLint " (parameter "stride"))
4277 (paramdef "GLfloat * " (parameter "control"))
4278 (paramdef "GLint " (parameter "order"))
4279 (paramdef "GLenum " (parameter "type"))))
4281 (heading "define the shape of a NURBS curve")
4282 (heading "Parameters")
4283 (table (% (formatter (asis)))
4284 (entry (% (heading (var "nurb")))
4286 Specifies the NURBS object (created with "
4287 (code "gluNewNurbsRenderer")
4289 (entry (% (heading (var "knotCount")))
4291 Specifies the number of knots in "
4295 " equals the number of control points plus the order. "))
4296 (entry (% (heading (var "knots")))
4298 Specifies an array of "
4300 " nondecreasing knot values. "))
4301 (entry (% (heading (var "stride")))
4303 Specifies the offset (as a number of single-precision floating-point values)
4304 between successive curve control points. "))
4305 (entry (% (heading (var "control")))
4307 Specifies a pointer to an array of control points. The coordinates must
4310 ", specified below. "))
4311 (entry (% (heading (var "order")))
4313 Specifies the order of the NURBS curve. "
4315 " equals degree + 1, hence
4316 a cubic curve has an order of 4. "))
4317 (entry (% (heading (var "type")))
4319 Specifies the type of the curve. If this curve is defined within a "
4320 (code "gluBeginCurve")
4322 (code "gluEndCurve")
4324 the type can be any of the valid
4325 one-dimensional evaluator types (such as "
4326 (code "GLU_MAP1_VERTEX_3")
4328 (code "GLU_MAP1_COLOR_4")
4330 (code "gluBeginTrim")
4334 the only valid types are "
4335 (code "GLU_MAP1_TRIM_2")
4337 (code "GLU_MAP1_TRIM_3")
4339 (heading "Description")
4342 (code "gluNurbsCurve")
4343 " to describe a NURBS curve. ")
4346 (code "gluNurbsCurve")
4347 " appears between a "
4348 (code "gluBeginCurve")
4350 (code "gluEndCurve")
4352 used to describe a curve to be rendered.
4353 Positional, texture, and color coordinates are associated
4354 by presenting each as a separate "
4355 (code "gluNurbsCurve")
4357 (code "gluBeginCurve")
4359 (code "gluEndCurve")
4360 " pair. No more than
4362 (code "gluNurbsCurve")
4363 " for each of color, position, and texture
4364 data can be made within a single "
4365 (code "gluBeginCurve")
4367 (code "gluEndCurve")
4369 pair. Exactly one call must be made to describe the position of the
4373 (code "GLU_MAP1_VERTEX_3")
4375 (code "GLU_MAP1_VERTEX_4")
4379 (code "gluNurbsCurve")
4380 " appears between a "
4381 (code "gluBeginTrim")
4385 used to describe a trimming curve on a NURBS surface. If "
4388 (code "GLU_MAP1_TRIM_2")
4389 ", then it describes a curve in two-dimensional ("
4394 parameter space. If it is "
4395 (code "GLU_MAP1_TRIM_3")
4396 ", then it describes a
4397 curve in two-dimensional homogeneous ("
4406 (code "gluBeginTrim")
4407 " reference page for more discussion about trimming
4410 (define-gl-procedure
4415 (funcdef "void " (function "gluNurbsProperty"))
4416 (paramdef "GLUnurbs* " (parameter "nurb"))
4417 (paramdef "GLenum " (parameter "property"))
4418 (paramdef "GLfloat " (parameter "value"))))
4420 (heading "set a NURBS property")
4421 (heading "Parameters")
4422 (table (% (formatter (asis)))
4423 (entry (% (heading (var "nurb")))
4425 Specifies the NURBS object (created with "
4426 (code "gluNewNurbsRenderer")
4428 (entry (% (heading (var "property")))
4430 Specifies the property to be set. Valid values are "
4431 (code "GLU_SAMPLING_TOLERANCE")
4433 (code "GLU_DISPLAY_MODE")
4435 (code "GLU_CULLING")
4437 (code "GLU_AUTO_LOAD_MATRIX")
4439 (code "GLU_PARAMETRIC_TOLERANCE")
4441 (code "GLU_SAMPLING_METHOD")
4447 (code "GLU_NURBS_MODE")
4449 (entry (% (heading (var "value")))
4451 Specifies the value of the indicated property.
4452 It may be a numeric value or one of "
4453 (code "GLU_OUTLINE_POLYGON")
4457 (code "GLU_OUTLINE_PATCH")
4463 (code "GLU_PATH_LENGTH")
4465 (code "GLU_PARAMETRIC_ERROR")
4467 (code "GLU_DOMAIN_DISTANCE")
4469 (code "GLU_NURBS_RENDERER")
4471 (code "GLU_NURBS_TESSELLATOR")
4473 (heading "Description")
4474 (para (code "gluNurbsProperty")
4475 " is used to control properties stored in a NURBS object. These
4476 properties affect the way that a NURBS curve is rendered. The accepted
4479 " are as follows: ")
4480 (table (% (formatter (asis)))
4481 (entry (% (heading (code "GLU_NURBS_MODE")))
4483 " should be set to be either "
4484 (code "GLU_NURBS_RENDERER")
4486 (code "GLU_NURBS_TESSELLATOR")
4488 (code "GLU_NURBS_RENDERER")
4490 are tessellated into OpenGL primitives and sent to the pipeline for
4491 rendering. When set to "
4492 (code "GLU_NURBS_TESSELLATOR")
4493 ", NURBS objects are
4494 tessellated into OpenGL primitives but the vertices, normals, colors, and/or textures are
4495 retrieved back through a callback interface (see "
4496 (code "gluNurbsCallback")
4497 "). This allows the user to cache the
4498 tessellated results for further processing.
4499 The initial value is "
4500 (code "GLU_NURBS_RENDERER")
4502 (entry (% (heading (code "GLU_SAMPLING_METHOD")))
4504 Specifies how a NURBS surface should be
4508 (code "GLU_PATH_LENGTH")
4510 (code "GLU_PARAMETRIC_ERROR")
4512 (code "GLU_DOMAIN_DISTANCE")
4514 (code "GLU_OBJECT_PATH_LENGTH")
4516 (code "GLU_OBJECT_PARAMETRIC_ERROR")
4519 (code "GLU_PATH_LENGTH")
4520 ", the surface is rendered so that
4521 the maximum length, in
4522 pixels, of the edges of the tessellation polygons is no greater than
4523 what is specified by "
4524 (code "GLU_SAMPLING_TOLERANCE")
4526 (para (code "GLU_PARAMETRIC_ERROR")
4527 " specifies that the surface is rendered in such a
4528 way that the value specified by "
4529 (code "GLU_PARAMETRIC_TOLERANCE")
4531 maximum distance, in pixels, between the tessellation polygons and the
4532 surfaces they approximate. ")
4533 (para (code "GLU_DOMAIN_DISTANCE")
4534 " allows users to specify, in parametric coordinates,
4535 how many sample points per unit length are taken in "
4541 (para (code "GLU_OBJECT_PATH_LENGTH")
4543 (code "GLU_PATH_LENGTH")
4545 except that it is view independent; that is, the surface is rendered so that the maximum length, in object space, of edges of the tessellation polygons is no greater than what is specified by "
4546 (code "GLU_SAMPLING_TOLERANCE")
4548 (para (code "GLU_OBJECT_PARAMETRIC_ERROR")
4550 (code "GLU_PARAMETRIC_ERROR")
4551 " except that it is view independent; that is, the surface is rendered in such a way that the value specified by "
4552 (code "GLU_PARAMETRIC_TOLERANCE")
4553 " describes the maximum distance, in object space, between the tessellation polygons and the surfaces they approximate. ")
4555 The initial value of "
4556 (code "GLU_SAMPLING_METHOD")
4558 (code "GLU_PATH_LENGTH")
4560 (entry (% (heading (code "GLU_SAMPLING_TOLERANCE")))
4562 Specifies the maximum length, in pixels or in object space length unit,
4563 to use when the sampling method is set to "
4564 (code "GLU_PATH_LENGTH")
4566 (code "GLU_OBJECT_PATH_LENGTH")
4568 The NURBS code is conservative when rendering a curve
4569 or surface, so the actual length can be somewhat shorter. The initial
4570 value is 50.0 pixels. "))
4571 (entry (% (heading (code "GLU_PARAMETRIC_TOLERANCE")))
4573 Specifies the maximum distance, in pixels or in object space length unit,
4574 to use when the sampling method is "
4575 (code "GLU_PARAMETRIC_ERROR")
4577 (code "GLU_OBJECT_PARAMETRIC_ERROR")
4579 The initial value is 0.5. "))
4580 (entry (% (heading (code "GLU_U_STEP")))
4582 Specifies the number of sample points per unit length taken
4585 " axis in parametric coordinates. It is needed when "
4586 (code "GLU_SAMPLING_METHOD")
4588 (code "GLU_DOMAIN_DISTANCE")
4590 The initial value is 100. "))
4591 (entry (% (heading (code "GLU_V_STEP")))
4593 Specifies the number of sample points per unit length taken
4596 " axis in parametric coordinate. It is needed when "
4597 (code "GLU_SAMPLING_METHOD")
4599 (code "GLU_DOMAIN_DISTANCE")
4602 (entry (% (heading (code "GLU_DISPLAY_MODE")))
4605 (code "GLU_OUTLINE_POLYGON")
4609 (code "GLU_OUTLINE_PATCH")
4612 (code "GLU_NURBS_MODE")
4614 (code "GLU_NURBS_RENDERER")
4617 " defines how a NURBS surface should be rendered.
4622 ", the surface is rendered as a
4623 set of polygons. When "
4626 (code "GLU_OUTLINE_POLYGON")
4627 ", the NURBS library draws only the outlines
4628 of the polygons created by tessellation. When "
4631 (code "GLU_OUTLINE_PATCH")
4632 " just the outlines of patches and trim
4633 curves defined by the user are drawn. ")
4636 (code "GLU_NURBS_MODE")
4638 (code "GLU_NURBS_TESSELLATOR")
4641 " defines how a NURBS surface should be tessellated.
4643 (code "GLU_DISPLAY_MODE")
4647 (code "GLU_OUTLINE_POLYGON")
4649 the NURBS surface is tessellated into OpenGL triangle primitives that can be
4650 retrieved back through callback functions. If "
4651 (code "GLU_DISPLAY_MODE")
4653 (code "GLU_OUTLINE_PATCH")
4654 ", only the outlines of the patches and trim curves are generated as a sequence of line strips that can be retrieved back through callback functions. ")
4656 The initial value is "
4659 (entry (% (heading (code "GLU_CULLING")))
4661 " is a boolean value that, when set to "
4664 a NURBS curve should be discarded prior to tessellation if its control points
4665 lie outside the current viewport. The initial value is "
4668 (entry (% (heading (code "GLU_AUTO_LOAD_MATRIX")))
4670 " is a boolean value. When set to "
4673 downloads the projection matrix, the modelview matrix, and the
4674 viewport from the GL server to compute sampling and
4676 matrices for each NURBS curve that is rendered. Sampling and culling matrices
4677 are required to determine the tessellation of a NURBS surface into line segments
4678 or polygons and to cull a NURBS surface if it lies outside the viewport. ")
4680 If this mode is set to "
4682 ", then the program needs
4683 to provide a projection matrix, a modelview matrix, and a viewport
4684 for the NURBS renderer to use to construct sampling and culling matrices.
4685 This can be done with the "
4686 (code "gluLoadSamplingMatrices")
4688 This mode is initially set to "
4696 the sampling and culling matrices until "
4697 (code "gluLoadSamplingMatrices")
4701 (define-gl-procedure
4706 (funcdef "void " (function "gluNurbsSurface"))
4707 (paramdef "GLUnurbs* " (parameter "nurb"))
4708 (paramdef "GLint " (parameter "sKnotCount"))
4709 (paramdef "GLfloat* " (parameter "sKnots"))
4710 (paramdef "GLint " (parameter "tKnotCount"))
4711 (paramdef "GLfloat* " (parameter "tKnots"))
4712 (paramdef "GLint " (parameter "sStride"))
4713 (paramdef "GLint " (parameter "tStride"))
4714 (paramdef "GLfloat* " (parameter "control"))
4715 (paramdef "GLint " (parameter "sOrder"))
4716 (paramdef "GLint " (parameter "tOrder"))
4717 (paramdef "GLenum " (parameter "type"))))
4719 (heading "define the shape of a NURBS surface")
4720 (heading "Parameters")
4721 (table (% (formatter (asis)))
4722 (entry (% (heading (var "nurb")))
4724 Specifies the NURBS object (created with "
4725 (code "gluNewNurbsRenderer")
4727 (entry (% (heading (var "sKnotCount")))
4729 Specifies the number of knots in the parametric "
4732 (entry (% (heading (var "sKnots")))
4734 Specifies an array of "
4736 " nondecreasing knot values in the parametric "
4739 (entry (% (heading (var "tKnotCount")))
4741 Specifies the number of knots in the parametric "
4744 (entry (% (heading (var "tKnots")))
4746 Specifies an array of "
4748 " nondecreasing knot values in the parametric "
4751 (entry (% (heading (var "sStride")))
4753 Specifies the offset (as a number of single-precision floating-point values)
4754 between successive control points in the parametric "
4760 (entry (% (heading (var "tStride")))
4762 Specifies the offset (in single-precision floating-point values)
4763 between successive control points in the parametric "
4769 (entry (% (heading (var "control")))
4771 Specifies an array containing control points for the NURBS surface.
4772 The offsets between successive control points in the parametric "
4777 " directions are given by "
4782 (entry (% (heading (var "sOrder")))
4784 Specifies the order of the NURBS surface in the parametric "
4786 " direction. The order is one more than the degree, hence
4787 a surface that is cubic in "
4792 (entry (% (heading (var "tOrder")))
4794 Specifies the order of the NURBS surface in the parametric "
4796 " direction. The order is one more than the degree, hence
4797 a surface that is cubic in "
4802 (entry (% (heading (var "type")))
4804 Specifies type of the surface. "
4806 " can be any of the valid
4807 two-dimensional evaluator types (such as "
4808 (code "GLU_MAP2_VERTEX_3")
4810 (code "GLU_MAP2_COLOR_4")
4812 (heading "Description")
4815 (code "gluNurbsSurface")
4816 " within a NURBS (Non-Uniform Rational B-Spline) surface
4817 definition to describe the shape of a NURBS surface (before
4818 any trimming). To mark the beginning of
4819 a NURBS surface definition, use the "
4820 (code "gluBeginSurface")
4822 To mark the end of a NURBS surface definition, use the "
4823 (code "gluEndSurface")
4825 (code "gluNurbsSurface")
4827 surface definition only. ")
4829 Positional, texture, and color coordinates are associated
4830 with a surface by presenting each as a separate "
4831 (code "gluNurbsSurface")
4833 (code "gluBeginSurface")
4835 (code "gluEndSurface")
4836 " pair. No more than
4838 (code "gluNurbsSurface")
4839 " for each of color, position, and texture
4840 data can be made within a single "
4841 (code "gluBeginSurface")
4843 (code "gluEndSurface")
4845 pair. Exactly one call must be made to describe the position of the
4849 (code "GLU_MAP2_VERTEX_3")
4851 (code "GLU_MAP2_VERTEX_4")
4854 A NURBS surface can be trimmed by using the commands "
4855 (code "gluNurbsCurve")
4857 (code "gluPwlCurve")
4858 " between calls to "
4859 (code "gluBeginTrim")
4865 (code "gluNurbsSurface")
4875 " direction with orders "
4885 (math (var "times"))
4891 ") control points. ")))
4893 (define-gl-procedure
4898 (funcdef "void " (function "gluOrtho2D"))
4899 (paramdef "GLdouble " (parameter "left"))
4900 (paramdef "GLdouble " (parameter "right"))
4901 (paramdef "GLdouble " (parameter "bottom"))
4902 (paramdef "GLdouble " (parameter "top"))))
4905 "define a 2D orthographic projection matrix")
4906 (heading "Parameters")
4907 (table (% (formatter (asis)))
4908 (entry (% (heading (var "left")))
4909 (itemx (var "right"))
4911 Specify the coordinates for the left and right vertical clipping planes. "))
4912 (entry (% (heading (var "bottom")))
4915 Specify the coordinates for the bottom and top horizontal clipping planes. ")))
4916 (heading "Description")
4917 (para (code "gluOrtho2D")
4918 " sets up a two-dimensional orthographic viewing region.
4919 This is equivalent to calling "
4922 (math (var "near") "=" "-1")
4925 (math (var "far") "=" "1")
4928 (define-gl-procedure
4933 (funcdef "void " (function "gluPartialDisk"))
4934 (paramdef "GLUquadric* " (parameter "quad"))
4935 (paramdef "GLdouble " (parameter "inner"))
4936 (paramdef "GLdouble " (parameter "outer"))
4937 (paramdef "GLint " (parameter "slices"))
4938 (paramdef "GLint " (parameter "loops"))
4939 (paramdef "GLdouble " (parameter "start"))
4940 (paramdef "GLdouble " (parameter "sweep"))))
4942 (heading "draw an arc of a disk")
4943 (heading "Parameters")
4944 (table (% (formatter (asis)))
4945 (entry (% (heading (var "quad")))
4947 Specifies a quadrics object (created with "
4948 (code "gluNewQuadric")
4950 (entry (% (heading (var "inner")))
4952 Specifies the inner radius of the partial disk (can be 0). "))
4953 (entry (% (heading (var "outer")))
4955 Specifies the outer radius of the partial disk. "))
4956 (entry (% (heading (var "slices")))
4958 Specifies the number of subdivisions around the "
4961 (entry (% (heading (var "loops")))
4963 Specifies the number of concentric rings about the origin into which
4964 the partial disk is subdivided. "))
4965 (entry (% (heading (var "start")))
4967 Specifies the starting angle, in degrees, of the disk portion. "))
4968 (entry (% (heading (var "sweep")))
4970 Specifies the sweep angle, in degrees, of the disk portion. ")))
4971 (heading "Description")
4972 (para (code "gluPartialDisk")
4973 " renders a partial disk on the "
4974 (math (var "z") "=" "0")
4976 plane. A partial disk is
4977 similar to a full disk, except that only the subset of the disk from "
4983 " is included (where 0 degrees is along the
4985 90 degrees along the +"
4987 " axis, 180 degrees along the \\-"
4990 270 degrees along the \\-"
4994 The partial disk has a radius of "
4996 " and contains a concentric circular hole with a radius
5001 " is 0, then no hole is generated. The partial disk is
5002 subdivided around the "
5004 " axis into slices (like pizza slices) and also
5012 ", respectively). ")
5014 With respect to orientation, the +"
5016 " side of the partial disk is considered to
5018 (code "gluQuadricOrientation")
5020 This means that if the
5021 orientation is set to "
5022 (code "GLU_OUTSIDE")
5023 ", then any normals generated
5026 " axis. Otherwise, they point along the \\-"
5030 If texturing is turned on (with "
5031 (code "gluQuadricTexture")
5033 coordinates are generated
5034 linearly such that where "
5035 (math (var "r") "=" (var "outer"))
5040 (1.0, 0.5), at (0, "
5042 ", 0) it is (0.5, 1.0), at (\\-"
5045 it is (0.0, 0.5), and
5048 ", 0) it is (0.5, 0.0). ")))
5050 (define-gl-procedure
5055 (funcdef "void " (function "gluPerspective"))
5056 (paramdef "GLdouble " (parameter "fovy"))
5057 (paramdef "GLdouble " (parameter "aspect"))
5058 (paramdef "GLdouble " (parameter "zNear"))
5059 (paramdef "GLdouble " (parameter "zFar"))))
5062 "set up a perspective projection matrix")
5063 (heading "Parameters")
5064 (table (% (formatter (asis)))
5065 (entry (% (heading (var "fovy")))
5067 Specifies the field of view angle, in degrees, in the "
5070 (entry (% (heading (var "aspect")))
5072 Specifies the aspect ratio that determines
5073 the field of view in the "
5076 The aspect ratio is the ratio of "
5081 (entry (% (heading (var "zNear")))
5083 Specifies the distance from the viewer to the near clipping plane
5084 (always positive). "))
5085 (entry (% (heading (var "zFar")))
5087 Specifies the distance from the viewer to the far clipping plane
5088 (always positive). ")))
5089 (heading "Description")
5090 (para (code "gluPerspective")
5091 " specifies a viewing frustum into the world coordinate system.
5092 In general, the aspect ratio in "
5093 (code "gluPerspective")
5094 " should match the aspect ratio
5095 of the associated viewport. For example, "
5096 (math (var "aspect") "=" "2.0")
5100 angle of view is twice as wide in "
5106 twice as wide as it is tall, it displays the image without distortion. ")
5108 The matrix generated by "
5109 (code "gluPerspective")
5110 " is multipled by the current matrix,
5112 (code "glMultMatrix")
5113 " were called with the generated matrix.
5114 To load the perspective matrix onto the current matrix stack instead,
5115 precede the call to "
5116 (code "gluPerspective")
5118 (code "glLoadIdentity")
5123 " defined as follows: ")
5124 (para (math (var "f")
5135 The generated matrix is ")
5199 (define-gl-procedure
5204 (funcdef "void " (function "gluPickMatrix"))
5205 (paramdef "GLdouble " (parameter "x"))
5206 (paramdef "GLdouble " (parameter "y"))
5207 (paramdef "GLdouble " (parameter "delX"))
5208 (paramdef "GLdouble " (parameter "delY"))
5209 (paramdef "GLint * " (parameter "viewport"))))
5211 (heading "define a picking region")
5212 (heading "Parameters")
5213 (table (% (formatter (asis)))
5214 (entry (% (heading (var "x")))
5217 Specify the center of a picking region in window coordinates. "))
5218 (entry (% (heading (var "delX")))
5219 (itemx (var "delY"))
5221 Specify the width and height, respectively, of the picking region in window
5223 (entry (% (heading (var "viewport")))
5225 Specifies the current viewport (as from a "
5226 (code "glGetIntegerv")
5228 (heading "Description")
5229 (para (code "gluPickMatrix")
5230 " creates a projection matrix that can be used to restrict drawing
5231 to a small region of the viewport.
5232 This is typically useful to
5233 determine what objects are being drawn near the cursor.
5235 (code "gluPickMatrix")
5237 restrict drawing to a small region around the cursor.
5239 enter selection mode (with "
5240 (code "glRenderMode")
5241 ") and rerender the scene.
5242 All primitives that would have been drawn near
5243 the cursor are identified and stored in the selection buffer. ")
5245 The matrix created by "
5246 (code "gluPickMatrix")
5247 " is multiplied by the current matrix just
5249 (code "glMultMatrix")
5250 " is called with the generated matrix.
5251 To effectively use the generated pick matrix for picking,
5253 (code "glLoadIdentity")
5254 " to load an identity matrix onto the
5255 perspective matrix stack.
5257 (code "gluPickMatrix")
5259 and, finally, call a command (such as "
5260 (code "gluPerspective")
5262 to multiply the perspective matrix by the pick matrix. ")
5265 (code "gluPickMatrix")
5266 " to pick NURBS, be careful to turn off the NURBS
5268 (code "GLU_AUTO_LOAD_MATRIX")
5270 (code "GLU_AUTO_LOAD_MATRIX")
5272 turned off, then any NURBS surface rendered is subdivided differently with
5273 the pick matrix than the way it was subdivided without the pick matrix. ")))
5275 (define-gl-procedure
5280 (funcdef "GLint " (function "gluProject"))
5281 (paramdef "GLdouble " (parameter "objX"))
5282 (paramdef "GLdouble " (parameter "objY"))
5283 (paramdef "GLdouble " (parameter "objZ"))
5286 (parameter "model"))
5287 (paramdef "const GLdouble * " (parameter "proj"))
5288 (paramdef "const GLint * " (parameter "view"))
5289 (paramdef "GLdouble* " (parameter "winX"))
5290 (paramdef "GLdouble* " (parameter "winY"))
5291 (paramdef "GLdouble* " (parameter "winZ"))))
5294 "map object coordinates to window coordinates")
5295 (heading "Parameters")
5296 (table (% (formatter (asis)))
5297 (entry (% (heading (var "objX")))
5298 (itemx (var "objY"))
5299 (itemx (var "objZ"))
5301 Specify the object coordinates. "))
5302 (entry (% (heading (var "model")))
5304 Specifies the current modelview matrix (as from a "
5305 (code "glGetDoublev")
5307 (entry (% (heading (var "proj")))
5309 Specifies the current projection matrix (as from a "
5310 (code "glGetDoublev")
5312 (entry (% (heading (var "view")))
5314 Specifies the current viewport (as from a "
5315 (code "glGetIntegerv")
5317 (entry (% (heading (var "winX")))
5318 (itemx (var "winY"))
5319 (itemx (var "winZ"))
5321 Return the computed window coordinates. ")))
5322 (heading "Description")
5323 (para (code "gluProject")
5324 " transforms the specified object coordinates into window coordinates
5331 ". The result is stored
5338 ". A return value of "
5340 " indicates success, a return value of "
5343 indicates failure. ")
5345 To compute the coordinates,
5357 represented as a matrix with 4 rows and 1 column.
5361 (math (var "v") "^" "″")
5364 (para (math (var "v")
5377 is the current projection matrix "
5385 " (both represented as "
5388 matrices in column-major order). ")
5390 The window coordinates are then computed as follows: ")
5391 (para (math (var "winX")
5422 (para (math (var "winY")
5453 (para (math (var "winZ")
5472 (define-gl-procedure
5477 (funcdef "void " (function "gluPwlCurve"))
5478 (paramdef "GLUnurbs* " (parameter "nurb"))
5479 (paramdef "GLint " (parameter "count"))
5480 (paramdef "GLfloat* " (parameter "data"))
5481 (paramdef "GLint " (parameter "stride"))
5482 (paramdef "GLenum " (parameter "type"))))
5485 "describe a piecewise linear NURBS trimming curve")
5486 (heading "Parameters")
5487 (table (% (formatter (asis)))
5488 (entry (% (heading (var "nurb")))
5490 Specifies the NURBS object (created with "
5491 (code "gluNewNurbsRenderer")
5493 (entry (% (heading (var "count")))
5495 Specifies the number of points on the curve. "))
5496 (entry (% (heading (var "data")))
5498 Specifies an array containing the curve points. "))
5499 (entry (% (heading (var "stride")))
5501 Specifies the offset (a number of single-precision floating-point values)
5502 between points on the curve. "))
5503 (entry (% (heading (var "type")))
5505 Specifies the type of curve.
5507 (code "GLU_MAP1_TRIM_2")
5509 (code "GLU_MAP1_TRIM_3")
5511 (heading "Description")
5512 (para (code "gluPwlCurve")
5513 " describes a piecewise linear trimming curve for a NURBS surface.
5514 A piecewise linear curve consists of a list of
5515 coordinates of points in the parameter space for the
5516 NURBS surface to be trimmed. These points are connected
5517 with line segments to form a curve. If the curve is
5518 an approximation to a curve that is not piecewise linear,
5519 the points should be close enough in parameter space that the
5520 resulting path appears curved at the resolution used in the application. ")
5525 (code "GLU_MAP1_TRIM_2")
5526 ", then it describes a curve in two-dimensional ("
5530 ") parameter space. If it is "
5531 (code "GLU_MAP1_TRIM_3")
5533 describes a curve in two-dimensional homogeneous ("
5542 (code "gluBeginTrim")
5543 " reference page for more information
5544 about trimming curves. ")))
5546 (define-gl-procedure
5548 "gluQuadricCallback"
5551 (funcdef "void " (function "gluQuadricCallback"))
5552 (paramdef "GLUquadric* " (parameter "quad"))
5553 (paramdef "GLenum " (parameter "which"))
5556 (parameter "CallBackFunc"))))
5559 "define a callback for a quadrics object")
5560 (heading "Parameters")
5561 (table (% (formatter (asis)))
5562 (entry (% (heading (var "quad")))
5564 Specifies the quadrics object (created with "
5565 (code "gluNewQuadric")
5567 (entry (% (heading (var "which")))
5569 Specifies the callback being defined.
5570 The only valid value is "
5573 (entry (% (heading (var "CallBackFunc")))
5575 Specifies the function to be called. ")))
5576 (heading "Description")
5577 (para (code "gluQuadricCallback")
5578 " is used to define a new callback to be used by a quadrics object.
5579 If the specified callback is already defined, then it is replaced. If "
5580 (var "CallBackFunc")
5581 " is NULL, then any existing callback is erased. ")
5583 The one legal callback is "
5586 (table (% (formatter (asis)))
5587 (entry (% (heading (code "GLU_ERROR")))
5589 The function is called when an error is encountered. Its single argument
5590 is of type GLenum, and it indicates the specific error that occurred.
5591 Character strings describing these errors can be retrieved with the "
5592 (code "gluErrorString")
5595 (define-gl-procedure
5597 "gluQuadricDrawStyle"
5602 (function "gluQuadricDrawStyle"))
5603 (paramdef "GLUquadric* " (parameter "quad"))
5604 (paramdef "GLenum " (parameter "draw"))))
5607 "specify the draw style desired for quadrics")
5608 (heading "Parameters")
5609 (table (% (formatter (asis)))
5610 (entry (% (heading (var "quad")))
5612 Specifies the quadrics object (created with "
5613 (code "gluNewQuadric")
5615 (entry (% (heading (var "draw")))
5617 Specifies the desired draw style. Valid values are "
5622 (code "GLU_SILHOUETTE")
5626 (heading "Description")
5627 (para (code "gluQuadricDrawStyle")
5628 " specifies the draw style for quadrics rendered with "
5630 ". The legal values are as follows: ")
5631 (table (% (formatter (asis)))
5632 (entry (% (heading (code "GLU_FILL")))
5634 Quadrics are rendered with polygon primitives. The polygons
5635 are drawn in a counterclockwise fashion with respect to their
5636 normals (as defined with "
5637 (code "gluQuadricOrientation")
5639 (entry (% (heading (code "GLU_LINE")))
5641 Quadrics are rendered as a set of lines. "))
5642 (entry (% (heading (code "GLU_SILHOUETTE")))
5644 Quadrics are rendered as a set of lines, except that edges separating
5645 coplanar faces will not be drawn. "))
5646 (entry (% (heading (code "GLU_POINT")))
5648 Quadrics are rendered as a set of points. ")))))
5650 (define-gl-procedure
5655 (funcdef "void " (function "gluQuadricNormals"))
5656 (paramdef "GLUquadric* " (parameter "quad"))
5657 (paramdef "GLenum " (parameter "normal"))))
5660 "specify what kind of normals are desired for quadrics")
5661 (heading "Parameters")
5662 (table (% (formatter (asis)))
5663 (entry (% (heading (var "quad")))
5665 Specifies the quadrics object (created with "
5666 (code "gluNewQuadric")
5668 (entry (% (heading (var "normal")))
5670 Specifies the desired type of normals. Valid values are "
5677 (heading "Description")
5678 (para (code "gluQuadricNormals")
5679 " specifies what kind of normals are desired for quadrics rendered with "
5681 ". The legal values are as follows: ")
5682 (table (% (formatter (asis)))
5683 (entry (% (heading (code "GLU_NONE")))
5685 No normals are generated. "))
5686 (entry (% (heading (code "GLU_FLAT")))
5688 One normal is generated for every facet of a quadric. "))
5689 (entry (% (heading (code "GLU_SMOOTH")))
5691 One normal is generated for every vertex of a quadric. This is the
5692 initial value. ")))))
5694 (define-gl-procedure
5695 gluQuadricOrientation
5696 "gluQuadricOrientation"
5701 (function "gluQuadricOrientation"))
5702 (paramdef "GLUquadric* " (parameter "quad"))
5703 (paramdef "GLenum " (parameter "orientation"))))
5706 "specify inside/outside orientation for quadrics")
5707 (heading "Parameters")
5708 (table (% (formatter (asis)))
5709 (entry (% (heading (var "quad")))
5711 Specifies the quadrics object (created with "
5712 (code "gluNewQuadric")
5714 (entry (% (heading (var "orientation")))
5716 Specifies the desired orientation. Valid values are "
5717 (code "GLU_OUTSIDE")
5721 (heading "Description")
5722 (para (code "gluQuadricOrientation")
5723 " specifies what kind of orientation is desired for quadrics rendered
5728 " values are as follows: ")
5729 (table (% (formatter (asis)))
5730 (entry (% (heading (code "GLU_OUTSIDE")))
5732 Quadrics are drawn with normals pointing outward (the initial value). "))
5733 (entry (% (heading (code "GLU_INSIDE")))
5735 Quadrics are drawn with normals pointing inward. ")))
5737 Note that the interpretation of "
5742 quadric being drawn. ")))
5744 (define-gl-procedure
5749 (funcdef "void " (function "gluQuadricTexture"))
5750 (paramdef "GLUquadric* " (parameter "quad"))
5751 (paramdef "GLboolean " (parameter "texture"))))
5754 "specify if texturing is desired for quadrics")
5755 (heading "Parameters")
5756 (table (% (formatter (asis)))
5757 (entry (% (heading (var "quad")))
5759 Specifies the quadrics object (created with "
5760 (code "gluNewQuadric")
5762 (entry (% (heading (var "texture")))
5764 Specifies a flag indicating if texture coordinates should be generated. ")))
5765 (heading "Description")
5766 (para (code "gluQuadricTexture")
5767 " specifies if texture coordinates should be generated
5768 for quadrics rendered with "
5775 ", then texture coordinates
5776 are generated, and if "
5780 ", they are not. The
5785 The manner in which texture coordinates are generated depends
5786 upon the specific quadric rendered. ")))
5788 (define-gl-procedure
5793 (funcdef "GLint " (function "gluScaleImage"))
5794 (paramdef "GLenum " (parameter "format"))
5795 (paramdef "GLsizei " (parameter "wIn"))
5796 (paramdef "GLsizei " (parameter "hIn"))
5797 (paramdef "GLenum " (parameter "typeIn"))
5798 (paramdef "const void * " (parameter "dataIn"))
5799 (paramdef "GLsizei " (parameter "wOut"))
5800 (paramdef "GLsizei " (parameter "hOut"))
5801 (paramdef "GLenum " (parameter "typeOut"))
5802 (paramdef "GLvoid* " (parameter "dataOut"))))
5804 (heading "scale an image to an arbitrary size")
5805 (heading "Parameters")
5806 (table (% (formatter (asis)))
5807 (entry (% (heading (var "format")))
5809 Specifies the format of the pixel data.
5810 The following symbolic values are valid: "
5811 (code "GLU_COLOR_INDEX")
5813 (code "GLU_STENCIL_INDEX")
5815 (code "GLU_DEPTH_COMPONENT")
5833 (code "GLU_LUMINANCE")
5835 (code "GLU_LUMINANCE_ALPHA")
5837 (entry (% (heading (var "wIn")))
5840 Specify in pixels the width and height, respectively, of the source image. "))
5841 (entry (% (heading (var "typeIn")))
5843 Specifies the data type for "
5846 (code "GLU_UNSIGNED_BYTE")
5852 (code "GLU_UNSIGNED_SHORT")
5856 (code "GLU_UNSIGNED_INT")
5862 (code "GLU_UNSIGNED_BYTE_3_3_2")
5864 (code "GLU_UNSIGNED_BYTE_2_3_3_REV")
5866 (code "GLU_UNSIGNED_SHORT_5_6_5")
5868 (code "GLU_UNSIGNED_SHORT_5_6_5_REV")
5870 (code "GLU_UNSIGNED_SHORT_4_4_4_4")
5872 (code "GLU_UNSIGNED_SHORT_4_4_4_4_REV")
5874 (code "GLU_UNSIGNED_SHORT_5_5_5_1")
5876 (code "GLU_UNSIGNED_SHORT_1_5_5_5_REV")
5878 (code "GLU_UNSIGNED_INT_8_8_8_8")
5880 (code "GLU_UNSIGNED_INT_8_8_8_8_REV")
5882 (code "GLU_UNSIGNED_INT_10_10_10_2")
5884 (code "GLU_UNSIGNED_INT_2_10_10_10_REV")
5886 (entry (% (heading (var "dataIn")))
5888 Specifies a pointer to the source image. "))
5889 (entry (% (heading (var "wOut")))
5890 (itemx (var "hOut"))
5892 Specify the width and height, respectively, in pixels of the destination image. "))
5893 (entry (% (heading (var "typeOut")))
5895 Specifies the data type for "
5898 (code "GLU_UNSIGNED_BYTE")
5904 (code "GLU_UNSIGNED_SHORT")
5908 (code "GLU_UNSIGNED_INT")
5914 (code "GLU_UNSIGNED_BYTE_3_3_2")
5916 (code "GLU_UNSIGNED_BYTE_2_3_3_REV")
5918 (code "GLU_UNSIGNED_SHORT_5_6_5")
5920 (code "GLU_UNSIGNED_SHORT_5_6_5_REV")
5922 (code "GLU_UNSIGNED_SHORT_4_4_4_4")
5924 (code "GLU_UNSIGNED_SHORT_4_4_4_4_REV")
5926 (code "GLU_UNSIGNED_SHORT_5_5_5_1")
5928 (code "GLU_UNSIGNED_SHORT_1_5_5_5_REV")
5930 (code "GLU_UNSIGNED_INT_8_8_8_8")
5932 (code "GLU_UNSIGNED_INT_8_8_8_8_REV")
5934 (code "GLU_UNSIGNED_INT_10_10_10_2")
5936 (code "GLU_UNSIGNED_INT_2_10_10_10_REV")
5938 (entry (% (heading (var "dataOut")))
5940 Specifies a pointer to the destination image. ")))
5941 (heading "Description")
5942 (para (code "gluScaleImage")
5943 " scales a pixel image using the appropriate pixel store modes to
5944 unpack data from the source image and pack data into the destination image. ")
5946 When shrinking an image, "
5947 (code "gluScaleImage")
5948 " uses a box filter to sample the source image
5949 and create pixels for the destination image. When magnifying an image,
5950 the pixels from the source image are linearly interpolated to create the
5951 destination image. ")
5953 A return value of zero indicates success, otherwise a GLU error code is returned (see "
5954 (code "gluErrorString")
5958 (code "glReadPixels")
5959 " reference page for a description of
5960 the acceptable values for the "
5968 (para (code "GLU_INVALID_VALUE")
5979 (para (code "GLU_INVALID_ENUM")
5988 (para (code "GLU_INVALID_OPERATION")
5994 (code "GLU_UNSIGNED_BYTE_3_3_2")
5996 (code "GLU_UNSIGNED_BYTE_2_3_3_REV")
6002 (para (code "GLU_INVALID_OPERATION")
6008 (code "GLU_UNSIGNED_SHORT_5_6_5")
6010 (code "GLU_UNSIGNED_SHORT_5_6_5_REV")
6016 (para (code "GLU_INVALID_OPERATION")
6022 (code "GLU_UNSIGNED_SHORT_4_4_4_4")
6024 (code "GLU_UNSIGNED_SHORT_4_4_4_4_REV")
6032 (para (code "GLU_INVALID_OPERATION")
6038 (code "GLU_UNSIGNED_SHORT_5_5_5_1")
6040 (code "GLU_UNSIGNED_SHORT_1_5_5_5_REV")
6049 (para (code "GLU_INVALID_OPERATION")
6055 (code "GLU_UNSIGNED_INT_8_8_8_8")
6057 (code "GLU_UNSIGNED_INT_8_8_8_8_REV")
6065 (para (code "GLU_INVALID_OPERATION")
6071 (code "GLU_UNSIGNED_INT_10_10_10_2")
6073 (code "GLU_UNSIGNED_INT_2_10_10_10_REV")
6083 (define-gl-procedure
6088 (funcdef "void " (function "gluSphere"))
6089 (paramdef "GLUquadric* " (parameter "quad"))
6090 (paramdef "GLdouble " (parameter "radius"))
6091 (paramdef "GLint " (parameter "slices"))
6092 (paramdef "GLint " (parameter "stacks"))))
6094 (heading "draw a sphere")
6095 (heading "Parameters")
6096 (table (% (formatter (asis)))
6097 (entry (% (heading (var "quad")))
6099 Specifies the quadrics object (created with "
6100 (code "gluNewQuadric")
6102 (entry (% (heading (var "radius")))
6104 Specifies the radius of the sphere. "))
6105 (entry (% (heading (var "slices")))
6107 Specifies the number of subdivisions around the "
6110 (similar to lines of longitude). "))
6111 (entry (% (heading (var "stacks")))
6113 Specifies the number of subdivisions along the "
6116 (similar to lines of
6118 (heading "Description")
6119 (para (code "gluSphere")
6120 " draws a sphere of the given radius centered around the origin. The
6121 sphere is subdivided around the "
6123 " axis into slices and along the "
6126 into stacks (similar to lines of longitude and latitude). ")
6128 If the orientation is set to "
6129 (code "GLU_OUTSIDE")
6131 (code "gluQuadricOrientation")
6132 "), then any normals generated
6133 point away from the center of the sphere.
6134 Otherwise, they point toward the center of the sphere. ")
6136 If texturing is turned on (with "
6137 (code "gluQuadricTexture")
6142 " ranges from 0.0 at "
6143 (math (var "z") "=" "-" (var "radius"))
6146 (math (var "z") "=" (var "radius"))
6150 " increases linearly along longitudinal
6154 " ranges from 0.0 at the +"
6156 " axis, to 0.25 at the
6162 " axis, to 0.75 at the \\-"
6164 " axis, and back to 1.0
6169 (define-gl-procedure
6171 "gluTessBeginContour"
6176 (function "gluTessBeginContour"))
6177 (paramdef "GLUtesselator* " (parameter "tess"))))
6179 (heading "delimit a contour description")
6180 (heading "Parameters")
6181 (table (% (formatter (asis)))
6182 (entry (% (heading (var "tess")))
6184 Specifies the tessellation object (created with "
6187 (heading "Description")
6188 (para (code "gluTessBeginContour")
6190 (code "gluTessEndContour")
6191 " delimit the definition of a
6192 polygon contour. Within each "
6193 (code "gluTessBeginContour")
6195 (code "gluTessEndContour")
6197 pair, there can be zero or more calls to "
6198 (code "gluTessVertex")
6200 specify a closed contour (the last vertex of each contour is automatically linked
6201 to the first). See the "
6202 (code "gluTessVertex")
6203 " reference page for more details. "
6204 (code "gluTessBeginContour")
6205 " can only be called between "
6206 (code "gluTessBeginPolygon")
6208 (code "gluTessEndPolygon")
6211 (define-gl-procedure
6213 "gluTessBeginPolygon"
6218 (function "gluTessBeginPolygon"))
6219 (paramdef "GLUtesselator* " (parameter "tess"))
6220 (paramdef "GLvoid* " (parameter "data"))))
6222 (heading "delimit a polygon description")
6223 (heading "Parameters")
6224 (table (% (formatter (asis)))
6225 (entry (% (heading (var "tess")))
6227 Specifies the tessellation object (created with "
6230 (entry (% (heading (var "data")))
6232 Specifies a pointer to user polygon data. ")))
6233 (heading "Description")
6234 (para (code "gluTessBeginPolygon")
6236 (code "gluTessEndPolygon")
6237 " delimit the definition of a
6238 convex, concave or self-intersecting polygon. Within each "
6239 (code "gluTessBeginPolygon")
6241 (code "gluTessEndPolygon")
6243 pair, there must be one or more calls to "
6244 (code "gluTessBeginContour")
6246 (code "gluTessEndContour")
6248 Within each contour, there are zero or more calls to "
6249 (code "gluTessVertex")
6251 specify a closed contour (the last vertex of each contour is automatically linked
6252 to the first). See the "
6253 (code "gluTessVertex")
6255 (code "gluTessBeginContour")
6257 (code "gluTessEndContour")
6258 " reference pages for more details. ")
6260 " is a pointer to a user-defined data structure. If the appropriate callback(s)
6261 are specified (see "
6262 (code "gluTessCallback")
6263 "), then this pointer is returned to the
6264 callback function(s). Thus, it is a convenient way to store per-polygon information. ")
6267 (code "gluTessEndPolygon")
6268 " is called, the polygon is tessellated, and the
6269 resulting triangles are described through callbacks.
6271 (code "gluTessCallback")
6272 " for descriptions of the callback functions. ")))
6274 (define-gl-procedure
6279 (funcdef "void " (function "gluTessCallback"))
6280 (paramdef "GLUtesselator* " (parameter "tess"))
6281 (paramdef "GLenum " (parameter "which"))
6284 (parameter "CallBackFunc"))))
6287 "define a callback for a tessellation object")
6288 (heading "Parameters")
6289 (table (% (formatter (asis)))
6290 (entry (% (heading (var "tess")))
6292 Specifies the tessellation object (created with "
6295 (entry (% (heading (var "which")))
6297 Specifies the callback being defined. The following values are valid: "
6298 (code "GLU_TESS_BEGIN")
6300 (code "GLU_TESS_BEGIN_DATA")
6302 (code "GLU_TESS_EDGE_FLAG")
6304 (code "GLU_TESS_EDGE_FLAG_DATA")
6306 (code "GLU_TESS_VERTEX")
6308 (code "GLU_TESS_VERTEX_DATA")
6310 (code "GLU_TESS_END")
6312 (code "GLU_TESS_END_DATA")
6314 (code "GLU_TESS_COMBINE")
6316 (code "GLU_TESS_COMBINE_DATA")
6318 (code "GLU_TESS_ERROR")
6320 (code "GLU_TESS_ERROR_DATA")
6322 (entry (% (heading (var "CallBackFunc")))
6324 Specifies the function to be called. ")))
6325 (heading "Description")
6326 (para (code "gluTessCallback")
6327 " is used to indicate a callback to be used by a tessellation object.
6328 If the specified callback is already defined, then it is replaced. If "
6329 (var "CallBackFunc")
6330 " is NULL, then the existing callback becomes undefined. ")
6332 These callbacks are used by the tessellation object to describe how a
6333 polygon specified by the user is broken into triangles. Note that there
6334 are two versions of each callback: one with user-specified polygon data
6335 and one without. If both versions of a particular callback are specified,
6336 then the callback with user-specified polygon data will be used. Note
6338 (var "polygon_data")
6339 " parameter used by some of the functions is
6340 a copy of the pointer that was specified when "
6341 (code "gluTessBeginPolygon")
6342 " was called. The legal callbacks are as follows: ")
6343 (table (% (formatter (asis)))
6344 (entry (% (heading (code "GLU_TESS_BEGIN")))
6346 The begin callback is invoked like "
6348 " to indicate the start of
6349 a (triangle) primitive. The function takes a single argument of type
6351 (code "GLU_TESS_BOUNDARY_ONLY")
6352 " property is set to "
6354 ", then the argument is set to either "
6355 (code "GLU_TRIANGLE_FAN")
6357 (code "GLU_TRIANGLE_STRIP")
6359 (code "GLU_TRIANGLES")
6362 (code "GLU_TESS_BOUNDARY_ONLY")
6363 " property is set to "
6366 then the argument will be set to "
6367 (code "GLU_LINE_LOOP")
6369 prototype for this callback is: "))
6370 (entry (% (heading (code "GLU_TESS_BEGIN_DATA")))
6373 (code "GLU_TESS_BEGIN")
6374 " callback except that it
6375 takes an additional pointer argument. This pointer is identical to the
6376 opaque pointer provided when "
6377 (code "gluTessBeginPolygon")
6378 " was called. The function prototype for this callback
6380 (entry (% (heading (code "GLU_TESS_EDGE_FLAG")))
6382 The edge flag callback is similar to "
6385 takes a single boolean flag that indicates which edges lie on the
6386 polygon boundary. If the flag is "
6389 that follows begins an edge that lies on the polygon boundary, that is,
6390 an edge that separates an interior region from an exterior one.
6393 ", then each vertex that follows begins an edge
6394 that lies in the polygon interior. The edge flag callback (if defined) is
6395 invoked before the first vertex callback. ")
6397 Since triangle fans and triangle strips do not support edge flags, the begin
6398 callback is not called with "
6399 (code "GLU_TRIANGLE_FAN")
6401 (code "GLU_TRIANGLE_STRIP")
6403 if a non-NULL edge flag callback is provided. (If the callback is
6404 initialized to NULL, there is no impact on performance). Instead, the fans and
6405 strips are converted to independent triangles. The function prototype
6406 for this callback is: "))
6407 (entry (% (heading (code "GLU_TESS_EDGE_FLAG_DATA")))
6410 (code "GLU_TESS_EDGE_FLAG")
6411 " callback except that it takes an additional pointer
6412 argument. This pointer is identical to the opaque pointer provided when "
6413 (code "gluTessBeginPolygon")
6414 " was called. The function prototype for this callback
6416 (entry (% (heading (code "GLU_TESS_VERTEX")))
6418 The vertex callback is invoked between the begin and end callbacks.
6421 ", and it defines the vertices of the triangles
6422 created by the tessellation process. The function
6423 takes a pointer as its only argument. This pointer is identical to
6424 the opaque pointer provided by the user when the vertex was described
6426 (code "gluTessVertex")
6427 "). The function prototype for this callback is: "))
6428 (entry (% (heading (code "GLU_TESS_VERTEX_DATA")))
6431 (code "GLU_TESS_VERTEX")
6432 " callback except that it takes an additional pointer
6433 argument. This pointer is identical to the opaque pointer provided when "
6434 (code "gluTessBeginPolygon")
6435 " was called. The function prototype for this callback
6437 (entry (% (heading (code "GLU_TESS_END")))
6439 The end callback serves the same purpose as "
6442 end of a primitive and it takes no arguments. The function prototype for this
6444 (entry (% (heading (code "GLU_TESS_END_DATA")))
6447 (code "GLU_TESS_END")
6448 " callback except that it takes an additional pointer
6449 argument. This pointer is identical to the opaque pointer provided when "
6450 (code "gluTessBeginPolygon")
6451 " was called. The function prototype for this callback
6453 (entry (% (heading (code "GLU_TESS_COMBINE")))
6455 The combine callback is called to create a new vertex when the tessellation
6456 detects an intersection or wishes to merge features. The function takes
6457 four arguments: an array of three elements each of type GLdouble, an array
6458 of four pointers, an array of four elements each of type GLfloat, and a
6459 pointer to a pointer. The prototype is: ")
6461 The vertex is defined as a linear combination of up to four existing vertices,
6464 ". The coefficients of the linear
6465 combination are given by "
6467 "; these weights always add up to 1.
6468 All vertex pointers are valid even when some of the weights are 0. "
6470 " gives the location of the new vertex. ")
6472 The user must allocate another vertex, interpolate parameters using "
6476 ", and return the new vertex pointer in "
6478 ". This handle is supplied during rendering callbacks.
6479 The user is responsible for freeing the memory some time after "
6480 (code "gluTessEndPolygon")
6483 For example, if the polygon lies in an arbitrary plane in 3-space,
6484 and a color is associated with each vertex, the "
6485 (code "GLU_TESS_COMBINE")
6486 " callback might look like this: ")
6488 If the tessellation detects an intersection, then the "
6489 (code "GLU_TESS_COMBINE")
6491 (code "GLU_TESS_COMBINE_DATA")
6492 " callback (see below) must be defined, and it must
6493 write a non-NULL pointer into "
6496 (code "GLU_TESS_NEED_COMBINE_CALLBACK")
6497 " error occurs, and no
6498 output is generated. "))
6499 (entry (% (heading (code "GLU_TESS_COMBINE_DATA")))
6502 (code "GLU_TESS_COMBINE")
6503 " callback except that it takes an additional pointer
6504 argument. This pointer is identical to the opaque pointer provided when "
6505 (code "gluTessBeginPolygon")
6506 " was called. The function prototype for this callback
6508 (entry (% (heading (code "GLU_TESS_ERROR")))
6510 The error callback is called when an error is encountered. The one argument
6511 is of type GLenum; it indicates the specific error that occurred and will be
6513 (code "GLU_TESS_MISSING_BEGIN_POLYGON")
6515 (code "GLU_TESS_MISSING_END_POLYGON")
6517 (code "GLU_TESS_MISSING_BEGIN_CONTOUR")
6519 (code "GLU_TESS_MISSING_END_CONTOUR")
6521 (code "GLU_TESS_COORD_TOO_LARGE")
6523 (code "GLU_TESS_NEED_COMBINE_CALLBACK")
6525 (code "GLU_OUT_OF_MEMORY")
6527 strings describing these errors can be retrieved with the "
6528 (code "gluErrorString")
6529 " call. The function prototype for this callback is: ")
6531 The GLU library will recover from the first four
6532 errors by inserting the missing call(s). "
6533 (code "GLU_TESS_COORD_TOO_LARGE")
6534 " indicates that some vertex coordinate exceeded
6535 the predefined constant "
6536 (code "GLU_TESS_MAX_COORD")
6537 " in absolute value, and
6538 that the value has been clamped. (Coordinate values must be small
6539 enough so that two can be multiplied together without overflow.) "
6540 (code "GLU_TESS_NEED_COMBINE_CALLBACK")
6541 " indicates that the tessellation
6542 detected an intersection between two edges in the input data, and the "
6543 (code "GLU_TESS_COMBINE")
6545 (code "GLU_TESS_COMBINE_DATA")
6547 not provided. No output is generated. "
6548 (code "GLU_OUT_OF_MEMORY")
6550 that there is not enough memory so no output is generated. "))
6551 (entry (% (heading (code "GLU_TESS_ERROR_DATA")))
6554 (code "GLU_TESS_ERROR")
6555 " callback except that it takes an additional pointer
6556 argument. This pointer is identical to the opaque pointer provided when "
6557 (code "gluTessBeginPolygon")
6558 " was called. The function prototype for this callback
6561 void begin( GLenum type ); ")
6564 void beginData( GLenum type, void *polygon_data ); ")
6566 void edgeFlag( GLboolean flag ); ")
6569 void edgeFlagData( GLboolean flag, void *polygon_data ); ")
6571 void vertex( void *vertex_data ); ")
6574 void vertexData( void *vertex_data, void *polygon_data ); ")
6576 void end( void ); ")
6578 void endData( void *polygon_data ); ")
6581 void combine( GLdouble coords[3], void *vertex_data[4],
6582 GLfloat weight[4], void **outData ); ")
6585 void myCombine( GLdouble coords[3], VERTEX *d[4],
6586 GLfloat w[4], VERTEX **dataOut )
6588 VERTEX *new = new_vertex();
6593 new->r = w[0]*d[0]->r + w[1]*d[1]->r + w[2]*d[2]->r + w[3]*d[3]->r;
6594 new->g = w[0]*d[0]->g + w[1]*d[1]->g + w[2]*d[2]->g + w[3]*d[3]->g;
6595 new->b = w[0]*d[0]->b + w[1]*d[1]->b + w[2]*d[2]->b + w[3]*d[3]->b;
6596 new->a = w[0]*d[0]->a + w[1]*d[1]->a + w[2]*d[2]->a + w[3]*d[3]->a;
6601 void combineData( GLdouble coords[3], void *vertex_data[4],
6602 GLfloat weight[4], void **outData,
6603 void *polygon_data ); ")
6605 void error( GLenum errno ); ")
6608 void errorData( GLenum errno, void *polygon_data ); ")))
6610 (define-gl-procedure
6615 (funcdef "void " (function "gluTessEndPolygon"))
6616 (paramdef "GLUtesselator* " (parameter "tess"))))
6618 (heading "delimit a polygon description")
6619 (heading "Parameters")
6620 (table (% (formatter (asis)))
6621 (entry (% (heading (var "tess")))
6623 Specifies the tessellation object (created with "
6626 (heading "Description")
6627 (para (code "gluTessBeginPolygon")
6629 (code "gluTessEndPolygon")
6631 definition of a convex, concave, or self-intersecting polygon. Within
6633 (code "gluTessBeginPolygon")
6635 (code "gluTessEndPolygon")
6636 " pair, there must be
6637 one or more calls to "
6638 (code "gluTessBeginContour")
6640 (code "gluTessEndContour")
6642 Within each contour, there are zero or more calls to "
6643 (code "gluTessVertex")
6645 The vertices specify a closed contour (the last vertex of each contour
6646 is automatically linked to the first). See the "
6647 (code "gluTessVertex")
6649 (code "gluTessBeginContour")
6651 (code "gluTessEndContour")
6652 " reference pages for
6656 (code "gluTessEndPolygon")
6657 " is called, the polygon is tessellated, and the
6658 resulting triangles are described through callbacks.
6660 (code "gluTessCallback")
6661 " for descriptions of the callback functions. ")))
6663 (define-gl-procedure
6668 (funcdef "void " (function "gluTessNormal"))
6669 (paramdef "GLUtesselator* " (parameter "tess"))
6670 (paramdef "GLdouble " (parameter "valueX"))
6671 (paramdef "GLdouble " (parameter "valueY"))
6672 (paramdef "GLdouble " (parameter "valueZ"))))
6674 (heading "specify a normal for a polygon")
6675 (heading "Parameters")
6676 (table (% (formatter (asis)))
6677 (entry (% (heading (var "tess")))
6679 Specifies the tessellation object (created with "
6682 (entry (% (heading (var "valueX")))
6684 Specifies the first component of the normal. "))
6685 (entry (% (heading (var "valueY")))
6687 Specifies the second component of the normal. "))
6688 (entry (% (heading (var "valueZ")))
6690 Specifies the third component of the normal. ")))
6691 (heading "Description")
6692 (para (code "gluTessNormal")
6693 " describes a normal for a polygon that the program is defining.
6694 All input data will be projected onto a plane perpendicular to one of
6695 the three coordinate axes before tessellation and all output triangles
6696 will be oriented CCW with
6697 respect to the normal (CW orientation can be obtained by reversing the
6698 sign of the supplied normal). For example, if you know that all polygons
6699 lie in the x-y plane, call "
6700 (code "gluTessNormal")
6701 "(tess, 0.0, 0.0, 1.0)
6702 before rendering any polygons. ")
6704 If the supplied normal is (0.0, 0.0, 0.0) (the initial value), the normal is
6705 determined as follows. The direction of the normal, up to its sign, is
6706 found by fitting a plane to the vertices, without regard to how the
6707 vertices are connected. It is expected that the input data lies approximately
6708 in the plane; otherwise, projection perpendicular to one of the three
6709 coordinate axes may substantially change the geometry. The sign of the
6710 normal is chosen so that the sum of the signed areas of all input
6711 contours is nonnegative (where a CCW contour has positive area). ")
6713 The supplied normal persists until it is changed by another call to "
6714 (code "gluTessNormal")
6717 (define-gl-procedure
6722 (funcdef "void " (function "gluTessProperty"))
6723 (paramdef "GLUtesselator* " (parameter "tess"))
6724 (paramdef "GLenum " (parameter "which"))
6725 (paramdef "GLdouble " (parameter "data"))))
6727 (heading "set a tessellation object property")
6728 (heading "Parameters")
6729 (table (% (formatter (asis)))
6730 (entry (% (heading (var "tess")))
6732 Specifies the tessellation object (created with "
6735 (entry (% (heading (var "which")))
6737 Specifies the property to be set. Valid values are "
6738 (code "GLU_TESS_WINDING_RULE")
6740 (code "GLU_TESS_BOUNDARY_ONLY")
6742 (code "GLU_TESS_TOLERANCE")
6744 (entry (% (heading (var "data")))
6746 Specifies the value of the indicated property. ")))
6747 (heading "Description")
6748 (para (code "gluTessProperty")
6749 " is used to control properties stored in a tessellation object. These
6750 properties affect the way that the polygons are interpreted and rendered.
6751 The legal values for "
6753 " are as follows: ")
6754 (table (% (formatter (asis)))
6755 (entry (% (heading (code "GLU_TESS_WINDING_RULE")))
6757 Determines which parts of the polygon are on the ``interior''. "
6759 " may be set to one of "
6760 (code "GLU_TESS_WINDING_ODD")
6762 (code "GLU_TESS_WINDING_NONZERO")
6764 (code "GLU_TESS_WINDING_POSITIVE")
6766 (code "GLU_TESS_WINDING_NEGATIVE")
6768 (code "GLU_TESS_WINDING_ABS_GEQ_TWO")
6771 To understand how the winding rule works, consider that the input
6772 contours partition the plane into regions. The winding rule determines which
6773 of these regions are inside the polygon. ")
6775 For a single contour C, the winding number of a point x is simply the signed
6776 number of revolutions we make around x as we travel once around C
6777 (where CCW is positive). When there are several contours, the individual
6778 winding numbers are summed. This procedure associates a signed integer
6779 value with each point x in the plane. Note that the winding number is the
6780 same for all points in a single region. ")
6782 The winding rule classifies a region as ``inside'' if its winding number
6783 belongs to the chosen category (odd, nonzero, positive, negative, or
6784 absolute value of at least two). The previous GLU tessellator (prior to
6785 GLU 1.2) used the ``odd'' rule. The ``nonzero'' rule is another common way to
6786 define the interior. The other three rules are useful for polygon CSG
6788 (entry (% (heading (code "GLU_TESS_BOUNDARY_ONLY")))
6790 Is a boolean value (``value'' should be set
6791 to GL_TRUE or GL_FALSE). When set to GL_TRUE, a set of closed contours
6792 separating the polygon interior and exterior are returned instead of a
6793 tessellation. Exterior contours are oriented CCW with respect to the
6794 normal; interior contours are oriented CW. The "
6795 (code "GLU_TESS_BEGIN")
6798 (code "GLU_TESS_BEGIN_DATA")
6799 " callbacks use the type GL_LINE_LOOP for
6801 (entry (% (heading (code "GLU_TESS_TOLERANCE")))
6803 Specifies a tolerance for merging features to reduce the size of the output.
6804 For example, two vertices that are very close to each other might be
6805 replaced by a single vertex. The tolerance is multiplied by the largest
6806 coordinate magnitude of any input vertex; this specifies the maximum
6807 distance that any feature can move as the result of a single merge
6808 operation. If a single feature takes part in several merge operations, the
6809 total distance moved could be larger. ")
6811 Feature merging is completely optional; the tolerance is only a hint.
6812 The implementation is free to merge in some cases and not in others, or to
6813 never merge features at all. The initial tolerance is 0. ")
6815 The current implementation merges vertices only if they are exactly
6816 coincident, regardless of the current tolerance. A vertex is spliced into
6817 an edge only if the implementation is unable to distinguish which side of
6818 the edge the vertex lies on. Two edges are merged only when both endpoints
6819 are identical. ")))))
6821 (define-gl-procedure
6826 (funcdef "void " (function "gluTessVertex"))
6827 (paramdef "GLUtesselator* " (parameter "tess"))
6828 (paramdef "GLdouble * " (parameter "location"))
6829 (paramdef "GLvoid* " (parameter "data"))))
6831 (heading "specify a vertex on a polygon")
6832 (heading "Parameters")
6833 (table (% (formatter (asis)))
6834 (entry (% (heading (var "tess")))
6836 Specifies the tessellation object (created with "
6839 (entry (% (heading (var "location")))
6841 Specifies the location of the vertex. "))
6842 (entry (% (heading (var "data")))
6844 Specifies an opaque pointer passed back to the program with the vertex callback
6846 (code "gluTessCallback")
6848 (heading "Description")
6849 (para (code "gluTessVertex")
6850 " describes a vertex on a polygon that the program defines. Successive "
6851 (code "gluTessVertex")
6852 " calls describe a closed contour. For example,
6853 to describe a quadrilateral, "
6854 (code "gluTessVertex")
6855 " should be called four times. "
6856 (code "gluTessVertex")
6857 " can only be called between "
6858 (code "gluTessBeginContour")
6860 (code "gluTessEndContour")
6863 " normally points to a structure containing the vertex
6864 location, as well as other per-vertex attributes such as color and normal.
6865 This pointer is passed back to the user through the "
6866 (code "GLU_TESS_VERTEX")
6869 (code "GLU_TESS_VERTEX_DATA")
6870 " callback after tessellation
6872 (code "gluTessCallback")
6873 " reference page). ")))
6875 (define-gl-procedure
6880 (funcdef "GLint " (function "gluUnProject4"))
6881 (paramdef "GLdouble " (parameter "winX"))
6882 (paramdef "GLdouble " (parameter "winY"))
6883 (paramdef "GLdouble " (parameter "winZ"))
6884 (paramdef "GLdouble " (parameter "clipW"))
6887 (parameter "model"))
6888 (paramdef "const GLdouble * " (parameter "proj"))
6889 (paramdef "const GLint * " (parameter "view"))
6890 (paramdef "GLdouble " (parameter "nearVal"))
6891 (paramdef "GLdouble " (parameter "farVal"))
6892 (paramdef "GLdouble* " (parameter "objX"))
6893 (paramdef "GLdouble* " (parameter "objY"))
6894 (paramdef "GLdouble* " (parameter "objZ"))
6895 (paramdef "GLdouble* " (parameter "objW"))))
6898 "map window and clip coordinates to object coordinates")
6899 (heading "Parameters")
6900 (table (% (formatter (asis)))
6901 (entry (% (heading (var "winX")))
6902 (itemx (var "winY"))
6903 (itemx (var "winZ"))
6905 Specify the window coordinates to be mapped. "))
6906 (entry (% (heading (var "clipW")))
6908 Specify the clip w coordinate to be mapped. "))
6909 (entry (% (heading (var "model")))
6911 Specifies the modelview matrix (as from a "
6912 (code "glGetDoublev")
6914 (entry (% (heading (var "proj")))
6916 Specifies the projection matrix (as from a "
6917 (code "glGetDoublev")
6919 (entry (% (heading (var "view")))
6921 Specifies the viewport (as from a "
6922 (code "glGetIntegerv")
6924 (entry (% (heading (var "nearVal")))
6925 (itemx (var "farVal"))
6927 Specifies the near and far planes (as from a "
6928 (code "glGetDoublev")
6930 (entry (% (heading (var "objX")))
6931 (itemx (var "objY"))
6932 (itemx (var "objZ"))
6933 (itemx (var "objW"))
6935 Returns the computed object coordinates. ")))
6936 (heading "Description")
6937 (para (code "gluUnProject4")
6938 " maps the specified window coordinatesi: "
6945 and its clip w coordinate "
6967 1 as for vertices in "
6968 (code "glFeedbackBuffer")
6970 (code "GLU_4D_COLOR_TEXTURE")
6972 This also handles the case
6977 " planes are different from the default,
6978 0 and 1, respectively.
6982 " indicates success; a return value of "
6985 indicates failure. ")
6987 To compute the coordinates "
6996 (code "gluUnProject4")
6997 " multiplies the normalized device coordinates by the inverse of "
7112 (para (math (var "INV"))
7114 denotes matrix inversion. ")
7115 (para (code "gluUnProject4")
7116 " is equivalent to "
7117 (code "gluUnProject")
7126 (define-gl-procedure
7131 (funcdef "GLint " (function "gluUnProject"))
7132 (paramdef "GLdouble " (parameter "winX"))
7133 (paramdef "GLdouble " (parameter "winY"))
7134 (paramdef "GLdouble " (parameter "winZ"))
7137 (parameter "model"))
7138 (paramdef "const GLdouble * " (parameter "proj"))
7139 (paramdef "const GLint * " (parameter "view"))
7140 (paramdef "GLdouble* " (parameter "objX"))
7141 (paramdef "GLdouble* " (parameter "objY"))
7142 (paramdef "GLdouble* " (parameter "objZ"))))
7145 "map window coordinates to object coordinates")
7146 (heading "Parameters")
7147 (table (% (formatter (asis)))
7148 (entry (% (heading (var "winX")))
7149 (itemx (var "winY"))
7150 (itemx (var "winZ"))
7152 Specify the window coordinates to be mapped. "))
7153 (entry (% (heading (var "model")))
7155 Specifies the modelview matrix (as from a "
7156 (code "glGetDoublev")
7158 (entry (% (heading (var "proj")))
7160 Specifies the projection matrix (as from a "
7161 (code "glGetDoublev")
7163 (entry (% (heading (var "view")))
7165 Specifies the viewport (as from a "
7166 (code "glGetIntegerv")
7168 (entry (% (heading (var "objX")))
7169 (itemx (var "objY"))
7170 (itemx (var "objZ"))
7172 Returns the computed object coordinates. ")))
7173 (heading "Description")
7174 (para (code "gluUnProject")
7175 " maps the specified window coordinates into object
7183 The result is stored in "
7189 ". A return value of "
7191 " indicates success; a return value of "
7194 indicates failure. ")
7196 To compute the coordinates "
7204 (code "gluUnProject")
7205 " multiplies the normalized device coordinates by the inverse of "
7311 denotes matrix inversion.
7312 W is an unused variable, included for consistent matrix notation. ")))