include more low-level bindings
[clinton/guile-figl.git] / figl / gl / low-level.scm
1 ;;; figl -*- mode: scheme; coding: utf-8 -*-
2 ;;; Copyright (C) 2013 Andy Wingo <wingo@pobox.com>
3 ;;;
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.
8 ;;;
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.
13 ;;;
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/>.
17 ;;;
18 ;;; Derived from upstream OpenGL documentation.
19 ;;;
20 ;;; Copyright (C) 1991-2006 Silicon Graphics, Inc. This document is licensed
21 ;;; under the SGI Free Software B License. For details, see
22 ;;; http://oss.sgi.com/projects/FreeB/ (http://oss.sgi.com/projects/FreeB/).
23 ;;;
24 ;;; Copyright (C) 2003-2005 3Dlabs Inc. Ltd. This material may be
25 ;;; distributed subject to the terms and conditions set forth in the Open
26 ;;; Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/
27 ;;; (http://opencontent.org/openpub/).
28 ;;;
29 ;;; Copyright (C) 2005 Addison-Wesley. This material may be distributed
30 ;;; subject to the terms and conditions set forth in the Open Publication
31 ;;; License, v 1.0, 8 June 1999. http://opencontent.org/openpub/
32 ;;; (http://opencontent.org/openpub/).
33 ;;;
34 ;;; Copyright (C) 2006 Khronos Group. This material may be distributed
35 ;;; subject to the terms and conditions set forth in the Open Publication
36 ;;; License, v 1.0, 8 June 1999. http://opencontent.org/openpub/
37 ;;; (http://opencontent.org/openpub/).
38 ;;;
39 ;;; Automatically generated; you probably don't want to edit this. To
40 ;;; update, run "make update" in the top-level build tree.
41 ;;;
42
43 (define-module
44 (figl gl low-level)
45 #:use-module
46 (figl gl runtime)
47 #:use-module
48 (figl gl types)
49 #:export
50 (glAccum
51 glActiveTexture
52 glAlphaFunc
53 glAreTexturesResident
54 glArrayElement
55 glAttachShader
56 glBeginQuery
57 glEndQuery
58 glBegin
59 glEnd
60 glBindAttribLocation
61 glBindBuffer
62 glBindTexture
63 glBitmap
64 glBlendColor
65 glBlendEquationSeparate
66 glBlendEquation
67 glBlendFuncSeparate
68 glBlendFunc
69 glBufferData
70 glBufferSubData
71 glCallLists
72 glCallList
73 glClearAccum
74 glClearColor
75 glClearDepth
76 glClearIndex
77 glClearStencil
78 glClear
79 glClientActiveTexture
80 glClipPlane
81 glColorMask
82 glColorMaterial
83 glColorPointer
84 glColorSubTable
85 glColorTableParameterfv
86 glColorTableParameteriv
87 glColorTable
88 glColor3i
89 glColor3f
90 glColor3ui
91 glColor4i
92 glColor4f
93 glColor4ui
94 glCompileShader
95 glCompressedTexImage1D
96 glCompressedTexImage2D
97 glCompressedTexImage3D
98 glCompressedTexSubImage1D
99 glCompressedTexSubImage2D
100 glCompressedTexSubImage3D
101 glConvolutionFilter1D
102 glConvolutionFilter2D
103 glConvolutionParameterf
104 glConvolutionParameteri
105 glCopyColorSubTable
106 glCopyColorTable
107 glCopyConvolutionFilter1D
108 glCopyConvolutionFilter2D
109 glCopyPixels
110 glCopyTexImage1D
111 glCopyTexImage2D
112 glCopyTexSubImage1D
113 glCopyTexSubImage2D
114 glCopyTexSubImage3D
115 glCreateProgram
116 glCreateShader
117 glCullFace
118 glDeleteBuffers
119 glDeleteLists
120 glDeleteProgram
121 glDeleteQueries
122 glDeleteShader
123 glDeleteTextures
124 glDepthFunc
125 glDepthMask
126 glDepthRange
127 glDetachShader
128 glDrawArrays
129 glDrawBuffers
130 glDrawBuffer
131 glDrawElements
132 glDrawPixels
133 glDrawRangeElements
134 glEdgeFlagPointer
135 glEdgeFlag
136 glEnableClientState
137 glDisableClientState
138 glEnableVertexAttribArray
139 glDisableVertexAttribArray
140 glEnable
141 glDisable
142 glEvalCoord1f
143 glEvalCoord2f
144 glEvalMesh1
145 glEvalMesh2
146 glEvalPoint1
147 glEvalPoint2
148 glFeedbackBuffer
149 glFinish
150 glFlush
151 glFogCoordPointer
152 glFogCoordf
153 glFogf
154 glFogi
155 glFrontFace
156 glFrustum
157 glGenBuffers
158 glGenLists
159 glGenQueries
160 glGenTextures
161 glGetActiveAttrib
162 glGetActiveUniform
163 glGetAttachedShaders
164 glGetAttribLocation
165 glGetBufferParameteriv
166 glGetBufferPointerv
167 glGetBufferSubData
168 glGetClipPlane
169 glGetColorTableParameterfv
170 glGetColorTableParameteriv
171 glGetColorTable
172 glGetCompressedTexImage
173 glGetConvolutionFilter
174 glGetConvolutionParameterfv
175 glGetConvolutionParameteriv
176 glGetError
177 glGetHistogramParameterfv
178 glGetHistogramParameteriv
179 glGetHistogram
180 glGetLightfv
181 glGetLightiv
182 glGetMapfv
183 glGetMapiv
184 glGetMaterialfv
185 glGetMaterialiv
186 glGetMinmaxParameterfv
187 glGetMinmaxParameteriv
188 glGetMinmax
189 glGetPixelMapfv
190 glGetPixelMapuiv
191 glGetPointerv
192 glGetPolygonStipple
193 glGetProgramInfoLog
194 glGetProgramiv
195 glGetQueryiv
196 glGetQueryObjectiv
197 glGetQueryObjectuiv
198 glGetSeparableFilter
199 glGetShaderInfoLog
200 glGetShaderSource
201 glGetShaderiv
202 glGetString
203 glGetTexEnvfv
204 glGetTexEnviv
205 glGetTexGenfv
206 glGetTexGeniv
207 glGetTexImage
208 glGetTexLevelParameterfv
209 glGetTexLevelParameteriv
210 glGetTexParameterfv
211 glGetTexParameteriv
212 glGetUniformLocation
213 glGetUniformfv
214 glGetUniformiv
215 glGetVertexAttribPointerv
216 glGetVertexAttribfv
217 glGetVertexAttribiv
218 glGetBooleanv
219 glGetDoublev
220 glGetFloatv
221 glGetIntegerv
222 glHint
223 glHistogram
224 glIndexMask
225 glIndexPointer
226 glIndexi
227 glIndexf
228 glIndexub
229 glInitNames
230 glInterleavedArrays
231 glIsBuffer
232 glIsEnabled
233 glIsList
234 glIsProgram
235 glIsQuery
236 glIsShader
237 glIsTexture
238 glLightModelf
239 glLightModeli
240 glLightf
241 glLighti
242 glLineStipple
243 glLineWidth
244 glLinkProgram
245 glListBase
246 glLoadIdentity
247 glLoadMatrixf
248 glLoadName
249 glLoadTransposeMatrixf
250 glLogicOp
251 glMap1f
252 glMap2f
253 glMapBuffer
254 glUnmapBuffer
255 glMapGrid1f
256 glMapGrid2f
257 glMaterialf
258 glMateriali
259 glMatrixMode
260 glMinmax
261 glMultiDrawArrays
262 glMultiDrawElements
263 glMultiTexCoord1i
264 glMultiTexCoord1f
265 glMultiTexCoord2i
266 glMultiTexCoord2f
267 glMultiTexCoord3i
268 glMultiTexCoord3f
269 glMultiTexCoord4i
270 glMultiTexCoord4f
271 glMultMatrixf
272 glMultTransposeMatrixf
273 glNewList
274 glEndList
275 glNormalPointer
276 glNormal3f
277 glNormal3i
278 glOrtho
279 glPassThrough
280 glPixelMapfv
281 glPixelMapuiv
282 glPixelStoref
283 glPixelStorei
284 glPixelTransferf
285 glPixelTransferi
286 glPixelZoom
287 glPointParameterf
288 glPointParameteri
289 glPointSize
290 glPolygonMode
291 glPolygonOffset
292 glPolygonStipple
293 glPrioritizeTextures
294 glPushAttrib
295 glPopAttrib
296 glPushClientAttrib
297 glPopClientAttrib
298 glPushMatrix
299 glPopMatrix
300 glPushName
301 glPopName
302 glRasterPos2i
303 glRasterPos2f
304 glRasterPos3i
305 glRasterPos3f
306 glRasterPos4i
307 glRasterPos4f
308 glReadBuffer
309 glReadPixels
310 glRectf
311 glRecti
312 glRenderMode
313 glResetHistogram
314 glResetMinmax
315 glRotatef
316 glSampleCoverage
317 glScalef
318 glScissor
319 glSecondaryColorPointer
320 glSecondaryColor3i
321 glSecondaryColor3f
322 glSecondaryColor3ui
323 glSelectBuffer
324 glSeparableFilter2D
325 glShadeModel
326 glShaderSource
327 glStencilFuncSeparate
328 glStencilFunc
329 glStencilMaskSeparate
330 glStencilMask
331 glStencilOpSeparate
332 glStencilOp
333 glTexCoordPointer
334 glTexCoord1i
335 glTexCoord1f
336 glTexCoord2i
337 glTexCoord2f
338 glTexCoord3i
339 glTexCoord3f
340 glTexCoord4i
341 glTexCoord4f
342 glTexEnvf
343 glTexEnvi
344 glTexGeni
345 glTexGenf
346 glTexImage1D
347 glTexImage2D
348 glTexImage3D
349 glTexParameterf
350 glTexParameteri
351 glTexSubImage1D
352 glTexSubImage2D
353 glTexSubImage3D
354 glTranslatef
355 glUniform1f
356 glUniform2f
357 glUniform3f
358 glUniform4f
359 glUniform1i
360 glUniform2i
361 glUniform3i
362 glUniform4i
363 glUniformMatrix2fv
364 glUniformMatrix3fv
365 glUniformMatrix4fv
366 glUniformMatrix2x3fv
367 glUniformMatrix3x2fv
368 glUniformMatrix2x4fv
369 glUniformMatrix4x2fv
370 glUniformMatrix3x4fv
371 glUniformMatrix4x3fv
372 glUseProgram
373 glValidateProgram
374 glVertexAttribPointer
375 glVertexAttrib1f
376 glVertexAttrib1s
377 glVertexAttrib2f
378 glVertexAttrib2s
379 glVertexAttrib3f
380 glVertexAttrib3s
381 glVertexAttrib4f
382 glVertexAttrib4s
383 glVertexAttrib4Nub
384 glVertexAttrib4iv
385 glVertexAttrib4uiv
386 glVertexAttrib4Niv
387 glVertexAttrib4Nuiv
388 glVertexPointer
389 glVertex2i
390 glVertex2f
391 glVertex3i
392 glVertex3f
393 glVertex4i
394 glVertex4f
395 glViewport
396 glWindowPos2i
397 glWindowPos2f
398 glWindowPos3i
399 glWindowPos3f))
400
401 (define-gl-procedures
402 ((glAccum (op GLenum) (value GLfloat) -> void))
403 "Operate on the accumulation buffer.
404
405 OP
406 Specifies the accumulation buffer operation. Symbolic constants
407 `GL_ACCUM', `GL_LOAD', `GL_ADD', `GL_MULT', and `GL_RETURN' are
408 accepted.
409
410 VALUE
411 Specifies a floating-point value used in the accumulation buffer
412 operation. OP determines how VALUE is used.
413
414 The accumulation buffer is an extended-range color buffer. Images are
415 not rendered into it. Rather, images rendered into one of the color
416 buffers are added to the contents of the accumulation buffer after
417 rendering. Effects such as antialiasing (of points, lines, and
418 polygons), motion blur, and depth of field can be created by
419 accumulating images generated with different transformation matrices.
420
421 Each pixel in the accumulation buffer consists of red, green, blue, and
422 alpha values. The number of bits per component in the accumulation
423 buffer depends on the implementation. You can examine this number by
424 calling `glGetIntegerv' four times, with arguments `GL_ACCUM_RED_BITS',
425 `GL_ACCUM_GREEN_BITS', `GL_ACCUM_BLUE_BITS', and `GL_ACCUM_ALPHA_BITS'.
426 Regardless of the number of bits per component, the range of values
427 stored by each component is [-1,1] . The accumulation buffer pixels are
428 mapped one-to-one with frame buffer pixels.
429
430 `glAccum' operates on the accumulation buffer. The first argument, OP,
431 is a symbolic constant that selects an accumulation buffer operation.
432 The second argument, VALUE, is a floating-point value to be used in that
433 operation. Five operations are specified: `GL_ACCUM', `GL_LOAD',
434 `GL_ADD', `GL_MULT', and `GL_RETURN'.
435
436 All accumulation buffer operations are limited to the area of the
437 current scissor box and applied identically to the red, green, blue, and
438 alpha components of each pixel. If a `glAccum' operation results in a
439 value outside the range [-1,1] , the contents of an accumulation buffer
440 pixel component are undefined.
441
442 The operations are as follows:
443
444 `GL_ACCUM'
445 Obtains R, G, B, and A values from the buffer currently selected
446 for reading (see `glReadBuffer'). Each component value is divided
447 by 2^N-1 , where N is the number of bits allocated to each color
448 component in the currently selected buffer. The result is a
449 floating-point value in the range [0,1] , which is multiplied by
450 VALUE and added to the corresponding pixel component in the
451 accumulation buffer, thereby updating the accumulation buffer.
452
453 `GL_LOAD'
454 Similar to `GL_ACCUM', except that the current value in the
455 accumulation buffer is not used in the calculation of the new
456 value. That is, the R, G, B, and A values from the currently
457 selected buffer are divided by 2^N-1 , multiplied by VALUE, and
458 then stored in the corresponding accumulation buffer cell,
459 overwriting the current value.
460
461 `GL_ADD'
462 Adds VALUE to each R, G, B, and A in the accumulation buffer.
463
464 `GL_MULT'
465 Multiplies each R, G, B, and A in the accumulation buffer by VALUE
466 and returns the scaled component to its corresponding accumulation
467 buffer location.
468
469 `GL_RETURN'
470 Transfers accumulation buffer values to the color buffer or buffers
471 currently selected for writing. Each R, G, B, and A component is
472 multiplied by VALUE, then multiplied by 2^N-1 , clamped to the
473 range [0,2^N-1] , and stored in the corresponding display buffer
474 cell. The only fragment operations that are applied to this
475 transfer are pixel ownership, scissor, dithering, and color
476 writemasks.
477
478 To clear the accumulation buffer, call `glClearAccum' with R, G, B, and
479 A values to set it to, then call `glClear' with the accumulation buffer
480 enabled.
481
482 `GL_INVALID_ENUM' is generated if OP is not an accepted value.
483
484 `GL_INVALID_OPERATION' is generated if there is no accumulation buffer.
485
486 `GL_INVALID_OPERATION' is generated if `glAccum' is executed between the
487 execution of `glBegin' and the corresponding execution of `glEnd'.")
488
489 (define-gl-procedures
490 ((glActiveTexture (texture GLenum) -> void))
491 "Select active texture unit.
492
493 TEXTURE
494 Specifies which texture unit to make active. The number of texture
495 units is implementation dependent, but must be at least two.
496 TEXTURE must be one of `GL_TEXTURE' I , where i ranges from 0 to
497 the larger of (`GL_MAX_TEXTURE_COORDS' - 1) and
498 (`GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS' - 1). The initial value is
499 `GL_TEXTURE0'.
500
501 `glActiveTexture' selects which texture unit subsequent texture state
502 calls will affect. The number of texture units an implementation
503 supports is implementation dependent, but must be at least 2.
504
505 Vertex arrays are client-side GL resources, which are selected by the
506 `glClientActiveTexture' routine.
507
508 `GL_INVALID_ENUM' is generated if TEXTURE is not one of `GL_TEXTURE'I ,
509 where i ranges from 0 to the larger of (`GL_MAX_TEXTURE_COORDS' - 1) and
510 (`GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS' - 1).")
511
512 (define-gl-procedures
513 ((glAlphaFunc
514 (func GLenum)
515 (ref GLclampf)
516 ->
517 void))
518 "Specify the alpha test function.
519
520 FUNC
521 Specifies the alpha comparison function. Symbolic constants
522 `GL_NEVER', `GL_LESS', `GL_EQUAL', `GL_LEQUAL', `GL_GREATER',
523 `GL_NOTEQUAL', `GL_GEQUAL', and `GL_ALWAYS' are accepted. The
524 initial value is `GL_ALWAYS'.
525
526 REF
527 Specifies the reference value that incoming alpha values are
528 compared to. This value is clamped to the range [0,1] , where 0
529 represents the lowest possible alpha value and 1 the highest
530 possible value. The initial reference value is 0.
531
532 The alpha test discards fragments depending on the outcome of a
533 comparison between an incoming fragment's alpha value and a constant
534 reference value. `glAlphaFunc' specifies the reference value and the
535 comparison function. The comparison is performed only if alpha testing
536 is enabled. By default, it is not enabled. (See `glEnable' and
537 `glDisable' of `GL_ALPHA_TEST'.)
538
539 FUNC and REF specify the conditions under which the pixel is drawn. The
540 incoming alpha value is compared to REF using the function specified by
541 FUNC. If the value passes the comparison, the incoming fragment is drawn
542 if it also passes subsequent stencil and depth buffer tests. If the
543 value fails the comparison, no change is made to the frame buffer at
544 that pixel location. The comparison functions are as follows:
545
546 `GL_NEVER'
547 Never passes.
548
549 `GL_LESS'
550 Passes if the incoming alpha value is less than the reference
551 value.
552
553 `GL_EQUAL'
554 Passes if the incoming alpha value is equal to the reference value.
555
556 `GL_LEQUAL'
557 Passes if the incoming alpha value is less than or equal to the
558 reference value.
559
560 `GL_GREATER'
561 Passes if the incoming alpha value is greater than the reference
562 value.
563
564 `GL_NOTEQUAL'
565 Passes if the incoming alpha value is not equal to the reference
566 value.
567
568 `GL_GEQUAL'
569 Passes if the incoming alpha value is greater than or equal to the
570 reference value.
571
572 `GL_ALWAYS'
573 Always passes (initial value).
574
575 `glAlphaFunc' operates on all pixel write operations, including those
576 resulting from the scan conversion of points, lines, polygons, and
577 bitmaps, and from pixel draw and copy operations. `glAlphaFunc' does not
578 affect screen clear operations.
579
580 `GL_INVALID_ENUM' is generated if FUNC is not an accepted value.
581
582 `GL_INVALID_OPERATION' is generated if `glAlphaFunc' is executed between
583 the execution of `glBegin' and the corresponding execution of `glEnd'.")
584
585 (define-gl-procedures
586 ((glAreTexturesResident
587 (n GLsizei)
588 (textures const-GLuint-*)
589 (residences GLboolean-*)
590 ->
591 GLboolean))
592 "Determine if textures are loaded in texture memory.
593
594 N
595 Specifies the number of textures to be queried.
596
597 TEXTURES
598 Specifies an array containing the names of the textures to be
599 queried.
600
601 RESIDENCES
602 Specifies an array in which the texture residence status is
603 returned. The residence status of a texture named by an element of
604 TEXTURES is returned in the corresponding element of RESIDENCES.
605
606 GL establishes a ``working set'' of textures that are resident in
607 texture memory. These textures can be bound to a texture target much
608 more efficiently than textures that are not resident.
609
610 `glAreTexturesResident' queries the texture residence status of the N
611 textures named by the elements of TEXTURES. If all the named textures
612 are resident, `glAreTexturesResident' returns `GL_TRUE', and the
613 contents of RESIDENCES are undisturbed. If not all the named textures
614 are resident, `glAreTexturesResident' returns `GL_FALSE', and detailed
615 status is returned in the N elements of RESIDENCES. If an element of
616 RESIDENCES is `GL_TRUE', then the texture named by the corresponding
617 element of TEXTURES is resident.
618
619 The residence status of a single bound texture may also be queried by
620 calling `glGetTexParameter' with the TARGET argument set to the target
621 to which the texture is bound, and the PNAME argument set to
622 `GL_TEXTURE_RESIDENT'. This is the only way that the residence status of
623 a default texture can be queried.
624
625 `GL_INVALID_VALUE' is generated if N is negative.
626
627 `GL_INVALID_VALUE' is generated if any element in TEXTURES is 0 or does
628 not name a texture. In that case, the function returns `GL_FALSE' and
629 the contents of RESIDENCES is indeterminate.
630
631 `GL_INVALID_OPERATION' is generated if `glAreTexturesResident' is
632 executed between the execution of `glBegin' and the corresponding
633 execution of `glEnd'.")
634
635 (define-gl-procedures
636 ((glArrayElement (i GLint) -> void))
637 "Render a vertex using the specified vertex array element.
638
639 I
640 Specifies an index into the enabled vertex data arrays.
641
642 `glArrayElement' commands are used within `glBegin'/`glEnd' pairs to
643 specify vertex and attribute data for point, line, and polygon
644 primitives. If `GL_VERTEX_ARRAY' is enabled when `glArrayElement' is
645 called, a single vertex is drawn, using vertex and attribute data taken
646 from location I of the enabled arrays. If `GL_VERTEX_ARRAY' is not
647 enabled, no drawing occurs but the attributes corresponding to the
648 enabled arrays are modified.
649
650 Use `glArrayElement' to construct primitives by indexing vertex data,
651 rather than by streaming through arrays of data in first-to-last order.
652 Because each call specifies only a single vertex, it is possible to
653 explicitly specify per-primitive attributes such as a single normal for
654 each triangle.
655
656 Changes made to array data between the execution of `glBegin' and the
657 corresponding execution of `glEnd' may affect calls to `glArrayElement'
658 that are made within the same `glBegin'/`glEnd' period in nonsequential
659 ways. That is, a call to `glArrayElement' that precedes a change to
660 array data may access the changed data, and a call that follows a change
661 to array data may access original data.
662
663 `GL_INVALID_VALUE' may be generated if I is negative.
664
665 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
666 bound to an enabled array and the buffer object's data store is
667 currently mapped.")
668
669 (define-gl-procedures
670 ((glAttachShader
671 (program GLuint)
672 (shader GLuint)
673 ->
674 void))
675 "Attaches a shader object to a program object.
676
677 PROGRAM
678 Specifies the program object to which a shader object will be
679 attached.
680
681 SHADER
682 Specifies the shader object that is to be attached.
683
684 In order to create an executable, there must be a way to specify the
685 list of things that will be linked together. Program objects provide
686 this mechanism. Shaders that are to be linked together in a program
687 object must first be attached to that program object. `glAttachShader'
688 attaches the shader object specified by SHADER to the program object
689 specified by PROGRAM. This indicates that SHADER will be included in
690 link operations that will be performed on PROGRAM.
691
692 All operations that can be performed on a shader object are valid
693 whether or not the shader object is attached to a program object. It is
694 permissible to attach a shader object to a program object before source
695 code has been loaded into the shader object or before the shader object
696 has been compiled. It is permissible to attach multiple shader objects
697 of the same type because each may contain a portion of the complete
698 shader. It is also permissible to attach a shader object to more than
699 one program object. If a shader object is deleted while it is attached
700 to a program object, it will be flagged for deletion, and deletion will
701 not occur until `glDetachShader' is called to detach it from all program
702 objects to which it is attached.
703
704 `GL_INVALID_VALUE' is generated if either PROGRAM or SHADER is not a
705 value generated by OpenGL.
706
707 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
708
709 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
710
711 `GL_INVALID_OPERATION' is generated if SHADER is already attached to
712 PROGRAM.
713
714 `GL_INVALID_OPERATION' is generated if `glAttachShader' is executed
715 between the execution of `glBegin' and the corresponding execution of
716 `glEnd'.")
717
718 (define-gl-procedures
719 ((glBeginQuery
720 (target GLenum)
721 (id GLuint)
722 ->
723 void)
724 (glEndQuery (target GLenum) -> void))
725 "Delimit the boundaries of a query object.
726
727 TARGET
728 Specifies the target type of query object established between
729 `glBeginQuery' and the subsequent `glEndQuery'. The symbolic
730 constant must be `GL_SAMPLES_PASSED'.
731
732 ID
733 Specifies the name of a query object.
734
735 `glBeginQuery' and `glEndQuery' delimit the boundaries of a query
736 object. If a query object with name ID does not yet exist it is created.
737
738 When `glBeginQuery' is executed, the query object's samples-passed
739 counter is reset to 0. Subsequent rendering will increment the counter
740 once for every sample that passes the depth test. When `glEndQuery' is
741 executed, the samples-passed counter is assigned to the query object's
742 result value. This value can be queried by calling `glGetQueryObject'
743 with PNAME`GL_QUERY_RESULT'.
744
745 Querying the `GL_QUERY_RESULT' implicitly flushes the GL pipeline until
746 the rendering delimited by the query object has completed and the result
747 is available. `GL_QUERY_RESULT_AVAILABLE' can be queried to determine if
748 the result is immediately available or if the rendering is not yet
749 complete.
750
751 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SAMPLES_PASSED'.
752
753 `GL_INVALID_OPERATION' is generated if `glBeginQuery' is executed while
754 a query object of the same TARGET is already active.
755
756 `GL_INVALID_OPERATION' is generated if `glEndQuery' is executed when a
757 query object of the same TARGET is not active.
758
759 `GL_INVALID_OPERATION' is generated if ID is 0.
760
761 `GL_INVALID_OPERATION' is generated if ID is the name of an already
762 active query object.
763
764 `GL_INVALID_OPERATION' is generated if `glBeginQuery' or `glEndQuery' is
765 executed between the execution of `glBegin' and the corresponding
766 execution of `glEnd'.")
767
768 (define-gl-procedures
769 ((glBegin (mode GLenum) -> void) (glEnd -> void))
770 "Delimit the vertices of a primitive or a group of like primitives.
771
772 MODE
773 Specifies the primitive or primitives that will be created from
774 vertices presented between `glBegin' and the subsequent `glEnd'.
775 Ten symbolic constants are accepted: `GL_POINTS', `GL_LINES',
776 `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_TRIANGLES',
777 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_QUADS',
778 `GL_QUAD_STRIP', and `GL_POLYGON'.
779
780 `glBegin' and `glEnd' delimit the vertices that define a primitive or a
781 group of like primitives. `glBegin' accepts a single argument that
782 specifies in which of ten ways the vertices are interpreted. Taking N as
783 an integer count starting at one, and N as the total number of vertices
784 specified, the interpretations are as follows:
785
786 `GL_POINTS'
787 Treats each vertex as a single point. Vertex N defines point N . N
788 points are drawn.
789
790 `GL_LINES'
791 Treats each pair of vertices as an independent line segment.
792 Vertices 2\u2062N-1 and 2\u2062N define line N . N/2 lines are drawn.
793
794 `GL_LINE_STRIP'
795 Draws a connected group of line segments from the first vertex to
796 the last. Vertices N and N+1 define line N . N-1 lines are drawn.
797
798 `GL_LINE_LOOP'
799 Draws a connected group of line segments from the first vertex to
800 the last, then back to the first. Vertices N and N+1 define line N
801 . The last line, however, is defined by vertices N and 1 . N lines
802 are drawn.
803
804 `GL_TRIANGLES'
805 Treats each triplet of vertices as an independent triangle.
806 Vertices 3\u2062N-2 , 3\u2062N-1 , and 3\u2062N define triangle N . N/3 triangles
807 are drawn.
808
809 `GL_TRIANGLE_STRIP'
810 Draws a connected group of triangles. One triangle is defined for
811 each vertex presented after the first two vertices. For odd N ,
812 vertices N , N+1 , and N+2 define triangle N . For even N ,
813 vertices N+1 , N , and N+2 define triangle N . N-2 triangles are
814 drawn.
815
816 `GL_TRIANGLE_FAN'
817 Draws a connected group of triangles. One triangle is defined for
818 each vertex presented after the first two vertices. Vertices 1 ,
819 N+1 , and N+2 define triangle N . N-2 triangles are drawn.
820
821 `GL_QUADS'
822 Treats each group of four vertices as an independent quadrilateral.
823 Vertices 4\u2062N-3 , 4\u2062N-2 , 4\u2062N-1 , and 4\u2062N define quadrilateral N .
824 N/4 quadrilaterals are drawn.
825
826 `GL_QUAD_STRIP'
827 Draws a connected group of quadrilaterals. One quadrilateral is
828 defined for each pair of vertices presented after the first pair.
829 Vertices 2\u2062N-1 , 2\u2062N , 2\u2062N+2 , and 2\u2062N+1 define quadrilateral N .
830 N/2-1 quadrilaterals are drawn. Note that the order in which
831 vertices are used to construct a quadrilateral from strip data is
832 different from that used with independent data.
833
834 `GL_POLYGON'
835 Draws a single, convex polygon. Vertices 1 through N define this
836 polygon.
837
838 Only a subset of GL commands can be used between `glBegin' and `glEnd'.
839 The commands are `glVertex', `glColor', `glSecondaryColor', `glIndex',
840 `glNormal', `glFogCoord', `glTexCoord', `glMultiTexCoord',
841 `glVertexAttrib', `glEvalCoord', `glEvalPoint', `glArrayElement',
842 `glMaterial', and `glEdgeFlag'. Also, it is acceptable to use
843 `glCallList' or `glCallLists' to execute display lists that include only
844 the preceding commands. If any other GL command is executed between
845 `glBegin' and `glEnd', the error flag is set and the command is ignored.
846
847 Regardless of the value chosen for MODE, there is no limit to the number
848 of vertices that can be defined between `glBegin' and `glEnd'. Lines,
849 triangles, quadrilaterals, and polygons that are incompletely specified
850 are not drawn. Incomplete specification results when either too few
851 vertices are provided to specify even a single primitive or when an
852 incorrect multiple of vertices is specified. The incomplete primitive is
853 ignored; the rest are drawn.
854
855 The minimum specification of vertices for each primitive is as follows:
856 1 for a point, 2 for a line, 3 for a triangle, 4 for a quadrilateral,
857 and 3 for a polygon. Modes that require a certain multiple of vertices
858 are `GL_LINES' (2), `GL_TRIANGLES' (3), `GL_QUADS' (4), and
859 `GL_QUAD_STRIP' (2).
860
861 `GL_INVALID_ENUM' is generated if MODE is set to an unaccepted value.
862
863 `GL_INVALID_OPERATION' is generated if `glBegin' is executed between a
864 `glBegin' and the corresponding execution of `glEnd'.
865
866 `GL_INVALID_OPERATION' is generated if `glEnd' is executed without being
867 preceded by a `glBegin'.
868
869 `GL_INVALID_OPERATION' is generated if a command other than `glVertex',
870 `glColor', `glSecondaryColor', `glIndex', `glNormal', `glFogCoord',
871 `glTexCoord', `glMultiTexCoord', `glVertexAttrib', `glEvalCoord',
872 `glEvalPoint', `glArrayElement', `glMaterial', `glEdgeFlag',
873 `glCallList', or `glCallLists' is executed between the execution of
874 `glBegin' and the corresponding execution `glEnd'.
875
876 Execution of `glEnableClientState', `glDisableClientState',
877 `glEdgeFlagPointer', `glFogCoordPointer', `glTexCoordPointer',
878 `glColorPointer', `glSecondaryColorPointer', `glIndexPointer',
879 `glNormalPointer', `glVertexPointer', `glVertexAttribPointer',
880 `glInterleavedArrays', or `glPixelStore' is not allowed after a call to
881 `glBegin' and before the corresponding call to `glEnd', but an error may
882 or may not be generated.")
883
884 (define-gl-procedures
885 ((glBindAttribLocation
886 (program GLuint)
887 (index GLuint)
888 (name const-GLchar-*)
889 ->
890 void))
891 "Associates a generic vertex attribute index with a named attribute
892 variable.
893
894 PROGRAM
895 Specifies the handle of the program object in which the association
896 is to be made.
897
898 INDEX
899 Specifies the index of the generic vertex attribute to be bound.
900
901 NAME
902 Specifies a null terminated string containing the name of the
903 vertex shader attribute variable to which INDEX is to be bound.
904
905 `glBindAttribLocation' is used to associate a user-defined attribute
906 variable in the program object specified by PROGRAM with a generic
907 vertex attribute index. The name of the user-defined attribute variable
908 is passed as a null terminated string in NAME. The generic vertex
909 attribute index to be bound to this variable is specified by INDEX. When
910 PROGRAM is made part of current state, values provided via the generic
911 vertex attribute INDEX will modify the value of the user-defined
912 attribute variable specified by NAME.
913
914 If NAME refers to a matrix attribute variable, INDEX refers to the first
915 column of the matrix. Other matrix columns are then automatically bound
916 to locations INDEX+1 for a matrix of type mat2; INDEX+1 and INDEX+2 for
917 a matrix of type mat3; and INDEX+1, INDEX+2, and INDEX+3 for a matrix of
918 type mat4.
919
920 This command makes it possible for vertex shaders to use descriptive
921 names for attribute variables rather than generic variables that are
922 numbered from 0 to `GL_MAX_VERTEX_ATTRIBS' -1. The values sent to each
923 generic attribute index are part of current state, just like standard
924 vertex attributes such as color, normal, and vertex position. If a
925 different program object is made current by calling `glUseProgram', the
926 generic vertex attributes are tracked in such a way that the same values
927 will be observed by attributes in the new program object that are also
928 bound to INDEX.
929
930 Attribute variable name-to-generic attribute index bindings for a
931 program object can be explicitly assigned at any time by calling
932 `glBindAttribLocation'. Attribute bindings do not go into effect until
933 `glLinkProgram' is called. After a program object has been linked
934 successfully, the index values for generic attributes remain fixed (and
935 their values can be queried) until the next link command occurs.
936
937 Applications are not allowed to bind any of the standard OpenGL vertex
938 attributes using this command, as they are bound automatically when
939 needed. Any attribute binding that occurs after the program object has
940 been linked will not take effect until the next time the program object
941 is linked.
942
943 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
944 `GL_MAX_VERTEX_ATTRIBS'.
945
946 `GL_INVALID_OPERATION' is generated if NAME starts with the reserved
947 prefix \"gl_\".
948
949 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
950 OpenGL.
951
952 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
953
954 `GL_INVALID_OPERATION' is generated if `glBindAttribLocation' is
955 executed between the execution of `glBegin' and the corresponding
956 execution of `glEnd'.")
957
958 (define-gl-procedures
959 ((glBindBuffer
960 (target GLenum)
961 (buffer GLuint)
962 ->
963 void))
964 "Bind a named buffer object.
965
966 TARGET
967 Specifies the target to which the buffer object is bound. The
968 symbolic constant must be `GL_ARRAY_BUFFER',
969 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
970 `GL_PIXEL_UNPACK_BUFFER'.
971
972 BUFFER
973 Specifies the name of a buffer object.
974
975 `glBindBuffer' lets you create or use a named buffer object. Calling
976 `glBindBuffer' with TARGET set to `GL_ARRAY_BUFFER',
977 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER' or
978 `GL_PIXEL_UNPACK_BUFFER' and BUFFER set to the name of the new buffer
979 object binds the buffer object name to the target. When a buffer object
980 is bound to a target, the previous binding for that target is
981 automatically broken.
982
983 Buffer object names are unsigned integers. The value zero is reserved,
984 but there is no default buffer object for each buffer object target.
985 Instead, BUFFER set to zero effectively unbinds any buffer object
986 previously bound, and restores client memory usage for that buffer
987 object target. Buffer object names and the corresponding buffer object
988 contents are local to the shared display-list space (see
989 `glXCreateContext') of the current GL rendering context; two rendering
990 contexts share buffer object names only if they also share display
991 lists.
992
993 You may use `glGenBuffers' to generate a set of new buffer object names.
994
995 The state of a buffer object immediately after it is first bound is an
996 unmapped zero-sized memory buffer with `GL_READ_WRITE' access and
997 `GL_STATIC_DRAW' usage.
998
999 While a non-zero buffer object name is bound, GL operations on the
1000 target to which it is bound affect the bound buffer object, and queries
1001 of the target to which it is bound return state from the bound buffer
1002 object. While buffer object name zero is bound, as in the initial state,
1003 attempts to modify or query state on the target to which it is bound
1004 generates an `GL_INVALID_OPERATION' error.
1005
1006 When vertex array pointer state is changed, for example by a call to
1007 `glNormalPointer', the current buffer object binding
1008 (`GL_ARRAY_BUFFER_BINDING') is copied into the corresponding client
1009 state for the vertex array type being changed, for example
1010 `GL_NORMAL_ARRAY_BUFFER_BINDING'. While a non-zero buffer object is
1011 bound to the `GL_ARRAY_BUFFER' target, the vertex array pointer
1012 parameter that is traditionally interpreted as a pointer to client-side
1013 memory is instead interpreted as an offset within the buffer object
1014 measured in basic machine units.
1015
1016 While a non-zero buffer object is bound to the `GL_ELEMENT_ARRAY_BUFFER'
1017 target, the indices parameter of `glDrawElements',
1018 `glDrawRangeElements', or `glMultiDrawElements' that is traditionally
1019 interpreted as a pointer to client-side memory is instead interpreted as
1020 an offset within the buffer object measured in basic machine units.
1021
1022 While a non-zero buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
1023 target, the following commands are affected: `glGetCompressedTexImage',
1024 `glGetConvolutionFilter', `glGetHistogram', `glGetMinmax',
1025 `glGetPixelMap', `glGetPolygonStipple', `glGetSeparableFilter',
1026 `glGetTexImage', and `glReadPixels'. The pointer parameter that is
1027 traditionally interpreted as a pointer to client-side memory where the
1028 pixels are to be packed is instead interpreted as an offset within the
1029 buffer object measured in basic machine units.
1030
1031 While a non-zero buffer object is bound to the `GL_PIXEL_UNPACK_BUFFER'
1032 target, the following commands are affected: `glBitmap',
1033 `glColorSubTable', `glColorTable', `glCompressedTexImage1D',
1034 `glCompressedTexImage2D', `glCompressedTexImage3D',
1035 `glCompressedTexSubImage1D', `glCompressedTexSubImage2D',
1036 `glCompressedTexSubImage3D', `glConvolutionFilter1D',
1037 `glConvolutionFilter2D', `glDrawPixels', `glPixelMap',
1038 `glPolygonStipple', `glSeparableFilter2D', `glTexImage1D',
1039 `glTexImage2D', `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D',
1040 and `glTexSubImage3D'. The pointer parameter that is traditionally
1041 interpreted as a pointer to client-side memory from which the pixels are
1042 to be unpacked is instead interpreted as an offset within the buffer
1043 object measured in basic machine units.
1044
1045 A buffer object binding created with `glBindBuffer' remains active until
1046 a different buffer object name is bound to the same target, or until the
1047 bound buffer object is deleted with `glDeleteBuffers'.
1048
1049 Once created, a named buffer object may be re-bound to any target as
1050 often as needed. However, the GL implementation may make choices about
1051 how to optimize the storage of a buffer object based on its initial
1052 binding target.
1053
1054 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
1055 values.
1056
1057 `GL_INVALID_OPERATION' is generated if `glBindBuffer' is executed
1058 between the execution of `glBegin' and the corresponding execution of
1059 `glEnd'.")
1060
1061 (define-gl-procedures
1062 ((glBindTexture
1063 (target GLenum)
1064 (texture GLuint)
1065 ->
1066 void))
1067 "Bind a named texture to a texturing target.
1068
1069 TARGET
1070 Specifies the target to which the texture is bound. Must be either
1071 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D', or
1072 `GL_TEXTURE_CUBE_MAP'.
1073
1074 TEXTURE
1075 Specifies the name of a texture.
1076
1077 `glBindTexture' lets you create or use a named texture. Calling
1078 `glBindTexture' with TARGET set to `GL_TEXTURE_1D', `GL_TEXTURE_2D',
1079 `GL_TEXTURE_3D' or `GL_TEXTURE_CUBE_MAP' and TEXTURE set to the name of
1080 the new texture binds the texture name to the target. When a texture is
1081 bound to a target, the previous binding for that target is automatically
1082 broken.
1083
1084 Texture names are unsigned integers. The value zero is reserved to
1085 represent the default texture for each texture target. Texture names and
1086 the corresponding texture contents are local to the shared display-list
1087 space (see `glXCreateContext') of the current GL rendering context; two
1088 rendering contexts share texture names only if they also share display
1089 lists.
1090
1091 You may use `glGenTextures' to generate a set of new texture names.
1092
1093 When a texture is first bound, it assumes the specified target: A
1094 texture first bound to `GL_TEXTURE_1D' becomes one-dimensional texture,
1095 a texture first bound to `GL_TEXTURE_2D' becomes two-dimensional
1096 texture, a texture first bound to `GL_TEXTURE_3D' becomes
1097 three-dimensional texture, and a texture first bound to
1098 `GL_TEXTURE_CUBE_MAP' becomes a cube-mapped texture. The state of a
1099 one-dimensional texture immediately after it is first bound is
1100 equivalent to the state of the default `GL_TEXTURE_1D' at GL
1101 initialization, and similarly for two- and three-dimensional textures
1102 and cube-mapped textures.
1103
1104 While a texture is bound, GL operations on the target to which it is
1105 bound affect the bound texture, and queries of the target to which it is
1106 bound return state from the bound texture. If texture mapping is active
1107 on the target to which a texture is bound, the bound texture is used. In
1108 effect, the texture targets become aliases for the textures currently
1109 bound to them, and the texture name zero refers to the default textures
1110 that were bound to them at initialization.
1111
1112 A texture binding created with `glBindTexture' remains active until a
1113 different texture is bound to the same target, or until the bound
1114 texture is deleted with `glDeleteTextures'.
1115
1116 Once created, a named texture may be re-bound to its same original
1117 target as often as needed. It is usually much faster to use
1118 `glBindTexture' to bind an existing named texture to one of the texture
1119 targets than it is to reload the texture image using `glTexImage1D',
1120 `glTexImage2D', or `glTexImage3D'. For additional control over
1121 performance, use `glPrioritizeTextures'.
1122
1123 `glBindTexture' is included in display lists.
1124
1125 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
1126 values.
1127
1128 `GL_INVALID_OPERATION' is generated if TEXTURE was previously created
1129 with a target that doesn't match that of TARGET.
1130
1131 `GL_INVALID_OPERATION' is generated if `glBindTexture' is executed
1132 between the execution of `glBegin' and the corresponding execution of
1133 `glEnd'.")
1134
1135 (define-gl-procedures
1136 ((glBitmap
1137 (width GLsizei)
1138 (height GLsizei)
1139 (xorig GLfloat)
1140 (yorig GLfloat)
1141 (xmove GLfloat)
1142 (ymove GLfloat)
1143 (bitmap const-GLubyte-*)
1144 ->
1145 void))
1146 "Draw a bitmap.
1147
1148 WIDTH
1149 HEIGHT
1150
1151 Specify the pixel width and height of the bitmap image.
1152
1153 XORIG
1154 YORIG
1155
1156 Specify the location of the origin in the bitmap image. The origin
1157 is measured from the lower left corner of the bitmap, with right
1158 and up being the positive axes.
1159
1160 XMOVE
1161 YMOVE
1162
1163 Specify the X and Y offsets to be added to the current raster
1164 position after the bitmap is drawn.
1165
1166 BITMAP
1167 Specifies the address of the bitmap image.
1168
1169 A bitmap is a binary image. When drawn, the bitmap is positioned
1170 relative to the current raster position, and frame buffer pixels
1171 corresponding to 1's in the bitmap are written using the current raster
1172 color or index. Frame buffer pixels corresponding to 0's in the bitmap
1173 are not modified.
1174
1175 `glBitmap' takes seven arguments. The first pair specifies the width and
1176 height of the bitmap image. The second pair specifies the location of
1177 the bitmap origin relative to the lower left corner of the bitmap image.
1178 The third pair of arguments specifies X and Y offsets to be added to the
1179 current raster position after the bitmap has been drawn. The final
1180 argument is a pointer to the bitmap image itself.
1181
1182 If a non-zero named buffer object is bound to the
1183 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a bitmap
1184 image is specified, BITMAP is treated as a byte offset into the buffer
1185 object's data store.
1186
1187 The bitmap image is interpreted like image data for the `glDrawPixels'
1188 command, with WIDTH and HEIGHT corresponding to the width and height
1189 arguments of that command, and with TYPE set to `GL_BITMAP' and FORMAT
1190 set to `GL_COLOR_INDEX'. Modes specified using `glPixelStore' affect the
1191 interpretation of bitmap image data; modes specified using
1192 `glPixelTransfer' do not.
1193
1194 If the current raster position is invalid, `glBitmap' is ignored.
1195 Otherwise, the lower left corner of the bitmap image is positioned at
1196 the window coordinates
1197
1198 X_W=⌊X_R-X_O,⌋
1199
1200 Y_W=⌊Y_R-Y_O,⌋
1201
1202 where (X_R,Y_R) is the raster position and (X_O,Y_O) is the bitmap
1203 origin. Fragments are then generated for each pixel corresponding to a 1
1204 (one) in the bitmap image. These fragments are generated using the
1205 current raster Z coordinate, color or color index, and current raster
1206 texture coordinates. They are then treated just as if they had been
1207 generated by a point, line, or polygon, including texture mapping,
1208 fogging, and all per-fragment operations such as alpha and depth
1209 testing.
1210
1211 After the bitmap has been drawn, the X and Y coordinates of the current
1212 raster position are offset by XMOVE and YMOVE. No change is made to the
1213 Z coordinate of the current raster position, or to the current raster
1214 color, texture coordinates, or index.
1215
1216 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is negative.
1217
1218 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
1219 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
1220 data store is currently mapped.
1221
1222 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
1223 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
1224 unpacked from the buffer object such that the memory reads required
1225 would exceed the data store size.
1226
1227 `GL_INVALID_OPERATION' is generated if `glBitmap' is executed between
1228 the execution of `glBegin' and the corresponding execution of `glEnd'.")
1229
1230 (define-gl-procedures
1231 ((glBlendColor
1232 (red GLclampf)
1233 (green GLclampf)
1234 (blue GLclampf)
1235 (alpha GLclampf)
1236 ->
1237 void))
1238 "Set the blend color.
1239
1240 RED
1241 GREEN
1242
1243 BLUE
1244
1245 ALPHA
1246
1247 specify the components of `GL_BLEND_COLOR'
1248
1249 The `GL_BLEND_COLOR' may be used to calculate the source and destination
1250 blending factors. The color components are clamped to the range [0,1]
1251 before being stored. See `glBlendFunc' for a complete description of the
1252 blending operations. Initially the `GL_BLEND_COLOR' is set to (0, 0, 0,
1253 0).
1254
1255 `GL_INVALID_OPERATION' is generated if `glBlendColor' is executed
1256 between the execution of `glBegin' and the corresponding execution of
1257 `glEnd'.")
1258
1259 (define-gl-procedures
1260 ((glBlendEquationSeparate
1261 (modeRGB GLenum)
1262 (modeAlpha GLenum)
1263 ->
1264 void))
1265 "Set the RGB blend equation and the alpha blend equation separately.
1266
1267 MODERGB
1268 specifies the RGB blend equation, how the red, green, and blue
1269 components of the source and destination colors are combined. It
1270 must be `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
1271 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN', `GL_MAX'.
1272
1273 MODEALPHA
1274 specifies the alpha blend equation, how the alpha component of the
1275 source and destination colors are combined. It must be
1276 `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1277 `GL_MIN', `GL_MAX'.
1278
1279 The blend equations determines how a new pixel (the ''source'' color) is
1280 combined with a pixel already in the framebuffer (the ''destination''
1281 color). This function specifies one blend equation for the RGB-color
1282 components and one blend equation for the alpha component.
1283
1284 The blend equations use the source and destination blend factors
1285 specified by either `glBlendFunc' or `glBlendFuncSeparate'. See
1286 `glBlendFunc' or `glBlendFuncSeparate' for a description of the various
1287 blend factors.
1288
1289 In the equations that follow, source and destination color components
1290 are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) , respectively.
1291 The result color is referred to as (R_R,G_RB_RA_R) . The source and
1292 destination blend factors are denoted (S_R,S_GS_BS_A) and
1293 (D_R,D_GD_BD_A) , respectively. For these equations all color components
1294 are understood to have values in the range [0,1] .
1295
1296 *Mode*
1297 *RGB Components*, *Alpha Component*
1298
1299 `GL_FUNC_ADD'
1300 RR=R_S\u2062S_R+R_D\u2062D_R GR=G_S\u2062S_G+G_D\u2062D_G BR=B_S\u2062S_B+B_D\u2062D_B ,
1301 AR=A_S\u2062S_A+A_D\u2062D_A
1302
1303 `GL_FUNC_SUBTRACT'
1304 RR=R_S\u2062S_R-R_D\u2062D_R GR=G_S\u2062S_G-G_D\u2062D_G BR=B_S\u2062S_B-B_D\u2062D_B ,
1305 AR=A_S\u2062S_A-A_D\u2062D_A
1306
1307 `GL_FUNC_REVERSE_SUBTRACT'
1308 RR=R_D\u2062D_R-R_S\u2062S_R GR=G_D\u2062D_G-G_S\u2062S_G BR=B_D\u2062D_B-B_S\u2062S_B ,
1309 AR=A_D\u2062D_A-A_S\u2062S_A
1310
1311 `GL_MIN'
1312 RR=MIN\u2061(R_S,R_D) GR=MIN\u2061(G_S,G_D) BR=MIN\u2061(B_S,B_D) ,
1313 AR=MIN\u2061(A_S,A_D)
1314
1315 `GL_MAX'
1316 RR=MAX\u2061(R_S,R_D) GR=MAX\u2061(G_S,G_D) BR=MAX\u2061(B_S,B_D) ,
1317 AR=MAX\u2061(A_S,A_D)
1318
1319 The results of these equations are clamped to the range [0,1] .
1320
1321 The `GL_MIN' and `GL_MAX' equations are useful for applications that
1322 analyze image data (image thresholding against a constant color, for
1323 example). The `GL_FUNC_ADD' equation is useful for antialiasing and
1324 transparency, among other things.
1325
1326 Initially, both the RGB blend equation and the alpha blend equation are
1327 set to `GL_FUNC_ADD'.
1328
1329
1330
1331 `GL_INVALID_ENUM' is generated if either MODERGB or MODEALPHA is not one
1332 of `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1333 `GL_MAX', or `GL_MIN'.
1334
1335 `GL_INVALID_OPERATION' is generated if `glBlendEquationSeparate' is
1336 executed between the execution of `glBegin' and the corresponding
1337 execution of `glEnd'.")
1338
1339 (define-gl-procedures
1340 ((glBlendEquation (mode GLenum) -> void))
1341 "Specify the equation used for both the RGB blend equation and the Alpha
1342 blend equation.
1343
1344 MODE
1345 specifies how source and destination colors are combined. It must
1346 be `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1347 `GL_MIN', `GL_MAX'.
1348
1349 The blend equations determine how a new pixel (the ''source'' color) is
1350 combined with a pixel already in the framebuffer (the ''destination''
1351 color). This function sets both the RGB blend equation and the alpha
1352 blend equation to a single equation.
1353
1354 These equations use the source and destination blend factors specified
1355 by either `glBlendFunc' or `glBlendFuncSeparate'. See `glBlendFunc' or
1356 `glBlendFuncSeparate' for a description of the various blend factors.
1357
1358 In the equations that follow, source and destination color components
1359 are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) , respectively.
1360 The result color is referred to as (R_R,G_RB_RA_R) . The source and
1361 destination blend factors are denoted (S_R,S_GS_BS_A) and
1362 (D_R,D_GD_BD_A) , respectively. For these equations all color components
1363 are understood to have values in the range [0,1] .
1364
1365 *Mode*
1366 *RGB Components*, *Alpha Component*
1367
1368 `GL_FUNC_ADD'
1369 RR=R_S\u2062S_R+R_D\u2062D_R GR=G_S\u2062S_G+G_D\u2062D_G BR=B_S\u2062S_B+B_D\u2062D_B ,
1370 AR=A_S\u2062S_A+A_D\u2062D_A
1371
1372 `GL_FUNC_SUBTRACT'
1373 RR=R_S\u2062S_R-R_D\u2062D_R GR=G_S\u2062S_G-G_D\u2062D_G BR=B_S\u2062S_B-B_D\u2062D_B ,
1374 AR=A_S\u2062S_A-A_D\u2062D_A
1375
1376 `GL_FUNC_REVERSE_SUBTRACT'
1377 RR=R_D\u2062D_R-R_S\u2062S_R GR=G_D\u2062D_G-G_S\u2062S_G BR=B_D\u2062D_B-B_S\u2062S_B ,
1378 AR=A_D\u2062D_A-A_S\u2062S_A
1379
1380 `GL_MIN'
1381 RR=MIN\u2061(R_S,R_D) GR=MIN\u2061(G_S,G_D) BR=MIN\u2061(B_S,B_D) ,
1382 AR=MIN\u2061(A_S,A_D)
1383
1384 `GL_MAX'
1385 RR=MAX\u2061(R_S,R_D) GR=MAX\u2061(G_S,G_D) BR=MAX\u2061(B_S,B_D) ,
1386 AR=MAX\u2061(A_S,A_D)
1387
1388 The results of these equations are clamped to the range [0,1] .
1389
1390 The `GL_MIN' and `GL_MAX' equations are useful for applications that
1391 analyze image data (image thresholding against a constant color, for
1392 example). The `GL_FUNC_ADD' equation is useful for antialiasing and
1393 transparency, among other things.
1394
1395 Initially, both the RGB blend equation and the alpha blend equation are
1396 set to `GL_FUNC_ADD'.
1397
1398
1399
1400 `GL_INVALID_ENUM' is generated if MODE is not one of `GL_FUNC_ADD',
1401 `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT', `GL_MAX', or `GL_MIN'.
1402
1403 `GL_INVALID_OPERATION' is generated if `glBlendEquation' is executed
1404 between the execution of `glBegin' and the corresponding execution of
1405 `glEnd'.")
1406
1407 (define-gl-procedures
1408 ((glBlendFuncSeparate
1409 (srcRGB GLenum)
1410 (dstRGB GLenum)
1411 (srcAlpha GLenum)
1412 (dstAlpha GLenum)
1413 ->
1414 void))
1415 "Specify pixel arithmetic for RGB and alpha components separately.
1416
1417 SRCRGB
1418 Specifies how the red, green, and blue blending factors are
1419 computed. The following symbolic constants are accepted: `GL_ZERO',
1420 `GL_ONE', `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR',
1421 `GL_ONE_MINUS_DST_COLOR', `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA',
1422 `GL_DST_ALPHA', `GL_ONE_MINUS_DST_ALPHA', `GL_CONSTANT_COLOR',
1423 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA',
1424 `GL_ONE_MINUS_CONSTANT_ALPHA', and `GL_SRC_ALPHA_SATURATE'. The
1425 initial value is `GL_ONE'.
1426
1427 DSTRGB
1428 Specifies how the red, green, and blue destination blending factors
1429 are computed. The following symbolic constants are accepted:
1430 `GL_ZERO', `GL_ONE', `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR',
1431 `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR', `GL_SRC_ALPHA',
1432 `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA', `GL_ONE_MINUS_DST_ALPHA'.
1433 `GL_CONSTANT_COLOR', `GL_ONE_MINUS_CONSTANT_COLOR',
1434 `GL_CONSTANT_ALPHA', and `GL_ONE_MINUS_CONSTANT_ALPHA'. The initial
1435 value is `GL_ZERO'.
1436
1437 SRCALPHA
1438 Specified how the alpha source blending factor is computed. The
1439 same symbolic constants are accepted as for SRCRGB. The initial
1440 value is `GL_ONE'.
1441
1442 DSTALPHA
1443 Specified how the alpha destination blending factor is computed.
1444 The same symbolic constants are accepted as for DSTRGB. The initial
1445 value is `GL_ZERO'.
1446
1447 In RGBA mode, pixels can be drawn using a function that blends the
1448 incoming (source) RGBA values with the RGBA values that are already in
1449 the frame buffer (the destination values). Blending is initially
1450 disabled. Use `glEnable' and `glDisable' with argument `GL_BLEND' to
1451 enable and disable blending.
1452
1453 `glBlendFuncSeparate' defines the operation of blending when it is
1454 enabled. SRCRGB specifies which method is used to scale the source
1455 RGB-color components. DSTRGB specifies which method is used to scale the
1456 destination RGB-color components. Likewise, SRCALPHA specifies which
1457 method is used to scale the source alpha color component, and DSTALPHA
1458 specifies which method is used to scale the destination alpha component.
1459 The possible methods are described in the following table. Each method
1460 defines four scale factors, one each for red, green, blue, and alpha.
1461
1462 In the table and in subsequent equations, source and destination color
1463 components are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) . The
1464 color specified by `glBlendColor' is referred to as (R_C,G_CB_CA_C) .
1465 They are understood to have integer values between 0 and (K_R,K_GK_BK_A)
1466 , where
1467
1468 K_C=2^M_C,-1
1469
1470 and (M_R,M_GM_BM_A) is the number of red, green, blue, and alpha
1471 bitplanes.
1472
1473 Source and destination scale factors are referred to as (S_R,S_GS_BS_A)
1474 and (D_R,D_GD_BD_A) . All scale factors have range [0,1] .
1475
1476
1477
1478 *Parameter*
1479 *RGB Factor*, *Alpha Factor*
1480
1481 `GL_ZERO'
1482 (0,00) , 0
1483
1484 `GL_ONE'
1485 (1,11) , 1
1486
1487 `GL_SRC_COLOR'
1488 (R_S/K_R,G_S/K_GB_S/K_B) , A_S/K_A
1489
1490 `GL_ONE_MINUS_SRC_COLOR'
1491 (1,111)-(R_S/K_R,G_S/K_GB_S/K_B) , 1-A_S/K_A
1492
1493 `GL_DST_COLOR'
1494 (R_D/K_R,G_D/K_GB_D/K_B) , A_D/K_A
1495
1496 `GL_ONE_MINUS_DST_COLOR'
1497 (1,11)-(R_D/K_R,G_D/K_GB_D/K_B) , 1-A_D/K_A
1498
1499 `GL_SRC_ALPHA'
1500 (A_S/K_A,A_S/K_AA_S/K_A) , A_S/K_A
1501
1502 `GL_ONE_MINUS_SRC_ALPHA'
1503 (1,11)-(A_S/K_A,A_S/K_AA_S/K_A) , 1-A_S/K_A
1504
1505 `GL_DST_ALPHA'
1506 (A_D/K_A,A_D/K_AA_D/K_A) , A_D/K_A
1507
1508 `GL_ONE_MINUS_DST_ALPHA'
1509 (1,11)-(A_D/K_A,A_D/K_AA_D/K_A) , 1-A_D/K_A
1510
1511 `GL_CONSTANT_COLOR'
1512 (R_C,G_CB_C) , A_C
1513
1514 `GL_ONE_MINUS_CONSTANT_COLOR'
1515 (1,11)-(R_C,G_CB_C) , 1-A_C
1516
1517 `GL_CONSTANT_ALPHA'
1518 (A_C,A_CA_C) , A_C
1519
1520 `GL_ONE_MINUS_CONSTANT_ALPHA'
1521 (1,11)-(A_C,A_CA_C) , 1-A_C
1522
1523 `GL_SRC_ALPHA_SATURATE'
1524 (I,II) , 1
1525
1526 In the table,
1527
1528 I=MIN\u2061(A_S,1-A_D,)
1529
1530 To determine the blended RGBA values of a pixel when drawing in RGBA
1531 mode, the system uses the following equations:
1532
1533 R_D=MIN\u2061(K_R,R_S\u2062S_R+R_D\u2062D_R) G_D=MIN\u2061(K_G,G_S\u2062S_G+G_D\u2062D_G)
1534 B_D=MIN\u2061(K_B,B_S\u2062S_B+B_D\u2062D_B) A_D=MIN\u2061(K_A,A_S\u2062S_A+A_D\u2062D_A)
1535
1536 Despite the apparent precision of the above equations, blending
1537 arithmetic is not exactly specified, because blending operates with
1538 imprecise integer color values. However, a blend factor that should be
1539 equal to 1 is guaranteed not to modify its multiplicand, and a blend
1540 factor equal to 0 reduces its multiplicand to 0. For example, when
1541 SRCRGB is `GL_SRC_ALPHA', DSTRGB is `GL_ONE_MINUS_SRC_ALPHA', and A_S is
1542 equal to K_A , the equations reduce to simple replacement:
1543
1544 R_D=R_S G_D=G_S B_D=B_S A_D=A_S
1545
1546
1547
1548 `GL_INVALID_ENUM' is generated if either SRCRGB or DSTRGB is not an
1549 accepted value.
1550
1551 `GL_INVALID_OPERATION' is generated if `glBlendFuncSeparate' is executed
1552 between the execution of `glBegin' and the corresponding execution of
1553 `glEnd'.")
1554
1555 (define-gl-procedures
1556 ((glBlendFunc
1557 (sfactor GLenum)
1558 (dfactor GLenum)
1559 ->
1560 void))
1561 "Specify pixel arithmetic.
1562
1563 SFACTOR
1564 Specifies how the red, green, blue, and alpha source blending
1565 factors are computed. The following symbolic constants are
1566 accepted: `GL_ZERO', `GL_ONE', `GL_SRC_COLOR',
1567 `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR',
1568 `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA',
1569 `GL_ONE_MINUS_DST_ALPHA', `GL_CONSTANT_COLOR',
1570 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA',
1571 `GL_ONE_MINUS_CONSTANT_ALPHA', and `GL_SRC_ALPHA_SATURATE'. The
1572 initial value is `GL_ONE'.
1573
1574 DFACTOR
1575 Specifies how the red, green, blue, and alpha destination blending
1576 factors are computed. The following symbolic constants are
1577 accepted: `GL_ZERO', `GL_ONE', `GL_SRC_COLOR',
1578 `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR',
1579 `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA',
1580 `GL_ONE_MINUS_DST_ALPHA'. `GL_CONSTANT_COLOR',
1581 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA', and
1582 `GL_ONE_MINUS_CONSTANT_ALPHA'. The initial value is `GL_ZERO'.
1583
1584 In RGBA mode, pixels can be drawn using a function that blends the
1585 incoming (source) RGBA values with the RGBA values that are already in
1586 the frame buffer (the destination values). Blending is initially
1587 disabled. Use `glEnable' and `glDisable' with argument `GL_BLEND' to
1588 enable and disable blending.
1589
1590 `glBlendFunc' defines the operation of blending when it is enabled.
1591 SFACTOR specifies which method is used to scale the source color
1592 components. DFACTOR specifies which method is used to scale the
1593 destination color components. The possible methods are described in the
1594 following table. Each method defines four scale factors, one each for
1595 red, green, blue, and alpha. In the table and in subsequent equations,
1596 source and destination color components are referred to as
1597 (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) . The color specified by
1598 `glBlendColor' is referred to as (R_C,G_CB_CA_C) . They are understood
1599 to have integer values between 0 and (K_R,K_GK_BK_A) , where
1600
1601 K_C=2^M_C,-1
1602
1603 and (M_R,M_GM_BM_A) is the number of red, green, blue, and alpha
1604 bitplanes.
1605
1606 Source and destination scale factors are referred to as (S_R,S_GS_BS_A)
1607 and (D_R,D_GD_BD_A) . The scale factors described in the table, denoted
1608 (F_R,F_GF_BF_A) , represent either source or destination factors. All
1609 scale factors have range [0,1] .
1610
1611
1612
1613 *Parameter*
1614 * (F_R,F_GF_BF_A) *
1615
1616 `GL_ZERO'
1617 (0,000)
1618
1619 `GL_ONE'
1620 (1,111)
1621
1622 `GL_SRC_COLOR'
1623 (R_S/K_R,G_S/K_GB_S/K_BA_S/K_A)
1624
1625 `GL_ONE_MINUS_SRC_COLOR'
1626 (1,111)-(R_S/K_R,G_S/K_GB_S/K_BA_S/K_A)
1627
1628 `GL_DST_COLOR'
1629 (R_D/K_R,G_D/K_GB_D/K_BA_D/K_A)
1630
1631 `GL_ONE_MINUS_DST_COLOR'
1632 (1,111)-(R_D/K_R,G_D/K_GB_D/K_BA_D/K_A)
1633
1634 `GL_SRC_ALPHA'
1635 (A_S/K_A,A_S/K_AA_S/K_AA_S/K_A)
1636
1637 `GL_ONE_MINUS_SRC_ALPHA'
1638 (1,111)-(A_S/K_A,A_S/K_AA_S/K_AA_S/K_A)
1639
1640 `GL_DST_ALPHA'
1641 (A_D/K_A,A_D/K_AA_D/K_AA_D/K_A)
1642
1643 `GL_ONE_MINUS_DST_ALPHA'
1644 (1,111)-(A_D/K_A,A_D/K_AA_D/K_AA_D/K_A)
1645
1646 `GL_CONSTANT_COLOR'
1647 (R_C,G_CB_CA_C)
1648
1649 `GL_ONE_MINUS_CONSTANT_COLOR'
1650 (1,111)-(R_C,G_CB_CA_C)
1651
1652 `GL_CONSTANT_ALPHA'
1653 (A_C,A_CA_CA_C)
1654
1655 `GL_ONE_MINUS_CONSTANT_ALPHA'
1656 (1,111)-(A_C,A_CA_CA_C)
1657
1658 `GL_SRC_ALPHA_SATURATE'
1659 (I,II1)
1660
1661 In the table,
1662
1663 I=MIN\u2061(A_S,K_A-A_D)/K_A
1664
1665 To determine the blended RGBA values of a pixel when drawing in RGBA
1666 mode, the system uses the following equations:
1667
1668 R_D=MIN\u2061(K_R,R_S\u2062S_R+R_D\u2062D_R) G_D=MIN\u2061(K_G,G_S\u2062S_G+G_D\u2062D_G)
1669 B_D=MIN\u2061(K_B,B_S\u2062S_B+B_D\u2062D_B) A_D=MIN\u2061(K_A,A_S\u2062S_A+A_D\u2062D_A)
1670
1671 Despite the apparent precision of the above equations, blending
1672 arithmetic is not exactly specified, because blending operates with
1673 imprecise integer color values. However, a blend factor that should be
1674 equal to 1 is guaranteed not to modify its multiplicand, and a blend
1675 factor equal to 0 reduces its multiplicand to 0. For example, when
1676 SFACTOR is `GL_SRC_ALPHA', DFACTOR is `GL_ONE_MINUS_SRC_ALPHA', and A_S
1677 is equal to K_A , the equations reduce to simple replacement:
1678
1679 R_D=R_S G_D=G_S B_D=B_S A_D=A_S
1680
1681
1682
1683 `GL_INVALID_ENUM' is generated if either SFACTOR or DFACTOR is not an
1684 accepted value.
1685
1686 `GL_INVALID_OPERATION' is generated if `glBlendFunc' is executed between
1687 the execution of `glBegin' and the corresponding execution of `glEnd'.")
1688
1689 (define-gl-procedures
1690 ((glBufferData
1691 (target GLenum)
1692 (size GLsizeiptr)
1693 (data const-GLvoid-*)
1694 (usage GLenum)
1695 ->
1696 void))
1697 "Creates and initializes a buffer object's data store.
1698
1699 TARGET
1700 Specifies the target buffer object. The symbolic constant must be
1701 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
1702 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
1703
1704 SIZE
1705 Specifies the size in bytes of the buffer object's new data store.
1706
1707 DATA
1708 Specifies a pointer to data that will be copied into the data store
1709 for initialization, or `NULL' if no data is to be copied.
1710
1711 USAGE
1712 Specifies the expected usage pattern of the data store. The
1713 symbolic constant must be `GL_STREAM_DRAW', `GL_STREAM_READ',
1714 `GL_STREAM_COPY', `GL_STATIC_DRAW', `GL_STATIC_READ',
1715 `GL_STATIC_COPY', `GL_DYNAMIC_DRAW', `GL_DYNAMIC_READ', or
1716 `GL_DYNAMIC_COPY'.
1717
1718 `glBufferData' creates a new data store for the buffer object currently
1719 bound to TARGET. Any pre-existing data store is deleted. The new data
1720 store is created with the specified SIZE in bytes and USAGE. If DATA is
1721 not `NULL', the data store is initialized with data from this pointer.
1722 In its initial state, the new data store is not mapped, it has a `NULL'
1723 mapped pointer, and its mapped access is `GL_READ_WRITE'.
1724
1725 USAGE is a hint to the GL implementation as to how a buffer object's
1726 data store will be accessed. This enables the GL implementation to make
1727 more intelligent decisions that may significantly impact buffer object
1728 performance. It does not, however, constrain the actual usage of the
1729 data store. USAGE can be broken down into two parts: first, the
1730 frequency of access (modification and usage), and second, the nature of
1731 that access. The frequency of access may be one of these:
1732
1733 STREAM
1734 The data store contents will be modified once and used at most a
1735 few times.
1736
1737 STATIC
1738 The data store contents will be modified once and used many times.
1739
1740 DYNAMIC
1741 The data store contents will be modified repeatedly and used many
1742 times.
1743
1744 The nature of access may be one of these:
1745
1746 DRAW
1747 The data store contents are modified by the application, and used
1748 as the source for GL drawing and image specification commands.
1749
1750 READ
1751 The data store contents are modified by reading data from the GL,
1752 and used to return that data when queried by the application.
1753
1754 COPY
1755 The data store contents are modified by reading data from the GL,
1756 and used as the source for GL drawing and image specification
1757 commands.
1758
1759 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
1760 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
1761 `GL_PIXEL_UNPACK_BUFFER'.
1762
1763 `GL_INVALID_ENUM' is generated if USAGE is not `GL_STREAM_DRAW',
1764 `GL_STREAM_READ', `GL_STREAM_COPY', `GL_STATIC_DRAW', `GL_STATIC_READ',
1765 `GL_STATIC_COPY', `GL_DYNAMIC_DRAW', `GL_DYNAMIC_READ', or
1766 `GL_DYNAMIC_COPY'.
1767
1768 `GL_INVALID_VALUE' is generated if SIZE is negative.
1769
1770 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
1771 is bound to TARGET.
1772
1773 `GL_OUT_OF_MEMORY' is generated if the GL is unable to create a data
1774 store with the specified SIZE.
1775
1776 `GL_INVALID_OPERATION' is generated if `glBufferData' is executed
1777 between the execution of `glBegin' and the corresponding execution of
1778 `glEnd'.")
1779
1780 (define-gl-procedures
1781 ((glBufferSubData
1782 (target GLenum)
1783 (offset GLintptr)
1784 (size GLsizeiptr)
1785 (data const-GLvoid-*)
1786 ->
1787 void))
1788 "Updates a subset of a buffer object's data store.
1789
1790 TARGET
1791 Specifies the target buffer object. The symbolic constant must be
1792 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
1793 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
1794
1795 OFFSET
1796 Specifies the offset into the buffer object's data store where data
1797 replacement will begin, measured in bytes.
1798
1799 SIZE
1800 Specifies the size in bytes of the data store region being
1801 replaced.
1802
1803 DATA
1804 Specifies a pointer to the new data that will be copied into the
1805 data store.
1806
1807 `glBufferSubData' redefines some or all of the data store for the buffer
1808 object currently bound to TARGET. Data starting at byte offset OFFSET
1809 and extending for SIZE bytes is copied to the data store from the memory
1810 pointed to by DATA. An error is thrown if OFFSET and SIZE together
1811 define a range beyond the bounds of the buffer object's data store.
1812
1813 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
1814 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
1815 `GL_PIXEL_UNPACK_BUFFER'.
1816
1817 `GL_INVALID_VALUE' is generated if OFFSET or SIZE is negative, or if
1818 together they define a region of memory that extends beyond the buffer
1819 object's allocated data store.
1820
1821 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
1822 is bound to TARGET.
1823
1824 `GL_INVALID_OPERATION' is generated if the buffer object being updated
1825 is mapped.
1826
1827 `GL_INVALID_OPERATION' is generated if `glBufferSubData' is executed
1828 between the execution of `glBegin' and the corresponding execution of
1829 `glEnd'.")
1830
1831 (define-gl-procedures
1832 ((glCallLists
1833 (n GLsizei)
1834 (type GLenum)
1835 (lists const-GLvoid-*)
1836 ->
1837 void))
1838 "Execute a list of display lists.
1839
1840 N
1841 Specifies the number of display lists to be executed.
1842
1843 TYPE
1844 Specifies the type of values in LISTS. Symbolic constants
1845 `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_UNSIGNED_SHORT',
1846 `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', `GL_2_BYTES',
1847 `GL_3_BYTES', and `GL_4_BYTES' are accepted.
1848
1849 LISTS
1850 Specifies the address of an array of name offsets in the display
1851 list. The pointer type is void because the offsets can be bytes,
1852 shorts, ints, or floats, depending on the value of TYPE.
1853
1854 `glCallLists' causes each display list in the list of names passed as
1855 LISTS to be executed. As a result, the commands saved in each display
1856 list are executed in order, just as if they were called without using a
1857 display list. Names of display lists that have not been defined are
1858 ignored.
1859
1860 `glCallLists' provides an efficient means for executing more than one
1861 display list. TYPE allows lists with various name formats to be
1862 accepted. The formats are as follows:
1863
1864 `GL_BYTE'
1865 LISTS is treated as an array of signed bytes, each in the range
1866 -128 through 127.
1867
1868 `GL_UNSIGNED_BYTE'
1869 LISTS is treated as an array of unsigned bytes, each in the range 0
1870 through 255.
1871
1872 `GL_SHORT'
1873 LISTS is treated as an array of signed two-byte integers, each in
1874 the range -32768 through 32767.
1875
1876 `GL_UNSIGNED_SHORT'
1877 LISTS is treated as an array of unsigned two-byte integers, each in
1878 the range 0 through 65535.
1879
1880 `GL_INT'
1881 LISTS is treated as an array of signed four-byte integers.
1882
1883 `GL_UNSIGNED_INT'
1884 LISTS is treated as an array of unsigned four-byte integers.
1885
1886 `GL_FLOAT'
1887 LISTS is treated as an array of four-byte floating-point values.
1888
1889 `GL_2_BYTES'
1890 LISTS is treated as an array of unsigned bytes. Each pair of bytes
1891 specifies a single display-list name. The value of the pair is
1892 computed as 256 times the unsigned value of the first byte plus the
1893 unsigned value of the second byte.
1894
1895 `GL_3_BYTES'
1896 LISTS is treated as an array of unsigned bytes. Each triplet of
1897 bytes specifies a single display-list name. The value of the
1898 triplet is computed as 65536 times the unsigned value of the first
1899 byte, plus 256 times the unsigned value of the second byte, plus
1900 the unsigned value of the third byte.
1901
1902 `GL_4_BYTES'
1903 LISTS is treated as an array of unsigned bytes. Each quadruplet of
1904 bytes specifies a single display-list name. The value of the
1905 quadruplet is computed as 16777216 times the unsigned value of the
1906 first byte, plus 65536 times the unsigned value of the second byte,
1907 plus 256 times the unsigned value of the third byte, plus the
1908 unsigned value of the fourth byte.
1909
1910 The list of display-list names is not null-terminated. Rather, N
1911 specifies how many names are to be taken from LISTS.
1912
1913 An additional level of indirection is made available with the
1914 `glListBase' command, which specifies an unsigned offset that is added
1915 to each display-list name specified in LISTS before that display list is
1916 executed.
1917
1918 `glCallLists' can appear inside a display list. To avoid the possibility
1919 of infinite recursion resulting from display lists calling one another,
1920 a limit is placed on the nesting level of display lists during
1921 display-list execution. This limit must be at least 64, and it depends
1922 on the implementation.
1923
1924 GL state is not saved and restored across a call to `glCallLists'. Thus,
1925 changes made to GL state during the execution of the display lists
1926 remain after execution is completed. Use `glPushAttrib', `glPopAttrib',
1927 `glPushMatrix', and `glPopMatrix' to preserve GL state across
1928 `glCallLists' calls.
1929
1930 `GL_INVALID_VALUE' is generated if N is negative.
1931
1932 `GL_INVALID_ENUM' is generated if TYPE is not one of `GL_BYTE',
1933 `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_UNSIGNED_SHORT', `GL_INT',
1934 `GL_UNSIGNED_INT', `GL_FLOAT', `GL_2_BYTES', `GL_3_BYTES', `GL_4_BYTES'.")
1935
1936 (define-gl-procedures
1937 ((glCallList (list GLuint) -> void))
1938 "Execute a display list.
1939
1940 LIST
1941 Specifies the integer name of the display list to be executed.
1942
1943 `glCallList' causes the named display list to be executed. The commands
1944 saved in the display list are executed in order, just as if they were
1945 called without using a display list. If LIST has not been defined as a
1946 display list, `glCallList' is ignored.
1947
1948 `glCallList' can appear inside a display list. To avoid the possibility
1949 of infinite recursion resulting from display lists calling one another,
1950 a limit is placed on the nesting level of display lists during
1951 display-list execution. This limit is at least 64, and it depends on the
1952 implementation.
1953
1954 GL state is not saved and restored across a call to `glCallList'. Thus,
1955 changes made to GL state during the execution of a display list remain
1956 after execution of the display list is completed. Use `glPushAttrib',
1957 `glPopAttrib', `glPushMatrix', and `glPopMatrix' to preserve GL state
1958 across `glCallList' calls.")
1959
1960 (define-gl-procedures
1961 ((glClearAccum
1962 (red GLfloat)
1963 (green GLfloat)
1964 (blue GLfloat)
1965 (alpha GLfloat)
1966 ->
1967 void))
1968 "Specify clear values for the accumulation buffer.
1969
1970 RED
1971 GREEN
1972
1973 BLUE
1974
1975 ALPHA
1976
1977 Specify the red, green, blue, and alpha values used when the
1978 accumulation buffer is cleared. The initial values are all 0.
1979
1980 `glClearAccum' specifies the red, green, blue, and alpha values used by
1981 `glClear' to clear the accumulation buffer.
1982
1983 Values specified by `glClearAccum' are clamped to the range [-1,1] .
1984
1985 `GL_INVALID_OPERATION' is generated if `glClearAccum' is executed
1986 between the execution of `glBegin' and the corresponding execution of
1987 `glEnd'.")
1988
1989 (define-gl-procedures
1990 ((glClearColor
1991 (red GLclampf)
1992 (green GLclampf)
1993 (blue GLclampf)
1994 (alpha GLclampf)
1995 ->
1996 void))
1997 "Specify clear values for the color buffers.
1998
1999 RED
2000 GREEN
2001
2002 BLUE
2003
2004 ALPHA
2005
2006 Specify the red, green, blue, and alpha values used when the color
2007 buffers are cleared. The initial values are all 0.
2008
2009 `glClearColor' specifies the red, green, blue, and alpha values used by
2010 `glClear' to clear the color buffers. Values specified by `glClearColor'
2011 are clamped to the range [0,1] .
2012
2013 `GL_INVALID_OPERATION' is generated if `glClearColor' is executed
2014 between the execution of `glBegin' and the corresponding execution of
2015 `glEnd'.")
2016
2017 (define-gl-procedures
2018 ((glClearDepth (depth GLclampd) -> void))
2019 "Specify the clear value for the depth buffer.
2020
2021 DEPTH
2022 Specifies the depth value used when the depth buffer is cleared.
2023 The initial value is 1.
2024
2025 `glClearDepth' specifies the depth value used by `glClear' to clear the
2026 depth buffer. Values specified by `glClearDepth' are clamped to the
2027 range [0,1] .
2028
2029 `GL_INVALID_OPERATION' is generated if `glClearDepth' is executed
2030 between the execution of `glBegin' and the corresponding execution of
2031 `glEnd'.")
2032
2033 (define-gl-procedures
2034 ((glClearIndex (c GLfloat) -> void))
2035 "Specify the clear value for the color index buffers.
2036
2037 C
2038 Specifies the index used when the color index buffers are cleared.
2039 The initial value is 0.
2040
2041 `glClearIndex' specifies the index used by `glClear' to clear the color
2042 index buffers. C is not clamped. Rather, C is converted to a fixed-point
2043 value with unspecified precision to the right of the binary point. The
2044 integer part of this value is then masked with 2^M-1 , where M is the
2045 number of bits in a color index stored in the frame buffer.
2046
2047 `GL_INVALID_OPERATION' is generated if `glClearIndex' is executed
2048 between the execution of `glBegin' and the corresponding execution of
2049 `glEnd'.")
2050
2051 (define-gl-procedures
2052 ((glClearStencil (s GLint) -> void))
2053 "Specify the clear value for the stencil buffer.
2054
2055 S
2056 Specifies the index used when the stencil buffer is cleared. The
2057 initial value is 0.
2058
2059 `glClearStencil' specifies the index used by `glClear' to clear the
2060 stencil buffer. S is masked with 2^M-1 , where M is the number of bits
2061 in the stencil buffer.
2062
2063 `GL_INVALID_OPERATION' is generated if `glClearStencil' is executed
2064 between the execution of `glBegin' and the corresponding execution of
2065 `glEnd'.")
2066
2067 (define-gl-procedures
2068 ((glClear (mask GLbitfield) -> void))
2069 "Clear buffers to preset values.
2070
2071 MASK
2072 Bitwise OR of masks that indicate the buffers to be cleared. The
2073 four masks are `GL_COLOR_BUFFER_BIT', `GL_DEPTH_BUFFER_BIT',
2074 `GL_ACCUM_BUFFER_BIT', and `GL_STENCIL_BUFFER_BIT'.
2075
2076 `glClear' sets the bitplane area of the window to values previously
2077 selected by `glClearColor', `glClearIndex', `glClearDepth',
2078 `glClearStencil', and `glClearAccum'. Multiple color buffers can be
2079 cleared simultaneously by selecting more than one buffer at a time using
2080 `glDrawBuffer'.
2081
2082 The pixel ownership test, the scissor test, dithering, and the buffer
2083 writemasks affect the operation of `glClear'. The scissor box bounds the
2084 cleared region. Alpha function, blend function, logical operation,
2085 stenciling, texture mapping, and depth-buffering are ignored by
2086 `glClear'.
2087
2088 `glClear' takes a single argument that is the bitwise OR of several
2089 values indicating which buffer is to be cleared.
2090
2091 The values are as follows:
2092
2093 `GL_COLOR_BUFFER_BIT'
2094 Indicates the buffers currently enabled for color writing.
2095
2096 `GL_DEPTH_BUFFER_BIT'
2097 Indicates the depth buffer.
2098
2099 `GL_ACCUM_BUFFER_BIT'
2100 Indicates the accumulation buffer.
2101
2102 `GL_STENCIL_BUFFER_BIT'
2103 Indicates the stencil buffer.
2104
2105 The value to which each buffer is cleared depends on the setting of the
2106 clear value for that buffer.
2107
2108 `GL_INVALID_VALUE' is generated if any bit other than the four defined
2109 bits is set in MASK.
2110
2111 `GL_INVALID_OPERATION' is generated if `glClear' is executed between the
2112 execution of `glBegin' and the corresponding execution of `glEnd'.")
2113
2114 (define-gl-procedures
2115 ((glClientActiveTexture (texture GLenum) -> void))
2116 "Select active texture unit.
2117
2118 TEXTURE
2119 Specifies which texture unit to make active. The number of texture
2120 units is implementation dependent, but must be at least two.
2121 TEXTURE must be one of `GL_TEXTURE' I , where i ranges from 0 to
2122 the value of `GL_MAX_TEXTURE_COORDS' - 1, which is an
2123 implementation-dependent value. The initial value is `GL_TEXTURE0'.
2124
2125 `glClientActiveTexture' selects the vertex array client state parameters
2126 to be modified by `glTexCoordPointer', and enabled or disabled with
2127 `glEnableClientState' or `glDisableClientState', respectively, when
2128 called with a parameter of `GL_TEXTURE_COORD_ARRAY'.
2129
2130 `GL_INVALID_ENUM' is generated if TEXTURE is not one of `GL_TEXTURE'I ,
2131 where i ranges from 0 to the value of `GL_MAX_TEXTURE_COORDS' - 1.")
2132
2133 (define-gl-procedures
2134 ((glClipPlane
2135 (plane GLenum)
2136 (equation const-GLdouble-*)
2137 ->
2138 void))
2139 "Specify a plane against which all geometry is clipped.
2140
2141 PLANE
2142 Specifies which clipping plane is being positioned. Symbolic names
2143 of the form `GL_CLIP_PLANE'I, where I is an integer between 0 and
2144 `GL_MAX_CLIP_PLANES' -1 , are accepted.
2145
2146 EQUATION
2147 Specifies the address of an array of four double-precision
2148 floating-point values. These values are interpreted as a plane
2149 equation.
2150
2151 Geometry is always clipped against the boundaries of a six-plane frustum
2152 in X, Y, and Z. `glClipPlane' allows the specification of additional
2153 planes, not necessarily perpendicular to the X, Y, or Z axis, against
2154 which all geometry is clipped. To determine the maximum number of
2155 additional clipping planes, call `glGetIntegerv' with argument
2156 `GL_MAX_CLIP_PLANES'. All implementations support at least six such
2157 clipping planes. Because the resulting clipping region is the
2158 intersection of the defined half-spaces, it is always convex.
2159
2160 `glClipPlane' specifies a half-space using a four-component plane
2161 equation. When `glClipPlane' is called, EQUATION is transformed by the
2162 inverse of the modelview matrix and stored in the resulting eye
2163 coordinates. Subsequent changes to the modelview matrix have no effect
2164 on the stored plane-equation components. If the dot product of the eye
2165 coordinates of a vertex with the stored plane equation components is
2166 positive or zero, the vertex is IN with respect to that clipping plane.
2167 Otherwise, it is OUT.
2168
2169 To enable and disable clipping planes, call `glEnable' and `glDisable'
2170 with the argument `GL_CLIP_PLANE'I, where I is the plane number.
2171
2172 All clipping planes are initially defined as (0, 0, 0, 0) in eye
2173 coordinates and are disabled.
2174
2175 `GL_INVALID_ENUM' is generated if PLANE is not an accepted value.
2176
2177 `GL_INVALID_OPERATION' is generated if `glClipPlane' is executed between
2178 the execution of `glBegin' and the corresponding execution of `glEnd'.")
2179
2180 (define-gl-procedures
2181 ((glColorMask
2182 (red GLboolean)
2183 (green GLboolean)
2184 (blue GLboolean)
2185 (alpha GLboolean)
2186 ->
2187 void))
2188 "Enable and disable writing of frame buffer color components.
2189
2190 RED
2191 GREEN
2192
2193 BLUE
2194
2195 ALPHA
2196
2197 Specify whether red, green, blue, and alpha can or cannot be
2198 written into the frame buffer. The initial values are all
2199 `GL_TRUE', indicating that the color components can be written.
2200
2201 `glColorMask' specifies whether the individual color components in the
2202 frame buffer can or cannot be written. If RED is `GL_FALSE', for
2203 example, no change is made to the red component of any pixel in any of
2204 the color buffers, regardless of the drawing operation attempted.
2205
2206 Changes to individual bits of components cannot be controlled. Rather,
2207 changes are either enabled or disabled for entire color components.
2208
2209 `GL_INVALID_OPERATION' is generated if `glColorMask' is executed between
2210 the execution of `glBegin' and the corresponding execution of `glEnd'.")
2211
2212 (define-gl-procedures
2213 ((glColorMaterial
2214 (face GLenum)
2215 (mode GLenum)
2216 ->
2217 void))
2218 "Cause a material color to track the current color.
2219
2220 FACE
2221 Specifies whether front, back, or both front and back material
2222 parameters should track the current color. Accepted values are
2223 `GL_FRONT', `GL_BACK', and `GL_FRONT_AND_BACK'. The initial value
2224 is `GL_FRONT_AND_BACK'.
2225
2226 MODE
2227 Specifies which of several material parameters track the current
2228 color. Accepted values are `GL_EMISSION', `GL_AMBIENT',
2229 `GL_DIFFUSE', `GL_SPECULAR', and `GL_AMBIENT_AND_DIFFUSE'. The
2230 initial value is `GL_AMBIENT_AND_DIFFUSE'.
2231
2232 `glColorMaterial' specifies which material parameters track the current
2233 color. When `GL_COLOR_MATERIAL' is enabled, the material parameter or
2234 parameters specified by MODE, of the material or materials specified by
2235 FACE, track the current color at all times.
2236
2237 To enable and disable `GL_COLOR_MATERIAL', call `glEnable' and
2238 `glDisable' with argument `GL_COLOR_MATERIAL'. `GL_COLOR_MATERIAL' is
2239 initially disabled.
2240
2241 `GL_INVALID_ENUM' is generated if FACE or MODE is not an accepted value.
2242
2243 `GL_INVALID_OPERATION' is generated if `glColorMaterial' is executed
2244 between the execution of `glBegin' and the corresponding execution of
2245 `glEnd'.")
2246
2247 (define-gl-procedures
2248 ((glColorPointer
2249 (size GLint)
2250 (type GLenum)
2251 (stride GLsizei)
2252 (pointer const-GLvoid-*)
2253 ->
2254 void))
2255 "Define an array of colors.
2256
2257 SIZE
2258 Specifies the number of components per color. Must be 3 or 4. The
2259 initial value is 4.
2260
2261 TYPE
2262 Specifies the data type of each color component in the array.
2263 Symbolic constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
2264 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', and
2265 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
2266
2267 STRIDE
2268 Specifies the byte offset between consecutive colors. If STRIDE is
2269 0, the colors are understood to be tightly packed in the array. The
2270 initial value is 0.
2271
2272 POINTER
2273 Specifies a pointer to the first component of the first color
2274 element in the array. The initial value is 0.
2275
2276 `glColorPointer' specifies the location and data format of an array of
2277 color components to use when rendering. SIZE specifies the number of
2278 components per color, and must be 3 or 4. TYPE specifies the data type
2279 of each color component, and STRIDE specifies the byte stride from one
2280 color to the next, allowing vertices and attributes to be packed into a
2281 single array or stored in separate arrays. (Single-array storage may be
2282 more efficient on some implementations; see `glInterleavedArrays'.)
2283
2284 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
2285 target (see `glBindBuffer') while a color array is specified, POINTER is
2286 treated as a byte offset into the buffer object's data store. Also, the
2287 buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as color
2288 vertex array client-side state (`GL_COLOR_ARRAY_BUFFER_BINDING').
2289
2290 When a color array is specified, SIZE, TYPE, STRIDE, and POINTER are
2291 saved as client-side state, in addition to the current vertex array
2292 buffer object binding.
2293
2294 To enable and disable the color array, call `glEnableClientState' and
2295 `glDisableClientState' with the argument `GL_COLOR_ARRAY'. If enabled,
2296 the color array is used when `glDrawArrays', `glMultiDrawArrays',
2297 `glDrawElements', `glMultiDrawElements', `glDrawRangeElements', or
2298 `glArrayElement' is called.
2299
2300 `GL_INVALID_VALUE' is generated if SIZE is not 3 or 4.
2301
2302 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
2303
2304 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
2305
2306 (define-gl-procedures
2307 ((glColorSubTable
2308 (target GLenum)
2309 (start GLsizei)
2310 (count GLsizei)
2311 (format GLenum)
2312 (type GLenum)
2313 (data const-GLvoid-*)
2314 ->
2315 void))
2316 "Respecify a portion of a color table.
2317
2318 TARGET
2319 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
2320 or `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2321
2322 START
2323 The starting index of the portion of the color table to be
2324 replaced.
2325
2326 COUNT
2327 The number of table entries to replace.
2328
2329 FORMAT
2330 The format of the pixel data in DATA. The allowable values are
2331 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
2332 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
2333
2334 TYPE
2335 The type of the pixel data in DATA. The allowable values are
2336 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
2337 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
2338 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
2339 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
2340 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
2341 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
2342 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
2343 `GL_UNSIGNED_INT_2_10_10_10_REV'.
2344
2345 DATA
2346 Pointer to a one-dimensional array of pixel data that is processed
2347 to replace the specified region of the color table.
2348
2349 `glColorSubTable' is used to respecify a contiguous portion of a color
2350 table previously defined using `glColorTable'. The pixels referenced by
2351 DATA replace the portion of the existing table from indices START to
2352 START+COUNT-1 , inclusive. This region may not include any entries
2353 outside the range of the color table as it was originally specified. It
2354 is not an error to specify a subtexture with width of 0, but such a
2355 specification has no effect.
2356
2357 If a non-zero named buffer object is bound to the
2358 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a portion of
2359 a color table is respecified, DATA is treated as a byte offset into the
2360 buffer object's data store.
2361
2362 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
2363 values.
2364
2365 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
2366 values.
2367
2368 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
2369 values.
2370
2371 `GL_INVALID_VALUE' is generated if START+COUNT>WIDTH .
2372
2373 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2374 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
2375 data store is currently mapped.
2376
2377 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2378 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
2379 unpacked from the buffer object such that the memory reads required
2380 would exceed the data store size.
2381
2382 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2383 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
2384 divisible into the number of bytes needed to store in memory a datum
2385 indicated by TYPE.
2386
2387 `GL_INVALID_OPERATION' is generated if `glColorSubTable' is executed
2388 between the execution of `glBegin' and the corresponding execution of
2389 `glEnd'.")
2390
2391 (define-gl-procedures
2392 ((glColorTableParameterfv
2393 (target GLenum)
2394 (pname GLenum)
2395 (params const-GLfloat-*)
2396 ->
2397 void)
2398 (glColorTableParameteriv
2399 (target GLenum)
2400 (pname GLenum)
2401 (params const-GLint-*)
2402 ->
2403 void))
2404 "Set color lookup table parameters.
2405
2406 TARGET
2407 The target color table. Must be `GL_COLOR_TABLE',
2408 `GL_POST_CONVOLUTION_COLOR_TABLE', or
2409 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2410
2411 PNAME
2412 The symbolic name of a texture color lookup table parameter. Must
2413 be one of `GL_COLOR_TABLE_SCALE' or `GL_COLOR_TABLE_BIAS'.
2414
2415 PARAMS
2416 A pointer to an array where the values of the parameters are
2417 stored.
2418
2419 `glColorTableParameter' is used to specify the scale factors and bias
2420 terms applied to color components when they are loaded into a color
2421 table. TARGET indicates which color table the scale and bias terms apply
2422 to; it must be set to `GL_COLOR_TABLE',
2423 `GL_POST_CONVOLUTION_COLOR_TABLE', or
2424 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2425
2426 PNAME must be `GL_COLOR_TABLE_SCALE' to set the scale factors. In this
2427 case, PARAMS points to an array of four values, which are the scale
2428 factors for red, green, blue, and alpha, in that order.
2429
2430 PNAME must be `GL_COLOR_TABLE_BIAS' to set the bias terms. In this case,
2431 PARAMS points to an array of four values, which are the bias terms for
2432 red, green, blue, and alpha, in that order.
2433
2434 The color tables themselves are specified by calling `glColorTable'.
2435
2436 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an acceptable
2437 value.
2438
2439 `GL_INVALID_OPERATION' is generated if `glColorTableParameter' is
2440 executed between the execution of `glBegin' and the corresponding
2441 execution of `glEnd'.")
2442
2443 (define-gl-procedures
2444 ((glColorTable
2445 (target GLenum)
2446 (internalformat GLenum)
2447 (width GLsizei)
2448 (format GLenum)
2449 (type GLenum)
2450 (data const-GLvoid-*)
2451 ->
2452 void))
2453 "Define a color lookup table.
2454
2455 TARGET
2456 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
2457 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `GL_PROXY_COLOR_TABLE',
2458 `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
2459 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
2460
2461 INTERNALFORMAT
2462 The internal format of the color table. The allowable values are
2463 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
2464 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
2465 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
2466 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
2467 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
2468 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
2469 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
2470 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
2471 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
2472 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', and `GL_RGBA16'.
2473
2474 WIDTH
2475 The number of entries in the color lookup table specified by DATA.
2476
2477 FORMAT
2478 The format of the pixel data in DATA. The allowable values are
2479 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
2480 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
2481
2482 TYPE
2483 The type of the pixel data in DATA. The allowable values are
2484 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
2485 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
2486 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
2487 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
2488 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
2489 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
2490 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
2491 `GL_UNSIGNED_INT_2_10_10_10_REV'.
2492
2493 DATA
2494 Pointer to a one-dimensional array of pixel data that is processed
2495 to build the color table.
2496
2497 `glColorTable' may be used in two ways: to test the actual size and
2498 color resolution of a lookup table given a particular set of parameters,
2499 or to load the contents of a color lookup table. Use the targets
2500 `GL_PROXY_*' for the first case and the other targets for the second
2501 case.
2502
2503 If a non-zero named buffer object is bound to the
2504 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a color table
2505 is specified, DATA is treated as a byte offset into the buffer object's
2506 data store.
2507
2508 If TARGET is `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
2509 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `glColorTable' builds a color lookup
2510 table from an array of pixels. The pixel array specified by WIDTH,
2511 FORMAT, TYPE, and DATA is extracted from memory and processed just as if
2512 `glDrawPixels' were called, but processing stops after the final
2513 expansion to RGBA is completed.
2514
2515 The four scale parameters and the four bias parameters that are defined
2516 for the table are then used to scale and bias the R, G, B, and A
2517 components of each pixel. (Use `glColorTableParameter' to set these
2518 scale and bias parameters.)
2519
2520 Next, the R, G, B, and A values are clamped to the range [0,1] . Each
2521 pixel is then converted to the internal format specified by
2522 INTERNALFORMAT. This conversion simply maps the component values of the
2523 pixel (R, G, B, and A) to the values included in the internal format
2524 (red, green, blue, alpha, luminance, and intensity). The mapping is as
2525 follows:
2526
2527
2528
2529 *Internal Format*
2530 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
2531
2532 `GL_ALPHA'
2533 , , , A , ,
2534
2535 `GL_LUMINANCE'
2536 , , , , R ,
2537
2538 `GL_LUMINANCE_ALPHA'
2539 , , , A , R ,
2540
2541 `GL_INTENSITY'
2542 , , , , , R
2543
2544 `GL_RGB'
2545 R , G , B , , ,
2546
2547 `GL_RGBA'
2548 R , G , B , A , ,
2549
2550 Finally, the red, green, blue, alpha, luminance, and/or intensity
2551 components of the resulting pixels are stored in the color table. They
2552 form a one-dimensional table with indices in the range [0,WIDTH-1] .
2553
2554 If TARGET is `GL_PROXY_*', `glColorTable' recomputes and stores the
2555 values of the proxy color table's state variables
2556 `GL_COLOR_TABLE_FORMAT', `GL_COLOR_TABLE_WIDTH',
2557 `GL_COLOR_TABLE_RED_SIZE', `GL_COLOR_TABLE_GREEN_SIZE',
2558 `GL_COLOR_TABLE_BLUE_SIZE', `GL_COLOR_TABLE_ALPHA_SIZE',
2559 `GL_COLOR_TABLE_LUMINANCE_SIZE', and `GL_COLOR_TABLE_INTENSITY_SIZE'.
2560 There is no effect on the image or state of any actual color table. If
2561 the specified color table is too large to be supported, then all the
2562 proxy state variables listed above are set to zero. Otherwise, the color
2563 table could be supported by `glColorTable' using the corresponding
2564 non-proxy target, and the proxy state variables are set as if that
2565 target were being defined.
2566
2567 The proxy state variables can be retrieved by calling
2568 `glGetColorTableParameter' with a target of `GL_PROXY_*'. This allows
2569 the application to decide if a particular `glColorTable' command would
2570 succeed, and to determine what the resulting color table attributes
2571 would be.
2572
2573 If a color table is enabled, and its width is non-zero, then its
2574 contents are used to replace a subset of the components of each RGBA
2575 pixel group, based on the internal format of the table.
2576
2577 Each pixel group has color components (R, G, B, A) that are in the range
2578 [0.0,1.0] . The color components are rescaled to the size of the color
2579 lookup table to form an index. Then a subset of the components based on
2580 the internal format of the table are replaced by the table entry
2581 selected by that index. If the color components and contents of the
2582 table are represented as follows:
2583
2584
2585
2586 *Representation*
2587 *Meaning*
2588
2589 `r'
2590 Table index computed from `R'
2591
2592 `g'
2593 Table index computed from `G'
2594
2595 `b'
2596 Table index computed from `B'
2597
2598 `a'
2599 Table index computed from `A'
2600
2601 `L[i]'
2602 Luminance value at table index `i'
2603
2604 `I[i]'
2605 Intensity value at table index `i'
2606
2607 `R[i]'
2608 Red value at table index `i'
2609
2610 `G[i]'
2611 Green value at table index `i'
2612
2613 `B[i]'
2614 Blue value at table index `i'
2615
2616 `A[i]'
2617 Alpha value at table index `i'
2618
2619 then the result of color table lookup is as follows:
2620
2621
2622
2623 **
2624 *Resulting Texture Components*
2625
2626 *Table Internal Format*
2627 *R*, *G*, *B*, *A*
2628
2629 `GL_ALPHA'
2630 `R', `G', `B', `A[a]'
2631
2632 `GL_LUMINANCE'
2633 `L[r]', `L[g]', `L[b]', `At'
2634
2635 `GL_LUMINANCE_ALPHA'
2636 `L[r]', `L[g]', `L[b]', `A[a]'
2637
2638 `GL_INTENSITY'
2639 `I[r]', `I[g]', `I[b]', `I[a]'
2640
2641 `GL_RGB'
2642 `R[r]', `G[g]', `B[b]', `A'
2643
2644 `GL_RGBA'
2645 `R[r]', `G[g]', `B[b]', `A[a]'
2646
2647 When `GL_COLOR_TABLE' is enabled, the colors resulting from the pixel
2648 map operation (if it is enabled) are mapped by the color lookup table
2649 before being passed to the convolution operation. The colors resulting
2650 from the convolution operation are modified by the post convolution
2651 color lookup table when `GL_POST_CONVOLUTION_COLOR_TABLE' is enabled.
2652 These modified colors are then sent to the color matrix operation.
2653 Finally, if `GL_POST_COLOR_MATRIX_COLOR_TABLE' is enabled, the colors
2654 resulting from the color matrix operation are mapped by the post color
2655 matrix color lookup table before being used by the histogram operation.
2656
2657
2658
2659 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
2660 values.
2661
2662 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
2663 allowable values.
2664
2665 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
2666 values.
2667
2668 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
2669 values.
2670
2671 `GL_INVALID_VALUE' is generated if WIDTH is less than zero.
2672
2673 `GL_TABLE_TOO_LARGE' is generated if the requested color table is too
2674 large to be supported by the implementation, and TARGET is not a
2675 `GL_PROXY_*' target.
2676
2677 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2678 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
2679 data store is currently mapped.
2680
2681 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2682 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
2683 unpacked from the buffer object such that the memory reads required
2684 would exceed the data store size.
2685
2686 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2687 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
2688 divisible into the number of bytes needed to store in memory a datum
2689 indicated by TYPE.
2690
2691 `GL_INVALID_OPERATION' is generated if `glColorTable' is executed
2692 between the execution of `glBegin' and the corresponding execution of
2693 `glEnd'.")
2694
2695 (define-gl-procedures
2696 ((glColor3i
2697 (red GLint)
2698 (green GLint)
2699 (blue GLint)
2700 ->
2701 void)
2702 (glColor3f
2703 (red GLfloat)
2704 (green GLfloat)
2705 (blue GLfloat)
2706 ->
2707 void)
2708 (glColor3ui
2709 (red GLuint)
2710 (green GLuint)
2711 (blue GLuint)
2712 ->
2713 void)
2714 (glColor4i
2715 (red GLint)
2716 (green GLint)
2717 (blue GLint)
2718 (alpha GLint)
2719 ->
2720 void)
2721 (glColor4f
2722 (red GLfloat)
2723 (green GLfloat)
2724 (blue GLfloat)
2725 (alpha GLfloat)
2726 ->
2727 void)
2728 (glColor4ui
2729 (red GLuint)
2730 (green GLuint)
2731 (blue GLuint)
2732 (alpha GLuint)
2733 ->
2734 void))
2735 "Set the current color.
2736
2737 RED
2738 GREEN
2739
2740 BLUE
2741
2742 Specify new red, green, and blue values for the current color.
2743
2744 ALPHA
2745 Specifies a new alpha value for the current color. Included only in
2746 the four-argument `glColor4' commands.
2747
2748 The GL stores both a current single-valued color index and a current
2749 four-valued RGBA color. `glColor' sets a new four-valued RGBA color.
2750 `glColor' has two major variants: `glColor3' and `glColor4'. `glColor3'
2751 variants specify new red, green, and blue values explicitly and set the
2752 current alpha value to 1.0 (full intensity) implicitly. `glColor4'
2753 variants specify all four color components explicitly.
2754
2755 `glColor3b', `glColor4b', `glColor3s', `glColor4s', `glColor3i', and
2756 `glColor4i' take three or four signed byte, short, or long integers as
2757 arguments. When *v* is appended to the name, the color commands can take
2758 a pointer to an array of such values.
2759
2760 Current color values are stored in floating-point format, with
2761 unspecified mantissa and exponent sizes. Unsigned integer color
2762 components, when specified, are linearly mapped to floating-point values
2763 such that the largest representable value maps to 1.0 (full intensity),
2764 and 0 maps to 0.0 (zero intensity). Signed integer color components,
2765 when specified, are linearly mapped to floating-point values such that
2766 the most positive representable value maps to 1.0, and the most negative
2767 representable value maps to -1.0 . (Note that this mapping does not
2768 convert 0 precisely to 0.0.) Floating-point values are mapped directly.
2769
2770 Neither floating-point nor signed integer values are clamped to the
2771 range [0,1] before the current color is updated. However, color
2772 components are clamped to this range before they are interpolated or
2773 written into a color buffer.")
2774
2775 (define-gl-procedures
2776 ((glCompileShader (shader GLuint) -> void))
2777 "Compiles a shader object.
2778
2779 SHADER
2780 Specifies the shader object to be compiled.
2781
2782 `glCompileShader' compiles the source code strings that have been stored
2783 in the shader object specified by SHADER.
2784
2785 The compilation status will be stored as part of the shader object's
2786 state. This value will be set to `GL_TRUE' if the shader was compiled
2787 without errors and is ready for use, and `GL_FALSE' otherwise. It can be
2788 queried by calling `glGetShader' with arguments SHADER and
2789 `GL_COMPILE_STATUS'.
2790
2791 Compilation of a shader can fail for a number of reasons as specified by
2792 the OpenGL Shading Language Specification. Whether or not the
2793 compilation was successful, information about the compilation can be
2794 obtained from the shader object's information log by calling
2795 `glGetShaderInfoLog'.
2796
2797 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
2798 OpenGL.
2799
2800 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
2801
2802 `GL_INVALID_OPERATION' is generated if `glCompileShader' is executed
2803 between the execution of `glBegin' and the corresponding execution of
2804 `glEnd'.")
2805
2806 (define-gl-procedures
2807 ((glCompressedTexImage1D
2808 (target GLenum)
2809 (level GLint)
2810 (internalformat GLenum)
2811 (width GLsizei)
2812 (border GLint)
2813 (imageSize GLsizei)
2814 (data const-GLvoid-*)
2815 ->
2816 void))
2817 "Specify a one-dimensional texture image in a compressed format.
2818
2819 TARGET
2820 Specifies the target texture. Must be `GL_TEXTURE_1D' or
2821 `GL_PROXY_TEXTURE_1D'.
2822
2823 LEVEL
2824 Specifies the level-of-detail number. Level 0 is the base image
2825 level. Level N is the Nth mipmap reduction image.
2826
2827 INTERNALFORMAT
2828 Specifies the format of the compressed image data stored at address
2829 DATA.
2830
2831 WIDTH
2832 Specifies the width of the texture image including the border if
2833 any. If the GL version does not support non-power-of-two sizes,
2834 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
2835 implementations support texture images that are at least 64 texels
2836 wide. The height of the 1D texture image is 1.
2837
2838 BORDER
2839 Specifies the width of the border. Must be either 0 or 1.
2840
2841 IMAGESIZE
2842 Specifies the number of unsigned bytes of image data starting at
2843 the address specified by DATA.
2844
2845 DATA
2846 Specifies a pointer to the compressed image data in memory.
2847
2848 Texturing maps a portion of a specified texture image onto each
2849 graphical primitive for which texturing is enabled. To enable and
2850 disable one-dimensional texturing, call `glEnable' and `glDisable' with
2851 argument `GL_TEXTURE_1D'.
2852
2853 `glCompressedTexImage1D' loads a previously defined, and retrieved,
2854 compressed one-dimensional texture image if TARGET is `GL_TEXTURE_1D'
2855 (see `glTexImage1D').
2856
2857 If TARGET is `GL_PROXY_TEXTURE_1D', no data is read from DATA, but all
2858 of the texture image state is recalculated, checked for consistency, and
2859 checked against the implementation's capabilities. If the implementation
2860 cannot handle a texture of the requested texture size, it sets all of
2861 the image state to 0, but does not generate an error (see `glGetError').
2862 To query for an entire mipmap array, use an image array level greater
2863 than or equal to 1.
2864
2865 INTERNALFORMAT must be extension-specified compressed-texture format.
2866 When a texture is loaded with `glTexImage1D' using a generic compressed
2867 texture format (e.g., `GL_COMPRESSED_RGB') the GL selects from one of
2868 its extensions supporting compressed textures. In order to load the
2869 compressed texture image using `glCompressedTexImage1D', query the
2870 compressed texture image's size and format using
2871 `glGetTexLevelParameter'.
2872
2873 If a non-zero named buffer object is bound to the
2874 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
2875 image is specified, DATA is treated as a byte offset into the buffer
2876 object's data store.
2877
2878 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
2879 compressed internal formats: `GL_COMPRESSED_ALPHA',
2880 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
2881 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
2882
2883 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
2884 format, dimensions, and contents of the specified compressed image data.
2885
2886 `GL_INVALID_OPERATION' is generated if parameter combinations are not
2887 supported by the specific compressed internal format as specified in the
2888 specific texture compression extension.
2889
2890 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2891 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
2892 data store is currently mapped.
2893
2894 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2895 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
2896 unpacked from the buffer object such that the memory reads required
2897 would exceed the data store size.
2898
2899 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage1D' is
2900 executed between the execution of `glBegin' and the corresponding
2901 execution of `glEnd'.
2902
2903 Undefined results, including abnormal program termination, are generated
2904 if DATA is not encoded in a manner consistent with the extension
2905 specification defining the internal compression format.")
2906
2907 (define-gl-procedures
2908 ((glCompressedTexImage2D
2909 (target GLenum)
2910 (level GLint)
2911 (internalformat GLenum)
2912 (width GLsizei)
2913 (height GLsizei)
2914 (border GLint)
2915 (imageSize GLsizei)
2916 (data const-GLvoid-*)
2917 ->
2918 void))
2919 "Specify a two-dimensional texture image in a compressed format.
2920
2921 TARGET
2922 Specifies the target texture. Must be `GL_TEXTURE_2D',
2923 `GL_PROXY_TEXTURE_2D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
2924 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
2925 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
2926 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
2927
2928 LEVEL
2929 Specifies the level-of-detail number. Level 0 is the base image
2930 level. Level N is the Nth mipmap reduction image.
2931
2932 INTERNALFORMAT
2933 Specifies the format of the compressed image data stored at address
2934 DATA.
2935
2936 WIDTH
2937 Specifies the width of the texture image including the border if
2938 any. If the GL version does not support non-power-of-two sizes,
2939 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
2940 implementations support 2D texture images that are at least 64
2941 texels wide and cube-mapped texture images that are at least 16
2942 texels wide.
2943
2944 HEIGHT
2945 Specifies the height of the texture image including the border if
2946 any. If the GL version does not support non-power-of-two sizes,
2947 this value must be Must be 2^N+2\u2061(BORDER,) for some integer N . All
2948 implementations support 2D texture images that are at least 64
2949 texels high and cube-mapped texture images that are at least 16
2950 texels high.
2951
2952 BORDER
2953 Specifies the width of the border. Must be either 0 or 1.
2954
2955 IMAGESIZE
2956 Specifies the number of unsigned bytes of image data starting at
2957 the address specified by DATA.
2958
2959 DATA
2960 Specifies a pointer to the compressed image data in memory.
2961
2962 Texturing maps a portion of a specified texture image onto each
2963 graphical primitive for which texturing is enabled. To enable and
2964 disable two-dimensional texturing, call `glEnable' and `glDisable' with
2965 argument `GL_TEXTURE_2D'. To enable and disable texturing using
2966 cube-mapped textures, call `glEnable' and `glDisable' with argument
2967 `GL_TEXTURE_CUBE_MAP'.
2968
2969 `glCompressedTexImage2D' loads a previously defined, and retrieved,
2970 compressed two-dimensional texture image if TARGET is `GL_TEXTURE_2D'
2971 (see `glTexImage2D').
2972
2973 If TARGET is `GL_PROXY_TEXTURE_2D', no data is read from DATA, but all
2974 of the texture image state is recalculated, checked for consistency, and
2975 checked against the implementation's capabilities. If the implementation
2976 cannot handle a texture of the requested texture size, it sets all of
2977 the image state to 0, but does not generate an error (see `glGetError').
2978 To query for an entire mipmap array, use an image array level greater
2979 than or equal to 1.
2980
2981 INTERNALFORMAT must be an extension-specified compressed-texture format.
2982 When a texture is loaded with `glTexImage2D' using a generic compressed
2983 texture format (e.g., `GL_COMPRESSED_RGB'), the GL selects from one of
2984 its extensions supporting compressed textures. In order to load the
2985 compressed texture image using `glCompressedTexImage2D', query the
2986 compressed texture image's size and format using
2987 `glGetTexLevelParameter'.
2988
2989 If a non-zero named buffer object is bound to the
2990 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
2991 image is specified, DATA is treated as a byte offset into the buffer
2992 object's data store.
2993
2994 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
2995 compressed internal formats: `GL_COMPRESSED_ALPHA',
2996 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
2997 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
2998
2999 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3000 format, dimensions, and contents of the specified compressed image data.
3001
3002 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3003 supported by the specific compressed internal format as specified in the
3004 specific texture compression extension.
3005
3006 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3007 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3008 data store is currently mapped.
3009
3010 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3011 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3012 unpacked from the buffer object such that the memory reads required
3013 would exceed the data store size.
3014
3015 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage2D' is
3016 executed between the execution of `glBegin' and the corresponding
3017 execution of `glEnd'.
3018
3019 Undefined results, including abnormal program termination, are generated
3020 if DATA is not encoded in a manner consistent with the extension
3021 specification defining the internal compression format.")
3022
3023 (define-gl-procedures
3024 ((glCompressedTexImage3D
3025 (target GLenum)
3026 (level GLint)
3027 (internalformat GLenum)
3028 (width GLsizei)
3029 (height GLsizei)
3030 (depth GLsizei)
3031 (border GLint)
3032 (imageSize GLsizei)
3033 (data const-GLvoid-*)
3034 ->
3035 void))
3036 "Specify a three-dimensional texture image in a compressed format.
3037
3038 TARGET
3039 Specifies the target texture. Must be `GL_TEXTURE_3D' or
3040 `GL_PROXY_TEXTURE_3D'.
3041
3042 LEVEL
3043 Specifies the level-of-detail number. Level 0 is the base image
3044 level. Level N is the Nth mipmap reduction image.
3045
3046 INTERNALFORMAT
3047 Specifies the format of the compressed image data stored at address
3048 DATA.
3049
3050 WIDTH
3051 Specifies the width of the texture image including the border if
3052 any. If the GL version does not support non-power-of-two sizes,
3053 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3054 implementations support 3D texture images that are at least 16
3055 texels wide.
3056
3057 HEIGHT
3058 Specifies the height of the texture image including the border if
3059 any. If the GL version does not support non-power-of-two sizes,
3060 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3061 implementations support 3D texture images that are at least 16
3062 texels high.
3063
3064 DEPTH
3065 Specifies the depth of the texture image including the border if
3066 any. If the GL version does not support non-power-of-two sizes,
3067 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3068 implementations support 3D texture images that are at least 16
3069 texels deep.
3070
3071 BORDER
3072 Specifies the width of the border. Must be either 0 or 1.
3073
3074 IMAGESIZE
3075 Specifies the number of unsigned bytes of image data starting at
3076 the address specified by DATA.
3077
3078 DATA
3079 Specifies a pointer to the compressed image data in memory.
3080
3081 Texturing maps a portion of a specified texture image onto each
3082 graphical primitive for which texturing is enabled. To enable and
3083 disable three-dimensional texturing, call `glEnable' and `glDisable'
3084 with argument `GL_TEXTURE_3D'.
3085
3086 `glCompressedTexImage3D' loads a previously defined, and retrieved,
3087 compressed three-dimensional texture image if TARGET is `GL_TEXTURE_3D'
3088 (see `glTexImage3D').
3089
3090 If TARGET is `GL_PROXY_TEXTURE_3D', no data is read from DATA, but all
3091 of the texture image state is recalculated, checked for consistency, and
3092 checked against the implementation's capabilities. If the implementation
3093 cannot handle a texture of the requested texture size, it sets all of
3094 the image state to 0, but does not generate an error (see `glGetError').
3095 To query for an entire mipmap array, use an image array level greater
3096 than or equal to 1.
3097
3098 INTERNALFORMAT must be an extension-specified compressed-texture format.
3099 When a texture is loaded with `glTexImage2D' using a generic compressed
3100 texture format (e.g., `GL_COMPRESSED_RGB'), the GL selects from one of
3101 its extensions supporting compressed textures. In order to load the
3102 compressed texture image using `glCompressedTexImage3D', query the
3103 compressed texture image's size and format using
3104 `glGetTexLevelParameter'.
3105
3106 If a non-zero named buffer object is bound to the
3107 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3108 image is specified, DATA is treated as a byte offset into the buffer
3109 object's data store.
3110
3111 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
3112 compressed internal formats: `GL_COMPRESSED_ALPHA',
3113 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3114 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
3115
3116 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3117 format, dimensions, and contents of the specified compressed image data.
3118
3119 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3120 supported by the specific compressed internal format as specified in the
3121 specific texture compression extension.
3122
3123 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3124 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3125 data store is currently mapped.
3126
3127 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3128 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3129 unpacked from the buffer object such that the memory reads required
3130 would exceed the data store size.
3131
3132 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage3D' is
3133 executed between the execution of `glBegin' and the corresponding
3134 execution of `glEnd'.
3135
3136 Undefined results, including abnormal program termination, are generated
3137 if DATA is not encoded in a manner consistent with the extension
3138 specification defining the internal compression format.")
3139
3140 (define-gl-procedures
3141 ((glCompressedTexSubImage1D
3142 (target GLenum)
3143 (level GLint)
3144 (xoffset GLint)
3145 (width GLsizei)
3146 (format GLenum)
3147 (imageSize GLsizei)
3148 (data const-GLvoid-*)
3149 ->
3150 void))
3151 "Specify a one-dimensional texture subimage in a compressed format.
3152
3153 TARGET
3154 Specifies the target texture. Must be `GL_TEXTURE_1D'.
3155
3156 LEVEL
3157 Specifies the level-of-detail number. Level 0 is the base image
3158 level. Level N is the Nth mipmap reduction image.
3159
3160 XOFFSET
3161 Specifies a texel offset in the x direction within the texture
3162 array.
3163
3164 WIDTH
3165 Specifies the width of the texture subimage.
3166
3167 FORMAT
3168 Specifies the format of the compressed image data stored at address
3169 DATA.
3170
3171 IMAGESIZE
3172 Specifies the number of unsigned bytes of image data starting at
3173 the address specified by DATA.
3174
3175 DATA
3176 Specifies a pointer to the compressed image data in memory.
3177
3178 Texturing maps a portion of a specified texture image onto each
3179 graphical primitive for which texturing is enabled. To enable and
3180 disable one-dimensional texturing, call `glEnable' and `glDisable' with
3181 argument `GL_TEXTURE_1D'.
3182
3183 `glCompressedTexSubImage1D' redefines a contiguous subregion of an
3184 existing one-dimensional texture image. The texels referenced by DATA
3185 replace the portion of the existing texture array with x indices XOFFSET
3186 and XOFFSET+WIDTH-1 , inclusive. This region may not include any texels
3187 outside the range of the texture array as it was originally specified.
3188 It is not an error to specify a subtexture with width of 0, but such a
3189 specification has no effect.
3190
3191 FORMAT must be an extension-specified compressed-texture format. The
3192 FORMAT of the compressed texture image is selected by the GL
3193 implementation that compressed it (see `glTexImage1D'), and should be
3194 queried at the time the texture was compressed with
3195 `glGetTexLevelParameter'.
3196
3197 If a non-zero named buffer object is bound to the
3198 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3199 image is specified, DATA is treated as a byte offset into the buffer
3200 object's data store.
3201
3202 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3203 compressed internal formats: `GL_COMPRESSED_ALPHA',
3204 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3205 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3206 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3207 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3208 `GL_COMPRESSED_SRGB_ALPHA'.
3209
3210 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3211 format, dimensions, and contents of the specified compressed image data.
3212
3213 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3214 supported by the specific compressed internal format as specified in the
3215 specific texture compression extension.
3216
3217 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3218 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3219 data store is currently mapped.
3220
3221 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3222 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3223 unpacked from the buffer object such that the memory reads required
3224 would exceed the data store size.
3225
3226 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage1D' is
3227 executed between the execution of `glBegin' and the corresponding
3228 execution of `glEnd'.
3229
3230 Undefined results, including abnormal program termination, are generated
3231 if DATA is not encoded in a manner consistent with the extension
3232 specification defining the internal compression format.")
3233
3234 (define-gl-procedures
3235 ((glCompressedTexSubImage2D
3236 (target GLenum)
3237 (level GLint)
3238 (xoffset GLint)
3239 (yoffset GLint)
3240 (width GLsizei)
3241 (height GLsizei)
3242 (format GLenum)
3243 (imageSize GLsizei)
3244 (data const-GLvoid-*)
3245 ->
3246 void))
3247 "Specify a two-dimensional texture subimage in a compressed format.
3248
3249 TARGET
3250 Specifies the target texture. Must be `GL_TEXTURE_2D',
3251 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
3252 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
3253 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
3254 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
3255
3256 LEVEL
3257 Specifies the level-of-detail number. Level 0 is the base image
3258 level. Level N is the Nth mipmap reduction image.
3259
3260 XOFFSET
3261 Specifies a texel offset in the x direction within the texture
3262 array.
3263
3264 YOFFSET
3265 Specifies a texel offset in the y direction within the texture
3266 array.
3267
3268 WIDTH
3269 Specifies the width of the texture subimage.
3270
3271 HEIGHT
3272 Specifies the height of the texture subimage.
3273
3274 FORMAT
3275 Specifies the format of the compressed image data stored at address
3276 DATA.
3277
3278 IMAGESIZE
3279 Specifies the number of unsigned bytes of image data starting at
3280 the address specified by DATA.
3281
3282 DATA
3283 Specifies a pointer to the compressed image data in memory.
3284
3285 Texturing maps a portion of a specified texture image onto each
3286 graphical primitive for which texturing is enabled. To enable and
3287 disable two-dimensional texturing, call `glEnable' and `glDisable' with
3288 argument `GL_TEXTURE_2D'. To enable and disable texturing using
3289 cube-mapped texture, call `glEnable' and `glDisable' with argument
3290 `GL_TEXTURE_CUBE_MAP'.
3291
3292 `glCompressedTexSubImage2D' redefines a contiguous subregion of an
3293 existing two-dimensional texture image. The texels referenced by DATA
3294 replace the portion of the existing texture array with x indices XOFFSET
3295 and XOFFSET+WIDTH-1 , and the y indices YOFFSET and YOFFSET+HEIGHT-1 ,
3296 inclusive. This region may not include any texels outside the range of
3297 the texture array as it was originally specified. It is not an error to
3298 specify a subtexture with width of 0, but such a specification has no
3299 effect.
3300
3301 FORMAT must be an extension-specified compressed-texture format. The
3302 FORMAT of the compressed texture image is selected by the GL
3303 implementation that compressed it (see `glTexImage2D') and should be
3304 queried at the time the texture was compressed with
3305 `glGetTexLevelParameter'.
3306
3307 If a non-zero named buffer object is bound to the
3308 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3309 image is specified, DATA is treated as a byte offset into the buffer
3310 object's data store.
3311
3312 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3313 compressed internal formats: `GL_COMPRESSED_ALPHA',
3314 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3315 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3316 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3317 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3318 `GL_COMPRESSED_SRGB_ALPHA'.
3319
3320 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3321 format, dimensions, and contents of the specified compressed image data.
3322
3323 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3324 supported by the specific compressed internal format as specified in the
3325 specific texture compression extension.
3326
3327 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3328 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3329 data store is currently mapped.
3330
3331 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3332 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3333 unpacked from the buffer object such that the memory reads required
3334 would exceed the data store size.
3335
3336 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage2D' is
3337 executed between the execution of `glBegin' and the corresponding
3338 execution of `glEnd'.
3339
3340 Undefined results, including abnormal program termination, are generated
3341 if DATA is not encoded in a manner consistent with the extension
3342 specification defining the internal compression format.")
3343
3344 (define-gl-procedures
3345 ((glCompressedTexSubImage3D
3346 (target GLenum)
3347 (level GLint)
3348 (xoffset GLint)
3349 (yoffset GLint)
3350 (zoffset GLint)
3351 (width GLsizei)
3352 (height GLsizei)
3353 (depth GLsizei)
3354 (format GLenum)
3355 (imageSize GLsizei)
3356 (data const-GLvoid-*)
3357 ->
3358 void))
3359 "Specify a three-dimensional texture subimage in a compressed format.
3360
3361 TARGET
3362 Specifies the target texture. Must be `GL_TEXTURE_3D'.
3363
3364 LEVEL
3365 Specifies the level-of-detail number. Level 0 is the base image
3366 level. Level N is the Nth mipmap reduction image.
3367
3368 XOFFSET
3369 Specifies a texel offset in the x direction within the texture
3370 array.
3371
3372 YOFFSET
3373 Specifies a texel offset in the y direction within the texture
3374 array.
3375
3376 WIDTH
3377 Specifies the width of the texture subimage.
3378
3379 HEIGHT
3380 Specifies the height of the texture subimage.
3381
3382 DEPTH
3383 Specifies the depth of the texture subimage.
3384
3385 FORMAT
3386 Specifies the format of the compressed image data stored at address
3387 DATA.
3388
3389 IMAGESIZE
3390 Specifies the number of unsigned bytes of image data starting at
3391 the address specified by DATA.
3392
3393 DATA
3394 Specifies a pointer to the compressed image data in memory.
3395
3396 Texturing maps a portion of a specified texture image onto each
3397 graphical primitive for which texturing is enabled. To enable and
3398 disable three-dimensional texturing, call `glEnable' and `glDisable'
3399 with argument `GL_TEXTURE_3D'.
3400
3401 `glCompressedTexSubImage3D' redefines a contiguous subregion of an
3402 existing three-dimensional texture image. The texels referenced by DATA
3403 replace the portion of the existing texture array with x indices XOFFSET
3404 and XOFFSET+WIDTH-1 , and the y indices YOFFSET and YOFFSET+HEIGHT-1 ,
3405 and the z indices ZOFFSET and ZOFFSET+DEPTH-1 , inclusive. This region
3406 may not include any texels outside the range of the texture array as it
3407 was originally specified. It is not an error to specify a subtexture
3408 with width of 0, but such a specification has no effect.
3409
3410 FORMAT must be an extension-specified compressed-texture format. The
3411 FORMAT of the compressed texture image is selected by the GL
3412 implementation that compressed it (see `glTexImage3D') and should be
3413 queried at the time the texture was compressed with
3414 `glGetTexLevelParameter'.
3415
3416 If a non-zero named buffer object is bound to the
3417 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3418 image is specified, DATA is treated as a byte offset into the buffer
3419 object's data store.
3420
3421 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3422 compressed internal formats: `GL_COMPRESSED_ALPHA',
3423 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3424 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3425 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3426 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3427 `GL_COMPRESSED_SRGB_ALPHA'.
3428
3429 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3430 format, dimensions, and contents of the specified compressed image data.
3431
3432 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3433 supported by the specific compressed internal format as specified in the
3434 specific texture compression extension.
3435
3436 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3437 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3438 data store is currently mapped.
3439
3440 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3441 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3442 unpacked from the buffer object such that the memory reads required
3443 would exceed the data store size.
3444
3445 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage3D' is
3446 executed between the execution of `glBegin' and the corresponding
3447 execution of `glEnd'.
3448
3449 Undefined results, including abnormal program termination, are generated
3450 if DATA is not encoded in a manner consistent with the extension
3451 specification defining the internal compression format.")
3452
3453 (define-gl-procedures
3454 ((glConvolutionFilter1D
3455 (target GLenum)
3456 (internalformat GLenum)
3457 (width GLsizei)
3458 (format GLenum)
3459 (type GLenum)
3460 (data const-GLvoid-*)
3461 ->
3462 void))
3463 "Define a one-dimensional convolution filter.
3464
3465 TARGET
3466 Must be `GL_CONVOLUTION_1D'.
3467
3468 INTERNALFORMAT
3469 The internal format of the convolution filter kernel. The allowable
3470 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
3471 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
3472 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
3473 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
3474 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
3475 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
3476 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
3477 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
3478 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
3479 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
3480 `GL_RGBA12', or `GL_RGBA16'.
3481
3482 WIDTH
3483 The width of the pixel array referenced by DATA.
3484
3485 FORMAT
3486 The format of the pixel data in DATA. The allowable values are
3487 `GL_ALPHA', `GL_LUMINANCE', `GL_LUMINANCE_ALPHA', `GL_INTENSITY',
3488 `GL_RGB', and `GL_RGBA'.
3489
3490 TYPE
3491 The type of the pixel data in DATA. Symbolic constants
3492 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
3493 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
3494 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3495 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
3496 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3497 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3498 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3499 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
3500 are accepted.
3501
3502 DATA
3503 Pointer to a one-dimensional array of pixel data that is processed
3504 to build the convolution filter kernel.
3505
3506 `glConvolutionFilter1D' builds a one-dimensional convolution filter
3507 kernel from an array of pixels.
3508
3509 The pixel array specified by WIDTH, FORMAT, TYPE, and DATA is extracted
3510 from memory and processed just as if `glDrawPixels' were called, but
3511 processing stops after the final expansion to RGBA is completed.
3512
3513 If a non-zero named buffer object is bound to the
3514 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
3515 filter is specified, DATA is treated as a byte offset into the buffer
3516 object's data store.
3517
3518 The R, G, B, and A components of each pixel are next scaled by the four
3519 1D `GL_CONVOLUTION_FILTER_SCALE' parameters and biased by the four 1D
3520 `GL_CONVOLUTION_FILTER_BIAS' parameters. (The scale and bias parameters
3521 are set by `glConvolutionParameter' using the `GL_CONVOLUTION_1D' target
3522 and the names `GL_CONVOLUTION_FILTER_SCALE' and
3523 `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors of
3524 four values that are applied to red, green, blue, and alpha, in that
3525 order.) The R, G, B, and A values are not clamped to [0,1] at any time
3526 during this process.
3527
3528 Each pixel is then converted to the internal format specified by
3529 INTERNALFORMAT. This conversion simply maps the component values of the
3530 pixel (R, G, B, and A) to the values included in the internal format
3531 (red, green, blue, alpha, luminance, and intensity). The mapping is as
3532 follows:
3533
3534
3535
3536 *Internal Format*
3537 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
3538
3539 `GL_ALPHA'
3540 , , , A , ,
3541
3542 `GL_LUMINANCE'
3543 , , , , R ,
3544
3545 `GL_LUMINANCE_ALPHA'
3546 , , , A , R ,
3547
3548 `GL_INTENSITY'
3549 , , , , , R
3550
3551 `GL_RGB'
3552 R , G , B , , ,
3553
3554 `GL_RGBA'
3555 R , G , B , A , ,
3556
3557 The red, green, blue, alpha, luminance, and/or intensity components of
3558 the resulting pixels are stored in floating-point rather than integer
3559 format. They form a one-dimensional filter kernel image indexed with
3560 coordinate I such that I starts at 0 and increases from left to right.
3561 Kernel location I is derived from the Ith pixel, counting from 0.
3562
3563 Note that after a convolution is performed, the resulting color
3564 components are also scaled by their corresponding
3565 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
3566 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
3567 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
3568 set by `glPixelTransfer'.
3569
3570 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_1D'.
3571
3572 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
3573 allowable values.
3574
3575 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
3576 values.
3577
3578 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
3579 values.
3580
3581 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
3582 than the maximum supported value. This value may be queried with
3583 `glGetConvolutionParameter' using target `GL_CONVOLUTION_1D' and name
3584 `GL_MAX_CONVOLUTION_WIDTH'.
3585
3586 `GL_INVALID_OPERATION' is generated if FORMAT is one of
3587 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3588 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and TYPE is
3589 not `GL_RGB'.
3590
3591 `GL_INVALID_OPERATION' is generated if FORMAT is one of
3592 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3593 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3594 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3595 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
3596 TYPE is neither `GL_RGBA' nor `GL_BGRA'.
3597
3598 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3599 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3600 data store is currently mapped.
3601
3602 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3603 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3604 unpacked from the buffer object such that the memory reads required
3605 would exceed the data store size.
3606
3607 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3608 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
3609 divisible into the number of bytes needed to store in memory a datum
3610 indicated by TYPE.
3611
3612 `GL_INVALID_OPERATION' is generated if `glConvolutionFilter1D' is
3613 executed between the execution of `glBegin' and the corresponding
3614 execution of `glEnd'.")
3615
3616 (define-gl-procedures
3617 ((glConvolutionFilter2D
3618 (target GLenum)
3619 (internalformat GLenum)
3620 (width GLsizei)
3621 (height GLsizei)
3622 (format GLenum)
3623 (type GLenum)
3624 (data const-GLvoid-*)
3625 ->
3626 void))
3627 "Define a two-dimensional convolution filter.
3628
3629 TARGET
3630 Must be `GL_CONVOLUTION_2D'.
3631
3632 INTERNALFORMAT
3633 The internal format of the convolution filter kernel. The allowable
3634 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
3635 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
3636 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
3637 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
3638 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
3639 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
3640 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
3641 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
3642 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
3643 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
3644 `GL_RGBA12', or `GL_RGBA16'.
3645
3646 WIDTH
3647 The width of the pixel array referenced by DATA.
3648
3649 HEIGHT
3650 The height of the pixel array referenced by DATA.
3651
3652 FORMAT
3653 The format of the pixel data in DATA. The allowable values are
3654 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
3655 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
3656
3657 TYPE
3658 The type of the pixel data in DATA. Symbolic constants
3659 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
3660 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
3661 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3662 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
3663 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3664 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3665 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3666 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
3667 are accepted.
3668
3669 DATA
3670 Pointer to a two-dimensional array of pixel data that is processed
3671 to build the convolution filter kernel.
3672
3673 `glConvolutionFilter2D' builds a two-dimensional convolution filter
3674 kernel from an array of pixels.
3675
3676 The pixel array specified by WIDTH, HEIGHT, FORMAT, TYPE, and DATA is
3677 extracted from memory and processed just as if `glDrawPixels' were
3678 called, but processing stops after the final expansion to RGBA is
3679 completed.
3680
3681 If a non-zero named buffer object is bound to the
3682 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
3683 filter is specified, DATA is treated as a byte offset into the buffer
3684 object's data store.
3685
3686 The R, G, B, and A components of each pixel are next scaled by the four
3687 2D `GL_CONVOLUTION_FILTER_SCALE' parameters and biased by the four 2D
3688 `GL_CONVOLUTION_FILTER_BIAS' parameters. (The scale and bias parameters
3689 are set by `glConvolutionParameter' using the `GL_CONVOLUTION_2D' target
3690 and the names `GL_CONVOLUTION_FILTER_SCALE' and
3691 `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors of
3692 four values that are applied to red, green, blue, and alpha, in that
3693 order.) The R, G, B, and A values are not clamped to [0,1] at any time
3694 during this process.
3695
3696 Each pixel is then converted to the internal format specified by
3697 INTERNALFORMAT. This conversion simply maps the component values of the
3698 pixel (R, G, B, and A) to the values included in the internal format
3699 (red, green, blue, alpha, luminance, and intensity). The mapping is as
3700 follows:
3701
3702
3703
3704 *Internal Format*
3705 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
3706
3707 `GL_ALPHA'
3708 , , , A , ,
3709
3710 `GL_LUMINANCE'
3711 , , , , R ,
3712
3713 `GL_LUMINANCE_ALPHA'
3714 , , , A , R ,
3715
3716 `GL_INTENSITY'
3717 , , , , , R
3718
3719 `GL_RGB'
3720 R , G , B , , ,
3721
3722 `GL_RGBA'
3723 R , G , B , A , ,
3724
3725 The red, green, blue, alpha, luminance, and/or intensity components of
3726 the resulting pixels are stored in floating-point rather than integer
3727 format. They form a two-dimensional filter kernel image indexed with
3728 coordinates I and J such that I starts at zero and increases from left
3729 to right, and J starts at zero and increases from bottom to top. Kernel
3730 location I,J is derived from the Nth pixel, where N is I+J*WIDTH.
3731
3732 Note that after a convolution is performed, the resulting color
3733 components are also scaled by their corresponding
3734 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
3735 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
3736 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
3737 set by `glPixelTransfer'.
3738
3739 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_2D'.
3740
3741 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
3742 allowable values.
3743
3744 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
3745 values.
3746
3747 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
3748 values.
3749
3750 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
3751 than the maximum supported value. This value may be queried with
3752 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
3753 `GL_MAX_CONVOLUTION_WIDTH'.
3754
3755 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
3756 than the maximum supported value. This value may be queried with
3757 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
3758 `GL_MAX_CONVOLUTION_HEIGHT'.
3759
3760 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
3761 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3762 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
3763 is not `GL_RGB'.
3764
3765 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
3766 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3767 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3768 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3769 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
3770 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
3771
3772 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3773 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3774 data store is currently mapped.
3775
3776 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3777 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3778 unpacked from the buffer object such that the memory reads required
3779 would exceed the data store size.
3780
3781 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3782 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
3783 divisible into the number of bytes needed to store in memory a datum
3784 indicated by TYPE.
3785
3786 `GL_INVALID_OPERATION' is generated if `glConvolutionFilter2D' is
3787 executed between the execution of `glBegin' and the corresponding
3788 execution of `glEnd'.")
3789
3790 (define-gl-procedures
3791 ((glConvolutionParameterf
3792 (target GLenum)
3793 (pname GLenum)
3794 (params GLfloat)
3795 ->
3796 void)
3797 (glConvolutionParameteri
3798 (target GLenum)
3799 (pname GLenum)
3800 (params GLint)
3801 ->
3802 void))
3803 "Set convolution parameters.
3804
3805 TARGET
3806 The target for the convolution parameter. Must be one of
3807 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D'.
3808
3809 PNAME
3810 The parameter to be set. Must be `GL_CONVOLUTION_BORDER_MODE'.
3811
3812 PARAMS
3813 The parameter value. Must be one of `GL_REDUCE',
3814 `GL_CONSTANT_BORDER', `GL_REPLICATE_BORDER'.
3815
3816
3817
3818 `glConvolutionParameter' sets the value of a convolution parameter.
3819
3820 TARGET selects the convolution filter to be affected:
3821 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D' for the
3822 1D, 2D, or separable 2D filter, respectively.
3823
3824 PNAME selects the parameter to be changed. `GL_CONVOLUTION_FILTER_SCALE'
3825 and `GL_CONVOLUTION_FILTER_BIAS' affect the definition of the
3826 convolution filter kernel; see `glConvolutionFilter1D',
3827 `glConvolutionFilter2D', and `glSeparableFilter2D' for details. In these
3828 cases, PARAMSv is an array of four values to be applied to red, green,
3829 blue, and alpha values, respectively. The initial value for
3830 `GL_CONVOLUTION_FILTER_SCALE' is (1, 1, 1, 1), and the initial value for
3831 `GL_CONVOLUTION_FILTER_BIAS' is (0, 0, 0, 0).
3832
3833 A PNAME value of `GL_CONVOLUTION_BORDER_MODE' controls the convolution
3834 border mode. The accepted modes are:
3835
3836 `GL_REDUCE'
3837 The image resulting from convolution is smaller than the source
3838 image. If the filter width is WF and height is HF , and the source
3839 image width is WS and height is HS , then the convolved image width
3840 will be WS-WF+1 and height will be HS-HF+1 . (If this reduction
3841 would generate an image with zero or negative width and/or height,
3842 the output is simply null, with no error generated.) The
3843 coordinates of the image resulting from convolution are zero
3844 through WS-WF in width and zero through HS-HF in height.
3845
3846 `GL_CONSTANT_BORDER'
3847 The image resulting from convolution is the same size as the source
3848 image, and processed as if the source image were surrounded by
3849 pixels with their color specified by the
3850 `GL_CONVOLUTION_BORDER_COLOR'.
3851
3852 `GL_REPLICATE_BORDER'
3853 The image resulting from convolution is the same size as the source
3854 image, and processed as if the outermost pixel on the border of the
3855 source image were replicated.
3856
3857 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
3858 values.
3859
3860 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
3861 values.
3862
3863 `GL_INVALID_ENUM' is generated if PNAME is `GL_CONVOLUTION_BORDER_MODE'
3864 and PARAMS is not one of `GL_REDUCE', `GL_CONSTANT_BORDER', or
3865 `GL_REPLICATE_BORDER'.
3866
3867 `GL_INVALID_OPERATION' is generated if `glConvolutionParameter' is
3868 executed between the execution of `glBegin' and the corresponding
3869 execution of `glEnd'.")
3870
3871 (define-gl-procedures
3872 ((glCopyColorSubTable
3873 (target GLenum)
3874 (start GLsizei)
3875 (x GLint)
3876 (y GLint)
3877 (width GLsizei)
3878 ->
3879 void))
3880 "Respecify a portion of a color table.
3881
3882 TARGET
3883 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
3884 or `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
3885
3886 START
3887 The starting index of the portion of the color table to be
3888 replaced.
3889
3890 X
3891 Y
3892
3893 The window coordinates of the left corner of the row of pixels to
3894 be copied.
3895
3896 WIDTH
3897 The number of table entries to replace.
3898
3899 `glCopyColorSubTable' is used to respecify a contiguous portion of a
3900 color table previously defined using `glColorTable'. The pixels copied
3901 from the framebuffer replace the portion of the existing table from
3902 indices START to START+X-1 , inclusive. This region may not include any
3903 entries outside the range of the color table, as was originally
3904 specified. It is not an error to specify a subtexture with width of 0,
3905 but such a specification has no effect.
3906
3907 `GL_INVALID_VALUE' is generated if TARGET is not a previously defined
3908 color table.
3909
3910 `GL_INVALID_VALUE' is generated if TARGET is not one of the allowable
3911 values.
3912
3913 `GL_INVALID_VALUE' is generated if START+X>WIDTH .
3914
3915 `GL_INVALID_OPERATION' is generated if `glCopyColorSubTable' is executed
3916 between the execution of `glBegin' and the corresponding execution of
3917 `glEnd'.")
3918
3919 (define-gl-procedures
3920 ((glCopyColorTable
3921 (target GLenum)
3922 (internalformat GLenum)
3923 (x GLint)
3924 (y GLint)
3925 (width GLsizei)
3926 ->
3927 void))
3928 "Copy pixels into a color table.
3929
3930 TARGET
3931 The color table target. Must be `GL_COLOR_TABLE',
3932 `GL_POST_CONVOLUTION_COLOR_TABLE', or
3933 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
3934
3935 INTERNALFORMAT
3936 The internal storage format of the texture image. Must be one of
3937 the following symbolic constants: `GL_ALPHA', `GL_ALPHA4',
3938 `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE',
3939 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
3940 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
3941 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
3942 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
3943 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
3944 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
3945 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
3946 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
3947 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
3948
3949 X
3950 The x coordinate of the lower-left corner of the pixel rectangle to
3951 be transferred to the color table.
3952
3953 Y
3954 The y coordinate of the lower-left corner of the pixel rectangle to
3955 be transferred to the color table.
3956
3957 WIDTH
3958 The width of the pixel rectangle.
3959
3960 `glCopyColorTable' loads a color table with pixels from the current
3961 `GL_READ_BUFFER' (rather than from main memory, as is the case for
3962 `glColorTable').
3963
3964 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y)
3965 having width WIDTH and height 1 is loaded into the color table. If any
3966 pixels within this region are outside the window that is associated with
3967 the GL context, the values obtained for those pixels are undefined.
3968
3969 The pixels in the rectangle are processed just as if `glReadPixels' were
3970 called, with INTERNALFORMAT set to RGBA, but processing stops after the
3971 final conversion to RGBA.
3972
3973 The four scale parameters and the four bias parameters that are defined
3974 for the table are then used to scale and bias the R, G, B, and A
3975 components of each pixel. The scale and bias parameters are set by
3976 calling `glColorTableParameter'.
3977
3978 Next, the R, G, B, and A values are clamped to the range [0,1] . Each
3979 pixel is then converted to the internal format specified by
3980 INTERNALFORMAT. This conversion simply maps the component values of the
3981 pixel (R, G, B, and A) to the values included in the internal format
3982 (red, green, blue, alpha, luminance, and intensity). The mapping is as
3983 follows:
3984
3985
3986
3987 *Internal Format*
3988 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
3989
3990 `GL_ALPHA'
3991 , , , A , ,
3992
3993 `GL_LUMINANCE'
3994 , , , , R ,
3995
3996 `GL_LUMINANCE_ALPHA'
3997 , , , A , R ,
3998
3999 `GL_INTENSITY'
4000 , , , , , R
4001
4002 `GL_RGB'
4003 R , G , B , , ,
4004
4005 `GL_RGBA'
4006 R , G , B , A , ,
4007
4008 Finally, the red, green, blue, alpha, luminance, and/or intensity
4009 components of the resulting pixels are stored in the color table. They
4010 form a one-dimensional table with indices in the range [0,WIDTH-1] .
4011
4012
4013
4014 `GL_INVALID_ENUM' is generated when TARGET is not one of the allowable
4015 values.
4016
4017 `GL_INVALID_VALUE' is generated if WIDTH is less than zero.
4018
4019 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not one of the
4020 allowable values.
4021
4022 `GL_TABLE_TOO_LARGE' is generated if the requested color table is too
4023 large to be supported by the implementation.
4024
4025 `GL_INVALID_OPERATION' is generated if `glCopyColorTable' is executed
4026 between the execution of `glBegin' and the corresponding execution of
4027 `glEnd'.")
4028
4029 (define-gl-procedures
4030 ((glCopyConvolutionFilter1D
4031 (target GLenum)
4032 (internalformat GLenum)
4033 (x GLint)
4034 (y GLint)
4035 (width GLsizei)
4036 ->
4037 void))
4038 "Copy pixels into a one-dimensional convolution filter.
4039
4040 TARGET
4041 Must be `GL_CONVOLUTION_1D'.
4042
4043 INTERNALFORMAT
4044 The internal format of the convolution filter kernel. The allowable
4045 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
4046 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
4047 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
4048 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
4049 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
4050 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
4051 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
4052 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
4053 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
4054 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
4055 `GL_RGBA12', or `GL_RGBA16'.
4056
4057 X
4058 Y
4059
4060 The window space coordinates of the lower-left coordinate of the
4061 pixel array to copy.
4062
4063 WIDTH
4064 The width of the pixel array to copy.
4065
4066 `glCopyConvolutionFilter1D' defines a one-dimensional convolution filter
4067 kernel with pixels from the current `GL_READ_BUFFER' (rather than from
4068 main memory, as is the case for `glConvolutionFilter1D').
4069
4070 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y),
4071 width WIDTH and height 1 is used to define the convolution filter. If
4072 any pixels within this region are outside the window that is associated
4073 with the GL context, the values obtained for those pixels are undefined.
4074
4075 The pixels in the rectangle are processed exactly as if `glReadPixels'
4076 had been called with FORMAT set to RGBA, but the process stops just
4077 before final conversion. The R, G, B, and A components of each pixel are
4078 next scaled by the four 1D `GL_CONVOLUTION_FILTER_SCALE' parameters and
4079 biased by the four 1D `GL_CONVOLUTION_FILTER_BIAS' parameters. (The
4080 scale and bias parameters are set by `glConvolutionParameter' using the
4081 `GL_CONVOLUTION_1D' target and the names `GL_CONVOLUTION_FILTER_SCALE'
4082 and `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors
4083 of four values that are applied to red, green, blue, and alpha, in that
4084 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4085 during this process.
4086
4087 Each pixel is then converted to the internal format specified by
4088 INTERNALFORMAT. This conversion simply maps the component values of the
4089 pixel (R, G, B, and A) to the values included in the internal format
4090 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4091 follows:
4092
4093
4094
4095 *Internal Format*
4096 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4097
4098 `GL_ALPHA'
4099 , , , A , ,
4100
4101 `GL_LUMINANCE'
4102 , , , , R ,
4103
4104 `GL_LUMINANCE_ALPHA'
4105 , , , A , R ,
4106
4107 `GL_INTENSITY'
4108 , , , , , R
4109
4110 `GL_RGB'
4111 R , G , B , , ,
4112
4113 `GL_RGBA'
4114 R , G , B , A , ,
4115
4116 The red, green, blue, alpha, luminance, and/or intensity components of
4117 the resulting pixels are stored in floating-point rather than integer
4118 format.
4119
4120 Pixel ordering is such that lower x screen coordinates correspond to
4121 lower I filter image coordinates.
4122
4123 Note that after a convolution is performed, the resulting color
4124 components are also scaled by their corresponding
4125 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4126 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4127 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4128 set by `glPixelTransfer'.
4129
4130 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_1D'.
4131
4132 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4133 allowable values.
4134
4135 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4136 than the maximum supported value. This value may be queried with
4137 `glGetConvolutionParameter' using target `GL_CONVOLUTION_1D' and name
4138 `GL_MAX_CONVOLUTION_WIDTH'.
4139
4140 `GL_INVALID_OPERATION' is generated if `glCopyConvolutionFilter1D' is
4141 executed between the execution of `glBegin' and the corresponding
4142 execution of `glEnd'.")
4143
4144 (define-gl-procedures
4145 ((glCopyConvolutionFilter2D
4146 (target GLenum)
4147 (internalformat GLenum)
4148 (x GLint)
4149 (y GLint)
4150 (width GLsizei)
4151 (height GLsizei)
4152 ->
4153 void))
4154 "Copy pixels into a two-dimensional convolution filter.
4155
4156 TARGET
4157 Must be `GL_CONVOLUTION_2D'.
4158
4159 INTERNALFORMAT
4160 The internal format of the convolution filter kernel. The allowable
4161 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
4162 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
4163 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
4164 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
4165 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
4166 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
4167 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
4168 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
4169 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
4170 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
4171 `GL_RGBA12', or `GL_RGBA16'.
4172
4173 X
4174 Y
4175
4176 The window space coordinates of the lower-left coordinate of the
4177 pixel array to copy.
4178
4179 WIDTH
4180 The width of the pixel array to copy.
4181
4182 HEIGHT
4183 The height of the pixel array to copy.
4184
4185 `glCopyConvolutionFilter2D' defines a two-dimensional convolution filter
4186 kernel with pixels from the current `GL_READ_BUFFER' (rather than from
4187 main memory, as is the case for `glConvolutionFilter2D').
4188
4189 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y),
4190 width WIDTH and height HEIGHT is used to define the convolution filter.
4191 If any pixels within this region are outside the window that is
4192 associated with the GL context, the values obtained for those pixels are
4193 undefined.
4194
4195 The pixels in the rectangle are processed exactly as if `glReadPixels'
4196 had been called with FORMAT set to RGBA, but the process stops just
4197 before final conversion. The R, G, B, and A components of each pixel are
4198 next scaled by the four 2D `GL_CONVOLUTION_FILTER_SCALE' parameters and
4199 biased by the four 2D `GL_CONVOLUTION_FILTER_BIAS' parameters. (The
4200 scale and bias parameters are set by `glConvolutionParameter' using the
4201 `GL_CONVOLUTION_2D' target and the names `GL_CONVOLUTION_FILTER_SCALE'
4202 and `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors
4203 of four values that are applied to red, green, blue, and alpha, in that
4204 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4205 during this process.
4206
4207 Each pixel is then converted to the internal format specified by
4208 INTERNALFORMAT. This conversion simply maps the component values of the
4209 pixel (R, G, B, and A) to the values included in the internal format
4210 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4211 follows:
4212
4213
4214
4215 *Internal Format*
4216 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4217
4218 `GL_ALPHA'
4219 , , , A , ,
4220
4221 `GL_LUMINANCE'
4222 , , , , R ,
4223
4224 `GL_LUMINANCE_ALPHA'
4225 , , , A , R ,
4226
4227 `GL_INTENSITY'
4228 , , , , , R
4229
4230 `GL_RGB'
4231 R , G , B , , ,
4232
4233 `GL_RGBA'
4234 R , G , B , A , ,
4235
4236 The red, green, blue, alpha, luminance, and/or intensity components of
4237 the resulting pixels are stored in floating-point rather than integer
4238 format.
4239
4240 Pixel ordering is such that lower x screen coordinates correspond to
4241 lower I filter image coordinates, and lower y screen coordinates
4242 correspond to lower J filter image coordinates.
4243
4244 Note that after a convolution is performed, the resulting color
4245 components are also scaled by their corresponding
4246 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4247 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4248 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4249 set by `glPixelTransfer'.
4250
4251 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_2D'.
4252
4253 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4254 allowable values.
4255
4256 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4257 than the maximum supported value. This value may be queried with
4258 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4259 `GL_MAX_CONVOLUTION_WIDTH'.
4260
4261 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
4262 than the maximum supported value. This value may be queried with
4263 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4264 `GL_MAX_CONVOLUTION_HEIGHT'.
4265
4266 `GL_INVALID_OPERATION' is generated if `glCopyConvolutionFilter2D' is
4267 executed between the execution of `glBegin' and the corresponding
4268 execution of `glEnd'.")
4269
4270 (define-gl-procedures
4271 ((glCopyPixels
4272 (x GLint)
4273 (y GLint)
4274 (width GLsizei)
4275 (height GLsizei)
4276 (type GLenum)
4277 ->
4278 void))
4279 "Copy pixels in the frame buffer.
4280
4281 X
4282 Y
4283
4284 Specify the window coordinates of the lower left corner of the
4285 rectangular region of pixels to be copied.
4286
4287 WIDTH
4288 HEIGHT
4289
4290 Specify the dimensions of the rectangular region of pixels to be
4291 copied. Both must be nonnegative.
4292
4293 TYPE
4294 Specifies whether color values, depth values, or stencil values are
4295 to be copied. Symbolic constants `GL_COLOR', `GL_DEPTH', and
4296 `GL_STENCIL' are accepted.
4297
4298 `glCopyPixels' copies a screen-aligned rectangle of pixels from the
4299 specified frame buffer location to a region relative to the current
4300 raster position. Its operation is well defined only if the entire pixel
4301 source region is within the exposed portion of the window. Results of
4302 copies from outside the window, or from regions of the window that are
4303 not exposed, are hardware dependent and undefined.
4304
4305 X and Y specify the window coordinates of the lower left corner of the
4306 rectangular region to be copied. WIDTH and HEIGHT specify the dimensions
4307 of the rectangular region to be copied. Both WIDTH and HEIGHT must not
4308 be negative.
4309
4310 Several parameters control the processing of the pixel data while it is
4311 being copied. These parameters are set with three commands:
4312 `glPixelTransfer', `glPixelMap', and `glPixelZoom'. This reference page
4313 describes the effects on `glCopyPixels' of most, but not all, of the
4314 parameters specified by these three commands.
4315
4316 `glCopyPixels' copies values from each pixel with the lower left-hand
4317 corner at (X+I,Y+J) for 0<=I<WIDTH and 0<=J<HEIGHT . This pixel is said
4318 to be the I th pixel in the J th row. Pixels are copied in row order
4319 from the lowest to the highest row, left to right in each row.
4320
4321 TYPE specifies whether color, depth, or stencil data is to be copied.
4322 The details of the transfer for each data type are as follows:
4323
4324 `GL_COLOR'
4325 Indices or RGBA colors are read from the buffer currently specified
4326 as the read source buffer (see `glReadBuffer'). If the GL is in
4327 color index mode, each index that is read from this buffer is
4328 converted to a fixed-point format with an unspecified number of
4329 bits to the right of the binary point. Each index is then shifted
4330 left by `GL_INDEX_SHIFT' bits, and added to `GL_INDEX_OFFSET'. If
4331 `GL_INDEX_SHIFT' is negative, the shift is to the right. In either
4332 case, zero bits fill otherwise unspecified bit locations in the
4333 result. If `GL_MAP_COLOR' is true, the index is replaced with the
4334 value that it references in lookup table `GL_PIXEL_MAP_I_TO_I'.
4335 Whether the lookup replacement of the index is done or not, the
4336 integer part of the index is then ANDed with 2^B-1 , where B is the
4337 number of bits in a color index buffer.
4338
4339 If the GL is in RGBA mode, the red, green, blue, and alpha
4340 components of each pixel that is read are converted to an internal
4341 floating-point format with unspecified precision. The conversion
4342 maps the largest representable component value to 1.0, and
4343 component value 0 to 0.0. The resulting floating-point color values
4344 are then multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where
4345 C is RED, GREEN, BLUE, and ALPHA for the respective color
4346 components. The results are clamped to the range [0,1]. If
4347 `GL_MAP_COLOR' is true, each color component is scaled by the size
4348 of lookup table `GL_PIXEL_MAP_c_TO_c', then replaced by the value
4349 that it references in that table. C is R, G, B, or A.
4350
4351 If the `ARB_imaging' extension is supported, the color values may
4352 be additionally processed by color-table lookups, color-matrix
4353 transformations, and convolution filters.
4354
4355 The GL then converts the resulting indices or RGBA colors to
4356 fragments by attaching the current raster position Z coordinate and
4357 texture coordinates to each pixel, then assigning window
4358 coordinates (X_R+I,Y_R+J) , where (X_R,Y_R) is the current raster
4359 position, and the pixel was the I th pixel in the J th row. These
4360 pixel fragments are then treated just like the fragments generated
4361 by rasterizing points, lines, or polygons. Texture mapping, fog,
4362 and all the fragment operations are applied before the fragments
4363 are written to the frame buffer.
4364
4365 `GL_DEPTH'
4366 Depth values are read from the depth buffer and converted directly
4367 to an internal floating-point format with unspecified precision.
4368 The resulting floating-point depth value is then multiplied by
4369 `GL_DEPTH_SCALE' and added to `GL_DEPTH_BIAS'. The result is
4370 clamped to the range [0,1].
4371
4372 The GL then converts the resulting depth components to fragments by
4373 attaching the current raster position color or color index and
4374 texture coordinates to each pixel, then assigning window
4375 coordinates (X_R+I,Y_R+J) , where (X_R,Y_R) is the current raster
4376 position, and the pixel was the I th pixel in the J th row. These
4377 pixel fragments are then treated just like the fragments generated
4378 by rasterizing points, lines, or polygons. Texture mapping, fog,
4379 and all the fragment operations are applied before the fragments
4380 are written to the frame buffer.
4381
4382 `GL_STENCIL'
4383 Stencil indices are read from the stencil buffer and converted to
4384 an internal fixed-point format with an unspecified number of bits
4385 to the right of the binary point. Each fixed-point index is then
4386 shifted left by `GL_INDEX_SHIFT' bits, and added to
4387 `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is negative, the shift is to
4388 the right. In either case, zero bits fill otherwise unspecified bit
4389 locations in the result. If `GL_MAP_STENCIL' is true, the index is
4390 replaced with the value that it references in lookup table
4391 `GL_PIXEL_MAP_S_TO_S'. Whether the lookup replacement of the index
4392 is done or not, the integer part of the index is then ANDed with
4393 2^B-1 , where B is the number of bits in the stencil buffer. The
4394 resulting stencil indices are then written to the stencil buffer
4395 such that the index read from the I th location of the J th row is
4396 written to location (X_R+I,Y_R+J) , where (X_R,Y_R) is the current
4397 raster position. Only the pixel ownership test, the scissor test,
4398 and the stencil writemask affect these write operations.
4399
4400 The rasterization described thus far assumes pixel zoom factors of 1.0.
4401 If `glPixelZoom' is used to change the X and Y pixel zoom factors,
4402 pixels are converted to fragments as follows. If (X_R,Y_R) is the
4403 current raster position, and a given pixel is in the I th location in
4404 the J th row of the source pixel rectangle, then fragments are generated
4405 for pixels whose centers are in the rectangle with corners at
4406
4407 (X_R+ZOOM_X,\u2062I,Y_R+ZOOM_Y,\u2062J)
4408
4409 and
4410
4411 (X_R+ZOOM_X,\u2061(I+1,),Y_R+ZOOM_Y,\u2061(J+1,))
4412
4413 where ZOOM_X is the value of `GL_ZOOM_X' and ZOOM_Y is the value of
4414 `GL_ZOOM_Y'.
4415
4416 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
4417
4418 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
4419
4420 `GL_INVALID_OPERATION' is generated if TYPE is `GL_DEPTH' and there is
4421 no depth buffer.
4422
4423 `GL_INVALID_OPERATION' is generated if TYPE is `GL_STENCIL' and there is
4424 no stencil buffer.
4425
4426 `GL_INVALID_OPERATION' is generated if `glCopyPixels' is executed
4427 between the execution of `glBegin' and the corresponding execution of
4428 `glEnd'.")
4429
4430 (define-gl-procedures
4431 ((glCopyTexImage1D
4432 (target GLenum)
4433 (level GLint)
4434 (internalformat GLenum)
4435 (x GLint)
4436 (y GLint)
4437 (width GLsizei)
4438 (border GLint)
4439 ->
4440 void))
4441 "Copy pixels into a 1D texture image.
4442
4443 TARGET
4444 Specifies the target texture. Must be `GL_TEXTURE_1D'.
4445
4446 LEVEL
4447 Specifies the level-of-detail number. Level 0 is the base image
4448 level. Level N is the Nth mipmap reduction image.
4449
4450 INTERNALFORMAT
4451 Specifies the internal format of the texture. Must be one of the
4452 following symbolic constants: `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4453 `GL_ALPHA12', `GL_ALPHA16', `GL_COMPRESSED_ALPHA',
4454 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
4455 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB',
4456 `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
4457 `GL_DEPTH_COMPONENT24', `GL_DEPTH_COMPONENT32', `GL_LUMINANCE',
4458 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4459 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4460 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4461 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4462 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4463 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_RGB',
4464 `GL_R3_G3_B2', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10',
4465 `GL_RGB12', `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4',
4466 `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
4467 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
4468 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
4469 `GL_SRGB8_ALPHA8'.
4470
4471 X
4472 Y
4473
4474 Specify the window coordinates of the left corner of the row of
4475 pixels to be copied.
4476
4477 WIDTH
4478 Specifies the width of the texture image. Must be 0 or
4479 2^N+2\u2061(BORDER,) for some integer N . The height of the texture
4480 image is 1.
4481
4482 BORDER
4483 Specifies the width of the border. Must be either 0 or 1.
4484
4485 `glCopyTexImage1D' defines a one-dimensional texture image with pixels
4486 from the current `GL_READ_BUFFER'.
4487
4488 The screen-aligned pixel row with left corner at (X,Y) and with a length
4489 of WIDTH+2\u2061(BORDER,) defines the texture array at the mipmap level
4490 specified by LEVEL. INTERNALFORMAT specifies the internal format of the
4491 texture array.
4492
4493 The pixels in the row are processed exactly as if `glCopyPixels' had
4494 been called, but the process stops just before final conversion. At this
4495 point all pixel component values are clamped to the range [0,1] and then
4496 converted to the texture's internal format for storage in the texel
4497 array.
4498
4499 Pixel ordering is such that lower X screen coordinates correspond to
4500 lower texture coordinates.
4501
4502 If any of the pixels within the specified row of the current
4503 `GL_READ_BUFFER' are outside the window associated with the current
4504 rendering context, then the values obtained for those pixels are
4505 undefined.
4506
4507 `glCopyTexImage1D' defines a one-dimensional texture image with pixels
4508 from the current `GL_READ_BUFFER'.
4509
4510 When INTERNALFORMAT is one of the sRGB types, the GL does not
4511 automatically convert the source pixels to the sRGB color space. In this
4512 case, the `glPixelMap' function can be used to accomplish the
4513 conversion.
4514
4515 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
4516 values.
4517
4518 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4519
4520 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2\u2062MAX ,
4521 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
4522
4523 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not an allowable
4524 value.
4525
4526 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
4527 2 + `GL_MAX_TEXTURE_SIZE'.
4528
4529 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
4530 supported and the WIDTH cannot be represented as 2^N+2\u2061(BORDER,) for
4531 some integer value of N.
4532
4533 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
4534
4535 `GL_INVALID_OPERATION' is generated if `glCopyTexImage1D' is executed
4536 between the execution of `glBegin' and the corresponding execution of
4537 `glEnd'.
4538
4539 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
4540 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
4541 `GL_DEPTH_COMPONENT32' and there is no depth buffer.")
4542
4543 (define-gl-procedures
4544 ((glCopyTexImage2D
4545 (target GLenum)
4546 (level GLint)
4547 (internalformat GLenum)
4548 (x GLint)
4549 (y GLint)
4550 (width GLsizei)
4551 (height GLsizei)
4552 (border GLint)
4553 ->
4554 void))
4555 "Copy pixels into a 2D texture image.
4556
4557 TARGET
4558 Specifies the target texture. Must be `GL_TEXTURE_2D',
4559 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4560 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4561 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
4562 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4563
4564 LEVEL
4565 Specifies the level-of-detail number. Level 0 is the base image
4566 level. Level N is the Nth mipmap reduction image.
4567
4568 INTERNALFORMAT
4569 Specifies the internal format of the texture. Must be one of the
4570 following symbolic constants: `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4571 `GL_ALPHA12', `GL_ALPHA16', `GL_COMPRESSED_ALPHA',
4572 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
4573 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB',
4574 `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
4575 `GL_DEPTH_COMPONENT24', `GL_DEPTH_COMPONENT32', `GL_LUMINANCE',
4576 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4577 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4578 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4579 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4580 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4581 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_RGB',
4582 `GL_R3_G3_B2', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10',
4583 `GL_RGB12', `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4',
4584 `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
4585 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
4586 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
4587 `GL_SRGB8_ALPHA8'.
4588
4589 X
4590 Y
4591
4592 Specify the window coordinates of the lower left corner of the
4593 rectangular region of pixels to be copied.
4594
4595 WIDTH
4596 Specifies the width of the texture image. Must be 0 or
4597 2^N+2\u2061(BORDER,) for some integer N .
4598
4599 HEIGHT
4600 Specifies the height of the texture image. Must be 0 or
4601 2^M+2\u2061(BORDER,) for some integer M .
4602
4603 BORDER
4604 Specifies the width of the border. Must be either 0 or 1.
4605
4606 `glCopyTexImage2D' defines a two-dimensional texture image, or cube-map
4607 texture image with pixels from the current `GL_READ_BUFFER'.
4608
4609 The screen-aligned pixel rectangle with lower left corner at (X, Y) and
4610 with a width of WIDTH+2\u2061(BORDER,) and a height of HEIGHT+2\u2061(BORDER,)
4611 defines the texture array at the mipmap level specified by LEVEL.
4612 INTERNALFORMAT specifies the internal format of the texture array.
4613
4614 The pixels in the rectangle are processed exactly as if `glCopyPixels'
4615 had been called, but the process stops just before final conversion. At
4616 this point all pixel component values are clamped to the range [0,1] and
4617 then converted to the texture's internal format for storage in the texel
4618 array.
4619
4620 Pixel ordering is such that lower X and Y screen coordinates correspond
4621 to lower S and T texture coordinates.
4622
4623 If any of the pixels within the specified rectangle of the current
4624 `GL_READ_BUFFER' are outside the window associated with the current
4625 rendering context, then the values obtained for those pixels are
4626 undefined.
4627
4628 When INTERNALFORMAT is one of the sRGB types, the GL does not
4629 automatically convert the source pixels to the sRGB color space. In this
4630 case, the `glPixelMap' function can be used to accomplish the
4631 conversion.
4632
4633 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
4634 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4635 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4636 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4637
4638 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4639
4640 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2\u2062MAX ,
4641 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
4642
4643 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
4644 2 + `GL_MAX_TEXTURE_SIZE'.
4645
4646 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
4647 supported and the WIDTH or DEPTH cannot be represented as
4648 2^K+2\u2061(BORDER,) for some integer K .
4649
4650 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
4651
4652 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not an accepted
4653 format.
4654
4655 `GL_INVALID_OPERATION' is generated if `glCopyTexImage2D' is executed
4656 between the execution of `glBegin' and the corresponding execution of
4657 `glEnd'.
4658
4659 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
4660 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
4661 `GL_DEPTH_COMPONENT32' and there is no depth buffer.")
4662
4663 (define-gl-procedures
4664 ((glCopyTexSubImage1D
4665 (target GLenum)
4666 (level GLint)
4667 (xoffset GLint)
4668 (x GLint)
4669 (y GLint)
4670 (width GLsizei)
4671 ->
4672 void))
4673 "Copy a one-dimensional texture subimage.
4674
4675 TARGET
4676 Specifies the target texture. Must be `GL_TEXTURE_1D'.
4677
4678 LEVEL
4679 Specifies the level-of-detail number. Level 0 is the base image
4680 level. Level N is the Nth mipmap reduction image.
4681
4682 XOFFSET
4683 Specifies the texel offset within the texture array.
4684
4685 X
4686 Y
4687
4688 Specify the window coordinates of the left corner of the row of
4689 pixels to be copied.
4690
4691 WIDTH
4692 Specifies the width of the texture subimage.
4693
4694 `glCopyTexSubImage1D' replaces a portion of a one-dimensional texture
4695 image with pixels from the current `GL_READ_BUFFER' (rather than from
4696 main memory, as is the case for `glTexSubImage1D').
4697
4698 The screen-aligned pixel row with left corner at (X,\\ Y), and with
4699 length WIDTH replaces the portion of the texture array with x indices
4700 XOFFSET through XOFFSET+WIDTH-1 , inclusive. The destination in the
4701 texture array may not include any texels outside the texture array as it
4702 was originally specified.
4703
4704 The pixels in the row are processed exactly as if `glCopyPixels' had
4705 been called, but the process stops just before final conversion. At this
4706 point, all pixel component values are clamped to the range [0,1] and
4707 then converted to the texture's internal format for storage in the texel
4708 array.
4709
4710 It is not an error to specify a subtexture with zero width, but such a
4711 specification has no effect. If any of the pixels within the specified
4712 row of the current `GL_READ_BUFFER' are outside the read window
4713 associated with the current rendering context, then the values obtained
4714 for those pixels are undefined.
4715
4716 No change is made to the INTERNALFORMAT, WIDTH, or BORDER parameters of
4717 the specified texture array or to texel values outside the specified
4718 subregion.
4719
4720 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_1D'.
4721
4722 `GL_INVALID_OPERATION' is generated if the texture array has not been
4723 defined by a previous `glTexImage1D' or `glCopyTexImage1D' operation.
4724
4725 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4726
4727 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
4728 the returned value of `GL_MAX_TEXTURE_SIZE'.
4729
4730 `GL_INVALID_VALUE' is generated if XOFFSET<-B , or
4731 (XOFFSET+WIDTH,)>(W-B,) , where W is the `GL_TEXTURE_WIDTH' and B is the
4732 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W
4733 includes twice the border width.")
4734
4735 (define-gl-procedures
4736 ((glCopyTexSubImage2D
4737 (target GLenum)
4738 (level GLint)
4739 (xoffset GLint)
4740 (yoffset GLint)
4741 (x GLint)
4742 (y GLint)
4743 (width GLsizei)
4744 (height GLsizei)
4745 ->
4746 void))
4747 "Copy a two-dimensional texture subimage.
4748
4749 TARGET
4750 Specifies the target texture. Must be `GL_TEXTURE_2D',
4751 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4752 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4753 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
4754 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4755
4756 LEVEL
4757 Specifies the level-of-detail number. Level 0 is the base image
4758 level. Level N is the Nth mipmap reduction image.
4759
4760 XOFFSET
4761 Specifies a texel offset in the x direction within the texture
4762 array.
4763
4764 YOFFSET
4765 Specifies a texel offset in the y direction within the texture
4766 array.
4767
4768 X
4769 Y
4770
4771 Specify the window coordinates of the lower left corner of the
4772 rectangular region of pixels to be copied.
4773
4774 WIDTH
4775 Specifies the width of the texture subimage.
4776
4777 HEIGHT
4778 Specifies the height of the texture subimage.
4779
4780 `glCopyTexSubImage2D' replaces a rectangular portion of a
4781 two-dimensional texture image or cube-map texture image with pixels from
4782 the current `GL_READ_BUFFER' (rather than from main memory, as is the
4783 case for `glTexSubImage2D').
4784
4785 The screen-aligned pixel rectangle with lower left corner at (X,Y) and
4786 with width WIDTH and height HEIGHT replaces the portion of the texture
4787 array with x indices XOFFSET through XOFFSET+WIDTH-1 , inclusive, and y
4788 indices YOFFSET through YOFFSET+HEIGHT-1 , inclusive, at the mipmap
4789 level specified by LEVEL.
4790
4791 The pixels in the rectangle are processed exactly as if `glCopyPixels'
4792 had been called, but the process stops just before final conversion. At
4793 this point, all pixel component values are clamped to the range [0,1]
4794 and then converted to the texture's internal format for storage in the
4795 texel array.
4796
4797 The destination rectangle in the texture array may not include any
4798 texels outside the texture array as it was originally specified. It is
4799 not an error to specify a subtexture with zero width or height, but such
4800 a specification has no effect.
4801
4802 If any of the pixels within the specified rectangle of the current
4803 `GL_READ_BUFFER' are outside the read window associated with the current
4804 rendering context, then the values obtained for those pixels are
4805 undefined.
4806
4807 No change is made to the INTERNALFORMAT, WIDTH, HEIGHT, or BORDER
4808 parameters of the specified texture array or to texel values outside the
4809 specified subregion.
4810
4811 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
4812 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4813 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4814 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4815
4816 `GL_INVALID_OPERATION' is generated if the texture array has not been
4817 defined by a previous `glTexImage2D' or `glCopyTexImage2D' operation.
4818
4819 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4820
4821 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
4822 the returned value of `GL_MAX_TEXTURE_SIZE'.
4823
4824 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
4825 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , where W is the
4826 `GL_TEXTURE_WIDTH', H is the `GL_TEXTURE_HEIGHT', and B is the
4827 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W and
4828 H include twice the border width.
4829
4830 `GL_INVALID_OPERATION' is generated if `glCopyTexSubImage2D' is executed
4831 between the execution of `glBegin' and the corresponding execution of
4832 `glEnd'.")
4833
4834 (define-gl-procedures
4835 ((glCopyTexSubImage3D
4836 (target GLenum)
4837 (level GLint)
4838 (xoffset GLint)
4839 (yoffset GLint)
4840 (zoffset GLint)
4841 (x GLint)
4842 (y GLint)
4843 (width GLsizei)
4844 (height GLsizei)
4845 ->
4846 void))
4847 "Copy a three-dimensional texture subimage.
4848
4849 TARGET
4850 Specifies the target texture. Must be `GL_TEXTURE_3D'
4851
4852 LEVEL
4853 Specifies the level-of-detail number. Level 0 is the base image
4854 level. Level N is the Nth mipmap reduction image.
4855
4856 XOFFSET
4857 Specifies a texel offset in the x direction within the texture
4858 array.
4859
4860 YOFFSET
4861 Specifies a texel offset in the y direction within the texture
4862 array.
4863
4864 ZOFFSET
4865 Specifies a texel offset in the z direction within the texture
4866 array.
4867
4868 X
4869 Y
4870
4871 Specify the window coordinates of the lower left corner of the
4872 rectangular region of pixels to be copied.
4873
4874 WIDTH
4875 Specifies the width of the texture subimage.
4876
4877 HEIGHT
4878 Specifies the height of the texture subimage.
4879
4880 `glCopyTexSubImage3D' replaces a rectangular portion of a
4881 three-dimensional texture image with pixels from the current
4882 `GL_READ_BUFFER' (rather than from main memory, as is the case for
4883 `glTexSubImage3D').
4884
4885 The screen-aligned pixel rectangle with lower left corner at (X,\\ Y) and
4886 with width WIDTH and height HEIGHT replaces the portion of the texture
4887 array with x indices XOFFSET through XOFFSET+WIDTH-1 , inclusive, and y
4888 indices YOFFSET through YOFFSET+HEIGHT-1 , inclusive, at z index ZOFFSET
4889 and at the mipmap level specified by LEVEL.
4890
4891 The pixels in the rectangle are processed exactly as if `glCopyPixels'
4892 had been called, but the process stops just before final conversion. At
4893 this point, all pixel component values are clamped to the range [0,1]
4894 and then converted to the texture's internal format for storage in the
4895 texel array.
4896
4897 The destination rectangle in the texture array may not include any
4898 texels outside the texture array as it was originally specified. It is
4899 not an error to specify a subtexture with zero width or height, but such
4900 a specification has no effect.
4901
4902 If any of the pixels within the specified rectangle of the current
4903 `GL_READ_BUFFER' are outside the read window associated with the current
4904 rendering context, then the values obtained for those pixels are
4905 undefined.
4906
4907 No change is made to the INTERNALFORMAT, WIDTH, HEIGHT, DEPTH, or BORDER
4908 parameters of the specified texture array or to texel values outside the
4909 specified subregion.
4910
4911 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_3D'.
4912
4913 `GL_INVALID_OPERATION' is generated if the texture array has not been
4914 defined by a previous `glTexImage3D' operation.
4915
4916 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4917
4918 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
4919 the returned value of `GL_MAX_3D_TEXTURE_SIZE'.
4920
4921 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
4922 , YOFFSET<-B , (YOFFSET+HEIGHT,)>(H-B,) , ZOFFSET<-B , or
4923 (ZOFFSET+1,)>(D-B,) , where W is the `GL_TEXTURE_WIDTH', H is the
4924 `GL_TEXTURE_HEIGHT', D is the `GL_TEXTURE_DEPTH', and B is the
4925 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W , H
4926 , and D include twice the border width.
4927
4928 `GL_INVALID_OPERATION' is generated if `glCopyTexSubImage3D' is executed
4929 between the execution of `glBegin' and the corresponding execution of
4930 `glEnd'.")
4931
4932 (define-gl-procedures
4933 ((glCreateProgram -> GLuint))
4934 "Creates a program object.
4935
4936 `glCreateProgram' creates an empty program object and returns a non-zero
4937 value by which it can be referenced. A program object is an object to
4938 which shader objects can be attached. This provides a mechanism to
4939 specify the shader objects that will be linked to create a program. It
4940 also provides a means for checking the compatibility of the shaders that
4941 will be used to create a program (for instance, checking the
4942 compatibility between a vertex shader and a fragment shader). When no
4943 longer needed as part of a program object, shader objects can be
4944 detached.
4945
4946 One or more executables are created in a program object by successfully
4947 attaching shader objects to it with `glAttachShader', successfully
4948 compiling the shader objects with `glCompileShader', and successfully
4949 linking the program object with `glLinkProgram'. These executables are
4950 made part of current state when `glUseProgram' is called. Program
4951 objects can be deleted by calling `glDeleteProgram'. The memory
4952 associated with the program object will be deleted when it is no longer
4953 part of current rendering state for any context.
4954
4955 This function returns 0 if an error occurs creating the program object.
4956
4957 `GL_INVALID_OPERATION' is generated if `glCreateProgram' is executed
4958 between the execution of `glBegin' and the corresponding execution of
4959 `glEnd'.")
4960
4961 (define-gl-procedures
4962 ((glCreateShader (shaderType GLenum) -> GLuint))
4963 "Creates a shader object.
4964
4965 SHADERTYPE
4966 Specifies the type of shader to be created. Must be either
4967 `GL_VERTEX_SHADER' or `GL_FRAGMENT_SHADER'.
4968
4969 `glCreateShader' creates an empty shader object and returns a non-zero
4970 value by which it can be referenced. A shader object is used to maintain
4971 the source code strings that define a shader. SHADERTYPE indicates the
4972 type of shader to be created. Two types of shaders are supported. A
4973 shader of type `GL_VERTEX_SHADER' is a shader that is intended to run on
4974 the programmable vertex processor and replace the fixed functionality
4975 vertex processing in OpenGL. A shader of type `GL_FRAGMENT_SHADER' is a
4976 shader that is intended to run on the programmable fragment processor
4977 and replace the fixed functionality fragment processing in OpenGL.
4978
4979 When created, a shader object's `GL_SHADER_TYPE' parameter is set to
4980 either `GL_VERTEX_SHADER' or `GL_FRAGMENT_SHADER', depending on the
4981 value of SHADERTYPE.
4982
4983 This function returns 0 if an error occurs creating the shader object.
4984
4985 `GL_INVALID_ENUM' is generated if SHADERTYPE is not an accepted value.
4986
4987 `GL_INVALID_OPERATION' is generated if `glCreateShader' is executed
4988 between the execution of `glBegin' and the corresponding execution of
4989 `glEnd'.")
4990
4991 (define-gl-procedures
4992 ((glCullFace (mode GLenum) -> void))
4993 "Specify whether front- or back-facing facets can be culled.
4994
4995 MODE
4996 Specifies whether front- or back-facing facets are candidates for
4997 culling. Symbolic constants `GL_FRONT', `GL_BACK', and
4998 `GL_FRONT_AND_BACK' are accepted. The initial value is `GL_BACK'.
4999
5000 `glCullFace' specifies whether front- or back-facing facets are culled
5001 (as specified by MODE) when facet culling is enabled. Facet culling is
5002 initially disabled. To enable and disable facet culling, call the
5003 `glEnable' and `glDisable' commands with the argument `GL_CULL_FACE'.
5004 Facets include triangles, quadrilaterals, polygons, and rectangles.
5005
5006 `glFrontFace' specifies which of the clockwise and counterclockwise
5007 facets are front-facing and back-facing. See `glFrontFace'.
5008
5009 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5010
5011 `GL_INVALID_OPERATION' is generated if `glCullFace' is executed between
5012 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5013
5014 (define-gl-procedures
5015 ((glDeleteBuffers
5016 (n GLsizei)
5017 (buffers const-GLuint-*)
5018 ->
5019 void))
5020 "Delete named buffer objects.
5021
5022 N
5023 Specifies the number of buffer objects to be deleted.
5024
5025 BUFFERS
5026 Specifies an array of buffer objects to be deleted.
5027
5028 `glDeleteBuffers' deletes N buffer objects named by the elements of the
5029 array BUFFERS. After a buffer object is deleted, it has no contents, and
5030 its name is free for reuse (for example by `glGenBuffers'). If a buffer
5031 object that is currently bound is deleted, the binding reverts to 0 (the
5032 absence of any buffer object, which reverts to client memory usage).
5033
5034 `glDeleteBuffers' silently ignores 0's and names that do not correspond
5035 to existing buffer objects.
5036
5037 `GL_INVALID_VALUE' is generated if N is negative.
5038
5039 `GL_INVALID_OPERATION' is generated if `glDeleteBuffers' is executed
5040 between the execution of `glBegin' and the corresponding execution of
5041 `glEnd'.")
5042
5043 (define-gl-procedures
5044 ((glDeleteLists
5045 (list GLuint)
5046 (range GLsizei)
5047 ->
5048 void))
5049 "Delete a contiguous group of display lists.
5050
5051 LIST
5052 Specifies the integer name of the first display list to delete.
5053
5054 RANGE
5055 Specifies the number of display lists to delete.
5056
5057 `glDeleteLists' causes a contiguous group of display lists to be
5058 deleted. LIST is the name of the first display list to be deleted, and
5059 RANGE is the number of display lists to delete. All display lists D with
5060 LIST<=D<=LIST+RANGE-1 are deleted.
5061
5062 All storage locations allocated to the specified display lists are
5063 freed, and the names are available for reuse at a later time. Names
5064 within the range that do not have an associated display list are
5065 ignored. If RANGE is 0, nothing happens.
5066
5067 `GL_INVALID_VALUE' is generated if RANGE is negative.
5068
5069 `GL_INVALID_OPERATION' is generated if `glDeleteLists' is executed
5070 between the execution of `glBegin' and the corresponding execution of
5071 `glEnd'.")
5072
5073 (define-gl-procedures
5074 ((glDeleteProgram (program GLuint) -> void))
5075 "Deletes a program object.
5076
5077 PROGRAM
5078 Specifies the program object to be deleted.
5079
5080 `glDeleteProgram' frees the memory and invalidates the name associated
5081 with the program object specified by PROGRAM. This command effectively
5082 undoes the effects of a call to `glCreateProgram'.
5083
5084 If a program object is in use as part of current rendering state, it
5085 will be flagged for deletion, but it will not be deleted until it is no
5086 longer part of current state for any rendering context. If a program
5087 object to be deleted has shader objects attached to it, those shader
5088 objects will be automatically detached but not deleted unless they have
5089 already been flagged for deletion by a previous call to
5090 `glDeleteShader'. A value of 0 for PROGRAM will be silently ignored.
5091
5092 To determine whether a program object has been flagged for deletion,
5093 call `glGetProgram' with arguments PROGRAM and `GL_DELETE_STATUS'.
5094
5095 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
5096 OpenGL.
5097
5098 `GL_INVALID_OPERATION' is generated if `glDeleteProgram' is executed
5099 between the execution of `glBegin' and the corresponding execution of
5100 `glEnd'.")
5101
5102 (define-gl-procedures
5103 ((glDeleteQueries
5104 (n GLsizei)
5105 (ids const-GLuint-*)
5106 ->
5107 void))
5108 "Delete named query objects.
5109
5110 N
5111 Specifies the number of query objects to be deleted.
5112
5113 IDS
5114 Specifies an array of query objects to be deleted.
5115
5116 `glDeleteQueries' deletes N query objects named by the elements of the
5117 array IDS. After a query object is deleted, it has no contents, and its
5118 name is free for reuse (for example by `glGenQueries').
5119
5120 `glDeleteQueries' silently ignores 0's and names that do not correspond
5121 to existing query objects.
5122
5123 `GL_INVALID_VALUE' is generated if N is negative.
5124
5125 `GL_INVALID_OPERATION' is generated if `glDeleteQueries' is executed
5126 between the execution of `glBegin' and the corresponding execution of
5127 `glEnd'.")
5128
5129 (define-gl-procedures
5130 ((glDeleteShader (shader GLuint) -> void))
5131 "Deletes a shader object.
5132
5133 SHADER
5134 Specifies the shader object to be deleted.
5135
5136 `glDeleteShader' frees the memory and invalidates the name associated
5137 with the shader object specified by SHADER. This command effectively
5138 undoes the effects of a call to `glCreateShader'.
5139
5140 If a shader object to be deleted is attached to a program object, it
5141 will be flagged for deletion, but it will not be deleted until it is no
5142 longer attached to any program object, for any rendering context (i.e.,
5143 it must be detached from wherever it was attached before it will be
5144 deleted). A value of 0 for SHADER will be silently ignored.
5145
5146 To determine whether an object has been flagged for deletion, call
5147 `glGetShader' with arguments SHADER and `GL_DELETE_STATUS'.
5148
5149 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
5150 OpenGL.
5151
5152 `GL_INVALID_OPERATION' is generated if `glDeleteShader' is executed
5153 between the execution of `glBegin' and the corresponding execution of
5154 `glEnd'.")
5155
5156 (define-gl-procedures
5157 ((glDeleteTextures
5158 (n GLsizei)
5159 (textures const-GLuint-*)
5160 ->
5161 void))
5162 "Delete named textures.
5163
5164 N
5165 Specifies the number of textures to be deleted.
5166
5167 TEXTURES
5168 Specifies an array of textures to be deleted.
5169
5170 `glDeleteTextures' deletes N textures named by the elements of the array
5171 TEXTURES. After a texture is deleted, it has no contents or
5172 dimensionality, and its name is free for reuse (for example by
5173 `glGenTextures'). If a texture that is currently bound is deleted, the
5174 binding reverts to 0 (the default texture).
5175
5176 `glDeleteTextures' silently ignores 0's and names that do not correspond
5177 to existing textures.
5178
5179 `GL_INVALID_VALUE' is generated if N is negative.
5180
5181 `GL_INVALID_OPERATION' is generated if `glDeleteTextures' is executed
5182 between the execution of `glBegin' and the corresponding execution of
5183 `glEnd'.")
5184
5185 (define-gl-procedures
5186 ((glDepthFunc (func GLenum) -> void))
5187 "Specify the value used for depth buffer comparisons.
5188
5189 FUNC
5190 Specifies the depth comparison function. Symbolic constants
5191 `GL_NEVER', `GL_LESS', `GL_EQUAL', `GL_LEQUAL', `GL_GREATER',
5192 `GL_NOTEQUAL', `GL_GEQUAL', and `GL_ALWAYS' are accepted. The
5193 initial value is `GL_LESS'.
5194
5195 `glDepthFunc' specifies the function used to compare each incoming pixel
5196 depth value with the depth value present in the depth buffer. The
5197 comparison is performed only if depth testing is enabled. (See
5198 `glEnable' and `glDisable' of `GL_DEPTH_TEST'.)
5199
5200 FUNC specifies the conditions under which the pixel will be drawn. The
5201 comparison functions are as follows:
5202
5203 `GL_NEVER'
5204 Never passes.
5205
5206 `GL_LESS'
5207 Passes if the incoming depth value is less than the stored depth
5208 value.
5209
5210 `GL_EQUAL'
5211 Passes if the incoming depth value is equal to the stored depth
5212 value.
5213
5214 `GL_LEQUAL'
5215 Passes if the incoming depth value is less than or equal to the
5216 stored depth value.
5217
5218 `GL_GREATER'
5219 Passes if the incoming depth value is greater than the stored depth
5220 value.
5221
5222 `GL_NOTEQUAL'
5223 Passes if the incoming depth value is not equal to the stored depth
5224 value.
5225
5226 `GL_GEQUAL'
5227 Passes if the incoming depth value is greater than or equal to the
5228 stored depth value.
5229
5230 `GL_ALWAYS'
5231 Always passes.
5232
5233 The initial value of FUNC is `GL_LESS'. Initially, depth testing is
5234 disabled. If depth testing is disabled or if no depth buffer exists, it
5235 is as if the depth test always passes.
5236
5237 `GL_INVALID_ENUM' is generated if FUNC is not an accepted value.
5238
5239 `GL_INVALID_OPERATION' is generated if `glDepthFunc' is executed between
5240 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5241
5242 (define-gl-procedures
5243 ((glDepthMask (flag GLboolean) -> void))
5244 "Enable or disable writing into the depth buffer.
5245
5246 FLAG
5247 Specifies whether the depth buffer is enabled for writing. If FLAG
5248 is `GL_FALSE', depth buffer writing is disabled. Otherwise, it is
5249 enabled. Initially, depth buffer writing is enabled.
5250
5251 `glDepthMask' specifies whether the depth buffer is enabled for writing.
5252 If FLAG is `GL_FALSE', depth buffer writing is disabled. Otherwise, it
5253 is enabled. Initially, depth buffer writing is enabled.
5254
5255 `GL_INVALID_OPERATION' is generated if `glDepthMask' is executed between
5256 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5257
5258 (define-gl-procedures
5259 ((glDepthRange
5260 (nearVal GLclampd)
5261 (farVal GLclampd)
5262 ->
5263 void))
5264 "Specify mapping of depth values from normalized device coordinates to
5265 window coordinates.
5266
5267 NEARVAL
5268 Specifies the mapping of the near clipping plane to window
5269 coordinates. The initial value is 0.
5270
5271 FARVAL
5272 Specifies the mapping of the far clipping plane to window
5273 coordinates. The initial value is 1.
5274
5275 After clipping and division by W, depth coordinates range from -1 to 1,
5276 corresponding to the near and far clipping planes. `glDepthRange'
5277 specifies a linear mapping of the normalized depth coordinates in this
5278 range to window depth coordinates. Regardless of the actual depth buffer
5279 implementation, window coordinate depth values are treated as though
5280 they range from 0 through 1 (like color components). Thus, the values
5281 accepted by `glDepthRange' are both clamped to this range before they
5282 are accepted.
5283
5284 The setting of (0,1) maps the near plane to 0 and the far plane to 1.
5285 With this mapping, the depth buffer range is fully utilized.
5286
5287 `GL_INVALID_OPERATION' is generated if `glDepthRange' is executed
5288 between the execution of `glBegin' and the corresponding execution of
5289 `glEnd'.")
5290
5291 (define-gl-procedures
5292 ((glDetachShader
5293 (program GLuint)
5294 (shader GLuint)
5295 ->
5296 void))
5297 "Detaches a shader object from a program object to which it is attached.
5298
5299 PROGRAM
5300 Specifies the program object from which to detach the shader
5301 object.
5302
5303 SHADER
5304 Specifies the shader object to be detached.
5305
5306 `glDetachShader' detaches the shader object specified by SHADER from the
5307 program object specified by PROGRAM. This command can be used to undo
5308 the effect of the command `glAttachShader'.
5309
5310 If SHADER has already been flagged for deletion by a call to
5311 `glDeleteShader' and it is not attached to any other program object, it
5312 will be deleted after it has been detached.
5313
5314 `GL_INVALID_VALUE' is generated if either PROGRAM or SHADER is a value
5315 that was not generated by OpenGL.
5316
5317 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
5318
5319 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
5320
5321 `GL_INVALID_OPERATION' is generated if SHADER is not attached to
5322 PROGRAM.
5323
5324 `GL_INVALID_OPERATION' is generated if `glDetachShader' is executed
5325 between the execution of `glBegin' and the corresponding execution of
5326 `glEnd'.")
5327
5328 (define-gl-procedures
5329 ((glDrawArrays
5330 (mode GLenum)
5331 (first GLint)
5332 (count GLsizei)
5333 ->
5334 void))
5335 "Render primitives from array data.
5336
5337 MODE
5338 Specifies what kind of primitives to render. Symbolic constants
5339 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
5340 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
5341 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
5342
5343 FIRST
5344 Specifies the starting index in the enabled arrays.
5345
5346 COUNT
5347 Specifies the number of indices to be rendered.
5348
5349 `glDrawArrays' specifies multiple geometric primitives with very few
5350 subroutine calls. Instead of calling a GL procedure to pass each
5351 individual vertex, normal, texture coordinate, edge flag, or color, you
5352 can prespecify separate arrays of vertices, normals, and colors and use
5353 them to construct a sequence of primitives with a single call to
5354 `glDrawArrays'.
5355
5356 When `glDrawArrays' is called, it uses COUNT sequential elements from
5357 each enabled array to construct a sequence of geometric primitives,
5358 beginning with element FIRST. MODE specifies what kind of primitives are
5359 constructed and how the array elements construct those primitives. If
5360 `GL_VERTEX_ARRAY' is not enabled, no geometric primitives are generated.
5361
5362 Vertex attributes that are modified by `glDrawArrays' have an
5363 unspecified value after `glDrawArrays' returns. For example, if
5364 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
5365 after `glDrawArrays' executes. Attributes that aren't modified remain
5366 well defined.
5367
5368 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5369
5370 `GL_INVALID_VALUE' is generated if COUNT is negative.
5371
5372 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5373 bound to an enabled array and the buffer object's data store is
5374 currently mapped.
5375
5376 `GL_INVALID_OPERATION' is generated if `glDrawArrays' is executed
5377 between the execution of `glBegin' and the corresponding `glEnd'.")
5378
5379 (define-gl-procedures
5380 ((glDrawBuffers
5381 (n GLsizei)
5382 (bufs const-GLenum-*)
5383 ->
5384 void))
5385 "Specifies a list of color buffers to be drawn into.
5386
5387 N
5388 Specifies the number of buffers in BUFS.
5389
5390 BUFS
5391 Points to an array of symbolic constants specifying the buffers
5392 into which fragment colors or data values will be written.
5393
5394 `glDrawBuffers' defines an array of buffers into which fragment color
5395 values or fragment data will be written. If no fragment shader is
5396 active, rendering operations will generate only one fragment color per
5397 fragment and it will be written into each of the buffers specified by
5398 BUFS. If a fragment shader is active and it writes a value to the output
5399 variable `gl_FragColor', then that value will be written into each of
5400 the buffers specified by BUFS. If a fragment shader is active and it
5401 writes a value to one or more elements of the output array variable
5402 `gl_FragData[]', then the value of `gl_FragData[0] ' will be written
5403 into the first buffer specified by BUFS, the value of `gl_FragData[1] '
5404 will be written into the second buffer specified by BUFS, and so on up
5405 to `gl_FragData[n-1]'. The draw buffer used for `gl_FragData[n]' and
5406 beyond is implicitly set to be `GL_NONE'.
5407
5408 The symbolic constants contained in BUFS may be any of the following:
5409
5410 `GL_NONE'
5411 The fragment color/data value is not written into any color buffer.
5412
5413 `GL_FRONT_LEFT'
5414 The fragment color/data value is written into the front left color
5415 buffer.
5416
5417 `GL_FRONT_RIGHT'
5418 The fragment color/data value is written into the front right color
5419 buffer.
5420
5421 `GL_BACK_LEFT'
5422 The fragment color/data value is written into the back left color
5423 buffer.
5424
5425 `GL_BACK_RIGHT'
5426 The fragment color/data value is written into the back right color
5427 buffer.
5428
5429 `GL_AUXi'
5430 The fragment color/data value is written into auxiliary buffer `i'.
5431
5432 Except for `GL_NONE', the preceding symbolic constants may not appear
5433 more than once in BUFS. The maximum number of draw buffers supported is
5434 implementation dependent and can be queried by calling `glGet' with the
5435 argument `GL_MAX_DRAW_BUFFERS'. The number of auxiliary buffers can be
5436 queried by calling `glGet' with the argument `GL_AUX_BUFFERS'.
5437
5438 `GL_INVALID_ENUM' is generated if one of the values in BUFS is not an
5439 accepted value.
5440
5441 `GL_INVALID_ENUM' is generated if N is less than 0.
5442
5443 `GL_INVALID_OPERATION' is generated if a symbolic constant other than
5444 `GL_NONE' appears more than once in BUFS.
5445
5446 `GL_INVALID_OPERATION' is generated if any of the entries in BUFS (other
5447 than `GL_NONE' ) indicates a color buffer that does not exist in the
5448 current GL context.
5449
5450 `GL_INVALID_VALUE' is generated if N is greater than
5451 `GL_MAX_DRAW_BUFFERS'.
5452
5453 `GL_INVALID_OPERATION' is generated if `glDrawBuffers' is executed
5454 between the execution of `glBegin' and the corresponding execution of
5455 `glEnd'.")
5456
5457 (define-gl-procedures
5458 ((glDrawBuffer (mode GLenum) -> void))
5459 "Specify which color buffers are to be drawn into.
5460
5461 MODE
5462 Specifies up to four color buffers to be drawn into. Symbolic
5463 constants `GL_NONE', `GL_FRONT_LEFT', `GL_FRONT_RIGHT',
5464 `GL_BACK_LEFT', `GL_BACK_RIGHT', `GL_FRONT', `GL_BACK', `GL_LEFT',
5465 `GL_RIGHT', `GL_FRONT_AND_BACK', and `GL_AUX'I, where I is between
5466 0 and the value of `GL_AUX_BUFFERS' minus 1, are accepted.
5467 (`GL_AUX_BUFFERS' is not the upper limit; use `glGet' to query the
5468 number of available aux buffers.) The initial value is `GL_FRONT'
5469 for single-buffered contexts, and `GL_BACK' for double-buffered
5470 contexts.
5471
5472 When colors are written to the frame buffer, they are written into the
5473 color buffers specified by `glDrawBuffer'. The specifications are as
5474 follows:
5475
5476 `GL_NONE'
5477 No color buffers are written.
5478
5479 `GL_FRONT_LEFT'
5480 Only the front left color buffer is written.
5481
5482 `GL_FRONT_RIGHT'
5483 Only the front right color buffer is written.
5484
5485 `GL_BACK_LEFT'
5486 Only the back left color buffer is written.
5487
5488 `GL_BACK_RIGHT'
5489 Only the back right color buffer is written.
5490
5491 `GL_FRONT'
5492 Only the front left and front right color buffers are written. If
5493 there is no front right color buffer, only the front left color
5494 buffer is written.
5495
5496 `GL_BACK'
5497 Only the back left and back right color buffers are written. If
5498 there is no back right color buffer, only the back left color
5499 buffer is written.
5500
5501 `GL_LEFT'
5502 Only the front left and back left color buffers are written. If
5503 there is no back left color buffer, only the front left color
5504 buffer is written.
5505
5506 `GL_RIGHT'
5507 Only the front right and back right color buffers are written. If
5508 there is no back right color buffer, only the front right color
5509 buffer is written.
5510
5511 `GL_FRONT_AND_BACK'
5512 All the front and back color buffers (front left, front right, back
5513 left, back right) are written. If there are no back color buffers,
5514 only the front left and front right color buffers are written. If
5515 there are no right color buffers, only the front left and back left
5516 color buffers are written. If there are no right or back color
5517 buffers, only the front left color buffer is written.
5518
5519 `GL_AUX'I
5520 Only auxiliary color buffer I is written.
5521
5522 If more than one color buffer is selected for drawing, then blending or
5523 logical operations are computed and applied independently for each color
5524 buffer and can produce different results in each buffer.
5525
5526 Monoscopic contexts include only LEFT buffers, and stereoscopic contexts
5527 include both LEFT and RIGHT buffers. Likewise, single-buffered contexts
5528 include only FRONT buffers, and double-buffered contexts include both
5529 FRONT and BACK buffers. The context is selected at GL initialization.
5530
5531 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5532
5533 `GL_INVALID_OPERATION' is generated if none of the buffers indicated by
5534 MODE exists.
5535
5536 `GL_INVALID_OPERATION' is generated if `glDrawBuffer' is executed
5537 between the execution of `glBegin' and the corresponding execution of
5538 `glEnd'.")
5539
5540 (define-gl-procedures
5541 ((glDrawElements
5542 (mode GLenum)
5543 (count GLsizei)
5544 (type GLenum)
5545 (indices const-GLvoid-*)
5546 ->
5547 void))
5548 "Render primitives from array data.
5549
5550 MODE
5551 Specifies what kind of primitives to render. Symbolic constants
5552 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
5553 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
5554 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
5555
5556 COUNT
5557 Specifies the number of elements to be rendered.
5558
5559 TYPE
5560 Specifies the type of the values in INDICES. Must be one of
5561 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
5562
5563 INDICES
5564 Specifies a pointer to the location where the indices are stored.
5565
5566 `glDrawElements' specifies multiple geometric primitives with very few
5567 subroutine calls. Instead of calling a GL function to pass each
5568 individual vertex, normal, texture coordinate, edge flag, or color, you
5569 can prespecify separate arrays of vertices, normals, and so on, and use
5570 them to construct a sequence of primitives with a single call to
5571 `glDrawElements'.
5572
5573 When `glDrawElements' is called, it uses COUNT sequential elements from
5574 an enabled array, starting at INDICES to construct a sequence of
5575 geometric primitives. MODE specifies what kind of primitives are
5576 constructed and how the array elements construct these primitives. If
5577 more than one array is enabled, each is used. If `GL_VERTEX_ARRAY' is
5578 not enabled, no geometric primitives are constructed.
5579
5580 Vertex attributes that are modified by `glDrawElements' have an
5581 unspecified value after `glDrawElements' returns. For example, if
5582 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
5583 after `glDrawElements' executes. Attributes that aren't modified
5584 maintain their previous values.
5585
5586 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5587
5588 `GL_INVALID_VALUE' is generated if COUNT is negative.
5589
5590 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5591 bound to an enabled array or the element array and the buffer object's
5592 data store is currently mapped.
5593
5594 `GL_INVALID_OPERATION' is generated if `glDrawElements' is executed
5595 between the execution of `glBegin' and the corresponding `glEnd'.")
5596
5597 (define-gl-procedures
5598 ((glDrawPixels
5599 (width GLsizei)
5600 (height GLsizei)
5601 (format GLenum)
5602 (type GLenum)
5603 (data const-GLvoid-*)
5604 ->
5605 void))
5606 "Write a block of pixels to the frame buffer.
5607
5608 WIDTH
5609 HEIGHT
5610
5611 Specify the dimensions of the pixel rectangle to be written into
5612 the frame buffer.
5613
5614 FORMAT
5615 Specifies the format of the pixel data. Symbolic constants
5616 `GL_COLOR_INDEX', `GL_STENCIL_INDEX', `GL_DEPTH_COMPONENT',
5617 `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_RED', `GL_GREEN',
5618 `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA' are
5619 accepted.
5620
5621 TYPE
5622 Specifies the data type for DATA. Symbolic constants
5623 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
5624 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
5625 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
5626 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
5627 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
5628 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
5629 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
5630 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
5631 are accepted.
5632
5633 DATA
5634 Specifies a pointer to the pixel data.
5635
5636 `glDrawPixels' reads pixel data from memory and writes it into the frame
5637 buffer relative to the current raster position, provided that the raster
5638 position is valid. Use `glRasterPos' or `glWindowPos' to set the current
5639 raster position; use `glGet' with argument
5640 `GL_CURRENT_RASTER_POSITION_VALID' to determine if the specified raster
5641 position is valid, and `glGet' with argument
5642 `GL_CURRENT_RASTER_POSITION' to query the raster position.
5643
5644 Several parameters define the encoding of pixel data in memory and
5645 control the processing of the pixel data before it is placed in the
5646 frame buffer. These parameters are set with four commands:
5647 `glPixelStore', `glPixelTransfer', `glPixelMap', and `glPixelZoom'. This
5648 reference page describes the effects on `glDrawPixels' of many, but not
5649 all, of the parameters specified by these four commands.
5650
5651 Data is read from DATA as a sequence of signed or unsigned bytes, signed
5652 or unsigned shorts, signed or unsigned integers, or single-precision
5653 floating-point values, depending on TYPE. When TYPE is one of
5654 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
5655 `GL_UNSIGNED_INT', `GL_INT', or `GL_FLOAT' each of these bytes, shorts,
5656 integers, or floating-point values is interpreted as one color or depth
5657 component, or one index, depending on FORMAT. When TYPE is one of
5658 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_SHORT_5_6_5',
5659 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_5_5_5_1',
5660 `GL_UNSIGNED_INT_8_8_8_8', or `GL_UNSIGNED_INT_10_10_10_2', each
5661 unsigned value is interpreted as containing all the components for a
5662 single pixel, with the color components arranged according to FORMAT.
5663 When TYPE is one of `GL_UNSIGNED_BYTE_2_3_3_REV',
5664 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
5665 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8_REV', or
5666 `GL_UNSIGNED_INT_2_10_10_10_REV', each unsigned value is interpreted as
5667 containing all color components, specified by FORMAT, for a single pixel
5668 in a reversed order. Indices are always treated individually. Color
5669 components are treated as groups of one, two, three, or four values,
5670 again based on FORMAT. Both individual indices and groups of components
5671 are referred to as pixels. If TYPE is `GL_BITMAP', the data must be
5672 unsigned bytes, and FORMAT must be either `GL_COLOR_INDEX' or
5673 `GL_STENCIL_INDEX'. Each unsigned byte is treated as eight 1-bit pixels,
5674 with bit ordering determined by `GL_UNPACK_LSB_FIRST' (see
5675 `glPixelStore').
5676
5677 WIDTH×HEIGHT pixels are read from memory, starting at location DATA. By
5678 default, these pixels are taken from adjacent memory locations, except
5679 that after all WIDTH pixels are read, the read pointer is advanced to
5680 the next four-byte boundary. The four-byte row alignment is specified by
5681 `glPixelStore' with argument `GL_UNPACK_ALIGNMENT', and it can be set to
5682 one, two, four, or eight bytes. Other pixel store parameters specify
5683 different read pointer advancements, both before the first pixel is read
5684 and after all WIDTH pixels are read. See the `glPixelStore' reference
5685 page for details on these options.
5686
5687 If a non-zero named buffer object is bound to the
5688 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a block of
5689 pixels is specified, DATA is treated as a byte offset into the buffer
5690 object's data store.
5691
5692 The WIDTH×HEIGHT pixels that are read from memory are each operated on
5693 in the same way, based on the values of several parameters specified by
5694 `glPixelTransfer' and `glPixelMap'. The details of these operations, as
5695 well as the target buffer into which the pixels are drawn, are specific
5696 to the format of the pixels, as specified by FORMAT. FORMAT can assume
5697 one of 13 symbolic values:
5698
5699 `GL_COLOR_INDEX'
5700 Each pixel is a single value, a color index. It is converted to
5701 fixed-point format, with an unspecified number of bits to the right
5702 of the binary point, regardless of the memory data type.
5703 Floating-point values convert to true fixed-point values. Signed
5704 and unsigned integer data is converted with all fraction bits set
5705 to 0. Bitmap data convert to either 0 or 1.
5706
5707 Each fixed-point index is then shifted left by `GL_INDEX_SHIFT'
5708 bits and added to `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is
5709 negative, the shift is to the right. In either case, zero bits fill
5710 otherwise unspecified bit locations in the result.
5711
5712 If the GL is in RGBA mode, the resulting index is converted to an
5713 RGBA pixel with the help of the `GL_PIXEL_MAP_I_TO_R',
5714 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
5715 `GL_PIXEL_MAP_I_TO_A' tables. If the GL is in color index mode, and
5716 if `GL_MAP_COLOR' is true, the index is replaced with the value
5717 that it references in lookup table `GL_PIXEL_MAP_I_TO_I'. Whether
5718 the lookup replacement of the index is done or not, the integer
5719 part of the index is then ANDed with 2^B-1 , where B is the number
5720 of bits in a color index buffer.
5721
5722 The GL then converts the resulting indices or RGBA colors to
5723 fragments by attaching the current raster position Z coordinate and
5724 texture coordinates to each pixel, then assigning X and Y window
5725 coordinates to the N th fragment such that X_N=X_R+N%WIDTH
5726 Y_N=Y_R+⌊N/WIDTH,⌋
5727
5728 where (X_R,Y_R) is the current raster position. These pixel
5729 fragments are then treated just like the fragments generated by
5730 rasterizing points, lines, or polygons. Texture mapping, fog, and
5731 all the fragment operations are applied before the fragments are
5732 written to the frame buffer.
5733
5734 `GL_STENCIL_INDEX'
5735 Each pixel is a single value, a stencil index. It is converted to
5736 fixed-point format, with an unspecified number of bits to the right
5737 of the binary point, regardless of the memory data type.
5738 Floating-point values convert to true fixed-point values. Signed
5739 and unsigned integer data is converted with all fraction bits set
5740 to 0. Bitmap data convert to either 0 or 1.
5741
5742 Each fixed-point index is then shifted left by `GL_INDEX_SHIFT'
5743 bits, and added to `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is
5744 negative, the shift is to the right. In either case, zero bits fill
5745 otherwise unspecified bit locations in the result. If
5746 `GL_MAP_STENCIL' is true, the index is replaced with the value that
5747 it references in lookup table `GL_PIXEL_MAP_S_TO_S'. Whether the
5748 lookup replacement of the index is done or not, the integer part of
5749 the index is then ANDed with 2^B-1 , where B is the number of bits
5750 in the stencil buffer. The resulting stencil indices are then
5751 written to the stencil buffer such that the N th index is written
5752 to location
5753
5754 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
5755
5756 where (X_R,Y_R) is the current raster position. Only the pixel
5757 ownership test, the scissor test, and the stencil writemask affect
5758 these write operations.
5759
5760 `GL_DEPTH_COMPONENT'
5761 Each pixel is a single-depth component. Floating-point data is
5762 converted directly to an internal floating-point format with
5763 unspecified precision. Signed integer data is mapped linearly to
5764 the internal floating-point format such that the most positive
5765 representable integer value maps to 1.0, and the most negative
5766 representable value maps to -1.0 . Unsigned integer data is mapped
5767 similarly: the largest integer value maps to 1.0, and 0 maps to
5768 0.0. The resulting floating-point depth value is then multiplied by
5769 `GL_DEPTH_SCALE' and added to `GL_DEPTH_BIAS'. The result is
5770 clamped to the range [0,1] .
5771
5772 The GL then converts the resulting depth components to fragments by
5773 attaching the current raster position color or color index and
5774 texture coordinates to each pixel, then assigning X and Y window
5775 coordinates to the N th fragment such that
5776
5777 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
5778
5779 where (X_R,Y_R) is the current raster position. These pixel
5780 fragments are then treated just like the fragments generated by
5781 rasterizing points, lines, or polygons. Texture mapping, fog, and
5782 all the fragment operations are applied before the fragments are
5783 written to the frame buffer.
5784
5785 `GL_RGBA'
5786 `GL_BGRA'
5787 Each pixel is a four-component group: For `GL_RGBA', the red
5788 component is first, followed by green, followed by blue, followed
5789 by alpha; for `GL_BGRA' the order is blue, green, red and then
5790 alpha. Floating-point values are converted directly to an internal
5791 floating-point format with unspecified precision. Signed integer
5792 values are mapped linearly to the internal floating-point format
5793 such that the most positive representable integer value maps to
5794 1.0, and the most negative representable value maps to -1.0 . (Note
5795 that this mapping does not convert 0 precisely to 0.0.) Unsigned
5796 integer data is mapped similarly: The largest integer value maps to
5797 1.0, and 0 maps to 0.0. The resulting floating-point color values
5798 are then multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where
5799 C is RED, GREEN, BLUE, and ALPHA for the respective color
5800 components. The results are clamped to the range [0,1] .
5801
5802 If `GL_MAP_COLOR' is true, each color component is scaled by the
5803 size of lookup table `GL_PIXEL_MAP_c_TO_c', then replaced by the
5804 value that it references in that table. C is R, G, B, or A
5805 respectively.
5806
5807 The GL then converts the resulting RGBA colors to fragments by
5808 attaching the current raster position Z coordinate and texture
5809 coordinates to each pixel, then assigning X and Y window
5810 coordinates to the N th fragment such that
5811
5812 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
5813
5814 where (X_R,Y_R) is the current raster position. These pixel
5815 fragments are then treated just like the fragments generated by
5816 rasterizing points, lines, or polygons. Texture mapping, fog, and
5817 all the fragment operations are applied before the fragments are
5818 written to the frame buffer.
5819
5820 `GL_RED'
5821 Each pixel is a single red component. This component is converted
5822 to the internal floating-point format in the same way the red
5823 component of an RGBA pixel is. It is then converted to an RGBA
5824 pixel with green and blue set to 0, and alpha set to 1. After this
5825 conversion, the pixel is treated as if it had been read as an RGBA
5826 pixel.
5827
5828 `GL_GREEN'
5829 Each pixel is a single green component. This component is converted
5830 to the internal floating-point format in the same way the green
5831 component of an RGBA pixel is. It is then converted to an RGBA
5832 pixel with red and blue set to 0, and alpha set to 1. After this
5833 conversion, the pixel is treated as if it had been read as an RGBA
5834 pixel.
5835
5836 `GL_BLUE'
5837 Each pixel is a single blue component. This component is converted
5838 to the internal floating-point format in the same way the blue
5839 component of an RGBA pixel is. It is then converted to an RGBA
5840 pixel with red and green set to 0, and alpha set to 1. After this
5841 conversion, the pixel is treated as if it had been read as an RGBA
5842 pixel.
5843
5844 `GL_ALPHA'
5845 Each pixel is a single alpha component. This component is converted
5846 to the internal floating-point format in the same way the alpha
5847 component of an RGBA pixel is. It is then converted to an RGBA
5848 pixel with red, green, and blue set to 0. After this conversion,
5849 the pixel is treated as if it had been read as an RGBA pixel.
5850
5851 `GL_RGB'
5852 `GL_BGR'
5853 Each pixel is a three-component group: red first, followed by
5854 green, followed by blue; for `GL_BGR', the first component is blue,
5855 followed by green and then red. Each component is converted to the
5856 internal floating-point format in the same way the red, green, and
5857 blue components of an RGBA pixel are. The color triple is converted
5858 to an RGBA pixel with alpha set to 1. After this conversion, the
5859 pixel is treated as if it had been read as an RGBA pixel.
5860
5861 `GL_LUMINANCE'
5862 Each pixel is a single luminance component. This component is
5863 converted to the internal floating-point format in the same way the
5864 red component of an RGBA pixel is. It is then converted to an RGBA
5865 pixel with red, green, and blue set to the converted luminance
5866 value, and alpha set to 1. After this conversion, the pixel is
5867 treated as if it had been read as an RGBA pixel.
5868
5869 `GL_LUMINANCE_ALPHA'
5870 Each pixel is a two-component group: luminance first, followed by
5871 alpha. The two components are converted to the internal
5872 floating-point format in the same way the red component of an RGBA
5873 pixel is. They are then converted to an RGBA pixel with red, green,
5874 and blue set to the converted luminance value, and alpha set to the
5875 converted alpha value. After this conversion, the pixel is treated
5876 as if it had been read as an RGBA pixel.
5877
5878 The following table summarizes the meaning of the valid constants for
5879 the TYPE parameter:
5880
5881
5882
5883 *Type*
5884 *Corresponding Type*
5885
5886 `GL_UNSIGNED_BYTE'
5887 unsigned 8-bit integer
5888
5889 `GL_BYTE'
5890 signed 8-bit integer
5891
5892 `GL_BITMAP'
5893 single bits in unsigned 8-bit integers
5894
5895 `GL_UNSIGNED_SHORT'
5896 unsigned 16-bit integer
5897
5898 `GL_SHORT'
5899 signed 16-bit integer
5900
5901 `GL_UNSIGNED_INT'
5902 unsigned 32-bit integer
5903
5904 `GL_INT'
5905 32-bit integer
5906
5907 `GL_FLOAT'
5908 single-precision floating-point
5909
5910 `GL_UNSIGNED_BYTE_3_3_2'
5911 unsigned 8-bit integer
5912
5913 `GL_UNSIGNED_BYTE_2_3_3_REV'
5914 unsigned 8-bit integer with reversed component ordering
5915
5916 `GL_UNSIGNED_SHORT_5_6_5'
5917 unsigned 16-bit integer
5918
5919 `GL_UNSIGNED_SHORT_5_6_5_REV'
5920 unsigned 16-bit integer with reversed component ordering
5921
5922 `GL_UNSIGNED_SHORT_4_4_4_4'
5923 unsigned 16-bit integer
5924
5925 `GL_UNSIGNED_SHORT_4_4_4_4_REV'
5926 unsigned 16-bit integer with reversed component ordering
5927
5928 `GL_UNSIGNED_SHORT_5_5_5_1'
5929 unsigned 16-bit integer
5930
5931 `GL_UNSIGNED_SHORT_1_5_5_5_REV'
5932 unsigned 16-bit integer with reversed component ordering
5933
5934 `GL_UNSIGNED_INT_8_8_8_8'
5935 unsigned 32-bit integer
5936
5937 `GL_UNSIGNED_INT_8_8_8_8_REV'
5938 unsigned 32-bit integer with reversed component ordering
5939
5940 `GL_UNSIGNED_INT_10_10_10_2'
5941 unsigned 32-bit integer
5942
5943 `GL_UNSIGNED_INT_2_10_10_10_REV'
5944 unsigned 32-bit integer with reversed component ordering
5945
5946
5947
5948 The rasterization described so far assumes pixel zoom factors of 1. If
5949 `glPixelZoom' is used to change the X and Y pixel zoom factors, pixels
5950 are converted to fragments as follows. If (X_R,Y_R) is the current
5951 raster position, and a given pixel is in the N th column and M th row of
5952 the pixel rectangle, then fragments are generated for pixels whose
5953 centers are in the rectangle with corners at
5954
5955 (X_R+ZOOM_X,\u2062N,Y_R+ZOOM_Y,\u2062M) (X_R+ZOOM_X,\u2061(N+1,),Y_R+ZOOM_Y,\u2061(M+1,))
5956
5957 where ZOOM_X is the value of `GL_ZOOM_X' and ZOOM_Y is the value of
5958 `GL_ZOOM_Y'.
5959
5960 `GL_INVALID_ENUM' is generated if FORMAT or TYPE is not one of the
5961 accepted values.
5962
5963 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
5964 either `GL_COLOR_INDEX' or `GL_STENCIL_INDEX'.
5965
5966 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
5967
5968 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_STENCIL_INDEX' and
5969 there is no stencil buffer.
5970
5971 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_RED', `GL_GREEN',
5972 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_RGBA', `GL_BGR', `GL_BGRA',
5973 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA', and the GL is in color index
5974 mode.
5975
5976 `GL_INVALID_OPERATION' is generated if FORMAT is one of
5977 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
5978 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
5979 is not `GL_RGB'.
5980
5981 `GL_INVALID_OPERATION' is generated if FORMAT is one of
5982 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
5983 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
5984 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
5985 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
5986 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
5987
5988 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5989 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
5990 data store is currently mapped.
5991
5992 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5993 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
5994 unpacked from the buffer object such that the memory reads required
5995 would exceed the data store size.
5996
5997 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5998 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
5999 divisible into the number of bytes needed to store in memory a datum
6000 indicated by TYPE.
6001
6002 `GL_INVALID_OPERATION' is generated if `glDrawPixels' is executed
6003 between the execution of `glBegin' and the corresponding execution of
6004 `glEnd'.")
6005
6006 (define-gl-procedures
6007 ((glDrawRangeElements
6008 (mode GLenum)
6009 (start GLuint)
6010 (end GLuint)
6011 (count GLsizei)
6012 (type GLenum)
6013 (indices const-GLvoid-*)
6014 ->
6015 void))
6016 "Render primitives from array data.
6017
6018 MODE
6019 Specifies what kind of primitives to render. Symbolic constants
6020 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
6021 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
6022 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
6023
6024 START
6025 Specifies the minimum array index contained in INDICES.
6026
6027 END
6028 Specifies the maximum array index contained in INDICES.
6029
6030 COUNT
6031 Specifies the number of elements to be rendered.
6032
6033 TYPE
6034 Specifies the type of the values in INDICES. Must be one of
6035 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
6036
6037 INDICES
6038 Specifies a pointer to the location where the indices are stored.
6039
6040 `glDrawRangeElements' is a restricted form of `glDrawElements'. MODE,
6041 START, END, and COUNT match the corresponding arguments to
6042 `glDrawElements', with the additional constraint that all values in the
6043 arrays COUNT must lie between START and END, inclusive.
6044
6045 Implementations denote recommended maximum amounts of vertex and index
6046 data, which may be queried by calling `glGet' with argument
6047 `GL_MAX_ELEMENTS_VERTICES' and `GL_MAX_ELEMENTS_INDICES'. If END-START+1
6048 is greater than the value of `GL_MAX_ELEMENTS_VERTICES', or if COUNT is
6049 greater than the value of `GL_MAX_ELEMENTS_INDICES', then the call may
6050 operate at reduced performance. There is no requirement that all
6051 vertices in the range [START,END] be referenced. However, the
6052 implementation may partially process unused vertices, reducing
6053 performance from what could be achieved with an optimal index set.
6054
6055 When `glDrawRangeElements' is called, it uses COUNT sequential elements
6056 from an enabled array, starting at START to construct a sequence of
6057 geometric primitives. MODE specifies what kind of primitives are
6058 constructed, and how the array elements construct these primitives. If
6059 more than one array is enabled, each is used. If `GL_VERTEX_ARRAY' is
6060 not enabled, no geometric primitives are constructed.
6061
6062 Vertex attributes that are modified by `glDrawRangeElements' have an
6063 unspecified value after `glDrawRangeElements' returns. For example, if
6064 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
6065 after `glDrawRangeElements' executes. Attributes that aren't modified
6066 maintain their previous values.
6067
6068 It is an error for indices to lie outside the range [START,END] , but
6069 implementations may not check for this situation. Such indices cause
6070 implementation-dependent behavior.
6071
6072 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
6073
6074 `GL_INVALID_VALUE' is generated if COUNT is negative.
6075
6076 `GL_INVALID_VALUE' is generated if END<START .
6077
6078 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6079 bound to an enabled array or the element array and the buffer object's
6080 data store is currently mapped.
6081
6082 `GL_INVALID_OPERATION' is generated if `glDrawRangeElements' is executed
6083 between the execution of `glBegin' and the corresponding `glEnd'.")
6084
6085 (define-gl-procedures
6086 ((glEdgeFlagPointer
6087 (stride GLsizei)
6088 (pointer const-GLvoid-*)
6089 ->
6090 void))
6091 "Define an array of edge flags.
6092
6093 STRIDE
6094 Specifies the byte offset between consecutive edge flags. If STRIDE
6095 is 0, the edge flags are understood to be tightly packed in the
6096 array. The initial value is 0.
6097
6098 POINTER
6099 Specifies a pointer to the first edge flag in the array. The
6100 initial value is 0.
6101
6102 `glEdgeFlagPointer' specifies the location and data format of an array
6103 of boolean edge flags to use when rendering. STRIDE specifies the byte
6104 stride from one edge flag to the next, allowing vertices and attributes
6105 to be packed into a single array or stored in separate arrays.
6106
6107 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
6108 target (see `glBindBuffer') while an edge flag array is specified,
6109 POINTER is treated as a byte offset into the buffer object's data store.
6110 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
6111 edge flag vertex array client-side state
6112 (`GL_EDGE_FLAG_ARRAY_BUFFER_BINDING').
6113
6114 When an edge flag array is specified, STRIDE and POINTER are saved as
6115 client-side state, in addition to the current vertex array buffer object
6116 binding.
6117
6118 To enable and disable the edge flag array, call `glEnableClientState'
6119 and `glDisableClientState' with the argument `GL_EDGE_FLAG_ARRAY'. If
6120 enabled, the edge flag array is used when `glDrawArrays',
6121 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements',
6122 `glDrawRangeElements', or `glArrayElement' is called.
6123
6124 `GL_INVALID_ENUM' is generated if STRIDE is negative.")
6125
6126 (define-gl-procedures
6127 ((glEdgeFlag (flag GLboolean) -> void))
6128 "Flag edges as either boundary or nonboundary.
6129
6130 FLAG
6131 Specifies the current edge flag value, either `GL_TRUE' or
6132 `GL_FALSE'. The initial value is `GL_TRUE'.
6133
6134 Each vertex of a polygon, separate triangle, or separate quadrilateral
6135 specified between a `glBegin'/`glEnd' pair is marked as the start of
6136 either a boundary or nonboundary edge. If the current edge flag is true
6137 when the vertex is specified, the vertex is marked as the start of a
6138 boundary edge. Otherwise, the vertex is marked as the start of a
6139 nonboundary edge. `glEdgeFlag' sets the edge flag bit to `GL_TRUE' if
6140 FLAG is `GL_TRUE' and to `GL_FALSE' otherwise.
6141
6142 The vertices of connected triangles and connected quadrilaterals are
6143 always marked as boundary, regardless of the value of the edge flag.
6144
6145 Boundary and nonboundary edge flags on vertices are significant only if
6146 `GL_POLYGON_MODE' is set to `GL_POINT' or `GL_LINE'. See
6147 `glPolygonMode'.")
6148
6149 (define-gl-procedures
6150 ((glEnableClientState (cap GLenum) -> void)
6151 (glDisableClientState (cap GLenum) -> void))
6152 "Enable or disable client-side capability.
6153
6154 CAP
6155 Specifies the capability to enable. Symbolic constants
6156 `GL_COLOR_ARRAY', `GL_EDGE_FLAG_ARRAY', `GL_FOG_COORD_ARRAY',
6157 `GL_INDEX_ARRAY', `GL_NORMAL_ARRAY', `GL_SECONDARY_COLOR_ARRAY',
6158 `GL_TEXTURE_COORD_ARRAY', and `GL_VERTEX_ARRAY' are accepted.
6159
6160 `glEnableClientState' and `glDisableClientState' enable or disable
6161 individual client-side capabilities. By default, all client-side
6162 capabilities are disabled. Both `glEnableClientState' and
6163 `glDisableClientState' take a single argument, CAP, which can assume one
6164 of the following values:
6165
6166 `GL_COLOR_ARRAY'
6167 If enabled, the color array is enabled for writing and used during
6168 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6169 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6170 is called. See `glColorPointer'.
6171
6172 `GL_EDGE_FLAG_ARRAY'
6173 If enabled, the edge flag array is enabled for writing and used
6174 during rendering when `glArrayElement', `glDrawArrays',
6175 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6176 `glMultiDrawElements' is called. See `glEdgeFlagPointer'.
6177
6178 `GL_FOG_COORD_ARRAY'
6179 If enabled, the fog coordinate array is enabled for writing and
6180 used during rendering when `glArrayElement', `glDrawArrays',
6181 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6182 `glMultiDrawElements' is called. See `glFogCoordPointer'.
6183
6184 `GL_INDEX_ARRAY'
6185 If enabled, the index array is enabled for writing and used during
6186 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6187 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6188 is called. See `glIndexPointer'.
6189
6190 `GL_NORMAL_ARRAY'
6191 If enabled, the normal array is enabled for writing and used during
6192 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6193 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6194 is called. See `glNormalPointer'.
6195
6196 `GL_SECONDARY_COLOR_ARRAY'
6197 If enabled, the secondary color array is enabled for writing and
6198 used during rendering when `glArrayElement', `glDrawArrays',
6199 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6200 `glMultiDrawElements' is called. See `glColorPointer'.
6201
6202 `GL_TEXTURE_COORD_ARRAY'
6203 If enabled, the texture coordinate array is enabled for writing and
6204 used during rendering when `glArrayElement', `glDrawArrays',
6205 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6206 `glMultiDrawElements' is called. See `glTexCoordPointer'.
6207
6208 `GL_VERTEX_ARRAY'
6209 If enabled, the vertex array is enabled for writing and used during
6210 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6211 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6212 is called. See `glVertexPointer'.
6213
6214 `GL_INVALID_ENUM' is generated if CAP is not an accepted value.
6215
6216 `glEnableClientState' is not allowed between the execution of `glBegin'
6217 and the corresponding `glEnd', but an error may or may not be generated.
6218 If no error is generated, the behavior is undefined.")
6219
6220 (define-gl-procedures
6221 ((glEnableVertexAttribArray
6222 (index GLuint)
6223 ->
6224 void)
6225 (glDisableVertexAttribArray
6226 (index GLuint)
6227 ->
6228 void))
6229 "Enable or disable a generic vertex attribute array.
6230
6231 INDEX
6232 Specifies the index of the generic vertex attribute to be enabled
6233 or disabled.
6234
6235 `glEnableVertexAttribArray' enables the generic vertex attribute array
6236 specified by INDEX. `glDisableVertexAttribArray' disables the generic
6237 vertex attribute array specified by INDEX. By default, all client-side
6238 capabilities are disabled, including all generic vertex attribute
6239 arrays. If enabled, the values in the generic vertex attribute array
6240 will be accessed and used for rendering when calls are made to vertex
6241 array commands such as `glDrawArrays', `glDrawElements',
6242 `glDrawRangeElements', `glArrayElement', `glMultiDrawElements', or
6243 `glMultiDrawArrays'.
6244
6245 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
6246 `GL_MAX_VERTEX_ATTRIBS'.
6247
6248 `GL_INVALID_OPERATION' is generated if either `glEnableVertexAttribArray
6249 ' or `glDisableVertexAttribArray ' is executed between the execution of
6250 `glBegin' and the corresponding execution of `glEnd'.")
6251
6252 (define-gl-procedures
6253 ((glEnable (cap GLenum) -> void)
6254 (glDisable (cap GLenum) -> void))
6255 "Enable or disable server-side GL capabilities.
6256
6257 CAP
6258 Specifies a symbolic constant indicating a GL capability.
6259
6260 `glEnable' and `glDisable' enable and disable various capabilities. Use
6261 `glIsEnabled' or `glGet' to determine the current setting of any
6262 capability. The initial value for each capability with the exception of
6263 `GL_DITHER' and `GL_MULTISAMPLE' is `GL_FALSE'. The initial value for
6264 `GL_DITHER' and `GL_MULTISAMPLE' is `GL_TRUE'.
6265
6266 Both `glEnable' and `glDisable' take a single argument, CAP, which can
6267 assume one of the following values:
6268
6269 `GL_ALPHA_TEST'
6270
6271
6272 If enabled, do alpha testing. See `glAlphaFunc'.
6273
6274 `GL_AUTO_NORMAL'
6275
6276
6277 If enabled, generate normal vectors when either `GL_MAP2_VERTEX_3'
6278 or `GL_MAP2_VERTEX_4' is used to generate vertices. See `glMap2'.
6279
6280 `GL_BLEND'
6281
6282
6283 If enabled, blend the computed fragment color values with the
6284 values in the color buffers. See `glBlendFunc'.
6285
6286 `GL_CLIP_PLANE'I
6287
6288
6289 If enabled, clip geometry against user-defined clipping plane I.
6290 See `glClipPlane'.
6291
6292 `GL_COLOR_LOGIC_OP'
6293
6294
6295 If enabled, apply the currently selected logical operation to the
6296 computed fragment color and color buffer values. See `glLogicOp'.
6297
6298 `GL_COLOR_MATERIAL'
6299
6300
6301 If enabled, have one or more material parameters track the current
6302 color. See `glColorMaterial'.
6303
6304 `GL_COLOR_SUM'
6305
6306
6307 If enabled and no fragment shader is active, add the secondary
6308 color value to the computed fragment color. See `glSecondaryColor'.
6309
6310 `GL_COLOR_TABLE'
6311
6312
6313 If enabled, perform a color table lookup on the incoming RGBA color
6314 values. See `glColorTable'.
6315
6316 `GL_CONVOLUTION_1D'
6317
6318
6319 If enabled, perform a 1D convolution operation on incoming RGBA
6320 color values. See `glConvolutionFilter1D'.
6321
6322 `GL_CONVOLUTION_2D'
6323
6324
6325 If enabled, perform a 2D convolution operation on incoming RGBA
6326 color values. See `glConvolutionFilter2D'.
6327
6328 `GL_CULL_FACE'
6329
6330
6331 If enabled, cull polygons based on their winding in window
6332 coordinates. See `glCullFace'.
6333
6334 `GL_DEPTH_TEST'
6335
6336
6337 If enabled, do depth comparisons and update the depth buffer. Note
6338 that even if the depth buffer exists and the depth mask is
6339 non-zero, the depth buffer is not updated if the depth test is
6340 disabled. See `glDepthFunc' and `glDepthRange'.
6341
6342 `GL_DITHER'
6343
6344
6345 If enabled, dither color components or indices before they are
6346 written to the color buffer.
6347
6348 `GL_FOG'
6349
6350
6351 If enabled and no fragment shader is active, blend a fog color into
6352 the post-texturing color. See `glFog'.
6353
6354 `GL_HISTOGRAM'
6355
6356
6357 If enabled, histogram incoming RGBA color values. See
6358 `glHistogram'.
6359
6360 `GL_INDEX_LOGIC_OP'
6361
6362
6363 If enabled, apply the currently selected logical operation to the
6364 incoming index and color buffer indices. See `glLogicOp'.
6365
6366 `GL_LIGHT'I
6367
6368
6369 If enabled, include light I in the evaluation of the lighting
6370 equation. See `glLightModel' and `glLight'.
6371
6372 `GL_LIGHTING'
6373
6374
6375 If enabled and no vertex shader is active, use the current lighting
6376 parameters to compute the vertex color or index. Otherwise, simply
6377 associate the current color or index with each vertex. See
6378 `glMaterial', `glLightModel', and `glLight'.
6379
6380 `GL_LINE_SMOOTH'
6381
6382
6383 If enabled, draw lines with correct filtering. Otherwise, draw
6384 aliased lines. See `glLineWidth'.
6385
6386 `GL_LINE_STIPPLE'
6387
6388
6389 If enabled, use the current line stipple pattern when drawing
6390 lines. See `glLineStipple'.
6391
6392 `GL_MAP1_COLOR_4'
6393
6394
6395 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6396 `glEvalPoint1' generate RGBA values. See `glMap1'.
6397
6398 `GL_MAP1_INDEX'
6399
6400
6401 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6402 `glEvalPoint1' generate color indices. See `glMap1'.
6403
6404 `GL_MAP1_NORMAL'
6405
6406
6407 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6408 `glEvalPoint1' generate normals. See `glMap1'.
6409
6410 `GL_MAP1_TEXTURE_COORD_1'
6411
6412
6413 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6414 `glEvalPoint1' generate S texture coordinates. See `glMap1'.
6415
6416 `GL_MAP1_TEXTURE_COORD_2'
6417
6418
6419 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6420 `glEvalPoint1' generate S and T texture coordinates. See `glMap1'.
6421
6422 `GL_MAP1_TEXTURE_COORD_3'
6423
6424
6425 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6426 `glEvalPoint1' generate S, T, and R texture coordinates. See
6427 `glMap1'.
6428
6429 `GL_MAP1_TEXTURE_COORD_4'
6430
6431
6432 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6433 `glEvalPoint1' generate S, T, R, and Q texture coordinates. See
6434 `glMap1'.
6435
6436 `GL_MAP1_VERTEX_3'
6437
6438
6439 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6440 `glEvalPoint1' generate X, Y, and Z vertex coordinates. See
6441 `glMap1'.
6442
6443 `GL_MAP1_VERTEX_4'
6444
6445
6446 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6447 `glEvalPoint1' generate homogeneous X, Y, Z, and W vertex
6448 coordinates. See `glMap1'.
6449
6450 `GL_MAP2_COLOR_4'
6451
6452
6453 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6454 `glEvalPoint2' generate RGBA values. See `glMap2'.
6455
6456 `GL_MAP2_INDEX'
6457
6458
6459 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6460 `glEvalPoint2' generate color indices. See `glMap2'.
6461
6462 `GL_MAP2_NORMAL'
6463
6464
6465 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6466 `glEvalPoint2' generate normals. See `glMap2'.
6467
6468 `GL_MAP2_TEXTURE_COORD_1'
6469
6470
6471 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6472 `glEvalPoint2' generate S texture coordinates. See `glMap2'.
6473
6474 `GL_MAP2_TEXTURE_COORD_2'
6475
6476
6477 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6478 `glEvalPoint2' generate S and T texture coordinates. See `glMap2'.
6479
6480 `GL_MAP2_TEXTURE_COORD_3'
6481
6482
6483 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6484 `glEvalPoint2' generate S, T, and R texture coordinates. See
6485 `glMap2'.
6486
6487 `GL_MAP2_TEXTURE_COORD_4'
6488
6489
6490 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6491 `glEvalPoint2' generate S, T, R, and Q texture coordinates. See
6492 `glMap2'.
6493
6494 `GL_MAP2_VERTEX_3'
6495
6496
6497 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6498 `glEvalPoint2' generate X, Y, and Z vertex coordinates. See
6499 `glMap2'.
6500
6501 `GL_MAP2_VERTEX_4'
6502
6503
6504 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6505 `glEvalPoint2' generate homogeneous X, Y, Z, and W vertex
6506 coordinates. See `glMap2'.
6507
6508 `GL_MINMAX'
6509
6510
6511 If enabled, compute the minimum and maximum values of incoming RGBA
6512 color values. See `glMinmax'.
6513
6514 `GL_MULTISAMPLE'
6515
6516
6517 If enabled, use multiple fragment samples in computing the final
6518 color of a pixel. See `glSampleCoverage'.
6519
6520 `GL_NORMALIZE'
6521
6522
6523 If enabled and no vertex shader is active, normal vectors are
6524 normalized to unit length after transformation and before lighting.
6525 This method is generally less efficient than `GL_RESCALE_NORMAL'.
6526 See `glNormal' and `glNormalPointer'.
6527
6528 `GL_POINT_SMOOTH'
6529
6530
6531 If enabled, draw points with proper filtering. Otherwise, draw
6532 aliased points. See `glPointSize'.
6533
6534 `GL_POINT_SPRITE'
6535
6536
6537 If enabled, calculate texture coordinates for points based on
6538 texture environment and point parameter settings. Otherwise texture
6539 coordinates are constant across points.
6540
6541 `GL_POLYGON_OFFSET_FILL'
6542
6543
6544 If enabled, and if the polygon is rendered in `GL_FILL' mode, an
6545 offset is added to depth values of a polygon's fragments before the
6546 depth comparison is performed. See `glPolygonOffset'.
6547
6548 `GL_POLYGON_OFFSET_LINE'
6549
6550
6551 If enabled, and if the polygon is rendered in `GL_LINE' mode, an
6552 offset is added to depth values of a polygon's fragments before the
6553 depth comparison is performed. See `glPolygonOffset'.
6554
6555 `GL_POLYGON_OFFSET_POINT'
6556
6557
6558 If enabled, an offset is added to depth values of a polygon's
6559 fragments before the depth comparison is performed, if the polygon
6560 is rendered in `GL_POINT' mode. See `glPolygonOffset'.
6561
6562 `GL_POLYGON_SMOOTH'
6563
6564
6565 If enabled, draw polygons with proper filtering. Otherwise, draw
6566 aliased polygons. For correct antialiased polygons, an alpha buffer
6567 is needed and the polygons must be sorted front to back.
6568
6569 `GL_POLYGON_STIPPLE'
6570
6571
6572 If enabled, use the current polygon stipple pattern when rendering
6573 polygons. See `glPolygonStipple'.
6574
6575 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
6576
6577
6578 If enabled, perform a color table lookup on RGBA color values after
6579 color matrix transformation. See `glColorTable'.
6580
6581 `GL_POST_CONVOLUTION_COLOR_TABLE'
6582
6583
6584 If enabled, perform a color table lookup on RGBA color values after
6585 convolution. See `glColorTable'.
6586
6587 `GL_RESCALE_NORMAL'
6588
6589
6590 If enabled and no vertex shader is active, normal vectors are
6591 scaled after transformation and before lighting by a factor
6592 computed from the modelview matrix. If the modelview matrix scales
6593 space uniformly, this has the effect of restoring the transformed
6594 normal to unit length. This method is generally more efficient than
6595 `GL_NORMALIZE'. See `glNormal' and `glNormalPointer'.
6596
6597 `GL_SAMPLE_ALPHA_TO_COVERAGE'
6598
6599
6600 If enabled, compute a temporary coverage value where each bit is
6601 determined by the alpha value at the corresponding sample location.
6602 The temporary coverage value is then ANDed with the fragment
6603 coverage value.
6604
6605 `GL_SAMPLE_ALPHA_TO_ONE'
6606
6607
6608 If enabled, each sample alpha value is replaced by the maximum
6609 representable alpha value.
6610
6611 `GL_SAMPLE_COVERAGE'
6612
6613
6614 If enabled, the fragment's coverage is ANDed with the temporary
6615 coverage value. If `GL_SAMPLE_COVERAGE_INVERT' is set to `GL_TRUE',
6616 invert the coverage value. See `glSampleCoverage'.
6617
6618 `GL_SEPARABLE_2D'
6619
6620
6621 If enabled, perform a two-dimensional convolution operation using a
6622 separable convolution filter on incoming RGBA color values. See
6623 `glSeparableFilter2D'.
6624
6625 `GL_SCISSOR_TEST'
6626
6627
6628 If enabled, discard fragments that are outside the scissor
6629 rectangle. See `glScissor'.
6630
6631 `GL_STENCIL_TEST'
6632
6633
6634 If enabled, do stencil testing and update the stencil buffer. See
6635 `glStencilFunc' and `glStencilOp'.
6636
6637 `GL_TEXTURE_1D'
6638
6639
6640 If enabled and no fragment shader is active, one-dimensional
6641 texturing is performed (unless two- or three-dimensional or
6642 cube-mapped texturing is also enabled). See `glTexImage1D'.
6643
6644 `GL_TEXTURE_2D'
6645
6646
6647 If enabled and no fragment shader is active, two-dimensional
6648 texturing is performed (unless three-dimensional or cube-mapped
6649 texturing is also enabled). See `glTexImage2D'.
6650
6651 `GL_TEXTURE_3D'
6652
6653
6654 If enabled and no fragment shader is active, three-dimensional
6655 texturing is performed (unless cube-mapped texturing is also
6656 enabled). See `glTexImage3D'.
6657
6658 `GL_TEXTURE_CUBE_MAP'
6659
6660
6661 If enabled and no fragment shader is active, cube-mapped texturing
6662 is performed. See `glTexImage2D'.
6663
6664 `GL_TEXTURE_GEN_Q'
6665
6666
6667 If enabled and no vertex shader is active, the Q texture coordinate
6668 is computed using the texture generation function defined with
6669 `glTexGen'. Otherwise, the current Q texture coordinate is used.
6670 See `glTexGen'.
6671
6672 `GL_TEXTURE_GEN_R'
6673
6674
6675 If enabled and no vertex shader is active, the R texture coordinate
6676 is computed using the texture generation function defined with
6677 `glTexGen'. Otherwise, the current R texture coordinate is used.
6678 See `glTexGen'.
6679
6680 `GL_TEXTURE_GEN_S'
6681
6682
6683 If enabled and no vertex shader is active, the S texture coordinate
6684 is computed using the texture generation function defined with
6685 `glTexGen'. Otherwise, the current S texture coordinate is used.
6686 See `glTexGen'.
6687
6688 `GL_TEXTURE_GEN_T'
6689
6690
6691 If enabled and no vertex shader is active, the T texture coordinate
6692 is computed using the texture generation function defined with
6693 `glTexGen'. Otherwise, the current T texture coordinate is used.
6694 See `glTexGen'.
6695
6696 `GL_VERTEX_PROGRAM_POINT_SIZE'
6697
6698
6699 If enabled and a vertex shader is active, then the derived point
6700 size is taken from the (potentially clipped) shader builtin
6701 `gl_PointSize' and clamped to the implementation-dependent point
6702 size range.
6703
6704 `GL_VERTEX_PROGRAM_TWO_SIDE'
6705
6706
6707 If enabled and a vertex shader is active, it specifies that the GL
6708 will choose between front and back colors based on the polygon's
6709 face direction of which the vertex being shaded is a part. It has
6710 no effect on points or lines.
6711
6712 `GL_INVALID_ENUM' is generated if CAP is not one of the values listed
6713 previously.
6714
6715 `GL_INVALID_OPERATION' is generated if `glEnable' or `glDisable' is
6716 executed between the execution of `glBegin' and the corresponding
6717 execution of `glEnd'.")
6718
6719 (define-gl-procedures
6720 ((glEvalCoord1f (u GLfloat) -> void)
6721 (glEvalCoord2f (u GLfloat) (v GLfloat) -> void))
6722 "Evaluate enabled one- and two-dimensional maps.
6723
6724 U
6725 Specifies a value that is the domain coordinate U to the basis
6726 function defined in a previous `glMap1' or `glMap2' command.
6727
6728 V
6729 Specifies a value that is the domain coordinate V to the basis
6730 function defined in a previous `glMap2' command. This argument is
6731 not present in a `glEvalCoord1' command.
6732
6733 `glEvalCoord1' evaluates enabled one-dimensional maps at argument U.
6734 `glEvalCoord2' does the same for two-dimensional maps using two domain
6735 values, U and V. To define a map, call `glMap1' and `glMap2'; to enable
6736 and disable it, call `glEnable' and `glDisable'.
6737
6738 When one of the `glEvalCoord' commands is issued, all currently enabled
6739 maps of the indicated dimension are evaluated. Then, for each enabled
6740 map, it is as if the corresponding GL command had been issued with the
6741 computed value. That is, if `GL_MAP1_INDEX' or `GL_MAP2_INDEX' is
6742 enabled, a `glIndex' command is simulated. If `GL_MAP1_COLOR_4' or
6743 `GL_MAP2_COLOR_4' is enabled, a `glColor' command is simulated. If
6744 `GL_MAP1_NORMAL' or `GL_MAP2_NORMAL' is enabled, a normal vector is
6745 produced, and if any of `GL_MAP1_TEXTURE_COORD_1',
6746 `GL_MAP1_TEXTURE_COORD_2', `GL_MAP1_TEXTURE_COORD_3',
6747 `GL_MAP1_TEXTURE_COORD_4', `GL_MAP2_TEXTURE_COORD_1',
6748 `GL_MAP2_TEXTURE_COORD_2', `GL_MAP2_TEXTURE_COORD_3', or
6749 `GL_MAP2_TEXTURE_COORD_4' is enabled, then an appropriate `glTexCoord'
6750 command is simulated.
6751
6752 For color, color index, normal, and texture coordinates the GL uses
6753 evaluated values instead of current values for those evaluations that
6754 are enabled, and current values otherwise, However, the evaluated values
6755 do not update the current values. Thus, if `glVertex' commands are
6756 interspersed with `glEvalCoord' commands, the color, normal, and texture
6757 coordinates associated with the `glVertex' commands are not affected by
6758 the values generated by the `glEvalCoord' commands, but only by the most
6759 recent `glColor', `glIndex', `glNormal', and `glTexCoord' commands.
6760
6761 No commands are issued for maps that are not enabled. If more than one
6762 texture evaluation is enabled for a particular dimension (for example,
6763 `GL_MAP2_TEXTURE_COORD_1' and `GL_MAP2_TEXTURE_COORD_2'), then only the
6764 evaluation of the map that produces the larger number of coordinates (in
6765 this case, `GL_MAP2_TEXTURE_COORD_2') is carried out. `GL_MAP1_VERTEX_4'
6766 overrides `GL_MAP1_VERTEX_3', and `GL_MAP2_VERTEX_4' overrides
6767 `GL_MAP2_VERTEX_3', in the same manner. If neither a three- nor a
6768 four-component vertex map is enabled for the specified dimension, the
6769 `glEvalCoord' command is ignored.
6770
6771 If you have enabled automatic normal generation, by calling `glEnable'
6772 with argument `GL_AUTO_NORMAL', `glEvalCoord2' generates surface normals
6773 analytically, regardless of the contents or enabling of the
6774 `GL_MAP2_NORMAL' map. Let
6775
6776 `m'=∂`p',/∂U,,×∂`p',/∂V,,
6777
6778 Then the generated normal `n' is `n'=`m'/∥`m',∥,
6779
6780 If automatic normal generation is disabled, the corresponding normal map
6781 `GL_MAP2_NORMAL', if enabled, is used to produce a normal. If neither
6782 automatic normal generation nor a normal map is enabled, no normal is
6783 generated for `glEvalCoord2' commands.")
6784
6785 (define-gl-procedures
6786 ((glEvalMesh1
6787 (mode GLenum)
6788 (i1 GLint)
6789 (i2 GLint)
6790 ->
6791 void)
6792 (glEvalMesh2
6793 (mode GLenum)
6794 (i1 GLint)
6795 (i2 GLint)
6796 (j1 GLint)
6797 (j2 GLint)
6798 ->
6799 void))
6800 "Compute a one- or two-dimensional grid of points or lines.
6801
6802 MODE
6803 In `glEvalMesh1', specifies whether to compute a one-dimensional
6804 mesh of points or lines. Symbolic constants `GL_POINT' and
6805 `GL_LINE' are accepted.
6806
6807 I1
6808 I2
6809
6810 Specify the first and last integer values for grid domain variable
6811 I .
6812
6813 `glMapGrid' and `glEvalMesh' are used in tandem to efficiently generate
6814 and evaluate a series of evenly-spaced map domain values. `glEvalMesh'
6815 steps through the integer domain of a one- or two-dimensional grid,
6816 whose range is the domain of the evaluation maps specified by `glMap1'
6817 and `glMap2'. MODE determines whether the resulting vertices are
6818 connected as points, lines, or filled polygons.
6819
6820 In the one-dimensional case, `glEvalMesh1', the mesh is generated as if
6821 the following code fragment were executed:
6822
6823 where
6824
6825
6826 glBegin( TYPE );
6827 for ( i = I1; i <= I2; i += 1 )
6828 glEvalCoord1( i·ΔU+U_1
6829
6830 );
6831 glEnd();
6832
6833 ΔU=(U_2-U_1,)/N
6834
6835 and N , U_1 , and U_2 are the arguments to the most recent `glMapGrid1'
6836 command. TYPE is `GL_POINTS' if MODE is `GL_POINT', or `GL_LINES' if
6837 MODE is `GL_LINE'.
6838
6839 The one absolute numeric requirement is that if I=N , then the value
6840 computed from I·ΔU+U_1 is exactly U_2 .
6841
6842 In the two-dimensional case, `glEvalMesh2', let .cp ΔU=(U_2-U_1,)/N
6843
6844 ΔV=(V_2-V_1,)/M
6845
6846 where N , U_1 , U_2 , M , V_1 , and V_2 are the arguments to the most
6847 recent `glMapGrid2' command. Then, if MODE is `GL_FILL', the
6848 `glEvalMesh2' command is equivalent to:
6849
6850
6851
6852
6853 for ( j = J1; j < J2; j += 1 ) {
6854 glBegin( GL_QUAD_STRIP );
6855 for ( i = I1; i <= I2; i += 1 ) {
6856 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
6857
6858 );
6859 glEvalCoord2( i·ΔU+U_1,(j+1,)·ΔV+V_1
6860
6861 );
6862 }
6863 glEnd();
6864 }
6865
6866 If MODE is `GL_LINE', then a call to `glEvalMesh2' is equivalent to:
6867
6868
6869
6870
6871 for ( j = J1; j <= J2; j += 1 ) {
6872 glBegin( GL_LINE_STRIP );
6873 for ( i = I1; i <= I2; i += 1 )
6874 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
6875
6876 );
6877 glEnd();
6878 }
6879
6880 for ( i = I1; i <= I2; i += 1 ) {
6881 glBegin( GL_LINE_STRIP );
6882 for ( j = J1; j <= J1; j += 1 )
6883 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
6884
6885 );
6886 glEnd();
6887 }
6888
6889 And finally, if MODE is `GL_POINT', then a call to `glEvalMesh2' is
6890 equivalent to:
6891
6892
6893
6894
6895 glBegin( GL_POINTS );
6896 for ( j = J1; j <= J2; j += 1 )
6897 for ( i = I1; i <= I2; i += 1 )
6898 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
6899
6900 );
6901 glEnd();
6902
6903 In all three cases, the only absolute numeric requirements are that if
6904 I=N , then the value computed from I·ΔU+U_1 is exactly U_2 , and if J=M
6905 , then the value computed from J·ΔV+V_1 is exactly V_2 .
6906
6907 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
6908
6909 `GL_INVALID_OPERATION' is generated if `glEvalMesh' is executed between
6910 the execution of `glBegin' and the corresponding execution of `glEnd'.")
6911
6912 (define-gl-procedures
6913 ((glEvalPoint1 (i GLint) -> void)
6914 (glEvalPoint2 (i GLint) (j GLint) -> void))
6915 "Generate and evaluate a single point in a mesh.
6916
6917 I
6918 Specifies the integer value for grid domain variable I .
6919
6920 J
6921 Specifies the integer value for grid domain variable J
6922 (`glEvalPoint2' only).
6923
6924 `glMapGrid' and `glEvalMesh' are used in tandem to efficiently generate
6925 and evaluate a series of evenly spaced map domain values. `glEvalPoint'
6926 can be used to evaluate a single grid point in the same gridspace that
6927 is traversed by `glEvalMesh'. Calling `glEvalPoint1' is equivalent to
6928 calling where ΔU=(U_2-U_1,)/N
6929
6930
6931 glEvalCoord1( i·ΔU+U_1
6932
6933 );
6934
6935 and N , U_1 , and U_2 are the arguments to the most recent `glMapGrid1'
6936 command. The one absolute numeric requirement is that if I=N , then the
6937 value computed from I·ΔU+U_1 is exactly U_2 .
6938
6939 In the two-dimensional case, `glEvalPoint2', let
6940
6941 ΔU=(U_2-U_1,)/N ΔV=(V_2-V_1,)/M
6942
6943 where N , U_1 , U_2 , M , V_1 , and V_2 are the arguments to the most
6944 recent `glMapGrid2' command. Then the `glEvalPoint2' command is
6945 equivalent to calling The only absolute numeric requirements are that if
6946 I=N , then the value computed from I·ΔU+U_1 is exactly U_2 , and if J=M
6947 , then the value computed from J·ΔV+V_1 is exactly V_2 .
6948
6949
6950 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
6951
6952 );")
6953
6954 (define-gl-procedures
6955 ((glFeedbackBuffer
6956 (size GLsizei)
6957 (type GLenum)
6958 (buffer GLfloat-*)
6959 ->
6960 void))
6961 "Controls feedback mode.
6962
6963 SIZE
6964 Specifies the maximum number of values that can be written into
6965 BUFFER.
6966
6967 TYPE
6968 Specifies a symbolic constant that describes the information that
6969 will be returned for each vertex. `GL_2D', `GL_3D', `GL_3D_COLOR',
6970 `GL_3D_COLOR_TEXTURE', and `GL_4D_COLOR_TEXTURE' are accepted.
6971
6972 BUFFER
6973 Returns the feedback data.
6974
6975 The `glFeedbackBuffer' function controls feedback. Feedback, like
6976 selection, is a GL mode. The mode is selected by calling `glRenderMode'
6977 with `GL_FEEDBACK'. When the GL is in feedback mode, no pixels are
6978 produced by rasterization. Instead, information about primitives that
6979 would have been rasterized is fed back to the application using the GL.
6980
6981 `glFeedbackBuffer' has three arguments: BUFFER is a pointer to an array
6982 of floating-point values into which feedback information is placed. SIZE
6983 indicates the size of the array. TYPE is a symbolic constant describing
6984 the information that is fed back for each vertex. `glFeedbackBuffer'
6985 must be issued before feedback mode is enabled (by calling
6986 `glRenderMode' with argument `GL_FEEDBACK'). Setting `GL_FEEDBACK'
6987 without establishing the feedback buffer, or calling `glFeedbackBuffer'
6988 while the GL is in feedback mode, is an error.
6989
6990 When `glRenderMode' is called while in feedback mode, it returns the
6991 number of entries placed in the feedback array and resets the feedback
6992 array pointer to the base of the feedback buffer. The returned value
6993 never exceeds SIZE. If the feedback data required more room than was
6994 available in BUFFER, `glRenderMode' returns a negative value. To take
6995 the GL out of feedback mode, call `glRenderMode' with a parameter value
6996 other than `GL_FEEDBACK'.
6997
6998 While in feedback mode, each primitive, bitmap, or pixel rectangle that
6999 would be rasterized generates a block of values that are copied into the
7000 feedback array. If doing so would cause the number of entries to exceed
7001 the maximum, the block is partially written so as to fill the array (if
7002 there is any room left at all), and an overflow flag is set. Each block
7003 begins with a code indicating the primitive type, followed by values
7004 that describe the primitive's vertices and associated data. Entries are
7005 also written for bitmaps and pixel rectangles. Feedback occurs after
7006 polygon culling and `glPolygonMode' interpretation of polygons has taken
7007 place, so polygons that are culled are not returned in the feedback
7008 buffer. It can also occur after polygons with more than three edges are
7009 broken up into triangles, if the GL implementation renders polygons by
7010 performing this decomposition.
7011
7012 The `glPassThrough' command can be used to insert a marker into the
7013 feedback buffer. See `glPassThrough'.
7014
7015 Following is the grammar for the blocks of values written into the
7016 feedback buffer. Each primitive is indicated with a unique identifying
7017 value followed by some number of vertices. Polygon entries include an
7018 integer value indicating how many vertices follow. A vertex is fed back
7019 as some number of floating-point values, as determined by TYPE. Colors
7020 are fed back as four values in RGBA mode and one value in color index
7021 mode.
7022
7023 feedbackList ← feedbackItem feedbackList | feedbackItem feedbackItem ←
7024 point | lineSegment | polygon | bitmap | pixelRectangle | passThru point
7025 ← `GL_POINT_TOKEN' vertex lineSegment ← `GL_LINE_TOKEN' vertex vertex |
7026 `GL_LINE_RESET_TOKEN' vertex vertex polygon ← `GL_POLYGON_TOKEN' n
7027 polySpec polySpec ← polySpec vertex | vertex vertex vertex bitmap ←
7028 `GL_BITMAP_TOKEN' vertex pixelRectangle ← `GL_DRAW_PIXEL_TOKEN' vertex |
7029 `GL_COPY_PIXEL_TOKEN' vertex passThru ← `GL_PASS_THROUGH_TOKEN' value
7030 vertex ← 2d | 3d | 3dColor | 3dColorTexture | 4dColorTexture 2d ← value
7031 value 3d ← value value value 3dColor ← value value value color
7032 3dColorTexture ← value value value color tex 4dColorTexture ← value
7033 value value value color tex color ← rgba | index rgba ← value value
7034 value value index ← value tex ← value value value value
7035
7036 VALUE is a floating-point number, and N is a floating-point integer
7037 giving the number of vertices in the polygon. `GL_POINT_TOKEN',
7038 `GL_LINE_TOKEN', `GL_LINE_RESET_TOKEN', `GL_POLYGON_TOKEN',
7039 `GL_BITMAP_TOKEN', `GL_DRAW_PIXEL_TOKEN', `GL_COPY_PIXEL_TOKEN' and
7040 `GL_PASS_THROUGH_TOKEN' are symbolic floating-point constants.
7041 `GL_LINE_RESET_TOKEN' is returned whenever the line stipple pattern is
7042 reset. The data returned as a vertex depends on the feedback TYPE.
7043
7044 The following table gives the correspondence between TYPE and the number
7045 of values per vertex. K is 1 in color index mode and 4 in RGBA mode.
7046
7047
7048
7049 *Type*
7050 *Coordinates*, *Color*, *Texture*, *Total Number of Values*
7051
7052 `GL_2D'
7053 X, Y, , , 2
7054
7055 `GL_3D'
7056 X, Y, Z, , , 3
7057
7058 `GL_3D_COLOR'
7059 X, Y, Z, K , , 3+K
7060
7061 `GL_3D_COLOR_TEXTURE'
7062 X, Y, Z, K , 4 , 7+K
7063
7064 `GL_4D_COLOR_TEXTURE'
7065 X, Y, Z, W, K , 4 , 8+K
7066
7067 Feedback vertex coordinates are in window coordinates, except W, which
7068 is in clip coordinates. Feedback colors are lighted, if lighting is
7069 enabled. Feedback texture coordinates are generated, if texture
7070 coordinate generation is enabled. They are always transformed by the
7071 texture matrix.
7072
7073 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
7074
7075 `GL_INVALID_VALUE' is generated if SIZE is negative.
7076
7077 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is called
7078 while the render mode is `GL_FEEDBACK', or if `glRenderMode' is called
7079 with argument `GL_FEEDBACK' before `glFeedbackBuffer' is called at least
7080 once.
7081
7082 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is executed
7083 between the execution of `glBegin' and the corresponding execution of
7084 `glEnd'.")
7085
7086 (define-gl-procedures
7087 ((glFinish -> void))
7088 "Block until all GL execution is complete.
7089
7090 `glFinish' does not return until the effects of all previously called GL
7091 commands are complete. Such effects include all changes to GL state, all
7092 changes to connection state, and all changes to the frame buffer
7093 contents.
7094
7095 `GL_INVALID_OPERATION' is generated if `glFinish' is executed between
7096 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7097
7098 (define-gl-procedures
7099 ((glFlush -> void))
7100 "Force execution of GL commands in finite time.
7101
7102 Different GL implementations buffer commands in several different
7103 locations, including network buffers and the graphics accelerator
7104 itself. `glFlush' empties all of these buffers, causing all issued
7105 commands to be executed as quickly as they are accepted by the actual
7106 rendering engine. Though this execution may not be completed in any
7107 particular time period, it does complete in finite time.
7108
7109 Because any GL program might be executed over a network, or on an
7110 accelerator that buffers commands, all programs should call `glFlush'
7111 whenever they count on having all of their previously issued commands
7112 completed. For example, call `glFlush' before waiting for user input
7113 that depends on the generated image.
7114
7115 `GL_INVALID_OPERATION' is generated if `glFlush' is executed between the
7116 execution of `glBegin' and the corresponding execution of `glEnd'.")
7117
7118 (define-gl-procedures
7119 ((glFogCoordPointer
7120 (type GLenum)
7121 (stride GLsizei)
7122 (pointer GLvoid-*)
7123 ->
7124 void))
7125 "Define an array of fog coordinates.
7126
7127 TYPE
7128 Specifies the data type of each fog coordinate. Symbolic constants
7129 `GL_FLOAT', or `GL_DOUBLE' are accepted. The initial value is
7130 `GL_FLOAT'.
7131
7132 STRIDE
7133 Specifies the byte offset between consecutive fog coordinates. If
7134 STRIDE is 0, the array elements are understood to be tightly
7135 packed. The initial value is 0.
7136
7137 POINTER
7138 Specifies a pointer to the first coordinate of the first fog
7139 coordinate in the array. The initial value is 0.
7140
7141 `glFogCoordPointer' specifies the location and data format of an array
7142 of fog coordinates to use when rendering. TYPE specifies the data type
7143 of each fog coordinate, and STRIDE specifies the byte stride from one
7144 fog coordinate to the next, allowing vertices and attributes to be
7145 packed into a single array or stored in separate arrays.
7146
7147 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
7148 target (see `glBindBuffer') while a fog coordinate array is specified,
7149 POINTER is treated as a byte offset into the buffer object's data store.
7150 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
7151 fog coordinate vertex array client-side state
7152 (`GL_FOG_COORD_ARRAY_BUFFER_BINDING').
7153
7154 When a fog coordinate array is specified, TYPE, STRIDE, and POINTER are
7155 saved as client-side state, in addition to the current vertex array
7156 buffer object binding.
7157
7158 To enable and disable the fog coordinate array, call
7159 `glEnableClientState' and `glDisableClientState' with the argument
7160 `GL_FOG_COORD_ARRAY'. If enabled, the fog coordinate array is used when
7161 `glDrawArrays', `glMultiDrawArrays', `glDrawElements',
7162 `glMultiDrawElements', `glDrawRangeElements', or `glArrayElement' is
7163 called.
7164
7165 `GL_INVALID_ENUM' is generated if TYPE is not either `GL_FLOAT' or
7166 `GL_DOUBLE'.
7167
7168 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
7169
7170 (define-gl-procedures
7171 ((glFogCoordf (coord GLfloat) -> void))
7172 "Set the current fog coordinates.
7173
7174 COORD
7175 Specify the fog distance.
7176
7177 `glFogCoord' specifies the fog coordinate that is associated with each
7178 vertex and the current raster position. The value specified is
7179 interpolated and used in computing the fog color (see `glFog').")
7180
7181 (define-gl-procedures
7182 ((glFogf (pname GLenum) (param GLfloat) -> void)
7183 (glFogi (pname GLenum) (param GLint) -> void))
7184 "Specify fog parameters.
7185
7186 PNAME
7187 Specifies a single-valued fog parameter. `GL_FOG_MODE',
7188 `GL_FOG_DENSITY', `GL_FOG_START', `GL_FOG_END', `GL_FOG_INDEX', and
7189 `GL_FOG_COORD_SRC' are accepted.
7190
7191 PARAM
7192 Specifies the value that PNAME will be set to.
7193
7194 Fog is initially disabled. While enabled, fog affects rasterized
7195 geometry, bitmaps, and pixel blocks, but not buffer clear operations. To
7196 enable and disable fog, call `glEnable' and `glDisable' with argument
7197 `GL_FOG'.
7198
7199 `glFog' assigns the value or values in PARAMS to the fog parameter
7200 specified by PNAME. The following values are accepted for PNAME:
7201
7202 `GL_FOG_MODE'
7203 PARAMS is a single integer or floating-point value that specifies
7204 the equation to be used to compute the fog blend factor, F . Three
7205 symbolic constants are accepted: `GL_LINEAR', `GL_EXP', and
7206 `GL_EXP2'. The equations corresponding to these symbolic constants
7207 are defined below. The initial fog mode is `GL_EXP'.
7208
7209 `GL_FOG_DENSITY'
7210 PARAMS is a single integer or floating-point value that specifies
7211 DENSITY , the fog density used in both exponential fog equations.
7212 Only nonnegative densities are accepted. The initial fog density is
7213 1.
7214
7215 `GL_FOG_START'
7216 PARAMS is a single integer or floating-point value that specifies
7217 START , the near distance used in the linear fog equation. The
7218 initial near distance is 0.
7219
7220 `GL_FOG_END'
7221 PARAMS is a single integer or floating-point value that specifies
7222 END , the far distance used in the linear fog equation. The initial
7223 far distance is 1.
7224
7225 `GL_FOG_INDEX'
7226 PARAMS is a single integer or floating-point value that specifies
7227 I_F , the fog color index. The initial fog index is 0.
7228
7229 `GL_FOG_COLOR'
7230 PARAMS contains four integer or floating-point values that specify
7231 C_F , the fog color. Integer values are mapped linearly such that
7232 the most positive representable value maps to 1.0, and the most
7233 negative representable value maps to -1.0 . Floating-point values
7234 are mapped directly. After conversion, all color components are
7235 clamped to the range [0,1] . The initial fog color is (0, 0, 0, 0).
7236
7237 `GL_FOG_COORD_SRC'
7238 PARAMS contains either of the following symbolic constants:
7239 `GL_FOG_COORD' or `GL_FRAGMENT_DEPTH'. `GL_FOG_COORD' specifies
7240 that the current fog coordinate should be used as distance value in
7241 the fog color computation. `GL_FRAGMENT_DEPTH' specifies that the
7242 current fragment depth should be used as distance value in the fog
7243 computation.
7244
7245 Fog blends a fog color with each rasterized pixel fragment's
7246 post-texturing color using a blending factor F . Factor F is computed in
7247 one of three ways, depending on the fog mode. Let C be either the
7248 distance in eye coordinate from the origin (in the case that the
7249 `GL_FOG_COORD_SRC' is `GL_FRAGMENT_DEPTH') or the current fog coordinate
7250 (in the case that `GL_FOG_COORD_SRC' is `GL_FOG_COORD'). The equation
7251 for `GL_LINEAR' fog is F=END-C,/END-START,
7252
7253 The equation for `GL_EXP' fog is F=E^-(DENSITY·C,),
7254
7255 The equation for `GL_EXP2' fog is F=E^-(DENSITY·C,),^2
7256
7257 Regardless of the fog mode, F is clamped to the range [0,1] after it is
7258 computed. Then, if the GL is in RGBA color mode, the fragment's red,
7259 green, and blue colors, represented by C_R , are replaced by
7260
7261 C_R,^″=F×C_R+(1-F,)×C_F
7262
7263 Fog does not affect a fragment's alpha component.
7264
7265 In color index mode, the fragment's color index I_R is replaced by
7266
7267 I_R,^″=I_R+(1-F,)×I_F
7268
7269
7270
7271 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value, or if
7272 PNAME is `GL_FOG_MODE' and PARAMS is not an accepted value.
7273
7274 `GL_INVALID_VALUE' is generated if PNAME is `GL_FOG_DENSITY' and PARAMS
7275 is negative.
7276
7277 `GL_INVALID_OPERATION' is generated if `glFog' is executed between the
7278 execution of `glBegin' and the corresponding execution of `glEnd'.")
7279
7280 (define-gl-procedures
7281 ((glFrontFace (mode GLenum) -> void))
7282 "Define front- and back-facing polygons.
7283
7284 MODE
7285 Specifies the orientation of front-facing polygons. `GL_CW' and
7286 `GL_CCW' are accepted. The initial value is `GL_CCW'.
7287
7288 In a scene composed entirely of opaque closed surfaces, back-facing
7289 polygons are never visible. Eliminating these invisible polygons has the
7290 obvious benefit of speeding up the rendering of the image. To enable and
7291 disable elimination of back-facing polygons, call `glEnable' and
7292 `glDisable' with argument `GL_CULL_FACE'.
7293
7294 The projection of a polygon to window coordinates is said to have
7295 clockwise winding if an imaginary object following the path from its
7296 first vertex, its second vertex, and so on, to its last vertex, and
7297 finally back to its first vertex, moves in a clockwise direction about
7298 the interior of the polygon. The polygon's winding is said to be
7299 counterclockwise if the imaginary object following the same path moves
7300 in a counterclockwise direction about the interior of the polygon.
7301 `glFrontFace' specifies whether polygons with clockwise winding in
7302 window coordinates, or counterclockwise winding in window coordinates,
7303 are taken to be front-facing. Passing `GL_CCW' to MODE selects
7304 counterclockwise polygons as front-facing; `GL_CW' selects clockwise
7305 polygons as front-facing. By default, counterclockwise polygons are
7306 taken to be front-facing.
7307
7308 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
7309
7310 `GL_INVALID_OPERATION' is generated if `glFrontFace' is executed between
7311 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7312
7313 (define-gl-procedures
7314 ((glFrustum
7315 (left GLdouble)
7316 (right GLdouble)
7317 (bottom GLdouble)
7318 (top GLdouble)
7319 (nearVal GLdouble)
7320 (farVal GLdouble)
7321 ->
7322 void))
7323 "Multiply the current matrix by a perspective matrix.
7324
7325 LEFT
7326 RIGHT
7327
7328 Specify the coordinates for the left and right vertical clipping
7329 planes.
7330
7331 BOTTOM
7332 TOP
7333
7334 Specify the coordinates for the bottom and top horizontal clipping
7335 planes.
7336
7337 NEARVAL
7338 FARVAL
7339
7340 Specify the distances to the near and far depth clipping planes.
7341 Both distances must be positive.
7342
7343 `glFrustum' describes a perspective matrix that produces a perspective
7344 projection. The current matrix (see `glMatrixMode') is multiplied by
7345 this matrix and the result replaces the current matrix, as if
7346 `glMultMatrix' were called with the following matrix as its argument:
7347
7348
7349
7350 [(2\u2062NEARVAL,/RIGHT-LEFT,, 0 A 0), (0 2\u2062NEARVAL,/TOP-BOTTOM,, B 0), (0 0
7351 C D), (0 0 -1 0),]
7352
7353 A=RIGHT+LEFT,/RIGHT-LEFT,
7354
7355 B=TOP+BOTTOM,/TOP-BOTTOM,
7356
7357 C=-FARVAL+NEARVAL,/FARVAL-NEARVAL,,
7358
7359 D=-2\u2062FARVAL\u2062NEARVAL,/FARVAL-NEARVAL,,
7360
7361
7362
7363 Typically, the matrix mode is `GL_PROJECTION', and (LEFT,BOTTOM-NEARVAL)
7364 and (RIGHT,TOP-NEARVAL) specify the points on the near clipping plane
7365 that are mapped to the lower left and upper right corners of the window,
7366 assuming that the eye is located at (0, 0, 0). -FARVAL specifies the
7367 location of the far clipping plane. Both NEARVAL and FARVAL must be
7368 positive.
7369
7370 Use `glPushMatrix' and `glPopMatrix' to save and restore the current
7371 matrix stack.
7372
7373 `GL_INVALID_VALUE' is generated if NEARVAL or FARVAL is not positive, or
7374 if LEFT = RIGHT, or BOTTOM = TOP, or NEAR = FAR.
7375
7376 `GL_INVALID_OPERATION' is generated if `glFrustum' is executed between
7377 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7378
7379 (define-gl-procedures
7380 ((glGenBuffers
7381 (n GLsizei)
7382 (buffers GLuint-*)
7383 ->
7384 void))
7385 "Generate buffer object names.
7386
7387 N
7388 Specifies the number of buffer object names to be generated.
7389
7390 BUFFERS
7391 Specifies an array in which the generated buffer object names are
7392 stored.
7393
7394 `glGenBuffers' returns N buffer object names in BUFFERS. There is no
7395 guarantee that the names form a contiguous set of integers; however, it
7396 is guaranteed that none of the returned names was in use immediately
7397 before the call to `glGenBuffers'.
7398
7399 Buffer object names returned by a call to `glGenBuffers' are not
7400 returned by subsequent calls, unless they are first deleted with
7401 `glDeleteBuffers'.
7402
7403 No buffer objects are associated with the returned buffer object names
7404 until they are first bound by calling `glBindBuffer'.
7405
7406 `GL_INVALID_VALUE' is generated if N is negative.
7407
7408 `GL_INVALID_OPERATION' is generated if `glGenBuffers' is executed
7409 between the execution of `glBegin' and the corresponding execution of
7410 `glEnd'.")
7411
7412 (define-gl-procedures
7413 ((glGenLists (range GLsizei) -> GLuint))
7414 "Generate a contiguous set of empty display lists.
7415
7416 RANGE
7417 Specifies the number of contiguous empty display lists to be
7418 generated.
7419
7420 `glGenLists' has one argument, RANGE. It returns an integer N such that
7421 RANGE contiguous empty display lists, named N , N+1 , ... , N+RANGE-1 ,
7422 are created. If RANGE is 0, if there is no group of RANGE contiguous
7423 names available, or if any error is generated, no display lists are
7424 generated, and 0 is returned.
7425
7426 `GL_INVALID_VALUE' is generated if RANGE is negative.
7427
7428 `GL_INVALID_OPERATION' is generated if `glGenLists' is executed between
7429 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7430
7431 (define-gl-procedures
7432 ((glGenQueries (n GLsizei) (ids GLuint-*) -> void))
7433 "Generate query object names.
7434
7435 N
7436 Specifies the number of query object names to be generated.
7437
7438 IDS
7439 Specifies an array in which the generated query object names are
7440 stored.
7441
7442 `glGenQueries' returns N query object names in IDS. There is no
7443 guarantee that the names form a contiguous set of integers; however, it
7444 is guaranteed that none of the returned names was in use immediately
7445 before the call to `glGenQueries'.
7446
7447 Query object names returned by a call to `glGenQueries' are not returned
7448 by subsequent calls, unless they are first deleted with
7449 `glDeleteQueries'.
7450
7451 No query objects are associated with the returned query object names
7452 until they are first used by calling `glBeginQuery'.
7453
7454 `GL_INVALID_VALUE' is generated if N is negative.
7455
7456 `GL_INVALID_OPERATION' is generated if `glGenQueries' is executed
7457 between the execution of `glBegin' and the corresponding execution of
7458 `glEnd'.")
7459
7460 (define-gl-procedures
7461 ((glGenTextures
7462 (n GLsizei)
7463 (textures GLuint-*)
7464 ->
7465 void))
7466 "Generate texture names.
7467
7468 N
7469 Specifies the number of texture names to be generated.
7470
7471 TEXTURES
7472 Specifies an array in which the generated texture names are stored.
7473
7474 `glGenTextures' returns N texture names in TEXTURES. There is no
7475 guarantee that the names form a contiguous set of integers; however, it
7476 is guaranteed that none of the returned names was in use immediately
7477 before the call to `glGenTextures'.
7478
7479 The generated textures have no dimensionality; they assume the
7480 dimensionality of the texture target to which they are first bound (see
7481 `glBindTexture').
7482
7483 Texture names returned by a call to `glGenTextures' are not returned by
7484 subsequent calls, unless they are first deleted with `glDeleteTextures'.
7485
7486 `GL_INVALID_VALUE' is generated if N is negative.
7487
7488 `GL_INVALID_OPERATION' is generated if `glGenTextures' is executed
7489 between the execution of `glBegin' and the corresponding execution of
7490 `glEnd'.")
7491
7492 (define-gl-procedures
7493 ((glGetActiveAttrib
7494 (program GLuint)
7495 (index GLuint)
7496 (bufSize GLsizei)
7497 (length GLsizei-*)
7498 (size GLint-*)
7499 (type GLenum-*)
7500 (name GLchar-*)
7501 ->
7502 void))
7503 "Returns information about an active attribute variable for the specified
7504 program object.
7505
7506 PROGRAM
7507 Specifies the program object to be queried.
7508
7509 INDEX
7510 Specifies the index of the attribute variable to be queried.
7511
7512 BUFSIZE
7513 Specifies the maximum number of characters OpenGL is allowed to
7514 write in the character buffer indicated by NAME.
7515
7516 LENGTH
7517 Returns the number of characters actually written by OpenGL in the
7518 string indicated by NAME (excluding the null terminator) if a value
7519 other than `NULL' is passed.
7520
7521 SIZE
7522 Returns the size of the attribute variable.
7523
7524 TYPE
7525 Returns the data type of the attribute variable.
7526
7527 NAME
7528 Returns a null terminated string containing the name of the
7529 attribute variable.
7530
7531 `glGetActiveAttrib' returns information about an active attribute
7532 variable in the program object specified by PROGRAM. The number of
7533 active attributes can be obtained by calling `glGetProgram' with the
7534 value `GL_ACTIVE_ATTRIBUTES'. A value of 0 for INDEX selects the first
7535 active attribute variable. Permissible values for INDEX range from 0 to
7536 the number of active attribute variables minus 1.
7537
7538 A vertex shader may use either built-in attribute variables,
7539 user-defined attribute variables, or both. Built-in attribute variables
7540 have a prefix of \"gl_\" and reference conventional OpenGL vertex
7541 attribtes (e.g., GL_VERTEX, GL_NORMAL, etc., see the OpenGL Shading
7542 Language specification for a complete list.) User-defined attribute
7543 variables have arbitrary names and obtain their values through numbered
7544 generic vertex attributes. An attribute variable (either built-in or
7545 user-defined) is considered active if it is determined during the link
7546 operation that it may be accessed during program execution. Therefore,
7547 PROGRAM should have previously been the target of a call to
7548 `glLinkProgram', but it is not necessary for it to have been linked
7549 successfully.
7550
7551 The size of the character buffer required to store the longest attribute
7552 variable name in PROGRAM can be obtained by calling `glGetProgram' with
7553 the value `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH'. This value should be used to
7554 allocate a buffer of sufficient size to store the returned attribute
7555 name. The size of this character buffer is passed in BUFSIZE, and a
7556 pointer to this character buffer is passed in NAME.
7557
7558 `glGetActiveAttrib' returns the name of the attribute variable indicated
7559 by INDEX, storing it in the character buffer specified by NAME. The
7560 string returned will be null terminated. The actual number of characters
7561 written into this buffer is returned in LENGTH, and this count does not
7562 include the null termination character. If the length of the returned
7563 string is not required, a value of `NULL' can be passed in the LENGTH
7564 argument.
7565
7566 The TYPE argument will return a pointer to the attribute variable's data
7567 type. The symbolic constants `GL_FLOAT', `GL_FLOAT_VEC2',
7568 `GL_FLOAT_VEC3', `GL_FLOAT_VEC4', `GL_FLOAT_MAT2', `GL_FLOAT_MAT3',
7569 `GL_FLOAT_MAT4', `GL_FLOAT_MAT2x3', `GL_FLOAT_MAT2x4',
7570 `GL_FLOAT_MAT3x2', `GL_FLOAT_MAT3x4', `GL_FLOAT_MAT4x2', or
7571 `GL_FLOAT_MAT4x3' may be returned. The SIZE argument will return the
7572 size of the attribute, in units of the type returned in TYPE.
7573
7574 The list of active attribute variables may include both built-in
7575 attribute variables (which begin with the prefix \"gl_\") as well as
7576 user-defined attribute variable names.
7577
7578 This function will return as much information as it can about the
7579 specified active attribute variable. If no information is available,
7580 LENGTH will be 0, and NAME will be an empty string. This situation could
7581 occur if this function is called after a link operation that failed. If
7582 an error occurs, the return values LENGTH, SIZE, TYPE, and NAME will be
7583 unmodified.
7584
7585 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
7586 OpenGL.
7587
7588 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
7589
7590 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to the
7591 number of active attribute variables in PROGRAM.
7592
7593 `GL_INVALID_OPERATION' is generated if `glGetActiveAttrib' is executed
7594 between the execution of `glBegin' and the corresponding execution of
7595 `glEnd'.
7596
7597 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.")
7598
7599 (define-gl-procedures
7600 ((glGetActiveUniform
7601 (program GLuint)
7602 (index GLuint)
7603 (bufSize GLsizei)
7604 (length GLsizei-*)
7605 (size GLint-*)
7606 (type GLenum-*)
7607 (name GLchar-*)
7608 ->
7609 void))
7610 "Returns information about an active uniform variable for the specified
7611 program object.
7612
7613 PROGRAM
7614 Specifies the program object to be queried.
7615
7616 INDEX
7617 Specifies the index of the uniform variable to be queried.
7618
7619 BUFSIZE
7620 Specifies the maximum number of characters OpenGL is allowed to
7621 write in the character buffer indicated by NAME.
7622
7623 LENGTH
7624 Returns the number of characters actually written by OpenGL in the
7625 string indicated by NAME (excluding the null terminator) if a value
7626 other than `NULL' is passed.
7627
7628 SIZE
7629 Returns the size of the uniform variable.
7630
7631 TYPE
7632 Returns the data type of the uniform variable.
7633
7634 NAME
7635 Returns a null terminated string containing the name of the uniform
7636 variable.
7637
7638 `glGetActiveUniform' returns information about an active uniform
7639 variable in the program object specified by PROGRAM. The number of
7640 active uniform variables can be obtained by calling `glGetProgram' with
7641 the value `GL_ACTIVE_UNIFORMS'. A value of 0 for INDEX selects the first
7642 active uniform variable. Permissible values for INDEX range from 0 to
7643 the number of active uniform variables minus 1.
7644
7645 Shaders may use either built-in uniform variables, user-defined uniform
7646 variables, or both. Built-in uniform variables have a prefix of \"gl_\"
7647 and reference existing OpenGL state or values derived from such state
7648 (e.g., GL_FOG, GL_MODELVIEWMATRIX, etc., see the OpenGL Shading Language
7649 specification for a complete list.) User-defined uniform variables have
7650 arbitrary names and obtain their values from the application through
7651 calls to `glUniform'. A uniform variable (either built-in or
7652 user-defined) is considered active if it is determined during the link
7653 operation that it may be accessed during program execution. Therefore,
7654 PROGRAM should have previously been the target of a call to
7655 `glLinkProgram', but it is not necessary for it to have been linked
7656 successfully.
7657
7658 The size of the character buffer required to store the longest uniform
7659 variable name in PROGRAM can be obtained by calling `glGetProgram' with
7660 the value `GL_ACTIVE_UNIFORM_MAX_LENGTH'. This value should be used to
7661 allocate a buffer of sufficient size to store the returned uniform
7662 variable name. The size of this character buffer is passed in BUFSIZE,
7663 and a pointer to this character buffer is passed in NAME.
7664
7665 `glGetActiveUniform' returns the name of the uniform variable indicated
7666 by INDEX, storing it in the character buffer specified by NAME. The
7667 string returned will be null terminated. The actual number of characters
7668 written into this buffer is returned in LENGTH, and this count does not
7669 include the null termination character. If the length of the returned
7670 string is not required, a value of `NULL' can be passed in the LENGTH
7671 argument.
7672
7673 The TYPE argument will return a pointer to the uniform variable's data
7674 type. The symbolic constants `GL_FLOAT', `GL_FLOAT_VEC2',
7675 `GL_FLOAT_VEC3', `GL_FLOAT_VEC4', `GL_INT', `GL_INT_VEC2',
7676 `GL_INT_VEC3', `GL_INT_VEC4', `GL_BOOL', `GL_BOOL_VEC2', `GL_BOOL_VEC3',
7677 `GL_BOOL_VEC4', `GL_FLOAT_MAT2', `GL_FLOAT_MAT3', `GL_FLOAT_MAT4',
7678 `GL_FLOAT_MAT2x3', `GL_FLOAT_MAT2x4', `GL_FLOAT_MAT3x2',
7679 `GL_FLOAT_MAT3x4', `GL_FLOAT_MAT4x2', `GL_FLOAT_MAT4x3',
7680 `GL_SAMPLER_1D', `GL_SAMPLER_2D', `GL_SAMPLER_3D', `GL_SAMPLER_CUBE',
7681 `GL_SAMPLER_1D_SHADOW', or `GL_SAMPLER_2D_SHADOW' may be returned.
7682
7683 If one or more elements of an array are active, the name of the array is
7684 returned in NAME, the type is returned in TYPE, and the SIZE parameter
7685 returns the highest array element index used, plus one, as determined by
7686 the compiler and/or linker. Only one active uniform variable will be
7687 reported for a uniform array.
7688
7689 Uniform variables that are declared as structures or arrays of
7690 structures will not be returned directly by this function. Instead, each
7691 of these uniform variables will be reduced to its fundamental components
7692 containing the \".\" and \"[]\" operators such that each of the names is
7693 valid as an argument to `glGetUniformLocation'. Each of these reduced
7694 uniform variables is counted as one active uniform variable and is
7695 assigned an index. A valid name cannot be a structure, an array of
7696 structures, or a subcomponent of a vector or matrix.
7697
7698 The size of the uniform variable will be returned in SIZE. Uniform
7699 variables other than arrays will have a size of 1. Structures and arrays
7700 of structures will be reduced as described earlier, such that each of
7701 the names returned will be a data type in the earlier list. If this
7702 reduction results in an array, the size returned will be as described
7703 for uniform arrays; otherwise, the size returned will be 1.
7704
7705 The list of active uniform variables may include both built-in uniform
7706 variables (which begin with the prefix \"gl_\") as well as user-defined
7707 uniform variable names.
7708
7709 This function will return as much information as it can about the
7710 specified active uniform variable. If no information is available,
7711 LENGTH will be 0, and NAME will be an empty string. This situation could
7712 occur if this function is called after a link operation that failed. If
7713 an error occurs, the return values LENGTH, SIZE, TYPE, and NAME will be
7714 unmodified.
7715
7716 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
7717 OpenGL.
7718
7719 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
7720
7721 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to the
7722 number of active uniform variables in PROGRAM.
7723
7724 `GL_INVALID_OPERATION' is generated if `glGetActiveUniform' is executed
7725 between the execution of `glBegin' and the corresponding execution of
7726 `glEnd'.
7727
7728 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.")
7729
7730 (define-gl-procedures
7731 ((glGetAttachedShaders
7732 (program GLuint)
7733 (maxCount GLsizei)
7734 (count GLsizei-*)
7735 (shaders GLuint-*)
7736 ->
7737 void))
7738 "Returns the handles of the shader objects attached to a program object.
7739
7740 PROGRAM
7741 Specifies the program object to be queried.
7742
7743 MAXCOUNT
7744 Specifies the size of the array for storing the returned object
7745 names.
7746
7747 COUNT
7748 Returns the number of names actually returned in OBJECTS.
7749
7750 SHADERS
7751 Specifies an array that is used to return the names of attached
7752 shader objects.
7753
7754 `glGetAttachedShaders' returns the names of the shader objects attached
7755 to PROGRAM. The names of shader objects that are attached to PROGRAM
7756 will be returned in SHADERS. The actual number of shader names written
7757 into SHADERS is returned in COUNT. If no shader objects are attached to
7758 PROGRAM, COUNT is set to 0. The maximum number of shader names that may
7759 be returned in SHADERS is specified by MAXCOUNT.
7760
7761 If the number of names actually returned is not required (for instance,
7762 if it has just been obtained by calling `glGetProgram'), a value of
7763 `NULL' may be passed for count. If no shader objects are attached to
7764 PROGRAM, a value of 0 will be returned in COUNT. The actual number of
7765 attached shaders can be obtained by calling `glGetProgram' with the
7766 value `GL_ATTACHED_SHADERS'.
7767
7768 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
7769 OpenGL.
7770
7771 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
7772
7773 `GL_INVALID_VALUE' is generated if MAXCOUNT is less than 0.
7774
7775 `GL_INVALID_OPERATION' is generated if `glGetAttachedShaders' is
7776 executed between the execution of `glBegin' and the corresponding
7777 execution of `glEnd'.")
7778
7779 (define-gl-procedures
7780 ((glGetAttribLocation
7781 (program GLuint)
7782 (name const-GLchar-*)
7783 ->
7784 GLint))
7785 "Returns the location of an attribute variable.
7786
7787 PROGRAM
7788 Specifies the program object to be queried.
7789
7790 NAME
7791 Points to a null terminated string containing the name of the
7792 attribute variable whose location is to be queried.
7793
7794 `glGetAttribLocation' queries the previously linked program object
7795 specified by PROGRAM for the attribute variable specified by NAME and
7796 returns the index of the generic vertex attribute that is bound to that
7797 attribute variable. If NAME is a matrix attribute variable, the index of
7798 the first column of the matrix is returned. If the named attribute
7799 variable is not an active attribute in the specified program object or
7800 if NAME starts with the reserved prefix \"gl_\", a value of -1 is
7801 returned.
7802
7803 The association between an attribute variable name and a generic
7804 attribute index can be specified at any time by calling
7805 `glBindAttribLocation'. Attribute bindings do not go into effect until
7806 `glLinkProgram' is called. After a program object has been linked
7807 successfully, the index values for attribute variables remain fixed
7808 until the next link command occurs. The attribute values can only be
7809 queried after a link if the link was successful. `glGetAttribLocation'
7810 returns the binding that actually went into effect the last time
7811 `glLinkProgram' was called for the specified program object. Attribute
7812 bindings that have been specified since the last link operation are not
7813 returned by `glGetAttribLocation'.
7814
7815 `GL_INVALID_OPERATION' is generated if PROGRAM is not a value generated
7816 by OpenGL.
7817
7818 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
7819
7820 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
7821 linked.
7822
7823 `GL_INVALID_OPERATION' is generated if `glGetAttribLocation' is executed
7824 between the execution of `glBegin' and the corresponding execution of
7825 `glEnd'.")
7826
7827 (define-gl-procedures
7828 ((glGetBufferParameteriv
7829 (target GLenum)
7830 (value GLenum)
7831 (data GLint-*)
7832 ->
7833 void))
7834 "Return parameters of a buffer object.
7835
7836 TARGET
7837 Specifies the target buffer object. The symbolic constant must be
7838 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
7839 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
7840
7841 VALUE
7842 Specifies the symbolic name of a buffer object parameter. Accepted
7843 values are `GL_BUFFER_ACCESS', `GL_BUFFER_MAPPED',
7844 `GL_BUFFER_SIZE', or `GL_BUFFER_USAGE'.
7845
7846 DATA
7847 Returns the requested parameter.
7848
7849 `glGetBufferParameteriv' returns in DATA a selected parameter of the
7850 buffer object specified by TARGET.
7851
7852 VALUE names a specific buffer object parameter, as follows:
7853
7854 `GL_BUFFER_ACCESS'
7855 PARAMS returns the access policy set while mapping the buffer
7856 object. The initial value is `GL_READ_WRITE'.
7857
7858 `GL_BUFFER_MAPPED'
7859 PARAMS returns a flag indicating whether the buffer object is
7860 currently mapped. The initial value is `GL_FALSE'.
7861
7862 `GL_BUFFER_SIZE'
7863 PARAMS returns the size of the buffer object, measured in bytes.
7864 The initial value is 0.
7865
7866 `GL_BUFFER_USAGE'
7867 PARAMS returns the buffer object's usage pattern. The initial value
7868 is `GL_STATIC_DRAW'.
7869
7870 `GL_INVALID_ENUM' is generated if TARGET or VALUE is not an accepted
7871 value.
7872
7873 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
7874 is bound to TARGET.
7875
7876 `GL_INVALID_OPERATION' is generated if `glGetBufferParameteriv' is
7877 executed between the execution of `glBegin' and the corresponding
7878 execution of `glEnd'.")
7879
7880 (define-gl-procedures
7881 ((glGetBufferPointerv
7882 (target GLenum)
7883 (pname GLenum)
7884 (params GLvoid-**)
7885 ->
7886 void))
7887 "Return the pointer to a mapped buffer object's data store.
7888
7889 TARGET
7890 Specifies the target buffer object. The symbolic constant must be
7891 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
7892 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
7893
7894 PNAME
7895 Specifies the pointer to be returned. The symbolic constant must be
7896 `GL_BUFFER_MAP_POINTER'.
7897
7898 PARAMS
7899 Returns the pointer value specified by PNAME.
7900
7901 `glGetBufferPointerv' returns pointer information. PNAME is a symbolic
7902 constant indicating the pointer to be returned, which must be
7903 `GL_BUFFER_MAP_POINTER', the pointer to which the buffer object's data
7904 store is mapped. If the data store is not currently mapped, `NULL' is
7905 returned. PARAMS is a pointer to a location in which to place the
7906 returned pointer value.
7907
7908 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
7909 value.
7910
7911 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
7912 is bound to TARGET.
7913
7914 `GL_INVALID_OPERATION' is generated if `glGetBufferPointerv' is executed
7915 between the execution of `glBegin' and the corresponding execution of
7916 `glEnd'.")
7917
7918 (define-gl-procedures
7919 ((glGetBufferSubData
7920 (target GLenum)
7921 (offset GLintptr)
7922 (size GLsizeiptr)
7923 (data GLvoid-*)
7924 ->
7925 void))
7926 "Returns a subset of a buffer object's data store.
7927
7928 TARGET
7929 Specifies the target buffer object. The symbolic constant must be
7930 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
7931 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
7932
7933 OFFSET
7934 Specifies the offset into the buffer object's data store from which
7935 data will be returned, measured in bytes.
7936
7937 SIZE
7938 Specifies the size in bytes of the data store region being
7939 returned.
7940
7941 DATA
7942 Specifies a pointer to the location where buffer object data is
7943 returned.
7944
7945 `glGetBufferSubData' returns some or all of the data from the buffer
7946 object currently bound to TARGET. Data starting at byte offset OFFSET
7947 and extending for SIZE bytes is copied from the data store to the memory
7948 pointed to by DATA. An error is thrown if the buffer object is currently
7949 mapped, or if OFFSET and SIZE together define a range beyond the bounds
7950 of the buffer object's data store.
7951
7952 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
7953 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
7954 `GL_PIXEL_UNPACK_BUFFER'.
7955
7956 `GL_INVALID_VALUE' is generated if OFFSET or SIZE is negative, or if
7957 together they define a region of memory that extends beyond the buffer
7958 object's allocated data store.
7959
7960 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
7961 is bound to TARGET.
7962
7963 `GL_INVALID_OPERATION' is generated if the buffer object being queried
7964 is mapped.
7965
7966 `GL_INVALID_OPERATION' is generated if `glGetBufferSubData' is executed
7967 between the execution of `glBegin' and the corresponding execution of
7968 `glEnd'.")
7969
7970 (define-gl-procedures
7971 ((glGetClipPlane
7972 (plane GLenum)
7973 (equation GLdouble-*)
7974 ->
7975 void))
7976 "Return the coefficients of the specified clipping plane.
7977
7978 PLANE
7979 Specifies a clipping plane. The number of clipping planes depends
7980 on the implementation, but at least six clipping planes are
7981 supported. They are identified by symbolic names of the form
7982 `GL_CLIP_PLANE' I where i ranges from 0 to the value of
7983 `GL_MAX_CLIP_PLANES' - 1.
7984
7985 EQUATION
7986 Returns four double-precision values that are the coefficients of
7987 the plane equation of PLANE in eye coordinates. The initial value
7988 is (0, 0, 0, 0).
7989
7990 `glGetClipPlane' returns in EQUATION the four coefficients of the plane
7991 equation for PLANE.
7992
7993 `GL_INVALID_ENUM' is generated if PLANE is not an accepted value.
7994
7995 `GL_INVALID_OPERATION' is generated if `glGetClipPlane' is executed
7996 between the execution of `glBegin' and the corresponding execution of
7997 `glEnd'.")
7998
7999 (define-gl-procedures
8000 ((glGetColorTableParameterfv
8001 (target GLenum)
8002 (pname GLenum)
8003 (params GLfloat-*)
8004 ->
8005 void)
8006 (glGetColorTableParameteriv
8007 (target GLenum)
8008 (pname GLenum)
8009 (params GLint-*)
8010 ->
8011 void))
8012 "Get color lookup table parameters.
8013
8014 TARGET
8015 The target color table. Must be `GL_COLOR_TABLE',
8016 `GL_POST_CONVOLUTION_COLOR_TABLE',
8017 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `GL_PROXY_COLOR_TABLE',
8018 `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
8019 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
8020
8021 PNAME
8022 The symbolic name of a color lookup table parameter. Must be one of
8023 `GL_COLOR_TABLE_BIAS', `GL_COLOR_TABLE_SCALE',
8024 `GL_COLOR_TABLE_FORMAT', `GL_COLOR_TABLE_WIDTH',
8025 `GL_COLOR_TABLE_RED_SIZE', `GL_COLOR_TABLE_GREEN_SIZE',
8026 `GL_COLOR_TABLE_BLUE_SIZE', `GL_COLOR_TABLE_ALPHA_SIZE',
8027 `GL_COLOR_TABLE_LUMINANCE_SIZE', or
8028 `GL_COLOR_TABLE_INTENSITY_SIZE'.
8029
8030 PARAMS
8031 A pointer to an array where the values of the parameter will be
8032 stored.
8033
8034 Returns parameters specific to color table TARGET.
8035
8036 When PNAME is set to `GL_COLOR_TABLE_SCALE' or `GL_COLOR_TABLE_BIAS',
8037 `glGetColorTableParameter' returns the color table scale or bias
8038 parameters for the table specified by TARGET. For these queries, TARGET
8039 must be set to `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
8040 `GL_POST_COLOR_MATRIX_COLOR_TABLE' and PARAMS points to an array of four
8041 elements, which receive the scale or bias factors for red, green, blue,
8042 and alpha, in that order.
8043
8044 `glGetColorTableParameter' can also be used to retrieve the format and
8045 size parameters for a color table. For these queries, set TARGET to
8046 either the color table target or the proxy color table target. The
8047 format and size parameters are set by `glColorTable'.
8048
8049 The following table lists the format and size parameters that may be
8050 queried. For each symbolic constant listed below for PNAME, PARAMS must
8051 point to an array of the given length and receive the values indicated.
8052
8053
8054
8055 *Parameter*
8056 *N*, *Meaning*
8057
8058 `GL_COLOR_TABLE_FORMAT'
8059 1 , Internal format (e.g., `GL_RGBA')
8060
8061 `GL_COLOR_TABLE_WIDTH'
8062 1 , Number of elements in table
8063
8064 `GL_COLOR_TABLE_RED_SIZE'
8065 1 , Size of red component, in bits
8066
8067 `GL_COLOR_TABLE_GREEN_SIZE'
8068 1 , Size of green component
8069
8070 `GL_COLOR_TABLE_BLUE_SIZE'
8071 1 , Size of blue component
8072
8073 `GL_COLOR_TABLE_ALPHA_SIZE'
8074 1 , Size of alpha component
8075
8076 `GL_COLOR_TABLE_LUMINANCE_SIZE'
8077 1 , Size of luminance component
8078
8079 `GL_COLOR_TABLE_INTENSITY_SIZE'
8080 1 , Size of intensity component
8081
8082
8083
8084 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an acceptable
8085 value.
8086
8087 `GL_INVALID_OPERATION' is generated if `glGetColorTableParameter' is
8088 executed between the execution of `glBegin' and the corresponding
8089 execution of `glEnd'.")
8090
8091 (define-gl-procedures
8092 ((glGetColorTable
8093 (target GLenum)
8094 (format GLenum)
8095 (type GLenum)
8096 (table GLvoid-*)
8097 ->
8098 void))
8099 "Retrieve contents of a color lookup table.
8100
8101 TARGET
8102 Must be `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
8103 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
8104
8105 FORMAT
8106 The format of the pixel data in TABLE. The possible values are
8107 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
8108 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
8109
8110 TYPE
8111 The type of the pixel data in TABLE. Symbolic constants
8112 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8113 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
8114 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8115 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
8116 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8117 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8118 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8119 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
8120 are accepted.
8121
8122 TABLE
8123 Pointer to a one-dimensional array of pixel data containing the
8124 contents of the color table.
8125
8126 `glGetColorTable' returns in TABLE the contents of the color table
8127 specified by TARGET. No pixel transfer operations are performed, but
8128 pixel storage modes that are applicable to `glReadPixels' are performed.
8129
8130 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8131 target (see `glBindBuffer') while a histogram table is requested, TABLE
8132 is treated as a byte offset into the buffer object's data store.
8133
8134 Color components that are requested in the specified FORMAT, but which
8135 are not included in the internal format of the color lookup table, are
8136 returned as zero. The assignments of internal color components to the
8137 components requested by FORMAT are
8138
8139 *Internal Component*
8140 *Resulting Component*
8141
8142 Red
8143 Red
8144
8145 Green
8146 Green
8147
8148 Blue
8149 Blue
8150
8151 Alpha
8152 Alpha
8153
8154 Luminance
8155 Red
8156
8157 Intensity
8158 Red
8159
8160
8161
8162 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8163 values.
8164
8165 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
8166 values.
8167
8168 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
8169 values.
8170
8171 `GL_INVALID_OPERATION' is generated if TYPE is one of
8172 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8173 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
8174 is not `GL_RGB'.
8175
8176 `GL_INVALID_OPERATION' is generated if TYPE is one of
8177 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8178 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8179 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8180 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
8181 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
8182
8183 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8184 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8185 store is currently mapped.
8186
8187 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8188 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8189 to the buffer object such that the memory writes required would exceed
8190 the data store size.
8191
8192 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8193 bound to the `GL_PIXEL_PACK_BUFFER' target and TABLE is not evenly
8194 divisible into the number of bytes needed to store in memory a datum
8195 indicated by TYPE.
8196
8197 `GL_INVALID_OPERATION' is generated if `glGetColorTable' is executed
8198 between the execution of `glBegin' and the corresponding execution of
8199 `glEnd'.")
8200
8201 (define-gl-procedures
8202 ((glGetCompressedTexImage
8203 (target GLenum)
8204 (lod GLint)
8205 (img GLvoid-*)
8206 ->
8207 void))
8208 "Return a compressed texture image.
8209
8210 TARGET
8211 Specifies which texture is to be obtained. `GL_TEXTURE_1D',
8212 `GL_TEXTURE_2D', and
8213 `GL_TEXTURE_3D'`GL_TEXTURE_CUBE_MAP_POSITIVE_X',
8214 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
8215 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
8216 and `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z' are accepted.
8217
8218 LOD
8219 Specifies the level-of-detail number of the desired image. Level 0
8220 is the base image level. Level N is the N th mipmap reduction
8221 image.
8222
8223 IMG
8224 Returns the compressed texture image.
8225
8226 `glGetCompressedTexImage' returns the compressed texture image
8227 associated with TARGET and LOD into IMG. IMG should be an array of
8228 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' bytes. TARGET specifies whether the
8229 desired texture image was one specified by `glTexImage1D'
8230 (`GL_TEXTURE_1D'), `glTexImage2D' (`GL_TEXTURE_2D' or any of
8231 `GL_TEXTURE_CUBE_MAP_*'), or `glTexImage3D' (`GL_TEXTURE_3D'). LOD
8232 specifies the level-of-detail number of the desired image.
8233
8234 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8235 target (see `glBindBuffer') while a texture image is requested, IMG is
8236 treated as a byte offset into the buffer object's data store.
8237
8238 To minimize errors, first verify that the texture is compressed by
8239 calling `glGetTexLevelParameter' with argument `GL_TEXTURE_COMPRESSED'.
8240 If the texture is compressed, then determine the amount of memory
8241 required to store the compressed texture by calling
8242 `glGetTexLevelParameter' with argument
8243 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE'. Finally, retrieve the internal
8244 format of the texture by calling `glGetTexLevelParameter' with argument
8245 `GL_TEXTURE_INTERNAL_FORMAT'. To store the texture for later use,
8246 associate the internal format and size with the retrieved texture image.
8247 These data can be used by the respective texture or subtexture loading
8248 routine used for loading TARGET textures.
8249
8250 `GL_INVALID_VALUE' is generated if LOD is less than zero or greater than
8251 the maximum number of LODs permitted by the implementation.
8252
8253 `GL_INVALID_OPERATION' is generated if `glGetCompressedTexImage' is used
8254 to retrieve a texture that is in an uncompressed internal format.
8255
8256 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8257 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8258 store is currently mapped.
8259
8260 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8261 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8262 to the buffer object such that the memory writes required would exceed
8263 the data store size.
8264
8265 `GL_INVALID_OPERATION' is generated if `glGetCompressedTexImage' is
8266 executed between the execution of `glBegin' and the corresponding
8267 execution of `glEnd'.")
8268
8269 (define-gl-procedures
8270 ((glGetConvolutionFilter
8271 (target GLenum)
8272 (format GLenum)
8273 (type GLenum)
8274 (image GLvoid-*)
8275 ->
8276 void))
8277 "Get current 1D or 2D convolution filter kernel.
8278
8279 TARGET
8280 The filter to be retrieved. Must be one of `GL_CONVOLUTION_1D' or
8281 `GL_CONVOLUTION_2D'.
8282
8283 FORMAT
8284 Format of the output image. Must be one of `GL_RED', `GL_GREEN',
8285 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
8286 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
8287
8288 TYPE
8289 Data type of components in the output image. Symbolic constants
8290 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8291 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
8292 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8293 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
8294 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8295 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8296 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8297 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
8298 are accepted.
8299
8300 IMAGE
8301 Pointer to storage for the output image.
8302
8303 `glGetConvolutionFilter' returns the current 1D or 2D convolution filter
8304 kernel as an image. The one- or two-dimensional image is placed in IMAGE
8305 according to the specifications in FORMAT and TYPE. No pixel transfer
8306 operations are performed on this image, but the relevant pixel storage
8307 modes are applied.
8308
8309 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8310 target (see `glBindBuffer') while a convolution filter is requested,
8311 IMAGE is treated as a byte offset into the buffer object's data store.
8312
8313 Color components that are present in FORMAT but not included in the
8314 internal format of the filter are returned as zero. The assignments of
8315 internal color components to the components of FORMAT are as follows.
8316
8317 *Internal Component*
8318 *Resulting Component*
8319
8320 Red
8321 Red
8322
8323 Green
8324 Green
8325
8326 Blue
8327 Blue
8328
8329 Alpha
8330 Alpha
8331
8332 Luminance
8333 Red
8334
8335 Intensity
8336 Red
8337
8338
8339
8340 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8341 values.
8342
8343 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
8344 values.
8345
8346 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
8347 values.
8348
8349 `GL_INVALID_OPERATION' is generated if TYPE is one of
8350 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8351 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
8352 is not `GL_RGB'.
8353
8354 `GL_INVALID_OPERATION' is generated if TYPE is one of
8355 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8356 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8357 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8358 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
8359 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
8360
8361 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8362 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8363 store is currently mapped.
8364
8365 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8366 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8367 to the buffer object such that the memory writes required would exceed
8368 the data store size.
8369
8370 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8371 bound to the `GL_PIXEL_PACK_BUFFER' target and IMAGE is not evenly
8372 divisible into the number of bytes needed to store in memory a datum
8373 indicated by TYPE.
8374
8375 `GL_INVALID_OPERATION' is generated if `glGetConvolutionFilter' is
8376 executed between the execution of `glBegin' and the corresponding
8377 execution of `glEnd'.")
8378
8379 (define-gl-procedures
8380 ((glGetConvolutionParameterfv
8381 (target GLenum)
8382 (pname GLenum)
8383 (params GLfloat-*)
8384 ->
8385 void)
8386 (glGetConvolutionParameteriv
8387 (target GLenum)
8388 (pname GLenum)
8389 (params GLint-*)
8390 ->
8391 void))
8392 "Get convolution parameters.
8393
8394 TARGET
8395 The filter whose parameters are to be retrieved. Must be one of
8396 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D'.
8397
8398 PNAME
8399 The parameter to be retrieved. Must be one of
8400 `GL_CONVOLUTION_BORDER_MODE', `GL_CONVOLUTION_BORDER_COLOR',
8401 `GL_CONVOLUTION_FILTER_SCALE', `GL_CONVOLUTION_FILTER_BIAS',
8402 `GL_CONVOLUTION_FORMAT', `GL_CONVOLUTION_WIDTH',
8403 `GL_CONVOLUTION_HEIGHT', `GL_MAX_CONVOLUTION_WIDTH', or
8404 `GL_MAX_CONVOLUTION_HEIGHT'.
8405
8406 PARAMS
8407 Pointer to storage for the parameters to be retrieved.
8408
8409 `glGetConvolutionParameter' retrieves convolution parameters. TARGET
8410 determines which convolution filter is queried. PNAME determines which
8411 parameter is returned:
8412
8413 `GL_CONVOLUTION_BORDER_MODE'
8414
8415
8416 The convolution border mode. See `glConvolutionParameter' for a
8417 list of border modes.
8418
8419 `GL_CONVOLUTION_BORDER_COLOR'
8420
8421
8422 The current convolution border color. PARAMS must be a pointer to
8423 an array of four elements, which will receive the red, green, blue,
8424 and alpha border colors.
8425
8426 `GL_CONVOLUTION_FILTER_SCALE'
8427
8428
8429 The current filter scale factors. PARAMS must be a pointer to an
8430 array of four elements, which will receive the red, green, blue,
8431 and alpha filter scale factors in that order.
8432
8433 `GL_CONVOLUTION_FILTER_BIAS'
8434
8435
8436 The current filter bias factors. PARAMS must be a pointer to an
8437 array of four elements, which will receive the red, green, blue,
8438 and alpha filter bias terms in that order.
8439
8440 `GL_CONVOLUTION_FORMAT'
8441
8442
8443 The current internal format. See `glConvolutionFilter1D',
8444 `glConvolutionFilter2D', and `glSeparableFilter2D' for lists of
8445 allowable formats.
8446
8447 `GL_CONVOLUTION_WIDTH'
8448
8449
8450 The current filter image width.
8451
8452 `GL_CONVOLUTION_HEIGHT'
8453
8454
8455 The current filter image height.
8456
8457 `GL_MAX_CONVOLUTION_WIDTH'
8458
8459
8460 The maximum acceptable filter image width.
8461
8462 `GL_MAX_CONVOLUTION_HEIGHT'
8463
8464
8465 The maximum acceptable filter image height.
8466
8467 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8468 values.
8469
8470 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
8471 values.
8472
8473 `GL_INVALID_ENUM' is generated if TARGET is `GL_CONVOLUTION_1D' and
8474 PNAME is `GL_CONVOLUTION_HEIGHT' or `GL_MAX_CONVOLUTION_HEIGHT'.
8475
8476 `GL_INVALID_OPERATION' is generated if `glGetConvolutionParameter' is
8477 executed between the execution of `glBegin' and the corresponding
8478 execution of `glEnd'.")
8479
8480 (define-gl-procedures
8481 ((glGetError -> GLenum))
8482 "Return error information.
8483
8484 `glGetError' returns the value of the error flag. Each detectable error
8485 is assigned a numeric code and symbolic name. When an error occurs, the
8486 error flag is set to the appropriate error code value. No other errors
8487 are recorded until `glGetError' is called, the error code is returned,
8488 and the flag is reset to `GL_NO_ERROR'. If a call to `glGetError'
8489 returns `GL_NO_ERROR', there has been no detectable error since the last
8490 call to `glGetError', or since the GL was initialized.
8491
8492 To allow for distributed implementations, there may be several error
8493 flags. If any single error flag has recorded an error, the value of that
8494 flag is returned and that flag is reset to `GL_NO_ERROR' when
8495 `glGetError' is called. If more than one flag has recorded an error,
8496 `glGetError' returns and clears an arbitrary error flag value. Thus,
8497 `glGetError' should always be called in a loop, until it returns
8498 `GL_NO_ERROR', if all error flags are to be reset.
8499
8500 Initially, all error flags are set to `GL_NO_ERROR'.
8501
8502 The following errors are currently defined:
8503
8504 `GL_NO_ERROR'
8505 No error has been recorded. The value of this symbolic constant is
8506 guaranteed to be 0.
8507
8508 `GL_INVALID_ENUM'
8509 An unacceptable value is specified for an enumerated argument. The
8510 offending command is ignored and has no other side effect than to
8511 set the error flag.
8512
8513 `GL_INVALID_VALUE'
8514 A numeric argument is out of range. The offending command is
8515 ignored and has no other side effect than to set the error flag.
8516
8517 `GL_INVALID_OPERATION'
8518 The specified operation is not allowed in the current state. The
8519 offending command is ignored and has no other side effect than to
8520 set the error flag.
8521
8522 `GL_STACK_OVERFLOW'
8523 This command would cause a stack overflow. The offending command is
8524 ignored and has no other side effect than to set the error flag.
8525
8526 `GL_STACK_UNDERFLOW'
8527 This command would cause a stack underflow. The offending command
8528 is ignored and has no other side effect than to set the error flag.
8529
8530 `GL_OUT_OF_MEMORY'
8531 There is not enough memory left to execute the command. The state
8532 of the GL is undefined, except for the state of the error flags,
8533 after this error is recorded.
8534
8535 `GL_TABLE_TOO_LARGE'
8536 The specified table exceeds the implementation's maximum supported
8537 table size. The offending command is ignored and has no other side
8538 effect than to set the error flag.
8539
8540 When an error flag is set, results of a GL operation are undefined only
8541 if `GL_OUT_OF_MEMORY' has occurred. In all other cases, the command
8542 generating the error is ignored and has no effect on the GL state or
8543 frame buffer contents. If the generating command returns a value, it
8544 returns 0. If `glGetError' itself generates an error, it returns 0.
8545
8546 `GL_INVALID_OPERATION' is generated if `glGetError' is executed between
8547 the execution of `glBegin' and the corresponding execution of `glEnd'.
8548 In this case, `glGetError' returns 0.")
8549
8550 (define-gl-procedures
8551 ((glGetHistogramParameterfv
8552 (target GLenum)
8553 (pname GLenum)
8554 (params GLfloat-*)
8555 ->
8556 void)
8557 (glGetHistogramParameteriv
8558 (target GLenum)
8559 (pname GLenum)
8560 (params GLint-*)
8561 ->
8562 void))
8563 "Get histogram parameters.
8564
8565 TARGET
8566 Must be one of `GL_HISTOGRAM' or `GL_PROXY_HISTOGRAM'.
8567
8568 PNAME
8569 The name of the parameter to be retrieved. Must be one of
8570 `GL_HISTOGRAM_WIDTH', `GL_HISTOGRAM_FORMAT',
8571 `GL_HISTOGRAM_RED_SIZE', `GL_HISTOGRAM_GREEN_SIZE',
8572 `GL_HISTOGRAM_BLUE_SIZE', `GL_HISTOGRAM_ALPHA_SIZE',
8573 `GL_HISTOGRAM_LUMINANCE_SIZE', or `GL_HISTOGRAM_SINK'.
8574
8575 PARAMS
8576 Pointer to storage for the returned values.
8577
8578 `glGetHistogramParameter' is used to query parameter values for the
8579 current histogram or for a proxy. The histogram state information may be
8580 queried by calling `glGetHistogramParameter' with a TARGET of
8581 `GL_HISTOGRAM' (to obtain information for the current histogram table)
8582 or `GL_PROXY_HISTOGRAM' (to obtain information from the most recent
8583 proxy request) and one of the following values for the PNAME argument:
8584
8585
8586
8587 *Parameter*
8588 *Description*
8589
8590 `GL_HISTOGRAM_WIDTH'
8591 Histogram table width
8592
8593 `GL_HISTOGRAM_FORMAT'
8594 Internal format
8595
8596 `GL_HISTOGRAM_RED_SIZE'
8597 Red component counter size, in bits
8598
8599 `GL_HISTOGRAM_GREEN_SIZE'
8600 Green component counter size, in bits
8601
8602 `GL_HISTOGRAM_BLUE_SIZE'
8603 Blue component counter size, in bits
8604
8605 `GL_HISTOGRAM_ALPHA_SIZE'
8606 Alpha component counter size, in bits
8607
8608 `GL_HISTOGRAM_LUMINANCE_SIZE'
8609 Luminance component counter size, in bits
8610
8611 `GL_HISTOGRAM_SINK'
8612 Value of the SINK parameter
8613
8614
8615
8616 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8617 values.
8618
8619 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
8620 values.
8621
8622 `GL_INVALID_OPERATION' is generated if `glGetHistogramParameter' is
8623 executed between the execution of `glBegin' and the corresponding
8624 execution of `glEnd'.")
8625
8626 (define-gl-procedures
8627 ((glGetHistogram
8628 (target GLenum)
8629 (reset GLboolean)
8630 (format GLenum)
8631 (type GLenum)
8632 (values GLvoid-*)
8633 ->
8634 void))
8635 "Get histogram table.
8636
8637 TARGET
8638 Must be `GL_HISTOGRAM'.
8639
8640 RESET
8641 If `GL_TRUE', each component counter that is actually returned is
8642 reset to zero. (Other counters are unaffected.) If `GL_FALSE', none
8643 of the counters in the histogram table is modified.
8644
8645 FORMAT
8646 The format of values to be returned in VALUES. Must be one of
8647 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
8648 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
8649
8650 TYPE
8651 The type of values to be returned in VALUES. Symbolic constants
8652 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8653 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
8654 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8655 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
8656 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8657 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8658 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8659 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
8660 are accepted.
8661
8662 VALUES
8663 A pointer to storage for the returned histogram table.
8664
8665 `glGetHistogram' returns the current histogram table as a
8666 one-dimensional image with the same width as the histogram. No pixel
8667 transfer operations are performed on this image, but pixel storage modes
8668 that are applicable to 1D images are honored.
8669
8670 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8671 target (see `glBindBuffer') while a histogram table is requested, VALUES
8672 is treated as a byte offset into the buffer object's data store.
8673
8674 Color components that are requested in the specified FORMAT, but which
8675 are not included in the internal format of the histogram, are returned
8676 as zero. The assignments of internal color components to the components
8677 requested by FORMAT are:
8678
8679 *Internal Component*
8680 *Resulting Component*
8681
8682 Red
8683 Red
8684
8685 Green
8686 Green
8687
8688 Blue
8689 Blue
8690
8691 Alpha
8692 Alpha
8693
8694 Luminance
8695 Red
8696
8697
8698
8699 `GL_INVALID_ENUM' is generated if TARGET is not `GL_HISTOGRAM'.
8700
8701 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
8702 values.
8703
8704 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
8705 values.
8706
8707 `GL_INVALID_OPERATION' is generated if TYPE is one of
8708 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8709 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
8710 is not `GL_RGB'.
8711
8712 `GL_INVALID_OPERATION' is generated if TYPE is one of
8713 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8714 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8715 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8716 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
8717 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
8718
8719 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8720 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8721 store is currently mapped.
8722
8723 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8724 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8725 to the buffer object such that the memory writes required would exceed
8726 the data store size.
8727
8728 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8729 bound to the `GL_PIXEL_PACK_BUFFER' target and VALUES is not evenly
8730 divisible into the number of bytes needed to store in memory a datum
8731 indicated by TYPE.
8732
8733 `GL_INVALID_OPERATION' is generated if `glGetHistogram' is executed
8734 between the execution of `glBegin' and the corresponding execution of
8735 `glEnd'.")
8736
8737 (define-gl-procedures
8738 ((glGetLightfv
8739 (light GLenum)
8740 (pname GLenum)
8741 (params GLfloat-*)
8742 ->
8743 void)
8744 (glGetLightiv
8745 (light GLenum)
8746 (pname GLenum)
8747 (params GLint-*)
8748 ->
8749 void))
8750 "Return light source parameter values.
8751
8752 LIGHT
8753 Specifies a light source. The number of possible lights depends on
8754 the implementation, but at least eight lights are supported. They
8755 are identified by symbolic names of the form `GL_LIGHT' I where I
8756 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
8757
8758 PNAME
8759 Specifies a light source parameter for LIGHT. Accepted symbolic
8760 names are `GL_AMBIENT', `GL_DIFFUSE', `GL_SPECULAR', `GL_POSITION',
8761 `GL_SPOT_DIRECTION', `GL_SPOT_EXPONENT', `GL_SPOT_CUTOFF',
8762 `GL_CONSTANT_ATTENUATION', `GL_LINEAR_ATTENUATION', and
8763 `GL_QUADRATIC_ATTENUATION'.
8764
8765 PARAMS
8766 Returns the requested data.
8767
8768 `glGetLight' returns in PARAMS the value or values of a light source
8769 parameter. LIGHT names the light and is a symbolic name of the form
8770 `GL_LIGHT'I where i ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
8771 `GL_MAX_LIGHTS' is an implementation dependent constant that is greater
8772 than or equal to eight. PNAME specifies one of ten light source
8773 parameters, again by symbolic name.
8774
8775 The following parameters are defined:
8776
8777 `GL_AMBIENT'
8778 PARAMS returns four integer or floating-point values representing
8779 the ambient intensity of the light source. Integer values, when
8780 requested, are linearly mapped from the internal floating-point
8781 representation such that 1.0 maps to the most positive
8782 representable integer value, and -1.0 maps to the most negative
8783 representable integer value. If the internal value is outside the
8784 range [-1,1] , the corresponding integer return value is undefined.
8785 The initial value is (0, 0, 0, 1).
8786
8787 `GL_DIFFUSE'
8788 PARAMS returns four integer or floating-point values representing
8789 the diffuse intensity of the light source. Integer values, when
8790 requested, are linearly mapped from the internal floating-point
8791 representation such that 1.0 maps to the most positive
8792 representable integer value, and -1.0 maps to the most negative
8793 representable integer value. If the internal value is outside the
8794 range [-1,1] , the corresponding integer return value is undefined.
8795 The initial value for `GL_LIGHT0' is (1, 1, 1, 1); for other
8796 lights, the initial value is (0, 0, 0, 0).
8797
8798 `GL_SPECULAR'
8799 PARAMS returns four integer or floating-point values representing
8800 the specular intensity of the light source. Integer values, when
8801 requested, are linearly mapped from the internal floating-point
8802 representation such that 1.0 maps to the most positive
8803 representable integer value, and -1.0 maps to the most negative
8804 representable integer value. If the internal value is outside the
8805 range [-1,1] , the corresponding integer return value is undefined.
8806 The initial value for `GL_LIGHT0' is (1, 1, 1, 1); for other
8807 lights, the initial value is (0, 0, 0, 0).
8808
8809 `GL_POSITION'
8810 PARAMS returns four integer or floating-point values representing
8811 the position of the light source. Integer values, when requested,
8812 are computed by rounding the internal floating-point values to the
8813 nearest integer value. The returned values are those maintained in
8814 eye coordinates. They will not be equal to the values specified
8815 using `glLight', unless the modelview matrix was identity at the
8816 time `glLight' was called. The initial value is (0, 0, 1, 0).
8817
8818 `GL_SPOT_DIRECTION'
8819 PARAMS returns three integer or floating-point values representing
8820 the direction of the light source. Integer values, when requested,
8821 are computed by rounding the internal floating-point values to the
8822 nearest integer value. The returned values are those maintained in
8823 eye coordinates. They will not be equal to the values specified
8824 using `glLight', unless the modelview matrix was identity at the
8825 time `glLight' was called. Although spot direction is normalized
8826 before being used in the lighting equation, the returned values are
8827 the transformed versions of the specified values prior to
8828 normalization. The initial value is (0,0-1) .
8829
8830 `GL_SPOT_EXPONENT'
8831 PARAMS returns a single integer or floating-point value
8832 representing the spot exponent of the light. An integer value, when
8833 requested, is computed by rounding the internal floating-point
8834 representation to the nearest integer. The initial value is 0.
8835
8836 `GL_SPOT_CUTOFF'
8837 PARAMS returns a single integer or floating-point value
8838 representing the spot cutoff angle of the light. An integer value,
8839 when requested, is computed by rounding the internal floating-point
8840 representation to the nearest integer. The initial value is 180.
8841
8842 `GL_CONSTANT_ATTENUATION'
8843 PARAMS returns a single integer or floating-point value
8844 representing the constant (not distance-related) attenuation of the
8845 light. An integer value, when requested, is computed by rounding
8846 the internal floating-point representation to the nearest integer.
8847 The initial value is 1.
8848
8849 `GL_LINEAR_ATTENUATION'
8850 PARAMS returns a single integer or floating-point value
8851 representing the linear attenuation of the light. An integer value,
8852 when requested, is computed by rounding the internal floating-point
8853 representation to the nearest integer. The initial value is 0.
8854
8855 `GL_QUADRATIC_ATTENUATION'
8856 PARAMS returns a single integer or floating-point value
8857 representing the quadratic attenuation of the light. An integer
8858 value, when requested, is computed by rounding the internal
8859 floating-point representation to the nearest integer. The initial
8860 value is 0.
8861
8862 `GL_INVALID_ENUM' is generated if LIGHT or PNAME is not an accepted
8863 value.
8864
8865 `GL_INVALID_OPERATION' is generated if `glGetLight' is executed between
8866 the execution of `glBegin' and the corresponding execution of `glEnd'.")
8867
8868 (define-gl-procedures
8869 ((glGetMapfv
8870 (target GLenum)
8871 (query GLenum)
8872 (v GLfloat-*)
8873 ->
8874 void)
8875 (glGetMapiv
8876 (target GLenum)
8877 (query GLenum)
8878 (v GLint-*)
8879 ->
8880 void))
8881 "Return evaluator parameters.
8882
8883 TARGET
8884 Specifies the symbolic name of a map. Accepted values are
8885 `GL_MAP1_COLOR_4', `GL_MAP1_INDEX', `GL_MAP1_NORMAL',
8886 `GL_MAP1_TEXTURE_COORD_1', `GL_MAP1_TEXTURE_COORD_2',
8887 `GL_MAP1_TEXTURE_COORD_3', `GL_MAP1_TEXTURE_COORD_4',
8888 `GL_MAP1_VERTEX_3', `GL_MAP1_VERTEX_4', `GL_MAP2_COLOR_4',
8889 `GL_MAP2_INDEX', `GL_MAP2_NORMAL', `GL_MAP2_TEXTURE_COORD_1',
8890 `GL_MAP2_TEXTURE_COORD_2', `GL_MAP2_TEXTURE_COORD_3',
8891 `GL_MAP2_TEXTURE_COORD_4', `GL_MAP2_VERTEX_3', and
8892 `GL_MAP2_VERTEX_4'.
8893
8894 QUERY
8895 Specifies which parameter to return. Symbolic names `GL_COEFF',
8896 `GL_ORDER', and `GL_DOMAIN' are accepted.
8897
8898 V
8899 Returns the requested data.
8900
8901 `glMap1' and `glMap2' define evaluators. `glGetMap' returns evaluator
8902 parameters. TARGET chooses a map, QUERY selects a specific parameter,
8903 and V points to storage where the values will be returned.
8904
8905 The acceptable values for the TARGET parameter are described in the
8906 `glMap1' and `glMap2' reference pages.
8907
8908 QUERY can assume the following values:
8909
8910 `GL_COEFF'
8911 V returns the control points for the evaluator function.
8912 One-dimensional evaluators return ORDER control points, and
8913 two-dimensional evaluators return UORDER×VORDER control points.
8914 Each control point consists of one, two, three, or four integer,
8915 single-precision floating-point, or double-precision floating-point
8916 values, depending on the type of the evaluator. The GL returns
8917 two-dimensional control points in row-major order, incrementing the
8918 UORDER index quickly and the VORDER index after each row. Integer
8919 values, when requested, are computed by rounding the internal
8920 floating-point values to the nearest integer values.
8921
8922 `GL_ORDER'
8923 V returns the order of the evaluator function. One-dimensional
8924 evaluators return a single value, ORDER . The initial value is 1.
8925 Two-dimensional evaluators return two values, UORDER and VORDER .
8926 The initial value is 1,1.
8927
8928 `GL_DOMAIN'
8929 V returns the linear U and V mapping parameters. One-dimensional
8930 evaluators return two values, U1 and U2 , as specified by `glMap1'.
8931 Two-dimensional evaluators return four values ( U1 , U2 , V1 , and
8932 V2 ) as specified by `glMap2'. Integer values, when requested, are
8933 computed by rounding the internal floating-point values to the
8934 nearest integer values.
8935
8936 `GL_INVALID_ENUM' is generated if either TARGET or QUERY is not an
8937 accepted value.
8938
8939 `GL_INVALID_OPERATION' is generated if `glGetMap' is executed between
8940 the execution of `glBegin' and the corresponding execution of `glEnd'.")
8941
8942 (define-gl-procedures
8943 ((glGetMaterialfv
8944 (face GLenum)
8945 (pname GLenum)
8946 (params GLfloat-*)
8947 ->
8948 void)
8949 (glGetMaterialiv
8950 (face GLenum)
8951 (pname GLenum)
8952 (params GLint-*)
8953 ->
8954 void))
8955 "Return material parameters.
8956
8957 FACE
8958 Specifies which of the two materials is being queried. `GL_FRONT'
8959 or `GL_BACK' are accepted, representing the front and back
8960 materials, respectively.
8961
8962 PNAME
8963 Specifies the material parameter to return. `GL_AMBIENT',
8964 `GL_DIFFUSE', `GL_SPECULAR', `GL_EMISSION', `GL_SHININESS', and
8965 `GL_COLOR_INDEXES' are accepted.
8966
8967 PARAMS
8968 Returns the requested data.
8969
8970 `glGetMaterial' returns in PARAMS the value or values of parameter PNAME
8971 of material FACE. Six parameters are defined:
8972
8973 `GL_AMBIENT'
8974 PARAMS returns four integer or floating-point values representing
8975 the ambient reflectance of the material. Integer values, when
8976 requested, are linearly mapped from the internal floating-point
8977 representation such that 1.0 maps to the most positive
8978 representable integer value, and -1.0 maps to the most negative
8979 representable integer value. If the internal value is outside the
8980 range [-1,1] , the corresponding integer return value is undefined.
8981 The initial value is (0.2, 0.2, 0.2, 1.0)
8982
8983 `GL_DIFFUSE'
8984 PARAMS returns four integer or floating-point values representing
8985 the diffuse reflectance of the material. Integer values, when
8986 requested, are linearly mapped from the internal floating-point
8987 representation such that 1.0 maps to the most positive
8988 representable integer value, and -1.0 maps to the most negative
8989 representable integer value. If the internal value is outside the
8990 range [-1,1] , the corresponding integer return value is undefined.
8991 The initial value is (0.8, 0.8, 0.8, 1.0).
8992
8993 `GL_SPECULAR'
8994 PARAMS returns four integer or floating-point values representing
8995 the specular reflectance of the material. Integer values, when
8996 requested, are linearly mapped from the internal floating-point
8997 representation such that 1.0 maps to the most positive
8998 representable integer value, and -1.0 maps to the most negative
8999 representable integer value. If the internal value is outside the
9000 range [-1,1] , the corresponding integer return value is undefined.
9001 The initial value is (0, 0, 0, 1).
9002
9003 `GL_EMISSION'
9004 PARAMS returns four integer or floating-point values representing
9005 the emitted light intensity of the material. Integer values, when
9006 requested, are linearly mapped from the internal floating-point
9007 representation such that 1.0 maps to the most positive
9008 representable integer value, and -1.0 maps to the most negative
9009 representable integer value. If the internal value is outside the
9010 range [-1,1] , the corresponding integer return value is undefined.
9011 The initial value is (0, 0, 0, 1).
9012
9013 `GL_SHININESS'
9014 PARAMS returns one integer or floating-point value representing the
9015 specular exponent of the material. Integer values, when requested,
9016 are computed by rounding the internal floating-point value to the
9017 nearest integer value. The initial value is 0.
9018
9019 `GL_COLOR_INDEXES'
9020 PARAMS returns three integer or floating-point values representing
9021 the ambient, diffuse, and specular indices of the material. These
9022 indices are used only for color index lighting. (All the other
9023 parameters are used only for RGBA lighting.) Integer values, when
9024 requested, are computed by rounding the internal floating-point
9025 values to the nearest integer values.
9026
9027 `GL_INVALID_ENUM' is generated if FACE or PNAME is not an accepted
9028 value.
9029
9030 `GL_INVALID_OPERATION' is generated if `glGetMaterial' is executed
9031 between the execution of `glBegin' and the corresponding execution of
9032 `glEnd'.")
9033
9034 (define-gl-procedures
9035 ((glGetMinmaxParameterfv
9036 (target GLenum)
9037 (pname GLenum)
9038 (params GLfloat-*)
9039 ->
9040 void)
9041 (glGetMinmaxParameteriv
9042 (target GLenum)
9043 (pname GLenum)
9044 (params GLint-*)
9045 ->
9046 void))
9047 "Get minmax parameters.
9048
9049 TARGET
9050 Must be `GL_MINMAX'.
9051
9052 PNAME
9053 The parameter to be retrieved. Must be one of `GL_MINMAX_FORMAT' or
9054 `GL_MINMAX_SINK'.
9055
9056 PARAMS
9057 A pointer to storage for the retrieved parameters.
9058
9059 `glGetMinmaxParameter' retrieves parameters for the current minmax table
9060 by setting PNAME to one of the following values:
9061
9062
9063
9064 *Parameter*
9065 *Description*
9066
9067 `GL_MINMAX_FORMAT'
9068 Internal format of minmax table
9069
9070 `GL_MINMAX_SINK'
9071 Value of the SINK parameter
9072
9073
9074
9075 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
9076
9077 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
9078 values.
9079
9080 `GL_INVALID_OPERATION' is generated if `glGetMinmaxParameter' is
9081 executed between the execution of `glBegin' and the corresponding
9082 execution of `glEnd'.")
9083
9084 (define-gl-procedures
9085 ((glGetMinmax
9086 (target GLenum)
9087 (reset GLboolean)
9088 (format GLenum)
9089 (types GLenum)
9090 (values GLvoid-*)
9091 ->
9092 void))
9093 "Get minimum and maximum pixel values.
9094
9095 TARGET
9096 Must be `GL_MINMAX'.
9097
9098 RESET
9099 If `GL_TRUE', all entries in the minmax table that are actually
9100 returned are reset to their initial values. (Other entries are
9101 unaltered.) If `GL_FALSE', the minmax table is unaltered.
9102
9103 FORMAT
9104 The format of the data to be returned in VALUES. Must be one of
9105 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
9106 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
9107
9108 TYPES
9109 The type of the data to be returned in VALUES. Symbolic constants
9110 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
9111 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9112 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9113 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9114 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9115 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9116 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9117 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9118 are accepted.
9119
9120 VALUES
9121 A pointer to storage for the returned values.
9122
9123 `glGetMinmax' returns the accumulated minimum and maximum pixel values
9124 (computed on a per-component basis) in a one-dimensional image of width
9125 2. The first set of return values are the minima, and the second set of
9126 return values are the maxima. The format of the return values is
9127 determined by FORMAT, and their type is determined by TYPES.
9128
9129 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9130 target (see `glBindBuffer') while minimum and maximum pixel values are
9131 requested, VALUES is treated as a byte offset into the buffer object's
9132 data store.
9133
9134 No pixel transfer operations are performed on the return values, but
9135 pixel storage modes that are applicable to one-dimensional images are
9136 performed. Color components that are requested in the specified FORMAT,
9137 but that are not included in the internal format of the minmax table,
9138 are returned as zero. The assignment of internal color components to the
9139 components requested by FORMAT are as follows:
9140
9141
9142
9143 *Internal Component*
9144 *Resulting Component*
9145
9146 Red
9147 Red
9148
9149 Green
9150 Green
9151
9152 Blue
9153 Blue
9154
9155 Alpha
9156 Alpha
9157
9158 Luminance
9159 Red
9160
9161 If RESET is `GL_TRUE', the minmax table entries corresponding to the
9162 return values are reset to their initial values. Minimum and maximum
9163 values that are not returned are not modified, even if RESET is
9164 `GL_TRUE'.
9165
9166 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
9167
9168 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
9169 values.
9170
9171 `GL_INVALID_ENUM' is generated if TYPES is not one of the allowable
9172 values.
9173
9174 `GL_INVALID_OPERATION' is generated if TYPES is one of
9175 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9176 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
9177 is not `GL_RGB'.
9178
9179 `GL_INVALID_OPERATION' is generated if TYPES is one of
9180 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9181 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9182 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9183 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
9184 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
9185
9186 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9187 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9188 store is currently mapped.
9189
9190 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9191 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9192 to the buffer object such that the memory writes required would exceed
9193 the data store size.
9194
9195 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9196 bound to the `GL_PIXEL_PACK_BUFFER' target and VALUES is not evenly
9197 divisible into the number of bytes needed to store in memory a datum
9198 indicated by TYPE.
9199
9200 `GL_INVALID_OPERATION' is generated if `glGetMinmax' is executed between
9201 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9202
9203 (define-gl-procedures
9204 ((glGetPixelMapfv
9205 (map GLenum)
9206 (data GLfloat-*)
9207 ->
9208 void)
9209 (glGetPixelMapuiv
9210 (map GLenum)
9211 (data GLuint-*)
9212 ->
9213 void))
9214 "Return the specified pixel map.
9215
9216 MAP
9217 Specifies the name of the pixel map to return. Accepted values are
9218 `GL_PIXEL_MAP_I_TO_I', `GL_PIXEL_MAP_S_TO_S',
9219 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
9220 `GL_PIXEL_MAP_I_TO_B', `GL_PIXEL_MAP_I_TO_A',
9221 `GL_PIXEL_MAP_R_TO_R', `GL_PIXEL_MAP_G_TO_G',
9222 `GL_PIXEL_MAP_B_TO_B', and `GL_PIXEL_MAP_A_TO_A'.
9223
9224 DATA
9225 Returns the pixel map contents.
9226
9227 See the `glPixelMap' reference page for a description of the acceptable
9228 values for the MAP parameter. `glGetPixelMap' returns in DATA the
9229 contents of the pixel map specified in MAP. Pixel maps are used during
9230 the execution of `glReadPixels', `glDrawPixels', `glCopyPixels',
9231 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glTexSubImage1D',
9232 `glTexSubImage2D', `glTexSubImage3D', `glCopyTexImage1D',
9233 `glCopyTexImage2D', `glCopyTexSubImage1D', `glCopyTexSubImage2D', and
9234 `glCopyTexSubImage3D'. to map color indices, stencil indices, color
9235 components, and depth components to other values.
9236
9237 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9238 target (see `glBindBuffer') while a pixel map is requested, DATA is
9239 treated as a byte offset into the buffer object's data store.
9240
9241 Unsigned integer values, if requested, are linearly mapped from the
9242 internal fixed or floating-point representation such that 1.0 maps to
9243 the largest representable integer value, and 0.0 maps to 0. Return
9244 unsigned integer values are undefined if the map value was not in the
9245 range [0,1].
9246
9247 To determine the required size of MAP, call `glGet' with the appropriate
9248 symbolic constant.
9249
9250 `GL_INVALID_ENUM' is generated if MAP is not an accepted value.
9251
9252 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9253 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9254 store is currently mapped.
9255
9256 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9257 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9258 to the buffer object such that the memory writes required would exceed
9259 the data store size.
9260
9261 `GL_INVALID_OPERATION' is generated by `glGetPixelMapfv' if a non-zero
9262 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9263 DATA is not evenly divisible into the number of bytes needed to store in
9264 memory a GLfloat datum.
9265
9266 `GL_INVALID_OPERATION' is generated by `glGetPixelMapuiv' if a non-zero
9267 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9268 DATA is not evenly divisible into the number of bytes needed to store in
9269 memory a GLuint datum.
9270
9271 `GL_INVALID_OPERATION' is generated by `glGetPixelMapusv' if a non-zero
9272 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9273 DATA is not evenly divisible into the number of bytes needed to store in
9274 memory a GLushort datum.
9275
9276 `GL_INVALID_OPERATION' is generated if `glGetPixelMap' is executed
9277 between the execution of `glBegin' and the corresponding execution of
9278 `glEnd'.")
9279
9280 (define-gl-procedures
9281 ((glGetPointerv
9282 (pname GLenum)
9283 (params GLvoid-**)
9284 ->
9285 void))
9286 "Return the address of the specified pointer.
9287
9288 PNAME
9289 Specifies the array or buffer pointer to be returned. Symbolic
9290 constants `GL_COLOR_ARRAY_POINTER', `GL_EDGE_FLAG_ARRAY_POINTER',
9291 `GL_FOG_COORD_ARRAY_POINTER', `GL_FEEDBACK_BUFFER_POINTER',
9292 `GL_INDEX_ARRAY_POINTER', `GL_NORMAL_ARRAY_POINTER',
9293 `GL_SECONDARY_COLOR_ARRAY_POINTER', `GL_SELECTION_BUFFER_POINTER',
9294 `GL_TEXTURE_COORD_ARRAY_POINTER', or `GL_VERTEX_ARRAY_POINTER' are
9295 accepted.
9296
9297 PARAMS
9298 Returns the pointer value specified by PNAME.
9299
9300 `glGetPointerv' returns pointer information. PNAME is a symbolic
9301 constant indicating the pointer to be returned, and PARAMS is a pointer
9302 to a location in which to place the returned data.
9303
9304 For all PNAME arguments except `GL_FEEDBACK_BUFFER_POINTER' and
9305 `GL_SELECTION_BUFFER_POINTER', if a non-zero named buffer object was
9306 bound to the `GL_ARRAY_BUFFER' target (see `glBindBuffer') when the
9307 desired pointer was previously specified, the pointer returned is a byte
9308 offset into the buffer object's data store. Buffer objects are only
9309 available in OpenGL versions 1.5 and greater.
9310
9311 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.")
9312
9313 (define-gl-procedures
9314 ((glGetPolygonStipple (pattern GLubyte-*) -> void))
9315 "Return the polygon stipple pattern.
9316
9317 PATTERN
9318 Returns the stipple pattern. The initial value is all 1's.
9319
9320 `glGetPolygonStipple' returns to PATTERN a 32×32 polygon stipple
9321 pattern. The pattern is packed into memory as if `glReadPixels' with
9322 both HEIGHT and WIDTH of 32, TYPE of `GL_BITMAP', and FORMAT of
9323 `GL_COLOR_INDEX' were called, and the stipple pattern were stored in an
9324 internal 32×32 color index buffer. Unlike `glReadPixels', however, pixel
9325 transfer operations (shift, offset, pixel map) are not applied to the
9326 returned stipple image.
9327
9328 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9329 target (see `glBindBuffer') while a polygon stipple pattern is
9330 requested, PATTERN is treated as a byte offset into the buffer object's
9331 data store.
9332
9333 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9334 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9335 store is currently mapped.
9336
9337 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9338 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9339 to the buffer object such that the memory writes required would exceed
9340 the data store size.
9341
9342 `GL_INVALID_OPERATION' is generated if `glGetPolygonStipple' is executed
9343 between the execution of `glBegin' and the corresponding execution of
9344 `glEnd'.")
9345
9346 (define-gl-procedures
9347 ((glGetProgramInfoLog
9348 (program GLuint)
9349 (maxLength GLsizei)
9350 (length GLsizei-*)
9351 (infoLog GLchar-*)
9352 ->
9353 void))
9354 "Returns the information log for a program object.
9355
9356 PROGRAM
9357 Specifies the program object whose information log is to be
9358 queried.
9359
9360 MAXLENGTH
9361 Specifies the size of the character buffer for storing the returned
9362 information log.
9363
9364 LENGTH
9365 Returns the length of the string returned in INFOLOG (excluding the
9366 null terminator).
9367
9368 INFOLOG
9369 Specifies an array of characters that is used to return the
9370 information log.
9371
9372 `glGetProgramInfoLog' returns the information log for the specified
9373 program object. The information log for a program object is modified
9374 when the program object is linked or validated. The string that is
9375 returned will be null terminated.
9376
9377 `glGetProgramInfoLog' returns in INFOLOG as much of the information log
9378 as it can, up to a maximum of MAXLENGTH characters. The number of
9379 characters actually returned, excluding the null termination character,
9380 is specified by LENGTH. If the length of the returned string is not
9381 required, a value of `NULL' can be passed in the LENGTH argument. The
9382 size of the buffer required to store the returned information log can be
9383 obtained by calling `glGetProgram' with the value `GL_INFO_LOG_LENGTH'.
9384
9385 The information log for a program object is either an empty string, or a
9386 string containing information about the last link operation, or a string
9387 containing information about the last validation operation. It may
9388 contain diagnostic messages, warning messages, and other information.
9389 When a program object is created, its information log will be a string
9390 of length 0.
9391
9392 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
9393 OpenGL.
9394
9395 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
9396
9397 `GL_INVALID_VALUE' is generated if MAXLENGTH is less than 0.
9398
9399 `GL_INVALID_OPERATION' is generated if `glGetProgramInfoLog' is executed
9400 between the execution of `glBegin' and the corresponding execution of
9401 `glEnd'.")
9402
9403 (define-gl-procedures
9404 ((glGetProgramiv
9405 (program GLuint)
9406 (pname GLenum)
9407 (params GLint-*)
9408 ->
9409 void))
9410 "Returns a parameter from a program object.
9411
9412 PROGRAM
9413 Specifies the program object to be queried.
9414
9415 PNAME
9416 Specifies the object parameter. Accepted symbolic names are
9417 `GL_DELETE_STATUS', `GL_LINK_STATUS', `GL_VALIDATE_STATUS',
9418 `GL_INFO_LOG_LENGTH', `GL_ATTACHED_SHADERS',
9419 `GL_ACTIVE_ATTRIBUTES', `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH',
9420 `GL_ACTIVE_UNIFORMS', `GL_ACTIVE_UNIFORM_MAX_LENGTH'.
9421
9422 PARAMS
9423 Returns the requested object parameter.
9424
9425 `glGetProgram' returns in PARAMS the value of a parameter for a specific
9426 program object. The following parameters are defined:
9427
9428 `GL_DELETE_STATUS'
9429
9430
9431 PARAMS returns `GL_TRUE' if PROGRAM is currently flagged for
9432 deletion, and `GL_FALSE' otherwise.
9433
9434 `GL_LINK_STATUS'
9435
9436
9437 PARAMS returns `GL_TRUE' if the last link operation on PROGRAM was
9438 successful, and `GL_FALSE' otherwise.
9439
9440 `GL_VALIDATE_STATUS'
9441
9442
9443 PARAMS returns `GL_TRUE' or if the last validation operation on
9444 PROGRAM was successful, and `GL_FALSE' otherwise.
9445
9446 `GL_INFO_LOG_LENGTH'
9447
9448
9449 PARAMS returns the number of characters in the information log for
9450 PROGRAM including the null termination character (i.e., the size of
9451 the character buffer required to store the information log). If
9452 PROGRAM has no information log, a value of 0 is returned.
9453
9454 `GL_ATTACHED_SHADERS'
9455
9456
9457 PARAMS returns the number of shader objects attached to PROGRAM.
9458
9459 `GL_ACTIVE_ATTRIBUTES'
9460
9461
9462 PARAMS returns the number of active attribute variables for
9463 PROGRAM.
9464
9465 `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH'
9466
9467
9468 PARAMS returns the length of the longest active attribute name for
9469 PROGRAM, including the null termination character (i.e., the size
9470 of the character buffer required to store the longest attribute
9471 name). If no active attributes exist, 0 is returned.
9472
9473 `GL_ACTIVE_UNIFORMS'
9474
9475
9476 PARAMS returns the number of active uniform variables for PROGRAM.
9477
9478 `GL_ACTIVE_UNIFORM_MAX_LENGTH'
9479
9480
9481 PARAMS returns the length of the longest active uniform variable
9482 name for PROGRAM, including the null termination character (i.e.,
9483 the size of the character buffer required to store the longest
9484 uniform variable name). If no active uniform variables exist, 0 is
9485 returned.
9486
9487 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
9488 OpenGL.
9489
9490 `GL_INVALID_OPERATION' is generated if PROGRAM does not refer to a
9491 program object.
9492
9493 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
9494
9495 `GL_INVALID_OPERATION' is generated if `glGetProgram' is executed
9496 between the execution of `glBegin' and the corresponding execution of
9497 `glEnd'.")
9498
9499 (define-gl-procedures
9500 ((glGetQueryiv
9501 (target GLenum)
9502 (pname GLenum)
9503 (params GLint-*)
9504 ->
9505 void))
9506 "Return parameters of a query object target.
9507
9508 TARGET
9509 Specifies a query object target. Must be `GL_SAMPLES_PASSED'.
9510
9511 PNAME
9512 Specifies the symbolic name of a query object target parameter.
9513 Accepted values are `GL_CURRENT_QUERY' or `GL_QUERY_COUNTER_BITS'.
9514
9515 PARAMS
9516 Returns the requested data.
9517
9518 `glGetQueryiv' returns in PARAMS a selected parameter of the query
9519 object target specified by TARGET.
9520
9521 PNAME names a specific query object target parameter. When TARGET is
9522 `GL_SAMPLES_PASSED', PNAME can be as follows:
9523
9524 `GL_CURRENT_QUERY'
9525 PARAMS returns the name of the currently active occlusion query
9526 object. If no occlusion query is active, 0 is returned. The initial
9527 value is 0.
9528
9529 `GL_QUERY_COUNTER_BITS'
9530 PARAMS returns the number of bits in the query counter used to
9531 accumulate passing samples. If the number of bits returned is 0,
9532 the implementation does not support a query counter, and the
9533 results obtained from `glGetQueryObject' are useless.
9534
9535 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
9536 value.
9537
9538 `GL_INVALID_OPERATION' is generated if `glGetQueryiv' is executed
9539 between the execution of `glBegin' and the corresponding execution of
9540 `glEnd'.")
9541
9542 (define-gl-procedures
9543 ((glGetQueryObjectiv
9544 (id GLuint)
9545 (pname GLenum)
9546 (params GLint-*)
9547 ->
9548 void)
9549 (glGetQueryObjectuiv
9550 (id GLuint)
9551 (pname GLenum)
9552 (params GLuint-*)
9553 ->
9554 void))
9555 "Return parameters of a query object.
9556
9557 ID
9558 Specifies the name of a query object.
9559
9560 PNAME
9561 Specifies the symbolic name of a query object parameter. Accepted
9562 values are `GL_QUERY_RESULT' or `GL_QUERY_RESULT_AVAILABLE'.
9563
9564 PARAMS
9565 Returns the requested data.
9566
9567 `glGetQueryObject' returns in PARAMS a selected parameter of the query
9568 object specified by ID.
9569
9570 PNAME names a specific query object parameter. PNAME can be as follows:
9571
9572 `GL_QUERY_RESULT'
9573 PARAMS returns the value of the query object's passed samples
9574 counter. The initial value is 0.
9575
9576 `GL_QUERY_RESULT_AVAILABLE'
9577 PARAMS returns whether the passed samples counter is immediately
9578 available. If a delay would occur waiting for the query result,
9579 `GL_FALSE' is returned. Otherwise, `GL_TRUE' is returned, which
9580 also indicates that the results of all previous queries are
9581 available as well.
9582
9583 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
9584
9585 `GL_INVALID_OPERATION' is generated if ID is not the name of a query
9586 object.
9587
9588 `GL_INVALID_OPERATION' is generated if ID is the name of a currently
9589 active query object.
9590
9591 `GL_INVALID_OPERATION' is generated if `glGetQueryObject' is executed
9592 between the execution of `glBegin' and the corresponding execution of
9593 `glEnd'.")
9594
9595 (define-gl-procedures
9596 ((glGetSeparableFilter
9597 (target GLenum)
9598 (format GLenum)
9599 (type GLenum)
9600 (row GLvoid-*)
9601 (column GLvoid-*)
9602 (span GLvoid-*)
9603 ->
9604 void))
9605 "Get separable convolution filter kernel images.
9606
9607 TARGET
9608 The separable filter to be retrieved. Must be `GL_SEPARABLE_2D'.
9609
9610 FORMAT
9611 Format of the output images. Must be one of `GL_RED', `GL_GREEN',
9612 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR'`GL_RGBA', `GL_BGRA',
9613 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
9614
9615 TYPE
9616 Data type of components in the output images. Symbolic constants
9617 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
9618 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9619 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9620 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9621 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9622 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9623 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9624 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9625 are accepted.
9626
9627 ROW
9628 Pointer to storage for the row filter image.
9629
9630 COLUMN
9631 Pointer to storage for the column filter image.
9632
9633 SPAN
9634 Pointer to storage for the span filter image (currently unused).
9635
9636 `glGetSeparableFilter' returns the two one-dimensional filter kernel
9637 images for the current separable 2D convolution filter. The row image is
9638 placed in ROW and the column image is placed in COLUMN according to the
9639 specifications in FORMAT and TYPE. (In the current implementation, SPAN
9640 is not affected in any way.) No pixel transfer operations are performed
9641 on the images, but the relevant pixel storage modes are applied.
9642
9643 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9644 target (see `glBindBuffer') while a separable convolution filter is
9645 requested, ROW, COLUMN, and SPAN are treated as a byte offset into the
9646 buffer object's data store.
9647
9648 Color components that are present in FORMAT but not included in the
9649 internal format of the filters are returned as zero. The assignments of
9650 internal color components to the components of FORMAT are as follows:
9651
9652
9653
9654 *Internal Component*
9655 *Resulting Component*
9656
9657 Red
9658 Red
9659
9660 Green
9661 Green
9662
9663 Blue
9664 Blue
9665
9666 Alpha
9667 Alpha
9668
9669 Luminance
9670 Red
9671
9672 Intensity
9673 Red
9674
9675
9676
9677 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SEPARABLE_2D'.
9678
9679 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
9680 values.
9681
9682 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
9683 values.
9684
9685 `GL_INVALID_OPERATION' is generated if TYPE is one of
9686 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9687 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
9688 is not `GL_RGB'.
9689
9690 `GL_INVALID_OPERATION' is generated if TYPE is one of
9691 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9692 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9693 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9694 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
9695 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
9696
9697 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9698 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9699 store is currently mapped.
9700
9701 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9702 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9703 to the buffer object such that the memory writes required would exceed
9704 the data store size.
9705
9706 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9707 bound to the `GL_PIXEL_PACK_BUFFER' target and ROW or COLUMN is not
9708 evenly divisible into the number of bytes needed to store in memory a
9709 datum indicated by TYPE.
9710
9711 `GL_INVALID_OPERATION' is generated if `glGetSeparableFilter' is
9712 executed between the execution of `glBegin' and the corresponding
9713 execution of `glEnd'.")
9714
9715 (define-gl-procedures
9716 ((glGetShaderInfoLog
9717 (shader GLuint)
9718 (maxLength GLsizei)
9719 (length GLsizei-*)
9720 (infoLog GLchar-*)
9721 ->
9722 void))
9723 "Returns the information log for a shader object.
9724
9725 SHADER
9726 Specifies the shader object whose information log is to be queried.
9727
9728 MAXLENGTH
9729 Specifies the size of the character buffer for storing the returned
9730 information log.
9731
9732 LENGTH
9733 Returns the length of the string returned in INFOLOG (excluding the
9734 null terminator).
9735
9736 INFOLOG
9737 Specifies an array of characters that is used to return the
9738 information log.
9739
9740 `glGetShaderInfoLog' returns the information log for the specified
9741 shader object. The information log for a shader object is modified when
9742 the shader is compiled. The string that is returned will be null
9743 terminated.
9744
9745 `glGetShaderInfoLog' returns in INFOLOG as much of the information log
9746 as it can, up to a maximum of MAXLENGTH characters. The number of
9747 characters actually returned, excluding the null termination character,
9748 is specified by LENGTH. If the length of the returned string is not
9749 required, a value of `NULL' can be passed in the LENGTH argument. The
9750 size of the buffer required to store the returned information log can be
9751 obtained by calling `glGetShader' with the value `GL_INFO_LOG_LENGTH'.
9752
9753 The information log for a shader object is a string that may contain
9754 diagnostic messages, warning messages, and other information about the
9755 last compile operation. When a shader object is created, its information
9756 log will be a string of length 0.
9757
9758 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
9759 OpenGL.
9760
9761 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
9762
9763 `GL_INVALID_VALUE' is generated if MAXLENGTH is less than 0.
9764
9765 `GL_INVALID_OPERATION' is generated if `glGetShaderInfoLog' is executed
9766 between the execution of `glBegin' and the corresponding execution of
9767 `glEnd'.")
9768
9769 (define-gl-procedures
9770 ((glGetShaderSource
9771 (shader GLuint)
9772 (bufSize GLsizei)
9773 (length GLsizei-*)
9774 (source GLchar-*)
9775 ->
9776 void))
9777 "Returns the source code string from a shader object.
9778
9779 SHADER
9780 Specifies the shader object to be queried.
9781
9782 BUFSIZE
9783 Specifies the size of the character buffer for storing the returned
9784 source code string.
9785
9786 LENGTH
9787 Returns the length of the string returned in SOURCE (excluding the
9788 null terminator).
9789
9790 SOURCE
9791 Specifies an array of characters that is used to return the source
9792 code string.
9793
9794 `glGetShaderSource' returns the concatenation of the source code strings
9795 from the shader object specified by SHADER. The source code strings for
9796 a shader object are the result of a previous call to `glShaderSource'.
9797 The string returned by the function will be null terminated.
9798
9799 `glGetShaderSource' returns in SOURCE as much of the source code string
9800 as it can, up to a maximum of BUFSIZE characters. The number of
9801 characters actually returned, excluding the null termination character,
9802 is specified by LENGTH. If the length of the returned string is not
9803 required, a value of `NULL' can be passed in the LENGTH argument. The
9804 size of the buffer required to store the returned source code string can
9805 be obtained by calling `glGetShader' with the value
9806 `GL_SHADER_SOURCE_LENGTH'.
9807
9808 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
9809 OpenGL.
9810
9811 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
9812
9813 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.
9814
9815 `GL_INVALID_OPERATION' is generated if `glGetShaderSource' is executed
9816 between the execution of `glBegin' and the corresponding execution of
9817 `glEnd'.")
9818
9819 (define-gl-procedures
9820 ((glGetShaderiv
9821 (shader GLuint)
9822 (pname GLenum)
9823 (params GLint-*)
9824 ->
9825 void))
9826 "Returns a parameter from a shader object.
9827
9828 SHADER
9829 Specifies the shader object to be queried.
9830
9831 PNAME
9832 Specifies the object parameter. Accepted symbolic names are
9833 `GL_SHADER_TYPE', `GL_DELETE_STATUS', `GL_COMPILE_STATUS',
9834 `GL_INFO_LOG_LENGTH', `GL_SHADER_SOURCE_LENGTH'.
9835
9836 PARAMS
9837 Returns the requested object parameter.
9838
9839 `glGetShader' returns in PARAMS the value of a parameter for a specific
9840 shader object. The following parameters are defined:
9841
9842 `GL_SHADER_TYPE'
9843 PARAMS returns `GL_VERTEX_SHADER' if SHADER is a vertex shader
9844 object, and `GL_FRAGMENT_SHADER' if SHADER is a fragment shader
9845 object.
9846
9847 `GL_DELETE_STATUS'
9848 PARAMS returns `GL_TRUE' if SHADER is currently flagged for
9849 deletion, and `GL_FALSE' otherwise.
9850
9851 `GL_COMPILE_STATUS'
9852 PARAMS returns `GL_TRUE' if the last compile operation on SHADER
9853 was successful, and `GL_FALSE' otherwise.
9854
9855 `GL_INFO_LOG_LENGTH'
9856 PARAMS returns the number of characters in the information log for
9857 SHADER including the null termination character (i.e., the size of
9858 the character buffer required to store the information log). If
9859 SHADER has no information log, a value of 0 is returned.
9860
9861 `GL_SHADER_SOURCE_LENGTH'
9862 PARAMS returns the length of the concatenation of the source
9863 strings that make up the shader source for the SHADER, including
9864 the null termination character. (i.e., the size of the character
9865 buffer required to store the shader source). If no source code
9866 exists, 0 is returned.
9867
9868 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
9869 OpenGL.
9870
9871 `GL_INVALID_OPERATION' is generated if SHADER does not refer to a shader
9872 object.
9873
9874 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
9875
9876 `GL_INVALID_OPERATION' is generated if `glGetShader' is executed between
9877 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9878
9879 (define-gl-procedures
9880 ((glGetString (name GLenum) -> const-GLubyte*))
9881 "Return a string describing the current GL connection.
9882
9883 NAME
9884 Specifies a symbolic constant, one of `GL_VENDOR', `GL_RENDERER',
9885 `GL_VERSION', `GL_SHADING_LANGUAGE_VERSION', or `GL_EXTENSIONS'.
9886
9887 `glGetString' returns a pointer to a static string describing some
9888 aspect of the current GL connection. NAME can be one of the following:
9889
9890 `GL_VENDOR'
9891
9892
9893 Returns the company responsible for this GL implementation. This
9894 name does not change from release to release.
9895
9896 `GL_RENDERER'
9897
9898
9899 Returns the name of the renderer. This name is typically specific
9900 to a particular configuration of a hardware platform. It does not
9901 change from release to release.
9902
9903 `GL_VERSION'
9904
9905
9906 Returns a version or release number.
9907
9908 `GL_SHADING_LANGUAGE_VERSION'
9909
9910
9911 Returns a version or release number for the shading language.
9912
9913 `GL_EXTENSIONS'
9914
9915
9916 Returns a space-separated list of supported extensions to GL.
9917
9918 Because the GL does not include queries for the performance
9919 characteristics of an implementation, some applications are written to
9920 recognize known platforms and modify their GL usage based on known
9921 performance characteristics of these platforms. Strings `GL_VENDOR' and
9922 `GL_RENDERER' together uniquely specify a platform. They do not change
9923 from release to release and should be used by platform-recognition
9924 algorithms.
9925
9926 Some applications want to make use of features that are not part of the
9927 standard GL. These features may be implemented as extensions to the
9928 standard GL. The `GL_EXTENSIONS' string is a space-separated list of
9929 supported GL extensions. (Extension names never contain a space
9930 character.)
9931
9932 The `GL_VERSION' and `GL_SHADING_LANGUAGE_VERSION' strings begin with a
9933 version number. The version number uses one of these forms:
9934
9935 MAJOR_NUMBER.MINOR_NUMBERMAJOR_NUMBER.MINOR_NUMBER.RELEASE_NUMBER
9936
9937 Vendor-specific information may follow the version number. Its format
9938 depends on the implementation, but a space always separates the version
9939 number and the vendor-specific information.
9940
9941 All strings are null-terminated.
9942
9943 `GL_INVALID_ENUM' is generated if NAME is not an accepted value.
9944
9945 `GL_INVALID_OPERATION' is generated if `glGetString' is executed between
9946 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9947
9948 (define-gl-procedures
9949 ((glGetTexEnvfv
9950 (target GLenum)
9951 (pname GLenum)
9952 (params GLfloat-*)
9953 ->
9954 void)
9955 (glGetTexEnviv
9956 (target GLenum)
9957 (pname GLenum)
9958 (params GLint-*)
9959 ->
9960 void))
9961 "Return texture environment parameters.
9962
9963 TARGET
9964 Specifies a texture environment. May be `GL_TEXTURE_ENV',
9965 `GL_TEXTURE_FILTER_CONTROL', or `GL_POINT_SPRITE'.
9966
9967 PNAME
9968 Specifies the symbolic name of a texture environment parameter.
9969 Accepted values are `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR',
9970 `GL_TEXTURE_LOD_BIAS', `GL_COMBINE_RGB', `GL_COMBINE_ALPHA',
9971 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
9972 `GL_SRC1_ALPHA', `GL_SRC2_ALPHA', `GL_OPERAND0_RGB',
9973 `GL_OPERAND1_RGB', `GL_OPERAND2_RGB', `GL_OPERAND0_ALPHA',
9974 `GL_OPERAND1_ALPHA', `GL_OPERAND2_ALPHA', `GL_RGB_SCALE',
9975 `GL_ALPHA_SCALE', or `GL_COORD_REPLACE'.
9976
9977 PARAMS
9978 Returns the requested data.
9979
9980 `glGetTexEnv' returns in PARAMS selected values of a texture environment
9981 that was specified with `glTexEnv'. TARGET specifies a texture
9982 environment.
9983
9984 When TARGET is `GL_TEXTURE_FILTER_CONTROL', PNAME must be
9985 `GL_TEXTURE_LOD_BIAS'. When TARGET is `GL_POINT_SPRITE', PNAME must be
9986 `GL_COORD_REPLACE'. When TARGET is `GL_TEXTURE_ENV', PNAME can be
9987 `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR', `GL_COMBINE_RGB',
9988 `GL_COMBINE_ALPHA', `GL_RGB_SCALE', `GL_ALPHA_SCALE', `GL_SRC0_RGB',
9989 `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA', `GL_SRC1_ALPHA', or
9990 `GL_SRC2_ALPHA'.
9991
9992 PNAME names a specific texture environment parameter, as follows:
9993
9994 `GL_TEXTURE_ENV_MODE'
9995 PARAMS returns the single-valued texture environment mode, a
9996 symbolic constant. The initial value is `GL_MODULATE'.
9997
9998 `GL_TEXTURE_ENV_COLOR'
9999 PARAMS returns four integer or floating-point values that are the
10000 texture environment color. Integer values, when requested, are
10001 linearly mapped from the internal floating-point representation
10002 such that 1.0 maps to the most positive representable integer, and
10003 -1.0 maps to the most negative representable integer. The initial
10004 value is (0, 0, 0, 0).
10005
10006 `GL_TEXTURE_LOD_BIAS'
10007 PARAMS returns a single floating-point value that is the texture
10008 level-of-detail bias. The initial value is 0.
10009
10010 `GL_COMBINE_RGB'
10011 PARAMS returns a single symbolic constant value representing the
10012 current RGB combine mode. The initial value is `GL_MODULATE'.
10013
10014 `GL_COMBINE_ALPHA'
10015 PARAMS returns a single symbolic constant value representing the
10016 current alpha combine mode. The initial value is `GL_MODULATE'.
10017
10018 `GL_SRC0_RGB'
10019 PARAMS returns a single symbolic constant value representing the
10020 texture combiner zero's RGB source. The initial value is
10021 `GL_TEXTURE'.
10022
10023 `GL_SRC1_RGB'
10024 PARAMS returns a single symbolic constant value representing the
10025 texture combiner one's RGB source. The initial value is
10026 `GL_PREVIOUS'.
10027
10028 `GL_SRC2_RGB'
10029 PARAMS returns a single symbolic constant value representing the
10030 texture combiner two's RGB source. The initial value is
10031 `GL_CONSTANT'.
10032
10033 `GL_SRC0_ALPHA'
10034 PARAMS returns a single symbolic constant value representing the
10035 texture combiner zero's alpha source. The initial value is
10036 `GL_TEXTURE'.
10037
10038 `GL_SRC1_ALPHA'
10039 PARAMS returns a single symbolic constant value representing the
10040 texture combiner one's alpha source. The initial value is
10041 `GL_PREVIOUS'.
10042
10043 `GL_SRC2_ALPHA'
10044 PARAMS returns a single symbolic constant value representing the
10045 texture combiner two's alpha source. The initial value is
10046 `GL_CONSTANT'.
10047
10048 `GL_OPERAND0_RGB'
10049 PARAMS returns a single symbolic constant value representing the
10050 texture combiner zero's RGB operand. The initial value is
10051 `GL_SRC_COLOR'.
10052
10053 `GL_OPERAND1_RGB'
10054 PARAMS returns a single symbolic constant value representing the
10055 texture combiner one's RGB operand. The initial value is
10056 `GL_SRC_COLOR'.
10057
10058 `GL_OPERAND2_RGB'
10059 PARAMS returns a single symbolic constant value representing the
10060 texture combiner two's RGB operand. The initial value is
10061 `GL_SRC_ALPHA'.
10062
10063 `GL_OPERAND0_ALPHA'
10064 PARAMS returns a single symbolic constant value representing the
10065 texture combiner zero's alpha operand. The initial value is
10066 `GL_SRC_ALPHA'.
10067
10068 `GL_OPERAND1_ALPHA'
10069 PARAMS returns a single symbolic constant value representing the
10070 texture combiner one's alpha operand. The initial value is
10071 `GL_SRC_ALPHA'.
10072
10073 `GL_OPERAND2_ALPHA'
10074 PARAMS returns a single symbolic constant value representing the
10075 texture combiner two's alpha operand. The initial value is
10076 `GL_SRC_ALPHA'.
10077
10078 `GL_RGB_SCALE'
10079 PARAMS returns a single floating-point value representing the
10080 current RGB texture combiner scaling factor. The initial value is
10081 1.0.
10082
10083 `GL_ALPHA_SCALE'
10084 PARAMS returns a single floating-point value representing the
10085 current alpha texture combiner scaling factor. The initial value is
10086 1.0.
10087
10088 `GL_COORD_REPLACE'
10089 PARAMS returns a single boolean value representing the current
10090 point sprite texture coordinate replacement enable state. The
10091 initial value is `GL_FALSE'.
10092
10093 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10094 value.
10095
10096 `GL_INVALID_OPERATION' is generated if `glGetTexEnv' is executed between
10097 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10098
10099 (define-gl-procedures
10100 ((glGetTexGenfv
10101 (coord GLenum)
10102 (pname GLenum)
10103 (params GLfloat-*)
10104 ->
10105 void)
10106 (glGetTexGeniv
10107 (coord GLenum)
10108 (pname GLenum)
10109 (params GLint-*)
10110 ->
10111 void))
10112 "Return texture coordinate generation parameters.
10113
10114 COORD
10115 Specifies a texture coordinate. Must be `GL_S', `GL_T', `GL_R', or
10116 `GL_Q'.
10117
10118 PNAME
10119 Specifies the symbolic name of the value(s) to be returned. Must be
10120 either `GL_TEXTURE_GEN_MODE' or the name of one of the texture
10121 generation plane equations: `GL_OBJECT_PLANE' or `GL_EYE_PLANE'.
10122
10123 PARAMS
10124 Returns the requested data.
10125
10126 `glGetTexGen' returns in PARAMS selected parameters of a texture
10127 coordinate generation function that was specified using `glTexGen'.
10128 COORD names one of the (S, T, R, Q) texture coordinates, using the
10129 symbolic constant `GL_S', `GL_T', `GL_R', or `GL_Q'.
10130
10131 PNAME specifies one of three symbolic names:
10132
10133 `GL_TEXTURE_GEN_MODE'
10134 PARAMS returns the single-valued texture generation function, a
10135 symbolic constant. The initial value is `GL_EYE_LINEAR'.
10136
10137 `GL_OBJECT_PLANE'
10138 PARAMS returns the four plane equation coefficients that specify
10139 object linear-coordinate generation. Integer values, when
10140 requested, are mapped directly from the internal floating-point
10141 representation.
10142
10143 `GL_EYE_PLANE'
10144 PARAMS returns the four plane equation coefficients that specify
10145 eye linear-coordinate generation. Integer values, when requested,
10146 are mapped directly from the internal floating-point
10147 representation. The returned values are those maintained in eye
10148 coordinates. They are not equal to the values specified using
10149 `glTexGen', unless the modelview matrix was identity when
10150 `glTexGen' was called.
10151
10152 `GL_INVALID_ENUM' is generated if COORD or PNAME is not an accepted
10153 value.
10154
10155 `GL_INVALID_OPERATION' is generated if `glGetTexGen' is executed between
10156 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10157
10158 (define-gl-procedures
10159 ((glGetTexImage
10160 (target GLenum)
10161 (level GLint)
10162 (format GLenum)
10163 (type GLenum)
10164 (img GLvoid-*)
10165 ->
10166 void))
10167 "Return a texture image.
10168
10169 TARGET
10170 Specifies which texture is to be obtained. `GL_TEXTURE_1D',
10171 `GL_TEXTURE_2D', `GL_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10172 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10173 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10174 and `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z' are accepted.
10175
10176 LEVEL
10177 Specifies the level-of-detail number of the desired image. Level 0
10178 is the base image level. Level N is the N th mipmap reduction
10179 image.
10180
10181 FORMAT
10182 Specifies a pixel format for the returned data. The supported
10183 formats are `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
10184 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and
10185 `GL_LUMINANCE_ALPHA'.
10186
10187 TYPE
10188 Specifies a pixel type for the returned data. The supported types
10189 are `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
10190 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
10191 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
10192 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
10193 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
10194 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
10195 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
10196 `GL_UNSIGNED_INT_2_10_10_10_REV'.
10197
10198 IMG
10199 Returns the texture image. Should be a pointer to an array of the
10200 type specified by TYPE.
10201
10202 `glGetTexImage' returns a texture image into IMG. TARGET specifies
10203 whether the desired texture image is one specified by `glTexImage1D'
10204 (`GL_TEXTURE_1D'), `glTexImage2D' (`GL_TEXTURE_2D' or any of
10205 `GL_TEXTURE_CUBE_MAP_*'), or `glTexImage3D' (`GL_TEXTURE_3D'). LEVEL
10206 specifies the level-of-detail number of the desired image. FORMAT and
10207 TYPE specify the format and type of the desired image array. See the
10208 reference pages `glTexImage1D' and `glDrawPixels' for a description of
10209 the acceptable values for the FORMAT and TYPE parameters, respectively.
10210
10211 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
10212 target (see `glBindBuffer') while a texture image is requested, IMG is
10213 treated as a byte offset into the buffer object's data store.
10214
10215 To understand the operation of `glGetTexImage', consider the selected
10216 internal four-component texture image to be an RGBA color buffer the
10217 size of the image. The semantics of `glGetTexImage' are then identical
10218 to those of `glReadPixels', with the exception that no pixel transfer
10219 operations are performed, when called with the same FORMAT and TYPE,
10220 with X and Y set to 0, WIDTH set to the width of the texture image
10221 (including border if one was specified), and HEIGHT set to 1 for 1D
10222 images, or to the height of the texture image (including border if one
10223 was specified) for 2D images. Because the internal texture image is an
10224 RGBA image, pixel formats `GL_COLOR_INDEX', `GL_STENCIL_INDEX', and
10225 `GL_DEPTH_COMPONENT' are not accepted, and pixel type `GL_BITMAP' is not
10226 accepted.
10227
10228 If the selected texture image does not contain four components, the
10229 following mappings are applied. Single-component textures are treated as
10230 RGBA buffers with red set to the single-component value, green set to 0,
10231 blue set to 0, and alpha set to 1. Two-component textures are treated as
10232 RGBA buffers with red set to the value of component zero, alpha set to
10233 the value of component one, and green and blue set to 0. Finally,
10234 three-component textures are treated as RGBA buffers with red set to
10235 component zero, green set to component one, blue set to component two,
10236 and alpha set to 1.
10237
10238 To determine the required size of IMG, use `glGetTexLevelParameter' to
10239 determine the dimensions of the internal texture image, then scale the
10240 required number of pixels by the storage required for each pixel, based
10241 on FORMAT and TYPE. Be sure to take the pixel storage parameters into
10242 account, especially `GL_PACK_ALIGNMENT'.
10243
10244 `GL_INVALID_ENUM' is generated if TARGET, FORMAT, or TYPE is not an
10245 accepted value.
10246
10247 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
10248
10249 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
10250 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
10251
10252 `GL_INVALID_OPERATION' is returned if TYPE is one of
10253 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
10254 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
10255 is not `GL_RGB'.
10256
10257 `GL_INVALID_OPERATION' is returned if TYPE is one of
10258 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
10259 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
10260 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
10261 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV', and
10262 FORMAT is neither `GL_RGBA' or `GL_BGRA'.
10263
10264 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10265 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
10266 store is currently mapped.
10267
10268 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10269 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
10270 to the buffer object such that the memory writes required would exceed
10271 the data store size.
10272
10273 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10274 bound to the `GL_PIXEL_PACK_BUFFER' target and IMG is not evenly
10275 divisible into the number of bytes needed to store in memory a datum
10276 indicated by TYPE.
10277
10278 `GL_INVALID_OPERATION' is generated if `glGetTexImage' is executed
10279 between the execution of `glBegin' and the corresponding execution of
10280 `glEnd'.")
10281
10282 (define-gl-procedures
10283 ((glGetTexLevelParameterfv
10284 (target GLenum)
10285 (level GLint)
10286 (pname GLenum)
10287 (params GLfloat-*)
10288 ->
10289 void)
10290 (glGetTexLevelParameteriv
10291 (target GLenum)
10292 (level GLint)
10293 (pname GLenum)
10294 (params GLint-*)
10295 ->
10296 void))
10297 "Return texture parameter values for a specific level of detail.
10298
10299 TARGET
10300 Specifies the symbolic name of the target texture, either
10301 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D',
10302 `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_2D',
10303 `GL_PROXY_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10304 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10305 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10306 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
10307
10308 LEVEL
10309 Specifies the level-of-detail number of the desired image. Level 0
10310 is the base image level. Level N is the N th mipmap reduction
10311 image.
10312
10313 PNAME
10314 Specifies the symbolic name of a texture parameter.
10315 `GL_TEXTURE_WIDTH', `GL_TEXTURE_HEIGHT', `GL_TEXTURE_DEPTH',
10316 `GL_TEXTURE_INTERNAL_FORMAT', `GL_TEXTURE_BORDER',
10317 `GL_TEXTURE_RED_SIZE', `GL_TEXTURE_GREEN_SIZE',
10318 `GL_TEXTURE_BLUE_SIZE', `GL_TEXTURE_ALPHA_SIZE',
10319 `GL_TEXTURE_LUMINANCE_SIZE', `GL_TEXTURE_INTENSITY_SIZE',
10320 `GL_TEXTURE_DEPTH_SIZE', `GL_TEXTURE_COMPRESSED', and
10321 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' are accepted.
10322
10323 PARAMS
10324 Returns the requested data.
10325
10326 `glGetTexLevelParameter' returns in PARAMS texture parameter values for
10327 a specific level-of-detail value, specified as LEVEL. TARGET defines the
10328 target texture, either `GL_TEXTURE_1D', `GL_TEXTURE_2D',
10329 `GL_TEXTURE_3D', `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_2D',
10330 `GL_PROXY_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10331 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10332 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10333 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
10334
10335 `GL_MAX_TEXTURE_SIZE', and `GL_MAX_3D_TEXTURE_SIZE' are not really
10336 descriptive enough. It has to report the largest square texture image
10337 that can be accommodated with mipmaps and borders, but a long skinny
10338 texture, or a texture without mipmaps and borders, may easily fit in
10339 texture memory. The proxy targets allow the user to more accurately
10340 query whether the GL can accommodate a texture of a given configuration.
10341 If the texture cannot be accommodated, the texture state variables,
10342 which may be queried with `glGetTexLevelParameter', are set to 0. If the
10343 texture can be accommodated, the texture state values will be set as
10344 they would be set for a non-proxy target.
10345
10346 PNAME specifies the texture parameter whose value or values will be
10347 returned.
10348
10349 The accepted parameter names are as follows:
10350
10351 `GL_TEXTURE_WIDTH'
10352
10353
10354 PARAMS returns a single value, the width of the texture image. This
10355 value includes the border of the texture image. The initial value
10356 is 0.
10357
10358 `GL_TEXTURE_HEIGHT'
10359
10360
10361 PARAMS returns a single value, the height of the texture image.
10362 This value includes the border of the texture image. The initial
10363 value is 0.
10364
10365 `GL_TEXTURE_DEPTH'
10366
10367
10368 PARAMS returns a single value, the depth of the texture image. This
10369 value includes the border of the texture image. The initial value
10370 is 0.
10371
10372 `GL_TEXTURE_INTERNAL_FORMAT'
10373
10374
10375 PARAMS returns a single value, the internal format of the texture
10376 image.
10377
10378 `GL_TEXTURE_BORDER'
10379
10380
10381 PARAMS returns a single value, the width in pixels of the border of
10382 the texture image. The initial value is 0.
10383
10384 `GL_TEXTURE_RED_SIZE',
10385 `GL_TEXTURE_GREEN_SIZE',
10386 `GL_TEXTURE_BLUE_SIZE',
10387 `GL_TEXTURE_ALPHA_SIZE',
10388 `GL_TEXTURE_LUMINANCE_SIZE',
10389 `GL_TEXTURE_INTENSITY_SIZE',
10390 `GL_TEXTURE_DEPTH_SIZE'
10391
10392
10393 The internal storage resolution of an individual component. The
10394 resolution chosen by the GL will be a close match for the
10395 resolution requested by the user with the component argument of
10396 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glCopyTexImage1D',
10397 and `glCopyTexImage2D'. The initial value is 0.
10398
10399 `GL_TEXTURE_COMPRESSED'
10400
10401
10402 PARAMS returns a single boolean value indicating if the texture
10403 image is stored in a compressed internal format. The initiali value
10404 is `GL_FALSE'.
10405
10406 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE'
10407
10408
10409 PARAMS returns a single integer value, the number of unsigned bytes
10410 of the compressed texture image that would be returned from
10411 `glGetCompressedTexImage'.
10412
10413 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10414 value.
10415
10416 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
10417
10418 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
10419 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
10420
10421 `GL_INVALID_OPERATION' is generated if `glGetTexLevelParameter' is
10422 executed between the execution of `glBegin' and the corresponding
10423 execution of `glEnd'.
10424
10425 `GL_INVALID_OPERATION' is generated if
10426 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' is queried on texture images with an
10427 uncompressed internal format or on proxy targets.")
10428
10429 (define-gl-procedures
10430 ((glGetTexParameterfv
10431 (target GLenum)
10432 (pname GLenum)
10433 (params GLfloat-*)
10434 ->
10435 void)
10436 (glGetTexParameteriv
10437 (target GLenum)
10438 (pname GLenum)
10439 (params GLint-*)
10440 ->
10441 void))
10442 "Return texture parameter values.
10443
10444 TARGET
10445 Specifies the symbolic name of the target texture. `GL_TEXTURE_1D',
10446 `GL_TEXTURE_2D', `GL_TEXTURE_3D', and `GL_TEXTURE_CUBE_MAP' are
10447 accepted.
10448
10449 PNAME
10450 Specifies the symbolic name of a texture parameter.
10451 `GL_TEXTURE_MAG_FILTER', `GL_TEXTURE_MIN_FILTER',
10452 `GL_TEXTURE_MIN_LOD', `GL_TEXTURE_MAX_LOD',
10453 `GL_TEXTURE_BASE_LEVEL', `GL_TEXTURE_MAX_LEVEL',
10454 `GL_TEXTURE_WRAP_S', `GL_TEXTURE_WRAP_T', `GL_TEXTURE_WRAP_R',
10455 `GL_TEXTURE_BORDER_COLOR', `GL_TEXTURE_PRIORITY',
10456 `GL_TEXTURE_RESIDENT', `GL_TEXTURE_COMPARE_MODE',
10457 `GL_TEXTURE_COMPARE_FUNC', `GL_DEPTH_TEXTURE_MODE', and
10458 `GL_GENERATE_MIPMAP' are accepted.
10459
10460 PARAMS
10461 Returns the texture parameters.
10462
10463 `glGetTexParameter' returns in PARAMS the value or values of the texture
10464 parameter specified as PNAME. TARGET defines the target texture, either
10465 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D', or
10466 `GL_TEXTURE_CUBE_MAP', to specify one-, two-, or three-dimensional or
10467 cube-mapped texturing. PNAME accepts the same symbols as
10468 `glTexParameter', with the same interpretations:
10469
10470 `GL_TEXTURE_MAG_FILTER'
10471 Returns the single-valued texture magnification filter, a symbolic
10472 constant. The initial value is `GL_LINEAR'.
10473
10474 `GL_TEXTURE_MIN_FILTER'
10475 Returns the single-valued texture minification filter, a symbolic
10476 constant. The initial value is `GL_NEAREST_MIPMAP_LINEAR'.
10477
10478 `GL_TEXTURE_MIN_LOD'
10479 Returns the single-valued texture minimum level-of-detail value.
10480 The initial value is -1000 .
10481
10482 `GL_TEXTURE_MAX_LOD'
10483 Returns the single-valued texture maximum level-of-detail value.
10484 The initial value is 1000.
10485
10486 `GL_TEXTURE_BASE_LEVEL'
10487 Returns the single-valued base texture mipmap level. The initial
10488 value is 0.
10489
10490 `GL_TEXTURE_MAX_LEVEL'
10491 Returns the single-valued maximum texture mipmap array level. The
10492 initial value is 1000.
10493
10494 `GL_TEXTURE_WRAP_S'
10495 Returns the single-valued wrapping function for texture coordinate
10496 S , a symbolic constant. The initial value is `GL_REPEAT'.
10497
10498 `GL_TEXTURE_WRAP_T'
10499 Returns the single-valued wrapping function for texture coordinate
10500 T , a symbolic constant. The initial value is `GL_REPEAT'.
10501
10502 `GL_TEXTURE_WRAP_R'
10503 Returns the single-valued wrapping function for texture coordinate
10504 R , a symbolic constant. The initial value is `GL_REPEAT'.
10505
10506 `GL_TEXTURE_BORDER_COLOR'
10507 Returns four integer or floating-point numbers that comprise the
10508 RGBA color of the texture border. Floating-point values are
10509 returned in the range [0,1] . Integer values are returned as a
10510 linear mapping of the internal floating-point representation such
10511 that 1.0 maps to the most positive representable integer and -1.0
10512 maps to the most negative representable integer. The initial value
10513 is (0, 0, 0, 0).
10514
10515 `GL_TEXTURE_PRIORITY'
10516 Returns the residence priority of the target texture (or the named
10517 texture bound to it). The initial value is 1. See
10518 `glPrioritizeTextures'.
10519
10520 `GL_TEXTURE_RESIDENT'
10521 Returns the residence status of the target texture. If the value
10522 returned in PARAMS is `GL_TRUE', the texture is resident in texture
10523 memory. See `glAreTexturesResident'.
10524
10525 `GL_TEXTURE_COMPARE_MODE'
10526 Returns a single-valued texture comparison mode, a symbolic
10527 constant. The initial value is `GL_NONE'. See `glTexParameter'.
10528
10529 `GL_TEXTURE_COMPARE_FUNC'
10530 Returns a single-valued texture comparison function, a symbolic
10531 constant. The initial value is `GL_LEQUAL'. See `glTexParameter'.
10532
10533 `GL_DEPTH_TEXTURE_MODE'
10534 Returns a single-valued texture format indicating how the depth
10535 values should be converted into color components. The initial value
10536 is `GL_LUMINANCE'. See `glTexParameter'.
10537
10538 `GL_GENERATE_MIPMAP'
10539 Returns a single boolean value indicating if automatic mipmap level
10540 updates are enabled. See `glTexParameter'.
10541
10542 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10543 value.
10544
10545 `GL_INVALID_OPERATION' is generated if `glGetTexParameter' is executed
10546 between the execution of `glBegin' and the corresponding execution of
10547 `glEnd'.")
10548
10549 (define-gl-procedures
10550 ((glGetUniformLocation
10551 (program GLuint)
10552 (name const-GLchar-*)
10553 ->
10554 GLint))
10555 "Returns the location of a uniform variable.
10556
10557 PROGRAM
10558 Specifies the program object to be queried.
10559
10560 NAME
10561 Points to a null terminated string containing the name of the
10562 uniform variable whose location is to be queried.
10563
10564 `glGetUniformLocation ' returns an integer that represents the location
10565 of a specific uniform variable within a program object. NAME must be a
10566 null terminated string that contains no white space. NAME must be an
10567 active uniform variable name in PROGRAM that is not a structure, an
10568 array of structures, or a subcomponent of a vector or a matrix. This
10569 function returns -1 if NAME does not correspond to an active uniform
10570 variable in PROGRAM or if NAME starts with the reserved prefix \"gl_\".
10571
10572 Uniform variables that are structures or arrays of structures may be
10573 queried by calling `glGetUniformLocation' for each field within the
10574 structure. The array element operator \"[]\" and the structure field
10575 operator \".\" may be used in NAME in order to select elements within an
10576 array or fields within a structure. The result of using these operators
10577 is not allowed to be another structure, an array of structures, or a
10578 subcomponent of a vector or a matrix. Except if the last part of NAME
10579 indicates a uniform variable array, the location of the first element of
10580 an array can be retrieved by using the name of the array, or by using
10581 the name appended by \"[0]\".
10582
10583 The actual locations assigned to uniform variables are not known until
10584 the program object is linked successfully. After linking has occurred,
10585 the command `glGetUniformLocation' can be used to obtain the location of
10586 a uniform variable. This location value can then be passed to
10587 `glUniform' to set the value of the uniform variable or to
10588 `glGetUniform' in order to query the current value of the uniform
10589 variable. After a program object has been linked successfully, the index
10590 values for uniform variables remain fixed until the next link command
10591 occurs. Uniform variable locations and values can only be queried after
10592 a link if the link was successful.
10593
10594 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
10595 OpenGL.
10596
10597 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
10598
10599 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
10600 linked.
10601
10602 `GL_INVALID_OPERATION' is generated if `glGetUniformLocation' is
10603 executed between the execution of `glBegin' and the corresponding
10604 execution of `glEnd'.")
10605
10606 (define-gl-procedures
10607 ((glGetUniformfv
10608 (program GLuint)
10609 (location GLint)
10610 (params GLfloat-*)
10611 ->
10612 void)
10613 (glGetUniformiv
10614 (program GLuint)
10615 (location GLint)
10616 (params GLint-*)
10617 ->
10618 void))
10619 "Returns the value of a uniform variable.
10620
10621 PROGRAM
10622 Specifies the program object to be queried.
10623
10624 LOCATION
10625 Specifies the location of the uniform variable to be queried.
10626
10627 PARAMS
10628 Returns the value of the specified uniform variable.
10629
10630 `glGetUniform' returns in PARAMS the value(s) of the specified uniform
10631 variable. The type of the uniform variable specified by LOCATION
10632 determines the number of values returned. If the uniform variable is
10633 defined in the shader as a boolean, int, or float, a single value will
10634 be returned. If it is defined as a vec2, ivec2, or bvec2, two values
10635 will be returned. If it is defined as a vec3, ivec3, or bvec3, three
10636 values will be returned, and so on. To query values stored in uniform
10637 variables declared as arrays, call `glGetUniform' for each element of
10638 the array. To query values stored in uniform variables declared as
10639 structures, call `glGetUniform' for each field in the structure. The
10640 values for uniform variables declared as a matrix will be returned in
10641 column major order.
10642
10643 The locations assigned to uniform variables are not known until the
10644 program object is linked. After linking has occurred, the command
10645 `glGetUniformLocation' can be used to obtain the location of a uniform
10646 variable. This location value can then be passed to `glGetUniform' in
10647 order to query the current value of the uniform variable. After a
10648 program object has been linked successfully, the index values for
10649 uniform variables remain fixed until the next link command occurs. The
10650 uniform variable values can only be queried after a link if the link was
10651 successful.
10652
10653 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
10654 OpenGL.
10655
10656 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
10657
10658 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
10659 linked.
10660
10661 `GL_INVALID_OPERATION' is generated if LOCATION does not correspond to a
10662 valid uniform variable location for the specified program object.
10663
10664 `GL_INVALID_OPERATION' is generated if `glGetUniform' is executed
10665 between the execution of `glBegin' and the corresponding execution of
10666 `glEnd'.")
10667
10668 (define-gl-procedures
10669 ((glGetVertexAttribPointerv
10670 (index GLuint)
10671 (pname GLenum)
10672 (pointer GLvoid-**)
10673 ->
10674 void))
10675 "Return the address of the specified generic vertex attribute pointer.
10676
10677 INDEX
10678 Specifies the generic vertex attribute parameter to be returned.
10679
10680 PNAME
10681 Specifies the symbolic name of the generic vertex attribute
10682 parameter to be returned. Must be `GL_VERTEX_ATTRIB_ARRAY_POINTER'.
10683
10684 POINTER
10685 Returns the pointer value.
10686
10687 `glGetVertexAttribPointerv' returns pointer information. INDEX is the
10688 generic vertex attribute to be queried, PNAME is a symbolic constant
10689 indicating the pointer to be returned, and PARAMS is a pointer to a
10690 location in which to place the returned data.
10691
10692 If a non-zero named buffer object was bound to the `GL_ARRAY_BUFFER'
10693 target (see `glBindBuffer') when the desired pointer was previously
10694 specified, the POINTER returned is a byte offset into the buffer
10695 object's data store.
10696
10697 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
10698 `GL_MAX_VERTEX_ATTRIBS'.
10699
10700 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.")
10701
10702 (define-gl-procedures
10703 ((glGetVertexAttribfv
10704 (index GLuint)
10705 (pname GLenum)
10706 (params GLfloat-*)
10707 ->
10708 void)
10709 (glGetVertexAttribiv
10710 (index GLuint)
10711 (pname GLenum)
10712 (params GLint-*)
10713 ->
10714 void))
10715 "Return a generic vertex attribute parameter.
10716
10717 INDEX
10718 Specifies the generic vertex attribute parameter to be queried.
10719
10720 PNAME
10721 Specifies the symbolic name of the vertex attribute parameter to be
10722 queried. Accepted values are
10723 `GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING',
10724 `GL_VERTEX_ATTRIB_ARRAY_ENABLED', `GL_VERTEX_ATTRIB_ARRAY_SIZE',
10725 `GL_VERTEX_ATTRIB_ARRAY_STRIDE', `GL_VERTEX_ATTRIB_ARRAY_TYPE',
10726 `GL_VERTEX_ATTRIB_ARRAY_NORMALIZED', or `GL_CURRENT_VERTEX_ATTRIB'.
10727
10728 PARAMS
10729 Returns the requested data.
10730
10731 `glGetVertexAttrib' returns in PARAMS the value of a generic vertex
10732 attribute parameter. The generic vertex attribute to be queried is
10733 specified by INDEX, and the parameter to be queried is specified by
10734 PNAME.
10735
10736 The accepted parameter names are as follows:
10737
10738 `GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING'
10739
10740
10741 PARAMS returns a single value, the name of the buffer object
10742 currently bound to the binding point corresponding to generic
10743 vertex attribute array INDEX. If no buffer object is bound, 0 is
10744 returned. The initial value is 0.
10745
10746 `GL_VERTEX_ATTRIB_ARRAY_ENABLED'
10747
10748
10749 PARAMS returns a single value that is non-zero (true) if the vertex
10750 attribute array for INDEX is enabled and 0 (false) if it is
10751 disabled. The initial value is `GL_FALSE'.
10752
10753 `GL_VERTEX_ATTRIB_ARRAY_SIZE'
10754
10755
10756 PARAMS returns a single value, the size of the vertex attribute
10757 array for INDEX. The size is the number of values for each element
10758 of the vertex attribute array, and it will be 1, 2, 3, or 4. The
10759 initial value is 4.
10760
10761 `GL_VERTEX_ATTRIB_ARRAY_STRIDE'
10762
10763
10764 PARAMS returns a single value, the array stride for (number of
10765 bytes between successive elements in) the vertex attribute array
10766 for INDEX. A value of 0 indicates that the array elements are
10767 stored sequentially in memory. The initial value is 0.
10768
10769 `GL_VERTEX_ATTRIB_ARRAY_TYPE'
10770
10771
10772 PARAMS returns a single value, a symbolic constant indicating the
10773 array type for the vertex attribute array for INDEX. Possible
10774 values are `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
10775 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', and
10776 `GL_DOUBLE'. The initial value is `GL_FLOAT'.
10777
10778 `GL_VERTEX_ATTRIB_ARRAY_NORMALIZED'
10779
10780
10781 PARAMS returns a single value that is non-zero (true) if
10782 fixed-point data types for the vertex attribute array indicated by
10783 INDEX are normalized when they are converted to floating point, and
10784 0 (false) otherwise. The initial value is `GL_FALSE'.
10785
10786 `GL_CURRENT_VERTEX_ATTRIB'
10787
10788
10789 PARAMS returns four values that represent the current value for the
10790 generic vertex attribute specified by index. Generic vertex
10791 attribute 0 is unique in that it has no current state, so an error
10792 will be generated if INDEX is 0. The initial value for all other
10793 generic vertex attributes is (0,0,0,1).
10794
10795 All of the parameters except `GL_CURRENT_VERTEX_ATTRIB' represent
10796 client-side state.
10797
10798 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
10799 `GL_MAX_VERTEX_ATTRIBS'.
10800
10801 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
10802
10803 `GL_INVALID_OPERATION' is generated if INDEX is 0 and PNAME is
10804 `GL_CURRENT_VERTEX_ATTRIB'.")
10805
10806 (define-gl-procedures
10807 ((glGetBooleanv
10808 (pname GLenum)
10809 (params GLboolean-*)
10810 ->
10811 void)
10812 (glGetDoublev
10813 (pname GLenum)
10814 (params GLdouble-*)
10815 ->
10816 void)
10817 (glGetFloatv
10818 (pname GLenum)
10819 (params GLfloat-*)
10820 ->
10821 void)
10822 (glGetIntegerv
10823 (pname GLenum)
10824 (params GLint-*)
10825 ->
10826 void))
10827 "Return the value or values of a selected parameter.
10828
10829 PNAME
10830 Specifies the parameter value to be returned. The symbolic
10831 constants in the list below are accepted.
10832
10833 PARAMS
10834 Returns the value or values of the specified parameter.
10835
10836 These four commands return values for simple state variables in GL.
10837 PNAME is a symbolic constant indicating the state variable to be
10838 returned, and PARAMS is a pointer to an array of the indicated type in
10839 which to place the returned data.
10840
10841 Type conversion is performed if PARAMS has a different type than the
10842 state variable value being requested. If `glGetBooleanv' is called, a
10843 floating-point (or integer) value is converted to `GL_FALSE' if and only
10844 if it is 0.0 (or 0). Otherwise, it is converted to `GL_TRUE'. If
10845 `glGetIntegerv' is called, boolean values are returned as `GL_TRUE' or
10846 `GL_FALSE', and most floating-point values are rounded to the nearest
10847 integer value. Floating-point colors and normals, however, are returned
10848 with a linear mapping that maps 1.0 to the most positive representable
10849 integer value and -1.0 to the most negative representable integer value.
10850 If `glGetFloatv' or `glGetDoublev' is called, boolean values are
10851 returned as `GL_TRUE' or `GL_FALSE', and integer values are converted to
10852 floating-point values.
10853
10854 The following symbolic constants are accepted by PNAME:
10855
10856 `GL_ACCUM_ALPHA_BITS'
10857
10858
10859 PARAMS returns one value, the number of alpha bitplanes in the
10860 accumulation buffer.
10861
10862 `GL_ACCUM_BLUE_BITS'
10863
10864
10865 PARAMS returns one value, the number of blue bitplanes in the
10866 accumulation buffer.
10867
10868 `GL_ACCUM_CLEAR_VALUE'
10869
10870
10871 PARAMS returns four values: the red, green, blue, and alpha values
10872 used to clear the accumulation buffer. Integer values, if
10873 requested, are linearly mapped from the internal floating-point
10874 representation such that 1.0 returns the most positive
10875 representable integer value, and -1.0 returns the most negative
10876 representable integer value. The initial value is (0, 0, 0, 0). See
10877 `glClearAccum'.
10878
10879 `GL_ACCUM_GREEN_BITS'
10880
10881
10882 PARAMS returns one value, the number of green bitplanes in the
10883 accumulation buffer.
10884
10885 `GL_ACCUM_RED_BITS'
10886
10887
10888 PARAMS returns one value, the number of red bitplanes in the
10889 accumulation buffer.
10890
10891 `GL_ACTIVE_TEXTURE'
10892
10893
10894 PARAMS returns a single value indicating the active multitexture
10895 unit. The initial value is `GL_TEXTURE0'. See `glActiveTexture'.
10896
10897 `GL_ALIASED_POINT_SIZE_RANGE'
10898
10899
10900 PARAMS returns two values, the smallest and largest supported sizes
10901 for aliased points.
10902
10903 `GL_ALIASED_LINE_WIDTH_RANGE'
10904
10905
10906 PARAMS returns two values, the smallest and largest supported
10907 widths for aliased lines.
10908
10909 `GL_ALPHA_BIAS'
10910
10911
10912 PARAMS returns one value, the alpha bias factor used during pixel
10913 transfers. The initial value is 0. See `glPixelTransfer'.
10914
10915 `GL_ALPHA_BITS'
10916
10917
10918 PARAMS returns one value, the number of alpha bitplanes in each
10919 color buffer.
10920
10921 `GL_ALPHA_SCALE'
10922
10923
10924 PARAMS returns one value, the alpha scale factor used during pixel
10925 transfers. The initial value is 1. See `glPixelTransfer'.
10926
10927 `GL_ALPHA_TEST'
10928
10929
10930 PARAMS returns a single boolean value indicating whether alpha
10931 testing of fragments is enabled. The initial value is `GL_FALSE'.
10932 See `glAlphaFunc'.
10933
10934 `GL_ALPHA_TEST_FUNC'PARAMS returns one value,
10935
10936
10937 the symbolic name of the alpha test function. The initial value is
10938 `GL_ALWAYS'. See `glAlphaFunc'.
10939
10940 `GL_ALPHA_TEST_REF'
10941
10942
10943 PARAMS returns one value, the reference value for the alpha test.
10944 The initial value is 0. See `glAlphaFunc'. An integer value, if
10945 requested, is linearly mapped from the internal floating-point
10946 representation such that 1.0 returns the most positive
10947 representable integer value, and -1.0 returns the most negative
10948 representable integer value.
10949
10950 `GL_ARRAY_BUFFER_BINDING'
10951
10952
10953 PARAMS returns a single value, the name of the buffer object
10954 currently bound to the target `GL_ARRAY_BUFFER'. If no buffer
10955 object is bound to this target, 0 is returned. The initial value is
10956 0. See `glBindBuffer'.
10957
10958 `GL_ATTRIB_STACK_DEPTH'
10959
10960
10961 PARAMS returns one value, the depth of the attribute stack. If the
10962 stack is empty, 0 is returned. The initial value is 0. See
10963 `glPushAttrib'.
10964
10965 `GL_AUTO_NORMAL'
10966
10967
10968 PARAMS returns a single boolean value indicating whether 2D map
10969 evaluation automatically generates surface normals. The initial
10970 value is `GL_FALSE'. See `glMap2'.
10971
10972 `GL_AUX_BUFFERS'
10973
10974
10975 PARAMS returns one value, the number of auxiliary color buffers
10976 available.
10977
10978 `GL_BLEND'
10979
10980
10981 PARAMS returns a single boolean value indicating whether blending
10982 is enabled. The initial value is `GL_FALSE'. See `glBlendFunc'.
10983
10984 `GL_BLEND_COLOR'
10985
10986
10987 PARAMS returns four values, the red, green, blue, and alpha values
10988 which are the components of the blend color. See `glBlendColor'.
10989
10990 `GL_BLEND_DST_ALPHA'
10991
10992
10993 PARAMS returns one value, the symbolic constant identifying the
10994 alpha destination blend function. The initial value is `GL_ZERO'.
10995 See `glBlendFunc' and `glBlendFuncSeparate'.
10996
10997 `GL_BLEND_DST_RGB'
10998
10999
11000 PARAMS returns one value, the symbolic constant identifying the RGB
11001 destination blend function. The initial value is `GL_ZERO'. See
11002 `glBlendFunc' and `glBlendFuncSeparate'.
11003
11004 `GL_BLEND_EQUATION_RGB'
11005
11006
11007 PARAMS returns one value, a symbolic constant indicating whether
11008 the RGB blend equation is `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
11009 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN' or `GL_MAX'. See
11010 `glBlendEquationSeparate'.
11011
11012 `GL_BLEND_EQUATION_ALPHA'
11013
11014
11015 PARAMS returns one value, a symbolic constant indicating whether
11016 the Alpha blend equation is `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
11017 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN' or `GL_MAX'. See
11018 `glBlendEquationSeparate'.
11019
11020 `GL_BLEND_SRC_ALPHA'
11021
11022
11023 PARAMS returns one value, the symbolic constant identifying the
11024 alpha source blend function. The initial value is `GL_ONE'. See
11025 `glBlendFunc' and `glBlendFuncSeparate'.
11026
11027 `GL_BLEND_SRC_RGB'
11028
11029
11030 PARAMS returns one value, the symbolic constant identifying the RGB
11031 source blend function. The initial value is `GL_ONE'. See
11032 `glBlendFunc' and `glBlendFuncSeparate'.
11033
11034 `GL_BLUE_BIAS'
11035
11036
11037 PARAMS returns one value, the blue bias factor used during pixel
11038 transfers. The initial value is 0. See `glPixelTransfer'.
11039
11040 `GL_BLUE_BITS'
11041
11042
11043 PARAMS returns one value, the number of blue bitplanes in each
11044 color buffer.
11045
11046 `GL_BLUE_SCALE'
11047
11048
11049 PARAMS returns one value, the blue scale factor used during pixel
11050 transfers. The initial value is 1. See `glPixelTransfer'.
11051
11052 `GL_CLIENT_ACTIVE_TEXTURE'
11053
11054
11055 PARAMS returns a single integer value indicating the current client
11056 active multitexture unit. The initial value is `GL_TEXTURE0'. See
11057 `glClientActiveTexture'.
11058
11059 `GL_CLIENT_ATTRIB_STACK_DEPTH'
11060
11061
11062 PARAMS returns one value indicating the depth of the attribute
11063 stack. The initial value is 0. See `glPushClientAttrib'.
11064
11065 `GL_CLIP_PLANE'I
11066
11067
11068 PARAMS returns a single boolean value indicating whether the
11069 specified clipping plane is enabled. The initial value is
11070 `GL_FALSE'. See `glClipPlane'.
11071
11072 `GL_COLOR_ARRAY'
11073
11074
11075 PARAMS returns a single boolean value indicating whether the color
11076 array is enabled. The initial value is `GL_FALSE'. See
11077 `glColorPointer'.
11078
11079 `GL_COLOR_ARRAY_BUFFER_BINDING'
11080
11081
11082 PARAMS returns a single value, the name of the buffer object
11083 associated with the color array. This buffer object would have been
11084 bound to the target `GL_ARRAY_BUFFER' at the time of the most
11085 recent call to `glColorPointer'. If no buffer object was bound to
11086 this target, 0 is returned. The initial value is 0. See
11087 `glBindBuffer'.
11088
11089 `GL_COLOR_ARRAY_SIZE'
11090
11091
11092 PARAMS returns one value, the number of components per color in the
11093 color array. The initial value is 4. See `glColorPointer'.
11094
11095 `GL_COLOR_ARRAY_STRIDE'
11096
11097
11098 PARAMS returns one value, the byte offset between consecutive
11099 colors in the color array. The initial value is 0. See
11100 `glColorPointer'.
11101
11102 `GL_COLOR_ARRAY_TYPE'
11103
11104
11105 PARAMS returns one value, the data type of each component in the
11106 color array. The initial value is `GL_FLOAT'. See `glColorPointer'.
11107
11108 `GL_COLOR_CLEAR_VALUE'
11109
11110
11111 PARAMS returns four values: the red, green, blue, and alpha values
11112 used to clear the color buffers. Integer values, if requested, are
11113 linearly mapped from the internal floating-point representation
11114 such that 1.0 returns the most positive representable integer
11115 value, and -1.0 returns the most negative representable integer
11116 value. The initial value is (0, 0, 0, 0). See `glClearColor'.
11117
11118 `GL_COLOR_LOGIC_OP'
11119
11120
11121 PARAMS returns a single boolean value indicating whether a
11122 fragment's RGBA color values are merged into the framebuffer using
11123 a logical operation. The initial value is `GL_FALSE'. See
11124 `glLogicOp'.
11125
11126 `GL_COLOR_MATERIAL'
11127
11128
11129 PARAMS returns a single boolean value indicating whether one or
11130 more material parameters are tracking the current color. The
11131 initial value is `GL_FALSE'. See `glColorMaterial'.
11132
11133 `GL_COLOR_MATERIAL_FACE'
11134
11135
11136 PARAMS returns one value, a symbolic constant indicating which
11137 materials have a parameter that is tracking the current color. The
11138 initial value is `GL_FRONT_AND_BACK'. See `glColorMaterial'.
11139
11140 `GL_COLOR_MATERIAL_PARAMETER'
11141
11142
11143 PARAMS returns one value, a symbolic constant indicating which
11144 material parameters are tracking the current color. The initial
11145 value is `GL_AMBIENT_AND_DIFFUSE'. See `glColorMaterial'.
11146
11147 `GL_COLOR_MATRIX'
11148
11149
11150 PARAMS returns sixteen values: the color matrix on the top of the
11151 color matrix stack. Initially this matrix is the identity matrix.
11152 See `glPushMatrix'.
11153
11154 `GL_COLOR_MATRIX_STACK_DEPTH'
11155
11156
11157 PARAMS returns one value, the maximum supported depth of the
11158 projection matrix stack. The value must be at least 2. See
11159 `glPushMatrix'.
11160
11161 `GL_COLOR_SUM'
11162
11163
11164 PARAMS returns a single boolean value indicating whether primary
11165 and secondary color sum is enabled. See `glSecondaryColor'.
11166
11167 `GL_COLOR_TABLE'
11168
11169
11170 PARAMS returns a single boolean value indicating whether the color
11171 table lookup is enabled. See `glColorTable'.
11172
11173 `GL_COLOR_WRITEMASK'
11174
11175
11176 PARAMS returns four boolean values: the red, green, blue, and alpha
11177 write enables for the color buffers. The initial value is
11178 (`GL_TRUE', `GL_TRUE', `GL_TRUE', `GL_TRUE'). See `glColorMask'.
11179
11180 `GL_COMPRESSED_TEXTURE_FORMATS'
11181
11182
11183 PARAMS returns a list of symbolic constants of length
11184 `GL_NUM_COMPRESSED_TEXTURE_FORMATS' indicating which compressed
11185 texture formats are available. See `glCompressedTexImage2D'.
11186
11187 `GL_CONVOLUTION_1D'
11188
11189
11190 PARAMS returns a single boolean value indicating whether 1D
11191 convolution is enabled. The initial value is `GL_FALSE'. See
11192 `glConvolutionFilter1D'.
11193
11194 `GL_CONVOLUTION_2D'
11195
11196
11197 PARAMS returns a single boolean value indicating whether 2D
11198 convolution is enabled. The initial value is `GL_FALSE'. See
11199 `glConvolutionFilter2D'.
11200
11201 `GL_CULL_FACE'
11202
11203
11204 PARAMS returns a single boolean value indicating whether polygon
11205 culling is enabled. The initial value is `GL_FALSE'. See
11206 `glCullFace'.
11207
11208 `GL_CULL_FACE_MODE'
11209
11210
11211 PARAMS returns one value, a symbolic constant indicating which
11212 polygon faces are to be culled. The initial value is `GL_BACK'. See
11213 `glCullFace'.
11214
11215 `GL_CURRENT_COLOR'
11216
11217
11218 PARAMS returns four values: the red, green, blue, and alpha values
11219 of the current color. Integer values, if requested, are linearly
11220 mapped from the internal floating-point representation such that
11221 1.0 returns the most positive representable integer value, and -1.0
11222 returns the most negative representable integer value. The initial
11223 value is (1, 1, 1, 1). See `glColor'.
11224
11225 `GL_CURRENT_FOG_COORD'
11226
11227
11228 PARAMS returns one value, the current fog coordinate. The initial
11229 value is 0. See `glFogCoord'.
11230
11231 `GL_CURRENT_INDEX'
11232
11233
11234 PARAMS returns one value, the current color index. The initial
11235 value is 1. See `glIndex'.
11236
11237 `GL_CURRENT_NORMAL'
11238
11239
11240 PARAMS returns three values: the X, Y, and Z values of the current
11241 normal. Integer values, if requested, are linearly mapped from the
11242 internal floating-point representation such that 1.0 returns the
11243 most positive representable integer value, and -1.0 returns the
11244 most negative representable integer value. The initial value is (0,
11245 0, 1). See `glNormal'.
11246
11247 `GL_CURRENT_PROGRAM'
11248
11249
11250 PARAMS returns one value, the name of the program object that is
11251 currently active, or 0 if no program object is active. See
11252 `glUseProgram'.
11253
11254 `GL_CURRENT_RASTER_COLOR'
11255
11256
11257 PARAMS returns four values: the red, green, blue, and alpha color
11258 values of the current raster position. Integer values, if
11259 requested, are linearly mapped from the internal floating-point
11260 representation such that 1.0 returns the most positive
11261 representable integer value, and -1.0 returns the most negative
11262 representable integer value. The initial value is (1, 1, 1, 1). See
11263 `glRasterPos'.
11264
11265 `GL_CURRENT_RASTER_DISTANCE'
11266
11267
11268 PARAMS returns one value, the distance from the eye to the current
11269 raster position. The initial value is 0. See `glRasterPos'.
11270
11271 `GL_CURRENT_RASTER_INDEX'
11272
11273
11274 PARAMS returns one value, the color index of the current raster
11275 position. The initial value is 1. See `glRasterPos'.
11276
11277 `GL_CURRENT_RASTER_POSITION'
11278
11279
11280 PARAMS returns four values: the X, Y, Z, and W components of the
11281 current raster position. X, Y, and Z are in window coordinates, and
11282 W is in clip coordinates. The initial value is (0, 0, 0, 1). See
11283 `glRasterPos'.
11284
11285 `GL_CURRENT_RASTER_POSITION_VALID'
11286
11287
11288 PARAMS returns a single boolean value indicating whether the
11289 current raster position is valid. The initial value is `GL_TRUE'.
11290 See `glRasterPos'.
11291
11292 `GL_CURRENT_RASTER_SECONDARY_COLOR'
11293
11294
11295 PARAMS returns four values: the red, green, blue, and alpha
11296 secondary color values of the current raster position. Integer
11297 values, if requested, are linearly mapped from the internal
11298 floating-point representation such that 1.0 returns the most
11299 positive representable integer value, and -1.0 returns the most
11300 negative representable integer value. The initial value is (1, 1,
11301 1, 1). See `glRasterPos'.
11302
11303 `GL_CURRENT_RASTER_TEXTURE_COORDS'
11304
11305
11306 PARAMS returns four values: the S, T, R, and Q texture coordinates
11307 of the current raster position. The initial value is (0, 0, 0, 1).
11308 See `glRasterPos' and `glMultiTexCoord'.
11309
11310 `GL_CURRENT_SECONDARY_COLOR'
11311
11312
11313 PARAMS returns four values: the red, green, blue, and alpha values
11314 of the current secondary color. Integer values, if requested, are
11315 linearly mapped from the internal floating-point representation
11316 such that 1.0 returns the most positive representable integer
11317 value, and -1.0 returns the most negative representable integer
11318 value. The initial value is (0, 0, 0, 0). See `glSecondaryColor'.
11319
11320 `GL_CURRENT_TEXTURE_COORDS'
11321
11322
11323 PARAMS returns four values: the S, T, R, and Q current texture
11324 coordinates. The initial value is (0, 0, 0, 1). See
11325 `glMultiTexCoord'.
11326
11327 `GL_DEPTH_BIAS'
11328
11329
11330 PARAMS returns one value, the depth bias factor used during pixel
11331 transfers. The initial value is 0. See `glPixelTransfer'.
11332
11333 `GL_DEPTH_BITS'
11334
11335
11336 PARAMS returns one value, the number of bitplanes in the depth
11337 buffer.
11338
11339 `GL_DEPTH_CLEAR_VALUE'
11340
11341
11342 PARAMS returns one value, the value that is used to clear the depth
11343 buffer. Integer values, if requested, are linearly mapped from the
11344 internal floating-point representation such that 1.0 returns the
11345 most positive representable integer value, and -1.0 returns the
11346 most negative representable integer value. The initial value is 1.
11347 See `glClearDepth'.
11348
11349 `GL_DEPTH_FUNC'
11350
11351
11352 PARAMS returns one value, the symbolic constant that indicates the
11353 depth comparison function. The initial value is `GL_LESS'. See
11354 `glDepthFunc'.
11355
11356 `GL_DEPTH_RANGE'
11357
11358
11359 PARAMS returns two values: the near and far mapping limits for the
11360 depth buffer. Integer values, if requested, are linearly mapped
11361 from the internal floating-point representation such that 1.0
11362 returns the most positive representable integer value, and -1.0
11363 returns the most negative representable integer value. The initial
11364 value is (0, 1). See `glDepthRange'.
11365
11366 `GL_DEPTH_SCALE'
11367
11368
11369 PARAMS returns one value, the depth scale factor used during pixel
11370 transfers. The initial value is 1. See `glPixelTransfer'.
11371
11372 `GL_DEPTH_TEST'
11373
11374
11375 PARAMS returns a single boolean value indicating whether depth
11376 testing of fragments is enabled. The initial value is `GL_FALSE'.
11377 See `glDepthFunc' and `glDepthRange'.
11378
11379 `GL_DEPTH_WRITEMASK'
11380
11381
11382 PARAMS returns a single boolean value indicating if the depth
11383 buffer is enabled for writing. The initial value is `GL_TRUE'. See
11384 `glDepthMask'.
11385
11386 `GL_DITHER'
11387
11388
11389 PARAMS returns a single boolean value indicating whether dithering
11390 of fragment colors and indices is enabled. The initial value is
11391 `GL_TRUE'.
11392
11393 `GL_DOUBLEBUFFER'
11394
11395
11396 PARAMS returns a single boolean value indicating whether double
11397 buffering is supported.
11398
11399 `GL_DRAW_BUFFER'
11400
11401
11402 PARAMS returns one value, a symbolic constant indicating which
11403 buffers are being drawn to. See `glDrawBuffer'. The initial value
11404 is `GL_BACK' if there are back buffers, otherwise it is `GL_FRONT'.
11405
11406 `GL_DRAW_BUFFER'I
11407
11408
11409 PARAMS returns one value, a symbolic constant indicating which
11410 buffers are being drawn to by the corresponding output color. See
11411 `glDrawBuffers'. The initial value of `GL_DRAW_BUFFER0' is
11412 `GL_BACK' if there are back buffers, otherwise it is `GL_FRONT'.
11413 The initial values of draw buffers for all other output colors is
11414 `GL_NONE'.
11415
11416 `GL_EDGE_FLAG'
11417
11418
11419 PARAMS returns a single boolean value indicating whether the
11420 current edge flag is `GL_TRUE' or `GL_FALSE'. The initial value is
11421 `GL_TRUE'. See `glEdgeFlag'.
11422
11423 `GL_EDGE_FLAG_ARRAY'
11424
11425
11426 PARAMS returns a single boolean value indicating whether the edge
11427 flag array is enabled. The initial value is `GL_FALSE'. See
11428 `glEdgeFlagPointer'.
11429
11430 `GL_EDGE_FLAG_ARRAY_BUFFER_BINDING'
11431
11432
11433 PARAMS returns a single value, the name of the buffer object
11434 associated with the edge flag array. This buffer object would have
11435 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
11436 recent call to `glEdgeFlagPointer'. If no buffer object was bound
11437 to this target, 0 is returned. The initial value is 0. See
11438 `glBindBuffer'.
11439
11440 `GL_EDGE_FLAG_ARRAY_STRIDE'
11441
11442
11443 PARAMS returns one value, the byte offset between consecutive edge
11444 flags in the edge flag array. The initial value is 0. See
11445 `glEdgeFlagPointer'.
11446
11447 `GL_ELEMENT_ARRAY_BUFFER_BINDING'
11448
11449
11450 PARAMS returns a single value, the name of the buffer object
11451 currently bound to the target `GL_ELEMENT_ARRAY_BUFFER'. If no
11452 buffer object is bound to this target, 0 is returned. The initial
11453 value is 0. See `glBindBuffer'.
11454
11455 `GL_FEEDBACK_BUFFER_SIZE'
11456
11457
11458 PARAMS returns one value, the size of the feedback buffer. See
11459 `glFeedbackBuffer'.
11460
11461 `GL_FEEDBACK_BUFFER_TYPE'
11462
11463
11464 PARAMS returns one value, the type of the feedback buffer. See
11465 `glFeedbackBuffer'.
11466
11467 `GL_FOG'
11468
11469
11470 PARAMS returns a single boolean value indicating whether fogging is
11471 enabled. The initial value is `GL_FALSE'. See `glFog'.
11472
11473 `GL_FOG_COORD_ARRAY'
11474
11475
11476 PARAMS returns a single boolean value indicating whether the fog
11477 coordinate array is enabled. The initial value is `GL_FALSE'. See
11478 `glFogCoordPointer'.
11479
11480 `GL_FOG_COORD_ARRAY_BUFFER_BINDING'
11481
11482
11483 PARAMS returns a single value, the name of the buffer object
11484 associated with the fog coordinate array. This buffer object would
11485 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
11486 most recent call to `glFogCoordPointer'. If no buffer object was
11487 bound to this target, 0 is returned. The initial value is 0. See
11488 `glBindBuffer'.
11489
11490 `GL_FOG_COORD_ARRAY_STRIDE'
11491
11492
11493 PARAMS returns one value, the byte offset between consecutive fog
11494 coordinates in the fog coordinate array. The initial value is 0.
11495 See `glFogCoordPointer'.
11496
11497 `GL_FOG_COORD_ARRAY_TYPE'
11498
11499
11500 PARAMS returns one value, the type of the fog coordinate array. The
11501 initial value is `GL_FLOAT'. See `glFogCoordPointer'.
11502
11503 `GL_FOG_COORD_SRC'
11504
11505
11506 PARAMS returns one value, a symbolic constant indicating the source
11507 of the fog coordinate. The initial value is `GL_FRAGMENT_DEPTH'.
11508 See `glFog'.
11509
11510 `GL_FOG_COLOR'
11511
11512
11513 PARAMS returns four values: the red, green, blue, and alpha
11514 components of the fog color. Integer values, if requested, are
11515 linearly mapped from the internal floating-point representation
11516 such that 1.0 returns the most positive representable integer
11517 value, and -1.0 returns the most negative representable integer
11518 value. The initial value is (0, 0, 0, 0). See `glFog'.
11519
11520 `GL_FOG_DENSITY'
11521
11522
11523 PARAMS returns one value, the fog density parameter. The initial
11524 value is 1. See `glFog'.
11525
11526 `GL_FOG_END'
11527
11528
11529 PARAMS returns one value, the end factor for the linear fog
11530 equation. The initial value is 1. See `glFog'.
11531
11532 `GL_FOG_HINT'
11533
11534
11535 PARAMS returns one value, a symbolic constant indicating the mode
11536 of the fog hint. The initial value is `GL_DONT_CARE'. See `glHint'.
11537
11538 `GL_FOG_INDEX'
11539
11540
11541 PARAMS returns one value, the fog color index. The initial value is
11542 0. See `glFog'.
11543
11544 `GL_FOG_MODE'
11545
11546
11547 PARAMS returns one value, a symbolic constant indicating which fog
11548 equation is selected. The initial value is `GL_EXP'. See `glFog'.
11549
11550 `GL_FOG_START'
11551
11552
11553 PARAMS returns one value, the start factor for the linear fog
11554 equation. The initial value is 0. See `glFog'.
11555
11556 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT'
11557
11558
11559 PARAMS returns one value, a symbolic constant indicating the mode
11560 of the derivative accuracy hint for fragment shaders. The initial
11561 value is `GL_DONT_CARE'. See `glHint'.
11562
11563 `GL_FRONT_FACE'
11564
11565
11566 PARAMS returns one value, a symbolic constant indicating whether
11567 clockwise or counterclockwise polygon winding is treated as
11568 front-facing. The initial value is `GL_CCW'. See `glFrontFace'.
11569
11570 `GL_GENERATE_MIPMAP_HINT'
11571
11572
11573 PARAMS returns one value, a symbolic constant indicating the mode
11574 of the mipmap generation filtering hint. The initial value is
11575 `GL_DONT_CARE'. See `glHint'.
11576
11577 `GL_GREEN_BIAS'
11578
11579
11580 PARAMS returns one value, the green bias factor used during pixel
11581 transfers. The initial value is 0.
11582
11583 `GL_GREEN_BITS'
11584
11585
11586 PARAMS returns one value, the number of green bitplanes in each
11587 color buffer.
11588
11589 `GL_GREEN_SCALE'
11590
11591
11592 PARAMS returns one value, the green scale factor used during pixel
11593 transfers. The initial value is 1. See `glPixelTransfer'.
11594
11595 `GL_HISTOGRAM'
11596
11597
11598 PARAMS returns a single boolean value indicating whether histogram
11599 is enabled. The initial value is `GL_FALSE'. See `glHistogram'.
11600
11601 `GL_INDEX_ARRAY'
11602
11603
11604 PARAMS returns a single boolean value indicating whether the color
11605 index array is enabled. The initial value is `GL_FALSE'. See
11606 `glIndexPointer'.
11607
11608 `GL_INDEX_ARRAY_BUFFER_BINDING'
11609
11610
11611 PARAMS returns a single value, the name of the buffer object
11612 associated with the color index array. This buffer object would
11613 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
11614 most recent call to `glIndexPointer'. If no buffer object was bound
11615 to this target, 0 is returned. The initial value is 0. See
11616 `glBindBuffer'.
11617
11618 `GL_INDEX_ARRAY_STRIDE'
11619
11620
11621 PARAMS returns one value, the byte offset between consecutive color
11622 indexes in the color index array. The initial value is 0. See
11623 `glIndexPointer'.
11624
11625 `GL_INDEX_ARRAY_TYPE'
11626
11627
11628 PARAMS returns one value, the data type of indexes in the color
11629 index array. The initial value is `GL_FLOAT'. See `glIndexPointer'.
11630
11631 `GL_INDEX_BITS'
11632
11633
11634 PARAMS returns one value, the number of bitplanes in each color
11635 index buffer.
11636
11637 `GL_INDEX_CLEAR_VALUE'
11638
11639
11640 PARAMS returns one value, the color index used to clear the color
11641 index buffers. The initial value is 0. See `glClearIndex'.
11642
11643 `GL_INDEX_LOGIC_OP'
11644
11645
11646 PARAMS returns a single boolean value indicating whether a
11647 fragment's index values are merged into the framebuffer using a
11648 logical operation. The initial value is `GL_FALSE'. See
11649 `glLogicOp'.
11650
11651 `GL_INDEX_MODE'
11652
11653
11654 PARAMS returns a single boolean value indicating whether the GL is
11655 in color index mode (`GL_TRUE') or RGBA mode (`GL_FALSE').
11656
11657 `GL_INDEX_OFFSET'
11658
11659
11660 PARAMS returns one value, the offset added to color and stencil
11661 indices during pixel transfers. The initial value is 0. See
11662 `glPixelTransfer'.
11663
11664 `GL_INDEX_SHIFT'
11665
11666
11667 PARAMS returns one value, the amount that color and stencil indices
11668 are shifted during pixel transfers. The initial value is 0. See
11669 `glPixelTransfer'.
11670
11671 `GL_INDEX_WRITEMASK'
11672
11673
11674 PARAMS returns one value, a mask indicating which bitplanes of each
11675 color index buffer can be written. The initial value is all 1's.
11676 See `glIndexMask'.
11677
11678 `GL_LIGHT'I
11679
11680
11681 PARAMS returns a single boolean value indicating whether the
11682 specified light is enabled. The initial value is `GL_FALSE'. See
11683 `glLight' and `glLightModel'.
11684
11685 `GL_LIGHTING'
11686
11687
11688 PARAMS returns a single boolean value indicating whether lighting
11689 is enabled. The initial value is `GL_FALSE'. See `glLightModel'.
11690
11691 `GL_LIGHT_MODEL_AMBIENT'
11692
11693
11694 PARAMS returns four values: the red, green, blue, and alpha
11695 components of the ambient intensity of the entire scene. Integer
11696 values, if requested, are linearly mapped from the internal
11697 floating-point representation such that 1.0 returns the most
11698 positive representable integer value, and -1.0 returns the most
11699 negative representable integer value. The initial value is (0.2,
11700 0.2, 0.2, 1.0). See `glLightModel'.
11701
11702 `GL_LIGHT_MODEL_COLOR_CONTROL'
11703
11704
11705 PARAMS returns single enumerated value indicating whether specular
11706 reflection calculations are separated from normal lighting
11707 computations. The initial value is `GL_SINGLE_COLOR'.
11708
11709 `GL_LIGHT_MODEL_LOCAL_VIEWER'
11710
11711
11712 PARAMS returns a single boolean value indicating whether specular
11713 reflection calculations treat the viewer as being local to the
11714 scene. The initial value is `GL_FALSE'. See `glLightModel'.
11715
11716 `GL_LIGHT_MODEL_TWO_SIDE'
11717
11718
11719 PARAMS returns a single boolean value indicating whether separate
11720 materials are used to compute lighting for front- and back-facing
11721 polygons. The initial value is `GL_FALSE'. See `glLightModel'.
11722
11723 `GL_LINE_SMOOTH'
11724
11725
11726 PARAMS returns a single boolean value indicating whether
11727 antialiasing of lines is enabled. The initial value is `GL_FALSE'.
11728 See `glLineWidth'.
11729
11730 `GL_LINE_SMOOTH_HINT'
11731
11732
11733 PARAMS returns one value, a symbolic constant indicating the mode
11734 of the line antialiasing hint. The initial value is `GL_DONT_CARE'.
11735 See `glHint'.
11736
11737 `GL_LINE_STIPPLE'
11738
11739
11740 PARAMS returns a single boolean value indicating whether stippling
11741 of lines is enabled. The initial value is `GL_FALSE'. See
11742 `glLineStipple'.
11743
11744 `GL_LINE_STIPPLE_PATTERN'
11745
11746
11747 PARAMS returns one value, the 16-bit line stipple pattern. The
11748 initial value is all 1's. See `glLineStipple'.
11749
11750 `GL_LINE_STIPPLE_REPEAT'
11751
11752
11753 PARAMS returns one value, the line stipple repeat factor. The
11754 initial value is 1. See `glLineStipple'.
11755
11756 `GL_LINE_WIDTH'
11757
11758
11759 PARAMS returns one value, the line width as specified with
11760 `glLineWidth'. The initial value is 1.
11761
11762 `GL_LINE_WIDTH_GRANULARITY'
11763
11764
11765 PARAMS returns one value, the width difference between adjacent
11766 supported widths for antialiased lines. See `glLineWidth'.
11767
11768 `GL_LINE_WIDTH_RANGE'
11769
11770
11771 PARAMS returns two values: the smallest and largest supported
11772 widths for antialiased lines. See `glLineWidth'.
11773
11774 `GL_LIST_BASE'
11775
11776
11777 PARAMS returns one value, the base offset added to all names in
11778 arrays presented to `glCallLists'. The initial value is 0. See
11779 `glListBase'.
11780
11781 `GL_LIST_INDEX'
11782
11783
11784 PARAMS returns one value, the name of the display list currently
11785 under construction. 0 is returned if no display list is currently
11786 under construction. The initial value is 0. See `glNewList'.
11787
11788 `GL_LIST_MODE'
11789
11790
11791 PARAMS returns one value, a symbolic constant indicating the
11792 construction mode of the display list currently under construction.
11793 The initial value is 0. See `glNewList'.
11794
11795 `GL_LOGIC_OP_MODE'
11796
11797
11798 PARAMS returns one value, a symbolic constant indicating the
11799 selected logic operation mode. The initial value is `GL_COPY'. See
11800 `glLogicOp'.
11801
11802 `GL_MAP1_COLOR_4'
11803
11804
11805 PARAMS returns a single boolean value indicating whether 1D
11806 evaluation generates colors. The initial value is `GL_FALSE'. See
11807 `glMap1'.
11808
11809 `GL_MAP1_GRID_DOMAIN'
11810
11811
11812 PARAMS returns two values: the endpoints of the 1D map's grid
11813 domain. The initial value is (0, 1). See `glMapGrid'.
11814
11815 `GL_MAP1_GRID_SEGMENTS'
11816
11817
11818 PARAMS returns one value, the number of partitions in the 1D map's
11819 grid domain. The initial value is 1. See `glMapGrid'.
11820
11821 `GL_MAP1_INDEX'
11822
11823
11824 PARAMS returns a single boolean value indicating whether 1D
11825 evaluation generates color indices. The initial value is
11826 `GL_FALSE'. See `glMap1'.
11827
11828 `GL_MAP1_NORMAL'
11829
11830
11831 PARAMS returns a single boolean value indicating whether 1D
11832 evaluation generates normals. The initial value is `GL_FALSE'. See
11833 `glMap1'.
11834
11835 `GL_MAP1_TEXTURE_COORD_1'
11836
11837
11838 PARAMS returns a single boolean value indicating whether 1D
11839 evaluation generates 1D texture coordinates. The initial value is
11840 `GL_FALSE'. See `glMap1'.
11841
11842 `GL_MAP1_TEXTURE_COORD_2'
11843
11844
11845 PARAMS returns a single boolean value indicating whether 1D
11846 evaluation generates 2D texture coordinates. The initial value is
11847 `GL_FALSE'. See `glMap1'.
11848
11849 `GL_MAP1_TEXTURE_COORD_3'
11850
11851
11852 PARAMS returns a single boolean value indicating whether 1D
11853 evaluation generates 3D texture coordinates. The initial value is
11854 `GL_FALSE'. See `glMap1'.
11855
11856 `GL_MAP1_TEXTURE_COORD_4'
11857
11858
11859 PARAMS returns a single boolean value indicating whether 1D
11860 evaluation generates 4D texture coordinates. The initial value is
11861 `GL_FALSE'. See `glMap1'.
11862
11863 `GL_MAP1_VERTEX_3'
11864
11865
11866 PARAMS returns a single boolean value indicating whether 1D
11867 evaluation generates 3D vertex coordinates. The initial value is
11868 `GL_FALSE'. See `glMap1'.
11869
11870 `GL_MAP1_VERTEX_4'
11871
11872
11873 PARAMS returns a single boolean value indicating whether 1D
11874 evaluation generates 4D vertex coordinates. The initial value is
11875 `GL_FALSE'. See `glMap1'.
11876
11877 `GL_MAP2_COLOR_4'
11878
11879
11880 PARAMS returns a single boolean value indicating whether 2D
11881 evaluation generates colors. The initial value is `GL_FALSE'. See
11882 `glMap2'.
11883
11884 `GL_MAP2_GRID_DOMAIN'
11885
11886
11887 PARAMS returns four values: the endpoints of the 2D map's I and J
11888 grid domains. The initial value is (0,1; 0,1). See `glMapGrid'.
11889
11890 `GL_MAP2_GRID_SEGMENTS'
11891
11892
11893 PARAMS returns two values: the number of partitions in the 2D map's
11894 I and J grid domains. The initial value is (1,1). See `glMapGrid'.
11895
11896 `GL_MAP2_INDEX'
11897
11898
11899 PARAMS returns a single boolean value indicating whether 2D
11900 evaluation generates color indices. The initial value is
11901 `GL_FALSE'. See `glMap2'.
11902
11903 `GL_MAP2_NORMAL'
11904
11905
11906 PARAMS returns a single boolean value indicating whether 2D
11907 evaluation generates normals. The initial value is `GL_FALSE'. See
11908 `glMap2'.
11909
11910 `GL_MAP2_TEXTURE_COORD_1'
11911
11912
11913 PARAMS returns a single boolean value indicating whether 2D
11914 evaluation generates 1D texture coordinates. The initial value is
11915 `GL_FALSE'. See `glMap2'.
11916
11917 `GL_MAP2_TEXTURE_COORD_2'
11918
11919
11920 PARAMS returns a single boolean value indicating whether 2D
11921 evaluation generates 2D texture coordinates. The initial value is
11922 `GL_FALSE'. See `glMap2'.
11923
11924 `GL_MAP2_TEXTURE_COORD_3'
11925
11926
11927 PARAMS returns a single boolean value indicating whether 2D
11928 evaluation generates 3D texture coordinates. The initial value is
11929 `GL_FALSE'. See `glMap2'.
11930
11931 `GL_MAP2_TEXTURE_COORD_4'
11932
11933
11934 PARAMS returns a single boolean value indicating whether 2D
11935 evaluation generates 4D texture coordinates. The initial value is
11936 `GL_FALSE'. See `glMap2'.
11937
11938 `GL_MAP2_VERTEX_3'
11939
11940
11941 PARAMS returns a single boolean value indicating whether 2D
11942 evaluation generates 3D vertex coordinates. The initial value is
11943 `GL_FALSE'. See `glMap2'.
11944
11945 `GL_MAP2_VERTEX_4'
11946
11947
11948 PARAMS returns a single boolean value indicating whether 2D
11949 evaluation generates 4D vertex coordinates. The initial value is
11950 `GL_FALSE'. See `glMap2'.
11951
11952 `GL_MAP_COLOR'
11953
11954
11955 PARAMS returns a single boolean value indicating if colors and
11956 color indices are to be replaced by table lookup during pixel
11957 transfers. The initial value is `GL_FALSE'. See `glPixelTransfer'.
11958
11959 `GL_MAP_STENCIL'
11960
11961
11962 PARAMS returns a single boolean value indicating if stencil indices
11963 are to be replaced by table lookup during pixel transfers. The
11964 initial value is `GL_FALSE'. See `glPixelTransfer'.
11965
11966 `GL_MATRIX_MODE'
11967
11968
11969 PARAMS returns one value, a symbolic constant indicating which
11970 matrix stack is currently the target of all matrix operations. The
11971 initial value is `GL_MODELVIEW'. See `glMatrixMode'.
11972
11973 `GL_MAX_3D_TEXTURE_SIZE'
11974
11975
11976 PARAMS returns one value, a rough estimate of the largest 3D
11977 texture that the GL can handle. The value must be at least 16. If
11978 the GL version is 1.2 or greater, use `GL_PROXY_TEXTURE_3D' to
11979 determine if a texture is too large. See `glTexImage3D'.
11980
11981 `GL_MAX_CLIENT_ATTRIB_STACK_DEPTH'
11982
11983
11984 PARAMS returns one value indicating the maximum supported depth of
11985 the client attribute stack. See `glPushClientAttrib'.
11986
11987 `GL_MAX_ATTRIB_STACK_DEPTH'
11988
11989
11990 PARAMS returns one value, the maximum supported depth of the
11991 attribute stack. The value must be at least 16. See `glPushAttrib'.
11992
11993 `GL_MAX_CLIP_PLANES'
11994
11995
11996 PARAMS returns one value, the maximum number of application-defined
11997 clipping planes. The value must be at least 6. See `glClipPlane'.
11998
11999 `GL_MAX_COLOR_MATRIX_STACK_DEPTH'
12000
12001
12002 PARAMS returns one value, the maximum supported depth of the color
12003 matrix stack. The value must be at least 2. See `glPushMatrix'.
12004
12005 `GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS'
12006
12007
12008 PARAMS returns one value, the maximum supported texture image units
12009 that can be used to access texture maps from the vertex shader and
12010 the fragment processor combined. If both the vertex shader and the
12011 fragment processing stage access the same texture image unit, then
12012 that counts as using two texture image units against this limit.
12013 The value must be at least 2. See `glActiveTexture'.
12014
12015 `GL_MAX_CUBE_MAP_TEXTURE_SIZE'
12016
12017
12018 PARAMS returns one value. The value gives a rough estimate of the
12019 largest cube-map texture that the GL can handle. The value must be
12020 at least 16. If the GL version is 1.3 or greater, use
12021 `GL_PROXY_TEXTURE_CUBE_MAP' to determine if a texture is too large.
12022 See `glTexImage2D'.
12023
12024 `GL_MAX_DRAW_BUFFERS'
12025
12026
12027 PARAMS returns one value, the maximum number of simultaneous output
12028 colors allowed from a fragment shader using the `gl_FragData'
12029 built-in array. The value must be at least 1. See `glDrawBuffers'.
12030
12031 `GL_MAX_ELEMENTS_INDICES'
12032
12033
12034 PARAMS returns one value, the recommended maximum number of vertex
12035 array indices. See `glDrawRangeElements'.
12036
12037 `GL_MAX_ELEMENTS_VERTICES'
12038
12039
12040 PARAMS returns one value, the recommended maximum number of vertex
12041 array vertices. See `glDrawRangeElements'.
12042
12043 `GL_MAX_EVAL_ORDER'
12044
12045
12046 PARAMS returns one value, the maximum equation order supported by
12047 1D and 2D evaluators. The value must be at least 8. See `glMap1'
12048 and `glMap2'.
12049
12050 `GL_MAX_FRAGMENT_UNIFORM_COMPONENTS'
12051
12052
12053 PARAMS returns one value, the maximum number of individual
12054 floating-point, integer, or boolean values that can be held in
12055 uniform variable storage for a fragment shader. The value must be
12056 at least 64. See `glUniform'.
12057
12058 `GL_MAX_LIGHTS'
12059
12060
12061 PARAMS returns one value, the maximum number of lights. The value
12062 must be at least 8. See `glLight'.
12063
12064 `GL_MAX_LIST_NESTING'
12065
12066
12067 PARAMS returns one value, the maximum recursion depth allowed
12068 during display-list traversal. The value must be at least 64. See
12069 `glCallList'.
12070
12071 `GL_MAX_MODELVIEW_STACK_DEPTH'
12072
12073
12074 PARAMS returns one value, the maximum supported depth of the
12075 modelview matrix stack. The value must be at least 32. See
12076 `glPushMatrix'.
12077
12078 `GL_MAX_NAME_STACK_DEPTH'
12079
12080
12081 PARAMS returns one value, the maximum supported depth of the
12082 selection name stack. The value must be at least 64. See
12083 `glPushName'.
12084
12085 `GL_MAX_PIXEL_MAP_TABLE'
12086
12087
12088 PARAMS returns one value, the maximum supported size of a
12089 `glPixelMap' lookup table. The value must be at least 32. See
12090 `glPixelMap'.
12091
12092 `GL_MAX_PROJECTION_STACK_DEPTH'
12093
12094
12095 PARAMS returns one value, the maximum supported depth of the
12096 projection matrix stack. The value must be at least 2. See
12097 `glPushMatrix'.
12098
12099 `GL_MAX_TEXTURE_COORDS'
12100
12101
12102 PARAMS returns one value, the maximum number of texture coordinate
12103 sets available to vertex and fragment shaders. The value must be at
12104 least 2. See `glActiveTexture' and `glClientActiveTexture'.
12105
12106 `GL_MAX_TEXTURE_IMAGE_UNITS'
12107
12108
12109 PARAMS returns one value, the maximum supported texture image units
12110 that can be used to access texture maps from the fragment shader.
12111 The value must be at least 2. See `glActiveTexture'.
12112
12113 `GL_MAX_TEXTURE_LOD_BIAS'
12114
12115
12116 PARAMS returns one value, the maximum, absolute value of the
12117 texture level-of-detail bias. The value must be at least 4.
12118
12119 `GL_MAX_TEXTURE_SIZE'
12120
12121
12122 PARAMS returns one value. The value gives a rough estimate of the
12123 largest texture that the GL can handle. The value must be at least
12124 64. If the GL version is 1.1 or greater, use `GL_PROXY_TEXTURE_1D'
12125 or `GL_PROXY_TEXTURE_2D' to determine if a texture is too large.
12126 See `glTexImage1D' and `glTexImage2D'.
12127
12128 `GL_MAX_TEXTURE_STACK_DEPTH'
12129
12130
12131 PARAMS returns one value, the maximum supported depth of the
12132 texture matrix stack. The value must be at least 2. See
12133 `glPushMatrix'.
12134
12135 `GL_MAX_TEXTURE_UNITS'
12136
12137
12138 PARAMS returns a single value indicating the number of conventional
12139 texture units supported. Each conventional texture unit includes
12140 both a texture coordinate set and a texture image unit.
12141 Conventional texture units may be used for fixed-function
12142 (non-shader) rendering. The value must be at least 2. Additional
12143 texture coordinate sets and texture image units may be accessed
12144 from vertex and fragment shaders. See `glActiveTexture' and
12145 `glClientActiveTexture'.
12146
12147 `GL_MAX_VARYING_FLOATS'
12148
12149
12150 PARAMS returns one value, the maximum number of interpolators
12151 available for processing varying variables used by vertex and
12152 fragment shaders. This value represents the number of individual
12153 floating-point values that can be interpolated; varying variables
12154 declared as vectors, matrices, and arrays will all consume multiple
12155 interpolators. The value must be at least 32.
12156
12157 `GL_MAX_VERTEX_ATTRIBS'
12158
12159
12160 PARAMS returns one value, the maximum number of 4-component generic
12161 vertex attributes accessible to a vertex shader. The value must be
12162 at least 16. See `glVertexAttrib'.
12163
12164 `GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS'
12165
12166
12167 PARAMS returns one value, the maximum supported texture image units
12168 that can be used to access texture maps from the vertex shader. The
12169 value may be 0. See `glActiveTexture'.
12170
12171 `GL_MAX_VERTEX_UNIFORM_COMPONENTS'
12172
12173
12174 PARAMS returns one value, the maximum number of individual
12175 floating-point, integer, or boolean values that can be held in
12176 uniform variable storage for a vertex shader. The value must be at
12177 least 512. See `glUniform'.
12178
12179 `GL_MAX_VIEWPORT_DIMS'
12180
12181
12182 PARAMS returns two values: the maximum supported width and height
12183 of the viewport. These must be at least as large as the visible
12184 dimensions of the display being rendered to. See `glViewport'.
12185
12186 `GL_MINMAX'
12187
12188
12189 PARAMS returns a single boolean value indicating whether pixel
12190 minmax values are computed. The initial value is `GL_FALSE'. See
12191 `glMinmax'.
12192
12193 `GL_MODELVIEW_MATRIX'
12194
12195
12196 PARAMS returns sixteen values: the modelview matrix on the top of
12197 the modelview matrix stack. Initially this matrix is the identity
12198 matrix. See `glPushMatrix'.
12199
12200 `GL_MODELVIEW_STACK_DEPTH'
12201
12202
12203 PARAMS returns one value, the number of matrices on the modelview
12204 matrix stack. The initial value is 1. See `glPushMatrix'.
12205
12206 `GL_NAME_STACK_DEPTH'
12207
12208
12209 PARAMS returns one value, the number of names on the selection name
12210 stack. The initial value is 0. See `glPushName'.
12211
12212 `GL_NORMAL_ARRAY'
12213
12214
12215 PARAMS returns a single boolean value, indicating whether the
12216 normal array is enabled. The initial value is `GL_FALSE'. See
12217 `glNormalPointer'.
12218
12219 `GL_NORMAL_ARRAY_BUFFER_BINDING'
12220
12221
12222 PARAMS returns a single value, the name of the buffer object
12223 associated with the normal array. This buffer object would have
12224 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
12225 recent call to `glNormalPointer'. If no buffer object was bound to
12226 this target, 0 is returned. The initial value is 0. See
12227 `glBindBuffer'.
12228
12229 `GL_NORMAL_ARRAY_STRIDE'
12230
12231
12232 PARAMS returns one value, the byte offset between consecutive
12233 normals in the normal array. The initial value is 0. See
12234 `glNormalPointer'.
12235
12236 `GL_NORMAL_ARRAY_TYPE'
12237
12238
12239 PARAMS returns one value, the data type of each coordinate in the
12240 normal array. The initial value is `GL_FLOAT'. See
12241 `glNormalPointer'.
12242
12243 `GL_NORMALIZE'
12244
12245
12246 PARAMS returns a single boolean value indicating whether normals
12247 are automatically scaled to unit length after they have been
12248 transformed to eye coordinates. The initial value is `GL_FALSE'.
12249 See `glNormal'.
12250
12251 `GL_NUM_COMPRESSED_TEXTURE_FORMATS'
12252
12253
12254 PARAMS returns a single integer value indicating the number of
12255 available compressed texture formats. The minimum value is 0. See
12256 `glCompressedTexImage2D'.
12257
12258 `GL_PACK_ALIGNMENT'
12259
12260
12261 PARAMS returns one value, the byte alignment used for writing pixel
12262 data to memory. The initial value is 4. See `glPixelStore'.
12263
12264 `GL_PACK_IMAGE_HEIGHT'
12265
12266
12267 PARAMS returns one value, the image height used for writing pixel
12268 data to memory. The initial value is 0. See `glPixelStore'.
12269
12270 `GL_PACK_LSB_FIRST'
12271
12272
12273 PARAMS returns a single boolean value indicating whether single-bit
12274 pixels being written to memory are written first to the least
12275 significant bit of each unsigned byte. The initial value is
12276 `GL_FALSE'. See `glPixelStore'.
12277
12278 `GL_PACK_ROW_LENGTH'
12279
12280
12281 PARAMS returns one value, the row length used for writing pixel
12282 data to memory. The initial value is 0. See `glPixelStore'.
12283
12284 `GL_PACK_SKIP_IMAGES'
12285
12286
12287 PARAMS returns one value, the number of pixel images skipped before
12288 the first pixel is written into memory. The initial value is 0. See
12289 `glPixelStore'.
12290
12291 `GL_PACK_SKIP_PIXELS'
12292
12293
12294 PARAMS returns one value, the number of pixel locations skipped
12295 before the first pixel is written into memory. The initial value is
12296 0. See `glPixelStore'.
12297
12298 `GL_PACK_SKIP_ROWS'
12299
12300
12301 PARAMS returns one value, the number of rows of pixel locations
12302 skipped before the first pixel is written into memory. The initial
12303 value is 0. See `glPixelStore'.
12304
12305 `GL_PACK_SWAP_BYTES'
12306
12307
12308 PARAMS returns a single boolean value indicating whether the bytes
12309 of two-byte and four-byte pixel indices and components are swapped
12310 before being written to memory. The initial value is `GL_FALSE'.
12311 See `glPixelStore'.
12312
12313 `GL_PERSPECTIVE_CORRECTION_HINT'
12314
12315
12316 PARAMS returns one value, a symbolic constant indicating the mode
12317 of the perspective correction hint. The initial value is
12318 `GL_DONT_CARE'. See `glHint'.
12319
12320 `GL_PIXEL_MAP_A_TO_A_SIZE'
12321
12322
12323 PARAMS returns one value, the size of the alpha-to-alpha pixel
12324 translation table. The initial value is 1. See `glPixelMap'.
12325
12326 `GL_PIXEL_MAP_B_TO_B_SIZE'
12327
12328
12329 PARAMS returns one value, the size of the blue-to-blue pixel
12330 translation table. The initial value is 1. See `glPixelMap'.
12331
12332 `GL_PIXEL_MAP_G_TO_G_SIZE'
12333
12334
12335 PARAMS returns one value, the size of the green-to-green pixel
12336 translation table. The initial value is 1. See `glPixelMap'.
12337
12338 `GL_PIXEL_MAP_I_TO_A_SIZE'
12339
12340
12341 PARAMS returns one value, the size of the index-to-alpha pixel
12342 translation table. The initial value is 1. See `glPixelMap'.
12343
12344 `GL_PIXEL_MAP_I_TO_B_SIZE'
12345
12346
12347 PARAMS returns one value, the size of the index-to-blue pixel
12348 translation table. The initial value is 1. See `glPixelMap'.
12349
12350 `GL_PIXEL_MAP_I_TO_G_SIZE'
12351
12352
12353 PARAMS returns one value, the size of the index-to-green pixel
12354 translation table. The initial value is 1. See `glPixelMap'.
12355
12356 `GL_PIXEL_MAP_I_TO_I_SIZE'
12357
12358
12359 PARAMS returns one value, the size of the index-to-index pixel
12360 translation table. The initial value is 1. See `glPixelMap'.
12361
12362 `GL_PIXEL_MAP_I_TO_R_SIZE'
12363
12364
12365 PARAMS returns one value, the size of the index-to-red pixel
12366 translation table. The initial value is 1. See `glPixelMap'.
12367
12368 `GL_PIXEL_MAP_R_TO_R_SIZE'
12369
12370
12371 PARAMS returns one value, the size of the red-to-red pixel
12372 translation table. The initial value is 1. See `glPixelMap'.
12373
12374 `GL_PIXEL_MAP_S_TO_S_SIZE'
12375
12376
12377 PARAMS returns one value, the size of the stencil-to-stencil pixel
12378 translation table. The initial value is 1. See `glPixelMap'.
12379
12380 `GL_PIXEL_PACK_BUFFER_BINDING'
12381
12382
12383 PARAMS returns a single value, the name of the buffer object
12384 currently bound to the target `GL_PIXEL_PACK_BUFFER'. If no buffer
12385 object is bound to this target, 0 is returned. The initial value is
12386 0. See `glBindBuffer'.
12387
12388 `GL_PIXEL_UNPACK_BUFFER_BINDING'
12389
12390
12391 PARAMS returns a single value, the name of the buffer object
12392 currently bound to the target `GL_PIXEL_UNPACK_BUFFER'. If no
12393 buffer object is bound to this target, 0 is returned. The initial
12394 value is 0. See `glBindBuffer'.
12395
12396 `GL_POINT_DISTANCE_ATTENUATION'
12397
12398
12399 PARAMS returns three values, the coefficients for computing the
12400 attenuation value for points. See `glPointParameter'.
12401
12402 `GL_POINT_FADE_THRESHOLD_SIZE'
12403
12404
12405 PARAMS returns one value, the point size threshold for determining
12406 the point size. See `glPointParameter'.
12407
12408 `GL_POINT_SIZE'
12409
12410
12411 PARAMS returns one value, the point size as specified by
12412 `glPointSize'. The initial value is 1.
12413
12414 `GL_POINT_SIZE_GRANULARITY'
12415
12416
12417 PARAMS returns one value, the size difference between adjacent
12418 supported sizes for antialiased points. See `glPointSize'.
12419
12420 `GL_POINT_SIZE_MAX'
12421
12422
12423 PARAMS returns one value, the upper bound for the attenuated point
12424 sizes. The initial value is 0.0. See `glPointParameter'.
12425
12426 `GL_POINT_SIZE_MIN'
12427
12428
12429 PARAMS returns one value, the lower bound for the attenuated point
12430 sizes. The initial value is 1.0. See `glPointParameter'.
12431
12432 `GL_POINT_SIZE_RANGE'
12433
12434
12435 PARAMS returns two values: the smallest and largest supported sizes
12436 for antialiased points. The smallest size must be at most 1, and
12437 the largest size must be at least 1. See `glPointSize'.
12438
12439 `GL_POINT_SMOOTH'
12440
12441
12442 PARAMS returns a single boolean value indicating whether
12443 antialiasing of points is enabled. The initial value is `GL_FALSE'.
12444 See `glPointSize'.
12445
12446 `GL_POINT_SMOOTH_HINT'
12447
12448
12449 PARAMS returns one value, a symbolic constant indicating the mode
12450 of the point antialiasing hint. The initial value is
12451 `GL_DONT_CARE'. See `glHint'.
12452
12453 `GL_POINT_SPRITE'
12454
12455
12456 PARAMS returns a single boolean value indicating whether point
12457 sprite is enabled. The initial value is `GL_FALSE'.
12458
12459 `GL_POLYGON_MODE'
12460
12461
12462 PARAMS returns two values: symbolic constants indicating whether
12463 front-facing and back-facing polygons are rasterized as points,
12464 lines, or filled polygons. The initial value is `GL_FILL'. See
12465 `glPolygonMode'.
12466
12467 `GL_POLYGON_OFFSET_FACTOR'
12468
12469
12470 PARAMS returns one value, the scaling factor used to determine the
12471 variable offset that is added to the depth value of each fragment
12472 generated when a polygon is rasterized. The initial value is 0. See
12473 `glPolygonOffset'.
12474
12475 `GL_POLYGON_OFFSET_UNITS'
12476
12477
12478 PARAMS returns one value. This value is multiplied by an
12479 implementation-specific value and then added to the depth value of
12480 each fragment generated when a polygon is rasterized. The initial
12481 value is 0. See `glPolygonOffset'.
12482
12483 `GL_POLYGON_OFFSET_FILL'
12484
12485
12486 PARAMS returns a single boolean value indicating whether polygon
12487 offset is enabled for polygons in fill mode. The initial value is
12488 `GL_FALSE'. See `glPolygonOffset'.
12489
12490 `GL_POLYGON_OFFSET_LINE'
12491
12492
12493 PARAMS returns a single boolean value indicating whether polygon
12494 offset is enabled for polygons in line mode. The initial value is
12495 `GL_FALSE'. See `glPolygonOffset'.
12496
12497 `GL_POLYGON_OFFSET_POINT'
12498
12499
12500 PARAMS returns a single boolean value indicating whether polygon
12501 offset is enabled for polygons in point mode. The initial value is
12502 `GL_FALSE'. See `glPolygonOffset'.
12503
12504 `GL_POLYGON_SMOOTH'
12505
12506
12507 PARAMS returns a single boolean value indicating whether
12508 antialiasing of polygons is enabled. The initial value is
12509 `GL_FALSE'. See `glPolygonMode'.
12510
12511 `GL_POLYGON_SMOOTH_HINT'
12512
12513
12514 PARAMS returns one value, a symbolic constant indicating the mode
12515 of the polygon antialiasing hint. The initial value is
12516 `GL_DONT_CARE'. See `glHint'.
12517
12518 `GL_POLYGON_STIPPLE'
12519
12520
12521 PARAMS returns a single boolean value indicating whether polygon
12522 stippling is enabled. The initial value is `GL_FALSE'. See
12523 `glPolygonStipple'.
12524
12525 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
12526
12527
12528 PARAMS returns a single boolean value indicating whether post color
12529 matrix transformation lookup is enabled. The initial value is
12530 `GL_FALSE'. See `glColorTable'.
12531
12532 `GL_POST_COLOR_MATRIX_RED_BIAS'
12533
12534
12535 PARAMS returns one value, the red bias factor applied to RGBA
12536 fragments after color matrix transformations. The initial value is
12537 0. See `glPixelTransfer'.
12538
12539 `GL_POST_COLOR_MATRIX_GREEN_BIAS'
12540
12541
12542 PARAMS returns one value, the green bias factor applied to RGBA
12543 fragments after color matrix transformations. The initial value is
12544 0. See `glPixelTransfer'
12545
12546 `GL_POST_COLOR_MATRIX_BLUE_BIAS'
12547
12548
12549 PARAMS returns one value, the blue bias factor applied to RGBA
12550 fragments after color matrix transformations. The initial value is
12551 0. See `glPixelTransfer'.
12552
12553 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'
12554
12555
12556 PARAMS returns one value, the alpha bias factor applied to RGBA
12557 fragments after color matrix transformations. The initial value is
12558 0. See `glPixelTransfer'.
12559
12560 `GL_POST_COLOR_MATRIX_RED_SCALE'
12561
12562
12563 PARAMS returns one value, the red scale factor applied to RGBA
12564 fragments after color matrix transformations. The initial value is
12565 1. See `glPixelTransfer'.
12566
12567 `GL_POST_COLOR_MATRIX_GREEN_SCALE'
12568
12569
12570 PARAMS returns one value, the green scale factor applied to RGBA
12571 fragments after color matrix transformations. The initial value is
12572 1. See `glPixelTransfer'.
12573
12574 `GL_POST_COLOR_MATRIX_BLUE_SCALE'
12575
12576
12577 PARAMS returns one value, the blue scale factor applied to RGBA
12578 fragments after color matrix transformations. The initial value is
12579 1. See `glPixelTransfer'.
12580
12581 `GL_POST_COLOR_MATRIX_ALPHA_SCALE'
12582
12583
12584 PARAMS returns one value, the alpha scale factor applied to RGBA
12585 fragments after color matrix transformations. The initial value is
12586 1. See `glPixelTransfer'.
12587
12588 `GL_POST_CONVOLUTION_COLOR_TABLE'
12589
12590
12591 PARAMS returns a single boolean value indicating whether post
12592 convolution lookup is enabled. The initial value is `GL_FALSE'. See
12593 `glColorTable'.
12594
12595 `GL_POST_CONVOLUTION_RED_BIAS'
12596
12597
12598 PARAMS returns one value, the red bias factor applied to RGBA
12599 fragments after convolution. The initial value is 0. See
12600 `glPixelTransfer'.
12601
12602 `GL_POST_CONVOLUTION_GREEN_BIAS'
12603
12604
12605 PARAMS returns one value, the green bias factor applied to RGBA
12606 fragments after convolution. The initial value is 0. See
12607 `glPixelTransfer'.
12608
12609 `GL_POST_CONVOLUTION_BLUE_BIAS'
12610
12611
12612 PARAMS returns one value, the blue bias factor applied to RGBA
12613 fragments after convolution. The initial value is 0. See
12614 `glPixelTransfer'.
12615
12616 `GL_POST_CONVOLUTION_ALPHA_BIAS'
12617
12618
12619 PARAMS returns one value, the alpha bias factor applied to RGBA
12620 fragments after convolution. The initial value is 0. See
12621 `glPixelTransfer'.
12622
12623 `GL_POST_CONVOLUTION_RED_SCALE'
12624
12625
12626 PARAMS returns one value, the red scale factor applied to RGBA
12627 fragments after convolution. The initial value is 1. See
12628 `glPixelTransfer'.
12629
12630 `GL_POST_CONVOLUTION_GREEN_SCALE'
12631
12632
12633 PARAMS returns one value, the green scale factor applied to RGBA
12634 fragments after convolution. The initial value is 1. See
12635 `glPixelTransfer'.
12636
12637 `GL_POST_CONVOLUTION_BLUE_SCALE'
12638
12639
12640 PARAMS returns one value, the blue scale factor applied to RGBA
12641 fragments after convolution. The initial value is 1. See
12642 `glPixelTransfer'.
12643
12644 `GL_POST_CONVOLUTION_ALPHA_SCALE'
12645
12646
12647 PARAMS returns one value, the alpha scale factor applied to RGBA
12648 fragments after convolution. The initial value is 1. See
12649 `glPixelTransfer'.
12650
12651 `GL_PROJECTION_MATRIX'
12652
12653
12654 PARAMS returns sixteen values: the projection matrix on the top of
12655 the projection matrix stack. Initially this matrix is the identity
12656 matrix. See `glPushMatrix'.
12657
12658 `GL_PROJECTION_STACK_DEPTH'
12659
12660
12661 PARAMS returns one value, the number of matrices on the projection
12662 matrix stack. The initial value is 1. See `glPushMatrix'.
12663
12664 `GL_READ_BUFFER'
12665
12666
12667 PARAMS returns one value, a symbolic constant indicating which
12668 color buffer is selected for reading. The initial value is
12669 `GL_BACK' if there is a back buffer, otherwise it is `GL_FRONT'.
12670 See `glReadPixels' and `glAccum'.
12671
12672 `GL_RED_BIAS'
12673
12674
12675 PARAMS returns one value, the red bias factor used during pixel
12676 transfers. The initial value is 0.
12677
12678 `GL_RED_BITS'
12679
12680
12681 PARAMS returns one value, the number of red bitplanes in each color
12682 buffer.
12683
12684 `GL_RED_SCALE'
12685
12686
12687 PARAMS returns one value, the red scale factor used during pixel
12688 transfers. The initial value is 1. See `glPixelTransfer'.
12689
12690 `GL_RENDER_MODE'
12691
12692
12693 PARAMS returns one value, a symbolic constant indicating whether
12694 the GL is in render, select, or feedback mode. The initial value is
12695 `GL_RENDER'. See `glRenderMode'.
12696
12697 `GL_RESCALE_NORMAL'
12698
12699
12700 PARAMS returns single boolean value indicating whether normal
12701 rescaling is enabled. See `glEnable'.
12702
12703 `GL_RGBA_MODE'
12704
12705
12706 PARAMS returns a single boolean value indicating whether the GL is
12707 in RGBA mode (true) or color index mode (false). See `glColor'.
12708
12709 `GL_SAMPLE_BUFFERS'
12710
12711
12712 PARAMS returns a single integer value indicating the number of
12713 sample buffers associated with the framebuffer. See
12714 `glSampleCoverage'.
12715
12716 `GL_SAMPLE_COVERAGE_VALUE'
12717
12718
12719 PARAMS returns a single positive floating-point value indicating
12720 the current sample coverage value. See `glSampleCoverage'.
12721
12722 `GL_SAMPLE_COVERAGE_INVERT'
12723
12724
12725 PARAMS returns a single boolean value indicating if the temporary
12726 coverage value should be inverted. See `glSampleCoverage'.
12727
12728 `GL_SAMPLES'
12729
12730
12731 PARAMS returns a single integer value indicating the coverage mask
12732 size. See `glSampleCoverage'.
12733
12734 `GL_SCISSOR_BOX'
12735
12736
12737 PARAMS returns four values: the X and Y window coordinates of the
12738 scissor box, followed by its width and height. Initially the X and
12739 Y window coordinates are both 0 and the width and height are set to
12740 the size of the window. See `glScissor'.
12741
12742 `GL_SCISSOR_TEST'
12743
12744
12745 PARAMS returns a single boolean value indicating whether scissoring
12746 is enabled. The initial value is `GL_FALSE'. See `glScissor'.
12747
12748 `GL_SECONDARY_COLOR_ARRAY'
12749
12750
12751 PARAMS returns a single boolean value indicating whether the
12752 secondary color array is enabled. The initial value is `GL_FALSE'.
12753 See `glSecondaryColorPointer'.
12754
12755 `GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING'
12756
12757
12758 PARAMS returns a single value, the name of the buffer object
12759 associated with the secondary color array. This buffer object would
12760 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
12761 most recent call to `glSecondaryColorPointer'. If no buffer object
12762 was bound to this target, 0 is returned. The initial value is 0.
12763 See `glBindBuffer'.
12764
12765 `GL_SECONDARY_COLOR_ARRAY_SIZE'
12766
12767
12768 PARAMS returns one value, the number of components per color in the
12769 secondary color array. The initial value is 3. See
12770 `glSecondaryColorPointer'.
12771
12772 `GL_SECONDARY_COLOR_ARRAY_STRIDE'
12773
12774
12775 PARAMS returns one value, the byte offset between consecutive
12776 colors in the secondary color array. The initial value is 0. See
12777 `glSecondaryColorPointer'.
12778
12779 `GL_SECONDARY_COLOR_ARRAY_TYPE'
12780
12781
12782 PARAMS returns one value, the data type of each component in the
12783 secondary color array. The initial value is `GL_FLOAT'. See
12784 `glSecondaryColorPointer'.
12785
12786 `GL_SELECTION_BUFFER_SIZE'
12787
12788
12789 PARAMS return one value, the size of the selection buffer. See
12790 `glSelectBuffer'.
12791
12792 `GL_SEPARABLE_2D'
12793
12794
12795 PARAMS returns a single boolean value indicating whether 2D
12796 separable convolution is enabled. The initial value is `GL_FALSE'.
12797 See `glSeparableFilter2D'.
12798
12799 `GL_SHADE_MODEL'
12800
12801
12802 PARAMS returns one value, a symbolic constant indicating whether
12803 the shading mode is flat or smooth. The initial value is
12804 `GL_SMOOTH'. See `glShadeModel'.
12805
12806 `GL_SMOOTH_LINE_WIDTH_RANGE'
12807
12808
12809 PARAMS returns two values, the smallest and largest supported
12810 widths for antialiased lines. See `glLineWidth'.
12811
12812 `GL_SMOOTH_LINE_WIDTH_GRANULARITY'
12813
12814
12815 PARAMS returns one value, the granularity of widths for antialiased
12816 lines. See `glLineWidth'.
12817
12818 `GL_SMOOTH_POINT_SIZE_RANGE'
12819
12820
12821 PARAMS returns two values, the smallest and largest supported
12822 widths for antialiased points. See `glPointSize'.
12823
12824 `GL_SMOOTH_POINT_SIZE_GRANULARITY'
12825
12826
12827 PARAMS returns one value, the granularity of sizes for antialiased
12828 points. See `glPointSize'.
12829
12830 `GL_STENCIL_BACK_FAIL'
12831
12832
12833 PARAMS returns one value, a symbolic constant indicating what
12834 action is taken for back-facing polygons when the stencil test
12835 fails. The initial value is `GL_KEEP'. See `glStencilOpSeparate'.
12836
12837 `GL_STENCIL_BACK_FUNC'
12838
12839
12840 PARAMS returns one value, a symbolic constant indicating what
12841 function is used for back-facing polygons to compare the stencil
12842 reference value with the stencil buffer value. The initial value is
12843 `GL_ALWAYS'. See `glStencilFuncSeparate'.
12844
12845 `GL_STENCIL_BACK_PASS_DEPTH_FAIL'
12846
12847
12848 PARAMS returns one value, a symbolic constant indicating what
12849 action is taken for back-facing polygons when the stencil test
12850 passes, but the depth test fails. The initial value is `GL_KEEP'.
12851 See `glStencilOpSeparate'.
12852
12853 `GL_STENCIL_BACK_PASS_DEPTH_PASS'
12854
12855
12856 PARAMS returns one value, a symbolic constant indicating what
12857 action is taken for back-facing polygons when the stencil test
12858 passes and the depth test passes. The initial value is `GL_KEEP'.
12859 See `glStencilOpSeparate'.
12860
12861 `GL_STENCIL_BACK_REF'
12862
12863
12864 PARAMS returns one value, the reference value that is compared with
12865 the contents of the stencil buffer for back-facing polygons. The
12866 initial value is 0. See `glStencilFuncSeparate'.
12867
12868 `GL_STENCIL_BACK_VALUE_MASK'
12869
12870
12871 PARAMS returns one value, the mask that is used for back-facing
12872 polygons to mask both the stencil reference value and the stencil
12873 buffer value before they are compared. The initial value is all
12874 1's. See `glStencilFuncSeparate'.
12875
12876 `GL_STENCIL_BACK_WRITEMASK'
12877
12878
12879 PARAMS returns one value, the mask that controls writing of the
12880 stencil bitplanes for back-facing polygons. The initial value is
12881 all 1's. See `glStencilMaskSeparate'.
12882
12883 `GL_STENCIL_BITS'
12884
12885
12886 PARAMS returns one value, the number of bitplanes in the stencil
12887 buffer.
12888
12889 `GL_STENCIL_CLEAR_VALUE'
12890
12891
12892 PARAMS returns one value, the index to which the stencil bitplanes
12893 are cleared. The initial value is 0. See `glClearStencil'.
12894
12895 `GL_STENCIL_FAIL'
12896
12897
12898 PARAMS returns one value, a symbolic constant indicating what
12899 action is taken when the stencil test fails. The initial value is
12900 `GL_KEEP'. See `glStencilOp'. If the GL version is 2.0 or greater,
12901 this stencil state only affects non-polygons and front-facing
12902 polygons. Back-facing polygons use separate stencil state. See
12903 `glStencilOpSeparate'.
12904
12905 `GL_STENCIL_FUNC'
12906
12907
12908 PARAMS returns one value, a symbolic constant indicating what
12909 function is used to compare the stencil reference value with the
12910 stencil buffer value. The initial value is `GL_ALWAYS'. See
12911 `glStencilFunc'. If the GL version is 2.0 or greater, this stencil
12912 state only affects non-polygons and front-facing polygons.
12913 Back-facing polygons use separate stencil state. See
12914 `glStencilFuncSeparate'.
12915
12916 `GL_STENCIL_PASS_DEPTH_FAIL'
12917
12918
12919 PARAMS returns one value, a symbolic constant indicating what
12920 action is taken when the stencil test passes, but the depth test
12921 fails. The initial value is `GL_KEEP'. See `glStencilOp'. If the GL
12922 version is 2.0 or greater, this stencil state only affects
12923 non-polygons and front-facing polygons. Back-facing polygons use
12924 separate stencil state. See `glStencilOpSeparate'.
12925
12926 `GL_STENCIL_PASS_DEPTH_PASS'
12927
12928
12929 PARAMS returns one value, a symbolic constant indicating what
12930 action is taken when the stencil test passes and the depth test
12931 passes. The initial value is `GL_KEEP'. See `glStencilOp'. If the
12932 GL version is 2.0 or greater, this stencil state only affects
12933 non-polygons and front-facing polygons. Back-facing polygons use
12934 separate stencil state. See `glStencilOpSeparate'.
12935
12936 `GL_STENCIL_REF'
12937
12938
12939 PARAMS returns one value, the reference value that is compared with
12940 the contents of the stencil buffer. The initial value is 0. See
12941 `glStencilFunc'. If the GL version is 2.0 or greater, this stencil
12942 state only affects non-polygons and front-facing polygons.
12943 Back-facing polygons use separate stencil state. See
12944 `glStencilFuncSeparate'.
12945
12946 `GL_STENCIL_TEST'
12947
12948
12949 PARAMS returns a single boolean value indicating whether stencil
12950 testing of fragments is enabled. The initial value is `GL_FALSE'.
12951 See `glStencilFunc' and `glStencilOp'.
12952
12953 `GL_STENCIL_VALUE_MASK'
12954
12955
12956 PARAMS returns one value, the mask that is used to mask both the
12957 stencil reference value and the stencil buffer value before they
12958 are compared. The initial value is all 1's. See `glStencilFunc'. If
12959 the GL version is 2.0 or greater, this stencil state only affects
12960 non-polygons and front-facing polygons. Back-facing polygons use
12961 separate stencil state. See `glStencilFuncSeparate'.
12962
12963 `GL_STENCIL_WRITEMASK'
12964
12965
12966 PARAMS returns one value, the mask that controls writing of the
12967 stencil bitplanes. The initial value is all 1's. See
12968 `glStencilMask'. If the GL version is 2.0 or greater, this stencil
12969 state only affects non-polygons and front-facing polygons.
12970 Back-facing polygons use separate stencil state. See
12971 `glStencilMaskSeparate'.
12972
12973 `GL_STEREO'
12974
12975
12976 PARAMS returns a single boolean value indicating whether stereo
12977 buffers (left and right) are supported.
12978
12979 `GL_SUBPIXEL_BITS'
12980
12981
12982 PARAMS returns one value, an estimate of the number of bits of
12983 subpixel resolution that are used to position rasterized geometry
12984 in window coordinates. The value must be at least 4.
12985
12986 `GL_TEXTURE_1D'
12987
12988
12989 PARAMS returns a single boolean value indicating whether 1D texture
12990 mapping is enabled. The initial value is `GL_FALSE'. See
12991 `glTexImage1D'.
12992
12993 `GL_TEXTURE_BINDING_1D'
12994
12995
12996 PARAMS returns a single value, the name of the texture currently
12997 bound to the target `GL_TEXTURE_1D'. The initial value is 0. See
12998 `glBindTexture'.
12999
13000 `GL_TEXTURE_2D'
13001
13002
13003 PARAMS returns a single boolean value indicating whether 2D texture
13004 mapping is enabled. The initial value is `GL_FALSE'. See
13005 `glTexImage2D'.
13006
13007 `GL_TEXTURE_BINDING_2D'
13008
13009
13010 PARAMS returns a single value, the name of the texture currently
13011 bound to the target `GL_TEXTURE_2D'. The initial value is 0. See
13012 `glBindTexture'.
13013
13014 `GL_TEXTURE_3D'
13015
13016
13017 PARAMS returns a single boolean value indicating whether 3D texture
13018 mapping is enabled. The initial value is `GL_FALSE'. See
13019 `glTexImage3D'.
13020
13021 `GL_TEXTURE_BINDING_3D'
13022
13023
13024 PARAMS returns a single value, the name of the texture currently
13025 bound to the target `GL_TEXTURE_3D'. The initial value is 0. See
13026 `glBindTexture'.
13027
13028 `GL_TEXTURE_BINDING_CUBE_MAP'
13029
13030
13031 PARAMS returns a single value, the name of the texture currently
13032 bound to the target `GL_TEXTURE_CUBE_MAP'. The initial value is 0.
13033 See `glBindTexture'.
13034
13035 `GL_TEXTURE_COMPRESSION_HINT'
13036
13037
13038 PARAMS returns a single value indicating the mode of the texture
13039 compression hint. The initial value is `GL_DONT_CARE'.
13040
13041 `GL_TEXTURE_COORD_ARRAY'
13042
13043
13044 PARAMS returns a single boolean value indicating whether the
13045 texture coordinate array is enabled. The initial value is
13046 `GL_FALSE'. See `glTexCoordPointer'.
13047
13048 `GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING'
13049
13050
13051 PARAMS returns a single value, the name of the buffer object
13052 associated with the texture coordinate array. This buffer object
13053 would have been bound to the target `GL_ARRAY_BUFFER' at the time
13054 of the most recent call to `glTexCoordPointer'. If no buffer object
13055 was bound to this target, 0 is returned. The initial value is 0.
13056 See `glBindBuffer'.
13057
13058 `GL_TEXTURE_COORD_ARRAY_SIZE'
13059
13060
13061 PARAMS returns one value, the number of coordinates per element in
13062 the texture coordinate array. The initial value is 4. See
13063 `glTexCoordPointer'.
13064
13065 `GL_TEXTURE_COORD_ARRAY_STRIDE'
13066
13067
13068 PARAMS returns one value, the byte offset between consecutive
13069 elements in the texture coordinate array. The initial value is 0.
13070 See `glTexCoordPointer'.
13071
13072 `GL_TEXTURE_COORD_ARRAY_TYPE'
13073
13074
13075 PARAMS returns one value, the data type of the coordinates in the
13076 texture coordinate array. The initial value is `GL_FLOAT'. See
13077 `glTexCoordPointer'.
13078
13079 `GL_TEXTURE_CUBE_MAP'
13080
13081
13082 PARAMS returns a single boolean value indicating whether
13083 cube-mapped texture mapping is enabled. The initial value is
13084 `GL_FALSE'. See `glTexImage2D'.
13085
13086 `GL_TEXTURE_GEN_Q'
13087
13088
13089 PARAMS returns a single boolean value indicating whether automatic
13090 generation of the Q texture coordinate is enabled. The initial
13091 value is `GL_FALSE'. See `glTexGen'.
13092
13093 `GL_TEXTURE_GEN_R'
13094
13095
13096 PARAMS returns a single boolean value indicating whether automatic
13097 generation of the R texture coordinate is enabled. The initial
13098 value is `GL_FALSE'. See `glTexGen'.
13099
13100 `GL_TEXTURE_GEN_S'
13101
13102
13103 PARAMS returns a single boolean value indicating whether automatic
13104 generation of the S texture coordinate is enabled. The initial
13105 value is `GL_FALSE'. See `glTexGen'.
13106
13107 `GL_TEXTURE_GEN_T'
13108
13109
13110 PARAMS returns a single boolean value indicating whether automatic
13111 generation of the T texture coordinate is enabled. The initial
13112 value is `GL_FALSE'. See `glTexGen'.
13113
13114 `GL_TEXTURE_MATRIX'
13115
13116
13117 PARAMS returns sixteen values: the texture matrix on the top of the
13118 texture matrix stack. Initially this matrix is the identity matrix.
13119 See `glPushMatrix'.
13120
13121 `GL_TEXTURE_STACK_DEPTH'
13122
13123
13124 PARAMS returns one value, the number of matrices on the texture
13125 matrix stack. The initial value is 1. See `glPushMatrix'.
13126
13127 `GL_TRANSPOSE_COLOR_MATRIX'
13128
13129
13130 PARAMS returns 16 values, the elements of the color matrix in
13131 row-major order. See `glLoadTransposeMatrix'.
13132
13133 `GL_TRANSPOSE_MODELVIEW_MATRIX'
13134
13135
13136 PARAMS returns 16 values, the elements of the modelview matrix in
13137 row-major order. See `glLoadTransposeMatrix'.
13138
13139 `GL_TRANSPOSE_PROJECTION_MATRIX'
13140
13141
13142 PARAMS returns 16 values, the elements of the projection matrix in
13143 row-major order. See `glLoadTransposeMatrix'.
13144
13145 `GL_TRANSPOSE_TEXTURE_MATRIX'
13146
13147
13148 PARAMS returns 16 values, the elements of the texture matrix in
13149 row-major order. See `glLoadTransposeMatrix'.
13150
13151 `GL_UNPACK_ALIGNMENT'
13152
13153
13154 PARAMS returns one value, the byte alignment used for reading pixel
13155 data from memory. The initial value is 4. See `glPixelStore'.
13156
13157 `GL_UNPACK_IMAGE_HEIGHT'
13158
13159
13160 PARAMS returns one value, the image height used for reading pixel
13161 data from memory. The initial is 0. See `glPixelStore'.
13162
13163 `GL_UNPACK_LSB_FIRST'
13164
13165
13166 PARAMS returns a single boolean value indicating whether single-bit
13167 pixels being read from memory are read first from the least
13168 significant bit of each unsigned byte. The initial value is
13169 `GL_FALSE'. See `glPixelStore'.
13170
13171 `GL_UNPACK_ROW_LENGTH'
13172
13173
13174 PARAMS returns one value, the row length used for reading pixel
13175 data from memory. The initial value is 0. See `glPixelStore'.
13176
13177 `GL_UNPACK_SKIP_IMAGES'
13178
13179
13180 PARAMS returns one value, the number of pixel images skipped before
13181 the first pixel is read from memory. The initial value is 0. See
13182 `glPixelStore'.
13183
13184 `GL_UNPACK_SKIP_PIXELS'
13185
13186
13187 PARAMS returns one value, the number of pixel locations skipped
13188 before the first pixel is read from memory. The initial value is 0.
13189 See `glPixelStore'.
13190
13191 `GL_UNPACK_SKIP_ROWS'
13192
13193
13194 PARAMS returns one value, the number of rows of pixel locations
13195 skipped before the first pixel is read from memory. The initial
13196 value is 0. See `glPixelStore'.
13197
13198 `GL_UNPACK_SWAP_BYTES'
13199
13200
13201 PARAMS returns a single boolean value indicating whether the bytes
13202 of two-byte and four-byte pixel indices and components are swapped
13203 after being read from memory. The initial value is `GL_FALSE'. See
13204 `glPixelStore'.
13205
13206 `GL_VERTEX_ARRAY'
13207
13208
13209 PARAMS returns a single boolean value indicating whether the vertex
13210 array is enabled. The initial value is `GL_FALSE'. See
13211 `glVertexPointer'.
13212
13213 `GL_VERTEX_ARRAY_BUFFER_BINDING'
13214
13215
13216 PARAMS returns a single value, the name of the buffer object
13217 associated with the vertex array. This buffer object would have
13218 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
13219 recent call to `glVertexPointer'. If no buffer object was bound to
13220 this target, 0 is returned. The initial value is 0. See
13221 `glBindBuffer'.
13222
13223 `GL_VERTEX_ARRAY_SIZE'
13224
13225
13226 PARAMS returns one value, the number of coordinates per vertex in
13227 the vertex array. The initial value is 4. See `glVertexPointer'.
13228
13229 `GL_VERTEX_ARRAY_STRIDE'
13230
13231
13232 PARAMS returns one value, the byte offset between consecutive
13233 vertices in the vertex array. The initial value is 0. See
13234 `glVertexPointer'.
13235
13236 `GL_VERTEX_ARRAY_TYPE'
13237
13238
13239 PARAMS returns one value, the data type of each coordinate in the
13240 vertex array. The initial value is `GL_FLOAT'. See
13241 `glVertexPointer'.
13242
13243 `GL_VERTEX_PROGRAM_POINT_SIZE'
13244
13245
13246 PARAMS returns a single boolean value indicating whether vertex
13247 program point size mode is enabled. If enabled, and a vertex shader
13248 is active, then the point size is taken from the shader built-in
13249 `gl_PointSize'. If disabled, and a vertex shader is active, then
13250 the point size is taken from the point state as specified by
13251 `glPointSize'. The initial value is `GL_FALSE'.
13252
13253 `GL_VERTEX_PROGRAM_TWO_SIDE'
13254
13255
13256 PARAMS returns a single boolean value indicating whether vertex
13257 program two-sided color mode is enabled. If enabled, and a vertex
13258 shader is active, then the GL chooses the back color output for
13259 back-facing polygons, and the front color output for non-polygons
13260 and front-facing polygons. If disabled, and a vertex shader is
13261 active, then the front color output is always selected. The initial
13262 value is `GL_FALSE'.
13263
13264 `GL_VIEWPORT'
13265
13266
13267 PARAMS returns four values: the X and Y window coordinates of the
13268 viewport, followed by its width and height. Initially the X and Y
13269 window coordinates are both set to 0, and the width and height are
13270 set to the width and height of the window into which the GL will do
13271 its rendering. See `glViewport'.
13272
13273 `GL_ZOOM_X'
13274
13275
13276 PARAMS returns one value, the X pixel zoom factor. The initial
13277 value is 1. See `glPixelZoom'.
13278
13279 `GL_ZOOM_Y'
13280
13281
13282 PARAMS returns one value, the Y pixel zoom factor. The initial
13283 value is 1. See `glPixelZoom'.
13284
13285 Many of the boolean parameters can also be queried more easily using
13286 `glIsEnabled'.
13287
13288 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
13289
13290 `GL_INVALID_OPERATION' is generated if `glGet' is executed between the
13291 execution of `glBegin' and the corresponding execution of `glEnd'.")
13292
13293 (define-gl-procedures
13294 ((glHint (target GLenum) (mode GLenum) -> void))
13295 "Specify implementation-specific hints.
13296
13297 TARGET
13298 Specifies a symbolic constant indicating the behavior to be
13299 controlled. `GL_FOG_HINT', `GL_GENERATE_MIPMAP_HINT',
13300 `GL_LINE_SMOOTH_HINT', `GL_PERSPECTIVE_CORRECTION_HINT',
13301 `GL_POINT_SMOOTH_HINT', `GL_POLYGON_SMOOTH_HINT',
13302 `GL_TEXTURE_COMPRESSION_HINT', and
13303 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT' are accepted.
13304
13305 MODE
13306 Specifies a symbolic constant indicating the desired behavior.
13307 `GL_FASTEST', `GL_NICEST', and `GL_DONT_CARE' are accepted.
13308
13309 Certain aspects of GL behavior, when there is room for interpretation,
13310 can be controlled with hints. A hint is specified with two arguments.
13311 TARGET is a symbolic constant indicating the behavior to be controlled,
13312 and MODE is another symbolic constant indicating the desired behavior.
13313 The initial value for each TARGET is `GL_DONT_CARE'. MODE can be one of
13314 the following:
13315
13316 `GL_FASTEST'
13317
13318
13319 The most efficient option should be chosen.
13320
13321 `GL_NICEST'
13322
13323
13324 The most correct, or highest quality, option should be chosen.
13325
13326 `GL_DONT_CARE'
13327
13328
13329 No preference.
13330
13331 Though the implementation aspects that can be hinted are well defined,
13332 the interpretation of the hints depends on the implementation. The hint
13333 aspects that can be specified with TARGET, along with suggested
13334 semantics, are as follows:
13335
13336 `GL_FOG_HINT'
13337
13338
13339 Indicates the accuracy of fog calculation. If per-pixel fog
13340 calculation is not efficiently supported by the GL implementation,
13341 hinting `GL_DONT_CARE' or `GL_FASTEST' can result in per-vertex
13342 calculation of fog effects.
13343
13344 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT'
13345
13346
13347 Indicates the accuracy of the derivative calculation for the GL
13348 shading language fragment processing built-in functions: `dFdx',
13349 `dFdy', and `fwidth'.
13350
13351 `GL_GENERATE_MIPMAP_HINT'
13352
13353
13354 Indicates the quality of filtering when generating mipmap images.
13355
13356 `GL_LINE_SMOOTH_HINT'
13357
13358
13359 Indicates the sampling quality of antialiased lines. If a larger
13360 filter function is applied, hinting `GL_NICEST' can result in more
13361 pixel fragments being generated during rasterization.
13362
13363 `GL_PERSPECTIVE_CORRECTION_HINT'
13364
13365
13366 Indicates the quality of color, texture coordinate, and fog
13367 coordinate interpolation. If perspective-corrected parameter
13368 interpolation is not efficiently supported by the GL
13369 implementation, hinting `GL_DONT_CARE' or `GL_FASTEST' can result
13370 in simple linear interpolation of colors and/or texture
13371 coordinates.
13372
13373 `GL_POINT_SMOOTH_HINT'
13374
13375
13376 Indicates the sampling quality of antialiased points. If a larger
13377 filter function is applied, hinting `GL_NICEST' can result in more
13378 pixel fragments being generated during rasterization.
13379
13380 `GL_POLYGON_SMOOTH_HINT'
13381
13382
13383 Indicates the sampling quality of antialiased polygons. Hinting
13384 `GL_NICEST' can result in more pixel fragments being generated
13385 during rasterization, if a larger filter function is applied.
13386
13387 `GL_TEXTURE_COMPRESSION_HINT'
13388
13389
13390 Indicates the quality and performance of the compressing texture
13391 images. Hinting `GL_FASTEST' indicates that texture images should
13392 be compressed as quickly as possible, while `GL_NICEST' indicates
13393 that texture images should be compressed with as little image
13394 quality loss as possible. `GL_NICEST' should be selected if the
13395 texture is to be retrieved by `glGetCompressedTexImage' for reuse.
13396
13397 `GL_INVALID_ENUM' is generated if either TARGET or MODE is not an
13398 accepted value.
13399
13400 `GL_INVALID_OPERATION' is generated if `glHint' is executed between the
13401 execution of `glBegin' and the corresponding execution of `glEnd'.")
13402
13403 (define-gl-procedures
13404 ((glHistogram
13405 (target GLenum)
13406 (width GLsizei)
13407 (internalformat GLenum)
13408 (sink GLboolean)
13409 ->
13410 void))
13411 "Define histogram table.
13412
13413 TARGET
13414 The histogram whose parameters are to be set. Must be one of
13415 `GL_HISTOGRAM' or `GL_PROXY_HISTOGRAM'.
13416
13417 WIDTH
13418 The number of entries in the histogram table. Must be a power of 2.
13419
13420 INTERNALFORMAT
13421 The format of entries in the histogram table. Must be one of
13422 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
13423 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
13424 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
13425 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
13426 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
13427 `GL_LUMINANCE16_ALPHA16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4',
13428 `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16',
13429 `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8',
13430 `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
13431
13432 SINK
13433 If `GL_TRUE', pixels will be consumed by the histogramming process
13434 and no drawing or texture loading will take place. If `GL_FALSE',
13435 pixels will proceed to the minmax process after histogramming.
13436
13437 When `GL_HISTOGRAM' is enabled, RGBA color components are converted to
13438 histogram table indices by clamping to the range [0,1], multiplying by
13439 the width of the histogram table, and rounding to the nearest integer.
13440 The table entries selected by the RGBA indices are then incremented. (If
13441 the internal format of the histogram table includes luminance, then the
13442 index derived from the R color component determines the luminance table
13443 entry to be incremented.) If a histogram table entry is incremented
13444 beyond its maximum value, then its value becomes undefined. (This is not
13445 an error.)
13446
13447 Histogramming is performed only for RGBA pixels (though these may be
13448 specified originally as color indices and converted to RGBA by index
13449 table lookup). Histogramming is enabled with `glEnable' and disabled
13450 with `glDisable'.
13451
13452 When TARGET is `GL_HISTOGRAM', `glHistogram' redefines the current
13453 histogram table to have WIDTH entries of the format specified by
13454 INTERNALFORMAT. The entries are indexed 0 through WIDTH-1 , and all
13455 entries are initialized to zero. The values in the previous histogram
13456 table, if any, are lost. If SINK is `GL_TRUE', then pixels are discarded
13457 after histogramming; no further processing of the pixels takes place,
13458 and no drawing, texture loading, or pixel readback will result.
13459
13460 When TARGET is `GL_PROXY_HISTOGRAM', `glHistogram' computes all state
13461 information as if the histogram table were to be redefined, but does not
13462 actually define the new table. If the requested histogram table is too
13463 large to be supported, then the state information will be set to zero.
13464 This provides a way to determine if a histogram table with the given
13465 parameters can be supported.
13466
13467
13468
13469 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
13470 values.
13471
13472 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or is not a
13473 power of 2.
13474
13475 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
13476 allowable values.
13477
13478 `GL_TABLE_TOO_LARGE' is generated if TARGET is `GL_HISTOGRAM' and the
13479 histogram table specified is too large for the implementation.
13480
13481 `GL_INVALID_OPERATION' is generated if `glHistogram' is executed between
13482 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13483
13484 (define-gl-procedures
13485 ((glIndexMask (mask GLuint) -> void))
13486 "Control the writing of individual bits in the color index buffers.
13487
13488 MASK
13489 Specifies a bit mask to enable and disable the writing of
13490 individual bits in the color index buffers. Initially, the mask is
13491 all 1's.
13492
13493 `glIndexMask' controls the writing of individual bits in the color index
13494 buffers. The least significant N bits of MASK, where N is the number of
13495 bits in a color index buffer, specify a mask. Where a 1 (one) appears in
13496 the mask, it's possible to write to the corresponding bit in the color
13497 index buffer (or buffers). Where a 0 (zero) appears, the corresponding
13498 bit is write-protected.
13499
13500 This mask is used only in color index mode, and it affects only the
13501 buffers currently selected for writing (see `glDrawBuffer'). Initially,
13502 all bits are enabled for writing.
13503
13504 `GL_INVALID_OPERATION' is generated if `glIndexMask' is executed between
13505 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13506
13507 (define-gl-procedures
13508 ((glIndexPointer
13509 (type GLenum)
13510 (stride GLsizei)
13511 (pointer const-GLvoid-*)
13512 ->
13513 void))
13514 "Define an array of color indexes.
13515
13516 TYPE
13517 Specifies the data type of each color index in the array. Symbolic
13518 constants `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_INT', `GL_FLOAT', and
13519 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
13520
13521 STRIDE
13522 Specifies the byte offset between consecutive color indexes. If
13523 STRIDE is 0, the color indexes are understood to be tightly packed
13524 in the array. The initial value is 0.
13525
13526 POINTER
13527 Specifies a pointer to the first index in the array. The initial
13528 value is 0.
13529
13530 `glIndexPointer' specifies the location and data format of an array of
13531 color indexes to use when rendering. TYPE specifies the data type of
13532 each color index and STRIDE specifies the byte stride from one color
13533 index to the next, allowing vertices and attributes to be packed into a
13534 single array or stored in separate arrays.
13535
13536 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
13537 target (see `glBindBuffer') while a color index array is specified,
13538 POINTER is treated as a byte offset into the buffer object's data store.
13539 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
13540 color index vertex array client-side state
13541 (`GL_INDEX_ARRAY_BUFFER_BINDING').
13542
13543 When a color index array is specified, TYPE, STRIDE, and POINTER are
13544 saved as client-side state, in addition to the current vertex array
13545 buffer object binding.
13546
13547 To enable and disable the color index array, call `glEnableClientState'
13548 and `glDisableClientState' with the argument `GL_INDEX_ARRAY'. If
13549 enabled, the color index array is used when `glDrawArrays',
13550 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements',
13551 `glDrawRangeElements', or `glArrayElement' is called.
13552
13553 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
13554
13555 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
13556
13557 (define-gl-procedures
13558 ((glIndexi (c GLint) -> void)
13559 (glIndexf (c GLfloat) -> void)
13560 (glIndexub (c GLubyte) -> void))
13561 "Set the current color index.
13562
13563 C
13564 Specifies the new value for the current color index.
13565
13566
13567
13568 `glIndex' updates the current (single-valued) color index. It takes one
13569 argument, the new value for the current color index.
13570
13571 The current index is stored as a floating-point value. Integer values
13572 are converted directly to floating-point values, with no special
13573 mapping. The initial value is 1.
13574
13575 Index values outside the representable range of the color index buffer
13576 are not clamped. However, before an index is dithered (if enabled) and
13577 written to the frame buffer, it is converted to fixed-point format. Any
13578 bits in the integer portion of the resulting fixed-point value that do
13579 not correspond to bits in the frame buffer are masked out.")
13580
13581 (define-gl-procedures
13582 ((glInitNames -> void))
13583 "Initialize the name stack.
13584
13585 The name stack is used during selection mode to allow sets of rendering
13586 commands to be uniquely identified. It consists of an ordered set of
13587 unsigned integers. `glInitNames' causes the name stack to be initialized
13588 to its default empty state.
13589
13590 The name stack is always empty while the render mode is not `GL_SELECT'.
13591 Calls to `glInitNames' while the render mode is not `GL_SELECT' are
13592 ignored.
13593
13594 `GL_INVALID_OPERATION' is generated if `glInitNames' is executed between
13595 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13596
13597 (define-gl-procedures
13598 ((glInterleavedArrays
13599 (format GLenum)
13600 (stride GLsizei)
13601 (pointer const-GLvoid-*)
13602 ->
13603 void))
13604 "Simultaneously specify and enable several interleaved arrays.
13605
13606 FORMAT
13607 Specifies the type of array to enable. Symbolic constants `GL_V2F',
13608 `GL_V3F', `GL_C4UB_V2F', `GL_C4UB_V3F', `GL_C3F_V3F', `GL_N3F_V3F',
13609 `GL_C4F_N3F_V3F', `GL_T2F_V3F', `GL_T4F_V4F', `GL_T2F_C4UB_V3F',
13610 `GL_T2F_C3F_V3F', `GL_T2F_N3F_V3F', `GL_T2F_C4F_N3F_V3F', and
13611 `GL_T4F_C4F_N3F_V4F' are accepted.
13612
13613 STRIDE
13614 Specifies the offset in bytes between each aggregate array element.
13615
13616 `glInterleavedArrays' lets you specify and enable individual color,
13617 normal, texture and vertex arrays whose elements are part of a larger
13618 aggregate array element. For some implementations, this is more
13619 efficient than specifying the arrays separately.
13620
13621 If STRIDE is 0, the aggregate elements are stored consecutively.
13622 Otherwise, STRIDE bytes occur between the beginning of one aggregate
13623 array element and the beginning of the next aggregate array element.
13624
13625 FORMAT serves as a ``key'' describing the extraction of individual
13626 arrays from the aggregate array. If FORMAT contains a T, then texture
13627 coordinates are extracted from the interleaved array. If C is present,
13628 color values are extracted. If N is present, normal coordinates are
13629 extracted. Vertex coordinates are always extracted.
13630
13631 The digits 2, 3, and 4 denote how many values are extracted. F indicates
13632 that values are extracted as floating-point values. Colors may also be
13633 extracted as 4 unsigned bytes if 4UB follows the C. If a color is
13634 extracted as 4 unsigned bytes, the vertex array element which follows is
13635 located at the first possible floating-point aligned address.
13636
13637 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted value.
13638
13639 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
13640
13641 (define-gl-procedures
13642 ((glIsBuffer (buffer GLuint) -> GLboolean))
13643 "Determine if a name corresponds to a buffer object.
13644
13645 BUFFER
13646 Specifies a value that may be the name of a buffer object.
13647
13648 `glIsBuffer' returns `GL_TRUE' if BUFFER is currently the name of a
13649 buffer object. If BUFFER is zero, or is a non-zero value that is not
13650 currently the name of a buffer object, or if an error occurs,
13651 `glIsBuffer' returns `GL_FALSE'.
13652
13653 A name returned by `glGenBuffers', but not yet associated with a buffer
13654 object by calling `glBindBuffer', is not the name of a buffer object.
13655
13656 `GL_INVALID_OPERATION' is generated if `glIsBuffer' is executed between
13657 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13658
13659 (define-gl-procedures
13660 ((glIsEnabled (cap GLenum) -> GLboolean))
13661 "Test whether a capability is enabled.
13662
13663 CAP
13664 Specifies a symbolic constant indicating a GL capability.
13665
13666 `glIsEnabled' returns `GL_TRUE' if CAP is an enabled capability and
13667 returns `GL_FALSE' otherwise. Initially all capabilities except
13668 `GL_DITHER' are disabled; `GL_DITHER' is initially enabled.
13669
13670 The following capabilities are accepted for CAP:
13671
13672
13673
13674 *Constant*
13675 *See*
13676
13677 `GL_ALPHA_TEST'
13678 `glAlphaFunc'
13679
13680 `GL_AUTO_NORMAL'
13681 `glEvalCoord'
13682
13683 `GL_BLEND'
13684 `glBlendFunc', `glLogicOp'
13685
13686 `GL_CLIP_PLANE'I
13687 `glClipPlane'
13688
13689 `GL_COLOR_ARRAY'
13690 `glColorPointer'
13691
13692 `GL_COLOR_LOGIC_OP'
13693 `glLogicOp'
13694
13695 `GL_COLOR_MATERIAL'
13696 `glColorMaterial'
13697
13698 `GL_COLOR_SUM'
13699 `glSecondaryColor'
13700
13701 `GL_COLOR_TABLE'
13702 `glColorTable'
13703
13704 `GL_CONVOLUTION_1D'
13705 `glConvolutionFilter1D'
13706
13707 `GL_CONVOLUTION_2D'
13708 `glConvolutionFilter2D'
13709
13710 `GL_CULL_FACE'
13711 `glCullFace'
13712
13713 `GL_DEPTH_TEST'
13714 `glDepthFunc', `glDepthRange'
13715
13716 `GL_DITHER'
13717 `glEnable'
13718
13719 `GL_EDGE_FLAG_ARRAY'
13720 `glEdgeFlagPointer'
13721
13722 `GL_FOG'
13723 `glFog'
13724
13725 `GL_FOG_COORD_ARRAY'
13726 `glFogCoordPointer'
13727
13728 `GL_HISTOGRAM'
13729 `glHistogram'
13730
13731 `GL_INDEX_ARRAY'
13732 `glIndexPointer'
13733
13734 `GL_INDEX_LOGIC_OP'
13735 `glLogicOp'
13736
13737 `GL_LIGHT'I
13738 `glLightModel', `glLight'
13739
13740 `GL_LIGHTING'
13741 `glMaterial', `glLightModel', `glLight'
13742
13743 `GL_LINE_SMOOTH'
13744 `glLineWidth'
13745
13746 `GL_LINE_STIPPLE'
13747 `glLineStipple'
13748
13749 `GL_MAP1_COLOR_4'
13750 `glMap1'
13751
13752 `GL_MAP1_INDEX'
13753 `glMap1'
13754
13755 `GL_MAP1_NORMAL'
13756 `glMap1'
13757
13758 `GL_MAP1_TEXTURE_COORD_1'
13759 `glMap1'
13760
13761 `GL_MAP1_TEXTURE_COORD_2'
13762 `glMap1'
13763
13764 `GL_MAP1_TEXTURE_COORD_3'
13765 `glMap1'
13766
13767 `GL_MAP1_TEXTURE_COORD_4'
13768 `glMap1'
13769
13770 `GL_MAP2_COLOR_4'
13771 `glMap2'
13772
13773 `GL_MAP2_INDEX'
13774 `glMap2'
13775
13776 `GL_MAP2_NORMAL'
13777 `glMap2'
13778
13779 `GL_MAP2_TEXTURE_COORD_1'
13780 `glMap2'
13781
13782 `GL_MAP2_TEXTURE_COORD_2'
13783 `glMap2'
13784
13785 `GL_MAP2_TEXTURE_COORD_3'
13786 `glMap2'
13787
13788 `GL_MAP2_TEXTURE_COORD_4'
13789 `glMap2'
13790
13791 `GL_MAP2_VERTEX_3'
13792 `glMap2'
13793
13794 `GL_MAP2_VERTEX_4'
13795 `glMap2'
13796
13797 `GL_MINMAX'
13798 `glMinmax'
13799
13800 `GL_MULTISAMPLE'
13801 `glSampleCoverage'
13802
13803 `GL_NORMAL_ARRAY'
13804 `glNormalPointer'
13805
13806 `GL_NORMALIZE'
13807 `glNormal'
13808
13809 `GL_POINT_SMOOTH'
13810 `glPointSize'
13811
13812 `GL_POINT_SPRITE'
13813 `glEnable'
13814
13815 `GL_POLYGON_SMOOTH'
13816 `glPolygonMode'
13817
13818 `GL_POLYGON_OFFSET_FILL'
13819 `glPolygonOffset'
13820
13821 `GL_POLYGON_OFFSET_LINE'
13822 `glPolygonOffset'
13823
13824 `GL_POLYGON_OFFSET_POINT'
13825 `glPolygonOffset'
13826
13827 `GL_POLYGON_STIPPLE'
13828 `glPolygonStipple'
13829
13830 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
13831 `glColorTable'
13832
13833 `GL_POST_CONVOLUTION_COLOR_TABLE'
13834 `glColorTable'
13835
13836 `GL_RESCALE_NORMAL'
13837 `glNormal'
13838
13839 `GL_SAMPLE_ALPHA_TO_COVERAGE'
13840 `glSampleCoverage'
13841
13842 `GL_SAMPLE_ALPHA_TO_ONE'
13843 `glSampleCoverage'
13844
13845 `GL_SAMPLE_COVERAGE'
13846 `glSampleCoverage'
13847
13848 `GL_SCISSOR_TEST'
13849 `glScissor'
13850
13851 `GL_SECONDARY_COLOR_ARRAY'
13852 `glSecondaryColorPointer'
13853
13854 `GL_SEPARABLE_2D'
13855 `glSeparableFilter2D'
13856
13857 `GL_STENCIL_TEST'
13858 `glStencilFunc', `glStencilOp'
13859
13860 `GL_TEXTURE_1D'
13861 `glTexImage1D'
13862
13863 `GL_TEXTURE_2D'
13864 `glTexImage2D'
13865
13866 `GL_TEXTURE_3D'
13867 `glTexImage3D'
13868
13869 `GL_TEXTURE_COORD_ARRAY'
13870 `glTexCoordPointer'
13871
13872 `GL_TEXTURE_CUBE_MAP'
13873 `glTexImage2D'
13874
13875 `GL_TEXTURE_GEN_Q'
13876 `glTexGen'
13877
13878 `GL_TEXTURE_GEN_R'
13879 `glTexGen'
13880
13881 `GL_TEXTURE_GEN_S'
13882 `glTexGen'
13883
13884 `GL_TEXTURE_GEN_T'
13885 `glTexGen'
13886
13887 `GL_VERTEX_ARRAY'
13888 `glVertexPointer'
13889
13890 `GL_VERTEX_PROGRAM_POINT_SIZE'
13891 `glEnable'
13892
13893 `GL_VERTEX_PROGRAM_TWO_SIDE'
13894 `glEnable'
13895
13896
13897
13898 `GL_INVALID_ENUM' is generated if CAP is not an accepted value.
13899
13900 `GL_INVALID_OPERATION' is generated if `glIsEnabled' is executed between
13901 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13902
13903 (define-gl-procedures
13904 ((glIsList (list GLuint) -> GLboolean))
13905 "Determine if a name corresponds to a display list.
13906
13907 LIST
13908 Specifies a potential display list name.
13909
13910 `glIsList' returns `GL_TRUE' if LIST is the name of a display list and
13911 returns `GL_FALSE' if it is not, or if an error occurs.
13912
13913 A name returned by `glGenLists', but not yet associated with a display
13914 list by calling `glNewList', is not the name of a display list.
13915
13916 `GL_INVALID_OPERATION' is generated if `glIsList' is executed between
13917 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13918
13919 (define-gl-procedures
13920 ((glIsProgram (program GLuint) -> GLboolean))
13921 "Determines if a name corresponds to a program object.
13922
13923 PROGRAM
13924 Specifies a potential program object.
13925
13926 `glIsProgram' returns `GL_TRUE' if PROGRAM is the name of a program
13927 object previously created with `glCreateProgram' and not yet deleted
13928 with `glDeleteProgram'. If PROGRAM is zero or a non-zero value that is
13929 not the name of a program object, or if an error occurs, `glIsProgram'
13930 returns `GL_FALSE'.
13931
13932 `GL_INVALID_OPERATION' is generated if `glIsProgram' is executed between
13933 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13934
13935 (define-gl-procedures
13936 ((glIsQuery (id GLuint) -> GLboolean))
13937 "Determine if a name corresponds to a query object.
13938
13939 ID
13940 Specifies a value that may be the name of a query object.
13941
13942 `glIsQuery' returns `GL_TRUE' if ID is currently the name of a query
13943 object. If ID is zero, or is a non-zero value that is not currently the
13944 name of a query object, or if an error occurs, `glIsQuery' returns
13945 `GL_FALSE'.
13946
13947 A name returned by `glGenQueries', but not yet associated with a query
13948 object by calling `glBeginQuery', is not the name of a query object.
13949
13950 `GL_INVALID_OPERATION' is generated if `glIsQuery' is executed between
13951 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13952
13953 (define-gl-procedures
13954 ((glIsShader (shader GLuint) -> GLboolean))
13955 "Determines if a name corresponds to a shader object.
13956
13957 SHADER
13958 Specifies a potential shader object.
13959
13960 `glIsShader' returns `GL_TRUE' if SHADER is the name of a shader object
13961 previously created with `glCreateShader' and not yet deleted with
13962 `glDeleteShader'. If SHADER is zero or a non-zero value that is not the
13963 name of a shader object, or if an error occurs, `glIsShader ' returns
13964 `GL_FALSE'.
13965
13966 `GL_INVALID_OPERATION' is generated if `glIsShader' is executed between
13967 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13968
13969 (define-gl-procedures
13970 ((glIsTexture (texture GLuint) -> GLboolean))
13971 "Determine if a name corresponds to a texture.
13972
13973 TEXTURE
13974 Specifies a value that may be the name of a texture.
13975
13976 `glIsTexture' returns `GL_TRUE' if TEXTURE is currently the name of a
13977 texture. If TEXTURE is zero, or is a non-zero value that is not
13978 currently the name of a texture, or if an error occurs, `glIsTexture'
13979 returns `GL_FALSE'.
13980
13981 A name returned by `glGenTextures', but not yet associated with a
13982 texture by calling `glBindTexture', is not the name of a texture.
13983
13984 `GL_INVALID_OPERATION' is generated if `glIsTexture' is executed between
13985 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13986
13987 (define-gl-procedures
13988 ((glLightModelf
13989 (pname GLenum)
13990 (param GLfloat)
13991 ->
13992 void)
13993 (glLightModeli
13994 (pname GLenum)
13995 (param GLint)
13996 ->
13997 void))
13998 "Set the lighting model parameters.
13999
14000 PNAME
14001 Specifies a single-valued lighting model parameter.
14002 `GL_LIGHT_MODEL_LOCAL_VIEWER', `GL_LIGHT_MODEL_COLOR_CONTROL', and
14003 `GL_LIGHT_MODEL_TWO_SIDE' are accepted.
14004
14005 PARAM
14006 Specifies the value that PARAM will be set to.
14007
14008 `glLightModel' sets the lighting model parameter. PNAME names a
14009 parameter and PARAMS gives the new value. There are three lighting model
14010 parameters:
14011
14012 `GL_LIGHT_MODEL_AMBIENT'
14013
14014
14015 PARAMS contains four integer or floating-point values that specify
14016 the ambient RGBA intensity of the entire scene. Integer values are
14017 mapped linearly such that the most positive representable value
14018 maps to 1.0, and the most negative representable value maps to -1.0
14019 . Floating-point values are mapped directly. Neither integer nor
14020 floating-point values are clamped. The initial ambient scene
14021 intensity is (0.2, 0.2, 0.2, 1.0).
14022
14023 `GL_LIGHT_MODEL_COLOR_CONTROL'
14024
14025
14026 PARAMS must be either `GL_SEPARATE_SPECULAR_COLOR' or
14027 `GL_SINGLE_COLOR'. `GL_SINGLE_COLOR' specifies that a single color
14028 is generated from the lighting computation for a vertex.
14029 `GL_SEPARATE_SPECULAR_COLOR' specifies that the specular color
14030 computation of lighting be stored separately from the remainder of
14031 the lighting computation. The specular color is summed into the
14032 generated fragment's color after the application of texture mapping
14033 (if enabled). The initial value is `GL_SINGLE_COLOR'.
14034
14035 `GL_LIGHT_MODEL_LOCAL_VIEWER'
14036
14037
14038 PARAMS is a single integer or floating-point value that specifies
14039 how specular reflection angles are computed. If PARAMS is 0 (or
14040 0.0), specular reflection angles take the view direction to be
14041 parallel to and in the direction of the -Z axis, regardless of the
14042 location of the vertex in eye coordinates. Otherwise, specular
14043 reflections are computed from the origin of the eye coordinate
14044 system. The initial value is 0.
14045
14046 `GL_LIGHT_MODEL_TWO_SIDE'
14047
14048
14049 PARAMS is a single integer or floating-point value that specifies
14050 whether one- or two-sided lighting calculations are done for
14051 polygons. It has no effect on the lighting calculations for points,
14052 lines, or bitmaps. If PARAMS is 0 (or 0.0), one-sided lighting is
14053 specified, and only the FRONT material parameters are used in the
14054 lighting equation. Otherwise, two-sided lighting is specified. In
14055 this case, vertices of back-facing polygons are lighted using the
14056 BACK material parameters and have their normals reversed before the
14057 lighting equation is evaluated. Vertices of front-facing polygons
14058 are always lighted using the FRONT material parameters, with no
14059 change to their normals. The initial value is 0.
14060
14061 In RGBA mode, the lighted color of a vertex is the sum of the material
14062 emission intensity, the product of the material ambient reflectance and
14063 the lighting model full-scene ambient intensity, and the contribution of
14064 each enabled light source. Each light source contributes the sum of
14065 three terms: ambient, diffuse, and specular. The ambient light source
14066 contribution is the product of the material ambient reflectance and the
14067 light's ambient intensity. The diffuse light source contribution is the
14068 product of the material diffuse reflectance, the light's diffuse
14069 intensity, and the dot product of the vertex's normal with the
14070 normalized vector from the vertex to the light source. The specular
14071 light source contribution is the product of the material specular
14072 reflectance, the light's specular intensity, and the dot product of the
14073 normalized vertex-to-eye and vertex-to-light vectors, raised to the
14074 power of the shininess of the material. All three light source
14075 contributions are attenuated equally based on the distance from the
14076 vertex to the light source and on light source direction, spread
14077 exponent, and spread cutoff angle. All dot products are replaced with 0
14078 if they evaluate to a negative value.
14079
14080 The alpha component of the resulting lighted color is set to the alpha
14081 value of the material diffuse reflectance.
14082
14083 In color index mode, the value of the lighted index of a vertex ranges
14084 from the ambient to the specular values passed to `glMaterial' using
14085 `GL_COLOR_INDEXES'. Diffuse and specular coefficients, computed with a
14086 (.30, .59, .11) weighting of the lights' colors, the shininess of the
14087 material, and the same reflection and attenuation equations as in the
14088 RGBA case, determine how much above ambient the resulting index is.
14089
14090 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
14091
14092 `GL_INVALID_ENUM' is generated if PNAME is
14093 `GL_LIGHT_MODEL_COLOR_CONTROL' and PARAMS is not one of
14094 `GL_SINGLE_COLOR' or `GL_SEPARATE_SPECULAR_COLOR'.
14095
14096 `GL_INVALID_OPERATION' is generated if `glLightModel' is executed
14097 between the execution of `glBegin' and the corresponding execution of
14098 `glEnd'.")
14099
14100 (define-gl-procedures
14101 ((glLightf
14102 (light GLenum)
14103 (pname GLenum)
14104 (param GLfloat)
14105 ->
14106 void)
14107 (glLighti
14108 (light GLenum)
14109 (pname GLenum)
14110 (param GLint)
14111 ->
14112 void))
14113 "Set light source parameters.
14114
14115 LIGHT
14116 Specifies a light. The number of lights depends on the
14117 implementation, but at least eight lights are supported. They are
14118 identified by symbolic names of the form `GL_LIGHT' I , where i
14119 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
14120
14121 PNAME
14122 Specifies a single-valued light source parameter for LIGHT.
14123 `GL_SPOT_EXPONENT', `GL_SPOT_CUTOFF', `GL_CONSTANT_ATTENUATION',
14124 `GL_LINEAR_ATTENUATION', and `GL_QUADRATIC_ATTENUATION' are
14125 accepted.
14126
14127 PARAM
14128 Specifies the value that parameter PNAME of light source LIGHT will
14129 be set to.
14130
14131 `glLight' sets the values of individual light source parameters. LIGHT
14132 names the light and is a symbolic name of the form `GL_LIGHT'I , where i
14133 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1. PNAME specifies one
14134 of ten light source parameters, again by symbolic name. PARAMS is either
14135 a single value or a pointer to an array that contains the new values.
14136
14137 To enable and disable lighting calculation, call `glEnable' and
14138 `glDisable' with argument `GL_LIGHTING'. Lighting is initially disabled.
14139 When it is enabled, light sources that are enabled contribute to the
14140 lighting calculation. Light source I is enabled and disabled using
14141 `glEnable' and `glDisable' with argument `GL_LIGHT'I .
14142
14143 The ten light parameters are as follows:
14144
14145 `GL_AMBIENT'
14146 PARAMS contains four integer or floating-point values that specify
14147 the ambient RGBA intensity of the light. Integer values are mapped
14148 linearly such that the most positive representable value maps to
14149 1.0, and the most negative representable value maps to -1.0 .
14150 Floating-point values are mapped directly. Neither integer nor
14151 floating-point values are clamped. The initial ambient light
14152 intensity is (0, 0, 0, 1).
14153
14154 `GL_DIFFUSE'
14155 PARAMS contains four integer or floating-point values that specify
14156 the diffuse RGBA intensity of the light. Integer values are mapped
14157 linearly such that the most positive representable value maps to
14158 1.0, and the most negative representable value maps to -1.0 .
14159 Floating-point values are mapped directly. Neither integer nor
14160 floating-point values are clamped. The initial value for
14161 `GL_LIGHT0' is (1, 1, 1, 1); for other lights, the initial value is
14162 (0, 0, 0, 1).
14163
14164 `GL_SPECULAR'
14165 PARAMS contains four integer or floating-point values that specify
14166 the specular RGBA intensity of the light. Integer values are mapped
14167 linearly such that the most positive representable value maps to
14168 1.0, and the most negative representable value maps to -1.0 .
14169 Floating-point values are mapped directly. Neither integer nor
14170 floating-point values are clamped. The initial value for
14171 `GL_LIGHT0' is (1, 1, 1, 1); for other lights, the initial value is
14172 (0, 0, 0, 1).
14173
14174 `GL_POSITION'
14175 PARAMS contains four integer or floating-point values that specify
14176 the position of the light in homogeneous object coordinates. Both
14177 integer and floating-point values are mapped directly. Neither
14178 integer nor floating-point values are clamped.
14179
14180 The position is transformed by the modelview matrix when `glLight'
14181 is called (just as if it were a point), and it is stored in eye
14182 coordinates. If the W component of the position is 0, the light is
14183 treated as a directional source. Diffuse and specular lighting
14184 calculations take the light's direction, but not its actual
14185 position, into account, and attenuation is disabled. Otherwise,
14186 diffuse and specular lighting calculations are based on the actual
14187 location of the light in eye coordinates, and attenuation is
14188 enabled. The initial position is (0, 0, 1, 0); thus, the initial
14189 light source is directional, parallel to, and in the direction of
14190 the -Z axis.
14191
14192 `GL_SPOT_DIRECTION'
14193 PARAMS contains three integer or floating-point values that specify
14194 the direction of the light in homogeneous object coordinates. Both
14195 integer and floating-point values are mapped directly. Neither
14196 integer nor floating-point values are clamped.
14197
14198 The spot direction is transformed by the upper 3x3 of the modelview
14199 matrix when `glLight' is called, and it is stored in eye
14200 coordinates. It is significant only when `GL_SPOT_CUTOFF' is not
14201 180, which it is initially. The initial direction is (0,0-1) .
14202
14203 `GL_SPOT_EXPONENT'
14204 PARAMS is a single integer or floating-point value that specifies
14205 the intensity distribution of the light. Integer and floating-point
14206 values are mapped directly. Only values in the range [0,128] are
14207 accepted.
14208
14209 Effective light intensity is attenuated by the cosine of the angle
14210 between the direction of the light and the direction from the light
14211 to the vertex being lighted, raised to the power of the spot
14212 exponent. Thus, higher spot exponents result in a more focused
14213 light source, regardless of the spot cutoff angle (see
14214 `GL_SPOT_CUTOFF', next paragraph). The initial spot exponent is 0,
14215 resulting in uniform light distribution.
14216
14217 `GL_SPOT_CUTOFF'
14218 PARAMS is a single integer or floating-point value that specifies
14219 the maximum spread angle of a light source. Integer and
14220 floating-point values are mapped directly. Only values in the range
14221 [0,90] and the special value 180 are accepted. If the angle between
14222 the direction of the light and the direction from the light to the
14223 vertex being lighted is greater than the spot cutoff angle, the
14224 light is completely masked. Otherwise, its intensity is controlled
14225 by the spot exponent and the attenuation factors. The initial spot
14226 cutoff is 180, resulting in uniform light distribution.
14227
14228 `GL_CONSTANT_ATTENUATION'
14229 `GL_LINEAR_ATTENUATION'
14230 `GL_QUADRATIC_ATTENUATION'
14231 PARAMS is a single integer or floating-point value that specifies
14232 one of the three light attenuation factors. Integer and
14233 floating-point values are mapped directly. Only nonnegative values
14234 are accepted. If the light is positional, rather than directional,
14235 its intensity is attenuated by the reciprocal of the sum of the
14236 constant factor, the linear factor times the distance between the
14237 light and the vertex being lighted, and the quadratic factor times
14238 the square of the same distance. The initial attenuation factors
14239 are (1, 0, 0), resulting in no attenuation.
14240
14241 `GL_INVALID_ENUM' is generated if either LIGHT or PNAME is not an
14242 accepted value.
14243
14244 `GL_INVALID_VALUE' is generated if a spot exponent value is specified
14245 outside the range [0,128] , or if spot cutoff is specified outside the
14246 range [0,90] (except for the special value 180), or if a negative
14247 attenuation factor is specified.
14248
14249 `GL_INVALID_OPERATION' is generated if `glLight' is executed between the
14250 execution of `glBegin' and the corresponding execution of `glEnd'.")
14251
14252 (define-gl-procedures
14253 ((glLineStipple
14254 (factor GLint)
14255 (pattern GLushort)
14256 ->
14257 void))
14258 "Specify the line stipple pattern.
14259
14260 FACTOR
14261 Specifies a multiplier for each bit in the line stipple pattern. If
14262 FACTOR is 3, for example, each bit in the pattern is used three
14263 times before the next bit in the pattern is used. FACTOR is clamped
14264 to the range [1, 256] and defaults to 1.
14265
14266 PATTERN
14267 Specifies a 16-bit integer whose bit pattern determines which
14268 fragments of a line will be drawn when the line is rasterized. Bit
14269 zero is used first; the default pattern is all 1's.
14270
14271 Line stippling masks out certain fragments produced by rasterization;
14272 those fragments will not be drawn. The masking is achieved by using
14273 three parameters: the 16-bit line stipple pattern PATTERN, the repeat
14274 count FACTOR, and an integer stipple counter S .
14275
14276 Counter S is reset to 0 whenever `glBegin' is called and before each
14277 line segment of a `glBegin'(`GL_LINES')/`glEnd' sequence is generated.
14278 It is incremented after each fragment of a unit width aliased line
14279 segment is generated or after each I fragments of an I width line
14280 segment are generated. The I fragments associated with count S are
14281 masked out if
14282
14283 PATTERN bit (S/FACTOR,)%16
14284
14285 is 0, otherwise these fragments are sent to the frame buffer. Bit zero
14286 of PATTERN is the least significant bit.
14287
14288 Antialiased lines are treated as a sequence of 1×WIDTH rectangles for
14289 purposes of stippling. Whether rectangle S is rasterized or not depends
14290 on the fragment rule described for aliased lines, counting rectangles
14291 rather than groups of fragments.
14292
14293 To enable and disable line stippling, call `glEnable' and `glDisable'
14294 with argument `GL_LINE_STIPPLE'. When enabled, the line stipple pattern
14295 is applied as described above. When disabled, it is as if the pattern
14296 were all 1's. Initially, line stippling is disabled.
14297
14298 `GL_INVALID_OPERATION' is generated if `glLineStipple' is executed
14299 between the execution of `glBegin' and the corresponding execution of
14300 `glEnd'.")
14301
14302 (define-gl-procedures
14303 ((glLineWidth (width GLfloat) -> void))
14304 "Specify the width of rasterized lines.
14305
14306 WIDTH
14307 Specifies the width of rasterized lines. The initial value is 1.
14308
14309 `glLineWidth' specifies the rasterized width of both aliased and
14310 antialiased lines. Using a line width other than 1 has different
14311 effects, depending on whether line antialiasing is enabled. To enable
14312 and disable line antialiasing, call `glEnable' and `glDisable' with
14313 argument `GL_LINE_SMOOTH'. Line antialiasing is initially disabled.
14314
14315 If line antialiasing is disabled, the actual width is determined by
14316 rounding the supplied width to the nearest integer. (If the rounding
14317 results in the value 0, it is as if the line width were 1.) If
14318 ∣ΔX,∣>=∣ΔY,∣ , I pixels are filled in each column that is rasterized,
14319 where I is the rounded value of WIDTH. Otherwise, I pixels are filled in
14320 each row that is rasterized.
14321
14322 If antialiasing is enabled, line rasterization produces a fragment for
14323 each pixel square that intersects the region lying within the rectangle
14324 having width equal to the current line width, length equal to the actual
14325 length of the line, and centered on the mathematical line segment. The
14326 coverage value for each fragment is the window coordinate area of the
14327 intersection of the rectangular region with the corresponding pixel
14328 square. This value is saved and used in the final rasterization step.
14329
14330 Not all widths can be supported when line antialiasing is enabled. If an
14331 unsupported width is requested, the nearest supported width is used.
14332 Only width 1 is guaranteed to be supported; others depend on the
14333 implementation. Likewise, there is a range for aliased line widths as
14334 well. To query the range of supported widths and the size difference
14335 between supported widths within the range, call `glGet' with arguments
14336 `GL_ALIASED_LINE_WIDTH_RANGE', `GL_SMOOTH_LINE_WIDTH_RANGE', and
14337 `GL_SMOOTH_LINE_WIDTH_GRANULARITY'.
14338
14339 `GL_INVALID_VALUE' is generated if WIDTH is less than or equal to 0.
14340
14341 `GL_INVALID_OPERATION' is generated if `glLineWidth' is executed between
14342 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14343
14344 (define-gl-procedures
14345 ((glLinkProgram (program GLuint) -> void))
14346 "Links a program object.
14347
14348 PROGRAM
14349 Specifies the handle of the program object to be linked.
14350
14351 `glLinkProgram' links the program object specified by PROGRAM. If any
14352 shader objects of type `GL_VERTEX_SHADER' are attached to PROGRAM, they
14353 will be used to create an executable that will run on the programmable
14354 vertex processor. If any shader objects of type `GL_FRAGMENT_SHADER' are
14355 attached to PROGRAM, they will be used to create an executable that will
14356 run on the programmable fragment processor.
14357
14358 The status of the link operation will be stored as part of the program
14359 object's state. This value will be set to `GL_TRUE' if the program
14360 object was linked without errors and is ready for use, and `GL_FALSE'
14361 otherwise. It can be queried by calling `glGetProgram' with arguments
14362 PROGRAM and `GL_LINK_STATUS'.
14363
14364 As a result of a successful link operation, all active user-defined
14365 uniform variables belonging to PROGRAM will be initialized to 0, and
14366 each of the program object's active uniform variables will be assigned a
14367 location that can be queried by calling `glGetUniformLocation'. Also,
14368 any active user-defined attribute variables that have not been bound to
14369 a generic vertex attribute index will be bound to one at this time.
14370
14371 Linking of a program object can fail for a number of reasons as
14372 specified in the OPENGL SHADING LANGUAGE SPECIFICATION. The following
14373 lists some of the conditions that will cause a link error.
14374
14375 * The storage limit for uniform variables has been exceeded.
14376
14377 * The number of active uniform variables supported by the
14378 implementation has been exceeded.
14379
14380 * The `main' function is missing for the vertex shader or the
14381 fragment shader.
14382
14383 * A varying variable actually used in the fragment shader is not
14384 declared in the same way (or is not declared at all) in the vertex
14385 shader.
14386
14387 * A reference to a function or variable name is unresolved.
14388
14389 * A shared global is declared with two different types or two
14390 different initial values.
14391
14392 * One or more of the attached shader objects has not been
14393 successfully compiled.
14394
14395 * Binding a generic attribute matrix caused some rows of the matrix
14396 to fall outside the allowed maximum of `GL_MAX_VERTEX_ATTRIBS'.
14397
14398 * Not enough contiguous vertex attribute slots could be found to bind
14399 attribute matrices.
14400
14401 When a program object has been successfully linked, the program object
14402 can be made part of current state by calling `glUseProgram'. Whether or
14403 not the link operation was successful, the program object's information
14404 log will be overwritten. The information log can be retrieved by calling
14405 `glGetProgramInfoLog'.
14406
14407 `glLinkProgram' will also install the generated executables as part of
14408 the current rendering state if the link operation was successful and the
14409 specified program object is already currently in use as a result of a
14410 previous call to `glUseProgram'. If the program object currently in use
14411 is relinked unsuccessfully, its link status will be set to `GL_FALSE' ,
14412 but the executables and associated state will remain part of the current
14413 state until a subsequent call to `glUseProgram' removes it from use.
14414 After it is removed from use, it cannot be made part of current state
14415 until it has been successfully relinked.
14416
14417 If PROGRAM contains shader objects of type `GL_VERTEX_SHADER' but does
14418 not contain shader objects of type `GL_FRAGMENT_SHADER', the vertex
14419 shader will be linked against the implicit interface for fixed
14420 functionality fragment processing. Similarly, if PROGRAM contains shader
14421 objects of type `GL_FRAGMENT_SHADER' but it does not contain shader
14422 objects of type `GL_VERTEX_SHADER', the fragment shader will be linked
14423 against the implicit interface for fixed functionality vertex
14424 processing.
14425
14426 The program object's information log is updated and the program is
14427 generated at the time of the link operation. After the link operation,
14428 applications are free to modify attached shader objects, compile
14429 attached shader objects, detach shader objects, delete shader objects,
14430 and attach additional shader objects. None of these operations affects
14431 the information log or the program that is part of the program object.
14432
14433 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
14434 OpenGL.
14435
14436 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
14437
14438 `GL_INVALID_OPERATION' is generated if `glLinkProgram' is executed
14439 between the execution of `glBegin' and the corresponding execution of
14440 `glEnd'.")
14441
14442 (define-gl-procedures
14443 ((glListBase (base GLuint) -> void))
14444 "Set the display-list base for .
14445
14446 BASE
14447 Specifies an integer offset that will be added to `glCallLists'
14448 offsets to generate display-list names. The initial value is 0.
14449
14450 `glCallLists' specifies an array of offsets. Display-list names are
14451 generated by adding BASE to each offset. Names that reference valid
14452 display lists are executed; the others are ignored.
14453
14454 `GL_INVALID_OPERATION' is generated if `glListBase' is executed between
14455 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14456
14457 (define-gl-procedures
14458 ((glLoadIdentity -> void))
14459 "Replace the current matrix with the identity matrix.
14460
14461 `glLoadIdentity' replaces the current matrix with the identity matrix.
14462 It is semantically equivalent to calling `glLoadMatrix' with the
14463 identity matrix
14464
14465
14466
14467 ((1 0 0 0), (0 1 0 0), (0 0 1 0), (0 0 0 1),,)
14468
14469
14470
14471 but in some cases it is more efficient.
14472
14473 `GL_INVALID_OPERATION' is generated if `glLoadIdentity' is executed
14474 between the execution of `glBegin' and the corresponding execution of
14475 `glEnd'.")
14476
14477 (define-gl-procedures
14478 ((glLoadMatrixf (m const-GLfloat-*) -> void))
14479 "Replace the current matrix with the specified matrix.
14480
14481 M
14482 Specifies a pointer to 16 consecutive values, which are used as the
14483 elements of a 4×4 column-major matrix.
14484
14485 `glLoadMatrix' replaces the current matrix with the one whose elements
14486 are specified by M. The current matrix is the projection matrix,
14487 modelview matrix, or texture matrix, depending on the current matrix
14488 mode (see `glMatrixMode').
14489
14490 The current matrix, M, defines a transformation of coordinates. For
14491 instance, assume M refers to the modelview matrix. If
14492 V=(V\u2061[0,],V\u2061[1,]V\u2061[2,]V\u2061[3,]) is the set of object coordinates of a
14493 vertex, and M points to an array of 16 single- or double-precision
14494 floating-point values M={M\u2061[0,],M\u2061[1,]...M\u2061[15,]} , then the modelview
14495 transformation M\u2061(V,) does the following:
14496
14497 M\u2061(V,)=((M\u2061[0,] M\u2061[4,] M\u2061[8,] M\u2061[12,]), (M\u2061[1,] M\u2061[5,] M\u2061[9,] M\u2061[13,]),
14498 (M\u2061[2,] M\u2061[6,] M\u2061[10,] M\u2061[14,]), (M\u2061[3,] M\u2061[7,] M\u2061[11,]
14499 M\u2061[15,]),)×((V\u2061[0,]), (V\u2061[1,]), (V\u2061[2,]), (V\u2061[3,]),)
14500
14501
14502
14503 Projection and texture transformations are similarly defined.
14504
14505 `GL_INVALID_OPERATION' is generated if `glLoadMatrix' is executed
14506 between the execution of `glBegin' and the corresponding execution of
14507 `glEnd'.")
14508
14509 (define-gl-procedures
14510 ((glLoadName (name GLuint) -> void))
14511 "Load a name onto the name stack.
14512
14513 NAME
14514 Specifies a name that will replace the top value on the name stack.
14515
14516 The name stack is used during selection mode to allow sets of rendering
14517 commands to be uniquely identified. It consists of an ordered set of
14518 unsigned integers and is initially empty.
14519
14520 `glLoadName' causes NAME to replace the value on the top of the name
14521 stack.
14522
14523 The name stack is always empty while the render mode is not `GL_SELECT'.
14524 Calls to `glLoadName' while the render mode is not `GL_SELECT' are
14525 ignored.
14526
14527 `GL_INVALID_OPERATION' is generated if `glLoadName' is called while the
14528 name stack is empty.
14529
14530 `GL_INVALID_OPERATION' is generated if `glLoadName' is executed between
14531 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14532
14533 (define-gl-procedures
14534 ((glLoadTransposeMatrixf
14535 (m const-GLfloat-*)
14536 ->
14537 void))
14538 "Replace the current matrix with the specified row-major ordered matrix.
14539
14540 M
14541 Specifies a pointer to 16 consecutive values, which are used as the
14542 elements of a 4×4 row-major matrix.
14543
14544 `glLoadTransposeMatrix' replaces the current matrix with the one whose
14545 elements are specified by M. The current matrix is the projection
14546 matrix, modelview matrix, or texture matrix, depending on the current
14547 matrix mode (see `glMatrixMode').
14548
14549 The current matrix, M, defines a transformation of coordinates. For
14550 instance, assume M refers to the modelview matrix. If
14551 V=(V\u2061[0,],V\u2061[1,]V\u2061[2,]V\u2061[3,]) is the set of object coordinates of a
14552 vertex, and M points to an array of 16 single- or double-precision
14553 floating-point values M={M\u2061[0,],M\u2061[1,]...M\u2061[15,]} , then the modelview
14554 transformation M\u2061(V,) does the following:
14555
14556 M\u2061(V,)=((M\u2061[0,] M\u2061[1,] M\u2061[2,] M\u2061[3,]), (M\u2061[4,] M\u2061[5,] M\u2061[6,] M\u2061[7,]),
14557 (M\u2061[8,] M\u2061[9,] M\u2061[10,] M\u2061[11,]), (M\u2061[12,] M\u2061[13,] M\u2061[14,]
14558 M\u2061[15,]),)×((V\u2061[0,]), (V\u2061[1,]), (V\u2061[2,]), (V\u2061[3,]),)
14559
14560
14561
14562 Projection and texture transformations are similarly defined.
14563
14564 Calling `glLoadTransposeMatrix' with matrix M is identical in operation
14565 to `glLoadMatrix' with M^T , where T represents the transpose.
14566
14567 `GL_INVALID_OPERATION' is generated if `glLoadTransposeMatrix' is
14568 executed between the execution of `glBegin' and the corresponding
14569 execution of `glEnd'.")
14570
14571 (define-gl-procedures
14572 ((glLogicOp (opcode GLenum) -> void))
14573 "Specify a logical pixel operation for color index rendering.
14574
14575 OPCODE
14576 Specifies a symbolic constant that selects a logical operation. The
14577 following symbols are accepted: `GL_CLEAR', `GL_SET', `GL_COPY',
14578 `GL_COPY_INVERTED', `GL_NOOP', `GL_INVERT', `GL_AND', `GL_NAND',
14579 `GL_OR', `GL_NOR', `GL_XOR', `GL_EQUIV', `GL_AND_REVERSE',
14580 `GL_AND_INVERTED', `GL_OR_REVERSE', and `GL_OR_INVERTED'. The
14581 initial value is `GL_COPY'.
14582
14583 `glLogicOp' specifies a logical operation that, when enabled, is applied
14584 between the incoming color index or RGBA color and the color index or
14585 RGBA color at the corresponding location in the frame buffer. To enable
14586 or disable the logical operation, call `glEnable' and `glDisable' using
14587 the symbolic constant `GL_COLOR_LOGIC_OP' for RGBA mode or
14588 `GL_INDEX_LOGIC_OP' for color index mode. The initial value is disabled
14589 for both operations.
14590
14591
14592
14593 *Opcode*
14594 *Resulting Operation*
14595
14596 `GL_CLEAR'
14597 0
14598
14599 `GL_SET'
14600 1
14601
14602 `GL_COPY'
14603 s
14604
14605 `GL_COPY_INVERTED'
14606 ~s
14607
14608 `GL_NOOP'
14609 d
14610
14611 `GL_INVERT'
14612 ~d
14613
14614 `GL_AND'
14615 s & d
14616
14617 `GL_NAND'
14618 ~(s & d)
14619
14620 `GL_OR'
14621 s | d
14622
14623 `GL_NOR'
14624 ~(s | d)
14625
14626 `GL_XOR'
14627 s ^ d
14628
14629 `GL_EQUIV'
14630 ~(s ^ d)
14631
14632 `GL_AND_REVERSE'
14633 s & ~d
14634
14635 `GL_AND_INVERTED'
14636 ~s & d
14637
14638 `GL_OR_REVERSE'
14639 s | ~d
14640
14641 `GL_OR_INVERTED'
14642 ~s | d
14643
14644 OPCODE is a symbolic constant chosen from the list above. In the
14645 explanation of the logical operations, S represents the incoming color
14646 index and D represents the index in the frame buffer. Standard
14647 C-language operators are used. As these bitwise operators suggest, the
14648 logical operation is applied independently to each bit pair of the
14649 source and destination indices or colors.
14650
14651 `GL_INVALID_ENUM' is generated if OPCODE is not an accepted value.
14652
14653 `GL_INVALID_OPERATION' is generated if `glLogicOp' is executed between
14654 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14655
14656 (define-gl-procedures
14657 ((glMap1f
14658 (target GLenum)
14659 (u1 GLfloat)
14660 (u2 GLfloat)
14661 (stride GLint)
14662 (order GLint)
14663 (points const-GLfloat-*)
14664 ->
14665 void))
14666 "Define a one-dimensional evaluator.
14667
14668 TARGET
14669 Specifies the kind of values that are generated by the evaluator.
14670 Symbolic constants `GL_MAP1_VERTEX_3', `GL_MAP1_VERTEX_4',
14671 `GL_MAP1_INDEX', `GL_MAP1_COLOR_4', `GL_MAP1_NORMAL',
14672 `GL_MAP1_TEXTURE_COORD_1', `GL_MAP1_TEXTURE_COORD_2',
14673 `GL_MAP1_TEXTURE_COORD_3', and `GL_MAP1_TEXTURE_COORD_4' are
14674 accepted.
14675
14676 U1
14677 U2
14678
14679 Specify a linear mapping of U , as presented to `glEvalCoord1', to
14680 U^ , the variable that is evaluated by the equations specified by
14681 this command.
14682
14683 STRIDE
14684 Specifies the number of floats or doubles between the beginning of
14685 one control point and the beginning of the next one in the data
14686 structure referenced in POINTS. This allows control points to be
14687 embedded in arbitrary data structures. The only constraint is that
14688 the values for a particular control point must occupy contiguous
14689 memory locations.
14690
14691 ORDER
14692 Specifies the number of control points. Must be positive.
14693
14694 POINTS
14695 Specifies a pointer to the array of control points.
14696
14697 Evaluators provide a way to use polynomial or rational polynomial
14698 mapping to produce vertices, normals, texture coordinates, and colors.
14699 The values produced by an evaluator are sent to further stages of GL
14700 processing just as if they had been presented using `glVertex',
14701 `glNormal', `glTexCoord', and `glColor' commands, except that the
14702 generated values do not update the current normal, texture coordinates,
14703 or color.
14704
14705 All polynomial or rational polynomial splines of any degree (up to the
14706 maximum degree supported by the GL implementation) can be described
14707 using evaluators. These include almost all splines used in computer
14708 graphics: B-splines, Bezier curves, Hermite splines, and so on.
14709
14710 Evaluators define curves based on Bernstein polynomials. Define P\u2061(U^,)
14711 as
14712
14713 P\u2061(U^,)=ΣI=0NB_I,^N\u2061(U^,)\u2062R_I
14714
14715
14716
14717 where R_I is a control point and B_I,^N\u2061(U^,) is the I th Bernstein
14718 polynomial of degree N (ORDER = N+1 ):
14719
14720 B_I,^N\u2061(U^,)=((N), (I),,)\u2062U^,^I\u2062(1-U^,)^N-I,,
14721
14722 Recall that
14723
14724 0^0==1 and ((N), (0),,)==1
14725
14726 `glMap1' is used to define the basis and to specify what kind of values
14727 are produced. Once defined, a map can be enabled and disabled by calling
14728 `glEnable' and `glDisable' with the map name, one of the nine predefined
14729 values for TARGET described below. `glEvalCoord1' evaluates the
14730 one-dimensional maps that are enabled. When `glEvalCoord1' presents a
14731 value U , the Bernstein functions are evaluated using U^ , where
14732 U^=U-U1,/U2-U1,
14733
14734 TARGET is a symbolic constant that indicates what kind of control points
14735 are provided in POINTS, and what output is generated when the map is
14736 evaluated. It can assume one of nine predefined values:
14737
14738 `GL_MAP1_VERTEX_3'
14739 Each control point is three floating-point values representing X ,
14740 Y , and Z . Internal `glVertex3' commands are generated when the
14741 map is evaluated.
14742
14743 `GL_MAP1_VERTEX_4'
14744 Each control point is four floating-point values representing X , Y
14745 , Z , and W . Internal `glVertex4' commands are generated when the
14746 map is evaluated.
14747
14748 `GL_MAP1_INDEX'
14749 Each control point is a single floating-point value representing a
14750 color index. Internal `glIndex' commands are generated when the map
14751 is evaluated but the current index is not updated with the value of
14752 these `glIndex' commands.
14753
14754 `GL_MAP1_COLOR_4'
14755 Each control point is four floating-point values representing red,
14756 green, blue, and alpha. Internal `glColor4' commands are generated
14757 when the map is evaluated but the current color is not updated with
14758 the value of these `glColor4' commands.
14759
14760 `GL_MAP1_NORMAL'
14761 Each control point is three floating-point values representing the
14762 X , Y , and Z components of a normal vector. Internal `glNormal'
14763 commands are generated when the map is evaluated but the current
14764 normal is not updated with the value of these `glNormal' commands.
14765
14766 `GL_MAP1_TEXTURE_COORD_1'
14767 Each control point is a single floating-point value representing
14768 the S texture coordinate. Internal `glTexCoord1' commands are
14769 generated when the map is evaluated but the current texture
14770 coordinates are not updated with the value of these `glTexCoord'
14771 commands.
14772
14773 `GL_MAP1_TEXTURE_COORD_2'
14774 Each control point is two floating-point values representing the S
14775 and T texture coordinates. Internal `glTexCoord2' commands are
14776 generated when the map is evaluated but the current texture
14777 coordinates are not updated with the value of these `glTexCoord'
14778 commands.
14779
14780 `GL_MAP1_TEXTURE_COORD_3'
14781 Each control point is three floating-point values representing the
14782 S , T , and R texture coordinates. Internal `glTexCoord3' commands
14783 are generated when the map is evaluated but the current texture
14784 coordinates are not updated with the value of these `glTexCoord'
14785 commands.
14786
14787 `GL_MAP1_TEXTURE_COORD_4'
14788 Each control point is four floating-point values representing the S
14789 , T , R , and Q texture coordinates. Internal `glTexCoord4'
14790 commands are generated when the map is evaluated but the current
14791 texture coordinates are not updated with the value of these
14792 `glTexCoord' commands.
14793
14794 STRIDE, ORDER, and POINTS define the array addressing for accessing the
14795 control points. POINTS is the location of the first control point, which
14796 occupies one, two, three, or four contiguous memory locations, depending
14797 on which map is being defined. ORDER is the number of control points in
14798 the array. STRIDE specifies how many float or double locations to
14799 advance the internal memory pointer to reach the next control point.
14800
14801 `GL_INVALID_ENUM' is generated if TARGET is not an accepted value.
14802
14803 `GL_INVALID_VALUE' is generated if U1 is equal to U2.
14804
14805 `GL_INVALID_VALUE' is generated if STRIDE is less than the number of
14806 values in a control point.
14807
14808 `GL_INVALID_VALUE' is generated if ORDER is less than 1 or greater than
14809 the return value of `GL_MAX_EVAL_ORDER'.
14810
14811 `GL_INVALID_OPERATION' is generated if `glMap1' is executed between the
14812 execution of `glBegin' and the corresponding execution of `glEnd'.
14813
14814 `GL_INVALID_OPERATION' is generated if `glMap1' is called and the value
14815 of `GL_ACTIVE_TEXTURE' is not `GL_TEXTURE0'.")
14816
14817 (define-gl-procedures
14818 ((glMap2f
14819 (target GLenum)
14820 (u1 GLfloat)
14821 (u2 GLfloat)
14822 (ustride GLint)
14823 (uorder GLint)
14824 (v1 GLfloat)
14825 (v2 GLfloat)
14826 (vstride GLint)
14827 (vorder GLint)
14828 (points const-GLfloat-*)
14829 ->
14830 void))
14831 "Define a two-dimensional evaluator.
14832
14833 TARGET
14834 Specifies the kind of values that are generated by the evaluator.
14835 Symbolic constants `GL_MAP2_VERTEX_3', `GL_MAP2_VERTEX_4',
14836 `GL_MAP2_INDEX', `GL_MAP2_COLOR_4', `GL_MAP2_NORMAL',
14837 `GL_MAP2_TEXTURE_COORD_1', `GL_MAP2_TEXTURE_COORD_2',
14838 `GL_MAP2_TEXTURE_COORD_3', and `GL_MAP2_TEXTURE_COORD_4' are
14839 accepted.
14840
14841 U1
14842 U2
14843
14844 Specify a linear mapping of U , as presented to `glEvalCoord2', to
14845 U^ , one of the two variables that are evaluated by the equations
14846 specified by this command. Initially, U1 is 0 and U2 is 1.
14847
14848 USTRIDE
14849 Specifies the number of floats or doubles between the beginning of
14850 control point R_IJ and the beginning of control point R_(I+1,)\u2062J, ,
14851 where I and J are the U and V control point indices, respectively.
14852 This allows control points to be embedded in arbitrary data
14853 structures. The only constraint is that the values for a particular
14854 control point must occupy contiguous memory locations. The initial
14855 value of USTRIDE is 0.
14856
14857 UORDER
14858 Specifies the dimension of the control point array in the U axis.
14859 Must be positive. The initial value is 1.
14860
14861 V1
14862 V2
14863
14864 Specify a linear mapping of V , as presented to `glEvalCoord2', to
14865 V^ , one of the two variables that are evaluated by the equations
14866 specified by this command. Initially, V1 is 0 and V2 is 1.
14867
14868 VSTRIDE
14869 Specifies the number of floats or doubles between the beginning of
14870 control point R_IJ and the beginning of control point R_I\u2061(J+1,), ,
14871 where I and J are the U and V control point indices, respectively.
14872 This allows control points to be embedded in arbitrary data
14873 structures. The only constraint is that the values for a particular
14874 control point must occupy contiguous memory locations. The initial
14875 value of VSTRIDE is 0.
14876
14877 VORDER
14878 Specifies the dimension of the control point array in the V axis.
14879 Must be positive. The initial value is 1.
14880
14881 POINTS
14882 Specifies a pointer to the array of control points.
14883
14884 Evaluators provide a way to use polynomial or rational polynomial
14885 mapping to produce vertices, normals, texture coordinates, and colors.
14886 The values produced by an evaluator are sent on to further stages of GL
14887 processing just as if they had been presented using `glVertex',
14888 `glNormal', `glTexCoord', and `glColor' commands, except that the
14889 generated values do not update the current normal, texture coordinates,
14890 or color.
14891
14892 All polynomial or rational polynomial splines of any degree (up to the
14893 maximum degree supported by the GL implementation) can be described
14894 using evaluators. These include almost all surfaces used in computer
14895 graphics, including B-spline surfaces, NURBS surfaces, Bezier surfaces,
14896 and so on.
14897
14898 Evaluators define surfaces based on bivariate Bernstein polynomials.
14899 Define P\u2061(U^,V^) as
14900
14901 P\u2061(U^,V^)=ΣI=0NΣJ=0MB_I,^N\u2061(U^,)\u2062B_J,^M\u2061(V^,)\u2062R_IJ
14902
14903
14904
14905 where R_IJ is a control point, B_I,^N\u2061(U^,) is the I th Bernstein
14906 polynomial of degree N (UORDER = N+1 )
14907
14908 B_I,^N\u2061(U^,)=((N), (I),,)\u2062U^,^I\u2062(1-U^,)^N-I,,
14909
14910 and B_J,^M\u2061(V^,) is the J th Bernstein polynomial of degree M (VORDER =
14911 M+1 )
14912
14913 B_J,^M\u2061(V^,)=((M), (J),,)\u2062V^,^J\u2062(1-V^,)^M-J,,
14914
14915 Recall that 0^0==1 and ((N), (0),,)==1
14916
14917 `glMap2' is used to define the basis and to specify what kind of values
14918 are produced. Once defined, a map can be enabled and disabled by calling
14919 `glEnable' and `glDisable' with the map name, one of the nine predefined
14920 values for TARGET, described below. When `glEvalCoord2' presents values
14921 U and V , the bivariate Bernstein polynomials are evaluated using U^ and
14922 V^ , where
14923
14924 U^=U-U1,/U2-U1,
14925
14926 V^=V-V1,/V2-V1,
14927
14928 TARGET is a symbolic constant that indicates what kind of control points
14929 are provided in POINTS, and what output is generated when the map is
14930 evaluated. It can assume one of nine predefined values:
14931
14932 `GL_MAP2_VERTEX_3'
14933 Each control point is three floating-point values representing X ,
14934 Y , and Z . Internal `glVertex3' commands are generated when the
14935 map is evaluated.
14936
14937 `GL_MAP2_VERTEX_4'
14938 Each control point is four floating-point values representing X , Y
14939 , Z , and W . Internal `glVertex4' commands are generated when the
14940 map is evaluated.
14941
14942 `GL_MAP2_INDEX'
14943 Each control point is a single floating-point value representing a
14944 color index. Internal `glIndex' commands are generated when the map
14945 is evaluated but the current index is not updated with the value of
14946 these `glIndex' commands.
14947
14948 `GL_MAP2_COLOR_4'
14949 Each control point is four floating-point values representing red,
14950 green, blue, and alpha. Internal `glColor4' commands are generated
14951 when the map is evaluated but the current color is not updated with
14952 the value of these `glColor4' commands.
14953
14954 `GL_MAP2_NORMAL'
14955 Each control point is three floating-point values representing the
14956 X , Y , and Z components of a normal vector. Internal `glNormal'
14957 commands are generated when the map is evaluated but the current
14958 normal is not updated with the value of these `glNormal' commands.
14959
14960 `GL_MAP2_TEXTURE_COORD_1'
14961 Each control point is a single floating-point value representing
14962 the S texture coordinate. Internal `glTexCoord1' commands are
14963 generated when the map is evaluated but the current texture
14964 coordinates are not updated with the value of these `glTexCoord'
14965 commands.
14966
14967 `GL_MAP2_TEXTURE_COORD_2'
14968 Each control point is two floating-point values representing the S
14969 and T texture coordinates. Internal `glTexCoord2' commands are
14970 generated when the map is evaluated but the current texture
14971 coordinates are not updated with the value of these `glTexCoord'
14972 commands.
14973
14974 `GL_MAP2_TEXTURE_COORD_3'
14975 Each control point is three floating-point values representing the
14976 S , T , and R texture coordinates. Internal `glTexCoord3' commands
14977 are generated when the map is evaluated but the current texture
14978 coordinates are not updated with the value of these `glTexCoord'
14979 commands.
14980
14981 `GL_MAP2_TEXTURE_COORD_4'
14982 Each control point is four floating-point values representing the S
14983 , T , R , and Q texture coordinates. Internal `glTexCoord4'
14984 commands are generated when the map is evaluated but the current
14985 texture coordinates are not updated with the value of these
14986 `glTexCoord' commands.
14987
14988 USTRIDE, UORDER, VSTRIDE, VORDER, and POINTS define the array addressing
14989 for accessing the control points. POINTS is the location of the first
14990 control point, which occupies one, two, three, or four contiguous memory
14991 locations, depending on which map is being defined. There are
14992 UORDER×VORDER control points in the array. USTRIDE specifies how many
14993 float or double locations are skipped to advance the internal memory
14994 pointer from control point R_I\u2062J, to control point R_(I+1,)\u2062J, . VSTRIDE
14995 specifies how many float or double locations are skipped to advance the
14996 internal memory pointer from control point R_I\u2062J, to control point
14997 R_I\u2061(J+1,), .
14998
14999 `GL_INVALID_ENUM' is generated if TARGET is not an accepted value.
15000
15001 `GL_INVALID_VALUE' is generated if U1 is equal to U2, or if V1 is equal
15002 to V2.
15003
15004 `GL_INVALID_VALUE' is generated if either USTRIDE or VSTRIDE is less
15005 than the number of values in a control point.
15006
15007 `GL_INVALID_VALUE' is generated if either UORDER or VORDER is less than
15008 1 or greater than the return value of `GL_MAX_EVAL_ORDER'.
15009
15010 `GL_INVALID_OPERATION' is generated if `glMap2' is executed between the
15011 execution of `glBegin' and the corresponding execution of `glEnd'.
15012
15013 `GL_INVALID_OPERATION' is generated if `glMap2' is called and the value
15014 of `GL_ACTIVE_TEXTURE' is not `GL_TEXTURE0'.")
15015
15016 (define-gl-procedures
15017 ((glMapBuffer
15018 (target GLenum)
15019 (access GLenum)
15020 ->
15021 void-*)
15022 (glUnmapBuffer (target GLenum) -> GLboolean))
15023 "Map a buffer object's data store.
15024
15025 TARGET
15026 Specifies the target buffer object being mapped. The symbolic
15027 constant must be `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
15028 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
15029
15030 ACCESS
15031 Specifies the access policy, indicating whether it will be possible
15032 to read from, write to, or both read from and write to the buffer
15033 object's mapped data store. The symbolic constant must be
15034 `GL_READ_ONLY', `GL_WRITE_ONLY', or `GL_READ_WRITE'.
15035
15036 `glMapBuffer' maps to the client's address space the entire data store
15037 of the buffer object currently bound to TARGET. The data can then be
15038 directly read and/or written relative to the returned pointer, depending
15039 on the specified ACCESS policy. If the GL is unable to map the buffer
15040 object's data store, `glMapBuffer' generates an error and returns
15041 `NULL'. This may occur for system-specific reasons, such as low virtual
15042 memory availability.
15043
15044 If a mapped data store is accessed in a way inconsistent with the
15045 specified ACCESS policy, no error is generated, but performance may be
15046 negatively impacted and system errors, including program termination,
15047 may result. Unlike the USAGE parameter of `glBufferData', ACCESS is not
15048 a hint, and does in fact constrain the usage of the mapped data store on
15049 some GL implementations. In order to achieve the highest performance
15050 available, a buffer object's data store should be used in ways
15051 consistent with both its specified USAGE and ACCESS parameters.
15052
15053 A mapped data store must be unmapped with `glUnmapBuffer' before its
15054 buffer object is used. Otherwise an error will be generated by any GL
15055 command that attempts to dereference the buffer object's data store.
15056 When a data store is unmapped, the pointer to its data store becomes
15057 invalid. `glUnmapBuffer' returns `GL_TRUE' unless the data store
15058 contents have become corrupt during the time the data store was mapped.
15059 This can occur for system-specific reasons that affect the availability
15060 of graphics memory, such as screen mode changes. In such situations,
15061 `GL_FALSE' is returned and the data store contents are undefined. An
15062 application must detect this rare condition and reinitialize the data
15063 store.
15064
15065 A buffer object's mapped data store is automatically unmapped when the
15066 buffer object is deleted or its data store is recreated with
15067 `glBufferData'.
15068
15069 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
15070 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
15071 `GL_PIXEL_UNPACK_BUFFER'.
15072
15073 `GL_INVALID_ENUM' is generated if ACCESS is not `GL_READ_ONLY',
15074 `GL_WRITE_ONLY', or `GL_READ_WRITE'.
15075
15076 `GL_OUT_OF_MEMORY' is generated when `glMapBuffer' is executed if the GL
15077 is unable to map the buffer object's data store. This may occur for a
15078 variety of system-specific reasons, such as the absence of sufficient
15079 remaining virtual memory.
15080
15081 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
15082 is bound to TARGET.
15083
15084 `GL_INVALID_OPERATION' is generated if `glMapBuffer' is executed for a
15085 buffer object whose data store is already mapped.
15086
15087 `GL_INVALID_OPERATION' is generated if `glUnmapBuffer' is executed for a
15088 buffer object whose data store is not currently mapped.
15089
15090 `GL_INVALID_OPERATION' is generated if `glMapBuffer' or `glUnmapBuffer'
15091 is executed between the execution of `glBegin' and the corresponding
15092 execution of `glEnd'.")
15093
15094 (define-gl-procedures
15095 ((glMapGrid1f
15096 (un GLint)
15097 (u1 GLfloat)
15098 (u2 GLfloat)
15099 ->
15100 void)
15101 (glMapGrid2f
15102 (un GLint)
15103 (u1 GLfloat)
15104 (u2 GLfloat)
15105 (vn GLint)
15106 (v1 GLfloat)
15107 (v2 GLfloat)
15108 ->
15109 void))
15110 "Define a one- or two-dimensional mesh.
15111
15112 UN
15113 Specifies the number of partitions in the grid range interval [U1,
15114 U2]. Must be positive.
15115
15116 U1
15117 U2
15118
15119 Specify the mappings for integer grid domain values I=0 and I=UN .
15120
15121 VN
15122 Specifies the number of partitions in the grid range interval [V1,
15123 V2] (`glMapGrid2' only).
15124
15125 V1
15126 V2
15127
15128 Specify the mappings for integer grid domain values J=0 and J=VN
15129 (`glMapGrid2' only).
15130
15131 `glMapGrid' and `glEvalMesh' are used together to efficiently generate
15132 and evaluate a series of evenly-spaced map domain values. `glEvalMesh'
15133 steps through the integer domain of a one- or two-dimensional grid,
15134 whose range is the domain of the evaluation maps specified by `glMap1'
15135 and `glMap2'.
15136
15137 `glMapGrid1' and `glMapGrid2' specify the linear grid mappings between
15138 the I (or I and J ) integer grid coordinates, to the U (or U and V )
15139 floating-point evaluation map coordinates. See `glMap1' and `glMap2' for
15140 details of how U and V coordinates are evaluated.
15141
15142 `glMapGrid1' specifies a single linear mapping such that integer grid
15143 coordinate 0 maps exactly to U1, and integer grid coordinate UN maps
15144 exactly to U2. All other integer grid coordinates I are mapped so that
15145
15146 U=I\u2061(U2-U1,)/UN+U1
15147
15148 `glMapGrid2' specifies two such linear mappings. One maps integer grid
15149 coordinate I=0 exactly to U1, and integer grid coordinate I=UN exactly
15150 to U2. The other maps integer grid coordinate J=0 exactly to V1, and
15151 integer grid coordinate J=VN exactly to V2. Other integer grid
15152 coordinates I and J are mapped such that
15153
15154 U=I\u2061(U2-U1,)/UN+U1
15155
15156 V=J\u2061(V2-V1,)/VN+V1
15157
15158 The mappings specified by `glMapGrid' are used identically by
15159 `glEvalMesh' and `glEvalPoint'.
15160
15161 `GL_INVALID_VALUE' is generated if either UN or VN is not positive.
15162
15163 `GL_INVALID_OPERATION' is generated if `glMapGrid' is executed between
15164 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15165
15166 (define-gl-procedures
15167 ((glMaterialf
15168 (face GLenum)
15169 (pname GLenum)
15170 (param GLfloat)
15171 ->
15172 void)
15173 (glMateriali
15174 (face GLenum)
15175 (pname GLenum)
15176 (param GLint)
15177 ->
15178 void))
15179 "Specify material parameters for the lighting model.
15180
15181 FACE
15182 Specifies which face or faces are being updated. Must be one of
15183 `GL_FRONT', `GL_BACK', or `GL_FRONT_AND_BACK'.
15184
15185 PNAME
15186 Specifies the single-valued material parameter of the face or faces
15187 that is being updated. Must be `GL_SHININESS'.
15188
15189 PARAM
15190 Specifies the value that parameter `GL_SHININESS' will be set to.
15191
15192 `glMaterial' assigns values to material parameters. There are two
15193 matched sets of material parameters. One, the FRONT-FACING set, is used
15194 to shade points, lines, bitmaps, and all polygons (when two-sided
15195 lighting is disabled), or just front-facing polygons (when two-sided
15196 lighting is enabled). The other set, BACK-FACING, is used to shade
15197 back-facing polygons only when two-sided lighting is enabled. Refer to
15198 the `glLightModel' reference page for details concerning one- and
15199 two-sided lighting calculations.
15200
15201 `glMaterial' takes three arguments. The first, FACE, specifies whether
15202 the `GL_FRONT' materials, the `GL_BACK' materials, or both
15203 `GL_FRONT_AND_BACK' materials will be modified. The second, PNAME,
15204 specifies which of several parameters in one or both sets will be
15205 modified. The third, PARAMS, specifies what value or values will be
15206 assigned to the specified parameter.
15207
15208 Material parameters are used in the lighting equation that is optionally
15209 applied to each vertex. The equation is discussed in the `glLightModel'
15210 reference page. The parameters that can be specified using `glMaterial',
15211 and their interpretations by the lighting equation, are as follows:
15212
15213 `GL_AMBIENT'
15214 PARAMS contains four integer or floating-point values that specify
15215 the ambient RGBA reflectance of the material. Integer values are
15216 mapped linearly such that the most positive representable value
15217 maps to 1.0, and the most negative representable value maps to -1.0
15218 . Floating-point values are mapped directly. Neither integer nor
15219 floating-point values are clamped. The initial ambient reflectance
15220 for both front- and back-facing materials is (0.2, 0.2, 0.2, 1.0).
15221
15222 `GL_DIFFUSE'
15223 PARAMS contains four integer or floating-point values that specify
15224 the diffuse RGBA reflectance of the material. Integer values are
15225 mapped linearly such that the most positive representable value
15226 maps to 1.0, and the most negative representable value maps to -1.0
15227 . Floating-point values are mapped directly. Neither integer nor
15228 floating-point values are clamped. The initial diffuse reflectance
15229 for both front- and back-facing materials is (0.8, 0.8, 0.8, 1.0).
15230
15231 `GL_SPECULAR'
15232 PARAMS contains four integer or floating-point values that specify
15233 the specular RGBA reflectance of the material. Integer values are
15234 mapped linearly such that the most positive representable value
15235 maps to 1.0, and the most negative representable value maps to -1.0
15236 . Floating-point values are mapped directly. Neither integer nor
15237 floating-point values are clamped. The initial specular reflectance
15238 for both front- and back-facing materials is (0, 0, 0, 1).
15239
15240 `GL_EMISSION'
15241 PARAMS contains four integer or floating-point values that specify
15242 the RGBA emitted light intensity of the material. Integer values
15243 are mapped linearly such that the most positive representable value
15244 maps to 1.0, and the most negative representable value maps to -1.0
15245 . Floating-point values are mapped directly. Neither integer nor
15246 floating-point values are clamped. The initial emission intensity
15247 for both front- and back-facing materials is (0, 0, 0, 1).
15248
15249 `GL_SHININESS'
15250 PARAMS is a single integer or floating-point value that specifies
15251 the RGBA specular exponent of the material. Integer and
15252 floating-point values are mapped directly. Only values in the range
15253 [0,128] are accepted. The initial specular exponent for both front-
15254 and back-facing materials is 0.
15255
15256 `GL_AMBIENT_AND_DIFFUSE'
15257 Equivalent to calling `glMaterial' twice with the same parameter
15258 values, once with `GL_AMBIENT' and once with `GL_DIFFUSE'.
15259
15260 `GL_COLOR_INDEXES'
15261 PARAMS contains three integer or floating-point values specifying
15262 the color indices for ambient, diffuse, and specular lighting.
15263 These three values, and `GL_SHININESS', are the only material
15264 values used by the color index mode lighting equation. Refer to the
15265 `glLightModel' reference page for a discussion of color index
15266 lighting.
15267
15268 `GL_INVALID_ENUM' is generated if either FACE or PNAME is not an
15269 accepted value.
15270
15271 `GL_INVALID_VALUE' is generated if a specular exponent outside the range
15272 [0,128] is specified.")
15273
15274 (define-gl-procedures
15275 ((glMatrixMode (mode GLenum) -> void))
15276 "Specify which matrix is the current matrix.
15277
15278 MODE
15279 Specifies which matrix stack is the target for subsequent matrix
15280 operations. Three values are accepted: `GL_MODELVIEW',
15281 `GL_PROJECTION', and `GL_TEXTURE'. The initial value is
15282 `GL_MODELVIEW'. Additionally, if the `ARB_imaging' extension is
15283 supported, `GL_COLOR' is also accepted.
15284
15285 `glMatrixMode' sets the current matrix mode. MODE can assume one of four
15286 values:
15287
15288 `GL_MODELVIEW'
15289 Applies subsequent matrix operations to the modelview matrix stack.
15290
15291 `GL_PROJECTION'
15292 Applies subsequent matrix operations to the projection matrix
15293 stack.
15294
15295 `GL_TEXTURE'
15296 Applies subsequent matrix operations to the texture matrix stack.
15297
15298 `GL_COLOR'
15299 Applies subsequent matrix operations to the color matrix stack.
15300
15301 To find out which matrix stack is currently the target of all matrix
15302 operations, call `glGet' with argument `GL_MATRIX_MODE'. The initial
15303 value is `GL_MODELVIEW'.
15304
15305 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15306
15307 `GL_INVALID_OPERATION' is generated if `glMatrixMode' is executed
15308 between the execution of `glBegin' and the corresponding execution of
15309 `glEnd'.")
15310
15311 (define-gl-procedures
15312 ((glMinmax
15313 (target GLenum)
15314 (internalformat GLenum)
15315 (sink GLboolean)
15316 ->
15317 void))
15318 "Define minmax table.
15319
15320 TARGET
15321 The minmax table whose parameters are to be set. Must be
15322 `GL_MINMAX'.
15323
15324 INTERNALFORMAT
15325 The format of entries in the minmax table. Must be one of
15326 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
15327 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
15328 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
15329 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
15330 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
15331 `GL_LUMINANCE16_ALPHA16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4',
15332 `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16',
15333 `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8',
15334 `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
15335
15336 SINK
15337 If `GL_TRUE', pixels will be consumed by the minmax process and no
15338 drawing or texture loading will take place. If `GL_FALSE', pixels
15339 will proceed to the final conversion process after minmax.
15340
15341 When `GL_MINMAX' is enabled, the RGBA components of incoming pixels are
15342 compared to the minimum and maximum values for each component, which are
15343 stored in the two-element minmax table. (The first element stores the
15344 minima, and the second element stores the maxima.) If a pixel component
15345 is greater than the corresponding component in the maximum element, then
15346 the maximum element is updated with the pixel component value. If a
15347 pixel component is less than the corresponding component in the minimum
15348 element, then the minimum element is updated with the pixel component
15349 value. (In both cases, if the internal format of the minmax table
15350 includes luminance, then the R color component of incoming pixels is
15351 used for comparison.) The contents of the minmax table may be retrieved
15352 at a later time by calling `glGetMinmax'. The minmax operation is
15353 enabled or disabled by calling `glEnable' or `glDisable', respectively,
15354 with an argument of `GL_MINMAX'.
15355
15356 `glMinmax' redefines the current minmax table to have entries of the
15357 format specified by INTERNALFORMAT. The maximum element is initialized
15358 with the smallest possible component values, and the minimum element is
15359 initialized with the largest possible component values. The values in
15360 the previous minmax table, if any, are lost. If SINK is `GL_TRUE', then
15361 pixels are discarded after minmax; no further processing of the pixels
15362 takes place, and no drawing, texture loading, or pixel readback will
15363 result.
15364
15365
15366
15367 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
15368 values.
15369
15370 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
15371 allowable values.
15372
15373 `GL_INVALID_OPERATION' is generated if `glMinmax' is executed between
15374 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15375
15376 (define-gl-procedures
15377 ((glMultiDrawArrays
15378 (mode GLenum)
15379 (first GLint-*)
15380 (count GLsizei-*)
15381 (primcount GLsizei)
15382 ->
15383 void))
15384 "Render multiple sets of primitives from array data.
15385
15386 MODE
15387 Specifies what kind of primitives to render. Symbolic constants
15388 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
15389 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
15390 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
15391
15392 FIRST
15393 Points to an array of starting indices in the enabled arrays.
15394
15395 COUNT
15396 Points to an array of the number of indices to be rendered.
15397
15398 PRIMCOUNT
15399 Specifies the size of the first and count
15400
15401 `glMultiDrawArrays' specifies multiple sets of geometric primitives with
15402 very few subroutine calls. Instead of calling a GL procedure to pass
15403 each individual vertex, normal, texture coordinate, edge flag, or color,
15404 you can prespecify separate arrays of vertices, normals, and colors and
15405 use them to construct a sequence of primitives with a single call to
15406 `glMultiDrawArrays'.
15407
15408 `glMultiDrawArrays' behaves identically to `glDrawArrays' except that
15409 PRIMCOUNT separate ranges of elements are specified instead.
15410
15411 When `glMultiDrawArrays' is called, it uses COUNT sequential elements
15412 from each enabled array to construct a sequence of geometric primitives,
15413 beginning with element FIRST. MODE specifies what kind of primitives are
15414 constructed, and how the array elements construct those primitives. If
15415 `GL_VERTEX_ARRAY' is not enabled, no geometric primitives are generated.
15416
15417 Vertex attributes that are modified by `glMultiDrawArrays' have an
15418 unspecified value after `glMultiDrawArrays' returns. For example, if
15419 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
15420 after `glMultiDrawArrays' executes. Attributes that aren't modified
15421 remain well defined.
15422
15423 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15424
15425 `GL_INVALID_VALUE' is generated if PRIMCOUNT is negative.
15426
15427 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
15428 bound to an enabled array and the buffer object's data store is
15429 currently mapped.
15430
15431 `GL_INVALID_OPERATION' is generated if `glMultiDrawArrays' is executed
15432 between the execution of `glBegin' and the corresponding `glEnd'.")
15433
15434 (define-gl-procedures
15435 ((glMultiDrawElements
15436 (mode GLenum)
15437 (count const-GLsizei-*)
15438 (type GLenum)
15439 (indices const-GLvoid-**)
15440 (primcount GLsizei)
15441 ->
15442 void))
15443 "Render multiple sets of primitives by specifying indices of array data
15444 elements.
15445
15446 MODE
15447 Specifies what kind of primitives to render. Symbolic constants
15448 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
15449 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
15450 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
15451
15452 COUNT
15453 Points to an array of the elements counts.
15454
15455 TYPE
15456 Specifies the type of the values in INDICES. Must be one of
15457 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
15458
15459 INDICES
15460 Specifies a pointer to the location where the indices are stored.
15461
15462 PRIMCOUNT
15463 Specifies the size of the COUNT array.
15464
15465 `glMultiDrawElements' specifies multiple sets of geometric primitives
15466 with very few subroutine calls. Instead of calling a GL function to pass
15467 each individual vertex, normal, texture coordinate, edge flag, or color,
15468 you can prespecify separate arrays of vertices, normals, and so on, and
15469 use them to construct a sequence of primitives with a single call to
15470 `glMultiDrawElements'.
15471
15472 `glMultiDrawElements' is identical in operation to `glDrawElements'
15473 except that PRIMCOUNT separate lists of elements are specified.
15474
15475 Vertex attributes that are modified by `glMultiDrawElements' have an
15476 unspecified value after `glMultiDrawElements' returns. For example, if
15477 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
15478 after `glMultiDrawElements' executes. Attributes that aren't modified
15479 maintain their previous values.
15480
15481 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15482
15483 `GL_INVALID_VALUE' is generated if PRIMCOUNT is negative.
15484
15485 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
15486 bound to an enabled array or the element array and the buffer object's
15487 data store is currently mapped.
15488
15489 `GL_INVALID_OPERATION' is generated if `glMultiDrawElements' is executed
15490 between the execution of `glBegin' and the corresponding `glEnd'.")
15491
15492 (define-gl-procedures
15493 ((glMultiTexCoord1i
15494 (target GLenum)
15495 (s GLint)
15496 ->
15497 void)
15498 (glMultiTexCoord1f
15499 (target GLenum)
15500 (s GLfloat)
15501 ->
15502 void)
15503 (glMultiTexCoord2i
15504 (target GLenum)
15505 (s GLint)
15506 (t GLint)
15507 ->
15508 void)
15509 (glMultiTexCoord2f
15510 (target GLenum)
15511 (s GLfloat)
15512 (t GLfloat)
15513 ->
15514 void)
15515 (glMultiTexCoord3i
15516 (target GLenum)
15517 (s GLint)
15518 (t GLint)
15519 (r GLint)
15520 ->
15521 void)
15522 (glMultiTexCoord3f
15523 (target GLenum)
15524 (s GLfloat)
15525 (t GLfloat)
15526 (r GLfloat)
15527 ->
15528 void)
15529 (glMultiTexCoord4i
15530 (target GLenum)
15531 (s GLint)
15532 (t GLint)
15533 (r GLint)
15534 (q GLint)
15535 ->
15536 void)
15537 (glMultiTexCoord4f
15538 (target GLenum)
15539 (s GLfloat)
15540 (t GLfloat)
15541 (r GLfloat)
15542 (q GLfloat)
15543 ->
15544 void))
15545 "Set the current texture coordinates.
15546
15547 TARGET
15548 Specifies the texture unit whose coordinates should be modified.
15549 The number of texture units is implementation dependent, but must
15550 be at least two. Symbolic constant must be one of `GL_TEXTURE' I ,
15551 where i ranges from 0 to `GL_MAX_TEXTURE_COORDS' - 1, which is an
15552 implementation-dependent value.
15553
15554 S
15555 T
15556
15557 R
15558
15559 Q
15560
15561 Specify S, T, R, and Q texture coordinates for TARGET texture unit.
15562 Not all parameters are present in all forms of the command.
15563
15564 `glMultiTexCoord' specifies texture coordinates in one, two, three, or
15565 four dimensions. `glMultiTexCoord1' sets the current texture coordinates
15566 to (S,001) ; a call to `glMultiTexCoord2' sets them to (S,T01) .
15567 Similarly, `glMultiTexCoord3' specifies the texture coordinates as
15568 (S,TR1) , and `glMultiTexCoord4' defines all four components explicitly
15569 as (S,TRQ) .
15570
15571 The current texture coordinates are part of the data that is associated
15572 with each vertex and with the current raster position. Initially, the
15573 values for (S,TRQ) are (0,001) .")
15574
15575 (define-gl-procedures
15576 ((glMultMatrixf (m const-GLfloat-*) -> void))
15577 "Multiply the current matrix with the specified matrix.
15578
15579 M
15580 Points to 16 consecutive values that are used as the elements of a
15581 4×4 column-major matrix.
15582
15583 `glMultMatrix' multiplies the current matrix with the one specified
15584 using M, and replaces the current matrix with the product.
15585
15586 The current matrix is determined by the current matrix mode (see
15587 `glMatrixMode'). It is either the projection matrix, modelview matrix,
15588 or the texture matrix.
15589
15590 `GL_INVALID_OPERATION' is generated if `glMultMatrix' is executed
15591 between the execution of `glBegin' and the corresponding execution of
15592 `glEnd'.")
15593
15594 (define-gl-procedures
15595 ((glMultTransposeMatrixf
15596 (m const-GLfloat-*)
15597 ->
15598 void))
15599 "Multiply the current matrix with the specified row-major ordered matrix.
15600
15601 M
15602 Points to 16 consecutive values that are used as the elements of a
15603 4×4 row-major matrix.
15604
15605 `glMultTransposeMatrix' multiplies the current matrix with the one
15606 specified using M, and replaces the current matrix with the product.
15607
15608 The current matrix is determined by the current matrix mode (see
15609 `glMatrixMode'). It is either the projection matrix, modelview matrix,
15610 or the texture matrix.
15611
15612 `GL_INVALID_OPERATION' is generated if `glMultTransposeMatrix' is
15613 executed between the execution of `glBegin' and the corresponding
15614 execution of `glEnd'.")
15615
15616 (define-gl-procedures
15617 ((glNewList (list GLuint) (mode GLenum) -> void)
15618 (glEndList -> void))
15619 "Create or replace a display list.
15620
15621 LIST
15622 Specifies the display-list name.
15623
15624 MODE
15625 Specifies the compilation mode, which can be `GL_COMPILE' or
15626 `GL_COMPILE_AND_EXECUTE'.
15627
15628 Display lists are groups of GL commands that have been stored for
15629 subsequent execution. Display lists are created with `glNewList'. All
15630 subsequent commands are placed in the display list, in the order issued,
15631 until `glEndList' is called.
15632
15633 `glNewList' has two arguments. The first argument, LIST, is a positive
15634 integer that becomes the unique name for the display list. Names can be
15635 created and reserved with `glGenLists' and tested for uniqueness with
15636 `glIsList'. The second argument, MODE, is a symbolic constant that can
15637 assume one of two values:
15638
15639 `GL_COMPILE'
15640 Commands are merely compiled.
15641
15642 `GL_COMPILE_AND_EXECUTE'
15643 Commands are executed as they are compiled into the display list.
15644
15645 Certain commands are not compiled into the display list but are executed
15646 immediately, regardless of the display-list mode. These commands are
15647 `glAreTexturesResident', `glColorPointer', `glDeleteLists',
15648 `glDeleteTextures', `glDisableClientState', `glEdgeFlagPointer',
15649 `glEnableClientState', `glFeedbackBuffer', `glFinish', `glFlush',
15650 `glGenLists', `glGenTextures', `glIndexPointer', `glInterleavedArrays',
15651 `glIsEnabled', `glIsList', `glIsTexture', `glNormalPointer',
15652 `glPopClientAttrib', `glPixelStore', `glPushClientAttrib',
15653 `glReadPixels', `glRenderMode', `glSelectBuffer', `glTexCoordPointer',
15654 `glVertexPointer', and all of the `glGet' commands.
15655
15656 Similarly, `glTexImage1D', `glTexImage2D', and `glTexImage3D' are
15657 executed immediately and not compiled into the display list when their
15658 first argument is `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_1D', or
15659 `GL_PROXY_TEXTURE_3D', respectively.
15660
15661 When the `ARB_imaging' extension is supported, `glHistogram' executes
15662 immediately when its argument is `GL_PROXY_HISTOGRAM'. Similarly,
15663 `glColorTable' executes immediately when its first argument is
15664 `GL_PROXY_COLOR_TABLE', `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
15665 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
15666
15667 For OpenGL versions 1.3 and greater, or when the `ARB_multitexture'
15668 extension is supported, `glClientActiveTexture' is not compiled into
15669 display lists, but executed immediately.
15670
15671 When `glEndList' is encountered, the display-list definition is
15672 completed by associating the list with the unique name LIST (specified
15673 in the `glNewList' command). If a display list with name LIST already
15674 exists, it is replaced only when `glEndList' is called.
15675
15676 `GL_INVALID_VALUE' is generated if LIST is 0.
15677
15678 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15679
15680 `GL_INVALID_OPERATION' is generated if `glEndList' is called without a
15681 preceding `glNewList', or if `glNewList' is called while a display list
15682 is being defined.
15683
15684 `GL_INVALID_OPERATION' is generated if `glNewList' or `glEndList' is
15685 executed between the execution of `glBegin' and the corresponding
15686 execution of `glEnd'.
15687
15688 `GL_OUT_OF_MEMORY' is generated if there is insufficient memory to
15689 compile the display list. If the GL version is 1.1 or greater, no change
15690 is made to the previous contents of the display list, if any, and no
15691 other change is made to the GL state. (It is as if no attempt had been
15692 made to create the new display list.)")
15693
15694 (define-gl-procedures
15695 ((glNormalPointer
15696 (type GLenum)
15697 (stride GLsizei)
15698 (pointer const-GLvoid-*)
15699 ->
15700 void))
15701 "Define an array of normals.
15702
15703 TYPE
15704 Specifies the data type of each coordinate in the array. Symbolic
15705 constants `GL_BYTE', `GL_SHORT', `GL_INT', `GL_FLOAT', and
15706 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
15707
15708 STRIDE
15709 Specifies the byte offset between consecutive normals. If STRIDE is
15710 0, the normals are understood to be tightly packed in the array.
15711 The initial value is 0.
15712
15713 POINTER
15714 Specifies a pointer to the first coordinate of the first normal in
15715 the array. The initial value is 0.
15716
15717 `glNormalPointer' specifies the location and data format of an array of
15718 normals to use when rendering. TYPE specifies the data type of each
15719 normal coordinate, and STRIDE specifies the byte stride from one normal
15720 to the next, allowing vertices and attributes to be packed into a single
15721 array or stored in separate arrays. (Single-array storage may be more
15722 efficient on some implementations; see `glInterleavedArrays'.)
15723
15724 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
15725 target (see `glBindBuffer') while a normal array is specified, POINTER
15726 is treated as a byte offset into the buffer object's data store. Also,
15727 the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as normal
15728 vertex array client-side state (`GL_NORMAL_ARRAY_BUFFER_BINDING').
15729
15730 When a normal array is specified, TYPE, STRIDE, and POINTER are saved as
15731 client-side state, in addition to the current vertex array buffer object
15732 binding.
15733
15734 To enable and disable the normal array, call `glEnableClientState' and
15735 `glDisableClientState' with the argument `GL_NORMAL_ARRAY'. If enabled,
15736 the normal array is used when `glDrawArrays', `glMultiDrawArrays',
15737 `glDrawElements', `glMultiDrawElements', `glDrawRangeElements', or
15738 `glArrayElement' is called.
15739
15740 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
15741
15742 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
15743
15744 (define-gl-procedures
15745 ((glNormal3f
15746 (nx GLfloat)
15747 (ny GLfloat)
15748 (nz GLfloat)
15749 ->
15750 void)
15751 (glNormal3i
15752 (nx GLint)
15753 (ny GLint)
15754 (nz GLint)
15755 ->
15756 void))
15757 "Set the current normal vector.
15758
15759 NX
15760 NY
15761
15762 NZ
15763
15764 Specify the X , Y , and Z coordinates of the new current normal.
15765 The initial value of the current normal is the unit vector, (0, 0,
15766 1).
15767
15768
15769
15770 The current normal is set to the given coordinates whenever `glNormal'
15771 is issued. Byte, short, or integer arguments are converted to
15772 floating-point format with a linear mapping that maps the most positive
15773 representable integer value to 1.0 and the most negative representable
15774 integer value to -1.0 .
15775
15776 Normals specified with `glNormal' need not have unit length. If
15777 `GL_NORMALIZE' is enabled, then normals of any length specified with
15778 `glNormal' are normalized after transformation. If `GL_RESCALE_NORMAL'
15779 is enabled, normals are scaled by a scaling factor derived from the
15780 modelview matrix. `GL_RESCALE_NORMAL' requires that the originally
15781 specified normals were of unit length, and that the modelview matrix
15782 contain only uniform scales for proper results. To enable and disable
15783 normalization, call `glEnable' and `glDisable' with either
15784 `GL_NORMALIZE' or `GL_RESCALE_NORMAL'. Normalization is initially
15785 disabled.")
15786
15787 (define-gl-procedures
15788 ((glOrtho
15789 (left GLdouble)
15790 (right GLdouble)
15791 (bottom GLdouble)
15792 (top GLdouble)
15793 (nearVal GLdouble)
15794 (farVal GLdouble)
15795 ->
15796 void))
15797 "Multiply the current matrix with an orthographic matrix.
15798
15799 LEFT
15800 RIGHT
15801
15802 Specify the coordinates for the left and right vertical clipping
15803 planes.
15804
15805 BOTTOM
15806 TOP
15807
15808 Specify the coordinates for the bottom and top horizontal clipping
15809 planes.
15810
15811 NEARVAL
15812 FARVAL
15813
15814 Specify the distances to the nearer and farther depth clipping
15815 planes. These values are negative if the plane is to be behind the
15816 viewer.
15817
15818 `glOrtho' describes a transformation that produces a parallel
15819 projection. The current matrix (see `glMatrixMode') is multiplied by
15820 this matrix and the result replaces the current matrix, as if
15821 `glMultMatrix' were called with the following matrix as its argument:
15822
15823 ((2/RIGHT-LEFT,, 0 0 T_X,), (0 2/TOP-BOTTOM,, 0 T_Y,), (0 0
15824 -2/FARVAL-NEARVAL,, T_Z,), (0 0 0 1),)
15825
15826 where T_X=-RIGHT+LEFT,/RIGHT-LEFT,, T_Y=-TOP+BOTTOM,/TOP-BOTTOM,,
15827 T_Z=-FARVAL+NEARVAL,/FARVAL-NEARVAL,,
15828
15829 Typically, the matrix mode is `GL_PROJECTION', and (LEFT,BOTTOM-NEARVAL)
15830 and (RIGHT,TOP-NEARVAL) specify the points on the near clipping plane
15831 that are mapped to the lower left and upper right corners of the window,
15832 respectively, assuming that the eye is located at (0, 0, 0). -FARVAL
15833 specifies the location of the far clipping plane. Both NEARVAL and
15834 FARVAL can be either positive or negative.
15835
15836 Use `glPushMatrix' and `glPopMatrix' to save and restore the current
15837 matrix stack.
15838
15839 `GL_INVALID_VALUE' is generated if LEFT = RIGHT, or BOTTOM = TOP, or
15840 NEAR = FAR.
15841
15842 `GL_INVALID_OPERATION' is generated if `glOrtho' is executed between the
15843 execution of `glBegin' and the corresponding execution of `glEnd'.")
15844
15845 (define-gl-procedures
15846 ((glPassThrough (token GLfloat) -> void))
15847 "Place a marker in the feedback buffer.
15848
15849 TOKEN
15850 Specifies a marker value to be placed in the feedback buffer
15851 following a `GL_PASS_THROUGH_TOKEN'.
15852
15853
15854
15855 Feedback is a GL render mode. The mode is selected by calling
15856 `glRenderMode' with `GL_FEEDBACK'. When the GL is in feedback mode, no
15857 pixels are produced by rasterization. Instead, information about
15858 primitives that would have been rasterized is fed back to the
15859 application using the GL. See the `glFeedbackBuffer' reference page for
15860 a description of the feedback buffer and the values in it.
15861
15862 `glPassThrough' inserts a user-defined marker in the feedback buffer
15863 when it is executed in feedback mode. TOKEN is returned as if it were a
15864 primitive; it is indicated with its own unique identifying value:
15865 `GL_PASS_THROUGH_TOKEN'. The order of `glPassThrough' commands with
15866 respect to the specification of graphics primitives is maintained.
15867
15868 `GL_INVALID_OPERATION' is generated if `glPassThrough' is executed
15869 between the execution of `glBegin' and the corresponding execution of
15870 `glEnd'.")
15871
15872 (define-gl-procedures
15873 ((glPixelMapfv
15874 (map GLenum)
15875 (mapsize GLsizei)
15876 (values const-GLfloat-*)
15877 ->
15878 void)
15879 (glPixelMapuiv
15880 (map GLenum)
15881 (mapsize GLsizei)
15882 (values const-GLuint-*)
15883 ->
15884 void))
15885 "Set up pixel transfer maps.
15886
15887 MAP
15888 Specifies a symbolic map name. Must be one of the following:
15889 `GL_PIXEL_MAP_I_TO_I', `GL_PIXEL_MAP_S_TO_S',
15890 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
15891 `GL_PIXEL_MAP_I_TO_B', `GL_PIXEL_MAP_I_TO_A',
15892 `GL_PIXEL_MAP_R_TO_R', `GL_PIXEL_MAP_G_TO_G',
15893 `GL_PIXEL_MAP_B_TO_B', or `GL_PIXEL_MAP_A_TO_A'.
15894
15895 MAPSIZE
15896 Specifies the size of the map being defined.
15897
15898 VALUES
15899 Specifies an array of MAPSIZE values.
15900
15901 `glPixelMap' sets up translation tables, or MAPS, used by
15902 `glCopyPixels', `glCopyTexImage1D', `glCopyTexImage2D',
15903 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D',
15904 `glDrawPixels', `glReadPixels', `glTexImage1D', `glTexImage2D',
15905 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D', and
15906 `glTexSubImage3D'. Additionally, if the `ARB_imaging' subset is
15907 supported, the routines `glColorTable', `glColorSubTable',
15908 `glConvolutionFilter1D', `glConvolutionFilter2D', `glHistogram',
15909 `glMinmax', and `glSeparableFilter2D'. Use of these maps is described
15910 completely in the `glPixelTransfer' reference page, and partly in the
15911 reference pages for the pixel and texture image commands. Only the
15912 specification of the maps is described in this reference page.
15913
15914 MAP is a symbolic map name, indicating one of ten maps to set. MAPSIZE
15915 specifies the number of entries in the map, and VALUES is a pointer to
15916 an array of MAPSIZE map values.
15917
15918 If a non-zero named buffer object is bound to the
15919 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a pixel
15920 transfer map is specified, VALUES is treated as a byte offset into the
15921 buffer object's data store.
15922
15923 The ten maps are as follows:
15924
15925 `GL_PIXEL_MAP_I_TO_I'
15926 Maps color indices to color indices.
15927
15928 `GL_PIXEL_MAP_S_TO_S'
15929 Maps stencil indices to stencil indices.
15930
15931 `GL_PIXEL_MAP_I_TO_R'
15932 Maps color indices to red components.
15933
15934 `GL_PIXEL_MAP_I_TO_G'
15935 Maps color indices to green components.
15936
15937 `GL_PIXEL_MAP_I_TO_B'
15938 Maps color indices to blue components.
15939
15940 `GL_PIXEL_MAP_I_TO_A'
15941 Maps color indices to alpha components.
15942
15943 `GL_PIXEL_MAP_R_TO_R'
15944 Maps red components to red components.
15945
15946 `GL_PIXEL_MAP_G_TO_G'
15947 Maps green components to green components.
15948
15949 `GL_PIXEL_MAP_B_TO_B'
15950 Maps blue components to blue components.
15951
15952 `GL_PIXEL_MAP_A_TO_A'
15953 Maps alpha components to alpha components.
15954
15955 The entries in a map can be specified as single-precision floating-point
15956 numbers, unsigned short integers, or unsigned int integers. Maps that
15957 store color component values (all but `GL_PIXEL_MAP_I_TO_I' and
15958 `GL_PIXEL_MAP_S_TO_S') retain their values in floating-point format,
15959 with unspecified mantissa and exponent sizes. Floating-point values
15960 specified by `glPixelMapfv' are converted directly to the internal
15961 floating-point format of these maps, then clamped to the range [0,1].
15962 Unsigned integer values specified by `glPixelMapusv' and `glPixelMapuiv'
15963 are converted linearly such that the largest representable integer maps
15964 to 1.0, and 0 maps to 0.0.
15965
15966 Maps that store indices, `GL_PIXEL_MAP_I_TO_I' and
15967 `GL_PIXEL_MAP_S_TO_S', retain their values in fixed-point format, with
15968 an unspecified number of bits to the right of the binary point.
15969 Floating-point values specified by `glPixelMapfv' are converted directly
15970 to the internal fixed-point format of these maps. Unsigned integer
15971 values specified by `glPixelMapusv' and `glPixelMapuiv' specify integer
15972 values, with all 0's to the right of the binary point.
15973
15974 The following table shows the initial sizes and values for each of the
15975 maps. Maps that are indexed by either color or stencil indices must have
15976 MAPSIZE = 2^N for some N or the results are undefined. The maximum
15977 allowable size for each map depends on the implementation and can be
15978 determined by calling `glGet' with argument `GL_MAX_PIXEL_MAP_TABLE'.
15979 The single maximum applies to all maps; it is at least 32.
15980
15981 *MAP*
15982 *Lookup Index*, *Lookup Value*, *Initial Size*, *Initial Value*
15983
15984 `GL_PIXEL_MAP_I_TO_I'
15985 color index , color index , 1 , 0
15986
15987 `GL_PIXEL_MAP_S_TO_S'
15988 stencil index , stencil index , 1 , 0
15989
15990 `GL_PIXEL_MAP_I_TO_R'
15991 color index , R , 1 , 0
15992
15993 `GL_PIXEL_MAP_I_TO_G'
15994 color index , G , 1 , 0
15995
15996 `GL_PIXEL_MAP_I_TO_B'
15997 color index , B , 1 , 0
15998
15999 `GL_PIXEL_MAP_I_TO_A'
16000 color index , A , 1 , 0
16001
16002 `GL_PIXEL_MAP_R_TO_R'
16003 R , R , 1 , 0
16004
16005 `GL_PIXEL_MAP_G_TO_G'
16006 G , G , 1 , 0
16007
16008 `GL_PIXEL_MAP_B_TO_B'
16009 B , B , 1 , 0
16010
16011 `GL_PIXEL_MAP_A_TO_A'
16012 A , A , 1 , 0
16013
16014 `GL_INVALID_ENUM' is generated if MAP is not an accepted value.
16015
16016 `GL_INVALID_VALUE' is generated if MAPSIZE is less than one or larger
16017 than `GL_MAX_PIXEL_MAP_TABLE'.
16018
16019 `GL_INVALID_VALUE' is generated if MAP is `GL_PIXEL_MAP_I_TO_I',
16020 `GL_PIXEL_MAP_S_TO_S', `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
16021 `GL_PIXEL_MAP_I_TO_B', or `GL_PIXEL_MAP_I_TO_A', and MAPSIZE is not a
16022 power of two.
16023
16024 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16025 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
16026 data store is currently mapped.
16027
16028 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16029 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
16030 unpacked from the buffer object such that the memory reads required
16031 would exceed the data store size.
16032
16033 `GL_INVALID_OPERATION' is generated by `glPixelMapfv' if a non-zero
16034 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16035 VALUES is not evenly divisible into the number of bytes needed to store
16036 in memory a GLfloat datum.
16037
16038 `GL_INVALID_OPERATION' is generated by `glPixelMapuiv' if a non-zero
16039 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16040 VALUES is not evenly divisible into the number of bytes needed to store
16041 in memory a GLuint datum.
16042
16043 `GL_INVALID_OPERATION' is generated by `glPixelMapusv' if a non-zero
16044 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16045 VALUES is not evenly divisible into the number of bytes needed to store
16046 in memory a GLushort datum.
16047
16048 `GL_INVALID_OPERATION' is generated if `glPixelMap' is executed between
16049 the execution of `glBegin' and the corresponding execution of `glEnd'.")
16050
16051 (define-gl-procedures
16052 ((glPixelStoref
16053 (pname GLenum)
16054 (param GLfloat)
16055 ->
16056 void)
16057 (glPixelStorei
16058 (pname GLenum)
16059 (param GLint)
16060 ->
16061 void))
16062 "Set pixel storage modes.
16063
16064 PNAME
16065 Specifies the symbolic name of the parameter to be set. Six values
16066 affect the packing of pixel data into memory: `GL_PACK_SWAP_BYTES',
16067 `GL_PACK_LSB_FIRST', `GL_PACK_ROW_LENGTH', `GL_PACK_IMAGE_HEIGHT',
16068 `GL_PACK_SKIP_PIXELS', `GL_PACK_SKIP_ROWS', `GL_PACK_SKIP_IMAGES',
16069 and `GL_PACK_ALIGNMENT'. Six more affect the unpacking of pixel
16070 data FROM memory: `GL_UNPACK_SWAP_BYTES', `GL_UNPACK_LSB_FIRST',
16071 `GL_UNPACK_ROW_LENGTH', `GL_UNPACK_IMAGE_HEIGHT',
16072 `GL_UNPACK_SKIP_PIXELS', `GL_UNPACK_SKIP_ROWS',
16073 `GL_UNPACK_SKIP_IMAGES', and `GL_UNPACK_ALIGNMENT'.
16074
16075 PARAM
16076 Specifies the value that PNAME is set to.
16077
16078 `glPixelStore' sets pixel storage modes that affect the operation of
16079 subsequent `glDrawPixels' and `glReadPixels' as well as the unpacking of
16080 polygon stipple patterns (see `glPolygonStipple'), bitmaps (see
16081 `glBitmap'), texture patterns (see `glTexImage1D', `glTexImage2D',
16082 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D',
16083 `glTexSubImage3D'). Additionally, if the `ARB_imaging' extension is
16084 supported, pixel storage modes affect convolution filters (see
16085 `glConvolutionFilter1D', `glConvolutionFilter2D', and
16086 `glSeparableFilter2D', color table (see `glColorTable', and
16087 `glColorSubTable', and unpacking histogram (See `glHistogram'), and
16088 minmax (See `glMinmax') data.
16089
16090 PNAME is a symbolic constant indicating the parameter to be set, and
16091 PARAM is the new value. Six of the twelve storage parameters affect how
16092 pixel data is returned to client memory. They are as follows:
16093
16094 `GL_PACK_SWAP_BYTES'
16095 If true, byte ordering for multibyte color components, depth
16096 components, color indices, or stencil indices is reversed. That is,
16097 if a four-byte component consists of bytes B_0 , B_1 , B_2 , B_3 ,
16098 it is stored in memory as B_3 , B_2 , B_1 , B_0 if
16099 `GL_PACK_SWAP_BYTES' is true. `GL_PACK_SWAP_BYTES' has no effect on
16100 the memory order of components within a pixel, only on the order of
16101 bytes within components or indices. For example, the three
16102 components of a `GL_RGB' format pixel are always stored with red
16103 first, green second, and blue third, regardless of the value of
16104 `GL_PACK_SWAP_BYTES'.
16105
16106 `GL_PACK_LSB_FIRST'
16107 If true, bits are ordered within a byte from least significant to
16108 most significant; otherwise, the first bit in each byte is the most
16109 significant one. This parameter is significant for bitmap data
16110 only.
16111
16112 `GL_PACK_ROW_LENGTH'
16113 If greater than 0, `GL_PACK_ROW_LENGTH' defines the number of
16114 pixels in a row. If the first pixel of a row is placed at location
16115 P in memory, then the location of the first pixel of the next row
16116 is obtained by skipping
16117
16118 K={(N\u2062L), (A/S,\u2062⌈S\u2062N\u2062L,/A,⌉)\u2062(S>=A), (S<A),
16119
16120 components or indices, where N is the number of components or
16121 indices in a pixel, L is the number of pixels in a row
16122 (`GL_PACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16123 to the pixel routine otherwise), A is the value of
16124 `GL_PACK_ALIGNMENT', and S is the size, in bytes, of a single
16125 component (if A<S , then it is as if A=S ). In the case of 1-bit
16126 values, the location of the next row is obtained by skipping
16127
16128 K=8\u2062A\u2062⌈N\u2062L,/8\u2062A,,⌉
16129
16130 components or indices.
16131
16132 The word COMPONENT in this description refers to the nonindex
16133 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16134 for example, has three components per pixel: first red, then green,
16135 and finally blue.
16136
16137 `GL_PACK_IMAGE_HEIGHT'
16138 If greater than 0, `GL_PACK_IMAGE_HEIGHT' defines the number of
16139 pixels in an image three-dimensional texture volume, where
16140 ``image'' is defined by all pixels sharing the same third dimension
16141 index. If the first pixel of a row is placed at location P in
16142 memory, then the location of the first pixel of the next row is
16143 obtained by skipping
16144
16145 K={(N\u2062L\u2062H), (A/S,\u2062⌈S\u2062N\u2062L\u2062H,/A,⌉)\u2062(S>=A), (S<A),
16146
16147 components or indices, where N is the number of components or
16148 indices in a pixel, L is the number of pixels in a row
16149 (`GL_PACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16150 to `glTexImage3D' otherwise), H is the number of rows in a pixel
16151 image (`GL_PACK_IMAGE_HEIGHT' if it is greater than 0, the HEIGHT
16152 argument to the `glTexImage3D' routine otherwise), A is the value
16153 of `GL_PACK_ALIGNMENT', and S is the size, in bytes, of a single
16154 component (if A<S , then it is as if A=S ).
16155
16156 The word COMPONENT in this description refers to the nonindex
16157 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16158 for example, has three components per pixel: first red, then green,
16159 and finally blue.
16160
16161 `GL_PACK_SKIP_PIXELS', `GL_PACK_SKIP_ROWS', and `GL_PACK_SKIP_IMAGES'
16162 These values are provided as a convenience to the programmer; they
16163 provide no functionality that cannot be duplicated simply by
16164 incrementing the pointer passed to `glReadPixels'. Setting
16165 `GL_PACK_SKIP_PIXELS' to I is equivalent to incrementing the
16166 pointer by I\u2062N components or indices, where N is the number of
16167 components or indices in each pixel. Setting `GL_PACK_SKIP_ROWS' to
16168 J is equivalent to incrementing the pointer by J\u2062M components or
16169 indices, where M is the number of components or indices per row, as
16170 just computed in the `GL_PACK_ROW_LENGTH' section. Setting
16171 `GL_PACK_SKIP_IMAGES' to K is equivalent to incrementing the
16172 pointer by K\u2062P , where P is the number of components or indices per
16173 image, as computed in the `GL_PACK_IMAGE_HEIGHT' section.
16174
16175 `GL_PACK_ALIGNMENT'
16176 Specifies the alignment requirements for the start of each pixel
16177 row in memory. The allowable values are 1 (byte-alignment), 2 (rows
16178 aligned to even-numbered bytes), 4 (word-alignment), and 8 (rows
16179 start on double-word boundaries).
16180
16181 The other six of the twelve storage parameters affect how pixel data is
16182 read from client memory. These values are significant for
16183 `glDrawPixels', `glTexImage1D', `glTexImage2D', `glTexImage3D',
16184 `glTexSubImage1D', `glTexSubImage2D', `glTexSubImage3D', `glBitmap', and
16185 `glPolygonStipple'.
16186
16187 Additionally, if the `ARB_imaging' extension is supported,
16188 `glColorTable', `glColorSubTable', `glConvolutionFilter1D',
16189 `glConvolutionFilter2D', and `glSeparableFilter2D'. They are as follows:
16190
16191 `GL_UNPACK_SWAP_BYTES'
16192 If true, byte ordering for multibyte color components, depth
16193 components, color indices, or stencil indices is reversed. That is,
16194 if a four-byte component consists of bytes B_0 , B_1 , B_2 , B_3 ,
16195 it is taken from memory as B_3 , B_2 , B_1 , B_0 if
16196 `GL_UNPACK_SWAP_BYTES' is true. `GL_UNPACK_SWAP_BYTES' has no
16197 effect on the memory order of components within a pixel, only on
16198 the order of bytes within components or indices. For example, the
16199 three components of a `GL_RGB' format pixel are always stored with
16200 red first, green second, and blue third, regardless of the value of
16201 `GL_UNPACK_SWAP_BYTES'.
16202
16203 `GL_UNPACK_LSB_FIRST'
16204 If true, bits are ordered within a byte from least significant to
16205 most significant; otherwise, the first bit in each byte is the most
16206 significant one. This is relevant only for bitmap data.
16207
16208 `GL_UNPACK_ROW_LENGTH'
16209 If greater than 0, `GL_UNPACK_ROW_LENGTH' defines the number of
16210 pixels in a row. If the first pixel of a row is placed at location
16211 P in memory, then the location of the first pixel of the next row
16212 is obtained by skipping
16213
16214 K={(N\u2062L), (A/S,\u2062⌈S\u2062N\u2062L,/A,⌉)\u2062(S>=A), (S<A),
16215
16216 components or indices, where N is the number of components or
16217 indices in a pixel, L is the number of pixels in a row
16218 (`GL_UNPACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16219 to the pixel routine otherwise), A is the value of
16220 `GL_UNPACK_ALIGNMENT', and S is the size, in bytes, of a single
16221 component (if A<S , then it is as if A=S ). In the case of 1-bit
16222 values, the location of the next row is obtained by skipping
16223
16224 K=8\u2062A\u2062⌈N\u2062L,/8\u2062A,,⌉
16225
16226 components or indices.
16227
16228 The word COMPONENT in this description refers to the nonindex
16229 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16230 for example, has three components per pixel: first red, then green,
16231 and finally blue.
16232
16233 `GL_UNPACK_IMAGE_HEIGHT'
16234 If greater than 0, `GL_UNPACK_IMAGE_HEIGHT' defines the number of
16235 pixels in an image of a three-dimensional texture volume. Where
16236 ``image'' is defined by all pixel sharing the same third dimension
16237 index. If the first pixel of a row is placed at location P in
16238 memory, then the location of the first pixel of the next row is
16239 obtained by skipping
16240
16241 K={(N\u2062L\u2062H), (A/S,\u2062⌈S\u2062N\u2062L\u2062H,/A,⌉)\u2062(S>=A), (S<A),
16242
16243 components or indices, where N is the number of components or
16244 indices in a pixel, L is the number of pixels in a row
16245 (`GL_UNPACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16246 to `glTexImage3D' otherwise), H is the number of rows in an image
16247 (`GL_UNPACK_IMAGE_HEIGHT' if it is greater than 0, the HEIGHT
16248 argument to `glTexImage3D' otherwise), A is the value of
16249 `GL_UNPACK_ALIGNMENT', and S is the size, in bytes, of a single
16250 component (if A<S , then it is as if A=S ).
16251
16252 The word COMPONENT in this description refers to the nonindex
16253 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16254 for example, has three components per pixel: first red, then green,
16255 and finally blue.
16256
16257 `GL_UNPACK_SKIP_PIXELS' and `GL_UNPACK_SKIP_ROWS'
16258 These values are provided as a convenience to the programmer; they
16259 provide no functionality that cannot be duplicated by incrementing
16260 the pointer passed to `glDrawPixels', `glTexImage1D',
16261 `glTexImage2D', `glTexSubImage1D', `glTexSubImage2D', `glBitmap',
16262 or `glPolygonStipple'. Setting `GL_UNPACK_SKIP_PIXELS' to I is
16263 equivalent to incrementing the pointer by I\u2062N components or
16264 indices, where N is the number of components or indices in each
16265 pixel. Setting `GL_UNPACK_SKIP_ROWS' to J is equivalent to
16266 incrementing the pointer by J\u2062K components or indices, where K is
16267 the number of components or indices per row, as just computed in
16268 the `GL_UNPACK_ROW_LENGTH' section.
16269
16270 `GL_UNPACK_ALIGNMENT'
16271 Specifies the alignment requirements for the start of each pixel
16272 row in memory. The allowable values are 1 (byte-alignment), 2 (rows
16273 aligned to even-numbered bytes), 4 (word-alignment), and 8 (rows
16274 start on double-word boundaries).
16275
16276 The following table gives the type, initial value, and range of valid
16277 values for each storage parameter that can be set with `glPixelStore'.
16278
16279
16280
16281 *PNAME*
16282 *Type*, *Initial Value*, *Valid Range*
16283
16284 `GL_PACK_SWAP_BYTES'
16285 boolean , false , true or false
16286
16287 `GL_PACK_LSB_FIRST'
16288 boolean , false , true or false
16289
16290 `GL_PACK_ROW_LENGTH'
16291 integer , 0 , [0,∞)
16292
16293 `GL_PACK_IMAGE_HEIGHT'
16294 integer , 0 , [0,∞)
16295
16296 `GL_PACK_SKIP_ROWS'
16297 integer , 0 , [0,∞)
16298
16299 `GL_PACK_SKIP_PIXELS'
16300 integer , 0 , [0,∞)
16301
16302 `GL_PACK_SKIP_IMAGES'
16303 integer , 0 , [0,∞)
16304
16305 `GL_PACK_ALIGNMENT'
16306 integer , 4 , 1, 2, 4, or 8
16307
16308 `GL_UNPACK_SWAP_BYTES'
16309 boolean , false , true or false
16310
16311 `GL_UNPACK_LSB_FIRST'
16312 boolean , false , true or false
16313
16314 `GL_UNPACK_ROW_LENGTH'
16315 integer , 0 , [0,∞)
16316
16317 `GL_UNPACK_IMAGE_HEIGHT'
16318 integer , 0 , [0,∞)
16319
16320 `GL_UNPACK_SKIP_ROWS'
16321 integer , 0 , [0,∞)
16322
16323 `GL_UNPACK_SKIP_PIXELS'
16324 integer , 0 , [0,∞)
16325
16326 `GL_UNPACK_SKIP_IMAGES'
16327 integer , 0 , [0,∞)
16328
16329 `GL_UNPACK_ALIGNMENT'
16330 integer , 4 , 1, 2, 4, or 8
16331
16332 `glPixelStoref' can be used to set any pixel store parameter. If the
16333 parameter type is boolean, then if PARAM is 0, the parameter is false;
16334 otherwise it is set to true. If PNAME is a integer type parameter, PARAM
16335 is rounded to the nearest integer.
16336
16337 Likewise, `glPixelStorei' can also be used to set any of the pixel store
16338 parameters. Boolean parameters are set to false if PARAM is 0 and true
16339 otherwise.
16340
16341 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
16342
16343 `GL_INVALID_VALUE' is generated if a negative row length, pixel skip, or
16344 row skip value is specified, or if alignment is specified as other than
16345 1, 2, 4, or 8.
16346
16347 `GL_INVALID_OPERATION' is generated if `glPixelStore' is executed
16348 between the execution of `glBegin' and the corresponding execution of
16349 `glEnd'.")
16350
16351 (define-gl-procedures
16352 ((glPixelTransferf
16353 (pname GLenum)
16354 (param GLfloat)
16355 ->
16356 void)
16357 (glPixelTransferi
16358 (pname GLenum)
16359 (param GLint)
16360 ->
16361 void))
16362 "Set pixel transfer modes.
16363
16364 PNAME
16365 Specifies the symbolic name of the pixel transfer parameter to be
16366 set. Must be one of the following: `GL_MAP_COLOR',
16367 `GL_MAP_STENCIL', `GL_INDEX_SHIFT', `GL_INDEX_OFFSET',
16368 `GL_RED_SCALE', `GL_RED_BIAS', `GL_GREEN_SCALE', `GL_GREEN_BIAS',
16369 `GL_BLUE_SCALE', `GL_BLUE_BIAS', `GL_ALPHA_SCALE', `GL_ALPHA_BIAS',
16370 `GL_DEPTH_SCALE', or `GL_DEPTH_BIAS'.
16371
16372 Additionally, if the `ARB_imaging' extension is supported, the
16373 following symbolic names are accepted:
16374 `GL_POST_COLOR_MATRIX_RED_SCALE',
16375 `GL_POST_COLOR_MATRIX_GREEN_SCALE',
16376 `GL_POST_COLOR_MATRIX_BLUE_SCALE',
16377 `GL_POST_COLOR_MATRIX_ALPHA_SCALE',
16378 `GL_POST_COLOR_MATRIX_RED_BIAS', `GL_POST_COLOR_MATRIX_GREEN_BIAS',
16379 `GL_POST_COLOR_MATRIX_BLUE_BIAS',
16380 `GL_POST_COLOR_MATRIX_ALPHA_BIAS', `GL_POST_CONVOLUTION_RED_SCALE',
16381 `GL_POST_CONVOLUTION_GREEN_SCALE',
16382 `GL_POST_CONVOLUTION_BLUE_SCALE',
16383 `GL_POST_CONVOLUTION_ALPHA_SCALE', `GL_POST_CONVOLUTION_RED_BIAS',
16384 `GL_POST_CONVOLUTION_GREEN_BIAS', `GL_POST_CONVOLUTION_BLUE_BIAS',
16385 and `GL_POST_CONVOLUTION_ALPHA_BIAS'.
16386
16387 PARAM
16388 Specifies the value that PNAME is set to.
16389
16390 `glPixelTransfer' sets pixel transfer modes that affect the operation of
16391 subsequent `glCopyPixels', `glCopyTexImage1D', `glCopyTexImage2D',
16392 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D',
16393 `glDrawPixels', `glReadPixels', `glTexImage1D', `glTexImage2D',
16394 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D', and
16395 `glTexSubImage3D' commands. Additionally, if the `ARB_imaging' subset is
16396 supported, the routines `glColorTable', `glColorSubTable',
16397 `glConvolutionFilter1D', `glConvolutionFilter2D', `glHistogram',
16398 `glMinmax', and `glSeparableFilter2D' are also affected. The algorithms
16399 that are specified by pixel transfer modes operate on pixels after they
16400 are read from the frame buffer (`glCopyPixels'`glCopyTexImage1D',
16401 `glCopyTexImage2D', `glCopyTexSubImage1D', `glCopyTexSubImage2D',
16402 `glCopyTexSubImage3D', and `glReadPixels'), or unpacked from client
16403 memory (`glDrawPixels', `glTexImage1D', `glTexImage2D', `glTexImage3D',
16404 `glTexSubImage1D', `glTexSubImage2D', and `glTexSubImage3D'). Pixel
16405 transfer operations happen in the same order, and in the same manner,
16406 regardless of the command that resulted in the pixel operation. Pixel
16407 storage modes (see `glPixelStore') control the unpacking of pixels being
16408 read from client memory and the packing of pixels being written back
16409 into client memory.
16410
16411 Pixel transfer operations handle four fundamental pixel types: COLOR,
16412 COLOR INDEX, DEPTH, and STENCIL. COLOR pixels consist of four
16413 floating-point values with unspecified mantissa and exponent sizes,
16414 scaled such that 0 represents zero intensity and 1 represents full
16415 intensity. COLOR INDICES comprise a single fixed-point value, with
16416 unspecified precision to the right of the binary point. DEPTH pixels
16417 comprise a single floating-point value, with unspecified mantissa and
16418 exponent sizes, scaled such that 0.0 represents the minimum depth buffer
16419 value, and 1.0 represents the maximum depth buffer value. Finally,
16420 STENCIL pixels comprise a single fixed-point value, with unspecified
16421 precision to the right of the binary point.
16422
16423 The pixel transfer operations performed on the four basic pixel types
16424 are as follows:
16425
16426 COLOR
16427 Each of the four color components is multiplied by a scale factor,
16428 then added to a bias factor. That is, the red component is
16429 multiplied by `GL_RED_SCALE', then added to `GL_RED_BIAS'; the
16430 green component is multiplied by `GL_GREEN_SCALE', then added to
16431 `GL_GREEN_BIAS'; the blue component is multiplied by
16432 `GL_BLUE_SCALE', then added to `GL_BLUE_BIAS'; and the alpha
16433 component is multiplied by `GL_ALPHA_SCALE', then added to
16434 `GL_ALPHA_BIAS'. After all four color components are scaled and
16435 biased, each is clamped to the range [0,1] . All color, scale, and
16436 bias values are specified with `glPixelTransfer'.
16437
16438 If `GL_MAP_COLOR' is true, each color component is scaled by the
16439 size of the corresponding color-to-color map, then replaced by the
16440 contents of that map indexed by the scaled component. That is, the
16441 red component is scaled by `GL_PIXEL_MAP_R_TO_R_SIZE', then
16442 replaced by the contents of `GL_PIXEL_MAP_R_TO_R' indexed by
16443 itself. The green component is scaled by
16444 `GL_PIXEL_MAP_G_TO_G_SIZE', then replaced by the contents of
16445 `GL_PIXEL_MAP_G_TO_G' indexed by itself. The blue component is
16446 scaled by `GL_PIXEL_MAP_B_TO_B_SIZE', then replaced by the contents
16447 of `GL_PIXEL_MAP_B_TO_B' indexed by itself. And the alpha component
16448 is scaled by `GL_PIXEL_MAP_A_TO_A_SIZE', then replaced by the
16449 contents of `GL_PIXEL_MAP_A_TO_A' indexed by itself. All components
16450 taken from the maps are then clamped to the range [0,1] .
16451 `GL_MAP_COLOR' is specified with `glPixelTransfer'. The contents of
16452 the various maps are specified with `glPixelMap'.
16453
16454 If the `ARB_imaging' extension is supported, each of the four color
16455 components may be scaled and biased after transformation by the
16456 color matrix. That is, the red component is multiplied by
16457 `GL_POST_COLOR_MATRIX_RED_SCALE', then added to
16458 `GL_POST_COLOR_MATRIX_RED_BIAS'; the green component is multiplied
16459 by `GL_POST_COLOR_MATRIX_GREEN_SCALE', then added to
16460 `GL_POST_COLOR_MATRIX_GREEN_BIAS'; the blue component is multiplied
16461 by `GL_POST_COLOR_MATRIX_BLUE_SCALE', then added to
16462 `GL_POST_COLOR_MATRIX_BLUE_BIAS'; and the alpha component is
16463 multiplied by `GL_POST_COLOR_MATRIX_ALPHA_SCALE', then added to
16464 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'. After all four color components
16465 are scaled and biased, each is clamped to the range [0,1] .
16466
16467 Similarly, if the `ARB_imaging' extension is supported, each of the
16468 four color components may be scaled and biased after processing by
16469 the enabled convolution filter. That is, the red component is
16470 multiplied by `GL_POST_CONVOLUTION_RED_SCALE', then added to
16471 `GL_POST_CONVOLUTION_RED_BIAS'; the green component is multiplied
16472 by `GL_POST_CONVOLUTION_GREEN_SCALE', then added to
16473 `GL_POST_CONVOLUTION_GREEN_BIAS'; the blue component is multiplied
16474 by `GL_POST_CONVOLUTION_BLUE_SCALE', then added to
16475 `GL_POST_CONVOLUTION_BLUE_BIAS'; and the alpha component is
16476 multiplied by `GL_POST_CONVOLUTION_ALPHA_SCALE', then added to
16477 `GL_POST_CONVOLUTION_ALPHA_BIAS'. After all four color components
16478 are scaled and biased, each is clamped to the range [0,1] .
16479
16480 COLOR INDEX
16481 Each color index is shifted left by `GL_INDEX_SHIFT' bits; any bits
16482 beyond the number of fraction bits carried by the fixed-point index
16483 are filled with zeros. If `GL_INDEX_SHIFT' is negative, the shift
16484 is to the right, again zero filled. Then `GL_INDEX_OFFSET' is added
16485 to the index. `GL_INDEX_SHIFT' and `GL_INDEX_OFFSET' are specified
16486 with `glPixelTransfer'.
16487
16488 From this point, operation diverges depending on the required
16489 format of the resulting pixels. If the resulting pixels are to be
16490 written to a color index buffer, or if they are being read back to
16491 client memory in `GL_COLOR_INDEX' format, the pixels continue to be
16492 treated as indices. If `GL_MAP_COLOR' is true, each index is masked
16493 by 2^N-1 , where N is `GL_PIXEL_MAP_I_TO_I_SIZE', then replaced by
16494 the contents of `GL_PIXEL_MAP_I_TO_I' indexed by the masked value.
16495 `GL_MAP_COLOR' is specified with `glPixelTransfer'. The contents of
16496 the index map is specified with `glPixelMap'.
16497
16498 If the resulting pixels are to be written to an RGBA color buffer,
16499 or if they are read back to client memory in a format other than
16500 `GL_COLOR_INDEX', the pixels are converted from indices to colors
16501 by referencing the four maps `GL_PIXEL_MAP_I_TO_R',
16502 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
16503 `GL_PIXEL_MAP_I_TO_A'. Before being dereferenced, the index is
16504 masked by 2^N-1 , where N is `GL_PIXEL_MAP_I_TO_R_SIZE' for the red
16505 map, `GL_PIXEL_MAP_I_TO_G_SIZE' for the green map,
16506 `GL_PIXEL_MAP_I_TO_B_SIZE' for the blue map, and
16507 `GL_PIXEL_MAP_I_TO_A_SIZE' for the alpha map. All components taken
16508 from the maps are then clamped to the range [0,1] . The contents of
16509 the four maps is specified with `glPixelMap'.
16510
16511 DEPTH
16512 Each depth value is multiplied by `GL_DEPTH_SCALE', added to
16513 `GL_DEPTH_BIAS', then clamped to the range [0,1] .
16514
16515 STENCIL
16516 Each index is shifted `GL_INDEX_SHIFT' bits just as a color index
16517 is, then added to `GL_INDEX_OFFSET'. If `GL_MAP_STENCIL' is true,
16518 each index is masked by 2^N-1 , where N is
16519 `GL_PIXEL_MAP_S_TO_S_SIZE', then replaced by the contents of
16520 `GL_PIXEL_MAP_S_TO_S' indexed by the masked value.
16521
16522 The following table gives the type, initial value, and range of valid
16523 values for each of the pixel transfer parameters that are set with
16524 `glPixelTransfer'.
16525
16526
16527
16528 *PNAME*
16529 *Type*, *Initial Value*, *Valid Range*
16530
16531 `GL_MAP_COLOR'
16532 boolean , false , true/false
16533
16534 `GL_MAP_STENCIL'
16535 boolean , false , true/false
16536
16537 `GL_INDEX_SHIFT'
16538 integer , 0 , (-∞,∞)
16539
16540 `GL_INDEX_OFFSET'
16541 integer , 0 , (-∞,∞)
16542
16543 `GL_RED_SCALE'
16544 float , 1 , (-∞,∞)
16545
16546 `GL_GREEN_SCALE'
16547 float , 1 , (-∞,∞)
16548
16549 `GL_BLUE_SCALE'
16550 float , 1 , (-∞,∞)
16551
16552 `GL_ALPHA_SCALE'
16553 float , 1 , (-∞,∞)
16554
16555 `GL_DEPTH_SCALE'
16556 float , 1 , (-∞,∞)
16557
16558 `GL_RED_BIAS'
16559 float , 0 , (-∞,∞)
16560
16561 `GL_GREEN_BIAS'
16562 float , 0 , (-∞,∞)
16563
16564 `GL_BLUE_BIAS'
16565 float , 0 , (-∞,∞)
16566
16567 `GL_ALPHA_BIAS'
16568 float , 0 , (-∞,∞)
16569
16570 `GL_DEPTH_BIAS'
16571 float , 0 , (-∞,∞)
16572
16573 `GL_POST_COLOR_MATRIX_RED_SCALE'
16574 float , 1 , (-∞,∞)
16575
16576 `GL_POST_COLOR_MATRIX_GREEN_SCALE'
16577 float , 1 , (-∞,∞)
16578
16579 `GL_POST_COLOR_MATRIX_BLUE_SCALE'
16580 float , 1 , (-∞,∞)
16581
16582 `GL_POST_COLOR_MATRIX_ALPHA_SCALE'
16583 float , 1 , (-∞,∞)
16584
16585 `GL_POST_COLOR_MATRIX_RED_BIAS'
16586 float , 0 , (-∞,∞)
16587
16588 `GL_POST_COLOR_MATRIX_GREEN_BIAS'
16589 float , 0 , (-∞,∞)
16590
16591 `GL_POST_COLOR_MATRIX_BLUE_BIAS'
16592 float , 0 , (-∞,∞)
16593
16594 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'
16595 float , 0 , (-∞,∞)
16596
16597 `GL_POST_CONVOLUTION_RED_SCALE'
16598 float , 1 , (-∞,∞)
16599
16600 `GL_POST_CONVOLUTION_GREEN_SCALE'
16601 float , 1 , (-∞,∞)
16602
16603 `GL_POST_CONVOLUTION_BLUE_SCALE'
16604 float , 1 , (-∞,∞)
16605
16606 `GL_POST_CONVOLUTION_ALPHA_SCALE'
16607 float , 1 , (-∞,∞)
16608
16609 `GL_POST_CONVOLUTION_RED_BIAS'
16610 float , 0 , (-∞,∞)
16611
16612 `GL_POST_CONVOLUTION_GREEN_BIAS'
16613 float , 0 , (-∞,∞)
16614
16615 `GL_POST_CONVOLUTION_BLUE_BIAS'
16616 float , 0 , (-∞,∞)
16617
16618 `GL_POST_CONVOLUTION_ALPHA_BIAS'
16619 float , 0 , (-∞,∞)
16620
16621 `glPixelTransferf' can be used to set any pixel transfer parameter. If
16622 the parameter type is boolean, 0 implies false and any other value
16623 implies true. If PNAME is an integer parameter, PARAM is rounded to the
16624 nearest integer.
16625
16626 Likewise, `glPixelTransferi' can be used to set any of the pixel
16627 transfer parameters. Boolean parameters are set to false if PARAM is 0
16628 and to true otherwise. PARAM is converted to floating point before being
16629 assigned to real-valued parameters.
16630
16631 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
16632
16633 `GL_INVALID_OPERATION' is generated if `glPixelTransfer' is executed
16634 between the execution of `glBegin' and the corresponding execution of
16635 `glEnd'.")
16636
16637 (define-gl-procedures
16638 ((glPixelZoom
16639 (xfactor GLfloat)
16640 (yfactor GLfloat)
16641 ->
16642 void))
16643 "Specify the pixel zoom factors.
16644
16645 XFACTOR
16646 YFACTOR
16647
16648 Specify the X and Y zoom factors for pixel write operations.
16649
16650 `glPixelZoom' specifies values for the X and Y zoom factors. During the
16651 execution of `glDrawPixels' or `glCopyPixels', if (XR , YR ) is the
16652 current raster position, and a given element is in the M th row and N th
16653 column of the pixel rectangle, then pixels whose centers are in the
16654 rectangle with corners at
16655
16656 (XR+N·XFACTOR , YR+M·YFACTOR )
16657
16658 (XR+(N+1,)·XFACTOR , YR+(M+1,)·YFACTOR )
16659
16660 are candidates for replacement. Any pixel whose center lies on the
16661 bottom or left edge of this rectangular region is also modified.
16662
16663 Pixel zoom factors are not limited to positive values. Negative zoom
16664 factors reflect the resulting image about the current raster position.
16665
16666 `GL_INVALID_OPERATION' is generated if `glPixelZoom' is executed between
16667 the execution of `glBegin' and the corresponding execution of `glEnd'.")
16668
16669 (define-gl-procedures
16670 ((glPointParameterf
16671 (pname GLenum)
16672 (param GLfloat)
16673 ->
16674 void)
16675 (glPointParameteri
16676 (pname GLenum)
16677 (param GLint)
16678 ->
16679 void))
16680 "Specify point parameters.
16681
16682 PNAME
16683 Specifies a single-valued point parameter. `GL_POINT_SIZE_MIN',
16684 `GL_POINT_SIZE_MAX', `GL_POINT_FADE_THRESHOLD_SIZE', and
16685 `GL_POINT_SPRITE_COORD_ORIGIN' are accepted.
16686
16687 PARAM
16688 Specifies the value that PNAME will be set to.
16689
16690 The following values are accepted for PNAME:
16691
16692 `GL_POINT_SIZE_MIN'
16693
16694
16695 PARAMS is a single floating-point value that specifies the minimum
16696 point size. The default value is 0.0.
16697
16698 `GL_POINT_SIZE_MAX'
16699
16700
16701 PARAMS is a single floating-point value that specifies the maximum
16702 point size. The default value is 1.0.
16703
16704 `GL_POINT_FADE_THRESHOLD_SIZE'
16705
16706
16707 PARAMS is a single floating-point value that specifies the
16708 threshold value to which point sizes are clamped if they exceed the
16709 specified value. The default value is 1.0.
16710
16711 `GL_POINT_DISTANCE_ATTENUATION'
16712
16713
16714 PARAMS is an array of three floating-point values that specify the
16715 coefficients used for scaling the computed point size. The default
16716 values are (1,00) .
16717
16718 `GL_POINT_SPRITE_COORD_ORIGIN'
16719
16720
16721 PARAMS is a single enum specifying the point sprite texture
16722 coordinate origin, either `GL_LOWER_LEFT' or `GL_UPPER_LEFT'. The
16723 default value is `GL_UPPER_LEFT'.
16724
16725 `GL_INVALID_VALUE' is generated If the value specified for
16726 `GL_POINT_SIZE_MIN', `GL_POINT_SIZE_MAX', or
16727 `GL_POINT_FADE_THRESHOLD_SIZE' is less than zero.
16728
16729 `GL_INVALID_ENUM' is generated If the value specified for
16730 `GL_POINT_SPRITE_COORD_ORIGIN' is not `GL_LOWER_LEFT' or
16731 `GL_UPPER_LEFT'.
16732
16733 If the value for `GL_POINT_SIZE_MIN' is greater than
16734 `GL_POINT_SIZE_MAX', the point size after clamping is undefined, but no
16735 error is generated.")
16736
16737 (define-gl-procedures
16738 ((glPointSize (size GLfloat) -> void))
16739 "Specify the diameter of rasterized points.
16740
16741 SIZE
16742 Specifies the diameter of rasterized points. The initial value is
16743 1.
16744
16745 `glPointSize' specifies the rasterized diameter of both aliased and
16746 antialiased points. Using a point size other than 1 has different
16747 effects, depending on whether point antialiasing is enabled. To enable
16748 and disable point antialiasing, call `glEnable' and `glDisable' with
16749 argument `GL_POINT_SMOOTH'. Point antialiasing is initially disabled.
16750
16751 The specified point size is multiplied with a distance attenuation
16752 factor and clamped to the specified point size range, and further
16753 clamped to the implementation-dependent point size range to produce the
16754 derived point size using
16755
16756 POINTSIZE=CLAMP\u2062(SIZE×√(1/A+B×D+C×D^2,,,),,)
16757
16758 where D is the eye-coordinate distance from the eye to the vertex, and A
16759 , B , and C are the distance attenuation coefficients (see
16760 `glPointParameter').
16761
16762 If multisampling is disabled, the computed point size is used as the
16763 point's width.
16764
16765 If multisampling is enabled, the point may be faded by modifying the
16766 point alpha value (see `glSampleCoverage') instead of allowing the point
16767 width to go below a given threshold (see `glPointParameter'). In this
16768 case, the width is further modified in the following manner:
16769
16770 POINTWIDTH={(POINTSIZE), (THRESHOLD)\u2062(POINTSIZE>=THRESHOLD),
16771 (OTHERWISE),
16772
16773 The point alpha value is modified by computing:
16774
16775 POINTALPHA={(1), ((POINTSIZE/THRESHOLD,)^2)\u2062(POINTSIZE>=THRESHOLD),
16776 (OTHERWISE),
16777
16778 If point antialiasing is disabled, the actual size is determined by
16779 rounding the supplied size to the nearest integer. (If the rounding
16780 results in the value 0, it is as if the point size were 1.) If the
16781 rounded size is odd, then the center point (X , Y ) of the pixel
16782 fragment that represents the point is computed as
16783
16784 (⌊X_W,⌋+.5,⌊Y_W,⌋+.5)
16785
16786 where W subscripts indicate window coordinates. All pixels that lie
16787 within the square grid of the rounded size centered at (X , Y ) make up
16788 the fragment. If the size is even, the center point is
16789
16790 (⌊X_W+.5,⌋,⌊Y_W+.5,⌋)
16791
16792 and the rasterized fragment's centers are the half-integer window
16793 coordinates within the square of the rounded size centered at (X,Y) .
16794 All pixel fragments produced in rasterizing a nonantialiased point are
16795 assigned the same associated data, that of the vertex corresponding to
16796 the point.
16797
16798 If antialiasing is enabled, then point rasterization produces a fragment
16799 for each pixel square that intersects the region lying within the circle
16800 having diameter equal to the current point size and centered at the
16801 point's (X_W,Y_W) . The coverage value for each fragment is the window
16802 coordinate area of the intersection of the circular region with the
16803 corresponding pixel square. This value is saved and used in the final
16804 rasterization step. The data associated with each fragment is the data
16805 associated with the point being rasterized.
16806
16807 Not all sizes are supported when point antialiasing is enabled. If an
16808 unsupported size is requested, the nearest supported size is used. Only
16809 size 1 is guaranteed to be supported; others depend on the
16810 implementation. To query the range of supported sizes and the size
16811 difference between supported sizes within the range, call `glGet' with
16812 arguments `GL_SMOOTH_POINT_SIZE_RANGE' and
16813 `GL_SMOOTH_POINT_SIZE_GRANULARITY'. For aliased points, query the
16814 supported ranges and granularity with `glGet' with arguments
16815 `GL_ALIASED_POINT_SIZE_RANGE'.
16816
16817 `GL_INVALID_VALUE' is generated if SIZE is less than or equal to 0.
16818
16819 `GL_INVALID_OPERATION' is generated if `glPointSize' is executed between
16820 the execution of `glBegin' and the corresponding execution of `glEnd'.")
16821
16822 (define-gl-procedures
16823 ((glPolygonMode
16824 (face GLenum)
16825 (mode GLenum)
16826 ->
16827 void))
16828 "Select a polygon rasterization mode.
16829
16830 FACE
16831 Specifies the polygons that MODE applies to. Must be `GL_FRONT' for
16832 front-facing polygons, `GL_BACK' for back-facing polygons, or
16833 `GL_FRONT_AND_BACK' for front- and back-facing polygons.
16834
16835 MODE
16836 Specifies how polygons will be rasterized. Accepted values are
16837 `GL_POINT', `GL_LINE', and `GL_FILL'. The initial value is
16838 `GL_FILL' for both front- and back-facing polygons.
16839
16840 `glPolygonMode' controls the interpretation of polygons for
16841 rasterization. FACE describes which polygons MODE applies to:
16842 front-facing polygons (`GL_FRONT'), back-facing polygons (`GL_BACK'), or
16843 both (`GL_FRONT_AND_BACK'). The polygon mode affects only the final
16844 rasterization of polygons. In particular, a polygon's vertices are lit
16845 and the polygon is clipped and possibly culled before these modes are
16846 applied.
16847
16848 Three modes are defined and can be specified in MODE:
16849
16850 `GL_POINT'
16851 Polygon vertices that are marked as the start of a boundary edge
16852 are drawn as points. Point attributes such as `GL_POINT_SIZE' and
16853 `GL_POINT_SMOOTH' control the rasterization of the points. Polygon
16854 rasterization attributes other than `GL_POLYGON_MODE' have no
16855 effect.
16856
16857 `GL_LINE'
16858 Boundary edges of the polygon are drawn as line segments. They are
16859 treated as connected line segments for line stippling; the line
16860 stipple counter and pattern are not reset between segments (see
16861 `glLineStipple'). Line attributes such as `GL_LINE_WIDTH' and
16862 `GL_LINE_SMOOTH' control the rasterization of the lines. Polygon
16863 rasterization attributes other than `GL_POLYGON_MODE' have no
16864 effect.
16865
16866 `GL_FILL'
16867 The interior of the polygon is filled. Polygon attributes such as
16868 `GL_POLYGON_STIPPLE' and `GL_POLYGON_SMOOTH' control the
16869 rasterization of the polygon.
16870
16871 `GL_INVALID_ENUM' is generated if either FACE or MODE is not an accepted
16872 value.
16873
16874 `GL_INVALID_OPERATION' is generated if `glPolygonMode' is executed
16875 between the execution of `glBegin' and the corresponding execution of
16876 `glEnd'.")
16877
16878 (define-gl-procedures
16879 ((glPolygonOffset
16880 (factor GLfloat)
16881 (units GLfloat)
16882 ->
16883 void))
16884 "Set the scale and units used to calculate depth values.
16885
16886 FACTOR
16887 Specifies a scale factor that is used to create a variable depth
16888 offset for each polygon. The initial value is 0.
16889
16890 UNITS
16891 Is multiplied by an implementation-specific value to create a
16892 constant depth offset. The initial value is 0.
16893
16894 When `GL_POLYGON_OFFSET_FILL', `GL_POLYGON_OFFSET_LINE', or
16895 `GL_POLYGON_OFFSET_POINT' is enabled, each fragment's DEPTH value will
16896 be offset after it is interpolated from the DEPTH values of the
16897 appropriate vertices. The value of the offset is FACTOR×DZ+R×UNITS ,
16898 where DZ is a measurement of the change in depth relative to the screen
16899 area of the polygon, and R is the smallest value that is guaranteed to
16900 produce a resolvable offset for a given implementation. The offset is
16901 added before the depth test is performed and before the value is written
16902 into the depth buffer.
16903
16904 `glPolygonOffset' is useful for rendering hidden-line images, for
16905 applying decals to surfaces, and for rendering solids with highlighted
16906 edges.
16907
16908 `GL_INVALID_OPERATION' is generated if `glPolygonOffset' is executed
16909 between the execution of `glBegin' and the corresponding execution of
16910 `glEnd'.")
16911
16912 (define-gl-procedures
16913 ((glPolygonStipple
16914 (pattern const-GLubyte-*)
16915 ->
16916 void))
16917 "Set the polygon stippling pattern.
16918
16919 PATTERN
16920 Specifies a pointer to a 32×32 stipple pattern that will be
16921 unpacked from memory in the same way that `glDrawPixels' unpacks
16922 pixels.
16923
16924 Polygon stippling, like line stippling (see `glLineStipple'), masks out
16925 certain fragments produced by rasterization, creating a pattern.
16926 Stippling is independent of polygon antialiasing.
16927
16928 PATTERN is a pointer to a 32×32 stipple pattern that is stored in memory
16929 just like the pixel data supplied to a `glDrawPixels' call with height
16930 and WIDTH both equal to 32, a pixel format of `GL_COLOR_INDEX', and data
16931 type of `GL_BITMAP'. That is, the stipple pattern is represented as a
16932 32×32 array of 1-bit color indices packed in unsigned bytes.
16933 `glPixelStore' parameters like `GL_UNPACK_SWAP_BYTES' and
16934 `GL_UNPACK_LSB_FIRST' affect the assembling of the bits into a stipple
16935 pattern. Pixel transfer operations (shift, offset, pixel map) are not
16936 applied to the stipple image, however.
16937
16938 If a non-zero named buffer object is bound to the
16939 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a stipple
16940 pattern is specified, PATTERN is treated as a byte offset into the
16941 buffer object's data store.
16942
16943 To enable and disable polygon stippling, call `glEnable' and `glDisable'
16944 with argument `GL_POLYGON_STIPPLE'. Polygon stippling is initially
16945 disabled. If it's enabled, a rasterized polygon fragment with window
16946 coordinates X_W and Y_W is sent to the next stage of the GL if and only
16947 if the (X_W%32 )th bit in the (Y_W%32 )th row of the stipple pattern is
16948 1 (one). When polygon stippling is disabled, it is as if the stipple
16949 pattern consists of all 1's.
16950
16951 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16952 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
16953 data store is currently mapped.
16954
16955 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16956 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
16957 unpacked from the buffer object such that the memory reads required
16958 would exceed the data store size.
16959
16960 `GL_INVALID_OPERATION' is generated if `glPolygonStipple' is executed
16961 between the execution of `glBegin' and the corresponding execution of
16962 `glEnd'.")
16963
16964 (define-gl-procedures
16965 ((glPrioritizeTextures
16966 (n GLsizei)
16967 (textures const-GLuint-*)
16968 (priorities const-GLclampf-*)
16969 ->
16970 void))
16971 "Set texture residence priority.
16972
16973 N
16974 Specifies the number of textures to be prioritized.
16975
16976 TEXTURES
16977 Specifies an array containing the names of the textures to be
16978 prioritized.
16979
16980 PRIORITIES
16981 Specifies an array containing the texture priorities. A priority
16982 given in an element of PRIORITIES applies to the texture named by
16983 the corresponding element of TEXTURES.
16984
16985 `glPrioritizeTextures' assigns the N texture priorities given in
16986 PRIORITIES to the N textures named in TEXTURES.
16987
16988 The GL establishes a ``working set'' of textures that are resident in
16989 texture memory. These textures may be bound to a texture target much
16990 more efficiently than textures that are not resident. By specifying a
16991 priority for each texture, `glPrioritizeTextures' allows applications to
16992 guide the GL implementation in determining which textures should be
16993 resident.
16994
16995 The priorities given in PRIORITIES are clamped to the range [0,1] before
16996 they are assigned. 0 indicates the lowest priority; textures with
16997 priority 0 are least likely to be resident. 1 indicates the highest
16998 priority; textures with priority 1 are most likely to be resident.
16999 However, textures are not guaranteed to be resident until they are used.
17000
17001 `glPrioritizeTextures' silently ignores attempts to prioritize texture 0
17002 or any texture name that does not correspond to an existing texture.
17003
17004 `glPrioritizeTextures' does not require that any of the textures named
17005 by TEXTURES be bound to a texture target. `glTexParameter' may also be
17006 used to set a texture's priority, but only if the texture is currently
17007 bound. This is the only way to set the priority of a default texture.
17008
17009 `GL_INVALID_VALUE' is generated if N is negative.
17010
17011 `GL_INVALID_OPERATION' is generated if `glPrioritizeTextures' is
17012 executed between the execution of `glBegin' and the corresponding
17013 execution of `glEnd'.")
17014
17015 (define-gl-procedures
17016 ((glPushAttrib (mask GLbitfield) -> void)
17017 (glPopAttrib -> void))
17018 "Push and pop the server attribute stack.
17019
17020 MASK
17021 Specifies a mask that indicates which attributes to save. Values
17022 for MASK are listed below.
17023
17024 `glPushAttrib' takes one argument, a mask that indicates which groups of
17025 state variables to save on the attribute stack. Symbolic constants are
17026 used to set bits in the mask. MASK is typically constructed by
17027 specifying the bitwise-or of several of these constants together. The
17028 special mask `GL_ALL_ATTRIB_BITS' can be used to save all stackable
17029 states.
17030
17031 The symbolic mask constants and their associated GL state are as follows
17032 (the second column lists which attributes are saved):
17033
17034
17035
17036 `GL_ACCUM_BUFFER_BIT'
17037 Accumulation buffer clear value
17038
17039 `GL_COLOR_BUFFER_BIT'
17040 `GL_ALPHA_TEST' enable bit
17041
17042
17043 Alpha test function and reference value
17044
17045
17046 `GL_BLEND' enable bit
17047
17048
17049 Blending source and destination functions
17050
17051
17052 Constant blend color
17053
17054
17055 Blending equation
17056
17057
17058 `GL_DITHER' enable bit
17059
17060
17061 `GL_DRAW_BUFFER' setting
17062
17063
17064 `GL_COLOR_LOGIC_OP' enable bit
17065
17066
17067 `GL_INDEX_LOGIC_OP' enable bit
17068
17069
17070 Logic op function
17071
17072
17073 Color mode and index mode clear values
17074
17075
17076 Color mode and index mode writemasks
17077
17078 `GL_CURRENT_BIT'
17079 Current RGBA color
17080
17081
17082 Current color index
17083
17084
17085 Current normal vector
17086
17087
17088 Current texture coordinates
17089
17090
17091 Current raster position
17092
17093
17094 `GL_CURRENT_RASTER_POSITION_VALID' flag
17095
17096
17097 RGBA color associated with current raster position
17098
17099
17100 Color index associated with current raster position
17101
17102
17103 Texture coordinates associated with current raster position
17104
17105
17106 `GL_EDGE_FLAG' flag
17107
17108 `GL_DEPTH_BUFFER_BIT'
17109 `GL_DEPTH_TEST' enable bit
17110
17111
17112 Depth buffer test function
17113
17114
17115 Depth buffer clear value
17116
17117
17118 `GL_DEPTH_WRITEMASK' enable bit
17119
17120 `GL_ENABLE_BIT'
17121 `GL_ALPHA_TEST' flag
17122
17123
17124 `GL_AUTO_NORMAL' flag
17125
17126
17127 `GL_BLEND' flag
17128
17129
17130 Enable bits for the user-definable clipping planes
17131
17132
17133 `GL_COLOR_MATERIAL'
17134
17135
17136 `GL_CULL_FACE' flag
17137
17138
17139 `GL_DEPTH_TEST' flag
17140
17141
17142 `GL_DITHER' flag
17143
17144
17145 `GL_FOG' flag
17146
17147
17148 `GL_LIGHT'I where `0' <= I < `GL_MAX_LIGHTS'
17149
17150
17151 `GL_LIGHTING' flag
17152
17153
17154 `GL_LINE_SMOOTH' flag
17155
17156
17157 `GL_LINE_STIPPLE' flag
17158
17159
17160 `GL_COLOR_LOGIC_OP' flag
17161
17162
17163 `GL_INDEX_LOGIC_OP' flag
17164
17165
17166 `GL_MAP1_'X where X is a map type
17167
17168
17169 `GL_MAP2_'X where X is a map type
17170
17171
17172 `GL_MULTISAMPLE' flag
17173
17174
17175 `GL_NORMALIZE' flag
17176
17177
17178 `GL_POINT_SMOOTH' flag
17179
17180
17181 `GL_POLYGON_OFFSET_LINE' flag
17182
17183
17184 `GL_POLYGON_OFFSET_FILL' flag
17185
17186
17187 `GL_POLYGON_OFFSET_POINT' flag
17188
17189
17190 `GL_POLYGON_SMOOTH' flag
17191
17192
17193 `GL_POLYGON_STIPPLE' flag
17194
17195
17196 `GL_SAMPLE_ALPHA_TO_COVERAGE' flag
17197
17198
17199 `GL_SAMPLE_ALPHA_TO_ONE' flag
17200
17201
17202 `GL_SAMPLE_COVERAGE' flag
17203
17204
17205 `GL_SCISSOR_TEST' flag
17206
17207
17208 `GL_STENCIL_TEST' flag
17209
17210
17211 `GL_TEXTURE_1D' flag
17212
17213
17214 `GL_TEXTURE_2D' flag
17215
17216
17217 `GL_TEXTURE_3D' flag
17218
17219
17220 Flags `GL_TEXTURE_GEN_'X where X is S, T, R, or Q
17221
17222 `GL_EVAL_BIT'
17223 `GL_MAP1_'X enable bits, where X is a map type
17224
17225
17226 `GL_MAP2_'X enable bits, where X is a map type
17227
17228
17229 1D grid endpoints and divisions
17230
17231
17232 2D grid endpoints and divisions
17233
17234
17235 `GL_AUTO_NORMAL' enable bit
17236
17237 `GL_FOG_BIT'
17238 `GL_FOG' enable bit
17239
17240
17241 Fog color
17242
17243
17244 Fog density
17245
17246
17247 Linear fog start
17248
17249
17250 Linear fog end
17251
17252
17253 Fog index
17254
17255
17256 `GL_FOG_MODE' value
17257
17258 `GL_HINT_BIT'
17259 `GL_PERSPECTIVE_CORRECTION_HINT' setting
17260
17261
17262 `GL_POINT_SMOOTH_HINT' setting
17263
17264
17265 `GL_LINE_SMOOTH_HINT' setting
17266
17267
17268 `GL_POLYGON_SMOOTH_HINT' setting
17269
17270
17271 `GL_FOG_HINT' setting
17272
17273
17274 `GL_GENERATE_MIPMAP_HINT' setting
17275
17276
17277 `GL_TEXTURE_COMPRESSION_HINT' setting
17278
17279 `GL_LIGHTING_BIT'
17280 `GL_COLOR_MATERIAL' enable bit
17281
17282
17283 `GL_COLOR_MATERIAL_FACE' value
17284
17285
17286 Color material parameters that are tracking the current color
17287
17288
17289 Ambient scene color
17290
17291
17292 `GL_LIGHT_MODEL_LOCAL_VIEWER' value
17293
17294
17295 `GL_LIGHT_MODEL_TWO_SIDE' setting
17296
17297
17298 `GL_LIGHTING' enable bit
17299
17300
17301 Enable bit for each light
17302
17303
17304 Ambient, diffuse, and specular intensity for each light
17305
17306
17307 Direction, position, exponent, and cutoff angle for each light
17308
17309
17310 Constant, linear, and quadratic attenuation factors for each light
17311
17312
17313 Ambient, diffuse, specular, and emissive color for each material
17314
17315
17316 Ambient, diffuse, and specular color indices for each material
17317
17318
17319 Specular exponent for each material
17320
17321
17322 `GL_SHADE_MODEL' setting
17323
17324 `GL_LINE_BIT'
17325 `GL_LINE_SMOOTH' flag
17326
17327
17328 `GL_LINE_STIPPLE' enable bit
17329
17330
17331 Line stipple pattern and repeat counter
17332
17333
17334 Line width
17335
17336 `GL_LIST_BIT'
17337 `GL_LIST_BASE' setting
17338
17339 `GL_MULTISAMPLE_BIT'
17340 `GL_MULTISAMPLE' flag
17341
17342
17343 `GL_SAMPLE_ALPHA_TO_COVERAGE' flag
17344
17345
17346 `GL_SAMPLE_ALPHA_TO_ONE' flag
17347
17348
17349 `GL_SAMPLE_COVERAGE' flag
17350
17351
17352 `GL_SAMPLE_COVERAGE_VALUE' value
17353
17354
17355 `GL_SAMPLE_COVERAGE_INVERT' value
17356
17357 `GL_PIXEL_MODE_BIT'
17358 `GL_RED_BIAS' and `GL_RED_SCALE' settings
17359
17360
17361 `GL_GREEN_BIAS' and `GL_GREEN_SCALE' values
17362
17363
17364 `GL_BLUE_BIAS' and `GL_BLUE_SCALE'
17365
17366
17367 `GL_ALPHA_BIAS' and `GL_ALPHA_SCALE'
17368
17369
17370 `GL_DEPTH_BIAS' and `GL_DEPTH_SCALE'
17371
17372
17373 `GL_INDEX_OFFSET' and `GL_INDEX_SHIFT' values
17374
17375
17376 `GL_MAP_COLOR' and `GL_MAP_STENCIL' flags
17377
17378
17379 `GL_ZOOM_X' and `GL_ZOOM_Y' factors
17380
17381
17382 `GL_READ_BUFFER' setting
17383
17384 `GL_POINT_BIT'
17385 `GL_POINT_SMOOTH' flag
17386
17387
17388 Point size
17389
17390 `GL_POLYGON_BIT'
17391 `GL_CULL_FACE' enable bit
17392
17393
17394 `GL_CULL_FACE_MODE' value
17395
17396
17397 `GL_FRONT_FACE' indicator
17398
17399
17400 `GL_POLYGON_MODE' setting
17401
17402
17403 `GL_POLYGON_SMOOTH' flag
17404
17405
17406 `GL_POLYGON_STIPPLE' enable bit
17407
17408
17409 `GL_POLYGON_OFFSET_FILL' flag
17410
17411
17412 `GL_POLYGON_OFFSET_LINE' flag
17413
17414
17415 `GL_POLYGON_OFFSET_POINT' flag
17416
17417
17418 `GL_POLYGON_OFFSET_FACTOR'
17419
17420
17421 `GL_POLYGON_OFFSET_UNITS'
17422
17423 `GL_POLYGON_STIPPLE_BIT'
17424 Polygon stipple image
17425
17426 `GL_SCISSOR_BIT'
17427 `GL_SCISSOR_TEST' flag
17428
17429
17430 Scissor box
17431
17432 `GL_STENCIL_BUFFER_BIT'
17433 `GL_STENCIL_TEST' enable bit
17434
17435
17436 Stencil function and reference value
17437
17438
17439 Stencil value mask
17440
17441
17442 Stencil fail, pass, and depth buffer pass actions
17443
17444
17445 Stencil buffer clear value
17446
17447
17448 Stencil buffer writemask
17449
17450 `GL_TEXTURE_BIT'
17451 Enable bits for the four texture coordinates
17452
17453
17454 Border color for each texture image
17455
17456
17457 Minification function for each texture image
17458
17459
17460 Magnification function for each texture image
17461
17462
17463 Texture coordinates and wrap mode for each texture image
17464
17465
17466 Color and mode for each texture environment
17467
17468
17469 Enable bits `GL_TEXTURE_GEN_'X, X is S, T, R, and Q
17470
17471
17472 `GL_TEXTURE_GEN_MODE' setting for S, T, R, and Q
17473
17474
17475 `glTexGen' plane equations for S, T, R, and Q
17476
17477
17478 Current texture bindings (for example, `GL_TEXTURE_BINDING_2D')
17479
17480 `GL_TRANSFORM_BIT'
17481 Coefficients of the six clipping planes
17482
17483
17484 Enable bits for the user-definable clipping planes
17485
17486
17487 `GL_MATRIX_MODE' value
17488
17489
17490 `GL_NORMALIZE' flag
17491
17492
17493 `GL_RESCALE_NORMAL' flag
17494
17495 `GL_VIEWPORT_BIT'
17496 Depth range (near and far)
17497
17498
17499 Viewport origin and extent
17500
17501 `glPopAttrib' restores the values of the state variables saved with the
17502 last `glPushAttrib' command. Those not saved are left unchanged.
17503
17504 It is an error to push attributes onto a full stack or to pop attributes
17505 off an empty stack. In either case, the error flag is set and no other
17506 change is made to GL state.
17507
17508 Initially, the attribute stack is empty.
17509
17510 `GL_STACK_OVERFLOW' is generated if `glPushAttrib' is called while the
17511 attribute stack is full.
17512
17513 `GL_STACK_UNDERFLOW' is generated if `glPopAttrib' is called while the
17514 attribute stack is empty.
17515
17516 `GL_INVALID_OPERATION' is generated if `glPushAttrib' or `glPopAttrib'
17517 is executed between the execution of `glBegin' and the corresponding
17518 execution of `glEnd'.")
17519
17520 (define-gl-procedures
17521 ((glPushClientAttrib (mask GLbitfield) -> void)
17522 (glPopClientAttrib -> void))
17523 "Push and pop the client attribute stack.
17524
17525 MASK
17526 Specifies a mask that indicates which attributes to save. Values
17527 for MASK are listed below.
17528
17529 `glPushClientAttrib' takes one argument, a mask that indicates which
17530 groups of client-state variables to save on the client attribute stack.
17531 Symbolic constants are used to set bits in the mask. MASK is typically
17532 constructed by specifying the bitwise-or of several of these constants
17533 together. The special mask `GL_CLIENT_ALL_ATTRIB_BITS' can be used to
17534 save all stackable client state.
17535
17536 The symbolic mask constants and their associated GL client state are as
17537 follows (the second column lists which attributes are saved):
17538
17539 `GL_CLIENT_PIXEL_STORE_BIT' Pixel storage modes
17540 `GL_CLIENT_VERTEX_ARRAY_BIT' Vertex arrays (and enables)
17541
17542 `glPopClientAttrib' restores the values of the client-state variables
17543 saved with the last `glPushClientAttrib'. Those not saved are left
17544 unchanged.
17545
17546 It is an error to push attributes onto a full client attribute stack or
17547 to pop attributes off an empty stack. In either case, the error flag is
17548 set, and no other change is made to GL state.
17549
17550 Initially, the client attribute stack is empty.
17551
17552 `GL_STACK_OVERFLOW' is generated if `glPushClientAttrib' is called while
17553 the attribute stack is full.
17554
17555 `GL_STACK_UNDERFLOW' is generated if `glPopClientAttrib' is called while
17556 the attribute stack is empty.")
17557
17558 (define-gl-procedures
17559 ((glPushMatrix -> void) (glPopMatrix -> void))
17560 "Push and pop the current matrix stack.
17561
17562 There is a stack of matrices for each of the matrix modes. In
17563 `GL_MODELVIEW' mode, the stack depth is at least 32. In the other modes,
17564 `GL_COLOR', `GL_PROJECTION', and `GL_TEXTURE', the depth is at least 2.
17565 The current matrix in any mode is the matrix on the top of the stack for
17566 that mode.
17567
17568 `glPushMatrix' pushes the current matrix stack down by one, duplicating
17569 the current matrix. That is, after a `glPushMatrix' call, the matrix on
17570 top of the stack is identical to the one below it.
17571
17572 `glPopMatrix' pops the current matrix stack, replacing the current
17573 matrix with the one below it on the stack.
17574
17575 Initially, each of the stacks contains one matrix, an identity matrix.
17576
17577 It is an error to push a full matrix stack or to pop a matrix stack that
17578 contains only a single matrix. In either case, the error flag is set and
17579 no other change is made to GL state.
17580
17581 `GL_STACK_OVERFLOW' is generated if `glPushMatrix' is called while the
17582 current matrix stack is full.
17583
17584 `GL_STACK_UNDERFLOW' is generated if `glPopMatrix' is called while the
17585 current matrix stack contains only a single matrix.
17586
17587 `GL_INVALID_OPERATION' is generated if `glPushMatrix' or `glPopMatrix'
17588 is executed between the execution of `glBegin' and the corresponding
17589 execution of `glEnd'.")
17590
17591 (define-gl-procedures
17592 ((glPushName (name GLuint) -> void)
17593 (glPopName -> void))
17594 "Push and pop the name stack.
17595
17596 NAME
17597 Specifies a name that will be pushed onto the name stack.
17598
17599 The name stack is used during selection mode to allow sets of rendering
17600 commands to be uniquely identified. It consists of an ordered set of
17601 unsigned integers and is initially empty.
17602
17603 `glPushName' causes NAME to be pushed onto the name stack. `glPopName'
17604 pops one name off the top of the stack.
17605
17606 The maximum name stack depth is implementation-dependent; call
17607 `GL_MAX_NAME_STACK_DEPTH' to find out the value for a particular
17608 implementation. It is an error to push a name onto a full stack or to
17609 pop a name off an empty stack. It is also an error to manipulate the
17610 name stack between the execution of `glBegin' and the corresponding
17611 execution of `glEnd'. In any of these cases, the error flag is set and
17612 no other change is made to GL state.
17613
17614 The name stack is always empty while the render mode is not `GL_SELECT'.
17615 Calls to `glPushName' or `glPopName' while the render mode is not
17616 `GL_SELECT' are ignored.
17617
17618 `GL_STACK_OVERFLOW' is generated if `glPushName' is called while the
17619 name stack is full.
17620
17621 `GL_STACK_UNDERFLOW' is generated if `glPopName' is called while the
17622 name stack is empty.
17623
17624 `GL_INVALID_OPERATION' is generated if `glPushName' or `glPopName' is
17625 executed between a call to `glBegin' and the corresponding call to
17626 `glEnd'.")
17627
17628 (define-gl-procedures
17629 ((glRasterPos2i (x GLint) (y GLint) -> void)
17630 (glRasterPos2f (x GLfloat) (y GLfloat) -> void)
17631 (glRasterPos3i
17632 (x GLint)
17633 (y GLint)
17634 (z GLint)
17635 ->
17636 void)
17637 (glRasterPos3f
17638 (x GLfloat)
17639 (y GLfloat)
17640 (z GLfloat)
17641 ->
17642 void)
17643 (glRasterPos4i
17644 (x GLint)
17645 (y GLint)
17646 (z GLint)
17647 (w GLint)
17648 ->
17649 void)
17650 (glRasterPos4f
17651 (x GLfloat)
17652 (y GLfloat)
17653 (z GLfloat)
17654 (w GLfloat)
17655 ->
17656 void))
17657 "Specify the raster position for pixel operations.
17658
17659 X
17660 Y
17661
17662 Z
17663
17664 W
17665
17666 Specify the X , Y , Z , and W object coordinates (if present) for
17667 the raster position.
17668
17669 The GL maintains a 3D position in window coordinates. This position,
17670 called the raster position, is used to position pixel and bitmap write
17671 operations. It is maintained with subpixel accuracy. See `glBitmap',
17672 `glDrawPixels', and `glCopyPixels'.
17673
17674 The current raster position consists of three window coordinates (X , Y
17675 , Z ), a clip coordinate value (W ), an eye coordinate distance, a valid
17676 bit, and associated color data and texture coordinates. The W coordinate
17677 is a clip coordinate, because W is not projected to window coordinates.
17678 `glRasterPos4' specifies object coordinates X , Y , Z , and W
17679 explicitly. `glRasterPos3' specifies object coordinate X , Y , and Z
17680 explicitly, while W is implicitly set to 1. `glRasterPos2' uses the
17681 argument values for X and Y while implicitly setting Z and W to 0 and 1.
17682
17683 The object coordinates presented by `glRasterPos' are treated just like
17684 those of a `glVertex' command: They are transformed by the current
17685 modelview and projection matrices and passed to the clipping stage. If
17686 the vertex is not culled, then it is projected and scaled to window
17687 coordinates, which become the new current raster position, and the
17688 `GL_CURRENT_RASTER_POSITION_VALID' flag is set. If the vertex IS culled,
17689 then the valid bit is cleared and the current raster position and
17690 associated color and texture coordinates are undefined.
17691
17692 The current raster position also includes some associated color data and
17693 texture coordinates. If lighting is enabled, then
17694 `GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `GL_CURRENT_RASTER_INDEX'
17695 (in color index mode) is set to the color produced by the lighting
17696 calculation (see `glLight', `glLightModel', and `glShadeModel'). If
17697 lighting is disabled, current color (in RGBA mode, state variable
17698 `GL_CURRENT_COLOR') or color index (in color index mode, state variable
17699 `GL_CURRENT_INDEX') is used to update the current raster color.
17700 `GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated.
17701
17702 Likewise, `GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of
17703 `GL_CURRENT_TEXTURE_COORDS', based on the texture matrix and the texture
17704 generation functions (see `glTexGen'). Finally, the distance from the
17705 origin of the eye coordinate system to the vertex as transformed by only
17706 the modelview matrix replaces `GL_CURRENT_RASTER_DISTANCE'.
17707
17708 Initially, the current raster position is (0, 0, 0, 1), the current
17709 raster distance is 0, the valid bit is set, the associated RGBA color is
17710 (1, 1, 1, 1), the associated color index is 1, and the associated
17711 texture coordinates are (0, 0, 0, 1). In RGBA mode,
17712 `GL_CURRENT_RASTER_INDEX' is always 1; in color index mode, the current
17713 raster RGBA color always maintains its initial value.
17714
17715 `GL_INVALID_OPERATION' is generated if `glRasterPos' is executed between
17716 the execution of `glBegin' and the corresponding execution of `glEnd'.")
17717
17718 (define-gl-procedures
17719 ((glReadBuffer (mode GLenum) -> void))
17720 "Select a color buffer source for pixels.
17721
17722 MODE
17723 Specifies a color buffer. Accepted values are `GL_FRONT_LEFT',
17724 `GL_FRONT_RIGHT', `GL_BACK_LEFT', `GL_BACK_RIGHT', `GL_FRONT',
17725 `GL_BACK', `GL_LEFT', `GL_RIGHT', and `GL_AUX'I, where I is between
17726 0 and the value of `GL_AUX_BUFFERS' minus 1.
17727
17728 `glReadBuffer' specifies a color buffer as the source for subsequent
17729 `glReadPixels', `glCopyTexImage1D', `glCopyTexImage2D',
17730 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D', and
17731 `glCopyPixels' commands. MODE accepts one of twelve or more predefined
17732 values. (`GL_AUX0' through `GL_AUX3' are always defined.) In a fully
17733 configured system, `GL_FRONT', `GL_LEFT', and `GL_FRONT_LEFT' all name
17734 the front left buffer, `GL_FRONT_RIGHT' and `GL_RIGHT' name the front
17735 right buffer, and `GL_BACK_LEFT' and `GL_BACK' name the back left
17736 buffer.
17737
17738 Nonstereo double-buffered configurations have only a front left and a
17739 back left buffer. Single-buffered configurations have a front left and a
17740 front right buffer if stereo, and only a front left buffer if nonstereo.
17741 It is an error to specify a nonexistent buffer to `glReadBuffer'.
17742
17743 MODE is initially `GL_FRONT' in single-buffered configurations and
17744 `GL_BACK' in double-buffered configurations.
17745
17746 `GL_INVALID_ENUM' is generated if MODE is not one of the twelve (or
17747 more) accepted values.
17748
17749 `GL_INVALID_OPERATION' is generated if MODE specifies a buffer that does
17750 not exist.
17751
17752 `GL_INVALID_OPERATION' is generated if `glReadBuffer' is executed
17753 between the execution of `glBegin' and the corresponding execution of
17754 `glEnd'.")
17755
17756 (define-gl-procedures
17757 ((glReadPixels
17758 (x GLint)
17759 (y GLint)
17760 (width GLsizei)
17761 (height GLsizei)
17762 (format GLenum)
17763 (type GLenum)
17764 (data GLvoid-*)
17765 ->
17766 void))
17767 "Read a block of pixels from the frame buffer.
17768
17769 X
17770 Y
17771
17772 Specify the window coordinates of the first pixel that is read from
17773 the frame buffer. This location is the lower left corner of a
17774 rectangular block of pixels.
17775
17776 WIDTH
17777 HEIGHT
17778
17779 Specify the dimensions of the pixel rectangle. WIDTH and HEIGHT of
17780 one correspond to a single pixel.
17781
17782 FORMAT
17783 Specifies the format of the pixel data. The following symbolic
17784 values are accepted: `GL_COLOR_INDEX', `GL_STENCIL_INDEX',
17785 `GL_DEPTH_COMPONENT', `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA',
17786 `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and
17787 `GL_LUMINANCE_ALPHA'.
17788
17789 TYPE
17790 Specifies the data type of the pixel data. Must be one of
17791 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
17792 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
17793 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
17794 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
17795 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
17796 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
17797 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
17798 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV'.
17799
17800 DATA
17801 Returns the pixel data.
17802
17803 `glReadPixels' returns pixel data from the frame buffer, starting with
17804 the pixel whose lower left corner is at location (X, Y), into client
17805 memory starting at location DATA. Several parameters control the
17806 processing of the pixel data before it is placed into client memory.
17807 These parameters are set with three commands: `glPixelStore',
17808 `glPixelTransfer', and `glPixelMap'. This reference page describes the
17809 effects on `glReadPixels' of most, but not all of the parameters
17810 specified by these three commands.
17811
17812 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
17813 target (see `glBindBuffer') while a block of pixels is requested, DATA
17814 is treated as a byte offset into the buffer object's data store rather
17815 than a pointer to client memory.
17816
17817 When the `ARB_imaging' extension is supported, the pixel data may be
17818 processed by additional operations including color table lookup, color
17819 matrix transformations, convolutions, histograms, and minimum and
17820 maximum pixel value computations.
17821
17822 `glReadPixels' returns values from each pixel with lower left corner at
17823 (X+I,Y+J) for 0<=I<WIDTH and 0<=J<HEIGHT . This pixel is said to be the
17824 I th pixel in the J th row. Pixels are returned in row order from the
17825 lowest to the highest row, left to right in each row.
17826
17827 FORMAT specifies the format for the returned pixel values; accepted
17828 values are:
17829
17830 `GL_COLOR_INDEX'
17831 Color indices are read from the color buffer selected by
17832 `glReadBuffer'. Each index is converted to fixed point, shifted
17833 left or right depending on the value and sign of `GL_INDEX_SHIFT',
17834 and added to `GL_INDEX_OFFSET'. If `GL_MAP_COLOR' is `GL_TRUE',
17835 indices are replaced by their mappings in the table
17836 `GL_PIXEL_MAP_I_TO_I'.
17837
17838 `GL_STENCIL_INDEX'
17839 Stencil values are read from the stencil buffer. Each index is
17840 converted to fixed point, shifted left or right depending on the
17841 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'.
17842 If `GL_MAP_STENCIL' is `GL_TRUE', indices are replaced by their
17843 mappings in the table `GL_PIXEL_MAP_S_TO_S'.
17844
17845 `GL_DEPTH_COMPONENT'
17846 Depth values are read from the depth buffer. Each component is
17847 converted to floating point such that the minimum depth value maps
17848 to 0 and the maximum value maps to 1. Each component is then
17849 multiplied by `GL_DEPTH_SCALE', added to `GL_DEPTH_BIAS', and
17850 finally clamped to the range [0,1] .
17851
17852 `GL_RED'
17853 `GL_GREEN'
17854 `GL_BLUE'
17855 `GL_ALPHA'
17856 `GL_RGB'
17857 `GL_BGR'
17858 `GL_RGBA'
17859 `GL_BGRA'
17860 `GL_LUMINANCE'
17861 `GL_LUMINANCE_ALPHA'
17862 Processing differs depending on whether color buffers store color
17863 indices or RGBA color components. If color indices are stored, they
17864 are read from the color buffer selected by `glReadBuffer'. Each
17865 index is converted to fixed point, shifted left or right depending
17866 on the value and sign of `GL_INDEX_SHIFT', and added to
17867 `GL_INDEX_OFFSET'. Indices are then replaced by the red, green,
17868 blue, and alpha values obtained by indexing the tables
17869 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
17870 `GL_PIXEL_MAP_I_TO_B', and `GL_PIXEL_MAP_I_TO_A'. Each table must
17871 be of size 2^N , but N may be different for different tables.
17872 Before an index is used to look up a value in a table of size 2^N ,
17873 it must be masked against 2^N-1 .
17874
17875 If RGBA color components are stored in the color buffers, they are
17876 read from the color buffer selected by `glReadBuffer'. Each color
17877 component is converted to floating point such that zero intensity
17878 maps to 0.0 and full intensity maps to 1.0. Each component is then
17879 multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where C is
17880 RED, GREEN, BLUE, or ALPHA. Finally, if `GL_MAP_COLOR' is
17881 `GL_TRUE', each component is clamped to the range [0,1] , scaled to
17882 the size of its corresponding table, and is then replaced by its
17883 mapping in the table `GL_PIXEL_MAP_c_TO_c', where C is R, G, B, or
17884 A.
17885
17886 Unneeded data is then discarded. For example, `GL_RED' discards the
17887 green, blue, and alpha components, while `GL_RGB' discards only the
17888 alpha component. `GL_LUMINANCE' computes a single-component value
17889 as the sum of the red, green, and blue components, and
17890 `GL_LUMINANCE_ALPHA' does the same, while keeping alpha as a second
17891 value. The final values are clamped to the range [0,1] .
17892
17893 The shift, scale, bias, and lookup factors just described are all
17894 specified by `glPixelTransfer'. The lookup table contents themselves are
17895 specified by `glPixelMap'.
17896
17897 Finally, the indices or components are converted to the proper format,
17898 as specified by TYPE. If FORMAT is `GL_COLOR_INDEX' or
17899 `GL_STENCIL_INDEX' and TYPE is not `GL_FLOAT', each index is masked with
17900 the mask value given in the following table. If TYPE is `GL_FLOAT', then
17901 each integer index is converted to single-precision floating-point
17902 format.
17903
17904 If FORMAT is `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
17905 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'
17906 and TYPE is not `GL_FLOAT', each component is multiplied by the
17907 multiplier shown in the following table. If type is `GL_FLOAT', then
17908 each component is passed as is (or converted to the client's
17909 single-precision floating-point format if it is different from the one
17910 used by the GL).
17911
17912
17913
17914 TYPE
17915 *Index Mask*, *Component Conversion*
17916
17917 `GL_UNSIGNED_BYTE'
17918 2^8-1 , (2^8-1,)\u2062C
17919
17920 `GL_BYTE'
17921 2^7-1 , (2^8-1,)\u2062C-1,/2
17922
17923 `GL_BITMAP'
17924 1 , 1
17925
17926 `GL_UNSIGNED_SHORT'
17927 2^16-1 , (2^16-1,)\u2062C
17928
17929 `GL_SHORT'
17930 2^15-1 , (2^16-1,)\u2062C-1,/2
17931
17932 `GL_UNSIGNED_INT'
17933 2^32-1 , (2^32-1,)\u2062C
17934
17935 `GL_INT'
17936 2^31-1 , (2^32-1,)\u2062C-1,/2
17937
17938 `GL_FLOAT'
17939 none , C
17940
17941 Return values are placed in memory as follows. If FORMAT is
17942 `GL_COLOR_INDEX', `GL_STENCIL_INDEX', `GL_DEPTH_COMPONENT', `GL_RED',
17943 `GL_GREEN', `GL_BLUE', `GL_ALPHA', or `GL_LUMINANCE', a single value is
17944 returned and the data for the I th pixel in the J th row is placed in
17945 location (J,)\u2062WIDTH+I . `GL_RGB' and `GL_BGR' return three values,
17946 `GL_RGBA' and `GL_BGRA' return four values, and `GL_LUMINANCE_ALPHA'
17947 returns two values for each pixel, with all values corresponding to a
17948 single pixel occupying contiguous space in DATA. Storage parameters set
17949 by `glPixelStore', such as `GL_PACK_LSB_FIRST' and `GL_PACK_SWAP_BYTES',
17950 affect the way that data is written into memory. See `glPixelStore' for
17951 a description.
17952
17953 `GL_INVALID_ENUM' is generated if FORMAT or TYPE is not an accepted
17954 value.
17955
17956 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
17957 `GL_COLOR_INDEX' or `GL_STENCIL_INDEX'.
17958
17959 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
17960
17961 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_COLOR_INDEX' and
17962 the color buffers store RGBA color components.
17963
17964 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_STENCIL_INDEX' and
17965 there is no stencil buffer.
17966
17967 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
17968 and there is no depth buffer.
17969
17970 `GL_INVALID_OPERATION' is generated if TYPE is one of
17971 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
17972 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
17973 is not `GL_RGB'.
17974
17975 `GL_INVALID_OPERATION' is generated if TYPE is one of
17976 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
17977 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
17978 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
17979 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
17980 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
17981
17982 The formats `GL_BGR', and `GL_BGRA' and types `GL_UNSIGNED_BYTE_3_3_2',
17983 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
17984 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
17985 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
17986 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
17987 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
17988 `GL_UNSIGNED_INT_2_10_10_10_REV' are available only if the GL version is
17989 1.2 or greater.
17990
17991 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
17992 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
17993 store is currently mapped.
17994
17995 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
17996 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
17997 to the buffer object such that the memory writes required would exceed
17998 the data store size.
17999
18000 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18001 bound to the `GL_PIXEL_PACK_BUFFER' target and DATA is not evenly
18002 divisible into the number of bytes needed to store in memory a datum
18003 indicated by TYPE.
18004
18005 `GL_INVALID_OPERATION' is generated if `glReadPixels' is executed
18006 between the execution of `glBegin' and the corresponding execution of
18007 `glEnd'.")
18008
18009 (define-gl-procedures
18010 ((glRectf
18011 (x1 GLfloat)
18012 (y1 GLfloat)
18013 (x2 GLfloat)
18014 (y2 GLfloat)
18015 ->
18016 void)
18017 (glRecti
18018 (x1 GLint)
18019 (y1 GLint)
18020 (x2 GLint)
18021 (y2 GLint)
18022 ->
18023 void))
18024 "Draw a rectangle.
18025
18026 X1
18027 Y1
18028
18029 Specify one vertex of a rectangle.
18030
18031 X2
18032 Y2
18033
18034 Specify the opposite vertex of the rectangle.
18035
18036 `glRect' supports efficient specification of rectangles as two corner
18037 points. Each rectangle command takes four arguments, organized either as
18038 two consecutive pairs of (X,Y) coordinates or as two pointers to arrays,
18039 each containing an (X,Y) pair. The resulting rectangle is defined in the
18040 Z=0 plane.
18041
18042 `glRect'(X1, Y1, X2, Y2) is exactly equivalent to the following
18043 sequence: Note that if the second vertex is above and to the right of
18044 the first vertex, the rectangle is constructed with a counterclockwise
18045 winding.
18046
18047
18048 glBegin(`GL_POLYGON');
18049 glVertex2(X1, Y1);
18050 glVertex2(X2, Y1);
18051 glVertex2(X2, Y2);
18052 glVertex2(X1, Y2);
18053 glEnd();
18054
18055 `GL_INVALID_OPERATION' is generated if `glRect' is executed between the
18056 execution of `glBegin' and the corresponding execution of `glEnd'.")
18057
18058 (define-gl-procedures
18059 ((glRenderMode (mode GLenum) -> GLint))
18060 "Set rasterization mode.
18061
18062 MODE
18063 Specifies the rasterization mode. Three values are accepted:
18064 `GL_RENDER', `GL_SELECT', and `GL_FEEDBACK'. The initial value is
18065 `GL_RENDER'.
18066
18067 `glRenderMode' sets the rasterization mode. It takes one argument, MODE,
18068 which can assume one of three predefined values:
18069
18070 `GL_RENDER'
18071 Render mode. Primitives are rasterized, producing pixel fragments,
18072 which are written into the frame buffer. This is the normal mode
18073 and also the default mode.
18074
18075 `GL_SELECT'
18076 Selection mode. No pixel fragments are produced, and no change to
18077 the frame buffer contents is made. Instead, a record of the names
18078 of primitives that would have been drawn if the render mode had
18079 been `GL_RENDER' is returned in a select buffer, which must be
18080 created (see `glSelectBuffer') before selection mode is entered.
18081
18082 `GL_FEEDBACK'
18083 Feedback mode. No pixel fragments are produced, and no change to
18084 the frame buffer contents is made. Instead, the coordinates and
18085 attributes of vertices that would have been drawn if the render
18086 mode had been `GL_RENDER' is returned in a feedback buffer, which
18087 must be created (see `glFeedbackBuffer') before feedback mode is
18088 entered.
18089
18090 The return value of `glRenderMode' is determined by the render mode at
18091 the time `glRenderMode' is called, rather than by MODE. The values
18092 returned for the three render modes are as follows:
18093
18094 `GL_RENDER'
18095 0.
18096
18097 `GL_SELECT'
18098 The number of hit records transferred to the select buffer.
18099
18100 `GL_FEEDBACK'
18101 The number of values (not vertices) transferred to the feedback
18102 buffer.
18103
18104 See the `glSelectBuffer' and `glFeedbackBuffer' reference pages for more
18105 details concerning selection and feedback operation.
18106
18107 `GL_INVALID_ENUM' is generated if MODE is not one of the three accepted
18108 values.
18109
18110 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is called while
18111 the render mode is `GL_SELECT', or if `glRenderMode' is called with
18112 argument `GL_SELECT' before `glSelectBuffer' is called at least once.
18113
18114 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is called
18115 while the render mode is `GL_FEEDBACK', or if `glRenderMode' is called
18116 with argument `GL_FEEDBACK' before `glFeedbackBuffer' is called at least
18117 once.
18118
18119 `GL_INVALID_OPERATION' is generated if `glRenderMode' is executed
18120 between the execution of `glBegin' and the corresponding execution of
18121 `glEnd'.")
18122
18123 (define-gl-procedures
18124 ((glResetHistogram (target GLenum) -> void))
18125 "Reset histogram table entries to zero.
18126
18127 TARGET
18128 Must be `GL_HISTOGRAM'.
18129
18130 `glResetHistogram' resets all the elements of the current histogram
18131 table to zero.
18132
18133 `GL_INVALID_ENUM' is generated if TARGET is not `GL_HISTOGRAM'.
18134
18135 `GL_INVALID_OPERATION' is generated if `glResetHistogram' is executed
18136 between the execution of `glBegin' and the corresponding execution of
18137 `glEnd'.")
18138
18139 (define-gl-procedures
18140 ((glResetMinmax (target GLenum) -> void))
18141 "Reset minmax table entries to initial values.
18142
18143 TARGET
18144 Must be `GL_MINMAX'.
18145
18146 `glResetMinmax' resets the elements of the current minmax table to their
18147 initial values: the ``maximum'' element receives the minimum possible
18148 component values, and the ``minimum'' element receives the maximum
18149 possible component values.
18150
18151 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
18152
18153 `GL_INVALID_OPERATION' is generated if `glResetMinmax' is executed
18154 between the execution of `glBegin' and the corresponding execution of
18155 `glEnd'.")
18156
18157 (define-gl-procedures
18158 ((glRotatef
18159 (angle GLfloat)
18160 (x GLfloat)
18161 (y GLfloat)
18162 (z GLfloat)
18163 ->
18164 void))
18165 "Multiply the current matrix by a rotation matrix.
18166
18167 ANGLE
18168 Specifies the angle of rotation, in degrees.
18169
18170 X
18171 Y
18172
18173 Z
18174
18175 Specify the X, Y, and Z coordinates of a vector, respectively.
18176
18177 `glRotate' produces a rotation of ANGLE degrees around the vector (X,YZ)
18178 . The current matrix (see `glMatrixMode') is multiplied by a rotation
18179 matrix with the product replacing the current matrix, as if
18180 `glMultMatrix' were called with the following matrix as its argument:
18181
18182 ((X^2\u2061(1-C,)+C X\u2062Y\u2061(1-C,)-Z\u2062S X\u2062Z\u2061(1-C,)+Y\u2062S 0), (Y\u2062X\u2061(1-C,)+Z\u2062S
18183 Y^2\u2061(1-C,)+C Y\u2062Z\u2061(1-C,)-X\u2062S 0), (X\u2062Z\u2061(1-C,)-Y\u2062S Y\u2062Z\u2061(1-C,)+X\u2062S
18184 Z^2\u2061(1-C,)+C 0), (0 0 0 1),)
18185
18186
18187
18188 Where C=COS\u2061(ANGLE,) , S=SIN\u2061(ANGLE,) , and ∥(X,YZ),∥=1 (if not, the GL
18189 will normalize this vector).
18190
18191
18192
18193
18194
18195 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
18196 objects drawn after `glRotate' is called are rotated. Use `glPushMatrix'
18197 and `glPopMatrix' to save and restore the unrotated coordinate system.
18198
18199 `GL_INVALID_OPERATION' is generated if `glRotate' is executed between
18200 the execution of `glBegin' and the corresponding execution of `glEnd'.")
18201
18202 (define-gl-procedures
18203 ((glSampleCoverage
18204 (value GLclampf)
18205 (invert GLboolean)
18206 ->
18207 void))
18208 "Specify multisample coverage parameters.
18209
18210 VALUE
18211 Specify a single floating-point sample coverage value. The value is
18212 clamped to the range [0,1] . The initial value is 1.0.
18213
18214 INVERT
18215 Specify a single boolean value representing if the coverage masks
18216 should be inverted. `GL_TRUE' and `GL_FALSE' are accepted. The
18217 initial value is `GL_FALSE'.
18218
18219 Multisampling samples a pixel multiple times at various
18220 implementation-dependent subpixel locations to generate antialiasing
18221 effects. Multisampling transparently antialiases points, lines,
18222 polygons, bitmaps, and images if it is enabled.
18223
18224 VALUE is used in constructing a temporary mask used in determining which
18225 samples will be used in resolving the final fragment color. This mask is
18226 bitwise-anded with the coverage mask generated from the multisampling
18227 computation. If the INVERT flag is set, the temporary mask is inverted
18228 (all bits flipped) and then the bitwise-and is computed.
18229
18230 If an implementation does not have any multisample buffers available, or
18231 multisampling is disabled, rasterization occurs with only a single
18232 sample computing a pixel's final RGB color.
18233
18234 Provided an implementation supports multisample buffers, and
18235 multisampling is enabled, then a pixel's final color is generated by
18236 combining several samples per pixel. Each sample contains color, depth,
18237 and stencil information, allowing those operations to be performed on
18238 each sample.
18239
18240 `GL_INVALID_OPERATION' is generated if `glSampleCoverage' is executed
18241 between the execution of `glBegin' and the corresponding execution of
18242 `glEnd'.")
18243
18244 (define-gl-procedures
18245 ((glScalef
18246 (x GLfloat)
18247 (y GLfloat)
18248 (z GLfloat)
18249 ->
18250 void))
18251 "Multiply the current matrix by a general scaling matrix.
18252
18253 X
18254 Y
18255
18256 Z
18257
18258 Specify scale factors along the X, Y, and Z axes, respectively.
18259
18260 `glScale' produces a nonuniform scaling along the X, Y, and Z axes. The
18261 three parameters indicate the desired scale factor along each of the
18262 three axes.
18263
18264 The current matrix (see `glMatrixMode') is multiplied by this scale
18265 matrix, and the product replaces the current matrix as if `glMultMatrix'
18266 were called with the following matrix as its argument:
18267
18268 ((X 0 0 0), (0 Y 0 0), (0 0 Z 0), (0 0 0 1),)
18269
18270 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
18271 objects drawn after `glScale' is called are scaled.
18272
18273 Use `glPushMatrix' and `glPopMatrix' to save and restore the unscaled
18274 coordinate system.
18275
18276 `GL_INVALID_OPERATION' is generated if `glScale' is executed between the
18277 execution of `glBegin' and the corresponding execution of `glEnd'.")
18278
18279 (define-gl-procedures
18280 ((glScissor
18281 (x GLint)
18282 (y GLint)
18283 (width GLsizei)
18284 (height GLsizei)
18285 ->
18286 void))
18287 "Define the scissor box.
18288
18289 X
18290 Y
18291
18292 Specify the lower left corner of the scissor box. Initially (0, 0).
18293
18294 WIDTH
18295 HEIGHT
18296
18297 Specify the width and height of the scissor box. When a GL context
18298 is first attached to a window, WIDTH and HEIGHT are set to the
18299 dimensions of that window.
18300
18301 `glScissor' defines a rectangle, called the scissor box, in window
18302 coordinates. The first two arguments, X and Y, specify the lower left
18303 corner of the box. WIDTH and HEIGHT specify the width and height of the
18304 box.
18305
18306 To enable and disable the scissor test, call `glEnable' and `glDisable'
18307 with argument `GL_SCISSOR_TEST'. The test is initially disabled. While
18308 the test is enabled, only pixels that lie within the scissor box can be
18309 modified by drawing commands. Window coordinates have integer values at
18310 the shared corners of frame buffer pixels. `glScissor(0,0,1,1)' allows
18311 modification of only the lower left pixel in the window, and
18312 `glScissor(0,0,0,0)' doesn't allow modification of any pixels in the
18313 window.
18314
18315 When the scissor test is disabled, it is as though the scissor box
18316 includes the entire window.
18317
18318 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
18319
18320 `GL_INVALID_OPERATION' is generated if `glScissor' is executed between
18321 the execution of `glBegin' and the corresponding execution of `glEnd'.")
18322
18323 (define-gl-procedures
18324 ((glSecondaryColorPointer
18325 (size GLint)
18326 (type GLenum)
18327 (stride GLsizei)
18328 (pointer const-GLvoid-*)
18329 ->
18330 void))
18331 "Define an array of secondary colors.
18332
18333 SIZE
18334 Specifies the number of components per color. Must be 3.
18335
18336 TYPE
18337 Specifies the data type of each color component in the array.
18338 Symbolic constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
18339 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', or
18340 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
18341
18342 STRIDE
18343 Specifies the byte offset between consecutive colors. If STRIDE is
18344 0, the colors are understood to be tightly packed in the array. The
18345 initial value is 0.
18346
18347 POINTER
18348 Specifies a pointer to the first component of the first color
18349 element in the array. The initial value is 0.
18350
18351 `glSecondaryColorPointer' specifies the location and data format of an
18352 array of color components to use when rendering. SIZE specifies the
18353 number of components per color, and must be 3. TYPE specifies the data
18354 type of each color component, and STRIDE specifies the byte stride from
18355 one color to the next, allowing vertices and attributes to be packed
18356 into a single array or stored in separate arrays.
18357
18358 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
18359 target (see `glBindBuffer') while a secondary color array is specified,
18360 POINTER is treated as a byte offset into the buffer object's data store.
18361 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
18362 secondary color vertex array client-side state
18363 (`GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING').
18364
18365 When a secondary color array is specified, SIZE, TYPE, STRIDE, and
18366 POINTER are saved as client-side state, in addition to the current
18367 vertex array buffer object binding.
18368
18369 To enable and disable the secondary color array, call
18370 `glEnableClientState' and `glDisableClientState' with the argument
18371 `GL_SECONDARY_COLOR_ARRAY'. If enabled, the secondary color array is
18372 used when `glArrayElement', `glDrawArrays', `glMultiDrawArrays',
18373 `glDrawElements', `glMultiDrawElements', or `glDrawRangeElements' is
18374 called.
18375
18376 `GL_INVALID_VALUE' is generated if SIZE is not 3.
18377
18378 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
18379
18380 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
18381
18382 (define-gl-procedures
18383 ((glSecondaryColor3i
18384 (red GLint)
18385 (green GLint)
18386 (blue GLint)
18387 ->
18388 void)
18389 (glSecondaryColor3f
18390 (red GLfloat)
18391 (green GLfloat)
18392 (blue GLfloat)
18393 ->
18394 void)
18395 (glSecondaryColor3ui
18396 (red GLuint)
18397 (green GLuint)
18398 (blue GLuint)
18399 ->
18400 void))
18401 "Set the current secondary color.
18402
18403 RED
18404 GREEN
18405
18406 BLUE
18407
18408 Specify new red, green, and blue values for the current secondary
18409 color.
18410
18411 The GL stores both a primary four-valued RGBA color and a secondary
18412 four-valued RGBA color (where alpha is always set to 0.0) that is
18413 associated with every vertex.
18414
18415 The secondary color is interpolated and applied to each fragment during
18416 rasterization when `GL_COLOR_SUM' is enabled. When lighting is enabled,
18417 and `GL_SEPARATE_SPECULAR_COLOR' is specified, the value of the
18418 secondary color is assigned the value computed from the specular term of
18419 the lighting computation. Both the primary and secondary current colors
18420 are applied to each fragment, regardless of the state of `GL_COLOR_SUM',
18421 under such conditions. When `GL_SEPARATE_SPECULAR_COLOR' is specified,
18422 the value returned from querying the current secondary color is
18423 undefined.
18424
18425 `glSecondaryColor3b', `glSecondaryColor3s', and `glSecondaryColor3i'
18426 take three signed byte, short, or long integers as arguments. When *v*
18427 is appended to the name, the color commands can take a pointer to an
18428 array of such values.
18429
18430 Color values are stored in floating-point format, with unspecified
18431 mantissa and exponent sizes. Unsigned integer color components, when
18432 specified, are linearly mapped to floating-point values such that the
18433 largest representable value maps to 1.0 (full intensity), and 0 maps to
18434 0.0 (zero intensity). Signed integer color components, when specified,
18435 are linearly mapped to floating-point values such that the most positive
18436 representable value maps to 1.0, and the most negative representable
18437 value maps to -1.0 . (Note that this mapping does not convert 0
18438 precisely to 0.0). Floating-point values are mapped directly.
18439
18440 Neither floating-point nor signed integer values are clamped to the
18441 range [0,1] before the current color is updated. However, color
18442 components are clamped to this range before they are interpolated or
18443 written into a color buffer.")
18444
18445 (define-gl-procedures
18446 ((glSelectBuffer
18447 (size GLsizei)
18448 (buffer GLuint-*)
18449 ->
18450 void))
18451 "Establish a buffer for selection mode values.
18452
18453 SIZE
18454 Specifies the size of BUFFER.
18455
18456 BUFFER
18457 Returns the selection data.
18458
18459 `glSelectBuffer' has two arguments: BUFFER is a pointer to an array of
18460 unsigned integers, and SIZE indicates the size of the array. BUFFER
18461 returns values from the name stack (see `glInitNames', `glLoadName',
18462 `glPushName') when the rendering mode is `GL_SELECT' (see
18463 `glRenderMode'). `glSelectBuffer' must be issued before selection mode
18464 is enabled, and it must not be issued while the rendering mode is
18465 `GL_SELECT'.
18466
18467 A programmer can use selection to determine which primitives are drawn
18468 into some region of a window. The region is defined by the current
18469 modelview and perspective matrices.
18470
18471 In selection mode, no pixel fragments are produced from rasterization.
18472 Instead, if a primitive or a raster position intersects the clipping
18473 volume defined by the viewing frustum and the user-defined clipping
18474 planes, this primitive causes a selection hit. (With polygons, no hit
18475 occurs if the polygon is culled.) When a change is made to the name
18476 stack, or when `glRenderMode' is called, a hit record is copied to
18477 BUFFER if any hits have occurred since the last such event (name stack
18478 change or `glRenderMode' call). The hit record consists of the number of
18479 names in the name stack at the time of the event, followed by the
18480 minimum and maximum depth values of all vertices that hit since the
18481 previous event, followed by the name stack contents, bottom name first.
18482
18483 Depth values (which are in the range [0,1]) are multiplied by 2^32-1 ,
18484 before being placed in the hit record.
18485
18486 An internal index into BUFFER is reset to 0 whenever selection mode is
18487 entered. Each time a hit record is copied into BUFFER, the index is
18488 incremented to point to the cell just past the end of the block of
18489 names\\(emthat is, to the next available cell If the hit record is larger
18490 than the number of remaining locations in BUFFER, as much data as can
18491 fit is copied, and the overflow flag is set. If the name stack is empty
18492 when a hit record is copied, that record consists of 0 followed by the
18493 minimum and maximum depth values.
18494
18495 To exit selection mode, call `glRenderMode' with an argument other than
18496 `GL_SELECT'. Whenever `glRenderMode' is called while the render mode is
18497 `GL_SELECT', it returns the number of hit records copied to BUFFER,
18498 resets the overflow flag and the selection buffer pointer, and
18499 initializes the name stack to be empty. If the overflow bit was set when
18500 `glRenderMode' was called, a negative hit record count is returned.
18501
18502 `GL_INVALID_VALUE' is generated if SIZE is negative.
18503
18504 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is called while
18505 the render mode is `GL_SELECT', or if `glRenderMode' is called with
18506 argument `GL_SELECT' before `glSelectBuffer' is called at least once.
18507
18508 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is executed
18509 between the execution of `glBegin' and the corresponding execution of
18510 `glEnd'.")
18511
18512 (define-gl-procedures
18513 ((glSeparableFilter2D
18514 (target GLenum)
18515 (internalformat GLenum)
18516 (width GLsizei)
18517 (height GLsizei)
18518 (format GLenum)
18519 (type GLenum)
18520 (row const-GLvoid-*)
18521 (column const-GLvoid-*)
18522 ->
18523 void))
18524 "Define a separable two-dimensional convolution filter.
18525
18526 TARGET
18527 Must be `GL_SEPARABLE_2D'.
18528
18529 INTERNALFORMAT
18530 The internal format of the convolution filter kernel. The allowable
18531 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
18532 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
18533 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
18534 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
18535 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
18536 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
18537 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
18538 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
18539 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
18540 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
18541 `GL_RGBA12', or `GL_RGBA16'.
18542
18543 WIDTH
18544 The number of elements in the pixel array referenced by ROW. (This
18545 is the width of the separable filter kernel.)
18546
18547 HEIGHT
18548 The number of elements in the pixel array referenced by COLUMN.
18549 (This is the height of the separable filter kernel.)
18550
18551 FORMAT
18552 The format of the pixel data in ROW and COLUMN. The allowable
18553 values are `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
18554 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_INTENSITY', `GL_LUMINANCE', and
18555 `GL_LUMINANCE_ALPHA'.
18556
18557 TYPE
18558 The type of the pixel data in ROW and COLUMN. Symbolic constants
18559 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
18560 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
18561 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
18562 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
18563 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
18564 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
18565 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
18566 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
18567 are accepted.
18568
18569 ROW
18570 Pointer to a one-dimensional array of pixel data that is processed
18571 to build the row filter kernel.
18572
18573 COLUMN
18574 Pointer to a one-dimensional array of pixel data that is processed
18575 to build the column filter kernel.
18576
18577 `glSeparableFilter2D' builds a two-dimensional separable convolution
18578 filter kernel from two arrays of pixels.
18579
18580 The pixel arrays specified by (WIDTH, FORMAT, TYPE, ROW) and (HEIGHT,
18581 FORMAT, TYPE, COLUMN) are processed just as if they had been passed to
18582 `glDrawPixels', but processing stops after the final expansion to RGBA
18583 is completed.
18584
18585 If a non-zero named buffer object is bound to the
18586 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
18587 filter is specified, ROW and COLUMN are treated as byte offsets into the
18588 buffer object's data store.
18589
18590 Next, the R, G, B, and A components of all pixels in both arrays are
18591 scaled by the four separable 2D `GL_CONVOLUTION_FILTER_SCALE' parameters
18592 and biased by the four separable 2D `GL_CONVOLUTION_FILTER_BIAS'
18593 parameters. (The scale and bias parameters are set by
18594 `glConvolutionParameter' using the `GL_SEPARABLE_2D' target and the
18595 names `GL_CONVOLUTION_FILTER_SCALE' and `GL_CONVOLUTION_FILTER_BIAS'.
18596 The parameters themselves are vectors of four values that are applied to
18597 red, green, blue, and alpha, in that order.) The R, G, B, and A values
18598 are not clamped to [0,1] at any time during this process.
18599
18600 Each pixel is then converted to the internal format specified by
18601 INTERNALFORMAT. This conversion simply maps the component values of the
18602 pixel (R, G, B, and A) to the values included in the internal format
18603 (red, green, blue, alpha, luminance, and intensity). The mapping is as
18604 follows:
18605
18606 *Internal Format*
18607 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
18608
18609 `GL_LUMINANCE'
18610 , , , , R ,
18611
18612 `GL_LUMINANCE_ALPHA'
18613 , , , A , R ,
18614
18615 `GL_INTENSITY'
18616 , , , , , R
18617
18618 `GL_RGB'
18619 R , G , B , , ,
18620
18621 `GL_RGBA'
18622 R , G , B , A , ,
18623
18624 The red, green, blue, alpha, luminance, and/or intensity components of
18625 the resulting pixels are stored in floating-point rather than integer
18626 format. They form two one-dimensional filter kernel images. The row
18627 image is indexed by coordinate I starting at zero and increasing from
18628 left to right. Each location in the row image is derived from element I
18629 of ROW. The column image is indexed by coordinate J starting at zero and
18630 increasing from bottom to top. Each location in the column image is
18631 derived from element J of COLUMN.
18632
18633 Note that after a convolution is performed, the resulting color
18634 components are also scaled by their corresponding
18635 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
18636 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
18637 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
18638 set by `glPixelTransfer'.
18639
18640 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SEPARABLE_2D'.
18641
18642 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
18643 allowable values.
18644
18645 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
18646 values.
18647
18648 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
18649 values.
18650
18651 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
18652 than the maximum supported value. This value may be queried with
18653 `glGetConvolutionParameter' using target `GL_SEPARABLE_2D' and name
18654 `GL_MAX_CONVOLUTION_WIDTH'.
18655
18656 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
18657 than the maximum supported value. This value may be queried with
18658 `glGetConvolutionParameter' using target `GL_SEPARABLE_2D' and name
18659 `GL_MAX_CONVOLUTION_HEIGHT'.
18660
18661 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
18662 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
18663 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
18664 is not `GL_RGB'.
18665
18666 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
18667 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
18668 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
18669 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
18670 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
18671 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
18672
18673 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18674 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
18675 data store is currently mapped.
18676
18677 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18678 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
18679 unpacked from the buffer object such that the memory reads required
18680 would exceed the data store size.
18681
18682 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18683 bound to the `GL_PIXEL_UNPACK_BUFFER' target and ROW or COLUMN is not
18684 evenly divisible into the number of bytes needed to store in memory a
18685 datum indicated by TYPE.
18686
18687 `GL_INVALID_OPERATION' is generated if `glSeparableFilter2D' is executed
18688 between the execution of `glBegin' and the corresponding execution of
18689 `glEnd'.")
18690
18691 (define-gl-procedures
18692 ((glShadeModel (mode GLenum) -> void))
18693 "Select flat or smooth shading.
18694
18695 MODE
18696 Specifies a symbolic value representing a shading technique.
18697 Accepted values are `GL_FLAT' and `GL_SMOOTH'. The initial value is
18698 `GL_SMOOTH'.
18699
18700 GL primitives can have either flat or smooth shading. Smooth shading,
18701 the default, causes the computed colors of vertices to be interpolated
18702 as the primitive is rasterized, typically assigning different colors to
18703 each resulting pixel fragment. Flat shading selects the computed color
18704 of just one vertex and assigns it to all the pixel fragments generated
18705 by rasterizing a single primitive. In either case, the computed color of
18706 a vertex is the result of lighting if lighting is enabled, or it is the
18707 current color at the time the vertex was specified if lighting is
18708 disabled.
18709
18710 Flat and smooth shading are indistinguishable for points. Starting when
18711 `glBegin' is issued and counting vertices and primitives from 1, the GL
18712 gives each flat-shaded line segment I the computed color of vertex I+1 ,
18713 its second vertex. Counting similarly from 1, the GL gives each
18714 flat-shaded polygon the computed color of the vertex listed in the
18715 following table. This is the last vertex to specify the polygon in all
18716 cases except single polygons, where the first vertex specifies the
18717 flat-shaded color.
18718
18719
18720
18721 * Primitive Type of Polygon I *
18722 *Vertex*
18723
18724 Single polygon (I==1 )
18725 1
18726
18727 Triangle strip
18728 I+2
18729
18730 Triangle fan
18731 I+2
18732
18733 Independent triangle
18734 3\u2062I
18735
18736 Quad strip
18737 2\u2062I+2
18738
18739 Independent quad
18740 4\u2062I
18741
18742 Flat and smooth shading are specified by `glShadeModel' with MODE set to
18743 `GL_FLAT' and `GL_SMOOTH', respectively.
18744
18745 `GL_INVALID_ENUM' is generated if MODE is any value other than `GL_FLAT'
18746 or `GL_SMOOTH'.
18747
18748 `GL_INVALID_OPERATION' is generated if `glShadeModel' is executed
18749 between the execution of `glBegin' and the corresponding execution of
18750 `glEnd'.")
18751
18752 (define-gl-procedures
18753 ((glShaderSource
18754 (shader GLuint)
18755 (count GLsizei)
18756 (string const-GLchar-**)
18757 (length const-GLint-*)
18758 ->
18759 void))
18760 "Replaces the source code in a shader object.
18761
18762 SHADER
18763 Specifies the handle of the shader object whose source code is to
18764 be replaced.
18765
18766 COUNT
18767 Specifies the number of elements in the STRING and LENGTH arrays.
18768
18769 STRING
18770 Specifies an array of pointers to strings containing the source
18771 code to be loaded into the shader.
18772
18773 LENGTH
18774 Specifies an array of string lengths.
18775
18776 `glShaderSource' sets the source code in SHADER to the source code in
18777 the array of strings specified by STRING. Any source code previously
18778 stored in the shader object is completely replaced. The number of
18779 strings in the array is specified by COUNT. If LENGTH is `NULL', each
18780 string is assumed to be null terminated. If LENGTH is a value other than
18781 `NULL', it points to an array containing a string length for each of the
18782 corresponding elements of STRING. Each element in the LENGTH array may
18783 contain the length of the corresponding string (the null character is
18784 not counted as part of the string length) or a value less than 0 to
18785 indicate that the string is null terminated. The source code strings are
18786 not scanned or parsed at this time; they are simply copied into the
18787 specified shader object.
18788
18789 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
18790 OpenGL.
18791
18792 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
18793
18794 `GL_INVALID_VALUE' is generated if COUNT is less than 0.
18795
18796 `GL_INVALID_OPERATION' is generated if `glShaderSource' is executed
18797 between the execution of `glBegin' and the corresponding execution of
18798 `glEnd'.")
18799
18800 (define-gl-procedures
18801 ((glStencilFuncSeparate
18802 (face GLenum)
18803 (func GLenum)
18804 (ref GLint)
18805 (mask GLuint)
18806 ->
18807 void))
18808 "Set front and/or back function and reference value for stencil testing.
18809
18810 FACE
18811 Specifies whether front and/or back stencil state is updated. Three
18812 symbolic constants are valid: `GL_FRONT', `GL_BACK', and
18813 `GL_FRONT_AND_BACK'.
18814
18815 FUNC
18816 Specifies the test function. Eight symbolic constants are valid:
18817 `GL_NEVER', `GL_LESS', `GL_LEQUAL', `GL_GREATER', `GL_GEQUAL',
18818 `GL_EQUAL', `GL_NOTEQUAL', and `GL_ALWAYS'. The initial value is
18819 `GL_ALWAYS'.
18820
18821 REF
18822 Specifies the reference value for the stencil test. REF is clamped
18823 to the range [0,2^N-1] , where N is the number of bitplanes in the
18824 stencil buffer. The initial value is 0.
18825
18826 MASK
18827 Specifies a mask that is ANDed with both the reference value and
18828 the stored stencil value when the test is done. The initial value
18829 is all 1's.
18830
18831 Stenciling, like depth-buffering, enables and disables drawing on a
18832 per-pixel basis. You draw into the stencil planes using GL drawing
18833 primitives, then render geometry and images, using the stencil planes to
18834 mask out portions of the screen. Stenciling is typically used in
18835 multipass rendering algorithms to achieve special effects, such as
18836 decals, outlining, and constructive solid geometry rendering.
18837
18838 The stencil test conditionally eliminates a pixel based on the outcome
18839 of a comparison between the reference value and the value in the stencil
18840 buffer. To enable and disable the test, call `glEnable' and `glDisable'
18841 with argument `GL_STENCIL_TEST'. To specify actions based on the outcome
18842 of the stencil test, call `glStencilOp' or `glStencilOpSeparate'.
18843
18844 There can be two separate sets of FUNC, REF, and MASK parameters; one
18845 affects back-facing polygons, and the other affects front-facing
18846 polygons as well as other non-polygon primitives. `glStencilFunc' sets
18847 both front and back stencil state to the same values, as if
18848 `glStencilFuncSeparate' were called with FACE set to
18849 `GL_FRONT_AND_BACK'.
18850
18851 FUNC is a symbolic constant that determines the stencil comparison
18852 function. It accepts one of eight values, shown in the following list.
18853 REF is an integer reference value that is used in the stencil
18854 comparison. It is clamped to the range [0,2^N-1] , where N is the number
18855 of bitplanes in the stencil buffer. MASK is bitwise ANDed with both the
18856 reference value and the stored stencil value, with the ANDed values
18857 participating in the comparison.
18858
18859 If STENCIL represents the value stored in the corresponding stencil
18860 buffer location, the following list shows the effect of each comparison
18861 function that can be specified by FUNC. Only if the comparison succeeds
18862 is the pixel passed through to the next stage in the rasterization
18863 process (see `glStencilOp'). All tests treat STENCIL values as unsigned
18864 integers in the range [0,2^N-1] , where N is the number of bitplanes in
18865 the stencil buffer.
18866
18867 The following values are accepted by FUNC:
18868
18869 `GL_NEVER'
18870 Always fails.
18871
18872 `GL_LESS'
18873 Passes if ( REF & MASK ) < ( STENCIL & MASK ).
18874
18875 `GL_LEQUAL'
18876 Passes if ( REF & MASK ) <= ( STENCIL & MASK ).
18877
18878 `GL_GREATER'
18879 Passes if ( REF & MASK ) > ( STENCIL & MASK ).
18880
18881 `GL_GEQUAL'
18882 Passes if ( REF & MASK ) >= ( STENCIL & MASK ).
18883
18884 `GL_EQUAL'
18885 Passes if ( REF & MASK ) = ( STENCIL & MASK ).
18886
18887 `GL_NOTEQUAL'
18888 Passes if ( REF & MASK ) != ( STENCIL & MASK ).
18889
18890 `GL_ALWAYS'
18891 Always passes.
18892
18893 `GL_INVALID_ENUM' is generated if FUNC is not one of the eight accepted
18894 values.
18895
18896 `GL_INVALID_OPERATION' is generated if `glStencilFuncSeparate' is
18897 executed between the execution of `glBegin' and the corresponding
18898 execution of `glEnd'.")
18899
18900 (define-gl-procedures
18901 ((glStencilFunc
18902 (func GLenum)
18903 (ref GLint)
18904 (mask GLuint)
18905 ->
18906 void))
18907 "Set front and back function and reference value for stencil testing.
18908
18909 FUNC
18910 Specifies the test function. Eight symbolic constants are valid:
18911 `GL_NEVER', `GL_LESS', `GL_LEQUAL', `GL_GREATER', `GL_GEQUAL',
18912 `GL_EQUAL', `GL_NOTEQUAL', and `GL_ALWAYS'. The initial value is
18913 `GL_ALWAYS'.
18914
18915 REF
18916 Specifies the reference value for the stencil test. REF is clamped
18917 to the range [0,2^N-1] , where N is the number of bitplanes in the
18918 stencil buffer. The initial value is 0.
18919
18920 MASK
18921 Specifies a mask that is ANDed with both the reference value and
18922 the stored stencil value when the test is done. The initial value
18923 is all 1's.
18924
18925 Stenciling, like depth-buffering, enables and disables drawing on a
18926 per-pixel basis. Stencil planes are first drawn into using GL drawing
18927 primitives, then geometry and images are rendered using the stencil
18928 planes to mask out portions of the screen. Stenciling is typically used
18929 in multipass rendering algorithms to achieve special effects, such as
18930 decals, outlining, and constructive solid geometry rendering.
18931
18932 The stencil test conditionally eliminates a pixel based on the outcome
18933 of a comparison between the reference value and the value in the stencil
18934 buffer. To enable and disable the test, call `glEnable' and `glDisable'
18935 with argument `GL_STENCIL_TEST'. To specify actions based on the outcome
18936 of the stencil test, call `glStencilOp' or `glStencilOpSeparate'.
18937
18938 There can be two separate sets of FUNC, REF, and MASK parameters; one
18939 affects back-facing polygons, and the other affects front-facing
18940 polygons as well as other non-polygon primitives. `glStencilFunc' sets
18941 both front and back stencil state to the same values. Use
18942 `glStencilFuncSeparate' to set front and back stencil state to different
18943 values.
18944
18945 FUNC is a symbolic constant that determines the stencil comparison
18946 function. It accepts one of eight values, shown in the following list.
18947 REF is an integer reference value that is used in the stencil
18948 comparison. It is clamped to the range [0,2^N-1] , where N is the number
18949 of bitplanes in the stencil buffer. MASK is bitwise ANDed with both the
18950 reference value and the stored stencil value, with the ANDed values
18951 participating in the comparison.
18952
18953 If STENCIL represents the value stored in the corresponding stencil
18954 buffer location, the following list shows the effect of each comparison
18955 function that can be specified by FUNC. Only if the comparison succeeds
18956 is the pixel passed through to the next stage in the rasterization
18957 process (see `glStencilOp'). All tests treat STENCIL values as unsigned
18958 integers in the range [0,2^N-1] , where N is the number of bitplanes in
18959 the stencil buffer.
18960
18961 The following values are accepted by FUNC:
18962
18963 `GL_NEVER'
18964 Always fails.
18965
18966 `GL_LESS'
18967 Passes if ( REF & MASK ) < ( STENCIL & MASK ).
18968
18969 `GL_LEQUAL'
18970 Passes if ( REF & MASK ) <= ( STENCIL & MASK ).
18971
18972 `GL_GREATER'
18973 Passes if ( REF & MASK ) > ( STENCIL & MASK ).
18974
18975 `GL_GEQUAL'
18976 Passes if ( REF & MASK ) >= ( STENCIL & MASK ).
18977
18978 `GL_EQUAL'
18979 Passes if ( REF & MASK ) = ( STENCIL & MASK ).
18980
18981 `GL_NOTEQUAL'
18982 Passes if ( REF & MASK ) != ( STENCIL & MASK ).
18983
18984 `GL_ALWAYS'
18985 Always passes.
18986
18987 `GL_INVALID_ENUM' is generated if FUNC is not one of the eight accepted
18988 values.
18989
18990 `GL_INVALID_OPERATION' is generated if `glStencilFunc' is executed
18991 between the execution of `glBegin' and the corresponding execution of
18992 `glEnd'.")
18993
18994 (define-gl-procedures
18995 ((glStencilMaskSeparate
18996 (face GLenum)
18997 (mask GLuint)
18998 ->
18999 void))
19000 "Control the front and/or back writing of individual bits in the stencil
19001 planes.
19002
19003 FACE
19004 Specifies whether the front and/or back stencil writemask is
19005 updated. Three symbolic constants are valid: `GL_FRONT', `GL_BACK',
19006 and `GL_FRONT_AND_BACK'.
19007
19008 MASK
19009 Specifies a bit mask to enable and disable writing of individual
19010 bits in the stencil planes. Initially, the mask is all 1's.
19011
19012 `glStencilMaskSeparate' controls the writing of individual bits in the
19013 stencil planes. The least significant N bits of MASK, where N is the
19014 number of bits in the stencil buffer, specify a mask. Where a 1 appears
19015 in the mask, it's possible to write to the corresponding bit in the
19016 stencil buffer. Where a 0 appears, the corresponding bit is
19017 write-protected. Initially, all bits are enabled for writing.
19018
19019 There can be two separate MASK writemasks; one affects back-facing
19020 polygons, and the other affects front-facing polygons as well as other
19021 non-polygon primitives. `glStencilMask' sets both front and back stencil
19022 writemasks to the same values, as if `glStencilMaskSeparate' were called
19023 with FACE set to `GL_FRONT_AND_BACK'.
19024
19025 `GL_INVALID_OPERATION' is generated if `glStencilMaskSeparate' is
19026 executed between the execution of `glBegin' and the corresponding
19027 execution of `glEnd'.")
19028
19029 (define-gl-procedures
19030 ((glStencilMask (mask GLuint) -> void))
19031 "Control the front and back writing of individual bits in the stencil
19032 planes.
19033
19034 MASK
19035 Specifies a bit mask to enable and disable writing of individual
19036 bits in the stencil planes. Initially, the mask is all 1's.
19037
19038 `glStencilMask' controls the writing of individual bits in the stencil
19039 planes. The least significant N bits of MASK, where N is the number of
19040 bits in the stencil buffer, specify a mask. Where a 1 appears in the
19041 mask, it's possible to write to the corresponding bit in the stencil
19042 buffer. Where a 0 appears, the corresponding bit is write-protected.
19043 Initially, all bits are enabled for writing.
19044
19045 There can be two separate MASK writemasks; one affects back-facing
19046 polygons, and the other affects front-facing polygons as well as other
19047 non-polygon primitives. `glStencilMask' sets both front and back stencil
19048 writemasks to the same values. Use `glStencilMaskSeparate' to set front
19049 and back stencil writemasks to different values.
19050
19051 `GL_INVALID_OPERATION' is generated if `glStencilMask' is executed
19052 between the execution of `glBegin' and the corresponding execution of
19053 `glEnd'.")
19054
19055 (define-gl-procedures
19056 ((glStencilOpSeparate
19057 (face GLenum)
19058 (sfail GLenum)
19059 (dpfail GLenum)
19060 (dppass GLenum)
19061 ->
19062 void))
19063 "Set front and/or back stencil test actions.
19064
19065 FACE
19066 Specifies whether front and/or back stencil state is updated. Three
19067 symbolic constants are valid: `GL_FRONT', `GL_BACK', and
19068 `GL_FRONT_AND_BACK'.
19069
19070 SFAIL
19071 Specifies the action to take when the stencil test fails. Eight
19072 symbolic constants are accepted: `GL_KEEP', `GL_ZERO',
19073 `GL_REPLACE', `GL_INCR', `GL_INCR_WRAP', `GL_DECR', `GL_DECR_WRAP',
19074 and `GL_INVERT'. The initial value is `GL_KEEP'.
19075
19076 DPFAIL
19077 Specifies the stencil action when the stencil test passes, but the
19078 depth test fails. DPFAIL accepts the same symbolic constants as
19079 SFAIL. The initial value is `GL_KEEP'.
19080
19081 DPPASS
19082 Specifies the stencil action when both the stencil test and the
19083 depth test pass, or when the stencil test passes and either there
19084 is no depth buffer or depth testing is not enabled. DPPASS accepts
19085 the same symbolic constants as SFAIL. The initial value is
19086 `GL_KEEP'.
19087
19088 Stenciling, like depth-buffering, enables and disables drawing on a
19089 per-pixel basis. You draw into the stencil planes using GL drawing
19090 primitives, then render geometry and images, using the stencil planes to
19091 mask out portions of the screen. Stenciling is typically used in
19092 multipass rendering algorithms to achieve special effects, such as
19093 decals, outlining, and constructive solid geometry rendering.
19094
19095 The stencil test conditionally eliminates a pixel based on the outcome
19096 of a comparison between the value in the stencil buffer and a reference
19097 value. To enable and disable the test, call `glEnable' and `glDisable'
19098 with argument `GL_STENCIL_TEST'; to control it, call `glStencilFunc' or
19099 `glStencilFuncSeparate'.
19100
19101 There can be two separate sets of SFAIL, DPFAIL, and DPPASS parameters;
19102 one affects back-facing polygons, and the other affects front-facing
19103 polygons as well as other non-polygon primitives. `glStencilOp' sets
19104 both front and back stencil state to the same values, as if
19105 `glStencilOpSeparate' were called with FACE set to `GL_FRONT_AND_BACK'.
19106
19107 `glStencilOpSeparate' takes three arguments that indicate what happens
19108 to the stored stencil value while stenciling is enabled. If the stencil
19109 test fails, no change is made to the pixel's color or depth buffers, and
19110 SFAIL specifies what happens to the stencil buffer contents. The
19111 following eight actions are possible.
19112
19113 `GL_KEEP'
19114 Keeps the current value.
19115
19116 `GL_ZERO'
19117 Sets the stencil buffer value to 0.
19118
19119 `GL_REPLACE'
19120 Sets the stencil buffer value to REF, as specified by
19121 `glStencilFunc'.
19122
19123 `GL_INCR'
19124 Increments the current stencil buffer value. Clamps to the maximum
19125 representable unsigned value.
19126
19127 `GL_INCR_WRAP'
19128 Increments the current stencil buffer value. Wraps stencil buffer
19129 value to zero when incrementing the maximum representable unsigned
19130 value.
19131
19132 `GL_DECR'
19133 Decrements the current stencil buffer value. Clamps to 0.
19134
19135 `GL_DECR_WRAP'
19136 Decrements the current stencil buffer value. Wraps stencil buffer
19137 value to the maximum representable unsigned value when decrementing
19138 a stencil buffer value of zero.
19139
19140 `GL_INVERT'
19141 Bitwise inverts the current stencil buffer value.
19142
19143 Stencil buffer values are treated as unsigned integers. When incremented
19144 and decremented, values are clamped to 0 and 2^N-1 , where N is the
19145 value returned by querying `GL_STENCIL_BITS'.
19146
19147 The other two arguments to `glStencilOpSeparate' specify stencil buffer
19148 actions that depend on whether subsequent depth buffer tests succeed
19149 (DPPASS) or fail (DPFAIL) (see `glDepthFunc'). The actions are specified
19150 using the same eight symbolic constants as SFAIL. Note that DPFAIL is
19151 ignored when there is no depth buffer, or when the depth buffer is not
19152 enabled. In these cases, SFAIL and DPPASS specify stencil action when
19153 the stencil test fails and passes, respectively.
19154
19155 `GL_INVALID_ENUM' is generated if FACE is any value other than
19156 `GL_FRONT', `GL_BACK', or `GL_FRONT_AND_BACK'.
19157
19158 `GL_INVALID_ENUM' is generated if SFAIL, DPFAIL, or DPPASS is any value
19159 other than the eight defined constant values.
19160
19161 `GL_INVALID_OPERATION' is generated if `glStencilOpSeparate' is executed
19162 between the execution of `glBegin' and the corresponding execution of
19163 `glEnd'.")
19164
19165 (define-gl-procedures
19166 ((glStencilOp
19167 (sfail GLenum)
19168 (dpfail GLenum)
19169 (dppass GLenum)
19170 ->
19171 void))
19172 "Set front and back stencil test actions.
19173
19174 SFAIL
19175 Specifies the action to take when the stencil test fails. Eight
19176 symbolic constants are accepted: `GL_KEEP', `GL_ZERO',
19177 `GL_REPLACE', `GL_INCR', `GL_INCR_WRAP', `GL_DECR', `GL_DECR_WRAP',
19178 and `GL_INVERT'. The initial value is `GL_KEEP'.
19179
19180 DPFAIL
19181 Specifies the stencil action when the stencil test passes, but the
19182 depth test fails. DPFAIL accepts the same symbolic constants as
19183 SFAIL. The initial value is `GL_KEEP'.
19184
19185 DPPASS
19186 Specifies the stencil action when both the stencil test and the
19187 depth test pass, or when the stencil test passes and either there
19188 is no depth buffer or depth testing is not enabled. DPPASS accepts
19189 the same symbolic constants as SFAIL. The initial value is
19190 `GL_KEEP'.
19191
19192 Stenciling, like depth-buffering, enables and disables drawing on a
19193 per-pixel basis. You draw into the stencil planes using GL drawing
19194 primitives, then render geometry and images, using the stencil planes to
19195 mask out portions of the screen. Stenciling is typically used in
19196 multipass rendering algorithms to achieve special effects, such as
19197 decals, outlining, and constructive solid geometry rendering.
19198
19199 The stencil test conditionally eliminates a pixel based on the outcome
19200 of a comparison between the value in the stencil buffer and a reference
19201 value. To enable and disable the test, call `glEnable' and `glDisable'
19202 with argument `GL_STENCIL_TEST'; to control it, call `glStencilFunc' or
19203 `glStencilFuncSeparate'.
19204
19205 There can be two separate sets of SFAIL, DPFAIL, and DPPASS parameters;
19206 one affects back-facing polygons, and the other affects front-facing
19207 polygons as well as other non-polygon primitives. `glStencilOp' sets
19208 both front and back stencil state to the same values. Use
19209 `glStencilOpSeparate' to set front and back stencil state to different
19210 values.
19211
19212 `glStencilOp' takes three arguments that indicate what happens to the
19213 stored stencil value while stenciling is enabled. If the stencil test
19214 fails, no change is made to the pixel's color or depth buffers, and
19215 SFAIL specifies what happens to the stencil buffer contents. The
19216 following eight actions are possible.
19217
19218 `GL_KEEP'
19219 Keeps the current value.
19220
19221 `GL_ZERO'
19222 Sets the stencil buffer value to 0.
19223
19224 `GL_REPLACE'
19225 Sets the stencil buffer value to REF, as specified by
19226 `glStencilFunc'.
19227
19228 `GL_INCR'
19229 Increments the current stencil buffer value. Clamps to the maximum
19230 representable unsigned value.
19231
19232 `GL_INCR_WRAP'
19233 Increments the current stencil buffer value. Wraps stencil buffer
19234 value to zero when incrementing the maximum representable unsigned
19235 value.
19236
19237 `GL_DECR'
19238 Decrements the current stencil buffer value. Clamps to 0.
19239
19240 `GL_DECR_WRAP'
19241 Decrements the current stencil buffer value. Wraps stencil buffer
19242 value to the maximum representable unsigned value when decrementing
19243 a stencil buffer value of zero.
19244
19245 `GL_INVERT'
19246 Bitwise inverts the current stencil buffer value.
19247
19248 Stencil buffer values are treated as unsigned integers. When incremented
19249 and decremented, values are clamped to 0 and 2^N-1 , where N is the
19250 value returned by querying `GL_STENCIL_BITS'.
19251
19252 The other two arguments to `glStencilOp' specify stencil buffer actions
19253 that depend on whether subsequent depth buffer tests succeed (DPPASS) or
19254 fail (DPFAIL) (see `glDepthFunc'). The actions are specified using the
19255 same eight symbolic constants as SFAIL. Note that DPFAIL is ignored when
19256 there is no depth buffer, or when the depth buffer is not enabled. In
19257 these cases, SFAIL and DPPASS specify stencil action when the stencil
19258 test fails and passes, respectively.
19259
19260 `GL_INVALID_ENUM' is generated if SFAIL, DPFAIL, or DPPASS is any value
19261 other than the eight defined constant values.
19262
19263 `GL_INVALID_OPERATION' is generated if `glStencilOp' is executed between
19264 the execution of `glBegin' and the corresponding execution of `glEnd'.")
19265
19266 (define-gl-procedures
19267 ((glTexCoordPointer
19268 (size GLint)
19269 (type GLenum)
19270 (stride GLsizei)
19271 (pointer const-GLvoid-*)
19272 ->
19273 void))
19274 "Define an array of texture coordinates.
19275
19276 SIZE
19277 Specifies the number of coordinates per array element. Must be 1,
19278 2, 3, or 4. The initial value is 4.
19279
19280 TYPE
19281 Specifies the data type of each texture coordinate. Symbolic
19282 constants `GL_SHORT', `GL_INT', `GL_FLOAT', or `GL_DOUBLE' are
19283 accepted. The initial value is `GL_FLOAT'.
19284
19285 STRIDE
19286 Specifies the byte offset between consecutive texture coordinate
19287 sets. If STRIDE is 0, the array elements are understood to be
19288 tightly packed. The initial value is 0.
19289
19290 POINTER
19291 Specifies a pointer to the first coordinate of the first texture
19292 coordinate set in the array. The initial value is 0.
19293
19294 `glTexCoordPointer' specifies the location and data format of an array
19295 of texture coordinates to use when rendering. SIZE specifies the number
19296 of coordinates per texture coordinate set, and must be 1, 2, 3, or 4.
19297 TYPE specifies the data type of each texture coordinate, and STRIDE
19298 specifies the byte stride from one texture coordinate set to the next,
19299 allowing vertices and attributes to be packed into a single array or
19300 stored in separate arrays. (Single-array storage may be more efficient
19301 on some implementations; see `glInterleavedArrays'.)
19302
19303 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
19304 target (see `glBindBuffer') while a texture coordinate array is
19305 specified, POINTER is treated as a byte offset into the buffer object's
19306 data store. Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING')
19307 is saved as texture coordinate vertex array client-side state
19308 (`GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING').
19309
19310 When a texture coordinate array is specified, SIZE, TYPE, STRIDE, and
19311 POINTER are saved as client-side state, in addition to the current
19312 vertex array buffer object binding.
19313
19314 To enable and disable a texture coordinate array, call
19315 `glEnableClientState' and `glDisableClientState' with the argument
19316 `GL_TEXTURE_COORD_ARRAY'. If enabled, the texture coordinate array is
19317 used when `glArrayElement', `glDrawArrays', `glMultiDrawArrays',
19318 `glDrawElements', `glMultiDrawElements', or `glDrawRangeElements' is
19319 called.
19320
19321 `GL_INVALID_VALUE' is generated if SIZE is not 1, 2, 3, or 4.
19322
19323 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
19324
19325 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
19326
19327 (define-gl-procedures
19328 ((glTexCoord1i (s GLint) -> void)
19329 (glTexCoord1f (s GLfloat) -> void)
19330 (glTexCoord2i (s GLint) (t GLint) -> void)
19331 (glTexCoord2f (s GLfloat) (t GLfloat) -> void)
19332 (glTexCoord3i
19333 (s GLint)
19334 (t GLint)
19335 (r GLint)
19336 ->
19337 void)
19338 (glTexCoord3f
19339 (s GLfloat)
19340 (t GLfloat)
19341 (r GLfloat)
19342 ->
19343 void)
19344 (glTexCoord4i
19345 (s GLint)
19346 (t GLint)
19347 (r GLint)
19348 (q GLint)
19349 ->
19350 void)
19351 (glTexCoord4f
19352 (s GLfloat)
19353 (t GLfloat)
19354 (r GLfloat)
19355 (q GLfloat)
19356 ->
19357 void))
19358 "Set the current texture coordinates.
19359
19360 S
19361 T
19362
19363 R
19364
19365 Q
19366
19367 Specify S, T, R, and Q texture coordinates. Not all parameters are
19368 present in all forms of the command.
19369
19370 `glTexCoord' specifies texture coordinates in one, two, three, or four
19371 dimensions. `glTexCoord1' sets the current texture coordinates to
19372 (S,001) ; a call to `glTexCoord2' sets them to (S,T01) . Similarly,
19373 `glTexCoord3' specifies the texture coordinates as (S,TR1) , and
19374 `glTexCoord4' defines all four components explicitly as (S,TRQ) .
19375
19376 The current texture coordinates are part of the data that is associated
19377 with each vertex and with the current raster position. Initially, the
19378 values for S, T, R, and Q are (0, 0, 0, 1).")
19379
19380 (define-gl-procedures
19381 ((glTexEnvf
19382 (target GLenum)
19383 (pname GLenum)
19384 (param GLfloat)
19385 ->
19386 void)
19387 (glTexEnvi
19388 (target GLenum)
19389 (pname GLenum)
19390 (param GLint)
19391 ->
19392 void))
19393 "Set texture environment parameters.
19394
19395 TARGET
19396 Specifies a texture environment. May be `GL_TEXTURE_ENV',
19397 `GL_TEXTURE_FILTER_CONTROL' or `GL_POINT_SPRITE'.
19398
19399 PNAME
19400 Specifies the symbolic name of a single-valued texture environment
19401 parameter. May be either `GL_TEXTURE_ENV_MODE',
19402 `GL_TEXTURE_LOD_BIAS', `GL_COMBINE_RGB', `GL_COMBINE_ALPHA',
19403 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
19404 `GL_SRC1_ALPHA', `GL_SRC2_ALPHA', `GL_OPERAND0_RGB',
19405 `GL_OPERAND1_RGB', `GL_OPERAND2_RGB', `GL_OPERAND0_ALPHA',
19406 `GL_OPERAND1_ALPHA', `GL_OPERAND2_ALPHA', `GL_RGB_SCALE',
19407 `GL_ALPHA_SCALE', or `GL_COORD_REPLACE'.
19408
19409 PARAM
19410 Specifies a single symbolic constant, one of `GL_ADD',
19411 `GL_ADD_SIGNED', `GL_INTERPOLATE', `GL_MODULATE', `GL_DECAL',
19412 `GL_BLEND', `GL_REPLACE', `GL_SUBTRACT', `GL_COMBINE',
19413 `GL_TEXTURE', `GL_CONSTANT', `GL_PRIMARY_COLOR', `GL_PREVIOUS',
19414 `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR', `GL_SRC_ALPHA',
19415 `GL_ONE_MINUS_SRC_ALPHA', a single boolean value for the point
19416 sprite texture coordinate replacement, a single floating-point
19417 value for the texture level-of-detail bias, or 1.0, 2.0, or 4.0
19418 when specifying the `GL_RGB_SCALE' or `GL_ALPHA_SCALE'.
19419
19420 A texture environment specifies how texture values are interpreted when
19421 a fragment is textured. When TARGET is `GL_TEXTURE_FILTER_CONTROL',
19422 PNAME must be `GL_TEXTURE_LOD_BIAS'. When TARGET is `GL_TEXTURE_ENV',
19423 PNAME can be `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR',
19424 `GL_COMBINE_RGB', `GL_COMBINE_ALPHA', `GL_RGB_SCALE', `GL_ALPHA_SCALE',
19425 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
19426 `GL_SRC1_ALPHA', or `GL_SRC2_ALPHA'.
19427
19428 If PNAME is `GL_TEXTURE_ENV_MODE', then PARAMS is (or points to) the
19429 symbolic name of a texture function. Six texture functions may be
19430 specified: `GL_ADD', `GL_MODULATE', `GL_DECAL', `GL_BLEND',
19431 `GL_REPLACE', or `GL_COMBINE'.
19432
19433 The following table shows the correspondence of filtered texture values
19434 R_T , G_T , B_T , A_T , L_T , I_T to texture source components. C_S and
19435 A_S are used by the texture functions described below.
19436
19437
19438
19439 Texture Base Internal Format
19440 `C'_S , `A'_S
19441
19442 `GL_ALPHA'
19443 (0, 0, 0) , A_T
19444
19445 `GL_LUMINANCE'
19446 ( L_T , L_T , L_T ) , 1
19447
19448 `GL_LUMINANCE_ALPHA'
19449 ( L_T , L_T , L_T ) , A_T
19450
19451 `GL_INTENSITY'
19452 ( I_T , I_T , I_T ) , I_T
19453
19454 `GL_RGB'
19455 ( R_T , G_T , B_T ) , 1
19456
19457 `GL_RGBA'
19458 ( R_T , G_T , B_T ) , A_T
19459
19460 A texture function acts on the fragment to be textured using the texture
19461 image value that applies to the fragment (see `glTexParameter') and
19462 produces an RGBA color for that fragment. The following table shows how
19463 the RGBA color is produced for each of the first five texture functions
19464 that can be chosen. C is a triple of color values (RGB) and A is the
19465 associated alpha value. RGBA values extracted from a texture image are
19466 in the range [0,1]. The subscript P refers to the color computed from
19467 the previous texture stage (or the incoming fragment if processing
19468 texture stage 0), the subscript S to the texture source color, the
19469 subscript C to the texture environment color, and the subscript V
19470 indicates a value produced by the texture function.
19471
19472
19473
19474 Texture Base Internal Format
19475 `Value', `GL_REPLACE' Function , `GL_MODULATE' Function ,
19476 `GL_DECAL' Function , `GL_BLEND' Function , `GL_ADD' Function
19477
19478 `GL_ALPHA'
19479 C_V= , C_P , C_P , undefined , C_P , C_P
19480
19481
19482 A_V= , A_S , A_P\u2062A_S , , A_V=A_P\u2062A_S , A_P\u2062A_S
19483
19484 `GL_LUMINANCE'
19485 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
19486
19487 (or 1)
19488 A_V= , A_P , A_P , , A_P , A_P
19489
19490 `GL_LUMINANCE_ALPHA'
19491 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
19492
19493 (or 2)
19494 A_V= , A_S , A_P\u2062A_S , , A_P\u2062A_S , A_P\u2062A_S
19495
19496 `GL_INTENSITY'
19497 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
19498
19499
19500 A_V= , A_S , A_P\u2062A_S , , A_P\u2062(1-A_S,)+A_C\u2062A_S , A_P+A_S
19501
19502 `GL_RGB'
19503 C_V= , C_S , C_P\u2062C_S , C_S , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
19504
19505 (or 3)
19506 A_V= , A_P , A_P , A_P , A_P , A_P
19507
19508 `GL_RGBA'
19509 C_V= , C_S , C_P\u2062C_S , C_P\u2062(1-A_S,)+C_S\u2062A_S , C_P\u2062(1-C_S,)+C_C\u2062C_S
19510 , C_P+C_S
19511
19512 (or 4)
19513 A_V= , A_S , A_P\u2062A_S , A_P , A_P\u2062A_S , A_P\u2062A_S
19514
19515 If PNAME is `GL_TEXTURE_ENV_MODE', and PARAMS is `GL_COMBINE', the form
19516 of the texture function depends on the values of `GL_COMBINE_RGB' and
19517 `GL_COMBINE_ALPHA'.
19518
19519 The following describes how the texture sources, as specified by
19520 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
19521 `GL_SRC1_ALPHA', and `GL_SRC2_ALPHA', are combined to produce a final
19522 texture color. In the following tables, `GL_SRC0_c' is represented by
19523 ARG0 , `GL_SRC1_c' is represented by ARG1 , and `GL_SRC2_c' is
19524 represented by ARG2 .
19525
19526 `GL_COMBINE_RGB' accepts any of `GL_REPLACE', `GL_MODULATE', `GL_ADD',
19527 `GL_ADD_SIGNED', `GL_INTERPOLATE', `GL_SUBTRACT', `GL_DOT3_RGB', or
19528 `GL_DOT3_RGBA'.
19529
19530
19531
19532 *`GL_COMBINE_RGB'*
19533 *Texture Function*
19534
19535 `GL_REPLACE'
19536 ARG0
19537
19538 `GL_MODULATE'
19539 ARG0×ARG1
19540
19541 `GL_ADD'
19542 ARG0+ARG1
19543
19544 `GL_ADD_SIGNED'
19545 ARG0+ARG1-0.5
19546
19547 `GL_INTERPOLATE'
19548 ARG0×ARG2+ARG1×(1-ARG2,)
19549
19550 `GL_SUBTRACT'
19551 ARG0-ARG1
19552
19553 `GL_DOT3_RGB' or `GL_DOT3_RGBA'
19554 4×(((ARG0_R,-0.5,)×(ARG1_R,-0.5,),)+((ARG0_G,-0.5,)×(ARG1_G,-0.5,),
19555 )+((ARG0_B,-0.5,)×(ARG1_B,-0.5,),),)
19556
19557 The scalar results for `GL_DOT3_RGB' and `GL_DOT3_RGBA' are placed into
19558 each of the 3 (RGB) or 4 (RGBA) components on output.
19559
19560 Likewise, `GL_COMBINE_ALPHA' accepts any of `GL_REPLACE', `GL_MODULATE',
19561 `GL_ADD', `GL_ADD_SIGNED', `GL_INTERPOLATE', or `GL_SUBTRACT'. The
19562 following table describes how alpha values are combined:
19563
19564
19565
19566 *`GL_COMBINE_ALPHA'*
19567 *Texture Function*
19568
19569 `GL_REPLACE'
19570 ARG0
19571
19572 `GL_MODULATE'
19573 ARG0×ARG1
19574
19575 `GL_ADD'
19576 ARG0+ARG1
19577
19578 `GL_ADD_SIGNED'
19579 ARG0+ARG1-0.5
19580
19581 `GL_INTERPOLATE'
19582 ARG0×ARG2+ARG1×(1-ARG2,)
19583
19584 `GL_SUBTRACT'
19585 ARG0-ARG1
19586
19587 In the following tables, the value C_S represents the color sampled from
19588 the currently bound texture, C_C represents the constant
19589 texture-environment color, C_F represents the primary color of the
19590 incoming fragment, and C_P represents the color computed from the
19591 previous texture stage or C_F if processing texture stage 0. Likewise,
19592 A_S , A_C , A_F , and A_P represent the respective alpha values.
19593
19594 The following table describes the values assigned to ARG0 , ARG1 , and
19595 ARG2 based upon the RGB sources and operands:
19596
19597
19598
19599 *`GL_SRCn_RGB'*
19600 *`GL_OPERANDn_RGB'*, *Argument Value*
19601
19602 `GL_TEXTURE'
19603 `GL_SRC_COLOR', C_S,
19604
19605
19606 `GL_ONE_MINUS_SRC_COLOR', 1-C_S,
19607
19608
19609 `GL_SRC_ALPHA', A_S,
19610
19611
19612 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
19613
19614 `GL_TEXTUREn'
19615 `GL_SRC_COLOR', C_S,
19616
19617
19618 `GL_ONE_MINUS_SRC_COLOR', 1-C_S,
19619
19620
19621 `GL_SRC_ALPHA', A_S,
19622
19623
19624 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
19625
19626 `GL_CONSTANT'
19627 `GL_SRC_COLOR', C_C,
19628
19629
19630 `GL_ONE_MINUS_SRC_COLOR', 1-C_C,
19631
19632
19633 `GL_SRC_ALPHA', A_C,
19634
19635
19636 `GL_ONE_MINUS_SRC_ALPHA', 1-A_C,
19637
19638 `GL_PRIMARY_COLOR'
19639 `GL_SRC_COLOR', C_F,
19640
19641
19642 `GL_ONE_MINUS_SRC_COLOR', 1-C_F,
19643
19644
19645 `GL_SRC_ALPHA', A_F,
19646
19647
19648 `GL_ONE_MINUS_SRC_ALPHA', 1-A_F,
19649
19650 `GL_PREVIOUS'
19651 `GL_SRC_COLOR', C_P,
19652
19653
19654 `GL_ONE_MINUS_SRC_COLOR', 1-C_P,
19655
19656
19657 `GL_SRC_ALPHA', A_P,
19658
19659
19660 `GL_ONE_MINUS_SRC_ALPHA', 1-A_P,
19661
19662 For `GL_TEXTUREn' sources, C_S and A_S represent the color and alpha,
19663 respectively, produced from texture stage N .
19664
19665 The follow table describes the values assigned to ARG0 , ARG1 , and ARG2
19666 based upon the alpha sources and operands:
19667
19668
19669
19670 *`GL_SRCn_ALPHA'*
19671 *`GL_OPERANDn_ALPHA'*, *Argument Value*
19672
19673 `GL_TEXTURE'
19674 `GL_SRC_ALPHA', A_S,
19675
19676
19677 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
19678
19679 `GL_TEXTUREn'
19680 `GL_SRC_ALPHA', A_S,
19681
19682
19683 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
19684
19685 `GL_CONSTANT'
19686 `GL_SRC_ALPHA', A_C,
19687
19688
19689 `GL_ONE_MINUS_SRC_ALPHA', 1-A_C,
19690
19691 `GL_PRIMARY_COLOR'
19692 `GL_SRC_ALPHA', A_F,
19693
19694
19695 `GL_ONE_MINUS_SRC_ALPHA', 1-A_F,
19696
19697 `GL_PREVIOUS'
19698 `GL_SRC_ALPHA', A_P,
19699
19700
19701 `GL_ONE_MINUS_SRC_ALPHA', 1-A_P,
19702
19703 The RGB and alpha results of the texture function are multipled by the
19704 values of `GL_RGB_SCALE' and `GL_ALPHA_SCALE', respectively, and clamped
19705 to the range [0,1] .
19706
19707 If PNAME is `GL_TEXTURE_ENV_COLOR', PARAMS is a pointer to an array that
19708 holds an RGBA color consisting of four values. Integer color components
19709 are interpreted linearly such that the most positive integer maps to
19710 1.0, and the most negative integer maps to -1.0. The values are clamped
19711 to the range [0,1] when they are specified. C_C takes these four values.
19712
19713 If PNAME is `GL_TEXTURE_LOD_BIAS', the value specified is added to the
19714 texture level-of-detail parameter, that selects which mipmap, or mipmaps
19715 depending upon the selected `GL_TEXTURE_MIN_FILTER', will be sampled.
19716
19717 `GL_TEXTURE_ENV_MODE' defaults to `GL_MODULATE' and
19718 `GL_TEXTURE_ENV_COLOR' defaults to (0, 0, 0, 0).
19719
19720 If TARGET is `GL_POINT_SPRITE' and PNAME is `GL_COORD_REPLACE', the
19721 boolean value specified is used to either enable or disable point sprite
19722 texture coordinate replacement. The default value is `GL_FALSE'.
19723
19724 `GL_INVALID_ENUM' is generated when TARGET or PNAME is not one of the
19725 accepted defined values, or when PARAMS should have a defined constant
19726 value (based on the value of PNAME) and does not.
19727
19728 `GL_INVALID_VALUE' is generated if the PARAMS value for `GL_RGB_SCALE'
19729 or `GL_ALPHA_SCALE' are not one of 1.0, 2.0, or 4.0.
19730
19731 `GL_INVALID_OPERATION' is generated if `glTexEnv' is executed between
19732 the execution of `glBegin' and the corresponding execution of `glEnd'.")
19733
19734 (define-gl-procedures
19735 ((glTexGeni
19736 (coord GLenum)
19737 (pname GLenum)
19738 (param GLint)
19739 ->
19740 void)
19741 (glTexGenf
19742 (coord GLenum)
19743 (pname GLenum)
19744 (param GLfloat)
19745 ->
19746 void))
19747 "Control the generation of texture coordinates.
19748
19749 COORD
19750 Specifies a texture coordinate. Must be one of `GL_S', `GL_T',
19751 `GL_R', or `GL_Q'.
19752
19753 PNAME
19754 Specifies the symbolic name of the texture-coordinate generation
19755 function. Must be `GL_TEXTURE_GEN_MODE'.
19756
19757 PARAM
19758 Specifies a single-valued texture generation parameter, one of
19759 `GL_OBJECT_LINEAR', `GL_EYE_LINEAR', `GL_SPHERE_MAP',
19760 `GL_NORMAL_MAP', or `GL_REFLECTION_MAP'.
19761
19762 `glTexGen' selects a texture-coordinate generation function or supplies
19763 coefficients for one of the functions. COORD names one of the (S, T, R,
19764 Q) texture coordinates; it must be one of the symbols `GL_S', `GL_T',
19765 `GL_R', or `GL_Q'. PNAME must be one of three symbolic constants:
19766 `GL_TEXTURE_GEN_MODE', `GL_OBJECT_PLANE', or `GL_EYE_PLANE'. If PNAME is
19767 `GL_TEXTURE_GEN_MODE', then PARAMS chooses a mode, one of
19768 `GL_OBJECT_LINEAR', `GL_EYE_LINEAR', `GL_SPHERE_MAP', `GL_NORMAL_MAP',
19769 or `GL_REFLECTION_MAP'. If PNAME is either `GL_OBJECT_PLANE' or
19770 `GL_EYE_PLANE', PARAMS contains coefficients for the corresponding
19771 texture generation function.
19772
19773 If the texture generation function is `GL_OBJECT_LINEAR', the function
19774
19775 G=P_1×X_O+P_2×Y_O+P_3×Z_O+P_4×W_O
19776
19777 is used, where G is the value computed for the coordinate named in
19778 COORD, P_1 , P_2 , P_3 , and P_4 are the four values supplied in PARAMS,
19779 and X_O , Y_O , Z_O , and W_O are the object coordinates of the vertex.
19780 This function can be used, for example, to texture-map terrain using sea
19781 level as a reference plane (defined by P_1 , P_2 , P_3 , and P_4 ). The
19782 altitude of a terrain vertex is computed by the `GL_OBJECT_LINEAR'
19783 coordinate generation function as its distance from sea level; that
19784 altitude can then be used to index the texture image to map white snow
19785 onto peaks and green grass onto foothills.
19786
19787 If the texture generation function is `GL_EYE_LINEAR', the function
19788
19789 G=P_1,^″×X_E+P_2,^″×Y_E+P_3,^″×Z_E+P_4,^″×W_E
19790
19791 is used, where
19792
19793 (P_1,^″\u2062P_2,^″\u2062P_3,^″\u2062P_4,^″,)=(P_1\u2062P_2\u2062P_3\u2062P_4,)\u2062M^-1
19794
19795 and X_E , Y_E , Z_E , and W_E are the eye coordinates of the vertex, P_1
19796 , P_2 , P_3 , and P_4 are the values supplied in PARAMS, and M is the
19797 modelview matrix when `glTexGen' is invoked. If M is poorly conditioned
19798 or singular, texture coordinates generated by the resulting function may
19799 be inaccurate or undefined.
19800
19801 Note that the values in PARAMS define a reference plane in eye
19802 coordinates. The modelview matrix that is applied to them may not be the
19803 same one in effect when the polygon vertices are transformed. This
19804 function establishes a field of texture coordinates that can produce
19805 dynamic contour lines on moving objects.
19806
19807 If the texture generation function is `GL_SPHERE_MAP' and COORD is
19808 either `GL_S' or `GL_T', S and T texture coordinates are generated as
19809 follows. Let U be the unit vector pointing from the origin to the
19810 polygon vertex (in eye coordinates). Let N sup prime be the current
19811 normal, after transformation to eye coordinates. Let
19812
19813 F=(F_X\u2062F_Y\u2062F_Z,)^T be the reflection vector such that
19814
19815 F=U-2\u2062N^″\u2062N^″,^T\u2062U
19816
19817 Finally, let M=2\u2062√(F_X,^2+F_Y,^2+(F_Z+1,)^2,) . Then the values assigned
19818 to the S and T texture coordinates are
19819
19820 S=F_X/M+1/2
19821
19822 T=F_Y/M+1/2
19823
19824 To enable or disable a texture-coordinate generation function, call
19825 `glEnable' or `glDisable' with one of the symbolic texture-coordinate
19826 names (`GL_TEXTURE_GEN_S', `GL_TEXTURE_GEN_T', `GL_TEXTURE_GEN_R', or
19827 `GL_TEXTURE_GEN_Q') as the argument. When enabled, the specified texture
19828 coordinate is computed according to the generating function associated
19829 with that coordinate. When disabled, subsequent vertices take the
19830 specified texture coordinate from the current set of texture
19831 coordinates. Initially, all texture generation functions are set to
19832 `GL_EYE_LINEAR' and are disabled. Both S plane equations are (1, 0, 0,
19833 0), both T plane equations are (0, 1, 0, 0), and all R and Q plane
19834 equations are (0, 0, 0, 0).
19835
19836 When the `ARB_multitexture' extension is supported, `glTexGen' sets the
19837 texture generation parameters for the currently active texture unit,
19838 selected with `glActiveTexture'.
19839
19840 `GL_INVALID_ENUM' is generated when COORD or PNAME is not an accepted
19841 defined value, or when PNAME is `GL_TEXTURE_GEN_MODE' and PARAMS is not
19842 an accepted defined value.
19843
19844 `GL_INVALID_ENUM' is generated when PNAME is `GL_TEXTURE_GEN_MODE',
19845 PARAMS is `GL_SPHERE_MAP', and COORD is either `GL_R' or `GL_Q'.
19846
19847 `GL_INVALID_OPERATION' is generated if `glTexGen' is executed between
19848 the execution of `glBegin' and the corresponding execution of `glEnd'.")
19849
19850 (define-gl-procedures
19851 ((glTexImage1D
19852 (target GLenum)
19853 (level GLint)
19854 (internalFormat GLint)
19855 (width GLsizei)
19856 (border GLint)
19857 (format GLenum)
19858 (type GLenum)
19859 (data const-GLvoid-*)
19860 ->
19861 void))
19862 "Specify a one-dimensional texture image.
19863
19864 TARGET
19865 Specifies the target texture. Must be `GL_TEXTURE_1D' or
19866 `GL_PROXY_TEXTURE_1D'.
19867
19868 LEVEL
19869 Specifies the level-of-detail number. Level 0 is the base image
19870 level. Level N is the Nth mipmap reduction image.
19871
19872 INTERNALFORMAT
19873 Specifies the number of color components in the texture. Must be 1,
19874 2, 3, or 4, or one of the following symbolic constants: `GL_ALPHA',
19875 `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
19876 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
19877 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
19878 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT',
19879 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24',
19880 `GL_DEPTH_COMPONENT32', `GL_LUMINANCE', `GL_LUMINANCE4',
19881 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
19882 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
19883 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
19884 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
19885 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
19886 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
19887 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
19888 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
19889 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
19890 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
19891 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
19892 `GL_SRGB8_ALPHA8'.
19893
19894 WIDTH
19895 Specifies the width of the texture image including the border if
19896 any. If the GL version does not support non-power-of-two sizes,
19897 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
19898 implementations support texture images that are at least 64 texels
19899 wide. The height of the 1D texture image is 1.
19900
19901 BORDER
19902 Specifies the width of the border. Must be either 0 or 1.
19903
19904 FORMAT
19905 Specifies the format of the pixel data. The following symbolic
19906 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
19907 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
19908 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
19909
19910 TYPE
19911 Specifies the data type of the pixel data. The following symbolic
19912 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
19913 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
19914 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
19915 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
19916 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
19917 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
19918 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
19919 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
19920
19921 DATA
19922 Specifies a pointer to the image data in memory.
19923
19924 Texturing maps a portion of a specified texture image onto each
19925 graphical primitive for which texturing is enabled. To enable and
19926 disable one-dimensional texturing, call `glEnable' and `glDisable' with
19927 argument `GL_TEXTURE_1D'.
19928
19929 Texture images are defined with `glTexImage1D'. The arguments describe
19930 the parameters of the texture image, such as width, width of the border,
19931 level-of-detail number (see `glTexParameter'), and the internal
19932 resolution and format used to store the image. The last three arguments
19933 describe how the image is represented in memory; they are identical to
19934 the pixel formats used for `glDrawPixels'.
19935
19936 If TARGET is `GL_PROXY_TEXTURE_1D', no data is read from DATA, but all
19937 of the texture image state is recalculated, checked for consistency, and
19938 checked against the implementation's capabilities. If the implementation
19939 cannot handle a texture of the requested texture size, it sets all of
19940 the image state to 0, but does not generate an error (see `glGetError').
19941 To query for an entire mipmap array, use an image array level greater
19942 than or equal to 1.
19943
19944 If TARGET is `GL_TEXTURE_1D', data is read from DATA as a sequence of
19945 signed or unsigned bytes, shorts, or longs, or single-precision
19946 floating-point values, depending on TYPE. These values are grouped into
19947 sets of one, two, three, or four values, depending on FORMAT, to form
19948 elements. If TYPE is `GL_BITMAP', the data is considered as a string of
19949 unsigned bytes (and FORMAT must be `GL_COLOR_INDEX'). Each data byte is
19950 treated as eight 1-bit elements, with bit ordering determined by
19951 `GL_UNPACK_LSB_FIRST' (see `glPixelStore').
19952
19953 If a non-zero named buffer object is bound to the
19954 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
19955 image is specified, DATA is treated as a byte offset into the buffer
19956 object's data store.
19957
19958 The first element corresponds to the left end of the texture array.
19959 Subsequent elements progress left-to-right through the remaining texels
19960 in the texture array. The final element corresponds to the right end of
19961 the texture array.
19962
19963 FORMAT determines the composition of each element in DATA. It can assume
19964 one of these symbolic values:
19965
19966 `GL_COLOR_INDEX'
19967 Each element is a single value, a color index. The GL converts it
19968 to fixed point (with an unspecified number of zero bits to the
19969 right of the binary point), shifted left or right depending on the
19970 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
19971 (see `glPixelTransfer'). The resulting index is converted to a set
19972 of color components using the `GL_PIXEL_MAP_I_TO_R',
19973 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
19974 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
19975
19976 `GL_RED'
19977 Each element is a single red component. The GL converts it to
19978 floating point and assembles it into an RGBA element by attaching 0
19979 for green and blue, and 1 for alpha. Each component is then
19980 multiplied by the signed scale factor `GL_c_SCALE', added to the
19981 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
19982 `glPixelTransfer').
19983
19984 `GL_GREEN'
19985 Each element is a single green component. The GL converts it to
19986 floating point and assembles it into an RGBA element by attaching 0
19987 for red and blue, and 1 for alpha. Each component is then
19988 multiplied by the signed scale factor `GL_c_SCALE', added to the
19989 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
19990 `glPixelTransfer').
19991
19992 `GL_BLUE'
19993 Each element is a single blue component. The GL converts it to
19994 floating point and assembles it into an RGBA element by attaching 0
19995 for red and green, and 1 for alpha. Each component is then
19996 multiplied by the signed scale factor `GL_c_SCALE', added to the
19997 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
19998 `glPixelTransfer').
19999
20000 `GL_ALPHA'
20001 Each element is a single alpha component. The GL converts it to
20002 floating point and assembles it into an RGBA element by attaching 0
20003 for red, green, and blue. Each component is then multiplied by the
20004 signed scale factor `GL_c_SCALE', added to the signed bias
20005 `GL_c_BIAS', and clamped to the range [0,1] (see
20006 `glPixelTransfer').
20007
20008 `GL_INTENSITY'
20009 Each element is a single intensity value. The GL converts it to
20010 floating point, then assembles it into an RGBA element by
20011 replicating the intensity value three times for red, green, blue,
20012 and alpha. Each component is then multiplied by the signed scale
20013 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
20014 clamped to the range [0,1] (see `glPixelTransfer').
20015
20016 `GL_RGB'
20017 `GL_BGR'
20018 Each element is an RGB triple. The GL converts it to floating point
20019 and assembles it into an RGBA element by attaching 1 for alpha.
20020 Each component is then multiplied by the signed scale factor
20021 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20022 the range [0,1] (see `glPixelTransfer').
20023
20024 `GL_RGBA'
20025 `GL_BGRA'
20026 Each element contains all four components. Each component is
20027 multiplied by the signed scale factor `GL_c_SCALE', added to the
20028 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20029 `glPixelTransfer').
20030
20031 `GL_LUMINANCE'
20032 Each element is a single luminance value. The GL converts it to
20033 floating point, then assembles it into an RGBA element by
20034 replicating the luminance value three times for red, green, and
20035 blue and attaching 1 for alpha. Each component is then multiplied
20036 by the signed scale factor `GL_c_SCALE', added to the signed bias
20037 `GL_c_BIAS', and clamped to the range [0,1] (see
20038 `glPixelTransfer').
20039
20040 `GL_LUMINANCE_ALPHA'
20041 Each element is a luminance/alpha pair. The GL converts it to
20042 floating point, then assembles it into an RGBA element by
20043 replicating the luminance value three times for red, green, and
20044 blue. Each component is then multiplied by the signed scale factor
20045 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20046 the range [0,1] (see `glPixelTransfer').
20047
20048 `GL_DEPTH_COMPONENT'
20049 Each element is a single depth value. The GL converts it to
20050 floating point, multiplies by the signed scale factor
20051 `GL_DEPTH_SCALE', adds the signed bias `GL_DEPTH_BIAS', and clamps
20052 to the range [0,1] (see `glPixelTransfer').
20053
20054 Refer to the `glDrawPixels' reference page for a description of the
20055 acceptable values for the TYPE parameter.
20056
20057 If an application wants to store the texture at a certain resolution or
20058 in a certain format, it can request the resolution and format with
20059 INTERNALFORMAT. The GL will choose an internal representation that
20060 closely approximates that requested by INTERNALFORMAT, but it may not
20061 match exactly. (The representations specified by `GL_LUMINANCE',
20062 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
20063 numeric values 1, 2, 3, and 4 may also be used to specify the above
20064 representations.)
20065
20066 If the INTERNALFORMAT parameter is one of the generic compressed
20067 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
20068 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
20069 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
20070 internal format with the symbolic constant for a specific internal
20071 format and compress the texture before storage. If no corresponding
20072 internal format is available, or the GL can not compress that image for
20073 any reason, the internal format is instead replaced with a corresponding
20074 base internal format.
20075
20076 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
20077 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
20078 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
20079 treated as if the red, green, blue, or luminance components are encoded
20080 in the sRGB color space. Any alpha component is left unchanged. The
20081 conversion from the sRGB encoded component C_S to a linear component C_L
20082 is:
20083
20084 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
20085 C_S>0.04045)
20086
20087 Assume C_S is the sRGB component in the range [0,1].
20088
20089 Use the `GL_PROXY_TEXTURE_1D' target to try out a resolution and format.
20090 The implementation will update and recompute its best match for the
20091 requested storage resolution and format. To then query this state, call
20092 `glGetTexLevelParameter'. If the texture cannot be accommodated, texture
20093 state is set to 0.
20094
20095 A one-component texture image uses only the red component of the RGBA
20096 color from DATA. A two-component image uses the R and A values. A
20097 three-component image uses the R, G, and B values. A four-component
20098 image uses all of the RGBA components.
20099
20100 Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures
20101 during texture filtering and application.\xa0Image-based shadowing\xa0can\xa0be
20102 \xa0enabled\xa0by\xa0comparing texture r coordinates to depth texture values to
20103 generate a boolean result. See `glTexParameter' for details on texture
20104 comparison.
20105
20106 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_1D' or
20107 `GL_PROXY_TEXTURE_1D'.
20108
20109 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
20110 constant. Format constants other than `GL_STENCIL_INDEX' are accepted.
20111
20112 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
20113
20114 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
20115 `GL_COLOR_INDEX'.
20116
20117 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
20118
20119 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
20120 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
20121
20122 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
20123 one of the accepted resolution and format symbolic constants.
20124
20125 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
20126 2 + `GL_MAX_TEXTURE_SIZE'.
20127
20128 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
20129 supported and the WIDTH cannot be represented as 2^N+2\u2061(BORDER,) for
20130 some integer value of N.
20131
20132 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
20133
20134 `GL_INVALID_OPERATION' is generated if TYPE is one of
20135 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20136 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
20137 is not `GL_RGB'.
20138
20139 `GL_INVALID_OPERATION' is generated if TYPE is one of
20140 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20141 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20142 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20143 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
20144 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
20145
20146 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
20147 and INTERNALFORMAT is not `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
20148 `GL_DEPTH_COMPONENT24', or `GL_DEPTH_COMPONENT32'.
20149
20150 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
20151 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
20152 `GL_DEPTH_COMPONENT32', and FORMAT is not `GL_DEPTH_COMPONENT'.
20153
20154 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20155 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
20156 data store is currently mapped.
20157
20158 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20159 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
20160 unpacked from the buffer object such that the memory reads required
20161 would exceed the data store size.
20162
20163 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20164 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
20165 divisible into the number of bytes needed to store in memory a datum
20166 indicated by TYPE.
20167
20168 `GL_INVALID_OPERATION' is generated if `glTexImage1D' is executed
20169 between the execution of `glBegin' and the corresponding execution of
20170 `glEnd'.")
20171
20172 (define-gl-procedures
20173 ((glTexImage2D
20174 (target GLenum)
20175 (level GLint)
20176 (internalFormat GLint)
20177 (width GLsizei)
20178 (height GLsizei)
20179 (border GLint)
20180 (format GLenum)
20181 (type GLenum)
20182 (data const-GLvoid-*)
20183 ->
20184 void))
20185 "Specify a two-dimensional texture image.
20186
20187 TARGET
20188 Specifies the target texture. Must be `GL_TEXTURE_2D',
20189 `GL_PROXY_TEXTURE_2D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
20190 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
20191 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
20192 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
20193
20194 LEVEL
20195 Specifies the level-of-detail number. Level 0 is the base image
20196 level. Level N is the Nth mipmap reduction image.
20197
20198 INTERNALFORMAT
20199 Specifies the number of color components in the texture. Must be 1,
20200 2, 3, or 4, or one of the following symbolic constants: `GL_ALPHA',
20201 `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
20202 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
20203 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
20204 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT',
20205 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24',
20206 `GL_DEPTH_COMPONENT32', `GL_LUMINANCE', `GL_LUMINANCE4',
20207 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
20208 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
20209 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
20210 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
20211 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
20212 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
20213 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
20214 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
20215 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
20216 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
20217 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
20218 `GL_SRGB8_ALPHA8'.
20219
20220 WIDTH
20221 Specifies the width of the texture image including the border if
20222 any. If the GL version does not support non-power-of-two sizes,
20223 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
20224 implementations support texture images that are at least 64 texels
20225 wide.
20226
20227 HEIGHT
20228 Specifies the height of the texture image including the border if
20229 any. If the GL version does not support non-power-of-two sizes,
20230 this value must be 2^M+2\u2061(BORDER,) for some integer M . All
20231 implementations support texture images that are at least 64 texels
20232 high.
20233
20234 BORDER
20235 Specifies the width of the border. Must be either 0 or 1.
20236
20237 FORMAT
20238 Specifies the format of the pixel data. The following symbolic
20239 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
20240 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
20241 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
20242
20243 TYPE
20244 Specifies the data type of the pixel data. The following symbolic
20245 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
20246 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
20247 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20248 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
20249 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20250 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20251 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20252 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
20253
20254 DATA
20255 Specifies a pointer to the image data in memory.
20256
20257 Texturing maps a portion of a specified texture image onto each
20258 graphical primitive for which texturing is enabled. To enable and
20259 disable two-dimensional texturing, call `glEnable' and `glDisable' with
20260 argument `GL_TEXTURE_2D'. To enable and disable texturing using
20261 cube-mapped texture, call `glEnable' and `glDisable' with argument
20262 `GL_TEXTURE_CUBE_MAP'.
20263
20264 To define texture images, call `glTexImage2D'. The arguments describe
20265 the parameters of the texture image, such as height, width, width of the
20266 border, level-of-detail number (see `glTexParameter'), and number of
20267 color components provided. The last three arguments describe how the
20268 image is represented in memory; they are identical to the pixel formats
20269 used for `glDrawPixels'.
20270
20271 If TARGET is `GL_PROXY_TEXTURE_2D' or `GL_PROXY_TEXTURE_CUBE_MAP', no
20272 data is read from DATA, but all of the texture image state is
20273 recalculated, checked for consistency, and checked against the
20274 implementation's capabilities. If the implementation cannot handle a
20275 texture of the requested texture size, it sets all of the image state to
20276 0, but does not generate an error (see `glGetError'). To query for an
20277 entire mipmap array, use an image array level greater than or equal to
20278 1.
20279
20280 If TARGET is `GL_TEXTURE_2D', or one of the `GL_TEXTURE_CUBE_MAP'
20281 targets, data is read from DATA as a sequence of signed or unsigned
20282 bytes, shorts, or longs, or single-precision floating-point values,
20283 depending on TYPE. These values are grouped into sets of one, two,
20284 three, or four values, depending on FORMAT, to form elements. If TYPE is
20285 `GL_BITMAP', the data is considered as a string of unsigned bytes (and
20286 FORMAT must be `GL_COLOR_INDEX'). Each data byte is treated as eight
20287 1-bit elements, with bit ordering determined by `GL_UNPACK_LSB_FIRST'
20288 (see `glPixelStore').
20289
20290 If a non-zero named buffer object is bound to the
20291 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
20292 image is specified, DATA is treated as a byte offset into the buffer
20293 object's data store.
20294
20295 The first element corresponds to the lower left corner of the texture
20296 image. Subsequent elements progress left-to-right through the remaining
20297 texels in the lowest row of the texture image, and then in successively
20298 higher rows of the texture image. The final element corresponds to the
20299 upper right corner of the texture image.
20300
20301 FORMAT determines the composition of each element in DATA. It can assume
20302 one of these symbolic values:
20303
20304 `GL_COLOR_INDEX'
20305 Each element is a single value, a color index. The GL converts it
20306 to fixed point (with an unspecified number of zero bits to the
20307 right of the binary point), shifted left or right depending on the
20308 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
20309 (see `glPixelTransfer'). The resulting index is converted to a set
20310 of color components using the `GL_PIXEL_MAP_I_TO_R',
20311 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
20312 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
20313
20314 `GL_RED'
20315 Each element is a single red component. The GL converts it to
20316 floating point and assembles it into an RGBA element by attaching 0
20317 for green and blue, and 1 for alpha. Each component is then
20318 multiplied by the signed scale factor `GL_c_SCALE', added to the
20319 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20320 `glPixelTransfer').
20321
20322 `GL_GREEN'
20323 Each element is a single green component. The GL converts it to
20324 floating point and assembles it into an RGBA element by attaching 0
20325 for red and blue, and 1 for alpha. Each component is then
20326 multiplied by the signed scale factor `GL_c_SCALE', added to the
20327 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20328 `glPixelTransfer').
20329
20330 `GL_BLUE'
20331 Each element is a single blue component. The GL converts it to
20332 floating point and assembles it into an RGBA element by attaching 0
20333 for red and green, and 1 for alpha. Each component is then
20334 multiplied by the signed scale factor `GL_c_SCALE', added to the
20335 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20336 `glPixelTransfer').
20337
20338 `GL_ALPHA'
20339 Each element is a single alpha component. The GL converts it to
20340 floating point and assembles it into an RGBA element by attaching 0
20341 for red, green, and blue. Each component is then multiplied by the
20342 signed scale factor `GL_c_SCALE', added to the signed bias
20343 `GL_c_BIAS', and clamped to the range [0,1] (see
20344 `glPixelTransfer').
20345
20346 `GL_INTENSITY'
20347 Each element is a single intensity value. The GL converts it to
20348 floating point, then assembles it into an RGBA element by
20349 replicating the intensity value three times for red, green, blue,
20350 and alpha. Each component is then multiplied by the signed scale
20351 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
20352 clamped to the range [0,1] (see `glPixelTransfer').
20353
20354 `GL_RGB'
20355 `GL_BGR'
20356 Each element is an RGB triple. The GL converts it to floating point
20357 and assembles it into an RGBA element by attaching 1 for alpha.
20358 Each component is then multiplied by the signed scale factor
20359 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20360 the range [0,1] (see `glPixelTransfer').
20361
20362 `GL_RGBA'
20363 `GL_BGRA'
20364 Each element contains all four components. Each component is
20365 multiplied by the signed scale factor `GL_c_SCALE', added to the
20366 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20367 `glPixelTransfer').
20368
20369 `GL_LUMINANCE'
20370 Each element is a single luminance value. The GL converts it to
20371 floating point, then assembles it into an RGBA element by
20372 replicating the luminance value three times for red, green, and
20373 blue and attaching 1 for alpha. Each component is then multiplied
20374 by the signed scale factor `GL_c_SCALE', added to the signed bias
20375 `GL_c_BIAS', and clamped to the range [0,1] (see
20376 `glPixelTransfer').
20377
20378 `GL_LUMINANCE_ALPHA'
20379 Each element is a luminance/alpha pair. The GL converts it to
20380 floating point, then assembles it into an RGBA element by
20381 replicating the luminance value three times for red, green, and
20382 blue. Each component is then multiplied by the signed scale factor
20383 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20384 the range [0,1] (see `glPixelTransfer').
20385
20386 `GL_DEPTH_COMPONENT'
20387 Each element is a single depth value. The GL converts it to
20388 floating point, multiplies by the signed scale factor
20389 `GL_DEPTH_SCALE', adds the signed bias `GL_DEPTH_BIAS', and clamps
20390 to the range [0,1] (see `glPixelTransfer').
20391
20392 Refer to the `glDrawPixels' reference page for a description of the
20393 acceptable values for the TYPE parameter.
20394
20395 If an application wants to store the texture at a certain resolution or
20396 in a certain format, it can request the resolution and format with
20397 INTERNALFORMAT. The GL will choose an internal representation that
20398 closely approximates that requested by INTERNALFORMAT, but it may not
20399 match exactly. (The representations specified by `GL_LUMINANCE',
20400 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
20401 numeric values 1, 2, 3, and 4 may also be used to specify the above
20402 representations.)
20403
20404 If the INTERNALFORMAT parameter is one of the generic compressed
20405 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
20406 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
20407 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
20408 internal format with the symbolic constant for a specific internal
20409 format and compress the texture before storage. If no corresponding
20410 internal format is available, or the GL can not compress that image for
20411 any reason, the internal format is instead replaced with a corresponding
20412 base internal format.
20413
20414 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
20415 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
20416 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
20417 treated as if the red, green, blue, or luminance components are encoded
20418 in the sRGB color space. Any alpha component is left unchanged. The
20419 conversion from the sRGB encoded component C_S to a linear component C_L
20420 is:
20421
20422 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
20423 C_S>0.04045)
20424
20425 Assume C_S is the sRGB component in the range [0,1].
20426
20427 Use the `GL_PROXY_TEXTURE_2D' or `GL_PROXY_TEXTURE_CUBE_MAP' target to
20428 try out a resolution and format. The implementation will update and
20429 recompute its best match for the requested storage resolution and
20430 format. To then query this state, call `glGetTexLevelParameter'. If the
20431 texture cannot be accommodated, texture state is set to 0.
20432
20433 A one-component texture image uses only the red component of the RGBA
20434 color extracted from DATA. A two-component image uses the R and A
20435 values. A three-component image uses the R, G, and B values. A
20436 four-component image uses all of the RGBA components.
20437
20438 Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures
20439 during texture filtering and application.\xa0Image-based shadowing\xa0can\xa0be
20440 \xa0enabled\xa0by\xa0comparing texture r coordinates to depth texture values to
20441 generate a boolean result. See `glTexParameter' for details on texture
20442 comparison.
20443
20444 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
20445 `GL_PROXY_TEXTURE_2D', `GL_PROXY_TEXTURE_CUBE_MAP',
20446 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
20447 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
20448 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
20449
20450 `GL_INVALID_ENUM' is generated if TARGET is one of the six cube map 2D
20451 image targets and the width and height parameters are not equal.
20452
20453 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
20454
20455 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
20456 `GL_COLOR_INDEX'.
20457
20458 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0 or
20459 greater than 2 + `GL_MAX_TEXTURE_SIZE'.
20460
20461 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
20462
20463 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
20464 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
20465
20466 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
20467 one of the accepted resolution and format symbolic constants.
20468
20469 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0 or
20470 greater than 2 + `GL_MAX_TEXTURE_SIZE'.
20471
20472 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
20473 supported and the WIDTH or HEIGHT cannot be represented as
20474 2^K+2\u2061(BORDER,) for some integer value of K.
20475
20476 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
20477
20478 `GL_INVALID_OPERATION' is generated if TYPE is one of
20479 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20480 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
20481 is not `GL_RGB'.
20482
20483 `GL_INVALID_OPERATION' is generated if TYPE is one of
20484 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20485 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20486 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20487 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
20488 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
20489
20490 `GL_INVALID_OPERATION' is generated if TARGET is not `GL_TEXTURE_2D' or
20491 `GL_PROXY_TEXTURE_2D' and INTERNALFORMAT is `GL_DEPTH_COMPONENT',
20492 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
20493 `GL_DEPTH_COMPONENT32'.
20494
20495 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
20496 and INTERNALFORMAT is not `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
20497 `GL_DEPTH_COMPONENT24', or `GL_DEPTH_COMPONENT32'.
20498
20499 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
20500 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
20501 `GL_DEPTH_COMPONENT32', and FORMAT is not `GL_DEPTH_COMPONENT'.
20502
20503 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20504 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
20505 data store is currently mapped.
20506
20507 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20508 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
20509 unpacked from the buffer object such that the memory reads required
20510 would exceed the data store size.
20511
20512 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20513 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
20514 divisible into the number of bytes needed to store in memory a datum
20515 indicated by TYPE.
20516
20517 `GL_INVALID_OPERATION' is generated if `glTexImage2D' is executed
20518 between the execution of `glBegin' and the corresponding execution of
20519 `glEnd'.")
20520
20521 (define-gl-procedures
20522 ((glTexImage3D
20523 (target GLenum)
20524 (level GLint)
20525 (internalFormat GLint)
20526 (width GLsizei)
20527 (height GLsizei)
20528 (depth GLsizei)
20529 (border GLint)
20530 (format GLenum)
20531 (type GLenum)
20532 (data const-GLvoid-*)
20533 ->
20534 void))
20535 "Specify a three-dimensional texture image.
20536
20537 TARGET
20538 Specifies the target texture. Must be `GL_TEXTURE_3D' or
20539 `GL_PROXY_TEXTURE_3D'.
20540
20541 LEVEL
20542 Specifies the level-of-detail number. Level 0 is the base image
20543 level. Level N is the N^TH mipmap reduction image.
20544
20545 INTERNALFORMAT
20546 Specifies the number of color components in the texture. Must be 1,
20547 2, 3, or 4, or one of the following symbolic constants: `GL_ALPHA',
20548 `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
20549 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
20550 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
20551 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_LUMINANCE',
20552 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
20553 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
20554 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
20555 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
20556 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
20557 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
20558 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
20559 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
20560 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
20561 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
20562 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
20563 `GL_SRGB8_ALPHA8'.
20564
20565 WIDTH
20566 Specifies the width of the texture image including the border if
20567 any. If the GL version does not support non-power-of-two sizes,
20568 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
20569 implementations support 3D texture images that are at least 16
20570 texels wide.
20571
20572 HEIGHT
20573 Specifies the height of the texture image including the border if
20574 any. If the GL version does not support non-power-of-two sizes,
20575 this value must be 2^M+2\u2061(BORDER,) for some integer M . All
20576 implementations support 3D texture images that are at least 16
20577 texels high.
20578
20579 DEPTH
20580 Specifies the depth of the texture image including the border if
20581 any. If the GL version does not support non-power-of-two sizes,
20582 this value must be 2^K+2\u2061(BORDER,) for some integer K . All
20583 implementations support 3D texture images that are at least 16
20584 texels deep.
20585
20586 BORDER
20587 Specifies the width of the border. Must be either 0 or 1.
20588
20589 FORMAT
20590 Specifies the format of the pixel data. The following symbolic
20591 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
20592 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
20593 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
20594
20595 TYPE
20596 Specifies the data type of the pixel data. The following symbolic
20597 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
20598 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
20599 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20600 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
20601 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20602 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20603 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20604 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
20605
20606 DATA
20607 Specifies a pointer to the image data in memory.
20608
20609 Texturing maps a portion of a specified texture image onto each
20610 graphical primitive for which texturing is enabled. To enable and
20611 disable three-dimensional texturing, call `glEnable' and `glDisable'
20612 with argument `GL_TEXTURE_3D'.
20613
20614 To define texture images, call `glTexImage3D'. The arguments describe
20615 the parameters of the texture image, such as height, width, depth, width
20616 of the border, level-of-detail number (see `glTexParameter'), and number
20617 of color components provided. The last three arguments describe how the
20618 image is represented in memory; they are identical to the pixel formats
20619 used for `glDrawPixels'.
20620
20621 If TARGET is `GL_PROXY_TEXTURE_3D', no data is read from DATA, but all
20622 of the texture image state is recalculated, checked for consistency, and
20623 checked against the implementation's capabilities. If the implementation
20624 cannot handle a texture of the requested texture size, it sets all of
20625 the image state to 0, but does not generate an error (see `glGetError').
20626 To query for an entire mipmap array, use an image array level greater
20627 than or equal to 1.
20628
20629 If TARGET is `GL_TEXTURE_3D', data is read from DATA as a sequence of
20630 signed or unsigned bytes, shorts, or longs, or single-precision
20631 floating-point values, depending on TYPE. These values are grouped into
20632 sets of one, two, three, or four values, depending on FORMAT, to form
20633 elements. If TYPE is `GL_BITMAP', the data is considered as a string of
20634 unsigned bytes (and FORMAT must be `GL_COLOR_INDEX'). Each data byte is
20635 treated as eight 1-bit elements, with bit ordering determined by
20636 `GL_UNPACK_LSB_FIRST' (see `glPixelStore').
20637
20638 If a non-zero named buffer object is bound to the
20639 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
20640 image is specified, DATA is treated as a byte offset into the buffer
20641 object's data store.
20642
20643 The first element corresponds to the lower left corner of the texture
20644 image. Subsequent elements progress left-to-right through the remaining
20645 texels in the lowest row of the texture image, and then in successively
20646 higher rows of the texture image. The final element corresponds to the
20647 upper right corner of the texture image.
20648
20649 FORMAT determines the composition of each element in DATA. It can assume
20650 one of these symbolic values:
20651
20652 `GL_COLOR_INDEX'
20653 Each element is a single value, a color index. The GL converts it
20654 to fixed point (with an unspecified number of zero bits to the
20655 right of the binary point), shifted left or right depending on the
20656 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
20657 (see `glPixelTransfer'). The resulting index is converted to a set
20658 of color components using the `GL_PIXEL_MAP_I_TO_R',
20659 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
20660 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
20661
20662 `GL_RED'
20663 Each element is a single red component. The GL converts it to
20664 floating point and assembles it into an RGBA element by attaching 0
20665 for green and blue, and 1 for alpha. Each component is then
20666 multiplied by the signed scale factor `GL_c_SCALE', added to the
20667 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20668 `glPixelTransfer').
20669
20670 `GL_GREEN'
20671 Each element is a single green component. The GL converts it to
20672 floating point and assembles it into an RGBA element by attaching 0
20673 for red and blue, and 1 for alpha. Each component is then
20674 multiplied by the signed scale factor `GL_c_SCALE', added to the
20675 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20676 `glPixelTransfer').
20677
20678 `GL_BLUE'
20679 Each element is a single blue component. The GL converts it to
20680 floating point and assembles it into an RGBA element by attaching 0
20681 for red and green, and 1 for alpha. Each component is then
20682 multiplied by the signed scale factor `GL_c_SCALE', added to the
20683 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20684 `glPixelTransfer').
20685
20686 `GL_ALPHA'
20687 Each element is a single alpha component. The GL converts it to
20688 floating point and assembles it into an RGBA element by attaching 0
20689 for red, green, and blue. Each component is then multiplied by the
20690 signed scale factor `GL_c_SCALE', added to the signed bias
20691 `GL_c_BIAS', and clamped to the range [0,1] (see
20692 `glPixelTransfer').
20693
20694 `GL_INTENSITY'
20695 Each element is a single intensity value. The GL converts it to
20696 floating point, then assembles it into an RGBA element by
20697 replicating the intensity value three times for red, green, blue,
20698 and alpha. Each component is then multiplied by the signed scale
20699 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
20700 clamped to the range [0,1] (see `glPixelTransfer').
20701
20702 `GL_RGB'
20703 `GL_BGR'
20704 Each element is an RGB triple. The GL converts it to floating point
20705 and assembles it into an RGBA element by attaching 1 for alpha.
20706 Each component is then multiplied by the signed scale factor
20707 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20708 the range [0,1] (see `glPixelTransfer').
20709
20710 `GL_RGBA'
20711 `GL_BGRA'
20712 Each element contains all four components. Each component is
20713 multiplied by the signed scale factor `GL_c_SCALE', added to the
20714 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20715 `glPixelTransfer').
20716
20717 `GL_LUMINANCE'
20718 Each element is a single luminance value. The GL converts it to
20719 floating point, then assembles it into an RGBA element by
20720 replicating the luminance value three times for red, green, and
20721 blue and attaching 1 for alpha. Each component is then multiplied
20722 by the signed scale factor `GL_c_SCALE', added to the signed bias
20723 `GL_c_BIAS', and clamped to the range [0,1] (see
20724 `glPixelTransfer').
20725
20726 `GL_LUMINANCE_ALPHA'
20727 Each element is a luminance/alpha pair. The GL converts it to
20728 floating point, then assembles it into an RGBA element by
20729 replicating the luminance value three times for red, green, and
20730 blue. Each component is then multiplied by the signed scale factor
20731 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20732 the range [0,1] (see `glPixelTransfer').
20733
20734 Refer to the `glDrawPixels' reference page for a description of the
20735 acceptable values for the TYPE parameter.
20736
20737 If an application wants to store the texture at a certain resolution or
20738 in a certain format, it can request the resolution and format with
20739 INTERNALFORMAT. The GL will choose an internal representation that
20740 closely approximates that requested by INTERNALFORMAT, but it may not
20741 match exactly. (The representations specified by `GL_LUMINANCE',
20742 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
20743 numeric values 1, 2, 3, and 4 may also be used to specify the above
20744 representations.)
20745
20746 If the INTERNALFORMAT parameter is one of the generic compressed
20747 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
20748 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
20749 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
20750 internal format with the symbolic constant for a specific internal
20751 format and compress the texture before storage. If no corresponding
20752 internal format is available, or the GL can not compress that image for
20753 any reason, the internal format is instead replaced with a corresponding
20754 base internal format.
20755
20756 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
20757 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
20758 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
20759 treated as if the red, green, blue, or luminance components are encoded
20760 in the sRGB color space. Any alpha component is left unchanged. The
20761 conversion from the sRGB encoded component C_S to a linear component C_L
20762 is:
20763
20764 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
20765 C_S>0.04045)
20766
20767 Assume C_S is the sRGB component in the range [0,1].
20768
20769 Use the `GL_PROXY_TEXTURE_3D' target to try out a resolution and format.
20770 The implementation will update and recompute its best match for the
20771 requested storage resolution and format. To then query this state, call
20772 `glGetTexLevelParameter'. If the texture cannot be accommodated, texture
20773 state is set to 0.
20774
20775 A one-component texture image uses only the red component of the RGBA
20776 color extracted from DATA. A two-component image uses the R and A
20777 values. A three-component image uses the R, G, and B values. A
20778 four-component image uses all of the RGBA components.
20779
20780 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_3D' or
20781 `GL_PROXY_TEXTURE_3D'.
20782
20783 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
20784 constant. Format constants other than `GL_STENCIL_INDEX' and
20785 `GL_DEPTH_COMPONENT' are accepted.
20786
20787 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
20788
20789 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
20790 `GL_COLOR_INDEX'.
20791
20792 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
20793
20794 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
20795 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
20796
20797 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
20798 one of the accepted resolution and format symbolic constants.
20799
20800 `GL_INVALID_VALUE' is generated if WIDTH, HEIGHT, or DEPTH is less than
20801 0 or greater than 2 + `GL_MAX_TEXTURE_SIZE'.
20802
20803 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
20804 supported and the WIDTH, HEIGHT, or DEPTH cannot be represented as
20805 2^K+2\u2061(BORDER,) for some integer value of K.
20806
20807 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
20808
20809 `GL_INVALID_OPERATION' is generated if TYPE is one of
20810 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20811 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
20812 is not `GL_RGB'.
20813
20814 `GL_INVALID_OPERATION' is generated if TYPE is one of
20815 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20816 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20817 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20818 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
20819 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
20820
20821 `GL_INVALID_OPERATION' is generated if FORMAT or INTERNALFORMAT is
20822 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
20823 `GL_DEPTH_COMPONENT32'.
20824
20825 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20826 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
20827 data store is currently mapped.
20828
20829 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20830 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
20831 unpacked from the buffer object such that the memory reads required
20832 would exceed the data store size.
20833
20834 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20835 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
20836 divisible into the number of bytes needed to store in memory a datum
20837 indicated by TYPE.
20838
20839 `GL_INVALID_OPERATION' is generated if `glTexImage3D' is executed
20840 between the execution of `glBegin' and the corresponding execution of
20841 `glEnd'.")
20842
20843 (define-gl-procedures
20844 ((glTexParameterf
20845 (target GLenum)
20846 (pname GLenum)
20847 (param GLfloat)
20848 ->
20849 void)
20850 (glTexParameteri
20851 (target GLenum)
20852 (pname GLenum)
20853 (param GLint)
20854 ->
20855 void))
20856 "Set texture parameters.
20857
20858 TARGET
20859 Specifies the target texture, which must be either `GL_TEXTURE_1D',
20860 `GL_TEXTURE_2D', `GL_TEXTURE_3D', or `GL_TEXTURE_CUBE_MAP'.
20861
20862 PNAME
20863 Specifies the symbolic name of a single-valued texture parameter.
20864 PNAME can be one of the following: `GL_TEXTURE_MIN_FILTER',
20865 `GL_TEXTURE_MAG_FILTER', `GL_TEXTURE_MIN_LOD',
20866 `GL_TEXTURE_MAX_LOD', `GL_TEXTURE_BASE_LEVEL',
20867 `GL_TEXTURE_MAX_LEVEL', `GL_TEXTURE_WRAP_S', `GL_TEXTURE_WRAP_T',
20868 `GL_TEXTURE_WRAP_R', `GL_TEXTURE_PRIORITY',
20869 `GL_TEXTURE_COMPARE_MODE', `GL_TEXTURE_COMPARE_FUNC',
20870 `GL_DEPTH_TEXTURE_MODE', or `GL_GENERATE_MIPMAP'.
20871
20872 PARAM
20873 Specifies the value of PNAME.
20874
20875 Texture mapping is a technique that applies an image onto an object's
20876 surface as if the image were a decal or cellophane shrink-wrap. The
20877 image is created in texture space, with an (S , T ) coordinate system. A
20878 texture is a one- or two-dimensional image and a set of parameters that
20879 determine how samples are derived from the image.
20880
20881 `glTexParameter' assigns the value or values in PARAMS to the texture
20882 parameter specified as PNAME. TARGET defines the target texture, either
20883 `GL_TEXTURE_1D', `GL_TEXTURE_2D', or `GL_TEXTURE_3D'. The following
20884 symbols are accepted in PNAME:
20885
20886 `GL_TEXTURE_MIN_FILTER'
20887 The texture minifying function is used whenever the pixel being
20888 textured maps to an area greater than one texture element. There
20889 are six defined minifying functions. Two of them use the nearest
20890 one or nearest four texture elements to compute the texture value.
20891 The other four use mipmaps.
20892
20893 A mipmap is an ordered set of arrays representing the same image at
20894 progressively lower resolutions. If the texture has dimensions
20895 2^N×2^M , there are MAX\u2061(N,M)+1 mipmaps. The first mipmap is the
20896 original texture, with dimensions 2^N×2^M . Each subsequent mipmap
20897 has dimensions 2^K-1,×2^L-1, , where 2^K×2^L are the dimensions of
20898 the previous mipmap, until either K=0 or L=0 . At that point,
20899 subsequent mipmaps have dimension 1×2^L-1, or 2^K-1,×1 until the
20900 final mipmap, which has dimension 1×1 . To define the mipmaps, call
20901 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glCopyTexImage1D',
20902 or `glCopyTexImage2D' with the LEVEL argument indicating the order
20903 of the mipmaps. Level 0 is the original texture; level MAX\u2061(N,M) is
20904 the final 1×1 mipmap.
20905
20906 PARAMS supplies a function for minifying the texture as one of the
20907 following:
20908
20909 As more texture elements are sampled in the minification process,
20910 fewer aliasing artifacts will be apparent. While the `GL_NEAREST'
20911 and `GL_LINEAR' minification functions can be faster than the other
20912 four, they sample only one or four texture elements to determine
20913 the texture value of the pixel being rendered and can produce moire
20914 patterns or ragged transitions. The initial value of
20915 `GL_TEXTURE_MIN_FILTER' is `GL_NEAREST_MIPMAP_LINEAR'.
20916
20917 `GL_TEXTURE_MAG_FILTER'
20918 The texture magnification function is used when the pixel being
20919 textured maps to an area less than or equal to one texture element.
20920 It sets the texture magnification function to either `GL_NEAREST'
20921 or `GL_LINEAR' (see below). `GL_NEAREST' is generally faster than
20922 `GL_LINEAR', but it can produce textured images with sharper edges
20923 because the transition between texture elements is not as smooth.
20924 The initial value of `GL_TEXTURE_MAG_FILTER' is `GL_LINEAR'.
20925
20926 `GL_NEAREST'
20927 Returns the value of the texture element that is nearest (in
20928 Manhattan distance) to the center of the pixel being textured.
20929
20930 `GL_LINEAR'
20931 Returns the weighted average of the four texture elements that are
20932 closest to the center of the pixel being textured. These can
20933 include border texture elements, depending on the values of
20934 `GL_TEXTURE_WRAP_S' and `GL_TEXTURE_WRAP_T', and on the exact
20935 mapping.
20936
20937 `GL_NEAREST_MIPMAP_NEAREST'
20938 Chooses the mipmap that most closely matches the size of the pixel
20939 being textured and uses the `GL_NEAREST' criterion (the texture
20940 element nearest to the center of the pixel) to produce a texture
20941 value.
20942
20943 `GL_LINEAR_MIPMAP_NEAREST'
20944 Chooses the mipmap that most closely matches the size of the pixel
20945 being textured and uses the `GL_LINEAR' criterion (a weighted
20946 average of the four texture elements that are closest to the center
20947 of the pixel) to produce a texture value.
20948
20949 `GL_NEAREST_MIPMAP_LINEAR'
20950 Chooses the two mipmaps that most closely match the size of the
20951 pixel being textured and uses the `GL_NEAREST' criterion (the
20952 texture element nearest to the center of the pixel) to produce a
20953 texture value from each mipmap. The final texture value is a
20954 weighted average of those two values.
20955
20956 `GL_LINEAR_MIPMAP_LINEAR'
20957 Chooses the two mipmaps that most closely match the size of the
20958 pixel being textured and uses the `GL_LINEAR' criterion (a weighted
20959 average of the four texture elements that are closest to the center
20960 of the pixel) to produce a texture value from each mipmap. The
20961 final texture value is a weighted average of those two values.
20962
20963 `GL_NEAREST'
20964 Returns the value of the texture element that is nearest (in
20965 Manhattan distance) to the center of the pixel being textured.
20966
20967 `GL_LINEAR'
20968 Returns the weighted average of the four texture elements that are
20969 closest to the center of the pixel being textured. These can
20970 include border texture elements, depending on the values of
20971 `GL_TEXTURE_WRAP_S' and `GL_TEXTURE_WRAP_T', and on the exact
20972 mapping.
20973
20974
20975
20976 `GL_TEXTURE_MIN_LOD'
20977 Sets the minimum level-of-detail parameter. This floating-point
20978 value limits the selection of highest resolution mipmap (lowest
20979 mipmap level). The initial value is -1000.
20980
20981
20982
20983 `GL_TEXTURE_MAX_LOD'
20984 Sets the maximum level-of-detail parameter. This floating-point
20985 value limits the selection of the lowest resolution mipmap (highest
20986 mipmap level). The initial value is 1000.
20987
20988
20989
20990 `GL_TEXTURE_BASE_LEVEL'
20991 Specifies the index of the lowest defined mipmap level. This is an
20992 integer value. The initial value is 0.
20993
20994
20995
20996 `GL_TEXTURE_MAX_LEVEL'
20997 Sets the index of the highest defined mipmap level. This is an
20998 integer value. The initial value is 1000.
20999
21000
21001
21002 `GL_TEXTURE_WRAP_S'
21003 Sets the wrap parameter for texture coordinate S to either
21004 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21005 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. `GL_CLAMP' causes S
21006 coordinates to be clamped to the range [0,1] and is useful for
21007 preventing wrapping artifacts when mapping a single image onto an
21008 object. `GL_CLAMP_TO_BORDER' causes the S coordinate to be clamped
21009 to the range [-1/2N,,1+1/2N,] , where N is the size of the texture
21010 in the direction of clamping.`GL_CLAMP_TO_EDGE' causes S
21011 coordinates to be clamped to the range [1/2N,,1-1/2N,] , where N is
21012 the size of the texture in the direction of clamping. `GL_REPEAT'
21013 causes the integer part of the S coordinate to be ignored; the GL
21014 uses only the fractional part, thereby creating a repeating
21015 pattern. `GL_MIRRORED_REPEAT' causes the S coordinate to be set to
21016 the fractional part of the texture coordinate if the integer part
21017 of S is even; if the integer part of S is odd, then the S texture
21018 coordinate is set to 1-FRAC\u2061(S,) , where FRAC\u2061(S,) represents the
21019 fractional part of S . Border texture elements are accessed only if
21020 wrapping is set to `GL_CLAMP' or `GL_CLAMP_TO_BORDER'. Initially,
21021 `GL_TEXTURE_WRAP_S' is set to `GL_REPEAT'.
21022
21023
21024
21025 `GL_TEXTURE_WRAP_T'
21026 Sets the wrap parameter for texture coordinate T to either
21027 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21028 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. See the discussion under
21029 `GL_TEXTURE_WRAP_S'. Initially, `GL_TEXTURE_WRAP_T' is set to
21030 `GL_REPEAT'.
21031
21032 `GL_TEXTURE_WRAP_R'
21033 Sets the wrap parameter for texture coordinate R to either
21034 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21035 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. See the discussion under
21036 `GL_TEXTURE_WRAP_S'. Initially, `GL_TEXTURE_WRAP_R' is set to
21037 `GL_REPEAT'.
21038
21039 `GL_TEXTURE_BORDER_COLOR'
21040 Sets a border color. PARAMS contains four values that comprise the
21041 RGBA color of the texture border. Integer color components are
21042 interpreted linearly such that the most positive integer maps to
21043 1.0, and the most negative integer maps to -1.0. The values are
21044 clamped to the range [0,1] when they are specified. Initially, the
21045 border color is (0, 0, 0, 0).
21046
21047 `GL_TEXTURE_PRIORITY'
21048 Specifies the texture residence priority of the currently bound
21049 texture. Permissible values are in the range [0,1] . See
21050 `glPrioritizeTextures' and `glBindTexture' for more information.
21051
21052 `GL_TEXTURE_COMPARE_MODE'
21053 Specifies the texture comparison mode for currently bound depth
21054 textures. That is, a texture whose internal format is
21055 `GL_DEPTH_COMPONENT_*'; see `glTexImage2D') Permissible values are:
21056
21057 `GL_TEXTURE_COMPARE_FUNC'
21058 Specifies the comparison operator used when
21059 `GL_TEXTURE_COMPARE_MODE' is set to `GL_COMPARE_R_TO_TEXTURE'.
21060 Permissible values are: where R is the current interpolated texture
21061 coordinate, and D_T is the depth texture value sampled from the
21062 currently bound depth texture. RESULT is assigned to the either the
21063 luminance, intensity, or alpha (as specified by
21064 `GL_DEPTH_TEXTURE_MODE'.)
21065
21066 `GL_DEPTH_TEXTURE_MODE'
21067 Specifies a single symbolic constant indicating how depth values
21068 should be treated during filtering and texture application.
21069 Accepted values are `GL_LUMINANCE', `GL_INTENSITY', and `GL_ALPHA'.
21070 The initial value is `GL_LUMINANCE'.
21071
21072 `GL_GENERATE_MIPMAP'
21073 Specifies a boolean value that indicates if all levels of a mipmap
21074 array should be automatically updated when any modification to the
21075 base level mipmap is done. The initial value is `GL_FALSE'.
21076
21077 `GL_COMPARE_R_TO_TEXTURE'
21078 Specifies that the interpolated and clamped R texture coordinate
21079 should be compared to the value in the currently bound depth
21080 texture. See the discussion of `GL_TEXTURE_COMPARE_FUNC' for
21081 details of how the comparison is evaluated. The result of the
21082 comparison is assigned to luminance, intensity, or alpha (as
21083 specified by `GL_DEPTH_TEXTURE_MODE').
21084
21085 `GL_NONE'
21086 Specifies that the luminance, intensity, or alpha (as specified by
21087 `GL_DEPTH_TEXTURE_MODE') should be assigned the appropriate value
21088 from the currently bound depth texture.
21089
21090 *Texture Comparison Function*
21091 *Computed result*
21092
21093 `GL_LEQUAL'
21094 RESULT={(1.0), (0.0)\u2062\xa0(R<=D_T,), (R>D_T,),
21095
21096 `GL_GEQUAL'
21097 RESULT={(1.0), (0.0)\u2062\xa0(R>=D_T,), (R<D_T,),
21098
21099 `GL_LESS'
21100 RESULT={(1.0), (0.0)\u2062\xa0(R<D_T,), (R>=D_T,),
21101
21102 `GL_GREATER'
21103 RESULT={(1.0), (0.0)\u2062\xa0(R>D_T,), (R<=D_T,),
21104
21105 `GL_EQUAL'
21106 RESULT={(1.0), (0.0)\u2062\xa0(R=D_T,), (R≠D_T,),
21107
21108 `GL_NOTEQUAL'
21109 RESULT={(1.0), (0.0)\u2062\xa0(R≠D_T,), (R=D_T,),
21110
21111 `GL_ALWAYS'
21112 RESULT=`1.0'
21113
21114 `GL_NEVER'
21115 RESULT=`0.0'
21116
21117 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not one of the
21118 accepted defined values.
21119
21120 `GL_INVALID_ENUM' is generated if PARAMS should have a defined constant
21121 value (based on the value of PNAME) and does not.
21122
21123 `GL_INVALID_OPERATION' is generated if `glTexParameter' is executed
21124 between the execution of `glBegin' and the corresponding execution of
21125 `glEnd'.")
21126
21127 (define-gl-procedures
21128 ((glTexSubImage1D
21129 (target GLenum)
21130 (level GLint)
21131 (xoffset GLint)
21132 (width GLsizei)
21133 (format GLenum)
21134 (type GLenum)
21135 (data const-GLvoid-*)
21136 ->
21137 void))
21138 "Specify a one-dimensional texture subimage.
21139
21140 TARGET
21141 Specifies the target texture. Must be `GL_TEXTURE_1D'.
21142
21143 LEVEL
21144 Specifies the level-of-detail number. Level 0 is the base image
21145 level. Level N is the Nth mipmap reduction image.
21146
21147 XOFFSET
21148 Specifies a texel offset in the x direction within the texture
21149 array.
21150
21151 WIDTH
21152 Specifies the width of the texture subimage.
21153
21154 FORMAT
21155 Specifies the format of the pixel data. The following symbolic
21156 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
21157 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
21158 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
21159
21160 TYPE
21161 Specifies the data type of the pixel data. The following symbolic
21162 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
21163 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
21164 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21165 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
21166 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21167 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21168 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21169 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
21170
21171 DATA
21172 Specifies a pointer to the image data in memory.
21173
21174 Texturing maps a portion of a specified texture image onto each
21175 graphical primitive for which texturing is enabled. To enable or disable
21176 one-dimensional texturing, call `glEnable' and `glDisable' with argument
21177 `GL_TEXTURE_1D'.
21178
21179 `glTexSubImage1D' redefines a contiguous subregion of an existing
21180 one-dimensional texture image. The texels referenced by DATA replace the
21181 portion of the existing texture array with x indices XOFFSET and
21182 XOFFSET+WIDTH-1 , inclusive. This region may not include any texels
21183 outside the range of the texture array as it was originally specified.
21184 It is not an error to specify a subtexture with width of 0, but such a
21185 specification has no effect.
21186
21187 If a non-zero named buffer object is bound to the
21188 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
21189 image is specified, DATA is treated as a byte offset into the buffer
21190 object's data store.
21191
21192 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
21193 values.
21194
21195 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
21196 constant.
21197
21198 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
21199
21200 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
21201 `GL_COLOR_INDEX'.
21202
21203 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
21204
21205 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
21206 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21207
21208 `GL_INVALID_VALUE' is generated if XOFFSET<-B , or if
21209 (XOFFSET+WIDTH,)>(W-B,) , where W is the `GL_TEXTURE_WIDTH', and B is
21210 the width of the `GL_TEXTURE_BORDER' of the texture image being
21211 modified. Note that W includes twice the border width.
21212
21213 `GL_INVALID_VALUE' is generated if WIDTH is less than 0.
21214
21215 `GL_INVALID_OPERATION' is generated if the texture array has not been
21216 defined by a previous `glTexImage1D' operation.
21217
21218 `GL_INVALID_OPERATION' is generated if TYPE is one of
21219 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21220 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21221 is not `GL_RGB'.
21222
21223 `GL_INVALID_OPERATION' is generated if TYPE is one of
21224 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21225 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21226 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21227 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21228 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21229
21230 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21231 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21232 data store is currently mapped.
21233
21234 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21235 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21236 unpacked from the buffer object such that the memory reads required
21237 would exceed the data store size.
21238
21239 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21240 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21241 divisible into the number of bytes needed to store in memory a datum
21242 indicated by TYPE.
21243
21244 `GL_INVALID_OPERATION' is generated if `glTexSubImage1D' is executed
21245 between the execution of `glBegin' and the corresponding execution of
21246 `glEnd'.")
21247
21248 (define-gl-procedures
21249 ((glTexSubImage2D
21250 (target GLenum)
21251 (level GLint)
21252 (xoffset GLint)
21253 (yoffset GLint)
21254 (width GLsizei)
21255 (height GLsizei)
21256 (format GLenum)
21257 (type GLenum)
21258 (data const-GLvoid-*)
21259 ->
21260 void))
21261 "Specify a two-dimensional texture subimage.
21262
21263 TARGET
21264 Specifies the target texture. Must be `GL_TEXTURE_2D',
21265 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
21266 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
21267 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
21268 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
21269
21270 LEVEL
21271 Specifies the level-of-detail number. Level 0 is the base image
21272 level. Level N is the Nth mipmap reduction image.
21273
21274 XOFFSET
21275 Specifies a texel offset in the x direction within the texture
21276 array.
21277
21278 YOFFSET
21279 Specifies a texel offset in the y direction within the texture
21280 array.
21281
21282 WIDTH
21283 Specifies the width of the texture subimage.
21284
21285 HEIGHT
21286 Specifies the height of the texture subimage.
21287
21288 FORMAT
21289 Specifies the format of the pixel data. The following symbolic
21290 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
21291 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
21292 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
21293
21294 TYPE
21295 Specifies the data type of the pixel data. The following symbolic
21296 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
21297 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
21298 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21299 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
21300 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21301 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21302 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21303 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
21304
21305 DATA
21306 Specifies a pointer to the image data in memory.
21307
21308 Texturing maps a portion of a specified texture image onto each
21309 graphical primitive for which texturing is enabled. To enable and
21310 disable two-dimensional texturing, call `glEnable' and `glDisable' with
21311 argument `GL_TEXTURE_2D'.
21312
21313 `glTexSubImage2D' redefines a contiguous subregion of an existing
21314 two-dimensional texture image. The texels referenced by DATA replace the
21315 portion of the existing texture array with x indices XOFFSET and
21316 XOFFSET+WIDTH-1 , inclusive, and y indices YOFFSET and YOFFSET+HEIGHT-1
21317 , inclusive. This region may not include any texels outside the range of
21318 the texture array as it was originally specified. It is not an error to
21319 specify a subtexture with zero width or height, but such a specification
21320 has no effect.
21321
21322 If a non-zero named buffer object is bound to the
21323 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
21324 image is specified, DATA is treated as a byte offset into the buffer
21325 object's data store.
21326
21327 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
21328 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
21329 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
21330 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
21331
21332 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
21333 constant.
21334
21335 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
21336
21337 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
21338 `GL_COLOR_INDEX'.
21339
21340 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
21341
21342 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
21343 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21344
21345 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
21346 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , where W is the
21347 `GL_TEXTURE_WIDTH', H is the `GL_TEXTURE_HEIGHT', and B is the border
21348 width of the texture image being modified. Note that W and H include
21349 twice the border width.
21350
21351 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0.
21352
21353 `GL_INVALID_OPERATION' is generated if the texture array has not been
21354 defined by a previous `glTexImage2D' operation.
21355
21356 `GL_INVALID_OPERATION' is generated if TYPE is one of
21357 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21358 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21359 is not `GL_RGB'.
21360
21361 `GL_INVALID_OPERATION' is generated if TYPE is one of
21362 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21363 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21364 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21365 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21366 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21367
21368 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21369 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21370 data store is currently mapped.
21371
21372 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21373 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21374 unpacked from the buffer object such that the memory reads required
21375 would exceed the data store size.
21376
21377 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21378 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21379 divisible into the number of bytes needed to store in memory a datum
21380 indicated by TYPE.
21381
21382 `GL_INVALID_OPERATION' is generated if `glTexSubImage2D' is executed
21383 between the execution of `glBegin' and the corresponding execution of
21384 `glEnd'.")
21385
21386 (define-gl-procedures
21387 ((glTexSubImage3D
21388 (target GLenum)
21389 (level GLint)
21390 (xoffset GLint)
21391 (yoffset GLint)
21392 (zoffset GLint)
21393 (width GLsizei)
21394 (height GLsizei)
21395 (depth GLsizei)
21396 (format GLenum)
21397 (type GLenum)
21398 (data const-GLvoid-*)
21399 ->
21400 void))
21401 "Specify a three-dimensional texture subimage.
21402
21403 TARGET
21404 Specifies the target texture. Must be `GL_TEXTURE_3D'.
21405
21406 LEVEL
21407 Specifies the level-of-detail number. Level 0 is the base image
21408 level. Level N is the Nth mipmap reduction image.
21409
21410 XOFFSET
21411 Specifies a texel offset in the x direction within the texture
21412 array.
21413
21414 YOFFSET
21415 Specifies a texel offset in the y direction within the texture
21416 array.
21417
21418 ZOFFSET
21419 Specifies a texel offset in the z direction within the texture
21420 array.
21421
21422 WIDTH
21423 Specifies the width of the texture subimage.
21424
21425 HEIGHT
21426 Specifies the height of the texture subimage.
21427
21428 DEPTH
21429 Specifies the depth of the texture subimage.
21430
21431 FORMAT
21432 Specifies the format of the pixel data. The following symbolic
21433 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
21434 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
21435 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
21436
21437 TYPE
21438 Specifies the data type of the pixel data. The following symbolic
21439 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
21440 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
21441 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21442 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
21443 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21444 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21445 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21446 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
21447
21448 DATA
21449 Specifies a pointer to the image data in memory.
21450
21451 Texturing maps a portion of a specified texture image onto each
21452 graphical primitive for which texturing is enabled. To enable and
21453 disable three-dimensional texturing, call `glEnable' and `glDisable'
21454 with argument `GL_TEXTURE_3D'.
21455
21456 `glTexSubImage3D' redefines a contiguous subregion of an existing
21457 three-dimensional texture image. The texels referenced by DATA replace
21458 the portion of the existing texture array with x indices XOFFSET and
21459 XOFFSET+WIDTH-1 , inclusive, y indices YOFFSET and YOFFSET+HEIGHT-1 ,
21460 inclusive, and z indices ZOFFSET and ZOFFSET+DEPTH-1 , inclusive. This
21461 region may not include any texels outside the range of the texture array
21462 as it was originally specified. It is not an error to specify a
21463 subtexture with zero width, height, or depth but such a specification
21464 has no effect.
21465
21466 If a non-zero named buffer object is bound to the
21467 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
21468 image is specified, DATA is treated as a byte offset into the buffer
21469 object's data store.
21470
21471 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_3D'.
21472
21473 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
21474 constant.
21475
21476 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
21477
21478 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
21479 `GL_COLOR_INDEX'.
21480
21481 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
21482
21483 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
21484 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21485
21486 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
21487 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , or ZOFFSET<-B , or
21488 (ZOFFSET+DEPTH,)>(D-B,) , where W is the `GL_TEXTURE_WIDTH', H is the
21489 `GL_TEXTURE_HEIGHT', D is the `GL_TEXTURE_DEPTH' and B is the border
21490 width of the texture image being modified. Note that W , H , and D
21491 include twice the border width.
21492
21493 `GL_INVALID_VALUE' is generated if WIDTH, HEIGHT, or DEPTH is less than
21494 0.
21495
21496 `GL_INVALID_OPERATION' is generated if the texture array has not been
21497 defined by a previous `glTexImage3D' operation.
21498
21499 `GL_INVALID_OPERATION' is generated if TYPE is one of
21500 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21501 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21502 is not `GL_RGB'.
21503
21504 `GL_INVALID_OPERATION' is generated if TYPE is one of
21505 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21506 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21507 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21508 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21509 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21510
21511 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21512 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21513 data store is currently mapped.
21514
21515 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21516 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21517 unpacked from the buffer object such that the memory reads required
21518 would exceed the data store size.
21519
21520 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21521 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21522 divisible into the number of bytes needed to store in memory a datum
21523 indicated by TYPE.
21524
21525 `GL_INVALID_OPERATION' is generated if `glTexSubImage3D' is executed
21526 between the execution of `glBegin' and the corresponding execution of
21527 `glEnd'.")
21528
21529 (define-gl-procedures
21530 ((glTranslatef
21531 (x GLfloat)
21532 (y GLfloat)
21533 (z GLfloat)
21534 ->
21535 void))
21536 "Multiply the current matrix by a translation matrix.
21537
21538 X
21539 Y
21540
21541 Z
21542
21543 Specify the X, Y, and Z coordinates of a translation vector.
21544
21545 `glTranslate' produces a translation by (X,YZ) . The current matrix (see
21546 `glMatrixMode') is multiplied by this translation matrix, with the
21547 product replacing the current matrix, as if `glMultMatrix' were called
21548 with the following matrix for its argument:
21549
21550 ((1 0 0 X), (0 1 0 Y), (0 0 1 Z), (0 0 0 1),)
21551
21552
21553
21554 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
21555 objects drawn after a call to `glTranslate' are translated.
21556
21557 Use `glPushMatrix' and `glPopMatrix' to save and restore the
21558 untranslated coordinate system.
21559
21560 `GL_INVALID_OPERATION' is generated if `glTranslate' is executed between
21561 the execution of `glBegin' and the corresponding execution of `glEnd'.")
21562
21563 (define-gl-procedures
21564 ((glUniform1f
21565 (location GLint)
21566 (v0 GLfloat)
21567 ->
21568 void)
21569 (glUniform2f
21570 (location GLint)
21571 (v0 GLfloat)
21572 (v1 GLfloat)
21573 ->
21574 void)
21575 (glUniform3f
21576 (location GLint)
21577 (v0 GLfloat)
21578 (v1 GLfloat)
21579 (v2 GLfloat)
21580 ->
21581 void)
21582 (glUniform4f
21583 (location GLint)
21584 (v0 GLfloat)
21585 (v1 GLfloat)
21586 (v2 GLfloat)
21587 (v3 GLfloat)
21588 ->
21589 void)
21590 (glUniform1i (location GLint) (v0 GLint) -> void)
21591 (glUniform2i
21592 (location GLint)
21593 (v0 GLint)
21594 (v1 GLint)
21595 ->
21596 void)
21597 (glUniform3i
21598 (location GLint)
21599 (v0 GLint)
21600 (v1 GLint)
21601 (v2 GLint)
21602 ->
21603 void)
21604 (glUniform4i
21605 (location GLint)
21606 (v0 GLint)
21607 (v1 GLint)
21608 (v2 GLint)
21609 (v3 GLint)
21610 ->
21611 void)
21612 (glUniformMatrix2fv
21613 (location GLint)
21614 (count GLsizei)
21615 (transpose GLboolean)
21616 (value const-GLfloat-*)
21617 ->
21618 void)
21619 (glUniformMatrix3fv
21620 (location GLint)
21621 (count GLsizei)
21622 (transpose GLboolean)
21623 (value const-GLfloat-*)
21624 ->
21625 void)
21626 (glUniformMatrix4fv
21627 (location GLint)
21628 (count GLsizei)
21629 (transpose GLboolean)
21630 (value const-GLfloat-*)
21631 ->
21632 void)
21633 (glUniformMatrix2x3fv
21634 (location GLint)
21635 (count GLsizei)
21636 (transpose GLboolean)
21637 (value const-GLfloat-*)
21638 ->
21639 void)
21640 (glUniformMatrix3x2fv
21641 (location GLint)
21642 (count GLsizei)
21643 (transpose GLboolean)
21644 (value const-GLfloat-*)
21645 ->
21646 void)
21647 (glUniformMatrix2x4fv
21648 (location GLint)
21649 (count GLsizei)
21650 (transpose GLboolean)
21651 (value const-GLfloat-*)
21652 ->
21653 void)
21654 (glUniformMatrix4x2fv
21655 (location GLint)
21656 (count GLsizei)
21657 (transpose GLboolean)
21658 (value const-GLfloat-*)
21659 ->
21660 void)
21661 (glUniformMatrix3x4fv
21662 (location GLint)
21663 (count GLsizei)
21664 (transpose GLboolean)
21665 (value const-GLfloat-*)
21666 ->
21667 void)
21668 (glUniformMatrix4x3fv
21669 (location GLint)
21670 (count GLsizei)
21671 (transpose GLboolean)
21672 (value const-GLfloat-*)
21673 ->
21674 void))
21675 "Specify the value of a uniform variable for the current program object.
21676
21677 LOCATION
21678 Specifies the location of the uniform variable to be modified.
21679
21680 V0, V1, V2, V3
21681 Specifies the new values to be used for the specified uniform
21682 variable.
21683
21684 `glUniform' modifies the value of a uniform variable or a uniform
21685 variable array. The location of the uniform variable to be modified is
21686 specified by LOCATION, which should be a value returned by
21687 `glGetUniformLocation'. `glUniform' operates on the program object that
21688 was made part of current state by calling `glUseProgram'.
21689
21690 The commands `glUniform{1|2|3|4}{f|i}' are used to change the value of
21691 the uniform variable specified by LOCATION using the values passed as
21692 arguments. The number specified in the command should match the number
21693 of components in the data type of the specified uniform variable (e.g.,
21694 `1' for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The suffix
21695 `f' indicates that floating-point values are being passed; the suffix
21696 `i' indicates that integer values are being passed, and this type should
21697 also match the data type of the specified uniform variable. The `i'
21698 variants of this function should be used to provide values for uniform
21699 variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The
21700 `f' variants should be used to provide values for uniform variables of
21701 type float, vec2, vec3, vec4, or arrays of these. Either the `i' or the
21702 `f' variants may be used to provide values for uniform variables of type
21703 bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable will
21704 be set to false if the input value is 0 or 0.0f, and it will be set to
21705 true otherwise.
21706
21707 All active uniform variables defined in a program object are initialized
21708 to 0 when the program object is linked successfully. They retain the
21709 values assigned to them by a call to `glUniform ' until the next
21710 successful link operation occurs on the program object, when they are
21711 once again initialized to 0.
21712
21713 The commands `glUniform{1|2|3|4}{f|i}v' can be used to modify a single
21714 uniform variable or a uniform variable array. These commands pass a
21715 count and a pointer to the values to be loaded into a uniform variable
21716 or a uniform variable array. A count of 1 should be used if modifying
21717 the value of a single uniform variable, and a count of 1 or greater can
21718 be used to modify an entire array or part of an array. When loading N
21719 elements starting at an arbitrary position M in a uniform variable
21720 array, elements M + N - 1 in the array will be replaced with the new
21721 values. If M + N - 1 is larger than the size of the uniform variable
21722 array, values for all array elements beyond the end of the array will be
21723 ignored. The number specified in the name of the command indicates the
21724 number of components for each element in VALUE, and it should match the
21725 number of components in the data type of the specified uniform variable
21726 (e.g., `1' for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The
21727 data type specified in the name of the command must match the data type
21728 for the specified uniform variable as described previously for
21729 `glUniform{1|2|3|4}{f|i}'.
21730
21731 For uniform variable arrays, each element of the array is considered to
21732 be of the type indicated in the name of the command (e.g., `glUniform3f'
21733 or `glUniform3fv' can be used to load a uniform variable array of type
21734 vec3). The number of elements of the uniform variable array to be
21735 modified is specified by COUNT
21736
21737 The commands `glUniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv' are used
21738 to modify a matrix or an array of matrices. The numbers in the command
21739 name are interpreted as the dimensionality of the matrix. The number `2'
21740 indicates a 2 × 2 matrix (i.e., 4 values), the number `3' indicates a 3
21741 × 3 matrix (i.e., 9 values), and the number `4' indicates a 4 × 4 matrix
21742 (i.e., 16 values). Non-square matrix dimensionality is explicit, with
21743 the first number representing the number of columns and the second
21744 number representing the number of rows. For example, `2x4' indicates a 2
21745 × 4 matrix with 2 columns and 4 rows (i.e., 8 values). If TRANSPOSE is
21746 `GL_FALSE', each matrix is assumed to be supplied in column major order.
21747 If TRANSPOSE is `GL_TRUE', each matrix is assumed to be supplied in row
21748 major order. The COUNT argument indicates the number of matrices to be
21749 passed. A count of 1 should be used if modifying the value of a single
21750 matrix, and a count greater than 1 can be used to modify an array of
21751 matrices.
21752
21753 `GL_INVALID_OPERATION' is generated if there is no current program
21754 object.
21755
21756 `GL_INVALID_OPERATION' is generated if the size of the uniform variable
21757 declared in the shader does not match the size indicated by the
21758 `glUniform' command.
21759
21760 `GL_INVALID_OPERATION' is generated if one of the integer variants of
21761 this function is used to load a uniform variable of type float, vec2,
21762 vec3, vec4, or an array of these, or if one of the floating-point
21763 variants of this function is used to load a uniform variable of type
21764 int, ivec2, ivec3, or ivec4, or an array of these.
21765
21766 `GL_INVALID_OPERATION' is generated if LOCATION is an invalid uniform
21767 location for the current program object and LOCATION is not equal to -1.
21768
21769 `GL_INVALID_VALUE' is generated if COUNT is less than 0.
21770
21771 `GL_INVALID_OPERATION' is generated if COUNT is greater than 1 and the
21772 indicated uniform variable is not an array variable.
21773
21774 `GL_INVALID_OPERATION' is generated if a sampler is loaded using a
21775 command other than `glUniform1i' and `glUniform1iv'.
21776
21777 `GL_INVALID_OPERATION' is generated if `glUniform' is executed between
21778 the execution of `glBegin' and the corresponding execution of `glEnd'.")
21779
21780 (define-gl-procedures
21781 ((glUseProgram (program GLuint) -> void))
21782 "Installs a program object as part of current rendering state.
21783
21784 PROGRAM
21785 Specifies the handle of the program object whose executables are to
21786 be used as part of current rendering state.
21787
21788 `glUseProgram' installs the program object specified by PROGRAM as part
21789 of current rendering state. One or more executables are created in a
21790 program object by successfully attaching shader objects to it with
21791 `glAttachShader', successfully compiling the shader objects with
21792 `glCompileShader', and successfully linking the program object with
21793 `glLinkProgram'.
21794
21795 A program object will contain an executable that will run on the vertex
21796 processor if it contains one or more shader objects of type
21797 `GL_VERTEX_SHADER' that have been successfully compiled and linked.
21798 Similarly, a program object will contain an executable that will run on
21799 the fragment processor if it contains one or more shader objects of type
21800 `GL_FRAGMENT_SHADER' that have been successfully compiled and linked.
21801
21802 Successfully installing an executable on a programmable processor will
21803 cause the corresponding fixed functionality of OpenGL to be disabled.
21804 Specifically, if an executable is installed on the vertex processor, the
21805 OpenGL fixed functionality will be disabled as follows.
21806
21807 * The projection matrix is not applied to vertex coordinates.
21808
21809 * The texture matrices are not applied to texture coordinates.
21810
21811 * Normals are not transformed to eye coordinates.
21812
21813 * Normals are not rescaled or normalized.
21814
21815 * Normalization of `GL_AUTO_NORMAL' evaluated normals is not
21816 performed.
21817
21818 * Texture coordinates are not generated automatically.
21819
21820 * Per-vertex lighting is not performed.
21821
21822 * Color material computations are not performed.
21823
21824 * Color index lighting is not performed.
21825
21826 * This list also applies when setting the current raster position.
21827
21828 The executable that is installed on the vertex processor is expected to
21829 implement any or all of the desired functionality from the preceding
21830 list. Similarly, if an executable is installed on the fragment
21831 processor, the OpenGL fixed functionality will be disabled as follows.
21832
21833 * Texture application is not applied.
21834
21835 * Color sum is not applied.
21836
21837 * Fog is not applied.
21838
21839 Again, the fragment shader that is installed is expected to implement
21840 any or all of the desired functionality from the preceding list.
21841
21842 While a program object is in use, applications are free to modify
21843 attached shader objects, compile attached shader objects, attach
21844 additional shader objects, and detach or delete shader objects. None of
21845 these operations will affect the executables that are part of the
21846 current state. However, relinking the program object that is currently
21847 in use will install the program object as part of the current rendering
21848 state if the link operation was successful (see `glLinkProgram' ). If
21849 the program object currently in use is relinked unsuccessfully, its link
21850 status will be set to `GL_FALSE', but the executables and associated
21851 state will remain part of the current state until a subsequent call to
21852 `glUseProgram' removes it from use. After it is removed from use, it
21853 cannot be made part of current state until it has been successfully
21854 relinked.
21855
21856 If PROGRAM contains shader objects of type `GL_VERTEX_SHADER' but it
21857 does not contain shader objects of type `GL_FRAGMENT_SHADER', an
21858 executable will be installed on the vertex processor, but fixed
21859 functionality will be used for fragment processing. Similarly, if
21860 PROGRAM contains shader objects of type `GL_FRAGMENT_SHADER' but it does
21861 not contain shader objects of type `GL_VERTEX_SHADER', an executable
21862 will be installed on the fragment processor, but fixed functionality
21863 will be used for vertex processing. If PROGRAM is 0, the programmable
21864 processors will be disabled, and fixed functionality will be used for
21865 both vertex and fragment processing.
21866
21867 `GL_INVALID_VALUE' is generated if PROGRAM is neither 0 nor a value
21868 generated by OpenGL.
21869
21870 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
21871
21872 `GL_INVALID_OPERATION' is generated if PROGRAM could not be made part of
21873 current state.
21874
21875 `GL_INVALID_OPERATION' is generated if `glUseProgram' is executed
21876 between the execution of `glBegin' and the corresponding execution of
21877 `glEnd'.")
21878
21879 (define-gl-procedures
21880 ((glValidateProgram (program GLuint) -> void))
21881 "Validates a program object.
21882
21883 PROGRAM
21884 Specifies the handle of the program object to be validated.
21885
21886 `glValidateProgram' checks to see whether the executables contained in
21887 PROGRAM can execute given the current OpenGL state. The information
21888 generated by the validation process will be stored in PROGRAM's
21889 information log. The validation information may consist of an empty
21890 string, or it may be a string containing information about how the
21891 current program object interacts with the rest of current OpenGL state.
21892 This provides a way for OpenGL implementers to convey more information
21893 about why the current program is inefficient, suboptimal, failing to
21894 execute, and so on.
21895
21896 The status of the validation operation will be stored as part of the
21897 program object's state. This value will be set to `GL_TRUE' if the
21898 validation succeeded, and `GL_FALSE' otherwise. It can be queried by
21899 calling `glGetProgram' with arguments PROGRAM and `GL_VALIDATE_STATUS'.
21900 If validation is successful, PROGRAM is guaranteed to execute given the
21901 current state. Otherwise, PROGRAM is guaranteed to not execute.
21902
21903 This function is typically useful only during application development.
21904 The informational string stored in the information log is completely
21905 implementation dependent; therefore, an application should not expect
21906 different OpenGL implementations to produce identical information
21907 strings.
21908
21909 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
21910 OpenGL.
21911
21912 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
21913
21914 `GL_INVALID_OPERATION' is generated if `glValidateProgram' is executed
21915 between the execution of `glBegin' and the corresponding execution of
21916 `glEnd'.")
21917
21918 (define-gl-procedures
21919 ((glVertexAttribPointer
21920 (index GLuint)
21921 (size GLint)
21922 (type GLenum)
21923 (normalized GLboolean)
21924 (stride GLsizei)
21925 (pointer const-GLvoid-*)
21926 ->
21927 void))
21928 "Define an array of generic vertex attribute data.
21929
21930 INDEX
21931 Specifies the index of the generic vertex attribute to be modified.
21932
21933 SIZE
21934 Specifies the number of components per generic vertex attribute.
21935 Must be 1, 2, 3, or 4. The initial value is 4.
21936
21937 TYPE
21938 Specifies the data type of each component in the array. Symbolic
21939 constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
21940 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', or
21941 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
21942
21943 NORMALIZED
21944 Specifies whether fixed-point data values should be normalized
21945 (`GL_TRUE') or converted directly as fixed-point values
21946 (`GL_FALSE') when they are accessed.
21947
21948 STRIDE
21949 Specifies the byte offset between consecutive generic vertex
21950 attributes. If STRIDE is 0, the generic vertex attributes are
21951 understood to be tightly packed in the array. The initial value is
21952 0.
21953
21954 POINTER
21955 Specifies a pointer to the first component of the first generic
21956 vertex attribute in the array. The initial value is 0.
21957
21958 `glVertexAttribPointer' specifies the location and data format of the
21959 array of generic vertex attributes at index INDEX to use when rendering.
21960 SIZE specifies the number of components per attribute and must be 1, 2,
21961 3, or 4. TYPE specifies the data type of each component, and STRIDE
21962 specifies the byte stride from one attribute to the next, allowing
21963 vertices and attributes to be packed into a single array or stored in
21964 separate arrays. If set to `GL_TRUE', NORMALIZED indicates that values
21965 stored in an integer format are to be mapped to the range [-1,1] (for
21966 signed values) or [0,1] (for unsigned values) when they are accessed and
21967 converted to floating point. Otherwise, values will be converted to
21968 floats directly without normalization.
21969
21970 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
21971 target (see `glBindBuffer') while a generic vertex attribute array is
21972 specified, POINTER is treated as a byte offset into the buffer object's
21973 data store. Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING')
21974 is saved as generic vertex attribute array client-side state
21975 (`GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING') for index INDEX.
21976
21977 When a generic vertex attribute array is specified, SIZE, TYPE,
21978 NORMALIZED, STRIDE, and POINTER are saved as client-side state, in
21979 addition to the current vertex array buffer object binding.
21980
21981 To enable and disable a generic vertex attribute array, call
21982 `glEnableVertexAttribArray' and `glDisableVertexAttribArray' with INDEX.
21983 If enabled, the generic vertex attribute array is used when
21984 `glArrayElement', `glDrawArrays', `glMultiDrawArrays', `glDrawElements',
21985 `glMultiDrawElements', or `glDrawRangeElements' is called.
21986
21987 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
21988 `GL_MAX_VERTEX_ATTRIBS'.
21989
21990 `GL_INVALID_VALUE' is generated if SIZE is not 1, 2, 3, or 4.
21991
21992 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
21993
21994 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
21995
21996 (define-gl-procedures
21997 ((glVertexAttrib1f
21998 (index GLuint)
21999 (v0 GLfloat)
22000 ->
22001 void)
22002 (glVertexAttrib1s
22003 (index GLuint)
22004 (v0 GLshort)
22005 ->
22006 void)
22007 (glVertexAttrib2f
22008 (index GLuint)
22009 (v0 GLfloat)
22010 (v1 GLfloat)
22011 ->
22012 void)
22013 (glVertexAttrib2s
22014 (index GLuint)
22015 (v0 GLshort)
22016 (v1 GLshort)
22017 ->
22018 void)
22019 (glVertexAttrib3f
22020 (index GLuint)
22021 (v0 GLfloat)
22022 (v1 GLfloat)
22023 (v2 GLfloat)
22024 ->
22025 void)
22026 (glVertexAttrib3s
22027 (index GLuint)
22028 (v0 GLshort)
22029 (v1 GLshort)
22030 (v2 GLshort)
22031 ->
22032 void)
22033 (glVertexAttrib4f
22034 (index GLuint)
22035 (v0 GLfloat)
22036 (v1 GLfloat)
22037 (v2 GLfloat)
22038 (v3 GLfloat)
22039 ->
22040 void)
22041 (glVertexAttrib4s
22042 (index GLuint)
22043 (v0 GLshort)
22044 (v1 GLshort)
22045 (v2 GLshort)
22046 (v3 GLshort)
22047 ->
22048 void)
22049 (glVertexAttrib4Nub
22050 (index GLuint)
22051 (v0 GLubyte)
22052 (v1 GLubyte)
22053 (v2 GLubyte)
22054 (v3 GLubyte)
22055 ->
22056 void)
22057 (glVertexAttrib4iv
22058 (index GLuint)
22059 (v const-GLint-*)
22060 ->
22061 void)
22062 (glVertexAttrib4uiv
22063 (index GLuint)
22064 (v const-GLuint-*)
22065 ->
22066 void)
22067 (glVertexAttrib4Niv
22068 (index GLuint)
22069 (v const-GLint-*)
22070 ->
22071 void)
22072 (glVertexAttrib4Nuiv
22073 (index GLuint)
22074 (v const-GLuint-*)
22075 ->
22076 void))
22077 "Specifies the value of a generic vertex attribute.
22078
22079 INDEX
22080 Specifies the index of the generic vertex attribute to be modified.
22081
22082 V0, V1, V2, V3
22083 Specifies the new values to be used for the specified vertex
22084 attribute.
22085
22086 OpenGL defines a number of standard vertex attributes that applications
22087 can modify with standard API entry points (color, normal, texture
22088 coordinates, etc.). The `glVertexAttrib' family of entry points allows
22089 an application to pass generic vertex attributes in numbered locations.
22090
22091 Generic attributes are defined as four-component values that are
22092 organized into an array. The first entry of this array is numbered 0,
22093 and the size of the array is specified by the implementation-dependent
22094 constant `GL_MAX_VERTEX_ATTRIBS'. Individual elements of this array can
22095 be modified with a `glVertexAttrib' call that specifies the index of the
22096 element to be modified and a value for that element.
22097
22098 These commands can be used to specify one, two, three, or all four
22099 components of the generic vertex attribute specified by INDEX. A `1' in
22100 the name of the command indicates that only one value is passed, and it
22101 will be used to modify the first component of the generic vertex
22102 attribute. The second and third components will be set to 0, and the
22103 fourth component will be set to 1. Similarly, a `2' in the name of the
22104 command indicates that values are provided for the first two components,
22105 the third component will be set to 0, and the fourth component will be
22106 set to 1. A `3' in the name of the command indicates that values are
22107 provided for the first three components and the fourth component will be
22108 set to 1, whereas a `4' in the name indicates that values are provided
22109 for all four components.
22110
22111 The letters `s', `f', `i', `d', `ub', `us', and `ui' indicate whether
22112 the arguments are of type short, float, int, double, unsigned byte,
22113 unsigned short, or unsigned int. When `v' is appended to the name, the
22114 commands can take a pointer to an array of such values. The commands
22115 containing `N' indicate that the arguments will be passed as fixed-point
22116 values that are scaled to a normalized range according to the component
22117 conversion rules defined by the OpenGL specification. Signed values are
22118 understood to represent fixed-point values in the range [-1,1], and
22119 unsigned values are understood to represent fixed-point values in the
22120 range [0,1].
22121
22122 OpenGL Shading Language attribute variables are allowed to be of type
22123 mat2, mat3, or mat4. Attributes of these types may be loaded using the
22124 `glVertexAttrib' entry points. Matrices must be loaded into successive
22125 generic attribute slots in column major order, with one column of the
22126 matrix in each generic attribute slot.
22127
22128 A user-defined attribute variable declared in a vertex shader can be
22129 bound to a generic attribute index by calling `glBindAttribLocation'.
22130 This allows an application to use more descriptive variable names in a
22131 vertex shader. A subsequent change to the specified generic vertex
22132 attribute will be immediately reflected as a change to the corresponding
22133 attribute variable in the vertex shader.
22134
22135 The binding between a generic vertex attribute index and a user-defined
22136 attribute variable in a vertex shader is part of the state of a program
22137 object, but the current value of the generic vertex attribute is not.
22138 The value of each generic vertex attribute is part of current state,
22139 just like standard vertex attributes, and it is maintained even if a
22140 different program object is used.
22141
22142 An application may freely modify generic vertex attributes that are not
22143 bound to a named vertex shader attribute variable. These values are
22144 simply maintained as part of current state and will not be accessed by
22145 the vertex shader. If a generic vertex attribute bound to an attribute
22146 variable in a vertex shader is not updated while the vertex shader is
22147 executing, the vertex shader will repeatedly use the current value for
22148 the generic vertex attribute.
22149
22150 The generic vertex attribute with index 0 is the same as the vertex
22151 position attribute previously defined by OpenGL. A `glVertex2',
22152 `glVertex3', or `glVertex4' command is completely equivalent to the
22153 corresponding `glVertexAttrib' command with an index argument of 0. A
22154 vertex shader can access generic vertex attribute 0 by using the
22155 built-in attribute variable GL_VERTEX. There are no current values for
22156 generic vertex attribute 0. This is the only generic vertex attribute
22157 with this property; calls to set other standard vertex attributes can be
22158 freely mixed with calls to set any of the other generic vertex
22159 attributes.
22160
22161 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
22162 `GL_MAX_VERTEX_ATTRIBS'.")
22163
22164 (define-gl-procedures
22165 ((glVertexPointer
22166 (size GLint)
22167 (type GLenum)
22168 (stride GLsizei)
22169 (pointer const-GLvoid-*)
22170 ->
22171 void))
22172 "Define an array of vertex data.
22173
22174 SIZE
22175 Specifies the number of coordinates per vertex. Must be 2, 3, or 4.
22176 The initial value is 4.
22177
22178 TYPE
22179 Specifies the data type of each coordinate in the array. Symbolic
22180 constants `GL_SHORT', `GL_INT', `GL_FLOAT', or `GL_DOUBLE' are
22181 accepted. The initial value is `GL_FLOAT'.
22182
22183 STRIDE
22184 Specifies the byte offset between consecutive vertices. If STRIDE
22185 is 0, the vertices are understood to be tightly packed in the
22186 array. The initial value is 0.
22187
22188 POINTER
22189 Specifies a pointer to the first coordinate of the first vertex in
22190 the array. The initial value is 0.
22191
22192 `glVertexPointer' specifies the location and data format of an array of
22193 vertex coordinates to use when rendering. SIZE specifies the number of
22194 coordinates per vertex, and must be 2, 3, or 4. TYPE specifies the data
22195 type of each coordinate, and STRIDE specifies the byte stride from one
22196 vertex to the next, allowing vertices and attributes to be packed into a
22197 single array or stored in separate arrays. (Single-array storage may be
22198 more efficient on some implementations; see `glInterleavedArrays'.)
22199
22200 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
22201 target (see `glBindBuffer') while a vertex array is specified, POINTER
22202 is treated as a byte offset into the buffer object's data store. Also,
22203 the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as vertex
22204 array client-side state (`GL_VERTEX_ARRAY_BUFFER_BINDING').
22205
22206 When a vertex array is specified, SIZE, TYPE, STRIDE, and POINTER are
22207 saved as client-side state, in addition to the current vertex array
22208 buffer object binding.
22209
22210 To enable and disable the vertex array, call `glEnableClientState' and
22211 `glDisableClientState' with the argument `GL_VERTEX_ARRAY'. If enabled,
22212 the vertex array is used when `glArrayElement', `glDrawArrays',
22213 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements', or
22214 `glDrawRangeElements' is called.
22215
22216 `GL_INVALID_VALUE' is generated if SIZE is not 2, 3, or 4.
22217
22218 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
22219
22220 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
22221
22222 (define-gl-procedures
22223 ((glVertex2i (x GLint) (y GLint) -> void)
22224 (glVertex2f (x GLfloat) (y GLfloat) -> void)
22225 (glVertex3i
22226 (x GLint)
22227 (y GLint)
22228 (z GLint)
22229 ->
22230 void)
22231 (glVertex3f
22232 (x GLfloat)
22233 (y GLfloat)
22234 (z GLfloat)
22235 ->
22236 void)
22237 (glVertex4i
22238 (x GLint)
22239 (y GLint)
22240 (z GLint)
22241 (w GLint)
22242 ->
22243 void)
22244 (glVertex4f
22245 (x GLfloat)
22246 (y GLfloat)
22247 (z GLfloat)
22248 (w GLfloat)
22249 ->
22250 void))
22251 "Specify a vertex.
22252
22253 X
22254 Y
22255
22256 Z
22257
22258 W
22259
22260 Specify X, Y, Z, and W coordinates of a vertex. Not all parameters
22261 are present in all forms of the command.
22262
22263 `glVertex' commands are used within `glBegin'/`glEnd' pairs to specify
22264 point, line, and polygon vertices. The current color, normal, texture
22265 coordinates, and fog coordinate are associated with the vertex when
22266 `glVertex' is called.
22267
22268 When only X and Y are specified, Z defaults to 0 and W defaults to 1.
22269 When X , Y , and Z are specified, W defaults to 1.")
22270
22271 (define-gl-procedures
22272 ((glViewport
22273 (x GLint)
22274 (y GLint)
22275 (width GLsizei)
22276 (height GLsizei)
22277 ->
22278 void))
22279 "Set the viewport.
22280
22281 X
22282 Y
22283
22284 Specify the lower left corner of the viewport rectangle, in pixels.
22285 The initial value is (0,0).
22286
22287 WIDTH
22288 HEIGHT
22289
22290 Specify the width and height of the viewport. When a GL context is
22291 first attached to a window, WIDTH and HEIGHT are set to the
22292 dimensions of that window.
22293
22294 `glViewport' specifies the affine transformation of X and Y from
22295 normalized device coordinates to window coordinates. Let (X_ND,Y_ND) be
22296 normalized device coordinates. Then the window coordinates (X_W,Y_W) are
22297 computed as follows:
22298
22299 X_W=(X_ND+1,)\u2062(WIDTH/2,)+X
22300
22301 Y_W=(Y_ND+1,)\u2062(HEIGHT/2,)+Y
22302
22303 Viewport width and height are silently clamped to a range that depends
22304 on the implementation. To query this range, call `glGet' with argument
22305 `GL_MAX_VIEWPORT_DIMS'.
22306
22307 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
22308
22309 `GL_INVALID_OPERATION' is generated if `glViewport' is executed between
22310 the execution of `glBegin' and the corresponding execution of `glEnd'.")
22311
22312 (define-gl-procedures
22313 ((glWindowPos2i (x GLint) (y GLint) -> void)
22314 (glWindowPos2f (x GLfloat) (y GLfloat) -> void)
22315 (glWindowPos3i
22316 (x GLint)
22317 (y GLint)
22318 (z GLint)
22319 ->
22320 void)
22321 (glWindowPos3f
22322 (x GLfloat)
22323 (y GLfloat)
22324 (z GLfloat)
22325 ->
22326 void))
22327 "Specify the raster position in window coordinates for pixel operations.
22328
22329 X
22330 Y
22331
22332 Z
22333
22334 Specify the X , Y , Z coordinates for the raster position.
22335
22336 The GL maintains a 3D position in window coordinates. This position,
22337 called the raster position, is used to position pixel and bitmap write
22338 operations. It is maintained with subpixel accuracy. See `glBitmap',
22339 `glDrawPixels', and `glCopyPixels'.
22340
22341 `glWindowPos2' specifies the X and Y coordinates, while Z is implicitly
22342 set to 0. `glWindowPos3' specifies all three coordinates. The W
22343 coordinate of the current raster position is always set to 1.0.
22344
22345 `glWindowPos' directly updates the X and Y coordinates of the current
22346 raster position with the values specified. That is, the values are
22347 neither transformed by the current modelview and projection matrices,
22348 nor by the viewport-to-window transform. The Z coordinate of the current
22349 raster position is updated in the following manner:
22350
22351 Z={(N), (F), (N+Z×(F-N,),)\u2062(IF\u2062Z<=0), (IF\u2062Z>=1), (`otherwise',),
22352
22353
22354
22355 where N is `GL_DEPTH_RANGE''s near value, and F is `GL_DEPTH_RANGE''s
22356 far value. See `glDepthRange'.
22357
22358 The specified coordinates are not clip-tested, causing the raster
22359 position to always be valid.
22360
22361 The current raster position also includes some associated color data and
22362 texture coordinates. If lighting is enabled, then
22363 `GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `GL_CURRENT_RASTER_INDEX'
22364 (in color index mode) is set to the color produced by the lighting
22365 calculation (see `glLight', `glLightModel', and `glShadeModel'). If
22366 lighting is disabled, current color (in RGBA mode, state variable
22367 `GL_CURRENT_COLOR') or color index (in color index mode, state variable
22368 `GL_CURRENT_INDEX') is used to update the current raster color.
22369 `GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated.
22370
22371 Likewise, `GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of
22372 `GL_CURRENT_TEXTURE_COORDS', based on the texture matrix and the texture
22373 generation functions (see `glTexGen'). The `GL_CURRENT_RASTER_DISTANCE'
22374 is set to the `GL_CURRENT_FOG_COORD'.
22375
22376
22377
22378 `GL_INVALID_OPERATION' is generated if `glWindowPos' is executed between
22379 the execution of `glBegin' and the corresponding execution of `glEnd'.")
22380