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.
20 ;;; Copyright (C) 1991-2006 Silicon Graphics, Inc. This document is
21 ;;; licensed under the SGI Free Software B License. For details, see
22 ;;; http://oss.sgi.com/projects/FreeB/ (http://oss.sgi.com/projects/FreeB/).
24 ;;; Automatically generated; you probably don't want to edit this. To
25 ;;; update, run "make update" in the top-level build tree.
43 gluBuild1DMipmapLevels
45 gluBuild2DMipmapLevels
47 gluBuild3DMipmapLevels
51 gluDeleteNurbsRenderer
59 gluLoadSamplingMatrices
65 gluNurbsCallbackDataEXT
95 (define-glu-procedures
96 ((gluBeginCurve (nurb GLUnurbs*) -> void)
97 (gluEndCurve (nurb GLUnurbs*) -> void))
98 "Delimit a NURBS curve definition.
101 Specifies the NURBS object (created with `gluNewNurbsRenderer').
103 Use `gluBeginCurve' to mark the beginning of a NURBS curve definition.
104 After calling `gluBeginCurve', make one or more calls to `gluNurbsCurve'
105 to define the attributes of the curve. Exactly one of the calls to
106 `gluNurbsCurve' must have a curve type of `GLU_MAP1_VERTEX_3' or
107 `GLU_MAP1_VERTEX_4'. To mark the end of the NURBS curve definition,
110 GL evaluators are used to render the NURBS curve as a series of line
111 segments. Evaluator state is preserved during rendering with
112 `glPushAttrib'(`GLU_EVAL_BIT') and `glPopAttrib'(). See the
113 `glPushAttrib' reference page for details on exactly what state these
116 (define-glu-procedures
117 ((gluBeginPolygon (tess GLUtesselator*) -> void)
118 (gluEndPolygon (tess GLUtesselator*) -> void))
119 "Delimit a polygon description.
122 Specifies the tessellation object (created with `gluNewTess').
124 `gluBeginPolygon' and `gluEndPolygon' delimit the definition of a
125 nonconvex polygon. To define such a polygon, first call
126 `gluBeginPolygon'. Then define the contours of the polygon by calling
127 `gluTessVertex' for each vertex and `gluNextContour' to start each new
128 contour. Finally, call `gluEndPolygon' to signal the end of the
129 definition. See the `gluTessVertex' and `gluNextContour' reference
130 pages for more details.
132 Once `gluEndPolygon' is called, the polygon is tessellated, and the
133 resulting triangles are described through callbacks. See
134 `gluTessCallback' for descriptions of the callback functions.")
136 (define-glu-procedures
137 ((gluBeginSurface (nurb GLUnurbs*) -> void)
138 (gluEndSurface (nurb GLUnurbs*) -> void))
139 "Delimit a NURBS surface definition.
142 Specifies the NURBS object (created with `gluNewNurbsRenderer').
144 Use `gluBeginSurface' to mark the beginning of a NURBS surface
145 definition. After calling `gluBeginSurface', make one or more calls to
146 `gluNurbsSurface' to define the attributes of the surface. Exactly one
147 of these calls to `gluNurbsSurface' must have a surface type of
148 `GLU_MAP2_VERTEX_3' or `GLU_MAP2_VERTEX_4'. To mark the end of the
149 NURBS surface definition, call `gluEndSurface'.
151 Trimming of NURBS surfaces is supported with `gluBeginTrim',
152 `gluPwlCurve', `gluNurbsCurve', and `gluEndTrim'. See the
153 `gluBeginTrim' reference page for details.
155 GL evaluators are used to render the NURBS surface as a set of polygons.
156 Evaluator state is preserved during rendering with
157 `glPushAttrib'(`GLU_EVAL_BIT') and `glPopAttrib'. See the
158 `glPushAttrib' reference page for details on exactly what state these
161 (define-glu-procedures
162 ((gluBeginTrim (nurb GLUnurbs*) -> void)
163 (gluEndTrim (nurb GLUnurbs*) -> void))
164 "Delimit a NURBS trimming loop definition.
167 Specifies the NURBS object (created with `gluNewNurbsRenderer').
169 Use `gluBeginTrim' to mark the beginning of a trimming loop and
170 `gluEndTrim' to mark the end of a trimming loop. A trimming loop is a
171 set of oriented curve segments (forming a closed curve) that define
172 boundaries of a NURBS surface. You include these trimming loops in the
173 definition of a NURBS surface, between calls to `gluBeginSurface' and
176 The definition for a NURBS surface can contain many trimming loops. For
177 example, if you wrote a definition for a NURBS surface that resembled a
178 rectangle with a hole punched out, the definition would contain two
179 trimming loops. One loop would define the outer edge of the rectangle;
180 the other would define the hole punched out of the rectangle. The
181 definitions of each of these trimming loops would be bracketed by a
182 `gluBeginTrim'/`gluEndTrim' pair.
184 The definition of a single closed trimming loop can consist of multiple
185 curve segments, each described as a piecewise linear curve (see
186 `gluPwlCurve') or as a single NURBS curve (see `gluNurbsCurve'), or as a
187 combination of both in any order. The only library calls that can
188 appear in a trimming loop definition (between the calls to
189 `gluBeginTrim' and `gluEndTrim') are `gluPwlCurve' and `gluNurbsCurve'.
191 The area of the NURBS surface that is displayed is the region in the
192 domain to the left of the trimming curve as the curve parameter
193 increases. Thus, the retained region of the NURBS surface is inside a
194 counterclockwise trimming loop and outside a clockwise trimming loop.
195 For the rectangle mentioned earlier, the trimming loop for the outer
196 edge of the rectangle runs counterclockwise, while the trimming loop for
197 the punched-out hole runs clockwise.
199 If you use more than one curve to define a single trimming loop, the
200 curve segments must form a closed loop (that is, the endpoint of each
201 curve must be the starting point of the next curve, and the endpoint of
202 the final curve must be the starting point of the first curve). If the
203 endpoints of the curve are sufficiently close together but not exactly
204 coincident, they will be coerced to match. If the endpoints are not
205 sufficiently close, an error results (see `gluNurbsCallback').
207 If a trimming loop definition contains multiple curves, the direction of
208 the curves must be consistent (that is, the inside must be to the left
209 of all of the curves). Nested trimming loops are legal as long as the
210 curve orientations alternate correctly. If trimming curves are
211 self-intersecting, or intersect one another, an error results.
213 If no trimming information is given for a NURBS surface, the entire
216 (define-glu-procedures
217 ((gluBuild1DMipmapLevels
219 (internalFormat GLint)
229 "Builds a subset of one-dimensional mipmap levels.
232 Specifies the target texture. Must be `GLU_TEXTURE_1D'.
235 Requests the internal storage format of the texture image. The
236 most current version of the SGI implementation of GLU does not
237 check this value for validity before passing it on to the
238 underlying OpenGL implementation. A value that is not accepted by
239 the OpenGL implementation will lead to an OpenGL error. The
240 benefit of not checking this value at the GLU level is that OpenGL
241 extensions can add new internal texture formats without requiring a
242 revision of the GLU implementation. Older implementations of GLU
243 check this value and raise a GLU error if it is not 1, 2, 3, or 4
244 or one of the following symbolic constants: `GLU_ALPHA',
245 `GLU_ALPHA4', `GLU_ALPHA8', `GLU_ALPHA12', `GLU_ALPHA16',
246 `GLU_LUMINANCE', `GLU_LUMINANCE4', `GLU_LUMINANCE8',
247 `GLU_LUMINANCE12', `GLU_LUMINANCE16', `GLU_LUMINANCE_ALPHA',
248 `GLU_LUMINANCE4_ALPHA4', `GLU_LUMINANCE6_ALPHA2',
249 `GLU_LUMINANCE8_ALPHA8', `GLU_LUMINANCE12_ALPHA4',
250 `GLU_LUMINANCE12_ALPHA12', `GLU_LUMINANCE16_ALPHA16',
251 `GLU_INTENSITY', `GLU_INTENSITY4', `GLU_INTENSITY8',
252 `GLU_INTENSITY12', `GLU_INTENSITY16', `GLU_RGB', `GLU_R3_G3_B2',
253 `GLU_RGB4', `GLU_RGB5', `GLU_RGB8', `GLU_RGB10', `GLU_RGB12',
254 `GLU_RGB16', `GLU_RGBA', `GLU_RGBA2', `GLU_RGBA4', `GLU_RGB5_A1',
255 `GLU_RGBA8', `GLU_RGB10_A2', `GLU_RGBA12', or `GLU_RGBA16'.
258 Specifies the width in pixels of the texture image. This should be
262 Specifies the format of the pixel data. Must be one of:
263 `GLU_COLOR_INDEX', `GLU_DEPTH_COMPONENT', `GLU_RED', `GLU_GREEN',
264 `GLU_BLUE', `GLU_ALPHA', `GLU_RGB', `GLU_RGBA', `GLU_BGR',
265 `GLU_BGRA', `GLU_LUMINANCE', or `GLU_LUMINANCE_ALPHA'.
268 Specifies the data type for DATA. Must be one of:
269 `GLU_UNSIGNED_BYTE', `GLU_BYTE', `GLU_BITMAP',
270 `GLU_UNSIGNED_SHORT', `GLU_SHORT', `GLU_UNSIGNED_INT', `GLU_INT',
271 `GLU_FLOAT', `GLU_UNSIGNED_BYTE_3_3_2',
272 `GLU_UNSIGNED_BYTE_2_3_3_REV', `GLU_UNSIGNED_SHORT_5_6_5',
273 `GLU_UNSIGNED_SHORT_5_6_5_REV', `GLU_UNSIGNED_SHORT_4_4_4_4',
274 `GLU_UNSIGNED_SHORT_4_4_4_4_REV', `GLU_UNSIGNED_SHORT_5_5_5_1',
275 `GLU_UNSIGNED_SHORT_1_5_5_5_REV', `GLU_UNSIGNED_INT_8_8_8_8',
276 `GLU_UNSIGNED_INT_8_8_8_8_REV', `GLU_UNSIGNED_INT_10_10_10_2', or
277 `GLU_UNSIGNED_INT_2_10_10_10_REV'.
280 Specifies the mipmap level of the image data.
283 Specifies the minimum mipmap level to pass to `glTexImage1D'.
286 Specifies the maximum mipmap level to pass to `glTexImage1D'.
289 Specifies a pointer to the image data in memory.
291 `gluBuild1DMipmapLevels' builds a subset of prefiltered one-dimensional
292 texture maps of decreasing resolutions called a mipmap. This is used
293 for the antialiasing of texture mapped primitives.
295 A return value of zero indicates success, otherwise a GLU error code is
296 returned (see `gluErrorString').
298 A series of mipmap levels from BASE to MAX is built by decimating DATA
299 in half until size 1×1 is reached. At each level, each texel in the
300 halved mipmap level is an average of the corresponding two texels in the
301 larger mipmap level. `glTexImage1D' is called to load these mipmap
302 levels from BASE to MAX. If MAX is larger than the highest mipmap level
303 for the texture of the specified size, then a GLU error code is returned
304 (see `gluErrorString') and nothing is loaded.
306 For example, if LEVEL is 2 and WIDTH is 16, the following levels are
307 possible: 16×1 , 8×1 , 4×1 , 2×1 , 1×1 . These correspond to levels 2
308 through 6 respectively. If BASE is 3 and MAX is 5, then only mipmap
309 levels 8×1 , 4×1 and 2×1 are loaded. However, if MAX is 7, then an
310 error is returned and nothing is loaded since MAX is larger than the
311 highest mipmap level which is, in this case, 6.
313 The highest mipmap level can be derived from the formula
314 LOG_2\u2061(WIDTH×2^LEVEL,) .
316 See the `glTexImage1D' reference page for a description of the
317 acceptable values for TYPE parameter. See the `glDrawPixels' reference
318 page for a description of the acceptable values for LEVEL parameter.
320 `GLU_INVALID_VALUE' is returned if LEVEL > BASE, BASE < 0, MAX < BASE or
321 MAX is > the highest mipmap level for DATA.
323 `GLU_INVALID_VALUE' is returned if WIDTH is < 1.
325 `GLU_INVALID_ENUM' is returned if INTERNALFORMAT, FORMAT, or TYPE are
328 `GLU_INVALID_OPERATION' is returned if TYPE is `GLU_UNSIGNED_BYTE_3_3_2'
329 or `GLU_UNSIGNED_BYTE_2_3_3_REV' and FORMAT is not `GLU_RGB'.
331 `GLU_INVALID_OPERATION' is returned if TYPE is
332 `GLU_UNSIGNED_SHORT_5_6_5' or `GLU_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
335 `GLU_INVALID_OPERATION' is returned if TYPE is
336 `GLU_UNSIGNED_SHORT_4_4_4_4' or `GLU_UNSIGNED_SHORT_4_4_4_4_REV' and
337 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.
339 `GLU_INVALID_OPERATION' is returned if TYPE is
340 `GLU_UNSIGNED_SHORT_5_5_5_1' or `GLU_UNSIGNED_SHORT_1_5_5_5_REV' and
341 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.
343 `GLU_INVALID_OPERATION' is returned if TYPE is
344 `GLU_UNSIGNED_INT_8_8_8_8' or `GLU_UNSIGNED_INT_8_8_8_8_REV' and FORMAT
345 is neither `GLU_RGBA' nor `GLU_BGRA'.
347 `GLU_INVALID_OPERATION' is returned if TYPE is
348 `GLU_UNSIGNED_INT_10_10_10_2' or `GLU_UNSIGNED_INT_2_10_10_10_REV' and
349 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.")
351 (define-glu-procedures
354 (internalFormat GLint)
361 "Builds a one-dimensional mipmap.
364 Specifies the target texture. Must be `GLU_TEXTURE_1D'.
367 Requests the internal storage format of the texture image. The
368 most current version of the SGI implementation of GLU does not
369 check this value for validity before passing it on to the
370 underlying OpenGL implementation. A value that is not accepted by
371 the OpenGL implementation will lead to an OpenGL error. The
372 benefit of not checking this value at the GLU level is that OpenGL
373 extensions can add new internal texture formats without requiring a
374 revision of the GLU implementation. Older implementations of GLU
375 check this value and raise a GLU error if it is not 1, 2, 3, or 4
376 or one of the following symbolic constants: `GLU_ALPHA',
377 `GLU_ALPHA4', `GLU_ALPHA8', `GLU_ALPHA12', `GLU_ALPHA16',
378 `GLU_LUMINANCE', `GLU_LUMINANCE4', `GLU_LUMINANCE8',
379 `GLU_LUMINANCE12', `GLU_LUMINANCE16', `GLU_LUMINANCE_ALPHA',
380 `GLU_LUMINANCE4_ALPHA4', `GLU_LUMINANCE6_ALPHA2',
381 `GLU_LUMINANCE8_ALPHA8', `GLU_LUMINANCE12_ALPHA4',
382 `GLU_LUMINANCE12_ALPHA12', `GLU_LUMINANCE16_ALPHA16',
383 `GLU_INTENSITY', `GLU_INTENSITY4', `GLU_INTENSITY8',
384 `GLU_INTENSITY12', `GLU_INTENSITY16', `GLU_RGB', `GLU_R3_G3_B2',
385 `GLU_RGB4', `GLU_RGB5', `GLU_RGB8', `GLU_RGB10', `GLU_RGB12',
386 `GLU_RGB16', `GLU_RGBA', `GLU_RGBA2', `GLU_RGBA4', `GLU_RGB5_A1',
387 `GLU_RGBA8', `GLU_RGB10_A2', `GLU_RGBA12', or `GLU_RGBA16'.
390 Specifies the width, in pixels, of the texture image.
393 Specifies the format of the pixel data. Must be one of
394 `GLU_COLOR_INDEX', `GLU_DEPTH_COMPONENT', `GLU_RED', `GLU_GREEN',
395 `GLU_BLUE', `GLU_ALPHA', `GLU_RGB', `GLU_RGBA', `GLU_BGR',
396 `GLU_BGRA', `GLU_LUMINANCE', or `GLU_LUMINANCE_ALPHA'.
399 Specifies the data type for DATA. Must be one of
400 `GLU_UNSIGNED_BYTE', `GLU_BYTE', `GLU_BITMAP',
401 `GLU_UNSIGNED_SHORT', `GLU_SHORT', `GLU_UNSIGNED_INT', `GLU_INT',
402 `GLU_FLOAT', `GLU_UNSIGNED_BYTE_3_3_2',
403 `GLU_UNSIGNED_BYTE_2_3_3_REV', `GLU_UNSIGNED_SHORT_5_6_5',
404 `GLU_UNSIGNED_SHORT_5_6_5_REV', `GLU_UNSIGNED_SHORT_4_4_4_4',
405 `GLU_UNSIGNED_SHORT_4_4_4_4_REV', `GLU_UNSIGNED_SHORT_5_5_5_1',
406 `GLU_UNSIGNED_SHORT_1_5_5_5_REV', `GLU_UNSIGNED_INT_8_8_8_8',
407 `GLU_UNSIGNED_INT_8_8_8_8_REV', `GLU_UNSIGNED_INT_10_10_10_2', or
408 `GLU_UNSIGNED_INT_2_10_10_10_REV'.
411 Specifies a pointer to the image data in memory.
413 `gluBuild1DMipmaps' builds a series of prefiltered one-dimensional
414 texture maps of decreasing resolutions called a mipmap. This is used
415 for the antialiasing of texture mapped primitives.
417 A return value of zero indicates success, otherwise a GLU error code is
418 returned (see `gluErrorString').
420 Initially, the WIDTH of DATA is checked to see if it is a power of 2. If
421 not, a copy of DATA is scaled up or down to the nearest power of 2. (If
422 WIDTH is exactly between powers of 2, then the copy of DATA will scale
423 upwards.) This copy will be used for subsequent mipmapping operations
424 described below. For example, if WIDTH is 57, then a copy of DATA will
425 scale up to 64 before mipmapping takes place.
427 Then, proxy textures (see `glTexImage1D') are used to determine if the
428 implementation can fit the requested texture. If not, WIDTH is
429 continually halved until it fits.
431 Next, a series of mipmap levels is built by decimating a copy of DATA in
432 half until size 1×1 is reached. At each level, each texel in the halved
433 mipmap level is an average of the corresponding two texels in the larger
436 `glTexImage1D' is called to load each of these mipmap levels. Level 0
437 is a copy of DATA. The highest level is LOG_2,\u2061(WIDTH,) . For example,
438 if WIDTH is 64 and the implementation can store a texture of this size,
439 the following mipmap levels are built: 64×1 , 32×1 , 16×1 , 8×1 , 4×1 ,
440 2×1 , and 1×1 . These correspond to levels 0 through 6, respectively.
442 See the `glTexImage1D' reference page for a description of the
443 acceptable values for the TYPE parameter. See the `glDrawPixels'
444 reference page for a description of the acceptable values for the DATA
447 `GLU_INVALID_VALUE' is returned if WIDTH is < 1.
449 `GLU_INVALID_ENUM' is returned if FORMAT or TYPE are not legal.
451 `GLU_INVALID_OPERATION' is returned if TYPE is `GLU_UNSIGNED_BYTE_3_3_2'
452 or `GLU_UNSIGNED_BYTE_2_3_3_REV' and FORMAT is not `GLU_RGB'.
454 `GLU_INVALID_OPERATION' is returned if TYPE is
455 `GLU_UNSIGNED_SHORT_5_6_5' or `GLU_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
458 `GLU_INVALID_OPERATION' is returned if TYPE is
459 `GLU_UNSIGNED_SHORT_4_4_4_4' or `GLU_UNSIGNED_SHORT_4_4_4_4_REV' and
460 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.
462 `GLU_INVALID_OPERATION' is returned if TYPE is
463 `GLU_UNSIGNED_SHORT_5_5_5_1' or `GLU_UNSIGNED_SHORT_1_5_5_5_REV' and
464 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.
466 `GLU_INVALID_OPERATION' is returned if TYPE is
467 `GLU_UNSIGNED_INT_8_8_8_8' or `GLU_UNSIGNED_INT_8_8_8_8_REV' and FORMAT
468 is neither `GLU_RGBA' nor `GLU_BGRA'.
470 `GLU_INVALID_OPERATION' is returned if TYPE is
471 `GLU_UNSIGNED_INT_10_10_10_2' or `GLU_UNSIGNED_INT_2_10_10_10_REV' and
472 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.")
474 (define-glu-procedures
475 ((gluBuild2DMipmapLevels
477 (internalFormat GLint)
488 "Builds a subset of two-dimensional mipmap levels.
491 Specifies the target texture. Must be `GLU_TEXTURE_2D'.
494 Requests the internal storage format of the texture image. The
495 most current version of the SGI implementation of GLU does not
496 check this value for validity before passing it on to the
497 underlying OpenGL implementation. A value that is not accepted by
498 the OpenGL implementation will lead to an OpenGL error. The
499 benefit of not checking this value at the GLU level is that OpenGL
500 extensions can add new internal texture formats without requiring a
501 revision of the GLU implementation. Older implementations of GLU
502 check this value and raise a GLU error if it is not 1, 2, 3, or 4
503 or one of the following symbolic constants: `GLU_ALPHA',
504 `GLU_ALPHA4', `GLU_ALPHA8', `GLU_ALPHA12', `GLU_ALPHA16',
505 `GLU_LUMINANCE', `GLU_LUMINANCE4', `GLU_LUMINANCE8',
506 `GLU_LUMINANCE12', `GLU_LUMINANCE16', `GLU_LUMINANCE_ALPHA',
507 `GLU_LUMINANCE4_ALPHA4', `GLU_LUMINANCE6_ALPHA2',
508 `GLU_LUMINANCE8_ALPHA8', `GLU_LUMINANCE12_ALPHA4',
509 `GLU_LUMINANCE12_ALPHA12', `GLU_LUMINANCE16_ALPHA16',
510 `GLU_INTENSITY', `GLU_INTENSITY4', `GLU_INTENSITY8',
511 `GLU_INTENSITY12', `GLU_INTENSITY16', `GLU_RGB', `GLU_R3_G3_B2',
512 `GLU_RGB4', `GLU_RGB5', `GLU_RGB8', `GLU_RGB10', `GLU_RGB12',
513 `GLU_RGB16', `GLU_RGBA', `GLU_RGBA2', `GLU_RGBA4', `GLU_RGB5_A1',
514 `GLU_RGBA8', `GLU_RGB10_A2', `GLU_RGBA12', or `GLU_RGBA16'.
519 Specifies the width and height, respectively, in pixels of the
520 texture image. These should be a power of 2.
523 Specifies the format of the pixel data. Must be one of
524 `GLU_COLOR_INDEX', `GLU_DEPTH_COMPONENT', `GLU_RED', `GLU_GREEN',
525 `GLU_BLUE', `GLU_ALPHA', `GLU_RGB', `GLU_RGBA', `GLU_BGR',
526 `GLU_BGRA', `GLU_LUMINANCE', or `GLU_LUMINANCE_ALPHA'.
529 Specifies the data type for DATA. Must be one of
530 `GLU_UNSIGNED_BYTE', `GLU_BYTE', `GLU_BITMAP',
531 `GLU_UNSIGNED_SHORT', `GLU_SHORT', `GLU_UNSIGNED_INT', `GLU_INT',
532 `GLU_FLOAT', `GLU_UNSIGNED_BYTE_3_3_2',
533 `GLU_UNSIGNED_BYTE_2_3_3_REV', `GLU_UNSIGNED_SHORT_5_6_5',
534 `GLU_UNSIGNED_SHORT_5_6_5_REV', `GLU_UNSIGNED_SHORT_4_4_4_4',
535 `GLU_UNSIGNED_SHORT_4_4_4_4_REV', `GLU_UNSIGNED_SHORT_5_5_5_1',
536 `GLU_UNSIGNED_SHORT_1_5_5_5_REV', `GLU_UNSIGNED_INT_8_8_8_8',
537 `GLU_UNSIGNED_INT_8_8_8_8_REV', `GLU_UNSIGNED_INT_10_10_10_2', or
538 `GLU_UNSIGNED_INT_2_10_10_10_REV'.
541 Specifies the mipmap level of the image data.
544 Specifies the minimum mipmap level to pass to `glTexImage2D'.
547 Specifies the maximum mipmap level to pass to `glTexImage2D'.
550 Specifies a pointer to the image data in memory.
552 `gluBuild2DMipmapLevels' builds a subset of prefiltered two-dimensional
553 texture maps of decreasing resolutions called a mipmap. This is used
554 for the antialiasing of texture mapped primitives.
556 A return value of zero indicates success, otherwise a GLU error code is
557 returned (see `gluErrorString').
559 A series of mipmap levels from BASE to MAX is built by decimating DATA
560 in half along both dimensions until size 1×1 is reached. At each level,
561 each texel in the halved mipmap level is an average of the corresponding
562 four texels in the larger mipmap level. (In the case of rectangular
563 images, the decimation will ultimately reach an N×1 or 1×N
564 configuration. Here, two texels are averaged instead.) `glTexImage2D'
565 is called to load these mipmap levels from BASE to MAX. If MAX is
566 larger than the highest mipmap level for the texture of the specified
567 size, then a GLU error code is returned (see `gluErrorString') and
570 For example, if LEVEL is 2 and WIDTH is 16 and HEIGHT is 8, the
571 following levels are possible: 16×8 , 8×4 , 4×2 , 2×1 , 1×1 . These
572 correspond to levels 2 through 6 respectively. If BASE is 3 and MAX is
573 5, then only mipmap levels 8×4 , 4×2 , and 2×1 are loaded. However, if
574 MAX is 7, then an error is returned and nothing is loaded since MAX is
575 larger than the highest mipmap level which is, in this case, 6.
577 The highest mipmap level can be derived from the formula
578 LOG_2\u2061(MAX\u2061(WIDTH,HEIGHT)×2^LEVEL,) .
580 See the `glTexImage1D' reference page for a description of the
581 acceptable values for FORMAT parameter. See the `glDrawPixels'
582 reference page for a description of the acceptable values for TYPE
585 `GLU_INVALID_VALUE' is returned if LEVEL > BASE, BASE < 0, MAX < BASE,
586 or MAX is > the highest mipmap level for DATA.
588 `GLU_INVALID_VALUE' is returned if WIDTH or HEIGHT is < 1.
590 `GLU_INVALID_ENUM' is returned if INTERNALFORMAT, FORMAT, or TYPE is not
593 `GLU_INVALID_OPERATION' is returned if TYPE is `GLU_UNSIGNED_BYTE_3_3_2'
594 or `GLU_UNSIGNED_BYTE_2_3_3_REV' and FORMAT is not `GLU_RGB'.
596 `GLU_INVALID_OPERATION' is returned if TYPE is
597 `GLU_UNSIGNED_SHORT_5_6_5' or `GLU_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
600 `GLU_INVALID_OPERATION' is returned if TYPE is
601 `GLU_UNSIGNED_SHORT_4_4_4_4' or `GLU_UNSIGNED_SHORT_4_4_4_4_REV' and
602 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.
604 `GLU_INVALID_OPERATION' is returned if TYPE is
605 `GLU_UNSIGNED_SHORT_5_5_5_1' or `GLU_UNSIGNED_SHORT_1_5_5_5_REV' and
606 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.
608 `GLU_INVALID_OPERATION' is returned if TYPE is
609 `GLU_UNSIGNED_INT_8_8_8_8' or `GLU_UNSIGNED_INT_8_8_8_8_REV' and FORMAT
610 is neither `GLU_RGBA' nor `GLU_BGRA'.
612 `GLU_INVALID_OPERATION' is returned if TYPE is
613 `GLU_UNSIGNED_INT_10_10_10_2' or `GLU_UNSIGNED_INT_2_10_10_10_REV' and
614 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.")
616 (define-glu-procedures
619 (internalFormat GLint)
627 "Builds a two-dimensional mipmap.
630 Specifies the target texture. Must be `GLU_TEXTURE_2D'.
633 Requests the internal storage format of the texture image. The
634 most current version of the SGI implementation of GLU does not
635 check this value for validity before passing it on to the
636 underlying OpenGL implementation. A value that is not accepted by
637 the OpenGL implementation will lead to an OpenGL error. The
638 benefit of not checking this value at the GLU level is that OpenGL
639 extensions can add new internal texture formats without requiring a
640 revision of the GLU implementation. Older implementations of GLU
641 check this value and raise a GLU error if it is not 1, 2, 3, or 4
642 or one of the following symbolic constants: `GLU_ALPHA',
643 `GLU_ALPHA4', `GLU_ALPHA8', `GLU_ALPHA12', `GLU_ALPHA16',
644 `GLU_LUMINANCE', `GLU_LUMINANCE4', `GLU_LUMINANCE8',
645 `GLU_LUMINANCE12', `GLU_LUMINANCE16', `GLU_LUMINANCE_ALPHA',
646 `GLU_LUMINANCE4_ALPHA4', `GLU_LUMINANCE6_ALPHA2',
647 `GLU_LUMINANCE8_ALPHA8', `GLU_LUMINANCE12_ALPHA4',
648 `GLU_LUMINANCE12_ALPHA12', `GLU_LUMINANCE16_ALPHA16',
649 `GLU_INTENSITY', `GLU_INTENSITY4', `GLU_INTENSITY8',
650 `GLU_INTENSITY12', `GLU_INTENSITY16', `GLU_RGB', `GLU_R3_G3_B2',
651 `GLU_RGB4', `GLU_RGB5', `GLU_RGB8', `GLU_RGB10', `GLU_RGB12',
652 `GLU_RGB16', `GLU_RGBA', `GLU_RGBA2', `GLU_RGBA4', `GLU_RGB5_A1',
653 `GLU_RGBA8', `GLU_RGB10_A2', `GLU_RGBA12', or `GLU_RGBA16'.
658 Specifies in pixels the width and height, respectively, of the
662 Specifies the format of the pixel data. Must be one of
663 `GLU_COLOR_INDEX', `GLU_DEPTH_COMPONENT', `GLU_RED', `GLU_GREEN',
664 `GLU_BLUE', `GLU_ALPHA', `GLU_RGB', `GLU_RGBA', `GLU_BGR',
665 `GLU_BGRA', `GLU_LUMINANCE', or `GLU_LUMINANCE_ALPHA'.
668 Specifies the data type for DATA. Must be one of
669 `GLU_UNSIGNED_BYTE', `GLU_BYTE', `GLU_BITMAP',
670 `GLU_UNSIGNED_SHORT', `GLU_SHORT', `GLU_UNSIGNED_INT', `GLU_INT',
671 `GLU_FLOAT', `GLU_UNSIGNED_BYTE_3_3_2',
672 `GLU_UNSIGNED_BYTE_2_3_3_REV', `GLU_UNSIGNED_SHORT_5_6_5',
673 `GLU_UNSIGNED_SHORT_5_6_5_REV', `GLU_UNSIGNED_SHORT_4_4_4_4',
674 `GLU_UNSIGNED_SHORT_4_4_4_4_REV', `GLU_UNSIGNED_SHORT_5_5_5_1',
675 `GLU_UNSIGNED_SHORT_1_5_5_5_REV', `GLU_UNSIGNED_INT_8_8_8_8',
676 `GLU_UNSIGNED_INT_8_8_8_8_REV', `GLU_UNSIGNED_INT_10_10_10_2', or
677 `GLU_UNSIGNED_INT_2_10_10_10_REV'.
680 Specifies a pointer to the image data in memory.
682 `gluBuild2DMipmaps' builds a series of prefiltered two-dimensional
683 texture maps of decreasing resolutions called a mipmap. This is used
684 for the antialiasing of texture-mapped primitives.
686 A return value of zero indicates success, otherwise a GLU error code is
687 returned (see `gluErrorString').
689 Initially, the WIDTH and HEIGHT of DATA are checked to see if they are a
690 power of 2. If not, a copy of DATA (not DATA), is scaled up or down to
691 the nearest power of 2. This copy will be used for subsequent
692 mipmapping operations described below. (If WIDTH or HEIGHT is exactly
693 between powers of 2, then the copy of DATA will scale upwards.) For
694 example, if WIDTH is 57 and HEIGHT is 23, then a copy of DATA will scale
695 up to 64 in WIDTH and down to 16 in depth, before mipmapping takes
698 Then, proxy textures (see `glTexImage2D') are used to determine if the
699 implementation can fit the requested texture. If not, both dimensions
700 are continually halved until it fits. (If the OpenGL version is \\(<=
701 1.0, both maximum texture dimensions are clamped to the value returned
702 by `glGetIntegerv' with the argument `GLU_MAX_TEXTURE_SIZE'.)
704 Next, a series of mipmap levels is built by decimating a copy of DATA in
705 half along both dimensions until size 1×1 is reached. At each level,
706 each texel in the halved mipmap level is an average of the corresponding
707 four texels in the larger mipmap level. (In the case of rectangular
708 images, the decimation will ultimately reach an N×1 or 1×N
709 configuration. Here, two texels are averaged instead.)
711 `glTexImage2D' is called to load each of these mipmap levels. Level 0
712 is a copy of DATA. The highest level is LOG_2,\u2061(MAX\u2061(WIDTH,HEIGHT),) .
713 For example, if WIDTH is 64 and HEIGHT is 16 and the implementation can
714 store a texture of this size, the following mipmap levels are built:
715 64×16 , 32×8 , 16×4 , 8×2 , 4×1 , 2×1 , and 1×1 These correspond to
716 levels 0 through 6, respectively.
718 See the `glTexImage1D' reference page for a description of the
719 acceptable values for FORMAT parameter. See the `glDrawPixels'
720 reference page for a description of the acceptable values for TYPE
723 `GLU_INVALID_VALUE' is returned if WIDTH or HEIGHT is < 1.
725 `GLU_INVALID_ENUM' is returned if INTERNALFORMAT, FORMAT, or TYPE is not
728 `GLU_INVALID_OPERATION' is returned if TYPE is `GLU_UNSIGNED_BYTE_3_3_2'
729 or `GLU_UNSIGNED_BYTE_2_3_3_REV' and FORMAT is not `GLU_RGB'.
731 `GLU_INVALID_OPERATION' is returned if TYPE is
732 `GLU_UNSIGNED_SHORT_5_6_5' or `GLU_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
735 `GLU_INVALID_OPERATION' is returned if TYPE is
736 `GLU_UNSIGNED_SHORT_4_4_4_4' or `GLU_UNSIGNED_SHORT_4_4_4_4_REV' and
737 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.
739 `GLU_INVALID_OPERATION' is returned if TYPE is
740 `GLU_UNSIGNED_SHORT_5_5_5_1' or `GLU_UNSIGNED_SHORT_1_5_5_5_REV' and
741 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.
743 `GLU_INVALID_OPERATION' is returned if TYPE is
744 `GLU_UNSIGNED_INT_8_8_8_8' or `GLU_UNSIGNED_INT_8_8_8_8_REV' and FORMAT
745 is neither `GLU_RGBA' nor `GLU_BGRA'.
747 `GLU_INVALID_OPERATION' is returned if TYPE is
748 `GLU_UNSIGNED_INT_10_10_10_2' or `GLU_UNSIGNED_INT_2_10_10_10_REV' and
749 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.")
751 (define-glu-procedures
752 ((gluBuild3DMipmapLevels
754 (internalFormat GLint)
766 "Builds a subset of three-dimensional mipmap levels.
769 Specifies the target texture. Must be `GLU_TEXTURE_3D'.
772 Requests the internal storage format of the texture image. The
773 most current version of the SGI implementation of GLU does not
774 check this value for validity before passing it on to the
775 underlying OpenGL implementation. A value that is not accepted by
776 the OpenGL implementation will lead to an OpenGL error. The
777 benefit of not checking this value at the GLU level is that OpenGL
778 extensions can add new internal texture formats without requiring a
779 revision of the GLU implementation. Older implementations of GLU
780 check this value and raise a GLU error if it is not 1, 2, 3, or 4
781 or one of the following symbolic constants: `GLU_ALPHA',
782 `GLU_ALPHA4', `GLU_ALPHA8', `GLU_ALPHA12', `GLU_ALPHA16',
783 `GLU_LUMINANCE', `GLU_LUMINANCE4', `GLU_LUMINANCE8',
784 `GLU_LUMINANCE12', `GLU_LUMINANCE16', `GLU_LUMINANCE_ALPHA',
785 `GLU_LUMINANCE4_ALPHA4', `GLU_LUMINANCE6_ALPHA2',
786 `GLU_LUMINANCE8_ALPHA8', `GLU_LUMINANCE12_ALPHA4',
787 `GLU_LUMINANCE12_ALPHA12', `GLU_LUMINANCE16_ALPHA16',
788 `GLU_INTENSITY', `GLU_INTENSITY4', `GLU_INTENSITY8',
789 `GLU_INTENSITY12', `GLU_INTENSITY16', `GLU_RGB', `GLU_R3_G3_B2',
790 `GLU_RGB4', `GLU_RGB5', `GLU_RGB8', `GLU_RGB10', `GLU_RGB12',
791 `GLU_RGB16', `GLU_RGBA', `GLU_RGBA2', `GLU_RGBA4', `GLU_RGB5_A1',
792 `GLU_RGBA8', `GLU_RGB10_A2', `GLU_RGBA12', or `GLU_RGBA16'.
799 Specifies in pixels the width, height and depth respectively, of
800 the texture image. These should be a power of 2.
803 Specifies the format of the pixel data. Must be one of
804 `GLU_COLOR_INDEX', `GLU_DEPTH_COMPONENT', `GLU_RED', `GLU_GREEN',
805 `GLU_BLUE', `GLU_ALPHA', `GLU_RGB', `GLU_RGBA', `GLU_BGR',
806 `GLU_BGRA', `GLU_LUMINANCE', or `GLU_LUMINANCE_ALPHA'.
809 Specifies the data type for DATA. Must be one of
810 `GLU_UNSIGNED_BYTE', `GLU_BYTE', `GLU_BITMAP',
811 `GLU_UNSIGNED_SHORT', `GLU_SHORT', `GLU_UNSIGNED_INT', `GLU_INT',
812 `GLU_FLOAT', `GLU_UNSIGNED_BYTE_3_3_2',
813 `GLU_UNSIGNED_BYTE_2_3_3_REV', `GLU_UNSIGNED_SHORT_5_6_5',
814 `GLU_UNSIGNED_SHORT_5_6_5_REV', `GLU_UNSIGNED_SHORT_4_4_4_4',
815 `GLU_UNSIGNED_SHORT_4_4_4_4_REV', `GLU_UNSIGNED_SHORT_5_5_5_1',
816 `GLU_UNSIGNED_SHORT_1_5_5_5_REV', `GLU_UNSIGNED_INT_8_8_8_8',
817 `GLU_UNSIGNED_INT_8_8_8_8_REV', `GLU_UNSIGNED_INT_10_10_10_2', or
818 `GLU_UNSIGNED_INT_2_10_10_10_REV'.
821 Specifies the mipmap level of the image data.
824 Specifies the minimum mipmap level to pass to `glTexImage3D'.
827 Specifies the maximum mipmap level to pass to `glTexImage3D'.
830 Specifies a pointer to the image data in memory.
832 `gluBuild3DMipmapLevels' builds a subset of prefiltered
833 three-dimensional texture maps of decreasing resolutions called a
834 mipmap. This is used for the antialiasing of texture mapped primitives.
836 A return value of zero indicates success, otherwise a GLU error code is
837 returned (see `gluErrorString').
839 A series of mipmap levels from BASE to MAX is built by decimating DATA
840 in half along both dimensions until size 1×1×1 is reached. At each
841 level, each texel in the halved mipmap level is an average of the
842 corresponding eight texels in the larger mipmap level. (If exactly one
843 of the dimensions is 1, four texels are averaged. If exactly two of the
844 dimensions are 1, two texels are averaged.) `glTexImage3D' is called to
845 load these mipmap levels from BASE to MAX. If MAX is larger than the
846 highest mipmap level for the texture of the specified size, then a GLU
847 error code is returned (see `gluErrorString') and nothing is loaded.
849 For example, if LEVEL is 2 and WIDTH is 16, HEIGHT is 8 and DEPTH is 4,
850 the following levels are possible: 16×8×4 , 8×4×2 , 4×2×1 , 2×1×1 ,
851 1×1×1 . These correspond to levels 2 through 6 respectively. If BASE
852 is 3 and MAX is 5, then only mipmap levels 8×4×2 , 4×2×1 , and 2×1×1 are
853 loaded. However, if MAX is 7, then an error is returned and nothing is
854 loaded, since MAX is larger than the highest mipmap level which is, in
857 The highest mipmap level can be derived from the formula
858 LOG_2\u2061(MAX\u2061(WIDTH,HEIGHTDEPTH)×2^LEVEL,) .
860 See the `glTexImage1D' reference page for a description of the
861 acceptable values for FORMAT parameter. See the `glDrawPixels'
862 reference page for a description of the acceptable values for TYPE
865 `GLU_INVALID_VALUE' is returned if LEVEL > BASE, BASE < 0, MAX < BASE,
866 or MAX is > the highest mipmap level for DATA.
868 `GLU_INVALID_VALUE' is returned if WIDTH, HEIGHT, or DEPTH is < 1.
870 `GLU_INVALID_ENUM' is returned if INTERNALFORMAT, FORMAT, or TYPE is not
873 `GLU_INVALID_OPERATION' is returned if TYPE is `GLU_UNSIGNED_BYTE_3_3_2'
874 or `GLU_UNSIGNED_BYTE_2_3_3_REV' and FORMAT is not `GLU_RGB'.
876 `GLU_INVALID_OPERATION' is returned if TYPE is
877 `GLU_UNSIGNED_SHORT_5_6_5' or `GLU_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
880 `GLU_INVALID_OPERATION' is returned if TYPE is
881 `GLU_UNSIGNED_SHORT_4_4_4_4' or `GLU_UNSIGNED_SHORT_4_4_4_4_REV' and
882 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.
884 `GLU_INVALID_OPERATION' is returned if TYPE is
885 `GLU_UNSIGNED_SHORT_5_5_5_1' or `GLU_UNSIGNED_SHORT_1_5_5_5_REV' and
886 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.
888 `GLU_INVALID_OPERATION' is returned if TYPE is
889 `GLU_UNSIGNED_INT_8_8_8_8' or `GLU_UNSIGNED_INT_8_8_8_8_REV' and FORMAT
890 is neither `GLU_RGBA' nor `GLU_BGRA'.
892 `GLU_INVALID_OPERATION' is returned if TYPE is
893 `GLU_UNSIGNED_INT_10_10_10_2' or `GLU_UNSIGNED_INT_2_10_10_10_REV' and
894 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.")
896 (define-glu-procedures
899 (internalFormat GLint)
908 "Builds a three-dimensional mipmap.
911 Specifies the target texture. Must be `GLU_TEXTURE_3D'.
914 Requests the internal storage format of the texture image. The
915 most current version of the SGI implementation of GLU does not
916 check this value for validity before passing it on to the
917 underlying OpenGL implementation. A value that is not accepted by
918 the OpenGL implementation will lead to an OpenGL error. The
919 benefit of not checking this value at the GLU level is that OpenGL
920 extensions can add new internal texture formats without requiring a
921 revision of the GLU implementation. Older implementations of GLU
922 check this value and raise a GLU error if it is not 1, 2, 3, or 4
923 or one of the following symbolic constants: `GLU_ALPHA',
924 `GLU_ALPHA4', `GLU_ALPHA8', `GLU_ALPHA12', `GLU_ALPHA16',
925 `GLU_LUMINANCE', `GLU_LUMINANCE4', `GLU_LUMINANCE8',
926 `GLU_LUMINANCE12', `GLU_LUMINANCE16', `GLU_LUMINANCE_ALPHA',
927 `GLU_LUMINANCE4_ALPHA4', `GLU_LUMINANCE6_ALPHA2',
928 `GLU_LUMINANCE8_ALPHA8', `GLU_LUMINANCE12_ALPHA4',
929 `GLU_LUMINANCE12_ALPHA12', `GLU_LUMINANCE16_ALPHA16',
930 `GLU_INTENSITY', `GLU_INTENSITY4', `GLU_INTENSITY8',
931 `GLU_INTENSITY12', `GLU_INTENSITY16', `GLU_RGB', `GLU_R3_G3_B2',
932 `GLU_RGB4', `GLU_RGB5', `GLU_RGB8', `GLU_RGB10', `GLU_RGB12',
933 `GLU_RGB16', `GLU_RGBA', `GLU_RGBA2', `GLU_RGBA4', `GLU_RGB5_A1',
934 `GLU_RGBA8', `GLU_RGB10_A2', `GLU_RGBA12', or `GLU_RGBA16'.
941 Specifies in pixels the width, height and depth respectively, in
942 pixels of the texture image.
945 Specifies the format of the pixel data. Must be one of
946 `GLU_COLOR_INDEX', `GLU_DEPTH_COMPONENT', `GLU_RED', `GLU_GREEN',
947 `GLU_BLUE', `GLU_ALPHA', `GLU_RGB', `GLU_RGBA', `GLU_BGR',
948 `GLU_BGRA', `GLU_LUMINANCE', or `GLU_LUMINANCE_ALPHA'.
951 Specifies the data type for DATA. Must be one of:
952 `GLU_UNSIGNED_BYTE', `GLU_BYTE', `GLU_BITMAP',
953 `GLU_UNSIGNED_SHORT', `GLU_SHORT', `GLU_UNSIGNED_INT', `GLU_INT',
954 `GLU_FLOAT', `GLU_UNSIGNED_BYTE_3_3_2',
955 `GLU_UNSIGNED_BYTE_2_3_3_REV', `GLU_UNSIGNED_SHORT_5_6_5',
956 `GLU_UNSIGNED_SHORT_5_6_5_REV', `GLU_UNSIGNED_SHORT_4_4_4_4',
957 `GLU_UNSIGNED_SHORT_4_4_4_4_REV', `GLU_UNSIGNED_SHORT_5_5_5_1',
958 `GLU_UNSIGNED_SHORT_1_5_5_5_REV', `GLU_UNSIGNED_INT_8_8_8_8',
959 `GLU_UNSIGNED_INT_8_8_8_8_REV', `GLU_UNSIGNED_INT_10_10_10_2', or
960 `GLU_UNSIGNED_INT_2_10_10_10_REV'.
963 Specifies a pointer to the image data in memory.
965 `gluBuild3DMipmaps' builds a series of prefiltered three-dimensional
966 texture maps of decreasing resolutions called a mipmap. This is used
967 for the antialiasing of texture-mapped primitives.
969 A return value of zero indicates success, otherwise a GLU error code is
970 returned (see `gluErrorString').
972 Initially, the WIDTH, HEIGHT and DEPTH of DATA are checked to see if
973 they are a power of 2. If not, a copy of DATA is made and scaled up or
974 down to the nearest power of 2. (If WIDTH, HEIGHT, or DEPTH is exactly
975 between powers of 2, then the copy of DATA will scale upwards.) This
976 copy will be used for subsequent mipmapping operations described below.
977 For example, if WIDTH is 57, HEIGHT is 23, and DEPTH is 24, then a copy
978 of DATA will scale up to 64 in width, down to 16 in height, and up to 32
979 in depth before mipmapping takes place.
981 Then, proxy textures (see `glTexImage3D') are used to determine if the
982 implementation can fit the requested texture. If not, all three
983 dimensions are continually halved until it fits.
985 Next, a series of mipmap levels is built by decimating a copy of DATA in
986 half along all three dimensions until size 1×1×1 is reached. At each
987 level, each texel in the halved mipmap level is an average of the
988 corresponding eight texels in the larger mipmap level. (If exactly one
989 of the dimensions is 1, four texels are averaged. If exactly two of the
990 dimensions are 1, two texels are averaged.)
992 `glTexImage3D' is called to load each of these mipmap levels. Level 0
993 is a copy of DATA. The highest level is
994 LOG_2,\u2061(MAX\u2061(WIDTH,HEIGHTDEPTH),) . For example, if WIDTH is 64, HEIGHT
995 is 16, and DEPTH is 32, and the implementation can store a texture of
996 this size, the following mipmap levels are built: 64×16×32 , 32×8×16 ,
997 16×4×8 , 8×2×4 , 4×1×2 , 2×1×1 , and 1×1×1 . These correspond to levels
998 0 through 6, respectively.
1000 See the `glTexImage1D' reference page for a description of the
1001 acceptable values for FORMAT parameter. See the `glDrawPixels'
1002 reference page for a description of the acceptable values for TYPE
1005 `GLU_INVALID_VALUE' is returned if WIDTH, HEIGHT, or DEPTH is < 1.
1007 `GLU_INVALID_ENUM' is returned if INTERNALFORMAT, FORMAT, or TYPE is not
1010 `GLU_INVALID_OPERATION' is returned if TYPE is `GLU_UNSIGNED_BYTE_3_3_2'
1011 or `GLU_UNSIGNED_BYTE_2_3_3_REV' and FORMAT is not `GLU_RGB'.
1013 `GLU_INVALID_OPERATION' is returned if TYPE is
1014 `GLU_UNSIGNED_SHORT_5_6_5' or `GLU_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
1017 `GLU_INVALID_OPERATION' is returned if TYPE is
1018 `GLU_UNSIGNED_SHORT_4_4_4_4' or `GLU_UNSIGNED_SHORT_4_4_4_4_REV' and
1019 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.
1021 `GLU_INVALID_OPERATION' is returned if TYPE is
1022 `GLU_UNSIGNED_SHORT_5_5_5_1' or `GLU_UNSIGNED_SHORT_1_5_5_5_REV' and
1023 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.
1025 `GLU_INVALID_OPERATION' is returned if TYPE is
1026 `GLU_UNSIGNED_INT_8_8_8_8' or `GLU_UNSIGNED_INT_8_8_8_8_REV' and FORMAT
1027 is neither `GLU_RGBA' nor `GLU_BGRA'.
1029 `GLU_INVALID_OPERATION' is returned if TYPE is
1030 `GLU_UNSIGNED_INT_10_10_10_2' or `GLU_UNSIGNED_INT_2_10_10_10_REV' and
1031 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.")
1033 (define-glu-procedures
1035 (extName const-GLubyte-*)
1036 (extString const-GLubyte-*)
1039 "Determines if an extension name is supported.
1042 Specifies an extension name.
1045 Specifies a space-separated list of extension names supported.
1047 `gluCheckExtension' returns `GLU_TRUE' if EXTNAME is supported otherwise
1048 `GLU_FALSE' is returned.
1050 This is used to check for the presence for OpenGL, GLU, or GLX extension
1051 names by passing the extension strings returned by `glGetString',
1052 `gluGetString', `glXGetClientString', `glXQueryExtensionsString', or
1053 `glXQueryServerString', respectively, as EXTSTRING.")
1055 (define-glu-procedures
1068 Specifies the quadrics object (created with `gluNewQuadric').
1071 Specifies the radius of the cylinder at Z = 0.
1074 Specifies the radius of the cylinder at Z = HEIGHT.
1077 Specifies the height of the cylinder.
1080 Specifies the number of subdivisions around the Z axis.
1083 Specifies the number of subdivisions along the Z axis.
1085 `gluCylinder' draws a cylinder oriented along the Z axis. The base of
1086 the cylinder is placed at Z = 0 and the top at Z=HEIGHT . Like a
1087 sphere, a cylinder is subdivided around the Z axis into slices and along
1088 the Z axis into stacks.
1090 Note that if TOP is set to 0.0, this routine generates a cone.
1092 If the orientation is set to `GLU_OUTSIDE' (with
1093 `gluQuadricOrientation'), then any generated normals point away from the
1094 Z axis. Otherwise, they point toward the Z axis.
1096 If texturing is turned on (with `gluQuadricTexture'), then texture
1097 coordinates are generated so that T ranges linearly from 0.0 at Z = 0 to
1098 1.0 at Z = HEIGHT, and S ranges from 0.0 at the +Y axis, to 0.25 at the
1099 +X axis, to 0.5 at the -Y axis, to 0.75 at the \\-X axis, and back to 1.0
1102 (define-glu-procedures
1103 ((gluDeleteNurbsRenderer (nurb GLUnurbs*) -> void))
1104 "Destroy a NURBS object.
1107 Specifies the NURBS object to be destroyed.
1109 `gluDeleteNurbsRenderer' destroys the NURBS object (which was created
1110 with `gluNewNurbsRenderer') and frees any memory it uses. Once
1111 `gluDeleteNurbsRenderer' has been called, NURB cannot be used again.")
1113 (define-glu-procedures
1114 ((gluDeleteQuadric (quad GLUquadric*) -> void))
1115 "Destroy a quadrics object.
1118 Specifies the quadrics object to be destroyed.
1120 `gluDeleteQuadric' destroys the quadrics object (created with
1121 `gluNewQuadric') and frees any memory it uses. Once `gluDeleteQuadric'
1122 has been called, QUAD cannot be used again.")
1124 (define-glu-procedures
1125 ((gluDeleteTess (tess GLUtesselator*) -> void))
1126 "Destroy a tessellation object.
1129 Specifies the tessellation object to destroy.
1131 `gluDeleteTess' destroys the indicated tessellation object (which was
1132 created with `gluNewTess') and frees any memory that it used.")
1134 (define-glu-procedures
1146 Specifies the quadrics object (created with `gluNewQuadric').
1149 Specifies the inner radius of the disk (may be 0).
1152 Specifies the outer radius of the disk.
1155 Specifies the number of subdivisions around the Z axis.
1158 Specifies the number of concentric rings about the origin into
1159 which the disk is subdivided.
1161 `gluDisk' renders a disk on the Z = 0 plane. The disk has a radius of
1162 OUTER and contains a concentric circular hole with a radius of INNER. If
1163 INNER is 0, then no hole is generated. The disk is subdivided around
1164 the Z axis into slices (like pizza slices) and also about the Z axis
1165 into rings (as specified by SLICES and LOOPS, respectively).
1167 With respect to orientation, the +Z side of the disk is considered to be
1168 ``outside'' (see `gluQuadricOrientation'). This means that if the
1169 orientation is set to `GLU_OUTSIDE', then any normals generated point
1170 along the +Z axis. Otherwise, they point along the \\-Z axis.
1172 If texturing has been turned on (with `gluQuadricTexture'), texture
1173 coordinates are generated linearly such that where R=OUTER , the value
1174 at (R, 0, 0) is (1, 0.5), at (0, R, 0) it is (0.5, 1), at (\\-R, 0, 0) it
1175 is (0, 0.5), and at (0, \\-R, 0) it is (0.5, 0).")
1177 (define-glu-procedures
1182 "Produce an error string from a GL or GLU error code.
1185 Specifies a GL or GLU error code.
1187 `gluErrorString' produces an error string from a GL or GLU error code.
1188 The string is in ISO Latin 1 format. For example,
1189 `gluErrorString'(`GLU_OUT_OF_MEMORY') returns the string OUT OF MEMORY.
1191 The standard GLU error codes are `GLU_INVALID_ENUM',
1192 `GLU_INVALID_VALUE', and `GLU_OUT_OF_MEMORY'. Certain other GLU
1193 functions can return specialized error codes through callbacks. See the
1194 `glGetError' reference page for the list of GL error codes.
1196 `NULL' is returned if ERROR is not a valid GL or GLU error code.")
1198 (define-glu-procedures
1199 ((gluGetNurbsProperty
1205 "Get a NURBS property.
1208 Specifies the NURBS object (created with `gluNewNurbsRenderer').
1211 Specifies the property whose value is to be fetched. Valid values
1212 are `GLU_CULLING', `GLU_SAMPLING_TOLERANCE', `GLU_DISPLAY_MODE',
1213 `GLU_AUTO_LOAD_MATRIX', `GLU_PARAMETRIC_TOLERANCE',
1214 `GLU_SAMPLING_METHOD', `GLU_U_STEP', `GLU_V_STEP', and
1218 Specifies a pointer to the location into which the value of the
1219 named property is written.
1221 `gluGetNurbsProperty' retrieves properties stored in a NURBS object.
1222 These properties affect the way that NURBS curves and surfaces are
1223 rendered. See the `gluNurbsProperty' reference page for information
1224 about what the properties are and what they do.")
1226 (define-glu-procedures
1227 ((gluGetString (name GLenum) -> const-GLubyte-*))
1228 "Return a string describing the GLU version or GLU extensions .
1231 Specifies a symbolic constant, one of `GLU_VERSION', or
1234 `gluGetString' returns a pointer to a static string describing the GLU
1235 version or the GLU extensions that are supported.
1237 The version number is one of the following forms:
1239 MAJOR_NUMBER.MINOR_NUMBERMAJOR_NUMBER.MINOR_NUMBER.RELEASE_NUMBER.
1241 The version string is of the following form:
1243 VERSION NUMBER<SPACE>VENDOR-SPECIFIC INFORMATION
1245 Vendor-specific information is optional. Its format and contents depend
1246 on the implementation.
1248 The standard GLU contains a basic set of features and capabilities. If
1249 a company or group of companies wish to support other features, these
1250 may be included as extensions to the GLU. If NAME is `GLU_EXTENSIONS',
1251 then `gluGetString' returns a space-separated list of names of supported
1252 GLU extensions. (Extension names never contain spaces.)
1254 All strings are null-terminated.
1256 NULL is returned if NAME is not `GLU_VERSION' or `GLU_EXTENSIONS'.")
1258 (define-glu-procedures
1259 ((gluGetTessProperty
1260 (tess GLUtesselator*)
1265 "Get a tessellation object property.
1268 Specifies the tessellation object (created with `gluNewTess').
1271 Specifies the property whose value is to be fetched. Valid values
1272 are `GLU_TESS_WINDING_RULE', `GLU_TESS_BOUNDARY_ONLY', and
1273 `GLU_TESS_TOLERANCE'.
1276 Specifies a pointer to the location into which the value of the
1277 named property is written.
1279 `gluGetTessProperty' retrieves properties stored in a tessellation
1280 object. These properties affect the way that tessellation objects are
1281 interpreted and rendered. See the `gluTessProperty' reference page for
1282 information about the properties and what they do.")
1284 (define-glu-procedures
1285 ((gluLoadSamplingMatrices
1287 (model const-GLfloat-*)
1288 (perspective const-GLfloat-*)
1289 (view const-GLint-*)
1292 "Load NURBS sampling and culling matrices.
1295 Specifies the NURBS object (created with `gluNewNurbsRenderer').
1298 Specifies a modelview matrix (as from a `glGetFloatv' call).
1301 Specifies a projection matrix (as from a `glGetFloatv' call).
1304 Specifies a viewport (as from a `glGetIntegerv' call).
1306 `gluLoadSamplingMatrices' uses MODEL, PERSPECTIVE, and VIEW to recompute
1307 the sampling and culling matrices stored in NURB. The sampling matrix
1308 determines how finely a NURBS curve or surface must be tessellated to
1309 satisfy the sampling tolerance (as determined by the
1310 `GLU_SAMPLING_TOLERANCE' property). The culling matrix is used in
1311 deciding if a NURBS curve or surface should be culled before rendering
1312 (when the `GLU_CULLING' property is turned on).
1314 `gluLoadSamplingMatrices' is necessary only if the
1315 `GLU_AUTO_LOAD_MATRIX' property is turned off (see `gluNurbsProperty').
1316 Although it can be convenient to leave the `GLU_AUTO_LOAD_MATRIX'
1317 property turned on, there can be a performance penalty for doing so. (A
1318 round trip to the GL server is needed to fetch the current values of the
1319 modelview matrix, projection matrix, and viewport.)")
1321 (define-glu-procedures
1334 "Define a viewing transformation.
1341 Specifies the position of the eye point.
1348 Specifies the position of the reference point.
1355 Specifies the direction of the UP vector.
1357 `gluLookAt' creates a viewing matrix derived from an eye point, a
1358 reference point indicating the center of the scene, and an UP vector.
1360 The matrix maps the reference point to the negative Z axis and the eye
1361 point to the origin. When a typical projection matrix is used, the
1362 center of the scene therefore maps to the center of the viewport.
1363 Similarly, the direction described by the UP vector projected onto the
1364 viewing plane is mapped to the positive Y axis so that it points upward
1365 in the viewport. The UP vector must not be parallel to the line of
1366 sight from the eye point to the reference point.
1370 F=((CENTERX-EYEX), (CENTERY-EYEY), (CENTERZ-EYEZ),)
1374 Let UP be the vector (UPX,UPYUPZ) .
1376 Then normalize as follows: F=F/∥F,∥,
1378 UP^″=UP/∥UP,∥,
1382 Finally, let S=F×UP^″ , and U=S×F .
1386 M is then constructed as follows: M=((S\u2061[0,] S\u2061[1,] S\u2061[2,] 0), (U\u2061[0,]
1387 U\u2061[1,] U\u2061[2,] 0), (-F\u2061[0,] -F\u2061[1,] -F\u2061[2,] 0), (0 0 0 1),)
1389 and `gluLookAt' is equivalent to
1393 glTranslated(-eyex, -eyey, -eyez);")
1395 (define-glu-procedures
1396 ((gluNewNurbsRenderer -> GLUnurbs*))
1397 "Create a NURBS object.
1399 `gluNewNurbsRenderer' creates and returns a pointer to a new NURBS
1400 object. This object must be referred to when calling NURBS rendering
1401 and control functions. A return value of 0 means that there is not
1402 enough memory to allocate the object.")
1404 (define-glu-procedures
1405 ((gluNewQuadric -> GLUquadric*))
1406 "Create a quadrics object.
1408 `gluNewQuadric' creates and returns a pointer to a new quadrics object.
1409 This object must be referred to when calling quadrics rendering and
1410 control functions. A return value of 0 means that there is not enough
1411 memory to allocate the object.")
1413 (define-glu-procedures
1414 ((gluNewTess -> GLUtesselator*))
1415 "Create a tessellation object.
1417 `gluNewTess' creates and returns a pointer to a new tessellation object.
1418 This object must be referred to when calling tessellation functions. A
1419 return value of 0 means that there is not enough memory to allocate the
1422 (define-glu-procedures
1424 (tess GLUtesselator*)
1428 "Mark the beginning of another contour.
1431 Specifies the tessellation object (created with `gluNewTess').
1434 Specifies the type of the contour being defined. Valid values are
1435 `GLU_EXTERIOR', `GLU_INTERIOR', `GLU_UNKNOWN', `GLU_CCW', and
1438 `gluNextContour' is used in describing polygons with multiple contours.
1439 After the first contour has been described through a series of
1440 `gluTessVertex' calls, a `gluNextContour' call indicates that the
1441 previous contour is complete and that the next contour is about to
1442 begin. Another series of `gluTessVertex' calls is then used to describe
1443 the new contour. This process can be repeated until all contours have
1446 TYPE defines what type of contour follows. The legal contour types are
1450 An exterior contour defines an exterior boundary of the polygon.
1453 An interior contour defines an interior boundary of the polygon
1457 An unknown contour is analyzed by the library to determine if it is
1458 interior or exterior.
1462 The first `GLU_CCW' or `GLU_CW' contour defined is considered to be
1463 exterior. All other contours are considered to be exterior if they
1464 are oriented in the same direction (clockwise or counterclockwise)
1465 as the first contour, and interior if they are not.
1467 If one contour is of type `GLU_CCW' or `GLU_CW', then all contours must
1468 be of the same type (if they are not, then all `GLU_CCW' and `GLU_CW'
1469 contours will be changed to `GLU_UNKNOWN').
1471 Note that there is no real difference between the `GLU_CCW' and `GLU_CW'
1474 Before the first contour is described, `gluNextContour' can be called to
1475 define the type of the first contour. If `gluNextContour' is not called
1476 before the first contour, then the first contour is marked
1479 This command is obsolete and is provided for backward compatibility
1480 only. Calls to `gluNextContour' are mapped to `gluTessEndContour'
1481 followed by `gluTessBeginContour'.")
1483 (define-glu-procedures
1484 ((gluNurbsCallbackDataEXT
1489 "Set a user data pointer.
1492 Specifies the NURBS object (created with `gluNewNurbsRenderer').
1495 Specifies a pointer to the user's data.
1497 `gluNurbsCallbackDataEXT' is used to pass a pointer to the application's
1498 data to NURBS tessellator. A copy of this pointer will be passed by the
1499 tessellator in the NURBS callback functions (set by `gluNurbsCallback').")
1501 (define-glu-procedures
1502 ((gluNurbsCallbackData
1507 "Set a user data pointer.
1510 Specifies the NURBS object (created with `gluNewNurbsRenderer').
1513 Specifies a pointer to the user's data.
1515 `gluNurbsCallbackData' is used to pass a pointer to the application's
1516 data to NURBS tessellator. A copy of this pointer will be passed by the
1517 tessellator in the NURBS callback functions (set by `gluNurbsCallback').")
1519 (define-glu-procedures
1523 (CallBackFunc _GLUfuncptr)
1526 "Define a callback for a NURBS object.
1529 Specifies the NURBS object (created with `gluNewNurbsRenderer').
1532 Specifies the callback being defined. Valid values are
1533 `GLU_NURBS_BEGIN', `GLU_NURBS_VERTEX', `GLU_NURBS_NORMAL',
1534 `GLU_NURBS_COLOR', `GLU_NURBS_TEXTURE_COORD', `GLU_NURBS_END',
1535 `GLU_NURBS_BEGIN_DATA', `GLU_NURBS_VERTEX_DATA',
1536 `GLU_NURBS_NORMAL_DATA', `GLU_NURBS_COLOR_DATA',
1537 `GLU_NURBS_TEXTURE_COORD_DATA', `GLU_NURBS_END_DATA', and
1541 Specifies the function that the callback calls.
1543 `gluNurbsCallback' is used to define a callback to be used by a NURBS
1544 object. If the specified callback is already defined, then it is
1545 replaced. If CALLBACKFUNC is NULL, then this callback will not get
1546 invoked and the related data, if any, will be lost.
1548 Except the error callback, these callbacks are used by NURBS tessellator
1549 (when `GLU_NURBS_MODE' is set to be `GLU_NURBS_TESSELLATOR') to return
1550 back the OpenGL polygon primitives resulting from the tessellation. Note
1551 that there are two versions of each callback: one with a user data
1552 pointer and one without. If both versions for a particular callback are
1553 specified then the callback with the user data pointer will be used.
1554 Note that ``userData'' is a copy of the pointer that was specified at
1555 the last call to `gluNurbsCallbackData'.
1557 The error callback function is effective no matter which value that
1558 `GLU_NURBS_MODE' is set to. All other callback functions are effective
1559 only when `GLU_NURBS_MODE' is set to `GLU_NURBS_TESSELLATOR'.
1561 The legal callbacks are as follows:
1566 The begin callback indicates the start of a primitive. The
1567 function takes a single argument of type GLenum, which can be one
1568 of `GLU_LINES', `GLU_LINE_STRIP', `GLU_TRIANGLE_FAN',
1569 `GLU_TRIANGLE_STRIP', `GLU_TRIANGLES', or `GLU_QUAD_STRIP'. The
1570 default begin callback function is NULL. The function prototype
1571 for this callback looks like:
1573 `GLU_NURBS_BEGIN_DATA'
1576 The same as the `GLU_NURBS_BEGIN' callback except that it takes an
1577 additional pointer argument. This pointer is a copy of the pointer
1578 that was specified at the last call to `gluNurbsCallbackData'. The
1579 default callback function is NULL. The function prototype for this
1580 callback function looks like:
1585 The vertex callback indicates a vertex of the primitive. The
1586 coordinates of the vertex are stored in the parameter ``vertex''.
1587 All the generated vertices have dimension 3; that is, homogeneous
1588 coordinates have been transformed into affine coordinates. The
1589 default vertex callback function is NULL. The function prototype
1590 for this callback function looks like:
1592 `GLU_NURBS_VERTEX_DATA'
1595 This is the same as the `GLU_NURBS_VERTEX' callback, except that it
1596 takes an additional pointer argument. This pointer is a copy of
1597 the pointer that was specified at the last call to
1598 `gluNurbsCallbackData'. The default callback function is NULL. The
1599 function prototype for this callback function looks like:
1604 The normal callback is invoked as the vertex normal is generated.
1605 The components of the normal are stored in the parameter
1606 ``normal.'' In the case of a NURBS curve, the callback function is
1607 effective only when the user provides a normal map
1608 (`GLU_MAP1_NORMAL'). In the case of a NURBS surface, if a normal
1609 map (`GLU_MAP2_NORMAL') is provided, then the generated normal is
1610 computed from the normal map. If a normal map is not provided,
1611 then a surface normal is computed in a manner similar to that
1612 described for evaluators when `GLU_AUTO_NORMAL' is enabled. The
1613 default normal callback function is NULL. The function prototype
1614 for this callback function looks like:
1616 `GLU_NURBS_NORMAL_DATA'
1619 The same as the `GLU_NURBS_NORMAL' callback except that it takes an
1620 additional pointer argument. This pointer is a copy of the pointer
1621 that was specified at the last call to `gluNurbsCallbackData'. The
1622 default callback function is NULL. The function prototype for this
1623 callback function looks like:
1628 The color callback is invoked as the color of a vertex is
1629 generated. The components of the color are stored in the parameter
1630 ``color.'' This callback is effective only when the user provides a
1631 color map (`GLU_MAP1_COLOR_4' or `GLU_MAP2_COLOR_4'). ``color''
1632 contains four components: R, G, B, A. The default color callback
1633 function is NULL. The prototype for this callback function looks
1636 `GLU_NURBS_COLOR_DATA'
1639 The same as the `GLU_NURBS_COLOR' callback except that it takes an
1640 additional pointer argument. This pointer is a copy of the pointer
1641 that was specified at the last call to `gluNurbsCallbackData'. The
1642 default callback function is NULL. The function prototype for this
1643 callback function looks like:
1645 `GLU_NURBS_TEXTURE_COORD'
1648 The texture callback is invoked as the texture coordinates of a
1649 vertex are generated. These coordinates are stored in the
1650 parameter ``texCoord.'' The number of texture coordinates can be 1,
1651 2, 3, or 4 depending on which type of texture map is specified
1652 (`GLU_MAP1_TEXTURE_COORD_1', `GLU_MAP1_TEXTURE_COORD_2',
1653 `GLU_MAP1_TEXTURE_COORD_3', `GLU_MAP1_TEXTURE_COORD_4',
1654 `GLU_MAP2_TEXTURE_COORD_1', `GLU_MAP2_TEXTURE_COORD_2',
1655 `GLU_MAP2_TEXTURE_COORD_3', `GLU_MAP2_TEXTURE_COORD_4'). If no
1656 texture map is specified, this callback function will not be
1657 called. The default texture callback function is NULL. The
1658 function prototype for this callback function looks like:
1660 `GLU_NURBS_TEXTURE_COORD_DATA'
1663 This is the same as the `GLU_NURBS_TEXTURE_COORD' callback, except
1664 that it takes an additional pointer argument. This pointer is a
1665 copy of the pointer that was specified at the last call to
1666 `gluNurbsCallbackData'. The default callback function is NULL. The
1667 function prototype for this callback function looks like:
1672 The end callback is invoked at the end of a primitive. The default
1673 end callback function is NULL. The function prototype for this
1674 callback function looks like:
1676 `GLU_NURBS_END_DATA'
1679 This is the same as the `GLU_NURBS_END' callback, except that it
1680 takes an additional pointer argument. This pointer is a copy of
1681 the pointer that was specified at the last call to
1682 `gluNurbsCallbackData'. The default callback function is NULL. The
1683 function prototype for this callback function looks like:
1688 The error function is called when an error is encountered. Its
1689 single argument is of type GLenum, and it indicates the specific
1690 error that occurred. There are 37 errors unique to NURBS, named
1691 `GLU_NURBS_ERROR1' through `GLU_NURBS_ERROR37'. Character strings
1692 describing these errors can be retrieved with `gluErrorString'.
1695 void begin( GLenum type );
1698 void beginData(GLenum type, void *userData);
1701 void vertex( GLfloat *vertex );
1704 void vertexData( GLfloat *vertex, void *userData );
1707 void normal( GLfloat *normal );
1710 void normalData( GLfloat *normal, void *userData );
1713 void color( GLfloat *color );
1716 void colorData( GLfloat *color, void *userData );
1719 void texCoord( GLfloat *texCoord );
1722 void texCoordData( GLfloat *texCoord, void *userData );
1728 void endData( void *userData );")
1730 (define-glu-procedures
1741 "Define the shape of a NURBS curve.
1744 Specifies the NURBS object (created with `gluNewNurbsRenderer').
1747 Specifies the number of knots in KNOTS. KNOTCOUNT equals the
1748 number of control points plus the order.
1751 Specifies an array of KNOTCOUNT nondecreasing knot values.
1754 Specifies the offset (as a number of single-precision
1755 floating-point values) between successive curve control points.
1758 Specifies a pointer to an array of control points. The coordinates
1759 must agree with TYPE, specified below.
1762 Specifies the order of the NURBS curve. ORDER equals degree + 1,
1763 hence a cubic curve has an order of 4.
1766 Specifies the type of the curve. If this curve is defined within a
1767 `gluBeginCurve'/`gluEndCurve' pair, then the type can be any of the
1768 valid one-dimensional evaluator types (such as `GLU_MAP1_VERTEX_3'
1769 or `GLU_MAP1_COLOR_4'). Between a `gluBeginTrim'/`gluEndTrim'
1770 pair, the only valid types are `GLU_MAP1_TRIM_2' and
1773 Use `gluNurbsCurve' to describe a NURBS curve.
1775 When `gluNurbsCurve' appears between a `gluBeginCurve'/`gluEndCurve'
1776 pair, it is used to describe a curve to be rendered. Positional,
1777 texture, and color coordinates are associated by presenting each as a
1778 separate `gluNurbsCurve' between a `gluBeginCurve'/`gluEndCurve' pair.
1779 No more than one call to `gluNurbsCurve' for each of color, position,
1780 and texture data can be made within a single
1781 `gluBeginCurve'/`gluEndCurve' pair. Exactly one call must be made to
1782 describe the position of the curve (a TYPE of `GLU_MAP1_VERTEX_3' or
1783 `GLU_MAP1_VERTEX_4').
1785 When `gluNurbsCurve' appears between a `gluBeginTrim'/`gluEndTrim' pair,
1786 it is used to describe a trimming curve on a NURBS surface. If TYPE is
1787 `GLU_MAP1_TRIM_2', then it describes a curve in two-dimensional (U and
1788 V) parameter space. If it is `GLU_MAP1_TRIM_3', then it describes a
1789 curve in two-dimensional homogeneous (U, V, and W) parameter space. See
1790 the `gluBeginTrim' reference page for more discussion about trimming
1793 (define-glu-procedures
1800 "Set a NURBS property.
1803 Specifies the NURBS object (created with `gluNewNurbsRenderer').
1806 Specifies the property to be set. Valid values are
1807 `GLU_SAMPLING_TOLERANCE', `GLU_DISPLAY_MODE', `GLU_CULLING',
1808 `GLU_AUTO_LOAD_MATRIX', `GLU_PARAMETRIC_TOLERANCE',
1809 `GLU_SAMPLING_METHOD', `GLU_U_STEP', `GLU_V_STEP', or
1813 Specifies the value of the indicated property. It may be a numeric
1814 value or one of `GLU_OUTLINE_POLYGON', `GLU_FILL',
1815 `GLU_OUTLINE_PATCH', `GLU_TRUE', `GLU_FALSE', `GLU_PATH_LENGTH',
1816 `GLU_PARAMETRIC_ERROR', `GLU_DOMAIN_DISTANCE',
1817 `GLU_NURBS_RENDERER', or `GLU_NURBS_TESSELLATOR'.
1819 `gluNurbsProperty' is used to control properties stored in a NURBS
1820 object. These properties affect the way that a NURBS curve is rendered.
1821 The accepted values for PROPERTY are as follows:
1824 VALUE should be set to be either `GLU_NURBS_RENDERER' or
1825 `GLU_NURBS_TESSELLATOR'. When set to `GLU_NURBS_RENDERER', NURBS
1826 objects are tessellated into OpenGL primitives and sent to the
1827 pipeline for rendering. When set to `GLU_NURBS_TESSELLATOR', NURBS
1828 objects are tessellated into OpenGL primitives but the vertices,
1829 normals, colors, and/or textures are retrieved back through a
1830 callback interface (see `gluNurbsCallback'). This allows the user
1831 to cache the tessellated results for further processing. The
1832 initial value is `GLU_NURBS_RENDERER'.
1834 `GLU_SAMPLING_METHOD'
1835 Specifies how a NURBS surface should be tessellated. VALUE may be
1836 one of `GLU_PATH_LENGTH', `GLU_PARAMETRIC_ERROR',
1837 `GLU_DOMAIN_DISTANCE', `GLU_OBJECT_PATH_LENGTH', or
1838 `GLU_OBJECT_PARAMETRIC_ERROR'. When set to `GLU_PATH_LENGTH', the
1839 surface is rendered so that the maximum length, in pixels, of the
1840 edges of the tessellation polygons is no greater than what is
1841 specified by `GLU_SAMPLING_TOLERANCE'.
1843 `GLU_PARAMETRIC_ERROR' specifies that the surface is rendered in
1844 such a way that the value specified by `GLU_PARAMETRIC_TOLERANCE'
1845 describes the maximum distance, in pixels, between the tessellation
1846 polygons and the surfaces they approximate.
1848 `GLU_DOMAIN_DISTANCE' allows users to specify, in parametric
1849 coordinates, how many sample points per unit length are taken in U,
1852 `GLU_OBJECT_PATH_LENGTH' is similar to `GLU_PATH_LENGTH' except
1853 that it is view independent; that is, the surface is rendered so
1854 that the maximum length, in object space, of edges of the
1855 tessellation polygons is no greater than what is specified by
1856 `GLU_SAMPLING_TOLERANCE'.
1858 `GLU_OBJECT_PARAMETRIC_ERROR' is similar to `GLU_PARAMETRIC_ERROR'
1859 except that it is view independent; that is, the surface is
1860 rendered in such a way that the value specified by
1861 `GLU_PARAMETRIC_TOLERANCE' describes the maximum distance, in
1862 object space, between the tessellation polygons and the surfaces
1865 The initial value of `GLU_SAMPLING_METHOD' is `GLU_PATH_LENGTH'.
1867 `GLU_SAMPLING_TOLERANCE'
1868 Specifies the maximum length, in pixels or in object space length
1869 unit, to use when the sampling method is set to `GLU_PATH_LENGTH'
1870 or `GLU_OBJECT_PATH_LENGTH'. The NURBS code is conservative when
1871 rendering a curve or surface, so the actual length can be somewhat
1872 shorter. The initial value is 50.0 pixels.
1874 `GLU_PARAMETRIC_TOLERANCE'
1875 Specifies the maximum distance, in pixels or in object space length
1876 unit, to use when the sampling method is `GLU_PARAMETRIC_ERROR' or
1877 `GLU_OBJECT_PARAMETRIC_ERROR'. The initial value is 0.5.
1880 Specifies the number of sample points per unit length taken along
1881 the U axis in parametric coordinates. It is needed when
1882 `GLU_SAMPLING_METHOD' is set to `GLU_DOMAIN_DISTANCE'. The initial
1886 Specifies the number of sample points per unit length taken along
1887 the V axis in parametric coordinate. It is needed when
1888 `GLU_SAMPLING_METHOD' is set to `GLU_DOMAIN_DISTANCE'. The initial
1892 VALUE can be set to `GLU_OUTLINE_POLYGON', `GLU_FILL', or
1893 `GLU_OUTLINE_PATCH'. When `GLU_NURBS_MODE' is set to be
1894 `GLU_NURBS_RENDERER', VALUE defines how a NURBS surface should be
1895 rendered. When VALUE is set to `GLU_FILL', the surface is rendered
1896 as a set of polygons. When VALUE is set to `GLU_OUTLINE_POLYGON',
1897 the NURBS library draws only the outlines of the polygons created
1898 by tessellation. When VALUE is set to `GLU_OUTLINE_PATCH' just the
1899 outlines of patches and trim curves defined by the user are drawn.
1901 When `GLU_NURBS_MODE' is set to be `GLU_NURBS_TESSELLATOR', VALUE
1902 defines how a NURBS surface should be tessellated. When
1903 `GLU_DISPLAY_MODE' is set to `GLU_FILL' or `GLU_OUTLINE_POLYGON',
1904 the NURBS surface is tessellated into OpenGL triangle primitives
1905 that can be retrieved back through callback functions. If
1906 `GLU_DISPLAY_MODE' is set to `GLU_OUTLINE_PATCH', only the outlines
1907 of the patches and trim curves are generated as a sequence of line
1908 strips that can be retrieved back through callback functions.
1910 The initial value is `GLU_FILL'.
1913 VALUE is a boolean value that, when set to `GLU_TRUE', indicates
1914 that a NURBS curve should be discarded prior to tessellation if its
1915 control points lie outside the current viewport. The initial value
1918 `GLU_AUTO_LOAD_MATRIX'
1919 VALUE is a boolean value. When set to `GLU_TRUE', the NURBS code
1920 downloads the projection matrix, the modelview matrix, and the
1921 viewport from the GL server to compute sampling and culling
1922 matrices for each NURBS curve that is rendered. Sampling and
1923 culling matrices are required to determine the tessellation of a
1924 NURBS surface into line segments or polygons and to cull a NURBS
1925 surface if it lies outside the viewport.
1927 If this mode is set to `GLU_FALSE', then the program needs to
1928 provide a projection matrix, a modelview matrix, and a viewport for
1929 the NURBS renderer to use to construct sampling and culling
1930 matrices. This can be done with the `gluLoadSamplingMatrices'
1931 function. This mode is initially set to `GLU_TRUE'. Changing it
1932 from `GLU_TRUE' to `GLU_FALSE' does not affect the sampling and
1933 culling matrices until `gluLoadSamplingMatrices' is called.")
1935 (define-glu-procedures
1950 "Define the shape of a NURBS surface.
1953 Specifies the NURBS object (created with `gluNewNurbsRenderer').
1956 Specifies the number of knots in the parametric U direction.
1959 Specifies an array of SKNOTCOUNT nondecreasing knot values in the
1960 parametric U direction.
1963 Specifies the number of knots in the parametric V direction.
1966 Specifies an array of TKNOTCOUNT nondecreasing knot values in the
1967 parametric V direction.
1970 Specifies the offset (as a number of single-precision
1971 floating-point values) between successive control points in the
1972 parametric U direction in CONTROL.
1975 Specifies the offset (in single-precision floating-point values)
1976 between successive control points in the parametric V direction in
1980 Specifies an array containing control points for the NURBS surface.
1981 The offsets between successive control points in the parametric U
1982 and V directions are given by SSTRIDE and TSTRIDE.
1985 Specifies the order of the NURBS surface in the parametric U
1986 direction. The order is one more than the degree, hence a surface
1987 that is cubic in U has a U order of 4.
1990 Specifies the order of the NURBS surface in the parametric V
1991 direction. The order is one more than the degree, hence a surface
1992 that is cubic in V has a V order of 4.
1995 Specifies type of the surface. TYPE can be any of the valid
1996 two-dimensional evaluator types (such as `GLU_MAP2_VERTEX_3' or
1997 `GLU_MAP2_COLOR_4').
1999 Use `gluNurbsSurface' within a NURBS (Non-Uniform Rational B-Spline)
2000 surface definition to describe the shape of a NURBS surface (before any
2001 trimming). To mark the beginning of a NURBS surface definition, use the
2002 `gluBeginSurface' command. To mark the end of a NURBS surface
2003 definition, use the `gluEndSurface' command. Call `gluNurbsSurface'
2004 within a NURBS surface definition only.
2006 Positional, texture, and color coordinates are associated with a surface
2007 by presenting each as a separate `gluNurbsSurface' between a
2008 `gluBeginSurface'/`gluEndSurface' pair. No more than one call to
2009 `gluNurbsSurface' for each of color, position, and texture data can be
2010 made within a single `gluBeginSurface'/`gluEndSurface' pair. Exactly
2011 one call must be made to describe the position of the surface (a TYPE of
2012 `GLU_MAP2_VERTEX_3' or `GLU_MAP2_VERTEX_4').
2014 A NURBS surface can be trimmed by using the commands `gluNurbsCurve' and
2015 `gluPwlCurve' between calls to `gluBeginTrim' and `gluEndTrim'.
2017 Note that a `gluNurbsSurface' with SKNOTCOUNT knots in the U direction
2018 and TKNOTCOUNT knots in the V direction with orders SORDER and TORDER
2019 must have (SKNOTCOUNT - SORDER) TIMES (TKNOTCOUNT - TORDER) control
2022 (define-glu-procedures
2030 "Define a 2D orthographic projection matrix.
2035 Specify the coordinates for the left and right vertical clipping
2041 Specify the coordinates for the bottom and top horizontal clipping
2044 `gluOrtho2D' sets up a two-dimensional orthographic viewing region. This
2045 is equivalent to calling `glOrtho' with NEAR=-1 and FAR=1 .")
2047 (define-glu-procedures
2058 "Draw an arc of a disk.
2061 Specifies a quadrics object (created with `gluNewQuadric').
2064 Specifies the inner radius of the partial disk (can be 0).
2067 Specifies the outer radius of the partial disk.
2070 Specifies the number of subdivisions around the Z axis.
2073 Specifies the number of concentric rings about the origin into
2074 which the partial disk is subdivided.
2077 Specifies the starting angle, in degrees, of the disk portion.
2080 Specifies the sweep angle, in degrees, of the disk portion.
2082 `gluPartialDisk' renders a partial disk on the Z=0 plane. A partial
2083 disk is similar to a full disk, except that only the subset of the disk
2084 from START through START + SWEEP is included (where 0 degrees is along
2085 the +\\f2y\\f axis, 90 degrees along the +X axis, 180 degrees along the
2086 \\-Y axis, and 270 degrees along the \\-X axis).
2088 The partial disk has a radius of OUTER and contains a concentric
2089 circular hole with a radius of INNER. If INNER is 0, then no hole is
2090 generated. The partial disk is subdivided around the Z axis into slices
2091 (like pizza slices) and also about the Z axis into rings (as specified
2092 by SLICES and LOOPS, respectively).
2094 With respect to orientation, the +Z side of the partial disk is
2095 considered to be outside (see `gluQuadricOrientation'). This means that
2096 if the orientation is set to `GLU_OUTSIDE', then any normals generated
2097 point along the +Z axis. Otherwise, they point along the \\-Z axis.
2099 If texturing is turned on (with `gluQuadricTexture'), texture
2100 coordinates are generated linearly such that where R=OUTER , the value
2101 at (R, 0, 0) is (1.0, 0.5), at (0, R, 0) it is (0.5, 1.0), at (\\-R, 0,
2102 0) it is (0.0, 0.5), and at (0, \\-R, 0) it is (0.5, 0.0).")
2104 (define-glu-procedures
2112 "Set up a perspective projection matrix.
2115 Specifies the field of view angle, in degrees, in the Y direction.
2118 Specifies the aspect ratio that determines the field of view in the
2119 X direction. The aspect ratio is the ratio of X (width) to Y
2123 Specifies the distance from the viewer to the near clipping plane
2127 Specifies the distance from the viewer to the far clipping plane
2130 `gluPerspective' specifies a viewing frustum into the world coordinate
2131 system. In general, the aspect ratio in `gluPerspective' should match
2132 the aspect ratio of the associated viewport. For example, ASPECT=2.0
2133 means the viewer's angle of view is twice as wide in X as it is in Y. If
2134 the viewport is twice as wide as it is tall, it displays the image
2137 The matrix generated by `gluPerspective' is multipled by the current
2138 matrix, just as if `glMultMatrix' were called with the generated matrix.
2139 To load the perspective matrix onto the current matrix stack instead,
2140 precede the call to `gluPerspective' with a call to `glLoadIdentity'.
2142 Given F defined as follows:
2144 F=COTANGENT\u2061(FOVY/2,) The generated matrix is
2146 ((F/ASPECT 0 0 0), (0 F 0 0), (0 0 ZFAR+ZNEAR,/ZNEAR-ZFAR,
2147 2×ZFAR×ZNEAR,/ZNEAR-ZFAR,), (0 0 -1 0),)")
2149 (define-glu-procedures
2158 "Define a picking region.
2163 Specify the center of a picking region in window coordinates.
2168 Specify the width and height, respectively, of the picking region
2169 in window coordinates.
2172 Specifies the current viewport (as from a `glGetIntegerv' call).
2174 `gluPickMatrix' creates a projection matrix that can be used to restrict
2175 drawing to a small region of the viewport. This is typically useful to
2176 determine what objects are being drawn near the cursor. Use
2177 `gluPickMatrix' to restrict drawing to a small region around the cursor.
2178 Then, enter selection mode (with `glRenderMode') and rerender the scene.
2179 All primitives that would have been drawn near the cursor are identified
2180 and stored in the selection buffer.
2182 The matrix created by `gluPickMatrix' is multiplied by the current
2183 matrix just as if `glMultMatrix' is called with the generated matrix. To
2184 effectively use the generated pick matrix for picking, first call
2185 `glLoadIdentity' to load an identity matrix onto the perspective matrix
2186 stack. Then call `gluPickMatrix', and, finally, call a command (such as
2187 `gluPerspective') to multiply the perspective matrix by the pick matrix.
2189 When using `gluPickMatrix' to pick NURBS, be careful to turn off the
2190 NURBS property `GLU_AUTO_LOAD_MATRIX'. If `GLU_AUTO_LOAD_MATRIX' is not
2191 turned off, then any NURBS surface rendered is subdivided differently
2192 with the pick matrix than the way it was subdivided without the pick
2195 (define-glu-procedures
2200 (model const-GLdouble-*)
2201 (proj const-GLdouble-*)
2202 (view const-GLint-*)
2208 "Map object coordinates to window coordinates.
2215 Specify the object coordinates.
2218 Specifies the current modelview matrix (as from a `glGetDoublev'
2222 Specifies the current projection matrix (as from a `glGetDoublev'
2226 Specifies the current viewport (as from a `glGetIntegerv' call).
2233 Return the computed window coordinates.
2235 `gluProject' transforms the specified object coordinates into window
2236 coordinates using MODEL, PROJ, and VIEW. The result is stored in WINX,
2237 WINY, and WINZ. A return value of `GLU_TRUE' indicates success, a
2238 return value of `GLU_FALSE' indicates failure.
2240 To compute the coordinates, let V=(OBJX,OBJYOBJZ1.0) represented as a
2241 matrix with 4 rows and 1 column. Then `gluProject' computes V^″ as
2246 where P is the current projection matrix PROJ and M is the current
2247 modelview matrix MODEL (both represented as 4×4 matrices in column-major
2250 The window coordinates are then computed as follows:
2252 WINX=VIEW\u2061(0,)+VIEW\u2061(2,)×(V^″\u2061(0,)+1,)/2
2253 WINY=VIEW\u2061(1,)+VIEW\u2061(3,)×(V^″\u2061(1,)+1,)/2 WINZ=(V^″\u2061(2,)+1,)/2")
2255 (define-glu-procedures
2264 "Describe a piecewise linear NURBS trimming curve.
2267 Specifies the NURBS object (created with `gluNewNurbsRenderer').
2270 Specifies the number of points on the curve.
2273 Specifies an array containing the curve points.
2276 Specifies the offset (a number of single-precision floating-point
2277 values) between points on the curve.
2280 Specifies the type of curve. Must be either `GLU_MAP1_TRIM_2' or
2283 `gluPwlCurve' describes a piecewise linear trimming curve for a NURBS
2284 surface. A piecewise linear curve consists of a list of coordinates of
2285 points in the parameter space for the NURBS surface to be trimmed. These
2286 points are connected with line segments to form a curve. If the curve
2287 is an approximation to a curve that is not piecewise linear, the points
2288 should be close enough in parameter space that the resulting path
2289 appears curved at the resolution used in the application.
2291 If TYPE is `GLU_MAP1_TRIM_2', then it describes a curve in
2292 two-dimensional (U and V) parameter space. If it is `GLU_MAP1_TRIM_3',
2293 then it describes a curve in two-dimensional homogeneous (U, V, and W)
2294 parameter space. See the `gluBeginTrim' reference page for more
2295 information about trimming curves.")
2297 (define-glu-procedures
2298 ((gluQuadricCallback
2301 (CallBackFunc _GLUfuncptr)
2304 "Define a callback for a quadrics object.
2307 Specifies the quadrics object (created with `gluNewQuadric').
2310 Specifies the callback being defined. The only valid value is
2314 Specifies the function to be called.
2316 `gluQuadricCallback' is used to define a new callback to be used by a
2317 quadrics object. If the specified callback is already defined, then it
2318 is replaced. If CALLBACKFUNC is NULL, then any existing callback is
2321 The one legal callback is `GLU_ERROR':
2324 The function is called when an error is encountered. Its single
2325 argument is of type GLenum, and it indicates the specific error
2326 that occurred. Character strings describing these errors can be
2327 retrieved with the `gluErrorString' call.")
2329 (define-glu-procedures
2330 ((gluQuadricDrawStyle
2335 "Specify the draw style desired for quadrics.
2338 Specifies the quadrics object (created with `gluNewQuadric').
2341 Specifies the desired draw style. Valid values are `GLU_FILL',
2342 `GLU_LINE', `GLU_SILHOUETTE', and `GLU_POINT'.
2344 `gluQuadricDrawStyle' specifies the draw style for quadrics rendered
2345 with QUAD. The legal values are as follows:
2348 Quadrics are rendered with polygon primitives. The polygons are
2349 drawn in a counterclockwise fashion with respect to their normals
2350 (as defined with `gluQuadricOrientation').
2353 Quadrics are rendered as a set of lines.
2356 Quadrics are rendered as a set of lines, except that edges
2357 separating coplanar faces will not be drawn.
2360 Quadrics are rendered as a set of points.")
2362 (define-glu-procedures
2368 "Specify what kind of normals are desired for quadrics.
2371 Specifies the quadrics object (created with `gluNewQuadric').
2374 Specifies the desired type of normals. Valid values are
2375 `GLU_NONE', `GLU_FLAT', and `GLU_SMOOTH'.
2377 `gluQuadricNormals' specifies what kind of normals are desired for
2378 quadrics rendered with QUAD. The legal values are as follows:
2381 No normals are generated.
2384 One normal is generated for every facet of a quadric.
2387 One normal is generated for every vertex of a quadric. This is the
2390 (define-glu-procedures
2391 ((gluQuadricOrientation
2393 (orientation GLenum)
2396 "Specify inside/outside orientation for quadrics.
2399 Specifies the quadrics object (created with `gluNewQuadric').
2402 Specifies the desired orientation. Valid values are `GLU_OUTSIDE'
2405 `gluQuadricOrientation' specifies what kind of orientation is desired
2406 for quadrics rendered with QUAD. The ORIENTATION values are as follows:
2409 Quadrics are drawn with normals pointing outward (the initial
2413 Quadrics are drawn with normals pointing inward.
2415 Note that the interpretation of OUTWARD and INWARD depends on the
2416 quadric being drawn.")
2418 (define-glu-procedures
2424 "Specify if texturing is desired for quadrics.
2427 Specifies the quadrics object (created with `gluNewQuadric').
2430 Specifies a flag indicating if texture coordinates should be
2433 `gluQuadricTexture' specifies if texture coordinates should be generated
2434 for quadrics rendered with QUAD. If the value of TEXTURE is `GLU_TRUE',
2435 then texture coordinates are generated, and if TEXTURE is `GLU_FALSE',
2436 they are not. The initial value is `GLU_FALSE'.
2438 The manner in which texture coordinates are generated depends upon the
2439 specific quadric rendered.")
2441 (define-glu-procedures
2447 (dataIn const-void-*)
2454 "Scale an image to an arbitrary size.
2457 Specifies the format of the pixel data. The following symbolic
2458 values are valid: `GLU_COLOR_INDEX', `GLU_STENCIL_INDEX',
2459 `GLU_DEPTH_COMPONENT', `GLU_RED', `GLU_GREEN', `GLU_BLUE',
2460 `GLU_ALPHA', `GLU_RGB', `GLU_RGBA', `GLU_BGR', `GLU_BGRA',
2461 `GLU_LUMINANCE', and `GLU_LUMINANCE_ALPHA'.
2466 Specify in pixels the width and height, respectively, of the source
2470 Specifies the data type for DATAIN. Must be one of
2471 `GLU_UNSIGNED_BYTE', `GLU_BYTE', `GLU_BITMAP',
2472 `GLU_UNSIGNED_SHORT', `GLU_SHORT', `GLU_UNSIGNED_INT', `GLU_INT',
2473 `GLU_FLOAT', `GLU_UNSIGNED_BYTE_3_3_2',
2474 `GLU_UNSIGNED_BYTE_2_3_3_REV', `GLU_UNSIGNED_SHORT_5_6_5',
2475 `GLU_UNSIGNED_SHORT_5_6_5_REV', `GLU_UNSIGNED_SHORT_4_4_4_4',
2476 `GLU_UNSIGNED_SHORT_4_4_4_4_REV', `GLU_UNSIGNED_SHORT_5_5_5_1',
2477 `GLU_UNSIGNED_SHORT_1_5_5_5_REV', `GLU_UNSIGNED_INT_8_8_8_8',
2478 `GLU_UNSIGNED_INT_8_8_8_8_REV', `GLU_UNSIGNED_INT_10_10_10_2', or
2479 `GLU_UNSIGNED_INT_2_10_10_10_REV'.
2482 Specifies a pointer to the source image.
2487 Specify the width and height, respectively, in pixels of the
2491 Specifies the data type for DATAOUT. Must be one of
2492 `GLU_UNSIGNED_BYTE', `GLU_BYTE', `GLU_BITMAP',
2493 `GLU_UNSIGNED_SHORT', `GLU_SHORT', `GLU_UNSIGNED_INT', `GLU_INT',
2494 `GLU_FLOAT', `GLU_UNSIGNED_BYTE_3_3_2',
2495 `GLU_UNSIGNED_BYTE_2_3_3_REV', `GLU_UNSIGNED_SHORT_5_6_5',
2496 `GLU_UNSIGNED_SHORT_5_6_5_REV', `GLU_UNSIGNED_SHORT_4_4_4_4',
2497 `GLU_UNSIGNED_SHORT_4_4_4_4_REV', `GLU_UNSIGNED_SHORT_5_5_5_1',
2498 `GLU_UNSIGNED_SHORT_1_5_5_5_REV', `GLU_UNSIGNED_INT_8_8_8_8',
2499 `GLU_UNSIGNED_INT_8_8_8_8_REV', `GLU_UNSIGNED_INT_10_10_10_2', or
2500 `GLU_UNSIGNED_INT_2_10_10_10_REV'.
2503 Specifies a pointer to the destination image.
2505 `gluScaleImage' scales a pixel image using the appropriate pixel store
2506 modes to unpack data from the source image and pack data into the
2509 When shrinking an image, `gluScaleImage' uses a box filter to sample the
2510 source image and create pixels for the destination image. When
2511 magnifying an image, the pixels from the source image are linearly
2512 interpolated to create the destination image.
2514 A return value of zero indicates success, otherwise a GLU error code is
2515 returned (see `gluErrorString').
2517 See the `glReadPixels' reference page for a description of the
2518 acceptable values for the FORMAT, TYPEIN, and TYPEOUT parameters.
2520 `GLU_INVALID_VALUE' is returned if WIN, HIN, WOUT, or HOUT is negative.
2522 `GLU_INVALID_ENUM' is returned if FORMAT, TYPEIN, or TYPEOUT is not
2525 `GLU_INVALID_OPERATION' is returned if TYPEIN or TYPEOUT is
2526 `GLU_UNSIGNED_BYTE_3_3_2' or `GLU_UNSIGNED_BYTE_2_3_3_REV' and FORMAT is
2529 `GLU_INVALID_OPERATION' is returned if TYPEIN or TYPEOUT is
2530 `GLU_UNSIGNED_SHORT_5_6_5' or `GLU_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
2533 `GLU_INVALID_OPERATION' is returned if TYPEIN or TYPEOUT is
2534 `GLU_UNSIGNED_SHORT_4_4_4_4' or `GLU_UNSIGNED_SHORT_4_4_4_4_REV' and
2535 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.
2537 `GLU_INVALID_OPERATION' is returned if TYPEIN or TYPEOUT is
2538 `GLU_UNSIGNED_SHORT_5_5_5_1' or `GLU_UNSIGNED_SHORT_1_5_5_5_REV' and
2539 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.
2541 `GLU_INVALID_OPERATION' is returned if TYPEIN or TYPEOUT is
2542 `GLU_UNSIGNED_INT_8_8_8_8' or `GLU_UNSIGNED_INT_8_8_8_8_REV' and FORMAT
2543 is neither `GLU_RGBA' nor `GLU_BGRA'.
2545 `GLU_INVALID_OPERATION' is returned if TYPEIN or TYPEOUT is
2546 `GLU_UNSIGNED_INT_10_10_10_2' or `GLU_UNSIGNED_INT_2_10_10_10_REV' and
2547 FORMAT is neither `GLU_RGBA' nor `GLU_BGRA'.")
2549 (define-glu-procedures
2560 Specifies the quadrics object (created with `gluNewQuadric').
2563 Specifies the radius of the sphere.
2566 Specifies the number of subdivisions around the Z axis (similar to
2567 lines of longitude).
2570 Specifies the number of subdivisions along the Z axis (similar to
2573 `gluSphere' draws a sphere of the given radius centered around the
2574 origin. The sphere is subdivided around the Z axis into slices and
2575 along the Z axis into stacks (similar to lines of longitude and
2578 If the orientation is set to `GLU_OUTSIDE' (with
2579 `gluQuadricOrientation'), then any normals generated point away from the
2580 center of the sphere. Otherwise, they point toward the center of the
2583 If texturing is turned on (with `gluQuadricTexture'), then texture
2584 coordinates are generated so that T ranges from 0.0 at Z=-RADIUS to 1.0
2585 at Z=RADIUS (T increases linearly along longitudinal lines), and S
2586 ranges from 0.0 at the +Y axis, to 0.25 at the +X axis, to 0.5 at the
2587 \\-Y axis, to 0.75 at the \\-X axis, and back to 1.0 at the +Y axis.")
2589 (define-glu-procedures
2590 ((gluTessBeginContour
2591 (tess GLUtesselator*)
2594 (gluTessEndContour (tess GLUtesselator*) -> void))
2595 "Delimit a contour description.
2598 Specifies the tessellation object (created with `gluNewTess').
2600 `gluTessBeginContour' and `gluTessEndContour' delimit the definition of
2601 a polygon contour. Within each
2602 `gluTessBeginContour'/`gluTessEndContour' pair, there can be zero or
2603 more calls to `gluTessVertex'. The vertices specify a closed contour
2604 (the last vertex of each contour is automatically linked to the first).
2605 See the `gluTessVertex' reference page for more details.
2606 `gluTessBeginContour' can only be called between `gluTessBeginPolygon'
2607 and `gluTessEndPolygon'.")
2609 (define-glu-procedures
2610 ((gluTessBeginPolygon
2611 (tess GLUtesselator*)
2615 "Delimit a polygon description.
2618 Specifies the tessellation object (created with `gluNewTess').
2621 Specifies a pointer to user polygon data.
2623 `gluTessBeginPolygon' and `gluTessEndPolygon' delimit the definition of
2624 a convex, concave or self-intersecting polygon. Within each
2625 `gluTessBeginPolygon'/`gluTessEndPolygon' pair, there must be one or
2626 more calls to `gluTessBeginContour'/`gluTessEndContour'. Within each
2627 contour, there are zero or more calls to `gluTessVertex'. The vertices
2628 specify a closed contour (the last vertex of each contour is
2629 automatically linked to the first). See the `gluTessVertex',
2630 `gluTessBeginContour', and `gluTessEndContour' reference pages for more
2633 DATA is a pointer to a user-defined data structure. If the appropriate
2634 callback(s) are specified (see `gluTessCallback'), then this pointer is
2635 returned to the callback function(s). Thus, it is a convenient way to
2636 store per-polygon information.
2638 Once `gluTessEndPolygon' is called, the polygon is tessellated, and the
2639 resulting triangles are described through callbacks. See
2640 `gluTessCallback' for descriptions of the callback functions.")
2642 (define-glu-procedures
2644 (tess GLUtesselator*)
2646 (CallBackFunc _GLUfuncptr)
2649 "Define a callback for a tessellation object.
2652 Specifies the tessellation object (created with `gluNewTess').
2655 Specifies the callback being defined. The following values are
2656 valid: `GLU_TESS_BEGIN', `GLU_TESS_BEGIN_DATA',
2657 `GLU_TESS_EDGE_FLAG', `GLU_TESS_EDGE_FLAG_DATA', `GLU_TESS_VERTEX',
2658 `GLU_TESS_VERTEX_DATA', `GLU_TESS_END', `GLU_TESS_END_DATA',
2659 `GLU_TESS_COMBINE', `GLU_TESS_COMBINE_DATA', `GLU_TESS_ERROR', and
2660 `GLU_TESS_ERROR_DATA'.
2663 Specifies the function to be called.
2665 `gluTessCallback' is used to indicate a callback to be used by a
2666 tessellation object. If the specified callback is already defined, then
2667 it is replaced. If CALLBACKFUNC is NULL, then the existing callback
2670 These callbacks are used by the tessellation object to describe how a
2671 polygon specified by the user is broken into triangles. Note that there
2672 are two versions of each callback: one with user-specified polygon data
2673 and one without. If both versions of a particular callback are
2674 specified, then the callback with user-specified polygon data will be
2675 used. Note that the POLYGON_DATA parameter used by some of the
2676 functions is a copy of the pointer that was specified when
2677 `gluTessBeginPolygon' was called. The legal callbacks are as follows:
2680 The begin callback is invoked like `glBegin' to indicate the start
2681 of a (triangle) primitive. The function takes a single argument of
2682 type GLenum. If the `GLU_TESS_BOUNDARY_ONLY' property is set to
2683 `GLU_FALSE', then the argument is set to either `GLU_TRIANGLE_FAN',
2684 `GLU_TRIANGLE_STRIP', or `GLU_TRIANGLES'. If the
2685 `GLU_TESS_BOUNDARY_ONLY' property is set to `GLU_TRUE', then the
2686 argument will be set to `GLU_LINE_LOOP'. The function prototype
2687 for this callback is:
2689 `GLU_TESS_BEGIN_DATA'
2690 The same as the `GLU_TESS_BEGIN' callback except that it takes an
2691 additional pointer argument. This pointer is identical to the
2692 opaque pointer provided when `gluTessBeginPolygon' was called. The
2693 function prototype for this callback is:
2695 `GLU_TESS_EDGE_FLAG'
2696 The edge flag callback is similar to `glEdgeFlag'. The function
2697 takes a single boolean flag that indicates which edges lie on the
2698 polygon boundary. If the flag is `GLU_TRUE', then each vertex that
2699 follows begins an edge that lies on the polygon boundary, that is,
2700 an edge that separates an interior region from an exterior one. If
2701 the flag is `GLU_FALSE', then each vertex that follows begins an
2702 edge that lies in the polygon interior. The edge flag callback (if
2703 defined) is invoked before the first vertex callback.
2705 Since triangle fans and triangle strips do not support edge flags,
2706 the begin callback is not called with `GLU_TRIANGLE_FAN' or
2707 `GLU_TRIANGLE_STRIP' if a non-NULL edge flag callback is provided.
2708 (If the callback is initialized to NULL, there is no impact on
2709 performance). Instead, the fans and strips are converted to
2710 independent triangles. The function prototype for this callback
2713 `GLU_TESS_EDGE_FLAG_DATA'
2714 The same as the `GLU_TESS_EDGE_FLAG' callback except that it takes
2715 an additional pointer argument. This pointer is identical to the
2716 opaque pointer provided when `gluTessBeginPolygon' was called. The
2717 function prototype for this callback is:
2720 The vertex callback is invoked between the begin and end callbacks.
2721 It is similar to `glVertex', and it defines the vertices of the
2722 triangles created by the tessellation process. The function takes
2723 a pointer as its only argument. This pointer is identical to the
2724 opaque pointer provided by the user when the vertex was described
2725 (see `gluTessVertex'). The function prototype for this callback
2728 `GLU_TESS_VERTEX_DATA'
2729 The same as the `GLU_TESS_VERTEX' callback except that it takes an
2730 additional pointer argument. This pointer is identical to the
2731 opaque pointer provided when `gluTessBeginPolygon' was called. The
2732 function prototype for this callback is:
2735 The end callback serves the same purpose as `glEnd'. It indicates
2736 the end of a primitive and it takes no arguments. The function
2737 prototype for this callback is:
2740 The same as the `GLU_TESS_END' callback except that it takes an
2741 additional pointer argument. This pointer is identical to the
2742 opaque pointer provided when `gluTessBeginPolygon' was called. The
2743 function prototype for this callback is:
2746 The combine callback is called to create a new vertex when the
2747 tessellation detects an intersection or wishes to merge features.
2748 The function takes four arguments: an array of three elements each
2749 of type GLdouble, an array of four pointers, an array of four
2750 elements each of type GLfloat, and a pointer to a pointer. The
2753 The vertex is defined as a linear combination of up to four
2754 existing vertices, stored in VERTEX_DATA. The coefficients of the
2755 linear combination are given by WEIGHT; these weights always add up
2756 to 1. All vertex pointers are valid even when some of the weights
2757 are 0. COORDS gives the location of the new vertex.
2759 The user must allocate another vertex, interpolate parameters using
2760 VERTEX_DATA and WEIGHT, and return the new vertex pointer in
2761 OUTDATA. This handle is supplied during rendering callbacks. The
2762 user is responsible for freeing the memory some time after
2763 `gluTessEndPolygon' is called.
2765 For example, if the polygon lies in an arbitrary plane in 3-space,
2766 and a color is associated with each vertex, the `GLU_TESS_COMBINE'
2767 callback might look like this:
2769 If the tessellation detects an intersection, then the
2770 `GLU_TESS_COMBINE' or `GLU_TESS_COMBINE_DATA' callback (see below)
2771 must be defined, and it must write a non-NULL pointer into DATAOUT.
2772 Otherwise the `GLU_TESS_NEED_COMBINE_CALLBACK' error occurs, and no
2773 output is generated.
2775 `GLU_TESS_COMBINE_DATA'
2776 The same as the `GLU_TESS_COMBINE' callback except that it takes an
2777 additional pointer argument. This pointer is identical to the
2778 opaque pointer provided when `gluTessBeginPolygon' was called. The
2779 function prototype for this callback is:
2782 The error callback is called when an error is encountered. The one
2783 argument is of type GLenum; it indicates the specific error that
2784 occurred and will be set to one of
2785 `GLU_TESS_MISSING_BEGIN_POLYGON', `GLU_TESS_MISSING_END_POLYGON',
2786 `GLU_TESS_MISSING_BEGIN_CONTOUR', `GLU_TESS_MISSING_END_CONTOUR',
2787 `GLU_TESS_COORD_TOO_LARGE', `GLU_TESS_NEED_COMBINE_CALLBACK', or
2788 `GLU_OUT_OF_MEMORY'. Character strings describing these errors can
2789 be retrieved with the `gluErrorString' call. The function
2790 prototype for this callback is:
2792 The GLU library will recover from the first four errors by
2793 inserting the missing call(s). `GLU_TESS_COORD_TOO_LARGE'
2794 indicates that some vertex coordinate exceeded the predefined
2795 constant `GLU_TESS_MAX_COORD' in absolute value, and that the value
2796 has been clamped. (Coordinate values must be small enough so that
2797 two can be multiplied together without overflow.)
2798 `GLU_TESS_NEED_COMBINE_CALLBACK' indicates that the tessellation
2799 detected an intersection between two edges in the input data, and
2800 the `GLU_TESS_COMBINE' or `GLU_TESS_COMBINE_DATA' callback was not
2801 provided. No output is generated. `GLU_OUT_OF_MEMORY' indicates
2802 that there is not enough memory so no output is generated.
2804 `GLU_TESS_ERROR_DATA'
2805 The same as the `GLU_TESS_ERROR' callback except that it takes an
2806 additional pointer argument. This pointer is identical to the
2807 opaque pointer provided when `gluTessBeginPolygon' was called. The
2808 function prototype for this callback is:
2811 void begin( GLenum type );
2814 void beginData( GLenum type, void *polygon_data );
2817 void edgeFlag( GLboolean flag );
2820 void edgeFlagData( GLboolean flag, void *polygon_data );
2823 void vertex( void *vertex_data );
2826 void vertexData( void *vertex_data, void *polygon_data );
2832 void endData( void *polygon_data );
2835 void combine( GLdouble coords[3], void *vertex_data[4],
2836 GLfloat weight[4], void **outData );
2839 void myCombine( GLdouble coords[3], VERTEX *d[4],
2840 GLfloat w[4], VERTEX **dataOut )
2842 VERTEX *new = new_vertex();
2847 new->r = w[0]*d[0]->r + w[1]*d[1]->r + w[2]*d[2]->r + w[3]*d[3]->r;
2848 new->g = w[0]*d[0]->g + w[1]*d[1]->g + w[2]*d[2]->g + w[3]*d[3]->g;
2849 new->b = w[0]*d[0]->b + w[1]*d[1]->b + w[2]*d[2]->b + w[3]*d[3]->b;
2850 new->a = w[0]*d[0]->a + w[1]*d[1]->a + w[2]*d[2]->a + w[3]*d[3]->a;
2855 void combineData( GLdouble coords[3], void *vertex_data[4],
2856 GLfloat weight[4], void **outData,
2857 void *polygon_data );
2860 void error( GLenum errno );
2863 void errorData( GLenum errno, void *polygon_data );")
2865 (define-glu-procedures
2866 ((gluTessEndPolygon (tess GLUtesselator*) -> void))
2867 "Delimit a polygon description.
2870 Specifies the tessellation object (created with `gluNewTess').
2872 `gluTessBeginPolygon' and `gluTessEndPolygon' delimit the definition of
2873 a convex, concave, or self-intersecting polygon. Within each
2874 `gluTessBeginPolygon'/`gluTessEndPolygon' pair, there must be one or
2875 more calls to `gluTessBeginContour'/`gluTessEndContour'. Within each
2876 contour, there are zero or more calls to `gluTessVertex'. The vertices
2877 specify a closed contour (the last vertex of each contour is
2878 automatically linked to the first). See the `gluTessVertex',
2879 `gluTessBeginContour', and `gluTessEndContour' reference pages for more
2882 Once `gluTessEndPolygon' is called, the polygon is tessellated, and the
2883 resulting triangles are described through callbacks. See
2884 `gluTessCallback' for descriptions of the callback functions.")
2886 (define-glu-procedures
2888 (tess GLUtesselator*)
2894 "Specify a normal for a polygon.
2897 Specifies the tessellation object (created with `gluNewTess').
2900 Specifies the first component of the normal.
2903 Specifies the second component of the normal.
2906 Specifies the third component of the normal.
2908 `gluTessNormal' describes a normal for a polygon that the program is
2909 defining. All input data will be projected onto a plane perpendicular
2910 to one of the three coordinate axes before tessellation and all output
2911 triangles will be oriented CCW with respect to the normal (CW
2912 orientation can be obtained by reversing the sign of the supplied
2913 normal). For example, if you know that all polygons lie in the x-y
2914 plane, call `gluTessNormal'(tess, 0.0, 0.0, 1.0) before rendering any
2917 If the supplied normal is (0.0, 0.0, 0.0) (the initial value), the
2918 normal is determined as follows. The direction of the normal, up to its
2919 sign, is found by fitting a plane to the vertices, without regard to how
2920 the vertices are connected. It is expected that the input data lies
2921 approximately in the plane; otherwise, projection perpendicular to one
2922 of the three coordinate axes may substantially change the geometry. The
2923 sign of the normal is chosen so that the sum of the signed areas of all
2924 input contours is nonnegative (where a CCW contour has positive area).
2926 The supplied normal persists until it is changed by another call to
2929 (define-glu-procedures
2931 (tess GLUtesselator*)
2936 "Set a tessellation object property.
2939 Specifies the tessellation object (created with `gluNewTess').
2942 Specifies the property to be set. Valid values are
2943 `GLU_TESS_WINDING_RULE', `GLU_TESS_BOUNDARY_ONLY', and
2944 `GLU_TESS_TOLERANCE'.
2947 Specifies the value of the indicated property.
2949 `gluTessProperty' is used to control properties stored in a tessellation
2950 object. These properties affect the way that the polygons are
2951 interpreted and rendered. The legal values for WHICH are as follows:
2953 `GLU_TESS_WINDING_RULE'
2954 Determines which parts of the polygon are on the ``interior''. DATA
2955 may be set to one of `GLU_TESS_WINDING_ODD',
2956 `GLU_TESS_WINDING_NONZERO', `GLU_TESS_WINDING_POSITIVE',
2957 `GLU_TESS_WINDING_NEGATIVE', or `GLU_TESS_WINDING_ABS_GEQ_TWO'.
2959 To understand how the winding rule works, consider that the input
2960 contours partition the plane into regions. The winding rule
2961 determines which of these regions are inside the polygon.
2963 For a single contour C, the winding number of a point x is simply
2964 the signed number of revolutions we make around x as we travel once
2965 around C (where CCW is positive). When there are several contours,
2966 the individual winding numbers are summed. This procedure
2967 associates a signed integer value with each point x in the plane.
2968 Note that the winding number is the same for all points in a single
2971 The winding rule classifies a region as ``inside'' if its winding
2972 number belongs to the chosen category (odd, nonzero, positive,
2973 negative, or absolute value of at least two). The previous GLU
2974 tessellator (prior to GLU 1.2) used the ``odd'' rule. The
2975 ``nonzero'' rule is another common way to define the interior. The
2976 other three rules are useful for polygon CSG operations.
2978 `GLU_TESS_BOUNDARY_ONLY'
2979 Is a boolean value (``value'' should be set to GL_TRUE or
2980 GL_FALSE). When set to GL_TRUE, a set of closed contours
2981 separating the polygon interior and exterior are returned instead
2982 of a tessellation. Exterior contours are oriented CCW with respect
2983 to the normal; interior contours are oriented CW. The
2984 `GLU_TESS_BEGIN' and `GLU_TESS_BEGIN_DATA' callbacks use the type
2985 GL_LINE_LOOP for each contour.
2987 `GLU_TESS_TOLERANCE'
2988 Specifies a tolerance for merging features to reduce the size of
2989 the output. For example, two vertices that are very close to each
2990 other might be replaced by a single vertex. The tolerance is
2991 multiplied by the largest coordinate magnitude of any input vertex;
2992 this specifies the maximum distance that any feature can move as
2993 the result of a single merge operation. If a single feature takes
2994 part in several merge operations, the total distance moved could be
2997 Feature merging is completely optional; the tolerance is only a
2998 hint. The implementation is free to merge in some cases and not in
2999 others, or to never merge features at all. The initial tolerance
3002 The current implementation merges vertices only if they are exactly
3003 coincident, regardless of the current tolerance. A vertex is
3004 spliced into an edge only if the implementation is unable to
3005 distinguish which side of the edge the vertex lies on. Two edges
3006 are merged only when both endpoints are identical.")
3008 (define-glu-procedures
3010 (tess GLUtesselator*)
3011 (location GLdouble-*)
3015 "Specify a vertex on a polygon.
3018 Specifies the tessellation object (created with `gluNewTess').
3021 Specifies the location of the vertex.
3024 Specifies an opaque pointer passed back to the program with the
3025 vertex callback (as specified by `gluTessCallback').
3027 `gluTessVertex' describes a vertex on a polygon that the program
3028 defines. Successive `gluTessVertex' calls describe a closed contour.
3029 For example, to describe a quadrilateral, `gluTessVertex' should be
3030 called four times. `gluTessVertex' can only be called between
3031 `gluTessBeginContour' and `gluTessEndContour'.
3033 DATA normally points to a structure containing the vertex location, as
3034 well as other per-vertex attributes such as color and normal. This
3035 pointer is passed back to the user through the `GLU_TESS_VERTEX' or
3036 `GLU_TESS_VERTEX_DATA' callback after tessellation (see the
3037 `gluTessCallback' reference page).")
3039 (define-glu-procedures
3045 (model const-GLdouble-*)
3046 (proj const-GLdouble-*)
3047 (view const-GLint-*)
3056 "Map window and clip coordinates to object coordinates.
3063 Specify the window coordinates to be mapped.
3066 Specify the clip w coordinate to be mapped.
3069 Specifies the modelview matrix (as from a `glGetDoublev' call).
3072 Specifies the projection matrix (as from a `glGetDoublev' call).
3075 Specifies the viewport (as from a `glGetIntegerv' call).
3080 Specifies the near and far planes (as from a `glGetDoublev' call).
3089 Returns the computed object coordinates.
3091 `gluUnProject4' maps the specified window coordinatesi: WINX, WINY, and
3092 WINZ and its clip w coordinate CLIPW into object coordinates
3093 (OBJX,OBJYOBJZOBJW) using MODEL, PROJ, and VIEW. CLIPW can be other
3094 than 1 as for vertices in `glFeedbackBuffer' when data type
3095 `GLU_4D_COLOR_TEXTURE' is returned. This also handles the case where
3096 the NEARVAL and FARVAL planes are different from the default, 0 and 1,
3097 respectively. A return value of `GLU_TRUE' indicates success; a return
3098 value of `GLU_FALSE' indicates failure.
3100 To compute the coordinates (OBJX,OBJYOBJZOBJW) , `gluUnProject4'
3101 multiplies the normalized device coordinates by the inverse of MODEL *
3104 ((OBJX), (OBJY), (OBJZ),
3105 (OBJW),)=INV\u2061(P\u2062M,)\u2062((2\u2061(WINX-VIEW\u2061[0,],),/VIEW\u2061[2,],-1),
3106 (2\u2061(WINY-VIEW\u2061[1,],),/VIEW\u2061[3,],-1),
3107 (2\u2061(WINZ-NEARVAL,),/(FARVAL-NEARVAL,),-1), (CLIPW),)
3109 INV denotes matrix inversion.
3111 `gluUnProject4' is equivalent to `gluUnProject' when CLIPW is 1, NEARVAL
3112 is 0, and FARVAL is 1.")
3114 (define-glu-procedures
3119 (model const-GLdouble-*)
3120 (proj const-GLdouble-*)
3121 (view const-GLint-*)
3127 "Map window coordinates to object coordinates.
3134 Specify the window coordinates to be mapped.
3137 Specifies the modelview matrix (as from a `glGetDoublev' call).
3140 Specifies the projection matrix (as from a `glGetDoublev' call).
3143 Specifies the viewport (as from a `glGetIntegerv' call).
3150 Returns the computed object coordinates.
3152 `gluUnProject' maps the specified window coordinates into object
3153 coordinates using MODEL, PROJ, and VIEW. The result is stored in OBJX,
3154 OBJY, and OBJZ. A return value of `GLU_TRUE' indicates success; a
3155 return value of `GLU_FALSE' indicates failure.
3157 To compute the coordinates (OBJX,OBJYOBJZ) , `gluUnProject' multiplies
3158 the normalized device coordinates by the inverse of MODEL * PROJ as
3161 ((OBJX), (OBJY), (OBJZ),
3162 (W),)=INV\u2061(P\u2062M,)\u2062((2\u2061(WINX-VIEW\u2061[0,],),/VIEW\u2061[2,],-1),
3163 (2\u2061(WINY-VIEW\u2061[1,],),/VIEW\u2061[3,],-1), (2\u2061(WINZ,)-1), (1),) INV denotes
3164 matrix inversion. W is an unused variable, included for consistent