update upstream sources
[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
21 ;;; licensed under the SGI Free Software B License. For details, see
22 ;;; http://oss.sgi.com/projects/FreeB/ (http://oss.sgi.com/projects/FreeB/).
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 glColor3b
89 glColor3s
90 glColor3i
91 glColor3f
92 glColor3d
93 glColor3ub
94 glColor3us
95 glColor3ui
96 glColor4b
97 glColor4s
98 glColor4i
99 glColor4f
100 glColor4d
101 glColor4ub
102 glColor4us
103 glColor4ui
104 glColor3bv
105 glColor3sv
106 glColor3iv
107 glColor3fv
108 glColor3dv
109 glColor3ubv
110 glColor3usv
111 glColor3uiv
112 glColor4bv
113 glColor4sv
114 glColor4iv
115 glColor4fv
116 glColor4dv
117 glColor4ubv
118 glColor4usv
119 glColor4uiv
120 glCompileShader
121 glCompressedTexImage1D
122 glCompressedTexImage2D
123 glCompressedTexImage3D
124 glCompressedTexSubImage1D
125 glCompressedTexSubImage2D
126 glCompressedTexSubImage3D
127 glConvolutionFilter1D
128 glConvolutionFilter2D
129 glConvolutionParameterf
130 glConvolutionParameteri
131 glConvolutionParameterfv
132 glConvolutionParameteriv
133 glCopyColorSubTable
134 glCopyColorTable
135 glCopyConvolutionFilter1D
136 glCopyConvolutionFilter2D
137 glCopyPixels
138 glCopyTexImage1D
139 glCopyTexImage2D
140 glCopyTexSubImage1D
141 glCopyTexSubImage2D
142 glCopyTexSubImage3D
143 glCreateProgram
144 glCreateShader
145 glCullFace
146 glDeleteBuffers
147 glDeleteLists
148 glDeleteProgram
149 glDeleteQueries
150 glDeleteShader
151 glDeleteTextures
152 glDepthFunc
153 glDepthMask
154 glDepthRange
155 glDetachShader
156 glDrawArrays
157 glDrawBuffers
158 glDrawBuffer
159 glDrawElements
160 glDrawPixels
161 glDrawRangeElements
162 glEdgeFlagPointer
163 glEdgeFlag
164 glEdgeFlagv
165 glEnableClientState
166 glDisableClientState
167 glEnableVertexAttribArray
168 glDisableVertexAttribArray
169 glEnable
170 glDisable
171 glEvalCoord1f
172 glEvalCoord1d
173 glEvalCoord2f
174 glEvalCoord2d
175 glEvalCoord1fv
176 glEvalCoord1dv
177 glEvalCoord2fv
178 glEvalCoord2dv
179 glEvalMesh1
180 glEvalMesh2
181 glEvalPoint1
182 glEvalPoint2
183 glFeedbackBuffer
184 glFinish
185 glFlush
186 glFogCoordPointer
187 glFogCoordd
188 glFogCoordf
189 glFogCoorddv
190 glFogCoordfv
191 glFogf
192 glFogi
193 glFogfv
194 glFogiv
195 glFrontFace
196 glFrustum
197 glGenBuffers
198 glGenLists
199 glGenQueries
200 glGenTextures
201 glGetActiveAttrib
202 glGetActiveUniform
203 glGetAttachedShaders
204 glGetAttribLocation
205 glGetBufferParameteriv
206 glGetBufferPointerv
207 glGetBufferSubData
208 glGetClipPlane
209 glGetColorTableParameterfv
210 glGetColorTableParameteriv
211 glGetColorTable
212 glGetCompressedTexImage
213 glGetConvolutionFilter
214 glGetConvolutionParameterfv
215 glGetConvolutionParameteriv
216 glGetError
217 glGetHistogramParameterfv
218 glGetHistogramParameteriv
219 glGetHistogram
220 glGetLightfv
221 glGetLightiv
222 glGetMapdv
223 glGetMapfv
224 glGetMapiv
225 glGetMaterialfv
226 glGetMaterialiv
227 glGetMinmaxParameterfv
228 glGetMinmaxParameteriv
229 glGetMinmax
230 glGetPixelMapfv
231 glGetPixelMapuiv
232 glGetPixelMapusv
233 glGetPointerv
234 glGetPolygonStipple
235 glGetProgramInfoLog
236 glGetProgramiv
237 glGetQueryiv
238 glGetQueryObjectiv
239 glGetQueryObjectuiv
240 glGetSeparableFilter
241 glGetShaderInfoLog
242 glGetShaderSource
243 glGetShaderiv
244 glGetString
245 glGetTexEnvfv
246 glGetTexEnviv
247 glGetTexGendv
248 glGetTexGenfv
249 glGetTexGeniv
250 glGetTexImage
251 glGetTexLevelParameterfv
252 glGetTexLevelParameteriv
253 glGetTexParameterfv
254 glGetTexParameteriv
255 glGetUniformLocation
256 glGetUniformfv
257 glGetUniformiv
258 glGetVertexAttribPointerv
259 glGetVertexAttribdv
260 glGetVertexAttribfv
261 glGetVertexAttribiv
262 glGetBooleanv
263 glGetDoublev
264 glGetFloatv
265 glGetIntegerv
266 glHint
267 glHistogram
268 glIndexMask
269 glIndexPointer
270 glIndexs
271 glIndexi
272 glIndexf
273 glIndexd
274 glIndexub
275 glIndexsv
276 glIndexiv
277 glIndexfv
278 glIndexdv
279 glIndexubv
280 glInitNames
281 glInterleavedArrays
282 glIsBuffer
283 glIsEnabled
284 glIsList
285 glIsProgram
286 glIsQuery
287 glIsShader
288 glIsTexture
289 glLightModelf
290 glLightModeli
291 glLightModelfv
292 glLightModeliv
293 glLightf
294 glLighti
295 glLightfv
296 glLightiv
297 glLineStipple
298 glLineWidth
299 glLinkProgram
300 glListBase
301 glLoadIdentity
302 glLoadMatrixd
303 glLoadMatrixf
304 glLoadName
305 glLoadTransposeMatrixd
306 glLoadTransposeMatrixf
307 glLogicOp
308 glMap1f
309 glMap1d
310 glMap2f
311 glMap2d
312 glMapBuffer
313 glUnmapBuffer
314 glMapGrid1d
315 glMapGrid1f
316 glMapGrid2d
317 glMapGrid2f
318 glMaterialf
319 glMateriali
320 glMaterialfv
321 glMaterialiv
322 glMatrixMode
323 glMinmax
324 glMultiDrawArrays
325 glMultiDrawElements
326 glMultiTexCoord1s
327 glMultiTexCoord1i
328 glMultiTexCoord1f
329 glMultiTexCoord1d
330 glMultiTexCoord2s
331 glMultiTexCoord2i
332 glMultiTexCoord2f
333 glMultiTexCoord2d
334 glMultiTexCoord3s
335 glMultiTexCoord3i
336 glMultiTexCoord3f
337 glMultiTexCoord3d
338 glMultiTexCoord4s
339 glMultiTexCoord4i
340 glMultiTexCoord4f
341 glMultiTexCoord4d
342 glMultiTexCoord1sv
343 glMultiTexCoord1iv
344 glMultiTexCoord1fv
345 glMultiTexCoord1dv
346 glMultiTexCoord2sv
347 glMultiTexCoord2iv
348 glMultiTexCoord2fv
349 glMultiTexCoord2dv
350 glMultiTexCoord3sv
351 glMultiTexCoord3iv
352 glMultiTexCoord3fv
353 glMultiTexCoord3dv
354 glMultiTexCoord4sv
355 glMultiTexCoord4iv
356 glMultiTexCoord4fv
357 glMultiTexCoord4dv
358 glMultMatrixd
359 glMultMatrixf
360 glMultTransposeMatrixd
361 glMultTransposeMatrixf
362 glNewList
363 glEndList
364 glNormalPointer
365 glNormal3b
366 glNormal3d
367 glNormal3f
368 glNormal3i
369 glNormal3s
370 glNormal3bv
371 glNormal3dv
372 glNormal3fv
373 glNormal3iv
374 glNormal3sv
375 glOrtho
376 glPassThrough
377 glPixelMapfv
378 glPixelMapuiv
379 glPixelMapusv
380 glPixelStoref
381 glPixelStorei
382 glPixelTransferf
383 glPixelTransferi
384 glPixelZoom
385 glPointParameterf
386 glPointParameteri
387 glPointParameterfv
388 glPointParameteriv
389 glPointSize
390 glPolygonMode
391 glPolygonOffset
392 glPolygonStipple
393 glPrioritizeTextures
394 glPushAttrib
395 glPopAttrib
396 glPushClientAttrib
397 glPopClientAttrib
398 glPushMatrix
399 glPopMatrix
400 glPushName
401 glPopName
402 glRasterPos2s
403 glRasterPos2i
404 glRasterPos2f
405 glRasterPos2d
406 glRasterPos3s
407 glRasterPos3i
408 glRasterPos3f
409 glRasterPos3d
410 glRasterPos4s
411 glRasterPos4i
412 glRasterPos4f
413 glRasterPos4d
414 glRasterPos2sv
415 glRasterPos2iv
416 glRasterPos2fv
417 glRasterPos2dv
418 glRasterPos3sv
419 glRasterPos3iv
420 glRasterPos3fv
421 glRasterPos3dv
422 glRasterPos4sv
423 glRasterPos4iv
424 glRasterPos4fv
425 glRasterPos4dv
426 glReadBuffer
427 glReadPixels
428 glRectd
429 glRectf
430 glRecti
431 glRects
432 glRectdv
433 glRectfv
434 glRectiv
435 glRectsv
436 glRenderMode
437 glResetHistogram
438 glResetMinmax
439 glRotated
440 glRotatef
441 glSampleCoverage
442 glScaled
443 glScalef
444 glScissor
445 glSecondaryColorPointer
446 glSecondaryColor3b
447 glSecondaryColor3s
448 glSecondaryColor3i
449 glSecondaryColor3f
450 glSecondaryColor3d
451 glSecondaryColor3ub
452 glSecondaryColor3us
453 glSecondaryColor3ui
454 glSecondaryColor3bv
455 glSecondaryColor3sv
456 glSecondaryColor3iv
457 glSecondaryColor3fv
458 glSecondaryColor3dv
459 glSecondaryColor3ubv
460 glSecondaryColor3usv
461 glSecondaryColor3uiv
462 glSelectBuffer
463 glSeparableFilter2D
464 glShadeModel
465 glShaderSource
466 glStencilFuncSeparate
467 glStencilFunc
468 glStencilMaskSeparate
469 glStencilMask
470 glStencilOpSeparate
471 glStencilOp
472 glTexCoordPointer
473 glTexCoord1s
474 glTexCoord1i
475 glTexCoord1f
476 glTexCoord1d
477 glTexCoord2s
478 glTexCoord2i
479 glTexCoord2f
480 glTexCoord2d
481 glTexCoord3s
482 glTexCoord3i
483 glTexCoord3f
484 glTexCoord3d
485 glTexCoord4s
486 glTexCoord4i
487 glTexCoord4f
488 glTexCoord4d
489 glTexCoord1sv
490 glTexCoord1iv
491 glTexCoord1fv
492 glTexCoord1dv
493 glTexCoord2sv
494 glTexCoord2iv
495 glTexCoord2fv
496 glTexCoord2dv
497 glTexCoord3sv
498 glTexCoord3iv
499 glTexCoord3fv
500 glTexCoord3dv
501 glTexCoord4sv
502 glTexCoord4iv
503 glTexCoord4fv
504 glTexCoord4dv
505 glTexEnvf
506 glTexEnvi
507 glTexEnvfv
508 glTexEnviv
509 glTexGeni
510 glTexGenf
511 glTexGend
512 glTexGeniv
513 glTexGenfv
514 glTexGendv
515 glTexImage1D
516 glTexImage2D
517 glTexImage3D
518 glTexParameterf
519 glTexParameteri
520 glTexParameterfv
521 glTexParameteriv
522 glTexSubImage1D
523 glTexSubImage2D
524 glTexSubImage3D
525 glTranslated
526 glTranslatef
527 glUniform1f
528 glUniform2f
529 glUniform3f
530 glUniform4f
531 glUniform1i
532 glUniform2i
533 glUniform3i
534 glUniform4i
535 glUniform1fv
536 glUniform2fv
537 glUniform3fv
538 glUniform4fv
539 glUniform1iv
540 glUniform2iv
541 glUniform3iv
542 glUniform4iv
543 glUniformMatrix2fv
544 glUniformMatrix3fv
545 glUniformMatrix4fv
546 glUniformMatrix2x3fv
547 glUniformMatrix3x2fv
548 glUniformMatrix2x4fv
549 glUniformMatrix4x2fv
550 glUniformMatrix3x4fv
551 glUniformMatrix4x3fv
552 glUseProgram
553 glValidateProgram
554 glVertexAttribPointer
555 glVertexAttrib1f
556 glVertexAttrib1s
557 glVertexAttrib1d
558 glVertexAttrib2f
559 glVertexAttrib2s
560 glVertexAttrib2d
561 glVertexAttrib3f
562 glVertexAttrib3s
563 glVertexAttrib3d
564 glVertexAttrib4f
565 glVertexAttrib4s
566 glVertexAttrib4d
567 glVertexAttrib4Nub
568 glVertexAttrib1fv
569 glVertexAttrib1sv
570 glVertexAttrib1dv
571 glVertexAttrib2fv
572 glVertexAttrib2sv
573 glVertexAttrib2dv
574 glVertexAttrib3fv
575 glVertexAttrib3sv
576 glVertexAttrib3dv
577 glVertexAttrib4fv
578 glVertexAttrib4sv
579 glVertexAttrib4dv
580 glVertexAttrib4iv
581 glVertexAttrib4bv
582 glVertexAttrib4ubv
583 glVertexAttrib4usv
584 glVertexAttrib4uiv
585 glVertexAttrib4Nbv
586 glVertexAttrib4Nsv
587 glVertexAttrib4Niv
588 glVertexAttrib4Nubv
589 glVertexAttrib4Nusv
590 glVertexAttrib4Nuiv
591 glVertexPointer
592 glVertex2s
593 glVertex2i
594 glVertex2f
595 glVertex2d
596 glVertex3s
597 glVertex3i
598 glVertex3f
599 glVertex3d
600 glVertex4s
601 glVertex4i
602 glVertex4f
603 glVertex4d
604 glVertex2sv
605 glVertex2iv
606 glVertex2fv
607 glVertex2dv
608 glVertex3sv
609 glVertex3iv
610 glVertex3fv
611 glVertex3dv
612 glVertex4sv
613 glVertex4iv
614 glVertex4fv
615 glVertex4dv
616 glViewport
617 glWindowPos2s
618 glWindowPos2i
619 glWindowPos2f
620 glWindowPos2d
621 glWindowPos3s
622 glWindowPos3i
623 glWindowPos3f
624 glWindowPos3d
625 glWindowPos2sv
626 glWindowPos2iv
627 glWindowPos2fv
628 glWindowPos2dv
629 glWindowPos3sv
630 glWindowPos3iv
631 glWindowPos3fv
632 glWindowPos3dv))
633
634 (define-gl-procedures
635 ((glAccum (op GLenum) (value GLfloat) -> void))
636 "Operate on the accumulation buffer.
637
638 OP
639 Specifies the accumulation buffer operation. Symbolic constants
640 `GL_ACCUM', `GL_LOAD', `GL_ADD', `GL_MULT', and `GL_RETURN' are
641 accepted.
642
643 VALUE
644 Specifies a floating-point value used in the accumulation buffer
645 operation. OP determines how VALUE is used.
646
647 The accumulation buffer is an extended-range color buffer. Images are
648 not rendered into it. Rather, images rendered into one of the color
649 buffers are added to the contents of the accumulation buffer after
650 rendering. Effects such as antialiasing (of points, lines, and
651 polygons), motion blur, and depth of field can be created by
652 accumulating images generated with different transformation matrices.
653
654 Each pixel in the accumulation buffer consists of red, green, blue, and
655 alpha values. The number of bits per component in the accumulation
656 buffer depends on the implementation. You can examine this number by
657 calling `glGetIntegerv' four times, with arguments `GL_ACCUM_RED_BITS',
658 `GL_ACCUM_GREEN_BITS', `GL_ACCUM_BLUE_BITS', and `GL_ACCUM_ALPHA_BITS'.
659 Regardless of the number of bits per component, the range of values
660 stored by each component is [-1,1] . The accumulation buffer pixels are
661 mapped one-to-one with frame buffer pixels.
662
663 `glAccum' operates on the accumulation buffer. The first argument, OP,
664 is a symbolic constant that selects an accumulation buffer operation.
665 The second argument, VALUE, is a floating-point value to be used in that
666 operation. Five operations are specified: `GL_ACCUM', `GL_LOAD',
667 `GL_ADD', `GL_MULT', and `GL_RETURN'.
668
669 All accumulation buffer operations are limited to the area of the
670 current scissor box and applied identically to the red, green, blue, and
671 alpha components of each pixel. If a `glAccum' operation results in a
672 value outside the range [-1,1] , the contents of an accumulation buffer
673 pixel component are undefined.
674
675 The operations are as follows:
676
677 `GL_ACCUM'
678 Obtains R, G, B, and A values from the buffer currently selected
679 for reading (see `glReadBuffer'). Each component value is divided
680 by 2^N-1 , where N is the number of bits allocated to each color
681 component in the currently selected buffer. The result is a
682 floating-point value in the range [0,1] , which is multiplied by
683 VALUE and added to the corresponding pixel component in the
684 accumulation buffer, thereby updating the accumulation buffer.
685
686 `GL_LOAD'
687 Similar to `GL_ACCUM', except that the current value in the
688 accumulation buffer is not used in the calculation of the new
689 value. That is, the R, G, B, and A values from the currently
690 selected buffer are divided by 2^N-1 , multiplied by VALUE, and
691 then stored in the corresponding accumulation buffer cell,
692 overwriting the current value.
693
694 `GL_ADD'
695 Adds VALUE to each R, G, B, and A in the accumulation buffer.
696
697 `GL_MULT'
698 Multiplies each R, G, B, and A in the accumulation buffer by VALUE
699 and returns the scaled component to its corresponding accumulation
700 buffer location.
701
702 `GL_RETURN'
703 Transfers accumulation buffer values to the color buffer or buffers
704 currently selected for writing. Each R, G, B, and A component is
705 multiplied by VALUE, then multiplied by 2^N-1 , clamped to the
706 range [0,2^N-1] , and stored in the corresponding display buffer
707 cell. The only fragment operations that are applied to this
708 transfer are pixel ownership, scissor, dithering, and color
709 writemasks.
710
711 To clear the accumulation buffer, call `glClearAccum' with R, G, B, and
712 A values to set it to, then call `glClear' with the accumulation buffer
713 enabled.
714
715 `GL_INVALID_ENUM' is generated if OP is not an accepted value.
716
717 `GL_INVALID_OPERATION' is generated if there is no accumulation buffer.
718
719 `GL_INVALID_OPERATION' is generated if `glAccum' is executed between the
720 execution of `glBegin' and the corresponding execution of `glEnd'.")
721
722 (define-gl-procedures
723 ((glActiveTexture (texture GLenum) -> void))
724 "Select active texture unit.
725
726 TEXTURE
727 Specifies which texture unit to make active. The number of texture
728 units is implementation dependent, but must be at least two.
729 TEXTURE must be one of `GL_TEXTURE' I , where i ranges from 0 to
730 the larger of (`GL_MAX_TEXTURE_COORDS' - 1) and
731 (`GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS' - 1). The initial value is
732 `GL_TEXTURE0'.
733
734 `glActiveTexture' selects which texture unit subsequent texture state
735 calls will affect. The number of texture units an implementation
736 supports is implementation dependent, but must be at least 2.
737
738 Vertex arrays are client-side GL resources, which are selected by the
739 `glClientActiveTexture' routine.
740
741 `GL_INVALID_ENUM' is generated if TEXTURE is not one of `GL_TEXTURE'I ,
742 where i ranges from 0 to the larger of (`GL_MAX_TEXTURE_COORDS' - 1) and
743 (`GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS' - 1).")
744
745 (define-gl-procedures
746 ((glAlphaFunc
747 (func GLenum)
748 (ref GLclampf)
749 ->
750 void))
751 "Specify the alpha test function.
752
753 FUNC
754 Specifies the alpha comparison function. Symbolic constants
755 `GL_NEVER', `GL_LESS', `GL_EQUAL', `GL_LEQUAL', `GL_GREATER',
756 `GL_NOTEQUAL', `GL_GEQUAL', and `GL_ALWAYS' are accepted. The
757 initial value is `GL_ALWAYS'.
758
759 REF
760 Specifies the reference value that incoming alpha values are
761 compared to. This value is clamped to the range [0,1] , where 0
762 represents the lowest possible alpha value and 1 the highest
763 possible value. The initial reference value is 0.
764
765 The alpha test discards fragments depending on the outcome of a
766 comparison between an incoming fragment's alpha value and a constant
767 reference value. `glAlphaFunc' specifies the reference value and the
768 comparison function. The comparison is performed only if alpha testing
769 is enabled. By default, it is not enabled. (See `glEnable' and
770 `glDisable' of `GL_ALPHA_TEST'.)
771
772 FUNC and REF specify the conditions under which the pixel is drawn. The
773 incoming alpha value is compared to REF using the function specified by
774 FUNC. If the value passes the comparison, the incoming fragment is
775 drawn if it also passes subsequent stencil and depth buffer tests. If
776 the value fails the comparison, no change is made to the frame buffer at
777 that pixel location. The comparison functions are as follows:
778
779 `GL_NEVER'
780 Never passes.
781
782 `GL_LESS'
783 Passes if the incoming alpha value is less than the reference
784 value.
785
786 `GL_EQUAL'
787 Passes if the incoming alpha value is equal to the reference value.
788
789 `GL_LEQUAL'
790 Passes if the incoming alpha value is less than or equal to the
791 reference value.
792
793 `GL_GREATER'
794 Passes if the incoming alpha value is greater than the reference
795 value.
796
797 `GL_NOTEQUAL'
798 Passes if the incoming alpha value is not equal to the reference
799 value.
800
801 `GL_GEQUAL'
802 Passes if the incoming alpha value is greater than or equal to the
803 reference value.
804
805 `GL_ALWAYS'
806 Always passes (initial value).
807
808 `glAlphaFunc' operates on all pixel write operations, including those
809 resulting from the scan conversion of points, lines, polygons, and
810 bitmaps, and from pixel draw and copy operations. `glAlphaFunc' does
811 not affect screen clear operations.
812
813 `GL_INVALID_ENUM' is generated if FUNC is not an accepted value.
814
815 `GL_INVALID_OPERATION' is generated if `glAlphaFunc' is executed between
816 the execution of `glBegin' and the corresponding execution of `glEnd'.")
817
818 (define-gl-procedures
819 ((glAreTexturesResident
820 (n GLsizei)
821 (textures const-GLuint-*)
822 (residences GLboolean-*)
823 ->
824 GLboolean))
825 "Determine if textures are loaded in texture memory.
826
827 N
828 Specifies the number of textures to be queried.
829
830 TEXTURES
831 Specifies an array containing the names of the textures to be
832 queried.
833
834 RESIDENCES
835 Specifies an array in which the texture residence status is
836 returned. The residence status of a texture named by an element of
837 TEXTURES is returned in the corresponding element of RESIDENCES.
838
839 GL establishes a ``working set'' of textures that are resident in
840 texture memory. These textures can be bound to a texture target much
841 more efficiently than textures that are not resident.
842
843 `glAreTexturesResident' queries the texture residence status of the N
844 textures named by the elements of TEXTURES. If all the named textures
845 are resident, `glAreTexturesResident' returns `GL_TRUE', and the
846 contents of RESIDENCES are undisturbed. If not all the named textures
847 are resident, `glAreTexturesResident' returns `GL_FALSE', and detailed
848 status is returned in the N elements of RESIDENCES. If an element of
849 RESIDENCES is `GL_TRUE', then the texture named by the corresponding
850 element of TEXTURES is resident.
851
852 The residence status of a single bound texture may also be queried by
853 calling `glGetTexParameter' with the TARGET argument set to the target
854 to which the texture is bound, and the PNAME argument set to
855 `GL_TEXTURE_RESIDENT'. This is the only way that the residence status
856 of a default texture can be queried.
857
858 `GL_INVALID_VALUE' is generated if N is negative.
859
860 `GL_INVALID_VALUE' is generated if any element in TEXTURES is 0 or does
861 not name a texture. In that case, the function returns `GL_FALSE' and
862 the contents of RESIDENCES is indeterminate.
863
864 `GL_INVALID_OPERATION' is generated if `glAreTexturesResident' is
865 executed between the execution of `glBegin' and the corresponding
866 execution of `glEnd'.")
867
868 (define-gl-procedures
869 ((glArrayElement (i GLint) -> void))
870 "Render a vertex using the specified vertex array element.
871
872 I
873 Specifies an index into the enabled vertex data arrays.
874
875 `glArrayElement' commands are used within `glBegin'/`glEnd' pairs to
876 specify vertex and attribute data for point, line, and polygon
877 primitives. If `GL_VERTEX_ARRAY' is enabled when `glArrayElement' is
878 called, a single vertex is drawn, using vertex and attribute data taken
879 from location I of the enabled arrays. If `GL_VERTEX_ARRAY' is not
880 enabled, no drawing occurs but the attributes corresponding to the
881 enabled arrays are modified.
882
883 Use `glArrayElement' to construct primitives by indexing vertex data,
884 rather than by streaming through arrays of data in first-to-last order.
885 Because each call specifies only a single vertex, it is possible to
886 explicitly specify per-primitive attributes such as a single normal for
887 each triangle.
888
889 Changes made to array data between the execution of `glBegin' and the
890 corresponding execution of `glEnd' may affect calls to `glArrayElement'
891 that are made within the same `glBegin'/`glEnd' period in nonsequential
892 ways. That is, a call to `glArrayElement' that precedes a change to
893 array data may access the changed data, and a call that follows a change
894 to array data may access original data.
895
896 `GL_INVALID_VALUE' may be generated if I is negative.
897
898 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
899 bound to an enabled array and the buffer object's data store is
900 currently mapped.")
901
902 (define-gl-procedures
903 ((glAttachShader
904 (program GLuint)
905 (shader GLuint)
906 ->
907 void))
908 "Attaches a shader object to a program object.
909
910 PROGRAM
911 Specifies the program object to which a shader object will be
912 attached.
913
914 SHADER
915 Specifies the shader object that is to be attached.
916
917 In order to create an executable, there must be a way to specify the
918 list of things that will be linked together. Program objects provide
919 this mechanism. Shaders that are to be linked together in a program
920 object must first be attached to that program object. `glAttachShader'
921 attaches the shader object specified by SHADER to the program object
922 specified by PROGRAM. This indicates that SHADER will be included in
923 link operations that will be performed on PROGRAM.
924
925 All operations that can be performed on a shader object are valid
926 whether or not the shader object is attached to a program object. It is
927 permissible to attach a shader object to a program object before source
928 code has been loaded into the shader object or before the shader object
929 has been compiled. It is permissible to attach multiple shader objects
930 of the same type because each may contain a portion of the complete
931 shader. It is also permissible to attach a shader object to more than
932 one program object. If a shader object is deleted while it is attached
933 to a program object, it will be flagged for deletion, and deletion will
934 not occur until `glDetachShader' is called to detach it from all program
935 objects to which it is attached.
936
937 `GL_INVALID_VALUE' is generated if either PROGRAM or SHADER is not a
938 value generated by OpenGL.
939
940 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
941
942 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
943
944 `GL_INVALID_OPERATION' is generated if SHADER is already attached to
945 PROGRAM.
946
947 `GL_INVALID_OPERATION' is generated if `glAttachShader' is executed
948 between the execution of `glBegin' and the corresponding execution of
949 `glEnd'.")
950
951 (define-gl-procedures
952 ((glBeginQuery
953 (target GLenum)
954 (id GLuint)
955 ->
956 void)
957 (glEndQuery (target GLenum) -> void))
958 "Delimit the boundaries of a query object.
959
960 TARGET
961 Specifies the target type of query object established between
962 `glBeginQuery' and the subsequent `glEndQuery'. The symbolic
963 constant must be `GL_SAMPLES_PASSED'.
964
965 ID
966 Specifies the name of a query object.
967
968 `glBeginQuery' and `glEndQuery' delimit the boundaries of a query
969 object. If a query object with name ID does not yet exist it is
970 created.
971
972 When `glBeginQuery' is executed, the query object's samples-passed
973 counter is reset to 0. Subsequent rendering will increment the counter
974 once for every sample that passes the depth test. When `glEndQuery' is
975 executed, the samples-passed counter is assigned to the query object's
976 result value. This value can be queried by calling `glGetQueryObject'
977 with PNAME`GL_QUERY_RESULT'.
978
979 Querying the `GL_QUERY_RESULT' implicitly flushes the GL pipeline until
980 the rendering delimited by the query object has completed and the result
981 is available. `GL_QUERY_RESULT_AVAILABLE' can be queried to determine
982 if the result is immediately available or if the rendering is not yet
983 complete.
984
985 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SAMPLES_PASSED'.
986
987 `GL_INVALID_OPERATION' is generated if `glBeginQuery' is executed while
988 a query object of the same TARGET is already active.
989
990 `GL_INVALID_OPERATION' is generated if `glEndQuery' is executed when a
991 query object of the same TARGET is not active.
992
993 `GL_INVALID_OPERATION' is generated if ID is 0.
994
995 `GL_INVALID_OPERATION' is generated if ID is the name of an already
996 active query object.
997
998 `GL_INVALID_OPERATION' is generated if `glBeginQuery' or `glEndQuery' is
999 executed between the execution of `glBegin' and the corresponding
1000 execution of `glEnd'.")
1001
1002 (define-gl-procedures
1003 ((glBegin (mode GLenum) -> void) (glEnd -> void))
1004 "Delimit the vertices of a primitive or a group of like primitives.
1005
1006 MODE
1007 Specifies the primitive or primitives that will be created from
1008 vertices presented between `glBegin' and the subsequent `glEnd'.
1009 Ten symbolic constants are accepted: `GL_POINTS', `GL_LINES',
1010 `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_TRIANGLES',
1011 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_QUADS',
1012 `GL_QUAD_STRIP', and `GL_POLYGON'.
1013
1014 `glBegin' and `glEnd' delimit the vertices that define a primitive or a
1015 group of like primitives. `glBegin' accepts a single argument that
1016 specifies in which of ten ways the vertices are interpreted. Taking N
1017 as an integer count starting at one, and N as the total number of
1018 vertices specified, the interpretations are as follows:
1019
1020 `GL_POINTS'
1021 Treats each vertex as a single point. Vertex N defines point N . N
1022 points are drawn.
1023
1024 `GL_LINES'
1025 Treats each pair of vertices as an independent line segment.
1026 Vertices 2\u2062N-1 and 2\u2062N define line N . N/2 lines are drawn.
1027
1028 `GL_LINE_STRIP'
1029 Draws a connected group of line segments from the first vertex to
1030 the last. Vertices N and N+1 define line N . N-1 lines are drawn.
1031
1032 `GL_LINE_LOOP'
1033 Draws a connected group of line segments from the first vertex to
1034 the last, then back to the first. Vertices N and N+1 define line N
1035 . The last line, however, is defined by vertices N and 1 . N
1036 lines are drawn.
1037
1038 `GL_TRIANGLES'
1039 Treats each triplet of vertices as an independent triangle.
1040 Vertices 3\u2062N-2 , 3\u2062N-1 , and 3\u2062N define triangle N . N/3 triangles
1041 are drawn.
1042
1043 `GL_TRIANGLE_STRIP'
1044 Draws a connected group of triangles. One triangle is defined for
1045 each vertex presented after the first two vertices. For odd N ,
1046 vertices N , N+1 , and N+2 define triangle N . For even N ,
1047 vertices N+1 , N , and N+2 define triangle N . N-2 triangles are
1048 drawn.
1049
1050 `GL_TRIANGLE_FAN'
1051 Draws a connected group of triangles. One triangle is defined for
1052 each vertex presented after the first two vertices. Vertices 1 ,
1053 N+1 , and N+2 define triangle N . N-2 triangles are drawn.
1054
1055 `GL_QUADS'
1056 Treats each group of four vertices as an independent quadrilateral.
1057 Vertices 4\u2062N-3 , 4\u2062N-2 , 4\u2062N-1 , and 4\u2062N define quadrilateral N .
1058 N/4 quadrilaterals are drawn.
1059
1060 `GL_QUAD_STRIP'
1061 Draws a connected group of quadrilaterals. One quadrilateral is
1062 defined for each pair of vertices presented after the first pair.
1063 Vertices 2\u2062N-1 , 2\u2062N , 2\u2062N+2 , and 2\u2062N+1 define quadrilateral N .
1064 N/2-1 quadrilaterals are drawn. Note that the order in which
1065 vertices are used to construct a quadrilateral from strip data is
1066 different from that used with independent data.
1067
1068 `GL_POLYGON'
1069 Draws a single, convex polygon. Vertices 1 through N define this
1070 polygon.
1071
1072 Only a subset of GL commands can be used between `glBegin' and `glEnd'.
1073 The commands are `glVertex', `glColor', `glSecondaryColor', `glIndex',
1074 `glNormal', `glFogCoord', `glTexCoord', `glMultiTexCoord',
1075 `glVertexAttrib', `glEvalCoord', `glEvalPoint', `glArrayElement',
1076 `glMaterial', and `glEdgeFlag'. Also, it is acceptable to use
1077 `glCallList' or `glCallLists' to execute display lists that include only
1078 the preceding commands. If any other GL command is executed between
1079 `glBegin' and `glEnd', the error flag is set and the command is ignored.
1080
1081 Regardless of the value chosen for MODE, there is no limit to the number
1082 of vertices that can be defined between `glBegin' and `glEnd'. Lines,
1083 triangles, quadrilaterals, and polygons that are incompletely specified
1084 are not drawn. Incomplete specification results when either too few
1085 vertices are provided to specify even a single primitive or when an
1086 incorrect multiple of vertices is specified. The incomplete primitive
1087 is ignored; the rest are drawn.
1088
1089 The minimum specification of vertices for each primitive is as follows:
1090 1 for a point, 2 for a line, 3 for a triangle, 4 for a quadrilateral,
1091 and 3 for a polygon. Modes that require a certain multiple of vertices
1092 are `GL_LINES' (2), `GL_TRIANGLES' (3), `GL_QUADS' (4), and
1093 `GL_QUAD_STRIP' (2).
1094
1095 `GL_INVALID_ENUM' is generated if MODE is set to an unaccepted value.
1096
1097 `GL_INVALID_OPERATION' is generated if `glBegin' is executed between a
1098 `glBegin' and the corresponding execution of `glEnd'.
1099
1100 `GL_INVALID_OPERATION' is generated if `glEnd' is executed without being
1101 preceded by a `glBegin'.
1102
1103 `GL_INVALID_OPERATION' is generated if a command other than `glVertex',
1104 `glColor', `glSecondaryColor', `glIndex', `glNormal', `glFogCoord',
1105 `glTexCoord', `glMultiTexCoord', `glVertexAttrib', `glEvalCoord',
1106 `glEvalPoint', `glArrayElement', `glMaterial', `glEdgeFlag',
1107 `glCallList', or `glCallLists' is executed between the execution of
1108 `glBegin' and the corresponding execution `glEnd'.
1109
1110 Execution of `glEnableClientState', `glDisableClientState',
1111 `glEdgeFlagPointer', `glFogCoordPointer', `glTexCoordPointer',
1112 `glColorPointer', `glSecondaryColorPointer', `glIndexPointer',
1113 `glNormalPointer', `glVertexPointer', `glVertexAttribPointer',
1114 `glInterleavedArrays', or `glPixelStore' is not allowed after a call to
1115 `glBegin' and before the corresponding call to `glEnd', but an error may
1116 or may not be generated.")
1117
1118 (define-gl-procedures
1119 ((glBindAttribLocation
1120 (program GLuint)
1121 (index GLuint)
1122 (name const-GLchar-*)
1123 ->
1124 void))
1125 "Associates a generic vertex attribute index with a named attribute
1126 variable.
1127
1128 PROGRAM
1129 Specifies the handle of the program object in which the association
1130 is to be made.
1131
1132 INDEX
1133 Specifies the index of the generic vertex attribute to be bound.
1134
1135 NAME
1136 Specifies a null terminated string containing the name of the
1137 vertex shader attribute variable to which INDEX is to be bound.
1138
1139 `glBindAttribLocation' is used to associate a user-defined attribute
1140 variable in the program object specified by PROGRAM with a generic
1141 vertex attribute index. The name of the user-defined attribute variable
1142 is passed as a null terminated string in NAME. The generic vertex
1143 attribute index to be bound to this variable is specified by INDEX. When
1144 PROGRAM is made part of current state, values provided via the generic
1145 vertex attribute INDEX will modify the value of the user-defined
1146 attribute variable specified by NAME.
1147
1148 If NAME refers to a matrix attribute variable, INDEX refers to the first
1149 column of the matrix. Other matrix columns are then automatically bound
1150 to locations INDEX+1 for a matrix of type mat2; INDEX+1 and INDEX+2 for
1151 a matrix of type mat3; and INDEX+1, INDEX+2, and INDEX+3 for a matrix of
1152 type mat4.
1153
1154 This command makes it possible for vertex shaders to use descriptive
1155 names for attribute variables rather than generic variables that are
1156 numbered from 0 to `GL_MAX_VERTEX_ATTRIBS' -1. The values sent to each
1157 generic attribute index are part of current state, just like standard
1158 vertex attributes such as color, normal, and vertex position. If a
1159 different program object is made current by calling `glUseProgram', the
1160 generic vertex attributes are tracked in such a way that the same values
1161 will be observed by attributes in the new program object that are also
1162 bound to INDEX.
1163
1164 Attribute variable name-to-generic attribute index bindings for a
1165 program object can be explicitly assigned at any time by calling
1166 `glBindAttribLocation'. Attribute bindings do not go into effect until
1167 `glLinkProgram' is called. After a program object has been linked
1168 successfully, the index values for generic attributes remain fixed (and
1169 their values can be queried) until the next link command occurs.
1170
1171 Applications are not allowed to bind any of the standard OpenGL vertex
1172 attributes using this command, as they are bound automatically when
1173 needed. Any attribute binding that occurs after the program object has
1174 been linked will not take effect until the next time the program object
1175 is linked.
1176
1177 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
1178 `GL_MAX_VERTEX_ATTRIBS'.
1179
1180 `GL_INVALID_OPERATION' is generated if NAME starts with the reserved
1181 prefix \"gl_\".
1182
1183 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
1184 OpenGL.
1185
1186 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
1187
1188 `GL_INVALID_OPERATION' is generated if `glBindAttribLocation' is
1189 executed between the execution of `glBegin' and the corresponding
1190 execution of `glEnd'.")
1191
1192 (define-gl-procedures
1193 ((glBindBuffer
1194 (target GLenum)
1195 (buffer GLuint)
1196 ->
1197 void))
1198 "Bind a named buffer object.
1199
1200 TARGET
1201 Specifies the target to which the buffer object is bound. The
1202 symbolic constant must be `GL_ARRAY_BUFFER',
1203 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
1204 `GL_PIXEL_UNPACK_BUFFER'.
1205
1206 BUFFER
1207 Specifies the name of a buffer object.
1208
1209 `glBindBuffer' lets you create or use a named buffer object. Calling
1210 `glBindBuffer' with TARGET set to `GL_ARRAY_BUFFER',
1211 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER' or
1212 `GL_PIXEL_UNPACK_BUFFER' and BUFFER set to the name of the new buffer
1213 object binds the buffer object name to the target. When a buffer object
1214 is bound to a target, the previous binding for that target is
1215 automatically broken.
1216
1217 Buffer object names are unsigned integers. The value zero is reserved,
1218 but there is no default buffer object for each buffer object target.
1219 Instead, BUFFER set to zero effectively unbinds any buffer object
1220 previously bound, and restores client memory usage for that buffer
1221 object target. Buffer object names and the corresponding buffer object
1222 contents are local to the shared display-list space (see
1223 `glXCreateContext') of the current GL rendering context; two rendering
1224 contexts share buffer object names only if they also share display
1225 lists.
1226
1227 You may use `glGenBuffers' to generate a set of new buffer object names.
1228
1229 The state of a buffer object immediately after it is first bound is an
1230 unmapped zero-sized memory buffer with `GL_READ_WRITE' access and
1231 `GL_STATIC_DRAW' usage.
1232
1233 While a non-zero buffer object name is bound, GL operations on the
1234 target to which it is bound affect the bound buffer object, and queries
1235 of the target to which it is bound return state from the bound buffer
1236 object. While buffer object name zero is bound, as in the initial
1237 state, attempts to modify or query state on the target to which it is
1238 bound generates an `GL_INVALID_OPERATION' error.
1239
1240 When vertex array pointer state is changed, for example by a call to
1241 `glNormalPointer', the current buffer object binding
1242 (`GL_ARRAY_BUFFER_BINDING') is copied into the corresponding client
1243 state for the vertex array type being changed, for example
1244 `GL_NORMAL_ARRAY_BUFFER_BINDING'. While a non-zero buffer object is
1245 bound to the `GL_ARRAY_BUFFER' target, the vertex array pointer
1246 parameter that is traditionally interpreted as a pointer to client-side
1247 memory is instead interpreted as an offset within the buffer object
1248 measured in basic machine units.
1249
1250 While a non-zero buffer object is bound to the `GL_ELEMENT_ARRAY_BUFFER'
1251 target, the indices parameter of `glDrawElements',
1252 `glDrawRangeElements', or `glMultiDrawElements' that is traditionally
1253 interpreted as a pointer to client-side memory is instead interpreted as
1254 an offset within the buffer object measured in basic machine units.
1255
1256 While a non-zero buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
1257 target, the following commands are affected: `glGetCompressedTexImage',
1258 `glGetConvolutionFilter', `glGetHistogram', `glGetMinmax',
1259 `glGetPixelMap', `glGetPolygonStipple', `glGetSeparableFilter',
1260 `glGetTexImage', and `glReadPixels'. The pointer parameter that is
1261 traditionally interpreted as a pointer to client-side memory where the
1262 pixels are to be packed is instead interpreted as an offset within the
1263 buffer object measured in basic machine units.
1264
1265 While a non-zero buffer object is bound to the `GL_PIXEL_UNPACK_BUFFER'
1266 target, the following commands are affected: `glBitmap',
1267 `glColorSubTable', `glColorTable', `glCompressedTexImage1D',
1268 `glCompressedTexImage2D', `glCompressedTexImage3D',
1269 `glCompressedTexSubImage1D', `glCompressedTexSubImage2D',
1270 `glCompressedTexSubImage3D', `glConvolutionFilter1D',
1271 `glConvolutionFilter2D', `glDrawPixels', `glPixelMap',
1272 `glPolygonStipple', `glSeparableFilter2D', `glTexImage1D',
1273 `glTexImage2D', `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D',
1274 and `glTexSubImage3D'. The pointer parameter that is traditionally
1275 interpreted as a pointer to client-side memory from which the pixels are
1276 to be unpacked is instead interpreted as an offset within the buffer
1277 object measured in basic machine units.
1278
1279 A buffer object binding created with `glBindBuffer' remains active until
1280 a different buffer object name is bound to the same target, or until the
1281 bound buffer object is deleted with `glDeleteBuffers'.
1282
1283 Once created, a named buffer object may be re-bound to any target as
1284 often as needed. However, the GL implementation may make choices about
1285 how to optimize the storage of a buffer object based on its initial
1286 binding target.
1287
1288 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
1289 values.
1290
1291 `GL_INVALID_OPERATION' is generated if `glBindBuffer' is executed
1292 between the execution of `glBegin' and the corresponding execution of
1293 `glEnd'.")
1294
1295 (define-gl-procedures
1296 ((glBindTexture
1297 (target GLenum)
1298 (texture GLuint)
1299 ->
1300 void))
1301 "Bind a named texture to a texturing target.
1302
1303 TARGET
1304 Specifies the target to which the texture is bound. Must be either
1305 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D', or
1306 `GL_TEXTURE_CUBE_MAP'.
1307
1308 TEXTURE
1309 Specifies the name of a texture.
1310
1311 `glBindTexture' lets you create or use a named texture. Calling
1312 `glBindTexture' with TARGET set to `GL_TEXTURE_1D', `GL_TEXTURE_2D',
1313 `GL_TEXTURE_3D' or `GL_TEXTURE_CUBE_MAP' and TEXTURE set to the name of
1314 the new texture binds the texture name to the target. When a texture is
1315 bound to a target, the previous binding for that target is automatically
1316 broken.
1317
1318 Texture names are unsigned integers. The value zero is reserved to
1319 represent the default texture for each texture target. Texture names
1320 and the corresponding texture contents are local to the shared
1321 display-list space (see `glXCreateContext') of the current GL rendering
1322 context; two rendering contexts share texture names only if they also
1323 share display lists.
1324
1325 You may use `glGenTextures' to generate a set of new texture names.
1326
1327 When a texture is first bound, it assumes the specified target: A
1328 texture first bound to `GL_TEXTURE_1D' becomes one-dimensional texture,
1329 a texture first bound to `GL_TEXTURE_2D' becomes two-dimensional
1330 texture, a texture first bound to `GL_TEXTURE_3D' becomes
1331 three-dimensional texture, and a texture first bound to
1332 `GL_TEXTURE_CUBE_MAP' becomes a cube-mapped texture. The state of a
1333 one-dimensional texture immediately after it is first bound is
1334 equivalent to the state of the default `GL_TEXTURE_1D' at GL
1335 initialization, and similarly for two- and three-dimensional textures
1336 and cube-mapped textures.
1337
1338 While a texture is bound, GL operations on the target to which it is
1339 bound affect the bound texture, and queries of the target to which it is
1340 bound return state from the bound texture. If texture mapping is active
1341 on the target to which a texture is bound, the bound texture is used. In
1342 effect, the texture targets become aliases for the textures currently
1343 bound to them, and the texture name zero refers to the default textures
1344 that were bound to them at initialization.
1345
1346 A texture binding created with `glBindTexture' remains active until a
1347 different texture is bound to the same target, or until the bound
1348 texture is deleted with `glDeleteTextures'.
1349
1350 Once created, a named texture may be re-bound to its same original
1351 target as often as needed. It is usually much faster to use
1352 `glBindTexture' to bind an existing named texture to one of the texture
1353 targets than it is to reload the texture image using `glTexImage1D',
1354 `glTexImage2D', or `glTexImage3D'. For additional control over
1355 performance, use `glPrioritizeTextures'.
1356
1357 `glBindTexture' is included in display lists.
1358
1359 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
1360 values.
1361
1362 `GL_INVALID_OPERATION' is generated if TEXTURE was previously created
1363 with a target that doesn't match that of TARGET.
1364
1365 `GL_INVALID_OPERATION' is generated if `glBindTexture' is executed
1366 between the execution of `glBegin' and the corresponding execution of
1367 `glEnd'.")
1368
1369 (define-gl-procedures
1370 ((glBitmap
1371 (width GLsizei)
1372 (height GLsizei)
1373 (xorig GLfloat)
1374 (yorig GLfloat)
1375 (xmove GLfloat)
1376 (ymove GLfloat)
1377 (bitmap const-GLubyte-*)
1378 ->
1379 void))
1380 "Draw a bitmap.
1381
1382 WIDTH
1383 HEIGHT
1384
1385 Specify the pixel width and height of the bitmap image.
1386
1387 XORIG
1388 YORIG
1389
1390 Specify the location of the origin in the bitmap image. The origin
1391 is measured from the lower left corner of the bitmap, with right
1392 and up being the positive axes.
1393
1394 XMOVE
1395 YMOVE
1396
1397 Specify the X and Y offsets to be added to the current raster
1398 position after the bitmap is drawn.
1399
1400 BITMAP
1401 Specifies the address of the bitmap image.
1402
1403 A bitmap is a binary image. When drawn, the bitmap is positioned
1404 relative to the current raster position, and frame buffer pixels
1405 corresponding to 1's in the bitmap are written using the current raster
1406 color or index. Frame buffer pixels corresponding to 0's in the bitmap
1407 are not modified.
1408
1409 `glBitmap' takes seven arguments. The first pair specifies the width
1410 and height of the bitmap image. The second pair specifies the location
1411 of the bitmap origin relative to the lower left corner of the bitmap
1412 image. The third pair of arguments specifies X and Y offsets to be
1413 added to the current raster position after the bitmap has been drawn.
1414 The final argument is a pointer to the bitmap image itself.
1415
1416 If a non-zero named buffer object is bound to the
1417 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a bitmap
1418 image is specified, BITMAP is treated as a byte offset into the buffer
1419 object's data store.
1420
1421 The bitmap image is interpreted like image data for the `glDrawPixels'
1422 command, with WIDTH and HEIGHT corresponding to the width and height
1423 arguments of that command, and with TYPE set to `GL_BITMAP' and FORMAT
1424 set to `GL_COLOR_INDEX'. Modes specified using `glPixelStore' affect
1425 the interpretation of bitmap image data; modes specified using
1426 `glPixelTransfer' do not.
1427
1428 If the current raster position is invalid, `glBitmap' is ignored.
1429 Otherwise, the lower left corner of the bitmap image is positioned at
1430 the window coordinates
1431
1432 X_W=⌊X_R-X_O,⌋
1433
1434 Y_W=⌊Y_R-Y_O,⌋
1435
1436 where (X_R,Y_R) is the raster position and (X_O,Y_O) is the bitmap
1437 origin. Fragments are then generated for each pixel corresponding to a
1438 1 (one) in the bitmap image. These fragments are generated using the
1439 current raster Z coordinate, color or color index, and current raster
1440 texture coordinates. They are then treated just as if they had been
1441 generated by a point, line, or polygon, including texture mapping,
1442 fogging, and all per-fragment operations such as alpha and depth
1443 testing.
1444
1445 After the bitmap has been drawn, the X and Y coordinates of the current
1446 raster position are offset by XMOVE and YMOVE. No change is made to the
1447 Z coordinate of the current raster position, or to the current raster
1448 color, texture coordinates, or index.
1449
1450 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is negative.
1451
1452 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
1453 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
1454 data store is currently mapped.
1455
1456 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
1457 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
1458 unpacked from the buffer object such that the memory reads required
1459 would exceed the data store size.
1460
1461 `GL_INVALID_OPERATION' is generated if `glBitmap' is executed between
1462 the execution of `glBegin' and the corresponding execution of `glEnd'.")
1463
1464 (define-gl-procedures
1465 ((glBlendColor
1466 (red GLclampf)
1467 (green GLclampf)
1468 (blue GLclampf)
1469 (alpha GLclampf)
1470 ->
1471 void))
1472 "Set the blend color.
1473
1474 RED
1475 GREEN
1476
1477 BLUE
1478
1479 ALPHA
1480
1481 specify the components of `GL_BLEND_COLOR'
1482
1483 The `GL_BLEND_COLOR' may be used to calculate the source and destination
1484 blending factors. The color components are clamped to the range [0,1]
1485 before being stored. See `glBlendFunc' for a complete description of
1486 the blending operations. Initially the `GL_BLEND_COLOR' is set to (0,
1487 0, 0, 0).
1488
1489 `GL_INVALID_OPERATION' is generated if `glBlendColor' is executed
1490 between the execution of `glBegin' and the corresponding execution of
1491 `glEnd'.")
1492
1493 (define-gl-procedures
1494 ((glBlendEquationSeparate
1495 (modeRGB GLenum)
1496 (modeAlpha GLenum)
1497 ->
1498 void))
1499 "Set the RGB blend equation and the alpha blend equation separately.
1500
1501 MODERGB
1502 specifies the RGB blend equation, how the red, green, and blue
1503 components of the source and destination colors are combined. It
1504 must be `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
1505 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN', `GL_MAX'.
1506
1507 MODEALPHA
1508 specifies the alpha blend equation, how the alpha component of the
1509 source and destination colors are combined. It must be
1510 `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1511 `GL_MIN', `GL_MAX'.
1512
1513 The blend equations determines how a new pixel (the ''source'' color) is
1514 combined with a pixel already in the framebuffer (the ''destination''
1515 color). This function specifies one blend equation for the RGB-color
1516 components and one blend equation for the alpha component.
1517
1518 The blend equations use the source and destination blend factors
1519 specified by either `glBlendFunc' or `glBlendFuncSeparate'. See
1520 `glBlendFunc' or `glBlendFuncSeparate' for a description of the various
1521 blend factors.
1522
1523 In the equations that follow, source and destination color components
1524 are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) , respectively.
1525 The result color is referred to as (R_R,G_RB_RA_R) . The source and
1526 destination blend factors are denoted (S_R,S_GS_BS_A) and
1527 (D_R,D_GD_BD_A) , respectively. For these equations all color
1528 components are understood to have values in the range [0,1] .
1529
1530 *Mode*
1531 *RGB Components*, *Alpha Component*
1532
1533 `GL_FUNC_ADD'
1534 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 ,
1535 AR=A_S\u2062S_A+A_D\u2062D_A
1536
1537 `GL_FUNC_SUBTRACT'
1538 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 ,
1539 AR=A_S\u2062S_A-A_D\u2062D_A
1540
1541 `GL_FUNC_REVERSE_SUBTRACT'
1542 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 ,
1543 AR=A_D\u2062D_A-A_S\u2062S_A
1544
1545 `GL_MIN'
1546 RR=MIN\u2061(R_S,R_D) GR=MIN\u2061(G_S,G_D) BR=MIN\u2061(B_S,B_D) ,
1547 AR=MIN\u2061(A_S,A_D)
1548
1549 `GL_MAX'
1550 RR=MAX\u2061(R_S,R_D) GR=MAX\u2061(G_S,G_D) BR=MAX\u2061(B_S,B_D) ,
1551 AR=MAX\u2061(A_S,A_D)
1552
1553 The results of these equations are clamped to the range [0,1] .
1554
1555 The `GL_MIN' and `GL_MAX' equations are useful for applications that
1556 analyze image data (image thresholding against a constant color, for
1557 example). The `GL_FUNC_ADD' equation is useful for antialiasing and
1558 transparency, among other things.
1559
1560 Initially, both the RGB blend equation and the alpha blend equation are
1561 set to `GL_FUNC_ADD'.
1562
1563
1564
1565 `GL_INVALID_ENUM' is generated if either MODERGB or MODEALPHA is not one
1566 of `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1567 `GL_MAX', or `GL_MIN'.
1568
1569 `GL_INVALID_OPERATION' is generated if `glBlendEquationSeparate' is
1570 executed between the execution of `glBegin' and the corresponding
1571 execution of `glEnd'.")
1572
1573 (define-gl-procedures
1574 ((glBlendEquation (mode GLenum) -> void))
1575 "Specify the equation used for both the RGB blend equation and the Alpha
1576 blend equation.
1577
1578 MODE
1579 specifies how source and destination colors are combined. It must
1580 be `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1581 `GL_MIN', `GL_MAX'.
1582
1583 The blend equations determine how a new pixel (the ''source'' color) is
1584 combined with a pixel already in the framebuffer (the ''destination''
1585 color). This function sets both the RGB blend equation and the alpha
1586 blend equation to a single equation.
1587
1588 These equations use the source and destination blend factors specified
1589 by either `glBlendFunc' or `glBlendFuncSeparate'. See `glBlendFunc' or
1590 `glBlendFuncSeparate' for a description of the various blend factors.
1591
1592 In the equations that follow, source and destination color components
1593 are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) , respectively.
1594 The result color is referred to as (R_R,G_RB_RA_R) . The source and
1595 destination blend factors are denoted (S_R,S_GS_BS_A) and
1596 (D_R,D_GD_BD_A) , respectively. For these equations all color
1597 components are understood to have values in the range [0,1] .
1598
1599 *Mode*
1600 *RGB Components*, *Alpha Component*
1601
1602 `GL_FUNC_ADD'
1603 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 ,
1604 AR=A_S\u2062S_A+A_D\u2062D_A
1605
1606 `GL_FUNC_SUBTRACT'
1607 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 ,
1608 AR=A_S\u2062S_A-A_D\u2062D_A
1609
1610 `GL_FUNC_REVERSE_SUBTRACT'
1611 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 ,
1612 AR=A_D\u2062D_A-A_S\u2062S_A
1613
1614 `GL_MIN'
1615 RR=MIN\u2061(R_S,R_D) GR=MIN\u2061(G_S,G_D) BR=MIN\u2061(B_S,B_D) ,
1616 AR=MIN\u2061(A_S,A_D)
1617
1618 `GL_MAX'
1619 RR=MAX\u2061(R_S,R_D) GR=MAX\u2061(G_S,G_D) BR=MAX\u2061(B_S,B_D) ,
1620 AR=MAX\u2061(A_S,A_D)
1621
1622 The results of these equations are clamped to the range [0,1] .
1623
1624 The `GL_MIN' and `GL_MAX' equations are useful for applications that
1625 analyze image data (image thresholding against a constant color, for
1626 example). The `GL_FUNC_ADD' equation is useful for antialiasing and
1627 transparency, among other things.
1628
1629 Initially, both the RGB blend equation and the alpha blend equation are
1630 set to `GL_FUNC_ADD'.
1631
1632
1633
1634 `GL_INVALID_ENUM' is generated if MODE is not one of `GL_FUNC_ADD',
1635 `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT', `GL_MAX', or `GL_MIN'.
1636
1637 `GL_INVALID_OPERATION' is generated if `glBlendEquation' is executed
1638 between the execution of `glBegin' and the corresponding execution of
1639 `glEnd'.")
1640
1641 (define-gl-procedures
1642 ((glBlendFuncSeparate
1643 (srcRGB GLenum)
1644 (dstRGB GLenum)
1645 (srcAlpha GLenum)
1646 (dstAlpha GLenum)
1647 ->
1648 void))
1649 "Specify pixel arithmetic for RGB and alpha components separately.
1650
1651 SRCRGB
1652 Specifies how the red, green, and blue blending factors are
1653 computed. The following symbolic constants are accepted:
1654 `GL_ZERO', `GL_ONE', `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR',
1655 `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR', `GL_SRC_ALPHA',
1656 `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA', `GL_ONE_MINUS_DST_ALPHA',
1657 `GL_CONSTANT_COLOR', `GL_ONE_MINUS_CONSTANT_COLOR',
1658 `GL_CONSTANT_ALPHA', `GL_ONE_MINUS_CONSTANT_ALPHA', and
1659 `GL_SRC_ALPHA_SATURATE'. The initial value is `GL_ONE'.
1660
1661 DSTRGB
1662 Specifies how the red, green, and blue destination blending factors
1663 are computed. The following symbolic constants are accepted:
1664 `GL_ZERO', `GL_ONE', `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR',
1665 `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR', `GL_SRC_ALPHA',
1666 `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA', `GL_ONE_MINUS_DST_ALPHA'.
1667 `GL_CONSTANT_COLOR', `GL_ONE_MINUS_CONSTANT_COLOR',
1668 `GL_CONSTANT_ALPHA', and `GL_ONE_MINUS_CONSTANT_ALPHA'. The
1669 initial value is `GL_ZERO'.
1670
1671 SRCALPHA
1672 Specified how the alpha source blending factor is computed. The
1673 same symbolic constants are accepted as for SRCRGB. The initial
1674 value is `GL_ONE'.
1675
1676 DSTALPHA
1677 Specified how the alpha destination blending factor is computed.
1678 The same symbolic constants are accepted as for DSTRGB. The
1679 initial value is `GL_ZERO'.
1680
1681 In RGBA mode, pixels can be drawn using a function that blends the
1682 incoming (source) RGBA values with the RGBA values that are already in
1683 the frame buffer (the destination values). Blending is initially
1684 disabled. Use `glEnable' and `glDisable' with argument `GL_BLEND' to
1685 enable and disable blending.
1686
1687 `glBlendFuncSeparate' defines the operation of blending when it is
1688 enabled. SRCRGB specifies which method is used to scale the source
1689 RGB-color components. DSTRGB specifies which method is used to scale
1690 the destination RGB-color components. Likewise, SRCALPHA specifies
1691 which method is used to scale the source alpha color component, and
1692 DSTALPHA specifies which method is used to scale the destination alpha
1693 component. The possible methods are described in the following table.
1694 Each method defines four scale factors, one each for red, green, blue,
1695 and alpha.
1696
1697 In the table and in subsequent equations, source and destination color
1698 components are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) . The
1699 color specified by `glBlendColor' is referred to as (R_C,G_CB_CA_C) .
1700 They are understood to have integer values between 0 and (K_R,K_GK_BK_A)
1701 , where
1702
1703 K_C=2^M_C,-1
1704
1705 and (M_R,M_GM_BM_A) is the number of red, green, blue, and alpha
1706 bitplanes.
1707
1708 Source and destination scale factors are referred to as (S_R,S_GS_BS_A)
1709 and (D_R,D_GD_BD_A) . All scale factors have range [0,1] .
1710
1711
1712
1713 *Parameter*
1714 *RGB Factor*, *Alpha Factor*
1715
1716 `GL_ZERO'
1717 (0,00) , 0
1718
1719 `GL_ONE'
1720 (1,11) , 1
1721
1722 `GL_SRC_COLOR'
1723 (R_S/K_R,G_S/K_GB_S/K_B) , A_S/K_A
1724
1725 `GL_ONE_MINUS_SRC_COLOR'
1726 (1,111)-(R_S/K_R,G_S/K_GB_S/K_B) , 1-A_S/K_A
1727
1728 `GL_DST_COLOR'
1729 (R_D/K_R,G_D/K_GB_D/K_B) , A_D/K_A
1730
1731 `GL_ONE_MINUS_DST_COLOR'
1732 (1,11)-(R_D/K_R,G_D/K_GB_D/K_B) , 1-A_D/K_A
1733
1734 `GL_SRC_ALPHA'
1735 (A_S/K_A,A_S/K_AA_S/K_A) , A_S/K_A
1736
1737 `GL_ONE_MINUS_SRC_ALPHA'
1738 (1,11)-(A_S/K_A,A_S/K_AA_S/K_A) , 1-A_S/K_A
1739
1740 `GL_DST_ALPHA'
1741 (A_D/K_A,A_D/K_AA_D/K_A) , A_D/K_A
1742
1743 `GL_ONE_MINUS_DST_ALPHA'
1744 (1,11)-(A_D/K_A,A_D/K_AA_D/K_A) , 1-A_D/K_A
1745
1746 `GL_CONSTANT_COLOR'
1747 (R_C,G_CB_C) , A_C
1748
1749 `GL_ONE_MINUS_CONSTANT_COLOR'
1750 (1,11)-(R_C,G_CB_C) , 1-A_C
1751
1752 `GL_CONSTANT_ALPHA'
1753 (A_C,A_CA_C) , A_C
1754
1755 `GL_ONE_MINUS_CONSTANT_ALPHA'
1756 (1,11)-(A_C,A_CA_C) , 1-A_C
1757
1758 `GL_SRC_ALPHA_SATURATE'
1759 (I,II) , 1
1760
1761 In the table,
1762
1763 I=MIN\u2061(A_S,1-A_D,)
1764
1765 To determine the blended RGBA values of a pixel when drawing in RGBA
1766 mode, the system uses the following equations:
1767
1768 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)
1769 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)
1770
1771 Despite the apparent precision of the above equations, blending
1772 arithmetic is not exactly specified, because blending operates with
1773 imprecise integer color values. However, a blend factor that should be
1774 equal to 1 is guaranteed not to modify its multiplicand, and a blend
1775 factor equal to 0 reduces its multiplicand to 0. For example, when
1776 SRCRGB is `GL_SRC_ALPHA', DSTRGB is `GL_ONE_MINUS_SRC_ALPHA', and A_S is
1777 equal to K_A , the equations reduce to simple replacement:
1778
1779 R_D=R_S G_D=G_S B_D=B_S A_D=A_S
1780
1781
1782
1783 `GL_INVALID_ENUM' is generated if either SRCRGB or DSTRGB is not an
1784 accepted value.
1785
1786 `GL_INVALID_OPERATION' is generated if `glBlendFuncSeparate' is executed
1787 between the execution of `glBegin' and the corresponding execution of
1788 `glEnd'.")
1789
1790 (define-gl-procedures
1791 ((glBlendFunc
1792 (sfactor GLenum)
1793 (dfactor GLenum)
1794 ->
1795 void))
1796 "Specify pixel arithmetic.
1797
1798 SFACTOR
1799 Specifies how the red, green, blue, and alpha source blending
1800 factors are computed. The following symbolic constants are
1801 accepted: `GL_ZERO', `GL_ONE', `GL_SRC_COLOR',
1802 `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR',
1803 `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA',
1804 `GL_ONE_MINUS_DST_ALPHA', `GL_CONSTANT_COLOR',
1805 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA',
1806 `GL_ONE_MINUS_CONSTANT_ALPHA', and `GL_SRC_ALPHA_SATURATE'. The
1807 initial value is `GL_ONE'.
1808
1809 DFACTOR
1810 Specifies how the red, green, blue, and alpha destination blending
1811 factors are computed. The following symbolic constants are
1812 accepted: `GL_ZERO', `GL_ONE', `GL_SRC_COLOR',
1813 `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR',
1814 `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA',
1815 `GL_ONE_MINUS_DST_ALPHA'. `GL_CONSTANT_COLOR',
1816 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA', and
1817 `GL_ONE_MINUS_CONSTANT_ALPHA'. The initial value is `GL_ZERO'.
1818
1819 In RGBA mode, pixels can be drawn using a function that blends the
1820 incoming (source) RGBA values with the RGBA values that are already in
1821 the frame buffer (the destination values). Blending is initially
1822 disabled. Use `glEnable' and `glDisable' with argument `GL_BLEND' to
1823 enable and disable blending.
1824
1825 `glBlendFunc' defines the operation of blending when it is enabled.
1826 SFACTOR specifies which method is used to scale the source color
1827 components. DFACTOR specifies which method is used to scale the
1828 destination color components. The possible methods are described in the
1829 following table. Each method defines four scale factors, one each for
1830 red, green, blue, and alpha. In the table and in subsequent equations,
1831 source and destination color components are referred to as
1832 (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) . The color specified by
1833 `glBlendColor' is referred to as (R_C,G_CB_CA_C) . They are understood
1834 to have integer values between 0 and (K_R,K_GK_BK_A) , where
1835
1836 K_C=2^M_C,-1
1837
1838 and (M_R,M_GM_BM_A) is the number of red, green, blue, and alpha
1839 bitplanes.
1840
1841 Source and destination scale factors are referred to as (S_R,S_GS_BS_A)
1842 and (D_R,D_GD_BD_A) . The scale factors described in the table, denoted
1843 (F_R,F_GF_BF_A) , represent either source or destination factors. All
1844 scale factors have range [0,1] .
1845
1846
1847
1848 *Parameter*
1849 * (F_R,F_GF_BF_A) *
1850
1851 `GL_ZERO'
1852 (0,000)
1853
1854 `GL_ONE'
1855 (1,111)
1856
1857 `GL_SRC_COLOR'
1858 (R_S/K_R,G_S/K_GB_S/K_BA_S/K_A)
1859
1860 `GL_ONE_MINUS_SRC_COLOR'
1861 (1,111)-(R_S/K_R,G_S/K_GB_S/K_BA_S/K_A)
1862
1863 `GL_DST_COLOR'
1864 (R_D/K_R,G_D/K_GB_D/K_BA_D/K_A)
1865
1866 `GL_ONE_MINUS_DST_COLOR'
1867 (1,111)-(R_D/K_R,G_D/K_GB_D/K_BA_D/K_A)
1868
1869 `GL_SRC_ALPHA'
1870 (A_S/K_A,A_S/K_AA_S/K_AA_S/K_A)
1871
1872 `GL_ONE_MINUS_SRC_ALPHA'
1873 (1,111)-(A_S/K_A,A_S/K_AA_S/K_AA_S/K_A)
1874
1875 `GL_DST_ALPHA'
1876 (A_D/K_A,A_D/K_AA_D/K_AA_D/K_A)
1877
1878 `GL_ONE_MINUS_DST_ALPHA'
1879 (1,111)-(A_D/K_A,A_D/K_AA_D/K_AA_D/K_A)
1880
1881 `GL_CONSTANT_COLOR'
1882 (R_C,G_CB_CA_C)
1883
1884 `GL_ONE_MINUS_CONSTANT_COLOR'
1885 (1,111)-(R_C,G_CB_CA_C)
1886
1887 `GL_CONSTANT_ALPHA'
1888 (A_C,A_CA_CA_C)
1889
1890 `GL_ONE_MINUS_CONSTANT_ALPHA'
1891 (1,111)-(A_C,A_CA_CA_C)
1892
1893 `GL_SRC_ALPHA_SATURATE'
1894 (I,II1)
1895
1896 In the table,
1897
1898 I=MIN\u2061(A_S,K_A-A_D)/K_A
1899
1900 To determine the blended RGBA values of a pixel when drawing in RGBA
1901 mode, the system uses the following equations:
1902
1903 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)
1904 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)
1905
1906 Despite the apparent precision of the above equations, blending
1907 arithmetic is not exactly specified, because blending operates with
1908 imprecise integer color values. However, a blend factor that should be
1909 equal to 1 is guaranteed not to modify its multiplicand, and a blend
1910 factor equal to 0 reduces its multiplicand to 0. For example, when
1911 SFACTOR is `GL_SRC_ALPHA', DFACTOR is `GL_ONE_MINUS_SRC_ALPHA', and A_S
1912 is equal to K_A , the equations reduce to simple replacement:
1913
1914 R_D=R_S G_D=G_S B_D=B_S A_D=A_S
1915
1916
1917
1918 `GL_INVALID_ENUM' is generated if either SFACTOR or DFACTOR is not an
1919 accepted value.
1920
1921 `GL_INVALID_OPERATION' is generated if `glBlendFunc' is executed between
1922 the execution of `glBegin' and the corresponding execution of `glEnd'.")
1923
1924 (define-gl-procedures
1925 ((glBufferData
1926 (target GLenum)
1927 (size GLsizeiptr)
1928 (data const-GLvoid-*)
1929 (usage GLenum)
1930 ->
1931 void))
1932 "Creates and initializes a buffer object's data store.
1933
1934 TARGET
1935 Specifies the target buffer object. The symbolic constant must be
1936 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
1937 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
1938
1939 SIZE
1940 Specifies the size in bytes of the buffer object's new data store.
1941
1942 DATA
1943 Specifies a pointer to data that will be copied into the data store
1944 for initialization, or `NULL' if no data is to be copied.
1945
1946 USAGE
1947 Specifies the expected usage pattern of the data store. The
1948 symbolic constant must be `GL_STREAM_DRAW', `GL_STREAM_READ',
1949 `GL_STREAM_COPY', `GL_STATIC_DRAW', `GL_STATIC_READ',
1950 `GL_STATIC_COPY', `GL_DYNAMIC_DRAW', `GL_DYNAMIC_READ', or
1951 `GL_DYNAMIC_COPY'.
1952
1953 `glBufferData' creates a new data store for the buffer object currently
1954 bound to TARGET. Any pre-existing data store is deleted. The new data
1955 store is created with the specified SIZE in bytes and USAGE. If DATA is
1956 not `NULL', the data store is initialized with data from this pointer.
1957 In its initial state, the new data store is not mapped, it has a `NULL'
1958 mapped pointer, and its mapped access is `GL_READ_WRITE'.
1959
1960 USAGE is a hint to the GL implementation as to how a buffer object's
1961 data store will be accessed. This enables the GL implementation to make
1962 more intelligent decisions that may significantly impact buffer object
1963 performance. It does not, however, constrain the actual usage of the
1964 data store. USAGE can be broken down into two parts: first, the
1965 frequency of access (modification and usage), and second, the nature of
1966 that access. The frequency of access may be one of these:
1967
1968 STREAM
1969 The data store contents will be modified once and used at most a
1970 few times.
1971
1972 STATIC
1973 The data store contents will be modified once and used many times.
1974
1975 DYNAMIC
1976 The data store contents will be modified repeatedly and used many
1977 times.
1978
1979 The nature of access may be one of these:
1980
1981 DRAW
1982 The data store contents are modified by the application, and used
1983 as the source for GL drawing and image specification commands.
1984
1985 READ
1986 The data store contents are modified by reading data from the GL,
1987 and used to return that data when queried by the application.
1988
1989 COPY
1990 The data store contents are modified by reading data from the GL,
1991 and used as the source for GL drawing and image specification
1992 commands.
1993
1994 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
1995 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
1996 `GL_PIXEL_UNPACK_BUFFER'.
1997
1998 `GL_INVALID_ENUM' is generated if USAGE is not `GL_STREAM_DRAW',
1999 `GL_STREAM_READ', `GL_STREAM_COPY', `GL_STATIC_DRAW', `GL_STATIC_READ',
2000 `GL_STATIC_COPY', `GL_DYNAMIC_DRAW', `GL_DYNAMIC_READ', or
2001 `GL_DYNAMIC_COPY'.
2002
2003 `GL_INVALID_VALUE' is generated if SIZE is negative.
2004
2005 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
2006 is bound to TARGET.
2007
2008 `GL_OUT_OF_MEMORY' is generated if the GL is unable to create a data
2009 store with the specified SIZE.
2010
2011 `GL_INVALID_OPERATION' is generated if `glBufferData' is executed
2012 between the execution of `glBegin' and the corresponding execution of
2013 `glEnd'.")
2014
2015 (define-gl-procedures
2016 ((glBufferSubData
2017 (target GLenum)
2018 (offset GLintptr)
2019 (size GLsizeiptr)
2020 (data const-GLvoid-*)
2021 ->
2022 void))
2023 "Updates a subset of a buffer object's data store.
2024
2025 TARGET
2026 Specifies the target buffer object. The symbolic constant must be
2027 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
2028 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
2029
2030 OFFSET
2031 Specifies the offset into the buffer object's data store where data
2032 replacement will begin, measured in bytes.
2033
2034 SIZE
2035 Specifies the size in bytes of the data store region being
2036 replaced.
2037
2038 DATA
2039 Specifies a pointer to the new data that will be copied into the
2040 data store.
2041
2042 `glBufferSubData' redefines some or all of the data store for the buffer
2043 object currently bound to TARGET. Data starting at byte offset OFFSET
2044 and extending for SIZE bytes is copied to the data store from the memory
2045 pointed to by DATA. An error is thrown if OFFSET and SIZE together
2046 define a range beyond the bounds of the buffer object's data store.
2047
2048 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
2049 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
2050 `GL_PIXEL_UNPACK_BUFFER'.
2051
2052 `GL_INVALID_VALUE' is generated if OFFSET or SIZE is negative, or if
2053 together they define a region of memory that extends beyond the buffer
2054 object's allocated data store.
2055
2056 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
2057 is bound to TARGET.
2058
2059 `GL_INVALID_OPERATION' is generated if the buffer object being updated
2060 is mapped.
2061
2062 `GL_INVALID_OPERATION' is generated if `glBufferSubData' is executed
2063 between the execution of `glBegin' and the corresponding execution of
2064 `glEnd'.")
2065
2066 (define-gl-procedures
2067 ((glCallLists
2068 (n GLsizei)
2069 (type GLenum)
2070 (lists const-GLvoid-*)
2071 ->
2072 void))
2073 "Execute a list of display lists.
2074
2075 N
2076 Specifies the number of display lists to be executed.
2077
2078 TYPE
2079 Specifies the type of values in LISTS. Symbolic constants
2080 `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_UNSIGNED_SHORT',
2081 `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', `GL_2_BYTES',
2082 `GL_3_BYTES', and `GL_4_BYTES' are accepted.
2083
2084 LISTS
2085 Specifies the address of an array of name offsets in the display
2086 list. The pointer type is void because the offsets can be bytes,
2087 shorts, ints, or floats, depending on the value of TYPE.
2088
2089 `glCallLists' causes each display list in the list of names passed as
2090 LISTS to be executed. As a result, the commands saved in each display
2091 list are executed in order, just as if they were called without using a
2092 display list. Names of display lists that have not been defined are
2093 ignored.
2094
2095 `glCallLists' provides an efficient means for executing more than one
2096 display list. TYPE allows lists with various name formats to be
2097 accepted. The formats are as follows:
2098
2099 `GL_BYTE'
2100 LISTS is treated as an array of signed bytes, each in the range
2101 -128 through 127.
2102
2103 `GL_UNSIGNED_BYTE'
2104 LISTS is treated as an array of unsigned bytes, each in the range 0
2105 through 255.
2106
2107 `GL_SHORT'
2108 LISTS is treated as an array of signed two-byte integers, each in
2109 the range -32768 through 32767.
2110
2111 `GL_UNSIGNED_SHORT'
2112 LISTS is treated as an array of unsigned two-byte integers, each in
2113 the range 0 through 65535.
2114
2115 `GL_INT'
2116 LISTS is treated as an array of signed four-byte integers.
2117
2118 `GL_UNSIGNED_INT'
2119 LISTS is treated as an array of unsigned four-byte integers.
2120
2121 `GL_FLOAT'
2122 LISTS is treated as an array of four-byte floating-point values.
2123
2124 `GL_2_BYTES'
2125 LISTS is treated as an array of unsigned bytes. Each pair of bytes
2126 specifies a single display-list name. The value of the pair is
2127 computed as 256 times the unsigned value of the first byte plus the
2128 unsigned value of the second byte.
2129
2130 `GL_3_BYTES'
2131 LISTS is treated as an array of unsigned bytes. Each triplet of
2132 bytes specifies a single display-list name. The value of the
2133 triplet is computed as 65536 times the unsigned value of the first
2134 byte, plus 256 times the unsigned value of the second byte, plus
2135 the unsigned value of the third byte.
2136
2137 `GL_4_BYTES'
2138 LISTS is treated as an array of unsigned bytes. Each quadruplet of
2139 bytes specifies a single display-list name. The value of the
2140 quadruplet is computed as 16777216 times the unsigned value of the
2141 first byte, plus 65536 times the unsigned value of the second byte,
2142 plus 256 times the unsigned value of the third byte, plus the
2143 unsigned value of the fourth byte.
2144
2145 The list of display-list names is not null-terminated. Rather, N
2146 specifies how many names are to be taken from LISTS.
2147
2148 An additional level of indirection is made available with the
2149 `glListBase' command, which specifies an unsigned offset that is added
2150 to each display-list name specified in LISTS before that display list is
2151 executed.
2152
2153 `glCallLists' can appear inside a display list. To avoid the
2154 possibility of infinite recursion resulting from display lists calling
2155 one another, a limit is placed on the nesting level of display lists
2156 during display-list execution. This limit must be at least 64, and it
2157 depends on the implementation.
2158
2159 GL state is not saved and restored across a call to `glCallLists'. Thus,
2160 changes made to GL state during the execution of the display lists
2161 remain after execution is completed. Use `glPushAttrib', `glPopAttrib',
2162 `glPushMatrix', and `glPopMatrix' to preserve GL state across
2163 `glCallLists' calls.
2164
2165 `GL_INVALID_VALUE' is generated if N is negative.
2166
2167 `GL_INVALID_ENUM' is generated if TYPE is not one of `GL_BYTE',
2168 `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_UNSIGNED_SHORT', `GL_INT',
2169 `GL_UNSIGNED_INT', `GL_FLOAT', `GL_2_BYTES', `GL_3_BYTES', `GL_4_BYTES'.")
2170
2171 (define-gl-procedures
2172 ((glCallList (list GLuint) -> void))
2173 "Execute a display list.
2174
2175 LIST
2176 Specifies the integer name of the display list to be executed.
2177
2178 `glCallList' causes the named display list to be executed. The commands
2179 saved in the display list are executed in order, just as if they were
2180 called without using a display list. If LIST has not been defined as a
2181 display list, `glCallList' is ignored.
2182
2183 `glCallList' can appear inside a display list. To avoid the possibility
2184 of infinite recursion resulting from display lists calling one another,
2185 a limit is placed on the nesting level of display lists during
2186 display-list execution. This limit is at least 64, and it depends on
2187 the implementation.
2188
2189 GL state is not saved and restored across a call to `glCallList'. Thus,
2190 changes made to GL state during the execution of a display list remain
2191 after execution of the display list is completed. Use `glPushAttrib',
2192 `glPopAttrib', `glPushMatrix', and `glPopMatrix' to preserve GL state
2193 across `glCallList' calls.")
2194
2195 (define-gl-procedures
2196 ((glClearAccum
2197 (red GLfloat)
2198 (green GLfloat)
2199 (blue GLfloat)
2200 (alpha GLfloat)
2201 ->
2202 void))
2203 "Specify clear values for the accumulation buffer.
2204
2205 RED
2206 GREEN
2207
2208 BLUE
2209
2210 ALPHA
2211
2212 Specify the red, green, blue, and alpha values used when the
2213 accumulation buffer is cleared. The initial values are all 0.
2214
2215 `glClearAccum' specifies the red, green, blue, and alpha values used by
2216 `glClear' to clear the accumulation buffer.
2217
2218 Values specified by `glClearAccum' are clamped to the range [-1,1] .
2219
2220 `GL_INVALID_OPERATION' is generated if `glClearAccum' is executed
2221 between the execution of `glBegin' and the corresponding execution of
2222 `glEnd'.")
2223
2224 (define-gl-procedures
2225 ((glClearColor
2226 (red GLclampf)
2227 (green GLclampf)
2228 (blue GLclampf)
2229 (alpha GLclampf)
2230 ->
2231 void))
2232 "Specify clear values for the color buffers.
2233
2234 RED
2235 GREEN
2236
2237 BLUE
2238
2239 ALPHA
2240
2241 Specify the red, green, blue, and alpha values used when the color
2242 buffers are cleared. The initial values are all 0.
2243
2244 `glClearColor' specifies the red, green, blue, and alpha values used by
2245 `glClear' to clear the color buffers. Values specified by
2246 `glClearColor' are clamped to the range [0,1] .
2247
2248 `GL_INVALID_OPERATION' is generated if `glClearColor' is executed
2249 between the execution of `glBegin' and the corresponding execution of
2250 `glEnd'.")
2251
2252 (define-gl-procedures
2253 ((glClearDepth (depth GLclampd) -> void))
2254 "Specify the clear value for the depth buffer.
2255
2256 DEPTH
2257 Specifies the depth value used when the depth buffer is cleared.
2258 The initial value is 1.
2259
2260 `glClearDepth' specifies the depth value used by `glClear' to clear the
2261 depth buffer. Values specified by `glClearDepth' are clamped to the
2262 range [0,1] .
2263
2264 `GL_INVALID_OPERATION' is generated if `glClearDepth' is executed
2265 between the execution of `glBegin' and the corresponding execution of
2266 `glEnd'.")
2267
2268 (define-gl-procedures
2269 ((glClearIndex (c GLfloat) -> void))
2270 "Specify the clear value for the color index buffers.
2271
2272 C
2273 Specifies the index used when the color index buffers are cleared.
2274 The initial value is 0.
2275
2276 `glClearIndex' specifies the index used by `glClear' to clear the color
2277 index buffers. C is not clamped. Rather, C is converted to a
2278 fixed-point value with unspecified precision to the right of the binary
2279 point. The integer part of this value is then masked with 2^M-1 , where
2280 M is the number of bits in a color index stored in the frame buffer.
2281
2282 `GL_INVALID_OPERATION' is generated if `glClearIndex' is executed
2283 between the execution of `glBegin' and the corresponding execution of
2284 `glEnd'.")
2285
2286 (define-gl-procedures
2287 ((glClearStencil (s GLint) -> void))
2288 "Specify the clear value for the stencil buffer.
2289
2290 S
2291 Specifies the index used when the stencil buffer is cleared. The
2292 initial value is 0.
2293
2294 `glClearStencil' specifies the index used by `glClear' to clear the
2295 stencil buffer. S is masked with 2^M-1 , where M is the number of bits
2296 in the stencil buffer.
2297
2298 `GL_INVALID_OPERATION' is generated if `glClearStencil' is executed
2299 between the execution of `glBegin' and the corresponding execution of
2300 `glEnd'.")
2301
2302 (define-gl-procedures
2303 ((glClear (mask GLbitfield) -> void))
2304 "Clear buffers to preset values.
2305
2306 MASK
2307 Bitwise OR of masks that indicate the buffers to be cleared. The
2308 four masks are `GL_COLOR_BUFFER_BIT', `GL_DEPTH_BUFFER_BIT',
2309 `GL_ACCUM_BUFFER_BIT', and `GL_STENCIL_BUFFER_BIT'.
2310
2311 `glClear' sets the bitplane area of the window to values previously
2312 selected by `glClearColor', `glClearIndex', `glClearDepth',
2313 `glClearStencil', and `glClearAccum'. Multiple color buffers can be
2314 cleared simultaneously by selecting more than one buffer at a time using
2315 `glDrawBuffer'.
2316
2317 The pixel ownership test, the scissor test, dithering, and the buffer
2318 writemasks affect the operation of `glClear'. The scissor box bounds
2319 the cleared region. Alpha function, blend function, logical operation,
2320 stenciling, texture mapping, and depth-buffering are ignored by
2321 `glClear'.
2322
2323 `glClear' takes a single argument that is the bitwise OR of several
2324 values indicating which buffer is to be cleared.
2325
2326 The values are as follows:
2327
2328 `GL_COLOR_BUFFER_BIT'
2329 Indicates the buffers currently enabled for color writing.
2330
2331 `GL_DEPTH_BUFFER_BIT'
2332 Indicates the depth buffer.
2333
2334 `GL_ACCUM_BUFFER_BIT'
2335 Indicates the accumulation buffer.
2336
2337 `GL_STENCIL_BUFFER_BIT'
2338 Indicates the stencil buffer.
2339
2340 The value to which each buffer is cleared depends on the setting of the
2341 clear value for that buffer.
2342
2343 `GL_INVALID_VALUE' is generated if any bit other than the four defined
2344 bits is set in MASK.
2345
2346 `GL_INVALID_OPERATION' is generated if `glClear' is executed between the
2347 execution of `glBegin' and the corresponding execution of `glEnd'.")
2348
2349 (define-gl-procedures
2350 ((glClientActiveTexture (texture GLenum) -> void))
2351 "Select active texture unit.
2352
2353 TEXTURE
2354 Specifies which texture unit to make active. The number of texture
2355 units is implementation dependent, but must be at least two.
2356 TEXTURE must be one of `GL_TEXTURE' I , where i ranges from 0 to
2357 the value of `GL_MAX_TEXTURE_COORDS' - 1, which is an
2358 implementation-dependent value. The initial value is
2359 `GL_TEXTURE0'.
2360
2361 `glClientActiveTexture' selects the vertex array client state parameters
2362 to be modified by `glTexCoordPointer', and enabled or disabled with
2363 `glEnableClientState' or `glDisableClientState', respectively, when
2364 called with a parameter of `GL_TEXTURE_COORD_ARRAY'.
2365
2366 `GL_INVALID_ENUM' is generated if TEXTURE is not one of `GL_TEXTURE'I ,
2367 where i ranges from 0 to the value of `GL_MAX_TEXTURE_COORDS' - 1.")
2368
2369 (define-gl-procedures
2370 ((glClipPlane
2371 (plane GLenum)
2372 (equation const-GLdouble-*)
2373 ->
2374 void))
2375 "Specify a plane against which all geometry is clipped.
2376
2377 PLANE
2378 Specifies which clipping plane is being positioned. Symbolic names
2379 of the form `GL_CLIP_PLANE'I, where I is an integer between 0 and
2380 `GL_MAX_CLIP_PLANES' -1 , are accepted.
2381
2382 EQUATION
2383 Specifies the address of an array of four double-precision
2384 floating-point values. These values are interpreted as a plane
2385 equation.
2386
2387 Geometry is always clipped against the boundaries of a six-plane frustum
2388 in X, Y, and Z. `glClipPlane' allows the specification of additional
2389 planes, not necessarily perpendicular to the X, Y, or Z axis, against
2390 which all geometry is clipped. To determine the maximum number of
2391 additional clipping planes, call `glGetIntegerv' with argument
2392 `GL_MAX_CLIP_PLANES'. All implementations support at least six such
2393 clipping planes. Because the resulting clipping region is the
2394 intersection of the defined half-spaces, it is always convex.
2395
2396 `glClipPlane' specifies a half-space using a four-component plane
2397 equation. When `glClipPlane' is called, EQUATION is transformed by the
2398 inverse of the modelview matrix and stored in the resulting eye
2399 coordinates. Subsequent changes to the modelview matrix have no effect
2400 on the stored plane-equation components. If the dot product of the eye
2401 coordinates of a vertex with the stored plane equation components is
2402 positive or zero, the vertex is IN with respect to that clipping plane.
2403 Otherwise, it is OUT.
2404
2405 To enable and disable clipping planes, call `glEnable' and `glDisable'
2406 with the argument `GL_CLIP_PLANE'I, where I is the plane number.
2407
2408 All clipping planes are initially defined as (0, 0, 0, 0) in eye
2409 coordinates and are disabled.
2410
2411 `GL_INVALID_ENUM' is generated if PLANE is not an accepted value.
2412
2413 `GL_INVALID_OPERATION' is generated if `glClipPlane' is executed between
2414 the execution of `glBegin' and the corresponding execution of `glEnd'.")
2415
2416 (define-gl-procedures
2417 ((glColorMask
2418 (red GLboolean)
2419 (green GLboolean)
2420 (blue GLboolean)
2421 (alpha GLboolean)
2422 ->
2423 void))
2424 "Enable and disable writing of frame buffer color components.
2425
2426 RED
2427 GREEN
2428
2429 BLUE
2430
2431 ALPHA
2432
2433 Specify whether red, green, blue, and alpha can or cannot be
2434 written into the frame buffer. The initial values are all
2435 `GL_TRUE', indicating that the color components can be written.
2436
2437 `glColorMask' specifies whether the individual color components in the
2438 frame buffer can or cannot be written. If RED is `GL_FALSE', for
2439 example, no change is made to the red component of any pixel in any of
2440 the color buffers, regardless of the drawing operation attempted.
2441
2442 Changes to individual bits of components cannot be controlled. Rather,
2443 changes are either enabled or disabled for entire color components.
2444
2445 `GL_INVALID_OPERATION' is generated if `glColorMask' is executed between
2446 the execution of `glBegin' and the corresponding execution of `glEnd'.")
2447
2448 (define-gl-procedures
2449 ((glColorMaterial
2450 (face GLenum)
2451 (mode GLenum)
2452 ->
2453 void))
2454 "Cause a material color to track the current color.
2455
2456 FACE
2457 Specifies whether front, back, or both front and back material
2458 parameters should track the current color. Accepted values are
2459 `GL_FRONT', `GL_BACK', and `GL_FRONT_AND_BACK'. The initial value
2460 is `GL_FRONT_AND_BACK'.
2461
2462 MODE
2463 Specifies which of several material parameters track the current
2464 color. Accepted values are `GL_EMISSION', `GL_AMBIENT',
2465 `GL_DIFFUSE', `GL_SPECULAR', and `GL_AMBIENT_AND_DIFFUSE'. The
2466 initial value is `GL_AMBIENT_AND_DIFFUSE'.
2467
2468 `glColorMaterial' specifies which material parameters track the current
2469 color. When `GL_COLOR_MATERIAL' is enabled, the material parameter or
2470 parameters specified by MODE, of the material or materials specified by
2471 FACE, track the current color at all times.
2472
2473 To enable and disable `GL_COLOR_MATERIAL', call `glEnable' and
2474 `glDisable' with argument `GL_COLOR_MATERIAL'. `GL_COLOR_MATERIAL' is
2475 initially disabled.
2476
2477 `GL_INVALID_ENUM' is generated if FACE or MODE is not an accepted value.
2478
2479 `GL_INVALID_OPERATION' is generated if `glColorMaterial' is executed
2480 between the execution of `glBegin' and the corresponding execution of
2481 `glEnd'.")
2482
2483 (define-gl-procedures
2484 ((glColorPointer
2485 (size GLint)
2486 (type GLenum)
2487 (stride GLsizei)
2488 (pointer const-GLvoid-*)
2489 ->
2490 void))
2491 "Define an array of colors.
2492
2493 SIZE
2494 Specifies the number of components per color. Must be 3 or 4. The
2495 initial value is 4.
2496
2497 TYPE
2498 Specifies the data type of each color component in the array.
2499 Symbolic constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
2500 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', and
2501 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
2502
2503 STRIDE
2504 Specifies the byte offset between consecutive colors. If STRIDE is
2505 0, the colors are understood to be tightly packed in the array. The
2506 initial value is 0.
2507
2508 POINTER
2509 Specifies a pointer to the first component of the first color
2510 element in the array. The initial value is 0.
2511
2512 `glColorPointer' specifies the location and data format of an array of
2513 color components to use when rendering. SIZE specifies the number of
2514 components per color, and must be 3 or 4. TYPE specifies the data type
2515 of each color component, and STRIDE specifies the byte stride from one
2516 color to the next, allowing vertices and attributes to be packed into a
2517 single array or stored in separate arrays. (Single-array storage may be
2518 more efficient on some implementations; see `glInterleavedArrays'.)
2519
2520 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
2521 target (see `glBindBuffer') while a color array is specified, POINTER is
2522 treated as a byte offset into the buffer object's data store. Also, the
2523 buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as color
2524 vertex array client-side state (`GL_COLOR_ARRAY_BUFFER_BINDING').
2525
2526 When a color array is specified, SIZE, TYPE, STRIDE, and POINTER are
2527 saved as client-side state, in addition to the current vertex array
2528 buffer object binding.
2529
2530 To enable and disable the color array, call `glEnableClientState' and
2531 `glDisableClientState' with the argument `GL_COLOR_ARRAY'. If enabled,
2532 the color array is used when `glDrawArrays', `glMultiDrawArrays',
2533 `glDrawElements', `glMultiDrawElements', `glDrawRangeElements', or
2534 `glArrayElement' is called.
2535
2536 `GL_INVALID_VALUE' is generated if SIZE is not 3 or 4.
2537
2538 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
2539
2540 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
2541
2542 (define-gl-procedures
2543 ((glColorSubTable
2544 (target GLenum)
2545 (start GLsizei)
2546 (count GLsizei)
2547 (format GLenum)
2548 (type GLenum)
2549 (data const-GLvoid-*)
2550 ->
2551 void))
2552 "Respecify a portion of a color table.
2553
2554 TARGET
2555 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
2556 or `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2557
2558 START
2559 The starting index of the portion of the color table to be
2560 replaced.
2561
2562 COUNT
2563 The number of table entries to replace.
2564
2565 FORMAT
2566 The format of the pixel data in DATA. The allowable values are
2567 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
2568 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
2569
2570 TYPE
2571 The type of the pixel data in DATA. The allowable values are
2572 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
2573 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
2574 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
2575 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
2576 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
2577 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
2578 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
2579 `GL_UNSIGNED_INT_2_10_10_10_REV'.
2580
2581 DATA
2582 Pointer to a one-dimensional array of pixel data that is processed
2583 to replace the specified region of the color table.
2584
2585 `glColorSubTable' is used to respecify a contiguous portion of a color
2586 table previously defined using `glColorTable'. The pixels referenced by
2587 DATA replace the portion of the existing table from indices START to
2588 START+COUNT-1 , inclusive. This region may not include any entries
2589 outside the range of the color table as it was originally specified. It
2590 is not an error to specify a subtexture with width of 0, but such a
2591 specification has no effect.
2592
2593 If a non-zero named buffer object is bound to the
2594 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a portion of
2595 a color table is respecified, DATA is treated as a byte offset into the
2596 buffer object's data store.
2597
2598 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
2599 values.
2600
2601 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
2602 values.
2603
2604 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
2605 values.
2606
2607 `GL_INVALID_VALUE' is generated if START+COUNT>WIDTH .
2608
2609 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2610 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
2611 data store is currently mapped.
2612
2613 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2614 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
2615 unpacked from the buffer object such that the memory reads required
2616 would exceed the data store size.
2617
2618 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2619 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
2620 divisible into the number of bytes needed to store in memory a datum
2621 indicated by TYPE.
2622
2623 `GL_INVALID_OPERATION' is generated if `glColorSubTable' is executed
2624 between the execution of `glBegin' and the corresponding execution of
2625 `glEnd'.")
2626
2627 (define-gl-procedures
2628 ((glColorTableParameterfv
2629 (target GLenum)
2630 (pname GLenum)
2631 (params const-GLfloat-*)
2632 ->
2633 void)
2634 (glColorTableParameteriv
2635 (target GLenum)
2636 (pname GLenum)
2637 (params const-GLint-*)
2638 ->
2639 void))
2640 "Set color lookup table parameters.
2641
2642 TARGET
2643 The target color table. Must be `GL_COLOR_TABLE',
2644 `GL_POST_CONVOLUTION_COLOR_TABLE', or
2645 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2646
2647 PNAME
2648 The symbolic name of a texture color lookup table parameter. Must
2649 be one of `GL_COLOR_TABLE_SCALE' or `GL_COLOR_TABLE_BIAS'.
2650
2651 PARAMS
2652 A pointer to an array where the values of the parameters are
2653 stored.
2654
2655 `glColorTableParameter' is used to specify the scale factors and bias
2656 terms applied to color components when they are loaded into a color
2657 table. TARGET indicates which color table the scale and bias terms
2658 apply to; it must be set to `GL_COLOR_TABLE',
2659 `GL_POST_CONVOLUTION_COLOR_TABLE', or
2660 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2661
2662 PNAME must be `GL_COLOR_TABLE_SCALE' to set the scale factors. In this
2663 case, PARAMS points to an array of four values, which are the scale
2664 factors for red, green, blue, and alpha, in that order.
2665
2666 PNAME must be `GL_COLOR_TABLE_BIAS' to set the bias terms. In this
2667 case, PARAMS points to an array of four values, which are the bias terms
2668 for red, green, blue, and alpha, in that order.
2669
2670 The color tables themselves are specified by calling `glColorTable'.
2671
2672 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an acceptable
2673 value.
2674
2675 `GL_INVALID_OPERATION' is generated if `glColorTableParameter' is
2676 executed between the execution of `glBegin' and the corresponding
2677 execution of `glEnd'.")
2678
2679 (define-gl-procedures
2680 ((glColorTable
2681 (target GLenum)
2682 (internalformat GLenum)
2683 (width GLsizei)
2684 (format GLenum)
2685 (type GLenum)
2686 (data const-GLvoid-*)
2687 ->
2688 void))
2689 "Define a color lookup table.
2690
2691 TARGET
2692 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
2693 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `GL_PROXY_COLOR_TABLE',
2694 `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
2695 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
2696
2697 INTERNALFORMAT
2698 The internal format of the color table. The allowable values are
2699 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
2700 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
2701 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
2702 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
2703 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
2704 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
2705 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
2706 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
2707 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
2708 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', and `GL_RGBA16'.
2709
2710 WIDTH
2711 The number of entries in the color lookup table specified by DATA.
2712
2713 FORMAT
2714 The format of the pixel data in DATA. The allowable values are
2715 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
2716 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
2717
2718 TYPE
2719 The type of the pixel data in DATA. The allowable values are
2720 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
2721 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
2722 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
2723 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
2724 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
2725 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
2726 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
2727 `GL_UNSIGNED_INT_2_10_10_10_REV'.
2728
2729 DATA
2730 Pointer to a one-dimensional array of pixel data that is processed
2731 to build the color table.
2732
2733 `glColorTable' may be used in two ways: to test the actual size and
2734 color resolution of a lookup table given a particular set of parameters,
2735 or to load the contents of a color lookup table. Use the targets
2736 `GL_PROXY_*' for the first case and the other targets for the second
2737 case.
2738
2739 If a non-zero named buffer object is bound to the
2740 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a color table
2741 is specified, DATA is treated as a byte offset into the buffer object's
2742 data store.
2743
2744 If TARGET is `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
2745 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `glColorTable' builds a color lookup
2746 table from an array of pixels. The pixel array specified by WIDTH,
2747 FORMAT, TYPE, and DATA is extracted from memory and processed just as if
2748 `glDrawPixels' were called, but processing stops after the final
2749 expansion to RGBA is completed.
2750
2751 The four scale parameters and the four bias parameters that are defined
2752 for the table are then used to scale and bias the R, G, B, and A
2753 components of each pixel. (Use `glColorTableParameter' to set these
2754 scale and bias parameters.)
2755
2756 Next, the R, G, B, and A values are clamped to the range [0,1] . Each
2757 pixel is then converted to the internal format specified by
2758 INTERNALFORMAT. This conversion simply maps the component values of the
2759 pixel (R, G, B, and A) to the values included in the internal format
2760 (red, green, blue, alpha, luminance, and intensity). The mapping is as
2761 follows:
2762
2763
2764
2765 *Internal Format*
2766 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
2767
2768 `GL_ALPHA'
2769 , , , A , ,
2770
2771 `GL_LUMINANCE'
2772 , , , , R ,
2773
2774 `GL_LUMINANCE_ALPHA'
2775 , , , A , R ,
2776
2777 `GL_INTENSITY'
2778 , , , , , R
2779
2780 `GL_RGB'
2781 R , G , B , , ,
2782
2783 `GL_RGBA'
2784 R , G , B , A , ,
2785
2786 Finally, the red, green, blue, alpha, luminance, and/or intensity
2787 components of the resulting pixels are stored in the color table. They
2788 form a one-dimensional table with indices in the range [0,WIDTH-1] .
2789
2790 If TARGET is `GL_PROXY_*', `glColorTable' recomputes and stores the
2791 values of the proxy color table's state variables
2792 `GL_COLOR_TABLE_FORMAT', `GL_COLOR_TABLE_WIDTH',
2793 `GL_COLOR_TABLE_RED_SIZE', `GL_COLOR_TABLE_GREEN_SIZE',
2794 `GL_COLOR_TABLE_BLUE_SIZE', `GL_COLOR_TABLE_ALPHA_SIZE',
2795 `GL_COLOR_TABLE_LUMINANCE_SIZE', and `GL_COLOR_TABLE_INTENSITY_SIZE'.
2796 There is no effect on the image or state of any actual color table. If
2797 the specified color table is too large to be supported, then all the
2798 proxy state variables listed above are set to zero. Otherwise, the
2799 color table could be supported by `glColorTable' using the corresponding
2800 non-proxy target, and the proxy state variables are set as if that
2801 target were being defined.
2802
2803 The proxy state variables can be retrieved by calling
2804 `glGetColorTableParameter' with a target of `GL_PROXY_*'. This allows
2805 the application to decide if a particular `glColorTable' command would
2806 succeed, and to determine what the resulting color table attributes
2807 would be.
2808
2809 If a color table is enabled, and its width is non-zero, then its
2810 contents are used to replace a subset of the components of each RGBA
2811 pixel group, based on the internal format of the table.
2812
2813 Each pixel group has color components (R, G, B, A) that are in the range
2814 [0.0,1.0] . The color components are rescaled to the size of the color
2815 lookup table to form an index. Then a subset of the components based on
2816 the internal format of the table are replaced by the table entry
2817 selected by that index. If the color components and contents of the
2818 table are represented as follows:
2819
2820
2821
2822 *Representation*
2823 *Meaning*
2824
2825 `r'
2826 Table index computed from `R'
2827
2828 `g'
2829 Table index computed from `G'
2830
2831 `b'
2832 Table index computed from `B'
2833
2834 `a'
2835 Table index computed from `A'
2836
2837 `L[i]'
2838 Luminance value at table index `i'
2839
2840 `I[i]'
2841 Intensity value at table index `i'
2842
2843 `R[i]'
2844 Red value at table index `i'
2845
2846 `G[i]'
2847 Green value at table index `i'
2848
2849 `B[i]'
2850 Blue value at table index `i'
2851
2852 `A[i]'
2853 Alpha value at table index `i'
2854
2855 then the result of color table lookup is as follows:
2856
2857
2858
2859 **
2860 *Resulting Texture Components*
2861
2862 *Table Internal Format*
2863 *R*, *G*, *B*, *A*
2864
2865 `GL_ALPHA'
2866 `R', `G', `B', `A[a]'
2867
2868 `GL_LUMINANCE'
2869 `L[r]', `L[g]', `L[b]', `At'
2870
2871 `GL_LUMINANCE_ALPHA'
2872 `L[r]', `L[g]', `L[b]', `A[a]'
2873
2874 `GL_INTENSITY'
2875 `I[r]', `I[g]', `I[b]', `I[a]'
2876
2877 `GL_RGB'
2878 `R[r]', `G[g]', `B[b]', `A'
2879
2880 `GL_RGBA'
2881 `R[r]', `G[g]', `B[b]', `A[a]'
2882
2883 When `GL_COLOR_TABLE' is enabled, the colors resulting from the pixel
2884 map operation (if it is enabled) are mapped by the color lookup table
2885 before being passed to the convolution operation. The colors resulting
2886 from the convolution operation are modified by the post convolution
2887 color lookup table when `GL_POST_CONVOLUTION_COLOR_TABLE' is enabled.
2888 These modified colors are then sent to the color matrix operation.
2889 Finally, if `GL_POST_COLOR_MATRIX_COLOR_TABLE' is enabled, the colors
2890 resulting from the color matrix operation are mapped by the post color
2891 matrix color lookup table before being used by the histogram operation.
2892
2893
2894
2895 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
2896 values.
2897
2898 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
2899 allowable values.
2900
2901 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
2902 values.
2903
2904 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
2905 values.
2906
2907 `GL_INVALID_VALUE' is generated if WIDTH is less than zero.
2908
2909 `GL_TABLE_TOO_LARGE' is generated if the requested color table is too
2910 large to be supported by the implementation, and TARGET is not a
2911 `GL_PROXY_*' target.
2912
2913 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2914 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
2915 data store is currently mapped.
2916
2917 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2918 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
2919 unpacked from the buffer object such that the memory reads required
2920 would exceed the data store size.
2921
2922 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2923 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
2924 divisible into the number of bytes needed to store in memory a datum
2925 indicated by TYPE.
2926
2927 `GL_INVALID_OPERATION' is generated if `glColorTable' is executed
2928 between the execution of `glBegin' and the corresponding execution of
2929 `glEnd'.")
2930
2931 (define-gl-procedures
2932 ((glColor3b
2933 (red GLbyte)
2934 (green GLbyte)
2935 (blue GLbyte)
2936 ->
2937 void)
2938 (glColor3s
2939 (red GLshort)
2940 (green GLshort)
2941 (blue GLshort)
2942 ->
2943 void)
2944 (glColor3i
2945 (red GLint)
2946 (green GLint)
2947 (blue GLint)
2948 ->
2949 void)
2950 (glColor3f
2951 (red GLfloat)
2952 (green GLfloat)
2953 (blue GLfloat)
2954 ->
2955 void)
2956 (glColor3d
2957 (red GLdouble)
2958 (green GLdouble)
2959 (blue GLdouble)
2960 ->
2961 void)
2962 (glColor3ub
2963 (red GLubyte)
2964 (green GLubyte)
2965 (blue GLubyte)
2966 ->
2967 void)
2968 (glColor3us
2969 (red GLushort)
2970 (green GLushort)
2971 (blue GLushort)
2972 ->
2973 void)
2974 (glColor3ui
2975 (red GLuint)
2976 (green GLuint)
2977 (blue GLuint)
2978 ->
2979 void)
2980 (glColor4b
2981 (red GLbyte)
2982 (green GLbyte)
2983 (blue GLbyte)
2984 (alpha GLbyte)
2985 ->
2986 void)
2987 (glColor4s
2988 (red GLshort)
2989 (green GLshort)
2990 (blue GLshort)
2991 (alpha GLshort)
2992 ->
2993 void)
2994 (glColor4i
2995 (red GLint)
2996 (green GLint)
2997 (blue GLint)
2998 (alpha GLint)
2999 ->
3000 void)
3001 (glColor4f
3002 (red GLfloat)
3003 (green GLfloat)
3004 (blue GLfloat)
3005 (alpha GLfloat)
3006 ->
3007 void)
3008 (glColor4d
3009 (red GLdouble)
3010 (green GLdouble)
3011 (blue GLdouble)
3012 (alpha GLdouble)
3013 ->
3014 void)
3015 (glColor4ub
3016 (red GLubyte)
3017 (green GLubyte)
3018 (blue GLubyte)
3019 (alpha GLubyte)
3020 ->
3021 void)
3022 (glColor4us
3023 (red GLushort)
3024 (green GLushort)
3025 (blue GLushort)
3026 (alpha GLushort)
3027 ->
3028 void)
3029 (glColor4ui
3030 (red GLuint)
3031 (green GLuint)
3032 (blue GLuint)
3033 (alpha GLuint)
3034 ->
3035 void)
3036 (glColor3bv (v const-GLbyte-*) -> void)
3037 (glColor3sv (v const-GLshort-*) -> void)
3038 (glColor3iv (v const-GLint-*) -> void)
3039 (glColor3fv (v const-GLfloat-*) -> void)
3040 (glColor3dv (v const-GLdouble-*) -> void)
3041 (glColor3ubv (v const-GLubyte-*) -> void)
3042 (glColor3usv (v const-GLushort-*) -> void)
3043 (glColor3uiv (v const-GLuint-*) -> void)
3044 (glColor4bv (v const-GLbyte-*) -> void)
3045 (glColor4sv (v const-GLshort-*) -> void)
3046 (glColor4iv (v const-GLint-*) -> void)
3047 (glColor4fv (v const-GLfloat-*) -> void)
3048 (glColor4dv (v const-GLdouble-*) -> void)
3049 (glColor4ubv (v const-GLubyte-*) -> void)
3050 (glColor4usv (v const-GLushort-*) -> void)
3051 (glColor4uiv (v const-GLuint-*) -> void))
3052 "Set the current color.
3053
3054 RED
3055 GREEN
3056
3057 BLUE
3058
3059 Specify new red, green, and blue values for the current color.
3060
3061 ALPHA
3062 Specifies a new alpha value for the current color. Included only
3063 in the four-argument `glColor4' commands.
3064
3065 The GL stores both a current single-valued color index and a current
3066 four-valued RGBA color. `glColor' sets a new four-valued RGBA color.
3067 `glColor' has two major variants: `glColor3' and `glColor4'. `glColor3'
3068 variants specify new red, green, and blue values explicitly and set the
3069 current alpha value to 1.0 (full intensity) implicitly. `glColor4'
3070 variants specify all four color components explicitly.
3071
3072 `glColor3b', `glColor4b', `glColor3s', `glColor4s', `glColor3i', and
3073 `glColor4i' take three or four signed byte, short, or long integers as
3074 arguments. When *v* is appended to the name, the color commands can
3075 take a pointer to an array of such values.
3076
3077 Current color values are stored in floating-point format, with
3078 unspecified mantissa and exponent sizes. Unsigned integer color
3079 components, when specified, are linearly mapped to floating-point values
3080 such that the largest representable value maps to 1.0 (full intensity),
3081 and 0 maps to 0.0 (zero intensity). Signed integer color components,
3082 when specified, are linearly mapped to floating-point values such that
3083 the most positive representable value maps to 1.0, and the most negative
3084 representable value maps to -1.0 . (Note that this mapping does not
3085 convert 0 precisely to 0.0.) Floating-point values are mapped directly.
3086
3087 Neither floating-point nor signed integer values are clamped to the
3088 range [0,1] before the current color is updated. However, color
3089 components are clamped to this range before they are interpolated or
3090 written into a color buffer.")
3091
3092 (define-gl-procedures
3093 ((glCompileShader (shader GLuint) -> void))
3094 "Compiles a shader object.
3095
3096 SHADER
3097 Specifies the shader object to be compiled.
3098
3099 `glCompileShader' compiles the source code strings that have been stored
3100 in the shader object specified by SHADER.
3101
3102 The compilation status will be stored as part of the shader object's
3103 state. This value will be set to `GL_TRUE' if the shader was compiled
3104 without errors and is ready for use, and `GL_FALSE' otherwise. It can
3105 be queried by calling `glGetShader' with arguments SHADER and
3106 `GL_COMPILE_STATUS'.
3107
3108 Compilation of a shader can fail for a number of reasons as specified by
3109 the OpenGL Shading Language Specification. Whether or not the
3110 compilation was successful, information about the compilation can be
3111 obtained from the shader object's information log by calling
3112 `glGetShaderInfoLog'.
3113
3114 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
3115 OpenGL.
3116
3117 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
3118
3119 `GL_INVALID_OPERATION' is generated if `glCompileShader' is executed
3120 between the execution of `glBegin' and the corresponding execution of
3121 `glEnd'.")
3122
3123 (define-gl-procedures
3124 ((glCompressedTexImage1D
3125 (target GLenum)
3126 (level GLint)
3127 (internalformat GLenum)
3128 (width GLsizei)
3129 (border GLint)
3130 (imageSize GLsizei)
3131 (data const-GLvoid-*)
3132 ->
3133 void))
3134 "Specify a one-dimensional texture image in a compressed format.
3135
3136 TARGET
3137 Specifies the target texture. Must be `GL_TEXTURE_1D' or
3138 `GL_PROXY_TEXTURE_1D'.
3139
3140 LEVEL
3141 Specifies the level-of-detail number. Level 0 is the base image
3142 level. Level N is the Nth mipmap reduction image.
3143
3144 INTERNALFORMAT
3145 Specifies the format of the compressed image data stored at address
3146 DATA.
3147
3148 WIDTH
3149 Specifies the width of the texture image including the border if
3150 any. If the GL version does not support non-power-of-two sizes,
3151 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3152 implementations support texture images that are at least 64 texels
3153 wide. The height of the 1D texture image is 1.
3154
3155 BORDER
3156 Specifies the width of the border. Must be either 0 or 1.
3157
3158 IMAGESIZE
3159 Specifies the number of unsigned bytes of image data starting at
3160 the address specified by DATA.
3161
3162 DATA
3163 Specifies a pointer to the compressed image data in memory.
3164
3165 Texturing maps a portion of a specified texture image onto each
3166 graphical primitive for which texturing is enabled. To enable and
3167 disable one-dimensional texturing, call `glEnable' and `glDisable' with
3168 argument `GL_TEXTURE_1D'.
3169
3170 `glCompressedTexImage1D' loads a previously defined, and retrieved,
3171 compressed one-dimensional texture image if TARGET is `GL_TEXTURE_1D'
3172 (see `glTexImage1D').
3173
3174 If TARGET is `GL_PROXY_TEXTURE_1D', no data is read from DATA, but all
3175 of the texture image state is recalculated, checked for consistency, and
3176 checked against the implementation's capabilities. If the
3177 implementation cannot handle a texture of the requested texture size, it
3178 sets all of the image state to 0, but does not generate an error (see
3179 `glGetError'). To query for an entire mipmap array, use an image array
3180 level greater than or equal to 1.
3181
3182 INTERNALFORMAT must be extension-specified compressed-texture format.
3183 When a texture is loaded with `glTexImage1D' using a generic compressed
3184 texture format (e.g., `GL_COMPRESSED_RGB') the GL selects from one of
3185 its extensions supporting compressed textures. In order to load the
3186 compressed texture image using `glCompressedTexImage1D', query the
3187 compressed texture image's size and format using
3188 `glGetTexLevelParameter'.
3189
3190 If a non-zero named buffer object is bound to the
3191 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3192 image is specified, DATA is treated as a byte offset into the buffer
3193 object's data store.
3194
3195 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
3196 compressed internal formats: `GL_COMPRESSED_ALPHA',
3197 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3198 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
3199
3200 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3201 format, dimensions, and contents of the specified compressed image data.
3202
3203 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3204 supported by the specific compressed internal format as specified in the
3205 specific texture compression extension.
3206
3207 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3208 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3209 data store is currently mapped.
3210
3211 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3212 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3213 unpacked from the buffer object such that the memory reads required
3214 would exceed the data store size.
3215
3216 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage1D' is
3217 executed between the execution of `glBegin' and the corresponding
3218 execution of `glEnd'.
3219
3220 Undefined results, including abnormal program termination, are generated
3221 if DATA is not encoded in a manner consistent with the extension
3222 specification defining the internal compression format.")
3223
3224 (define-gl-procedures
3225 ((glCompressedTexImage2D
3226 (target GLenum)
3227 (level GLint)
3228 (internalformat GLenum)
3229 (width GLsizei)
3230 (height GLsizei)
3231 (border GLint)
3232 (imageSize GLsizei)
3233 (data const-GLvoid-*)
3234 ->
3235 void))
3236 "Specify a two-dimensional texture image in a compressed format.
3237
3238 TARGET
3239 Specifies the target texture. Must be `GL_TEXTURE_2D',
3240 `GL_PROXY_TEXTURE_2D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
3241 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
3242 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
3243 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
3244
3245 LEVEL
3246 Specifies the level-of-detail number. Level 0 is the base image
3247 level. Level N is the Nth mipmap reduction image.
3248
3249 INTERNALFORMAT
3250 Specifies the format of the compressed image data stored at address
3251 DATA.
3252
3253 WIDTH
3254 Specifies the width of the texture image including the border if
3255 any. If the GL version does not support non-power-of-two sizes,
3256 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3257 implementations support 2D texture images that are at least 64
3258 texels wide and cube-mapped texture images that are at least 16
3259 texels wide.
3260
3261 HEIGHT
3262 Specifies the height of the texture image including the border if
3263 any. If the GL version does not support non-power-of-two sizes,
3264 this value must be Must be 2^N+2\u2061(BORDER,) for some integer N . All
3265 implementations support 2D texture images that are at least 64
3266 texels high and cube-mapped texture images that are at least 16
3267 texels high.
3268
3269 BORDER
3270 Specifies the width of the border. Must be either 0 or 1.
3271
3272 IMAGESIZE
3273 Specifies the number of unsigned bytes of image data starting at
3274 the address specified by DATA.
3275
3276 DATA
3277 Specifies a pointer to the compressed image data in memory.
3278
3279 Texturing maps a portion of a specified texture image onto each
3280 graphical primitive for which texturing is enabled. To enable and
3281 disable two-dimensional texturing, call `glEnable' and `glDisable' with
3282 argument `GL_TEXTURE_2D'. To enable and disable texturing using
3283 cube-mapped textures, call `glEnable' and `glDisable' with argument
3284 `GL_TEXTURE_CUBE_MAP'.
3285
3286 `glCompressedTexImage2D' loads a previously defined, and retrieved,
3287 compressed two-dimensional texture image if TARGET is `GL_TEXTURE_2D'
3288 (see `glTexImage2D').
3289
3290 If TARGET is `GL_PROXY_TEXTURE_2D', no data is read from DATA, but all
3291 of the texture image state is recalculated, checked for consistency, and
3292 checked against the implementation's capabilities. If the
3293 implementation cannot handle a texture of the requested texture size, it
3294 sets all of the image state to 0, but does not generate an error (see
3295 `glGetError'). To query for an entire mipmap array, use an image array
3296 level greater than or equal to 1.
3297
3298 INTERNALFORMAT must be an extension-specified compressed-texture format.
3299 When a texture is loaded with `glTexImage2D' using a generic compressed
3300 texture format (e.g., `GL_COMPRESSED_RGB'), the GL selects from one of
3301 its extensions supporting compressed textures. In order to load the
3302 compressed texture image using `glCompressedTexImage2D', query the
3303 compressed texture image's size and format using
3304 `glGetTexLevelParameter'.
3305
3306 If a non-zero named buffer object is bound to the
3307 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3308 image is specified, DATA is treated as a byte offset into the buffer
3309 object's data store.
3310
3311 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
3312 compressed internal formats: `GL_COMPRESSED_ALPHA',
3313 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3314 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
3315
3316 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3317 format, dimensions, and contents of the specified compressed image data.
3318
3319 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3320 supported by the specific compressed internal format as specified in the
3321 specific texture compression extension.
3322
3323 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3324 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3325 data store is currently mapped.
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 data would be
3329 unpacked from the buffer object such that the memory reads required
3330 would exceed the data store size.
3331
3332 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage2D' is
3333 executed between the execution of `glBegin' and the corresponding
3334 execution of `glEnd'.
3335
3336 Undefined results, including abnormal program termination, are generated
3337 if DATA is not encoded in a manner consistent with the extension
3338 specification defining the internal compression format.")
3339
3340 (define-gl-procedures
3341 ((glCompressedTexImage3D
3342 (target GLenum)
3343 (level GLint)
3344 (internalformat GLenum)
3345 (width GLsizei)
3346 (height GLsizei)
3347 (depth GLsizei)
3348 (border GLint)
3349 (imageSize GLsizei)
3350 (data const-GLvoid-*)
3351 ->
3352 void))
3353 "Specify a three-dimensional texture image in a compressed format.
3354
3355 TARGET
3356 Specifies the target texture. Must be `GL_TEXTURE_3D' or
3357 `GL_PROXY_TEXTURE_3D'.
3358
3359 LEVEL
3360 Specifies the level-of-detail number. Level 0 is the base image
3361 level. Level N is the Nth mipmap reduction image.
3362
3363 INTERNALFORMAT
3364 Specifies the format of the compressed image data stored at address
3365 DATA.
3366
3367 WIDTH
3368 Specifies the width of the texture image including the border if
3369 any. If the GL version does not support non-power-of-two sizes,
3370 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3371 implementations support 3D texture images that are at least 16
3372 texels wide.
3373
3374 HEIGHT
3375 Specifies the height of the texture image including the border if
3376 any. If the GL version does not support non-power-of-two sizes,
3377 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3378 implementations support 3D texture images that are at least 16
3379 texels high.
3380
3381 DEPTH
3382 Specifies the depth of the texture image including the border if
3383 any. If the GL version does not support non-power-of-two sizes,
3384 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3385 implementations support 3D texture images that are at least 16
3386 texels deep.
3387
3388 BORDER
3389 Specifies the width of the border. Must be either 0 or 1.
3390
3391 IMAGESIZE
3392 Specifies the number of unsigned bytes of image data starting at
3393 the address specified by DATA.
3394
3395 DATA
3396 Specifies a pointer to the compressed image data in memory.
3397
3398 Texturing maps a portion of a specified texture image onto each
3399 graphical primitive for which texturing is enabled. To enable and
3400 disable three-dimensional texturing, call `glEnable' and `glDisable'
3401 with argument `GL_TEXTURE_3D'.
3402
3403 `glCompressedTexImage3D' loads a previously defined, and retrieved,
3404 compressed three-dimensional texture image if TARGET is `GL_TEXTURE_3D'
3405 (see `glTexImage3D').
3406
3407 If TARGET is `GL_PROXY_TEXTURE_3D', no data is read from DATA, but all
3408 of the texture image state is recalculated, checked for consistency, and
3409 checked against the implementation's capabilities. If the
3410 implementation cannot handle a texture of the requested texture size, it
3411 sets all of the image state to 0, but does not generate an error (see
3412 `glGetError'). To query for an entire mipmap array, use an image array
3413 level greater than or equal to 1.
3414
3415 INTERNALFORMAT must be an extension-specified compressed-texture format.
3416 When a texture is loaded with `glTexImage2D' using a generic compressed
3417 texture format (e.g., `GL_COMPRESSED_RGB'), the GL selects from one of
3418 its extensions supporting compressed textures. In order to load the
3419 compressed texture image using `glCompressedTexImage3D', query the
3420 compressed texture image's size and format using
3421 `glGetTexLevelParameter'.
3422
3423 If a non-zero named buffer object is bound to the
3424 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3425 image is specified, DATA is treated as a byte offset into the buffer
3426 object's data store.
3427
3428 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
3429 compressed internal formats: `GL_COMPRESSED_ALPHA',
3430 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3431 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
3432
3433 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3434 format, dimensions, and contents of the specified compressed image data.
3435
3436 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3437 supported by the specific compressed internal format as specified in the
3438 specific texture compression extension.
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 buffer object's
3442 data store is currently mapped.
3443
3444 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3445 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3446 unpacked from the buffer object such that the memory reads required
3447 would exceed the data store size.
3448
3449 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage3D' is
3450 executed between the execution of `glBegin' and the corresponding
3451 execution of `glEnd'.
3452
3453 Undefined results, including abnormal program termination, are generated
3454 if DATA is not encoded in a manner consistent with the extension
3455 specification defining the internal compression format.")
3456
3457 (define-gl-procedures
3458 ((glCompressedTexSubImage1D
3459 (target GLenum)
3460 (level GLint)
3461 (xoffset GLint)
3462 (width GLsizei)
3463 (format GLenum)
3464 (imageSize GLsizei)
3465 (data const-GLvoid-*)
3466 ->
3467 void))
3468 "Specify a one-dimensional texture subimage in a compressed format.
3469
3470 TARGET
3471 Specifies the target texture. Must be `GL_TEXTURE_1D'.
3472
3473 LEVEL
3474 Specifies the level-of-detail number. Level 0 is the base image
3475 level. Level N is the Nth mipmap reduction image.
3476
3477 XOFFSET
3478 Specifies a texel offset in the x direction within the texture
3479 array.
3480
3481 WIDTH
3482 Specifies the width of the texture subimage.
3483
3484 FORMAT
3485 Specifies the format of the compressed image data stored at address
3486 DATA.
3487
3488 IMAGESIZE
3489 Specifies the number of unsigned bytes of image data starting at
3490 the address specified by DATA.
3491
3492 DATA
3493 Specifies a pointer to the compressed image data in memory.
3494
3495 Texturing maps a portion of a specified texture image onto each
3496 graphical primitive for which texturing is enabled. To enable and
3497 disable one-dimensional texturing, call `glEnable' and `glDisable' with
3498 argument `GL_TEXTURE_1D'.
3499
3500 `glCompressedTexSubImage1D' redefines a contiguous subregion of an
3501 existing one-dimensional texture image. The texels referenced by DATA
3502 replace the portion of the existing texture array with x indices XOFFSET
3503 and XOFFSET+WIDTH-1 , inclusive. This region may not include any texels
3504 outside the range of the texture array as it was originally specified.
3505 It is not an error to specify a subtexture with width of 0, but such a
3506 specification has no effect.
3507
3508 FORMAT must be an extension-specified compressed-texture format. The
3509 FORMAT of the compressed texture image is selected by the GL
3510 implementation that compressed it (see `glTexImage1D'), and should be
3511 queried at the time the texture was compressed with
3512 `glGetTexLevelParameter'.
3513
3514 If a non-zero named buffer object is bound to the
3515 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3516 image is specified, DATA is treated as a byte offset into the buffer
3517 object's data store.
3518
3519 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3520 compressed internal formats: `GL_COMPRESSED_ALPHA',
3521 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3522 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3523 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3524 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3525 `GL_COMPRESSED_SRGB_ALPHA'.
3526
3527 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3528 format, dimensions, and contents of the specified compressed image data.
3529
3530 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3531 supported by the specific compressed internal format as specified in the
3532 specific texture compression extension.
3533
3534 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3535 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3536 data store is currently mapped.
3537
3538 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3539 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3540 unpacked from the buffer object such that the memory reads required
3541 would exceed the data store size.
3542
3543 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage1D' is
3544 executed between the execution of `glBegin' and the corresponding
3545 execution of `glEnd'.
3546
3547 Undefined results, including abnormal program termination, are generated
3548 if DATA is not encoded in a manner consistent with the extension
3549 specification defining the internal compression format.")
3550
3551 (define-gl-procedures
3552 ((glCompressedTexSubImage2D
3553 (target GLenum)
3554 (level GLint)
3555 (xoffset GLint)
3556 (yoffset GLint)
3557 (width GLsizei)
3558 (height GLsizei)
3559 (format GLenum)
3560 (imageSize GLsizei)
3561 (data const-GLvoid-*)
3562 ->
3563 void))
3564 "Specify a two-dimensional texture subimage in a compressed format.
3565
3566 TARGET
3567 Specifies the target texture. Must be `GL_TEXTURE_2D',
3568 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
3569 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
3570 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
3571 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
3572
3573 LEVEL
3574 Specifies the level-of-detail number. Level 0 is the base image
3575 level. Level N is the Nth mipmap reduction image.
3576
3577 XOFFSET
3578 Specifies a texel offset in the x direction within the texture
3579 array.
3580
3581 YOFFSET
3582 Specifies a texel offset in the y direction within the texture
3583 array.
3584
3585 WIDTH
3586 Specifies the width of the texture subimage.
3587
3588 HEIGHT
3589 Specifies the height of the texture subimage.
3590
3591 FORMAT
3592 Specifies the format of the compressed image data stored at address
3593 DATA.
3594
3595 IMAGESIZE
3596 Specifies the number of unsigned bytes of image data starting at
3597 the address specified by DATA.
3598
3599 DATA
3600 Specifies a pointer to the compressed image data in memory.
3601
3602 Texturing maps a portion of a specified texture image onto each
3603 graphical primitive for which texturing is enabled. To enable and
3604 disable two-dimensional texturing, call `glEnable' and `glDisable' with
3605 argument `GL_TEXTURE_2D'. To enable and disable texturing using
3606 cube-mapped texture, call `glEnable' and `glDisable' with argument
3607 `GL_TEXTURE_CUBE_MAP'.
3608
3609 `glCompressedTexSubImage2D' redefines a contiguous subregion of an
3610 existing two-dimensional texture image. The texels referenced by DATA
3611 replace the portion of the existing texture array with x indices XOFFSET
3612 and XOFFSET+WIDTH-1 , and the y indices YOFFSET and YOFFSET+HEIGHT-1 ,
3613 inclusive. This region may not include any texels outside the range of
3614 the texture array as it was originally specified. It is not an error to
3615 specify a subtexture with width of 0, but such a specification has no
3616 effect.
3617
3618 FORMAT must be an extension-specified compressed-texture format. The
3619 FORMAT of the compressed texture image is selected by the GL
3620 implementation that compressed it (see `glTexImage2D') and should be
3621 queried at the time the texture was compressed with
3622 `glGetTexLevelParameter'.
3623
3624 If a non-zero named buffer object is bound to the
3625 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3626 image is specified, DATA is treated as a byte offset into the buffer
3627 object's data store.
3628
3629 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3630 compressed internal formats: `GL_COMPRESSED_ALPHA',
3631 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3632 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3633 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3634 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3635 `GL_COMPRESSED_SRGB_ALPHA'.
3636
3637 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3638 format, dimensions, and contents of the specified compressed image data.
3639
3640 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3641 supported by the specific compressed internal format as specified in the
3642 specific texture compression extension.
3643
3644 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3645 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3646 data store is currently mapped.
3647
3648 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3649 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3650 unpacked from the buffer object such that the memory reads required
3651 would exceed the data store size.
3652
3653 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage2D' is
3654 executed between the execution of `glBegin' and the corresponding
3655 execution of `glEnd'.
3656
3657 Undefined results, including abnormal program termination, are generated
3658 if DATA is not encoded in a manner consistent with the extension
3659 specification defining the internal compression format.")
3660
3661 (define-gl-procedures
3662 ((glCompressedTexSubImage3D
3663 (target GLenum)
3664 (level GLint)
3665 (xoffset GLint)
3666 (yoffset GLint)
3667 (zoffset GLint)
3668 (width GLsizei)
3669 (height GLsizei)
3670 (depth GLsizei)
3671 (format GLenum)
3672 (imageSize GLsizei)
3673 (data const-GLvoid-*)
3674 ->
3675 void))
3676 "Specify a three-dimensional texture subimage in a compressed format.
3677
3678 TARGET
3679 Specifies the target texture. Must be `GL_TEXTURE_3D'.
3680
3681 LEVEL
3682 Specifies the level-of-detail number. Level 0 is the base image
3683 level. Level N is the Nth mipmap reduction image.
3684
3685 XOFFSET
3686 Specifies a texel offset in the x direction within the texture
3687 array.
3688
3689 YOFFSET
3690 Specifies a texel offset in the y direction within the texture
3691 array.
3692
3693 WIDTH
3694 Specifies the width of the texture subimage.
3695
3696 HEIGHT
3697 Specifies the height of the texture subimage.
3698
3699 DEPTH
3700 Specifies the depth of the texture subimage.
3701
3702 FORMAT
3703 Specifies the format of the compressed image data stored at address
3704 DATA.
3705
3706 IMAGESIZE
3707 Specifies the number of unsigned bytes of image data starting at
3708 the address specified by DATA.
3709
3710 DATA
3711 Specifies a pointer to the compressed image data in memory.
3712
3713 Texturing maps a portion of a specified texture image onto each
3714 graphical primitive for which texturing is enabled. To enable and
3715 disable three-dimensional texturing, call `glEnable' and `glDisable'
3716 with argument `GL_TEXTURE_3D'.
3717
3718 `glCompressedTexSubImage3D' redefines a contiguous subregion of an
3719 existing three-dimensional texture image. The texels referenced by DATA
3720 replace the portion of the existing texture array with x indices XOFFSET
3721 and XOFFSET+WIDTH-1 , and the y indices YOFFSET and YOFFSET+HEIGHT-1 ,
3722 and the z indices ZOFFSET and ZOFFSET+DEPTH-1 , inclusive. This region
3723 may not include any texels outside the range of the texture array as it
3724 was originally specified. It is not an error to specify a subtexture
3725 with width of 0, but such a specification has no effect.
3726
3727 FORMAT must be an extension-specified compressed-texture format. The
3728 FORMAT of the compressed texture image is selected by the GL
3729 implementation that compressed it (see `glTexImage3D') and should be
3730 queried at the time the texture was compressed with
3731 `glGetTexLevelParameter'.
3732
3733 If a non-zero named buffer object is bound to the
3734 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3735 image is specified, DATA is treated as a byte offset into the buffer
3736 object's data store.
3737
3738 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3739 compressed internal formats: `GL_COMPRESSED_ALPHA',
3740 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3741 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3742 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3743 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3744 `GL_COMPRESSED_SRGB_ALPHA'.
3745
3746 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3747 format, dimensions, and contents of the specified compressed image data.
3748
3749 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3750 supported by the specific compressed internal format as specified in the
3751 specific texture compression extension.
3752
3753 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3754 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3755 data store is currently mapped.
3756
3757 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3758 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3759 unpacked from the buffer object such that the memory reads required
3760 would exceed the data store size.
3761
3762 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage3D' is
3763 executed between the execution of `glBegin' and the corresponding
3764 execution of `glEnd'.
3765
3766 Undefined results, including abnormal program termination, are generated
3767 if DATA is not encoded in a manner consistent with the extension
3768 specification defining the internal compression format.")
3769
3770 (define-gl-procedures
3771 ((glConvolutionFilter1D
3772 (target GLenum)
3773 (internalformat GLenum)
3774 (width GLsizei)
3775 (format GLenum)
3776 (type GLenum)
3777 (data const-GLvoid-*)
3778 ->
3779 void))
3780 "Define a one-dimensional convolution filter.
3781
3782 TARGET
3783 Must be `GL_CONVOLUTION_1D'.
3784
3785 INTERNALFORMAT
3786 The internal format of the convolution filter kernel. The
3787 allowable values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
3788 `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4',
3789 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
3790 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
3791 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
3792 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
3793 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
3794 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
3795 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
3796 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
3797 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
3798
3799 WIDTH
3800 The width of the pixel array referenced by DATA.
3801
3802 FORMAT
3803 The format of the pixel data in DATA. The allowable values are
3804 `GL_ALPHA', `GL_LUMINANCE', `GL_LUMINANCE_ALPHA', `GL_INTENSITY',
3805 `GL_RGB', and `GL_RGBA'.
3806
3807 TYPE
3808 The type of the pixel data in DATA. Symbolic constants
3809 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
3810 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
3811 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3812 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
3813 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3814 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3815 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3816 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
3817 are accepted.
3818
3819 DATA
3820 Pointer to a one-dimensional array of pixel data that is processed
3821 to build the convolution filter kernel.
3822
3823 `glConvolutionFilter1D' builds a one-dimensional convolution filter
3824 kernel from an array of pixels.
3825
3826 The pixel array specified by WIDTH, FORMAT, TYPE, and DATA is extracted
3827 from memory and processed just as if `glDrawPixels' were called, but
3828 processing stops after the final expansion to RGBA is completed.
3829
3830 If a non-zero named buffer object is bound to the
3831 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
3832 filter is specified, DATA is treated as a byte offset into the buffer
3833 object's data store.
3834
3835 The R, G, B, and A components of each pixel are next scaled by the four
3836 1D `GL_CONVOLUTION_FILTER_SCALE' parameters and biased by the four 1D
3837 `GL_CONVOLUTION_FILTER_BIAS' parameters. (The scale and bias parameters
3838 are set by `glConvolutionParameter' using the `GL_CONVOLUTION_1D' target
3839 and the names `GL_CONVOLUTION_FILTER_SCALE' and
3840 `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors of
3841 four values that are applied to red, green, blue, and alpha, in that
3842 order.) The R, G, B, and A values are not clamped to [0,1] at any time
3843 during this process.
3844
3845 Each pixel is then converted to the internal format specified by
3846 INTERNALFORMAT. This conversion simply maps the component values of the
3847 pixel (R, G, B, and A) to the values included in the internal format
3848 (red, green, blue, alpha, luminance, and intensity). The mapping is as
3849 follows:
3850
3851
3852
3853 *Internal Format*
3854 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
3855
3856 `GL_ALPHA'
3857 , , , A , ,
3858
3859 `GL_LUMINANCE'
3860 , , , , R ,
3861
3862 `GL_LUMINANCE_ALPHA'
3863 , , , A , R ,
3864
3865 `GL_INTENSITY'
3866 , , , , , R
3867
3868 `GL_RGB'
3869 R , G , B , , ,
3870
3871 `GL_RGBA'
3872 R , G , B , A , ,
3873
3874 The red, green, blue, alpha, luminance, and/or intensity components of
3875 the resulting pixels are stored in floating-point rather than integer
3876 format. They form a one-dimensional filter kernel image indexed with
3877 coordinate I such that I starts at 0 and increases from left to right.
3878 Kernel location I is derived from the Ith pixel, counting from 0.
3879
3880 Note that after a convolution is performed, the resulting color
3881 components are also scaled by their corresponding
3882 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
3883 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
3884 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
3885 set by `glPixelTransfer'.
3886
3887 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_1D'.
3888
3889 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
3890 allowable values.
3891
3892 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
3893 values.
3894
3895 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
3896 values.
3897
3898 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
3899 than the maximum supported value. This value may be queried with
3900 `glGetConvolutionParameter' using target `GL_CONVOLUTION_1D' and name
3901 `GL_MAX_CONVOLUTION_WIDTH'.
3902
3903 `GL_INVALID_OPERATION' is generated if FORMAT is one of
3904 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3905 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and TYPE is
3906 not `GL_RGB'.
3907
3908 `GL_INVALID_OPERATION' is generated if FORMAT is one of
3909 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3910 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3911 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3912 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
3913 TYPE is neither `GL_RGBA' nor `GL_BGRA'.
3914
3915 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3916 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3917 data store is currently mapped.
3918
3919 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3920 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3921 unpacked from the buffer object such that the memory reads required
3922 would exceed the data store size.
3923
3924 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3925 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
3926 divisible into the number of bytes needed to store in memory a datum
3927 indicated by TYPE.
3928
3929 `GL_INVALID_OPERATION' is generated if `glConvolutionFilter1D' is
3930 executed between the execution of `glBegin' and the corresponding
3931 execution of `glEnd'.")
3932
3933 (define-gl-procedures
3934 ((glConvolutionFilter2D
3935 (target GLenum)
3936 (internalformat GLenum)
3937 (width GLsizei)
3938 (height GLsizei)
3939 (format GLenum)
3940 (type GLenum)
3941 (data const-GLvoid-*)
3942 ->
3943 void))
3944 "Define a two-dimensional convolution filter.
3945
3946 TARGET
3947 Must be `GL_CONVOLUTION_2D'.
3948
3949 INTERNALFORMAT
3950 The internal format of the convolution filter kernel. The
3951 allowable values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
3952 `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4',
3953 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
3954 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
3955 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
3956 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
3957 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
3958 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
3959 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
3960 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
3961 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
3962
3963 WIDTH
3964 The width of the pixel array referenced by DATA.
3965
3966 HEIGHT
3967 The height of the pixel array referenced by DATA.
3968
3969 FORMAT
3970 The format of the pixel data in DATA. The allowable values are
3971 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
3972 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
3973
3974 TYPE
3975 The type of the pixel data in DATA. Symbolic constants
3976 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
3977 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
3978 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3979 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
3980 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3981 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3982 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3983 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
3984 are accepted.
3985
3986 DATA
3987 Pointer to a two-dimensional array of pixel data that is processed
3988 to build the convolution filter kernel.
3989
3990 `glConvolutionFilter2D' builds a two-dimensional convolution filter
3991 kernel from an array of pixels.
3992
3993 The pixel array specified by WIDTH, HEIGHT, FORMAT, TYPE, and DATA is
3994 extracted from memory and processed just as if `glDrawPixels' were
3995 called, but processing stops after the final expansion to RGBA is
3996 completed.
3997
3998 If a non-zero named buffer object is bound to the
3999 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
4000 filter is specified, DATA is treated as a byte offset into the buffer
4001 object's data store.
4002
4003 The R, G, B, and A components of each pixel are next scaled by the four
4004 2D `GL_CONVOLUTION_FILTER_SCALE' parameters and biased by the four 2D
4005 `GL_CONVOLUTION_FILTER_BIAS' parameters. (The scale and bias parameters
4006 are set by `glConvolutionParameter' using the `GL_CONVOLUTION_2D' target
4007 and the names `GL_CONVOLUTION_FILTER_SCALE' and
4008 `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors of
4009 four values that are applied to red, green, blue, and alpha, in that
4010 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4011 during this process.
4012
4013 Each pixel is then converted to the internal format specified by
4014 INTERNALFORMAT. This conversion simply maps the component values of the
4015 pixel (R, G, B, and A) to the values included in the internal format
4016 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4017 follows:
4018
4019
4020
4021 *Internal Format*
4022 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4023
4024 `GL_ALPHA'
4025 , , , A , ,
4026
4027 `GL_LUMINANCE'
4028 , , , , R ,
4029
4030 `GL_LUMINANCE_ALPHA'
4031 , , , A , R ,
4032
4033 `GL_INTENSITY'
4034 , , , , , R
4035
4036 `GL_RGB'
4037 R , G , B , , ,
4038
4039 `GL_RGBA'
4040 R , G , B , A , ,
4041
4042 The red, green, blue, alpha, luminance, and/or intensity components of
4043 the resulting pixels are stored in floating-point rather than integer
4044 format. They form a two-dimensional filter kernel image indexed with
4045 coordinates I and J such that I starts at zero and increases from left
4046 to right, and J starts at zero and increases from bottom to top. Kernel
4047 location I,J is derived from the Nth pixel, where N is I+J*WIDTH.
4048
4049 Note that after a convolution is performed, the resulting color
4050 components are also scaled by their corresponding
4051 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4052 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4053 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4054 set by `glPixelTransfer'.
4055
4056 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_2D'.
4057
4058 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4059 allowable values.
4060
4061 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
4062 values.
4063
4064 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
4065 values.
4066
4067 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4068 than the maximum supported value. This value may be queried with
4069 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4070 `GL_MAX_CONVOLUTION_WIDTH'.
4071
4072 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
4073 than the maximum supported value. This value may be queried with
4074 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4075 `GL_MAX_CONVOLUTION_HEIGHT'.
4076
4077 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
4078 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
4079 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
4080 is not `GL_RGB'.
4081
4082 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
4083 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
4084 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
4085 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
4086 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
4087 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
4088
4089 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
4090 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
4091 data store is currently mapped.
4092
4093 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
4094 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
4095 unpacked from the buffer object such that the memory reads required
4096 would exceed the data store size.
4097
4098 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
4099 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
4100 divisible into the number of bytes needed to store in memory a datum
4101 indicated by TYPE.
4102
4103 `GL_INVALID_OPERATION' is generated if `glConvolutionFilter2D' is
4104 executed between the execution of `glBegin' and the corresponding
4105 execution of `glEnd'.")
4106
4107 (define-gl-procedures
4108 ((glConvolutionParameterf
4109 (target GLenum)
4110 (pname GLenum)
4111 (params GLfloat)
4112 ->
4113 void)
4114 (glConvolutionParameteri
4115 (target GLenum)
4116 (pname GLenum)
4117 (params GLint)
4118 ->
4119 void)
4120 (glConvolutionParameterfv
4121 (target GLenum)
4122 (pname GLenum)
4123 (params const-GLfloat-*)
4124 ->
4125 void)
4126 (glConvolutionParameteriv
4127 (target GLenum)
4128 (pname GLenum)
4129 (params const-GLint-*)
4130 ->
4131 void))
4132 "Set convolution parameters.
4133
4134 TARGET
4135 The target for the convolution parameter. Must be one of
4136 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D'.
4137
4138 PNAME
4139 The parameter to be set. Must be `GL_CONVOLUTION_BORDER_MODE'.
4140
4141 PARAMS
4142 The parameter value. Must be one of `GL_REDUCE',
4143 `GL_CONSTANT_BORDER', `GL_REPLICATE_BORDER'.
4144
4145
4146
4147 `glConvolutionParameter' sets the value of a convolution parameter.
4148
4149 TARGET selects the convolution filter to be affected:
4150 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D' for the
4151 1D, 2D, or separable 2D filter, respectively.
4152
4153 PNAME selects the parameter to be changed. `GL_CONVOLUTION_FILTER_SCALE'
4154 and `GL_CONVOLUTION_FILTER_BIAS' affect the definition of the
4155 convolution filter kernel; see `glConvolutionFilter1D',
4156 `glConvolutionFilter2D', and `glSeparableFilter2D' for details. In
4157 these cases, PARAMSv is an array of four values to be applied to red,
4158 green, blue, and alpha values, respectively. The initial value for
4159 `GL_CONVOLUTION_FILTER_SCALE' is (1, 1, 1, 1), and the initial value for
4160 `GL_CONVOLUTION_FILTER_BIAS' is (0, 0, 0, 0).
4161
4162 A PNAME value of `GL_CONVOLUTION_BORDER_MODE' controls the convolution
4163 border mode. The accepted modes are:
4164
4165 `GL_REDUCE'
4166 The image resulting from convolution is smaller than the source
4167 image. If the filter width is WF and height is HF , and the source
4168 image width is WS and height is HS , then the convolved image width
4169 will be WS-WF+1 and height will be HS-HF+1 . (If this reduction
4170 would generate an image with zero or negative width and/or height,
4171 the output is simply null, with no error generated.) The
4172 coordinates of the image resulting from convolution are zero
4173 through WS-WF in width and zero through HS-HF in height.
4174
4175 `GL_CONSTANT_BORDER'
4176 The image resulting from convolution is the same size as the source
4177 image, and processed as if the source image were surrounded by
4178 pixels with their color specified by the
4179 `GL_CONVOLUTION_BORDER_COLOR'.
4180
4181 `GL_REPLICATE_BORDER'
4182 The image resulting from convolution is the same size as the source
4183 image, and processed as if the outermost pixel on the border of the
4184 source image were replicated.
4185
4186 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
4187 values.
4188
4189 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
4190 values.
4191
4192 `GL_INVALID_ENUM' is generated if PNAME is `GL_CONVOLUTION_BORDER_MODE'
4193 and PARAMS is not one of `GL_REDUCE', `GL_CONSTANT_BORDER', or
4194 `GL_REPLICATE_BORDER'.
4195
4196 `GL_INVALID_OPERATION' is generated if `glConvolutionParameter' is
4197 executed between the execution of `glBegin' and the corresponding
4198 execution of `glEnd'.")
4199
4200 (define-gl-procedures
4201 ((glCopyColorSubTable
4202 (target GLenum)
4203 (start GLsizei)
4204 (x GLint)
4205 (y GLint)
4206 (width GLsizei)
4207 ->
4208 void))
4209 "Respecify a portion of a color table.
4210
4211 TARGET
4212 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
4213 or `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
4214
4215 START
4216 The starting index of the portion of the color table to be
4217 replaced.
4218
4219 X
4220 Y
4221
4222 The window coordinates of the left corner of the row of pixels to
4223 be copied.
4224
4225 WIDTH
4226 The number of table entries to replace.
4227
4228 `glCopyColorSubTable' is used to respecify a contiguous portion of a
4229 color table previously defined using `glColorTable'. The pixels copied
4230 from the framebuffer replace the portion of the existing table from
4231 indices START to START+X-1 , inclusive. This region may not include any
4232 entries outside the range of the color table, as was originally
4233 specified. It is not an error to specify a subtexture with width of 0,
4234 but such a specification has no effect.
4235
4236 `GL_INVALID_VALUE' is generated if TARGET is not a previously defined
4237 color table.
4238
4239 `GL_INVALID_VALUE' is generated if TARGET is not one of the allowable
4240 values.
4241
4242 `GL_INVALID_VALUE' is generated if START+X>WIDTH .
4243
4244 `GL_INVALID_OPERATION' is generated if `glCopyColorSubTable' is executed
4245 between the execution of `glBegin' and the corresponding execution of
4246 `glEnd'.")
4247
4248 (define-gl-procedures
4249 ((glCopyColorTable
4250 (target GLenum)
4251 (internalformat GLenum)
4252 (x GLint)
4253 (y GLint)
4254 (width GLsizei)
4255 ->
4256 void))
4257 "Copy pixels into a color table.
4258
4259 TARGET
4260 The color table target. Must be `GL_COLOR_TABLE',
4261 `GL_POST_CONVOLUTION_COLOR_TABLE', or
4262 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
4263
4264 INTERNALFORMAT
4265 The internal storage format of the texture image. Must be one of
4266 the following symbolic constants: `GL_ALPHA', `GL_ALPHA4',
4267 `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE',
4268 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4269 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4270 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4271 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4272 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4273 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
4274 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
4275 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
4276 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
4277
4278 X
4279 The x coordinate of the lower-left corner of the pixel rectangle to
4280 be transferred to the color table.
4281
4282 Y
4283 The y coordinate of the lower-left corner of the pixel rectangle to
4284 be transferred to the color table.
4285
4286 WIDTH
4287 The width of the pixel rectangle.
4288
4289 `glCopyColorTable' loads a color table with pixels from the current
4290 `GL_READ_BUFFER' (rather than from main memory, as is the case for
4291 `glColorTable').
4292
4293 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y)
4294 having width WIDTH and height 1 is loaded into the color table. If any
4295 pixels within this region are outside the window that is associated with
4296 the GL context, the values obtained for those pixels are undefined.
4297
4298 The pixels in the rectangle are processed just as if `glReadPixels' were
4299 called, with INTERNALFORMAT set to RGBA, but processing stops after the
4300 final conversion to RGBA.
4301
4302 The four scale parameters and the four bias parameters that are defined
4303 for the table are then used to scale and bias the R, G, B, and A
4304 components of each pixel. The scale and bias parameters are set by
4305 calling `glColorTableParameter'.
4306
4307 Next, the R, G, B, and A values are clamped to the range [0,1] . Each
4308 pixel is then converted to the internal format specified by
4309 INTERNALFORMAT. This conversion simply maps the component values of the
4310 pixel (R, G, B, and A) to the values included in the internal format
4311 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4312 follows:
4313
4314
4315
4316 *Internal Format*
4317 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4318
4319 `GL_ALPHA'
4320 , , , A , ,
4321
4322 `GL_LUMINANCE'
4323 , , , , R ,
4324
4325 `GL_LUMINANCE_ALPHA'
4326 , , , A , R ,
4327
4328 `GL_INTENSITY'
4329 , , , , , R
4330
4331 `GL_RGB'
4332 R , G , B , , ,
4333
4334 `GL_RGBA'
4335 R , G , B , A , ,
4336
4337 Finally, the red, green, blue, alpha, luminance, and/or intensity
4338 components of the resulting pixels are stored in the color table. They
4339 form a one-dimensional table with indices in the range [0,WIDTH-1] .
4340
4341
4342
4343 `GL_INVALID_ENUM' is generated when TARGET is not one of the allowable
4344 values.
4345
4346 `GL_INVALID_VALUE' is generated if WIDTH is less than zero.
4347
4348 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not one of the
4349 allowable values.
4350
4351 `GL_TABLE_TOO_LARGE' is generated if the requested color table is too
4352 large to be supported by the implementation.
4353
4354 `GL_INVALID_OPERATION' is generated if `glCopyColorTable' is executed
4355 between the execution of `glBegin' and the corresponding execution of
4356 `glEnd'.")
4357
4358 (define-gl-procedures
4359 ((glCopyConvolutionFilter1D
4360 (target GLenum)
4361 (internalformat GLenum)
4362 (x GLint)
4363 (y GLint)
4364 (width GLsizei)
4365 ->
4366 void))
4367 "Copy pixels into a one-dimensional convolution filter.
4368
4369 TARGET
4370 Must be `GL_CONVOLUTION_1D'.
4371
4372 INTERNALFORMAT
4373 The internal format of the convolution filter kernel. The
4374 allowable values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4375 `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4',
4376 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
4377 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4378 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4379 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4380 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4381 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
4382 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
4383 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
4384 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
4385
4386 X
4387 Y
4388
4389 The window space coordinates of the lower-left coordinate of the
4390 pixel array to copy.
4391
4392 WIDTH
4393 The width of the pixel array to copy.
4394
4395 `glCopyConvolutionFilter1D' defines a one-dimensional convolution filter
4396 kernel with pixels from the current `GL_READ_BUFFER' (rather than from
4397 main memory, as is the case for `glConvolutionFilter1D').
4398
4399 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y),
4400 width WIDTH and height 1 is used to define the convolution filter. If
4401 any pixels within this region are outside the window that is associated
4402 with the GL context, the values obtained for those pixels are undefined.
4403
4404 The pixels in the rectangle are processed exactly as if `glReadPixels'
4405 had been called with FORMAT set to RGBA, but the process stops just
4406 before final conversion. The R, G, B, and A components of each pixel
4407 are next scaled by the four 1D `GL_CONVOLUTION_FILTER_SCALE' parameters
4408 and biased by the four 1D `GL_CONVOLUTION_FILTER_BIAS' parameters. (The
4409 scale and bias parameters are set by `glConvolutionParameter' using the
4410 `GL_CONVOLUTION_1D' target and the names `GL_CONVOLUTION_FILTER_SCALE'
4411 and `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors
4412 of four values that are applied to red, green, blue, and alpha, in that
4413 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4414 during this process.
4415
4416 Each pixel is then converted to the internal format specified by
4417 INTERNALFORMAT. This conversion simply maps the component values of the
4418 pixel (R, G, B, and A) to the values included in the internal format
4419 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4420 follows:
4421
4422
4423
4424 *Internal Format*
4425 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4426
4427 `GL_ALPHA'
4428 , , , A , ,
4429
4430 `GL_LUMINANCE'
4431 , , , , R ,
4432
4433 `GL_LUMINANCE_ALPHA'
4434 , , , A , R ,
4435
4436 `GL_INTENSITY'
4437 , , , , , R
4438
4439 `GL_RGB'
4440 R , G , B , , ,
4441
4442 `GL_RGBA'
4443 R , G , B , A , ,
4444
4445 The red, green, blue, alpha, luminance, and/or intensity components of
4446 the resulting pixels are stored in floating-point rather than integer
4447 format.
4448
4449 Pixel ordering is such that lower x screen coordinates correspond to
4450 lower I filter image coordinates.
4451
4452 Note that after a convolution is performed, the resulting color
4453 components are also scaled by their corresponding
4454 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4455 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4456 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4457 set by `glPixelTransfer'.
4458
4459 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_1D'.
4460
4461 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4462 allowable values.
4463
4464 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4465 than the maximum supported value. This value may be queried with
4466 `glGetConvolutionParameter' using target `GL_CONVOLUTION_1D' and name
4467 `GL_MAX_CONVOLUTION_WIDTH'.
4468
4469 `GL_INVALID_OPERATION' is generated if `glCopyConvolutionFilter1D' is
4470 executed between the execution of `glBegin' and the corresponding
4471 execution of `glEnd'.")
4472
4473 (define-gl-procedures
4474 ((glCopyConvolutionFilter2D
4475 (target GLenum)
4476 (internalformat GLenum)
4477 (x GLint)
4478 (y GLint)
4479 (width GLsizei)
4480 (height GLsizei)
4481 ->
4482 void))
4483 "Copy pixels into a two-dimensional convolution filter.
4484
4485 TARGET
4486 Must be `GL_CONVOLUTION_2D'.
4487
4488 INTERNALFORMAT
4489 The internal format of the convolution filter kernel. The
4490 allowable values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4491 `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4',
4492 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
4493 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4494 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4495 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4496 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4497 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
4498 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
4499 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
4500 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
4501
4502 X
4503 Y
4504
4505 The window space coordinates of the lower-left coordinate of the
4506 pixel array to copy.
4507
4508 WIDTH
4509 The width of the pixel array to copy.
4510
4511 HEIGHT
4512 The height of the pixel array to copy.
4513
4514 `glCopyConvolutionFilter2D' defines a two-dimensional convolution filter
4515 kernel with pixels from the current `GL_READ_BUFFER' (rather than from
4516 main memory, as is the case for `glConvolutionFilter2D').
4517
4518 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y),
4519 width WIDTH and height HEIGHT is used to define the convolution filter.
4520 If any pixels within this region are outside the window that is
4521 associated with the GL context, the values obtained for those pixels are
4522 undefined.
4523
4524 The pixels in the rectangle are processed exactly as if `glReadPixels'
4525 had been called with FORMAT set to RGBA, but the process stops just
4526 before final conversion. The R, G, B, and A components of each pixel
4527 are next scaled by the four 2D `GL_CONVOLUTION_FILTER_SCALE' parameters
4528 and biased by the four 2D `GL_CONVOLUTION_FILTER_BIAS' parameters. (The
4529 scale and bias parameters are set by `glConvolutionParameter' using the
4530 `GL_CONVOLUTION_2D' target and the names `GL_CONVOLUTION_FILTER_SCALE'
4531 and `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors
4532 of four values that are applied to red, green, blue, and alpha, in that
4533 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4534 during this process.
4535
4536 Each pixel is then converted to the internal format specified by
4537 INTERNALFORMAT. This conversion simply maps the component values of the
4538 pixel (R, G, B, and A) to the values included in the internal format
4539 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4540 follows:
4541
4542
4543
4544 *Internal Format*
4545 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4546
4547 `GL_ALPHA'
4548 , , , A , ,
4549
4550 `GL_LUMINANCE'
4551 , , , , R ,
4552
4553 `GL_LUMINANCE_ALPHA'
4554 , , , A , R ,
4555
4556 `GL_INTENSITY'
4557 , , , , , R
4558
4559 `GL_RGB'
4560 R , G , B , , ,
4561
4562 `GL_RGBA'
4563 R , G , B , A , ,
4564
4565 The red, green, blue, alpha, luminance, and/or intensity components of
4566 the resulting pixels are stored in floating-point rather than integer
4567 format.
4568
4569 Pixel ordering is such that lower x screen coordinates correspond to
4570 lower I filter image coordinates, and lower y screen coordinates
4571 correspond to lower J filter image coordinates.
4572
4573 Note that after a convolution is performed, the resulting color
4574 components are also scaled by their corresponding
4575 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4576 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4577 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4578 set by `glPixelTransfer'.
4579
4580 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_2D'.
4581
4582 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4583 allowable values.
4584
4585 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4586 than the maximum supported value. This value may be queried with
4587 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4588 `GL_MAX_CONVOLUTION_WIDTH'.
4589
4590 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
4591 than the maximum supported value. This value may be queried with
4592 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4593 `GL_MAX_CONVOLUTION_HEIGHT'.
4594
4595 `GL_INVALID_OPERATION' is generated if `glCopyConvolutionFilter2D' is
4596 executed between the execution of `glBegin' and the corresponding
4597 execution of `glEnd'.")
4598
4599 (define-gl-procedures
4600 ((glCopyPixels
4601 (x GLint)
4602 (y GLint)
4603 (width GLsizei)
4604 (height GLsizei)
4605 (type GLenum)
4606 ->
4607 void))
4608 "Copy pixels in the frame buffer.
4609
4610 X
4611 Y
4612
4613 Specify the window coordinates of the lower left corner of the
4614 rectangular region of pixels to be copied.
4615
4616 WIDTH
4617 HEIGHT
4618
4619 Specify the dimensions of the rectangular region of pixels to be
4620 copied. Both must be nonnegative.
4621
4622 TYPE
4623 Specifies whether color values, depth values, or stencil values are
4624 to be copied. Symbolic constants `GL_COLOR', `GL_DEPTH', and
4625 `GL_STENCIL' are accepted.
4626
4627 `glCopyPixels' copies a screen-aligned rectangle of pixels from the
4628 specified frame buffer location to a region relative to the current
4629 raster position. Its operation is well defined only if the entire pixel
4630 source region is within the exposed portion of the window. Results of
4631 copies from outside the window, or from regions of the window that are
4632 not exposed, are hardware dependent and undefined.
4633
4634 X and Y specify the window coordinates of the lower left corner of the
4635 rectangular region to be copied. WIDTH and HEIGHT specify the
4636 dimensions of the rectangular region to be copied. Both WIDTH and
4637 HEIGHT must not be negative.
4638
4639 Several parameters control the processing of the pixel data while it is
4640 being copied. These parameters are set with three commands:
4641 `glPixelTransfer', `glPixelMap', and `glPixelZoom'. This reference page
4642 describes the effects on `glCopyPixels' of most, but not all, of the
4643 parameters specified by these three commands.
4644
4645 `glCopyPixels' copies values from each pixel with the lower left-hand
4646 corner at (X+I,Y+J) for 0<=I<WIDTH and 0<=J<HEIGHT . This pixel is said
4647 to be the I th pixel in the J th row. Pixels are copied in row order
4648 from the lowest to the highest row, left to right in each row.
4649
4650 TYPE specifies whether color, depth, or stencil data is to be copied.
4651 The details of the transfer for each data type are as follows:
4652
4653 `GL_COLOR'
4654 Indices or RGBA colors are read from the buffer currently specified
4655 as the read source buffer (see `glReadBuffer'). If the GL is in
4656 color index mode, each index that is read from this buffer is
4657 converted to a fixed-point format with an unspecified number of
4658 bits to the right of the binary point. Each index is then shifted
4659 left by `GL_INDEX_SHIFT' bits, and added to `GL_INDEX_OFFSET'. If
4660 `GL_INDEX_SHIFT' is negative, the shift is to the right. In either
4661 case, zero bits fill otherwise unspecified bit locations in the
4662 result. If `GL_MAP_COLOR' is true, the index is replaced with the
4663 value that it references in lookup table `GL_PIXEL_MAP_I_TO_I'.
4664 Whether the lookup replacement of the index is done or not, the
4665 integer part of the index is then ANDed with 2^B-1 , where B is the
4666 number of bits in a color index buffer.
4667
4668 If the GL is in RGBA mode, the red, green, blue, and alpha
4669 components of each pixel that is read are converted to an internal
4670 floating-point format with unspecified precision. The conversion
4671 maps the largest representable component value to 1.0, and
4672 component value 0 to 0.0. The resulting floating-point color
4673 values are then multiplied by `GL_c_SCALE' and added to
4674 `GL_c_BIAS', where C is RED, GREEN, BLUE, and ALPHA for the
4675 respective color components. The results are clamped to the range
4676 [0,1]. If `GL_MAP_COLOR' is true, each color component is scaled
4677 by the size of lookup table `GL_PIXEL_MAP_c_TO_c', then replaced by
4678 the value that it references in that table. C is R, G, B, or A.
4679
4680 If the `ARB_imaging' extension is supported, the color values may
4681 be additionally processed by color-table lookups, color-matrix
4682 transformations, and convolution filters.
4683
4684 The GL then converts the resulting indices or RGBA colors to
4685 fragments by attaching the current raster position Z coordinate and
4686 texture coordinates to each pixel, then assigning window
4687 coordinates (X_R+I,Y_R+J) , where (X_R,Y_R) is the current raster
4688 position, and the pixel was the I th pixel in the J th row. These
4689 pixel fragments are then treated just like the fragments generated
4690 by rasterizing points, lines, or polygons. Texture mapping, fog,
4691 and all the fragment operations are applied before the fragments
4692 are written to the frame buffer.
4693
4694 `GL_DEPTH'
4695 Depth values are read from the depth buffer and converted directly
4696 to an internal floating-point format with unspecified precision.
4697 The resulting floating-point depth value is then multiplied by
4698 `GL_DEPTH_SCALE' and added to `GL_DEPTH_BIAS'. The result is
4699 clamped to the range [0,1].
4700
4701 The GL then converts the resulting depth components to fragments by
4702 attaching the current raster position color or color index and
4703 texture coordinates to each pixel, then assigning window
4704 coordinates (X_R+I,Y_R+J) , where (X_R,Y_R) is the current raster
4705 position, and the pixel was the I th pixel in the J th row. These
4706 pixel fragments are then treated just like the fragments generated
4707 by rasterizing points, lines, or polygons. Texture mapping, fog,
4708 and all the fragment operations are applied before the fragments
4709 are written to the frame buffer.
4710
4711 `GL_STENCIL'
4712 Stencil indices are read from the stencil buffer and converted to
4713 an internal fixed-point format with an unspecified number of bits
4714 to the right of the binary point. Each fixed-point index is then
4715 shifted left by `GL_INDEX_SHIFT' bits, and added to
4716 `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is negative, the shift is
4717 to the right. In either case, zero bits fill otherwise unspecified
4718 bit locations in the result. If `GL_MAP_STENCIL' is true, the
4719 index is replaced with the value that it references in lookup table
4720 `GL_PIXEL_MAP_S_TO_S'. Whether the lookup replacement of the index
4721 is done or not, the integer part of the index is then ANDed with
4722 2^B-1 , where B is the number of bits in the stencil buffer. The
4723 resulting stencil indices are then written to the stencil buffer
4724 such that the index read from the I th location of the J th row is
4725 written to location (X_R+I,Y_R+J) , where (X_R,Y_R) is the current
4726 raster position. Only the pixel ownership test, the scissor test,
4727 and the stencil writemask affect these write operations.
4728
4729 The rasterization described thus far assumes pixel zoom factors of 1.0.
4730 If `glPixelZoom' is used to change the X and Y pixel zoom factors,
4731 pixels are converted to fragments as follows. If (X_R,Y_R) is the
4732 current raster position, and a given pixel is in the I th location in
4733 the J th row of the source pixel rectangle, then fragments are generated
4734 for pixels whose centers are in the rectangle with corners at
4735
4736 (X_R+ZOOM_X,\u2062I,Y_R+ZOOM_Y,\u2062J)
4737
4738 and
4739
4740 (X_R+ZOOM_X,\u2061(I+1,),Y_R+ZOOM_Y,\u2061(J+1,))
4741
4742 where ZOOM_X is the value of `GL_ZOOM_X' and ZOOM_Y is the value of
4743 `GL_ZOOM_Y'.
4744
4745 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
4746
4747 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
4748
4749 `GL_INVALID_OPERATION' is generated if TYPE is `GL_DEPTH' and there is
4750 no depth buffer.
4751
4752 `GL_INVALID_OPERATION' is generated if TYPE is `GL_STENCIL' and there is
4753 no stencil buffer.
4754
4755 `GL_INVALID_OPERATION' is generated if `glCopyPixels' is executed
4756 between the execution of `glBegin' and the corresponding execution of
4757 `glEnd'.")
4758
4759 (define-gl-procedures
4760 ((glCopyTexImage1D
4761 (target GLenum)
4762 (level GLint)
4763 (internalformat GLenum)
4764 (x GLint)
4765 (y GLint)
4766 (width GLsizei)
4767 (border GLint)
4768 ->
4769 void))
4770 "Copy pixels into a 1D texture image.
4771
4772 TARGET
4773 Specifies the target texture. Must be `GL_TEXTURE_1D'.
4774
4775 LEVEL
4776 Specifies the level-of-detail number. Level 0 is the base image
4777 level. Level N is the Nth mipmap reduction image.
4778
4779 INTERNALFORMAT
4780 Specifies the internal format of the texture. Must be one of the
4781 following symbolic constants: `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4782 `GL_ALPHA12', `GL_ALPHA16', `GL_COMPRESSED_ALPHA',
4783 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
4784 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB',
4785 `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
4786 `GL_DEPTH_COMPONENT24', `GL_DEPTH_COMPONENT32', `GL_LUMINANCE',
4787 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4788 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4789 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4790 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4791 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4792 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_RGB',
4793 `GL_R3_G3_B2', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10',
4794 `GL_RGB12', `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4',
4795 `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
4796 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
4797 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
4798 `GL_SRGB8_ALPHA8'.
4799
4800 X
4801 Y
4802
4803 Specify the window coordinates of the left corner of the row of
4804 pixels to be copied.
4805
4806 WIDTH
4807 Specifies the width of the texture image. Must be 0 or
4808 2^N+2\u2061(BORDER,) for some integer N . The height of the texture
4809 image is 1.
4810
4811 BORDER
4812 Specifies the width of the border. Must be either 0 or 1.
4813
4814 `glCopyTexImage1D' defines a one-dimensional texture image with pixels
4815 from the current `GL_READ_BUFFER'.
4816
4817 The screen-aligned pixel row with left corner at (X,Y) and with a length
4818 of WIDTH+2\u2061(BORDER,) defines the texture array at the mipmap level
4819 specified by LEVEL. INTERNALFORMAT specifies the internal format of the
4820 texture array.
4821
4822 The pixels in the row are processed exactly as if `glCopyPixels' had
4823 been called, but the process stops just before final conversion. At
4824 this point all pixel component values are clamped to the range [0,1] and
4825 then converted to the texture's internal format for storage in the texel
4826 array.
4827
4828 Pixel ordering is such that lower X screen coordinates correspond to
4829 lower texture coordinates.
4830
4831 If any of the pixels within the specified row of the current
4832 `GL_READ_BUFFER' are outside the window associated with the current
4833 rendering context, then the values obtained for those pixels are
4834 undefined.
4835
4836 `glCopyTexImage1D' defines a one-dimensional texture image with pixels
4837 from the current `GL_READ_BUFFER'.
4838
4839 When INTERNALFORMAT is one of the sRGB types, the GL does not
4840 automatically convert the source pixels to the sRGB color space. In
4841 this case, the `glPixelMap' function can be used to accomplish the
4842 conversion.
4843
4844 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
4845 values.
4846
4847 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4848
4849 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2\u2062MAX ,
4850 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
4851
4852 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not an allowable
4853 value.
4854
4855 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
4856 2 + `GL_MAX_TEXTURE_SIZE'.
4857
4858 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
4859 supported and the WIDTH cannot be represented as 2^N+2\u2061(BORDER,) for
4860 some integer value of N.
4861
4862 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
4863
4864 `GL_INVALID_OPERATION' is generated if `glCopyTexImage1D' is executed
4865 between the execution of `glBegin' and the corresponding execution of
4866 `glEnd'.
4867
4868 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
4869 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
4870 `GL_DEPTH_COMPONENT32' and there is no depth buffer.")
4871
4872 (define-gl-procedures
4873 ((glCopyTexImage2D
4874 (target GLenum)
4875 (level GLint)
4876 (internalformat GLenum)
4877 (x GLint)
4878 (y GLint)
4879 (width GLsizei)
4880 (height GLsizei)
4881 (border GLint)
4882 ->
4883 void))
4884 "Copy pixels into a 2D texture image.
4885
4886 TARGET
4887 Specifies the target texture. Must be `GL_TEXTURE_2D',
4888 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4889 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4890 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
4891 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4892
4893 LEVEL
4894 Specifies the level-of-detail number. Level 0 is the base image
4895 level. Level N is the Nth mipmap reduction image.
4896
4897 INTERNALFORMAT
4898 Specifies the internal format of the texture. Must be one of the
4899 following symbolic constants: `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4900 `GL_ALPHA12', `GL_ALPHA16', `GL_COMPRESSED_ALPHA',
4901 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
4902 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB',
4903 `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
4904 `GL_DEPTH_COMPONENT24', `GL_DEPTH_COMPONENT32', `GL_LUMINANCE',
4905 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4906 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4907 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4908 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4909 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4910 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_RGB',
4911 `GL_R3_G3_B2', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10',
4912 `GL_RGB12', `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4',
4913 `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
4914 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
4915 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
4916 `GL_SRGB8_ALPHA8'.
4917
4918 X
4919 Y
4920
4921 Specify the window coordinates of the lower left corner of the
4922 rectangular region of pixels to be copied.
4923
4924 WIDTH
4925 Specifies the width of the texture image. Must be 0 or
4926 2^N+2\u2061(BORDER,) for some integer N .
4927
4928 HEIGHT
4929 Specifies the height of the texture image. Must be 0 or
4930 2^M+2\u2061(BORDER,) for some integer M .
4931
4932 BORDER
4933 Specifies the width of the border. Must be either 0 or 1.
4934
4935 `glCopyTexImage2D' defines a two-dimensional texture image, or cube-map
4936 texture image with pixels from the current `GL_READ_BUFFER'.
4937
4938 The screen-aligned pixel rectangle with lower left corner at (X, Y) and
4939 with a width of WIDTH+2\u2061(BORDER,) and a height of HEIGHT+2\u2061(BORDER,)
4940 defines the texture array at the mipmap level specified by LEVEL.
4941 INTERNALFORMAT specifies the internal format of the texture array.
4942
4943 The pixels in the rectangle are processed exactly as if `glCopyPixels'
4944 had been called, but the process stops just before final conversion. At
4945 this point all pixel component values are clamped to the range [0,1] and
4946 then converted to the texture's internal format for storage in the texel
4947 array.
4948
4949 Pixel ordering is such that lower X and Y screen coordinates correspond
4950 to lower S and T texture coordinates.
4951
4952 If any of the pixels within the specified rectangle of the current
4953 `GL_READ_BUFFER' are outside the window associated with the current
4954 rendering context, then the values obtained for those pixels are
4955 undefined.
4956
4957 When INTERNALFORMAT is one of the sRGB types, the GL does not
4958 automatically convert the source pixels to the sRGB color space. In
4959 this case, the `glPixelMap' function can be used to accomplish the
4960 conversion.
4961
4962 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
4963 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4964 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4965 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4966
4967 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4968
4969 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2\u2062MAX ,
4970 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
4971
4972 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
4973 2 + `GL_MAX_TEXTURE_SIZE'.
4974
4975 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
4976 supported and the WIDTH or DEPTH cannot be represented as
4977 2^K+2\u2061(BORDER,) for some integer K .
4978
4979 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
4980
4981 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not an accepted
4982 format.
4983
4984 `GL_INVALID_OPERATION' is generated if `glCopyTexImage2D' is executed
4985 between the execution of `glBegin' and the corresponding execution of
4986 `glEnd'.
4987
4988 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
4989 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
4990 `GL_DEPTH_COMPONENT32' and there is no depth buffer.")
4991
4992 (define-gl-procedures
4993 ((glCopyTexSubImage1D
4994 (target GLenum)
4995 (level GLint)
4996 (xoffset GLint)
4997 (x GLint)
4998 (y GLint)
4999 (width GLsizei)
5000 ->
5001 void))
5002 "Copy a one-dimensional texture subimage.
5003
5004 TARGET
5005 Specifies the target texture. Must be `GL_TEXTURE_1D'.
5006
5007 LEVEL
5008 Specifies the level-of-detail number. Level 0 is the base image
5009 level. Level N is the Nth mipmap reduction image.
5010
5011 XOFFSET
5012 Specifies the texel offset within the texture array.
5013
5014 X
5015 Y
5016
5017 Specify the window coordinates of the left corner of the row of
5018 pixels to be copied.
5019
5020 WIDTH
5021 Specifies the width of the texture subimage.
5022
5023 `glCopyTexSubImage1D' replaces a portion of a one-dimensional texture
5024 image with pixels from the current `GL_READ_BUFFER' (rather than from
5025 main memory, as is the case for `glTexSubImage1D').
5026
5027 The screen-aligned pixel row with left corner at (X,\\ Y), and with
5028 length WIDTH replaces the portion of the texture array with x indices
5029 XOFFSET through XOFFSET+WIDTH-1 , inclusive. The destination in the
5030 texture array may not include any texels outside the texture array as it
5031 was originally specified.
5032
5033 The pixels in the row are processed exactly as if `glCopyPixels' had
5034 been called, but the process stops just before final conversion. At
5035 this point, all pixel component values are clamped to the range [0,1]
5036 and then converted to the texture's internal format for storage in the
5037 texel array.
5038
5039 It is not an error to specify a subtexture with zero width, but such a
5040 specification has no effect. If any of the pixels within the specified
5041 row of the current `GL_READ_BUFFER' are outside the read window
5042 associated with the current rendering context, then the values obtained
5043 for those pixels are undefined.
5044
5045 No change is made to the INTERNALFORMAT, WIDTH, or BORDER parameters of
5046 the specified texture array or to texel values outside the specified
5047 subregion.
5048
5049 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_1D'.
5050
5051 `GL_INVALID_OPERATION' is generated if the texture array has not been
5052 defined by a previous `glTexImage1D' or `glCopyTexImage1D' operation.
5053
5054 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
5055
5056 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
5057 the returned value of `GL_MAX_TEXTURE_SIZE'.
5058
5059 `GL_INVALID_VALUE' is generated if XOFFSET<-B , or
5060 (XOFFSET+WIDTH,)>(W-B,) , where W is the `GL_TEXTURE_WIDTH' and B is the
5061 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W
5062 includes twice the border width.")
5063
5064 (define-gl-procedures
5065 ((glCopyTexSubImage2D
5066 (target GLenum)
5067 (level GLint)
5068 (xoffset GLint)
5069 (yoffset GLint)
5070 (x GLint)
5071 (y GLint)
5072 (width GLsizei)
5073 (height GLsizei)
5074 ->
5075 void))
5076 "Copy a two-dimensional texture subimage.
5077
5078 TARGET
5079 Specifies the target texture. Must be `GL_TEXTURE_2D',
5080 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
5081 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
5082 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
5083 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
5084
5085 LEVEL
5086 Specifies the level-of-detail number. Level 0 is the base image
5087 level. Level N is the Nth mipmap reduction image.
5088
5089 XOFFSET
5090 Specifies a texel offset in the x direction within the texture
5091 array.
5092
5093 YOFFSET
5094 Specifies a texel offset in the y direction within the texture
5095 array.
5096
5097 X
5098 Y
5099
5100 Specify the window coordinates of the lower left corner of the
5101 rectangular region of pixels to be copied.
5102
5103 WIDTH
5104 Specifies the width of the texture subimage.
5105
5106 HEIGHT
5107 Specifies the height of the texture subimage.
5108
5109 `glCopyTexSubImage2D' replaces a rectangular portion of a
5110 two-dimensional texture image or cube-map texture image with pixels from
5111 the current `GL_READ_BUFFER' (rather than from main memory, as is the
5112 case for `glTexSubImage2D').
5113
5114 The screen-aligned pixel rectangle with lower left corner at (X,Y) and
5115 with width WIDTH and height HEIGHT replaces the portion of the texture
5116 array with x indices XOFFSET through XOFFSET+WIDTH-1 , inclusive, and y
5117 indices YOFFSET through YOFFSET+HEIGHT-1 , inclusive, at the mipmap
5118 level specified by LEVEL.
5119
5120 The pixels in the rectangle are processed exactly as if `glCopyPixels'
5121 had been called, but the process stops just before final conversion. At
5122 this point, all pixel component values are clamped to the range [0,1]
5123 and then converted to the texture's internal format for storage in the
5124 texel array.
5125
5126 The destination rectangle in the texture array may not include any
5127 texels outside the texture array as it was originally specified. It is
5128 not an error to specify a subtexture with zero width or height, but such
5129 a specification has no effect.
5130
5131 If any of the pixels within the specified rectangle of the current
5132 `GL_READ_BUFFER' are outside the read window associated with the current
5133 rendering context, then the values obtained for those pixels are
5134 undefined.
5135
5136 No change is made to the INTERNALFORMAT, WIDTH, HEIGHT, or BORDER
5137 parameters of the specified texture array or to texel values outside the
5138 specified subregion.
5139
5140 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
5141 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
5142 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
5143 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
5144
5145 `GL_INVALID_OPERATION' is generated if the texture array has not been
5146 defined by a previous `glTexImage2D' or `glCopyTexImage2D' operation.
5147
5148 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
5149
5150 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
5151 the returned value of `GL_MAX_TEXTURE_SIZE'.
5152
5153 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
5154 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , where W is the
5155 `GL_TEXTURE_WIDTH', H is the `GL_TEXTURE_HEIGHT', and B is the
5156 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W
5157 and H include twice the border width.
5158
5159 `GL_INVALID_OPERATION' is generated if `glCopyTexSubImage2D' is executed
5160 between the execution of `glBegin' and the corresponding execution of
5161 `glEnd'.")
5162
5163 (define-gl-procedures
5164 ((glCopyTexSubImage3D
5165 (target GLenum)
5166 (level GLint)
5167 (xoffset GLint)
5168 (yoffset GLint)
5169 (zoffset GLint)
5170 (x GLint)
5171 (y GLint)
5172 (width GLsizei)
5173 (height GLsizei)
5174 ->
5175 void))
5176 "Copy a three-dimensional texture subimage.
5177
5178 TARGET
5179 Specifies the target texture. Must be `GL_TEXTURE_3D'
5180
5181 LEVEL
5182 Specifies the level-of-detail number. Level 0 is the base image
5183 level. Level N is the Nth mipmap reduction image.
5184
5185 XOFFSET
5186 Specifies a texel offset in the x direction within the texture
5187 array.
5188
5189 YOFFSET
5190 Specifies a texel offset in the y direction within the texture
5191 array.
5192
5193 ZOFFSET
5194 Specifies a texel offset in the z direction within the texture
5195 array.
5196
5197 X
5198 Y
5199
5200 Specify the window coordinates of the lower left corner of the
5201 rectangular region of pixels to be copied.
5202
5203 WIDTH
5204 Specifies the width of the texture subimage.
5205
5206 HEIGHT
5207 Specifies the height of the texture subimage.
5208
5209 `glCopyTexSubImage3D' replaces a rectangular portion of a
5210 three-dimensional texture image with pixels from the current
5211 `GL_READ_BUFFER' (rather than from main memory, as is the case for
5212 `glTexSubImage3D').
5213
5214 The screen-aligned pixel rectangle with lower left corner at (X,\\ Y) and
5215 with width WIDTH and height HEIGHT replaces the portion of the texture
5216 array with x indices XOFFSET through XOFFSET+WIDTH-1 , inclusive, and y
5217 indices YOFFSET through YOFFSET+HEIGHT-1 , inclusive, at z index ZOFFSET
5218 and at the mipmap level specified by LEVEL.
5219
5220 The pixels in the rectangle are processed exactly as if `glCopyPixels'
5221 had been called, but the process stops just before final conversion. At
5222 this point, all pixel component values are clamped to the range [0,1]
5223 and then converted to the texture's internal format for storage in the
5224 texel array.
5225
5226 The destination rectangle in the texture array may not include any
5227 texels outside the texture array as it was originally specified. It is
5228 not an error to specify a subtexture with zero width or height, but such
5229 a specification has no effect.
5230
5231 If any of the pixels within the specified rectangle of the current
5232 `GL_READ_BUFFER' are outside the read window associated with the current
5233 rendering context, then the values obtained for those pixels are
5234 undefined.
5235
5236 No change is made to the INTERNALFORMAT, WIDTH, HEIGHT, DEPTH, or BORDER
5237 parameters of the specified texture array or to texel values outside the
5238 specified subregion.
5239
5240 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_3D'.
5241
5242 `GL_INVALID_OPERATION' is generated if the texture array has not been
5243 defined by a previous `glTexImage3D' operation.
5244
5245 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
5246
5247 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
5248 the returned value of `GL_MAX_3D_TEXTURE_SIZE'.
5249
5250 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
5251 , YOFFSET<-B , (YOFFSET+HEIGHT,)>(H-B,) , ZOFFSET<-B , or
5252 (ZOFFSET+1,)>(D-B,) , where W is the `GL_TEXTURE_WIDTH', H is the
5253 `GL_TEXTURE_HEIGHT', D is the `GL_TEXTURE_DEPTH', and B is the
5254 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W ,
5255 H , and D include twice the border width.
5256
5257 `GL_INVALID_OPERATION' is generated if `glCopyTexSubImage3D' is executed
5258 between the execution of `glBegin' and the corresponding execution of
5259 `glEnd'.")
5260
5261 (define-gl-procedures
5262 ((glCreateProgram -> GLuint))
5263 "Creates a program object.
5264
5265 `glCreateProgram' creates an empty program object and returns a non-zero
5266 value by which it can be referenced. A program object is an object to
5267 which shader objects can be attached. This provides a mechanism to
5268 specify the shader objects that will be linked to create a program. It
5269 also provides a means for checking the compatibility of the shaders that
5270 will be used to create a program (for instance, checking the
5271 compatibility between a vertex shader and a fragment shader). When no
5272 longer needed as part of a program object, shader objects can be
5273 detached.
5274
5275 One or more executables are created in a program object by successfully
5276 attaching shader objects to it with `glAttachShader', successfully
5277 compiling the shader objects with `glCompileShader', and successfully
5278 linking the program object with `glLinkProgram'. These executables are
5279 made part of current state when `glUseProgram' is called. Program
5280 objects can be deleted by calling `glDeleteProgram'. The memory
5281 associated with the program object will be deleted when it is no longer
5282 part of current rendering state for any context.
5283
5284 This function returns 0 if an error occurs creating the program object.
5285
5286 `GL_INVALID_OPERATION' is generated if `glCreateProgram' is executed
5287 between the execution of `glBegin' and the corresponding execution of
5288 `glEnd'.")
5289
5290 (define-gl-procedures
5291 ((glCreateShader (shaderType GLenum) -> GLuint))
5292 "Creates a shader object.
5293
5294 SHADERTYPE
5295 Specifies the type of shader to be created. Must be either
5296 `GL_VERTEX_SHADER' or `GL_FRAGMENT_SHADER'.
5297
5298 `glCreateShader' creates an empty shader object and returns a non-zero
5299 value by which it can be referenced. A shader object is used to
5300 maintain the source code strings that define a shader. SHADERTYPE
5301 indicates the type of shader to be created. Two types of shaders are
5302 supported. A shader of type `GL_VERTEX_SHADER' is a shader that is
5303 intended to run on the programmable vertex processor and replace the
5304 fixed functionality vertex processing in OpenGL. A shader of type
5305 `GL_FRAGMENT_SHADER' is a shader that is intended to run on the
5306 programmable fragment processor and replace the fixed functionality
5307 fragment processing in OpenGL.
5308
5309 When created, a shader object's `GL_SHADER_TYPE' parameter is set to
5310 either `GL_VERTEX_SHADER' or `GL_FRAGMENT_SHADER', depending on the
5311 value of SHADERTYPE.
5312
5313 This function returns 0 if an error occurs creating the shader object.
5314
5315 `GL_INVALID_ENUM' is generated if SHADERTYPE is not an accepted value.
5316
5317 `GL_INVALID_OPERATION' is generated if `glCreateShader' is executed
5318 between the execution of `glBegin' and the corresponding execution of
5319 `glEnd'.")
5320
5321 (define-gl-procedures
5322 ((glCullFace (mode GLenum) -> void))
5323 "Specify whether front- or back-facing facets can be culled.
5324
5325 MODE
5326 Specifies whether front- or back-facing facets are candidates for
5327 culling. Symbolic constants `GL_FRONT', `GL_BACK', and
5328 `GL_FRONT_AND_BACK' are accepted. The initial value is `GL_BACK'.
5329
5330 `glCullFace' specifies whether front- or back-facing facets are culled
5331 (as specified by MODE) when facet culling is enabled. Facet culling is
5332 initially disabled. To enable and disable facet culling, call the
5333 `glEnable' and `glDisable' commands with the argument `GL_CULL_FACE'.
5334 Facets include triangles, quadrilaterals, polygons, and rectangles.
5335
5336 `glFrontFace' specifies which of the clockwise and counterclockwise
5337 facets are front-facing and back-facing. See `glFrontFace'.
5338
5339 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5340
5341 `GL_INVALID_OPERATION' is generated if `glCullFace' is executed between
5342 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5343
5344 (define-gl-procedures
5345 ((glDeleteBuffers
5346 (n GLsizei)
5347 (buffers const-GLuint-*)
5348 ->
5349 void))
5350 "Delete named buffer objects.
5351
5352 N
5353 Specifies the number of buffer objects to be deleted.
5354
5355 BUFFERS
5356 Specifies an array of buffer objects to be deleted.
5357
5358 `glDeleteBuffers' deletes N buffer objects named by the elements of the
5359 array BUFFERS. After a buffer object is deleted, it has no contents,
5360 and its name is free for reuse (for example by `glGenBuffers'). If a
5361 buffer object that is currently bound is deleted, the binding reverts to
5362 0 (the absence of any buffer object, which reverts to client memory
5363 usage).
5364
5365 `glDeleteBuffers' silently ignores 0's and names that do not correspond
5366 to existing buffer objects.
5367
5368 `GL_INVALID_VALUE' is generated if N is negative.
5369
5370 `GL_INVALID_OPERATION' is generated if `glDeleteBuffers' is executed
5371 between the execution of `glBegin' and the corresponding execution of
5372 `glEnd'.")
5373
5374 (define-gl-procedures
5375 ((glDeleteLists
5376 (list GLuint)
5377 (range GLsizei)
5378 ->
5379 void))
5380 "Delete a contiguous group of display lists.
5381
5382 LIST
5383 Specifies the integer name of the first display list to delete.
5384
5385 RANGE
5386 Specifies the number of display lists to delete.
5387
5388 `glDeleteLists' causes a contiguous group of display lists to be
5389 deleted. LIST is the name of the first display list to be deleted, and
5390 RANGE is the number of display lists to delete. All display lists D
5391 with LIST<=D<=LIST+RANGE-1 are deleted.
5392
5393 All storage locations allocated to the specified display lists are
5394 freed, and the names are available for reuse at a later time. Names
5395 within the range that do not have an associated display list are
5396 ignored. If RANGE is 0, nothing happens.
5397
5398 `GL_INVALID_VALUE' is generated if RANGE is negative.
5399
5400 `GL_INVALID_OPERATION' is generated if `glDeleteLists' is executed
5401 between the execution of `glBegin' and the corresponding execution of
5402 `glEnd'.")
5403
5404 (define-gl-procedures
5405 ((glDeleteProgram (program GLuint) -> void))
5406 "Deletes a program object.
5407
5408 PROGRAM
5409 Specifies the program object to be deleted.
5410
5411 `glDeleteProgram' frees the memory and invalidates the name associated
5412 with the program object specified by PROGRAM. This command effectively
5413 undoes the effects of a call to `glCreateProgram'.
5414
5415 If a program object is in use as part of current rendering state, it
5416 will be flagged for deletion, but it will not be deleted until it is no
5417 longer part of current state for any rendering context. If a program
5418 object to be deleted has shader objects attached to it, those shader
5419 objects will be automatically detached but not deleted unless they have
5420 already been flagged for deletion by a previous call to
5421 `glDeleteShader'. A value of 0 for PROGRAM will be silently ignored.
5422
5423 To determine whether a program object has been flagged for deletion,
5424 call `glGetProgram' with arguments PROGRAM and `GL_DELETE_STATUS'.
5425
5426 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
5427 OpenGL.
5428
5429 `GL_INVALID_OPERATION' is generated if `glDeleteProgram' is executed
5430 between the execution of `glBegin' and the corresponding execution of
5431 `glEnd'.")
5432
5433 (define-gl-procedures
5434 ((glDeleteQueries
5435 (n GLsizei)
5436 (ids const-GLuint-*)
5437 ->
5438 void))
5439 "Delete named query objects.
5440
5441 N
5442 Specifies the number of query objects to be deleted.
5443
5444 IDS
5445 Specifies an array of query objects to be deleted.
5446
5447 `glDeleteQueries' deletes N query objects named by the elements of the
5448 array IDS. After a query object is deleted, it has no contents, and its
5449 name is free for reuse (for example by `glGenQueries').
5450
5451 `glDeleteQueries' silently ignores 0's and names that do not correspond
5452 to existing query objects.
5453
5454 `GL_INVALID_VALUE' is generated if N is negative.
5455
5456 `GL_INVALID_OPERATION' is generated if `glDeleteQueries' is executed
5457 between the execution of `glBegin' and the corresponding execution of
5458 `glEnd'.")
5459
5460 (define-gl-procedures
5461 ((glDeleteShader (shader GLuint) -> void))
5462 "Deletes a shader object.
5463
5464 SHADER
5465 Specifies the shader object to be deleted.
5466
5467 `glDeleteShader' frees the memory and invalidates the name associated
5468 with the shader object specified by SHADER. This command effectively
5469 undoes the effects of a call to `glCreateShader'.
5470
5471 If a shader object to be deleted is attached to a program object, it
5472 will be flagged for deletion, but it will not be deleted until it is no
5473 longer attached to any program object, for any rendering context (i.e.,
5474 it must be detached from wherever it was attached before it will be
5475 deleted). A value of 0 for SHADER will be silently ignored.
5476
5477 To determine whether an object has been flagged for deletion, call
5478 `glGetShader' with arguments SHADER and `GL_DELETE_STATUS'.
5479
5480 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
5481 OpenGL.
5482
5483 `GL_INVALID_OPERATION' is generated if `glDeleteShader' is executed
5484 between the execution of `glBegin' and the corresponding execution of
5485 `glEnd'.")
5486
5487 (define-gl-procedures
5488 ((glDeleteTextures
5489 (n GLsizei)
5490 (textures const-GLuint-*)
5491 ->
5492 void))
5493 "Delete named textures.
5494
5495 N
5496 Specifies the number of textures to be deleted.
5497
5498 TEXTURES
5499 Specifies an array of textures to be deleted.
5500
5501 `glDeleteTextures' deletes N textures named by the elements of the array
5502 TEXTURES. After a texture is deleted, it has no contents or
5503 dimensionality, and its name is free for reuse (for example by
5504 `glGenTextures'). If a texture that is currently bound is deleted, the
5505 binding reverts to 0 (the default texture).
5506
5507 `glDeleteTextures' silently ignores 0's and names that do not correspond
5508 to existing textures.
5509
5510 `GL_INVALID_VALUE' is generated if N is negative.
5511
5512 `GL_INVALID_OPERATION' is generated if `glDeleteTextures' is executed
5513 between the execution of `glBegin' and the corresponding execution of
5514 `glEnd'.")
5515
5516 (define-gl-procedures
5517 ((glDepthFunc (func GLenum) -> void))
5518 "Specify the value used for depth buffer comparisons.
5519
5520 FUNC
5521 Specifies the depth comparison function. Symbolic constants
5522 `GL_NEVER', `GL_LESS', `GL_EQUAL', `GL_LEQUAL', `GL_GREATER',
5523 `GL_NOTEQUAL', `GL_GEQUAL', and `GL_ALWAYS' are accepted. The
5524 initial value is `GL_LESS'.
5525
5526 `glDepthFunc' specifies the function used to compare each incoming pixel
5527 depth value with the depth value present in the depth buffer. The
5528 comparison is performed only if depth testing is enabled. (See
5529 `glEnable' and `glDisable' of `GL_DEPTH_TEST'.)
5530
5531 FUNC specifies the conditions under which the pixel will be drawn. The
5532 comparison functions are as follows:
5533
5534 `GL_NEVER'
5535 Never passes.
5536
5537 `GL_LESS'
5538 Passes if the incoming depth value is less than the stored depth
5539 value.
5540
5541 `GL_EQUAL'
5542 Passes if the incoming depth value is equal to the stored depth
5543 value.
5544
5545 `GL_LEQUAL'
5546 Passes if the incoming depth value is less than or equal to the
5547 stored depth value.
5548
5549 `GL_GREATER'
5550 Passes if the incoming depth value is greater than the stored depth
5551 value.
5552
5553 `GL_NOTEQUAL'
5554 Passes if the incoming depth value is not equal to the stored depth
5555 value.
5556
5557 `GL_GEQUAL'
5558 Passes if the incoming depth value is greater than or equal to the
5559 stored depth value.
5560
5561 `GL_ALWAYS'
5562 Always passes.
5563
5564 The initial value of FUNC is `GL_LESS'. Initially, depth testing is
5565 disabled. If depth testing is disabled or if no depth buffer exists, it
5566 is as if the depth test always passes.
5567
5568 `GL_INVALID_ENUM' is generated if FUNC is not an accepted value.
5569
5570 `GL_INVALID_OPERATION' is generated if `glDepthFunc' is executed between
5571 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5572
5573 (define-gl-procedures
5574 ((glDepthMask (flag GLboolean) -> void))
5575 "Enable or disable writing into the depth buffer.
5576
5577 FLAG
5578 Specifies whether the depth buffer is enabled for writing. If FLAG
5579 is `GL_FALSE', depth buffer writing is disabled. Otherwise, it is
5580 enabled. Initially, depth buffer writing is enabled.
5581
5582 `glDepthMask' specifies whether the depth buffer is enabled for writing.
5583 If FLAG is `GL_FALSE', depth buffer writing is disabled. Otherwise, it
5584 is enabled. Initially, depth buffer writing is enabled.
5585
5586 `GL_INVALID_OPERATION' is generated if `glDepthMask' is executed between
5587 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5588
5589 (define-gl-procedures
5590 ((glDepthRange
5591 (nearVal GLclampd)
5592 (farVal GLclampd)
5593 ->
5594 void))
5595 "Specify mapping of depth values from normalized device coordinates to
5596 window coordinates.
5597
5598 NEARVAL
5599 Specifies the mapping of the near clipping plane to window
5600 coordinates. The initial value is 0.
5601
5602 FARVAL
5603 Specifies the mapping of the far clipping plane to window
5604 coordinates. The initial value is 1.
5605
5606 After clipping and division by W, depth coordinates range from -1 to 1,
5607 corresponding to the near and far clipping planes. `glDepthRange'
5608 specifies a linear mapping of the normalized depth coordinates in this
5609 range to window depth coordinates. Regardless of the actual depth
5610 buffer implementation, window coordinate depth values are treated as
5611 though they range from 0 through 1 (like color components). Thus, the
5612 values accepted by `glDepthRange' are both clamped to this range before
5613 they are accepted.
5614
5615 The setting of (0,1) maps the near plane to 0 and the far plane to 1.
5616 With this mapping, the depth buffer range is fully utilized.
5617
5618 `GL_INVALID_OPERATION' is generated if `glDepthRange' is executed
5619 between the execution of `glBegin' and the corresponding execution of
5620 `glEnd'.")
5621
5622 (define-gl-procedures
5623 ((glDetachShader
5624 (program GLuint)
5625 (shader GLuint)
5626 ->
5627 void))
5628 "Detaches a shader object from a program object to which it is attached.
5629
5630 PROGRAM
5631 Specifies the program object from which to detach the shader
5632 object.
5633
5634 SHADER
5635 Specifies the shader object to be detached.
5636
5637 `glDetachShader' detaches the shader object specified by SHADER from the
5638 program object specified by PROGRAM. This command can be used to undo
5639 the effect of the command `glAttachShader'.
5640
5641 If SHADER has already been flagged for deletion by a call to
5642 `glDeleteShader' and it is not attached to any other program object, it
5643 will be deleted after it has been detached.
5644
5645 `GL_INVALID_VALUE' is generated if either PROGRAM or SHADER is a value
5646 that was not generated by OpenGL.
5647
5648 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
5649
5650 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
5651
5652 `GL_INVALID_OPERATION' is generated if SHADER is not attached to
5653 PROGRAM.
5654
5655 `GL_INVALID_OPERATION' is generated if `glDetachShader' is executed
5656 between the execution of `glBegin' and the corresponding execution of
5657 `glEnd'.")
5658
5659 (define-gl-procedures
5660 ((glDrawArrays
5661 (mode GLenum)
5662 (first GLint)
5663 (count GLsizei)
5664 ->
5665 void))
5666 "Render primitives from array data.
5667
5668 MODE
5669 Specifies what kind of primitives to render. Symbolic constants
5670 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
5671 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
5672 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
5673
5674 FIRST
5675 Specifies the starting index in the enabled arrays.
5676
5677 COUNT
5678 Specifies the number of indices to be rendered.
5679
5680 `glDrawArrays' specifies multiple geometric primitives with very few
5681 subroutine calls. Instead of calling a GL procedure to pass each
5682 individual vertex, normal, texture coordinate, edge flag, or color, you
5683 can prespecify separate arrays of vertices, normals, and colors and use
5684 them to construct a sequence of primitives with a single call to
5685 `glDrawArrays'.
5686
5687 When `glDrawArrays' is called, it uses COUNT sequential elements from
5688 each enabled array to construct a sequence of geometric primitives,
5689 beginning with element FIRST. MODE specifies what kind of primitives
5690 are constructed and how the array elements construct those primitives.
5691 If `GL_VERTEX_ARRAY' is not enabled, no geometric primitives are
5692 generated.
5693
5694 Vertex attributes that are modified by `glDrawArrays' have an
5695 unspecified value after `glDrawArrays' returns. For example, if
5696 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
5697 after `glDrawArrays' executes. Attributes that aren't modified remain
5698 well defined.
5699
5700 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5701
5702 `GL_INVALID_VALUE' is generated if COUNT is negative.
5703
5704 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5705 bound to an enabled array and the buffer object's data store is
5706 currently mapped.
5707
5708 `GL_INVALID_OPERATION' is generated if `glDrawArrays' is executed
5709 between the execution of `glBegin' and the corresponding `glEnd'.")
5710
5711 (define-gl-procedures
5712 ((glDrawBuffers
5713 (n GLsizei)
5714 (bufs const-GLenum-*)
5715 ->
5716 void))
5717 "Specifies a list of color buffers to be drawn into.
5718
5719 N
5720 Specifies the number of buffers in BUFS.
5721
5722 BUFS
5723 Points to an array of symbolic constants specifying the buffers
5724 into which fragment colors or data values will be written.
5725
5726 `glDrawBuffers' defines an array of buffers into which fragment color
5727 values or fragment data will be written. If no fragment shader is
5728 active, rendering operations will generate only one fragment color per
5729 fragment and it will be written into each of the buffers specified by
5730 BUFS. If a fragment shader is active and it writes a value to the
5731 output variable `gl_FragColor', then that value will be written into
5732 each of the buffers specified by BUFS. If a fragment shader is active
5733 and it writes a value to one or more elements of the output array
5734 variable `gl_FragData[]', then the value of `gl_FragData[0] ' will be
5735 written into the first buffer specified by BUFS, the value of
5736 `gl_FragData[1] ' will be written into the second buffer specified by
5737 BUFS, and so on up to `gl_FragData[n-1]'. The draw buffer used for
5738 `gl_FragData[n]' and beyond is implicitly set to be `GL_NONE'.
5739
5740 The symbolic constants contained in BUFS may be any of the following:
5741
5742 `GL_NONE'
5743 The fragment color/data value is not written into any color buffer.
5744
5745 `GL_FRONT_LEFT'
5746 The fragment color/data value is written into the front left color
5747 buffer.
5748
5749 `GL_FRONT_RIGHT'
5750 The fragment color/data value is written into the front right color
5751 buffer.
5752
5753 `GL_BACK_LEFT'
5754 The fragment color/data value is written into the back left color
5755 buffer.
5756
5757 `GL_BACK_RIGHT'
5758 The fragment color/data value is written into the back right color
5759 buffer.
5760
5761 `GL_AUXi'
5762 The fragment color/data value is written into auxiliary buffer `i'.
5763
5764 Except for `GL_NONE', the preceding symbolic constants may not appear
5765 more than once in BUFS. The maximum number of draw buffers supported is
5766 implementation dependent and can be queried by calling `glGet' with the
5767 argument `GL_MAX_DRAW_BUFFERS'. The number of auxiliary buffers can be
5768 queried by calling `glGet' with the argument `GL_AUX_BUFFERS'.
5769
5770 `GL_INVALID_ENUM' is generated if one of the values in BUFS is not an
5771 accepted value.
5772
5773 `GL_INVALID_ENUM' is generated if N is less than 0.
5774
5775 `GL_INVALID_OPERATION' is generated if a symbolic constant other than
5776 `GL_NONE' appears more than once in BUFS.
5777
5778 `GL_INVALID_OPERATION' is generated if any of the entries in BUFS (other
5779 than `GL_NONE' ) indicates a color buffer that does not exist in the
5780 current GL context.
5781
5782 `GL_INVALID_VALUE' is generated if N is greater than
5783 `GL_MAX_DRAW_BUFFERS'.
5784
5785 `GL_INVALID_OPERATION' is generated if `glDrawBuffers' is executed
5786 between the execution of `glBegin' and the corresponding execution of
5787 `glEnd'.")
5788
5789 (define-gl-procedures
5790 ((glDrawBuffer (mode GLenum) -> void))
5791 "Specify which color buffers are to be drawn into.
5792
5793 MODE
5794 Specifies up to four color buffers to be drawn into. Symbolic
5795 constants `GL_NONE', `GL_FRONT_LEFT', `GL_FRONT_RIGHT',
5796 `GL_BACK_LEFT', `GL_BACK_RIGHT', `GL_FRONT', `GL_BACK', `GL_LEFT',
5797 `GL_RIGHT', `GL_FRONT_AND_BACK', and `GL_AUX'I, where I is between
5798 0 and the value of `GL_AUX_BUFFERS' minus 1, are accepted.
5799 (`GL_AUX_BUFFERS' is not the upper limit; use `glGet' to query the
5800 number of available aux buffers.) The initial value is `GL_FRONT'
5801 for single-buffered contexts, and `GL_BACK' for double-buffered
5802 contexts.
5803
5804 When colors are written to the frame buffer, they are written into the
5805 color buffers specified by `glDrawBuffer'. The specifications are as
5806 follows:
5807
5808 `GL_NONE'
5809 No color buffers are written.
5810
5811 `GL_FRONT_LEFT'
5812 Only the front left color buffer is written.
5813
5814 `GL_FRONT_RIGHT'
5815 Only the front right color buffer is written.
5816
5817 `GL_BACK_LEFT'
5818 Only the back left color buffer is written.
5819
5820 `GL_BACK_RIGHT'
5821 Only the back right color buffer is written.
5822
5823 `GL_FRONT'
5824 Only the front left and front right color buffers are written. If
5825 there is no front right color buffer, only the front left color
5826 buffer is written.
5827
5828 `GL_BACK'
5829 Only the back left and back right color buffers are written. If
5830 there is no back right color buffer, only the back left color
5831 buffer is written.
5832
5833 `GL_LEFT'
5834 Only the front left and back left color buffers are written. If
5835 there is no back left color buffer, only the front left color
5836 buffer is written.
5837
5838 `GL_RIGHT'
5839 Only the front right and back right color buffers are written. If
5840 there is no back right color buffer, only the front right color
5841 buffer is written.
5842
5843 `GL_FRONT_AND_BACK'
5844 All the front and back color buffers (front left, front right, back
5845 left, back right) are written. If there are no back color buffers,
5846 only the front left and front right color buffers are written. If
5847 there are no right color buffers, only the front left and back left
5848 color buffers are written. If there are no right or back color
5849 buffers, only the front left color buffer is written.
5850
5851 `GL_AUX'I
5852 Only auxiliary color buffer I is written.
5853
5854 If more than one color buffer is selected for drawing, then blending or
5855 logical operations are computed and applied independently for each color
5856 buffer and can produce different results in each buffer.
5857
5858 Monoscopic contexts include only LEFT buffers, and stereoscopic contexts
5859 include both LEFT and RIGHT buffers. Likewise, single-buffered contexts
5860 include only FRONT buffers, and double-buffered contexts include both
5861 FRONT and BACK buffers. The context is selected at GL initialization.
5862
5863 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5864
5865 `GL_INVALID_OPERATION' is generated if none of the buffers indicated by
5866 MODE exists.
5867
5868 `GL_INVALID_OPERATION' is generated if `glDrawBuffer' is executed
5869 between the execution of `glBegin' and the corresponding execution of
5870 `glEnd'.")
5871
5872 (define-gl-procedures
5873 ((glDrawElements
5874 (mode GLenum)
5875 (count GLsizei)
5876 (type GLenum)
5877 (indices const-GLvoid-*)
5878 ->
5879 void))
5880 "Render primitives from array data.
5881
5882 MODE
5883 Specifies what kind of primitives to render. Symbolic constants
5884 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
5885 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
5886 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
5887
5888 COUNT
5889 Specifies the number of elements to be rendered.
5890
5891 TYPE
5892 Specifies the type of the values in INDICES. Must be one of
5893 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
5894
5895 INDICES
5896 Specifies a pointer to the location where the indices are stored.
5897
5898 `glDrawElements' specifies multiple geometric primitives with very few
5899 subroutine calls. Instead of calling a GL function to pass each
5900 individual vertex, normal, texture coordinate, edge flag, or color, you
5901 can prespecify separate arrays of vertices, normals, and so on, and use
5902 them to construct a sequence of primitives with a single call to
5903 `glDrawElements'.
5904
5905 When `glDrawElements' is called, it uses COUNT sequential elements from
5906 an enabled array, starting at INDICES to construct a sequence of
5907 geometric primitives. MODE specifies what kind of primitives are
5908 constructed and how the array elements construct these primitives. If
5909 more than one array is enabled, each is used. If `GL_VERTEX_ARRAY' is
5910 not enabled, no geometric primitives are constructed.
5911
5912 Vertex attributes that are modified by `glDrawElements' have an
5913 unspecified value after `glDrawElements' returns. For example, if
5914 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
5915 after `glDrawElements' executes. Attributes that aren't modified
5916 maintain their previous values.
5917
5918 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5919
5920 `GL_INVALID_VALUE' is generated if COUNT is negative.
5921
5922 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5923 bound to an enabled array or the element array and the buffer object's
5924 data store is currently mapped.
5925
5926 `GL_INVALID_OPERATION' is generated if `glDrawElements' is executed
5927 between the execution of `glBegin' and the corresponding `glEnd'.")
5928
5929 (define-gl-procedures
5930 ((glDrawPixels
5931 (width GLsizei)
5932 (height GLsizei)
5933 (format GLenum)
5934 (type GLenum)
5935 (data const-GLvoid-*)
5936 ->
5937 void))
5938 "Write a block of pixels to the frame buffer.
5939
5940 WIDTH
5941 HEIGHT
5942
5943 Specify the dimensions of the pixel rectangle to be written into
5944 the frame buffer.
5945
5946 FORMAT
5947 Specifies the format of the pixel data. Symbolic constants
5948 `GL_COLOR_INDEX', `GL_STENCIL_INDEX', `GL_DEPTH_COMPONENT',
5949 `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_RED', `GL_GREEN',
5950 `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA' are
5951 accepted.
5952
5953 TYPE
5954 Specifies the data type for DATA. Symbolic constants
5955 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
5956 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
5957 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
5958 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
5959 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
5960 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
5961 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
5962 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
5963 are accepted.
5964
5965 DATA
5966 Specifies a pointer to the pixel data.
5967
5968 `glDrawPixels' reads pixel data from memory and writes it into the frame
5969 buffer relative to the current raster position, provided that the raster
5970 position is valid. Use `glRasterPos' or `glWindowPos' to set the
5971 current raster position; use `glGet' with argument
5972 `GL_CURRENT_RASTER_POSITION_VALID' to determine if the specified raster
5973 position is valid, and `glGet' with argument
5974 `GL_CURRENT_RASTER_POSITION' to query the raster position.
5975
5976 Several parameters define the encoding of pixel data in memory and
5977 control the processing of the pixel data before it is placed in the
5978 frame buffer. These parameters are set with four commands:
5979 `glPixelStore', `glPixelTransfer', `glPixelMap', and `glPixelZoom'. This
5980 reference page describes the effects on `glDrawPixels' of many, but not
5981 all, of the parameters specified by these four commands.
5982
5983 Data is read from DATA as a sequence of signed or unsigned bytes, signed
5984 or unsigned shorts, signed or unsigned integers, or single-precision
5985 floating-point values, depending on TYPE. When TYPE is one of
5986 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
5987 `GL_UNSIGNED_INT', `GL_INT', or `GL_FLOAT' each of these bytes, shorts,
5988 integers, or floating-point values is interpreted as one color or depth
5989 component, or one index, depending on FORMAT. When TYPE is one of
5990 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_SHORT_5_6_5',
5991 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_5_5_5_1',
5992 `GL_UNSIGNED_INT_8_8_8_8', or `GL_UNSIGNED_INT_10_10_10_2', each
5993 unsigned value is interpreted as containing all the components for a
5994 single pixel, with the color components arranged according to FORMAT.
5995 When TYPE is one of `GL_UNSIGNED_BYTE_2_3_3_REV',
5996 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
5997 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8_REV', or
5998 `GL_UNSIGNED_INT_2_10_10_10_REV', each unsigned value is interpreted as
5999 containing all color components, specified by FORMAT, for a single pixel
6000 in a reversed order. Indices are always treated individually. Color
6001 components are treated as groups of one, two, three, or four values,
6002 again based on FORMAT. Both individual indices and groups of components
6003 are referred to as pixels. If TYPE is `GL_BITMAP', the data must be
6004 unsigned bytes, and FORMAT must be either `GL_COLOR_INDEX' or
6005 `GL_STENCIL_INDEX'. Each unsigned byte is treated as eight 1-bit
6006 pixels, with bit ordering determined by `GL_UNPACK_LSB_FIRST' (see
6007 `glPixelStore').
6008
6009 WIDTH×HEIGHT pixels are read from memory, starting at location DATA. By
6010 default, these pixels are taken from adjacent memory locations, except
6011 that after all WIDTH pixels are read, the read pointer is advanced to
6012 the next four-byte boundary. The four-byte row alignment is specified
6013 by `glPixelStore' with argument `GL_UNPACK_ALIGNMENT', and it can be set
6014 to one, two, four, or eight bytes. Other pixel store parameters specify
6015 different read pointer advancements, both before the first pixel is read
6016 and after all WIDTH pixels are read. See the `glPixelStore' reference
6017 page for details on these options.
6018
6019 If a non-zero named buffer object is bound to the
6020 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a block of
6021 pixels is specified, DATA is treated as a byte offset into the buffer
6022 object's data store.
6023
6024 The WIDTH×HEIGHT pixels that are read from memory are each operated on
6025 in the same way, based on the values of several parameters specified by
6026 `glPixelTransfer' and `glPixelMap'. The details of these operations, as
6027 well as the target buffer into which the pixels are drawn, are specific
6028 to the format of the pixels, as specified by FORMAT. FORMAT can assume
6029 one of 13 symbolic values:
6030
6031 `GL_COLOR_INDEX'
6032 Each pixel is a single value, a color index. It is converted to
6033 fixed-point format, with an unspecified number of bits to the right
6034 of the binary point, regardless of the memory data type.
6035 Floating-point values convert to true fixed-point values. Signed
6036 and unsigned integer data is converted with all fraction bits set
6037 to 0. Bitmap data convert to either 0 or 1.
6038
6039 Each fixed-point index is then shifted left by `GL_INDEX_SHIFT'
6040 bits and added to `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is
6041 negative, the shift is to the right. In either case, zero bits
6042 fill otherwise unspecified bit locations in the result.
6043
6044 If the GL is in RGBA mode, the resulting index is converted to an
6045 RGBA pixel with the help of the `GL_PIXEL_MAP_I_TO_R',
6046 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
6047 `GL_PIXEL_MAP_I_TO_A' tables. If the GL is in color index mode,
6048 and if `GL_MAP_COLOR' is true, the index is replaced with the value
6049 that it references in lookup table `GL_PIXEL_MAP_I_TO_I'. Whether
6050 the lookup replacement of the index is done or not, the integer
6051 part of the index is then ANDed with 2^B-1 , where B is the number
6052 of bits in a color index buffer.
6053
6054 The GL then converts the resulting indices or RGBA colors to
6055 fragments by attaching the current raster position Z coordinate and
6056 texture coordinates to each pixel, then assigning X and Y window
6057 coordinates to the N th fragment such that X_N=X_R+N%WIDTH
6058 Y_N=Y_R+⌊N/WIDTH,⌋
6059
6060 where (X_R,Y_R) is the current raster position. These pixel
6061 fragments are then treated just like the fragments generated by
6062 rasterizing points, lines, or polygons. Texture mapping, fog, and
6063 all the fragment operations are applied before the fragments are
6064 written to the frame buffer.
6065
6066 `GL_STENCIL_INDEX'
6067 Each pixel is a single value, a stencil index. It is converted to
6068 fixed-point format, with an unspecified number of bits to the right
6069 of the binary point, regardless of the memory data type.
6070 Floating-point values convert to true fixed-point values. Signed
6071 and unsigned integer data is converted with all fraction bits set
6072 to 0. Bitmap data convert to either 0 or 1.
6073
6074 Each fixed-point index is then shifted left by `GL_INDEX_SHIFT'
6075 bits, and added to `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is
6076 negative, the shift is to the right. In either case, zero bits
6077 fill otherwise unspecified bit locations in the result. If
6078 `GL_MAP_STENCIL' is true, the index is replaced with the value that
6079 it references in lookup table `GL_PIXEL_MAP_S_TO_S'. Whether the
6080 lookup replacement of the index is done or not, the integer part of
6081 the index is then ANDed with 2^B-1 , where B is the number of bits
6082 in the stencil buffer. The resulting stencil indices are then
6083 written to the stencil buffer such that the N th index is written
6084 to location
6085
6086 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
6087
6088 where (X_R,Y_R) is the current raster position. Only the pixel
6089 ownership test, the scissor test, and the stencil writemask affect
6090 these write operations.
6091
6092 `GL_DEPTH_COMPONENT'
6093 Each pixel is a single-depth component. Floating-point data is
6094 converted directly to an internal floating-point format with
6095 unspecified precision. Signed integer data is mapped linearly to
6096 the internal floating-point format such that the most positive
6097 representable integer value maps to 1.0, and the most negative
6098 representable value maps to -1.0 . Unsigned integer data is mapped
6099 similarly: the largest integer value maps to 1.0, and 0 maps to
6100 0.0. The resulting floating-point depth value is then multiplied
6101 by `GL_DEPTH_SCALE' and added to `GL_DEPTH_BIAS'. The result is
6102 clamped to the range [0,1] .
6103
6104 The GL then converts the resulting depth components to fragments by
6105 attaching the current raster position color or color index and
6106 texture coordinates to each pixel, then assigning X and Y window
6107 coordinates to the N th fragment such that
6108
6109 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
6110
6111 where (X_R,Y_R) is the current raster position. These pixel
6112 fragments are then treated just like the fragments generated by
6113 rasterizing points, lines, or polygons. Texture mapping, fog, and
6114 all the fragment operations are applied before the fragments are
6115 written to the frame buffer.
6116
6117 `GL_RGBA'
6118 `GL_BGRA'
6119 Each pixel is a four-component group: For `GL_RGBA', the red
6120 component is first, followed by green, followed by blue, followed
6121 by alpha; for `GL_BGRA' the order is blue, green, red and then
6122 alpha. Floating-point values are converted directly to an internal
6123 floating-point format with unspecified precision. Signed integer
6124 values are mapped linearly to the internal floating-point format
6125 such that the most positive representable integer value maps to
6126 1.0, and the most negative representable value maps to -1.0 . (Note
6127 that this mapping does not convert 0 precisely to 0.0.) Unsigned
6128 integer data is mapped similarly: The largest integer value maps to
6129 1.0, and 0 maps to 0.0. The resulting floating-point color values
6130 are then multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where
6131 C is RED, GREEN, BLUE, and ALPHA for the respective color
6132 components. The results are clamped to the range [0,1] .
6133
6134 If `GL_MAP_COLOR' is true, each color component is scaled by the
6135 size of lookup table `GL_PIXEL_MAP_c_TO_c', then replaced by the
6136 value that it references in that table. C is R, G, B, or A
6137 respectively.
6138
6139 The GL then converts the resulting RGBA colors to fragments by
6140 attaching the current raster position Z coordinate and texture
6141 coordinates to each pixel, then assigning X and Y window
6142 coordinates to the N th fragment such that
6143
6144 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
6145
6146 where (X_R,Y_R) is the current raster position. These pixel
6147 fragments are then treated just like the fragments generated by
6148 rasterizing points, lines, or polygons. Texture mapping, fog, and
6149 all the fragment operations are applied before the fragments are
6150 written to the frame buffer.
6151
6152 `GL_RED'
6153 Each pixel is a single red component. This component is converted
6154 to the internal floating-point format in the same way the red
6155 component of an RGBA pixel is. It is then converted to an RGBA
6156 pixel with green and blue set to 0, and alpha set to 1. After this
6157 conversion, the pixel is treated as if it had been read as an RGBA
6158 pixel.
6159
6160 `GL_GREEN'
6161 Each pixel is a single green component. This component is
6162 converted to the internal floating-point format in the same way the
6163 green component of an RGBA pixel is. It is then converted to an
6164 RGBA pixel with red and blue set to 0, and alpha set to 1. After
6165 this conversion, the pixel is treated as if it had been read as an
6166 RGBA pixel.
6167
6168 `GL_BLUE'
6169 Each pixel is a single blue component. This component is converted
6170 to the internal floating-point format in the same way the blue
6171 component of an RGBA pixel is. It is then converted to an RGBA
6172 pixel with red and green set to 0, and alpha set to 1. After this
6173 conversion, the pixel is treated as if it had been read as an RGBA
6174 pixel.
6175
6176 `GL_ALPHA'
6177 Each pixel is a single alpha component. This component is
6178 converted to the internal floating-point format in the same way the
6179 alpha component of an RGBA pixel is. It is then converted to an
6180 RGBA pixel with red, green, and blue set to 0. After this
6181 conversion, the pixel is treated as if it had been read as an RGBA
6182 pixel.
6183
6184 `GL_RGB'
6185 `GL_BGR'
6186 Each pixel is a three-component group: red first, followed by
6187 green, followed by blue; for `GL_BGR', the first component is blue,
6188 followed by green and then red. Each component is converted to the
6189 internal floating-point format in the same way the red, green, and
6190 blue components of an RGBA pixel are. The color triple is
6191 converted to an RGBA pixel with alpha set to 1. After this
6192 conversion, the pixel is treated as if it had been read as an RGBA
6193 pixel.
6194
6195 `GL_LUMINANCE'
6196 Each pixel is a single luminance component. This component is
6197 converted to the internal floating-point format in the same way the
6198 red component of an RGBA pixel is. It is then converted to an RGBA
6199 pixel with red, green, and blue set to the converted luminance
6200 value, and alpha set to 1. After this conversion, the pixel is
6201 treated as if it had been read as an RGBA pixel.
6202
6203 `GL_LUMINANCE_ALPHA'
6204 Each pixel is a two-component group: luminance first, followed by
6205 alpha. The two components are converted to the internal
6206 floating-point format in the same way the red component of an RGBA
6207 pixel is. They are then converted to an RGBA pixel with red,
6208 green, and blue set to the converted luminance value, and alpha set
6209 to the converted alpha value. After this conversion, the pixel is
6210 treated as if it had been read as an RGBA pixel.
6211
6212 The following table summarizes the meaning of the valid constants for
6213 the TYPE parameter:
6214
6215
6216
6217 *Type*
6218 *Corresponding Type*
6219
6220 `GL_UNSIGNED_BYTE'
6221 unsigned 8-bit integer
6222
6223 `GL_BYTE'
6224 signed 8-bit integer
6225
6226 `GL_BITMAP'
6227 single bits in unsigned 8-bit integers
6228
6229 `GL_UNSIGNED_SHORT'
6230 unsigned 16-bit integer
6231
6232 `GL_SHORT'
6233 signed 16-bit integer
6234
6235 `GL_UNSIGNED_INT'
6236 unsigned 32-bit integer
6237
6238 `GL_INT'
6239 32-bit integer
6240
6241 `GL_FLOAT'
6242 single-precision floating-point
6243
6244 `GL_UNSIGNED_BYTE_3_3_2'
6245 unsigned 8-bit integer
6246
6247 `GL_UNSIGNED_BYTE_2_3_3_REV'
6248 unsigned 8-bit integer with reversed component ordering
6249
6250 `GL_UNSIGNED_SHORT_5_6_5'
6251 unsigned 16-bit integer
6252
6253 `GL_UNSIGNED_SHORT_5_6_5_REV'
6254 unsigned 16-bit integer with reversed component ordering
6255
6256 `GL_UNSIGNED_SHORT_4_4_4_4'
6257 unsigned 16-bit integer
6258
6259 `GL_UNSIGNED_SHORT_4_4_4_4_REV'
6260 unsigned 16-bit integer with reversed component ordering
6261
6262 `GL_UNSIGNED_SHORT_5_5_5_1'
6263 unsigned 16-bit integer
6264
6265 `GL_UNSIGNED_SHORT_1_5_5_5_REV'
6266 unsigned 16-bit integer with reversed component ordering
6267
6268 `GL_UNSIGNED_INT_8_8_8_8'
6269 unsigned 32-bit integer
6270
6271 `GL_UNSIGNED_INT_8_8_8_8_REV'
6272 unsigned 32-bit integer with reversed component ordering
6273
6274 `GL_UNSIGNED_INT_10_10_10_2'
6275 unsigned 32-bit integer
6276
6277 `GL_UNSIGNED_INT_2_10_10_10_REV'
6278 unsigned 32-bit integer with reversed component ordering
6279
6280
6281
6282 The rasterization described so far assumes pixel zoom factors of 1. If
6283 `glPixelZoom' is used to change the X and Y pixel zoom factors, pixels
6284 are converted to fragments as follows. If (X_R,Y_R) is the current
6285 raster position, and a given pixel is in the N th column and M th row of
6286 the pixel rectangle, then fragments are generated for pixels whose
6287 centers are in the rectangle with corners at
6288
6289 (X_R+ZOOM_X,\u2062N,Y_R+ZOOM_Y,\u2062M) (X_R+ZOOM_X,\u2061(N+1,),Y_R+ZOOM_Y,\u2061(M+1,))
6290
6291 where ZOOM_X is the value of `GL_ZOOM_X' and ZOOM_Y is the value of
6292 `GL_ZOOM_Y'.
6293
6294 `GL_INVALID_ENUM' is generated if FORMAT or TYPE is not one of the
6295 accepted values.
6296
6297 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
6298 either `GL_COLOR_INDEX' or `GL_STENCIL_INDEX'.
6299
6300 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
6301
6302 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_STENCIL_INDEX' and
6303 there is no stencil buffer.
6304
6305 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_RED', `GL_GREEN',
6306 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_RGBA', `GL_BGR', `GL_BGRA',
6307 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA', and the GL is in color index
6308 mode.
6309
6310 `GL_INVALID_OPERATION' is generated if FORMAT is one of
6311 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
6312 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
6313 is not `GL_RGB'.
6314
6315 `GL_INVALID_OPERATION' is generated if FORMAT is one of
6316 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
6317 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
6318 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
6319 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
6320 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
6321
6322 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6323 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
6324 data store is currently mapped.
6325
6326 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6327 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
6328 unpacked from the buffer object such that the memory reads required
6329 would exceed the data store size.
6330
6331 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6332 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
6333 divisible into the number of bytes needed to store in memory a datum
6334 indicated by TYPE.
6335
6336 `GL_INVALID_OPERATION' is generated if `glDrawPixels' is executed
6337 between the execution of `glBegin' and the corresponding execution of
6338 `glEnd'.")
6339
6340 (define-gl-procedures
6341 ((glDrawRangeElements
6342 (mode GLenum)
6343 (start GLuint)
6344 (end GLuint)
6345 (count GLsizei)
6346 (type GLenum)
6347 (indices const-GLvoid-*)
6348 ->
6349 void))
6350 "Render primitives from array data.
6351
6352 MODE
6353 Specifies what kind of primitives to render. Symbolic constants
6354 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
6355 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
6356 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
6357
6358 START
6359 Specifies the minimum array index contained in INDICES.
6360
6361 END
6362 Specifies the maximum array index contained in INDICES.
6363
6364 COUNT
6365 Specifies the number of elements to be rendered.
6366
6367 TYPE
6368 Specifies the type of the values in INDICES. Must be one of
6369 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
6370
6371 INDICES
6372 Specifies a pointer to the location where the indices are stored.
6373
6374 `glDrawRangeElements' is a restricted form of `glDrawElements'. MODE,
6375 START, END, and COUNT match the corresponding arguments to
6376 `glDrawElements', with the additional constraint that all values in the
6377 arrays COUNT must lie between START and END, inclusive.
6378
6379 Implementations denote recommended maximum amounts of vertex and index
6380 data, which may be queried by calling `glGet' with argument
6381 `GL_MAX_ELEMENTS_VERTICES' and `GL_MAX_ELEMENTS_INDICES'. If
6382 END-START+1 is greater than the value of `GL_MAX_ELEMENTS_VERTICES', or
6383 if COUNT is greater than the value of `GL_MAX_ELEMENTS_INDICES', then
6384 the call may operate at reduced performance. There is no requirement
6385 that all vertices in the range [START,END] be referenced. However, the
6386 implementation may partially process unused vertices, reducing
6387 performance from what could be achieved with an optimal index set.
6388
6389 When `glDrawRangeElements' is called, it uses COUNT sequential elements
6390 from an enabled array, starting at START to construct a sequence of
6391 geometric primitives. MODE specifies what kind of primitives are
6392 constructed, and how the array elements construct these primitives. If
6393 more than one array is enabled, each is used. If `GL_VERTEX_ARRAY' is
6394 not enabled, no geometric primitives are constructed.
6395
6396 Vertex attributes that are modified by `glDrawRangeElements' have an
6397 unspecified value after `glDrawRangeElements' returns. For example, if
6398 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
6399 after `glDrawRangeElements' executes. Attributes that aren't modified
6400 maintain their previous values.
6401
6402 It is an error for indices to lie outside the range [START,END] , but
6403 implementations may not check for this situation. Such indices cause
6404 implementation-dependent behavior.
6405
6406 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
6407
6408 `GL_INVALID_VALUE' is generated if COUNT is negative.
6409
6410 `GL_INVALID_VALUE' is generated if END<START .
6411
6412 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6413 bound to an enabled array or the element array and the buffer object's
6414 data store is currently mapped.
6415
6416 `GL_INVALID_OPERATION' is generated if `glDrawRangeElements' is executed
6417 between the execution of `glBegin' and the corresponding `glEnd'.")
6418
6419 (define-gl-procedures
6420 ((glEdgeFlagPointer
6421 (stride GLsizei)
6422 (pointer const-GLvoid-*)
6423 ->
6424 void))
6425 "Define an array of edge flags.
6426
6427 STRIDE
6428 Specifies the byte offset between consecutive edge flags. If
6429 STRIDE is 0, the edge flags are understood to be tightly packed in
6430 the array. The initial value is 0.
6431
6432 POINTER
6433 Specifies a pointer to the first edge flag in the array. The
6434 initial value is 0.
6435
6436 `glEdgeFlagPointer' specifies the location and data format of an array
6437 of boolean edge flags to use when rendering. STRIDE specifies the byte
6438 stride from one edge flag to the next, allowing vertices and attributes
6439 to be packed into a single array or stored in separate arrays.
6440
6441 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
6442 target (see `glBindBuffer') while an edge flag array is specified,
6443 POINTER is treated as a byte offset into the buffer object's data store.
6444 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
6445 edge flag vertex array client-side state
6446 (`GL_EDGE_FLAG_ARRAY_BUFFER_BINDING').
6447
6448 When an edge flag array is specified, STRIDE and POINTER are saved as
6449 client-side state, in addition to the current vertex array buffer object
6450 binding.
6451
6452 To enable and disable the edge flag array, call `glEnableClientState'
6453 and `glDisableClientState' with the argument `GL_EDGE_FLAG_ARRAY'. If
6454 enabled, the edge flag array is used when `glDrawArrays',
6455 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements',
6456 `glDrawRangeElements', or `glArrayElement' is called.
6457
6458 `GL_INVALID_ENUM' is generated if STRIDE is negative.")
6459
6460 (define-gl-procedures
6461 ((glEdgeFlag (flag GLboolean) -> void)
6462 (glEdgeFlagv (flag const-GLboolean-*) -> void))
6463 "Flag edges as either boundary or nonboundary.
6464
6465 FLAG
6466 Specifies the current edge flag value, either `GL_TRUE' or
6467 `GL_FALSE'. The initial value is `GL_TRUE'.
6468
6469 Each vertex of a polygon, separate triangle, or separate quadrilateral
6470 specified between a `glBegin'/`glEnd' pair is marked as the start of
6471 either a boundary or nonboundary edge. If the current edge flag is true
6472 when the vertex is specified, the vertex is marked as the start of a
6473 boundary edge. Otherwise, the vertex is marked as the start of a
6474 nonboundary edge. `glEdgeFlag' sets the edge flag bit to `GL_TRUE' if
6475 FLAG is `GL_TRUE' and to `GL_FALSE' otherwise.
6476
6477 The vertices of connected triangles and connected quadrilaterals are
6478 always marked as boundary, regardless of the value of the edge flag.
6479
6480 Boundary and nonboundary edge flags on vertices are significant only if
6481 `GL_POLYGON_MODE' is set to `GL_POINT' or `GL_LINE'. See
6482 `glPolygonMode'.")
6483
6484 (define-gl-procedures
6485 ((glEnableClientState (cap GLenum) -> void)
6486 (glDisableClientState (cap GLenum) -> void))
6487 "Enable or disable client-side capability.
6488
6489 CAP
6490 Specifies the capability to enable. Symbolic constants
6491 `GL_COLOR_ARRAY', `GL_EDGE_FLAG_ARRAY', `GL_FOG_COORD_ARRAY',
6492 `GL_INDEX_ARRAY', `GL_NORMAL_ARRAY', `GL_SECONDARY_COLOR_ARRAY',
6493 `GL_TEXTURE_COORD_ARRAY', and `GL_VERTEX_ARRAY' are accepted.
6494
6495 `glEnableClientState' and `glDisableClientState' enable or disable
6496 individual client-side capabilities. By default, all client-side
6497 capabilities are disabled. Both `glEnableClientState' and
6498 `glDisableClientState' take a single argument, CAP, which can assume one
6499 of the following values:
6500
6501 `GL_COLOR_ARRAY'
6502 If enabled, the color array is enabled for writing and used during
6503 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6504 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6505 is called. See `glColorPointer'.
6506
6507 `GL_EDGE_FLAG_ARRAY'
6508 If enabled, the edge flag array is enabled for writing and used
6509 during rendering when `glArrayElement', `glDrawArrays',
6510 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6511 `glMultiDrawElements' is called. See `glEdgeFlagPointer'.
6512
6513 `GL_FOG_COORD_ARRAY'
6514 If enabled, the fog coordinate array is enabled for writing and
6515 used during rendering when `glArrayElement', `glDrawArrays',
6516 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6517 `glMultiDrawElements' is called. See `glFogCoordPointer'.
6518
6519 `GL_INDEX_ARRAY'
6520 If enabled, the index array is enabled for writing and used during
6521 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6522 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6523 is called. See `glIndexPointer'.
6524
6525 `GL_NORMAL_ARRAY'
6526 If enabled, the normal array is enabled for writing and used during
6527 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6528 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6529 is called. See `glNormalPointer'.
6530
6531 `GL_SECONDARY_COLOR_ARRAY'
6532 If enabled, the secondary color array is enabled for writing and
6533 used during rendering when `glArrayElement', `glDrawArrays',
6534 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6535 `glMultiDrawElements' is called. See `glColorPointer'.
6536
6537 `GL_TEXTURE_COORD_ARRAY'
6538 If enabled, the texture coordinate array is enabled for writing and
6539 used during rendering when `glArrayElement', `glDrawArrays',
6540 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6541 `glMultiDrawElements' is called. See `glTexCoordPointer'.
6542
6543 `GL_VERTEX_ARRAY'
6544 If enabled, the vertex array is enabled for writing and used during
6545 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6546 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6547 is called. See `glVertexPointer'.
6548
6549 `GL_INVALID_ENUM' is generated if CAP is not an accepted value.
6550
6551 `glEnableClientState' is not allowed between the execution of `glBegin'
6552 and the corresponding `glEnd', but an error may or may not be generated.
6553 If no error is generated, the behavior is undefined.")
6554
6555 (define-gl-procedures
6556 ((glEnableVertexAttribArray
6557 (index GLuint)
6558 ->
6559 void)
6560 (glDisableVertexAttribArray
6561 (index GLuint)
6562 ->
6563 void))
6564 "Enable or disable a generic vertex attribute array.
6565
6566 INDEX
6567 Specifies the index of the generic vertex attribute to be enabled
6568 or disabled.
6569
6570 `glEnableVertexAttribArray' enables the generic vertex attribute array
6571 specified by INDEX. `glDisableVertexAttribArray' disables the generic
6572 vertex attribute array specified by INDEX. By default, all client-side
6573 capabilities are disabled, including all generic vertex attribute
6574 arrays. If enabled, the values in the generic vertex attribute array
6575 will be accessed and used for rendering when calls are made to vertex
6576 array commands such as `glDrawArrays', `glDrawElements',
6577 `glDrawRangeElements', `glArrayElement', `glMultiDrawElements', or
6578 `glMultiDrawArrays'.
6579
6580 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
6581 `GL_MAX_VERTEX_ATTRIBS'.
6582
6583 `GL_INVALID_OPERATION' is generated if either `glEnableVertexAttribArray
6584 ' or `glDisableVertexAttribArray ' is executed between the execution of
6585 `glBegin' and the corresponding execution of `glEnd'.")
6586
6587 (define-gl-procedures
6588 ((glEnable (cap GLenum) -> void)
6589 (glDisable (cap GLenum) -> void))
6590 "Enable or disable server-side GL capabilities.
6591
6592 CAP
6593 Specifies a symbolic constant indicating a GL capability.
6594
6595 `glEnable' and `glDisable' enable and disable various capabilities. Use
6596 `glIsEnabled' or `glGet' to determine the current setting of any
6597 capability. The initial value for each capability with the exception of
6598 `GL_DITHER' and `GL_MULTISAMPLE' is `GL_FALSE'. The initial value for
6599 `GL_DITHER' and `GL_MULTISAMPLE' is `GL_TRUE'.
6600
6601 Both `glEnable' and `glDisable' take a single argument, CAP, which can
6602 assume one of the following values:
6603
6604 `GL_ALPHA_TEST'
6605
6606
6607 If enabled, do alpha testing. See `glAlphaFunc'.
6608
6609 `GL_AUTO_NORMAL'
6610
6611
6612 If enabled, generate normal vectors when either `GL_MAP2_VERTEX_3'
6613 or `GL_MAP2_VERTEX_4' is used to generate vertices. See `glMap2'.
6614
6615 `GL_BLEND'
6616
6617
6618 If enabled, blend the computed fragment color values with the
6619 values in the color buffers. See `glBlendFunc'.
6620
6621 `GL_CLIP_PLANE'I
6622
6623
6624 If enabled, clip geometry against user-defined clipping plane I.
6625 See `glClipPlane'.
6626
6627 `GL_COLOR_LOGIC_OP'
6628
6629
6630 If enabled, apply the currently selected logical operation to the
6631 computed fragment color and color buffer values. See `glLogicOp'.
6632
6633 `GL_COLOR_MATERIAL'
6634
6635
6636 If enabled, have one or more material parameters track the current
6637 color. See `glColorMaterial'.
6638
6639 `GL_COLOR_SUM'
6640
6641
6642 If enabled and no fragment shader is active, add the secondary
6643 color value to the computed fragment color. See
6644 `glSecondaryColor'.
6645
6646 `GL_COLOR_TABLE'
6647
6648
6649 If enabled, perform a color table lookup on the incoming RGBA color
6650 values. See `glColorTable'.
6651
6652 `GL_CONVOLUTION_1D'
6653
6654
6655 If enabled, perform a 1D convolution operation on incoming RGBA
6656 color values. See `glConvolutionFilter1D'.
6657
6658 `GL_CONVOLUTION_2D'
6659
6660
6661 If enabled, perform a 2D convolution operation on incoming RGBA
6662 color values. See `glConvolutionFilter2D'.
6663
6664 `GL_CULL_FACE'
6665
6666
6667 If enabled, cull polygons based on their winding in window
6668 coordinates. See `glCullFace'.
6669
6670 `GL_DEPTH_TEST'
6671
6672
6673 If enabled, do depth comparisons and update the depth buffer. Note
6674 that even if the depth buffer exists and the depth mask is
6675 non-zero, the depth buffer is not updated if the depth test is
6676 disabled. See `glDepthFunc' and `glDepthRange'.
6677
6678 `GL_DITHER'
6679
6680
6681 If enabled, dither color components or indices before they are
6682 written to the color buffer.
6683
6684 `GL_FOG'
6685
6686
6687 If enabled and no fragment shader is active, blend a fog color into
6688 the post-texturing color. See `glFog'.
6689
6690 `GL_HISTOGRAM'
6691
6692
6693 If enabled, histogram incoming RGBA color values. See
6694 `glHistogram'.
6695
6696 `GL_INDEX_LOGIC_OP'
6697
6698
6699 If enabled, apply the currently selected logical operation to the
6700 incoming index and color buffer indices. See `glLogicOp'.
6701
6702 `GL_LIGHT'I
6703
6704
6705 If enabled, include light I in the evaluation of the lighting
6706 equation. See `glLightModel' and `glLight'.
6707
6708 `GL_LIGHTING'
6709
6710
6711 If enabled and no vertex shader is active, use the current lighting
6712 parameters to compute the vertex color or index. Otherwise, simply
6713 associate the current color or index with each vertex. See
6714 `glMaterial', `glLightModel', and `glLight'.
6715
6716 `GL_LINE_SMOOTH'
6717
6718
6719 If enabled, draw lines with correct filtering. Otherwise, draw
6720 aliased lines. See `glLineWidth'.
6721
6722 `GL_LINE_STIPPLE'
6723
6724
6725 If enabled, use the current line stipple pattern when drawing
6726 lines. See `glLineStipple'.
6727
6728 `GL_MAP1_COLOR_4'
6729
6730
6731 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6732 `glEvalPoint1' generate RGBA values. See `glMap1'.
6733
6734 `GL_MAP1_INDEX'
6735
6736
6737 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6738 `glEvalPoint1' generate color indices. See `glMap1'.
6739
6740 `GL_MAP1_NORMAL'
6741
6742
6743 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6744 `glEvalPoint1' generate normals. See `glMap1'.
6745
6746 `GL_MAP1_TEXTURE_COORD_1'
6747
6748
6749 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6750 `glEvalPoint1' generate S texture coordinates. See `glMap1'.
6751
6752 `GL_MAP1_TEXTURE_COORD_2'
6753
6754
6755 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6756 `glEvalPoint1' generate S and T texture coordinates. See `glMap1'.
6757
6758 `GL_MAP1_TEXTURE_COORD_3'
6759
6760
6761 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6762 `glEvalPoint1' generate S, T, and R texture coordinates. See
6763 `glMap1'.
6764
6765 `GL_MAP1_TEXTURE_COORD_4'
6766
6767
6768 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6769 `glEvalPoint1' generate S, T, R, and Q texture coordinates. See
6770 `glMap1'.
6771
6772 `GL_MAP1_VERTEX_3'
6773
6774
6775 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6776 `glEvalPoint1' generate X, Y, and Z vertex coordinates. See
6777 `glMap1'.
6778
6779 `GL_MAP1_VERTEX_4'
6780
6781
6782 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6783 `glEvalPoint1' generate homogeneous X, Y, Z, and W vertex
6784 coordinates. See `glMap1'.
6785
6786 `GL_MAP2_COLOR_4'
6787
6788
6789 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6790 `glEvalPoint2' generate RGBA values. See `glMap2'.
6791
6792 `GL_MAP2_INDEX'
6793
6794
6795 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6796 `glEvalPoint2' generate color indices. See `glMap2'.
6797
6798 `GL_MAP2_NORMAL'
6799
6800
6801 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6802 `glEvalPoint2' generate normals. See `glMap2'.
6803
6804 `GL_MAP2_TEXTURE_COORD_1'
6805
6806
6807 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6808 `glEvalPoint2' generate S texture coordinates. See `glMap2'.
6809
6810 `GL_MAP2_TEXTURE_COORD_2'
6811
6812
6813 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6814 `glEvalPoint2' generate S and T texture coordinates. See `glMap2'.
6815
6816 `GL_MAP2_TEXTURE_COORD_3'
6817
6818
6819 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6820 `glEvalPoint2' generate S, T, and R texture coordinates. See
6821 `glMap2'.
6822
6823 `GL_MAP2_TEXTURE_COORD_4'
6824
6825
6826 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6827 `glEvalPoint2' generate S, T, R, and Q texture coordinates. See
6828 `glMap2'.
6829
6830 `GL_MAP2_VERTEX_3'
6831
6832
6833 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6834 `glEvalPoint2' generate X, Y, and Z vertex coordinates. See
6835 `glMap2'.
6836
6837 `GL_MAP2_VERTEX_4'
6838
6839
6840 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6841 `glEvalPoint2' generate homogeneous X, Y, Z, and W vertex
6842 coordinates. See `glMap2'.
6843
6844 `GL_MINMAX'
6845
6846
6847 If enabled, compute the minimum and maximum values of incoming RGBA
6848 color values. See `glMinmax'.
6849
6850 `GL_MULTISAMPLE'
6851
6852
6853 If enabled, use multiple fragment samples in computing the final
6854 color of a pixel. See `glSampleCoverage'.
6855
6856 `GL_NORMALIZE'
6857
6858
6859 If enabled and no vertex shader is active, normal vectors are
6860 normalized to unit length after transformation and before lighting.
6861 This method is generally less efficient than `GL_RESCALE_NORMAL'.
6862 See `glNormal' and `glNormalPointer'.
6863
6864 `GL_POINT_SMOOTH'
6865
6866
6867 If enabled, draw points with proper filtering. Otherwise, draw
6868 aliased points. See `glPointSize'.
6869
6870 `GL_POINT_SPRITE'
6871
6872
6873 If enabled, calculate texture coordinates for points based on
6874 texture environment and point parameter settings. Otherwise
6875 texture coordinates are constant across points.
6876
6877 `GL_POLYGON_OFFSET_FILL'
6878
6879
6880 If enabled, and if the polygon is rendered in `GL_FILL' mode, an
6881 offset is added to depth values of a polygon's fragments before the
6882 depth comparison is performed. See `glPolygonOffset'.
6883
6884 `GL_POLYGON_OFFSET_LINE'
6885
6886
6887 If enabled, and if the polygon is rendered in `GL_LINE' mode, an
6888 offset is added to depth values of a polygon's fragments before the
6889 depth comparison is performed. See `glPolygonOffset'.
6890
6891 `GL_POLYGON_OFFSET_POINT'
6892
6893
6894 If enabled, an offset is added to depth values of a polygon's
6895 fragments before the depth comparison is performed, if the polygon
6896 is rendered in `GL_POINT' mode. See `glPolygonOffset'.
6897
6898 `GL_POLYGON_SMOOTH'
6899
6900
6901 If enabled, draw polygons with proper filtering. Otherwise, draw
6902 aliased polygons. For correct antialiased polygons, an alpha
6903 buffer is needed and the polygons must be sorted front to back.
6904
6905 `GL_POLYGON_STIPPLE'
6906
6907
6908 If enabled, use the current polygon stipple pattern when rendering
6909 polygons. See `glPolygonStipple'.
6910
6911 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
6912
6913
6914 If enabled, perform a color table lookup on RGBA color values after
6915 color matrix transformation. See `glColorTable'.
6916
6917 `GL_POST_CONVOLUTION_COLOR_TABLE'
6918
6919
6920 If enabled, perform a color table lookup on RGBA color values after
6921 convolution. See `glColorTable'.
6922
6923 `GL_RESCALE_NORMAL'
6924
6925
6926 If enabled and no vertex shader is active, normal vectors are
6927 scaled after transformation and before lighting by a factor
6928 computed from the modelview matrix. If the modelview matrix scales
6929 space uniformly, this has the effect of restoring the transformed
6930 normal to unit length. This method is generally more efficient
6931 than `GL_NORMALIZE'. See `glNormal' and `glNormalPointer'.
6932
6933 `GL_SAMPLE_ALPHA_TO_COVERAGE'
6934
6935
6936 If enabled, compute a temporary coverage value where each bit is
6937 determined by the alpha value at the corresponding sample location.
6938 The temporary coverage value is then ANDed with the fragment
6939 coverage value.
6940
6941 `GL_SAMPLE_ALPHA_TO_ONE'
6942
6943
6944 If enabled, each sample alpha value is replaced by the maximum
6945 representable alpha value.
6946
6947 `GL_SAMPLE_COVERAGE'
6948
6949
6950 If enabled, the fragment's coverage is ANDed with the temporary
6951 coverage value. If `GL_SAMPLE_COVERAGE_INVERT' is set to
6952 `GL_TRUE', invert the coverage value. See `glSampleCoverage'.
6953
6954 `GL_SEPARABLE_2D'
6955
6956
6957 If enabled, perform a two-dimensional convolution operation using a
6958 separable convolution filter on incoming RGBA color values. See
6959 `glSeparableFilter2D'.
6960
6961 `GL_SCISSOR_TEST'
6962
6963
6964 If enabled, discard fragments that are outside the scissor
6965 rectangle. See `glScissor'.
6966
6967 `GL_STENCIL_TEST'
6968
6969
6970 If enabled, do stencil testing and update the stencil buffer. See
6971 `glStencilFunc' and `glStencilOp'.
6972
6973 `GL_TEXTURE_1D'
6974
6975
6976 If enabled and no fragment shader is active, one-dimensional
6977 texturing is performed (unless two- or three-dimensional or
6978 cube-mapped texturing is also enabled). See `glTexImage1D'.
6979
6980 `GL_TEXTURE_2D'
6981
6982
6983 If enabled and no fragment shader is active, two-dimensional
6984 texturing is performed (unless three-dimensional or cube-mapped
6985 texturing is also enabled). See `glTexImage2D'.
6986
6987 `GL_TEXTURE_3D'
6988
6989
6990 If enabled and no fragment shader is active, three-dimensional
6991 texturing is performed (unless cube-mapped texturing is also
6992 enabled). See `glTexImage3D'.
6993
6994 `GL_TEXTURE_CUBE_MAP'
6995
6996
6997 If enabled and no fragment shader is active, cube-mapped texturing
6998 is performed. See `glTexImage2D'.
6999
7000 `GL_TEXTURE_GEN_Q'
7001
7002
7003 If enabled and no vertex shader is active, the Q texture coordinate
7004 is computed using the texture generation function defined with
7005 `glTexGen'. Otherwise, the current Q texture coordinate is used.
7006 See `glTexGen'.
7007
7008 `GL_TEXTURE_GEN_R'
7009
7010
7011 If enabled and no vertex shader is active, the R texture coordinate
7012 is computed using the texture generation function defined with
7013 `glTexGen'. Otherwise, the current R texture coordinate is used.
7014 See `glTexGen'.
7015
7016 `GL_TEXTURE_GEN_S'
7017
7018
7019 If enabled and no vertex shader is active, the S texture coordinate
7020 is computed using the texture generation function defined with
7021 `glTexGen'. Otherwise, the current S texture coordinate is used.
7022 See `glTexGen'.
7023
7024 `GL_TEXTURE_GEN_T'
7025
7026
7027 If enabled and no vertex shader is active, the T texture coordinate
7028 is computed using the texture generation function defined with
7029 `glTexGen'. Otherwise, the current T texture coordinate is used.
7030 See `glTexGen'.
7031
7032 `GL_VERTEX_PROGRAM_POINT_SIZE'
7033
7034
7035 If enabled and a vertex shader is active, then the derived point
7036 size is taken from the (potentially clipped) shader builtin
7037 `gl_PointSize' and clamped to the implementation-dependent point
7038 size range.
7039
7040 `GL_VERTEX_PROGRAM_TWO_SIDE'
7041
7042
7043 If enabled and a vertex shader is active, it specifies that the GL
7044 will choose between front and back colors based on the polygon's
7045 face direction of which the vertex being shaded is a part. It has
7046 no effect on points or lines.
7047
7048 `GL_INVALID_ENUM' is generated if CAP is not one of the values listed
7049 previously.
7050
7051 `GL_INVALID_OPERATION' is generated if `glEnable' or `glDisable' is
7052 executed between the execution of `glBegin' and the corresponding
7053 execution of `glEnd'.")
7054
7055 (define-gl-procedures
7056 ((glEvalCoord1f (u GLfloat) -> void)
7057 (glEvalCoord1d (u GLdouble) -> void)
7058 (glEvalCoord2f (u GLfloat) (v GLfloat) -> void)
7059 (glEvalCoord2d (u GLdouble) (v GLdouble) -> void)
7060 (glEvalCoord1fv (u const-GLfloat-*) -> void)
7061 (glEvalCoord1dv (u const-GLdouble-*) -> void)
7062 (glEvalCoord2fv (u const-GLfloat-*) -> void)
7063 (glEvalCoord2dv (u const-GLdouble-*) -> void))
7064 "Evaluate enabled one- and two-dimensional maps.
7065
7066 U
7067 Specifies a value that is the domain coordinate U to the basis
7068 function defined in a previous `glMap1' or `glMap2' command.
7069
7070 V
7071 Specifies a value that is the domain coordinate V to the basis
7072 function defined in a previous `glMap2' command. This argument is
7073 not present in a `glEvalCoord1' command.
7074
7075 `glEvalCoord1' evaluates enabled one-dimensional maps at argument U.
7076 `glEvalCoord2' does the same for two-dimensional maps using two domain
7077 values, U and V. To define a map, call `glMap1' and `glMap2'; to enable
7078 and disable it, call `glEnable' and `glDisable'.
7079
7080 When one of the `glEvalCoord' commands is issued, all currently enabled
7081 maps of the indicated dimension are evaluated. Then, for each enabled
7082 map, it is as if the corresponding GL command had been issued with the
7083 computed value. That is, if `GL_MAP1_INDEX' or `GL_MAP2_INDEX' is
7084 enabled, a `glIndex' command is simulated. If `GL_MAP1_COLOR_4' or
7085 `GL_MAP2_COLOR_4' is enabled, a `glColor' command is simulated. If
7086 `GL_MAP1_NORMAL' or `GL_MAP2_NORMAL' is enabled, a normal vector is
7087 produced, and if any of `GL_MAP1_TEXTURE_COORD_1',
7088 `GL_MAP1_TEXTURE_COORD_2', `GL_MAP1_TEXTURE_COORD_3',
7089 `GL_MAP1_TEXTURE_COORD_4', `GL_MAP2_TEXTURE_COORD_1',
7090 `GL_MAP2_TEXTURE_COORD_2', `GL_MAP2_TEXTURE_COORD_3', or
7091 `GL_MAP2_TEXTURE_COORD_4' is enabled, then an appropriate `glTexCoord'
7092 command is simulated.
7093
7094 For color, color index, normal, and texture coordinates the GL uses
7095 evaluated values instead of current values for those evaluations that
7096 are enabled, and current values otherwise, However, the evaluated values
7097 do not update the current values. Thus, if `glVertex' commands are
7098 interspersed with `glEvalCoord' commands, the color, normal, and texture
7099 coordinates associated with the `glVertex' commands are not affected by
7100 the values generated by the `glEvalCoord' commands, but only by the most
7101 recent `glColor', `glIndex', `glNormal', and `glTexCoord' commands.
7102
7103 No commands are issued for maps that are not enabled. If more than one
7104 texture evaluation is enabled for a particular dimension (for example,
7105 `GL_MAP2_TEXTURE_COORD_1' and `GL_MAP2_TEXTURE_COORD_2'), then only the
7106 evaluation of the map that produces the larger number of coordinates (in
7107 this case, `GL_MAP2_TEXTURE_COORD_2') is carried out. `GL_MAP1_VERTEX_4'
7108 overrides `GL_MAP1_VERTEX_3', and `GL_MAP2_VERTEX_4' overrides
7109 `GL_MAP2_VERTEX_3', in the same manner. If neither a three- nor a
7110 four-component vertex map is enabled for the specified dimension, the
7111 `glEvalCoord' command is ignored.
7112
7113 If you have enabled automatic normal generation, by calling `glEnable'
7114 with argument `GL_AUTO_NORMAL', `glEvalCoord2' generates surface normals
7115 analytically, regardless of the contents or enabling of the
7116 `GL_MAP2_NORMAL' map. Let
7117
7118 `m'=∂`p',/∂U,,×∂`p',/∂V,,
7119
7120 Then the generated normal `n' is `n'=`m'/∥`m',∥,
7121
7122 If automatic normal generation is disabled, the corresponding normal map
7123 `GL_MAP2_NORMAL', if enabled, is used to produce a normal. If neither
7124 automatic normal generation nor a normal map is enabled, no normal is
7125 generated for `glEvalCoord2' commands.")
7126
7127 (define-gl-procedures
7128 ((glEvalMesh1
7129 (mode GLenum)
7130 (i1 GLint)
7131 (i2 GLint)
7132 ->
7133 void)
7134 (glEvalMesh2
7135 (mode GLenum)
7136 (i1 GLint)
7137 (i2 GLint)
7138 (j1 GLint)
7139 (j2 GLint)
7140 ->
7141 void))
7142 "Compute a one- or two-dimensional grid of points or lines.
7143
7144 MODE
7145 In `glEvalMesh1', specifies whether to compute a one-dimensional
7146 mesh of points or lines. Symbolic constants `GL_POINT' and
7147 `GL_LINE' are accepted.
7148
7149 I1
7150 I2
7151
7152 Specify the first and last integer values for grid domain variable
7153 I .
7154
7155 `glMapGrid' and `glEvalMesh' are used in tandem to efficiently generate
7156 and evaluate a series of evenly-spaced map domain values. `glEvalMesh'
7157 steps through the integer domain of a one- or two-dimensional grid,
7158 whose range is the domain of the evaluation maps specified by `glMap1'
7159 and `glMap2'. MODE determines whether the resulting vertices are
7160 connected as points, lines, or filled polygons.
7161
7162 In the one-dimensional case, `glEvalMesh1', the mesh is generated as if
7163 the following code fragment were executed:
7164
7165 where
7166
7167
7168 glBegin( TYPE );
7169 for ( i = I1; i <= I2; i += 1 )
7170 glEvalCoord1( i·ΔU+U_1
7171
7172 );
7173 glEnd();
7174
7175 ΔU=(U_2-U_1,)/N
7176
7177 and N , U_1 , and U_2 are the arguments to the most recent `glMapGrid1'
7178 command. TYPE is `GL_POINTS' if MODE is `GL_POINT', or `GL_LINES' if
7179 MODE is `GL_LINE'.
7180
7181 The one absolute numeric requirement is that if I=N , then the value
7182 computed from I·ΔU+U_1 is exactly U_2 .
7183
7184 In the two-dimensional case, `glEvalMesh2', let .cp ΔU=(U_2-U_1,)/N
7185
7186 ΔV=(V_2-V_1,)/M
7187
7188 where N , U_1 , U_2 , M , V_1 , and V_2 are the arguments to the most
7189 recent `glMapGrid2' command. Then, if MODE is `GL_FILL', the
7190 `glEvalMesh2' command is equivalent to:
7191
7192
7193
7194
7195 for ( j = J1; j < J2; j += 1 ) {
7196 glBegin( GL_QUAD_STRIP );
7197 for ( i = I1; i <= I2; i += 1 ) {
7198 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7199
7200 );
7201 glEvalCoord2( i·ΔU+U_1,(j+1,)·ΔV+V_1
7202
7203 );
7204 }
7205 glEnd();
7206 }
7207
7208 If MODE is `GL_LINE', then a call to `glEvalMesh2' is equivalent to:
7209
7210
7211
7212
7213 for ( j = J1; j <= J2; j += 1 ) {
7214 glBegin( GL_LINE_STRIP );
7215 for ( i = I1; i <= I2; i += 1 )
7216 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7217
7218 );
7219 glEnd();
7220 }
7221
7222 for ( i = I1; i <= I2; i += 1 ) {
7223 glBegin( GL_LINE_STRIP );
7224 for ( j = J1; j <= J1; j += 1 )
7225 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7226
7227 );
7228 glEnd();
7229 }
7230
7231 And finally, if MODE is `GL_POINT', then a call to `glEvalMesh2' is
7232 equivalent to:
7233
7234
7235
7236
7237 glBegin( GL_POINTS );
7238 for ( j = J1; j <= J2; j += 1 )
7239 for ( i = I1; i <= I2; i += 1 )
7240 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7241
7242 );
7243 glEnd();
7244
7245 In all three cases, the only absolute numeric requirements are that if
7246 I=N , then the value computed from I·ΔU+U_1 is exactly U_2 , and if J=M
7247 , then the value computed from J·ΔV+V_1 is exactly V_2 .
7248
7249 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
7250
7251 `GL_INVALID_OPERATION' is generated if `glEvalMesh' is executed between
7252 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7253
7254 (define-gl-procedures
7255 ((glEvalPoint1 (i GLint) -> void)
7256 (glEvalPoint2 (i GLint) (j GLint) -> void))
7257 "Generate and evaluate a single point in a mesh.
7258
7259 I
7260 Specifies the integer value for grid domain variable I .
7261
7262 J
7263 Specifies the integer value for grid domain variable J
7264 (`glEvalPoint2' only).
7265
7266 `glMapGrid' and `glEvalMesh' are used in tandem to efficiently generate
7267 and evaluate a series of evenly spaced map domain values. `glEvalPoint'
7268 can be used to evaluate a single grid point in the same gridspace that
7269 is traversed by `glEvalMesh'. Calling `glEvalPoint1' is equivalent to
7270 calling where ΔU=(U_2-U_1,)/N
7271
7272
7273 glEvalCoord1( i·ΔU+U_1
7274
7275 );
7276
7277 and N , U_1 , and U_2 are the arguments to the most recent `glMapGrid1'
7278 command. The one absolute numeric requirement is that if I=N , then the
7279 value computed from I·ΔU+U_1 is exactly U_2 .
7280
7281 In the two-dimensional case, `glEvalPoint2', let
7282
7283 ΔU=(U_2-U_1,)/N ΔV=(V_2-V_1,)/M
7284
7285 where N , U_1 , U_2 , M , V_1 , and V_2 are the arguments to the most
7286 recent `glMapGrid2' command. Then the `glEvalPoint2' command is
7287 equivalent to calling The only absolute numeric requirements are that if
7288 I=N , then the value computed from I·ΔU+U_1 is exactly U_2 , and if J=M
7289 , then the value computed from J·ΔV+V_1 is exactly V_2 .
7290
7291
7292 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7293
7294 );")
7295
7296 (define-gl-procedures
7297 ((glFeedbackBuffer
7298 (size GLsizei)
7299 (type GLenum)
7300 (buffer GLfloat-*)
7301 ->
7302 void))
7303 "Controls feedback mode.
7304
7305 SIZE
7306 Specifies the maximum number of values that can be written into
7307 BUFFER.
7308
7309 TYPE
7310 Specifies a symbolic constant that describes the information that
7311 will be returned for each vertex. `GL_2D', `GL_3D', `GL_3D_COLOR',
7312 `GL_3D_COLOR_TEXTURE', and `GL_4D_COLOR_TEXTURE' are accepted.
7313
7314 BUFFER
7315 Returns the feedback data.
7316
7317 The `glFeedbackBuffer' function controls feedback. Feedback, like
7318 selection, is a GL mode. The mode is selected by calling `glRenderMode'
7319 with `GL_FEEDBACK'. When the GL is in feedback mode, no pixels are
7320 produced by rasterization. Instead, information about primitives that
7321 would have been rasterized is fed back to the application using the GL.
7322
7323 `glFeedbackBuffer' has three arguments: BUFFER is a pointer to an array
7324 of floating-point values into which feedback information is placed. SIZE
7325 indicates the size of the array. TYPE is a symbolic constant describing
7326 the information that is fed back for each vertex. `glFeedbackBuffer'
7327 must be issued before feedback mode is enabled (by calling
7328 `glRenderMode' with argument `GL_FEEDBACK'). Setting `GL_FEEDBACK'
7329 without establishing the feedback buffer, or calling `glFeedbackBuffer'
7330 while the GL is in feedback mode, is an error.
7331
7332 When `glRenderMode' is called while in feedback mode, it returns the
7333 number of entries placed in the feedback array and resets the feedback
7334 array pointer to the base of the feedback buffer. The returned value
7335 never exceeds SIZE. If the feedback data required more room than was
7336 available in BUFFER, `glRenderMode' returns a negative value. To take
7337 the GL out of feedback mode, call `glRenderMode' with a parameter value
7338 other than `GL_FEEDBACK'.
7339
7340 While in feedback mode, each primitive, bitmap, or pixel rectangle that
7341 would be rasterized generates a block of values that are copied into the
7342 feedback array. If doing so would cause the number of entries to exceed
7343 the maximum, the block is partially written so as to fill the array (if
7344 there is any room left at all), and an overflow flag is set. Each block
7345 begins with a code indicating the primitive type, followed by values
7346 that describe the primitive's vertices and associated data. Entries are
7347 also written for bitmaps and pixel rectangles. Feedback occurs after
7348 polygon culling and `glPolygonMode' interpretation of polygons has taken
7349 place, so polygons that are culled are not returned in the feedback
7350 buffer. It can also occur after polygons with more than three edges are
7351 broken up into triangles, if the GL implementation renders polygons by
7352 performing this decomposition.
7353
7354 The `glPassThrough' command can be used to insert a marker into the
7355 feedback buffer. See `glPassThrough'.
7356
7357 Following is the grammar for the blocks of values written into the
7358 feedback buffer. Each primitive is indicated with a unique identifying
7359 value followed by some number of vertices. Polygon entries include an
7360 integer value indicating how many vertices follow. A vertex is fed back
7361 as some number of floating-point values, as determined by TYPE. Colors
7362 are fed back as four values in RGBA mode and one value in color index
7363 mode.
7364
7365 feedbackList ← feedbackItem feedbackList | feedbackItem feedbackItem ←
7366 point | lineSegment | polygon | bitmap | pixelRectangle | passThru point
7367 ← `GL_POINT_TOKEN' vertex lineSegment ← `GL_LINE_TOKEN' vertex vertex |
7368 `GL_LINE_RESET_TOKEN' vertex vertex polygon ← `GL_POLYGON_TOKEN' n
7369 polySpec polySpec ← polySpec vertex | vertex vertex vertex bitmap ←
7370 `GL_BITMAP_TOKEN' vertex pixelRectangle ← `GL_DRAW_PIXEL_TOKEN' vertex |
7371 `GL_COPY_PIXEL_TOKEN' vertex passThru ← `GL_PASS_THROUGH_TOKEN' value
7372 vertex ← 2d | 3d | 3dColor | 3dColorTexture | 4dColorTexture 2d ← value
7373 value 3d ← value value value 3dColor ← value value value color
7374 3dColorTexture ← value value value color tex 4dColorTexture ← value
7375 value value value color tex color ← rgba | index rgba ← value value
7376 value value index ← value tex ← value value value value
7377
7378 VALUE is a floating-point number, and N is a floating-point integer
7379 giving the number of vertices in the polygon. `GL_POINT_TOKEN',
7380 `GL_LINE_TOKEN', `GL_LINE_RESET_TOKEN', `GL_POLYGON_TOKEN',
7381 `GL_BITMAP_TOKEN', `GL_DRAW_PIXEL_TOKEN', `GL_COPY_PIXEL_TOKEN' and
7382 `GL_PASS_THROUGH_TOKEN' are symbolic floating-point constants.
7383 `GL_LINE_RESET_TOKEN' is returned whenever the line stipple pattern is
7384 reset. The data returned as a vertex depends on the feedback TYPE.
7385
7386 The following table gives the correspondence between TYPE and the number
7387 of values per vertex. K is 1 in color index mode and 4 in RGBA mode.
7388
7389
7390
7391 *Type*
7392 *Coordinates*, *Color*, *Texture*, *Total Number of Values*
7393
7394 `GL_2D'
7395 X, Y, , , 2
7396
7397 `GL_3D'
7398 X, Y, Z, , , 3
7399
7400 `GL_3D_COLOR'
7401 X, Y, Z, K , , 3+K
7402
7403 `GL_3D_COLOR_TEXTURE'
7404 X, Y, Z, K , 4 , 7+K
7405
7406 `GL_4D_COLOR_TEXTURE'
7407 X, Y, Z, W, K , 4 , 8+K
7408
7409 Feedback vertex coordinates are in window coordinates, except W, which
7410 is in clip coordinates. Feedback colors are lighted, if lighting is
7411 enabled. Feedback texture coordinates are generated, if texture
7412 coordinate generation is enabled. They are always transformed by the
7413 texture matrix.
7414
7415 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
7416
7417 `GL_INVALID_VALUE' is generated if SIZE is negative.
7418
7419 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is called
7420 while the render mode is `GL_FEEDBACK', or if `glRenderMode' is called
7421 with argument `GL_FEEDBACK' before `glFeedbackBuffer' is called at least
7422 once.
7423
7424 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is executed
7425 between the execution of `glBegin' and the corresponding execution of
7426 `glEnd'.")
7427
7428 (define-gl-procedures
7429 ((glFinish -> void))
7430 "Block until all GL execution is complete.
7431
7432 `glFinish' does not return until the effects of all previously called GL
7433 commands are complete. Such effects include all changes to GL state,
7434 all changes to connection state, and all changes to the frame buffer
7435 contents.
7436
7437 `GL_INVALID_OPERATION' is generated if `glFinish' is executed between
7438 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7439
7440 (define-gl-procedures
7441 ((glFlush -> void))
7442 "Force execution of GL commands in finite time.
7443
7444 Different GL implementations buffer commands in several different
7445 locations, including network buffers and the graphics accelerator
7446 itself. `glFlush' empties all of these buffers, causing all issued
7447 commands to be executed as quickly as they are accepted by the actual
7448 rendering engine. Though this execution may not be completed in any
7449 particular time period, it does complete in finite time.
7450
7451 Because any GL program might be executed over a network, or on an
7452 accelerator that buffers commands, all programs should call `glFlush'
7453 whenever they count on having all of their previously issued commands
7454 completed. For example, call `glFlush' before waiting for user input
7455 that depends on the generated image.
7456
7457 `GL_INVALID_OPERATION' is generated if `glFlush' is executed between the
7458 execution of `glBegin' and the corresponding execution of `glEnd'.")
7459
7460 (define-gl-procedures
7461 ((glFogCoordPointer
7462 (type GLenum)
7463 (stride GLsizei)
7464 (pointer GLvoid-*)
7465 ->
7466 void))
7467 "Define an array of fog coordinates.
7468
7469 TYPE
7470 Specifies the data type of each fog coordinate. Symbolic constants
7471 `GL_FLOAT', or `GL_DOUBLE' are accepted. The initial value is
7472 `GL_FLOAT'.
7473
7474 STRIDE
7475 Specifies the byte offset between consecutive fog coordinates. If
7476 STRIDE is 0, the array elements are understood to be tightly
7477 packed. The initial value is 0.
7478
7479 POINTER
7480 Specifies a pointer to the first coordinate of the first fog
7481 coordinate in the array. The initial value is 0.
7482
7483 `glFogCoordPointer' specifies the location and data format of an array
7484 of fog coordinates to use when rendering. TYPE specifies the data type
7485 of each fog coordinate, and STRIDE specifies the byte stride from one
7486 fog coordinate to the next, allowing vertices and attributes to be
7487 packed into a single array or stored in separate arrays.
7488
7489 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
7490 target (see `glBindBuffer') while a fog coordinate array is specified,
7491 POINTER is treated as a byte offset into the buffer object's data store.
7492 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
7493 fog coordinate vertex array client-side state
7494 (`GL_FOG_COORD_ARRAY_BUFFER_BINDING').
7495
7496 When a fog coordinate array is specified, TYPE, STRIDE, and POINTER are
7497 saved as client-side state, in addition to the current vertex array
7498 buffer object binding.
7499
7500 To enable and disable the fog coordinate array, call
7501 `glEnableClientState' and `glDisableClientState' with the argument
7502 `GL_FOG_COORD_ARRAY'. If enabled, the fog coordinate array is used when
7503 `glDrawArrays', `glMultiDrawArrays', `glDrawElements',
7504 `glMultiDrawElements', `glDrawRangeElements', or `glArrayElement' is
7505 called.
7506
7507 `GL_INVALID_ENUM' is generated if TYPE is not either `GL_FLOAT' or
7508 `GL_DOUBLE'.
7509
7510 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
7511
7512 (define-gl-procedures
7513 ((glFogCoordd (coord GLdouble) -> void)
7514 (glFogCoordf (coord GLfloat) -> void)
7515 (glFogCoorddv (coord GLdouble-*) -> void)
7516 (glFogCoordfv (coord GLfloat-*) -> void))
7517 "Set the current fog coordinates.
7518
7519 COORD
7520 Specify the fog distance.
7521
7522 `glFogCoord' specifies the fog coordinate that is associated with each
7523 vertex and the current raster position. The value specified is
7524 interpolated and used in computing the fog color (see `glFog').")
7525
7526 (define-gl-procedures
7527 ((glFogf (pname GLenum) (param GLfloat) -> void)
7528 (glFogi (pname GLenum) (param GLint) -> void)
7529 (glFogfv
7530 (pname GLenum)
7531 (params const-GLfloat-*)
7532 ->
7533 void)
7534 (glFogiv
7535 (pname GLenum)
7536 (params const-GLint-*)
7537 ->
7538 void))
7539 "Specify fog parameters.
7540
7541 PNAME
7542 Specifies a single-valued fog parameter. `GL_FOG_MODE',
7543 `GL_FOG_DENSITY', `GL_FOG_START', `GL_FOG_END', `GL_FOG_INDEX', and
7544 `GL_FOG_COORD_SRC' are accepted.
7545
7546 PARAM
7547 Specifies the value that PNAME will be set to.
7548
7549 Fog is initially disabled. While enabled, fog affects rasterized
7550 geometry, bitmaps, and pixel blocks, but not buffer clear operations. To
7551 enable and disable fog, call `glEnable' and `glDisable' with argument
7552 `GL_FOG'.
7553
7554 `glFog' assigns the value or values in PARAMS to the fog parameter
7555 specified by PNAME. The following values are accepted for PNAME:
7556
7557 `GL_FOG_MODE'
7558 PARAMS is a single integer or floating-point value that specifies
7559 the equation to be used to compute the fog blend factor, F . Three
7560 symbolic constants are accepted: `GL_LINEAR', `GL_EXP', and
7561 `GL_EXP2'. The equations corresponding to these symbolic constants
7562 are defined below. The initial fog mode is `GL_EXP'.
7563
7564 `GL_FOG_DENSITY'
7565 PARAMS is a single integer or floating-point value that specifies
7566 DENSITY , the fog density used in both exponential fog equations.
7567 Only nonnegative densities are accepted. The initial fog density
7568 is 1.
7569
7570 `GL_FOG_START'
7571 PARAMS is a single integer or floating-point value that specifies
7572 START , the near distance used in the linear fog equation. The
7573 initial near distance is 0.
7574
7575 `GL_FOG_END'
7576 PARAMS is a single integer or floating-point value that specifies
7577 END , the far distance used in the linear fog equation. The
7578 initial far distance is 1.
7579
7580 `GL_FOG_INDEX'
7581 PARAMS is a single integer or floating-point value that specifies
7582 I_F , the fog color index. The initial fog index is 0.
7583
7584 `GL_FOG_COLOR'
7585 PARAMS contains four integer or floating-point values that specify
7586 C_F , the fog color. Integer values are mapped linearly such that
7587 the most positive representable value maps to 1.0, and the most
7588 negative representable value maps to -1.0 . Floating-point values
7589 are mapped directly. After conversion, all color components are
7590 clamped to the range [0,1] . The initial fog color is (0, 0, 0,
7591 0).
7592
7593 `GL_FOG_COORD_SRC'
7594 PARAMS contains either of the following symbolic constants:
7595 `GL_FOG_COORD' or `GL_FRAGMENT_DEPTH'. `GL_FOG_COORD' specifies
7596 that the current fog coordinate should be used as distance value in
7597 the fog color computation. `GL_FRAGMENT_DEPTH' specifies that the
7598 current fragment depth should be used as distance value in the fog
7599 computation.
7600
7601 Fog blends a fog color with each rasterized pixel fragment's
7602 post-texturing color using a blending factor F . Factor F is computed
7603 in one of three ways, depending on the fog mode. Let C be either the
7604 distance in eye coordinate from the origin (in the case that the
7605 `GL_FOG_COORD_SRC' is `GL_FRAGMENT_DEPTH') or the current fog coordinate
7606 (in the case that `GL_FOG_COORD_SRC' is `GL_FOG_COORD'). The equation
7607 for `GL_LINEAR' fog is F=END-C,/END-START,
7608
7609 The equation for `GL_EXP' fog is F=E^-(DENSITY·C,),
7610
7611 The equation for `GL_EXP2' fog is F=E^-(DENSITY·C,),^2
7612
7613 Regardless of the fog mode, F is clamped to the range [0,1] after it is
7614 computed. Then, if the GL is in RGBA color mode, the fragment's red,
7615 green, and blue colors, represented by C_R , are replaced by
7616
7617 C_R,^″=F×C_R+(1-F,)×C_F
7618
7619 Fog does not affect a fragment's alpha component.
7620
7621 In color index mode, the fragment's color index I_R is replaced by
7622
7623 I_R,^″=I_R+(1-F,)×I_F
7624
7625
7626
7627 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value, or if
7628 PNAME is `GL_FOG_MODE' and PARAMS is not an accepted value.
7629
7630 `GL_INVALID_VALUE' is generated if PNAME is `GL_FOG_DENSITY' and PARAMS
7631 is negative.
7632
7633 `GL_INVALID_OPERATION' is generated if `glFog' is executed between the
7634 execution of `glBegin' and the corresponding execution of `glEnd'.")
7635
7636 (define-gl-procedures
7637 ((glFrontFace (mode GLenum) -> void))
7638 "Define front- and back-facing polygons.
7639
7640 MODE
7641 Specifies the orientation of front-facing polygons. `GL_CW' and
7642 `GL_CCW' are accepted. The initial value is `GL_CCW'.
7643
7644 In a scene composed entirely of opaque closed surfaces, back-facing
7645 polygons are never visible. Eliminating these invisible polygons has
7646 the obvious benefit of speeding up the rendering of the image. To
7647 enable and disable elimination of back-facing polygons, call `glEnable'
7648 and `glDisable' with argument `GL_CULL_FACE'.
7649
7650 The projection of a polygon to window coordinates is said to have
7651 clockwise winding if an imaginary object following the path from its
7652 first vertex, its second vertex, and so on, to its last vertex, and
7653 finally back to its first vertex, moves in a clockwise direction about
7654 the interior of the polygon. The polygon's winding is said to be
7655 counterclockwise if the imaginary object following the same path moves
7656 in a counterclockwise direction about the interior of the polygon.
7657 `glFrontFace' specifies whether polygons with clockwise winding in
7658 window coordinates, or counterclockwise winding in window coordinates,
7659 are taken to be front-facing. Passing `GL_CCW' to MODE selects
7660 counterclockwise polygons as front-facing; `GL_CW' selects clockwise
7661 polygons as front-facing. By default, counterclockwise polygons are
7662 taken to be front-facing.
7663
7664 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
7665
7666 `GL_INVALID_OPERATION' is generated if `glFrontFace' is executed between
7667 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7668
7669 (define-gl-procedures
7670 ((glFrustum
7671 (left GLdouble)
7672 (right GLdouble)
7673 (bottom GLdouble)
7674 (top GLdouble)
7675 (nearVal GLdouble)
7676 (farVal GLdouble)
7677 ->
7678 void))
7679 "Multiply the current matrix by a perspective matrix.
7680
7681 LEFT
7682 RIGHT
7683
7684 Specify the coordinates for the left and right vertical clipping
7685 planes.
7686
7687 BOTTOM
7688 TOP
7689
7690 Specify the coordinates for the bottom and top horizontal clipping
7691 planes.
7692
7693 NEARVAL
7694 FARVAL
7695
7696 Specify the distances to the near and far depth clipping planes.
7697 Both distances must be positive.
7698
7699 `glFrustum' describes a perspective matrix that produces a perspective
7700 projection. The current matrix (see `glMatrixMode') is multiplied by
7701 this matrix and the result replaces the current matrix, as if
7702 `glMultMatrix' were called with the following matrix as its argument:
7703
7704
7705
7706 [(2\u2062NEARVAL,/RIGHT-LEFT,, 0 A 0), (0 2\u2062NEARVAL,/TOP-BOTTOM,, B 0), (0 0
7707 C D), (0 0 -1 0),]
7708
7709 A=RIGHT+LEFT,/RIGHT-LEFT,
7710
7711 B=TOP+BOTTOM,/TOP-BOTTOM,
7712
7713 C=-FARVAL+NEARVAL,/FARVAL-NEARVAL,,
7714
7715 D=-2\u2062FARVAL\u2062NEARVAL,/FARVAL-NEARVAL,,
7716
7717
7718
7719 Typically, the matrix mode is `GL_PROJECTION', and (LEFT,BOTTOM-NEARVAL)
7720 and (RIGHT,TOP-NEARVAL) specify the points on the near clipping plane
7721 that are mapped to the lower left and upper right corners of the window,
7722 assuming that the eye is located at (0, 0, 0). -FARVAL specifies the
7723 location of the far clipping plane. Both NEARVAL and FARVAL must be
7724 positive.
7725
7726 Use `glPushMatrix' and `glPopMatrix' to save and restore the current
7727 matrix stack.
7728
7729 `GL_INVALID_VALUE' is generated if NEARVAL or FARVAL is not positive, or
7730 if LEFT = RIGHT, or BOTTOM = TOP, or NEAR = FAR.
7731
7732 `GL_INVALID_OPERATION' is generated if `glFrustum' is executed between
7733 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7734
7735 (define-gl-procedures
7736 ((glGenBuffers
7737 (n GLsizei)
7738 (buffers GLuint-*)
7739 ->
7740 void))
7741 "Generate buffer object names.
7742
7743 N
7744 Specifies the number of buffer object names to be generated.
7745
7746 BUFFERS
7747 Specifies an array in which the generated buffer object names are
7748 stored.
7749
7750 `glGenBuffers' returns N buffer object names in BUFFERS. There is no
7751 guarantee that the names form a contiguous set of integers; however, it
7752 is guaranteed that none of the returned names was in use immediately
7753 before the call to `glGenBuffers'.
7754
7755 Buffer object names returned by a call to `glGenBuffers' are not
7756 returned by subsequent calls, unless they are first deleted with
7757 `glDeleteBuffers'.
7758
7759 No buffer objects are associated with the returned buffer object names
7760 until they are first bound by calling `glBindBuffer'.
7761
7762 `GL_INVALID_VALUE' is generated if N is negative.
7763
7764 `GL_INVALID_OPERATION' is generated if `glGenBuffers' is executed
7765 between the execution of `glBegin' and the corresponding execution of
7766 `glEnd'.")
7767
7768 (define-gl-procedures
7769 ((glGenLists (range GLsizei) -> GLuint))
7770 "Generate a contiguous set of empty display lists.
7771
7772 RANGE
7773 Specifies the number of contiguous empty display lists to be
7774 generated.
7775
7776 `glGenLists' has one argument, RANGE. It returns an integer N such that
7777 RANGE contiguous empty display lists, named N , N+1 , ... , N+RANGE-1 ,
7778 are created. If RANGE is 0, if there is no group of RANGE contiguous
7779 names available, or if any error is generated, no display lists are
7780 generated, and 0 is returned.
7781
7782 `GL_INVALID_VALUE' is generated if RANGE is negative.
7783
7784 `GL_INVALID_OPERATION' is generated if `glGenLists' is executed between
7785 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7786
7787 (define-gl-procedures
7788 ((glGenQueries (n GLsizei) (ids GLuint-*) -> void))
7789 "Generate query object names.
7790
7791 N
7792 Specifies the number of query object names to be generated.
7793
7794 IDS
7795 Specifies an array in which the generated query object names are
7796 stored.
7797
7798 `glGenQueries' returns N query object names in IDS. There is no
7799 guarantee that the names form a contiguous set of integers; however, it
7800 is guaranteed that none of the returned names was in use immediately
7801 before the call to `glGenQueries'.
7802
7803 Query object names returned by a call to `glGenQueries' are not returned
7804 by subsequent calls, unless they are first deleted with
7805 `glDeleteQueries'.
7806
7807 No query objects are associated with the returned query object names
7808 until they are first used by calling `glBeginQuery'.
7809
7810 `GL_INVALID_VALUE' is generated if N is negative.
7811
7812 `GL_INVALID_OPERATION' is generated if `glGenQueries' is executed
7813 between the execution of `glBegin' and the corresponding execution of
7814 `glEnd'.")
7815
7816 (define-gl-procedures
7817 ((glGenTextures
7818 (n GLsizei)
7819 (textures GLuint-*)
7820 ->
7821 void))
7822 "Generate texture names.
7823
7824 N
7825 Specifies the number of texture names to be generated.
7826
7827 TEXTURES
7828 Specifies an array in which the generated texture names are stored.
7829
7830 `glGenTextures' returns N texture names in TEXTURES. There is no
7831 guarantee that the names form a contiguous set of integers; however, it
7832 is guaranteed that none of the returned names was in use immediately
7833 before the call to `glGenTextures'.
7834
7835 The generated textures have no dimensionality; they assume the
7836 dimensionality of the texture target to which they are first bound (see
7837 `glBindTexture').
7838
7839 Texture names returned by a call to `glGenTextures' are not returned by
7840 subsequent calls, unless they are first deleted with `glDeleteTextures'.
7841
7842 `GL_INVALID_VALUE' is generated if N is negative.
7843
7844 `GL_INVALID_OPERATION' is generated if `glGenTextures' is executed
7845 between the execution of `glBegin' and the corresponding execution of
7846 `glEnd'.")
7847
7848 (define-gl-procedures
7849 ((glGetActiveAttrib
7850 (program GLuint)
7851 (index GLuint)
7852 (bufSize GLsizei)
7853 (length GLsizei-*)
7854 (size GLint-*)
7855 (type GLenum-*)
7856 (name GLchar-*)
7857 ->
7858 void))
7859 "Returns information about an active attribute variable for the specified
7860 program object.
7861
7862 PROGRAM
7863 Specifies the program object to be queried.
7864
7865 INDEX
7866 Specifies the index of the attribute variable to be queried.
7867
7868 BUFSIZE
7869 Specifies the maximum number of characters OpenGL is allowed to
7870 write in the character buffer indicated by NAME.
7871
7872 LENGTH
7873 Returns the number of characters actually written by OpenGL in the
7874 string indicated by NAME (excluding the null terminator) if a value
7875 other than `NULL' is passed.
7876
7877 SIZE
7878 Returns the size of the attribute variable.
7879
7880 TYPE
7881 Returns the data type of the attribute variable.
7882
7883 NAME
7884 Returns a null terminated string containing the name of the
7885 attribute variable.
7886
7887 `glGetActiveAttrib' returns information about an active attribute
7888 variable in the program object specified by PROGRAM. The number of
7889 active attributes can be obtained by calling `glGetProgram' with the
7890 value `GL_ACTIVE_ATTRIBUTES'. A value of 0 for INDEX selects the first
7891 active attribute variable. Permissible values for INDEX range from 0 to
7892 the number of active attribute variables minus 1.
7893
7894 A vertex shader may use either built-in attribute variables,
7895 user-defined attribute variables, or both. Built-in attribute variables
7896 have a prefix of \"gl_\" and reference conventional OpenGL vertex
7897 attribtes (e.g., GL_VERTEX, GL_NORMAL, etc., see the OpenGL Shading
7898 Language specification for a complete list.) User-defined attribute
7899 variables have arbitrary names and obtain their values through numbered
7900 generic vertex attributes. An attribute variable (either built-in or
7901 user-defined) is considered active if it is determined during the link
7902 operation that it may be accessed during program execution. Therefore,
7903 PROGRAM should have previously been the target of a call to
7904 `glLinkProgram', but it is not necessary for it to have been linked
7905 successfully.
7906
7907 The size of the character buffer required to store the longest attribute
7908 variable name in PROGRAM can be obtained by calling `glGetProgram' with
7909 the value `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH'. This value should be used
7910 to allocate a buffer of sufficient size to store the returned attribute
7911 name. The size of this character buffer is passed in BUFSIZE, and a
7912 pointer to this character buffer is passed in NAME.
7913
7914 `glGetActiveAttrib' returns the name of the attribute variable indicated
7915 by INDEX, storing it in the character buffer specified by NAME. The
7916 string returned will be null terminated. The actual number of
7917 characters written into this buffer is returned in LENGTH, and this
7918 count does not include the null termination character. If the length of
7919 the returned string is not required, a value of `NULL' can be passed in
7920 the LENGTH argument.
7921
7922 The TYPE argument will return a pointer to the attribute variable's data
7923 type. The symbolic constants `GL_FLOAT', `GL_FLOAT_VEC2',
7924 `GL_FLOAT_VEC3', `GL_FLOAT_VEC4', `GL_FLOAT_MAT2', `GL_FLOAT_MAT3',
7925 `GL_FLOAT_MAT4', `GL_FLOAT_MAT2x3', `GL_FLOAT_MAT2x4',
7926 `GL_FLOAT_MAT3x2', `GL_FLOAT_MAT3x4', `GL_FLOAT_MAT4x2', or
7927 `GL_FLOAT_MAT4x3' may be returned. The SIZE argument will return the
7928 size of the attribute, in units of the type returned in TYPE.
7929
7930 The list of active attribute variables may include both built-in
7931 attribute variables (which begin with the prefix \"gl_\") as well as
7932 user-defined attribute variable names.
7933
7934 This function will return as much information as it can about the
7935 specified active attribute variable. If no information is available,
7936 LENGTH will be 0, and NAME will be an empty string. This situation
7937 could occur if this function is called after a link operation that
7938 failed. If an error occurs, the return values LENGTH, SIZE, TYPE, and
7939 NAME will be unmodified.
7940
7941 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
7942 OpenGL.
7943
7944 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
7945
7946 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to the
7947 number of active attribute variables in PROGRAM.
7948
7949 `GL_INVALID_OPERATION' is generated if `glGetActiveAttrib' is executed
7950 between the execution of `glBegin' and the corresponding execution of
7951 `glEnd'.
7952
7953 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.")
7954
7955 (define-gl-procedures
7956 ((glGetActiveUniform
7957 (program GLuint)
7958 (index GLuint)
7959 (bufSize GLsizei)
7960 (length GLsizei-*)
7961 (size GLint-*)
7962 (type GLenum-*)
7963 (name GLchar-*)
7964 ->
7965 void))
7966 "Returns information about an active uniform variable for the specified
7967 program object.
7968
7969 PROGRAM
7970 Specifies the program object to be queried.
7971
7972 INDEX
7973 Specifies the index of the uniform variable to be queried.
7974
7975 BUFSIZE
7976 Specifies the maximum number of characters OpenGL is allowed to
7977 write in the character buffer indicated by NAME.
7978
7979 LENGTH
7980 Returns the number of characters actually written by OpenGL in the
7981 string indicated by NAME (excluding the null terminator) if a value
7982 other than `NULL' is passed.
7983
7984 SIZE
7985 Returns the size of the uniform variable.
7986
7987 TYPE
7988 Returns the data type of the uniform variable.
7989
7990 NAME
7991 Returns a null terminated string containing the name of the uniform
7992 variable.
7993
7994 `glGetActiveUniform' returns information about an active uniform
7995 variable in the program object specified by PROGRAM. The number of
7996 active uniform variables can be obtained by calling `glGetProgram' with
7997 the value `GL_ACTIVE_UNIFORMS'. A value of 0 for INDEX selects the
7998 first active uniform variable. Permissible values for INDEX range from
7999 0 to the number of active uniform variables minus 1.
8000
8001 Shaders may use either built-in uniform variables, user-defined uniform
8002 variables, or both. Built-in uniform variables have a prefix of \"gl_\"
8003 and reference existing OpenGL state or values derived from such state
8004 (e.g., GL_FOG, GL_MODELVIEWMATRIX, etc., see the OpenGL Shading Language
8005 specification for a complete list.) User-defined uniform variables have
8006 arbitrary names and obtain their values from the application through
8007 calls to `glUniform'. A uniform variable (either built-in or
8008 user-defined) is considered active if it is determined during the link
8009 operation that it may be accessed during program execution. Therefore,
8010 PROGRAM should have previously been the target of a call to
8011 `glLinkProgram', but it is not necessary for it to have been linked
8012 successfully.
8013
8014 The size of the character buffer required to store the longest uniform
8015 variable name in PROGRAM can be obtained by calling `glGetProgram' with
8016 the value `GL_ACTIVE_UNIFORM_MAX_LENGTH'. This value should be used to
8017 allocate a buffer of sufficient size to store the returned uniform
8018 variable name. The size of this character buffer is passed in BUFSIZE,
8019 and a pointer to this character buffer is passed in NAME.
8020
8021 `glGetActiveUniform' returns the name of the uniform variable indicated
8022 by INDEX, storing it in the character buffer specified by NAME. The
8023 string returned will be null terminated. The actual number of
8024 characters written into this buffer is returned in LENGTH, and this
8025 count does not include the null termination character. If the length of
8026 the returned string is not required, a value of `NULL' can be passed in
8027 the LENGTH argument.
8028
8029 The TYPE argument will return a pointer to the uniform variable's data
8030 type. The symbolic constants `GL_FLOAT', `GL_FLOAT_VEC2',
8031 `GL_FLOAT_VEC3', `GL_FLOAT_VEC4', `GL_INT', `GL_INT_VEC2',
8032 `GL_INT_VEC3', `GL_INT_VEC4', `GL_BOOL', `GL_BOOL_VEC2', `GL_BOOL_VEC3',
8033 `GL_BOOL_VEC4', `GL_FLOAT_MAT2', `GL_FLOAT_MAT3', `GL_FLOAT_MAT4',
8034 `GL_FLOAT_MAT2x3', `GL_FLOAT_MAT2x4', `GL_FLOAT_MAT3x2',
8035 `GL_FLOAT_MAT3x4', `GL_FLOAT_MAT4x2', `GL_FLOAT_MAT4x3',
8036 `GL_SAMPLER_1D', `GL_SAMPLER_2D', `GL_SAMPLER_3D', `GL_SAMPLER_CUBE',
8037 `GL_SAMPLER_1D_SHADOW', or `GL_SAMPLER_2D_SHADOW' may be returned.
8038
8039 If one or more elements of an array are active, the name of the array is
8040 returned in NAME, the type is returned in TYPE, and the SIZE parameter
8041 returns the highest array element index used, plus one, as determined by
8042 the compiler and/or linker. Only one active uniform variable will be
8043 reported for a uniform array.
8044
8045 Uniform variables that are declared as structures or arrays of
8046 structures will not be returned directly by this function. Instead,
8047 each of these uniform variables will be reduced to its fundamental
8048 components containing the \".\" and \"[]\" operators such that each of the
8049 names is valid as an argument to `glGetUniformLocation'. Each of these
8050 reduced uniform variables is counted as one active uniform variable and
8051 is assigned an index. A valid name cannot be a structure, an array of
8052 structures, or a subcomponent of a vector or matrix.
8053
8054 The size of the uniform variable will be returned in SIZE. Uniform
8055 variables other than arrays will have a size of 1. Structures and
8056 arrays of structures will be reduced as described earlier, such that
8057 each of the names returned will be a data type in the earlier list. If
8058 this reduction results in an array, the size returned will be as
8059 described for uniform arrays; otherwise, the size returned will be 1.
8060
8061 The list of active uniform variables may include both built-in uniform
8062 variables (which begin with the prefix \"gl_\") as well as user-defined
8063 uniform variable names.
8064
8065 This function will return as much information as it can about the
8066 specified active uniform variable. If no information is available,
8067 LENGTH will be 0, and NAME will be an empty string. This situation
8068 could occur if this function is called after a link operation that
8069 failed. If an error occurs, the return values LENGTH, SIZE, TYPE, and
8070 NAME will be unmodified.
8071
8072 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
8073 OpenGL.
8074
8075 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
8076
8077 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to the
8078 number of active uniform variables in PROGRAM.
8079
8080 `GL_INVALID_OPERATION' is generated if `glGetActiveUniform' is executed
8081 between the execution of `glBegin' and the corresponding execution of
8082 `glEnd'.
8083
8084 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.")
8085
8086 (define-gl-procedures
8087 ((glGetAttachedShaders
8088 (program GLuint)
8089 (maxCount GLsizei)
8090 (count GLsizei-*)
8091 (shaders GLuint-*)
8092 ->
8093 void))
8094 "Returns the handles of the shader objects attached to a program object.
8095
8096 PROGRAM
8097 Specifies the program object to be queried.
8098
8099 MAXCOUNT
8100 Specifies the size of the array for storing the returned object
8101 names.
8102
8103 COUNT
8104 Returns the number of names actually returned in OBJECTS.
8105
8106 SHADERS
8107 Specifies an array that is used to return the names of attached
8108 shader objects.
8109
8110 `glGetAttachedShaders' returns the names of the shader objects attached
8111 to PROGRAM. The names of shader objects that are attached to PROGRAM
8112 will be returned in SHADERS. The actual number of shader names written
8113 into SHADERS is returned in COUNT. If no shader objects are attached to
8114 PROGRAM, COUNT is set to 0. The maximum number of shader names that may
8115 be returned in SHADERS is specified by MAXCOUNT.
8116
8117 If the number of names actually returned is not required (for instance,
8118 if it has just been obtained by calling `glGetProgram'), a value of
8119 `NULL' may be passed for count. If no shader objects are attached to
8120 PROGRAM, a value of 0 will be returned in COUNT. The actual number of
8121 attached shaders can be obtained by calling `glGetProgram' with the
8122 value `GL_ATTACHED_SHADERS'.
8123
8124 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
8125 OpenGL.
8126
8127 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
8128
8129 `GL_INVALID_VALUE' is generated if MAXCOUNT is less than 0.
8130
8131 `GL_INVALID_OPERATION' is generated if `glGetAttachedShaders' is
8132 executed between the execution of `glBegin' and the corresponding
8133 execution of `glEnd'.")
8134
8135 (define-gl-procedures
8136 ((glGetAttribLocation
8137 (program GLuint)
8138 (name const-GLchar-*)
8139 ->
8140 GLint))
8141 "Returns the location of an attribute variable.
8142
8143 PROGRAM
8144 Specifies the program object to be queried.
8145
8146 NAME
8147 Points to a null terminated string containing the name of the
8148 attribute variable whose location is to be queried.
8149
8150 `glGetAttribLocation' queries the previously linked program object
8151 specified by PROGRAM for the attribute variable specified by NAME and
8152 returns the index of the generic vertex attribute that is bound to that
8153 attribute variable. If NAME is a matrix attribute variable, the index
8154 of the first column of the matrix is returned. If the named attribute
8155 variable is not an active attribute in the specified program object or
8156 if NAME starts with the reserved prefix \"gl_\", a value of -1 is
8157 returned.
8158
8159 The association between an attribute variable name and a generic
8160 attribute index can be specified at any time by calling
8161 `glBindAttribLocation'. Attribute bindings do not go into effect until
8162 `glLinkProgram' is called. After a program object has been linked
8163 successfully, the index values for attribute variables remain fixed
8164 until the next link command occurs. The attribute values can only be
8165 queried after a link if the link was successful. `glGetAttribLocation'
8166 returns the binding that actually went into effect the last time
8167 `glLinkProgram' was called for the specified program object. Attribute
8168 bindings that have been specified since the last link operation are not
8169 returned by `glGetAttribLocation'.
8170
8171 `GL_INVALID_OPERATION' is generated if PROGRAM is not a value generated
8172 by OpenGL.
8173
8174 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
8175
8176 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
8177 linked.
8178
8179 `GL_INVALID_OPERATION' is generated if `glGetAttribLocation' is executed
8180 between the execution of `glBegin' and the corresponding execution of
8181 `glEnd'.")
8182
8183 (define-gl-procedures
8184 ((glGetBufferParameteriv
8185 (target GLenum)
8186 (value GLenum)
8187 (data GLint-*)
8188 ->
8189 void))
8190 "Return parameters of a buffer object.
8191
8192 TARGET
8193 Specifies the target buffer object. The symbolic constant must be
8194 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
8195 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
8196
8197 VALUE
8198 Specifies the symbolic name of a buffer object parameter. Accepted
8199 values are `GL_BUFFER_ACCESS', `GL_BUFFER_MAPPED',
8200 `GL_BUFFER_SIZE', or `GL_BUFFER_USAGE'.
8201
8202 DATA
8203 Returns the requested parameter.
8204
8205 `glGetBufferParameteriv' returns in DATA a selected parameter of the
8206 buffer object specified by TARGET.
8207
8208 VALUE names a specific buffer object parameter, as follows:
8209
8210 `GL_BUFFER_ACCESS'
8211 PARAMS returns the access policy set while mapping the buffer
8212 object. The initial value is `GL_READ_WRITE'.
8213
8214 `GL_BUFFER_MAPPED'
8215 PARAMS returns a flag indicating whether the buffer object is
8216 currently mapped. The initial value is `GL_FALSE'.
8217
8218 `GL_BUFFER_SIZE'
8219 PARAMS returns the size of the buffer object, measured in bytes.
8220 The initial value is 0.
8221
8222 `GL_BUFFER_USAGE'
8223 PARAMS returns the buffer object's usage pattern. The initial
8224 value is `GL_STATIC_DRAW'.
8225
8226 `GL_INVALID_ENUM' is generated if TARGET or VALUE is not an accepted
8227 value.
8228
8229 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
8230 is bound to TARGET.
8231
8232 `GL_INVALID_OPERATION' is generated if `glGetBufferParameteriv' is
8233 executed between the execution of `glBegin' and the corresponding
8234 execution of `glEnd'.")
8235
8236 (define-gl-procedures
8237 ((glGetBufferPointerv
8238 (target GLenum)
8239 (pname GLenum)
8240 (params GLvoid-**)
8241 ->
8242 void))
8243 "Return the pointer to a mapped buffer object's data store.
8244
8245 TARGET
8246 Specifies the target buffer object. The symbolic constant must be
8247 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
8248 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
8249
8250 PNAME
8251 Specifies the pointer to be returned. The symbolic constant must
8252 be `GL_BUFFER_MAP_POINTER'.
8253
8254 PARAMS
8255 Returns the pointer value specified by PNAME.
8256
8257 `glGetBufferPointerv' returns pointer information. PNAME is a symbolic
8258 constant indicating the pointer to be returned, which must be
8259 `GL_BUFFER_MAP_POINTER', the pointer to which the buffer object's data
8260 store is mapped. If the data store is not currently mapped, `NULL' is
8261 returned. PARAMS is a pointer to a location in which to place the
8262 returned pointer value.
8263
8264 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
8265 value.
8266
8267 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
8268 is bound to TARGET.
8269
8270 `GL_INVALID_OPERATION' is generated if `glGetBufferPointerv' is executed
8271 between the execution of `glBegin' and the corresponding execution of
8272 `glEnd'.")
8273
8274 (define-gl-procedures
8275 ((glGetBufferSubData
8276 (target GLenum)
8277 (offset GLintptr)
8278 (size GLsizeiptr)
8279 (data GLvoid-*)
8280 ->
8281 void))
8282 "Returns a subset of a buffer object's data store.
8283
8284 TARGET
8285 Specifies the target buffer object. The symbolic constant must be
8286 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
8287 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
8288
8289 OFFSET
8290 Specifies the offset into the buffer object's data store from which
8291 data will be returned, measured in bytes.
8292
8293 SIZE
8294 Specifies the size in bytes of the data store region being
8295 returned.
8296
8297 DATA
8298 Specifies a pointer to the location where buffer object data is
8299 returned.
8300
8301 `glGetBufferSubData' returns some or all of the data from the buffer
8302 object currently bound to TARGET. Data starting at byte offset OFFSET
8303 and extending for SIZE bytes is copied from the data store to the memory
8304 pointed to by DATA. An error is thrown if the buffer object is
8305 currently mapped, or if OFFSET and SIZE together define a range beyond
8306 the bounds of the buffer object's data store.
8307
8308 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
8309 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
8310 `GL_PIXEL_UNPACK_BUFFER'.
8311
8312 `GL_INVALID_VALUE' is generated if OFFSET or SIZE is negative, or if
8313 together they define a region of memory that extends beyond the buffer
8314 object's allocated data store.
8315
8316 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
8317 is bound to TARGET.
8318
8319 `GL_INVALID_OPERATION' is generated if the buffer object being queried
8320 is mapped.
8321
8322 `GL_INVALID_OPERATION' is generated if `glGetBufferSubData' is executed
8323 between the execution of `glBegin' and the corresponding execution of
8324 `glEnd'.")
8325
8326 (define-gl-procedures
8327 ((glGetClipPlane
8328 (plane GLenum)
8329 (equation GLdouble-*)
8330 ->
8331 void))
8332 "Return the coefficients of the specified clipping plane.
8333
8334 PLANE
8335 Specifies a clipping plane. The number of clipping planes depends
8336 on the implementation, but at least six clipping planes are
8337 supported. They are identified by symbolic names of the form
8338 `GL_CLIP_PLANE' I where i ranges from 0 to the value of
8339 `GL_MAX_CLIP_PLANES' - 1.
8340
8341 EQUATION
8342 Returns four double-precision values that are the coefficients of
8343 the plane equation of PLANE in eye coordinates. The initial value
8344 is (0, 0, 0, 0).
8345
8346 `glGetClipPlane' returns in EQUATION the four coefficients of the plane
8347 equation for PLANE.
8348
8349 `GL_INVALID_ENUM' is generated if PLANE is not an accepted value.
8350
8351 `GL_INVALID_OPERATION' is generated if `glGetClipPlane' is executed
8352 between the execution of `glBegin' and the corresponding execution of
8353 `glEnd'.")
8354
8355 (define-gl-procedures
8356 ((glGetColorTableParameterfv
8357 (target GLenum)
8358 (pname GLenum)
8359 (params GLfloat-*)
8360 ->
8361 void)
8362 (glGetColorTableParameteriv
8363 (target GLenum)
8364 (pname GLenum)
8365 (params GLint-*)
8366 ->
8367 void))
8368 "Get color lookup table parameters.
8369
8370 TARGET
8371 The target color table. Must be `GL_COLOR_TABLE',
8372 `GL_POST_CONVOLUTION_COLOR_TABLE',
8373 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `GL_PROXY_COLOR_TABLE',
8374 `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
8375 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
8376
8377 PNAME
8378 The symbolic name of a color lookup table parameter. Must be one
8379 of `GL_COLOR_TABLE_BIAS', `GL_COLOR_TABLE_SCALE',
8380 `GL_COLOR_TABLE_FORMAT', `GL_COLOR_TABLE_WIDTH',
8381 `GL_COLOR_TABLE_RED_SIZE', `GL_COLOR_TABLE_GREEN_SIZE',
8382 `GL_COLOR_TABLE_BLUE_SIZE', `GL_COLOR_TABLE_ALPHA_SIZE',
8383 `GL_COLOR_TABLE_LUMINANCE_SIZE', or
8384 `GL_COLOR_TABLE_INTENSITY_SIZE'.
8385
8386 PARAMS
8387 A pointer to an array where the values of the parameter will be
8388 stored.
8389
8390 Returns parameters specific to color table TARGET.
8391
8392 When PNAME is set to `GL_COLOR_TABLE_SCALE' or `GL_COLOR_TABLE_BIAS',
8393 `glGetColorTableParameter' returns the color table scale or bias
8394 parameters for the table specified by TARGET. For these queries, TARGET
8395 must be set to `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
8396 `GL_POST_COLOR_MATRIX_COLOR_TABLE' and PARAMS points to an array of four
8397 elements, which receive the scale or bias factors for red, green, blue,
8398 and alpha, in that order.
8399
8400 `glGetColorTableParameter' can also be used to retrieve the format and
8401 size parameters for a color table. For these queries, set TARGET to
8402 either the color table target or the proxy color table target. The
8403 format and size parameters are set by `glColorTable'.
8404
8405 The following table lists the format and size parameters that may be
8406 queried. For each symbolic constant listed below for PNAME, PARAMS must
8407 point to an array of the given length and receive the values indicated.
8408
8409
8410
8411 *Parameter*
8412 *N*, *Meaning*
8413
8414 `GL_COLOR_TABLE_FORMAT'
8415 1 , Internal format (e.g., `GL_RGBA')
8416
8417 `GL_COLOR_TABLE_WIDTH'
8418 1 , Number of elements in table
8419
8420 `GL_COLOR_TABLE_RED_SIZE'
8421 1 , Size of red component, in bits
8422
8423 `GL_COLOR_TABLE_GREEN_SIZE'
8424 1 , Size of green component
8425
8426 `GL_COLOR_TABLE_BLUE_SIZE'
8427 1 , Size of blue component
8428
8429 `GL_COLOR_TABLE_ALPHA_SIZE'
8430 1 , Size of alpha component
8431
8432 `GL_COLOR_TABLE_LUMINANCE_SIZE'
8433 1 , Size of luminance component
8434
8435 `GL_COLOR_TABLE_INTENSITY_SIZE'
8436 1 , Size of intensity component
8437
8438
8439
8440 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an acceptable
8441 value.
8442
8443 `GL_INVALID_OPERATION' is generated if `glGetColorTableParameter' is
8444 executed between the execution of `glBegin' and the corresponding
8445 execution of `glEnd'.")
8446
8447 (define-gl-procedures
8448 ((glGetColorTable
8449 (target GLenum)
8450 (format GLenum)
8451 (type GLenum)
8452 (table GLvoid-*)
8453 ->
8454 void))
8455 "Retrieve contents of a color lookup table.
8456
8457 TARGET
8458 Must be `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
8459 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
8460
8461 FORMAT
8462 The format of the pixel data in TABLE. The possible values are
8463 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
8464 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
8465
8466 TYPE
8467 The type of the pixel data in TABLE. Symbolic constants
8468 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8469 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
8470 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8471 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
8472 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8473 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8474 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8475 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
8476 are accepted.
8477
8478 TABLE
8479 Pointer to a one-dimensional array of pixel data containing the
8480 contents of the color table.
8481
8482 `glGetColorTable' returns in TABLE the contents of the color table
8483 specified by TARGET. No pixel transfer operations are performed, but
8484 pixel storage modes that are applicable to `glReadPixels' are performed.
8485
8486 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8487 target (see `glBindBuffer') while a histogram table is requested, TABLE
8488 is treated as a byte offset into the buffer object's data store.
8489
8490 Color components that are requested in the specified FORMAT, but which
8491 are not included in the internal format of the color lookup table, are
8492 returned as zero. The assignments of internal color components to the
8493 components requested by FORMAT are
8494
8495 *Internal Component*
8496 *Resulting Component*
8497
8498 Red
8499 Red
8500
8501 Green
8502 Green
8503
8504 Blue
8505 Blue
8506
8507 Alpha
8508 Alpha
8509
8510 Luminance
8511 Red
8512
8513 Intensity
8514 Red
8515
8516
8517
8518 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8519 values.
8520
8521 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
8522 values.
8523
8524 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
8525 values.
8526
8527 `GL_INVALID_OPERATION' is generated if TYPE is one of
8528 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8529 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
8530 is not `GL_RGB'.
8531
8532 `GL_INVALID_OPERATION' is generated if TYPE is one of
8533 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8534 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8535 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8536 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
8537 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
8538
8539 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8540 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8541 store is currently mapped.
8542
8543 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8544 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8545 to the buffer object such that the memory writes required would exceed
8546 the data store size.
8547
8548 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8549 bound to the `GL_PIXEL_PACK_BUFFER' target and TABLE is not evenly
8550 divisible into the number of bytes needed to store in memory a datum
8551 indicated by TYPE.
8552
8553 `GL_INVALID_OPERATION' is generated if `glGetColorTable' is executed
8554 between the execution of `glBegin' and the corresponding execution of
8555 `glEnd'.")
8556
8557 (define-gl-procedures
8558 ((glGetCompressedTexImage
8559 (target GLenum)
8560 (lod GLint)
8561 (img GLvoid-*)
8562 ->
8563 void))
8564 "Return a compressed texture image.
8565
8566 TARGET
8567 Specifies which texture is to be obtained. `GL_TEXTURE_1D',
8568 `GL_TEXTURE_2D', and
8569 `GL_TEXTURE_3D'`GL_TEXTURE_CUBE_MAP_POSITIVE_X',
8570 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
8571 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
8572 and `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z' are accepted.
8573
8574 LOD
8575 Specifies the level-of-detail number of the desired image. Level 0
8576 is the base image level. Level N is the N th mipmap reduction
8577 image.
8578
8579 IMG
8580 Returns the compressed texture image.
8581
8582 `glGetCompressedTexImage' returns the compressed texture image
8583 associated with TARGET and LOD into IMG. IMG should be an array of
8584 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' bytes. TARGET specifies whether the
8585 desired texture image was one specified by `glTexImage1D'
8586 (`GL_TEXTURE_1D'), `glTexImage2D' (`GL_TEXTURE_2D' or any of
8587 `GL_TEXTURE_CUBE_MAP_*'), or `glTexImage3D' (`GL_TEXTURE_3D'). LOD
8588 specifies the level-of-detail number of the desired image.
8589
8590 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8591 target (see `glBindBuffer') while a texture image is requested, IMG is
8592 treated as a byte offset into the buffer object's data store.
8593
8594 To minimize errors, first verify that the texture is compressed by
8595 calling `glGetTexLevelParameter' with argument `GL_TEXTURE_COMPRESSED'.
8596 If the texture is compressed, then determine the amount of memory
8597 required to store the compressed texture by calling
8598 `glGetTexLevelParameter' with argument
8599 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE'. Finally, retrieve the internal
8600 format of the texture by calling `glGetTexLevelParameter' with argument
8601 `GL_TEXTURE_INTERNAL_FORMAT'. To store the texture for later use,
8602 associate the internal format and size with the retrieved texture image.
8603 These data can be used by the respective texture or subtexture loading
8604 routine used for loading TARGET textures.
8605
8606 `GL_INVALID_VALUE' is generated if LOD is less than zero or greater than
8607 the maximum number of LODs permitted by the implementation.
8608
8609 `GL_INVALID_OPERATION' is generated if `glGetCompressedTexImage' is used
8610 to retrieve a texture that is in an uncompressed internal format.
8611
8612 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8613 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8614 store is currently mapped.
8615
8616 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8617 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8618 to the buffer object such that the memory writes required would exceed
8619 the data store size.
8620
8621 `GL_INVALID_OPERATION' is generated if `glGetCompressedTexImage' is
8622 executed between the execution of `glBegin' and the corresponding
8623 execution of `glEnd'.")
8624
8625 (define-gl-procedures
8626 ((glGetConvolutionFilter
8627 (target GLenum)
8628 (format GLenum)
8629 (type GLenum)
8630 (image GLvoid-*)
8631 ->
8632 void))
8633 "Get current 1D or 2D convolution filter kernel.
8634
8635 TARGET
8636 The filter to be retrieved. Must be one of `GL_CONVOLUTION_1D' or
8637 `GL_CONVOLUTION_2D'.
8638
8639 FORMAT
8640 Format of the output image. Must be one of `GL_RED', `GL_GREEN',
8641 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
8642 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
8643
8644 TYPE
8645 Data type of components in the output image. Symbolic constants
8646 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8647 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
8648 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8649 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
8650 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8651 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8652 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8653 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
8654 are accepted.
8655
8656 IMAGE
8657 Pointer to storage for the output image.
8658
8659 `glGetConvolutionFilter' returns the current 1D or 2D convolution filter
8660 kernel as an image. The one- or two-dimensional image is placed in
8661 IMAGE according to the specifications in FORMAT and TYPE. No pixel
8662 transfer operations are performed on this image, but the relevant pixel
8663 storage modes are applied.
8664
8665 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8666 target (see `glBindBuffer') while a convolution filter is requested,
8667 IMAGE is treated as a byte offset into the buffer object's data store.
8668
8669 Color components that are present in FORMAT but not included in the
8670 internal format of the filter are returned as zero. The assignments of
8671 internal color components to the components of FORMAT are as follows.
8672
8673 *Internal Component*
8674 *Resulting Component*
8675
8676 Red
8677 Red
8678
8679 Green
8680 Green
8681
8682 Blue
8683 Blue
8684
8685 Alpha
8686 Alpha
8687
8688 Luminance
8689 Red
8690
8691 Intensity
8692 Red
8693
8694
8695
8696 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8697 values.
8698
8699 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
8700 values.
8701
8702 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
8703 values.
8704
8705 `GL_INVALID_OPERATION' is generated if TYPE is one of
8706 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8707 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
8708 is not `GL_RGB'.
8709
8710 `GL_INVALID_OPERATION' is generated if TYPE is one of
8711 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8712 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8713 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8714 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
8715 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
8716
8717 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8718 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8719 store is currently mapped.
8720
8721 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8722 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8723 to the buffer object such that the memory writes required would exceed
8724 the data store size.
8725
8726 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8727 bound to the `GL_PIXEL_PACK_BUFFER' target and IMAGE is not evenly
8728 divisible into the number of bytes needed to store in memory a datum
8729 indicated by TYPE.
8730
8731 `GL_INVALID_OPERATION' is generated if `glGetConvolutionFilter' is
8732 executed between the execution of `glBegin' and the corresponding
8733 execution of `glEnd'.")
8734
8735 (define-gl-procedures
8736 ((glGetConvolutionParameterfv
8737 (target GLenum)
8738 (pname GLenum)
8739 (params GLfloat-*)
8740 ->
8741 void)
8742 (glGetConvolutionParameteriv
8743 (target GLenum)
8744 (pname GLenum)
8745 (params GLint-*)
8746 ->
8747 void))
8748 "Get convolution parameters.
8749
8750 TARGET
8751 The filter whose parameters are to be retrieved. Must be one of
8752 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D'.
8753
8754 PNAME
8755 The parameter to be retrieved. Must be one of
8756 `GL_CONVOLUTION_BORDER_MODE', `GL_CONVOLUTION_BORDER_COLOR',
8757 `GL_CONVOLUTION_FILTER_SCALE', `GL_CONVOLUTION_FILTER_BIAS',
8758 `GL_CONVOLUTION_FORMAT', `GL_CONVOLUTION_WIDTH',
8759 `GL_CONVOLUTION_HEIGHT', `GL_MAX_CONVOLUTION_WIDTH', or
8760 `GL_MAX_CONVOLUTION_HEIGHT'.
8761
8762 PARAMS
8763 Pointer to storage for the parameters to be retrieved.
8764
8765 `glGetConvolutionParameter' retrieves convolution parameters. TARGET
8766 determines which convolution filter is queried. PNAME determines which
8767 parameter is returned:
8768
8769 `GL_CONVOLUTION_BORDER_MODE'
8770
8771
8772 The convolution border mode. See `glConvolutionParameter' for a
8773 list of border modes.
8774
8775 `GL_CONVOLUTION_BORDER_COLOR'
8776
8777
8778 The current convolution border color. PARAMS must be a pointer to
8779 an array of four elements, which will receive the red, green, blue,
8780 and alpha border colors.
8781
8782 `GL_CONVOLUTION_FILTER_SCALE'
8783
8784
8785 The current filter scale factors. PARAMS must be a pointer to an
8786 array of four elements, which will receive the red, green, blue,
8787 and alpha filter scale factors in that order.
8788
8789 `GL_CONVOLUTION_FILTER_BIAS'
8790
8791
8792 The current filter bias factors. PARAMS must be a pointer to an
8793 array of four elements, which will receive the red, green, blue,
8794 and alpha filter bias terms in that order.
8795
8796 `GL_CONVOLUTION_FORMAT'
8797
8798
8799 The current internal format. See `glConvolutionFilter1D',
8800 `glConvolutionFilter2D', and `glSeparableFilter2D' for lists of
8801 allowable formats.
8802
8803 `GL_CONVOLUTION_WIDTH'
8804
8805
8806 The current filter image width.
8807
8808 `GL_CONVOLUTION_HEIGHT'
8809
8810
8811 The current filter image height.
8812
8813 `GL_MAX_CONVOLUTION_WIDTH'
8814
8815
8816 The maximum acceptable filter image width.
8817
8818 `GL_MAX_CONVOLUTION_HEIGHT'
8819
8820
8821 The maximum acceptable filter image height.
8822
8823 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8824 values.
8825
8826 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
8827 values.
8828
8829 `GL_INVALID_ENUM' is generated if TARGET is `GL_CONVOLUTION_1D' and
8830 PNAME is `GL_CONVOLUTION_HEIGHT' or `GL_MAX_CONVOLUTION_HEIGHT'.
8831
8832 `GL_INVALID_OPERATION' is generated if `glGetConvolutionParameter' is
8833 executed between the execution of `glBegin' and the corresponding
8834 execution of `glEnd'.")
8835
8836 (define-gl-procedures
8837 ((glGetError -> GLenum))
8838 "Return error information.
8839
8840 `glGetError' returns the value of the error flag. Each detectable error
8841 is assigned a numeric code and symbolic name. When an error occurs, the
8842 error flag is set to the appropriate error code value. No other errors
8843 are recorded until `glGetError' is called, the error code is returned,
8844 and the flag is reset to `GL_NO_ERROR'. If a call to `glGetError'
8845 returns `GL_NO_ERROR', there has been no detectable error since the last
8846 call to `glGetError', or since the GL was initialized.
8847
8848 To allow for distributed implementations, there may be several error
8849 flags. If any single error flag has recorded an error, the value of
8850 that flag is returned and that flag is reset to `GL_NO_ERROR' when
8851 `glGetError' is called. If more than one flag has recorded an error,
8852 `glGetError' returns and clears an arbitrary error flag value. Thus,
8853 `glGetError' should always be called in a loop, until it returns
8854 `GL_NO_ERROR', if all error flags are to be reset.
8855
8856 Initially, all error flags are set to `GL_NO_ERROR'.
8857
8858 The following errors are currently defined:
8859
8860 `GL_NO_ERROR'
8861 No error has been recorded. The value of this symbolic constant is
8862 guaranteed to be 0.
8863
8864 `GL_INVALID_ENUM'
8865 An unacceptable value is specified for an enumerated argument. The
8866 offending command is ignored and has no other side effect than to
8867 set the error flag.
8868
8869 `GL_INVALID_VALUE'
8870 A numeric argument is out of range. The offending command is
8871 ignored and has no other side effect than to set the error flag.
8872
8873 `GL_INVALID_OPERATION'
8874 The specified operation is not allowed in the current state. The
8875 offending command is ignored and has no other side effect than to
8876 set the error flag.
8877
8878 `GL_STACK_OVERFLOW'
8879 This command would cause a stack overflow. The offending command
8880 is ignored and has no other side effect than to set the error flag.
8881
8882 `GL_STACK_UNDERFLOW'
8883 This command would cause a stack underflow. The offending command
8884 is ignored and has no other side effect than to set the error flag.
8885
8886 `GL_OUT_OF_MEMORY'
8887 There is not enough memory left to execute the command. The state
8888 of the GL is undefined, except for the state of the error flags,
8889 after this error is recorded.
8890
8891 `GL_TABLE_TOO_LARGE'
8892 The specified table exceeds the implementation's maximum supported
8893 table size. The offending command is ignored and has no other side
8894 effect than to set the error flag.
8895
8896 When an error flag is set, results of a GL operation are undefined only
8897 if `GL_OUT_OF_MEMORY' has occurred. In all other cases, the command
8898 generating the error is ignored and has no effect on the GL state or
8899 frame buffer contents. If the generating command returns a value, it
8900 returns 0. If `glGetError' itself generates an error, it returns 0.
8901
8902 `GL_INVALID_OPERATION' is generated if `glGetError' is executed between
8903 the execution of `glBegin' and the corresponding execution of `glEnd'.
8904 In this case, `glGetError' returns 0.")
8905
8906 (define-gl-procedures
8907 ((glGetHistogramParameterfv
8908 (target GLenum)
8909 (pname GLenum)
8910 (params GLfloat-*)
8911 ->
8912 void)
8913 (glGetHistogramParameteriv
8914 (target GLenum)
8915 (pname GLenum)
8916 (params GLint-*)
8917 ->
8918 void))
8919 "Get histogram parameters.
8920
8921 TARGET
8922 Must be one of `GL_HISTOGRAM' or `GL_PROXY_HISTOGRAM'.
8923
8924 PNAME
8925 The name of the parameter to be retrieved. Must be one of
8926 `GL_HISTOGRAM_WIDTH', `GL_HISTOGRAM_FORMAT',
8927 `GL_HISTOGRAM_RED_SIZE', `GL_HISTOGRAM_GREEN_SIZE',
8928 `GL_HISTOGRAM_BLUE_SIZE', `GL_HISTOGRAM_ALPHA_SIZE',
8929 `GL_HISTOGRAM_LUMINANCE_SIZE', or `GL_HISTOGRAM_SINK'.
8930
8931 PARAMS
8932 Pointer to storage for the returned values.
8933
8934 `glGetHistogramParameter' is used to query parameter values for the
8935 current histogram or for a proxy. The histogram state information may
8936 be queried by calling `glGetHistogramParameter' with a TARGET of
8937 `GL_HISTOGRAM' (to obtain information for the current histogram table)
8938 or `GL_PROXY_HISTOGRAM' (to obtain information from the most recent
8939 proxy request) and one of the following values for the PNAME argument:
8940
8941
8942
8943 *Parameter*
8944 *Description*
8945
8946 `GL_HISTOGRAM_WIDTH'
8947 Histogram table width
8948
8949 `GL_HISTOGRAM_FORMAT'
8950 Internal format
8951
8952 `GL_HISTOGRAM_RED_SIZE'
8953 Red component counter size, in bits
8954
8955 `GL_HISTOGRAM_GREEN_SIZE'
8956 Green component counter size, in bits
8957
8958 `GL_HISTOGRAM_BLUE_SIZE'
8959 Blue component counter size, in bits
8960
8961 `GL_HISTOGRAM_ALPHA_SIZE'
8962 Alpha component counter size, in bits
8963
8964 `GL_HISTOGRAM_LUMINANCE_SIZE'
8965 Luminance component counter size, in bits
8966
8967 `GL_HISTOGRAM_SINK'
8968 Value of the SINK parameter
8969
8970
8971
8972 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8973 values.
8974
8975 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
8976 values.
8977
8978 `GL_INVALID_OPERATION' is generated if `glGetHistogramParameter' is
8979 executed between the execution of `glBegin' and the corresponding
8980 execution of `glEnd'.")
8981
8982 (define-gl-procedures
8983 ((glGetHistogram
8984 (target GLenum)
8985 (reset GLboolean)
8986 (format GLenum)
8987 (type GLenum)
8988 (values GLvoid-*)
8989 ->
8990 void))
8991 "Get histogram table.
8992
8993 TARGET
8994 Must be `GL_HISTOGRAM'.
8995
8996 RESET
8997 If `GL_TRUE', each component counter that is actually returned is
8998 reset to zero. (Other counters are unaffected.) If `GL_FALSE',
8999 none of the counters in the histogram table is modified.
9000
9001 FORMAT
9002 The format of values to be returned in VALUES. Must be one of
9003 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
9004 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
9005
9006 TYPE
9007 The type of values to be returned in VALUES. Symbolic constants
9008 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
9009 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9010 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9011 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9012 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9013 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9014 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9015 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9016 are accepted.
9017
9018 VALUES
9019 A pointer to storage for the returned histogram table.
9020
9021 `glGetHistogram' returns the current histogram table as a
9022 one-dimensional image with the same width as the histogram. No pixel
9023 transfer operations are performed on this image, but pixel storage modes
9024 that are applicable to 1D images are honored.
9025
9026 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9027 target (see `glBindBuffer') while a histogram table is requested, VALUES
9028 is treated as a byte offset into the buffer object's data store.
9029
9030 Color components that are requested in the specified FORMAT, but which
9031 are not included in the internal format of the histogram, are returned
9032 as zero. The assignments of internal color components to the components
9033 requested by FORMAT are:
9034
9035 *Internal Component*
9036 *Resulting Component*
9037
9038 Red
9039 Red
9040
9041 Green
9042 Green
9043
9044 Blue
9045 Blue
9046
9047 Alpha
9048 Alpha
9049
9050 Luminance
9051 Red
9052
9053
9054
9055 `GL_INVALID_ENUM' is generated if TARGET is not `GL_HISTOGRAM'.
9056
9057 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
9058 values.
9059
9060 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
9061 values.
9062
9063 `GL_INVALID_OPERATION' is generated if TYPE is one of
9064 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9065 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
9066 is not `GL_RGB'.
9067
9068 `GL_INVALID_OPERATION' is generated if TYPE is one of
9069 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9070 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9071 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9072 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
9073 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
9074
9075 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9076 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9077 store is currently mapped.
9078
9079 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9080 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9081 to the buffer object such that the memory writes required would exceed
9082 the data store size.
9083
9084 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9085 bound to the `GL_PIXEL_PACK_BUFFER' target and VALUES is not evenly
9086 divisible into the number of bytes needed to store in memory a datum
9087 indicated by TYPE.
9088
9089 `GL_INVALID_OPERATION' is generated if `glGetHistogram' is executed
9090 between the execution of `glBegin' and the corresponding execution of
9091 `glEnd'.")
9092
9093 (define-gl-procedures
9094 ((glGetLightfv
9095 (light GLenum)
9096 (pname GLenum)
9097 (params GLfloat-*)
9098 ->
9099 void)
9100 (glGetLightiv
9101 (light GLenum)
9102 (pname GLenum)
9103 (params GLint-*)
9104 ->
9105 void))
9106 "Return light source parameter values.
9107
9108 LIGHT
9109 Specifies a light source. The number of possible lights depends on
9110 the implementation, but at least eight lights are supported. They
9111 are identified by symbolic names of the form `GL_LIGHT' I where I
9112 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
9113
9114 PNAME
9115 Specifies a light source parameter for LIGHT. Accepted symbolic
9116 names are `GL_AMBIENT', `GL_DIFFUSE', `GL_SPECULAR', `GL_POSITION',
9117 `GL_SPOT_DIRECTION', `GL_SPOT_EXPONENT', `GL_SPOT_CUTOFF',
9118 `GL_CONSTANT_ATTENUATION', `GL_LINEAR_ATTENUATION', and
9119 `GL_QUADRATIC_ATTENUATION'.
9120
9121 PARAMS
9122 Returns the requested data.
9123
9124 `glGetLight' returns in PARAMS the value or values of a light source
9125 parameter. LIGHT names the light and is a symbolic name of the form
9126 `GL_LIGHT'I where i ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
9127 `GL_MAX_LIGHTS' is an implementation dependent constant that is greater
9128 than or equal to eight. PNAME specifies one of ten light source
9129 parameters, again by symbolic name.
9130
9131 The following parameters are defined:
9132
9133 `GL_AMBIENT'
9134 PARAMS returns four integer or floating-point values representing
9135 the ambient intensity of the light source. Integer values, when
9136 requested, are linearly mapped from the internal floating-point
9137 representation such that 1.0 maps to the most positive
9138 representable integer value, and -1.0 maps to the most negative
9139 representable integer value. If the internal value is outside the
9140 range [-1,1] , the corresponding integer return value is undefined.
9141 The initial value is (0, 0, 0, 1).
9142
9143 `GL_DIFFUSE'
9144 PARAMS returns four integer or floating-point values representing
9145 the diffuse intensity of the light source. Integer values, when
9146 requested, are linearly mapped from the internal floating-point
9147 representation such that 1.0 maps to the most positive
9148 representable integer value, and -1.0 maps to the most negative
9149 representable integer value. If the internal value is outside the
9150 range [-1,1] , the corresponding integer return value is undefined.
9151 The initial value for `GL_LIGHT0' is (1, 1, 1, 1); for other
9152 lights, the initial value is (0, 0, 0, 0).
9153
9154 `GL_SPECULAR'
9155 PARAMS returns four integer or floating-point values representing
9156 the specular intensity of the light source. Integer values, when
9157 requested, are linearly mapped from the internal floating-point
9158 representation such that 1.0 maps to the most positive
9159 representable integer value, and -1.0 maps to the most negative
9160 representable integer value. If the internal value is outside the
9161 range [-1,1] , the corresponding integer return value is undefined.
9162 The initial value for `GL_LIGHT0' is (1, 1, 1, 1); for other
9163 lights, the initial value is (0, 0, 0, 0).
9164
9165 `GL_POSITION'
9166 PARAMS returns four integer or floating-point values representing
9167 the position of the light source. Integer values, when requested,
9168 are computed by rounding the internal floating-point values to the
9169 nearest integer value. The returned values are those maintained in
9170 eye coordinates. They will not be equal to the values specified
9171 using `glLight', unless the modelview matrix was identity at the
9172 time `glLight' was called. The initial value is (0, 0, 1, 0).
9173
9174 `GL_SPOT_DIRECTION'
9175 PARAMS returns three integer or floating-point values representing
9176 the direction of the light source. Integer values, when requested,
9177 are computed by rounding the internal floating-point values to the
9178 nearest integer value. The returned values are those maintained in
9179 eye coordinates. They will not be equal to the values specified
9180 using `glLight', unless the modelview matrix was identity at the
9181 time `glLight' was called. Although spot direction is normalized
9182 before being used in the lighting equation, the returned values are
9183 the transformed versions of the specified values prior to
9184 normalization. The initial value is (0,0-1) .
9185
9186 `GL_SPOT_EXPONENT'
9187 PARAMS returns a single integer or floating-point value
9188 representing the spot exponent of the light. An integer value,
9189 when requested, is computed by rounding the internal floating-point
9190 representation to the nearest integer. The initial value is 0.
9191
9192 `GL_SPOT_CUTOFF'
9193 PARAMS returns a single integer or floating-point value
9194 representing the spot cutoff angle of the light. An integer value,
9195 when requested, is computed by rounding the internal floating-point
9196 representation to the nearest integer. The initial value is 180.
9197
9198 `GL_CONSTANT_ATTENUATION'
9199 PARAMS returns a single integer or floating-point value
9200 representing the constant (not distance-related) attenuation of the
9201 light. An integer value, when requested, is computed by rounding
9202 the internal floating-point representation to the nearest integer.
9203 The initial value is 1.
9204
9205 `GL_LINEAR_ATTENUATION'
9206 PARAMS returns a single integer or floating-point value
9207 representing the linear attenuation of the light. An integer
9208 value, when requested, is computed by rounding the internal
9209 floating-point representation to the nearest integer. The initial
9210 value is 0.
9211
9212 `GL_QUADRATIC_ATTENUATION'
9213 PARAMS returns a single integer or floating-point value
9214 representing the quadratic attenuation of the light. An integer
9215 value, when requested, is computed by rounding the internal
9216 floating-point representation to the nearest integer. The initial
9217 value is 0.
9218
9219 `GL_INVALID_ENUM' is generated if LIGHT or PNAME is not an accepted
9220 value.
9221
9222 `GL_INVALID_OPERATION' is generated if `glGetLight' is executed between
9223 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9224
9225 (define-gl-procedures
9226 ((glGetMapdv
9227 (target GLenum)
9228 (query GLenum)
9229 (v GLdouble-*)
9230 ->
9231 void)
9232 (glGetMapfv
9233 (target GLenum)
9234 (query GLenum)
9235 (v GLfloat-*)
9236 ->
9237 void)
9238 (glGetMapiv
9239 (target GLenum)
9240 (query GLenum)
9241 (v GLint-*)
9242 ->
9243 void))
9244 "Return evaluator parameters.
9245
9246 TARGET
9247 Specifies the symbolic name of a map. Accepted values are
9248 `GL_MAP1_COLOR_4', `GL_MAP1_INDEX', `GL_MAP1_NORMAL',
9249 `GL_MAP1_TEXTURE_COORD_1', `GL_MAP1_TEXTURE_COORD_2',
9250 `GL_MAP1_TEXTURE_COORD_3', `GL_MAP1_TEXTURE_COORD_4',
9251 `GL_MAP1_VERTEX_3', `GL_MAP1_VERTEX_4', `GL_MAP2_COLOR_4',
9252 `GL_MAP2_INDEX', `GL_MAP2_NORMAL', `GL_MAP2_TEXTURE_COORD_1',
9253 `GL_MAP2_TEXTURE_COORD_2', `GL_MAP2_TEXTURE_COORD_3',
9254 `GL_MAP2_TEXTURE_COORD_4', `GL_MAP2_VERTEX_3', and
9255 `GL_MAP2_VERTEX_4'.
9256
9257 QUERY
9258 Specifies which parameter to return. Symbolic names `GL_COEFF',
9259 `GL_ORDER', and `GL_DOMAIN' are accepted.
9260
9261 V
9262 Returns the requested data.
9263
9264 `glMap1' and `glMap2' define evaluators. `glGetMap' returns evaluator
9265 parameters. TARGET chooses a map, QUERY selects a specific parameter,
9266 and V points to storage where the values will be returned.
9267
9268 The acceptable values for the TARGET parameter are described in the
9269 `glMap1' and `glMap2' reference pages.
9270
9271 QUERY can assume the following values:
9272
9273 `GL_COEFF'
9274 V returns the control points for the evaluator function.
9275 One-dimensional evaluators return ORDER control points, and
9276 two-dimensional evaluators return UORDER×VORDER control points.
9277 Each control point consists of one, two, three, or four integer,
9278 single-precision floating-point, or double-precision floating-point
9279 values, depending on the type of the evaluator. The GL returns
9280 two-dimensional control points in row-major order, incrementing the
9281 UORDER index quickly and the VORDER index after each row. Integer
9282 values, when requested, are computed by rounding the internal
9283 floating-point values to the nearest integer values.
9284
9285 `GL_ORDER'
9286 V returns the order of the evaluator function. One-dimensional
9287 evaluators return a single value, ORDER . The initial value is 1.
9288 Two-dimensional evaluators return two values, UORDER and VORDER .
9289 The initial value is 1,1.
9290
9291 `GL_DOMAIN'
9292 V returns the linear U and V mapping parameters. One-dimensional
9293 evaluators return two values, U1 and U2 , as specified by `glMap1'.
9294 Two-dimensional evaluators return four values ( U1 , U2 , V1 , and
9295 V2 ) as specified by `glMap2'. Integer values, when requested, are
9296 computed by rounding the internal floating-point values to the
9297 nearest integer values.
9298
9299 `GL_INVALID_ENUM' is generated if either TARGET or QUERY is not an
9300 accepted value.
9301
9302 `GL_INVALID_OPERATION' is generated if `glGetMap' is executed between
9303 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9304
9305 (define-gl-procedures
9306 ((glGetMaterialfv
9307 (face GLenum)
9308 (pname GLenum)
9309 (params GLfloat-*)
9310 ->
9311 void)
9312 (glGetMaterialiv
9313 (face GLenum)
9314 (pname GLenum)
9315 (params GLint-*)
9316 ->
9317 void))
9318 "Return material parameters.
9319
9320 FACE
9321 Specifies which of the two materials is being queried. `GL_FRONT'
9322 or `GL_BACK' are accepted, representing the front and back
9323 materials, respectively.
9324
9325 PNAME
9326 Specifies the material parameter to return. `GL_AMBIENT',
9327 `GL_DIFFUSE', `GL_SPECULAR', `GL_EMISSION', `GL_SHININESS', and
9328 `GL_COLOR_INDEXES' are accepted.
9329
9330 PARAMS
9331 Returns the requested data.
9332
9333 `glGetMaterial' returns in PARAMS the value or values of parameter PNAME
9334 of material FACE. Six parameters are defined:
9335
9336 `GL_AMBIENT'
9337 PARAMS returns four integer or floating-point values representing
9338 the ambient reflectance of the material. Integer values, when
9339 requested, are linearly mapped from the internal floating-point
9340 representation such that 1.0 maps to the most positive
9341 representable integer value, and -1.0 maps to the most negative
9342 representable integer value. If the internal value is outside the
9343 range [-1,1] , the corresponding integer return value is undefined.
9344 The initial value is (0.2, 0.2, 0.2, 1.0)
9345
9346 `GL_DIFFUSE'
9347 PARAMS returns four integer or floating-point values representing
9348 the diffuse reflectance of the material. Integer values, when
9349 requested, are linearly mapped from the internal floating-point
9350 representation such that 1.0 maps to the most positive
9351 representable integer value, and -1.0 maps to the most negative
9352 representable integer value. If the internal value is outside the
9353 range [-1,1] , the corresponding integer return value is undefined.
9354 The initial value is (0.8, 0.8, 0.8, 1.0).
9355
9356 `GL_SPECULAR'
9357 PARAMS returns four integer or floating-point values representing
9358 the specular reflectance of the material. Integer values, when
9359 requested, are linearly mapped from the internal floating-point
9360 representation such that 1.0 maps to the most positive
9361 representable integer value, and -1.0 maps to the most negative
9362 representable integer value. If the internal value is outside the
9363 range [-1,1] , the corresponding integer return value is undefined.
9364 The initial value is (0, 0, 0, 1).
9365
9366 `GL_EMISSION'
9367 PARAMS returns four integer or floating-point values representing
9368 the emitted light intensity of the material. Integer values, when
9369 requested, are linearly mapped from the internal floating-point
9370 representation such that 1.0 maps to the most positive
9371 representable integer value, and -1.0 maps to the most negative
9372 representable integer value. If the internal value is outside the
9373 range [-1,1] , the corresponding integer return value is undefined.
9374 The initial value is (0, 0, 0, 1).
9375
9376 `GL_SHININESS'
9377 PARAMS returns one integer or floating-point value representing the
9378 specular exponent of the material. Integer values, when requested,
9379 are computed by rounding the internal floating-point value to the
9380 nearest integer value. The initial value is 0.
9381
9382 `GL_COLOR_INDEXES'
9383 PARAMS returns three integer or floating-point values representing
9384 the ambient, diffuse, and specular indices of the material. These
9385 indices are used only for color index lighting. (All the other
9386 parameters are used only for RGBA lighting.) Integer values, when
9387 requested, are computed by rounding the internal floating-point
9388 values to the nearest integer values.
9389
9390 `GL_INVALID_ENUM' is generated if FACE or PNAME is not an accepted
9391 value.
9392
9393 `GL_INVALID_OPERATION' is generated if `glGetMaterial' is executed
9394 between the execution of `glBegin' and the corresponding execution of
9395 `glEnd'.")
9396
9397 (define-gl-procedures
9398 ((glGetMinmaxParameterfv
9399 (target GLenum)
9400 (pname GLenum)
9401 (params GLfloat-*)
9402 ->
9403 void)
9404 (glGetMinmaxParameteriv
9405 (target GLenum)
9406 (pname GLenum)
9407 (params GLint-*)
9408 ->
9409 void))
9410 "Get minmax parameters.
9411
9412 TARGET
9413 Must be `GL_MINMAX'.
9414
9415 PNAME
9416 The parameter to be retrieved. Must be one of `GL_MINMAX_FORMAT'
9417 or `GL_MINMAX_SINK'.
9418
9419 PARAMS
9420 A pointer to storage for the retrieved parameters.
9421
9422 `glGetMinmaxParameter' retrieves parameters for the current minmax table
9423 by setting PNAME to one of the following values:
9424
9425
9426
9427 *Parameter*
9428 *Description*
9429
9430 `GL_MINMAX_FORMAT'
9431 Internal format of minmax table
9432
9433 `GL_MINMAX_SINK'
9434 Value of the SINK parameter
9435
9436
9437
9438 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
9439
9440 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
9441 values.
9442
9443 `GL_INVALID_OPERATION' is generated if `glGetMinmaxParameter' is
9444 executed between the execution of `glBegin' and the corresponding
9445 execution of `glEnd'.")
9446
9447 (define-gl-procedures
9448 ((glGetMinmax
9449 (target GLenum)
9450 (reset GLboolean)
9451 (format GLenum)
9452 (types GLenum)
9453 (values GLvoid-*)
9454 ->
9455 void))
9456 "Get minimum and maximum pixel values.
9457
9458 TARGET
9459 Must be `GL_MINMAX'.
9460
9461 RESET
9462 If `GL_TRUE', all entries in the minmax table that are actually
9463 returned are reset to their initial values. (Other entries are
9464 unaltered.) If `GL_FALSE', the minmax table is unaltered.
9465
9466 FORMAT
9467 The format of the data to be returned in VALUES. Must be one of
9468 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
9469 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
9470
9471 TYPES
9472 The type of the data to be returned in VALUES. Symbolic constants
9473 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
9474 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9475 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9476 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9477 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9478 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9479 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9480 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9481 are accepted.
9482
9483 VALUES
9484 A pointer to storage for the returned values.
9485
9486 `glGetMinmax' returns the accumulated minimum and maximum pixel values
9487 (computed on a per-component basis) in a one-dimensional image of width
9488 2. The first set of return values are the minima, and the second set of
9489 return values are the maxima. The format of the return values is
9490 determined by FORMAT, and their type is determined by TYPES.
9491
9492 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9493 target (see `glBindBuffer') while minimum and maximum pixel values are
9494 requested, VALUES is treated as a byte offset into the buffer object's
9495 data store.
9496
9497 No pixel transfer operations are performed on the return values, but
9498 pixel storage modes that are applicable to one-dimensional images are
9499 performed. Color components that are requested in the specified FORMAT,
9500 but that are not included in the internal format of the minmax table,
9501 are returned as zero. The assignment of internal color components to
9502 the components requested by FORMAT are as follows:
9503
9504
9505
9506 *Internal Component*
9507 *Resulting Component*
9508
9509 Red
9510 Red
9511
9512 Green
9513 Green
9514
9515 Blue
9516 Blue
9517
9518 Alpha
9519 Alpha
9520
9521 Luminance
9522 Red
9523
9524 If RESET is `GL_TRUE', the minmax table entries corresponding to the
9525 return values are reset to their initial values. Minimum and maximum
9526 values that are not returned are not modified, even if RESET is
9527 `GL_TRUE'.
9528
9529 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
9530
9531 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
9532 values.
9533
9534 `GL_INVALID_ENUM' is generated if TYPES is not one of the allowable
9535 values.
9536
9537 `GL_INVALID_OPERATION' is generated if TYPES is one of
9538 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9539 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
9540 is not `GL_RGB'.
9541
9542 `GL_INVALID_OPERATION' is generated if TYPES is one of
9543 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9544 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9545 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9546 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
9547 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
9548
9549 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9550 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9551 store is currently mapped.
9552
9553 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9554 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9555 to the buffer object such that the memory writes required would exceed
9556 the data store size.
9557
9558 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9559 bound to the `GL_PIXEL_PACK_BUFFER' target and VALUES is not evenly
9560 divisible into the number of bytes needed to store in memory a datum
9561 indicated by TYPE.
9562
9563 `GL_INVALID_OPERATION' is generated if `glGetMinmax' is executed between
9564 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9565
9566 (define-gl-procedures
9567 ((glGetPixelMapfv
9568 (map GLenum)
9569 (data GLfloat-*)
9570 ->
9571 void)
9572 (glGetPixelMapuiv
9573 (map GLenum)
9574 (data GLuint-*)
9575 ->
9576 void)
9577 (glGetPixelMapusv
9578 (map GLenum)
9579 (data GLushort-*)
9580 ->
9581 void))
9582 "Return the specified pixel map.
9583
9584 MAP
9585 Specifies the name of the pixel map to return. Accepted values are
9586 `GL_PIXEL_MAP_I_TO_I', `GL_PIXEL_MAP_S_TO_S',
9587 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
9588 `GL_PIXEL_MAP_I_TO_B', `GL_PIXEL_MAP_I_TO_A',
9589 `GL_PIXEL_MAP_R_TO_R', `GL_PIXEL_MAP_G_TO_G',
9590 `GL_PIXEL_MAP_B_TO_B', and `GL_PIXEL_MAP_A_TO_A'.
9591
9592 DATA
9593 Returns the pixel map contents.
9594
9595 See the `glPixelMap' reference page for a description of the acceptable
9596 values for the MAP parameter. `glGetPixelMap' returns in DATA the
9597 contents of the pixel map specified in MAP. Pixel maps are used during
9598 the execution of `glReadPixels', `glDrawPixels', `glCopyPixels',
9599 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glTexSubImage1D',
9600 `glTexSubImage2D', `glTexSubImage3D', `glCopyTexImage1D',
9601 `glCopyTexImage2D', `glCopyTexSubImage1D', `glCopyTexSubImage2D', and
9602 `glCopyTexSubImage3D'. to map color indices, stencil indices, color
9603 components, and depth components to other values.
9604
9605 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9606 target (see `glBindBuffer') while a pixel map is requested, DATA is
9607 treated as a byte offset into the buffer object's data store.
9608
9609 Unsigned integer values, if requested, are linearly mapped from the
9610 internal fixed or floating-point representation such that 1.0 maps to
9611 the largest representable integer value, and 0.0 maps to 0. Return
9612 unsigned integer values are undefined if the map value was not in the
9613 range [0,1].
9614
9615 To determine the required size of MAP, call `glGet' with the appropriate
9616 symbolic constant.
9617
9618 `GL_INVALID_ENUM' is generated if MAP is not an accepted value.
9619
9620 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9621 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9622 store is currently mapped.
9623
9624 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9625 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9626 to the buffer object such that the memory writes required would exceed
9627 the data store size.
9628
9629 `GL_INVALID_OPERATION' is generated by `glGetPixelMapfv' if a non-zero
9630 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9631 DATA is not evenly divisible into the number of bytes needed to store in
9632 memory a GLfloat datum.
9633
9634 `GL_INVALID_OPERATION' is generated by `glGetPixelMapuiv' if a non-zero
9635 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9636 DATA is not evenly divisible into the number of bytes needed to store in
9637 memory a GLuint datum.
9638
9639 `GL_INVALID_OPERATION' is generated by `glGetPixelMapusv' if a non-zero
9640 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9641 DATA is not evenly divisible into the number of bytes needed to store in
9642 memory a GLushort datum.
9643
9644 `GL_INVALID_OPERATION' is generated if `glGetPixelMap' is executed
9645 between the execution of `glBegin' and the corresponding execution of
9646 `glEnd'.")
9647
9648 (define-gl-procedures
9649 ((glGetPointerv
9650 (pname GLenum)
9651 (params GLvoid-**)
9652 ->
9653 void))
9654 "Return the address of the specified pointer.
9655
9656 PNAME
9657 Specifies the array or buffer pointer to be returned. Symbolic
9658 constants `GL_COLOR_ARRAY_POINTER', `GL_EDGE_FLAG_ARRAY_POINTER',
9659 `GL_FOG_COORD_ARRAY_POINTER', `GL_FEEDBACK_BUFFER_POINTER',
9660 `GL_INDEX_ARRAY_POINTER', `GL_NORMAL_ARRAY_POINTER',
9661 `GL_SECONDARY_COLOR_ARRAY_POINTER', `GL_SELECTION_BUFFER_POINTER',
9662 `GL_TEXTURE_COORD_ARRAY_POINTER', or `GL_VERTEX_ARRAY_POINTER' are
9663 accepted.
9664
9665 PARAMS
9666 Returns the pointer value specified by PNAME.
9667
9668 `glGetPointerv' returns pointer information. PNAME is a symbolic
9669 constant indicating the pointer to be returned, and PARAMS is a pointer
9670 to a location in which to place the returned data.
9671
9672 For all PNAME arguments except `GL_FEEDBACK_BUFFER_POINTER' and
9673 `GL_SELECTION_BUFFER_POINTER', if a non-zero named buffer object was
9674 bound to the `GL_ARRAY_BUFFER' target (see `glBindBuffer') when the
9675 desired pointer was previously specified, the pointer returned is a byte
9676 offset into the buffer object's data store. Buffer objects are only
9677 available in OpenGL versions 1.5 and greater.
9678
9679 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.")
9680
9681 (define-gl-procedures
9682 ((glGetPolygonStipple (pattern GLubyte-*) -> void))
9683 "Return the polygon stipple pattern.
9684
9685 PATTERN
9686 Returns the stipple pattern. The initial value is all 1's.
9687
9688 `glGetPolygonStipple' returns to PATTERN a 32×32 polygon stipple
9689 pattern. The pattern is packed into memory as if `glReadPixels' with
9690 both HEIGHT and WIDTH of 32, TYPE of `GL_BITMAP', and FORMAT of
9691 `GL_COLOR_INDEX' were called, and the stipple pattern were stored in an
9692 internal 32×32 color index buffer. Unlike `glReadPixels', however,
9693 pixel transfer operations (shift, offset, pixel map) are not applied to
9694 the returned stipple image.
9695
9696 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9697 target (see `glBindBuffer') while a polygon stipple pattern is
9698 requested, PATTERN is treated as a byte offset into the buffer object's
9699 data store.
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 buffer object's data
9703 store is currently mapped.
9704
9705 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9706 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9707 to the buffer object such that the memory writes required would exceed
9708 the data store size.
9709
9710 `GL_INVALID_OPERATION' is generated if `glGetPolygonStipple' is executed
9711 between the execution of `glBegin' and the corresponding execution of
9712 `glEnd'.")
9713
9714 (define-gl-procedures
9715 ((glGetProgramInfoLog
9716 (program GLuint)
9717 (maxLength GLsizei)
9718 (length GLsizei-*)
9719 (infoLog GLchar-*)
9720 ->
9721 void))
9722 "Returns the information log for a program object.
9723
9724 PROGRAM
9725 Specifies the program object whose information log is to be
9726 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 `glGetProgramInfoLog' returns the information log for the specified
9741 program object. The information log for a program object is modified
9742 when the program object is linked or validated. The string that is
9743 returned will be null terminated.
9744
9745 `glGetProgramInfoLog' 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 `glGetProgram' with the value `GL_INFO_LOG_LENGTH'.
9752
9753 The information log for a program object is either an empty string, or a
9754 string containing information about the last link operation, or a string
9755 containing information about the last validation operation. It may
9756 contain diagnostic messages, warning messages, and other information.
9757 When a program object is created, its information log will be a string
9758 of length 0.
9759
9760 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
9761 OpenGL.
9762
9763 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
9764
9765 `GL_INVALID_VALUE' is generated if MAXLENGTH is less than 0.
9766
9767 `GL_INVALID_OPERATION' is generated if `glGetProgramInfoLog' is executed
9768 between the execution of `glBegin' and the corresponding execution of
9769 `glEnd'.")
9770
9771 (define-gl-procedures
9772 ((glGetProgramiv
9773 (program GLuint)
9774 (pname GLenum)
9775 (params GLint-*)
9776 ->
9777 void))
9778 "Returns a parameter from a program object.
9779
9780 PROGRAM
9781 Specifies the program object to be queried.
9782
9783 PNAME
9784 Specifies the object parameter. Accepted symbolic names are
9785 `GL_DELETE_STATUS', `GL_LINK_STATUS', `GL_VALIDATE_STATUS',
9786 `GL_INFO_LOG_LENGTH', `GL_ATTACHED_SHADERS',
9787 `GL_ACTIVE_ATTRIBUTES', `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH',
9788 `GL_ACTIVE_UNIFORMS', `GL_ACTIVE_UNIFORM_MAX_LENGTH'.
9789
9790 PARAMS
9791 Returns the requested object parameter.
9792
9793 `glGetProgram' returns in PARAMS the value of a parameter for a specific
9794 program object. The following parameters are defined:
9795
9796 `GL_DELETE_STATUS'
9797
9798
9799 PARAMS returns `GL_TRUE' if PROGRAM is currently flagged for
9800 deletion, and `GL_FALSE' otherwise.
9801
9802 `GL_LINK_STATUS'
9803
9804
9805 PARAMS returns `GL_TRUE' if the last link operation on PROGRAM was
9806 successful, and `GL_FALSE' otherwise.
9807
9808 `GL_VALIDATE_STATUS'
9809
9810
9811 PARAMS returns `GL_TRUE' or if the last validation operation on
9812 PROGRAM was successful, and `GL_FALSE' otherwise.
9813
9814 `GL_INFO_LOG_LENGTH'
9815
9816
9817 PARAMS returns the number of characters in the information log for
9818 PROGRAM including the null termination character (i.e., the size of
9819 the character buffer required to store the information log). If
9820 PROGRAM has no information log, a value of 0 is returned.
9821
9822 `GL_ATTACHED_SHADERS'
9823
9824
9825 PARAMS returns the number of shader objects attached to PROGRAM.
9826
9827 `GL_ACTIVE_ATTRIBUTES'
9828
9829
9830 PARAMS returns the number of active attribute variables for
9831 PROGRAM.
9832
9833 `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH'
9834
9835
9836 PARAMS returns the length of the longest active attribute name for
9837 PROGRAM, including the null termination character (i.e., the size
9838 of the character buffer required to store the longest attribute
9839 name). If no active attributes exist, 0 is returned.
9840
9841 `GL_ACTIVE_UNIFORMS'
9842
9843
9844 PARAMS returns the number of active uniform variables for PROGRAM.
9845
9846 `GL_ACTIVE_UNIFORM_MAX_LENGTH'
9847
9848
9849 PARAMS returns the length of the longest active uniform variable
9850 name for PROGRAM, including the null termination character (i.e.,
9851 the size of the character buffer required to store the longest
9852 uniform variable name). If no active uniform variables exist, 0 is
9853 returned.
9854
9855 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
9856 OpenGL.
9857
9858 `GL_INVALID_OPERATION' is generated if PROGRAM does not refer to a
9859 program object.
9860
9861 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
9862
9863 `GL_INVALID_OPERATION' is generated if `glGetProgram' is executed
9864 between the execution of `glBegin' and the corresponding execution of
9865 `glEnd'.")
9866
9867 (define-gl-procedures
9868 ((glGetQueryiv
9869 (target GLenum)
9870 (pname GLenum)
9871 (params GLint-*)
9872 ->
9873 void))
9874 "Return parameters of a query object target.
9875
9876 TARGET
9877 Specifies a query object target. Must be `GL_SAMPLES_PASSED'.
9878
9879 PNAME
9880 Specifies the symbolic name of a query object target parameter.
9881 Accepted values are `GL_CURRENT_QUERY' or `GL_QUERY_COUNTER_BITS'.
9882
9883 PARAMS
9884 Returns the requested data.
9885
9886 `glGetQueryiv' returns in PARAMS a selected parameter of the query
9887 object target specified by TARGET.
9888
9889 PNAME names a specific query object target parameter. When TARGET is
9890 `GL_SAMPLES_PASSED', PNAME can be as follows:
9891
9892 `GL_CURRENT_QUERY'
9893 PARAMS returns the name of the currently active occlusion query
9894 object. If no occlusion query is active, 0 is returned. The
9895 initial value is 0.
9896
9897 `GL_QUERY_COUNTER_BITS'
9898 PARAMS returns the number of bits in the query counter used to
9899 accumulate passing samples. If the number of bits returned is 0,
9900 the implementation does not support a query counter, and the
9901 results obtained from `glGetQueryObject' are useless.
9902
9903 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
9904 value.
9905
9906 `GL_INVALID_OPERATION' is generated if `glGetQueryiv' is executed
9907 between the execution of `glBegin' and the corresponding execution of
9908 `glEnd'.")
9909
9910 (define-gl-procedures
9911 ((glGetQueryObjectiv
9912 (id GLuint)
9913 (pname GLenum)
9914 (params GLint-*)
9915 ->
9916 void)
9917 (glGetQueryObjectuiv
9918 (id GLuint)
9919 (pname GLenum)
9920 (params GLuint-*)
9921 ->
9922 void))
9923 "Return parameters of a query object.
9924
9925 ID
9926 Specifies the name of a query object.
9927
9928 PNAME
9929 Specifies the symbolic name of a query object parameter. Accepted
9930 values are `GL_QUERY_RESULT' or `GL_QUERY_RESULT_AVAILABLE'.
9931
9932 PARAMS
9933 Returns the requested data.
9934
9935 `glGetQueryObject' returns in PARAMS a selected parameter of the query
9936 object specified by ID.
9937
9938 PNAME names a specific query object parameter. PNAME can be as follows:
9939
9940 `GL_QUERY_RESULT'
9941 PARAMS returns the value of the query object's passed samples
9942 counter. The initial value is 0.
9943
9944 `GL_QUERY_RESULT_AVAILABLE'
9945 PARAMS returns whether the passed samples counter is immediately
9946 available. If a delay would occur waiting for the query result,
9947 `GL_FALSE' is returned. Otherwise, `GL_TRUE' is returned, which
9948 also indicates that the results of all previous queries are
9949 available as well.
9950
9951 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
9952
9953 `GL_INVALID_OPERATION' is generated if ID is not the name of a query
9954 object.
9955
9956 `GL_INVALID_OPERATION' is generated if ID is the name of a currently
9957 active query object.
9958
9959 `GL_INVALID_OPERATION' is generated if `glGetQueryObject' is executed
9960 between the execution of `glBegin' and the corresponding execution of
9961 `glEnd'.")
9962
9963 (define-gl-procedures
9964 ((glGetSeparableFilter
9965 (target GLenum)
9966 (format GLenum)
9967 (type GLenum)
9968 (row GLvoid-*)
9969 (column GLvoid-*)
9970 (span GLvoid-*)
9971 ->
9972 void))
9973 "Get separable convolution filter kernel images.
9974
9975 TARGET
9976 The separable filter to be retrieved. Must be `GL_SEPARABLE_2D'.
9977
9978 FORMAT
9979 Format of the output images. Must be one of `GL_RED', `GL_GREEN',
9980 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR'`GL_RGBA', `GL_BGRA',
9981 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
9982
9983 TYPE
9984 Data type of components in the output images. Symbolic constants
9985 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
9986 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9987 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9988 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9989 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9990 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9991 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9992 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9993 are accepted.
9994
9995 ROW
9996 Pointer to storage for the row filter image.
9997
9998 COLUMN
9999 Pointer to storage for the column filter image.
10000
10001 SPAN
10002 Pointer to storage for the span filter image (currently unused).
10003
10004 `glGetSeparableFilter' returns the two one-dimensional filter kernel
10005 images for the current separable 2D convolution filter. The row image
10006 is placed in ROW and the column image is placed in COLUMN according to
10007 the specifications in FORMAT and TYPE. (In the current implementation,
10008 SPAN is not affected in any way.) No pixel transfer operations are
10009 performed on the images, but the relevant pixel storage modes are
10010 applied.
10011
10012 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
10013 target (see `glBindBuffer') while a separable convolution filter is
10014 requested, ROW, COLUMN, and SPAN are treated as a byte offset into the
10015 buffer object's data store.
10016
10017 Color components that are present in FORMAT but not included in the
10018 internal format of the filters are returned as zero. The assignments of
10019 internal color components to the components of FORMAT are as follows:
10020
10021
10022
10023 *Internal Component*
10024 *Resulting Component*
10025
10026 Red
10027 Red
10028
10029 Green
10030 Green
10031
10032 Blue
10033 Blue
10034
10035 Alpha
10036 Alpha
10037
10038 Luminance
10039 Red
10040
10041 Intensity
10042 Red
10043
10044
10045
10046 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SEPARABLE_2D'.
10047
10048 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
10049 values.
10050
10051 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
10052 values.
10053
10054 `GL_INVALID_OPERATION' is generated if TYPE is one of
10055 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
10056 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
10057 is not `GL_RGB'.
10058
10059 `GL_INVALID_OPERATION' is generated if TYPE is one of
10060 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
10061 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
10062 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
10063 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
10064 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
10065
10066 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10067 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
10068 store is currently mapped.
10069
10070 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10071 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
10072 to the buffer object such that the memory writes required would exceed
10073 the data store size.
10074
10075 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10076 bound to the `GL_PIXEL_PACK_BUFFER' target and ROW or COLUMN is not
10077 evenly divisible into the number of bytes needed to store in memory a
10078 datum indicated by TYPE.
10079
10080 `GL_INVALID_OPERATION' is generated if `glGetSeparableFilter' is
10081 executed between the execution of `glBegin' and the corresponding
10082 execution of `glEnd'.")
10083
10084 (define-gl-procedures
10085 ((glGetShaderInfoLog
10086 (shader GLuint)
10087 (maxLength GLsizei)
10088 (length GLsizei-*)
10089 (infoLog GLchar-*)
10090 ->
10091 void))
10092 "Returns the information log for a shader object.
10093
10094 SHADER
10095 Specifies the shader object whose information log is to be queried.
10096
10097 MAXLENGTH
10098 Specifies the size of the character buffer for storing the returned
10099 information log.
10100
10101 LENGTH
10102 Returns the length of the string returned in INFOLOG (excluding the
10103 null terminator).
10104
10105 INFOLOG
10106 Specifies an array of characters that is used to return the
10107 information log.
10108
10109 `glGetShaderInfoLog' returns the information log for the specified
10110 shader object. The information log for a shader object is modified when
10111 the shader is compiled. The string that is returned will be null
10112 terminated.
10113
10114 `glGetShaderInfoLog' returns in INFOLOG as much of the information log
10115 as it can, up to a maximum of MAXLENGTH characters. The number of
10116 characters actually returned, excluding the null termination character,
10117 is specified by LENGTH. If the length of the returned string is not
10118 required, a value of `NULL' can be passed in the LENGTH argument. The
10119 size of the buffer required to store the returned information log can be
10120 obtained by calling `glGetShader' with the value `GL_INFO_LOG_LENGTH'.
10121
10122 The information log for a shader object is a string that may contain
10123 diagnostic messages, warning messages, and other information about the
10124 last compile operation. When a shader object is created, its
10125 information log will be a string of length 0.
10126
10127 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
10128 OpenGL.
10129
10130 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
10131
10132 `GL_INVALID_VALUE' is generated if MAXLENGTH is less than 0.
10133
10134 `GL_INVALID_OPERATION' is generated if `glGetShaderInfoLog' is executed
10135 between the execution of `glBegin' and the corresponding execution of
10136 `glEnd'.")
10137
10138 (define-gl-procedures
10139 ((glGetShaderSource
10140 (shader GLuint)
10141 (bufSize GLsizei)
10142 (length GLsizei-*)
10143 (source GLchar-*)
10144 ->
10145 void))
10146 "Returns the source code string from a shader object.
10147
10148 SHADER
10149 Specifies the shader object to be queried.
10150
10151 BUFSIZE
10152 Specifies the size of the character buffer for storing the returned
10153 source code string.
10154
10155 LENGTH
10156 Returns the length of the string returned in SOURCE (excluding the
10157 null terminator).
10158
10159 SOURCE
10160 Specifies an array of characters that is used to return the source
10161 code string.
10162
10163 `glGetShaderSource' returns the concatenation of the source code strings
10164 from the shader object specified by SHADER. The source code strings for
10165 a shader object are the result of a previous call to `glShaderSource'.
10166 The string returned by the function will be null terminated.
10167
10168 `glGetShaderSource' returns in SOURCE as much of the source code string
10169 as it can, up to a maximum of BUFSIZE characters. The number of
10170 characters actually returned, excluding the null termination character,
10171 is specified by LENGTH. If the length of the returned string is not
10172 required, a value of `NULL' can be passed in the LENGTH argument. The
10173 size of the buffer required to store the returned source code string can
10174 be obtained by calling `glGetShader' with the value
10175 `GL_SHADER_SOURCE_LENGTH'.
10176
10177 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
10178 OpenGL.
10179
10180 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
10181
10182 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.
10183
10184 `GL_INVALID_OPERATION' is generated if `glGetShaderSource' is executed
10185 between the execution of `glBegin' and the corresponding execution of
10186 `glEnd'.")
10187
10188 (define-gl-procedures
10189 ((glGetShaderiv
10190 (shader GLuint)
10191 (pname GLenum)
10192 (params GLint-*)
10193 ->
10194 void))
10195 "Returns a parameter from a shader object.
10196
10197 SHADER
10198 Specifies the shader object to be queried.
10199
10200 PNAME
10201 Specifies the object parameter. Accepted symbolic names are
10202 `GL_SHADER_TYPE', `GL_DELETE_STATUS', `GL_COMPILE_STATUS',
10203 `GL_INFO_LOG_LENGTH', `GL_SHADER_SOURCE_LENGTH'.
10204
10205 PARAMS
10206 Returns the requested object parameter.
10207
10208 `glGetShader' returns in PARAMS the value of a parameter for a specific
10209 shader object. The following parameters are defined:
10210
10211 `GL_SHADER_TYPE'
10212 PARAMS returns `GL_VERTEX_SHADER' if SHADER is a vertex shader
10213 object, and `GL_FRAGMENT_SHADER' if SHADER is a fragment shader
10214 object.
10215
10216 `GL_DELETE_STATUS'
10217 PARAMS returns `GL_TRUE' if SHADER is currently flagged for
10218 deletion, and `GL_FALSE' otherwise.
10219
10220 `GL_COMPILE_STATUS'
10221 PARAMS returns `GL_TRUE' if the last compile operation on SHADER
10222 was successful, and `GL_FALSE' otherwise.
10223
10224 `GL_INFO_LOG_LENGTH'
10225 PARAMS returns the number of characters in the information log for
10226 SHADER including the null termination character (i.e., the size of
10227 the character buffer required to store the information log). If
10228 SHADER has no information log, a value of 0 is returned.
10229
10230 `GL_SHADER_SOURCE_LENGTH'
10231 PARAMS returns the length of the concatenation of the source
10232 strings that make up the shader source for the SHADER, including
10233 the null termination character. (i.e., the size of the character
10234 buffer required to store the shader source). If no source code
10235 exists, 0 is returned.
10236
10237 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
10238 OpenGL.
10239
10240 `GL_INVALID_OPERATION' is generated if SHADER does not refer to a shader
10241 object.
10242
10243 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
10244
10245 `GL_INVALID_OPERATION' is generated if `glGetShader' is executed between
10246 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10247
10248 (define-gl-procedures
10249 ((glGetString (name GLenum) -> const-GLubyte*))
10250 "Return a string describing the current GL connection.
10251
10252 NAME
10253 Specifies a symbolic constant, one of `GL_VENDOR', `GL_RENDERER',
10254 `GL_VERSION', `GL_SHADING_LANGUAGE_VERSION', or `GL_EXTENSIONS'.
10255
10256 `glGetString' returns a pointer to a static string describing some
10257 aspect of the current GL connection. NAME can be one of the following:
10258
10259 `GL_VENDOR'
10260
10261
10262 Returns the company responsible for this GL implementation. This
10263 name does not change from release to release.
10264
10265 `GL_RENDERER'
10266
10267
10268 Returns the name of the renderer. This name is typically specific
10269 to a particular configuration of a hardware platform. It does not
10270 change from release to release.
10271
10272 `GL_VERSION'
10273
10274
10275 Returns a version or release number.
10276
10277 `GL_SHADING_LANGUAGE_VERSION'
10278
10279
10280 Returns a version or release number for the shading language.
10281
10282 `GL_EXTENSIONS'
10283
10284
10285 Returns a space-separated list of supported extensions to GL.
10286
10287 Because the GL does not include queries for the performance
10288 characteristics of an implementation, some applications are written to
10289 recognize known platforms and modify their GL usage based on known
10290 performance characteristics of these platforms. Strings `GL_VENDOR' and
10291 `GL_RENDERER' together uniquely specify a platform. They do not change
10292 from release to release and should be used by platform-recognition
10293 algorithms.
10294
10295 Some applications want to make use of features that are not part of the
10296 standard GL. These features may be implemented as extensions to the
10297 standard GL. The `GL_EXTENSIONS' string is a space-separated list of
10298 supported GL extensions. (Extension names never contain a space
10299 character.)
10300
10301 The `GL_VERSION' and `GL_SHADING_LANGUAGE_VERSION' strings begin with a
10302 version number. The version number uses one of these forms:
10303
10304 MAJOR_NUMBER.MINOR_NUMBERMAJOR_NUMBER.MINOR_NUMBER.RELEASE_NUMBER
10305
10306 Vendor-specific information may follow the version number. Its format
10307 depends on the implementation, but a space always separates the version
10308 number and the vendor-specific information.
10309
10310 All strings are null-terminated.
10311
10312 `GL_INVALID_ENUM' is generated if NAME is not an accepted value.
10313
10314 `GL_INVALID_OPERATION' is generated if `glGetString' is executed between
10315 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10316
10317 (define-gl-procedures
10318 ((glGetTexEnvfv
10319 (target GLenum)
10320 (pname GLenum)
10321 (params GLfloat-*)
10322 ->
10323 void)
10324 (glGetTexEnviv
10325 (target GLenum)
10326 (pname GLenum)
10327 (params GLint-*)
10328 ->
10329 void))
10330 "Return texture environment parameters.
10331
10332 TARGET
10333 Specifies a texture environment. May be `GL_TEXTURE_ENV',
10334 `GL_TEXTURE_FILTER_CONTROL', or `GL_POINT_SPRITE'.
10335
10336 PNAME
10337 Specifies the symbolic name of a texture environment parameter.
10338 Accepted values are `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR',
10339 `GL_TEXTURE_LOD_BIAS', `GL_COMBINE_RGB', `GL_COMBINE_ALPHA',
10340 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
10341 `GL_SRC1_ALPHA', `GL_SRC2_ALPHA', `GL_OPERAND0_RGB',
10342 `GL_OPERAND1_RGB', `GL_OPERAND2_RGB', `GL_OPERAND0_ALPHA',
10343 `GL_OPERAND1_ALPHA', `GL_OPERAND2_ALPHA', `GL_RGB_SCALE',
10344 `GL_ALPHA_SCALE', or `GL_COORD_REPLACE'.
10345
10346 PARAMS
10347 Returns the requested data.
10348
10349 `glGetTexEnv' returns in PARAMS selected values of a texture environment
10350 that was specified with `glTexEnv'. TARGET specifies a texture
10351 environment.
10352
10353 When TARGET is `GL_TEXTURE_FILTER_CONTROL', PNAME must be
10354 `GL_TEXTURE_LOD_BIAS'. When TARGET is `GL_POINT_SPRITE', PNAME must be
10355 `GL_COORD_REPLACE'. When TARGET is `GL_TEXTURE_ENV', PNAME can be
10356 `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR', `GL_COMBINE_RGB',
10357 `GL_COMBINE_ALPHA', `GL_RGB_SCALE', `GL_ALPHA_SCALE', `GL_SRC0_RGB',
10358 `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA', `GL_SRC1_ALPHA', or
10359 `GL_SRC2_ALPHA'.
10360
10361 PNAME names a specific texture environment parameter, as follows:
10362
10363 `GL_TEXTURE_ENV_MODE'
10364 PARAMS returns the single-valued texture environment mode, a
10365 symbolic constant. The initial value is `GL_MODULATE'.
10366
10367 `GL_TEXTURE_ENV_COLOR'
10368 PARAMS returns four integer or floating-point values that are the
10369 texture environment color. Integer values, when requested, are
10370 linearly mapped from the internal floating-point representation
10371 such that 1.0 maps to the most positive representable integer, and
10372 -1.0 maps to the most negative representable integer. The initial
10373 value is (0, 0, 0, 0).
10374
10375 `GL_TEXTURE_LOD_BIAS'
10376 PARAMS returns a single floating-point value that is the texture
10377 level-of-detail bias. The initial value is 0.
10378
10379 `GL_COMBINE_RGB'
10380 PARAMS returns a single symbolic constant value representing the
10381 current RGB combine mode. The initial value is `GL_MODULATE'.
10382
10383 `GL_COMBINE_ALPHA'
10384 PARAMS returns a single symbolic constant value representing the
10385 current alpha combine mode. The initial value is `GL_MODULATE'.
10386
10387 `GL_SRC0_RGB'
10388 PARAMS returns a single symbolic constant value representing the
10389 texture combiner zero's RGB source. The initial value is
10390 `GL_TEXTURE'.
10391
10392 `GL_SRC1_RGB'
10393 PARAMS returns a single symbolic constant value representing the
10394 texture combiner one's RGB source. The initial value is
10395 `GL_PREVIOUS'.
10396
10397 `GL_SRC2_RGB'
10398 PARAMS returns a single symbolic constant value representing the
10399 texture combiner two's RGB source. The initial value is
10400 `GL_CONSTANT'.
10401
10402 `GL_SRC0_ALPHA'
10403 PARAMS returns a single symbolic constant value representing the
10404 texture combiner zero's alpha source. The initial value is
10405 `GL_TEXTURE'.
10406
10407 `GL_SRC1_ALPHA'
10408 PARAMS returns a single symbolic constant value representing the
10409 texture combiner one's alpha source. The initial value is
10410 `GL_PREVIOUS'.
10411
10412 `GL_SRC2_ALPHA'
10413 PARAMS returns a single symbolic constant value representing the
10414 texture combiner two's alpha source. The initial value is
10415 `GL_CONSTANT'.
10416
10417 `GL_OPERAND0_RGB'
10418 PARAMS returns a single symbolic constant value representing the
10419 texture combiner zero's RGB operand. The initial value is
10420 `GL_SRC_COLOR'.
10421
10422 `GL_OPERAND1_RGB'
10423 PARAMS returns a single symbolic constant value representing the
10424 texture combiner one's RGB operand. The initial value is
10425 `GL_SRC_COLOR'.
10426
10427 `GL_OPERAND2_RGB'
10428 PARAMS returns a single symbolic constant value representing the
10429 texture combiner two's RGB operand. The initial value is
10430 `GL_SRC_ALPHA'.
10431
10432 `GL_OPERAND0_ALPHA'
10433 PARAMS returns a single symbolic constant value representing the
10434 texture combiner zero's alpha operand. The initial value is
10435 `GL_SRC_ALPHA'.
10436
10437 `GL_OPERAND1_ALPHA'
10438 PARAMS returns a single symbolic constant value representing the
10439 texture combiner one's alpha operand. The initial value is
10440 `GL_SRC_ALPHA'.
10441
10442 `GL_OPERAND2_ALPHA'
10443 PARAMS returns a single symbolic constant value representing the
10444 texture combiner two's alpha operand. The initial value is
10445 `GL_SRC_ALPHA'.
10446
10447 `GL_RGB_SCALE'
10448 PARAMS returns a single floating-point value representing the
10449 current RGB texture combiner scaling factor. The initial value is
10450 1.0.
10451
10452 `GL_ALPHA_SCALE'
10453 PARAMS returns a single floating-point value representing the
10454 current alpha texture combiner scaling factor. The initial value
10455 is 1.0.
10456
10457 `GL_COORD_REPLACE'
10458 PARAMS returns a single boolean value representing the current
10459 point sprite texture coordinate replacement enable state. The
10460 initial value is `GL_FALSE'.
10461
10462 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10463 value.
10464
10465 `GL_INVALID_OPERATION' is generated if `glGetTexEnv' is executed between
10466 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10467
10468 (define-gl-procedures
10469 ((glGetTexGendv
10470 (coord GLenum)
10471 (pname GLenum)
10472 (params GLdouble-*)
10473 ->
10474 void)
10475 (glGetTexGenfv
10476 (coord GLenum)
10477 (pname GLenum)
10478 (params GLfloat-*)
10479 ->
10480 void)
10481 (glGetTexGeniv
10482 (coord GLenum)
10483 (pname GLenum)
10484 (params GLint-*)
10485 ->
10486 void))
10487 "Return texture coordinate generation parameters.
10488
10489 COORD
10490 Specifies a texture coordinate. Must be `GL_S', `GL_T', `GL_R', or
10491 `GL_Q'.
10492
10493 PNAME
10494 Specifies the symbolic name of the value(s) to be returned. Must
10495 be either `GL_TEXTURE_GEN_MODE' or the name of one of the texture
10496 generation plane equations: `GL_OBJECT_PLANE' or `GL_EYE_PLANE'.
10497
10498 PARAMS
10499 Returns the requested data.
10500
10501 `glGetTexGen' returns in PARAMS selected parameters of a texture
10502 coordinate generation function that was specified using `glTexGen'.
10503 COORD names one of the (S, T, R, Q) texture coordinates, using the
10504 symbolic constant `GL_S', `GL_T', `GL_R', or `GL_Q'.
10505
10506 PNAME specifies one of three symbolic names:
10507
10508 `GL_TEXTURE_GEN_MODE'
10509 PARAMS returns the single-valued texture generation function, a
10510 symbolic constant. The initial value is `GL_EYE_LINEAR'.
10511
10512 `GL_OBJECT_PLANE'
10513 PARAMS returns the four plane equation coefficients that specify
10514 object linear-coordinate generation. Integer values, when
10515 requested, are mapped directly from the internal floating-point
10516 representation.
10517
10518 `GL_EYE_PLANE'
10519 PARAMS returns the four plane equation coefficients that specify
10520 eye linear-coordinate generation. Integer values, when requested,
10521 are mapped directly from the internal floating-point
10522 representation. The returned values are those maintained in eye
10523 coordinates. They are not equal to the values specified using
10524 `glTexGen', unless the modelview matrix was identity when
10525 `glTexGen' was called.
10526
10527 `GL_INVALID_ENUM' is generated if COORD or PNAME is not an accepted
10528 value.
10529
10530 `GL_INVALID_OPERATION' is generated if `glGetTexGen' is executed between
10531 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10532
10533 (define-gl-procedures
10534 ((glGetTexImage
10535 (target GLenum)
10536 (level GLint)
10537 (format GLenum)
10538 (type GLenum)
10539 (img GLvoid-*)
10540 ->
10541 void))
10542 "Return a texture image.
10543
10544 TARGET
10545 Specifies which texture is to be obtained. `GL_TEXTURE_1D',
10546 `GL_TEXTURE_2D', `GL_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10547 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10548 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10549 and `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z' are accepted.
10550
10551 LEVEL
10552 Specifies the level-of-detail number of the desired image. Level 0
10553 is the base image level. Level N is the N th mipmap reduction
10554 image.
10555
10556 FORMAT
10557 Specifies a pixel format for the returned data. The supported
10558 formats are `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
10559 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and
10560 `GL_LUMINANCE_ALPHA'.
10561
10562 TYPE
10563 Specifies a pixel type for the returned data. The supported types
10564 are `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
10565 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
10566 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
10567 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
10568 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
10569 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
10570 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
10571 `GL_UNSIGNED_INT_2_10_10_10_REV'.
10572
10573 IMG
10574 Returns the texture image. Should be a pointer to an array of the
10575 type specified by TYPE.
10576
10577 `glGetTexImage' returns a texture image into IMG. TARGET specifies
10578 whether the desired texture image is one specified by `glTexImage1D'
10579 (`GL_TEXTURE_1D'), `glTexImage2D' (`GL_TEXTURE_2D' or any of
10580 `GL_TEXTURE_CUBE_MAP_*'), or `glTexImage3D' (`GL_TEXTURE_3D'). LEVEL
10581 specifies the level-of-detail number of the desired image. FORMAT and
10582 TYPE specify the format and type of the desired image array. See the
10583 reference pages `glTexImage1D' and `glDrawPixels' for a description of
10584 the acceptable values for the FORMAT and TYPE parameters, respectively.
10585
10586 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
10587 target (see `glBindBuffer') while a texture image is requested, IMG is
10588 treated as a byte offset into the buffer object's data store.
10589
10590 To understand the operation of `glGetTexImage', consider the selected
10591 internal four-component texture image to be an RGBA color buffer the
10592 size of the image. The semantics of `glGetTexImage' are then identical
10593 to those of `glReadPixels', with the exception that no pixel transfer
10594 operations are performed, when called with the same FORMAT and TYPE,
10595 with X and Y set to 0, WIDTH set to the width of the texture image
10596 (including border if one was specified), and HEIGHT set to 1 for 1D
10597 images, or to the height of the texture image (including border if one
10598 was specified) for 2D images. Because the internal texture image is an
10599 RGBA image, pixel formats `GL_COLOR_INDEX', `GL_STENCIL_INDEX', and
10600 `GL_DEPTH_COMPONENT' are not accepted, and pixel type `GL_BITMAP' is not
10601 accepted.
10602
10603 If the selected texture image does not contain four components, the
10604 following mappings are applied. Single-component textures are treated
10605 as RGBA buffers with red set to the single-component value, green set to
10606 0, blue set to 0, and alpha set to 1. Two-component textures are
10607 treated as RGBA buffers with red set to the value of component zero,
10608 alpha set to the value of component one, and green and blue set to 0.
10609 Finally, three-component textures are treated as RGBA buffers with red
10610 set to component zero, green set to component one, blue set to component
10611 two, and alpha set to 1.
10612
10613 To determine the required size of IMG, use `glGetTexLevelParameter' to
10614 determine the dimensions of the internal texture image, then scale the
10615 required number of pixels by the storage required for each pixel, based
10616 on FORMAT and TYPE. Be sure to take the pixel storage parameters into
10617 account, especially `GL_PACK_ALIGNMENT'.
10618
10619 `GL_INVALID_ENUM' is generated if TARGET, FORMAT, or TYPE is not an
10620 accepted value.
10621
10622 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
10623
10624 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
10625 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
10626
10627 `GL_INVALID_OPERATION' is returned if TYPE is one of
10628 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
10629 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
10630 is not `GL_RGB'.
10631
10632 `GL_INVALID_OPERATION' is returned if TYPE is one of
10633 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
10634 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
10635 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
10636 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV', and
10637 FORMAT is neither `GL_RGBA' or `GL_BGRA'.
10638
10639 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10640 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
10641 store is currently mapped.
10642
10643 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10644 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
10645 to the buffer object such that the memory writes required would exceed
10646 the data store size.
10647
10648 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10649 bound to the `GL_PIXEL_PACK_BUFFER' target and IMG is not evenly
10650 divisible into the number of bytes needed to store in memory a datum
10651 indicated by TYPE.
10652
10653 `GL_INVALID_OPERATION' is generated if `glGetTexImage' is executed
10654 between the execution of `glBegin' and the corresponding execution of
10655 `glEnd'.")
10656
10657 (define-gl-procedures
10658 ((glGetTexLevelParameterfv
10659 (target GLenum)
10660 (level GLint)
10661 (pname GLenum)
10662 (params GLfloat-*)
10663 ->
10664 void)
10665 (glGetTexLevelParameteriv
10666 (target GLenum)
10667 (level GLint)
10668 (pname GLenum)
10669 (params GLint-*)
10670 ->
10671 void))
10672 "Return texture parameter values for a specific level of detail.
10673
10674 TARGET
10675 Specifies the symbolic name of the target texture, either
10676 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D',
10677 `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_2D',
10678 `GL_PROXY_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10679 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10680 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10681 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
10682
10683 LEVEL
10684 Specifies the level-of-detail number of the desired image. Level 0
10685 is the base image level. Level N is the N th mipmap reduction
10686 image.
10687
10688 PNAME
10689 Specifies the symbolic name of a texture parameter.
10690 `GL_TEXTURE_WIDTH', `GL_TEXTURE_HEIGHT', `GL_TEXTURE_DEPTH',
10691 `GL_TEXTURE_INTERNAL_FORMAT', `GL_TEXTURE_BORDER',
10692 `GL_TEXTURE_RED_SIZE', `GL_TEXTURE_GREEN_SIZE',
10693 `GL_TEXTURE_BLUE_SIZE', `GL_TEXTURE_ALPHA_SIZE',
10694 `GL_TEXTURE_LUMINANCE_SIZE', `GL_TEXTURE_INTENSITY_SIZE',
10695 `GL_TEXTURE_DEPTH_SIZE', `GL_TEXTURE_COMPRESSED', and
10696 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' are accepted.
10697
10698 PARAMS
10699 Returns the requested data.
10700
10701 `glGetTexLevelParameter' returns in PARAMS texture parameter values for
10702 a specific level-of-detail value, specified as LEVEL. TARGET defines
10703 the target texture, either `GL_TEXTURE_1D', `GL_TEXTURE_2D',
10704 `GL_TEXTURE_3D', `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_2D',
10705 `GL_PROXY_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10706 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10707 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10708 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
10709
10710 `GL_MAX_TEXTURE_SIZE', and `GL_MAX_3D_TEXTURE_SIZE' are not really
10711 descriptive enough. It has to report the largest square texture image
10712 that can be accommodated with mipmaps and borders, but a long skinny
10713 texture, or a texture without mipmaps and borders, may easily fit in
10714 texture memory. The proxy targets allow the user to more accurately
10715 query whether the GL can accommodate a texture of a given configuration.
10716 If the texture cannot be accommodated, the texture state variables,
10717 which may be queried with `glGetTexLevelParameter', are set to 0. If
10718 the texture can be accommodated, the texture state values will be set as
10719 they would be set for a non-proxy target.
10720
10721 PNAME specifies the texture parameter whose value or values will be
10722 returned.
10723
10724 The accepted parameter names are as follows:
10725
10726 `GL_TEXTURE_WIDTH'
10727
10728
10729 PARAMS returns a single value, the width of the texture image. This
10730 value includes the border of the texture image. The initial value
10731 is 0.
10732
10733 `GL_TEXTURE_HEIGHT'
10734
10735
10736 PARAMS returns a single value, the height of the texture image.
10737 This value includes the border of the texture image. The initial
10738 value is 0.
10739
10740 `GL_TEXTURE_DEPTH'
10741
10742
10743 PARAMS returns a single value, the depth of the texture image. This
10744 value includes the border of the texture image. The initial value
10745 is 0.
10746
10747 `GL_TEXTURE_INTERNAL_FORMAT'
10748
10749
10750 PARAMS returns a single value, the internal format of the texture
10751 image.
10752
10753 `GL_TEXTURE_BORDER'
10754
10755
10756 PARAMS returns a single value, the width in pixels of the border of
10757 the texture image. The initial value is 0.
10758
10759 `GL_TEXTURE_RED_SIZE',
10760 `GL_TEXTURE_GREEN_SIZE',
10761 `GL_TEXTURE_BLUE_SIZE',
10762 `GL_TEXTURE_ALPHA_SIZE',
10763 `GL_TEXTURE_LUMINANCE_SIZE',
10764 `GL_TEXTURE_INTENSITY_SIZE',
10765 `GL_TEXTURE_DEPTH_SIZE'
10766
10767
10768 The internal storage resolution of an individual component. The
10769 resolution chosen by the GL will be a close match for the
10770 resolution requested by the user with the component argument of
10771 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glCopyTexImage1D',
10772 and `glCopyTexImage2D'. The initial value is 0.
10773
10774 `GL_TEXTURE_COMPRESSED'
10775
10776
10777 PARAMS returns a single boolean value indicating if the texture
10778 image is stored in a compressed internal format. The initiali
10779 value is `GL_FALSE'.
10780
10781 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE'
10782
10783
10784 PARAMS returns a single integer value, the number of unsigned bytes
10785 of the compressed texture image that would be returned from
10786 `glGetCompressedTexImage'.
10787
10788 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10789 value.
10790
10791 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
10792
10793 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
10794 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
10795
10796 `GL_INVALID_OPERATION' is generated if `glGetTexLevelParameter' is
10797 executed between the execution of `glBegin' and the corresponding
10798 execution of `glEnd'.
10799
10800 `GL_INVALID_OPERATION' is generated if
10801 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' is queried on texture images with an
10802 uncompressed internal format or on proxy targets.")
10803
10804 (define-gl-procedures
10805 ((glGetTexParameterfv
10806 (target GLenum)
10807 (pname GLenum)
10808 (params GLfloat-*)
10809 ->
10810 void)
10811 (glGetTexParameteriv
10812 (target GLenum)
10813 (pname GLenum)
10814 (params GLint-*)
10815 ->
10816 void))
10817 "Return texture parameter values.
10818
10819 TARGET
10820 Specifies the symbolic name of the target texture. `GL_TEXTURE_1D',
10821 `GL_TEXTURE_2D', `GL_TEXTURE_3D', and `GL_TEXTURE_CUBE_MAP' are
10822 accepted.
10823
10824 PNAME
10825 Specifies the symbolic name of a texture parameter.
10826 `GL_TEXTURE_MAG_FILTER', `GL_TEXTURE_MIN_FILTER',
10827 `GL_TEXTURE_MIN_LOD', `GL_TEXTURE_MAX_LOD',
10828 `GL_TEXTURE_BASE_LEVEL', `GL_TEXTURE_MAX_LEVEL',
10829 `GL_TEXTURE_WRAP_S', `GL_TEXTURE_WRAP_T', `GL_TEXTURE_WRAP_R',
10830 `GL_TEXTURE_BORDER_COLOR', `GL_TEXTURE_PRIORITY',
10831 `GL_TEXTURE_RESIDENT', `GL_TEXTURE_COMPARE_MODE',
10832 `GL_TEXTURE_COMPARE_FUNC', `GL_DEPTH_TEXTURE_MODE', and
10833 `GL_GENERATE_MIPMAP' are accepted.
10834
10835 PARAMS
10836 Returns the texture parameters.
10837
10838 `glGetTexParameter' returns in PARAMS the value or values of the texture
10839 parameter specified as PNAME. TARGET defines the target texture, either
10840 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D', or
10841 `GL_TEXTURE_CUBE_MAP', to specify one-, two-, or three-dimensional or
10842 cube-mapped texturing. PNAME accepts the same symbols as
10843 `glTexParameter', with the same interpretations:
10844
10845 `GL_TEXTURE_MAG_FILTER'
10846 Returns the single-valued texture magnification filter, a symbolic
10847 constant. The initial value is `GL_LINEAR'.
10848
10849 `GL_TEXTURE_MIN_FILTER'
10850 Returns the single-valued texture minification filter, a symbolic
10851 constant. The initial value is `GL_NEAREST_MIPMAP_LINEAR'.
10852
10853 `GL_TEXTURE_MIN_LOD'
10854 Returns the single-valued texture minimum level-of-detail value.
10855 The initial value is -1000 .
10856
10857 `GL_TEXTURE_MAX_LOD'
10858 Returns the single-valued texture maximum level-of-detail value.
10859 The initial value is 1000.
10860
10861 `GL_TEXTURE_BASE_LEVEL'
10862 Returns the single-valued base texture mipmap level. The initial
10863 value is 0.
10864
10865 `GL_TEXTURE_MAX_LEVEL'
10866 Returns the single-valued maximum texture mipmap array level. The
10867 initial value is 1000.
10868
10869 `GL_TEXTURE_WRAP_S'
10870 Returns the single-valued wrapping function for texture coordinate
10871 S , a symbolic constant. The initial value is `GL_REPEAT'.
10872
10873 `GL_TEXTURE_WRAP_T'
10874 Returns the single-valued wrapping function for texture coordinate
10875 T , a symbolic constant. The initial value is `GL_REPEAT'.
10876
10877 `GL_TEXTURE_WRAP_R'
10878 Returns the single-valued wrapping function for texture coordinate
10879 R , a symbolic constant. The initial value is `GL_REPEAT'.
10880
10881 `GL_TEXTURE_BORDER_COLOR'
10882 Returns four integer or floating-point numbers that comprise the
10883 RGBA color of the texture border. Floating-point values are
10884 returned in the range [0,1] . Integer values are returned as a
10885 linear mapping of the internal floating-point representation such
10886 that 1.0 maps to the most positive representable integer and -1.0
10887 maps to the most negative representable integer. The initial value
10888 is (0, 0, 0, 0).
10889
10890 `GL_TEXTURE_PRIORITY'
10891 Returns the residence priority of the target texture (or the named
10892 texture bound to it). The initial value is 1. See
10893 `glPrioritizeTextures'.
10894
10895 `GL_TEXTURE_RESIDENT'
10896 Returns the residence status of the target texture. If the value
10897 returned in PARAMS is `GL_TRUE', the texture is resident in texture
10898 memory. See `glAreTexturesResident'.
10899
10900 `GL_TEXTURE_COMPARE_MODE'
10901 Returns a single-valued texture comparison mode, a symbolic
10902 constant. The initial value is `GL_NONE'. See `glTexParameter'.
10903
10904 `GL_TEXTURE_COMPARE_FUNC'
10905 Returns a single-valued texture comparison function, a symbolic
10906 constant. The initial value is `GL_LEQUAL'. See `glTexParameter'.
10907
10908 `GL_DEPTH_TEXTURE_MODE'
10909 Returns a single-valued texture format indicating how the depth
10910 values should be converted into color components. The initial
10911 value is `GL_LUMINANCE'. See `glTexParameter'.
10912
10913 `GL_GENERATE_MIPMAP'
10914 Returns a single boolean value indicating if automatic mipmap level
10915 updates are enabled. See `glTexParameter'.
10916
10917 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10918 value.
10919
10920 `GL_INVALID_OPERATION' is generated if `glGetTexParameter' is executed
10921 between the execution of `glBegin' and the corresponding execution of
10922 `glEnd'.")
10923
10924 (define-gl-procedures
10925 ((glGetUniformLocation
10926 (program GLuint)
10927 (name const-GLchar-*)
10928 ->
10929 GLint))
10930 "Returns the location of a uniform variable.
10931
10932 PROGRAM
10933 Specifies the program object to be queried.
10934
10935 NAME
10936 Points to a null terminated string containing the name of the
10937 uniform variable whose location is to be queried.
10938
10939 `glGetUniformLocation ' returns an integer that represents the location
10940 of a specific uniform variable within a program object. NAME must be a
10941 null terminated string that contains no white space. NAME must be an
10942 active uniform variable name in PROGRAM that is not a structure, an
10943 array of structures, or a subcomponent of a vector or a matrix. This
10944 function returns -1 if NAME does not correspond to an active uniform
10945 variable in PROGRAM or if NAME starts with the reserved prefix \"gl_\".
10946
10947 Uniform variables that are structures or arrays of structures may be
10948 queried by calling `glGetUniformLocation' for each field within the
10949 structure. The array element operator \"[]\" and the structure field
10950 operator \".\" may be used in NAME in order to select elements within an
10951 array or fields within a structure. The result of using these operators
10952 is not allowed to be another structure, an array of structures, or a
10953 subcomponent of a vector or a matrix. Except if the last part of NAME
10954 indicates a uniform variable array, the location of the first element of
10955 an array can be retrieved by using the name of the array, or by using
10956 the name appended by \"[0]\".
10957
10958 The actual locations assigned to uniform variables are not known until
10959 the program object is linked successfully. After linking has occurred,
10960 the command `glGetUniformLocation' can be used to obtain the location of
10961 a uniform variable. This location value can then be passed to
10962 `glUniform' to set the value of the uniform variable or to
10963 `glGetUniform' in order to query the current value of the uniform
10964 variable. After a program object has been linked successfully, the
10965 index values for uniform variables remain fixed until the next link
10966 command occurs. Uniform variable locations and values can only be
10967 queried after a link if the link was successful.
10968
10969 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
10970 OpenGL.
10971
10972 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
10973
10974 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
10975 linked.
10976
10977 `GL_INVALID_OPERATION' is generated if `glGetUniformLocation' is
10978 executed between the execution of `glBegin' and the corresponding
10979 execution of `glEnd'.")
10980
10981 (define-gl-procedures
10982 ((glGetUniformfv
10983 (program GLuint)
10984 (location GLint)
10985 (params GLfloat-*)
10986 ->
10987 void)
10988 (glGetUniformiv
10989 (program GLuint)
10990 (location GLint)
10991 (params GLint-*)
10992 ->
10993 void))
10994 "Returns the value of a uniform variable.
10995
10996 PROGRAM
10997 Specifies the program object to be queried.
10998
10999 LOCATION
11000 Specifies the location of the uniform variable to be queried.
11001
11002 PARAMS
11003 Returns the value of the specified uniform variable.
11004
11005 `glGetUniform' returns in PARAMS the value(s) of the specified uniform
11006 variable. The type of the uniform variable specified by LOCATION
11007 determines the number of values returned. If the uniform variable is
11008 defined in the shader as a boolean, int, or float, a single value will
11009 be returned. If it is defined as a vec2, ivec2, or bvec2, two values
11010 will be returned. If it is defined as a vec3, ivec3, or bvec3, three
11011 values will be returned, and so on. To query values stored in uniform
11012 variables declared as arrays, call `glGetUniform' for each element of
11013 the array. To query values stored in uniform variables declared as
11014 structures, call `glGetUniform' for each field in the structure. The
11015 values for uniform variables declared as a matrix will be returned in
11016 column major order.
11017
11018 The locations assigned to uniform variables are not known until the
11019 program object is linked. After linking has occurred, the command
11020 `glGetUniformLocation' can be used to obtain the location of a uniform
11021 variable. This location value can then be passed to `glGetUniform' in
11022 order to query the current value of the uniform variable. After a
11023 program object has been linked successfully, the index values for
11024 uniform variables remain fixed until the next link command occurs. The
11025 uniform variable values can only be queried after a link if the link was
11026 successful.
11027
11028 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
11029 OpenGL.
11030
11031 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
11032
11033 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
11034 linked.
11035
11036 `GL_INVALID_OPERATION' is generated if LOCATION does not correspond to a
11037 valid uniform variable location for the specified program object.
11038
11039 `GL_INVALID_OPERATION' is generated if `glGetUniform' is executed
11040 between the execution of `glBegin' and the corresponding execution of
11041 `glEnd'.")
11042
11043 (define-gl-procedures
11044 ((glGetVertexAttribPointerv
11045 (index GLuint)
11046 (pname GLenum)
11047 (pointer GLvoid-**)
11048 ->
11049 void))
11050 "Return the address of the specified generic vertex attribute pointer.
11051
11052 INDEX
11053 Specifies the generic vertex attribute parameter to be returned.
11054
11055 PNAME
11056 Specifies the symbolic name of the generic vertex attribute
11057 parameter to be returned. Must be
11058 `GL_VERTEX_ATTRIB_ARRAY_POINTER'.
11059
11060 POINTER
11061 Returns the pointer value.
11062
11063 `glGetVertexAttribPointerv' returns pointer information. INDEX is the
11064 generic vertex attribute to be queried, PNAME is a symbolic constant
11065 indicating the pointer to be returned, and PARAMS is a pointer to a
11066 location in which to place the returned data.
11067
11068 If a non-zero named buffer object was bound to the `GL_ARRAY_BUFFER'
11069 target (see `glBindBuffer') when the desired pointer was previously
11070 specified, the POINTER returned is a byte offset into the buffer
11071 object's data store.
11072
11073 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
11074 `GL_MAX_VERTEX_ATTRIBS'.
11075
11076 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.")
11077
11078 (define-gl-procedures
11079 ((glGetVertexAttribdv
11080 (index GLuint)
11081 (pname GLenum)
11082 (params GLdouble-*)
11083 ->
11084 void)
11085 (glGetVertexAttribfv
11086 (index GLuint)
11087 (pname GLenum)
11088 (params GLfloat-*)
11089 ->
11090 void)
11091 (glGetVertexAttribiv
11092 (index GLuint)
11093 (pname GLenum)
11094 (params GLint-*)
11095 ->
11096 void))
11097 "Return a generic vertex attribute parameter.
11098
11099 INDEX
11100 Specifies the generic vertex attribute parameter to be queried.
11101
11102 PNAME
11103 Specifies the symbolic name of the vertex attribute parameter to be
11104 queried. Accepted values are
11105 `GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING',
11106 `GL_VERTEX_ATTRIB_ARRAY_ENABLED', `GL_VERTEX_ATTRIB_ARRAY_SIZE',
11107 `GL_VERTEX_ATTRIB_ARRAY_STRIDE', `GL_VERTEX_ATTRIB_ARRAY_TYPE',
11108 `GL_VERTEX_ATTRIB_ARRAY_NORMALIZED', or `GL_CURRENT_VERTEX_ATTRIB'.
11109
11110 PARAMS
11111 Returns the requested data.
11112
11113 `glGetVertexAttrib' returns in PARAMS the value of a generic vertex
11114 attribute parameter. The generic vertex attribute to be queried is
11115 specified by INDEX, and the parameter to be queried is specified by
11116 PNAME.
11117
11118 The accepted parameter names are as follows:
11119
11120 `GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING'
11121
11122
11123 PARAMS returns a single value, the name of the buffer object
11124 currently bound to the binding point corresponding to generic
11125 vertex attribute array INDEX. If no buffer object is bound, 0 is
11126 returned. The initial value is 0.
11127
11128 `GL_VERTEX_ATTRIB_ARRAY_ENABLED'
11129
11130
11131 PARAMS returns a single value that is non-zero (true) if the vertex
11132 attribute array for INDEX is enabled and 0 (false) if it is
11133 disabled. The initial value is `GL_FALSE'.
11134
11135 `GL_VERTEX_ATTRIB_ARRAY_SIZE'
11136
11137
11138 PARAMS returns a single value, the size of the vertex attribute
11139 array for INDEX. The size is the number of values for each element
11140 of the vertex attribute array, and it will be 1, 2, 3, or 4. The
11141 initial value is 4.
11142
11143 `GL_VERTEX_ATTRIB_ARRAY_STRIDE'
11144
11145
11146 PARAMS returns a single value, the array stride for (number of
11147 bytes between successive elements in) the vertex attribute array
11148 for INDEX. A value of 0 indicates that the array elements are
11149 stored sequentially in memory. The initial value is 0.
11150
11151 `GL_VERTEX_ATTRIB_ARRAY_TYPE'
11152
11153
11154 PARAMS returns a single value, a symbolic constant indicating the
11155 array type for the vertex attribute array for INDEX. Possible
11156 values are `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
11157 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', and
11158 `GL_DOUBLE'. The initial value is `GL_FLOAT'.
11159
11160 `GL_VERTEX_ATTRIB_ARRAY_NORMALIZED'
11161
11162
11163 PARAMS returns a single value that is non-zero (true) if
11164 fixed-point data types for the vertex attribute array indicated by
11165 INDEX are normalized when they are converted to floating point, and
11166 0 (false) otherwise. The initial value is `GL_FALSE'.
11167
11168 `GL_CURRENT_VERTEX_ATTRIB'
11169
11170
11171 PARAMS returns four values that represent the current value for the
11172 generic vertex attribute specified by index. Generic vertex
11173 attribute 0 is unique in that it has no current state, so an error
11174 will be generated if INDEX is 0. The initial value for all other
11175 generic vertex attributes is (0,0,0,1).
11176
11177 All of the parameters except `GL_CURRENT_VERTEX_ATTRIB' represent
11178 client-side state.
11179
11180 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
11181 `GL_MAX_VERTEX_ATTRIBS'.
11182
11183 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
11184
11185 `GL_INVALID_OPERATION' is generated if INDEX is 0 and PNAME is
11186 `GL_CURRENT_VERTEX_ATTRIB'.")
11187
11188 (define-gl-procedures
11189 ((glGetBooleanv
11190 (pname GLenum)
11191 (params GLboolean-*)
11192 ->
11193 void)
11194 (glGetDoublev
11195 (pname GLenum)
11196 (params GLdouble-*)
11197 ->
11198 void)
11199 (glGetFloatv
11200 (pname GLenum)
11201 (params GLfloat-*)
11202 ->
11203 void)
11204 (glGetIntegerv
11205 (pname GLenum)
11206 (params GLint-*)
11207 ->
11208 void))
11209 "Return the value or values of a selected parameter.
11210
11211 PNAME
11212 Specifies the parameter value to be returned. The symbolic
11213 constants in the list below are accepted.
11214
11215 PARAMS
11216 Returns the value or values of the specified parameter.
11217
11218 These four commands return values for simple state variables in GL.
11219 PNAME is a symbolic constant indicating the state variable to be
11220 returned, and PARAMS is a pointer to an array of the indicated type in
11221 which to place the returned data.
11222
11223 Type conversion is performed if PARAMS has a different type than the
11224 state variable value being requested. If `glGetBooleanv' is called, a
11225 floating-point (or integer) value is converted to `GL_FALSE' if and only
11226 if it is 0.0 (or 0). Otherwise, it is converted to `GL_TRUE'. If
11227 `glGetIntegerv' is called, boolean values are returned as `GL_TRUE' or
11228 `GL_FALSE', and most floating-point values are rounded to the nearest
11229 integer value. Floating-point colors and normals, however, are returned
11230 with a linear mapping that maps 1.0 to the most positive representable
11231 integer value and -1.0 to the most negative representable integer value.
11232 If `glGetFloatv' or `glGetDoublev' is called, boolean values are
11233 returned as `GL_TRUE' or `GL_FALSE', and integer values are converted to
11234 floating-point values.
11235
11236 The following symbolic constants are accepted by PNAME:
11237
11238 `GL_ACCUM_ALPHA_BITS'
11239
11240
11241 PARAMS returns one value, the number of alpha bitplanes in the
11242 accumulation buffer.
11243
11244 `GL_ACCUM_BLUE_BITS'
11245
11246
11247 PARAMS returns one value, the number of blue bitplanes in the
11248 accumulation buffer.
11249
11250 `GL_ACCUM_CLEAR_VALUE'
11251
11252
11253 PARAMS returns four values: the red, green, blue, and alpha values
11254 used to clear the accumulation buffer. Integer values, if
11255 requested, are linearly mapped from the internal floating-point
11256 representation such that 1.0 returns the most positive
11257 representable integer value, and -1.0 returns the most negative
11258 representable integer value. The initial value is (0, 0, 0, 0).
11259 See `glClearAccum'.
11260
11261 `GL_ACCUM_GREEN_BITS'
11262
11263
11264 PARAMS returns one value, the number of green bitplanes in the
11265 accumulation buffer.
11266
11267 `GL_ACCUM_RED_BITS'
11268
11269
11270 PARAMS returns one value, the number of red bitplanes in the
11271 accumulation buffer.
11272
11273 `GL_ACTIVE_TEXTURE'
11274
11275
11276 PARAMS returns a single value indicating the active multitexture
11277 unit. The initial value is `GL_TEXTURE0'. See `glActiveTexture'.
11278
11279 `GL_ALIASED_POINT_SIZE_RANGE'
11280
11281
11282 PARAMS returns two values, the smallest and largest supported sizes
11283 for aliased points.
11284
11285 `GL_ALIASED_LINE_WIDTH_RANGE'
11286
11287
11288 PARAMS returns two values, the smallest and largest supported
11289 widths for aliased lines.
11290
11291 `GL_ALPHA_BIAS'
11292
11293
11294 PARAMS returns one value, the alpha bias factor used during pixel
11295 transfers. The initial value is 0. See `glPixelTransfer'.
11296
11297 `GL_ALPHA_BITS'
11298
11299
11300 PARAMS returns one value, the number of alpha bitplanes in each
11301 color buffer.
11302
11303 `GL_ALPHA_SCALE'
11304
11305
11306 PARAMS returns one value, the alpha scale factor used during pixel
11307 transfers. The initial value is 1. See `glPixelTransfer'.
11308
11309 `GL_ALPHA_TEST'
11310
11311
11312 PARAMS returns a single boolean value indicating whether alpha
11313 testing of fragments is enabled. The initial value is `GL_FALSE'.
11314 See `glAlphaFunc'.
11315
11316 `GL_ALPHA_TEST_FUNC'PARAMS returns one value,
11317
11318
11319 the symbolic name of the alpha test function. The initial value is
11320 `GL_ALWAYS'. See `glAlphaFunc'.
11321
11322 `GL_ALPHA_TEST_REF'
11323
11324
11325 PARAMS returns one value, the reference value for the alpha test.
11326 The initial value is 0. See `glAlphaFunc'. An integer value, if
11327 requested, is linearly mapped from the internal floating-point
11328 representation such that 1.0 returns the most positive
11329 representable integer value, and -1.0 returns the most negative
11330 representable integer value.
11331
11332 `GL_ARRAY_BUFFER_BINDING'
11333
11334
11335 PARAMS returns a single value, the name of the buffer object
11336 currently bound to the target `GL_ARRAY_BUFFER'. If no buffer
11337 object is bound to this target, 0 is returned. The initial value
11338 is 0. See `glBindBuffer'.
11339
11340 `GL_ATTRIB_STACK_DEPTH'
11341
11342
11343 PARAMS returns one value, the depth of the attribute stack. If the
11344 stack is empty, 0 is returned. The initial value is 0. See
11345 `glPushAttrib'.
11346
11347 `GL_AUTO_NORMAL'
11348
11349
11350 PARAMS returns a single boolean value indicating whether 2D map
11351 evaluation automatically generates surface normals. The initial
11352 value is `GL_FALSE'. See `glMap2'.
11353
11354 `GL_AUX_BUFFERS'
11355
11356
11357 PARAMS returns one value, the number of auxiliary color buffers
11358 available.
11359
11360 `GL_BLEND'
11361
11362
11363 PARAMS returns a single boolean value indicating whether blending
11364 is enabled. The initial value is `GL_FALSE'. See `glBlendFunc'.
11365
11366 `GL_BLEND_COLOR'
11367
11368
11369 PARAMS returns four values, the red, green, blue, and alpha values
11370 which are the components of the blend color. See `glBlendColor'.
11371
11372 `GL_BLEND_DST_ALPHA'
11373
11374
11375 PARAMS returns one value, the symbolic constant identifying the
11376 alpha destination blend function. The initial value is `GL_ZERO'.
11377 See `glBlendFunc' and `glBlendFuncSeparate'.
11378
11379 `GL_BLEND_DST_RGB'
11380
11381
11382 PARAMS returns one value, the symbolic constant identifying the RGB
11383 destination blend function. The initial value is `GL_ZERO'. See
11384 `glBlendFunc' and `glBlendFuncSeparate'.
11385
11386 `GL_BLEND_EQUATION_RGB'
11387
11388
11389 PARAMS returns one value, a symbolic constant indicating whether
11390 the RGB blend equation is `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
11391 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN' or `GL_MAX'. See
11392 `glBlendEquationSeparate'.
11393
11394 `GL_BLEND_EQUATION_ALPHA'
11395
11396
11397 PARAMS returns one value, a symbolic constant indicating whether
11398 the Alpha blend equation is `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
11399 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN' or `GL_MAX'. See
11400 `glBlendEquationSeparate'.
11401
11402 `GL_BLEND_SRC_ALPHA'
11403
11404
11405 PARAMS returns one value, the symbolic constant identifying the
11406 alpha source blend function. The initial value is `GL_ONE'. See
11407 `glBlendFunc' and `glBlendFuncSeparate'.
11408
11409 `GL_BLEND_SRC_RGB'
11410
11411
11412 PARAMS returns one value, the symbolic constant identifying the RGB
11413 source blend function. The initial value is `GL_ONE'. See
11414 `glBlendFunc' and `glBlendFuncSeparate'.
11415
11416 `GL_BLUE_BIAS'
11417
11418
11419 PARAMS returns one value, the blue bias factor used during pixel
11420 transfers. The initial value is 0. See `glPixelTransfer'.
11421
11422 `GL_BLUE_BITS'
11423
11424
11425 PARAMS returns one value, the number of blue bitplanes in each
11426 color buffer.
11427
11428 `GL_BLUE_SCALE'
11429
11430
11431 PARAMS returns one value, the blue scale factor used during pixel
11432 transfers. The initial value is 1. See `glPixelTransfer'.
11433
11434 `GL_CLIENT_ACTIVE_TEXTURE'
11435
11436
11437 PARAMS returns a single integer value indicating the current client
11438 active multitexture unit. The initial value is `GL_TEXTURE0'. See
11439 `glClientActiveTexture'.
11440
11441 `GL_CLIENT_ATTRIB_STACK_DEPTH'
11442
11443
11444 PARAMS returns one value indicating the depth of the attribute
11445 stack. The initial value is 0. See `glPushClientAttrib'.
11446
11447 `GL_CLIP_PLANE'I
11448
11449
11450 PARAMS returns a single boolean value indicating whether the
11451 specified clipping plane is enabled. The initial value is
11452 `GL_FALSE'. See `glClipPlane'.
11453
11454 `GL_COLOR_ARRAY'
11455
11456
11457 PARAMS returns a single boolean value indicating whether the color
11458 array is enabled. The initial value is `GL_FALSE'. See
11459 `glColorPointer'.
11460
11461 `GL_COLOR_ARRAY_BUFFER_BINDING'
11462
11463
11464 PARAMS returns a single value, the name of the buffer object
11465 associated with the color array. This buffer object would have
11466 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
11467 recent call to `glColorPointer'. If no buffer object was bound to
11468 this target, 0 is returned. The initial value is 0. See
11469 `glBindBuffer'.
11470
11471 `GL_COLOR_ARRAY_SIZE'
11472
11473
11474 PARAMS returns one value, the number of components per color in the
11475 color array. The initial value is 4. See `glColorPointer'.
11476
11477 `GL_COLOR_ARRAY_STRIDE'
11478
11479
11480 PARAMS returns one value, the byte offset between consecutive
11481 colors in the color array. The initial value is 0. See
11482 `glColorPointer'.
11483
11484 `GL_COLOR_ARRAY_TYPE'
11485
11486
11487 PARAMS returns one value, the data type of each component in the
11488 color array. The initial value is `GL_FLOAT'. See
11489 `glColorPointer'.
11490
11491 `GL_COLOR_CLEAR_VALUE'
11492
11493
11494 PARAMS returns four values: the red, green, blue, and alpha values
11495 used to clear the color buffers. Integer values, if requested, are
11496 linearly mapped from the internal floating-point representation
11497 such that 1.0 returns the most positive representable integer
11498 value, and -1.0 returns the most negative representable integer
11499 value. The initial value is (0, 0, 0, 0). See `glClearColor'.
11500
11501 `GL_COLOR_LOGIC_OP'
11502
11503
11504 PARAMS returns a single boolean value indicating whether a
11505 fragment's RGBA color values are merged into the framebuffer using
11506 a logical operation. The initial value is `GL_FALSE'. See
11507 `glLogicOp'.
11508
11509 `GL_COLOR_MATERIAL'
11510
11511
11512 PARAMS returns a single boolean value indicating whether one or
11513 more material parameters are tracking the current color. The
11514 initial value is `GL_FALSE'. See `glColorMaterial'.
11515
11516 `GL_COLOR_MATERIAL_FACE'
11517
11518
11519 PARAMS returns one value, a symbolic constant indicating which
11520 materials have a parameter that is tracking the current color. The
11521 initial value is `GL_FRONT_AND_BACK'. See `glColorMaterial'.
11522
11523 `GL_COLOR_MATERIAL_PARAMETER'
11524
11525
11526 PARAMS returns one value, a symbolic constant indicating which
11527 material parameters are tracking the current color. The initial
11528 value is `GL_AMBIENT_AND_DIFFUSE'. See `glColorMaterial'.
11529
11530 `GL_COLOR_MATRIX'
11531
11532
11533 PARAMS returns sixteen values: the color matrix on the top of the
11534 color matrix stack. Initially this matrix is the identity matrix.
11535 See `glPushMatrix'.
11536
11537 `GL_COLOR_MATRIX_STACK_DEPTH'
11538
11539
11540 PARAMS returns one value, the maximum supported depth of the
11541 projection matrix stack. The value must be at least 2. See
11542 `glPushMatrix'.
11543
11544 `GL_COLOR_SUM'
11545
11546
11547 PARAMS returns a single boolean value indicating whether primary
11548 and secondary color sum is enabled. See `glSecondaryColor'.
11549
11550 `GL_COLOR_TABLE'
11551
11552
11553 PARAMS returns a single boolean value indicating whether the color
11554 table lookup is enabled. See `glColorTable'.
11555
11556 `GL_COLOR_WRITEMASK'
11557
11558
11559 PARAMS returns four boolean values: the red, green, blue, and alpha
11560 write enables for the color buffers. The initial value is
11561 (`GL_TRUE', `GL_TRUE', `GL_TRUE', `GL_TRUE'). See `glColorMask'.
11562
11563 `GL_COMPRESSED_TEXTURE_FORMATS'
11564
11565
11566 PARAMS returns a list of symbolic constants of length
11567 `GL_NUM_COMPRESSED_TEXTURE_FORMATS' indicating which compressed
11568 texture formats are available. See `glCompressedTexImage2D'.
11569
11570 `GL_CONVOLUTION_1D'
11571
11572
11573 PARAMS returns a single boolean value indicating whether 1D
11574 convolution is enabled. The initial value is `GL_FALSE'. See
11575 `glConvolutionFilter1D'.
11576
11577 `GL_CONVOLUTION_2D'
11578
11579
11580 PARAMS returns a single boolean value indicating whether 2D
11581 convolution is enabled. The initial value is `GL_FALSE'. See
11582 `glConvolutionFilter2D'.
11583
11584 `GL_CULL_FACE'
11585
11586
11587 PARAMS returns a single boolean value indicating whether polygon
11588 culling is enabled. The initial value is `GL_FALSE'. See
11589 `glCullFace'.
11590
11591 `GL_CULL_FACE_MODE'
11592
11593
11594 PARAMS returns one value, a symbolic constant indicating which
11595 polygon faces are to be culled. The initial value is `GL_BACK'.
11596 See `glCullFace'.
11597
11598 `GL_CURRENT_COLOR'
11599
11600
11601 PARAMS returns four values: the red, green, blue, and alpha values
11602 of the current color. Integer values, if requested, are linearly
11603 mapped from the internal floating-point representation such that
11604 1.0 returns the most positive representable integer value, and -1.0
11605 returns the most negative representable integer value. The initial
11606 value is (1, 1, 1, 1). See `glColor'.
11607
11608 `GL_CURRENT_FOG_COORD'
11609
11610
11611 PARAMS returns one value, the current fog coordinate. The initial
11612 value is 0. See `glFogCoord'.
11613
11614 `GL_CURRENT_INDEX'
11615
11616
11617 PARAMS returns one value, the current color index. The initial
11618 value is 1. See `glIndex'.
11619
11620 `GL_CURRENT_NORMAL'
11621
11622
11623 PARAMS returns three values: the X, Y, and Z values of the current
11624 normal. Integer values, if requested, are linearly mapped from the
11625 internal floating-point representation such that 1.0 returns the
11626 most positive representable integer value, and -1.0 returns the
11627 most negative representable integer value. The initial value is
11628 (0, 0, 1). See `glNormal'.
11629
11630 `GL_CURRENT_PROGRAM'
11631
11632
11633 PARAMS returns one value, the name of the program object that is
11634 currently active, or 0 if no program object is active. See
11635 `glUseProgram'.
11636
11637 `GL_CURRENT_RASTER_COLOR'
11638
11639
11640 PARAMS returns four values: the red, green, blue, and alpha color
11641 values of the current raster position. Integer values, if
11642 requested, are linearly mapped from the internal floating-point
11643 representation such that 1.0 returns the most positive
11644 representable integer value, and -1.0 returns the most negative
11645 representable integer value. The initial value is (1, 1, 1, 1).
11646 See `glRasterPos'.
11647
11648 `GL_CURRENT_RASTER_DISTANCE'
11649
11650
11651 PARAMS returns one value, the distance from the eye to the current
11652 raster position. The initial value is 0. See `glRasterPos'.
11653
11654 `GL_CURRENT_RASTER_INDEX'
11655
11656
11657 PARAMS returns one value, the color index of the current raster
11658 position. The initial value is 1. See `glRasterPos'.
11659
11660 `GL_CURRENT_RASTER_POSITION'
11661
11662
11663 PARAMS returns four values: the X, Y, Z, and W components of the
11664 current raster position. X, Y, and Z are in window coordinates,
11665 and W is in clip coordinates. The initial value is (0, 0, 0, 1).
11666 See `glRasterPos'.
11667
11668 `GL_CURRENT_RASTER_POSITION_VALID'
11669
11670
11671 PARAMS returns a single boolean value indicating whether the
11672 current raster position is valid. The initial value is `GL_TRUE'.
11673 See `glRasterPos'.
11674
11675 `GL_CURRENT_RASTER_SECONDARY_COLOR'
11676
11677
11678 PARAMS returns four values: the red, green, blue, and alpha
11679 secondary color values of the current raster position. Integer
11680 values, if requested, are linearly mapped from the internal
11681 floating-point representation such that 1.0 returns the most
11682 positive representable integer value, and -1.0 returns the most
11683 negative representable integer value. The initial value is (1, 1,
11684 1, 1). See `glRasterPos'.
11685
11686 `GL_CURRENT_RASTER_TEXTURE_COORDS'
11687
11688
11689 PARAMS returns four values: the S, T, R, and Q texture coordinates
11690 of the current raster position. The initial value is (0, 0, 0, 1).
11691 See `glRasterPos' and `glMultiTexCoord'.
11692
11693 `GL_CURRENT_SECONDARY_COLOR'
11694
11695
11696 PARAMS returns four values: the red, green, blue, and alpha values
11697 of the current secondary color. Integer values, if requested, are
11698 linearly mapped from the internal floating-point representation
11699 such that 1.0 returns the most positive representable integer
11700 value, and -1.0 returns the most negative representable integer
11701 value. The initial value is (0, 0, 0, 0). See `glSecondaryColor'.
11702
11703 `GL_CURRENT_TEXTURE_COORDS'
11704
11705
11706 PARAMS returns four values: the S, T, R, and Q current texture
11707 coordinates. The initial value is (0, 0, 0, 1). See
11708 `glMultiTexCoord'.
11709
11710 `GL_DEPTH_BIAS'
11711
11712
11713 PARAMS returns one value, the depth bias factor used during pixel
11714 transfers. The initial value is 0. See `glPixelTransfer'.
11715
11716 `GL_DEPTH_BITS'
11717
11718
11719 PARAMS returns one value, the number of bitplanes in the depth
11720 buffer.
11721
11722 `GL_DEPTH_CLEAR_VALUE'
11723
11724
11725 PARAMS returns one value, the value that is used to clear the depth
11726 buffer. Integer values, if requested, are linearly mapped from the
11727 internal floating-point representation such that 1.0 returns the
11728 most positive representable integer value, and -1.0 returns the
11729 most negative representable integer value. The initial value is 1.
11730 See `glClearDepth'.
11731
11732 `GL_DEPTH_FUNC'
11733
11734
11735 PARAMS returns one value, the symbolic constant that indicates the
11736 depth comparison function. The initial value is `GL_LESS'. See
11737 `glDepthFunc'.
11738
11739 `GL_DEPTH_RANGE'
11740
11741
11742 PARAMS returns two values: the near and far mapping limits for the
11743 depth buffer. Integer values, if requested, are linearly mapped
11744 from the internal floating-point representation such that 1.0
11745 returns the most positive representable integer value, and -1.0
11746 returns the most negative representable integer value. The initial
11747 value is (0, 1). See `glDepthRange'.
11748
11749 `GL_DEPTH_SCALE'
11750
11751
11752 PARAMS returns one value, the depth scale factor used during pixel
11753 transfers. The initial value is 1. See `glPixelTransfer'.
11754
11755 `GL_DEPTH_TEST'
11756
11757
11758 PARAMS returns a single boolean value indicating whether depth
11759 testing of fragments is enabled. The initial value is `GL_FALSE'.
11760 See `glDepthFunc' and `glDepthRange'.
11761
11762 `GL_DEPTH_WRITEMASK'
11763
11764
11765 PARAMS returns a single boolean value indicating if the depth
11766 buffer is enabled for writing. The initial value is `GL_TRUE'. See
11767 `glDepthMask'.
11768
11769 `GL_DITHER'
11770
11771
11772 PARAMS returns a single boolean value indicating whether dithering
11773 of fragment colors and indices is enabled. The initial value is
11774 `GL_TRUE'.
11775
11776 `GL_DOUBLEBUFFER'
11777
11778
11779 PARAMS returns a single boolean value indicating whether double
11780 buffering is supported.
11781
11782 `GL_DRAW_BUFFER'
11783
11784
11785 PARAMS returns one value, a symbolic constant indicating which
11786 buffers are being drawn to. See `glDrawBuffer'. The initial value
11787 is `GL_BACK' if there are back buffers, otherwise it is `GL_FRONT'.
11788
11789 `GL_DRAW_BUFFER'I
11790
11791
11792 PARAMS returns one value, a symbolic constant indicating which
11793 buffers are being drawn to by the corresponding output color. See
11794 `glDrawBuffers'. The initial value of `GL_DRAW_BUFFER0' is
11795 `GL_BACK' if there are back buffers, otherwise it is `GL_FRONT'.
11796 The initial values of draw buffers for all other output colors is
11797 `GL_NONE'.
11798
11799 `GL_EDGE_FLAG'
11800
11801
11802 PARAMS returns a single boolean value indicating whether the
11803 current edge flag is `GL_TRUE' or `GL_FALSE'. The initial value is
11804 `GL_TRUE'. See `glEdgeFlag'.
11805
11806 `GL_EDGE_FLAG_ARRAY'
11807
11808
11809 PARAMS returns a single boolean value indicating whether the edge
11810 flag array is enabled. The initial value is `GL_FALSE'. See
11811 `glEdgeFlagPointer'.
11812
11813 `GL_EDGE_FLAG_ARRAY_BUFFER_BINDING'
11814
11815
11816 PARAMS returns a single value, the name of the buffer object
11817 associated with the edge flag array. This buffer object would have
11818 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
11819 recent call to `glEdgeFlagPointer'. If no buffer object was bound
11820 to this target, 0 is returned. The initial value is 0. See
11821 `glBindBuffer'.
11822
11823 `GL_EDGE_FLAG_ARRAY_STRIDE'
11824
11825
11826 PARAMS returns one value, the byte offset between consecutive edge
11827 flags in the edge flag array. The initial value is 0. See
11828 `glEdgeFlagPointer'.
11829
11830 `GL_ELEMENT_ARRAY_BUFFER_BINDING'
11831
11832
11833 PARAMS returns a single value, the name of the buffer object
11834 currently bound to the target `GL_ELEMENT_ARRAY_BUFFER'. If no
11835 buffer object is bound to this target, 0 is returned. The initial
11836 value is 0. See `glBindBuffer'.
11837
11838 `GL_FEEDBACK_BUFFER_SIZE'
11839
11840
11841 PARAMS returns one value, the size of the feedback buffer. See
11842 `glFeedbackBuffer'.
11843
11844 `GL_FEEDBACK_BUFFER_TYPE'
11845
11846
11847 PARAMS returns one value, the type of the feedback buffer. See
11848 `glFeedbackBuffer'.
11849
11850 `GL_FOG'
11851
11852
11853 PARAMS returns a single boolean value indicating whether fogging is
11854 enabled. The initial value is `GL_FALSE'. See `glFog'.
11855
11856 `GL_FOG_COORD_ARRAY'
11857
11858
11859 PARAMS returns a single boolean value indicating whether the fog
11860 coordinate array is enabled. The initial value is `GL_FALSE'. See
11861 `glFogCoordPointer'.
11862
11863 `GL_FOG_COORD_ARRAY_BUFFER_BINDING'
11864
11865
11866 PARAMS returns a single value, the name of the buffer object
11867 associated with the fog coordinate array. This buffer object would
11868 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
11869 most recent call to `glFogCoordPointer'. If no buffer object was
11870 bound to this target, 0 is returned. The initial value is 0. See
11871 `glBindBuffer'.
11872
11873 `GL_FOG_COORD_ARRAY_STRIDE'
11874
11875
11876 PARAMS returns one value, the byte offset between consecutive fog
11877 coordinates in the fog coordinate array. The initial value is 0.
11878 See `glFogCoordPointer'.
11879
11880 `GL_FOG_COORD_ARRAY_TYPE'
11881
11882
11883 PARAMS returns one value, the type of the fog coordinate array. The
11884 initial value is `GL_FLOAT'. See `glFogCoordPointer'.
11885
11886 `GL_FOG_COORD_SRC'
11887
11888
11889 PARAMS returns one value, a symbolic constant indicating the source
11890 of the fog coordinate. The initial value is `GL_FRAGMENT_DEPTH'.
11891 See `glFog'.
11892
11893 `GL_FOG_COLOR'
11894
11895
11896 PARAMS returns four values: the red, green, blue, and alpha
11897 components of the fog color. Integer values, if requested, are
11898 linearly mapped from the internal floating-point representation
11899 such that 1.0 returns the most positive representable integer
11900 value, and -1.0 returns the most negative representable integer
11901 value. The initial value is (0, 0, 0, 0). See `glFog'.
11902
11903 `GL_FOG_DENSITY'
11904
11905
11906 PARAMS returns one value, the fog density parameter. The initial
11907 value is 1. See `glFog'.
11908
11909 `GL_FOG_END'
11910
11911
11912 PARAMS returns one value, the end factor for the linear fog
11913 equation. The initial value is 1. See `glFog'.
11914
11915 `GL_FOG_HINT'
11916
11917
11918 PARAMS returns one value, a symbolic constant indicating the mode
11919 of the fog hint. The initial value is `GL_DONT_CARE'. See
11920 `glHint'.
11921
11922 `GL_FOG_INDEX'
11923
11924
11925 PARAMS returns one value, the fog color index. The initial value
11926 is 0. See `glFog'.
11927
11928 `GL_FOG_MODE'
11929
11930
11931 PARAMS returns one value, a symbolic constant indicating which fog
11932 equation is selected. The initial value is `GL_EXP'. See `glFog'.
11933
11934 `GL_FOG_START'
11935
11936
11937 PARAMS returns one value, the start factor for the linear fog
11938 equation. The initial value is 0. See `glFog'.
11939
11940 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT'
11941
11942
11943 PARAMS returns one value, a symbolic constant indicating the mode
11944 of the derivative accuracy hint for fragment shaders. The initial
11945 value is `GL_DONT_CARE'. See `glHint'.
11946
11947 `GL_FRONT_FACE'
11948
11949
11950 PARAMS returns one value, a symbolic constant indicating whether
11951 clockwise or counterclockwise polygon winding is treated as
11952 front-facing. The initial value is `GL_CCW'. See `glFrontFace'.
11953
11954 `GL_GENERATE_MIPMAP_HINT'
11955
11956
11957 PARAMS returns one value, a symbolic constant indicating the mode
11958 of the mipmap generation filtering hint. The initial value is
11959 `GL_DONT_CARE'. See `glHint'.
11960
11961 `GL_GREEN_BIAS'
11962
11963
11964 PARAMS returns one value, the green bias factor used during pixel
11965 transfers. The initial value is 0.
11966
11967 `GL_GREEN_BITS'
11968
11969
11970 PARAMS returns one value, the number of green bitplanes in each
11971 color buffer.
11972
11973 `GL_GREEN_SCALE'
11974
11975
11976 PARAMS returns one value, the green scale factor used during pixel
11977 transfers. The initial value is 1. See `glPixelTransfer'.
11978
11979 `GL_HISTOGRAM'
11980
11981
11982 PARAMS returns a single boolean value indicating whether histogram
11983 is enabled. The initial value is `GL_FALSE'. See `glHistogram'.
11984
11985 `GL_INDEX_ARRAY'
11986
11987
11988 PARAMS returns a single boolean value indicating whether the color
11989 index array is enabled. The initial value is `GL_FALSE'. See
11990 `glIndexPointer'.
11991
11992 `GL_INDEX_ARRAY_BUFFER_BINDING'
11993
11994
11995 PARAMS returns a single value, the name of the buffer object
11996 associated with the color index array. This buffer object would
11997 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
11998 most recent call to `glIndexPointer'. If no buffer object was
11999 bound to this target, 0 is returned. The initial value is 0. See
12000 `glBindBuffer'.
12001
12002 `GL_INDEX_ARRAY_STRIDE'
12003
12004
12005 PARAMS returns one value, the byte offset between consecutive color
12006 indexes in the color index array. The initial value is 0. See
12007 `glIndexPointer'.
12008
12009 `GL_INDEX_ARRAY_TYPE'
12010
12011
12012 PARAMS returns one value, the data type of indexes in the color
12013 index array. The initial value is `GL_FLOAT'. See
12014 `glIndexPointer'.
12015
12016 `GL_INDEX_BITS'
12017
12018
12019 PARAMS returns one value, the number of bitplanes in each color
12020 index buffer.
12021
12022 `GL_INDEX_CLEAR_VALUE'
12023
12024
12025 PARAMS returns one value, the color index used to clear the color
12026 index buffers. The initial value is 0. See `glClearIndex'.
12027
12028 `GL_INDEX_LOGIC_OP'
12029
12030
12031 PARAMS returns a single boolean value indicating whether a
12032 fragment's index values are merged into the framebuffer using a
12033 logical operation. The initial value is `GL_FALSE'. See
12034 `glLogicOp'.
12035
12036 `GL_INDEX_MODE'
12037
12038
12039 PARAMS returns a single boolean value indicating whether the GL is
12040 in color index mode (`GL_TRUE') or RGBA mode (`GL_FALSE').
12041
12042 `GL_INDEX_OFFSET'
12043
12044
12045 PARAMS returns one value, the offset added to color and stencil
12046 indices during pixel transfers. The initial value is 0. See
12047 `glPixelTransfer'.
12048
12049 `GL_INDEX_SHIFT'
12050
12051
12052 PARAMS returns one value, the amount that color and stencil indices
12053 are shifted during pixel transfers. The initial value is 0. See
12054 `glPixelTransfer'.
12055
12056 `GL_INDEX_WRITEMASK'
12057
12058
12059 PARAMS returns one value, a mask indicating which bitplanes of each
12060 color index buffer can be written. The initial value is all 1's.
12061 See `glIndexMask'.
12062
12063 `GL_LIGHT'I
12064
12065
12066 PARAMS returns a single boolean value indicating whether the
12067 specified light is enabled. The initial value is `GL_FALSE'. See
12068 `glLight' and `glLightModel'.
12069
12070 `GL_LIGHTING'
12071
12072
12073 PARAMS returns a single boolean value indicating whether lighting
12074 is enabled. The initial value is `GL_FALSE'. See `glLightModel'.
12075
12076 `GL_LIGHT_MODEL_AMBIENT'
12077
12078
12079 PARAMS returns four values: the red, green, blue, and alpha
12080 components of the ambient intensity of the entire scene. Integer
12081 values, if requested, are linearly mapped from the internal
12082 floating-point representation such that 1.0 returns the most
12083 positive representable integer value, and -1.0 returns the most
12084 negative representable integer value. The initial value is (0.2,
12085 0.2, 0.2, 1.0). See `glLightModel'.
12086
12087 `GL_LIGHT_MODEL_COLOR_CONTROL'
12088
12089
12090 PARAMS returns single enumerated value indicating whether specular
12091 reflection calculations are separated from normal lighting
12092 computations. The initial value is `GL_SINGLE_COLOR'.
12093
12094 `GL_LIGHT_MODEL_LOCAL_VIEWER'
12095
12096
12097 PARAMS returns a single boolean value indicating whether specular
12098 reflection calculations treat the viewer as being local to the
12099 scene. The initial value is `GL_FALSE'. See `glLightModel'.
12100
12101 `GL_LIGHT_MODEL_TWO_SIDE'
12102
12103
12104 PARAMS returns a single boolean value indicating whether separate
12105 materials are used to compute lighting for front- and back-facing
12106 polygons. The initial value is `GL_FALSE'. See `glLightModel'.
12107
12108 `GL_LINE_SMOOTH'
12109
12110
12111 PARAMS returns a single boolean value indicating whether
12112 antialiasing of lines is enabled. The initial value is `GL_FALSE'.
12113 See `glLineWidth'.
12114
12115 `GL_LINE_SMOOTH_HINT'
12116
12117
12118 PARAMS returns one value, a symbolic constant indicating the mode
12119 of the line antialiasing hint. The initial value is
12120 `GL_DONT_CARE'. See `glHint'.
12121
12122 `GL_LINE_STIPPLE'
12123
12124
12125 PARAMS returns a single boolean value indicating whether stippling
12126 of lines is enabled. The initial value is `GL_FALSE'. See
12127 `glLineStipple'.
12128
12129 `GL_LINE_STIPPLE_PATTERN'
12130
12131
12132 PARAMS returns one value, the 16-bit line stipple pattern. The
12133 initial value is all 1's. See `glLineStipple'.
12134
12135 `GL_LINE_STIPPLE_REPEAT'
12136
12137
12138 PARAMS returns one value, the line stipple repeat factor. The
12139 initial value is 1. See `glLineStipple'.
12140
12141 `GL_LINE_WIDTH'
12142
12143
12144 PARAMS returns one value, the line width as specified with
12145 `glLineWidth'. The initial value is 1.
12146
12147 `GL_LINE_WIDTH_GRANULARITY'
12148
12149
12150 PARAMS returns one value, the width difference between adjacent
12151 supported widths for antialiased lines. See `glLineWidth'.
12152
12153 `GL_LINE_WIDTH_RANGE'
12154
12155
12156 PARAMS returns two values: the smallest and largest supported
12157 widths for antialiased lines. See `glLineWidth'.
12158
12159 `GL_LIST_BASE'
12160
12161
12162 PARAMS returns one value, the base offset added to all names in
12163 arrays presented to `glCallLists'. The initial value is 0. See
12164 `glListBase'.
12165
12166 `GL_LIST_INDEX'
12167
12168
12169 PARAMS returns one value, the name of the display list currently
12170 under construction. 0 is returned if no display list is currently
12171 under construction. The initial value is 0. See `glNewList'.
12172
12173 `GL_LIST_MODE'
12174
12175
12176 PARAMS returns one value, a symbolic constant indicating the
12177 construction mode of the display list currently under construction.
12178 The initial value is 0. See `glNewList'.
12179
12180 `GL_LOGIC_OP_MODE'
12181
12182
12183 PARAMS returns one value, a symbolic constant indicating the
12184 selected logic operation mode. The initial value is `GL_COPY'. See
12185 `glLogicOp'.
12186
12187 `GL_MAP1_COLOR_4'
12188
12189
12190 PARAMS returns a single boolean value indicating whether 1D
12191 evaluation generates colors. The initial value is `GL_FALSE'. See
12192 `glMap1'.
12193
12194 `GL_MAP1_GRID_DOMAIN'
12195
12196
12197 PARAMS returns two values: the endpoints of the 1D map's grid
12198 domain. The initial value is (0, 1). See `glMapGrid'.
12199
12200 `GL_MAP1_GRID_SEGMENTS'
12201
12202
12203 PARAMS returns one value, the number of partitions in the 1D map's
12204 grid domain. The initial value is 1. See `glMapGrid'.
12205
12206 `GL_MAP1_INDEX'
12207
12208
12209 PARAMS returns a single boolean value indicating whether 1D
12210 evaluation generates color indices. The initial value is
12211 `GL_FALSE'. See `glMap1'.
12212
12213 `GL_MAP1_NORMAL'
12214
12215
12216 PARAMS returns a single boolean value indicating whether 1D
12217 evaluation generates normals. The initial value is `GL_FALSE'. See
12218 `glMap1'.
12219
12220 `GL_MAP1_TEXTURE_COORD_1'
12221
12222
12223 PARAMS returns a single boolean value indicating whether 1D
12224 evaluation generates 1D texture coordinates. The initial value is
12225 `GL_FALSE'. See `glMap1'.
12226
12227 `GL_MAP1_TEXTURE_COORD_2'
12228
12229
12230 PARAMS returns a single boolean value indicating whether 1D
12231 evaluation generates 2D texture coordinates. The initial value is
12232 `GL_FALSE'. See `glMap1'.
12233
12234 `GL_MAP1_TEXTURE_COORD_3'
12235
12236
12237 PARAMS returns a single boolean value indicating whether 1D
12238 evaluation generates 3D texture coordinates. The initial value is
12239 `GL_FALSE'. See `glMap1'.
12240
12241 `GL_MAP1_TEXTURE_COORD_4'
12242
12243
12244 PARAMS returns a single boolean value indicating whether 1D
12245 evaluation generates 4D texture coordinates. The initial value is
12246 `GL_FALSE'. See `glMap1'.
12247
12248 `GL_MAP1_VERTEX_3'
12249
12250
12251 PARAMS returns a single boolean value indicating whether 1D
12252 evaluation generates 3D vertex coordinates. The initial value is
12253 `GL_FALSE'. See `glMap1'.
12254
12255 `GL_MAP1_VERTEX_4'
12256
12257
12258 PARAMS returns a single boolean value indicating whether 1D
12259 evaluation generates 4D vertex coordinates. The initial value is
12260 `GL_FALSE'. See `glMap1'.
12261
12262 `GL_MAP2_COLOR_4'
12263
12264
12265 PARAMS returns a single boolean value indicating whether 2D
12266 evaluation generates colors. The initial value is `GL_FALSE'. See
12267 `glMap2'.
12268
12269 `GL_MAP2_GRID_DOMAIN'
12270
12271
12272 PARAMS returns four values: the endpoints of the 2D map's I and J
12273 grid domains. The initial value is (0,1; 0,1). See `glMapGrid'.
12274
12275 `GL_MAP2_GRID_SEGMENTS'
12276
12277
12278 PARAMS returns two values: the number of partitions in the 2D map's
12279 I and J grid domains. The initial value is (1,1). See
12280 `glMapGrid'.
12281
12282 `GL_MAP2_INDEX'
12283
12284
12285 PARAMS returns a single boolean value indicating whether 2D
12286 evaluation generates color indices. The initial value is
12287 `GL_FALSE'. See `glMap2'.
12288
12289 `GL_MAP2_NORMAL'
12290
12291
12292 PARAMS returns a single boolean value indicating whether 2D
12293 evaluation generates normals. The initial value is `GL_FALSE'. See
12294 `glMap2'.
12295
12296 `GL_MAP2_TEXTURE_COORD_1'
12297
12298
12299 PARAMS returns a single boolean value indicating whether 2D
12300 evaluation generates 1D texture coordinates. The initial value is
12301 `GL_FALSE'. See `glMap2'.
12302
12303 `GL_MAP2_TEXTURE_COORD_2'
12304
12305
12306 PARAMS returns a single boolean value indicating whether 2D
12307 evaluation generates 2D texture coordinates. The initial value is
12308 `GL_FALSE'. See `glMap2'.
12309
12310 `GL_MAP2_TEXTURE_COORD_3'
12311
12312
12313 PARAMS returns a single boolean value indicating whether 2D
12314 evaluation generates 3D texture coordinates. The initial value is
12315 `GL_FALSE'. See `glMap2'.
12316
12317 `GL_MAP2_TEXTURE_COORD_4'
12318
12319
12320 PARAMS returns a single boolean value indicating whether 2D
12321 evaluation generates 4D texture coordinates. The initial value is
12322 `GL_FALSE'. See `glMap2'.
12323
12324 `GL_MAP2_VERTEX_3'
12325
12326
12327 PARAMS returns a single boolean value indicating whether 2D
12328 evaluation generates 3D vertex coordinates. The initial value is
12329 `GL_FALSE'. See `glMap2'.
12330
12331 `GL_MAP2_VERTEX_4'
12332
12333
12334 PARAMS returns a single boolean value indicating whether 2D
12335 evaluation generates 4D vertex coordinates. The initial value is
12336 `GL_FALSE'. See `glMap2'.
12337
12338 `GL_MAP_COLOR'
12339
12340
12341 PARAMS returns a single boolean value indicating if colors and
12342 color indices are to be replaced by table lookup during pixel
12343 transfers. The initial value is `GL_FALSE'. See
12344 `glPixelTransfer'.
12345
12346 `GL_MAP_STENCIL'
12347
12348
12349 PARAMS returns a single boolean value indicating if stencil indices
12350 are to be replaced by table lookup during pixel transfers. The
12351 initial value is `GL_FALSE'. See `glPixelTransfer'.
12352
12353 `GL_MATRIX_MODE'
12354
12355
12356 PARAMS returns one value, a symbolic constant indicating which
12357 matrix stack is currently the target of all matrix operations. The
12358 initial value is `GL_MODELVIEW'. See `glMatrixMode'.
12359
12360 `GL_MAX_3D_TEXTURE_SIZE'
12361
12362
12363 PARAMS returns one value, a rough estimate of the largest 3D
12364 texture that the GL can handle. The value must be at least 16. If
12365 the GL version is 1.2 or greater, use `GL_PROXY_TEXTURE_3D' to
12366 determine if a texture is too large. See `glTexImage3D'.
12367
12368 `GL_MAX_CLIENT_ATTRIB_STACK_DEPTH'
12369
12370
12371 PARAMS returns one value indicating the maximum supported depth of
12372 the client attribute stack. See `glPushClientAttrib'.
12373
12374 `GL_MAX_ATTRIB_STACK_DEPTH'
12375
12376
12377 PARAMS returns one value, the maximum supported depth of the
12378 attribute stack. The value must be at least 16. See
12379 `glPushAttrib'.
12380
12381 `GL_MAX_CLIP_PLANES'
12382
12383
12384 PARAMS returns one value, the maximum number of application-defined
12385 clipping planes. The value must be at least 6. See `glClipPlane'.
12386
12387 `GL_MAX_COLOR_MATRIX_STACK_DEPTH'
12388
12389
12390 PARAMS returns one value, the maximum supported depth of the color
12391 matrix stack. The value must be at least 2. See `glPushMatrix'.
12392
12393 `GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS'
12394
12395
12396 PARAMS returns one value, the maximum supported texture image units
12397 that can be used to access texture maps from the vertex shader and
12398 the fragment processor combined. If both the vertex shader and the
12399 fragment processing stage access the same texture image unit, then
12400 that counts as using two texture image units against this limit.
12401 The value must be at least 2. See `glActiveTexture'.
12402
12403 `GL_MAX_CUBE_MAP_TEXTURE_SIZE'
12404
12405
12406 PARAMS returns one value. The value gives a rough estimate of the
12407 largest cube-map texture that the GL can handle. The value must be
12408 at least 16. If the GL version is 1.3 or greater, use
12409 `GL_PROXY_TEXTURE_CUBE_MAP' to determine if a texture is too large.
12410 See `glTexImage2D'.
12411
12412 `GL_MAX_DRAW_BUFFERS'
12413
12414
12415 PARAMS returns one value, the maximum number of simultaneous output
12416 colors allowed from a fragment shader using the `gl_FragData'
12417 built-in array. The value must be at least 1. See
12418 `glDrawBuffers'.
12419
12420 `GL_MAX_ELEMENTS_INDICES'
12421
12422
12423 PARAMS returns one value, the recommended maximum number of vertex
12424 array indices. See `glDrawRangeElements'.
12425
12426 `GL_MAX_ELEMENTS_VERTICES'
12427
12428
12429 PARAMS returns one value, the recommended maximum number of vertex
12430 array vertices. See `glDrawRangeElements'.
12431
12432 `GL_MAX_EVAL_ORDER'
12433
12434
12435 PARAMS returns one value, the maximum equation order supported by
12436 1D and 2D evaluators. The value must be at least 8. See `glMap1'
12437 and `glMap2'.
12438
12439 `GL_MAX_FRAGMENT_UNIFORM_COMPONENTS'
12440
12441
12442 PARAMS returns one value, the maximum number of individual
12443 floating-point, integer, or boolean values that can be held in
12444 uniform variable storage for a fragment shader. The value must be
12445 at least 64. See `glUniform'.
12446
12447 `GL_MAX_LIGHTS'
12448
12449
12450 PARAMS returns one value, the maximum number of lights. The value
12451 must be at least 8. See `glLight'.
12452
12453 `GL_MAX_LIST_NESTING'
12454
12455
12456 PARAMS returns one value, the maximum recursion depth allowed
12457 during display-list traversal. The value must be at least 64. See
12458 `glCallList'.
12459
12460 `GL_MAX_MODELVIEW_STACK_DEPTH'
12461
12462
12463 PARAMS returns one value, the maximum supported depth of the
12464 modelview matrix stack. The value must be at least 32. See
12465 `glPushMatrix'.
12466
12467 `GL_MAX_NAME_STACK_DEPTH'
12468
12469
12470 PARAMS returns one value, the maximum supported depth of the
12471 selection name stack. The value must be at least 64. See
12472 `glPushName'.
12473
12474 `GL_MAX_PIXEL_MAP_TABLE'
12475
12476
12477 PARAMS returns one value, the maximum supported size of a
12478 `glPixelMap' lookup table. The value must be at least 32. See
12479 `glPixelMap'.
12480
12481 `GL_MAX_PROJECTION_STACK_DEPTH'
12482
12483
12484 PARAMS returns one value, the maximum supported depth of the
12485 projection matrix stack. The value must be at least 2. See
12486 `glPushMatrix'.
12487
12488 `GL_MAX_TEXTURE_COORDS'
12489
12490
12491 PARAMS returns one value, the maximum number of texture coordinate
12492 sets available to vertex and fragment shaders. The value must be
12493 at least 2. See `glActiveTexture' and `glClientActiveTexture'.
12494
12495 `GL_MAX_TEXTURE_IMAGE_UNITS'
12496
12497
12498 PARAMS returns one value, the maximum supported texture image units
12499 that can be used to access texture maps from the fragment shader.
12500 The value must be at least 2. See `glActiveTexture'.
12501
12502 `GL_MAX_TEXTURE_LOD_BIAS'
12503
12504
12505 PARAMS returns one value, the maximum, absolute value of the
12506 texture level-of-detail bias. The value must be at least 4.
12507
12508 `GL_MAX_TEXTURE_SIZE'
12509
12510
12511 PARAMS returns one value. The value gives a rough estimate of the
12512 largest texture that the GL can handle. The value must be at least
12513 64. If the GL version is 1.1 or greater, use `GL_PROXY_TEXTURE_1D'
12514 or `GL_PROXY_TEXTURE_2D' to determine if a texture is too large.
12515 See `glTexImage1D' and `glTexImage2D'.
12516
12517 `GL_MAX_TEXTURE_STACK_DEPTH'
12518
12519
12520 PARAMS returns one value, the maximum supported depth of the
12521 texture matrix stack. The value must be at least 2. See
12522 `glPushMatrix'.
12523
12524 `GL_MAX_TEXTURE_UNITS'
12525
12526
12527 PARAMS returns a single value indicating the number of conventional
12528 texture units supported. Each conventional texture unit includes
12529 both a texture coordinate set and a texture image unit.
12530 Conventional texture units may be used for fixed-function
12531 (non-shader) rendering. The value must be at least 2. Additional
12532 texture coordinate sets and texture image units may be accessed
12533 from vertex and fragment shaders. See `glActiveTexture' and
12534 `glClientActiveTexture'.
12535
12536 `GL_MAX_VARYING_FLOATS'
12537
12538
12539 PARAMS returns one value, the maximum number of interpolators
12540 available for processing varying variables used by vertex and
12541 fragment shaders. This value represents the number of individual
12542 floating-point values that can be interpolated; varying variables
12543 declared as vectors, matrices, and arrays will all consume multiple
12544 interpolators. The value must be at least 32.
12545
12546 `GL_MAX_VERTEX_ATTRIBS'
12547
12548
12549 PARAMS returns one value, the maximum number of 4-component generic
12550 vertex attributes accessible to a vertex shader. The value must be
12551 at least 16. See `glVertexAttrib'.
12552
12553 `GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS'
12554
12555
12556 PARAMS returns one value, the maximum supported texture image units
12557 that can be used to access texture maps from the vertex shader. The
12558 value may be 0. See `glActiveTexture'.
12559
12560 `GL_MAX_VERTEX_UNIFORM_COMPONENTS'
12561
12562
12563 PARAMS returns one value, the maximum number of individual
12564 floating-point, integer, or boolean values that can be held in
12565 uniform variable storage for a vertex shader. The value must be at
12566 least 512. See `glUniform'.
12567
12568 `GL_MAX_VIEWPORT_DIMS'
12569
12570
12571 PARAMS returns two values: the maximum supported width and height
12572 of the viewport. These must be at least as large as the visible
12573 dimensions of the display being rendered to. See `glViewport'.
12574
12575 `GL_MINMAX'
12576
12577
12578 PARAMS returns a single boolean value indicating whether pixel
12579 minmax values are computed. The initial value is `GL_FALSE'. See
12580 `glMinmax'.
12581
12582 `GL_MODELVIEW_MATRIX'
12583
12584
12585 PARAMS returns sixteen values: the modelview matrix on the top of
12586 the modelview matrix stack. Initially this matrix is the identity
12587 matrix. See `glPushMatrix'.
12588
12589 `GL_MODELVIEW_STACK_DEPTH'
12590
12591
12592 PARAMS returns one value, the number of matrices on the modelview
12593 matrix stack. The initial value is 1. See `glPushMatrix'.
12594
12595 `GL_NAME_STACK_DEPTH'
12596
12597
12598 PARAMS returns one value, the number of names on the selection name
12599 stack. The initial value is 0. See `glPushName'.
12600
12601 `GL_NORMAL_ARRAY'
12602
12603
12604 PARAMS returns a single boolean value, indicating whether the
12605 normal array is enabled. The initial value is `GL_FALSE'. See
12606 `glNormalPointer'.
12607
12608 `GL_NORMAL_ARRAY_BUFFER_BINDING'
12609
12610
12611 PARAMS returns a single value, the name of the buffer object
12612 associated with the normal array. This buffer object would have
12613 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
12614 recent call to `glNormalPointer'. If no buffer object was bound to
12615 this target, 0 is returned. The initial value is 0. See
12616 `glBindBuffer'.
12617
12618 `GL_NORMAL_ARRAY_STRIDE'
12619
12620
12621 PARAMS returns one value, the byte offset between consecutive
12622 normals in the normal array. The initial value is 0. See
12623 `glNormalPointer'.
12624
12625 `GL_NORMAL_ARRAY_TYPE'
12626
12627
12628 PARAMS returns one value, the data type of each coordinate in the
12629 normal array. The initial value is `GL_FLOAT'. See
12630 `glNormalPointer'.
12631
12632 `GL_NORMALIZE'
12633
12634
12635 PARAMS returns a single boolean value indicating whether normals
12636 are automatically scaled to unit length after they have been
12637 transformed to eye coordinates. The initial value is `GL_FALSE'.
12638 See `glNormal'.
12639
12640 `GL_NUM_COMPRESSED_TEXTURE_FORMATS'
12641
12642
12643 PARAMS returns a single integer value indicating the number of
12644 available compressed texture formats. The minimum value is 0. See
12645 `glCompressedTexImage2D'.
12646
12647 `GL_PACK_ALIGNMENT'
12648
12649
12650 PARAMS returns one value, the byte alignment used for writing pixel
12651 data to memory. The initial value is 4. See `glPixelStore'.
12652
12653 `GL_PACK_IMAGE_HEIGHT'
12654
12655
12656 PARAMS returns one value, the image height used for writing pixel
12657 data to memory. The initial value is 0. See `glPixelStore'.
12658
12659 `GL_PACK_LSB_FIRST'
12660
12661
12662 PARAMS returns a single boolean value indicating whether single-bit
12663 pixels being written to memory are written first to the least
12664 significant bit of each unsigned byte. The initial value is
12665 `GL_FALSE'. See `glPixelStore'.
12666
12667 `GL_PACK_ROW_LENGTH'
12668
12669
12670 PARAMS returns one value, the row length used for writing pixel
12671 data to memory. The initial value is 0. See `glPixelStore'.
12672
12673 `GL_PACK_SKIP_IMAGES'
12674
12675
12676 PARAMS returns one value, the number of pixel images skipped before
12677 the first pixel is written into memory. The initial value is 0.
12678 See `glPixelStore'.
12679
12680 `GL_PACK_SKIP_PIXELS'
12681
12682
12683 PARAMS returns one value, the number of pixel locations skipped
12684 before the first pixel is written into memory. The initial value
12685 is 0. See `glPixelStore'.
12686
12687 `GL_PACK_SKIP_ROWS'
12688
12689
12690 PARAMS returns one value, the number of rows of pixel locations
12691 skipped before the first pixel is written into memory. The initial
12692 value is 0. See `glPixelStore'.
12693
12694 `GL_PACK_SWAP_BYTES'
12695
12696
12697 PARAMS returns a single boolean value indicating whether the bytes
12698 of two-byte and four-byte pixel indices and components are swapped
12699 before being written to memory. The initial value is `GL_FALSE'.
12700 See `glPixelStore'.
12701
12702 `GL_PERSPECTIVE_CORRECTION_HINT'
12703
12704
12705 PARAMS returns one value, a symbolic constant indicating the mode
12706 of the perspective correction hint. The initial value is
12707 `GL_DONT_CARE'. See `glHint'.
12708
12709 `GL_PIXEL_MAP_A_TO_A_SIZE'
12710
12711
12712 PARAMS returns one value, the size of the alpha-to-alpha pixel
12713 translation table. The initial value is 1. See `glPixelMap'.
12714
12715 `GL_PIXEL_MAP_B_TO_B_SIZE'
12716
12717
12718 PARAMS returns one value, the size of the blue-to-blue pixel
12719 translation table. The initial value is 1. See `glPixelMap'.
12720
12721 `GL_PIXEL_MAP_G_TO_G_SIZE'
12722
12723
12724 PARAMS returns one value, the size of the green-to-green pixel
12725 translation table. The initial value is 1. See `glPixelMap'.
12726
12727 `GL_PIXEL_MAP_I_TO_A_SIZE'
12728
12729
12730 PARAMS returns one value, the size of the index-to-alpha pixel
12731 translation table. The initial value is 1. See `glPixelMap'.
12732
12733 `GL_PIXEL_MAP_I_TO_B_SIZE'
12734
12735
12736 PARAMS returns one value, the size of the index-to-blue pixel
12737 translation table. The initial value is 1. See `glPixelMap'.
12738
12739 `GL_PIXEL_MAP_I_TO_G_SIZE'
12740
12741
12742 PARAMS returns one value, the size of the index-to-green pixel
12743 translation table. The initial value is 1. See `glPixelMap'.
12744
12745 `GL_PIXEL_MAP_I_TO_I_SIZE'
12746
12747
12748 PARAMS returns one value, the size of the index-to-index pixel
12749 translation table. The initial value is 1. See `glPixelMap'.
12750
12751 `GL_PIXEL_MAP_I_TO_R_SIZE'
12752
12753
12754 PARAMS returns one value, the size of the index-to-red pixel
12755 translation table. The initial value is 1. See `glPixelMap'.
12756
12757 `GL_PIXEL_MAP_R_TO_R_SIZE'
12758
12759
12760 PARAMS returns one value, the size of the red-to-red pixel
12761 translation table. The initial value is 1. See `glPixelMap'.
12762
12763 `GL_PIXEL_MAP_S_TO_S_SIZE'
12764
12765
12766 PARAMS returns one value, the size of the stencil-to-stencil pixel
12767 translation table. The initial value is 1. See `glPixelMap'.
12768
12769 `GL_PIXEL_PACK_BUFFER_BINDING'
12770
12771
12772 PARAMS returns a single value, the name of the buffer object
12773 currently bound to the target `GL_PIXEL_PACK_BUFFER'. If no buffer
12774 object is bound to this target, 0 is returned. The initial value
12775 is 0. See `glBindBuffer'.
12776
12777 `GL_PIXEL_UNPACK_BUFFER_BINDING'
12778
12779
12780 PARAMS returns a single value, the name of the buffer object
12781 currently bound to the target `GL_PIXEL_UNPACK_BUFFER'. If no
12782 buffer object is bound to this target, 0 is returned. The initial
12783 value is 0. See `glBindBuffer'.
12784
12785 `GL_POINT_DISTANCE_ATTENUATION'
12786
12787
12788 PARAMS returns three values, the coefficients for computing the
12789 attenuation value for points. See `glPointParameter'.
12790
12791 `GL_POINT_FADE_THRESHOLD_SIZE'
12792
12793
12794 PARAMS returns one value, the point size threshold for determining
12795 the point size. See `glPointParameter'.
12796
12797 `GL_POINT_SIZE'
12798
12799
12800 PARAMS returns one value, the point size as specified by
12801 `glPointSize'. The initial value is 1.
12802
12803 `GL_POINT_SIZE_GRANULARITY'
12804
12805
12806 PARAMS returns one value, the size difference between adjacent
12807 supported sizes for antialiased points. See `glPointSize'.
12808
12809 `GL_POINT_SIZE_MAX'
12810
12811
12812 PARAMS returns one value, the upper bound for the attenuated point
12813 sizes. The initial value is 0.0. See `glPointParameter'.
12814
12815 `GL_POINT_SIZE_MIN'
12816
12817
12818 PARAMS returns one value, the lower bound for the attenuated point
12819 sizes. The initial value is 1.0. See `glPointParameter'.
12820
12821 `GL_POINT_SIZE_RANGE'
12822
12823
12824 PARAMS returns two values: the smallest and largest supported sizes
12825 for antialiased points. The smallest size must be at most 1, and
12826 the largest size must be at least 1. See `glPointSize'.
12827
12828 `GL_POINT_SMOOTH'
12829
12830
12831 PARAMS returns a single boolean value indicating whether
12832 antialiasing of points is enabled. The initial value is
12833 `GL_FALSE'. See `glPointSize'.
12834
12835 `GL_POINT_SMOOTH_HINT'
12836
12837
12838 PARAMS returns one value, a symbolic constant indicating the mode
12839 of the point antialiasing hint. The initial value is
12840 `GL_DONT_CARE'. See `glHint'.
12841
12842 `GL_POINT_SPRITE'
12843
12844
12845 PARAMS returns a single boolean value indicating whether point
12846 sprite is enabled. The initial value is `GL_FALSE'.
12847
12848 `GL_POLYGON_MODE'
12849
12850
12851 PARAMS returns two values: symbolic constants indicating whether
12852 front-facing and back-facing polygons are rasterized as points,
12853 lines, or filled polygons. The initial value is `GL_FILL'. See
12854 `glPolygonMode'.
12855
12856 `GL_POLYGON_OFFSET_FACTOR'
12857
12858
12859 PARAMS returns one value, the scaling factor used to determine the
12860 variable offset that is added to the depth value of each fragment
12861 generated when a polygon is rasterized. The initial value is 0.
12862 See `glPolygonOffset'.
12863
12864 `GL_POLYGON_OFFSET_UNITS'
12865
12866
12867 PARAMS returns one value. This value is multiplied by an
12868 implementation-specific value and then added to the depth value of
12869 each fragment generated when a polygon is rasterized. The initial
12870 value is 0. See `glPolygonOffset'.
12871
12872 `GL_POLYGON_OFFSET_FILL'
12873
12874
12875 PARAMS returns a single boolean value indicating whether polygon
12876 offset is enabled for polygons in fill mode. The initial value is
12877 `GL_FALSE'. See `glPolygonOffset'.
12878
12879 `GL_POLYGON_OFFSET_LINE'
12880
12881
12882 PARAMS returns a single boolean value indicating whether polygon
12883 offset is enabled for polygons in line mode. The initial value is
12884 `GL_FALSE'. See `glPolygonOffset'.
12885
12886 `GL_POLYGON_OFFSET_POINT'
12887
12888
12889 PARAMS returns a single boolean value indicating whether polygon
12890 offset is enabled for polygons in point mode. The initial value is
12891 `GL_FALSE'. See `glPolygonOffset'.
12892
12893 `GL_POLYGON_SMOOTH'
12894
12895
12896 PARAMS returns a single boolean value indicating whether
12897 antialiasing of polygons is enabled. The initial value is
12898 `GL_FALSE'. See `glPolygonMode'.
12899
12900 `GL_POLYGON_SMOOTH_HINT'
12901
12902
12903 PARAMS returns one value, a symbolic constant indicating the mode
12904 of the polygon antialiasing hint. The initial value is
12905 `GL_DONT_CARE'. See `glHint'.
12906
12907 `GL_POLYGON_STIPPLE'
12908
12909
12910 PARAMS returns a single boolean value indicating whether polygon
12911 stippling is enabled. The initial value is `GL_FALSE'. See
12912 `glPolygonStipple'.
12913
12914 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
12915
12916
12917 PARAMS returns a single boolean value indicating whether post color
12918 matrix transformation lookup is enabled. The initial value is
12919 `GL_FALSE'. See `glColorTable'.
12920
12921 `GL_POST_COLOR_MATRIX_RED_BIAS'
12922
12923
12924 PARAMS returns one value, the red bias factor applied to RGBA
12925 fragments after color matrix transformations. The initial value is
12926 0. See `glPixelTransfer'.
12927
12928 `GL_POST_COLOR_MATRIX_GREEN_BIAS'
12929
12930
12931 PARAMS returns one value, the green bias factor applied to RGBA
12932 fragments after color matrix transformations. The initial value is
12933 0. See `glPixelTransfer'
12934
12935 `GL_POST_COLOR_MATRIX_BLUE_BIAS'
12936
12937
12938 PARAMS returns one value, the blue bias factor applied to RGBA
12939 fragments after color matrix transformations. The initial value is
12940 0. See `glPixelTransfer'.
12941
12942 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'
12943
12944
12945 PARAMS returns one value, the alpha bias factor applied to RGBA
12946 fragments after color matrix transformations. The initial value is
12947 0. See `glPixelTransfer'.
12948
12949 `GL_POST_COLOR_MATRIX_RED_SCALE'
12950
12951
12952 PARAMS returns one value, the red scale factor applied to RGBA
12953 fragments after color matrix transformations. The initial value is
12954 1. See `glPixelTransfer'.
12955
12956 `GL_POST_COLOR_MATRIX_GREEN_SCALE'
12957
12958
12959 PARAMS returns one value, the green scale factor applied to RGBA
12960 fragments after color matrix transformations. The initial value is
12961 1. See `glPixelTransfer'.
12962
12963 `GL_POST_COLOR_MATRIX_BLUE_SCALE'
12964
12965
12966 PARAMS returns one value, the blue scale factor applied to RGBA
12967 fragments after color matrix transformations. The initial value is
12968 1. See `glPixelTransfer'.
12969
12970 `GL_POST_COLOR_MATRIX_ALPHA_SCALE'
12971
12972
12973 PARAMS returns one value, the alpha scale factor applied to RGBA
12974 fragments after color matrix transformations. The initial value is
12975 1. See `glPixelTransfer'.
12976
12977 `GL_POST_CONVOLUTION_COLOR_TABLE'
12978
12979
12980 PARAMS returns a single boolean value indicating whether post
12981 convolution lookup is enabled. The initial value is `GL_FALSE'.
12982 See `glColorTable'.
12983
12984 `GL_POST_CONVOLUTION_RED_BIAS'
12985
12986
12987 PARAMS returns one value, the red bias factor applied to RGBA
12988 fragments after convolution. The initial value is 0. See
12989 `glPixelTransfer'.
12990
12991 `GL_POST_CONVOLUTION_GREEN_BIAS'
12992
12993
12994 PARAMS returns one value, the green bias factor applied to RGBA
12995 fragments after convolution. The initial value is 0. See
12996 `glPixelTransfer'.
12997
12998 `GL_POST_CONVOLUTION_BLUE_BIAS'
12999
13000
13001 PARAMS returns one value, the blue bias factor applied to RGBA
13002 fragments after convolution. The initial value is 0. See
13003 `glPixelTransfer'.
13004
13005 `GL_POST_CONVOLUTION_ALPHA_BIAS'
13006
13007
13008 PARAMS returns one value, the alpha bias factor applied to RGBA
13009 fragments after convolution. The initial value is 0. See
13010 `glPixelTransfer'.
13011
13012 `GL_POST_CONVOLUTION_RED_SCALE'
13013
13014
13015 PARAMS returns one value, the red scale factor applied to RGBA
13016 fragments after convolution. The initial value is 1. See
13017 `glPixelTransfer'.
13018
13019 `GL_POST_CONVOLUTION_GREEN_SCALE'
13020
13021
13022 PARAMS returns one value, the green scale factor applied to RGBA
13023 fragments after convolution. The initial value is 1. See
13024 `glPixelTransfer'.
13025
13026 `GL_POST_CONVOLUTION_BLUE_SCALE'
13027
13028
13029 PARAMS returns one value, the blue scale factor applied to RGBA
13030 fragments after convolution. The initial value is 1. See
13031 `glPixelTransfer'.
13032
13033 `GL_POST_CONVOLUTION_ALPHA_SCALE'
13034
13035
13036 PARAMS returns one value, the alpha scale factor applied to RGBA
13037 fragments after convolution. The initial value is 1. See
13038 `glPixelTransfer'.
13039
13040 `GL_PROJECTION_MATRIX'
13041
13042
13043 PARAMS returns sixteen values: the projection matrix on the top of
13044 the projection matrix stack. Initially this matrix is the identity
13045 matrix. See `glPushMatrix'.
13046
13047 `GL_PROJECTION_STACK_DEPTH'
13048
13049
13050 PARAMS returns one value, the number of matrices on the projection
13051 matrix stack. The initial value is 1. See `glPushMatrix'.
13052
13053 `GL_READ_BUFFER'
13054
13055
13056 PARAMS returns one value, a symbolic constant indicating which
13057 color buffer is selected for reading. The initial value is
13058 `GL_BACK' if there is a back buffer, otherwise it is `GL_FRONT'.
13059 See `glReadPixels' and `glAccum'.
13060
13061 `GL_RED_BIAS'
13062
13063
13064 PARAMS returns one value, the red bias factor used during pixel
13065 transfers. The initial value is 0.
13066
13067 `GL_RED_BITS'
13068
13069
13070 PARAMS returns one value, the number of red bitplanes in each color
13071 buffer.
13072
13073 `GL_RED_SCALE'
13074
13075
13076 PARAMS returns one value, the red scale factor used during pixel
13077 transfers. The initial value is 1. See `glPixelTransfer'.
13078
13079 `GL_RENDER_MODE'
13080
13081
13082 PARAMS returns one value, a symbolic constant indicating whether
13083 the GL is in render, select, or feedback mode. The initial value
13084 is `GL_RENDER'. See `glRenderMode'.
13085
13086 `GL_RESCALE_NORMAL'
13087
13088
13089 PARAMS returns single boolean value indicating whether normal
13090 rescaling is enabled. See `glEnable'.
13091
13092 `GL_RGBA_MODE'
13093
13094
13095 PARAMS returns a single boolean value indicating whether the GL is
13096 in RGBA mode (true) or color index mode (false). See `glColor'.
13097
13098 `GL_SAMPLE_BUFFERS'
13099
13100
13101 PARAMS returns a single integer value indicating the number of
13102 sample buffers associated with the framebuffer. See
13103 `glSampleCoverage'.
13104
13105 `GL_SAMPLE_COVERAGE_VALUE'
13106
13107
13108 PARAMS returns a single positive floating-point value indicating
13109 the current sample coverage value. See `glSampleCoverage'.
13110
13111 `GL_SAMPLE_COVERAGE_INVERT'
13112
13113
13114 PARAMS returns a single boolean value indicating if the temporary
13115 coverage value should be inverted. See `glSampleCoverage'.
13116
13117 `GL_SAMPLES'
13118
13119
13120 PARAMS returns a single integer value indicating the coverage mask
13121 size. See `glSampleCoverage'.
13122
13123 `GL_SCISSOR_BOX'
13124
13125
13126 PARAMS returns four values: the X and Y window coordinates of the
13127 scissor box, followed by its width and height. Initially the X and
13128 Y window coordinates are both 0 and the width and height are set to
13129 the size of the window. See `glScissor'.
13130
13131 `GL_SCISSOR_TEST'
13132
13133
13134 PARAMS returns a single boolean value indicating whether scissoring
13135 is enabled. The initial value is `GL_FALSE'. See `glScissor'.
13136
13137 `GL_SECONDARY_COLOR_ARRAY'
13138
13139
13140 PARAMS returns a single boolean value indicating whether the
13141 secondary color array is enabled. The initial value is `GL_FALSE'.
13142 See `glSecondaryColorPointer'.
13143
13144 `GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING'
13145
13146
13147 PARAMS returns a single value, the name of the buffer object
13148 associated with the secondary color array. This buffer object
13149 would have been bound to the target `GL_ARRAY_BUFFER' at the time
13150 of the most recent call to `glSecondaryColorPointer'. If no buffer
13151 object was bound to this target, 0 is returned. The initial value
13152 is 0. See `glBindBuffer'.
13153
13154 `GL_SECONDARY_COLOR_ARRAY_SIZE'
13155
13156
13157 PARAMS returns one value, the number of components per color in the
13158 secondary color array. The initial value is 3. See
13159 `glSecondaryColorPointer'.
13160
13161 `GL_SECONDARY_COLOR_ARRAY_STRIDE'
13162
13163
13164 PARAMS returns one value, the byte offset between consecutive
13165 colors in the secondary color array. The initial value is 0. See
13166 `glSecondaryColorPointer'.
13167
13168 `GL_SECONDARY_COLOR_ARRAY_TYPE'
13169
13170
13171 PARAMS returns one value, the data type of each component in the
13172 secondary color array. The initial value is `GL_FLOAT'. See
13173 `glSecondaryColorPointer'.
13174
13175 `GL_SELECTION_BUFFER_SIZE'
13176
13177
13178 PARAMS return one value, the size of the selection buffer. See
13179 `glSelectBuffer'.
13180
13181 `GL_SEPARABLE_2D'
13182
13183
13184 PARAMS returns a single boolean value indicating whether 2D
13185 separable convolution is enabled. The initial value is `GL_FALSE'.
13186 See `glSeparableFilter2D'.
13187
13188 `GL_SHADE_MODEL'
13189
13190
13191 PARAMS returns one value, a symbolic constant indicating whether
13192 the shading mode is flat or smooth. The initial value is
13193 `GL_SMOOTH'. See `glShadeModel'.
13194
13195 `GL_SMOOTH_LINE_WIDTH_RANGE'
13196
13197
13198 PARAMS returns two values, the smallest and largest supported
13199 widths for antialiased lines. See `glLineWidth'.
13200
13201 `GL_SMOOTH_LINE_WIDTH_GRANULARITY'
13202
13203
13204 PARAMS returns one value, the granularity of widths for antialiased
13205 lines. See `glLineWidth'.
13206
13207 `GL_SMOOTH_POINT_SIZE_RANGE'
13208
13209
13210 PARAMS returns two values, the smallest and largest supported
13211 widths for antialiased points. See `glPointSize'.
13212
13213 `GL_SMOOTH_POINT_SIZE_GRANULARITY'
13214
13215
13216 PARAMS returns one value, the granularity of sizes for antialiased
13217 points. See `glPointSize'.
13218
13219 `GL_STENCIL_BACK_FAIL'
13220
13221
13222 PARAMS returns one value, a symbolic constant indicating what
13223 action is taken for back-facing polygons when the stencil test
13224 fails. The initial value is `GL_KEEP'. See `glStencilOpSeparate'.
13225
13226 `GL_STENCIL_BACK_FUNC'
13227
13228
13229 PARAMS returns one value, a symbolic constant indicating what
13230 function is used for back-facing polygons to compare the stencil
13231 reference value with the stencil buffer value. The initial value
13232 is `GL_ALWAYS'. See `glStencilFuncSeparate'.
13233
13234 `GL_STENCIL_BACK_PASS_DEPTH_FAIL'
13235
13236
13237 PARAMS returns one value, a symbolic constant indicating what
13238 action is taken for back-facing polygons when the stencil test
13239 passes, but the depth test fails. The initial value is `GL_KEEP'.
13240 See `glStencilOpSeparate'.
13241
13242 `GL_STENCIL_BACK_PASS_DEPTH_PASS'
13243
13244
13245 PARAMS returns one value, a symbolic constant indicating what
13246 action is taken for back-facing polygons when the stencil test
13247 passes and the depth test passes. The initial value is `GL_KEEP'.
13248 See `glStencilOpSeparate'.
13249
13250 `GL_STENCIL_BACK_REF'
13251
13252
13253 PARAMS returns one value, the reference value that is compared with
13254 the contents of the stencil buffer for back-facing polygons. The
13255 initial value is 0. See `glStencilFuncSeparate'.
13256
13257 `GL_STENCIL_BACK_VALUE_MASK'
13258
13259
13260 PARAMS returns one value, the mask that is used for back-facing
13261 polygons to mask both the stencil reference value and the stencil
13262 buffer value before they are compared. The initial value is all
13263 1's. See `glStencilFuncSeparate'.
13264
13265 `GL_STENCIL_BACK_WRITEMASK'
13266
13267
13268 PARAMS returns one value, the mask that controls writing of the
13269 stencil bitplanes for back-facing polygons. The initial value is
13270 all 1's. See `glStencilMaskSeparate'.
13271
13272 `GL_STENCIL_BITS'
13273
13274
13275 PARAMS returns one value, the number of bitplanes in the stencil
13276 buffer.
13277
13278 `GL_STENCIL_CLEAR_VALUE'
13279
13280
13281 PARAMS returns one value, the index to which the stencil bitplanes
13282 are cleared. The initial value is 0. See `glClearStencil'.
13283
13284 `GL_STENCIL_FAIL'
13285
13286
13287 PARAMS returns one value, a symbolic constant indicating what
13288 action is taken when the stencil test fails. The initial value is
13289 `GL_KEEP'. See `glStencilOp'. If the GL version is 2.0 or
13290 greater, this stencil state only affects non-polygons and
13291 front-facing polygons. Back-facing polygons use separate stencil
13292 state. See `glStencilOpSeparate'.
13293
13294 `GL_STENCIL_FUNC'
13295
13296
13297 PARAMS returns one value, a symbolic constant indicating what
13298 function is used to compare the stencil reference value with the
13299 stencil buffer value. The initial value is `GL_ALWAYS'. See
13300 `glStencilFunc'. If the GL version is 2.0 or greater, this stencil
13301 state only affects non-polygons and front-facing polygons.
13302 Back-facing polygons use separate stencil state. See
13303 `glStencilFuncSeparate'.
13304
13305 `GL_STENCIL_PASS_DEPTH_FAIL'
13306
13307
13308 PARAMS returns one value, a symbolic constant indicating what
13309 action is taken when the stencil test passes, but the depth test
13310 fails. The initial value is `GL_KEEP'. See `glStencilOp'. If the
13311 GL version is 2.0 or greater, this stencil state only affects
13312 non-polygons and front-facing polygons. Back-facing polygons use
13313 separate stencil state. See `glStencilOpSeparate'.
13314
13315 `GL_STENCIL_PASS_DEPTH_PASS'
13316
13317
13318 PARAMS returns one value, a symbolic constant indicating what
13319 action is taken when the stencil test passes and the depth test
13320 passes. The initial value is `GL_KEEP'. See `glStencilOp'. If
13321 the GL version is 2.0 or greater, this stencil state only affects
13322 non-polygons and front-facing polygons. Back-facing polygons use
13323 separate stencil state. See `glStencilOpSeparate'.
13324
13325 `GL_STENCIL_REF'
13326
13327
13328 PARAMS returns one value, the reference value that is compared with
13329 the contents of the stencil buffer. The initial value is 0. See
13330 `glStencilFunc'. If the GL version is 2.0 or greater, this stencil
13331 state only affects non-polygons and front-facing polygons.
13332 Back-facing polygons use separate stencil state. See
13333 `glStencilFuncSeparate'.
13334
13335 `GL_STENCIL_TEST'
13336
13337
13338 PARAMS returns a single boolean value indicating whether stencil
13339 testing of fragments is enabled. The initial value is `GL_FALSE'.
13340 See `glStencilFunc' and `glStencilOp'.
13341
13342 `GL_STENCIL_VALUE_MASK'
13343
13344
13345 PARAMS returns one value, the mask that is used to mask both the
13346 stencil reference value and the stencil buffer value before they
13347 are compared. The initial value is all 1's. See `glStencilFunc'.
13348 If the GL version is 2.0 or greater, this stencil state only
13349 affects non-polygons and front-facing polygons. Back-facing
13350 polygons use separate stencil state. See `glStencilFuncSeparate'.
13351
13352 `GL_STENCIL_WRITEMASK'
13353
13354
13355 PARAMS returns one value, the mask that controls writing of the
13356 stencil bitplanes. The initial value is all 1's. See
13357 `glStencilMask'. If the GL version is 2.0 or greater, this stencil
13358 state only affects non-polygons and front-facing polygons.
13359 Back-facing polygons use separate stencil state. See
13360 `glStencilMaskSeparate'.
13361
13362 `GL_STEREO'
13363
13364
13365 PARAMS returns a single boolean value indicating whether stereo
13366 buffers (left and right) are supported.
13367
13368 `GL_SUBPIXEL_BITS'
13369
13370
13371 PARAMS returns one value, an estimate of the number of bits of
13372 subpixel resolution that are used to position rasterized geometry
13373 in window coordinates. The value must be at least 4.
13374
13375 `GL_TEXTURE_1D'
13376
13377
13378 PARAMS returns a single boolean value indicating whether 1D texture
13379 mapping is enabled. The initial value is `GL_FALSE'. See
13380 `glTexImage1D'.
13381
13382 `GL_TEXTURE_BINDING_1D'
13383
13384
13385 PARAMS returns a single value, the name of the texture currently
13386 bound to the target `GL_TEXTURE_1D'. The initial value is 0. See
13387 `glBindTexture'.
13388
13389 `GL_TEXTURE_2D'
13390
13391
13392 PARAMS returns a single boolean value indicating whether 2D texture
13393 mapping is enabled. The initial value is `GL_FALSE'. See
13394 `glTexImage2D'.
13395
13396 `GL_TEXTURE_BINDING_2D'
13397
13398
13399 PARAMS returns a single value, the name of the texture currently
13400 bound to the target `GL_TEXTURE_2D'. The initial value is 0. See
13401 `glBindTexture'.
13402
13403 `GL_TEXTURE_3D'
13404
13405
13406 PARAMS returns a single boolean value indicating whether 3D texture
13407 mapping is enabled. The initial value is `GL_FALSE'. See
13408 `glTexImage3D'.
13409
13410 `GL_TEXTURE_BINDING_3D'
13411
13412
13413 PARAMS returns a single value, the name of the texture currently
13414 bound to the target `GL_TEXTURE_3D'. The initial value is 0. See
13415 `glBindTexture'.
13416
13417 `GL_TEXTURE_BINDING_CUBE_MAP'
13418
13419
13420 PARAMS returns a single value, the name of the texture currently
13421 bound to the target `GL_TEXTURE_CUBE_MAP'. The initial value is 0.
13422 See `glBindTexture'.
13423
13424 `GL_TEXTURE_COMPRESSION_HINT'
13425
13426
13427 PARAMS returns a single value indicating the mode of the texture
13428 compression hint. The initial value is `GL_DONT_CARE'.
13429
13430 `GL_TEXTURE_COORD_ARRAY'
13431
13432
13433 PARAMS returns a single boolean value indicating whether the
13434 texture coordinate array is enabled. The initial value is
13435 `GL_FALSE'. See `glTexCoordPointer'.
13436
13437 `GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING'
13438
13439
13440 PARAMS returns a single value, the name of the buffer object
13441 associated with the texture coordinate array. This buffer object
13442 would have been bound to the target `GL_ARRAY_BUFFER' at the time
13443 of the most recent call to `glTexCoordPointer'. If no buffer
13444 object was bound to this target, 0 is returned. The initial value
13445 is 0. See `glBindBuffer'.
13446
13447 `GL_TEXTURE_COORD_ARRAY_SIZE'
13448
13449
13450 PARAMS returns one value, the number of coordinates per element in
13451 the texture coordinate array. The initial value is 4. See
13452 `glTexCoordPointer'.
13453
13454 `GL_TEXTURE_COORD_ARRAY_STRIDE'
13455
13456
13457 PARAMS returns one value, the byte offset between consecutive
13458 elements in the texture coordinate array. The initial value is 0.
13459 See `glTexCoordPointer'.
13460
13461 `GL_TEXTURE_COORD_ARRAY_TYPE'
13462
13463
13464 PARAMS returns one value, the data type of the coordinates in the
13465 texture coordinate array. The initial value is `GL_FLOAT'. See
13466 `glTexCoordPointer'.
13467
13468 `GL_TEXTURE_CUBE_MAP'
13469
13470
13471 PARAMS returns a single boolean value indicating whether
13472 cube-mapped texture mapping is enabled. The initial value is
13473 `GL_FALSE'. See `glTexImage2D'.
13474
13475 `GL_TEXTURE_GEN_Q'
13476
13477
13478 PARAMS returns a single boolean value indicating whether automatic
13479 generation of the Q texture coordinate is enabled. The initial
13480 value is `GL_FALSE'. See `glTexGen'.
13481
13482 `GL_TEXTURE_GEN_R'
13483
13484
13485 PARAMS returns a single boolean value indicating whether automatic
13486 generation of the R texture coordinate is enabled. The initial
13487 value is `GL_FALSE'. See `glTexGen'.
13488
13489 `GL_TEXTURE_GEN_S'
13490
13491
13492 PARAMS returns a single boolean value indicating whether automatic
13493 generation of the S texture coordinate is enabled. The initial
13494 value is `GL_FALSE'. See `glTexGen'.
13495
13496 `GL_TEXTURE_GEN_T'
13497
13498
13499 PARAMS returns a single boolean value indicating whether automatic
13500 generation of the T texture coordinate is enabled. The initial
13501 value is `GL_FALSE'. See `glTexGen'.
13502
13503 `GL_TEXTURE_MATRIX'
13504
13505
13506 PARAMS returns sixteen values: the texture matrix on the top of the
13507 texture matrix stack. Initially this matrix is the identity
13508 matrix. See `glPushMatrix'.
13509
13510 `GL_TEXTURE_STACK_DEPTH'
13511
13512
13513 PARAMS returns one value, the number of matrices on the texture
13514 matrix stack. The initial value is 1. See `glPushMatrix'.
13515
13516 `GL_TRANSPOSE_COLOR_MATRIX'
13517
13518
13519 PARAMS returns 16 values, the elements of the color matrix in
13520 row-major order. See `glLoadTransposeMatrix'.
13521
13522 `GL_TRANSPOSE_MODELVIEW_MATRIX'
13523
13524
13525 PARAMS returns 16 values, the elements of the modelview matrix in
13526 row-major order. See `glLoadTransposeMatrix'.
13527
13528 `GL_TRANSPOSE_PROJECTION_MATRIX'
13529
13530
13531 PARAMS returns 16 values, the elements of the projection matrix in
13532 row-major order. See `glLoadTransposeMatrix'.
13533
13534 `GL_TRANSPOSE_TEXTURE_MATRIX'
13535
13536
13537 PARAMS returns 16 values, the elements of the texture matrix in
13538 row-major order. See `glLoadTransposeMatrix'.
13539
13540 `GL_UNPACK_ALIGNMENT'
13541
13542
13543 PARAMS returns one value, the byte alignment used for reading pixel
13544 data from memory. The initial value is 4. See `glPixelStore'.
13545
13546 `GL_UNPACK_IMAGE_HEIGHT'
13547
13548
13549 PARAMS returns one value, the image height used for reading pixel
13550 data from memory. The initial is 0. See `glPixelStore'.
13551
13552 `GL_UNPACK_LSB_FIRST'
13553
13554
13555 PARAMS returns a single boolean value indicating whether single-bit
13556 pixels being read from memory are read first from the least
13557 significant bit of each unsigned byte. The initial value is
13558 `GL_FALSE'. See `glPixelStore'.
13559
13560 `GL_UNPACK_ROW_LENGTH'
13561
13562
13563 PARAMS returns one value, the row length used for reading pixel
13564 data from memory. The initial value is 0. See `glPixelStore'.
13565
13566 `GL_UNPACK_SKIP_IMAGES'
13567
13568
13569 PARAMS returns one value, the number of pixel images skipped before
13570 the first pixel is read from memory. The initial value is 0. See
13571 `glPixelStore'.
13572
13573 `GL_UNPACK_SKIP_PIXELS'
13574
13575
13576 PARAMS returns one value, the number of pixel locations skipped
13577 before the first pixel is read from memory. The initial value is
13578 0. See `glPixelStore'.
13579
13580 `GL_UNPACK_SKIP_ROWS'
13581
13582
13583 PARAMS returns one value, the number of rows of pixel locations
13584 skipped before the first pixel is read from memory. The initial
13585 value is 0. See `glPixelStore'.
13586
13587 `GL_UNPACK_SWAP_BYTES'
13588
13589
13590 PARAMS returns a single boolean value indicating whether the bytes
13591 of two-byte and four-byte pixel indices and components are swapped
13592 after being read from memory. The initial value is `GL_FALSE'. See
13593 `glPixelStore'.
13594
13595 `GL_VERTEX_ARRAY'
13596
13597
13598 PARAMS returns a single boolean value indicating whether the vertex
13599 array is enabled. The initial value is `GL_FALSE'. See
13600 `glVertexPointer'.
13601
13602 `GL_VERTEX_ARRAY_BUFFER_BINDING'
13603
13604
13605 PARAMS returns a single value, the name of the buffer object
13606 associated with the vertex array. This buffer object would have
13607 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
13608 recent call to `glVertexPointer'. If no buffer object was bound to
13609 this target, 0 is returned. The initial value is 0. See
13610 `glBindBuffer'.
13611
13612 `GL_VERTEX_ARRAY_SIZE'
13613
13614
13615 PARAMS returns one value, the number of coordinates per vertex in
13616 the vertex array. The initial value is 4. See `glVertexPointer'.
13617
13618 `GL_VERTEX_ARRAY_STRIDE'
13619
13620
13621 PARAMS returns one value, the byte offset between consecutive
13622 vertices in the vertex array. The initial value is 0. See
13623 `glVertexPointer'.
13624
13625 `GL_VERTEX_ARRAY_TYPE'
13626
13627
13628 PARAMS returns one value, the data type of each coordinate in the
13629 vertex array. The initial value is `GL_FLOAT'. See
13630 `glVertexPointer'.
13631
13632 `GL_VERTEX_PROGRAM_POINT_SIZE'
13633
13634
13635 PARAMS returns a single boolean value indicating whether vertex
13636 program point size mode is enabled. If enabled, and a vertex
13637 shader is active, then the point size is taken from the shader
13638 built-in `gl_PointSize'. If disabled, and a vertex shader is
13639 active, then the point size is taken from the point state as
13640 specified by `glPointSize'. The initial value is `GL_FALSE'.
13641
13642 `GL_VERTEX_PROGRAM_TWO_SIDE'
13643
13644
13645 PARAMS returns a single boolean value indicating whether vertex
13646 program two-sided color mode is enabled. If enabled, and a vertex
13647 shader is active, then the GL chooses the back color output for
13648 back-facing polygons, and the front color output for non-polygons
13649 and front-facing polygons. If disabled, and a vertex shader is
13650 active, then the front color output is always selected. The
13651 initial value is `GL_FALSE'.
13652
13653 `GL_VIEWPORT'
13654
13655
13656 PARAMS returns four values: the X and Y window coordinates of the
13657 viewport, followed by its width and height. Initially the X and Y
13658 window coordinates are both set to 0, and the width and height are
13659 set to the width and height of the window into which the GL will do
13660 its rendering. See `glViewport'.
13661
13662 `GL_ZOOM_X'
13663
13664
13665 PARAMS returns one value, the X pixel zoom factor. The initial
13666 value is 1. See `glPixelZoom'.
13667
13668 `GL_ZOOM_Y'
13669
13670
13671 PARAMS returns one value, the Y pixel zoom factor. The initial
13672 value is 1. See `glPixelZoom'.
13673
13674 Many of the boolean parameters can also be queried more easily using
13675 `glIsEnabled'.
13676
13677 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
13678
13679 `GL_INVALID_OPERATION' is generated if `glGet' is executed between the
13680 execution of `glBegin' and the corresponding execution of `glEnd'.")
13681
13682 (define-gl-procedures
13683 ((glHint (target GLenum) (mode GLenum) -> void))
13684 "Specify implementation-specific hints.
13685
13686 TARGET
13687 Specifies a symbolic constant indicating the behavior to be
13688 controlled. `GL_FOG_HINT', `GL_GENERATE_MIPMAP_HINT',
13689 `GL_LINE_SMOOTH_HINT', `GL_PERSPECTIVE_CORRECTION_HINT',
13690 `GL_POINT_SMOOTH_HINT', `GL_POLYGON_SMOOTH_HINT',
13691 `GL_TEXTURE_COMPRESSION_HINT', and
13692 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT' are accepted.
13693
13694 MODE
13695 Specifies a symbolic constant indicating the desired behavior.
13696 `GL_FASTEST', `GL_NICEST', and `GL_DONT_CARE' are accepted.
13697
13698 Certain aspects of GL behavior, when there is room for interpretation,
13699 can be controlled with hints. A hint is specified with two arguments.
13700 TARGET is a symbolic constant indicating the behavior to be controlled,
13701 and MODE is another symbolic constant indicating the desired behavior.
13702 The initial value for each TARGET is `GL_DONT_CARE'. MODE can be one of
13703 the following:
13704
13705 `GL_FASTEST'
13706
13707
13708 The most efficient option should be chosen.
13709
13710 `GL_NICEST'
13711
13712
13713 The most correct, or highest quality, option should be chosen.
13714
13715 `GL_DONT_CARE'
13716
13717
13718 No preference.
13719
13720 Though the implementation aspects that can be hinted are well defined,
13721 the interpretation of the hints depends on the implementation. The hint
13722 aspects that can be specified with TARGET, along with suggested
13723 semantics, are as follows:
13724
13725 `GL_FOG_HINT'
13726
13727
13728 Indicates the accuracy of fog calculation. If per-pixel fog
13729 calculation is not efficiently supported by the GL implementation,
13730 hinting `GL_DONT_CARE' or `GL_FASTEST' can result in per-vertex
13731 calculation of fog effects.
13732
13733 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT'
13734
13735
13736 Indicates the accuracy of the derivative calculation for the GL
13737 shading language fragment processing built-in functions: `dFdx',
13738 `dFdy', and `fwidth'.
13739
13740 `GL_GENERATE_MIPMAP_HINT'
13741
13742
13743 Indicates the quality of filtering when generating mipmap images.
13744
13745 `GL_LINE_SMOOTH_HINT'
13746
13747
13748 Indicates the sampling quality of antialiased lines. If a larger
13749 filter function is applied, hinting `GL_NICEST' can result in more
13750 pixel fragments being generated during rasterization.
13751
13752 `GL_PERSPECTIVE_CORRECTION_HINT'
13753
13754
13755 Indicates the quality of color, texture coordinate, and fog
13756 coordinate interpolation. If perspective-corrected parameter
13757 interpolation is not efficiently supported by the GL
13758 implementation, hinting `GL_DONT_CARE' or `GL_FASTEST' can result
13759 in simple linear interpolation of colors and/or texture
13760 coordinates.
13761
13762 `GL_POINT_SMOOTH_HINT'
13763
13764
13765 Indicates the sampling quality of antialiased points. If a larger
13766 filter function is applied, hinting `GL_NICEST' can result in more
13767 pixel fragments being generated during rasterization.
13768
13769 `GL_POLYGON_SMOOTH_HINT'
13770
13771
13772 Indicates the sampling quality of antialiased polygons. Hinting
13773 `GL_NICEST' can result in more pixel fragments being generated
13774 during rasterization, if a larger filter function is applied.
13775
13776 `GL_TEXTURE_COMPRESSION_HINT'
13777
13778
13779 Indicates the quality and performance of the compressing texture
13780 images. Hinting `GL_FASTEST' indicates that texture images should
13781 be compressed as quickly as possible, while `GL_NICEST' indicates
13782 that texture images should be compressed with as little image
13783 quality loss as possible. `GL_NICEST' should be selected if the
13784 texture is to be retrieved by `glGetCompressedTexImage' for reuse.
13785
13786 `GL_INVALID_ENUM' is generated if either TARGET or MODE is not an
13787 accepted value.
13788
13789 `GL_INVALID_OPERATION' is generated if `glHint' is executed between the
13790 execution of `glBegin' and the corresponding execution of `glEnd'.")
13791
13792 (define-gl-procedures
13793 ((glHistogram
13794 (target GLenum)
13795 (width GLsizei)
13796 (internalformat GLenum)
13797 (sink GLboolean)
13798 ->
13799 void))
13800 "Define histogram table.
13801
13802 TARGET
13803 The histogram whose parameters are to be set. Must be one of
13804 `GL_HISTOGRAM' or `GL_PROXY_HISTOGRAM'.
13805
13806 WIDTH
13807 The number of entries in the histogram table. Must be a power of
13808 2.
13809
13810 INTERNALFORMAT
13811 The format of entries in the histogram table. Must be one of
13812 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
13813 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
13814 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
13815 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
13816 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
13817 `GL_LUMINANCE16_ALPHA16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4',
13818 `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16',
13819 `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8',
13820 `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
13821
13822 SINK
13823 If `GL_TRUE', pixels will be consumed by the histogramming process
13824 and no drawing or texture loading will take place. If `GL_FALSE',
13825 pixels will proceed to the minmax process after histogramming.
13826
13827 When `GL_HISTOGRAM' is enabled, RGBA color components are converted to
13828 histogram table indices by clamping to the range [0,1], multiplying by
13829 the width of the histogram table, and rounding to the nearest integer.
13830 The table entries selected by the RGBA indices are then incremented. (If
13831 the internal format of the histogram table includes luminance, then the
13832 index derived from the R color component determines the luminance table
13833 entry to be incremented.) If a histogram table entry is incremented
13834 beyond its maximum value, then its value becomes undefined. (This is
13835 not an error.)
13836
13837 Histogramming is performed only for RGBA pixels (though these may be
13838 specified originally as color indices and converted to RGBA by index
13839 table lookup). Histogramming is enabled with `glEnable' and disabled
13840 with `glDisable'.
13841
13842 When TARGET is `GL_HISTOGRAM', `glHistogram' redefines the current
13843 histogram table to have WIDTH entries of the format specified by
13844 INTERNALFORMAT. The entries are indexed 0 through WIDTH-1 , and all
13845 entries are initialized to zero. The values in the previous histogram
13846 table, if any, are lost. If SINK is `GL_TRUE', then pixels are
13847 discarded after histogramming; no further processing of the pixels takes
13848 place, and no drawing, texture loading, or pixel readback will result.
13849
13850 When TARGET is `GL_PROXY_HISTOGRAM', `glHistogram' computes all state
13851 information as if the histogram table were to be redefined, but does not
13852 actually define the new table. If the requested histogram table is too
13853 large to be supported, then the state information will be set to zero.
13854 This provides a way to determine if a histogram table with the given
13855 parameters can be supported.
13856
13857
13858
13859 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
13860 values.
13861
13862 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or is not a
13863 power of 2.
13864
13865 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
13866 allowable values.
13867
13868 `GL_TABLE_TOO_LARGE' is generated if TARGET is `GL_HISTOGRAM' and the
13869 histogram table specified is too large for the implementation.
13870
13871 `GL_INVALID_OPERATION' is generated if `glHistogram' is executed between
13872 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13873
13874 (define-gl-procedures
13875 ((glIndexMask (mask GLuint) -> void))
13876 "Control the writing of individual bits in the color index buffers.
13877
13878 MASK
13879 Specifies a bit mask to enable and disable the writing of
13880 individual bits in the color index buffers. Initially, the mask is
13881 all 1's.
13882
13883 `glIndexMask' controls the writing of individual bits in the color index
13884 buffers. The least significant N bits of MASK, where N is the number of
13885 bits in a color index buffer, specify a mask. Where a 1 (one) appears
13886 in the mask, it's possible to write to the corresponding bit in the
13887 color index buffer (or buffers). Where a 0 (zero) appears, the
13888 corresponding bit is write-protected.
13889
13890 This mask is used only in color index mode, and it affects only the
13891 buffers currently selected for writing (see `glDrawBuffer'). Initially,
13892 all bits are enabled for writing.
13893
13894 `GL_INVALID_OPERATION' is generated if `glIndexMask' is executed between
13895 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13896
13897 (define-gl-procedures
13898 ((glIndexPointer
13899 (type GLenum)
13900 (stride GLsizei)
13901 (pointer const-GLvoid-*)
13902 ->
13903 void))
13904 "Define an array of color indexes.
13905
13906 TYPE
13907 Specifies the data type of each color index in the array. Symbolic
13908 constants `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_INT', `GL_FLOAT', and
13909 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
13910
13911 STRIDE
13912 Specifies the byte offset between consecutive color indexes. If
13913 STRIDE is 0, the color indexes are understood to be tightly packed
13914 in the array. The initial value is 0.
13915
13916 POINTER
13917 Specifies a pointer to the first index in the array. The initial
13918 value is 0.
13919
13920 `glIndexPointer' specifies the location and data format of an array of
13921 color indexes to use when rendering. TYPE specifies the data type of
13922 each color index and STRIDE specifies the byte stride from one color
13923 index to the next, allowing vertices and attributes to be packed into a
13924 single array or stored in separate arrays.
13925
13926 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
13927 target (see `glBindBuffer') while a color index array is specified,
13928 POINTER is treated as a byte offset into the buffer object's data store.
13929 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
13930 color index vertex array client-side state
13931 (`GL_INDEX_ARRAY_BUFFER_BINDING').
13932
13933 When a color index array is specified, TYPE, STRIDE, and POINTER are
13934 saved as client-side state, in addition to the current vertex array
13935 buffer object binding.
13936
13937 To enable and disable the color index array, call `glEnableClientState'
13938 and `glDisableClientState' with the argument `GL_INDEX_ARRAY'. If
13939 enabled, the color index array is used when `glDrawArrays',
13940 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements',
13941 `glDrawRangeElements', or `glArrayElement' is called.
13942
13943 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
13944
13945 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
13946
13947 (define-gl-procedures
13948 ((glIndexs (c GLshort) -> void)
13949 (glIndexi (c GLint) -> void)
13950 (glIndexf (c GLfloat) -> void)
13951 (glIndexd (c GLdouble) -> void)
13952 (glIndexub (c GLubyte) -> void)
13953 (glIndexsv (c const-GLshort-*) -> void)
13954 (glIndexiv (c const-GLint-*) -> void)
13955 (glIndexfv (c const-GLfloat-*) -> void)
13956 (glIndexdv (c const-GLdouble-*) -> void)
13957 (glIndexubv (c const-GLubyte-*) -> void))
13958 "Set the current color index.
13959
13960 C
13961 Specifies the new value for the current color index.
13962
13963
13964
13965 `glIndex' updates the current (single-valued) color index. It takes one
13966 argument, the new value for the current color index.
13967
13968 The current index is stored as a floating-point value. Integer values
13969 are converted directly to floating-point values, with no special
13970 mapping. The initial value is 1.
13971
13972 Index values outside the representable range of the color index buffer
13973 are not clamped. However, before an index is dithered (if enabled) and
13974 written to the frame buffer, it is converted to fixed-point format. Any
13975 bits in the integer portion of the resulting fixed-point value that do
13976 not correspond to bits in the frame buffer are masked out.")
13977
13978 (define-gl-procedures
13979 ((glInitNames -> void))
13980 "Initialize the name stack.
13981
13982 The name stack is used during selection mode to allow sets of rendering
13983 commands to be uniquely identified. It consists of an ordered set of
13984 unsigned integers. `glInitNames' causes the name stack to be
13985 initialized to its default empty state.
13986
13987 The name stack is always empty while the render mode is not `GL_SELECT'.
13988 Calls to `glInitNames' while the render mode is not `GL_SELECT' are
13989 ignored.
13990
13991 `GL_INVALID_OPERATION' is generated if `glInitNames' is executed between
13992 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13993
13994 (define-gl-procedures
13995 ((glInterleavedArrays
13996 (format GLenum)
13997 (stride GLsizei)
13998 (pointer const-GLvoid-*)
13999 ->
14000 void))
14001 "Simultaneously specify and enable several interleaved arrays.
14002
14003 FORMAT
14004 Specifies the type of array to enable. Symbolic constants
14005 `GL_V2F', `GL_V3F', `GL_C4UB_V2F', `GL_C4UB_V3F', `GL_C3F_V3F',
14006 `GL_N3F_V3F', `GL_C4F_N3F_V3F', `GL_T2F_V3F', `GL_T4F_V4F',
14007 `GL_T2F_C4UB_V3F', `GL_T2F_C3F_V3F', `GL_T2F_N3F_V3F',
14008 `GL_T2F_C4F_N3F_V3F', and `GL_T4F_C4F_N3F_V4F' are accepted.
14009
14010 STRIDE
14011 Specifies the offset in bytes between each aggregate array element.
14012
14013 `glInterleavedArrays' lets you specify and enable individual color,
14014 normal, texture and vertex arrays whose elements are part of a larger
14015 aggregate array element. For some implementations, this is more
14016 efficient than specifying the arrays separately.
14017
14018 If STRIDE is 0, the aggregate elements are stored consecutively.
14019 Otherwise, STRIDE bytes occur between the beginning of one aggregate
14020 array element and the beginning of the next aggregate array element.
14021
14022 FORMAT serves as a ``key'' describing the extraction of individual
14023 arrays from the aggregate array. If FORMAT contains a T, then texture
14024 coordinates are extracted from the interleaved array. If C is present,
14025 color values are extracted. If N is present, normal coordinates are
14026 extracted. Vertex coordinates are always extracted.
14027
14028 The digits 2, 3, and 4 denote how many values are extracted. F
14029 indicates that values are extracted as floating-point values. Colors
14030 may also be extracted as 4 unsigned bytes if 4UB follows the C. If a
14031 color is extracted as 4 unsigned bytes, the vertex array element which
14032 follows is located at the first possible floating-point aligned address.
14033
14034 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted value.
14035
14036 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
14037
14038 (define-gl-procedures
14039 ((glIsBuffer (buffer GLuint) -> GLboolean))
14040 "Determine if a name corresponds to a buffer object.
14041
14042 BUFFER
14043 Specifies a value that may be the name of a buffer object.
14044
14045 `glIsBuffer' returns `GL_TRUE' if BUFFER is currently the name of a
14046 buffer object. If BUFFER is zero, or is a non-zero value that is not
14047 currently the name of a buffer object, or if an error occurs,
14048 `glIsBuffer' returns `GL_FALSE'.
14049
14050 A name returned by `glGenBuffers', but not yet associated with a buffer
14051 object by calling `glBindBuffer', is not the name of a buffer object.
14052
14053 `GL_INVALID_OPERATION' is generated if `glIsBuffer' is executed between
14054 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14055
14056 (define-gl-procedures
14057 ((glIsEnabled (cap GLenum) -> GLboolean))
14058 "Test whether a capability is enabled.
14059
14060 CAP
14061 Specifies a symbolic constant indicating a GL capability.
14062
14063 `glIsEnabled' returns `GL_TRUE' if CAP is an enabled capability and
14064 returns `GL_FALSE' otherwise. Initially all capabilities except
14065 `GL_DITHER' are disabled; `GL_DITHER' is initially enabled.
14066
14067 The following capabilities are accepted for CAP:
14068
14069
14070
14071 *Constant*
14072 *See*
14073
14074 `GL_ALPHA_TEST'
14075 `glAlphaFunc'
14076
14077 `GL_AUTO_NORMAL'
14078 `glEvalCoord'
14079
14080 `GL_BLEND'
14081 `glBlendFunc', `glLogicOp'
14082
14083 `GL_CLIP_PLANE'I
14084 `glClipPlane'
14085
14086 `GL_COLOR_ARRAY'
14087 `glColorPointer'
14088
14089 `GL_COLOR_LOGIC_OP'
14090 `glLogicOp'
14091
14092 `GL_COLOR_MATERIAL'
14093 `glColorMaterial'
14094
14095 `GL_COLOR_SUM'
14096 `glSecondaryColor'
14097
14098 `GL_COLOR_TABLE'
14099 `glColorTable'
14100
14101 `GL_CONVOLUTION_1D'
14102 `glConvolutionFilter1D'
14103
14104 `GL_CONVOLUTION_2D'
14105 `glConvolutionFilter2D'
14106
14107 `GL_CULL_FACE'
14108 `glCullFace'
14109
14110 `GL_DEPTH_TEST'
14111 `glDepthFunc', `glDepthRange'
14112
14113 `GL_DITHER'
14114 `glEnable'
14115
14116 `GL_EDGE_FLAG_ARRAY'
14117 `glEdgeFlagPointer'
14118
14119 `GL_FOG'
14120 `glFog'
14121
14122 `GL_FOG_COORD_ARRAY'
14123 `glFogCoordPointer'
14124
14125 `GL_HISTOGRAM'
14126 `glHistogram'
14127
14128 `GL_INDEX_ARRAY'
14129 `glIndexPointer'
14130
14131 `GL_INDEX_LOGIC_OP'
14132 `glLogicOp'
14133
14134 `GL_LIGHT'I
14135 `glLightModel', `glLight'
14136
14137 `GL_LIGHTING'
14138 `glMaterial', `glLightModel', `glLight'
14139
14140 `GL_LINE_SMOOTH'
14141 `glLineWidth'
14142
14143 `GL_LINE_STIPPLE'
14144 `glLineStipple'
14145
14146 `GL_MAP1_COLOR_4'
14147 `glMap1'
14148
14149 `GL_MAP1_INDEX'
14150 `glMap1'
14151
14152 `GL_MAP1_NORMAL'
14153 `glMap1'
14154
14155 `GL_MAP1_TEXTURE_COORD_1'
14156 `glMap1'
14157
14158 `GL_MAP1_TEXTURE_COORD_2'
14159 `glMap1'
14160
14161 `GL_MAP1_TEXTURE_COORD_3'
14162 `glMap1'
14163
14164 `GL_MAP1_TEXTURE_COORD_4'
14165 `glMap1'
14166
14167 `GL_MAP2_COLOR_4'
14168 `glMap2'
14169
14170 `GL_MAP2_INDEX'
14171 `glMap2'
14172
14173 `GL_MAP2_NORMAL'
14174 `glMap2'
14175
14176 `GL_MAP2_TEXTURE_COORD_1'
14177 `glMap2'
14178
14179 `GL_MAP2_TEXTURE_COORD_2'
14180 `glMap2'
14181
14182 `GL_MAP2_TEXTURE_COORD_3'
14183 `glMap2'
14184
14185 `GL_MAP2_TEXTURE_COORD_4'
14186 `glMap2'
14187
14188 `GL_MAP2_VERTEX_3'
14189 `glMap2'
14190
14191 `GL_MAP2_VERTEX_4'
14192 `glMap2'
14193
14194 `GL_MINMAX'
14195 `glMinmax'
14196
14197 `GL_MULTISAMPLE'
14198 `glSampleCoverage'
14199
14200 `GL_NORMAL_ARRAY'
14201 `glNormalPointer'
14202
14203 `GL_NORMALIZE'
14204 `glNormal'
14205
14206 `GL_POINT_SMOOTH'
14207 `glPointSize'
14208
14209 `GL_POINT_SPRITE'
14210 `glEnable'
14211
14212 `GL_POLYGON_SMOOTH'
14213 `glPolygonMode'
14214
14215 `GL_POLYGON_OFFSET_FILL'
14216 `glPolygonOffset'
14217
14218 `GL_POLYGON_OFFSET_LINE'
14219 `glPolygonOffset'
14220
14221 `GL_POLYGON_OFFSET_POINT'
14222 `glPolygonOffset'
14223
14224 `GL_POLYGON_STIPPLE'
14225 `glPolygonStipple'
14226
14227 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
14228 `glColorTable'
14229
14230 `GL_POST_CONVOLUTION_COLOR_TABLE'
14231 `glColorTable'
14232
14233 `GL_RESCALE_NORMAL'
14234 `glNormal'
14235
14236 `GL_SAMPLE_ALPHA_TO_COVERAGE'
14237 `glSampleCoverage'
14238
14239 `GL_SAMPLE_ALPHA_TO_ONE'
14240 `glSampleCoverage'
14241
14242 `GL_SAMPLE_COVERAGE'
14243 `glSampleCoverage'
14244
14245 `GL_SCISSOR_TEST'
14246 `glScissor'
14247
14248 `GL_SECONDARY_COLOR_ARRAY'
14249 `glSecondaryColorPointer'
14250
14251 `GL_SEPARABLE_2D'
14252 `glSeparableFilter2D'
14253
14254 `GL_STENCIL_TEST'
14255 `glStencilFunc', `glStencilOp'
14256
14257 `GL_TEXTURE_1D'
14258 `glTexImage1D'
14259
14260 `GL_TEXTURE_2D'
14261 `glTexImage2D'
14262
14263 `GL_TEXTURE_3D'
14264 `glTexImage3D'
14265
14266 `GL_TEXTURE_COORD_ARRAY'
14267 `glTexCoordPointer'
14268
14269 `GL_TEXTURE_CUBE_MAP'
14270 `glTexImage2D'
14271
14272 `GL_TEXTURE_GEN_Q'
14273 `glTexGen'
14274
14275 `GL_TEXTURE_GEN_R'
14276 `glTexGen'
14277
14278 `GL_TEXTURE_GEN_S'
14279 `glTexGen'
14280
14281 `GL_TEXTURE_GEN_T'
14282 `glTexGen'
14283
14284 `GL_VERTEX_ARRAY'
14285 `glVertexPointer'
14286
14287 `GL_VERTEX_PROGRAM_POINT_SIZE'
14288 `glEnable'
14289
14290 `GL_VERTEX_PROGRAM_TWO_SIDE'
14291 `glEnable'
14292
14293
14294
14295 `GL_INVALID_ENUM' is generated if CAP is not an accepted value.
14296
14297 `GL_INVALID_OPERATION' is generated if `glIsEnabled' is executed between
14298 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14299
14300 (define-gl-procedures
14301 ((glIsList (list GLuint) -> GLboolean))
14302 "Determine if a name corresponds to a display list.
14303
14304 LIST
14305 Specifies a potential display list name.
14306
14307 `glIsList' returns `GL_TRUE' if LIST is the name of a display list and
14308 returns `GL_FALSE' if it is not, or if an error occurs.
14309
14310 A name returned by `glGenLists', but not yet associated with a display
14311 list by calling `glNewList', is not the name of a display list.
14312
14313 `GL_INVALID_OPERATION' is generated if `glIsList' is executed between
14314 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14315
14316 (define-gl-procedures
14317 ((glIsProgram (program GLuint) -> GLboolean))
14318 "Determines if a name corresponds to a program object.
14319
14320 PROGRAM
14321 Specifies a potential program object.
14322
14323 `glIsProgram' returns `GL_TRUE' if PROGRAM is the name of a program
14324 object previously created with `glCreateProgram' and not yet deleted
14325 with `glDeleteProgram'. If PROGRAM is zero or a non-zero value that is
14326 not the name of a program object, or if an error occurs, `glIsProgram'
14327 returns `GL_FALSE'.
14328
14329 `GL_INVALID_OPERATION' is generated if `glIsProgram' is executed between
14330 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14331
14332 (define-gl-procedures
14333 ((glIsQuery (id GLuint) -> GLboolean))
14334 "Determine if a name corresponds to a query object.
14335
14336 ID
14337 Specifies a value that may be the name of a query object.
14338
14339 `glIsQuery' returns `GL_TRUE' if ID is currently the name of a query
14340 object. If ID is zero, or is a non-zero value that is not currently the
14341 name of a query object, or if an error occurs, `glIsQuery' returns
14342 `GL_FALSE'.
14343
14344 A name returned by `glGenQueries', but not yet associated with a query
14345 object by calling `glBeginQuery', is not the name of a query object.
14346
14347 `GL_INVALID_OPERATION' is generated if `glIsQuery' is executed between
14348 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14349
14350 (define-gl-procedures
14351 ((glIsShader (shader GLuint) -> GLboolean))
14352 "Determines if a name corresponds to a shader object.
14353
14354 SHADER
14355 Specifies a potential shader object.
14356
14357 `glIsShader' returns `GL_TRUE' if SHADER is the name of a shader object
14358 previously created with `glCreateShader' and not yet deleted with
14359 `glDeleteShader'. If SHADER is zero or a non-zero value that is not the
14360 name of a shader object, or if an error occurs, `glIsShader ' returns
14361 `GL_FALSE'.
14362
14363 `GL_INVALID_OPERATION' is generated if `glIsShader' is executed between
14364 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14365
14366 (define-gl-procedures
14367 ((glIsTexture (texture GLuint) -> GLboolean))
14368 "Determine if a name corresponds to a texture.
14369
14370 TEXTURE
14371 Specifies a value that may be the name of a texture.
14372
14373 `glIsTexture' returns `GL_TRUE' if TEXTURE is currently the name of a
14374 texture. If TEXTURE is zero, or is a non-zero value that is not
14375 currently the name of a texture, or if an error occurs, `glIsTexture'
14376 returns `GL_FALSE'.
14377
14378 A name returned by `glGenTextures', but not yet associated with a
14379 texture by calling `glBindTexture', is not the name of a texture.
14380
14381 `GL_INVALID_OPERATION' is generated if `glIsTexture' is executed between
14382 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14383
14384 (define-gl-procedures
14385 ((glLightModelf
14386 (pname GLenum)
14387 (param GLfloat)
14388 ->
14389 void)
14390 (glLightModeli
14391 (pname GLenum)
14392 (param GLint)
14393 ->
14394 void)
14395 (glLightModelfv
14396 (pname GLenum)
14397 (params const-GLfloat-*)
14398 ->
14399 void)
14400 (glLightModeliv
14401 (pname GLenum)
14402 (params const-GLint-*)
14403 ->
14404 void))
14405 "Set the lighting model parameters.
14406
14407 PNAME
14408 Specifies a single-valued lighting model parameter.
14409 `GL_LIGHT_MODEL_LOCAL_VIEWER', `GL_LIGHT_MODEL_COLOR_CONTROL', and
14410 `GL_LIGHT_MODEL_TWO_SIDE' are accepted.
14411
14412 PARAM
14413 Specifies the value that PARAM will be set to.
14414
14415 `glLightModel' sets the lighting model parameter. PNAME names a
14416 parameter and PARAMS gives the new value. There are three lighting
14417 model parameters:
14418
14419 `GL_LIGHT_MODEL_AMBIENT'
14420
14421
14422 PARAMS contains four integer or floating-point values that specify
14423 the ambient RGBA intensity of the entire scene. Integer values are
14424 mapped linearly such that the most positive representable value
14425 maps to 1.0, and the most negative representable value maps to -1.0
14426 . Floating-point values are mapped directly. Neither integer nor
14427 floating-point values are clamped. The initial ambient scene
14428 intensity is (0.2, 0.2, 0.2, 1.0).
14429
14430 `GL_LIGHT_MODEL_COLOR_CONTROL'
14431
14432
14433 PARAMS must be either `GL_SEPARATE_SPECULAR_COLOR' or
14434 `GL_SINGLE_COLOR'. `GL_SINGLE_COLOR' specifies that a single color
14435 is generated from the lighting computation for a vertex.
14436 `GL_SEPARATE_SPECULAR_COLOR' specifies that the specular color
14437 computation of lighting be stored separately from the remainder of
14438 the lighting computation. The specular color is summed into the
14439 generated fragment's color after the application of texture mapping
14440 (if enabled). The initial value is `GL_SINGLE_COLOR'.
14441
14442 `GL_LIGHT_MODEL_LOCAL_VIEWER'
14443
14444
14445 PARAMS is a single integer or floating-point value that specifies
14446 how specular reflection angles are computed. If PARAMS is 0 (or
14447 0.0), specular reflection angles take the view direction to be
14448 parallel to and in the direction of the -Z axis, regardless of the
14449 location of the vertex in eye coordinates. Otherwise, specular
14450 reflections are computed from the origin of the eye coordinate
14451 system. The initial value is 0.
14452
14453 `GL_LIGHT_MODEL_TWO_SIDE'
14454
14455
14456 PARAMS is a single integer or floating-point value that specifies
14457 whether one- or two-sided lighting calculations are done for
14458 polygons. It has no effect on the lighting calculations for
14459 points, lines, or bitmaps. If PARAMS is 0 (or 0.0), one-sided
14460 lighting is specified, and only the FRONT material parameters are
14461 used in the lighting equation. Otherwise, two-sided lighting is
14462 specified. In this case, vertices of back-facing polygons are
14463 lighted using the BACK material parameters and have their normals
14464 reversed before the lighting equation is evaluated. Vertices of
14465 front-facing polygons are always lighted using the FRONT material
14466 parameters, with no change to their normals. The initial value is
14467 0.
14468
14469 In RGBA mode, the lighted color of a vertex is the sum of the material
14470 emission intensity, the product of the material ambient reflectance and
14471 the lighting model full-scene ambient intensity, and the contribution of
14472 each enabled light source. Each light source contributes the sum of
14473 three terms: ambient, diffuse, and specular. The ambient light source
14474 contribution is the product of the material ambient reflectance and the
14475 light's ambient intensity. The diffuse light source contribution is the
14476 product of the material diffuse reflectance, the light's diffuse
14477 intensity, and the dot product of the vertex's normal with the
14478 normalized vector from the vertex to the light source. The specular
14479 light source contribution is the product of the material specular
14480 reflectance, the light's specular intensity, and the dot product of the
14481 normalized vertex-to-eye and vertex-to-light vectors, raised to the
14482 power of the shininess of the material. All three light source
14483 contributions are attenuated equally based on the distance from the
14484 vertex to the light source and on light source direction, spread
14485 exponent, and spread cutoff angle. All dot products are replaced with 0
14486 if they evaluate to a negative value.
14487
14488 The alpha component of the resulting lighted color is set to the alpha
14489 value of the material diffuse reflectance.
14490
14491 In color index mode, the value of the lighted index of a vertex ranges
14492 from the ambient to the specular values passed to `glMaterial' using
14493 `GL_COLOR_INDEXES'. Diffuse and specular coefficients, computed with a
14494 (.30, .59, .11) weighting of the lights' colors, the shininess of the
14495 material, and the same reflection and attenuation equations as in the
14496 RGBA case, determine how much above ambient the resulting index is.
14497
14498 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
14499
14500 `GL_INVALID_ENUM' is generated if PNAME is
14501 `GL_LIGHT_MODEL_COLOR_CONTROL' and PARAMS is not one of
14502 `GL_SINGLE_COLOR' or `GL_SEPARATE_SPECULAR_COLOR'.
14503
14504 `GL_INVALID_OPERATION' is generated if `glLightModel' is executed
14505 between the execution of `glBegin' and the corresponding execution of
14506 `glEnd'.")
14507
14508 (define-gl-procedures
14509 ((glLightf
14510 (light GLenum)
14511 (pname GLenum)
14512 (param GLfloat)
14513 ->
14514 void)
14515 (glLighti
14516 (light GLenum)
14517 (pname GLenum)
14518 (param GLint)
14519 ->
14520 void)
14521 (glLightfv
14522 (light GLenum)
14523 (pname GLenum)
14524 (params const-GLfloat-*)
14525 ->
14526 void)
14527 (glLightiv
14528 (light GLenum)
14529 (pname GLenum)
14530 (params const-GLint-*)
14531 ->
14532 void))
14533 "Set light source parameters.
14534
14535 LIGHT
14536 Specifies a light. The number of lights depends on the
14537 implementation, but at least eight lights are supported. They are
14538 identified by symbolic names of the form `GL_LIGHT' I , where i
14539 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
14540
14541 PNAME
14542 Specifies a single-valued light source parameter for LIGHT.
14543 `GL_SPOT_EXPONENT', `GL_SPOT_CUTOFF', `GL_CONSTANT_ATTENUATION',
14544 `GL_LINEAR_ATTENUATION', and `GL_QUADRATIC_ATTENUATION' are
14545 accepted.
14546
14547 PARAM
14548 Specifies the value that parameter PNAME of light source LIGHT will
14549 be set to.
14550
14551 `glLight' sets the values of individual light source parameters. LIGHT
14552 names the light and is a symbolic name of the form `GL_LIGHT'I , where i
14553 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1. PNAME specifies one
14554 of ten light source parameters, again by symbolic name. PARAMS is
14555 either a single value or a pointer to an array that contains the new
14556 values.
14557
14558 To enable and disable lighting calculation, call `glEnable' and
14559 `glDisable' with argument `GL_LIGHTING'. Lighting is initially
14560 disabled. When it is enabled, light sources that are enabled contribute
14561 to the lighting calculation. Light source I is enabled and disabled
14562 using `glEnable' and `glDisable' with argument `GL_LIGHT'I .
14563
14564 The ten light parameters are as follows:
14565
14566 `GL_AMBIENT'
14567 PARAMS contains four integer or floating-point values that specify
14568 the ambient RGBA intensity of the light. Integer values are mapped
14569 linearly such that the most positive representable value maps to
14570 1.0, and the most negative representable value maps to -1.0 .
14571 Floating-point values are mapped directly. Neither integer nor
14572 floating-point values are clamped. The initial ambient light
14573 intensity is (0, 0, 0, 1).
14574
14575 `GL_DIFFUSE'
14576 PARAMS contains four integer or floating-point values that specify
14577 the diffuse RGBA intensity of the light. Integer values are mapped
14578 linearly such that the most positive representable value maps to
14579 1.0, and the most negative representable value maps to -1.0 .
14580 Floating-point values are mapped directly. Neither integer nor
14581 floating-point values are clamped. The initial value for
14582 `GL_LIGHT0' is (1, 1, 1, 1); for other lights, the initial value is
14583 (0, 0, 0, 1).
14584
14585 `GL_SPECULAR'
14586 PARAMS contains four integer or floating-point values that specify
14587 the specular RGBA intensity of the light. Integer values are
14588 mapped linearly such that the most positive representable value
14589 maps to 1.0, and the most negative representable value maps to -1.0
14590 . Floating-point values are mapped directly. Neither integer nor
14591 floating-point values are clamped. The initial value for
14592 `GL_LIGHT0' is (1, 1, 1, 1); for other lights, the initial value is
14593 (0, 0, 0, 1).
14594
14595 `GL_POSITION'
14596 PARAMS contains four integer or floating-point values that specify
14597 the position of the light in homogeneous object coordinates. Both
14598 integer and floating-point values are mapped directly. Neither
14599 integer nor floating-point values are clamped.
14600
14601 The position is transformed by the modelview matrix when `glLight'
14602 is called (just as if it were a point), and it is stored in eye
14603 coordinates. If the W component of the position is 0, the light is
14604 treated as a directional source. Diffuse and specular lighting
14605 calculations take the light's direction, but not its actual
14606 position, into account, and attenuation is disabled. Otherwise,
14607 diffuse and specular lighting calculations are based on the actual
14608 location of the light in eye coordinates, and attenuation is
14609 enabled. The initial position is (0, 0, 1, 0); thus, the initial
14610 light source is directional, parallel to, and in the direction of
14611 the -Z axis.
14612
14613 `GL_SPOT_DIRECTION'
14614 PARAMS contains three integer or floating-point values that specify
14615 the direction of the light in homogeneous object coordinates. Both
14616 integer and floating-point values are mapped directly. Neither
14617 integer nor floating-point values are clamped.
14618
14619 The spot direction is transformed by the upper 3x3 of the modelview
14620 matrix when `glLight' is called, and it is stored in eye
14621 coordinates. It is significant only when `GL_SPOT_CUTOFF' is not
14622 180, which it is initially. The initial direction is (0,0-1) .
14623
14624 `GL_SPOT_EXPONENT'
14625 PARAMS is a single integer or floating-point value that specifies
14626 the intensity distribution of the light. Integer and
14627 floating-point values are mapped directly. Only values in the
14628 range [0,128] are accepted.
14629
14630 Effective light intensity is attenuated by the cosine of the angle
14631 between the direction of the light and the direction from the light
14632 to the vertex being lighted, raised to the power of the spot
14633 exponent. Thus, higher spot exponents result in a more focused
14634 light source, regardless of the spot cutoff angle (see
14635 `GL_SPOT_CUTOFF', next paragraph). The initial spot exponent is 0,
14636 resulting in uniform light distribution.
14637
14638 `GL_SPOT_CUTOFF'
14639 PARAMS is a single integer or floating-point value that specifies
14640 the maximum spread angle of a light source. Integer and
14641 floating-point values are mapped directly. Only values in the
14642 range [0,90] and the special value 180 are accepted. If the angle
14643 between the direction of the light and the direction from the light
14644 to the vertex being lighted is greater than the spot cutoff angle,
14645 the light is completely masked. Otherwise, its intensity is
14646 controlled by the spot exponent and the attenuation factors. The
14647 initial spot cutoff is 180, resulting in uniform light
14648 distribution.
14649
14650 `GL_CONSTANT_ATTENUATION'
14651 `GL_LINEAR_ATTENUATION'
14652 `GL_QUADRATIC_ATTENUATION'
14653 PARAMS is a single integer or floating-point value that specifies
14654 one of the three light attenuation factors. Integer and
14655 floating-point values are mapped directly. Only nonnegative values
14656 are accepted. If the light is positional, rather than directional,
14657 its intensity is attenuated by the reciprocal of the sum of the
14658 constant factor, the linear factor times the distance between the
14659 light and the vertex being lighted, and the quadratic factor times
14660 the square of the same distance. The initial attenuation factors
14661 are (1, 0, 0), resulting in no attenuation.
14662
14663 `GL_INVALID_ENUM' is generated if either LIGHT or PNAME is not an
14664 accepted value.
14665
14666 `GL_INVALID_VALUE' is generated if a spot exponent value is specified
14667 outside the range [0,128] , or if spot cutoff is specified outside the
14668 range [0,90] (except for the special value 180), or if a negative
14669 attenuation factor is specified.
14670
14671 `GL_INVALID_OPERATION' is generated if `glLight' is executed between the
14672 execution of `glBegin' and the corresponding execution of `glEnd'.")
14673
14674 (define-gl-procedures
14675 ((glLineStipple
14676 (factor GLint)
14677 (pattern GLushort)
14678 ->
14679 void))
14680 "Specify the line stipple pattern.
14681
14682 FACTOR
14683 Specifies a multiplier for each bit in the line stipple pattern. If
14684 FACTOR is 3, for example, each bit in the pattern is used three
14685 times before the next bit in the pattern is used. FACTOR is
14686 clamped to the range [1, 256] and defaults to 1.
14687
14688 PATTERN
14689 Specifies a 16-bit integer whose bit pattern determines which
14690 fragments of a line will be drawn when the line is rasterized. Bit
14691 zero is used first; the default pattern is all 1's.
14692
14693 Line stippling masks out certain fragments produced by rasterization;
14694 those fragments will not be drawn. The masking is achieved by using
14695 three parameters: the 16-bit line stipple pattern PATTERN, the repeat
14696 count FACTOR, and an integer stipple counter S .
14697
14698 Counter S is reset to 0 whenever `glBegin' is called and before each
14699 line segment of a `glBegin'(`GL_LINES')/`glEnd' sequence is generated.
14700 It is incremented after each fragment of a unit width aliased line
14701 segment is generated or after each I fragments of an I width line
14702 segment are generated. The I fragments associated with count S are
14703 masked out if
14704
14705 PATTERN bit (S/FACTOR,)%16
14706
14707 is 0, otherwise these fragments are sent to the frame buffer. Bit zero
14708 of PATTERN is the least significant bit.
14709
14710 Antialiased lines are treated as a sequence of 1×WIDTH rectangles for
14711 purposes of stippling. Whether rectangle S is rasterized or not depends
14712 on the fragment rule described for aliased lines, counting rectangles
14713 rather than groups of fragments.
14714
14715 To enable and disable line stippling, call `glEnable' and `glDisable'
14716 with argument `GL_LINE_STIPPLE'. When enabled, the line stipple pattern
14717 is applied as described above. When disabled, it is as if the pattern
14718 were all 1's. Initially, line stippling is disabled.
14719
14720 `GL_INVALID_OPERATION' is generated if `glLineStipple' is executed
14721 between the execution of `glBegin' and the corresponding execution of
14722 `glEnd'.")
14723
14724 (define-gl-procedures
14725 ((glLineWidth (width GLfloat) -> void))
14726 "Specify the width of rasterized lines.
14727
14728 WIDTH
14729 Specifies the width of rasterized lines. The initial value is 1.
14730
14731 `glLineWidth' specifies the rasterized width of both aliased and
14732 antialiased lines. Using a line width other than 1 has different
14733 effects, depending on whether line antialiasing is enabled. To enable
14734 and disable line antialiasing, call `glEnable' and `glDisable' with
14735 argument `GL_LINE_SMOOTH'. Line antialiasing is initially disabled.
14736
14737 If line antialiasing is disabled, the actual width is determined by
14738 rounding the supplied width to the nearest integer. (If the rounding
14739 results in the value 0, it is as if the line width were 1.) If
14740 ∣ΔX,∣>=∣ΔY,∣ , I pixels are filled in each column that is rasterized,
14741 where I is the rounded value of WIDTH. Otherwise, I pixels are filled
14742 in each row that is rasterized.
14743
14744 If antialiasing is enabled, line rasterization produces a fragment for
14745 each pixel square that intersects the region lying within the rectangle
14746 having width equal to the current line width, length equal to the actual
14747 length of the line, and centered on the mathematical line segment. The
14748 coverage value for each fragment is the window coordinate area of the
14749 intersection of the rectangular region with the corresponding pixel
14750 square. This value is saved and used in the final rasterization step.
14751
14752 Not all widths can be supported when line antialiasing is enabled. If
14753 an unsupported width is requested, the nearest supported width is used.
14754 Only width 1 is guaranteed to be supported; others depend on the
14755 implementation. Likewise, there is a range for aliased line widths as
14756 well. To query the range of supported widths and the size difference
14757 between supported widths within the range, call `glGet' with arguments
14758 `GL_ALIASED_LINE_WIDTH_RANGE', `GL_SMOOTH_LINE_WIDTH_RANGE', and
14759 `GL_SMOOTH_LINE_WIDTH_GRANULARITY'.
14760
14761 `GL_INVALID_VALUE' is generated if WIDTH is less than or equal to 0.
14762
14763 `GL_INVALID_OPERATION' is generated if `glLineWidth' is executed between
14764 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14765
14766 (define-gl-procedures
14767 ((glLinkProgram (program GLuint) -> void))
14768 "Links a program object.
14769
14770 PROGRAM
14771 Specifies the handle of the program object to be linked.
14772
14773 `glLinkProgram' links the program object specified by PROGRAM. If any
14774 shader objects of type `GL_VERTEX_SHADER' are attached to PROGRAM, they
14775 will be used to create an executable that will run on the programmable
14776 vertex processor. If any shader objects of type `GL_FRAGMENT_SHADER'
14777 are attached to PROGRAM, they will be used to create an executable that
14778 will run on the programmable fragment processor.
14779
14780 The status of the link operation will be stored as part of the program
14781 object's state. This value will be set to `GL_TRUE' if the program
14782 object was linked without errors and is ready for use, and `GL_FALSE'
14783 otherwise. It can be queried by calling `glGetProgram' with arguments
14784 PROGRAM and `GL_LINK_STATUS'.
14785
14786 As a result of a successful link operation, all active user-defined
14787 uniform variables belonging to PROGRAM will be initialized to 0, and
14788 each of the program object's active uniform variables will be assigned a
14789 location that can be queried by calling `glGetUniformLocation'. Also,
14790 any active user-defined attribute variables that have not been bound to
14791 a generic vertex attribute index will be bound to one at this time.
14792
14793 Linking of a program object can fail for a number of reasons as
14794 specified in the OPENGL SHADING LANGUAGE SPECIFICATION. The following
14795 lists some of the conditions that will cause a link error.
14796
14797 * The storage limit for uniform variables has been exceeded.
14798
14799 * The number of active uniform variables supported by the
14800 implementation has been exceeded.
14801
14802 * The `main' function is missing for the vertex shader or the
14803 fragment shader.
14804
14805 * A varying variable actually used in the fragment shader is not
14806 declared in the same way (or is not declared at all) in the vertex
14807 shader.
14808
14809 * A reference to a function or variable name is unresolved.
14810
14811 * A shared global is declared with two different types or two
14812 different initial values.
14813
14814 * One or more of the attached shader objects has not been
14815 successfully compiled.
14816
14817 * Binding a generic attribute matrix caused some rows of the matrix
14818 to fall outside the allowed maximum of `GL_MAX_VERTEX_ATTRIBS'.
14819
14820 * Not enough contiguous vertex attribute slots could be found to bind
14821 attribute matrices.
14822
14823 When a program object has been successfully linked, the program object
14824 can be made part of current state by calling `glUseProgram'. Whether or
14825 not the link operation was successful, the program object's information
14826 log will be overwritten. The information log can be retrieved by
14827 calling `glGetProgramInfoLog'.
14828
14829 `glLinkProgram' will also install the generated executables as part of
14830 the current rendering state if the link operation was successful and the
14831 specified program object is already currently in use as a result of a
14832 previous call to `glUseProgram'. If the program object currently in use
14833 is relinked unsuccessfully, its link status will be set to `GL_FALSE' ,
14834 but the executables and associated state will remain part of the current
14835 state until a subsequent call to `glUseProgram' removes it from use.
14836 After it is removed from use, it cannot be made part of current state
14837 until it has been successfully relinked.
14838
14839 If PROGRAM contains shader objects of type `GL_VERTEX_SHADER' but does
14840 not contain shader objects of type `GL_FRAGMENT_SHADER', the vertex
14841 shader will be linked against the implicit interface for fixed
14842 functionality fragment processing. Similarly, if PROGRAM contains
14843 shader objects of type `GL_FRAGMENT_SHADER' but it does not contain
14844 shader objects of type `GL_VERTEX_SHADER', the fragment shader will be
14845 linked against the implicit interface for fixed functionality vertex
14846 processing.
14847
14848 The program object's information log is updated and the program is
14849 generated at the time of the link operation. After the link operation,
14850 applications are free to modify attached shader objects, compile
14851 attached shader objects, detach shader objects, delete shader objects,
14852 and attach additional shader objects. None of these operations affects
14853 the information log or the program that is part of the program object.
14854
14855 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
14856 OpenGL.
14857
14858 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
14859
14860 `GL_INVALID_OPERATION' is generated if `glLinkProgram' is executed
14861 between the execution of `glBegin' and the corresponding execution of
14862 `glEnd'.")
14863
14864 (define-gl-procedures
14865 ((glListBase (base GLuint) -> void))
14866 "Set the display-list base for .
14867
14868 BASE
14869 Specifies an integer offset that will be added to `glCallLists'
14870 offsets to generate display-list names. The initial value is 0.
14871
14872 `glCallLists' specifies an array of offsets. Display-list names are
14873 generated by adding BASE to each offset. Names that reference valid
14874 display lists are executed; the others are ignored.
14875
14876 `GL_INVALID_OPERATION' is generated if `glListBase' is executed between
14877 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14878
14879 (define-gl-procedures
14880 ((glLoadIdentity -> void))
14881 "Replace the current matrix with the identity matrix.
14882
14883 `glLoadIdentity' replaces the current matrix with the identity matrix.
14884 It is semantically equivalent to calling `glLoadMatrix' with the
14885 identity matrix
14886
14887
14888
14889 ((1 0 0 0), (0 1 0 0), (0 0 1 0), (0 0 0 1),,)
14890
14891
14892
14893 but in some cases it is more efficient.
14894
14895 `GL_INVALID_OPERATION' is generated if `glLoadIdentity' is executed
14896 between the execution of `glBegin' and the corresponding execution of
14897 `glEnd'.")
14898
14899 (define-gl-procedures
14900 ((glLoadMatrixd (m const-GLdouble-*) -> void)
14901 (glLoadMatrixf (m const-GLfloat-*) -> void))
14902 "Replace the current matrix with the specified matrix.
14903
14904 M
14905 Specifies a pointer to 16 consecutive values, which are used as the
14906 elements of a 4×4 column-major matrix.
14907
14908 `glLoadMatrix' replaces the current matrix with the one whose elements
14909 are specified by M. The current matrix is the projection matrix,
14910 modelview matrix, or texture matrix, depending on the current matrix
14911 mode (see `glMatrixMode').
14912
14913 The current matrix, M, defines a transformation of coordinates. For
14914 instance, assume M refers to the modelview matrix. If
14915 V=(V\u2061[0,],V\u2061[1,]V\u2061[2,]V\u2061[3,]) is the set of object coordinates of a
14916 vertex, and M points to an array of 16 single- or double-precision
14917 floating-point values M={M\u2061[0,],M\u2061[1,]...M\u2061[15,]} , then the modelview
14918 transformation M\u2061(V,) does the following:
14919
14920 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,]),
14921 (M\u2061[2,] M\u2061[6,] M\u2061[10,] M\u2061[14,]), (M\u2061[3,] M\u2061[7,] M\u2061[11,]
14922 M\u2061[15,]),)×((V\u2061[0,]), (V\u2061[1,]), (V\u2061[2,]), (V\u2061[3,]),)
14923
14924
14925
14926 Projection and texture transformations are similarly defined.
14927
14928 `GL_INVALID_OPERATION' is generated if `glLoadMatrix' is executed
14929 between the execution of `glBegin' and the corresponding execution of
14930 `glEnd'.")
14931
14932 (define-gl-procedures
14933 ((glLoadName (name GLuint) -> void))
14934 "Load a name onto the name stack.
14935
14936 NAME
14937 Specifies a name that will replace the top value on the name stack.
14938
14939 The name stack is used during selection mode to allow sets of rendering
14940 commands to be uniquely identified. It consists of an ordered set of
14941 unsigned integers and is initially empty.
14942
14943 `glLoadName' causes NAME to replace the value on the top of the name
14944 stack.
14945
14946 The name stack is always empty while the render mode is not `GL_SELECT'.
14947 Calls to `glLoadName' while the render mode is not `GL_SELECT' are
14948 ignored.
14949
14950 `GL_INVALID_OPERATION' is generated if `glLoadName' is called while the
14951 name stack is empty.
14952
14953 `GL_INVALID_OPERATION' is generated if `glLoadName' is executed between
14954 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14955
14956 (define-gl-procedures
14957 ((glLoadTransposeMatrixd
14958 (m const-GLdouble-*)
14959 ->
14960 void)
14961 (glLoadTransposeMatrixf
14962 (m const-GLfloat-*)
14963 ->
14964 void))
14965 "Replace the current matrix with the specified row-major ordered matrix.
14966
14967 M
14968 Specifies a pointer to 16 consecutive values, which are used as the
14969 elements of a 4×4 row-major matrix.
14970
14971 `glLoadTransposeMatrix' replaces the current matrix with the one whose
14972 elements are specified by M. The current matrix is the projection
14973 matrix, modelview matrix, or texture matrix, depending on the current
14974 matrix mode (see `glMatrixMode').
14975
14976 The current matrix, M, defines a transformation of coordinates. For
14977 instance, assume M refers to the modelview matrix. If
14978 V=(V\u2061[0,],V\u2061[1,]V\u2061[2,]V\u2061[3,]) is the set of object coordinates of a
14979 vertex, and M points to an array of 16 single- or double-precision
14980 floating-point values M={M\u2061[0,],M\u2061[1,]...M\u2061[15,]} , then the modelview
14981 transformation M\u2061(V,) does the following:
14982
14983 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,]),
14984 (M\u2061[8,] M\u2061[9,] M\u2061[10,] M\u2061[11,]), (M\u2061[12,] M\u2061[13,] M\u2061[14,]
14985 M\u2061[15,]),)×((V\u2061[0,]), (V\u2061[1,]), (V\u2061[2,]), (V\u2061[3,]),)
14986
14987
14988
14989 Projection and texture transformations are similarly defined.
14990
14991 Calling `glLoadTransposeMatrix' with matrix M is identical in operation
14992 to `glLoadMatrix' with M^T , where T represents the transpose.
14993
14994 `GL_INVALID_OPERATION' is generated if `glLoadTransposeMatrix' is
14995 executed between the execution of `glBegin' and the corresponding
14996 execution of `glEnd'.")
14997
14998 (define-gl-procedures
14999 ((glLogicOp (opcode GLenum) -> void))
15000 "Specify a logical pixel operation for color index rendering.
15001
15002 OPCODE
15003 Specifies a symbolic constant that selects a logical operation. The
15004 following symbols are accepted: `GL_CLEAR', `GL_SET', `GL_COPY',
15005 `GL_COPY_INVERTED', `GL_NOOP', `GL_INVERT', `GL_AND', `GL_NAND',
15006 `GL_OR', `GL_NOR', `GL_XOR', `GL_EQUIV', `GL_AND_REVERSE',
15007 `GL_AND_INVERTED', `GL_OR_REVERSE', and `GL_OR_INVERTED'. The
15008 initial value is `GL_COPY'.
15009
15010 `glLogicOp' specifies a logical operation that, when enabled, is applied
15011 between the incoming color index or RGBA color and the color index or
15012 RGBA color at the corresponding location in the frame buffer. To enable
15013 or disable the logical operation, call `glEnable' and `glDisable' using
15014 the symbolic constant `GL_COLOR_LOGIC_OP' for RGBA mode or
15015 `GL_INDEX_LOGIC_OP' for color index mode. The initial value is disabled
15016 for both operations.
15017
15018
15019
15020 *Opcode*
15021 *Resulting Operation*
15022
15023 `GL_CLEAR'
15024 0
15025
15026 `GL_SET'
15027 1
15028
15029 `GL_COPY'
15030 s
15031
15032 `GL_COPY_INVERTED'
15033 ~s
15034
15035 `GL_NOOP'
15036 d
15037
15038 `GL_INVERT'
15039 ~d
15040
15041 `GL_AND'
15042 s & d
15043
15044 `GL_NAND'
15045 ~(s & d)
15046
15047 `GL_OR'
15048 s | d
15049
15050 `GL_NOR'
15051 ~(s | d)
15052
15053 `GL_XOR'
15054 s ^ d
15055
15056 `GL_EQUIV'
15057 ~(s ^ d)
15058
15059 `GL_AND_REVERSE'
15060 s & ~d
15061
15062 `GL_AND_INVERTED'
15063 ~s & d
15064
15065 `GL_OR_REVERSE'
15066 s | ~d
15067
15068 `GL_OR_INVERTED'
15069 ~s | d
15070
15071 OPCODE is a symbolic constant chosen from the list above. In the
15072 explanation of the logical operations, S represents the incoming color
15073 index and D represents the index in the frame buffer. Standard
15074 C-language operators are used. As these bitwise operators suggest, the
15075 logical operation is applied independently to each bit pair of the
15076 source and destination indices or colors.
15077
15078 `GL_INVALID_ENUM' is generated if OPCODE is not an accepted value.
15079
15080 `GL_INVALID_OPERATION' is generated if `glLogicOp' is executed between
15081 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15082
15083 (define-gl-procedures
15084 ((glMap1f
15085 (target GLenum)
15086 (u1 GLfloat)
15087 (u2 GLfloat)
15088 (stride GLint)
15089 (order GLint)
15090 (points const-GLfloat-*)
15091 ->
15092 void)
15093 (glMap1d
15094 (target GLenum)
15095 (u1 GLdouble)
15096 (u2 GLdouble)
15097 (stride GLint)
15098 (order GLint)
15099 (points const-GLdouble-*)
15100 ->
15101 void))
15102 "Define a one-dimensional evaluator.
15103
15104 TARGET
15105 Specifies the kind of values that are generated by the evaluator.
15106 Symbolic constants `GL_MAP1_VERTEX_3', `GL_MAP1_VERTEX_4',
15107 `GL_MAP1_INDEX', `GL_MAP1_COLOR_4', `GL_MAP1_NORMAL',
15108 `GL_MAP1_TEXTURE_COORD_1', `GL_MAP1_TEXTURE_COORD_2',
15109 `GL_MAP1_TEXTURE_COORD_3', and `GL_MAP1_TEXTURE_COORD_4' are
15110 accepted.
15111
15112 U1
15113 U2
15114
15115 Specify a linear mapping of U , as presented to `glEvalCoord1', to
15116 U^ , the variable that is evaluated by the equations specified by
15117 this command.
15118
15119 STRIDE
15120 Specifies the number of floats or doubles between the beginning of
15121 one control point and the beginning of the next one in the data
15122 structure referenced in POINTS. This allows control points to be
15123 embedded in arbitrary data structures. The only constraint is that
15124 the values for a particular control point must occupy contiguous
15125 memory locations.
15126
15127 ORDER
15128 Specifies the number of control points. Must be positive.
15129
15130 POINTS
15131 Specifies a pointer to the array of control points.
15132
15133 Evaluators provide a way to use polynomial or rational polynomial
15134 mapping to produce vertices, normals, texture coordinates, and colors.
15135 The values produced by an evaluator are sent to further stages of GL
15136 processing just as if they had been presented using `glVertex',
15137 `glNormal', `glTexCoord', and `glColor' commands, except that the
15138 generated values do not update the current normal, texture coordinates,
15139 or color.
15140
15141 All polynomial or rational polynomial splines of any degree (up to the
15142 maximum degree supported by the GL implementation) can be described
15143 using evaluators. These include almost all splines used in computer
15144 graphics: B-splines, Bezier curves, Hermite splines, and so on.
15145
15146 Evaluators define curves based on Bernstein polynomials. Define P\u2061(U^,)
15147 as
15148
15149 P\u2061(U^,)=ΣI=0NB_I,^N\u2061(U^,)\u2062R_I
15150
15151
15152
15153 where R_I is a control point and B_I,^N\u2061(U^,) is the I th Bernstein
15154 polynomial of degree N (ORDER = N+1 ):
15155
15156 B_I,^N\u2061(U^,)=((N), (I),,)\u2062U^,^I\u2062(1-U^,)^N-I,,
15157
15158 Recall that
15159
15160 0^0==1 and ((N), (0),,)==1
15161
15162 `glMap1' is used to define the basis and to specify what kind of values
15163 are produced. Once defined, a map can be enabled and disabled by
15164 calling `glEnable' and `glDisable' with the map name, one of the nine
15165 predefined values for TARGET described below. `glEvalCoord1' evaluates
15166 the one-dimensional maps that are enabled. When `glEvalCoord1' presents
15167 a value U , the Bernstein functions are evaluated using U^ , where
15168 U^=U-U1,/U2-U1,
15169
15170 TARGET is a symbolic constant that indicates what kind of control points
15171 are provided in POINTS, and what output is generated when the map is
15172 evaluated. It can assume one of nine predefined values:
15173
15174 `GL_MAP1_VERTEX_3'
15175 Each control point is three floating-point values representing X ,
15176 Y , and Z . Internal `glVertex3' commands are generated when the
15177 map is evaluated.
15178
15179 `GL_MAP1_VERTEX_4'
15180 Each control point is four floating-point values representing X , Y
15181 , Z , and W . Internal `glVertex4' commands are generated when the
15182 map is evaluated.
15183
15184 `GL_MAP1_INDEX'
15185 Each control point is a single floating-point value representing a
15186 color index. Internal `glIndex' commands are generated when the
15187 map is evaluated but the current index is not updated with the
15188 value of these `glIndex' commands.
15189
15190 `GL_MAP1_COLOR_4'
15191 Each control point is four floating-point values representing red,
15192 green, blue, and alpha. Internal `glColor4' commands are generated
15193 when the map is evaluated but the current color is not updated with
15194 the value of these `glColor4' commands.
15195
15196 `GL_MAP1_NORMAL'
15197 Each control point is three floating-point values representing the
15198 X , Y , and Z components of a normal vector. Internal `glNormal'
15199 commands are generated when the map is evaluated but the current
15200 normal is not updated with the value of these `glNormal' commands.
15201
15202 `GL_MAP1_TEXTURE_COORD_1'
15203 Each control point is a single floating-point value representing
15204 the S texture coordinate. Internal `glTexCoord1' commands are
15205 generated when the map is evaluated but the current texture
15206 coordinates are not updated with the value of these `glTexCoord'
15207 commands.
15208
15209 `GL_MAP1_TEXTURE_COORD_2'
15210 Each control point is two floating-point values representing the S
15211 and T texture coordinates. Internal `glTexCoord2' commands are
15212 generated when the map is evaluated but the current texture
15213 coordinates are not updated with the value of these `glTexCoord'
15214 commands.
15215
15216 `GL_MAP1_TEXTURE_COORD_3'
15217 Each control point is three floating-point values representing the
15218 S , T , and R texture coordinates. Internal `glTexCoord3' commands
15219 are generated when the map is evaluated but the current texture
15220 coordinates are not updated with the value of these `glTexCoord'
15221 commands.
15222
15223 `GL_MAP1_TEXTURE_COORD_4'
15224 Each control point is four floating-point values representing the S
15225 , T , R , and Q texture coordinates. Internal `glTexCoord4'
15226 commands are generated when the map is evaluated but the current
15227 texture coordinates are not updated with the value of these
15228 `glTexCoord' commands.
15229
15230 STRIDE, ORDER, and POINTS define the array addressing for accessing the
15231 control points. POINTS is the location of the first control point,
15232 which occupies one, two, three, or four contiguous memory locations,
15233 depending on which map is being defined. ORDER is the number of control
15234 points in the array. STRIDE specifies how many float or double
15235 locations to advance the internal memory pointer to reach the next
15236 control point.
15237
15238 `GL_INVALID_ENUM' is generated if TARGET is not an accepted value.
15239
15240 `GL_INVALID_VALUE' is generated if U1 is equal to U2.
15241
15242 `GL_INVALID_VALUE' is generated if STRIDE is less than the number of
15243 values in a control point.
15244
15245 `GL_INVALID_VALUE' is generated if ORDER is less than 1 or greater than
15246 the return value of `GL_MAX_EVAL_ORDER'.
15247
15248 `GL_INVALID_OPERATION' is generated if `glMap1' is executed between the
15249 execution of `glBegin' and the corresponding execution of `glEnd'.
15250
15251 `GL_INVALID_OPERATION' is generated if `glMap1' is called and the value
15252 of `GL_ACTIVE_TEXTURE' is not `GL_TEXTURE0'.")
15253
15254 (define-gl-procedures
15255 ((glMap2f
15256 (target GLenum)
15257 (u1 GLfloat)
15258 (u2 GLfloat)
15259 (ustride GLint)
15260 (uorder GLint)
15261 (v1 GLfloat)
15262 (v2 GLfloat)
15263 (vstride GLint)
15264 (vorder GLint)
15265 (points const-GLfloat-*)
15266 ->
15267 void)
15268 (glMap2d
15269 (target GLenum)
15270 (u1 GLdouble)
15271 (u2 GLdouble)
15272 (ustride GLint)
15273 (uorder GLint)
15274 (v1 GLdouble)
15275 (v2 GLdouble)
15276 (vstride GLint)
15277 (vorder GLint)
15278 (points const-GLdouble-*)
15279 ->
15280 void))
15281 "Define a two-dimensional evaluator.
15282
15283 TARGET
15284 Specifies the kind of values that are generated by the evaluator.
15285 Symbolic constants `GL_MAP2_VERTEX_3', `GL_MAP2_VERTEX_4',
15286 `GL_MAP2_INDEX', `GL_MAP2_COLOR_4', `GL_MAP2_NORMAL',
15287 `GL_MAP2_TEXTURE_COORD_1', `GL_MAP2_TEXTURE_COORD_2',
15288 `GL_MAP2_TEXTURE_COORD_3', and `GL_MAP2_TEXTURE_COORD_4' are
15289 accepted.
15290
15291 U1
15292 U2
15293
15294 Specify a linear mapping of U , as presented to `glEvalCoord2', to
15295 U^ , one of the two variables that are evaluated by the equations
15296 specified by this command. Initially, U1 is 0 and U2 is 1.
15297
15298 USTRIDE
15299 Specifies the number of floats or doubles between the beginning of
15300 control point R_IJ and the beginning of control point R_(I+1,)\u2062J, ,
15301 where I and J are the U and V control point indices, respectively.
15302 This allows control points to be embedded in arbitrary data
15303 structures. The only constraint is that the values for a
15304 particular control point must occupy contiguous memory locations.
15305 The initial value of USTRIDE is 0.
15306
15307 UORDER
15308 Specifies the dimension of the control point array in the U axis.
15309 Must be positive. The initial value is 1.
15310
15311 V1
15312 V2
15313
15314 Specify a linear mapping of V , as presented to `glEvalCoord2', to
15315 V^ , one of the two variables that are evaluated by the equations
15316 specified by this command. Initially, V1 is 0 and V2 is 1.
15317
15318 VSTRIDE
15319 Specifies the number of floats or doubles between the beginning of
15320 control point R_IJ and the beginning of control point R_I\u2061(J+1,), ,
15321 where I and J are the U and V control point indices, respectively.
15322 This allows control points to be embedded in arbitrary data
15323 structures. The only constraint is that the values for a
15324 particular control point must occupy contiguous memory locations.
15325 The initial value of VSTRIDE is 0.
15326
15327 VORDER
15328 Specifies the dimension of the control point array in the V axis.
15329 Must be positive. The initial value is 1.
15330
15331 POINTS
15332 Specifies a pointer to the array of control points.
15333
15334 Evaluators provide a way to use polynomial or rational polynomial
15335 mapping to produce vertices, normals, texture coordinates, and colors.
15336 The values produced by an evaluator are sent on to further stages of GL
15337 processing just as if they had been presented using `glVertex',
15338 `glNormal', `glTexCoord', and `glColor' commands, except that the
15339 generated values do not update the current normal, texture coordinates,
15340 or color.
15341
15342 All polynomial or rational polynomial splines of any degree (up to the
15343 maximum degree supported by the GL implementation) can be described
15344 using evaluators. These include almost all surfaces used in computer
15345 graphics, including B-spline surfaces, NURBS surfaces, Bezier surfaces,
15346 and so on.
15347
15348 Evaluators define surfaces based on bivariate Bernstein polynomials.
15349 Define P\u2061(U^,V^) as
15350
15351 P\u2061(U^,V^)=ΣI=0NΣJ=0MB_I,^N\u2061(U^,)\u2062B_J,^M\u2061(V^,)\u2062R_IJ
15352
15353
15354
15355 where R_IJ is a control point, B_I,^N\u2061(U^,) is the I th Bernstein
15356 polynomial of degree N (UORDER = N+1 )
15357
15358 B_I,^N\u2061(U^,)=((N), (I),,)\u2062U^,^I\u2062(1-U^,)^N-I,,
15359
15360 and B_J,^M\u2061(V^,) is the J th Bernstein polynomial of degree M (VORDER =
15361 M+1 )
15362
15363 B_J,^M\u2061(V^,)=((M), (J),,)\u2062V^,^J\u2062(1-V^,)^M-J,,
15364
15365 Recall that 0^0==1 and ((N), (0),,)==1
15366
15367 `glMap2' is used to define the basis and to specify what kind of values
15368 are produced. Once defined, a map can be enabled and disabled by
15369 calling `glEnable' and `glDisable' with the map name, one of the nine
15370 predefined values for TARGET, described below. When `glEvalCoord2'
15371 presents values U and V , the bivariate Bernstein polynomials are
15372 evaluated using U^ and V^ , where
15373
15374 U^=U-U1,/U2-U1,
15375
15376 V^=V-V1,/V2-V1,
15377
15378 TARGET is a symbolic constant that indicates what kind of control points
15379 are provided in POINTS, and what output is generated when the map is
15380 evaluated. It can assume one of nine predefined values:
15381
15382 `GL_MAP2_VERTEX_3'
15383 Each control point is three floating-point values representing X ,
15384 Y , and Z . Internal `glVertex3' commands are generated when the
15385 map is evaluated.
15386
15387 `GL_MAP2_VERTEX_4'
15388 Each control point is four floating-point values representing X , Y
15389 , Z , and W . Internal `glVertex4' commands are generated when the
15390 map is evaluated.
15391
15392 `GL_MAP2_INDEX'
15393 Each control point is a single floating-point value representing a
15394 color index. Internal `glIndex' commands are generated when the
15395 map is evaluated but the current index is not updated with the
15396 value of these `glIndex' commands.
15397
15398 `GL_MAP2_COLOR_4'
15399 Each control point is four floating-point values representing red,
15400 green, blue, and alpha. Internal `glColor4' commands are generated
15401 when the map is evaluated but the current color is not updated with
15402 the value of these `glColor4' commands.
15403
15404 `GL_MAP2_NORMAL'
15405 Each control point is three floating-point values representing the
15406 X , Y , and Z components of a normal vector. Internal `glNormal'
15407 commands are generated when the map is evaluated but the current
15408 normal is not updated with the value of these `glNormal' commands.
15409
15410 `GL_MAP2_TEXTURE_COORD_1'
15411 Each control point is a single floating-point value representing
15412 the S texture coordinate. Internal `glTexCoord1' commands are
15413 generated when the map is evaluated but the current texture
15414 coordinates are not updated with the value of these `glTexCoord'
15415 commands.
15416
15417 `GL_MAP2_TEXTURE_COORD_2'
15418 Each control point is two floating-point values representing the S
15419 and T texture coordinates. Internal `glTexCoord2' commands are
15420 generated when the map is evaluated but the current texture
15421 coordinates are not updated with the value of these `glTexCoord'
15422 commands.
15423
15424 `GL_MAP2_TEXTURE_COORD_3'
15425 Each control point is three floating-point values representing the
15426 S , T , and R texture coordinates. Internal `glTexCoord3' commands
15427 are generated when the map is evaluated but the current texture
15428 coordinates are not updated with the value of these `glTexCoord'
15429 commands.
15430
15431 `GL_MAP2_TEXTURE_COORD_4'
15432 Each control point is four floating-point values representing the S
15433 , T , R , and Q texture coordinates. Internal `glTexCoord4'
15434 commands are generated when the map is evaluated but the current
15435 texture coordinates are not updated with the value of these
15436 `glTexCoord' commands.
15437
15438 USTRIDE, UORDER, VSTRIDE, VORDER, and POINTS define the array addressing
15439 for accessing the control points. POINTS is the location of the first
15440 control point, which occupies one, two, three, or four contiguous memory
15441 locations, depending on which map is being defined. There are
15442 UORDER×VORDER control points in the array. USTRIDE specifies how many
15443 float or double locations are skipped to advance the internal memory
15444 pointer from control point R_I\u2062J, to control point R_(I+1,)\u2062J, . VSTRIDE
15445 specifies how many float or double locations are skipped to advance the
15446 internal memory pointer from control point R_I\u2062J, to control point
15447 R_I\u2061(J+1,), .
15448
15449 `GL_INVALID_ENUM' is generated if TARGET is not an accepted value.
15450
15451 `GL_INVALID_VALUE' is generated if U1 is equal to U2, or if V1 is equal
15452 to V2.
15453
15454 `GL_INVALID_VALUE' is generated if either USTRIDE or VSTRIDE is less
15455 than the number of values in a control point.
15456
15457 `GL_INVALID_VALUE' is generated if either UORDER or VORDER is less than
15458 1 or greater than the return value of `GL_MAX_EVAL_ORDER'.
15459
15460 `GL_INVALID_OPERATION' is generated if `glMap2' is executed between the
15461 execution of `glBegin' and the corresponding execution of `glEnd'.
15462
15463 `GL_INVALID_OPERATION' is generated if `glMap2' is called and the value
15464 of `GL_ACTIVE_TEXTURE' is not `GL_TEXTURE0'.")
15465
15466 (define-gl-procedures
15467 ((glMapBuffer
15468 (target GLenum)
15469 (access GLenum)
15470 ->
15471 void-*)
15472 (glUnmapBuffer (target GLenum) -> GLboolean))
15473 "Map a buffer object's data store.
15474
15475 TARGET
15476 Specifies the target buffer object being mapped. The symbolic
15477 constant must be `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
15478 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
15479
15480 ACCESS
15481 Specifies the access policy, indicating whether it will be possible
15482 to read from, write to, or both read from and write to the buffer
15483 object's mapped data store. The symbolic constant must be
15484 `GL_READ_ONLY', `GL_WRITE_ONLY', or `GL_READ_WRITE'.
15485
15486 `glMapBuffer' maps to the client's address space the entire data store
15487 of the buffer object currently bound to TARGET. The data can then be
15488 directly read and/or written relative to the returned pointer, depending
15489 on the specified ACCESS policy. If the GL is unable to map the buffer
15490 object's data store, `glMapBuffer' generates an error and returns
15491 `NULL'. This may occur for system-specific reasons, such as low virtual
15492 memory availability.
15493
15494 If a mapped data store is accessed in a way inconsistent with the
15495 specified ACCESS policy, no error is generated, but performance may be
15496 negatively impacted and system errors, including program termination,
15497 may result. Unlike the USAGE parameter of `glBufferData', ACCESS is not
15498 a hint, and does in fact constrain the usage of the mapped data store on
15499 some GL implementations. In order to achieve the highest performance
15500 available, a buffer object's data store should be used in ways
15501 consistent with both its specified USAGE and ACCESS parameters.
15502
15503 A mapped data store must be unmapped with `glUnmapBuffer' before its
15504 buffer object is used. Otherwise an error will be generated by any GL
15505 command that attempts to dereference the buffer object's data store.
15506 When a data store is unmapped, the pointer to its data store becomes
15507 invalid. `glUnmapBuffer' returns `GL_TRUE' unless the data store
15508 contents have become corrupt during the time the data store was mapped.
15509 This can occur for system-specific reasons that affect the availability
15510 of graphics memory, such as screen mode changes. In such situations,
15511 `GL_FALSE' is returned and the data store contents are undefined. An
15512 application must detect this rare condition and reinitialize the data
15513 store.
15514
15515 A buffer object's mapped data store is automatically unmapped when the
15516 buffer object is deleted or its data store is recreated with
15517 `glBufferData'.
15518
15519 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
15520 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
15521 `GL_PIXEL_UNPACK_BUFFER'.
15522
15523 `GL_INVALID_ENUM' is generated if ACCESS is not `GL_READ_ONLY',
15524 `GL_WRITE_ONLY', or `GL_READ_WRITE'.
15525
15526 `GL_OUT_OF_MEMORY' is generated when `glMapBuffer' is executed if the GL
15527 is unable to map the buffer object's data store. This may occur for a
15528 variety of system-specific reasons, such as the absence of sufficient
15529 remaining virtual memory.
15530
15531 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
15532 is bound to TARGET.
15533
15534 `GL_INVALID_OPERATION' is generated if `glMapBuffer' is executed for a
15535 buffer object whose data store is already mapped.
15536
15537 `GL_INVALID_OPERATION' is generated if `glUnmapBuffer' is executed for a
15538 buffer object whose data store is not currently mapped.
15539
15540 `GL_INVALID_OPERATION' is generated if `glMapBuffer' or `glUnmapBuffer'
15541 is executed between the execution of `glBegin' and the corresponding
15542 execution of `glEnd'.")
15543
15544 (define-gl-procedures
15545 ((glMapGrid1d
15546 (un GLint)
15547 (u1 GLdouble)
15548 (u2 GLdouble)
15549 ->
15550 void)
15551 (glMapGrid1f
15552 (un GLint)
15553 (u1 GLfloat)
15554 (u2 GLfloat)
15555 ->
15556 void)
15557 (glMapGrid2d
15558 (un GLint)
15559 (u1 GLdouble)
15560 (u2 GLdouble)
15561 (vn GLint)
15562 (v1 GLdouble)
15563 (v2 GLdouble)
15564 ->
15565 void)
15566 (glMapGrid2f
15567 (un GLint)
15568 (u1 GLfloat)
15569 (u2 GLfloat)
15570 (vn GLint)
15571 (v1 GLfloat)
15572 (v2 GLfloat)
15573 ->
15574 void))
15575 "Define a one- or two-dimensional mesh.
15576
15577 UN
15578 Specifies the number of partitions in the grid range interval [U1,
15579 U2]. Must be positive.
15580
15581 U1
15582 U2
15583
15584 Specify the mappings for integer grid domain values I=0 and I=UN .
15585
15586 VN
15587 Specifies the number of partitions in the grid range interval [V1,
15588 V2] (`glMapGrid2' only).
15589
15590 V1
15591 V2
15592
15593 Specify the mappings for integer grid domain values J=0 and J=VN
15594 (`glMapGrid2' only).
15595
15596 `glMapGrid' and `glEvalMesh' are used together to efficiently generate
15597 and evaluate a series of evenly-spaced map domain values. `glEvalMesh'
15598 steps through the integer domain of a one- or two-dimensional grid,
15599 whose range is the domain of the evaluation maps specified by `glMap1'
15600 and `glMap2'.
15601
15602 `glMapGrid1' and `glMapGrid2' specify the linear grid mappings between
15603 the I (or I and J ) integer grid coordinates, to the U (or U and V )
15604 floating-point evaluation map coordinates. See `glMap1' and `glMap2'
15605 for details of how U and V coordinates are evaluated.
15606
15607 `glMapGrid1' specifies a single linear mapping such that integer grid
15608 coordinate 0 maps exactly to U1, and integer grid coordinate UN maps
15609 exactly to U2. All other integer grid coordinates I are mapped so that
15610
15611 U=I\u2061(U2-U1,)/UN+U1
15612
15613 `glMapGrid2' specifies two such linear mappings. One maps integer grid
15614 coordinate I=0 exactly to U1, and integer grid coordinate I=UN exactly
15615 to U2. The other maps integer grid coordinate J=0 exactly to V1, and
15616 integer grid coordinate J=VN exactly to V2. Other integer grid
15617 coordinates I and J are mapped such that
15618
15619 U=I\u2061(U2-U1,)/UN+U1
15620
15621 V=J\u2061(V2-V1,)/VN+V1
15622
15623 The mappings specified by `glMapGrid' are used identically by
15624 `glEvalMesh' and `glEvalPoint'.
15625
15626 `GL_INVALID_VALUE' is generated if either UN or VN is not positive.
15627
15628 `GL_INVALID_OPERATION' is generated if `glMapGrid' is executed between
15629 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15630
15631 (define-gl-procedures
15632 ((glMaterialf
15633 (face GLenum)
15634 (pname GLenum)
15635 (param GLfloat)
15636 ->
15637 void)
15638 (glMateriali
15639 (face GLenum)
15640 (pname GLenum)
15641 (param GLint)
15642 ->
15643 void)
15644 (glMaterialfv
15645 (face GLenum)
15646 (pname GLenum)
15647 (params const-GLfloat-*)
15648 ->
15649 void)
15650 (glMaterialiv
15651 (face GLenum)
15652 (pname GLenum)
15653 (params const-GLint-*)
15654 ->
15655 void))
15656 "Specify material parameters for the lighting model.
15657
15658 FACE
15659 Specifies which face or faces are being updated. Must be one of
15660 `GL_FRONT', `GL_BACK', or `GL_FRONT_AND_BACK'.
15661
15662 PNAME
15663 Specifies the single-valued material parameter of the face or faces
15664 that is being updated. Must be `GL_SHININESS'.
15665
15666 PARAM
15667 Specifies the value that parameter `GL_SHININESS' will be set to.
15668
15669 `glMaterial' assigns values to material parameters. There are two
15670 matched sets of material parameters. One, the FRONT-FACING set, is used
15671 to shade points, lines, bitmaps, and all polygons (when two-sided
15672 lighting is disabled), or just front-facing polygons (when two-sided
15673 lighting is enabled). The other set, BACK-FACING, is used to shade
15674 back-facing polygons only when two-sided lighting is enabled. Refer to
15675 the `glLightModel' reference page for details concerning one- and
15676 two-sided lighting calculations.
15677
15678 `glMaterial' takes three arguments. The first, FACE, specifies whether
15679 the `GL_FRONT' materials, the `GL_BACK' materials, or both
15680 `GL_FRONT_AND_BACK' materials will be modified. The second, PNAME,
15681 specifies which of several parameters in one or both sets will be
15682 modified. The third, PARAMS, specifies what value or values will be
15683 assigned to the specified parameter.
15684
15685 Material parameters are used in the lighting equation that is optionally
15686 applied to each vertex. The equation is discussed in the `glLightModel'
15687 reference page. The parameters that can be specified using
15688 `glMaterial', and their interpretations by the lighting equation, are as
15689 follows:
15690
15691 `GL_AMBIENT'
15692 PARAMS contains four integer or floating-point values that specify
15693 the ambient RGBA reflectance of the material. Integer values are
15694 mapped linearly such that the most positive representable value
15695 maps to 1.0, and the most negative representable value maps to -1.0
15696 . Floating-point values are mapped directly. Neither integer nor
15697 floating-point values are clamped. The initial ambient reflectance
15698 for both front- and back-facing materials is (0.2, 0.2, 0.2, 1.0).
15699
15700 `GL_DIFFUSE'
15701 PARAMS contains four integer or floating-point values that specify
15702 the diffuse RGBA reflectance of the material. Integer values are
15703 mapped linearly such that the most positive representable value
15704 maps to 1.0, and the most negative representable value maps to -1.0
15705 . Floating-point values are mapped directly. Neither integer nor
15706 floating-point values are clamped. The initial diffuse reflectance
15707 for both front- and back-facing materials is (0.8, 0.8, 0.8, 1.0).
15708
15709 `GL_SPECULAR'
15710 PARAMS contains four integer or floating-point values that specify
15711 the specular RGBA reflectance of the material. Integer values are
15712 mapped linearly such that the most positive representable value
15713 maps to 1.0, and the most negative representable value maps to -1.0
15714 . Floating-point values are mapped directly. Neither integer nor
15715 floating-point values are clamped. The initial specular
15716 reflectance for both front- and back-facing materials is (0, 0, 0,
15717 1).
15718
15719 `GL_EMISSION'
15720 PARAMS contains four integer or floating-point values that specify
15721 the RGBA emitted light intensity of the material. Integer values
15722 are mapped linearly such that the most positive representable value
15723 maps to 1.0, and the most negative representable value maps to -1.0
15724 . Floating-point values are mapped directly. Neither integer nor
15725 floating-point values are clamped. The initial emission intensity
15726 for both front- and back-facing materials is (0, 0, 0, 1).
15727
15728 `GL_SHININESS'
15729 PARAMS is a single integer or floating-point value that specifies
15730 the RGBA specular exponent of the material. Integer and
15731 floating-point values are mapped directly. Only values in the
15732 range [0,128] are accepted. The initial specular exponent for both
15733 front- and back-facing materials is 0.
15734
15735 `GL_AMBIENT_AND_DIFFUSE'
15736 Equivalent to calling `glMaterial' twice with the same parameter
15737 values, once with `GL_AMBIENT' and once with `GL_DIFFUSE'.
15738
15739 `GL_COLOR_INDEXES'
15740 PARAMS contains three integer or floating-point values specifying
15741 the color indices for ambient, diffuse, and specular lighting.
15742 These three values, and `GL_SHININESS', are the only material
15743 values used by the color index mode lighting equation. Refer to
15744 the `glLightModel' reference page for a discussion of color index
15745 lighting.
15746
15747 `GL_INVALID_ENUM' is generated if either FACE or PNAME is not an
15748 accepted value.
15749
15750 `GL_INVALID_VALUE' is generated if a specular exponent outside the range
15751 [0,128] is specified.")
15752
15753 (define-gl-procedures
15754 ((glMatrixMode (mode GLenum) -> void))
15755 "Specify which matrix is the current matrix.
15756
15757 MODE
15758 Specifies which matrix stack is the target for subsequent matrix
15759 operations. Three values are accepted: `GL_MODELVIEW',
15760 `GL_PROJECTION', and `GL_TEXTURE'. The initial value is
15761 `GL_MODELVIEW'. Additionally, if the `ARB_imaging' extension is
15762 supported, `GL_COLOR' is also accepted.
15763
15764 `glMatrixMode' sets the current matrix mode. MODE can assume one of
15765 four values:
15766
15767 `GL_MODELVIEW'
15768 Applies subsequent matrix operations to the modelview matrix stack.
15769
15770 `GL_PROJECTION'
15771 Applies subsequent matrix operations to the projection matrix
15772 stack.
15773
15774 `GL_TEXTURE'
15775 Applies subsequent matrix operations to the texture matrix stack.
15776
15777 `GL_COLOR'
15778 Applies subsequent matrix operations to the color matrix stack.
15779
15780 To find out which matrix stack is currently the target of all matrix
15781 operations, call `glGet' with argument `GL_MATRIX_MODE'. The initial
15782 value is `GL_MODELVIEW'.
15783
15784 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15785
15786 `GL_INVALID_OPERATION' is generated if `glMatrixMode' is executed
15787 between the execution of `glBegin' and the corresponding execution of
15788 `glEnd'.")
15789
15790 (define-gl-procedures
15791 ((glMinmax
15792 (target GLenum)
15793 (internalformat GLenum)
15794 (sink GLboolean)
15795 ->
15796 void))
15797 "Define minmax table.
15798
15799 TARGET
15800 The minmax table whose parameters are to be set. Must be
15801 `GL_MINMAX'.
15802
15803 INTERNALFORMAT
15804 The format of entries in the minmax table. Must be one of
15805 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
15806 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
15807 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
15808 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
15809 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
15810 `GL_LUMINANCE16_ALPHA16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4',
15811 `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16',
15812 `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8',
15813 `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
15814
15815 SINK
15816 If `GL_TRUE', pixels will be consumed by the minmax process and no
15817 drawing or texture loading will take place. If `GL_FALSE', pixels
15818 will proceed to the final conversion process after minmax.
15819
15820 When `GL_MINMAX' is enabled, the RGBA components of incoming pixels are
15821 compared to the minimum and maximum values for each component, which are
15822 stored in the two-element minmax table. (The first element stores the
15823 minima, and the second element stores the maxima.) If a pixel component
15824 is greater than the corresponding component in the maximum element, then
15825 the maximum element is updated with the pixel component value. If a
15826 pixel component is less than the corresponding component in the minimum
15827 element, then the minimum element is updated with the pixel component
15828 value. (In both cases, if the internal format of the minmax table
15829 includes luminance, then the R color component of incoming pixels is
15830 used for comparison.) The contents of the minmax table may be retrieved
15831 at a later time by calling `glGetMinmax'. The minmax operation is
15832 enabled or disabled by calling `glEnable' or `glDisable', respectively,
15833 with an argument of `GL_MINMAX'.
15834
15835 `glMinmax' redefines the current minmax table to have entries of the
15836 format specified by INTERNALFORMAT. The maximum element is initialized
15837 with the smallest possible component values, and the minimum element is
15838 initialized with the largest possible component values. The values in
15839 the previous minmax table, if any, are lost. If SINK is `GL_TRUE', then
15840 pixels are discarded after minmax; no further processing of the pixels
15841 takes place, and no drawing, texture loading, or pixel readback will
15842 result.
15843
15844
15845
15846 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
15847 values.
15848
15849 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
15850 allowable values.
15851
15852 `GL_INVALID_OPERATION' is generated if `glMinmax' is executed between
15853 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15854
15855 (define-gl-procedures
15856 ((glMultiDrawArrays
15857 (mode GLenum)
15858 (first GLint-*)
15859 (count GLsizei-*)
15860 (primcount GLsizei)
15861 ->
15862 void))
15863 "Render multiple sets of primitives from array data.
15864
15865 MODE
15866 Specifies what kind of primitives to render. Symbolic constants
15867 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
15868 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
15869 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
15870
15871 FIRST
15872 Points to an array of starting indices in the enabled arrays.
15873
15874 COUNT
15875 Points to an array of the number of indices to be rendered.
15876
15877 PRIMCOUNT
15878 Specifies the size of the first and count
15879
15880 `glMultiDrawArrays' specifies multiple sets of geometric primitives with
15881 very few subroutine calls. Instead of calling a GL procedure to pass
15882 each individual vertex, normal, texture coordinate, edge flag, or color,
15883 you can prespecify separate arrays of vertices, normals, and colors and
15884 use them to construct a sequence of primitives with a single call to
15885 `glMultiDrawArrays'.
15886
15887 `glMultiDrawArrays' behaves identically to `glDrawArrays' except that
15888 PRIMCOUNT separate ranges of elements are specified instead.
15889
15890 When `glMultiDrawArrays' is called, it uses COUNT sequential elements
15891 from each enabled array to construct a sequence of geometric primitives,
15892 beginning with element FIRST. MODE specifies what kind of primitives
15893 are constructed, and how the array elements construct those primitives.
15894 If `GL_VERTEX_ARRAY' is not enabled, no geometric primitives are
15895 generated.
15896
15897 Vertex attributes that are modified by `glMultiDrawArrays' have an
15898 unspecified value after `glMultiDrawArrays' returns. For example, if
15899 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
15900 after `glMultiDrawArrays' executes. Attributes that aren't modified
15901 remain well defined.
15902
15903 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15904
15905 `GL_INVALID_VALUE' is generated if PRIMCOUNT is negative.
15906
15907 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
15908 bound to an enabled array and the buffer object's data store is
15909 currently mapped.
15910
15911 `GL_INVALID_OPERATION' is generated if `glMultiDrawArrays' is executed
15912 between the execution of `glBegin' and the corresponding `glEnd'.")
15913
15914 (define-gl-procedures
15915 ((glMultiDrawElements
15916 (mode GLenum)
15917 (count const-GLsizei-*)
15918 (type GLenum)
15919 (indices const-GLvoid-**)
15920 (primcount GLsizei)
15921 ->
15922 void))
15923 "Render multiple sets of primitives by specifying indices of array data
15924 elements.
15925
15926 MODE
15927 Specifies what kind of primitives to render. Symbolic constants
15928 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
15929 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
15930 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
15931
15932 COUNT
15933 Points to an array of the elements counts.
15934
15935 TYPE
15936 Specifies the type of the values in INDICES. Must be one of
15937 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
15938
15939 INDICES
15940 Specifies a pointer to the location where the indices are stored.
15941
15942 PRIMCOUNT
15943 Specifies the size of the COUNT array.
15944
15945 `glMultiDrawElements' specifies multiple sets of geometric primitives
15946 with very few subroutine calls. Instead of calling a GL function to
15947 pass each individual vertex, normal, texture coordinate, edge flag, or
15948 color, you can prespecify separate arrays of vertices, normals, and so
15949 on, and use them to construct a sequence of primitives with a single
15950 call to `glMultiDrawElements'.
15951
15952 `glMultiDrawElements' is identical in operation to `glDrawElements'
15953 except that PRIMCOUNT separate lists of elements are specified.
15954
15955 Vertex attributes that are modified by `glMultiDrawElements' have an
15956 unspecified value after `glMultiDrawElements' returns. For example, if
15957 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
15958 after `glMultiDrawElements' executes. Attributes that aren't modified
15959 maintain their previous values.
15960
15961 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15962
15963 `GL_INVALID_VALUE' is generated if PRIMCOUNT is negative.
15964
15965 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
15966 bound to an enabled array or the element array and the buffer object's
15967 data store is currently mapped.
15968
15969 `GL_INVALID_OPERATION' is generated if `glMultiDrawElements' is executed
15970 between the execution of `glBegin' and the corresponding `glEnd'.")
15971
15972 (define-gl-procedures
15973 ((glMultiTexCoord1s
15974 (target GLenum)
15975 (s GLshort)
15976 ->
15977 void)
15978 (glMultiTexCoord1i
15979 (target GLenum)
15980 (s GLint)
15981 ->
15982 void)
15983 (glMultiTexCoord1f
15984 (target GLenum)
15985 (s GLfloat)
15986 ->
15987 void)
15988 (glMultiTexCoord1d
15989 (target GLenum)
15990 (s GLdouble)
15991 ->
15992 void)
15993 (glMultiTexCoord2s
15994 (target GLenum)
15995 (s GLshort)
15996 (t GLshort)
15997 ->
15998 void)
15999 (glMultiTexCoord2i
16000 (target GLenum)
16001 (s GLint)
16002 (t GLint)
16003 ->
16004 void)
16005 (glMultiTexCoord2f
16006 (target GLenum)
16007 (s GLfloat)
16008 (t GLfloat)
16009 ->
16010 void)
16011 (glMultiTexCoord2d
16012 (target GLenum)
16013 (s GLdouble)
16014 (t GLdouble)
16015 ->
16016 void)
16017 (glMultiTexCoord3s
16018 (target GLenum)
16019 (s GLshort)
16020 (t GLshort)
16021 (r GLshort)
16022 ->
16023 void)
16024 (glMultiTexCoord3i
16025 (target GLenum)
16026 (s GLint)
16027 (t GLint)
16028 (r GLint)
16029 ->
16030 void)
16031 (glMultiTexCoord3f
16032 (target GLenum)
16033 (s GLfloat)
16034 (t GLfloat)
16035 (r GLfloat)
16036 ->
16037 void)
16038 (glMultiTexCoord3d
16039 (target GLenum)
16040 (s GLdouble)
16041 (t GLdouble)
16042 (r GLdouble)
16043 ->
16044 void)
16045 (glMultiTexCoord4s
16046 (target GLenum)
16047 (s GLshort)
16048 (t GLshort)
16049 (r GLshort)
16050 (q GLshort)
16051 ->
16052 void)
16053 (glMultiTexCoord4i
16054 (target GLenum)
16055 (s GLint)
16056 (t GLint)
16057 (r GLint)
16058 (q GLint)
16059 ->
16060 void)
16061 (glMultiTexCoord4f
16062 (target GLenum)
16063 (s GLfloat)
16064 (t GLfloat)
16065 (r GLfloat)
16066 (q GLfloat)
16067 ->
16068 void)
16069 (glMultiTexCoord4d
16070 (target GLenum)
16071 (s GLdouble)
16072 (t GLdouble)
16073 (r GLdouble)
16074 (q GLdouble)
16075 ->
16076 void)
16077 (glMultiTexCoord1sv
16078 (target GLenum)
16079 (v const-GLshort-*)
16080 ->
16081 void)
16082 (glMultiTexCoord1iv
16083 (target GLenum)
16084 (v const-GLint-*)
16085 ->
16086 void)
16087 (glMultiTexCoord1fv
16088 (target GLenum)
16089 (v const-GLfloat-*)
16090 ->
16091 void)
16092 (glMultiTexCoord1dv
16093 (target GLenum)
16094 (v const-GLdouble-*)
16095 ->
16096 void)
16097 (glMultiTexCoord2sv
16098 (target GLenum)
16099 (v const-GLshort-*)
16100 ->
16101 void)
16102 (glMultiTexCoord2iv
16103 (target GLenum)
16104 (v const-GLint-*)
16105 ->
16106 void)
16107 (glMultiTexCoord2fv
16108 (target GLenum)
16109 (v const-GLfloat-*)
16110 ->
16111 void)
16112 (glMultiTexCoord2dv
16113 (target GLenum)
16114 (v const-GLdouble-*)
16115 ->
16116 void)
16117 (glMultiTexCoord3sv
16118 (target GLenum)
16119 (v const-GLshort-*)
16120 ->
16121 void)
16122 (glMultiTexCoord3iv
16123 (target GLenum)
16124 (v const-GLint-*)
16125 ->
16126 void)
16127 (glMultiTexCoord3fv
16128 (target GLenum)
16129 (v const-GLfloat-*)
16130 ->
16131 void)
16132 (glMultiTexCoord3dv
16133 (target GLenum)
16134 (v const-GLdouble-*)
16135 ->
16136 void)
16137 (glMultiTexCoord4sv
16138 (target GLenum)
16139 (v const-GLshort-*)
16140 ->
16141 void)
16142 (glMultiTexCoord4iv
16143 (target GLenum)
16144 (v const-GLint-*)
16145 ->
16146 void)
16147 (glMultiTexCoord4fv
16148 (target GLenum)
16149 (v const-GLfloat-*)
16150 ->
16151 void)
16152 (glMultiTexCoord4dv
16153 (target GLenum)
16154 (v const-GLdouble-*)
16155 ->
16156 void))
16157 "Set the current texture coordinates.
16158
16159 TARGET
16160 Specifies the texture unit whose coordinates should be modified.
16161 The number of texture units is implementation dependent, but must
16162 be at least two. Symbolic constant must be one of `GL_TEXTURE' I ,
16163 where i ranges from 0 to `GL_MAX_TEXTURE_COORDS' - 1, which is an
16164 implementation-dependent value.
16165
16166 S
16167 T
16168
16169 R
16170
16171 Q
16172
16173 Specify S, T, R, and Q texture coordinates for TARGET texture unit.
16174 Not all parameters are present in all forms of the command.
16175
16176 `glMultiTexCoord' specifies texture coordinates in one, two, three, or
16177 four dimensions. `glMultiTexCoord1' sets the current texture
16178 coordinates to (S,001) ; a call to `glMultiTexCoord2' sets them to
16179 (S,T01) . Similarly, `glMultiTexCoord3' specifies the texture
16180 coordinates as (S,TR1) , and `glMultiTexCoord4' defines all four
16181 components explicitly as (S,TRQ) .
16182
16183 The current texture coordinates are part of the data that is associated
16184 with each vertex and with the current raster position. Initially, the
16185 values for (S,TRQ) are (0,001) .")
16186
16187 (define-gl-procedures
16188 ((glMultMatrixd (m const-GLdouble-*) -> void)
16189 (glMultMatrixf (m const-GLfloat-*) -> void))
16190 "Multiply the current matrix with the specified matrix.
16191
16192 M
16193 Points to 16 consecutive values that are used as the elements of a
16194 4×4 column-major matrix.
16195
16196 `glMultMatrix' multiplies the current matrix with the one specified
16197 using M, and replaces the current matrix with the product.
16198
16199 The current matrix is determined by the current matrix mode (see
16200 `glMatrixMode'). It is either the projection matrix, modelview matrix,
16201 or the texture matrix.
16202
16203 `GL_INVALID_OPERATION' is generated if `glMultMatrix' is executed
16204 between the execution of `glBegin' and the corresponding execution of
16205 `glEnd'.")
16206
16207 (define-gl-procedures
16208 ((glMultTransposeMatrixd
16209 (m const-GLdouble-*)
16210 ->
16211 void)
16212 (glMultTransposeMatrixf
16213 (m const-GLfloat-*)
16214 ->
16215 void))
16216 "Multiply the current matrix with the specified row-major ordered matrix.
16217
16218 M
16219 Points to 16 consecutive values that are used as the elements of a
16220 4×4 row-major matrix.
16221
16222 `glMultTransposeMatrix' multiplies the current matrix with the one
16223 specified using M, and replaces the current matrix with the product.
16224
16225 The current matrix is determined by the current matrix mode (see
16226 `glMatrixMode'). It is either the projection matrix, modelview matrix,
16227 or the texture matrix.
16228
16229 `GL_INVALID_OPERATION' is generated if `glMultTransposeMatrix' is
16230 executed between the execution of `glBegin' and the corresponding
16231 execution of `glEnd'.")
16232
16233 (define-gl-procedures
16234 ((glNewList (list GLuint) (mode GLenum) -> void)
16235 (glEndList -> void))
16236 "Create or replace a display list.
16237
16238 LIST
16239 Specifies the display-list name.
16240
16241 MODE
16242 Specifies the compilation mode, which can be `GL_COMPILE' or
16243 `GL_COMPILE_AND_EXECUTE'.
16244
16245 Display lists are groups of GL commands that have been stored for
16246 subsequent execution. Display lists are created with `glNewList'. All
16247 subsequent commands are placed in the display list, in the order issued,
16248 until `glEndList' is called.
16249
16250 `glNewList' has two arguments. The first argument, LIST, is a positive
16251 integer that becomes the unique name for the display list. Names can be
16252 created and reserved with `glGenLists' and tested for uniqueness with
16253 `glIsList'. The second argument, MODE, is a symbolic constant that can
16254 assume one of two values:
16255
16256 `GL_COMPILE'
16257 Commands are merely compiled.
16258
16259 `GL_COMPILE_AND_EXECUTE'
16260 Commands are executed as they are compiled into the display list.
16261
16262 Certain commands are not compiled into the display list but are executed
16263 immediately, regardless of the display-list mode. These commands are
16264 `glAreTexturesResident', `glColorPointer', `glDeleteLists',
16265 `glDeleteTextures', `glDisableClientState', `glEdgeFlagPointer',
16266 `glEnableClientState', `glFeedbackBuffer', `glFinish', `glFlush',
16267 `glGenLists', `glGenTextures', `glIndexPointer', `glInterleavedArrays',
16268 `glIsEnabled', `glIsList', `glIsTexture', `glNormalPointer',
16269 `glPopClientAttrib', `glPixelStore', `glPushClientAttrib',
16270 `glReadPixels', `glRenderMode', `glSelectBuffer', `glTexCoordPointer',
16271 `glVertexPointer', and all of the `glGet' commands.
16272
16273 Similarly, `glTexImage1D', `glTexImage2D', and `glTexImage3D' are
16274 executed immediately and not compiled into the display list when their
16275 first argument is `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_1D', or
16276 `GL_PROXY_TEXTURE_3D', respectively.
16277
16278 When the `ARB_imaging' extension is supported, `glHistogram' executes
16279 immediately when its argument is `GL_PROXY_HISTOGRAM'. Similarly,
16280 `glColorTable' executes immediately when its first argument is
16281 `GL_PROXY_COLOR_TABLE', `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
16282 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
16283
16284 For OpenGL versions 1.3 and greater, or when the `ARB_multitexture'
16285 extension is supported, `glClientActiveTexture' is not compiled into
16286 display lists, but executed immediately.
16287
16288 When `glEndList' is encountered, the display-list definition is
16289 completed by associating the list with the unique name LIST (specified
16290 in the `glNewList' command). If a display list with name LIST already
16291 exists, it is replaced only when `glEndList' is called.
16292
16293 `GL_INVALID_VALUE' is generated if LIST is 0.
16294
16295 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
16296
16297 `GL_INVALID_OPERATION' is generated if `glEndList' is called without a
16298 preceding `glNewList', or if `glNewList' is called while a display list
16299 is being defined.
16300
16301 `GL_INVALID_OPERATION' is generated if `glNewList' or `glEndList' is
16302 executed between the execution of `glBegin' and the corresponding
16303 execution of `glEnd'.
16304
16305 `GL_OUT_OF_MEMORY' is generated if there is insufficient memory to
16306 compile the display list. If the GL version is 1.1 or greater, no
16307 change is made to the previous contents of the display list, if any, and
16308 no other change is made to the GL state. (It is as if no attempt had
16309 been made to create the new display list.)")
16310
16311 (define-gl-procedures
16312 ((glNormalPointer
16313 (type GLenum)
16314 (stride GLsizei)
16315 (pointer const-GLvoid-*)
16316 ->
16317 void))
16318 "Define an array of normals.
16319
16320 TYPE
16321 Specifies the data type of each coordinate in the array. Symbolic
16322 constants `GL_BYTE', `GL_SHORT', `GL_INT', `GL_FLOAT', and
16323 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
16324
16325 STRIDE
16326 Specifies the byte offset between consecutive normals. If STRIDE
16327 is 0, the normals are understood to be tightly packed in the array.
16328 The initial value is 0.
16329
16330 POINTER
16331 Specifies a pointer to the first coordinate of the first normal in
16332 the array. The initial value is 0.
16333
16334 `glNormalPointer' specifies the location and data format of an array of
16335 normals to use when rendering. TYPE specifies the data type of each
16336 normal coordinate, and STRIDE specifies the byte stride from one normal
16337 to the next, allowing vertices and attributes to be packed into a single
16338 array or stored in separate arrays. (Single-array storage may be more
16339 efficient on some implementations; see `glInterleavedArrays'.)
16340
16341 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
16342 target (see `glBindBuffer') while a normal array is specified, POINTER
16343 is treated as a byte offset into the buffer object's data store. Also,
16344 the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as normal
16345 vertex array client-side state (`GL_NORMAL_ARRAY_BUFFER_BINDING').
16346
16347 When a normal array is specified, TYPE, STRIDE, and POINTER are saved as
16348 client-side state, in addition to the current vertex array buffer object
16349 binding.
16350
16351 To enable and disable the normal array, call `glEnableClientState' and
16352 `glDisableClientState' with the argument `GL_NORMAL_ARRAY'. If enabled,
16353 the normal array is used when `glDrawArrays', `glMultiDrawArrays',
16354 `glDrawElements', `glMultiDrawElements', `glDrawRangeElements', or
16355 `glArrayElement' is called.
16356
16357 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
16358
16359 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
16360
16361 (define-gl-procedures
16362 ((glNormal3b
16363 (nx GLbyte)
16364 (ny GLbyte)
16365 (nz GLbyte)
16366 ->
16367 void)
16368 (glNormal3d
16369 (nx GLdouble)
16370 (ny GLdouble)
16371 (nz GLdouble)
16372 ->
16373 void)
16374 (glNormal3f
16375 (nx GLfloat)
16376 (ny GLfloat)
16377 (nz GLfloat)
16378 ->
16379 void)
16380 (glNormal3i
16381 (nx GLint)
16382 (ny GLint)
16383 (nz GLint)
16384 ->
16385 void)
16386 (glNormal3s
16387 (nx GLshort)
16388 (ny GLshort)
16389 (nz GLshort)
16390 ->
16391 void)
16392 (glNormal3bv (v const-GLbyte-*) -> void)
16393 (glNormal3dv (v const-GLdouble-*) -> void)
16394 (glNormal3fv (v const-GLfloat-*) -> void)
16395 (glNormal3iv (v const-GLint-*) -> void)
16396 (glNormal3sv (v const-GLshort-*) -> void))
16397 "Set the current normal vector.
16398
16399 NX
16400 NY
16401
16402 NZ
16403
16404 Specify the X , Y , and Z coordinates of the new current normal.
16405 The initial value of the current normal is the unit vector, (0, 0,
16406 1).
16407
16408
16409
16410 The current normal is set to the given coordinates whenever `glNormal'
16411 is issued. Byte, short, or integer arguments are converted to
16412 floating-point format with a linear mapping that maps the most positive
16413 representable integer value to 1.0 and the most negative representable
16414 integer value to -1.0 .
16415
16416 Normals specified with `glNormal' need not have unit length. If
16417 `GL_NORMALIZE' is enabled, then normals of any length specified with
16418 `glNormal' are normalized after transformation. If `GL_RESCALE_NORMAL'
16419 is enabled, normals are scaled by a scaling factor derived from the
16420 modelview matrix. `GL_RESCALE_NORMAL' requires that the originally
16421 specified normals were of unit length, and that the modelview matrix
16422 contain only uniform scales for proper results. To enable and disable
16423 normalization, call `glEnable' and `glDisable' with either
16424 `GL_NORMALIZE' or `GL_RESCALE_NORMAL'. Normalization is initially
16425 disabled.")
16426
16427 (define-gl-procedures
16428 ((glOrtho
16429 (left GLdouble)
16430 (right GLdouble)
16431 (bottom GLdouble)
16432 (top GLdouble)
16433 (nearVal GLdouble)
16434 (farVal GLdouble)
16435 ->
16436 void))
16437 "Multiply the current matrix with an orthographic matrix.
16438
16439 LEFT
16440 RIGHT
16441
16442 Specify the coordinates for the left and right vertical clipping
16443 planes.
16444
16445 BOTTOM
16446 TOP
16447
16448 Specify the coordinates for the bottom and top horizontal clipping
16449 planes.
16450
16451 NEARVAL
16452 FARVAL
16453
16454 Specify the distances to the nearer and farther depth clipping
16455 planes. These values are negative if the plane is to be behind the
16456 viewer.
16457
16458 `glOrtho' describes a transformation that produces a parallel
16459 projection. The current matrix (see `glMatrixMode') is multiplied by
16460 this matrix and the result replaces the current matrix, as if
16461 `glMultMatrix' were called with the following matrix as its argument:
16462
16463 ((2/RIGHT-LEFT,, 0 0 T_X,), (0 2/TOP-BOTTOM,, 0 T_Y,), (0 0
16464 -2/FARVAL-NEARVAL,, T_Z,), (0 0 0 1),)
16465
16466 where T_X=-RIGHT+LEFT,/RIGHT-LEFT,, T_Y=-TOP+BOTTOM,/TOP-BOTTOM,,
16467 T_Z=-FARVAL+NEARVAL,/FARVAL-NEARVAL,,
16468
16469 Typically, the matrix mode is `GL_PROJECTION', and (LEFT,BOTTOM-NEARVAL)
16470 and (RIGHT,TOP-NEARVAL) specify the points on the near clipping plane
16471 that are mapped to the lower left and upper right corners of the window,
16472 respectively, assuming that the eye is located at (0, 0, 0). -FARVAL
16473 specifies the location of the far clipping plane. Both NEARVAL and
16474 FARVAL can be either positive or negative.
16475
16476 Use `glPushMatrix' and `glPopMatrix' to save and restore the current
16477 matrix stack.
16478
16479 `GL_INVALID_VALUE' is generated if LEFT = RIGHT, or BOTTOM = TOP, or
16480 NEAR = FAR.
16481
16482 `GL_INVALID_OPERATION' is generated if `glOrtho' is executed between the
16483 execution of `glBegin' and the corresponding execution of `glEnd'.")
16484
16485 (define-gl-procedures
16486 ((glPassThrough (token GLfloat) -> void))
16487 "Place a marker in the feedback buffer.
16488
16489 TOKEN
16490 Specifies a marker value to be placed in the feedback buffer
16491 following a `GL_PASS_THROUGH_TOKEN'.
16492
16493
16494
16495 Feedback is a GL render mode. The mode is selected by calling
16496 `glRenderMode' with `GL_FEEDBACK'. When the GL is in feedback mode, no
16497 pixels are produced by rasterization. Instead, information about
16498 primitives that would have been rasterized is fed back to the
16499 application using the GL. See the `glFeedbackBuffer' reference page for
16500 a description of the feedback buffer and the values in it.
16501
16502 `glPassThrough' inserts a user-defined marker in the feedback buffer
16503 when it is executed in feedback mode. TOKEN is returned as if it were a
16504 primitive; it is indicated with its own unique identifying value:
16505 `GL_PASS_THROUGH_TOKEN'. The order of `glPassThrough' commands with
16506 respect to the specification of graphics primitives is maintained.
16507
16508 `GL_INVALID_OPERATION' is generated if `glPassThrough' is executed
16509 between the execution of `glBegin' and the corresponding execution of
16510 `glEnd'.")
16511
16512 (define-gl-procedures
16513 ((glPixelMapfv
16514 (map GLenum)
16515 (mapsize GLsizei)
16516 (values const-GLfloat-*)
16517 ->
16518 void)
16519 (glPixelMapuiv
16520 (map GLenum)
16521 (mapsize GLsizei)
16522 (values const-GLuint-*)
16523 ->
16524 void)
16525 (glPixelMapusv
16526 (map GLenum)
16527 (mapsize GLsizei)
16528 (values const-GLushort-*)
16529 ->
16530 void))
16531 "Set up pixel transfer maps.
16532
16533 MAP
16534 Specifies a symbolic map name. Must be one of the following:
16535 `GL_PIXEL_MAP_I_TO_I', `GL_PIXEL_MAP_S_TO_S',
16536 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
16537 `GL_PIXEL_MAP_I_TO_B', `GL_PIXEL_MAP_I_TO_A',
16538 `GL_PIXEL_MAP_R_TO_R', `GL_PIXEL_MAP_G_TO_G',
16539 `GL_PIXEL_MAP_B_TO_B', or `GL_PIXEL_MAP_A_TO_A'.
16540
16541 MAPSIZE
16542 Specifies the size of the map being defined.
16543
16544 VALUES
16545 Specifies an array of MAPSIZE values.
16546
16547 `glPixelMap' sets up translation tables, or MAPS, used by
16548 `glCopyPixels', `glCopyTexImage1D', `glCopyTexImage2D',
16549 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D',
16550 `glDrawPixels', `glReadPixels', `glTexImage1D', `glTexImage2D',
16551 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D', and
16552 `glTexSubImage3D'. Additionally, if the `ARB_imaging' subset is
16553 supported, the routines `glColorTable', `glColorSubTable',
16554 `glConvolutionFilter1D', `glConvolutionFilter2D', `glHistogram',
16555 `glMinmax', and `glSeparableFilter2D'. Use of these maps is described
16556 completely in the `glPixelTransfer' reference page, and partly in the
16557 reference pages for the pixel and texture image commands. Only the
16558 specification of the maps is described in this reference page.
16559
16560 MAP is a symbolic map name, indicating one of ten maps to set. MAPSIZE
16561 specifies the number of entries in the map, and VALUES is a pointer to
16562 an array of MAPSIZE map values.
16563
16564 If a non-zero named buffer object is bound to the
16565 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a pixel
16566 transfer map is specified, VALUES is treated as a byte offset into the
16567 buffer object's data store.
16568
16569 The ten maps are as follows:
16570
16571 `GL_PIXEL_MAP_I_TO_I'
16572 Maps color indices to color indices.
16573
16574 `GL_PIXEL_MAP_S_TO_S'
16575 Maps stencil indices to stencil indices.
16576
16577 `GL_PIXEL_MAP_I_TO_R'
16578 Maps color indices to red components.
16579
16580 `GL_PIXEL_MAP_I_TO_G'
16581 Maps color indices to green components.
16582
16583 `GL_PIXEL_MAP_I_TO_B'
16584 Maps color indices to blue components.
16585
16586 `GL_PIXEL_MAP_I_TO_A'
16587 Maps color indices to alpha components.
16588
16589 `GL_PIXEL_MAP_R_TO_R'
16590 Maps red components to red components.
16591
16592 `GL_PIXEL_MAP_G_TO_G'
16593 Maps green components to green components.
16594
16595 `GL_PIXEL_MAP_B_TO_B'
16596 Maps blue components to blue components.
16597
16598 `GL_PIXEL_MAP_A_TO_A'
16599 Maps alpha components to alpha components.
16600
16601 The entries in a map can be specified as single-precision floating-point
16602 numbers, unsigned short integers, or unsigned int integers. Maps that
16603 store color component values (all but `GL_PIXEL_MAP_I_TO_I' and
16604 `GL_PIXEL_MAP_S_TO_S') retain their values in floating-point format,
16605 with unspecified mantissa and exponent sizes. Floating-point values
16606 specified by `glPixelMapfv' are converted directly to the internal
16607 floating-point format of these maps, then clamped to the range [0,1].
16608 Unsigned integer values specified by `glPixelMapusv' and `glPixelMapuiv'
16609 are converted linearly such that the largest representable integer maps
16610 to 1.0, and 0 maps to 0.0.
16611
16612 Maps that store indices, `GL_PIXEL_MAP_I_TO_I' and
16613 `GL_PIXEL_MAP_S_TO_S', retain their values in fixed-point format, with
16614 an unspecified number of bits to the right of the binary point.
16615 Floating-point values specified by `glPixelMapfv' are converted directly
16616 to the internal fixed-point format of these maps. Unsigned integer
16617 values specified by `glPixelMapusv' and `glPixelMapuiv' specify integer
16618 values, with all 0's to the right of the binary point.
16619
16620 The following table shows the initial sizes and values for each of the
16621 maps. Maps that are indexed by either color or stencil indices must
16622 have MAPSIZE = 2^N for some N or the results are undefined. The maximum
16623 allowable size for each map depends on the implementation and can be
16624 determined by calling `glGet' with argument `GL_MAX_PIXEL_MAP_TABLE'.
16625 The single maximum applies to all maps; it is at least 32.
16626
16627 *MAP*
16628 *Lookup Index*, *Lookup Value*, *Initial Size*, *Initial Value*
16629
16630 `GL_PIXEL_MAP_I_TO_I'
16631 color index , color index , 1 , 0
16632
16633 `GL_PIXEL_MAP_S_TO_S'
16634 stencil index , stencil index , 1 , 0
16635
16636 `GL_PIXEL_MAP_I_TO_R'
16637 color index , R , 1 , 0
16638
16639 `GL_PIXEL_MAP_I_TO_G'
16640 color index , G , 1 , 0
16641
16642 `GL_PIXEL_MAP_I_TO_B'
16643 color index , B , 1 , 0
16644
16645 `GL_PIXEL_MAP_I_TO_A'
16646 color index , A , 1 , 0
16647
16648 `GL_PIXEL_MAP_R_TO_R'
16649 R , R , 1 , 0
16650
16651 `GL_PIXEL_MAP_G_TO_G'
16652 G , G , 1 , 0
16653
16654 `GL_PIXEL_MAP_B_TO_B'
16655 B , B , 1 , 0
16656
16657 `GL_PIXEL_MAP_A_TO_A'
16658 A , A , 1 , 0
16659
16660 `GL_INVALID_ENUM' is generated if MAP is not an accepted value.
16661
16662 `GL_INVALID_VALUE' is generated if MAPSIZE is less than one or larger
16663 than `GL_MAX_PIXEL_MAP_TABLE'.
16664
16665 `GL_INVALID_VALUE' is generated if MAP is `GL_PIXEL_MAP_I_TO_I',
16666 `GL_PIXEL_MAP_S_TO_S', `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
16667 `GL_PIXEL_MAP_I_TO_B', or `GL_PIXEL_MAP_I_TO_A', and MAPSIZE is not a
16668 power of two.
16669
16670 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16671 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
16672 data store is currently mapped.
16673
16674 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16675 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
16676 unpacked from the buffer object such that the memory reads required
16677 would exceed the data store size.
16678
16679 `GL_INVALID_OPERATION' is generated by `glPixelMapfv' if a non-zero
16680 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16681 VALUES is not evenly divisible into the number of bytes needed to store
16682 in memory a GLfloat datum.
16683
16684 `GL_INVALID_OPERATION' is generated by `glPixelMapuiv' if a non-zero
16685 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16686 VALUES is not evenly divisible into the number of bytes needed to store
16687 in memory a GLuint datum.
16688
16689 `GL_INVALID_OPERATION' is generated by `glPixelMapusv' if a non-zero
16690 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16691 VALUES is not evenly divisible into the number of bytes needed to store
16692 in memory a GLushort datum.
16693
16694 `GL_INVALID_OPERATION' is generated if `glPixelMap' is executed between
16695 the execution of `glBegin' and the corresponding execution of `glEnd'.")
16696
16697 (define-gl-procedures
16698 ((glPixelStoref
16699 (pname GLenum)
16700 (param GLfloat)
16701 ->
16702 void)
16703 (glPixelStorei
16704 (pname GLenum)
16705 (param GLint)
16706 ->
16707 void))
16708 "Set pixel storage modes.
16709
16710 PNAME
16711 Specifies the symbolic name of the parameter to be set. Six values
16712 affect the packing of pixel data into memory: `GL_PACK_SWAP_BYTES',
16713 `GL_PACK_LSB_FIRST', `GL_PACK_ROW_LENGTH', `GL_PACK_IMAGE_HEIGHT',
16714 `GL_PACK_SKIP_PIXELS', `GL_PACK_SKIP_ROWS', `GL_PACK_SKIP_IMAGES',
16715 and `GL_PACK_ALIGNMENT'. Six more affect the unpacking of pixel
16716 data FROM memory: `GL_UNPACK_SWAP_BYTES', `GL_UNPACK_LSB_FIRST',
16717 `GL_UNPACK_ROW_LENGTH', `GL_UNPACK_IMAGE_HEIGHT',
16718 `GL_UNPACK_SKIP_PIXELS', `GL_UNPACK_SKIP_ROWS',
16719 `GL_UNPACK_SKIP_IMAGES', and `GL_UNPACK_ALIGNMENT'.
16720
16721 PARAM
16722 Specifies the value that PNAME is set to.
16723
16724 `glPixelStore' sets pixel storage modes that affect the operation of
16725 subsequent `glDrawPixels' and `glReadPixels' as well as the unpacking of
16726 polygon stipple patterns (see `glPolygonStipple'), bitmaps (see
16727 `glBitmap'), texture patterns (see `glTexImage1D', `glTexImage2D',
16728 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D',
16729 `glTexSubImage3D'). Additionally, if the `ARB_imaging' extension is
16730 supported, pixel storage modes affect convolution filters (see
16731 `glConvolutionFilter1D', `glConvolutionFilter2D', and
16732 `glSeparableFilter2D', color table (see `glColorTable', and
16733 `glColorSubTable', and unpacking histogram (See `glHistogram'), and
16734 minmax (See `glMinmax') data.
16735
16736 PNAME is a symbolic constant indicating the parameter to be set, and
16737 PARAM is the new value. Six of the twelve storage parameters affect how
16738 pixel data is returned to client memory. They are as follows:
16739
16740 `GL_PACK_SWAP_BYTES'
16741 If true, byte ordering for multibyte color components, depth
16742 components, color indices, or stencil indices is reversed. That
16743 is, if a four-byte component consists of bytes B_0 , B_1 , B_2 ,
16744 B_3 , it is stored in memory as B_3 , B_2 , B_1 , B_0 if
16745 `GL_PACK_SWAP_BYTES' is true. `GL_PACK_SWAP_BYTES' has no effect
16746 on the memory order of components within a pixel, only on the order
16747 of bytes within components or indices. For example, the three
16748 components of a `GL_RGB' format pixel are always stored with red
16749 first, green second, and blue third, regardless of the value of
16750 `GL_PACK_SWAP_BYTES'.
16751
16752 `GL_PACK_LSB_FIRST'
16753 If true, bits are ordered within a byte from least significant to
16754 most significant; otherwise, the first bit in each byte is the most
16755 significant one. This parameter is significant for bitmap data
16756 only.
16757
16758 `GL_PACK_ROW_LENGTH'
16759 If greater than 0, `GL_PACK_ROW_LENGTH' defines the number of
16760 pixels in a row. If the first pixel of a row is placed at location
16761 P in memory, then the location of the first pixel of the next row
16762 is obtained by skipping
16763
16764 K={(N\u2062L), (A/S,\u2062⌈S\u2062N\u2062L,/A,⌉)\u2062(S>=A), (S<A),
16765
16766 components or indices, where N is the number of components or
16767 indices in a pixel, L is the number of pixels in a row
16768 (`GL_PACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16769 to the pixel routine otherwise), A is the value of
16770 `GL_PACK_ALIGNMENT', and S is the size, in bytes, of a single
16771 component (if A<S , then it is as if A=S ). In the case of 1-bit
16772 values, the location of the next row is obtained by skipping
16773
16774 K=8\u2062A\u2062⌈N\u2062L,/8\u2062A,,⌉
16775
16776 components or indices.
16777
16778 The word COMPONENT in this description refers to the nonindex
16779 values red, green, blue, alpha, and depth. Storage format
16780 `GL_RGB', for example, has three components per pixel: first red,
16781 then green, and finally blue.
16782
16783 `GL_PACK_IMAGE_HEIGHT'
16784 If greater than 0, `GL_PACK_IMAGE_HEIGHT' defines the number of
16785 pixels in an image three-dimensional texture volume, where
16786 ``image'' is defined by all pixels sharing the same third dimension
16787 index. If the first pixel of a row is placed at location P in
16788 memory, then the location of the first pixel of the next row is
16789 obtained by skipping
16790
16791 K={(N\u2062L\u2062H), (A/S,\u2062⌈S\u2062N\u2062L\u2062H,/A,⌉)\u2062(S>=A), (S<A),
16792
16793 components or indices, where N is the number of components or
16794 indices in a pixel, L is the number of pixels in a row
16795 (`GL_PACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16796 to `glTexImage3D' otherwise), H is the number of rows in a pixel
16797 image (`GL_PACK_IMAGE_HEIGHT' if it is greater than 0, the HEIGHT
16798 argument to the `glTexImage3D' routine otherwise), A is the value
16799 of `GL_PACK_ALIGNMENT', and S is the size, in bytes, of a single
16800 component (if A<S , then it is as if A=S ).
16801
16802 The word COMPONENT in this description refers to the nonindex
16803 values red, green, blue, alpha, and depth. Storage format
16804 `GL_RGB', for example, has three components per pixel: first red,
16805 then green, and finally blue.
16806
16807 `GL_PACK_SKIP_PIXELS', `GL_PACK_SKIP_ROWS', and `GL_PACK_SKIP_IMAGES'
16808 These values are provided as a convenience to the programmer; they
16809 provide no functionality that cannot be duplicated simply by
16810 incrementing the pointer passed to `glReadPixels'. Setting
16811 `GL_PACK_SKIP_PIXELS' to I is equivalent to incrementing the
16812 pointer by I\u2062N components or indices, where N is the number of
16813 components or indices in each pixel. Setting `GL_PACK_SKIP_ROWS'
16814 to J is equivalent to incrementing the pointer by J\u2062M components or
16815 indices, where M is the number of components or indices per row, as
16816 just computed in the `GL_PACK_ROW_LENGTH' section. Setting
16817 `GL_PACK_SKIP_IMAGES' to K is equivalent to incrementing the
16818 pointer by K\u2062P , where P is the number of components or indices per
16819 image, as computed in the `GL_PACK_IMAGE_HEIGHT' section.
16820
16821 `GL_PACK_ALIGNMENT'
16822 Specifies the alignment requirements for the start of each pixel
16823 row in memory. The allowable values are 1 (byte-alignment), 2
16824 (rows aligned to even-numbered bytes), 4 (word-alignment), and 8
16825 (rows start on double-word boundaries).
16826
16827 The other six of the twelve storage parameters affect how pixel data is
16828 read from client memory. These values are significant for
16829 `glDrawPixels', `glTexImage1D', `glTexImage2D', `glTexImage3D',
16830 `glTexSubImage1D', `glTexSubImage2D', `glTexSubImage3D', `glBitmap', and
16831 `glPolygonStipple'.
16832
16833 Additionally, if the `ARB_imaging' extension is supported,
16834 `glColorTable', `glColorSubTable', `glConvolutionFilter1D',
16835 `glConvolutionFilter2D', and `glSeparableFilter2D'. They are as
16836 follows:
16837
16838 `GL_UNPACK_SWAP_BYTES'
16839 If true, byte ordering for multibyte color components, depth
16840 components, color indices, or stencil indices is reversed. That
16841 is, if a four-byte component consists of bytes B_0 , B_1 , B_2 ,
16842 B_3 , it is taken from memory as B_3 , B_2 , B_1 , B_0 if
16843 `GL_UNPACK_SWAP_BYTES' is true. `GL_UNPACK_SWAP_BYTES' has no
16844 effect on the memory order of components within a pixel, only on
16845 the order of bytes within components or indices. For example, the
16846 three components of a `GL_RGB' format pixel are always stored with
16847 red first, green second, and blue third, regardless of the value of
16848 `GL_UNPACK_SWAP_BYTES'.
16849
16850 `GL_UNPACK_LSB_FIRST'
16851 If true, bits are ordered within a byte from least significant to
16852 most significant; otherwise, the first bit in each byte is the most
16853 significant one. This is relevant only for bitmap data.
16854
16855 `GL_UNPACK_ROW_LENGTH'
16856 If greater than 0, `GL_UNPACK_ROW_LENGTH' defines the number of
16857 pixels in a row. If the first pixel of a row is placed at location
16858 P in memory, then the location of the first pixel of the next row
16859 is obtained by skipping
16860
16861 K={(N\u2062L), (A/S,\u2062⌈S\u2062N\u2062L,/A,⌉)\u2062(S>=A), (S<A),
16862
16863 components or indices, where N is the number of components or
16864 indices in a pixel, L is the number of pixels in a row
16865 (`GL_UNPACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16866 to the pixel routine otherwise), A is the value of
16867 `GL_UNPACK_ALIGNMENT', and S is the size, in bytes, of a single
16868 component (if A<S , then it is as if A=S ). In the case of 1-bit
16869 values, the location of the next row is obtained by skipping
16870
16871 K=8\u2062A\u2062⌈N\u2062L,/8\u2062A,,⌉
16872
16873 components or indices.
16874
16875 The word COMPONENT in this description refers to the nonindex
16876 values red, green, blue, alpha, and depth. Storage format
16877 `GL_RGB', for example, has three components per pixel: first red,
16878 then green, and finally blue.
16879
16880 `GL_UNPACK_IMAGE_HEIGHT'
16881 If greater than 0, `GL_UNPACK_IMAGE_HEIGHT' defines the number of
16882 pixels in an image of a three-dimensional texture volume. Where
16883 ``image'' is defined by all pixel sharing the same third dimension
16884 index. If the first pixel of a row is placed at location P in
16885 memory, then the location of the first pixel of the next row is
16886 obtained by skipping
16887
16888 K={(N\u2062L\u2062H), (A/S,\u2062⌈S\u2062N\u2062L\u2062H,/A,⌉)\u2062(S>=A), (S<A),
16889
16890 components or indices, where N is the number of components or
16891 indices in a pixel, L is the number of pixels in a row
16892 (`GL_UNPACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16893 to `glTexImage3D' otherwise), H is the number of rows in an image
16894 (`GL_UNPACK_IMAGE_HEIGHT' if it is greater than 0, the HEIGHT
16895 argument to `glTexImage3D' otherwise), A is the value of
16896 `GL_UNPACK_ALIGNMENT', and S is the size, in bytes, of a single
16897 component (if A<S , then it is as if A=S ).
16898
16899 The word COMPONENT in this description refers to the nonindex
16900 values red, green, blue, alpha, and depth. Storage format
16901 `GL_RGB', for example, has three components per pixel: first red,
16902 then green, and finally blue.
16903
16904 `GL_UNPACK_SKIP_PIXELS' and `GL_UNPACK_SKIP_ROWS'
16905 These values are provided as a convenience to the programmer; they
16906 provide no functionality that cannot be duplicated by incrementing
16907 the pointer passed to `glDrawPixels', `glTexImage1D',
16908 `glTexImage2D', `glTexSubImage1D', `glTexSubImage2D', `glBitmap',
16909 or `glPolygonStipple'. Setting `GL_UNPACK_SKIP_PIXELS' to I is
16910 equivalent to incrementing the pointer by I\u2062N components or
16911 indices, where N is the number of components or indices in each
16912 pixel. Setting `GL_UNPACK_SKIP_ROWS' to J is equivalent to
16913 incrementing the pointer by J\u2062K components or indices, where K is
16914 the number of components or indices per row, as just computed in
16915 the `GL_UNPACK_ROW_LENGTH' section.
16916
16917 `GL_UNPACK_ALIGNMENT'
16918 Specifies the alignment requirements for the start of each pixel
16919 row in memory. The allowable values are 1 (byte-alignment), 2
16920 (rows aligned to even-numbered bytes), 4 (word-alignment), and 8
16921 (rows start on double-word boundaries).
16922
16923 The following table gives the type, initial value, and range of valid
16924 values for each storage parameter that can be set with `glPixelStore'.
16925
16926
16927
16928 *PNAME*
16929 *Type*, *Initial Value*, *Valid Range*
16930
16931 `GL_PACK_SWAP_BYTES'
16932 boolean , false , true or false
16933
16934 `GL_PACK_LSB_FIRST'
16935 boolean , false , true or false
16936
16937 `GL_PACK_ROW_LENGTH'
16938 integer , 0 , [0,∞)
16939
16940 `GL_PACK_IMAGE_HEIGHT'
16941 integer , 0 , [0,∞)
16942
16943 `GL_PACK_SKIP_ROWS'
16944 integer , 0 , [0,∞)
16945
16946 `GL_PACK_SKIP_PIXELS'
16947 integer , 0 , [0,∞)
16948
16949 `GL_PACK_SKIP_IMAGES'
16950 integer , 0 , [0,∞)
16951
16952 `GL_PACK_ALIGNMENT'
16953 integer , 4 , 1, 2, 4, or 8
16954
16955 `GL_UNPACK_SWAP_BYTES'
16956 boolean , false , true or false
16957
16958 `GL_UNPACK_LSB_FIRST'
16959 boolean , false , true or false
16960
16961 `GL_UNPACK_ROW_LENGTH'
16962 integer , 0 , [0,∞)
16963
16964 `GL_UNPACK_IMAGE_HEIGHT'
16965 integer , 0 , [0,∞)
16966
16967 `GL_UNPACK_SKIP_ROWS'
16968 integer , 0 , [0,∞)
16969
16970 `GL_UNPACK_SKIP_PIXELS'
16971 integer , 0 , [0,∞)
16972
16973 `GL_UNPACK_SKIP_IMAGES'
16974 integer , 0 , [0,∞)
16975
16976 `GL_UNPACK_ALIGNMENT'
16977 integer , 4 , 1, 2, 4, or 8
16978
16979 `glPixelStoref' can be used to set any pixel store parameter. If the
16980 parameter type is boolean, then if PARAM is 0, the parameter is false;
16981 otherwise it is set to true. If PNAME is a integer type parameter,
16982 PARAM is rounded to the nearest integer.
16983
16984 Likewise, `glPixelStorei' can also be used to set any of the pixel store
16985 parameters. Boolean parameters are set to false if PARAM is 0 and true
16986 otherwise.
16987
16988 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
16989
16990 `GL_INVALID_VALUE' is generated if a negative row length, pixel skip, or
16991 row skip value is specified, or if alignment is specified as other than
16992 1, 2, 4, or 8.
16993
16994 `GL_INVALID_OPERATION' is generated if `glPixelStore' is executed
16995 between the execution of `glBegin' and the corresponding execution of
16996 `glEnd'.")
16997
16998 (define-gl-procedures
16999 ((glPixelTransferf
17000 (pname GLenum)
17001 (param GLfloat)
17002 ->
17003 void)
17004 (glPixelTransferi
17005 (pname GLenum)
17006 (param GLint)
17007 ->
17008 void))
17009 "Set pixel transfer modes.
17010
17011 PNAME
17012 Specifies the symbolic name of the pixel transfer parameter to be
17013 set. Must be one of the following: `GL_MAP_COLOR',
17014 `GL_MAP_STENCIL', `GL_INDEX_SHIFT', `GL_INDEX_OFFSET',
17015 `GL_RED_SCALE', `GL_RED_BIAS', `GL_GREEN_SCALE', `GL_GREEN_BIAS',
17016 `GL_BLUE_SCALE', `GL_BLUE_BIAS', `GL_ALPHA_SCALE', `GL_ALPHA_BIAS',
17017 `GL_DEPTH_SCALE', or `GL_DEPTH_BIAS'.
17018
17019 Additionally, if the `ARB_imaging' extension is supported, the
17020 following symbolic names are accepted:
17021 `GL_POST_COLOR_MATRIX_RED_SCALE',
17022 `GL_POST_COLOR_MATRIX_GREEN_SCALE',
17023 `GL_POST_COLOR_MATRIX_BLUE_SCALE',
17024 `GL_POST_COLOR_MATRIX_ALPHA_SCALE',
17025 `GL_POST_COLOR_MATRIX_RED_BIAS', `GL_POST_COLOR_MATRIX_GREEN_BIAS',
17026 `GL_POST_COLOR_MATRIX_BLUE_BIAS',
17027 `GL_POST_COLOR_MATRIX_ALPHA_BIAS', `GL_POST_CONVOLUTION_RED_SCALE',
17028 `GL_POST_CONVOLUTION_GREEN_SCALE',
17029 `GL_POST_CONVOLUTION_BLUE_SCALE',
17030 `GL_POST_CONVOLUTION_ALPHA_SCALE', `GL_POST_CONVOLUTION_RED_BIAS',
17031 `GL_POST_CONVOLUTION_GREEN_BIAS', `GL_POST_CONVOLUTION_BLUE_BIAS',
17032 and `GL_POST_CONVOLUTION_ALPHA_BIAS'.
17033
17034 PARAM
17035 Specifies the value that PNAME is set to.
17036
17037 `glPixelTransfer' sets pixel transfer modes that affect the operation of
17038 subsequent `glCopyPixels', `glCopyTexImage1D', `glCopyTexImage2D',
17039 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D',
17040 `glDrawPixels', `glReadPixels', `glTexImage1D', `glTexImage2D',
17041 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D', and
17042 `glTexSubImage3D' commands. Additionally, if the `ARB_imaging' subset
17043 is supported, the routines `glColorTable', `glColorSubTable',
17044 `glConvolutionFilter1D', `glConvolutionFilter2D', `glHistogram',
17045 `glMinmax', and `glSeparableFilter2D' are also affected. The algorithms
17046 that are specified by pixel transfer modes operate on pixels after they
17047 are read from the frame buffer (`glCopyPixels'`glCopyTexImage1D',
17048 `glCopyTexImage2D', `glCopyTexSubImage1D', `glCopyTexSubImage2D',
17049 `glCopyTexSubImage3D', and `glReadPixels'), or unpacked from client
17050 memory (`glDrawPixels', `glTexImage1D', `glTexImage2D', `glTexImage3D',
17051 `glTexSubImage1D', `glTexSubImage2D', and `glTexSubImage3D'). Pixel
17052 transfer operations happen in the same order, and in the same manner,
17053 regardless of the command that resulted in the pixel operation. Pixel
17054 storage modes (see `glPixelStore') control the unpacking of pixels being
17055 read from client memory and the packing of pixels being written back
17056 into client memory.
17057
17058 Pixel transfer operations handle four fundamental pixel types: COLOR,
17059 COLOR INDEX, DEPTH, and STENCIL. COLOR pixels consist of four
17060 floating-point values with unspecified mantissa and exponent sizes,
17061 scaled such that 0 represents zero intensity and 1 represents full
17062 intensity. COLOR INDICES comprise a single fixed-point value, with
17063 unspecified precision to the right of the binary point. DEPTH pixels
17064 comprise a single floating-point value, with unspecified mantissa and
17065 exponent sizes, scaled such that 0.0 represents the minimum depth buffer
17066 value, and 1.0 represents the maximum depth buffer value. Finally,
17067 STENCIL pixels comprise a single fixed-point value, with unspecified
17068 precision to the right of the binary point.
17069
17070 The pixel transfer operations performed on the four basic pixel types
17071 are as follows:
17072
17073 COLOR
17074 Each of the four color components is multiplied by a scale factor,
17075 then added to a bias factor. That is, the red component is
17076 multiplied by `GL_RED_SCALE', then added to `GL_RED_BIAS'; the
17077 green component is multiplied by `GL_GREEN_SCALE', then added to
17078 `GL_GREEN_BIAS'; the blue component is multiplied by
17079 `GL_BLUE_SCALE', then added to `GL_BLUE_BIAS'; and the alpha
17080 component is multiplied by `GL_ALPHA_SCALE', then added to
17081 `GL_ALPHA_BIAS'. After all four color components are scaled and
17082 biased, each is clamped to the range [0,1] . All color, scale, and
17083 bias values are specified with `glPixelTransfer'.
17084
17085 If `GL_MAP_COLOR' is true, each color component is scaled by the
17086 size of the corresponding color-to-color map, then replaced by the
17087 contents of that map indexed by the scaled component. That is, the
17088 red component is scaled by `GL_PIXEL_MAP_R_TO_R_SIZE', then
17089 replaced by the contents of `GL_PIXEL_MAP_R_TO_R' indexed by
17090 itself. The green component is scaled by
17091 `GL_PIXEL_MAP_G_TO_G_SIZE', then replaced by the contents of
17092 `GL_PIXEL_MAP_G_TO_G' indexed by itself. The blue component is
17093 scaled by `GL_PIXEL_MAP_B_TO_B_SIZE', then replaced by the contents
17094 of `GL_PIXEL_MAP_B_TO_B' indexed by itself. And the alpha
17095 component is scaled by `GL_PIXEL_MAP_A_TO_A_SIZE', then replaced by
17096 the contents of `GL_PIXEL_MAP_A_TO_A' indexed by itself. All
17097 components taken from the maps are then clamped to the range [0,1]
17098 . `GL_MAP_COLOR' is specified with `glPixelTransfer'. The
17099 contents of the various maps are specified with `glPixelMap'.
17100
17101 If the `ARB_imaging' extension is supported, each of the four color
17102 components may be scaled and biased after transformation by the
17103 color matrix. That is, the red component is multiplied by
17104 `GL_POST_COLOR_MATRIX_RED_SCALE', then added to
17105 `GL_POST_COLOR_MATRIX_RED_BIAS'; the green component is multiplied
17106 by `GL_POST_COLOR_MATRIX_GREEN_SCALE', then added to
17107 `GL_POST_COLOR_MATRIX_GREEN_BIAS'; the blue component is multiplied
17108 by `GL_POST_COLOR_MATRIX_BLUE_SCALE', then added to
17109 `GL_POST_COLOR_MATRIX_BLUE_BIAS'; and the alpha component is
17110 multiplied by `GL_POST_COLOR_MATRIX_ALPHA_SCALE', then added to
17111 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'. After all four color components
17112 are scaled and biased, each is clamped to the range [0,1] .
17113
17114 Similarly, if the `ARB_imaging' extension is supported, each of the
17115 four color components may be scaled and biased after processing by
17116 the enabled convolution filter. That is, the red component is
17117 multiplied by `GL_POST_CONVOLUTION_RED_SCALE', then added to
17118 `GL_POST_CONVOLUTION_RED_BIAS'; the green component is multiplied
17119 by `GL_POST_CONVOLUTION_GREEN_SCALE', then added to
17120 `GL_POST_CONVOLUTION_GREEN_BIAS'; the blue component is multiplied
17121 by `GL_POST_CONVOLUTION_BLUE_SCALE', then added to
17122 `GL_POST_CONVOLUTION_BLUE_BIAS'; and the alpha component is
17123 multiplied by `GL_POST_CONVOLUTION_ALPHA_SCALE', then added to
17124 `GL_POST_CONVOLUTION_ALPHA_BIAS'. After all four color components
17125 are scaled and biased, each is clamped to the range [0,1] .
17126
17127 COLOR INDEX
17128 Each color index is shifted left by `GL_INDEX_SHIFT' bits; any bits
17129 beyond the number of fraction bits carried by the fixed-point index
17130 are filled with zeros. If `GL_INDEX_SHIFT' is negative, the shift
17131 is to the right, again zero filled. Then `GL_INDEX_OFFSET' is
17132 added to the index. `GL_INDEX_SHIFT' and `GL_INDEX_OFFSET' are
17133 specified with `glPixelTransfer'.
17134
17135 From this point, operation diverges depending on the required
17136 format of the resulting pixels. If the resulting pixels are to be
17137 written to a color index buffer, or if they are being read back to
17138 client memory in `GL_COLOR_INDEX' format, the pixels continue to be
17139 treated as indices. If `GL_MAP_COLOR' is true, each index is
17140 masked by 2^N-1 , where N is `GL_PIXEL_MAP_I_TO_I_SIZE', then
17141 replaced by the contents of `GL_PIXEL_MAP_I_TO_I' indexed by the
17142 masked value. `GL_MAP_COLOR' is specified with `glPixelTransfer'.
17143 The contents of the index map is specified with `glPixelMap'.
17144
17145 If the resulting pixels are to be written to an RGBA color buffer,
17146 or if they are read back to client memory in a format other than
17147 `GL_COLOR_INDEX', the pixels are converted from indices to colors
17148 by referencing the four maps `GL_PIXEL_MAP_I_TO_R',
17149 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
17150 `GL_PIXEL_MAP_I_TO_A'. Before being dereferenced, the index is
17151 masked by 2^N-1 , where N is `GL_PIXEL_MAP_I_TO_R_SIZE' for the red
17152 map, `GL_PIXEL_MAP_I_TO_G_SIZE' for the green map,
17153 `GL_PIXEL_MAP_I_TO_B_SIZE' for the blue map, and
17154 `GL_PIXEL_MAP_I_TO_A_SIZE' for the alpha map. All components taken
17155 from the maps are then clamped to the range [0,1] . The contents
17156 of the four maps is specified with `glPixelMap'.
17157
17158 DEPTH
17159 Each depth value is multiplied by `GL_DEPTH_SCALE', added to
17160 `GL_DEPTH_BIAS', then clamped to the range [0,1] .
17161
17162 STENCIL
17163 Each index is shifted `GL_INDEX_SHIFT' bits just as a color index
17164 is, then added to `GL_INDEX_OFFSET'. If `GL_MAP_STENCIL' is true,
17165 each index is masked by 2^N-1 , where N is
17166 `GL_PIXEL_MAP_S_TO_S_SIZE', then replaced by the contents of
17167 `GL_PIXEL_MAP_S_TO_S' indexed by the masked value.
17168
17169 The following table gives the type, initial value, and range of valid
17170 values for each of the pixel transfer parameters that are set with
17171 `glPixelTransfer'.
17172
17173
17174
17175 *PNAME*
17176 *Type*, *Initial Value*, *Valid Range*
17177
17178 `GL_MAP_COLOR'
17179 boolean , false , true/false
17180
17181 `GL_MAP_STENCIL'
17182 boolean , false , true/false
17183
17184 `GL_INDEX_SHIFT'
17185 integer , 0 , (-∞,∞)
17186
17187 `GL_INDEX_OFFSET'
17188 integer , 0 , (-∞,∞)
17189
17190 `GL_RED_SCALE'
17191 float , 1 , (-∞,∞)
17192
17193 `GL_GREEN_SCALE'
17194 float , 1 , (-∞,∞)
17195
17196 `GL_BLUE_SCALE'
17197 float , 1 , (-∞,∞)
17198
17199 `GL_ALPHA_SCALE'
17200 float , 1 , (-∞,∞)
17201
17202 `GL_DEPTH_SCALE'
17203 float , 1 , (-∞,∞)
17204
17205 `GL_RED_BIAS'
17206 float , 0 , (-∞,∞)
17207
17208 `GL_GREEN_BIAS'
17209 float , 0 , (-∞,∞)
17210
17211 `GL_BLUE_BIAS'
17212 float , 0 , (-∞,∞)
17213
17214 `GL_ALPHA_BIAS'
17215 float , 0 , (-∞,∞)
17216
17217 `GL_DEPTH_BIAS'
17218 float , 0 , (-∞,∞)
17219
17220 `GL_POST_COLOR_MATRIX_RED_SCALE'
17221 float , 1 , (-∞,∞)
17222
17223 `GL_POST_COLOR_MATRIX_GREEN_SCALE'
17224 float , 1 , (-∞,∞)
17225
17226 `GL_POST_COLOR_MATRIX_BLUE_SCALE'
17227 float , 1 , (-∞,∞)
17228
17229 `GL_POST_COLOR_MATRIX_ALPHA_SCALE'
17230 float , 1 , (-∞,∞)
17231
17232 `GL_POST_COLOR_MATRIX_RED_BIAS'
17233 float , 0 , (-∞,∞)
17234
17235 `GL_POST_COLOR_MATRIX_GREEN_BIAS'
17236 float , 0 , (-∞,∞)
17237
17238 `GL_POST_COLOR_MATRIX_BLUE_BIAS'
17239 float , 0 , (-∞,∞)
17240
17241 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'
17242 float , 0 , (-∞,∞)
17243
17244 `GL_POST_CONVOLUTION_RED_SCALE'
17245 float , 1 , (-∞,∞)
17246
17247 `GL_POST_CONVOLUTION_GREEN_SCALE'
17248 float , 1 , (-∞,∞)
17249
17250 `GL_POST_CONVOLUTION_BLUE_SCALE'
17251 float , 1 , (-∞,∞)
17252
17253 `GL_POST_CONVOLUTION_ALPHA_SCALE'
17254 float , 1 , (-∞,∞)
17255
17256 `GL_POST_CONVOLUTION_RED_BIAS'
17257 float , 0 , (-∞,∞)
17258
17259 `GL_POST_CONVOLUTION_GREEN_BIAS'
17260 float , 0 , (-∞,∞)
17261
17262 `GL_POST_CONVOLUTION_BLUE_BIAS'
17263 float , 0 , (-∞,∞)
17264
17265 `GL_POST_CONVOLUTION_ALPHA_BIAS'
17266 float , 0 , (-∞,∞)
17267
17268 `glPixelTransferf' can be used to set any pixel transfer parameter. If
17269 the parameter type is boolean, 0 implies false and any other value
17270 implies true. If PNAME is an integer parameter, PARAM is rounded to the
17271 nearest integer.
17272
17273 Likewise, `glPixelTransferi' can be used to set any of the pixel
17274 transfer parameters. Boolean parameters are set to false if PARAM is 0
17275 and to true otherwise. PARAM is converted to floating point before
17276 being assigned to real-valued parameters.
17277
17278 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
17279
17280 `GL_INVALID_OPERATION' is generated if `glPixelTransfer' is executed
17281 between the execution of `glBegin' and the corresponding execution of
17282 `glEnd'.")
17283
17284 (define-gl-procedures
17285 ((glPixelZoom
17286 (xfactor GLfloat)
17287 (yfactor GLfloat)
17288 ->
17289 void))
17290 "Specify the pixel zoom factors.
17291
17292 XFACTOR
17293 YFACTOR
17294
17295 Specify the X and Y zoom factors for pixel write operations.
17296
17297 `glPixelZoom' specifies values for the X and Y zoom factors. During the
17298 execution of `glDrawPixels' or `glCopyPixels', if (XR , YR ) is the
17299 current raster position, and a given element is in the M th row and N th
17300 column of the pixel rectangle, then pixels whose centers are in the
17301 rectangle with corners at
17302
17303 (XR+N·XFACTOR , YR+M·YFACTOR )
17304
17305 (XR+(N+1,)·XFACTOR , YR+(M+1,)·YFACTOR )
17306
17307 are candidates for replacement. Any pixel whose center lies on the
17308 bottom or left edge of this rectangular region is also modified.
17309
17310 Pixel zoom factors are not limited to positive values. Negative zoom
17311 factors reflect the resulting image about the current raster position.
17312
17313 `GL_INVALID_OPERATION' is generated if `glPixelZoom' is executed between
17314 the execution of `glBegin' and the corresponding execution of `glEnd'.")
17315
17316 (define-gl-procedures
17317 ((glPointParameterf
17318 (pname GLenum)
17319 (param GLfloat)
17320 ->
17321 void)
17322 (glPointParameteri
17323 (pname GLenum)
17324 (param GLint)
17325 ->
17326 void)
17327 (glPointParameterfv
17328 (pname GLenum)
17329 (params const-GLfloat-*)
17330 ->
17331 void)
17332 (glPointParameteriv
17333 (pname GLenum)
17334 (params const-GLint-*)
17335 ->
17336 void))
17337 "Specify point parameters.
17338
17339 PNAME
17340 Specifies a single-valued point parameter. `GL_POINT_SIZE_MIN',
17341 `GL_POINT_SIZE_MAX', `GL_POINT_FADE_THRESHOLD_SIZE', and
17342 `GL_POINT_SPRITE_COORD_ORIGIN' are accepted.
17343
17344 PARAM
17345 Specifies the value that PNAME will be set to.
17346
17347 The following values are accepted for PNAME:
17348
17349 `GL_POINT_SIZE_MIN'
17350
17351
17352 PARAMS is a single floating-point value that specifies the minimum
17353 point size. The default value is 0.0.
17354
17355 `GL_POINT_SIZE_MAX'
17356
17357
17358 PARAMS is a single floating-point value that specifies the maximum
17359 point size. The default value is 1.0.
17360
17361 `GL_POINT_FADE_THRESHOLD_SIZE'
17362
17363
17364 PARAMS is a single floating-point value that specifies the
17365 threshold value to which point sizes are clamped if they exceed the
17366 specified value. The default value is 1.0.
17367
17368 `GL_POINT_DISTANCE_ATTENUATION'
17369
17370
17371 PARAMS is an array of three floating-point values that specify the
17372 coefficients used for scaling the computed point size. The default
17373 values are (1,00) .
17374
17375 `GL_POINT_SPRITE_COORD_ORIGIN'
17376
17377
17378 PARAMS is a single enum specifying the point sprite texture
17379 coordinate origin, either `GL_LOWER_LEFT' or `GL_UPPER_LEFT'. The
17380 default value is `GL_UPPER_LEFT'.
17381
17382 `GL_INVALID_VALUE' is generated If the value specified for
17383 `GL_POINT_SIZE_MIN', `GL_POINT_SIZE_MAX', or
17384 `GL_POINT_FADE_THRESHOLD_SIZE' is less than zero.
17385
17386 `GL_INVALID_ENUM' is generated If the value specified for
17387 `GL_POINT_SPRITE_COORD_ORIGIN' is not `GL_LOWER_LEFT' or
17388 `GL_UPPER_LEFT'.
17389
17390 If the value for `GL_POINT_SIZE_MIN' is greater than
17391 `GL_POINT_SIZE_MAX', the point size after clamping is undefined, but no
17392 error is generated.")
17393
17394 (define-gl-procedures
17395 ((glPointSize (size GLfloat) -> void))
17396 "Specify the diameter of rasterized points.
17397
17398 SIZE
17399 Specifies the diameter of rasterized points. The initial value is
17400 1.
17401
17402 `glPointSize' specifies the rasterized diameter of both aliased and
17403 antialiased points. Using a point size other than 1 has different
17404 effects, depending on whether point antialiasing is enabled. To enable
17405 and disable point antialiasing, call `glEnable' and `glDisable' with
17406 argument `GL_POINT_SMOOTH'. Point antialiasing is initially disabled.
17407
17408 The specified point size is multiplied with a distance attenuation
17409 factor and clamped to the specified point size range, and further
17410 clamped to the implementation-dependent point size range to produce the
17411 derived point size using
17412
17413 POINTSIZE=CLAMP\u2062(SIZE×√(1/A+B×D+C×D^2,,,),,)
17414
17415 where D is the eye-coordinate distance from the eye to the vertex, and A
17416 , B , and C are the distance attenuation coefficients (see
17417 `glPointParameter').
17418
17419 If multisampling is disabled, the computed point size is used as the
17420 point's width.
17421
17422 If multisampling is enabled, the point may be faded by modifying the
17423 point alpha value (see `glSampleCoverage') instead of allowing the point
17424 width to go below a given threshold (see `glPointParameter'). In this
17425 case, the width is further modified in the following manner:
17426
17427 POINTWIDTH={(POINTSIZE), (THRESHOLD)\u2062(POINTSIZE>=THRESHOLD),
17428 (OTHERWISE),
17429
17430 The point alpha value is modified by computing:
17431
17432 POINTALPHA={(1), ((POINTSIZE/THRESHOLD,)^2)\u2062(POINTSIZE>=THRESHOLD),
17433 (OTHERWISE),
17434
17435 If point antialiasing is disabled, the actual size is determined by
17436 rounding the supplied size to the nearest integer. (If the rounding
17437 results in the value 0, it is as if the point size were 1.) If the
17438 rounded size is odd, then the center point (X , Y ) of the pixel
17439 fragment that represents the point is computed as
17440
17441 (⌊X_W,⌋+.5,⌊Y_W,⌋+.5)
17442
17443 where W subscripts indicate window coordinates. All pixels that lie
17444 within the square grid of the rounded size centered at (X , Y ) make up
17445 the fragment. If the size is even, the center point is
17446
17447 (⌊X_W+.5,⌋,⌊Y_W+.5,⌋)
17448
17449 and the rasterized fragment's centers are the half-integer window
17450 coordinates within the square of the rounded size centered at (X,Y) .
17451 All pixel fragments produced in rasterizing a nonantialiased point are
17452 assigned the same associated data, that of the vertex corresponding to
17453 the point.
17454
17455 If antialiasing is enabled, then point rasterization produces a fragment
17456 for each pixel square that intersects the region lying within the circle
17457 having diameter equal to the current point size and centered at the
17458 point's (X_W,Y_W) . The coverage value for each fragment is the window
17459 coordinate area of the intersection of the circular region with the
17460 corresponding pixel square. This value is saved and used in the final
17461 rasterization step. The data associated with each fragment is the data
17462 associated with the point being rasterized.
17463
17464 Not all sizes are supported when point antialiasing is enabled. If an
17465 unsupported size is requested, the nearest supported size is used. Only
17466 size 1 is guaranteed to be supported; others depend on the
17467 implementation. To query the range of supported sizes and the size
17468 difference between supported sizes within the range, call `glGet' with
17469 arguments `GL_SMOOTH_POINT_SIZE_RANGE' and
17470 `GL_SMOOTH_POINT_SIZE_GRANULARITY'. For aliased points, query the
17471 supported ranges and granularity with `glGet' with arguments
17472 `GL_ALIASED_POINT_SIZE_RANGE'.
17473
17474 `GL_INVALID_VALUE' is generated if SIZE is less than or equal to 0.
17475
17476 `GL_INVALID_OPERATION' is generated if `glPointSize' is executed between
17477 the execution of `glBegin' and the corresponding execution of `glEnd'.")
17478
17479 (define-gl-procedures
17480 ((glPolygonMode
17481 (face GLenum)
17482 (mode GLenum)
17483 ->
17484 void))
17485 "Select a polygon rasterization mode.
17486
17487 FACE
17488 Specifies the polygons that MODE applies to. Must be `GL_FRONT'
17489 for front-facing polygons, `GL_BACK' for back-facing polygons, or
17490 `GL_FRONT_AND_BACK' for front- and back-facing polygons.
17491
17492 MODE
17493 Specifies how polygons will be rasterized. Accepted values are
17494 `GL_POINT', `GL_LINE', and `GL_FILL'. The initial value is
17495 `GL_FILL' for both front- and back-facing polygons.
17496
17497 `glPolygonMode' controls the interpretation of polygons for
17498 rasterization. FACE describes which polygons MODE applies to:
17499 front-facing polygons (`GL_FRONT'), back-facing polygons (`GL_BACK'), or
17500 both (`GL_FRONT_AND_BACK'). The polygon mode affects only the final
17501 rasterization of polygons. In particular, a polygon's vertices are lit
17502 and the polygon is clipped and possibly culled before these modes are
17503 applied.
17504
17505 Three modes are defined and can be specified in MODE:
17506
17507 `GL_POINT'
17508 Polygon vertices that are marked as the start of a boundary edge
17509 are drawn as points. Point attributes such as `GL_POINT_SIZE' and
17510 `GL_POINT_SMOOTH' control the rasterization of the points. Polygon
17511 rasterization attributes other than `GL_POLYGON_MODE' have no
17512 effect.
17513
17514 `GL_LINE'
17515 Boundary edges of the polygon are drawn as line segments. They are
17516 treated as connected line segments for line stippling; the line
17517 stipple counter and pattern are not reset between segments (see
17518 `glLineStipple'). Line attributes such as `GL_LINE_WIDTH' and
17519 `GL_LINE_SMOOTH' control the rasterization of the lines. Polygon
17520 rasterization attributes other than `GL_POLYGON_MODE' have no
17521 effect.
17522
17523 `GL_FILL'
17524 The interior of the polygon is filled. Polygon attributes such as
17525 `GL_POLYGON_STIPPLE' and `GL_POLYGON_SMOOTH' control the
17526 rasterization of the polygon.
17527
17528 `GL_INVALID_ENUM' is generated if either FACE or MODE is not an accepted
17529 value.
17530
17531 `GL_INVALID_OPERATION' is generated if `glPolygonMode' is executed
17532 between the execution of `glBegin' and the corresponding execution of
17533 `glEnd'.")
17534
17535 (define-gl-procedures
17536 ((glPolygonOffset
17537 (factor GLfloat)
17538 (units GLfloat)
17539 ->
17540 void))
17541 "Set the scale and units used to calculate depth values.
17542
17543 FACTOR
17544 Specifies a scale factor that is used to create a variable depth
17545 offset for each polygon. The initial value is 0.
17546
17547 UNITS
17548 Is multiplied by an implementation-specific value to create a
17549 constant depth offset. The initial value is 0.
17550
17551 When `GL_POLYGON_OFFSET_FILL', `GL_POLYGON_OFFSET_LINE', or
17552 `GL_POLYGON_OFFSET_POINT' is enabled, each fragment's DEPTH value will
17553 be offset after it is interpolated from the DEPTH values of the
17554 appropriate vertices. The value of the offset is FACTOR×DZ+R×UNITS ,
17555 where DZ is a measurement of the change in depth relative to the screen
17556 area of the polygon, and R is the smallest value that is guaranteed to
17557 produce a resolvable offset for a given implementation. The offset is
17558 added before the depth test is performed and before the value is written
17559 into the depth buffer.
17560
17561 `glPolygonOffset' is useful for rendering hidden-line images, for
17562 applying decals to surfaces, and for rendering solids with highlighted
17563 edges.
17564
17565 `GL_INVALID_OPERATION' is generated if `glPolygonOffset' is executed
17566 between the execution of `glBegin' and the corresponding execution of
17567 `glEnd'.")
17568
17569 (define-gl-procedures
17570 ((glPolygonStipple
17571 (pattern const-GLubyte-*)
17572 ->
17573 void))
17574 "Set the polygon stippling pattern.
17575
17576 PATTERN
17577 Specifies a pointer to a 32×32 stipple pattern that will be
17578 unpacked from memory in the same way that `glDrawPixels' unpacks
17579 pixels.
17580
17581 Polygon stippling, like line stippling (see `glLineStipple'), masks out
17582 certain fragments produced by rasterization, creating a pattern.
17583 Stippling is independent of polygon antialiasing.
17584
17585 PATTERN is a pointer to a 32×32 stipple pattern that is stored in memory
17586 just like the pixel data supplied to a `glDrawPixels' call with height
17587 and WIDTH both equal to 32, a pixel format of `GL_COLOR_INDEX', and data
17588 type of `GL_BITMAP'. That is, the stipple pattern is represented as a
17589 32×32 array of 1-bit color indices packed in unsigned bytes.
17590 `glPixelStore' parameters like `GL_UNPACK_SWAP_BYTES' and
17591 `GL_UNPACK_LSB_FIRST' affect the assembling of the bits into a stipple
17592 pattern. Pixel transfer operations (shift, offset, pixel map) are not
17593 applied to the stipple image, however.
17594
17595 If a non-zero named buffer object is bound to the
17596 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a stipple
17597 pattern is specified, PATTERN is treated as a byte offset into the
17598 buffer object's data store.
17599
17600 To enable and disable polygon stippling, call `glEnable' and `glDisable'
17601 with argument `GL_POLYGON_STIPPLE'. Polygon stippling is initially
17602 disabled. If it's enabled, a rasterized polygon fragment with window
17603 coordinates X_W and Y_W is sent to the next stage of the GL if and only
17604 if the (X_W%32 )th bit in the (Y_W%32 )th row of the stipple pattern is
17605 1 (one). When polygon stippling is disabled, it is as if the stipple
17606 pattern consists of all 1's.
17607
17608 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
17609 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
17610 data store is currently mapped.
17611
17612 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
17613 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
17614 unpacked from the buffer object such that the memory reads required
17615 would exceed the data store size.
17616
17617 `GL_INVALID_OPERATION' is generated if `glPolygonStipple' is executed
17618 between the execution of `glBegin' and the corresponding execution of
17619 `glEnd'.")
17620
17621 (define-gl-procedures
17622 ((glPrioritizeTextures
17623 (n GLsizei)
17624 (textures const-GLuint-*)
17625 (priorities const-GLclampf-*)
17626 ->
17627 void))
17628 "Set texture residence priority.
17629
17630 N
17631 Specifies the number of textures to be prioritized.
17632
17633 TEXTURES
17634 Specifies an array containing the names of the textures to be
17635 prioritized.
17636
17637 PRIORITIES
17638 Specifies an array containing the texture priorities. A priority
17639 given in an element of PRIORITIES applies to the texture named by
17640 the corresponding element of TEXTURES.
17641
17642 `glPrioritizeTextures' assigns the N texture priorities given in
17643 PRIORITIES to the N textures named in TEXTURES.
17644
17645 The GL establishes a ``working set'' of textures that are resident in
17646 texture memory. These textures may be bound to a texture target much
17647 more efficiently than textures that are not resident. By specifying a
17648 priority for each texture, `glPrioritizeTextures' allows applications to
17649 guide the GL implementation in determining which textures should be
17650 resident.
17651
17652 The priorities given in PRIORITIES are clamped to the range [0,1] before
17653 they are assigned. 0 indicates the lowest priority; textures with
17654 priority 0 are least likely to be resident. 1 indicates the highest
17655 priority; textures with priority 1 are most likely to be resident.
17656 However, textures are not guaranteed to be resident until they are used.
17657
17658 `glPrioritizeTextures' silently ignores attempts to prioritize texture 0
17659 or any texture name that does not correspond to an existing texture.
17660
17661 `glPrioritizeTextures' does not require that any of the textures named
17662 by TEXTURES be bound to a texture target. `glTexParameter' may also be
17663 used to set a texture's priority, but only if the texture is currently
17664 bound. This is the only way to set the priority of a default texture.
17665
17666 `GL_INVALID_VALUE' is generated if N is negative.
17667
17668 `GL_INVALID_OPERATION' is generated if `glPrioritizeTextures' is
17669 executed between the execution of `glBegin' and the corresponding
17670 execution of `glEnd'.")
17671
17672 (define-gl-procedures
17673 ((glPushAttrib (mask GLbitfield) -> void)
17674 (glPopAttrib -> void))
17675 "Push and pop the server attribute stack.
17676
17677 MASK
17678 Specifies a mask that indicates which attributes to save. Values
17679 for MASK are listed below.
17680
17681 `glPushAttrib' takes one argument, a mask that indicates which groups of
17682 state variables to save on the attribute stack. Symbolic constants are
17683 used to set bits in the mask. MASK is typically constructed by
17684 specifying the bitwise-or of several of these constants together. The
17685 special mask `GL_ALL_ATTRIB_BITS' can be used to save all stackable
17686 states.
17687
17688 The symbolic mask constants and their associated GL state are as follows
17689 (the second column lists which attributes are saved):
17690
17691
17692
17693 `GL_ACCUM_BUFFER_BIT'
17694 Accumulation buffer clear value
17695
17696 `GL_COLOR_BUFFER_BIT'
17697 `GL_ALPHA_TEST' enable bit
17698
17699
17700 Alpha test function and reference value
17701
17702
17703 `GL_BLEND' enable bit
17704
17705
17706 Blending source and destination functions
17707
17708
17709 Constant blend color
17710
17711
17712 Blending equation
17713
17714
17715 `GL_DITHER' enable bit
17716
17717
17718 `GL_DRAW_BUFFER' setting
17719
17720
17721 `GL_COLOR_LOGIC_OP' enable bit
17722
17723
17724 `GL_INDEX_LOGIC_OP' enable bit
17725
17726
17727 Logic op function
17728
17729
17730 Color mode and index mode clear values
17731
17732
17733 Color mode and index mode writemasks
17734
17735 `GL_CURRENT_BIT'
17736 Current RGBA color
17737
17738
17739 Current color index
17740
17741
17742 Current normal vector
17743
17744
17745 Current texture coordinates
17746
17747
17748 Current raster position
17749
17750
17751 `GL_CURRENT_RASTER_POSITION_VALID' flag
17752
17753
17754 RGBA color associated with current raster position
17755
17756
17757 Color index associated with current raster position
17758
17759
17760 Texture coordinates associated with current raster position
17761
17762
17763 `GL_EDGE_FLAG' flag
17764
17765 `GL_DEPTH_BUFFER_BIT'
17766 `GL_DEPTH_TEST' enable bit
17767
17768
17769 Depth buffer test function
17770
17771
17772 Depth buffer clear value
17773
17774
17775 `GL_DEPTH_WRITEMASK' enable bit
17776
17777 `GL_ENABLE_BIT'
17778 `GL_ALPHA_TEST' flag
17779
17780
17781 `GL_AUTO_NORMAL' flag
17782
17783
17784 `GL_BLEND' flag
17785
17786
17787 Enable bits for the user-definable clipping planes
17788
17789
17790 `GL_COLOR_MATERIAL'
17791
17792
17793 `GL_CULL_FACE' flag
17794
17795
17796 `GL_DEPTH_TEST' flag
17797
17798
17799 `GL_DITHER' flag
17800
17801
17802 `GL_FOG' flag
17803
17804
17805 `GL_LIGHT'I where `0' <= I < `GL_MAX_LIGHTS'
17806
17807
17808 `GL_LIGHTING' flag
17809
17810
17811 `GL_LINE_SMOOTH' flag
17812
17813
17814 `GL_LINE_STIPPLE' flag
17815
17816
17817 `GL_COLOR_LOGIC_OP' flag
17818
17819
17820 `GL_INDEX_LOGIC_OP' flag
17821
17822
17823 `GL_MAP1_'X where X is a map type
17824
17825
17826 `GL_MAP2_'X where X is a map type
17827
17828
17829 `GL_MULTISAMPLE' flag
17830
17831
17832 `GL_NORMALIZE' flag
17833
17834
17835 `GL_POINT_SMOOTH' flag
17836
17837
17838 `GL_POLYGON_OFFSET_LINE' flag
17839
17840
17841 `GL_POLYGON_OFFSET_FILL' flag
17842
17843
17844 `GL_POLYGON_OFFSET_POINT' flag
17845
17846
17847 `GL_POLYGON_SMOOTH' flag
17848
17849
17850 `GL_POLYGON_STIPPLE' flag
17851
17852
17853 `GL_SAMPLE_ALPHA_TO_COVERAGE' flag
17854
17855
17856 `GL_SAMPLE_ALPHA_TO_ONE' flag
17857
17858
17859 `GL_SAMPLE_COVERAGE' flag
17860
17861
17862 `GL_SCISSOR_TEST' flag
17863
17864
17865 `GL_STENCIL_TEST' flag
17866
17867
17868 `GL_TEXTURE_1D' flag
17869
17870
17871 `GL_TEXTURE_2D' flag
17872
17873
17874 `GL_TEXTURE_3D' flag
17875
17876
17877 Flags `GL_TEXTURE_GEN_'X where X is S, T, R, or Q
17878
17879 `GL_EVAL_BIT'
17880 `GL_MAP1_'X enable bits, where X is a map type
17881
17882
17883 `GL_MAP2_'X enable bits, where X is a map type
17884
17885
17886 1D grid endpoints and divisions
17887
17888
17889 2D grid endpoints and divisions
17890
17891
17892 `GL_AUTO_NORMAL' enable bit
17893
17894 `GL_FOG_BIT'
17895 `GL_FOG' enable bit
17896
17897
17898 Fog color
17899
17900
17901 Fog density
17902
17903
17904 Linear fog start
17905
17906
17907 Linear fog end
17908
17909
17910 Fog index
17911
17912
17913 `GL_FOG_MODE' value
17914
17915 `GL_HINT_BIT'
17916 `GL_PERSPECTIVE_CORRECTION_HINT' setting
17917
17918
17919 `GL_POINT_SMOOTH_HINT' setting
17920
17921
17922 `GL_LINE_SMOOTH_HINT' setting
17923
17924
17925 `GL_POLYGON_SMOOTH_HINT' setting
17926
17927
17928 `GL_FOG_HINT' setting
17929
17930
17931 `GL_GENERATE_MIPMAP_HINT' setting
17932
17933
17934 `GL_TEXTURE_COMPRESSION_HINT' setting
17935
17936 `GL_LIGHTING_BIT'
17937 `GL_COLOR_MATERIAL' enable bit
17938
17939
17940 `GL_COLOR_MATERIAL_FACE' value
17941
17942
17943 Color material parameters that are tracking the current color
17944
17945
17946 Ambient scene color
17947
17948
17949 `GL_LIGHT_MODEL_LOCAL_VIEWER' value
17950
17951
17952 `GL_LIGHT_MODEL_TWO_SIDE' setting
17953
17954
17955 `GL_LIGHTING' enable bit
17956
17957
17958 Enable bit for each light
17959
17960
17961 Ambient, diffuse, and specular intensity for each light
17962
17963
17964 Direction, position, exponent, and cutoff angle for each light
17965
17966
17967 Constant, linear, and quadratic attenuation factors for each light
17968
17969
17970 Ambient, diffuse, specular, and emissive color for each material
17971
17972
17973 Ambient, diffuse, and specular color indices for each material
17974
17975
17976 Specular exponent for each material
17977
17978
17979 `GL_SHADE_MODEL' setting
17980
17981 `GL_LINE_BIT'
17982 `GL_LINE_SMOOTH' flag
17983
17984
17985 `GL_LINE_STIPPLE' enable bit
17986
17987
17988 Line stipple pattern and repeat counter
17989
17990
17991 Line width
17992
17993 `GL_LIST_BIT'
17994 `GL_LIST_BASE' setting
17995
17996 `GL_MULTISAMPLE_BIT'
17997 `GL_MULTISAMPLE' flag
17998
17999
18000 `GL_SAMPLE_ALPHA_TO_COVERAGE' flag
18001
18002
18003 `GL_SAMPLE_ALPHA_TO_ONE' flag
18004
18005
18006 `GL_SAMPLE_COVERAGE' flag
18007
18008
18009 `GL_SAMPLE_COVERAGE_VALUE' value
18010
18011
18012 `GL_SAMPLE_COVERAGE_INVERT' value
18013
18014 `GL_PIXEL_MODE_BIT'
18015 `GL_RED_BIAS' and `GL_RED_SCALE' settings
18016
18017
18018 `GL_GREEN_BIAS' and `GL_GREEN_SCALE' values
18019
18020
18021 `GL_BLUE_BIAS' and `GL_BLUE_SCALE'
18022
18023
18024 `GL_ALPHA_BIAS' and `GL_ALPHA_SCALE'
18025
18026
18027 `GL_DEPTH_BIAS' and `GL_DEPTH_SCALE'
18028
18029
18030 `GL_INDEX_OFFSET' and `GL_INDEX_SHIFT' values
18031
18032
18033 `GL_MAP_COLOR' and `GL_MAP_STENCIL' flags
18034
18035
18036 `GL_ZOOM_X' and `GL_ZOOM_Y' factors
18037
18038
18039 `GL_READ_BUFFER' setting
18040
18041 `GL_POINT_BIT'
18042 `GL_POINT_SMOOTH' flag
18043
18044
18045 Point size
18046
18047 `GL_POLYGON_BIT'
18048 `GL_CULL_FACE' enable bit
18049
18050
18051 `GL_CULL_FACE_MODE' value
18052
18053
18054 `GL_FRONT_FACE' indicator
18055
18056
18057 `GL_POLYGON_MODE' setting
18058
18059
18060 `GL_POLYGON_SMOOTH' flag
18061
18062
18063 `GL_POLYGON_STIPPLE' enable bit
18064
18065
18066 `GL_POLYGON_OFFSET_FILL' flag
18067
18068
18069 `GL_POLYGON_OFFSET_LINE' flag
18070
18071
18072 `GL_POLYGON_OFFSET_POINT' flag
18073
18074
18075 `GL_POLYGON_OFFSET_FACTOR'
18076
18077
18078 `GL_POLYGON_OFFSET_UNITS'
18079
18080 `GL_POLYGON_STIPPLE_BIT'
18081 Polygon stipple image
18082
18083 `GL_SCISSOR_BIT'
18084 `GL_SCISSOR_TEST' flag
18085
18086
18087 Scissor box
18088
18089 `GL_STENCIL_BUFFER_BIT'
18090 `GL_STENCIL_TEST' enable bit
18091
18092
18093 Stencil function and reference value
18094
18095
18096 Stencil value mask
18097
18098
18099 Stencil fail, pass, and depth buffer pass actions
18100
18101
18102 Stencil buffer clear value
18103
18104
18105 Stencil buffer writemask
18106
18107 `GL_TEXTURE_BIT'
18108 Enable bits for the four texture coordinates
18109
18110
18111 Border color for each texture image
18112
18113
18114 Minification function for each texture image
18115
18116
18117 Magnification function for each texture image
18118
18119
18120 Texture coordinates and wrap mode for each texture image
18121
18122
18123 Color and mode for each texture environment
18124
18125
18126 Enable bits `GL_TEXTURE_GEN_'X, X is S, T, R, and Q
18127
18128
18129 `GL_TEXTURE_GEN_MODE' setting for S, T, R, and Q
18130
18131
18132 `glTexGen' plane equations for S, T, R, and Q
18133
18134
18135 Current texture bindings (for example, `GL_TEXTURE_BINDING_2D')
18136
18137 `GL_TRANSFORM_BIT'
18138 Coefficients of the six clipping planes
18139
18140
18141 Enable bits for the user-definable clipping planes
18142
18143
18144 `GL_MATRIX_MODE' value
18145
18146
18147 `GL_NORMALIZE' flag
18148
18149
18150 `GL_RESCALE_NORMAL' flag
18151
18152 `GL_VIEWPORT_BIT'
18153 Depth range (near and far)
18154
18155
18156 Viewport origin and extent
18157
18158 `glPopAttrib' restores the values of the state variables saved with the
18159 last `glPushAttrib' command. Those not saved are left unchanged.
18160
18161 It is an error to push attributes onto a full stack or to pop attributes
18162 off an empty stack. In either case, the error flag is set and no other
18163 change is made to GL state.
18164
18165 Initially, the attribute stack is empty.
18166
18167 `GL_STACK_OVERFLOW' is generated if `glPushAttrib' is called while the
18168 attribute stack is full.
18169
18170 `GL_STACK_UNDERFLOW' is generated if `glPopAttrib' is called while the
18171 attribute stack is empty.
18172
18173 `GL_INVALID_OPERATION' is generated if `glPushAttrib' or `glPopAttrib'
18174 is executed between the execution of `glBegin' and the corresponding
18175 execution of `glEnd'.")
18176
18177 (define-gl-procedures
18178 ((glPushClientAttrib (mask GLbitfield) -> void)
18179 (glPopClientAttrib -> void))
18180 "Push and pop the client attribute stack.
18181
18182 MASK
18183 Specifies a mask that indicates which attributes to save. Values
18184 for MASK are listed below.
18185
18186 `glPushClientAttrib' takes one argument, a mask that indicates which
18187 groups of client-state variables to save on the client attribute stack.
18188 Symbolic constants are used to set bits in the mask. MASK is typically
18189 constructed by specifying the bitwise-or of several of these constants
18190 together. The special mask `GL_CLIENT_ALL_ATTRIB_BITS' can be used to
18191 save all stackable client state.
18192
18193 The symbolic mask constants and their associated GL client state are as
18194 follows (the second column lists which attributes are saved):
18195
18196 `GL_CLIENT_PIXEL_STORE_BIT' Pixel storage modes
18197 `GL_CLIENT_VERTEX_ARRAY_BIT' Vertex arrays (and enables)
18198
18199 `glPopClientAttrib' restores the values of the client-state variables
18200 saved with the last `glPushClientAttrib'. Those not saved are left
18201 unchanged.
18202
18203 It is an error to push attributes onto a full client attribute stack or
18204 to pop attributes off an empty stack. In either case, the error flag is
18205 set, and no other change is made to GL state.
18206
18207 Initially, the client attribute stack is empty.
18208
18209 `GL_STACK_OVERFLOW' is generated if `glPushClientAttrib' is called while
18210 the attribute stack is full.
18211
18212 `GL_STACK_UNDERFLOW' is generated if `glPopClientAttrib' is called while
18213 the attribute stack is empty.")
18214
18215 (define-gl-procedures
18216 ((glPushMatrix -> void) (glPopMatrix -> void))
18217 "Push and pop the current matrix stack.
18218
18219 There is a stack of matrices for each of the matrix modes. In
18220 `GL_MODELVIEW' mode, the stack depth is at least 32. In the other
18221 modes, `GL_COLOR', `GL_PROJECTION', and `GL_TEXTURE', the depth is at
18222 least 2. The current matrix in any mode is the matrix on the top of the
18223 stack for that mode.
18224
18225 `glPushMatrix' pushes the current matrix stack down by one, duplicating
18226 the current matrix. That is, after a `glPushMatrix' call, the matrix on
18227 top of the stack is identical to the one below it.
18228
18229 `glPopMatrix' pops the current matrix stack, replacing the current
18230 matrix with the one below it on the stack.
18231
18232 Initially, each of the stacks contains one matrix, an identity matrix.
18233
18234 It is an error to push a full matrix stack or to pop a matrix stack that
18235 contains only a single matrix. In either case, the error flag is set
18236 and no other change is made to GL state.
18237
18238 `GL_STACK_OVERFLOW' is generated if `glPushMatrix' is called while the
18239 current matrix stack is full.
18240
18241 `GL_STACK_UNDERFLOW' is generated if `glPopMatrix' is called while the
18242 current matrix stack contains only a single matrix.
18243
18244 `GL_INVALID_OPERATION' is generated if `glPushMatrix' or `glPopMatrix'
18245 is executed between the execution of `glBegin' and the corresponding
18246 execution of `glEnd'.")
18247
18248 (define-gl-procedures
18249 ((glPushName (name GLuint) -> void)
18250 (glPopName -> void))
18251 "Push and pop the name stack.
18252
18253 NAME
18254 Specifies a name that will be pushed onto the name stack.
18255
18256 The name stack is used during selection mode to allow sets of rendering
18257 commands to be uniquely identified. It consists of an ordered set of
18258 unsigned integers and is initially empty.
18259
18260 `glPushName' causes NAME to be pushed onto the name stack. `glPopName'
18261 pops one name off the top of the stack.
18262
18263 The maximum name stack depth is implementation-dependent; call
18264 `GL_MAX_NAME_STACK_DEPTH' to find out the value for a particular
18265 implementation. It is an error to push a name onto a full stack or to
18266 pop a name off an empty stack. It is also an error to manipulate the
18267 name stack between the execution of `glBegin' and the corresponding
18268 execution of `glEnd'. In any of these cases, the error flag is set and
18269 no other change is made to GL state.
18270
18271 The name stack is always empty while the render mode is not `GL_SELECT'.
18272 Calls to `glPushName' or `glPopName' while the render mode is not
18273 `GL_SELECT' are ignored.
18274
18275 `GL_STACK_OVERFLOW' is generated if `glPushName' is called while the
18276 name stack is full.
18277
18278 `GL_STACK_UNDERFLOW' is generated if `glPopName' is called while the
18279 name stack is empty.
18280
18281 `GL_INVALID_OPERATION' is generated if `glPushName' or `glPopName' is
18282 executed between a call to `glBegin' and the corresponding call to
18283 `glEnd'.")
18284
18285 (define-gl-procedures
18286 ((glRasterPos2s (x GLshort) (y GLshort) -> void)
18287 (glRasterPos2i (x GLint) (y GLint) -> void)
18288 (glRasterPos2f (x GLfloat) (y GLfloat) -> void)
18289 (glRasterPos2d (x GLdouble) (y GLdouble) -> void)
18290 (glRasterPos3s
18291 (x GLshort)
18292 (y GLshort)
18293 (z GLshort)
18294 ->
18295 void)
18296 (glRasterPos3i
18297 (x GLint)
18298 (y GLint)
18299 (z GLint)
18300 ->
18301 void)
18302 (glRasterPos3f
18303 (x GLfloat)
18304 (y GLfloat)
18305 (z GLfloat)
18306 ->
18307 void)
18308 (glRasterPos3d
18309 (x GLdouble)
18310 (y GLdouble)
18311 (z GLdouble)
18312 ->
18313 void)
18314 (glRasterPos4s
18315 (x GLshort)
18316 (y GLshort)
18317 (z GLshort)
18318 (w GLshort)
18319 ->
18320 void)
18321 (glRasterPos4i
18322 (x GLint)
18323 (y GLint)
18324 (z GLint)
18325 (w GLint)
18326 ->
18327 void)
18328 (glRasterPos4f
18329 (x GLfloat)
18330 (y GLfloat)
18331 (z GLfloat)
18332 (w GLfloat)
18333 ->
18334 void)
18335 (glRasterPos4d
18336 (x GLdouble)
18337 (y GLdouble)
18338 (z GLdouble)
18339 (w GLdouble)
18340 ->
18341 void)
18342 (glRasterPos2sv (v const-GLshort-*) -> void)
18343 (glRasterPos2iv (v const-GLint-*) -> void)
18344 (glRasterPos2fv (v const-GLfloat-*) -> void)
18345 (glRasterPos2dv (v const-GLdouble-*) -> void)
18346 (glRasterPos3sv (v const-GLshort-*) -> void)
18347 (glRasterPos3iv (v const-GLint-*) -> void)
18348 (glRasterPos3fv (v const-GLfloat-*) -> void)
18349 (glRasterPos3dv (v const-GLdouble-*) -> void)
18350 (glRasterPos4sv (v const-GLshort-*) -> void)
18351 (glRasterPos4iv (v const-GLint-*) -> void)
18352 (glRasterPos4fv (v const-GLfloat-*) -> void)
18353 (glRasterPos4dv (v const-GLdouble-*) -> void))
18354 "Specify the raster position for pixel operations.
18355
18356 X
18357 Y
18358
18359 Z
18360
18361 W
18362
18363 Specify the X , Y , Z , and W object coordinates (if present) for
18364 the raster position.
18365
18366 The GL maintains a 3D position in window coordinates. This position,
18367 called the raster position, is used to position pixel and bitmap write
18368 operations. It is maintained with subpixel accuracy. See `glBitmap',
18369 `glDrawPixels', and `glCopyPixels'.
18370
18371 The current raster position consists of three window coordinates (X , Y
18372 , Z ), a clip coordinate value (W ), an eye coordinate distance, a valid
18373 bit, and associated color data and texture coordinates. The W
18374 coordinate is a clip coordinate, because W is not projected to window
18375 coordinates. `glRasterPos4' specifies object coordinates X , Y , Z ,
18376 and W explicitly. `glRasterPos3' specifies object coordinate X , Y ,
18377 and Z explicitly, while W is implicitly set to 1. `glRasterPos2' uses
18378 the argument values for X and Y while implicitly setting Z and W to 0
18379 and 1.
18380
18381 The object coordinates presented by `glRasterPos' are treated just like
18382 those of a `glVertex' command: They are transformed by the current
18383 modelview and projection matrices and passed to the clipping stage. If
18384 the vertex is not culled, then it is projected and scaled to window
18385 coordinates, which become the new current raster position, and the
18386 `GL_CURRENT_RASTER_POSITION_VALID' flag is set. If the vertex IS
18387 culled, then the valid bit is cleared and the current raster position
18388 and associated color and texture coordinates are undefined.
18389
18390 The current raster position also includes some associated color data and
18391 texture coordinates. If lighting is enabled, then
18392 `GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `GL_CURRENT_RASTER_INDEX'
18393 (in color index mode) is set to the color produced by the lighting
18394 calculation (see `glLight', `glLightModel', and `glShadeModel'). If
18395 lighting is disabled, current color (in RGBA mode, state variable
18396 `GL_CURRENT_COLOR') or color index (in color index mode, state variable
18397 `GL_CURRENT_INDEX') is used to update the current raster color.
18398 `GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated.
18399
18400 Likewise, `GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of
18401 `GL_CURRENT_TEXTURE_COORDS', based on the texture matrix and the texture
18402 generation functions (see `glTexGen'). Finally, the distance from the
18403 origin of the eye coordinate system to the vertex as transformed by only
18404 the modelview matrix replaces `GL_CURRENT_RASTER_DISTANCE'.
18405
18406 Initially, the current raster position is (0, 0, 0, 1), the current
18407 raster distance is 0, the valid bit is set, the associated RGBA color is
18408 (1, 1, 1, 1), the associated color index is 1, and the associated
18409 texture coordinates are (0, 0, 0, 1). In RGBA mode,
18410 `GL_CURRENT_RASTER_INDEX' is always 1; in color index mode, the current
18411 raster RGBA color always maintains its initial value.
18412
18413 `GL_INVALID_OPERATION' is generated if `glRasterPos' is executed between
18414 the execution of `glBegin' and the corresponding execution of `glEnd'.")
18415
18416 (define-gl-procedures
18417 ((glReadBuffer (mode GLenum) -> void))
18418 "Select a color buffer source for pixels.
18419
18420 MODE
18421 Specifies a color buffer. Accepted values are `GL_FRONT_LEFT',
18422 `GL_FRONT_RIGHT', `GL_BACK_LEFT', `GL_BACK_RIGHT', `GL_FRONT',
18423 `GL_BACK', `GL_LEFT', `GL_RIGHT', and `GL_AUX'I, where I is between
18424 0 and the value of `GL_AUX_BUFFERS' minus 1.
18425
18426 `glReadBuffer' specifies a color buffer as the source for subsequent
18427 `glReadPixels', `glCopyTexImage1D', `glCopyTexImage2D',
18428 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D', and
18429 `glCopyPixels' commands. MODE accepts one of twelve or more predefined
18430 values. (`GL_AUX0' through `GL_AUX3' are always defined.) In a fully
18431 configured system, `GL_FRONT', `GL_LEFT', and `GL_FRONT_LEFT' all name
18432 the front left buffer, `GL_FRONT_RIGHT' and `GL_RIGHT' name the front
18433 right buffer, and `GL_BACK_LEFT' and `GL_BACK' name the back left
18434 buffer.
18435
18436 Nonstereo double-buffered configurations have only a front left and a
18437 back left buffer. Single-buffered configurations have a front left and
18438 a front right buffer if stereo, and only a front left buffer if
18439 nonstereo. It is an error to specify a nonexistent buffer to
18440 `glReadBuffer'.
18441
18442 MODE is initially `GL_FRONT' in single-buffered configurations and
18443 `GL_BACK' in double-buffered configurations.
18444
18445 `GL_INVALID_ENUM' is generated if MODE is not one of the twelve (or
18446 more) accepted values.
18447
18448 `GL_INVALID_OPERATION' is generated if MODE specifies a buffer that does
18449 not exist.
18450
18451 `GL_INVALID_OPERATION' is generated if `glReadBuffer' is executed
18452 between the execution of `glBegin' and the corresponding execution of
18453 `glEnd'.")
18454
18455 (define-gl-procedures
18456 ((glReadPixels
18457 (x GLint)
18458 (y GLint)
18459 (width GLsizei)
18460 (height GLsizei)
18461 (format GLenum)
18462 (type GLenum)
18463 (data GLvoid-*)
18464 ->
18465 void))
18466 "Read a block of pixels from the frame buffer.
18467
18468 X
18469 Y
18470
18471 Specify the window coordinates of the first pixel that is read from
18472 the frame buffer. This location is the lower left corner of a
18473 rectangular block of pixels.
18474
18475 WIDTH
18476 HEIGHT
18477
18478 Specify the dimensions of the pixel rectangle. WIDTH and HEIGHT of
18479 one correspond to a single pixel.
18480
18481 FORMAT
18482 Specifies the format of the pixel data. The following symbolic
18483 values are accepted: `GL_COLOR_INDEX', `GL_STENCIL_INDEX',
18484 `GL_DEPTH_COMPONENT', `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA',
18485 `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and
18486 `GL_LUMINANCE_ALPHA'.
18487
18488 TYPE
18489 Specifies the data type of the pixel data. Must be one of
18490 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
18491 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
18492 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
18493 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
18494 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
18495 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
18496 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
18497 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV'.
18498
18499 DATA
18500 Returns the pixel data.
18501
18502 `glReadPixels' returns pixel data from the frame buffer, starting with
18503 the pixel whose lower left corner is at location (X, Y), into client
18504 memory starting at location DATA. Several parameters control the
18505 processing of the pixel data before it is placed into client memory.
18506 These parameters are set with three commands: `glPixelStore',
18507 `glPixelTransfer', and `glPixelMap'. This reference page describes the
18508 effects on `glReadPixels' of most, but not all of the parameters
18509 specified by these three commands.
18510
18511 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
18512 target (see `glBindBuffer') while a block of pixels is requested, DATA
18513 is treated as a byte offset into the buffer object's data store rather
18514 than a pointer to client memory.
18515
18516 When the `ARB_imaging' extension is supported, the pixel data may be
18517 processed by additional operations including color table lookup, color
18518 matrix transformations, convolutions, histograms, and minimum and
18519 maximum pixel value computations.
18520
18521 `glReadPixels' returns values from each pixel with lower left corner at
18522 (X+I,Y+J) for 0<=I<WIDTH and 0<=J<HEIGHT . This pixel is said to be the
18523 I th pixel in the J th row. Pixels are returned in row order from the
18524 lowest to the highest row, left to right in each row.
18525
18526 FORMAT specifies the format for the returned pixel values; accepted
18527 values are:
18528
18529 `GL_COLOR_INDEX'
18530 Color indices are read from the color buffer selected by
18531 `glReadBuffer'. Each index is converted to fixed point, shifted
18532 left or right depending on the value and sign of `GL_INDEX_SHIFT',
18533 and added to `GL_INDEX_OFFSET'. If `GL_MAP_COLOR' is `GL_TRUE',
18534 indices are replaced by their mappings in the table
18535 `GL_PIXEL_MAP_I_TO_I'.
18536
18537 `GL_STENCIL_INDEX'
18538 Stencil values are read from the stencil buffer. Each index is
18539 converted to fixed point, shifted left or right depending on the
18540 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'.
18541 If `GL_MAP_STENCIL' is `GL_TRUE', indices are replaced by their
18542 mappings in the table `GL_PIXEL_MAP_S_TO_S'.
18543
18544 `GL_DEPTH_COMPONENT'
18545 Depth values are read from the depth buffer. Each component is
18546 converted to floating point such that the minimum depth value maps
18547 to 0 and the maximum value maps to 1. Each component is then
18548 multiplied by `GL_DEPTH_SCALE', added to `GL_DEPTH_BIAS', and
18549 finally clamped to the range [0,1] .
18550
18551 `GL_RED'
18552 `GL_GREEN'
18553 `GL_BLUE'
18554 `GL_ALPHA'
18555 `GL_RGB'
18556 `GL_BGR'
18557 `GL_RGBA'
18558 `GL_BGRA'
18559 `GL_LUMINANCE'
18560 `GL_LUMINANCE_ALPHA'
18561 Processing differs depending on whether color buffers store color
18562 indices or RGBA color components. If color indices are stored,
18563 they are read from the color buffer selected by `glReadBuffer'.
18564 Each index is converted to fixed point, shifted left or right
18565 depending on the value and sign of `GL_INDEX_SHIFT', and added to
18566 `GL_INDEX_OFFSET'. Indices are then replaced by the red, green,
18567 blue, and alpha values obtained by indexing the tables
18568 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
18569 `GL_PIXEL_MAP_I_TO_B', and `GL_PIXEL_MAP_I_TO_A'. Each table must
18570 be of size 2^N , but N may be different for different tables.
18571 Before an index is used to look up a value in a table of size 2^N ,
18572 it must be masked against 2^N-1 .
18573
18574 If RGBA color components are stored in the color buffers, they are
18575 read from the color buffer selected by `glReadBuffer'. Each color
18576 component is converted to floating point such that zero intensity
18577 maps to 0.0 and full intensity maps to 1.0. Each component is then
18578 multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where C is
18579 RED, GREEN, BLUE, or ALPHA. Finally, if `GL_MAP_COLOR' is
18580 `GL_TRUE', each component is clamped to the range [0,1] , scaled to
18581 the size of its corresponding table, and is then replaced by its
18582 mapping in the table `GL_PIXEL_MAP_c_TO_c', where C is R, G, B, or
18583 A.
18584
18585 Unneeded data is then discarded. For example, `GL_RED' discards
18586 the green, blue, and alpha components, while `GL_RGB' discards only
18587 the alpha component. `GL_LUMINANCE' computes a single-component
18588 value as the sum of the red, green, and blue components, and
18589 `GL_LUMINANCE_ALPHA' does the same, while keeping alpha as a second
18590 value. The final values are clamped to the range [0,1] .
18591
18592 The shift, scale, bias, and lookup factors just described are all
18593 specified by `glPixelTransfer'. The lookup table contents themselves
18594 are specified by `glPixelMap'.
18595
18596 Finally, the indices or components are converted to the proper format,
18597 as specified by TYPE. If FORMAT is `GL_COLOR_INDEX' or
18598 `GL_STENCIL_INDEX' and TYPE is not `GL_FLOAT', each index is masked with
18599 the mask value given in the following table. If TYPE is `GL_FLOAT',
18600 then each integer index is converted to single-precision floating-point
18601 format.
18602
18603 If FORMAT is `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
18604 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'
18605 and TYPE is not `GL_FLOAT', each component is multiplied by the
18606 multiplier shown in the following table. If type is `GL_FLOAT', then
18607 each component is passed as is (or converted to the client's
18608 single-precision floating-point format if it is different from the one
18609 used by the GL).
18610
18611
18612
18613 TYPE
18614 *Index Mask*, *Component Conversion*
18615
18616 `GL_UNSIGNED_BYTE'
18617 2^8-1 , (2^8-1,)\u2062C
18618
18619 `GL_BYTE'
18620 2^7-1 , (2^8-1,)\u2062C-1,/2
18621
18622 `GL_BITMAP'
18623 1 , 1
18624
18625 `GL_UNSIGNED_SHORT'
18626 2^16-1 , (2^16-1,)\u2062C
18627
18628 `GL_SHORT'
18629 2^15-1 , (2^16-1,)\u2062C-1,/2
18630
18631 `GL_UNSIGNED_INT'
18632 2^32-1 , (2^32-1,)\u2062C
18633
18634 `GL_INT'
18635 2^31-1 , (2^32-1,)\u2062C-1,/2
18636
18637 `GL_FLOAT'
18638 none , C
18639
18640 Return values are placed in memory as follows. If FORMAT is
18641 `GL_COLOR_INDEX', `GL_STENCIL_INDEX', `GL_DEPTH_COMPONENT', `GL_RED',
18642 `GL_GREEN', `GL_BLUE', `GL_ALPHA', or `GL_LUMINANCE', a single value is
18643 returned and the data for the I th pixel in the J th row is placed in
18644 location (J,)\u2062WIDTH+I . `GL_RGB' and `GL_BGR' return three values,
18645 `GL_RGBA' and `GL_BGRA' return four values, and `GL_LUMINANCE_ALPHA'
18646 returns two values for each pixel, with all values corresponding to a
18647 single pixel occupying contiguous space in DATA. Storage parameters set
18648 by `glPixelStore', such as `GL_PACK_LSB_FIRST' and `GL_PACK_SWAP_BYTES',
18649 affect the way that data is written into memory. See `glPixelStore' for
18650 a description.
18651
18652 `GL_INVALID_ENUM' is generated if FORMAT or TYPE is not an accepted
18653 value.
18654
18655 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
18656 `GL_COLOR_INDEX' or `GL_STENCIL_INDEX'.
18657
18658 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
18659
18660 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_COLOR_INDEX' and
18661 the color buffers store RGBA color components.
18662
18663 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_STENCIL_INDEX' and
18664 there is no stencil buffer.
18665
18666 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
18667 and there is no depth buffer.
18668
18669 `GL_INVALID_OPERATION' is generated if TYPE is one of
18670 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
18671 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
18672 is not `GL_RGB'.
18673
18674 `GL_INVALID_OPERATION' is generated if TYPE is one of
18675 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
18676 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
18677 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
18678 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
18679 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
18680
18681 The formats `GL_BGR', and `GL_BGRA' and types `GL_UNSIGNED_BYTE_3_3_2',
18682 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
18683 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
18684 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
18685 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
18686 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
18687 `GL_UNSIGNED_INT_2_10_10_10_REV' are available only if the GL version is
18688 1.2 or greater.
18689
18690 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18691 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
18692 store is currently mapped.
18693
18694 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18695 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
18696 to the buffer object such that the memory writes required would exceed
18697 the data store size.
18698
18699 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18700 bound to the `GL_PIXEL_PACK_BUFFER' target and DATA is not evenly
18701 divisible into the number of bytes needed to store in memory a datum
18702 indicated by TYPE.
18703
18704 `GL_INVALID_OPERATION' is generated if `glReadPixels' is executed
18705 between the execution of `glBegin' and the corresponding execution of
18706 `glEnd'.")
18707
18708 (define-gl-procedures
18709 ((glRectd
18710 (x1 GLdouble)
18711 (y1 GLdouble)
18712 (x2 GLdouble)
18713 (y2 GLdouble)
18714 ->
18715 void)
18716 (glRectf
18717 (x1 GLfloat)
18718 (y1 GLfloat)
18719 (x2 GLfloat)
18720 (y2 GLfloat)
18721 ->
18722 void)
18723 (glRecti
18724 (x1 GLint)
18725 (y1 GLint)
18726 (x2 GLint)
18727 (y2 GLint)
18728 ->
18729 void)
18730 (glRects
18731 (x1 GLshort)
18732 (y1 GLshort)
18733 (x2 GLshort)
18734 (y2 GLshort)
18735 ->
18736 void)
18737 (glRectdv
18738 (v1 const-GLdouble-*)
18739 (v2 const-GLdouble-*)
18740 ->
18741 void)
18742 (glRectfv
18743 (v1 const-GLfloat-*)
18744 (v2 const-GLfloat-*)
18745 ->
18746 void)
18747 (glRectiv
18748 (v1 const-GLint-*)
18749 (v2 const-GLint-*)
18750 ->
18751 void)
18752 (glRectsv
18753 (v1 const-GLshort-*)
18754 (v2 const-GLshort-*)
18755 ->
18756 void))
18757 "Draw a rectangle.
18758
18759 X1
18760 Y1
18761
18762 Specify one vertex of a rectangle.
18763
18764 X2
18765 Y2
18766
18767 Specify the opposite vertex of the rectangle.
18768
18769 `glRect' supports efficient specification of rectangles as two corner
18770 points. Each rectangle command takes four arguments, organized either
18771 as two consecutive pairs of (X,Y) coordinates or as two pointers to
18772 arrays, each containing an (X,Y) pair. The resulting rectangle is
18773 defined in the Z=0 plane.
18774
18775 `glRect'(X1, Y1, X2, Y2) is exactly equivalent to the following
18776 sequence: Note that if the second vertex is above and to the right of
18777 the first vertex, the rectangle is constructed with a counterclockwise
18778 winding.
18779
18780
18781 glBegin(`GL_POLYGON');
18782 glVertex2(X1, Y1);
18783 glVertex2(X2, Y1);
18784 glVertex2(X2, Y2);
18785 glVertex2(X1, Y2);
18786 glEnd();
18787
18788 `GL_INVALID_OPERATION' is generated if `glRect' is executed between the
18789 execution of `glBegin' and the corresponding execution of `glEnd'.")
18790
18791 (define-gl-procedures
18792 ((glRenderMode (mode GLenum) -> GLint))
18793 "Set rasterization mode.
18794
18795 MODE
18796 Specifies the rasterization mode. Three values are accepted:
18797 `GL_RENDER', `GL_SELECT', and `GL_FEEDBACK'. The initial value is
18798 `GL_RENDER'.
18799
18800 `glRenderMode' sets the rasterization mode. It takes one argument,
18801 MODE, which can assume one of three predefined values:
18802
18803 `GL_RENDER'
18804 Render mode. Primitives are rasterized, producing pixel fragments,
18805 which are written into the frame buffer. This is the normal mode
18806 and also the default mode.
18807
18808 `GL_SELECT'
18809 Selection mode. No pixel fragments are produced, and no change to
18810 the frame buffer contents is made. Instead, a record of the names
18811 of primitives that would have been drawn if the render mode had
18812 been `GL_RENDER' is returned in a select buffer, which must be
18813 created (see `glSelectBuffer') before selection mode is entered.
18814
18815 `GL_FEEDBACK'
18816 Feedback mode. No pixel fragments are produced, and no change to
18817 the frame buffer contents is made. Instead, the coordinates and
18818 attributes of vertices that would have been drawn if the render
18819 mode had been `GL_RENDER' is returned in a feedback buffer, which
18820 must be created (see `glFeedbackBuffer') before feedback mode is
18821 entered.
18822
18823 The return value of `glRenderMode' is determined by the render mode at
18824 the time `glRenderMode' is called, rather than by MODE. The values
18825 returned for the three render modes are as follows:
18826
18827 `GL_RENDER'
18828 0.
18829
18830 `GL_SELECT'
18831 The number of hit records transferred to the select buffer.
18832
18833 `GL_FEEDBACK'
18834 The number of values (not vertices) transferred to the feedback
18835 buffer.
18836
18837 See the `glSelectBuffer' and `glFeedbackBuffer' reference pages for more
18838 details concerning selection and feedback operation.
18839
18840 `GL_INVALID_ENUM' is generated if MODE is not one of the three accepted
18841 values.
18842
18843 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is called while
18844 the render mode is `GL_SELECT', or if `glRenderMode' is called with
18845 argument `GL_SELECT' before `glSelectBuffer' is called at least once.
18846
18847 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is called
18848 while the render mode is `GL_FEEDBACK', or if `glRenderMode' is called
18849 with argument `GL_FEEDBACK' before `glFeedbackBuffer' is called at least
18850 once.
18851
18852 `GL_INVALID_OPERATION' is generated if `glRenderMode' is executed
18853 between the execution of `glBegin' and the corresponding execution of
18854 `glEnd'.")
18855
18856 (define-gl-procedures
18857 ((glResetHistogram (target GLenum) -> void))
18858 "Reset histogram table entries to zero.
18859
18860 TARGET
18861 Must be `GL_HISTOGRAM'.
18862
18863 `glResetHistogram' resets all the elements of the current histogram
18864 table to zero.
18865
18866 `GL_INVALID_ENUM' is generated if TARGET is not `GL_HISTOGRAM'.
18867
18868 `GL_INVALID_OPERATION' is generated if `glResetHistogram' is executed
18869 between the execution of `glBegin' and the corresponding execution of
18870 `glEnd'.")
18871
18872 (define-gl-procedures
18873 ((glResetMinmax (target GLenum) -> void))
18874 "Reset minmax table entries to initial values.
18875
18876 TARGET
18877 Must be `GL_MINMAX'.
18878
18879 `glResetMinmax' resets the elements of the current minmax table to their
18880 initial values: the ``maximum'' element receives the minimum possible
18881 component values, and the ``minimum'' element receives the maximum
18882 possible component values.
18883
18884 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
18885
18886 `GL_INVALID_OPERATION' is generated if `glResetMinmax' is executed
18887 between the execution of `glBegin' and the corresponding execution of
18888 `glEnd'.")
18889
18890 (define-gl-procedures
18891 ((glRotated
18892 (angle GLdouble)
18893 (x GLdouble)
18894 (y GLdouble)
18895 (z GLdouble)
18896 ->
18897 void)
18898 (glRotatef
18899 (angle GLfloat)
18900 (x GLfloat)
18901 (y GLfloat)
18902 (z GLfloat)
18903 ->
18904 void))
18905 "Multiply the current matrix by a rotation matrix.
18906
18907 ANGLE
18908 Specifies the angle of rotation, in degrees.
18909
18910 X
18911 Y
18912
18913 Z
18914
18915 Specify the X, Y, and Z coordinates of a vector, respectively.
18916
18917 `glRotate' produces a rotation of ANGLE degrees around the vector (X,YZ)
18918 . The current matrix (see `glMatrixMode') is multiplied by a rotation
18919 matrix with the product replacing the current matrix, as if
18920 `glMultMatrix' were called with the following matrix as its argument:
18921
18922 ((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
18923 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
18924 Z^2\u2061(1-C,)+C 0), (0 0 0 1),)
18925
18926
18927
18928 Where C=COS\u2061(ANGLE,) , S=SIN\u2061(ANGLE,) , and ∥(X,YZ),∥=1 (if not, the GL
18929 will normalize this vector).
18930
18931
18932
18933
18934
18935 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
18936 objects drawn after `glRotate' is called are rotated. Use
18937 `glPushMatrix' and `glPopMatrix' to save and restore the unrotated
18938 coordinate system.
18939
18940 `GL_INVALID_OPERATION' is generated if `glRotate' is executed between
18941 the execution of `glBegin' and the corresponding execution of `glEnd'.")
18942
18943 (define-gl-procedures
18944 ((glSampleCoverage
18945 (value GLclampf)
18946 (invert GLboolean)
18947 ->
18948 void))
18949 "Specify multisample coverage parameters.
18950
18951 VALUE
18952 Specify a single floating-point sample coverage value. The value
18953 is clamped to the range [0,1] . The initial value is 1.0.
18954
18955 INVERT
18956 Specify a single boolean value representing if the coverage masks
18957 should be inverted. `GL_TRUE' and `GL_FALSE' are accepted. The
18958 initial value is `GL_FALSE'.
18959
18960 Multisampling samples a pixel multiple times at various
18961 implementation-dependent subpixel locations to generate antialiasing
18962 effects. Multisampling transparently antialiases points, lines,
18963 polygons, bitmaps, and images if it is enabled.
18964
18965 VALUE is used in constructing a temporary mask used in determining which
18966 samples will be used in resolving the final fragment color. This mask
18967 is bitwise-anded with the coverage mask generated from the multisampling
18968 computation. If the INVERT flag is set, the temporary mask is inverted
18969 (all bits flipped) and then the bitwise-and is computed.
18970
18971 If an implementation does not have any multisample buffers available, or
18972 multisampling is disabled, rasterization occurs with only a single
18973 sample computing a pixel's final RGB color.
18974
18975 Provided an implementation supports multisample buffers, and
18976 multisampling is enabled, then a pixel's final color is generated by
18977 combining several samples per pixel. Each sample contains color, depth,
18978 and stencil information, allowing those operations to be performed on
18979 each sample.
18980
18981 `GL_INVALID_OPERATION' is generated if `glSampleCoverage' is executed
18982 between the execution of `glBegin' and the corresponding execution of
18983 `glEnd'.")
18984
18985 (define-gl-procedures
18986 ((glScaled
18987 (x GLdouble)
18988 (y GLdouble)
18989 (z GLdouble)
18990 ->
18991 void)
18992 (glScalef
18993 (x GLfloat)
18994 (y GLfloat)
18995 (z GLfloat)
18996 ->
18997 void))
18998 "Multiply the current matrix by a general scaling matrix.
18999
19000 X
19001 Y
19002
19003 Z
19004
19005 Specify scale factors along the X, Y, and Z axes, respectively.
19006
19007 `glScale' produces a nonuniform scaling along the X, Y, and Z axes. The
19008 three parameters indicate the desired scale factor along each of the
19009 three axes.
19010
19011 The current matrix (see `glMatrixMode') is multiplied by this scale
19012 matrix, and the product replaces the current matrix as if `glMultMatrix'
19013 were called with the following matrix as its argument:
19014
19015 ((X 0 0 0), (0 Y 0 0), (0 0 Z 0), (0 0 0 1),)
19016
19017 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
19018 objects drawn after `glScale' is called are scaled.
19019
19020 Use `glPushMatrix' and `glPopMatrix' to save and restore the unscaled
19021 coordinate system.
19022
19023 `GL_INVALID_OPERATION' is generated if `glScale' is executed between the
19024 execution of `glBegin' and the corresponding execution of `glEnd'.")
19025
19026 (define-gl-procedures
19027 ((glScissor
19028 (x GLint)
19029 (y GLint)
19030 (width GLsizei)
19031 (height GLsizei)
19032 ->
19033 void))
19034 "Define the scissor box.
19035
19036 X
19037 Y
19038
19039 Specify the lower left corner of the scissor box. Initially (0,
19040 0).
19041
19042 WIDTH
19043 HEIGHT
19044
19045 Specify the width and height of the scissor box. When a GL context
19046 is first attached to a window, WIDTH and HEIGHT are set to the
19047 dimensions of that window.
19048
19049 `glScissor' defines a rectangle, called the scissor box, in window
19050 coordinates. The first two arguments, X and Y, specify the lower left
19051 corner of the box. WIDTH and HEIGHT specify the width and height of the
19052 box.
19053
19054 To enable and disable the scissor test, call `glEnable' and `glDisable'
19055 with argument `GL_SCISSOR_TEST'. The test is initially disabled. While
19056 the test is enabled, only pixels that lie within the scissor box can be
19057 modified by drawing commands. Window coordinates have integer values at
19058 the shared corners of frame buffer pixels. `glScissor(0,0,1,1)' allows
19059 modification of only the lower left pixel in the window, and
19060 `glScissor(0,0,0,0)' doesn't allow modification of any pixels in the
19061 window.
19062
19063 When the scissor test is disabled, it is as though the scissor box
19064 includes the entire window.
19065
19066 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
19067
19068 `GL_INVALID_OPERATION' is generated if `glScissor' is executed between
19069 the execution of `glBegin' and the corresponding execution of `glEnd'.")
19070
19071 (define-gl-procedures
19072 ((glSecondaryColorPointer
19073 (size GLint)
19074 (type GLenum)
19075 (stride GLsizei)
19076 (pointer const-GLvoid-*)
19077 ->
19078 void))
19079 "Define an array of secondary colors.
19080
19081 SIZE
19082 Specifies the number of components per color. Must be 3.
19083
19084 TYPE
19085 Specifies the data type of each color component in the array.
19086 Symbolic constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
19087 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', or
19088 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
19089
19090 STRIDE
19091 Specifies the byte offset between consecutive colors. If STRIDE is
19092 0, the colors are understood to be tightly packed in the array. The
19093 initial value is 0.
19094
19095 POINTER
19096 Specifies a pointer to the first component of the first color
19097 element in the array. The initial value is 0.
19098
19099 `glSecondaryColorPointer' specifies the location and data format of an
19100 array of color components to use when rendering. SIZE specifies the
19101 number of components per color, and must be 3. TYPE specifies the data
19102 type of each color component, and STRIDE specifies the byte stride from
19103 one color to the next, allowing vertices and attributes to be packed
19104 into a single array or stored in separate arrays.
19105
19106 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
19107 target (see `glBindBuffer') while a secondary color array is specified,
19108 POINTER is treated as a byte offset into the buffer object's data store.
19109 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
19110 secondary color vertex array client-side state
19111 (`GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING').
19112
19113 When a secondary color array is specified, SIZE, TYPE, STRIDE, and
19114 POINTER are saved as client-side state, in addition to the current
19115 vertex array buffer object binding.
19116
19117 To enable and disable the secondary color array, call
19118 `glEnableClientState' and `glDisableClientState' with the argument
19119 `GL_SECONDARY_COLOR_ARRAY'. If enabled, the secondary color array is
19120 used when `glArrayElement', `glDrawArrays', `glMultiDrawArrays',
19121 `glDrawElements', `glMultiDrawElements', or `glDrawRangeElements' is
19122 called.
19123
19124 `GL_INVALID_VALUE' is generated if SIZE is not 3.
19125
19126 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
19127
19128 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
19129
19130 (define-gl-procedures
19131 ((glSecondaryColor3b
19132 (red GLbyte)
19133 (green GLbyte)
19134 (blue GLbyte)
19135 ->
19136 void)
19137 (glSecondaryColor3s
19138 (red GLshort)
19139 (green GLshort)
19140 (blue GLshort)
19141 ->
19142 void)
19143 (glSecondaryColor3i
19144 (red GLint)
19145 (green GLint)
19146 (blue GLint)
19147 ->
19148 void)
19149 (glSecondaryColor3f
19150 (red GLfloat)
19151 (green GLfloat)
19152 (blue GLfloat)
19153 ->
19154 void)
19155 (glSecondaryColor3d
19156 (red GLdouble)
19157 (green GLdouble)
19158 (blue GLdouble)
19159 ->
19160 void)
19161 (glSecondaryColor3ub
19162 (red GLubyte)
19163 (green GLubyte)
19164 (blue GLubyte)
19165 ->
19166 void)
19167 (glSecondaryColor3us
19168 (red GLushort)
19169 (green GLushort)
19170 (blue GLushort)
19171 ->
19172 void)
19173 (glSecondaryColor3ui
19174 (red GLuint)
19175 (green GLuint)
19176 (blue GLuint)
19177 ->
19178 void)
19179 (glSecondaryColor3bv (v const-GLbyte-*) -> void)
19180 (glSecondaryColor3sv (v const-GLshort-*) -> void)
19181 (glSecondaryColor3iv (v const-GLint-*) -> void)
19182 (glSecondaryColor3fv (v const-GLfloat-*) -> void)
19183 (glSecondaryColor3dv
19184 (v const-GLdouble-*)
19185 ->
19186 void)
19187 (glSecondaryColor3ubv
19188 (v const-GLubyte-*)
19189 ->
19190 void)
19191 (glSecondaryColor3usv
19192 (v const-GLushort-*)
19193 ->
19194 void)
19195 (glSecondaryColor3uiv (v const-GLuint-*) -> void))
19196 "Set the current secondary color.
19197
19198 RED
19199 GREEN
19200
19201 BLUE
19202
19203 Specify new red, green, and blue values for the current secondary
19204 color.
19205
19206 The GL stores both a primary four-valued RGBA color and a secondary
19207 four-valued RGBA color (where alpha is always set to 0.0) that is
19208 associated with every vertex.
19209
19210 The secondary color is interpolated and applied to each fragment during
19211 rasterization when `GL_COLOR_SUM' is enabled. When lighting is enabled,
19212 and `GL_SEPARATE_SPECULAR_COLOR' is specified, the value of the
19213 secondary color is assigned the value computed from the specular term of
19214 the lighting computation. Both the primary and secondary current colors
19215 are applied to each fragment, regardless of the state of `GL_COLOR_SUM',
19216 under such conditions. When `GL_SEPARATE_SPECULAR_COLOR' is specified,
19217 the value returned from querying the current secondary color is
19218 undefined.
19219
19220 `glSecondaryColor3b', `glSecondaryColor3s', and `glSecondaryColor3i'
19221 take three signed byte, short, or long integers as arguments. When *v*
19222 is appended to the name, the color commands can take a pointer to an
19223 array of such values.
19224
19225 Color values are stored in floating-point format, with unspecified
19226 mantissa and exponent sizes. Unsigned integer color components, when
19227 specified, are linearly mapped to floating-point values such that the
19228 largest representable value maps to 1.0 (full intensity), and 0 maps to
19229 0.0 (zero intensity). Signed integer color components, when specified,
19230 are linearly mapped to floating-point values such that the most positive
19231 representable value maps to 1.0, and the most negative representable
19232 value maps to -1.0 . (Note that this mapping does not convert 0
19233 precisely to 0.0). Floating-point values are mapped directly.
19234
19235 Neither floating-point nor signed integer values are clamped to the
19236 range [0,1] before the current color is updated. However, color
19237 components are clamped to this range before they are interpolated or
19238 written into a color buffer.")
19239
19240 (define-gl-procedures
19241 ((glSelectBuffer
19242 (size GLsizei)
19243 (buffer GLuint-*)
19244 ->
19245 void))
19246 "Establish a buffer for selection mode values.
19247
19248 SIZE
19249 Specifies the size of BUFFER.
19250
19251 BUFFER
19252 Returns the selection data.
19253
19254 `glSelectBuffer' has two arguments: BUFFER is a pointer to an array of
19255 unsigned integers, and SIZE indicates the size of the array. BUFFER
19256 returns values from the name stack (see `glInitNames', `glLoadName',
19257 `glPushName') when the rendering mode is `GL_SELECT' (see
19258 `glRenderMode'). `glSelectBuffer' must be issued before selection mode
19259 is enabled, and it must not be issued while the rendering mode is
19260 `GL_SELECT'.
19261
19262 A programmer can use selection to determine which primitives are drawn
19263 into some region of a window. The region is defined by the current
19264 modelview and perspective matrices.
19265
19266 In selection mode, no pixel fragments are produced from rasterization.
19267 Instead, if a primitive or a raster position intersects the clipping
19268 volume defined by the viewing frustum and the user-defined clipping
19269 planes, this primitive causes a selection hit. (With polygons, no hit
19270 occurs if the polygon is culled.) When a change is made to the name
19271 stack, or when `glRenderMode' is called, a hit record is copied to
19272 BUFFER if any hits have occurred since the last such event (name stack
19273 change or `glRenderMode' call). The hit record consists of the number
19274 of names in the name stack at the time of the event, followed by the
19275 minimum and maximum depth values of all vertices that hit since the
19276 previous event, followed by the name stack contents, bottom name first.
19277
19278 Depth values (which are in the range [0,1]) are multiplied by 2^32-1 ,
19279 before being placed in the hit record.
19280
19281 An internal index into BUFFER is reset to 0 whenever selection mode is
19282 entered. Each time a hit record is copied into BUFFER, the index is
19283 incremented to point to the cell just past the end of the block of
19284 names\\(emthat is, to the next available cell If the hit record is larger
19285 than the number of remaining locations in BUFFER, as much data as can
19286 fit is copied, and the overflow flag is set. If the name stack is empty
19287 when a hit record is copied, that record consists of 0 followed by the
19288 minimum and maximum depth values.
19289
19290 To exit selection mode, call `glRenderMode' with an argument other than
19291 `GL_SELECT'. Whenever `glRenderMode' is called while the render mode is
19292 `GL_SELECT', it returns the number of hit records copied to BUFFER,
19293 resets the overflow flag and the selection buffer pointer, and
19294 initializes the name stack to be empty. If the overflow bit was set
19295 when `glRenderMode' was called, a negative hit record count is returned.
19296
19297 `GL_INVALID_VALUE' is generated if SIZE is negative.
19298
19299 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is called while
19300 the render mode is `GL_SELECT', or if `glRenderMode' is called with
19301 argument `GL_SELECT' before `glSelectBuffer' is called at least once.
19302
19303 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is executed
19304 between the execution of `glBegin' and the corresponding execution of
19305 `glEnd'.")
19306
19307 (define-gl-procedures
19308 ((glSeparableFilter2D
19309 (target GLenum)
19310 (internalformat GLenum)
19311 (width GLsizei)
19312 (height GLsizei)
19313 (format GLenum)
19314 (type GLenum)
19315 (row const-GLvoid-*)
19316 (column const-GLvoid-*)
19317 ->
19318 void))
19319 "Define a separable two-dimensional convolution filter.
19320
19321 TARGET
19322 Must be `GL_SEPARABLE_2D'.
19323
19324 INTERNALFORMAT
19325 The internal format of the convolution filter kernel. The
19326 allowable values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
19327 `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4',
19328 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
19329 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
19330 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
19331 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
19332 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
19333 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
19334 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
19335 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
19336 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
19337
19338 WIDTH
19339 The number of elements in the pixel array referenced by ROW. (This
19340 is the width of the separable filter kernel.)
19341
19342 HEIGHT
19343 The number of elements in the pixel array referenced by COLUMN.
19344 (This is the height of the separable filter kernel.)
19345
19346 FORMAT
19347 The format of the pixel data in ROW and COLUMN. The allowable
19348 values are `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
19349 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_INTENSITY', `GL_LUMINANCE', and
19350 `GL_LUMINANCE_ALPHA'.
19351
19352 TYPE
19353 The type of the pixel data in ROW and COLUMN. Symbolic constants
19354 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
19355 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
19356 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
19357 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
19358 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
19359 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
19360 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
19361 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
19362 are accepted.
19363
19364 ROW
19365 Pointer to a one-dimensional array of pixel data that is processed
19366 to build the row filter kernel.
19367
19368 COLUMN
19369 Pointer to a one-dimensional array of pixel data that is processed
19370 to build the column filter kernel.
19371
19372 `glSeparableFilter2D' builds a two-dimensional separable convolution
19373 filter kernel from two arrays of pixels.
19374
19375 The pixel arrays specified by (WIDTH, FORMAT, TYPE, ROW) and (HEIGHT,
19376 FORMAT, TYPE, COLUMN) are processed just as if they had been passed to
19377 `glDrawPixels', but processing stops after the final expansion to RGBA
19378 is completed.
19379
19380 If a non-zero named buffer object is bound to the
19381 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
19382 filter is specified, ROW and COLUMN are treated as byte offsets into the
19383 buffer object's data store.
19384
19385 Next, the R, G, B, and A components of all pixels in both arrays are
19386 scaled by the four separable 2D `GL_CONVOLUTION_FILTER_SCALE' parameters
19387 and biased by the four separable 2D `GL_CONVOLUTION_FILTER_BIAS'
19388 parameters. (The scale and bias parameters are set by
19389 `glConvolutionParameter' using the `GL_SEPARABLE_2D' target and the
19390 names `GL_CONVOLUTION_FILTER_SCALE' and `GL_CONVOLUTION_FILTER_BIAS'.
19391 The parameters themselves are vectors of four values that are applied to
19392 red, green, blue, and alpha, in that order.) The R, G, B, and A values
19393 are not clamped to [0,1] at any time during this process.
19394
19395 Each pixel is then converted to the internal format specified by
19396 INTERNALFORMAT. This conversion simply maps the component values of the
19397 pixel (R, G, B, and A) to the values included in the internal format
19398 (red, green, blue, alpha, luminance, and intensity). The mapping is as
19399 follows:
19400
19401 *Internal Format*
19402 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
19403
19404 `GL_LUMINANCE'
19405 , , , , R ,
19406
19407 `GL_LUMINANCE_ALPHA'
19408 , , , A , R ,
19409
19410 `GL_INTENSITY'
19411 , , , , , R
19412
19413 `GL_RGB'
19414 R , G , B , , ,
19415
19416 `GL_RGBA'
19417 R , G , B , A , ,
19418
19419 The red, green, blue, alpha, luminance, and/or intensity components of
19420 the resulting pixels are stored in floating-point rather than integer
19421 format. They form two one-dimensional filter kernel images. The row
19422 image is indexed by coordinate I starting at zero and increasing from
19423 left to right. Each location in the row image is derived from element I
19424 of ROW. The column image is indexed by coordinate J starting at zero
19425 and increasing from bottom to top. Each location in the column image is
19426 derived from element J of COLUMN.
19427
19428 Note that after a convolution is performed, the resulting color
19429 components are also scaled by their corresponding
19430 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
19431 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
19432 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
19433 set by `glPixelTransfer'.
19434
19435 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SEPARABLE_2D'.
19436
19437 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
19438 allowable values.
19439
19440 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
19441 values.
19442
19443 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
19444 values.
19445
19446 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
19447 than the maximum supported value. This value may be queried with
19448 `glGetConvolutionParameter' using target `GL_SEPARABLE_2D' and name
19449 `GL_MAX_CONVOLUTION_WIDTH'.
19450
19451 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
19452 than the maximum supported value. This value may be queried with
19453 `glGetConvolutionParameter' using target `GL_SEPARABLE_2D' and name
19454 `GL_MAX_CONVOLUTION_HEIGHT'.
19455
19456 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
19457 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
19458 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
19459 is not `GL_RGB'.
19460
19461 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
19462 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
19463 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
19464 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
19465 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
19466 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
19467
19468 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
19469 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
19470 data store is currently mapped.
19471
19472 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
19473 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
19474 unpacked from the buffer object such that the memory reads required
19475 would exceed the data store size.
19476
19477 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
19478 bound to the `GL_PIXEL_UNPACK_BUFFER' target and ROW or COLUMN is not
19479 evenly divisible into the number of bytes needed to store in memory a
19480 datum indicated by TYPE.
19481
19482 `GL_INVALID_OPERATION' is generated if `glSeparableFilter2D' is executed
19483 between the execution of `glBegin' and the corresponding execution of
19484 `glEnd'.")
19485
19486 (define-gl-procedures
19487 ((glShadeModel (mode GLenum) -> void))
19488 "Select flat or smooth shading.
19489
19490 MODE
19491 Specifies a symbolic value representing a shading technique.
19492 Accepted values are `GL_FLAT' and `GL_SMOOTH'. The initial value
19493 is `GL_SMOOTH'.
19494
19495 GL primitives can have either flat or smooth shading. Smooth shading,
19496 the default, causes the computed colors of vertices to be interpolated
19497 as the primitive is rasterized, typically assigning different colors to
19498 each resulting pixel fragment. Flat shading selects the computed color
19499 of just one vertex and assigns it to all the pixel fragments generated
19500 by rasterizing a single primitive. In either case, the computed color
19501 of a vertex is the result of lighting if lighting is enabled, or it is
19502 the current color at the time the vertex was specified if lighting is
19503 disabled.
19504
19505 Flat and smooth shading are indistinguishable for points. Starting when
19506 `glBegin' is issued and counting vertices and primitives from 1, the GL
19507 gives each flat-shaded line segment I the computed color of vertex I+1 ,
19508 its second vertex. Counting similarly from 1, the GL gives each
19509 flat-shaded polygon the computed color of the vertex listed in the
19510 following table. This is the last vertex to specify the polygon in all
19511 cases except single polygons, where the first vertex specifies the
19512 flat-shaded color.
19513
19514
19515
19516 * Primitive Type of Polygon I *
19517 *Vertex*
19518
19519 Single polygon (I==1 )
19520 1
19521
19522 Triangle strip
19523 I+2
19524
19525 Triangle fan
19526 I+2
19527
19528 Independent triangle
19529 3\u2062I
19530
19531 Quad strip
19532 2\u2062I+2
19533
19534 Independent quad
19535 4\u2062I
19536
19537 Flat and smooth shading are specified by `glShadeModel' with MODE set to
19538 `GL_FLAT' and `GL_SMOOTH', respectively.
19539
19540 `GL_INVALID_ENUM' is generated if MODE is any value other than `GL_FLAT'
19541 or `GL_SMOOTH'.
19542
19543 `GL_INVALID_OPERATION' is generated if `glShadeModel' is executed
19544 between the execution of `glBegin' and the corresponding execution of
19545 `glEnd'.")
19546
19547 (define-gl-procedures
19548 ((glShaderSource
19549 (shader GLuint)
19550 (count GLsizei)
19551 (string const-GLchar-**)
19552 (length const-GLint-*)
19553 ->
19554 void))
19555 "Replaces the source code in a shader object.
19556
19557 SHADER
19558 Specifies the handle of the shader object whose source code is to
19559 be replaced.
19560
19561 COUNT
19562 Specifies the number of elements in the STRING and LENGTH arrays.
19563
19564 STRING
19565 Specifies an array of pointers to strings containing the source
19566 code to be loaded into the shader.
19567
19568 LENGTH
19569 Specifies an array of string lengths.
19570
19571 `glShaderSource' sets the source code in SHADER to the source code in
19572 the array of strings specified by STRING. Any source code previously
19573 stored in the shader object is completely replaced. The number of
19574 strings in the array is specified by COUNT. If LENGTH is `NULL', each
19575 string is assumed to be null terminated. If LENGTH is a value other
19576 than `NULL', it points to an array containing a string length for each
19577 of the corresponding elements of STRING. Each element in the LENGTH
19578 array may contain the length of the corresponding string (the null
19579 character is not counted as part of the string length) or a value less
19580 than 0 to indicate that the string is null terminated. The source code
19581 strings are not scanned or parsed at this time; they are simply copied
19582 into the specified shader object.
19583
19584 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
19585 OpenGL.
19586
19587 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
19588
19589 `GL_INVALID_VALUE' is generated if COUNT is less than 0.
19590
19591 `GL_INVALID_OPERATION' is generated if `glShaderSource' is executed
19592 between the execution of `glBegin' and the corresponding execution of
19593 `glEnd'.")
19594
19595 (define-gl-procedures
19596 ((glStencilFuncSeparate
19597 (face GLenum)
19598 (func GLenum)
19599 (ref GLint)
19600 (mask GLuint)
19601 ->
19602 void))
19603 "Set front and/or back function and reference value for stencil testing.
19604
19605 FACE
19606 Specifies whether front and/or back stencil state is updated. Three
19607 symbolic constants are valid: `GL_FRONT', `GL_BACK', and
19608 `GL_FRONT_AND_BACK'.
19609
19610 FUNC
19611 Specifies the test function. Eight symbolic constants are valid:
19612 `GL_NEVER', `GL_LESS', `GL_LEQUAL', `GL_GREATER', `GL_GEQUAL',
19613 `GL_EQUAL', `GL_NOTEQUAL', and `GL_ALWAYS'. The initial value is
19614 `GL_ALWAYS'.
19615
19616 REF
19617 Specifies the reference value for the stencil test. REF is clamped
19618 to the range [0,2^N-1] , where N is the number of bitplanes in the
19619 stencil buffer. The initial value is 0.
19620
19621 MASK
19622 Specifies a mask that is ANDed with both the reference value and
19623 the stored stencil value when the test is done. The initial value
19624 is all 1's.
19625
19626 Stenciling, like depth-buffering, enables and disables drawing on a
19627 per-pixel basis. You draw into the stencil planes using GL drawing
19628 primitives, then render geometry and images, using the stencil planes to
19629 mask out portions of the screen. Stenciling is typically used in
19630 multipass rendering algorithms to achieve special effects, such as
19631 decals, outlining, and constructive solid geometry rendering.
19632
19633 The stencil test conditionally eliminates a pixel based on the outcome
19634 of a comparison between the reference value and the value in the stencil
19635 buffer. To enable and disable the test, call `glEnable' and `glDisable'
19636 with argument `GL_STENCIL_TEST'. To specify actions based on the
19637 outcome of the stencil test, call `glStencilOp' or
19638 `glStencilOpSeparate'.
19639
19640 There can be two separate sets of FUNC, REF, and MASK parameters; one
19641 affects back-facing polygons, and the other affects front-facing
19642 polygons as well as other non-polygon primitives. `glStencilFunc' sets
19643 both front and back stencil state to the same values, as if
19644 `glStencilFuncSeparate' were called with FACE set to
19645 `GL_FRONT_AND_BACK'.
19646
19647 FUNC is a symbolic constant that determines the stencil comparison
19648 function. It accepts one of eight values, shown in the following list.
19649 REF is an integer reference value that is used in the stencil
19650 comparison. It is clamped to the range [0,2^N-1] , where N is the
19651 number of bitplanes in the stencil buffer. MASK is bitwise ANDed with
19652 both the reference value and the stored stencil value, with the ANDed
19653 values participating in the comparison.
19654
19655 If STENCIL represents the value stored in the corresponding stencil
19656 buffer location, the following list shows the effect of each comparison
19657 function that can be specified by FUNC. Only if the comparison succeeds
19658 is the pixel passed through to the next stage in the rasterization
19659 process (see `glStencilOp'). All tests treat STENCIL values as unsigned
19660 integers in the range [0,2^N-1] , where N is the number of bitplanes in
19661 the stencil buffer.
19662
19663 The following values are accepted by FUNC:
19664
19665 `GL_NEVER'
19666 Always fails.
19667
19668 `GL_LESS'
19669 Passes if ( REF & MASK ) < ( STENCIL & MASK ).
19670
19671 `GL_LEQUAL'
19672 Passes if ( REF & MASK ) <= ( STENCIL & MASK ).
19673
19674 `GL_GREATER'
19675 Passes if ( REF & MASK ) > ( STENCIL & MASK ).
19676
19677 `GL_GEQUAL'
19678 Passes if ( REF & MASK ) >= ( STENCIL & MASK ).
19679
19680 `GL_EQUAL'
19681 Passes if ( REF & MASK ) = ( STENCIL & MASK ).
19682
19683 `GL_NOTEQUAL'
19684 Passes if ( REF & MASK ) != ( STENCIL & MASK ).
19685
19686 `GL_ALWAYS'
19687 Always passes.
19688
19689 `GL_INVALID_ENUM' is generated if FUNC is not one of the eight accepted
19690 values.
19691
19692 `GL_INVALID_OPERATION' is generated if `glStencilFuncSeparate' is
19693 executed between the execution of `glBegin' and the corresponding
19694 execution of `glEnd'.")
19695
19696 (define-gl-procedures
19697 ((glStencilFunc
19698 (func GLenum)
19699 (ref GLint)
19700 (mask GLuint)
19701 ->
19702 void))
19703 "Set front and back function and reference value for stencil testing.
19704
19705 FUNC
19706 Specifies the test function. Eight symbolic constants are valid:
19707 `GL_NEVER', `GL_LESS', `GL_LEQUAL', `GL_GREATER', `GL_GEQUAL',
19708 `GL_EQUAL', `GL_NOTEQUAL', and `GL_ALWAYS'. The initial value is
19709 `GL_ALWAYS'.
19710
19711 REF
19712 Specifies the reference value for the stencil test. REF is clamped
19713 to the range [0,2^N-1] , where N is the number of bitplanes in the
19714 stencil buffer. The initial value is 0.
19715
19716 MASK
19717 Specifies a mask that is ANDed with both the reference value and
19718 the stored stencil value when the test is done. The initial value
19719 is all 1's.
19720
19721 Stenciling, like depth-buffering, enables and disables drawing on a
19722 per-pixel basis. Stencil planes are first drawn into using GL drawing
19723 primitives, then geometry and images are rendered using the stencil
19724 planes to mask out portions of the screen. Stenciling is typically used
19725 in multipass rendering algorithms to achieve special effects, such as
19726 decals, outlining, and constructive solid geometry rendering.
19727
19728 The stencil test conditionally eliminates a pixel based on the outcome
19729 of a comparison between the reference value and the value in the stencil
19730 buffer. To enable and disable the test, call `glEnable' and `glDisable'
19731 with argument `GL_STENCIL_TEST'. To specify actions based on the
19732 outcome of the stencil test, call `glStencilOp' or
19733 `glStencilOpSeparate'.
19734
19735 There can be two separate sets of FUNC, REF, and MASK parameters; one
19736 affects back-facing polygons, and the other affects front-facing
19737 polygons as well as other non-polygon primitives. `glStencilFunc' sets
19738 both front and back stencil state to the same values. Use
19739 `glStencilFuncSeparate' to set front and back stencil state to different
19740 values.
19741
19742 FUNC is a symbolic constant that determines the stencil comparison
19743 function. It accepts one of eight values, shown in the following list.
19744 REF is an integer reference value that is used in the stencil
19745 comparison. It is clamped to the range [0,2^N-1] , where N is the
19746 number of bitplanes in the stencil buffer. MASK is bitwise ANDed with
19747 both the reference value and the stored stencil value, with the ANDed
19748 values participating in the comparison.
19749
19750 If STENCIL represents the value stored in the corresponding stencil
19751 buffer location, the following list shows the effect of each comparison
19752 function that can be specified by FUNC. Only if the comparison succeeds
19753 is the pixel passed through to the next stage in the rasterization
19754 process (see `glStencilOp'). All tests treat STENCIL values as unsigned
19755 integers in the range [0,2^N-1] , where N is the number of bitplanes in
19756 the stencil buffer.
19757
19758 The following values are accepted by FUNC:
19759
19760 `GL_NEVER'
19761 Always fails.
19762
19763 `GL_LESS'
19764 Passes if ( REF & MASK ) < ( STENCIL & MASK ).
19765
19766 `GL_LEQUAL'
19767 Passes if ( REF & MASK ) <= ( STENCIL & MASK ).
19768
19769 `GL_GREATER'
19770 Passes if ( REF & MASK ) > ( STENCIL & MASK ).
19771
19772 `GL_GEQUAL'
19773 Passes if ( REF & MASK ) >= ( STENCIL & MASK ).
19774
19775 `GL_EQUAL'
19776 Passes if ( REF & MASK ) = ( STENCIL & MASK ).
19777
19778 `GL_NOTEQUAL'
19779 Passes if ( REF & MASK ) != ( STENCIL & MASK ).
19780
19781 `GL_ALWAYS'
19782 Always passes.
19783
19784 `GL_INVALID_ENUM' is generated if FUNC is not one of the eight accepted
19785 values.
19786
19787 `GL_INVALID_OPERATION' is generated if `glStencilFunc' is executed
19788 between the execution of `glBegin' and the corresponding execution of
19789 `glEnd'.")
19790
19791 (define-gl-procedures
19792 ((glStencilMaskSeparate
19793 (face GLenum)
19794 (mask GLuint)
19795 ->
19796 void))
19797 "Control the front and/or back writing of individual bits in the stencil
19798 planes.
19799
19800 FACE
19801 Specifies whether the front and/or back stencil writemask is
19802 updated. Three symbolic constants are valid: `GL_FRONT',
19803 `GL_BACK', and `GL_FRONT_AND_BACK'.
19804
19805 MASK
19806 Specifies a bit mask to enable and disable writing of individual
19807 bits in the stencil planes. Initially, the mask is all 1's.
19808
19809 `glStencilMaskSeparate' controls the writing of individual bits in the
19810 stencil planes. The least significant N bits of MASK, where N is the
19811 number of bits in the stencil buffer, specify a mask. Where a 1 appears
19812 in the mask, it's possible to write to the corresponding bit in the
19813 stencil buffer. Where a 0 appears, the corresponding bit is
19814 write-protected. Initially, all bits are enabled for writing.
19815
19816 There can be two separate MASK writemasks; one affects back-facing
19817 polygons, and the other affects front-facing polygons as well as other
19818 non-polygon primitives. `glStencilMask' sets both front and back
19819 stencil writemasks to the same values, as if `glStencilMaskSeparate'
19820 were called with FACE set to `GL_FRONT_AND_BACK'.
19821
19822 `GL_INVALID_OPERATION' is generated if `glStencilMaskSeparate' is
19823 executed between the execution of `glBegin' and the corresponding
19824 execution of `glEnd'.")
19825
19826 (define-gl-procedures
19827 ((glStencilMask (mask GLuint) -> void))
19828 "Control the front and back writing of individual bits in the stencil
19829 planes.
19830
19831 MASK
19832 Specifies a bit mask to enable and disable writing of individual
19833 bits in the stencil planes. Initially, the mask is all 1's.
19834
19835 `glStencilMask' controls the writing of individual bits in the stencil
19836 planes. The least significant N bits of MASK, where N is the number of
19837 bits in the stencil buffer, specify a mask. Where a 1 appears in the
19838 mask, it's possible to write to the corresponding bit in the stencil
19839 buffer. Where a 0 appears, the corresponding bit is write-protected.
19840 Initially, all bits are enabled for writing.
19841
19842 There can be two separate MASK writemasks; one affects back-facing
19843 polygons, and the other affects front-facing polygons as well as other
19844 non-polygon primitives. `glStencilMask' sets both front and back
19845 stencil writemasks to the same values. Use `glStencilMaskSeparate' to
19846 set front and back stencil writemasks to different values.
19847
19848 `GL_INVALID_OPERATION' is generated if `glStencilMask' is executed
19849 between the execution of `glBegin' and the corresponding execution of
19850 `glEnd'.")
19851
19852 (define-gl-procedures
19853 ((glStencilOpSeparate
19854 (face GLenum)
19855 (sfail GLenum)
19856 (dpfail GLenum)
19857 (dppass GLenum)
19858 ->
19859 void))
19860 "Set front and/or back stencil test actions.
19861
19862 FACE
19863 Specifies whether front and/or back stencil state is updated. Three
19864 symbolic constants are valid: `GL_FRONT', `GL_BACK', and
19865 `GL_FRONT_AND_BACK'.
19866
19867 SFAIL
19868 Specifies the action to take when the stencil test fails. Eight
19869 symbolic constants are accepted: `GL_KEEP', `GL_ZERO',
19870 `GL_REPLACE', `GL_INCR', `GL_INCR_WRAP', `GL_DECR', `GL_DECR_WRAP',
19871 and `GL_INVERT'. The initial value is `GL_KEEP'.
19872
19873 DPFAIL
19874 Specifies the stencil action when the stencil test passes, but the
19875 depth test fails. DPFAIL accepts the same symbolic constants as
19876 SFAIL. The initial value is `GL_KEEP'.
19877
19878 DPPASS
19879 Specifies the stencil action when both the stencil test and the
19880 depth test pass, or when the stencil test passes and either there
19881 is no depth buffer or depth testing is not enabled. DPPASS accepts
19882 the same symbolic constants as SFAIL. The initial value is
19883 `GL_KEEP'.
19884
19885 Stenciling, like depth-buffering, enables and disables drawing on a
19886 per-pixel basis. You draw into the stencil planes using GL drawing
19887 primitives, then render geometry and images, using the stencil planes to
19888 mask out portions of the screen. Stenciling is typically used in
19889 multipass rendering algorithms to achieve special effects, such as
19890 decals, outlining, and constructive solid geometry rendering.
19891
19892 The stencil test conditionally eliminates a pixel based on the outcome
19893 of a comparison between the value in the stencil buffer and a reference
19894 value. To enable and disable the test, call `glEnable' and `glDisable'
19895 with argument `GL_STENCIL_TEST'; to control it, call `glStencilFunc' or
19896 `glStencilFuncSeparate'.
19897
19898 There can be two separate sets of SFAIL, DPFAIL, and DPPASS parameters;
19899 one affects back-facing polygons, and the other affects front-facing
19900 polygons as well as other non-polygon primitives. `glStencilOp' sets
19901 both front and back stencil state to the same values, as if
19902 `glStencilOpSeparate' were called with FACE set to `GL_FRONT_AND_BACK'.
19903
19904 `glStencilOpSeparate' takes three arguments that indicate what happens
19905 to the stored stencil value while stenciling is enabled. If the stencil
19906 test fails, no change is made to the pixel's color or depth buffers, and
19907 SFAIL specifies what happens to the stencil buffer contents. The
19908 following eight actions are possible.
19909
19910 `GL_KEEP'
19911 Keeps the current value.
19912
19913 `GL_ZERO'
19914 Sets the stencil buffer value to 0.
19915
19916 `GL_REPLACE'
19917 Sets the stencil buffer value to REF, as specified by
19918 `glStencilFunc'.
19919
19920 `GL_INCR'
19921 Increments the current stencil buffer value. Clamps to the maximum
19922 representable unsigned value.
19923
19924 `GL_INCR_WRAP'
19925 Increments the current stencil buffer value. Wraps stencil buffer
19926 value to zero when incrementing the maximum representable unsigned
19927 value.
19928
19929 `GL_DECR'
19930 Decrements the current stencil buffer value. Clamps to 0.
19931
19932 `GL_DECR_WRAP'
19933 Decrements the current stencil buffer value. Wraps stencil buffer
19934 value to the maximum representable unsigned value when decrementing
19935 a stencil buffer value of zero.
19936
19937 `GL_INVERT'
19938 Bitwise inverts the current stencil buffer value.
19939
19940 Stencil buffer values are treated as unsigned integers. When
19941 incremented and decremented, values are clamped to 0 and 2^N-1 , where N
19942 is the value returned by querying `GL_STENCIL_BITS'.
19943
19944 The other two arguments to `glStencilOpSeparate' specify stencil buffer
19945 actions that depend on whether subsequent depth buffer tests succeed
19946 (DPPASS) or fail (DPFAIL) (see `glDepthFunc'). The actions are
19947 specified using the same eight symbolic constants as SFAIL. Note that
19948 DPFAIL is ignored when there is no depth buffer, or when the depth
19949 buffer is not enabled. In these cases, SFAIL and DPPASS specify stencil
19950 action when the stencil test fails and passes, respectively.
19951
19952 `GL_INVALID_ENUM' is generated if FACE is any value other than
19953 `GL_FRONT', `GL_BACK', or `GL_FRONT_AND_BACK'.
19954
19955 `GL_INVALID_ENUM' is generated if SFAIL, DPFAIL, or DPPASS is any value
19956 other than the eight defined constant values.
19957
19958 `GL_INVALID_OPERATION' is generated if `glStencilOpSeparate' is executed
19959 between the execution of `glBegin' and the corresponding execution of
19960 `glEnd'.")
19961
19962 (define-gl-procedures
19963 ((glStencilOp
19964 (sfail GLenum)
19965 (dpfail GLenum)
19966 (dppass GLenum)
19967 ->
19968 void))
19969 "Set front and back stencil test actions.
19970
19971 SFAIL
19972 Specifies the action to take when the stencil test fails. Eight
19973 symbolic constants are accepted: `GL_KEEP', `GL_ZERO',
19974 `GL_REPLACE', `GL_INCR', `GL_INCR_WRAP', `GL_DECR', `GL_DECR_WRAP',
19975 and `GL_INVERT'. The initial value is `GL_KEEP'.
19976
19977 DPFAIL
19978 Specifies the stencil action when the stencil test passes, but the
19979 depth test fails. DPFAIL accepts the same symbolic constants as
19980 SFAIL. The initial value is `GL_KEEP'.
19981
19982 DPPASS
19983 Specifies the stencil action when both the stencil test and the
19984 depth test pass, or when the stencil test passes and either there
19985 is no depth buffer or depth testing is not enabled. DPPASS accepts
19986 the same symbolic constants as SFAIL. The initial value is
19987 `GL_KEEP'.
19988
19989 Stenciling, like depth-buffering, enables and disables drawing on a
19990 per-pixel basis. You draw into the stencil planes using GL drawing
19991 primitives, then render geometry and images, using the stencil planes to
19992 mask out portions of the screen. Stenciling is typically used in
19993 multipass rendering algorithms to achieve special effects, such as
19994 decals, outlining, and constructive solid geometry rendering.
19995
19996 The stencil test conditionally eliminates a pixel based on the outcome
19997 of a comparison between the value in the stencil buffer and a reference
19998 value. To enable and disable the test, call `glEnable' and `glDisable'
19999 with argument `GL_STENCIL_TEST'; to control it, call `glStencilFunc' or
20000 `glStencilFuncSeparate'.
20001
20002 There can be two separate sets of SFAIL, DPFAIL, and DPPASS parameters;
20003 one affects back-facing polygons, and the other affects front-facing
20004 polygons as well as other non-polygon primitives. `glStencilOp' sets
20005 both front and back stencil state to the same values. Use
20006 `glStencilOpSeparate' to set front and back stencil state to different
20007 values.
20008
20009 `glStencilOp' takes three arguments that indicate what happens to the
20010 stored stencil value while stenciling is enabled. If the stencil test
20011 fails, no change is made to the pixel's color or depth buffers, and
20012 SFAIL specifies what happens to the stencil buffer contents. The
20013 following eight actions are possible.
20014
20015 `GL_KEEP'
20016 Keeps the current value.
20017
20018 `GL_ZERO'
20019 Sets the stencil buffer value to 0.
20020
20021 `GL_REPLACE'
20022 Sets the stencil buffer value to REF, as specified by
20023 `glStencilFunc'.
20024
20025 `GL_INCR'
20026 Increments the current stencil buffer value. Clamps to the maximum
20027 representable unsigned value.
20028
20029 `GL_INCR_WRAP'
20030 Increments the current stencil buffer value. Wraps stencil buffer
20031 value to zero when incrementing the maximum representable unsigned
20032 value.
20033
20034 `GL_DECR'
20035 Decrements the current stencil buffer value. Clamps to 0.
20036
20037 `GL_DECR_WRAP'
20038 Decrements the current stencil buffer value. Wraps stencil buffer
20039 value to the maximum representable unsigned value when decrementing
20040 a stencil buffer value of zero.
20041
20042 `GL_INVERT'
20043 Bitwise inverts the current stencil buffer value.
20044
20045 Stencil buffer values are treated as unsigned integers. When
20046 incremented and decremented, values are clamped to 0 and 2^N-1 , where N
20047 is the value returned by querying `GL_STENCIL_BITS'.
20048
20049 The other two arguments to `glStencilOp' specify stencil buffer actions
20050 that depend on whether subsequent depth buffer tests succeed (DPPASS) or
20051 fail (DPFAIL) (see `glDepthFunc'). The actions are specified using the
20052 same eight symbolic constants as SFAIL. Note that DPFAIL is ignored
20053 when there is no depth buffer, or when the depth buffer is not enabled.
20054 In these cases, SFAIL and DPPASS specify stencil action when the stencil
20055 test fails and passes, respectively.
20056
20057 `GL_INVALID_ENUM' is generated if SFAIL, DPFAIL, or DPPASS is any value
20058 other than the eight defined constant values.
20059
20060 `GL_INVALID_OPERATION' is generated if `glStencilOp' is executed between
20061 the execution of `glBegin' and the corresponding execution of `glEnd'.")
20062
20063 (define-gl-procedures
20064 ((glTexCoordPointer
20065 (size GLint)
20066 (type GLenum)
20067 (stride GLsizei)
20068 (pointer const-GLvoid-*)
20069 ->
20070 void))
20071 "Define an array of texture coordinates.
20072
20073 SIZE
20074 Specifies the number of coordinates per array element. Must be 1,
20075 2, 3, or 4. The initial value is 4.
20076
20077 TYPE
20078 Specifies the data type of each texture coordinate. Symbolic
20079 constants `GL_SHORT', `GL_INT', `GL_FLOAT', or `GL_DOUBLE' are
20080 accepted. The initial value is `GL_FLOAT'.
20081
20082 STRIDE
20083 Specifies the byte offset between consecutive texture coordinate
20084 sets. If STRIDE is 0, the array elements are understood to be
20085 tightly packed. The initial value is 0.
20086
20087 POINTER
20088 Specifies a pointer to the first coordinate of the first texture
20089 coordinate set in the array. The initial value is 0.
20090
20091 `glTexCoordPointer' specifies the location and data format of an array
20092 of texture coordinates to use when rendering. SIZE specifies the number
20093 of coordinates per texture coordinate set, and must be 1, 2, 3, or 4.
20094 TYPE specifies the data type of each texture coordinate, and STRIDE
20095 specifies the byte stride from one texture coordinate set to the next,
20096 allowing vertices and attributes to be packed into a single array or
20097 stored in separate arrays. (Single-array storage may be more efficient
20098 on some implementations; see `glInterleavedArrays'.)
20099
20100 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
20101 target (see `glBindBuffer') while a texture coordinate array is
20102 specified, POINTER is treated as a byte offset into the buffer object's
20103 data store. Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING')
20104 is saved as texture coordinate vertex array client-side state
20105 (`GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING').
20106
20107 When a texture coordinate array is specified, SIZE, TYPE, STRIDE, and
20108 POINTER are saved as client-side state, in addition to the current
20109 vertex array buffer object binding.
20110
20111 To enable and disable a texture coordinate array, call
20112 `glEnableClientState' and `glDisableClientState' with the argument
20113 `GL_TEXTURE_COORD_ARRAY'. If enabled, the texture coordinate array is
20114 used when `glArrayElement', `glDrawArrays', `glMultiDrawArrays',
20115 `glDrawElements', `glMultiDrawElements', or `glDrawRangeElements' is
20116 called.
20117
20118 `GL_INVALID_VALUE' is generated if SIZE is not 1, 2, 3, or 4.
20119
20120 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
20121
20122 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
20123
20124 (define-gl-procedures
20125 ((glTexCoord1s (s GLshort) -> void)
20126 (glTexCoord1i (s GLint) -> void)
20127 (glTexCoord1f (s GLfloat) -> void)
20128 (glTexCoord1d (s GLdouble) -> void)
20129 (glTexCoord2s (s GLshort) (t GLshort) -> void)
20130 (glTexCoord2i (s GLint) (t GLint) -> void)
20131 (glTexCoord2f (s GLfloat) (t GLfloat) -> void)
20132 (glTexCoord2d (s GLdouble) (t GLdouble) -> void)
20133 (glTexCoord3s
20134 (s GLshort)
20135 (t GLshort)
20136 (r GLshort)
20137 ->
20138 void)
20139 (glTexCoord3i
20140 (s GLint)
20141 (t GLint)
20142 (r GLint)
20143 ->
20144 void)
20145 (glTexCoord3f
20146 (s GLfloat)
20147 (t GLfloat)
20148 (r GLfloat)
20149 ->
20150 void)
20151 (glTexCoord3d
20152 (s GLdouble)
20153 (t GLdouble)
20154 (r GLdouble)
20155 ->
20156 void)
20157 (glTexCoord4s
20158 (s GLshort)
20159 (t GLshort)
20160 (r GLshort)
20161 (q GLshort)
20162 ->
20163 void)
20164 (glTexCoord4i
20165 (s GLint)
20166 (t GLint)
20167 (r GLint)
20168 (q GLint)
20169 ->
20170 void)
20171 (glTexCoord4f
20172 (s GLfloat)
20173 (t GLfloat)
20174 (r GLfloat)
20175 (q GLfloat)
20176 ->
20177 void)
20178 (glTexCoord4d
20179 (s GLdouble)
20180 (t GLdouble)
20181 (r GLdouble)
20182 (q GLdouble)
20183 ->
20184 void)
20185 (glTexCoord1sv (v const-GLshort-*) -> void)
20186 (glTexCoord1iv (v const-GLint-*) -> void)
20187 (glTexCoord1fv (v const-GLfloat-*) -> void)
20188 (glTexCoord1dv (v const-GLdouble-*) -> void)
20189 (glTexCoord2sv (v const-GLshort-*) -> void)
20190 (glTexCoord2iv (v const-GLint-*) -> void)
20191 (glTexCoord2fv (v const-GLfloat-*) -> void)
20192 (glTexCoord2dv (v const-GLdouble-*) -> void)
20193 (glTexCoord3sv (v const-GLshort-*) -> void)
20194 (glTexCoord3iv (v const-GLint-*) -> void)
20195 (glTexCoord3fv (v const-GLfloat-*) -> void)
20196 (glTexCoord3dv (v const-GLdouble-*) -> void)
20197 (glTexCoord4sv (v const-GLshort-*) -> void)
20198 (glTexCoord4iv (v const-GLint-*) -> void)
20199 (glTexCoord4fv (v const-GLfloat-*) -> void)
20200 (glTexCoord4dv (v const-GLdouble-*) -> void))
20201 "Set the current texture coordinates.
20202
20203 S
20204 T
20205
20206 R
20207
20208 Q
20209
20210 Specify S, T, R, and Q texture coordinates. Not all parameters are
20211 present in all forms of the command.
20212
20213 `glTexCoord' specifies texture coordinates in one, two, three, or four
20214 dimensions. `glTexCoord1' sets the current texture coordinates to
20215 (S,001) ; a call to `glTexCoord2' sets them to (S,T01) . Similarly,
20216 `glTexCoord3' specifies the texture coordinates as (S,TR1) , and
20217 `glTexCoord4' defines all four components explicitly as (S,TRQ) .
20218
20219 The current texture coordinates are part of the data that is associated
20220 with each vertex and with the current raster position. Initially, the
20221 values for S, T, R, and Q are (0, 0, 0, 1).")
20222
20223 (define-gl-procedures
20224 ((glTexEnvf
20225 (target GLenum)
20226 (pname GLenum)
20227 (param GLfloat)
20228 ->
20229 void)
20230 (glTexEnvi
20231 (target GLenum)
20232 (pname GLenum)
20233 (param GLint)
20234 ->
20235 void)
20236 (glTexEnvfv
20237 (target GLenum)
20238 (pname GLenum)
20239 (params const-GLfloat-*)
20240 ->
20241 void)
20242 (glTexEnviv
20243 (target GLenum)
20244 (pname GLenum)
20245 (params const-GLint-*)
20246 ->
20247 void))
20248 "Set texture environment parameters.
20249
20250 TARGET
20251 Specifies a texture environment. May be `GL_TEXTURE_ENV',
20252 `GL_TEXTURE_FILTER_CONTROL' or `GL_POINT_SPRITE'.
20253
20254 PNAME
20255 Specifies the symbolic name of a single-valued texture environment
20256 parameter. May be either `GL_TEXTURE_ENV_MODE',
20257 `GL_TEXTURE_LOD_BIAS', `GL_COMBINE_RGB', `GL_COMBINE_ALPHA',
20258 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
20259 `GL_SRC1_ALPHA', `GL_SRC2_ALPHA', `GL_OPERAND0_RGB',
20260 `GL_OPERAND1_RGB', `GL_OPERAND2_RGB', `GL_OPERAND0_ALPHA',
20261 `GL_OPERAND1_ALPHA', `GL_OPERAND2_ALPHA', `GL_RGB_SCALE',
20262 `GL_ALPHA_SCALE', or `GL_COORD_REPLACE'.
20263
20264 PARAM
20265 Specifies a single symbolic constant, one of `GL_ADD',
20266 `GL_ADD_SIGNED', `GL_INTERPOLATE', `GL_MODULATE', `GL_DECAL',
20267 `GL_BLEND', `GL_REPLACE', `GL_SUBTRACT', `GL_COMBINE',
20268 `GL_TEXTURE', `GL_CONSTANT', `GL_PRIMARY_COLOR', `GL_PREVIOUS',
20269 `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR', `GL_SRC_ALPHA',
20270 `GL_ONE_MINUS_SRC_ALPHA', a single boolean value for the point
20271 sprite texture coordinate replacement, a single floating-point
20272 value for the texture level-of-detail bias, or 1.0, 2.0, or 4.0
20273 when specifying the `GL_RGB_SCALE' or `GL_ALPHA_SCALE'.
20274
20275 A texture environment specifies how texture values are interpreted when
20276 a fragment is textured. When TARGET is `GL_TEXTURE_FILTER_CONTROL',
20277 PNAME must be `GL_TEXTURE_LOD_BIAS'. When TARGET is `GL_TEXTURE_ENV',
20278 PNAME can be `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR',
20279 `GL_COMBINE_RGB', `GL_COMBINE_ALPHA', `GL_RGB_SCALE', `GL_ALPHA_SCALE',
20280 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
20281 `GL_SRC1_ALPHA', or `GL_SRC2_ALPHA'.
20282
20283 If PNAME is `GL_TEXTURE_ENV_MODE', then PARAMS is (or points to) the
20284 symbolic name of a texture function. Six texture functions may be
20285 specified: `GL_ADD', `GL_MODULATE', `GL_DECAL', `GL_BLEND',
20286 `GL_REPLACE', or `GL_COMBINE'.
20287
20288 The following table shows the correspondence of filtered texture values
20289 R_T , G_T , B_T , A_T , L_T , I_T to texture source components. C_S and
20290 A_S are used by the texture functions described below.
20291
20292
20293
20294 Texture Base Internal Format
20295 `C'_S , `A'_S
20296
20297 `GL_ALPHA'
20298 (0, 0, 0) , A_T
20299
20300 `GL_LUMINANCE'
20301 ( L_T , L_T , L_T ) , 1
20302
20303 `GL_LUMINANCE_ALPHA'
20304 ( L_T , L_T , L_T ) , A_T
20305
20306 `GL_INTENSITY'
20307 ( I_T , I_T , I_T ) , I_T
20308
20309 `GL_RGB'
20310 ( R_T , G_T , B_T ) , 1
20311
20312 `GL_RGBA'
20313 ( R_T , G_T , B_T ) , A_T
20314
20315 A texture function acts on the fragment to be textured using the texture
20316 image value that applies to the fragment (see `glTexParameter') and
20317 produces an RGBA color for that fragment. The following table shows how
20318 the RGBA color is produced for each of the first five texture functions
20319 that can be chosen. C is a triple of color values (RGB) and A is the
20320 associated alpha value. RGBA values extracted from a texture image are
20321 in the range [0,1]. The subscript P refers to the color computed from
20322 the previous texture stage (or the incoming fragment if processing
20323 texture stage 0), the subscript S to the texture source color, the
20324 subscript C to the texture environment color, and the subscript V
20325 indicates a value produced by the texture function.
20326
20327
20328
20329 Texture Base Internal Format
20330 `Value', `GL_REPLACE' Function , `GL_MODULATE' Function ,
20331 `GL_DECAL' Function , `GL_BLEND' Function , `GL_ADD' Function
20332
20333 `GL_ALPHA'
20334 C_V= , C_P , C_P , undefined , C_P , C_P
20335
20336
20337 A_V= , A_S , A_P\u2062A_S , , A_V=A_P\u2062A_S , A_P\u2062A_S
20338
20339 `GL_LUMINANCE'
20340 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20341
20342 (or 1)
20343 A_V= , A_P , A_P , , A_P , A_P
20344
20345 `GL_LUMINANCE_ALPHA'
20346 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20347
20348 (or 2)
20349 A_V= , A_S , A_P\u2062A_S , , A_P\u2062A_S , A_P\u2062A_S
20350
20351 `GL_INTENSITY'
20352 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20353
20354
20355 A_V= , A_S , A_P\u2062A_S , , A_P\u2062(1-A_S,)+A_C\u2062A_S , A_P+A_S
20356
20357 `GL_RGB'
20358 C_V= , C_S , C_P\u2062C_S , C_S , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20359
20360 (or 3)
20361 A_V= , A_P , A_P , A_P , A_P , A_P
20362
20363 `GL_RGBA'
20364 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
20365 , C_P+C_S
20366
20367 (or 4)
20368 A_V= , A_S , A_P\u2062A_S , A_P , A_P\u2062A_S , A_P\u2062A_S
20369
20370 If PNAME is `GL_TEXTURE_ENV_MODE', and PARAMS is `GL_COMBINE', the form
20371 of the texture function depends on the values of `GL_COMBINE_RGB' and
20372 `GL_COMBINE_ALPHA'.
20373
20374 The following describes how the texture sources, as specified by
20375 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
20376 `GL_SRC1_ALPHA', and `GL_SRC2_ALPHA', are combined to produce a final
20377 texture color. In the following tables, `GL_SRC0_c' is represented by
20378 ARG0 , `GL_SRC1_c' is represented by ARG1 , and `GL_SRC2_c' is
20379 represented by ARG2 .
20380
20381 `GL_COMBINE_RGB' accepts any of `GL_REPLACE', `GL_MODULATE', `GL_ADD',
20382 `GL_ADD_SIGNED', `GL_INTERPOLATE', `GL_SUBTRACT', `GL_DOT3_RGB', or
20383 `GL_DOT3_RGBA'.
20384
20385
20386
20387 *`GL_COMBINE_RGB'*
20388 *Texture Function*
20389
20390 `GL_REPLACE'
20391 ARG0
20392
20393 `GL_MODULATE'
20394 ARG0×ARG1
20395
20396 `GL_ADD'
20397 ARG0+ARG1
20398
20399 `GL_ADD_SIGNED'
20400 ARG0+ARG1-0.5
20401
20402 `GL_INTERPOLATE'
20403 ARG0×ARG2+ARG1×(1-ARG2,)
20404
20405 `GL_SUBTRACT'
20406 ARG0-ARG1
20407
20408 `GL_DOT3_RGB' or `GL_DOT3_RGBA'
20409 4×(((ARG0_R,-0.5,)×(ARG1_R,-0.5,),)+((ARG0_G,-0.5,)×(ARG1_G,-0.5,),
20410 )+((ARG0_B,-0.5,)×(ARG1_B,-0.5,),),)
20411
20412 The scalar results for `GL_DOT3_RGB' and `GL_DOT3_RGBA' are placed into
20413 each of the 3 (RGB) or 4 (RGBA) components on output.
20414
20415 Likewise, `GL_COMBINE_ALPHA' accepts any of `GL_REPLACE', `GL_MODULATE',
20416 `GL_ADD', `GL_ADD_SIGNED', `GL_INTERPOLATE', or `GL_SUBTRACT'. The
20417 following table describes how alpha values are combined:
20418
20419
20420
20421 *`GL_COMBINE_ALPHA'*
20422 *Texture Function*
20423
20424 `GL_REPLACE'
20425 ARG0
20426
20427 `GL_MODULATE'
20428 ARG0×ARG1
20429
20430 `GL_ADD'
20431 ARG0+ARG1
20432
20433 `GL_ADD_SIGNED'
20434 ARG0+ARG1-0.5
20435
20436 `GL_INTERPOLATE'
20437 ARG0×ARG2+ARG1×(1-ARG2,)
20438
20439 `GL_SUBTRACT'
20440 ARG0-ARG1
20441
20442 In the following tables, the value C_S represents the color sampled from
20443 the currently bound texture, C_C represents the constant
20444 texture-environment color, C_F represents the primary color of the
20445 incoming fragment, and C_P represents the color computed from the
20446 previous texture stage or C_F if processing texture stage 0. Likewise,
20447 A_S , A_C , A_F , and A_P represent the respective alpha values.
20448
20449 The following table describes the values assigned to ARG0 , ARG1 , and
20450 ARG2 based upon the RGB sources and operands:
20451
20452
20453
20454 *`GL_SRCn_RGB'*
20455 *`GL_OPERANDn_RGB'*, *Argument Value*
20456
20457 `GL_TEXTURE'
20458 `GL_SRC_COLOR', C_S,
20459
20460
20461 `GL_ONE_MINUS_SRC_COLOR', 1-C_S,
20462
20463
20464 `GL_SRC_ALPHA', A_S,
20465
20466
20467 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20468
20469 `GL_TEXTUREn'
20470 `GL_SRC_COLOR', C_S,
20471
20472
20473 `GL_ONE_MINUS_SRC_COLOR', 1-C_S,
20474
20475
20476 `GL_SRC_ALPHA', A_S,
20477
20478
20479 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20480
20481 `GL_CONSTANT'
20482 `GL_SRC_COLOR', C_C,
20483
20484
20485 `GL_ONE_MINUS_SRC_COLOR', 1-C_C,
20486
20487
20488 `GL_SRC_ALPHA', A_C,
20489
20490
20491 `GL_ONE_MINUS_SRC_ALPHA', 1-A_C,
20492
20493 `GL_PRIMARY_COLOR'
20494 `GL_SRC_COLOR', C_F,
20495
20496
20497 `GL_ONE_MINUS_SRC_COLOR', 1-C_F,
20498
20499
20500 `GL_SRC_ALPHA', A_F,
20501
20502
20503 `GL_ONE_MINUS_SRC_ALPHA', 1-A_F,
20504
20505 `GL_PREVIOUS'
20506 `GL_SRC_COLOR', C_P,
20507
20508
20509 `GL_ONE_MINUS_SRC_COLOR', 1-C_P,
20510
20511
20512 `GL_SRC_ALPHA', A_P,
20513
20514
20515 `GL_ONE_MINUS_SRC_ALPHA', 1-A_P,
20516
20517 For `GL_TEXTUREn' sources, C_S and A_S represent the color and alpha,
20518 respectively, produced from texture stage N .
20519
20520 The follow table describes the values assigned to ARG0 , ARG1 , and ARG2
20521 based upon the alpha sources and operands:
20522
20523
20524
20525 *`GL_SRCn_ALPHA'*
20526 *`GL_OPERANDn_ALPHA'*, *Argument Value*
20527
20528 `GL_TEXTURE'
20529 `GL_SRC_ALPHA', A_S,
20530
20531
20532 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20533
20534 `GL_TEXTUREn'
20535 `GL_SRC_ALPHA', A_S,
20536
20537
20538 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20539
20540 `GL_CONSTANT'
20541 `GL_SRC_ALPHA', A_C,
20542
20543
20544 `GL_ONE_MINUS_SRC_ALPHA', 1-A_C,
20545
20546 `GL_PRIMARY_COLOR'
20547 `GL_SRC_ALPHA', A_F,
20548
20549
20550 `GL_ONE_MINUS_SRC_ALPHA', 1-A_F,
20551
20552 `GL_PREVIOUS'
20553 `GL_SRC_ALPHA', A_P,
20554
20555
20556 `GL_ONE_MINUS_SRC_ALPHA', 1-A_P,
20557
20558 The RGB and alpha results of the texture function are multipled by the
20559 values of `GL_RGB_SCALE' and `GL_ALPHA_SCALE', respectively, and clamped
20560 to the range [0,1] .
20561
20562 If PNAME is `GL_TEXTURE_ENV_COLOR', PARAMS is a pointer to an array that
20563 holds an RGBA color consisting of four values. Integer color components
20564 are interpreted linearly such that the most positive integer maps to
20565 1.0, and the most negative integer maps to -1.0. The values are clamped
20566 to the range [0,1] when they are specified. C_C takes these four
20567 values.
20568
20569 If PNAME is `GL_TEXTURE_LOD_BIAS', the value specified is added to the
20570 texture level-of-detail parameter, that selects which mipmap, or mipmaps
20571 depending upon the selected `GL_TEXTURE_MIN_FILTER', will be sampled.
20572
20573 `GL_TEXTURE_ENV_MODE' defaults to `GL_MODULATE' and
20574 `GL_TEXTURE_ENV_COLOR' defaults to (0, 0, 0, 0).
20575
20576 If TARGET is `GL_POINT_SPRITE' and PNAME is `GL_COORD_REPLACE', the
20577 boolean value specified is used to either enable or disable point sprite
20578 texture coordinate replacement. The default value is `GL_FALSE'.
20579
20580 `GL_INVALID_ENUM' is generated when TARGET or PNAME is not one of the
20581 accepted defined values, or when PARAMS should have a defined constant
20582 value (based on the value of PNAME) and does not.
20583
20584 `GL_INVALID_VALUE' is generated if the PARAMS value for `GL_RGB_SCALE'
20585 or `GL_ALPHA_SCALE' are not one of 1.0, 2.0, or 4.0.
20586
20587 `GL_INVALID_OPERATION' is generated if `glTexEnv' is executed between
20588 the execution of `glBegin' and the corresponding execution of `glEnd'.")
20589
20590 (define-gl-procedures
20591 ((glTexGeni
20592 (coord GLenum)
20593 (pname GLenum)
20594 (param GLint)
20595 ->
20596 void)
20597 (glTexGenf
20598 (coord GLenum)
20599 (pname GLenum)
20600 (param GLfloat)
20601 ->
20602 void)
20603 (glTexGend
20604 (coord GLenum)
20605 (pname GLenum)
20606 (param GLdouble)
20607 ->
20608 void)
20609 (glTexGeniv
20610 (coord GLenum)
20611 (pname GLenum)
20612 (params const-GLint-*)
20613 ->
20614 void)
20615 (glTexGenfv
20616 (coord GLenum)
20617 (pname GLenum)
20618 (params const-GLfloat-*)
20619 ->
20620 void)
20621 (glTexGendv
20622 (coord GLenum)
20623 (pname GLenum)
20624 (params const-GLdouble-*)
20625 ->
20626 void))
20627 "Control the generation of texture coordinates.
20628
20629 COORD
20630 Specifies a texture coordinate. Must be one of `GL_S', `GL_T',
20631 `GL_R', or `GL_Q'.
20632
20633 PNAME
20634 Specifies the symbolic name of the texture-coordinate generation
20635 function. Must be `GL_TEXTURE_GEN_MODE'.
20636
20637 PARAM
20638 Specifies a single-valued texture generation parameter, one of
20639 `GL_OBJECT_LINEAR', `GL_EYE_LINEAR', `GL_SPHERE_MAP',
20640 `GL_NORMAL_MAP', or `GL_REFLECTION_MAP'.
20641
20642 `glTexGen' selects a texture-coordinate generation function or supplies
20643 coefficients for one of the functions. COORD names one of the (S, T, R,
20644 Q) texture coordinates; it must be one of the symbols `GL_S', `GL_T',
20645 `GL_R', or `GL_Q'. PNAME must be one of three symbolic constants:
20646 `GL_TEXTURE_GEN_MODE', `GL_OBJECT_PLANE', or `GL_EYE_PLANE'. If PNAME
20647 is `GL_TEXTURE_GEN_MODE', then PARAMS chooses a mode, one of
20648 `GL_OBJECT_LINEAR', `GL_EYE_LINEAR', `GL_SPHERE_MAP', `GL_NORMAL_MAP',
20649 or `GL_REFLECTION_MAP'. If PNAME is either `GL_OBJECT_PLANE' or
20650 `GL_EYE_PLANE', PARAMS contains coefficients for the corresponding
20651 texture generation function.
20652
20653 If the texture generation function is `GL_OBJECT_LINEAR', the function
20654
20655 G=P_1×X_O+P_2×Y_O+P_3×Z_O+P_4×W_O
20656
20657 is used, where G is the value computed for the coordinate named in
20658 COORD, P_1 , P_2 , P_3 , and P_4 are the four values supplied in PARAMS,
20659 and X_O , Y_O , Z_O , and W_O are the object coordinates of the vertex.
20660 This function can be used, for example, to texture-map terrain using sea
20661 level as a reference plane (defined by P_1 , P_2 , P_3 , and P_4 ). The
20662 altitude of a terrain vertex is computed by the `GL_OBJECT_LINEAR'
20663 coordinate generation function as its distance from sea level; that
20664 altitude can then be used to index the texture image to map white snow
20665 onto peaks and green grass onto foothills.
20666
20667 If the texture generation function is `GL_EYE_LINEAR', the function
20668
20669 G=P_1,^″×X_E+P_2,^″×Y_E+P_3,^″×Z_E+P_4,^″×W_E
20670
20671 is used, where
20672
20673 (P_1,^″\u2062P_2,^″\u2062P_3,^″\u2062P_4,^″,)=(P_1\u2062P_2\u2062P_3\u2062P_4,)\u2062M^-1
20674
20675 and X_E , Y_E , Z_E , and W_E are the eye coordinates of the vertex, P_1
20676 , P_2 , P_3 , and P_4 are the values supplied in PARAMS, and M is the
20677 modelview matrix when `glTexGen' is invoked. If M is poorly conditioned
20678 or singular, texture coordinates generated by the resulting function may
20679 be inaccurate or undefined.
20680
20681 Note that the values in PARAMS define a reference plane in eye
20682 coordinates. The modelview matrix that is applied to them may not be
20683 the same one in effect when the polygon vertices are transformed. This
20684 function establishes a field of texture coordinates that can produce
20685 dynamic contour lines on moving objects.
20686
20687 If the texture generation function is `GL_SPHERE_MAP' and COORD is
20688 either `GL_S' or `GL_T', S and T texture coordinates are generated as
20689 follows. Let U be the unit vector pointing from the origin to the
20690 polygon vertex (in eye coordinates). Let N sup prime be the current
20691 normal, after transformation to eye coordinates. Let
20692
20693 F=(F_X\u2062F_Y\u2062F_Z,)^T be the reflection vector such that
20694
20695 F=U-2\u2062N^″\u2062N^″,^T\u2062U
20696
20697 Finally, let M=2\u2062√(F_X,^2+F_Y,^2+(F_Z+1,)^2,) . Then the values
20698 assigned to the S and T texture coordinates are
20699
20700 S=F_X/M+1/2
20701
20702 T=F_Y/M+1/2
20703
20704 To enable or disable a texture-coordinate generation function, call
20705 `glEnable' or `glDisable' with one of the symbolic texture-coordinate
20706 names (`GL_TEXTURE_GEN_S', `GL_TEXTURE_GEN_T', `GL_TEXTURE_GEN_R', or
20707 `GL_TEXTURE_GEN_Q') as the argument. When enabled, the specified
20708 texture coordinate is computed according to the generating function
20709 associated with that coordinate. When disabled, subsequent vertices
20710 take the specified texture coordinate from the current set of texture
20711 coordinates. Initially, all texture generation functions are set to
20712 `GL_EYE_LINEAR' and are disabled. Both S plane equations are (1, 0, 0,
20713 0), both T plane equations are (0, 1, 0, 0), and all R and Q plane
20714 equations are (0, 0, 0, 0).
20715
20716 When the `ARB_multitexture' extension is supported, `glTexGen' sets the
20717 texture generation parameters for the currently active texture unit,
20718 selected with `glActiveTexture'.
20719
20720 `GL_INVALID_ENUM' is generated when COORD or PNAME is not an accepted
20721 defined value, or when PNAME is `GL_TEXTURE_GEN_MODE' and PARAMS is not
20722 an accepted defined value.
20723
20724 `GL_INVALID_ENUM' is generated when PNAME is `GL_TEXTURE_GEN_MODE',
20725 PARAMS is `GL_SPHERE_MAP', and COORD is either `GL_R' or `GL_Q'.
20726
20727 `GL_INVALID_OPERATION' is generated if `glTexGen' is executed between
20728 the execution of `glBegin' and the corresponding execution of `glEnd'.")
20729
20730 (define-gl-procedures
20731 ((glTexImage1D
20732 (target GLenum)
20733 (level GLint)
20734 (internalFormat GLint)
20735 (width GLsizei)
20736 (border GLint)
20737 (format GLenum)
20738 (type GLenum)
20739 (data const-GLvoid-*)
20740 ->
20741 void))
20742 "Specify a one-dimensional texture image.
20743
20744 TARGET
20745 Specifies the target texture. Must be `GL_TEXTURE_1D' or
20746 `GL_PROXY_TEXTURE_1D'.
20747
20748 LEVEL
20749 Specifies the level-of-detail number. Level 0 is the base image
20750 level. Level N is the Nth mipmap reduction image.
20751
20752 INTERNALFORMAT
20753 Specifies the number of color components in the texture. Must be
20754 1, 2, 3, or 4, or one of the following symbolic constants:
20755 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
20756 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
20757 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
20758 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT',
20759 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24',
20760 `GL_DEPTH_COMPONENT32', `GL_LUMINANCE', `GL_LUMINANCE4',
20761 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
20762 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
20763 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
20764 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
20765 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
20766 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
20767 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
20768 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
20769 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
20770 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
20771 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
20772 `GL_SRGB8_ALPHA8'.
20773
20774 WIDTH
20775 Specifies the width of the texture image including the border if
20776 any. If the GL version does not support non-power-of-two sizes,
20777 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
20778 implementations support texture images that are at least 64 texels
20779 wide. The height of the 1D texture image is 1.
20780
20781 BORDER
20782 Specifies the width of the border. Must be either 0 or 1.
20783
20784 FORMAT
20785 Specifies the format of the pixel data. The following symbolic
20786 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
20787 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
20788 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
20789
20790 TYPE
20791 Specifies the data type of the pixel data. The following symbolic
20792 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
20793 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
20794 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20795 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
20796 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20797 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20798 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20799 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
20800
20801 DATA
20802 Specifies a pointer to the image data in memory.
20803
20804 Texturing maps a portion of a specified texture image onto each
20805 graphical primitive for which texturing is enabled. To enable and
20806 disable one-dimensional texturing, call `glEnable' and `glDisable' with
20807 argument `GL_TEXTURE_1D'.
20808
20809 Texture images are defined with `glTexImage1D'. The arguments describe
20810 the parameters of the texture image, such as width, width of the border,
20811 level-of-detail number (see `glTexParameter'), and the internal
20812 resolution and format used to store the image. The last three arguments
20813 describe how the image is represented in memory; they are identical to
20814 the pixel formats used for `glDrawPixels'.
20815
20816 If TARGET is `GL_PROXY_TEXTURE_1D', no data is read from DATA, but all
20817 of the texture image state is recalculated, checked for consistency, and
20818 checked against the implementation's capabilities. If the
20819 implementation cannot handle a texture of the requested texture size, it
20820 sets all of the image state to 0, but does not generate an error (see
20821 `glGetError'). To query for an entire mipmap array, use an image array
20822 level greater than or equal to 1.
20823
20824 If TARGET is `GL_TEXTURE_1D', data is read from DATA as a sequence of
20825 signed or unsigned bytes, shorts, or longs, or single-precision
20826 floating-point values, depending on TYPE. These values are grouped into
20827 sets of one, two, three, or four values, depending on FORMAT, to form
20828 elements. If TYPE is `GL_BITMAP', the data is considered as a string of
20829 unsigned bytes (and FORMAT must be `GL_COLOR_INDEX'). Each data byte is
20830 treated as eight 1-bit elements, with bit ordering determined by
20831 `GL_UNPACK_LSB_FIRST' (see `glPixelStore').
20832
20833 If a non-zero named buffer object is bound to the
20834 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
20835 image is specified, DATA is treated as a byte offset into the buffer
20836 object's data store.
20837
20838 The first element corresponds to the left end of the texture array.
20839 Subsequent elements progress left-to-right through the remaining texels
20840 in the texture array. The final element corresponds to the right end of
20841 the texture array.
20842
20843 FORMAT determines the composition of each element in DATA. It can
20844 assume one of these symbolic values:
20845
20846 `GL_COLOR_INDEX'
20847 Each element is a single value, a color index. The GL converts it
20848 to fixed point (with an unspecified number of zero bits to the
20849 right of the binary point), shifted left or right depending on the
20850 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
20851 (see `glPixelTransfer'). The resulting index is converted to a set
20852 of color components using the `GL_PIXEL_MAP_I_TO_R',
20853 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
20854 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
20855
20856 `GL_RED'
20857 Each element is a single red component. The GL converts it to
20858 floating point and assembles it into an RGBA element by attaching 0
20859 for green and blue, and 1 for alpha. Each component is then
20860 multiplied by the signed scale factor `GL_c_SCALE', added to the
20861 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20862 `glPixelTransfer').
20863
20864 `GL_GREEN'
20865 Each element is a single green component. The GL converts it to
20866 floating point and assembles it into an RGBA element by attaching 0
20867 for red and blue, and 1 for alpha. Each component is then
20868 multiplied by the signed scale factor `GL_c_SCALE', added to the
20869 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20870 `glPixelTransfer').
20871
20872 `GL_BLUE'
20873 Each element is a single blue component. The GL converts it to
20874 floating point and assembles it into an RGBA element by attaching 0
20875 for red and green, and 1 for alpha. Each component is then
20876 multiplied by the signed scale factor `GL_c_SCALE', added to the
20877 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20878 `glPixelTransfer').
20879
20880 `GL_ALPHA'
20881 Each element is a single alpha component. The GL converts it to
20882 floating point and assembles it into an RGBA element by attaching 0
20883 for red, green, and blue. Each component is then multiplied by the
20884 signed scale factor `GL_c_SCALE', added to the signed bias
20885 `GL_c_BIAS', and clamped to the range [0,1] (see
20886 `glPixelTransfer').
20887
20888 `GL_INTENSITY'
20889 Each element is a single intensity value. The GL converts it to
20890 floating point, then assembles it into an RGBA element by
20891 replicating the intensity value three times for red, green, blue,
20892 and alpha. Each component is then multiplied by the signed scale
20893 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
20894 clamped to the range [0,1] (see `glPixelTransfer').
20895
20896 `GL_RGB'
20897 `GL_BGR'
20898 Each element is an RGB triple. The GL converts it to floating
20899 point and assembles it into an RGBA element by attaching 1 for
20900 alpha. Each component is then multiplied by the signed scale
20901 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
20902 clamped to the range [0,1] (see `glPixelTransfer').
20903
20904 `GL_RGBA'
20905 `GL_BGRA'
20906 Each element contains all four components. Each component is
20907 multiplied by the signed scale factor `GL_c_SCALE', added to the
20908 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20909 `glPixelTransfer').
20910
20911 `GL_LUMINANCE'
20912 Each element is a single luminance value. The GL converts it to
20913 floating point, then assembles it into an RGBA element by
20914 replicating the luminance value three times for red, green, and
20915 blue and attaching 1 for alpha. Each component is then multiplied
20916 by the signed scale factor `GL_c_SCALE', added to the signed bias
20917 `GL_c_BIAS', and clamped to the range [0,1] (see
20918 `glPixelTransfer').
20919
20920 `GL_LUMINANCE_ALPHA'
20921 Each element is a luminance/alpha pair. The GL converts it to
20922 floating point, then assembles it into an RGBA element by
20923 replicating the luminance value three times for red, green, and
20924 blue. Each component is then multiplied by the signed scale factor
20925 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20926 the range [0,1] (see `glPixelTransfer').
20927
20928 `GL_DEPTH_COMPONENT'
20929 Each element is a single depth value. The GL converts it to
20930 floating point, multiplies by the signed scale factor
20931 `GL_DEPTH_SCALE', adds the signed bias `GL_DEPTH_BIAS', and clamps
20932 to the range [0,1] (see `glPixelTransfer').
20933
20934 Refer to the `glDrawPixels' reference page for a description of the
20935 acceptable values for the TYPE parameter.
20936
20937 If an application wants to store the texture at a certain resolution or
20938 in a certain format, it can request the resolution and format with
20939 INTERNALFORMAT. The GL will choose an internal representation that
20940 closely approximates that requested by INTERNALFORMAT, but it may not
20941 match exactly. (The representations specified by `GL_LUMINANCE',
20942 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
20943 numeric values 1, 2, 3, and 4 may also be used to specify the above
20944 representations.)
20945
20946 If the INTERNALFORMAT parameter is one of the generic compressed
20947 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
20948 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
20949 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
20950 internal format with the symbolic constant for a specific internal
20951 format and compress the texture before storage. If no corresponding
20952 internal format is available, or the GL can not compress that image for
20953 any reason, the internal format is instead replaced with a corresponding
20954 base internal format.
20955
20956 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
20957 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
20958 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
20959 treated as if the red, green, blue, or luminance components are encoded
20960 in the sRGB color space. Any alpha component is left unchanged. The
20961 conversion from the sRGB encoded component C_S to a linear component C_L
20962 is:
20963
20964 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
20965 C_S>0.04045)
20966
20967 Assume C_S is the sRGB component in the range [0,1].
20968
20969 Use the `GL_PROXY_TEXTURE_1D' target to try out a resolution and format.
20970 The implementation will update and recompute its best match for the
20971 requested storage resolution and format. To then query this state, call
20972 `glGetTexLevelParameter'. If the texture cannot be accommodated,
20973 texture state is set to 0.
20974
20975 A one-component texture image uses only the red component of the RGBA
20976 color from DATA. A two-component image uses the R and A values. A
20977 three-component image uses the R, G, and B values. A four-component
20978 image uses all of the RGBA components.
20979
20980 Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures
20981 during texture filtering and application. \xa0Image-based shadowing\xa0can\xa0be
20982 \xa0enabled\xa0by\xa0comparing texture r coordinates to depth texture values to
20983 generate a boolean result. See `glTexParameter' for details on texture
20984 comparison.
20985
20986 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_1D' or
20987 `GL_PROXY_TEXTURE_1D'.
20988
20989 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
20990 constant. Format constants other than `GL_STENCIL_INDEX' are accepted.
20991
20992 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
20993
20994 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
20995 `GL_COLOR_INDEX'.
20996
20997 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
20998
20999 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
21000 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21001
21002 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
21003 one of the accepted resolution and format symbolic constants.
21004
21005 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
21006 2 + `GL_MAX_TEXTURE_SIZE'.
21007
21008 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
21009 supported and the WIDTH cannot be represented as 2^N+2\u2061(BORDER,) for
21010 some integer value of N.
21011
21012 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
21013
21014 `GL_INVALID_OPERATION' is generated if TYPE is one of
21015 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21016 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21017 is not `GL_RGB'.
21018
21019 `GL_INVALID_OPERATION' is generated if TYPE is one of
21020 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21021 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21022 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21023 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21024 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21025
21026 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
21027 and INTERNALFORMAT is not `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
21028 `GL_DEPTH_COMPONENT24', or `GL_DEPTH_COMPONENT32'.
21029
21030 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
21031 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
21032 `GL_DEPTH_COMPONENT32', and FORMAT is not `GL_DEPTH_COMPONENT'.
21033
21034 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21035 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21036 data store is currently mapped.
21037
21038 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21039 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21040 unpacked from the buffer object such that the memory reads required
21041 would exceed the data store size.
21042
21043 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21044 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21045 divisible into the number of bytes needed to store in memory a datum
21046 indicated by TYPE.
21047
21048 `GL_INVALID_OPERATION' is generated if `glTexImage1D' is executed
21049 between the execution of `glBegin' and the corresponding execution of
21050 `glEnd'.")
21051
21052 (define-gl-procedures
21053 ((glTexImage2D
21054 (target GLenum)
21055 (level GLint)
21056 (internalFormat GLint)
21057 (width GLsizei)
21058 (height GLsizei)
21059 (border GLint)
21060 (format GLenum)
21061 (type GLenum)
21062 (data const-GLvoid-*)
21063 ->
21064 void))
21065 "Specify a two-dimensional texture image.
21066
21067 TARGET
21068 Specifies the target texture. Must be `GL_TEXTURE_2D',
21069 `GL_PROXY_TEXTURE_2D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
21070 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
21071 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
21072 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
21073
21074 LEVEL
21075 Specifies the level-of-detail number. Level 0 is the base image
21076 level. Level N is the Nth mipmap reduction image.
21077
21078 INTERNALFORMAT
21079 Specifies the number of color components in the texture. Must be
21080 1, 2, 3, or 4, or one of the following symbolic constants:
21081 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
21082 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
21083 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
21084 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT',
21085 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24',
21086 `GL_DEPTH_COMPONENT32', `GL_LUMINANCE', `GL_LUMINANCE4',
21087 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
21088 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
21089 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
21090 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
21091 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
21092 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
21093 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
21094 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
21095 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
21096 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
21097 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
21098 `GL_SRGB8_ALPHA8'.
21099
21100 WIDTH
21101 Specifies the width of the texture image including the border if
21102 any. If the GL version does not support non-power-of-two sizes,
21103 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
21104 implementations support texture images that are at least 64 texels
21105 wide.
21106
21107 HEIGHT
21108 Specifies the height of the texture image including the border if
21109 any. If the GL version does not support non-power-of-two sizes,
21110 this value must be 2^M+2\u2061(BORDER,) for some integer M . All
21111 implementations support texture images that are at least 64 texels
21112 high.
21113
21114 BORDER
21115 Specifies the width of the border. Must be either 0 or 1.
21116
21117 FORMAT
21118 Specifies the format of the pixel data. The following symbolic
21119 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
21120 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
21121 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
21122
21123 TYPE
21124 Specifies the data type of the pixel data. The following symbolic
21125 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
21126 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
21127 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21128 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
21129 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21130 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21131 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21132 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
21133
21134 DATA
21135 Specifies a pointer to the image data in memory.
21136
21137 Texturing maps a portion of a specified texture image onto each
21138 graphical primitive for which texturing is enabled. To enable and
21139 disable two-dimensional texturing, call `glEnable' and `glDisable' with
21140 argument `GL_TEXTURE_2D'. To enable and disable texturing using
21141 cube-mapped texture, call `glEnable' and `glDisable' with argument
21142 `GL_TEXTURE_CUBE_MAP'.
21143
21144 To define texture images, call `glTexImage2D'. The arguments describe
21145 the parameters of the texture image, such as height, width, width of the
21146 border, level-of-detail number (see `glTexParameter'), and number of
21147 color components provided. The last three arguments describe how the
21148 image is represented in memory; they are identical to the pixel formats
21149 used for `glDrawPixels'.
21150
21151 If TARGET is `GL_PROXY_TEXTURE_2D' or `GL_PROXY_TEXTURE_CUBE_MAP', no
21152 data is read from DATA, but all of the texture image state is
21153 recalculated, checked for consistency, and checked against the
21154 implementation's capabilities. If the implementation cannot handle a
21155 texture of the requested texture size, it sets all of the image state to
21156 0, but does not generate an error (see `glGetError'). To query for an
21157 entire mipmap array, use an image array level greater than or equal to
21158 1.
21159
21160 If TARGET is `GL_TEXTURE_2D', or one of the `GL_TEXTURE_CUBE_MAP'
21161 targets, data is read from DATA as a sequence of signed or unsigned
21162 bytes, shorts, or longs, or single-precision floating-point values,
21163 depending on TYPE. These values are grouped into sets of one, two,
21164 three, or four values, depending on FORMAT, to form elements. If TYPE
21165 is `GL_BITMAP', the data is considered as a string of unsigned bytes
21166 (and FORMAT must be `GL_COLOR_INDEX'). Each data byte is treated as
21167 eight 1-bit elements, with bit ordering determined by
21168 `GL_UNPACK_LSB_FIRST' (see `glPixelStore').
21169
21170 If a non-zero named buffer object is bound to the
21171 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
21172 image is specified, DATA is treated as a byte offset into the buffer
21173 object's data store.
21174
21175 The first element corresponds to the lower left corner of the texture
21176 image. Subsequent elements progress left-to-right through the remaining
21177 texels in the lowest row of the texture image, and then in successively
21178 higher rows of the texture image. The final element corresponds to the
21179 upper right corner of the texture image.
21180
21181 FORMAT determines the composition of each element in DATA. It can
21182 assume one of these symbolic values:
21183
21184 `GL_COLOR_INDEX'
21185 Each element is a single value, a color index. The GL converts it
21186 to fixed point (with an unspecified number of zero bits to the
21187 right of the binary point), shifted left or right depending on the
21188 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
21189 (see `glPixelTransfer'). The resulting index is converted to a set
21190 of color components using the `GL_PIXEL_MAP_I_TO_R',
21191 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
21192 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
21193
21194 `GL_RED'
21195 Each element is a single red component. The GL converts it to
21196 floating point and assembles it into an RGBA element by attaching 0
21197 for green and blue, and 1 for alpha. Each component is then
21198 multiplied by the signed scale factor `GL_c_SCALE', added to the
21199 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21200 `glPixelTransfer').
21201
21202 `GL_GREEN'
21203 Each element is a single green component. The GL converts it to
21204 floating point and assembles it into an RGBA element by attaching 0
21205 for red and blue, and 1 for alpha. Each component is then
21206 multiplied by the signed scale factor `GL_c_SCALE', added to the
21207 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21208 `glPixelTransfer').
21209
21210 `GL_BLUE'
21211 Each element is a single blue component. The GL converts it to
21212 floating point and assembles it into an RGBA element by attaching 0
21213 for red and green, and 1 for alpha. Each component is then
21214 multiplied by the signed scale factor `GL_c_SCALE', added to the
21215 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21216 `glPixelTransfer').
21217
21218 `GL_ALPHA'
21219 Each element is a single alpha component. The GL converts it to
21220 floating point and assembles it into an RGBA element by attaching 0
21221 for red, green, and blue. Each component is then multiplied by the
21222 signed scale factor `GL_c_SCALE', added to the signed bias
21223 `GL_c_BIAS', and clamped to the range [0,1] (see
21224 `glPixelTransfer').
21225
21226 `GL_INTENSITY'
21227 Each element is a single intensity value. The GL converts it to
21228 floating point, then assembles it into an RGBA element by
21229 replicating the intensity value three times for red, green, blue,
21230 and alpha. Each component is then multiplied by the signed scale
21231 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
21232 clamped to the range [0,1] (see `glPixelTransfer').
21233
21234 `GL_RGB'
21235 `GL_BGR'
21236 Each element is an RGB triple. The GL converts it to floating
21237 point and assembles it into an RGBA element by attaching 1 for
21238 alpha. Each component is then multiplied by the signed scale
21239 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
21240 clamped to the range [0,1] (see `glPixelTransfer').
21241
21242 `GL_RGBA'
21243 `GL_BGRA'
21244 Each element contains all four components. Each component is
21245 multiplied by the signed scale factor `GL_c_SCALE', added to the
21246 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21247 `glPixelTransfer').
21248
21249 `GL_LUMINANCE'
21250 Each element is a single luminance value. The GL converts it to
21251 floating point, then assembles it into an RGBA element by
21252 replicating the luminance value three times for red, green, and
21253 blue and attaching 1 for alpha. Each component is then multiplied
21254 by the signed scale factor `GL_c_SCALE', added to the signed bias
21255 `GL_c_BIAS', and clamped to the range [0,1] (see
21256 `glPixelTransfer').
21257
21258 `GL_LUMINANCE_ALPHA'
21259 Each element is a luminance/alpha pair. The GL converts it to
21260 floating point, then assembles it into an RGBA element by
21261 replicating the luminance value three times for red, green, and
21262 blue. Each component is then multiplied by the signed scale factor
21263 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
21264 the range [0,1] (see `glPixelTransfer').
21265
21266 `GL_DEPTH_COMPONENT'
21267 Each element is a single depth value. The GL converts it to
21268 floating point, multiplies by the signed scale factor
21269 `GL_DEPTH_SCALE', adds the signed bias `GL_DEPTH_BIAS', and clamps
21270 to the range [0,1] (see `glPixelTransfer').
21271
21272 Refer to the `glDrawPixels' reference page for a description of the
21273 acceptable values for the TYPE parameter.
21274
21275 If an application wants to store the texture at a certain resolution or
21276 in a certain format, it can request the resolution and format with
21277 INTERNALFORMAT. The GL will choose an internal representation that
21278 closely approximates that requested by INTERNALFORMAT, but it may not
21279 match exactly. (The representations specified by `GL_LUMINANCE',
21280 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
21281 numeric values 1, 2, 3, and 4 may also be used to specify the above
21282 representations.)
21283
21284 If the INTERNALFORMAT parameter is one of the generic compressed
21285 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
21286 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
21287 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
21288 internal format with the symbolic constant for a specific internal
21289 format and compress the texture before storage. If no corresponding
21290 internal format is available, or the GL can not compress that image for
21291 any reason, the internal format is instead replaced with a corresponding
21292 base internal format.
21293
21294 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
21295 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
21296 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
21297 treated as if the red, green, blue, or luminance components are encoded
21298 in the sRGB color space. Any alpha component is left unchanged. The
21299 conversion from the sRGB encoded component C_S to a linear component C_L
21300 is:
21301
21302 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
21303 C_S>0.04045)
21304
21305 Assume C_S is the sRGB component in the range [0,1].
21306
21307 Use the `GL_PROXY_TEXTURE_2D' or `GL_PROXY_TEXTURE_CUBE_MAP' target to
21308 try out a resolution and format. The implementation will update and
21309 recompute its best match for the requested storage resolution and
21310 format. To then query this state, call `glGetTexLevelParameter'. If
21311 the texture cannot be accommodated, texture state is set to 0.
21312
21313 A one-component texture image uses only the red component of the RGBA
21314 color extracted from DATA. A two-component image uses the R and A
21315 values. A three-component image uses the R, G, and B values. A
21316 four-component image uses all of the RGBA components.
21317
21318 Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures
21319 during texture filtering and application. \xa0Image-based shadowing\xa0can\xa0be
21320 \xa0enabled\xa0by\xa0comparing texture r coordinates to depth texture values to
21321 generate a boolean result. See `glTexParameter' for details on texture
21322 comparison.
21323
21324 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
21325 `GL_PROXY_TEXTURE_2D', `GL_PROXY_TEXTURE_CUBE_MAP',
21326 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
21327 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
21328 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
21329
21330 `GL_INVALID_ENUM' is generated if TARGET is one of the six cube map 2D
21331 image targets and the width and height parameters are not equal.
21332
21333 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
21334
21335 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
21336 `GL_COLOR_INDEX'.
21337
21338 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0 or
21339 greater than 2 + `GL_MAX_TEXTURE_SIZE'.
21340
21341 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
21342
21343 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
21344 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21345
21346 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
21347 one of the accepted resolution and format symbolic constants.
21348
21349 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0 or
21350 greater than 2 + `GL_MAX_TEXTURE_SIZE'.
21351
21352 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
21353 supported and the WIDTH or HEIGHT cannot be represented as
21354 2^K+2\u2061(BORDER,) for some integer value of K.
21355
21356 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
21357
21358 `GL_INVALID_OPERATION' is generated if TYPE is one of
21359 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21360 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21361 is not `GL_RGB'.
21362
21363 `GL_INVALID_OPERATION' is generated if TYPE is one of
21364 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21365 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21366 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21367 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21368 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21369
21370 `GL_INVALID_OPERATION' is generated if TARGET is not `GL_TEXTURE_2D' or
21371 `GL_PROXY_TEXTURE_2D' and INTERNALFORMAT is `GL_DEPTH_COMPONENT',
21372 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
21373 `GL_DEPTH_COMPONENT32'.
21374
21375 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
21376 and INTERNALFORMAT is not `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
21377 `GL_DEPTH_COMPONENT24', or `GL_DEPTH_COMPONENT32'.
21378
21379 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
21380 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
21381 `GL_DEPTH_COMPONENT32', and FORMAT is not `GL_DEPTH_COMPONENT'.
21382
21383 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21384 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21385 data store is currently mapped.
21386
21387 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21388 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21389 unpacked from the buffer object such that the memory reads required
21390 would exceed the data store size.
21391
21392 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21393 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21394 divisible into the number of bytes needed to store in memory a datum
21395 indicated by TYPE.
21396
21397 `GL_INVALID_OPERATION' is generated if `glTexImage2D' is executed
21398 between the execution of `glBegin' and the corresponding execution of
21399 `glEnd'.")
21400
21401 (define-gl-procedures
21402 ((glTexImage3D
21403 (target GLenum)
21404 (level GLint)
21405 (internalFormat GLint)
21406 (width GLsizei)
21407 (height GLsizei)
21408 (depth GLsizei)
21409 (border GLint)
21410 (format GLenum)
21411 (type GLenum)
21412 (data const-GLvoid-*)
21413 ->
21414 void))
21415 "Specify a three-dimensional texture image.
21416
21417 TARGET
21418 Specifies the target texture. Must be `GL_TEXTURE_3D' or
21419 `GL_PROXY_TEXTURE_3D'.
21420
21421 LEVEL
21422 Specifies the level-of-detail number. Level 0 is the base image
21423 level. Level N is the N^TH mipmap reduction image.
21424
21425 INTERNALFORMAT
21426 Specifies the number of color components in the texture. Must be
21427 1, 2, 3, or 4, or one of the following symbolic constants:
21428 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
21429 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
21430 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
21431 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_LUMINANCE',
21432 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
21433 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
21434 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
21435 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
21436 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
21437 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
21438 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
21439 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
21440 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
21441 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
21442 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
21443 `GL_SRGB8_ALPHA8'.
21444
21445 WIDTH
21446 Specifies the width of the texture image including the border if
21447 any. If the GL version does not support non-power-of-two sizes,
21448 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
21449 implementations support 3D texture images that are at least 16
21450 texels wide.
21451
21452 HEIGHT
21453 Specifies the height of the texture image including the border if
21454 any. If the GL version does not support non-power-of-two sizes,
21455 this value must be 2^M+2\u2061(BORDER,) for some integer M . All
21456 implementations support 3D texture images that are at least 16
21457 texels high.
21458
21459 DEPTH
21460 Specifies the depth of the texture image including the border if
21461 any. If the GL version does not support non-power-of-two sizes,
21462 this value must be 2^K+2\u2061(BORDER,) for some integer K . All
21463 implementations support 3D texture images that are at least 16
21464 texels deep.
21465
21466 BORDER
21467 Specifies the width of the border. Must be either 0 or 1.
21468
21469 FORMAT
21470 Specifies the format of the pixel data. The following symbolic
21471 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
21472 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
21473 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
21474
21475 TYPE
21476 Specifies the data type of the pixel data. The following symbolic
21477 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
21478 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
21479 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21480 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
21481 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21482 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21483 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21484 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
21485
21486 DATA
21487 Specifies a pointer to the image data in memory.
21488
21489 Texturing maps a portion of a specified texture image onto each
21490 graphical primitive for which texturing is enabled. To enable and
21491 disable three-dimensional texturing, call `glEnable' and `glDisable'
21492 with argument `GL_TEXTURE_3D'.
21493
21494 To define texture images, call `glTexImage3D'. The arguments describe
21495 the parameters of the texture image, such as height, width, depth, width
21496 of the border, level-of-detail number (see `glTexParameter'), and number
21497 of color components provided. The last three arguments describe how the
21498 image is represented in memory; they are identical to the pixel formats
21499 used for `glDrawPixels'.
21500
21501 If TARGET is `GL_PROXY_TEXTURE_3D', no data is read from DATA, but all
21502 of the texture image state is recalculated, checked for consistency, and
21503 checked against the implementation's capabilities. If the
21504 implementation cannot handle a texture of the requested texture size, it
21505 sets all of the image state to 0, but does not generate an error (see
21506 `glGetError'). To query for an entire mipmap array, use an image array
21507 level greater than or equal to 1.
21508
21509 If TARGET is `GL_TEXTURE_3D', data is read from DATA as a sequence of
21510 signed or unsigned bytes, shorts, or longs, or single-precision
21511 floating-point values, depending on TYPE. These values are grouped into
21512 sets of one, two, three, or four values, depending on FORMAT, to form
21513 elements. If TYPE is `GL_BITMAP', the data is considered as a string of
21514 unsigned bytes (and FORMAT must be `GL_COLOR_INDEX'). Each data byte is
21515 treated as eight 1-bit elements, with bit ordering determined by
21516 `GL_UNPACK_LSB_FIRST' (see `glPixelStore').
21517
21518 If a non-zero named buffer object is bound to the
21519 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
21520 image is specified, DATA is treated as a byte offset into the buffer
21521 object's data store.
21522
21523 The first element corresponds to the lower left corner of the texture
21524 image. Subsequent elements progress left-to-right through the remaining
21525 texels in the lowest row of the texture image, and then in successively
21526 higher rows of the texture image. The final element corresponds to the
21527 upper right corner of the texture image.
21528
21529 FORMAT determines the composition of each element in DATA. It can
21530 assume one of these symbolic values:
21531
21532 `GL_COLOR_INDEX'
21533 Each element is a single value, a color index. The GL converts it
21534 to fixed point (with an unspecified number of zero bits to the
21535 right of the binary point), shifted left or right depending on the
21536 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
21537 (see `glPixelTransfer'). The resulting index is converted to a set
21538 of color components using the `GL_PIXEL_MAP_I_TO_R',
21539 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
21540 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
21541
21542 `GL_RED'
21543 Each element is a single red component. The GL converts it to
21544 floating point and assembles it into an RGBA element by attaching 0
21545 for green and blue, and 1 for alpha. Each component is then
21546 multiplied by the signed scale factor `GL_c_SCALE', added to the
21547 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21548 `glPixelTransfer').
21549
21550 `GL_GREEN'
21551 Each element is a single green component. The GL converts it to
21552 floating point and assembles it into an RGBA element by attaching 0
21553 for red and blue, and 1 for alpha. Each component is then
21554 multiplied by the signed scale factor `GL_c_SCALE', added to the
21555 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21556 `glPixelTransfer').
21557
21558 `GL_BLUE'
21559 Each element is a single blue component. The GL converts it to
21560 floating point and assembles it into an RGBA element by attaching 0
21561 for red and green, and 1 for alpha. Each component is then
21562 multiplied by the signed scale factor `GL_c_SCALE', added to the
21563 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21564 `glPixelTransfer').
21565
21566 `GL_ALPHA'
21567 Each element is a single alpha component. The GL converts it to
21568 floating point and assembles it into an RGBA element by attaching 0
21569 for red, green, and blue. Each component is then multiplied by the
21570 signed scale factor `GL_c_SCALE', added to the signed bias
21571 `GL_c_BIAS', and clamped to the range [0,1] (see
21572 `glPixelTransfer').
21573
21574 `GL_INTENSITY'
21575 Each element is a single intensity value. The GL converts it to
21576 floating point, then assembles it into an RGBA element by
21577 replicating the intensity value three times for red, green, blue,
21578 and alpha. Each component is then multiplied by the signed scale
21579 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
21580 clamped to the range [0,1] (see `glPixelTransfer').
21581
21582 `GL_RGB'
21583 `GL_BGR'
21584 Each element is an RGB triple. The GL converts it to floating
21585 point and assembles it into an RGBA element by attaching 1 for
21586 alpha. Each component is then multiplied by the signed scale
21587 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
21588 clamped to the range [0,1] (see `glPixelTransfer').
21589
21590 `GL_RGBA'
21591 `GL_BGRA'
21592 Each element contains all four components. Each component is
21593 multiplied by the signed scale factor `GL_c_SCALE', added to the
21594 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21595 `glPixelTransfer').
21596
21597 `GL_LUMINANCE'
21598 Each element is a single luminance value. The GL converts it to
21599 floating point, then assembles it into an RGBA element by
21600 replicating the luminance value three times for red, green, and
21601 blue and attaching 1 for alpha. Each component is then multiplied
21602 by the signed scale factor `GL_c_SCALE', added to the signed bias
21603 `GL_c_BIAS', and clamped to the range [0,1] (see
21604 `glPixelTransfer').
21605
21606 `GL_LUMINANCE_ALPHA'
21607 Each element is a luminance/alpha pair. The GL converts it to
21608 floating point, then assembles it into an RGBA element by
21609 replicating the luminance value three times for red, green, and
21610 blue. Each component is then multiplied by the signed scale factor
21611 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
21612 the range [0,1] (see `glPixelTransfer').
21613
21614 Refer to the `glDrawPixels' reference page for a description of the
21615 acceptable values for the TYPE parameter.
21616
21617 If an application wants to store the texture at a certain resolution or
21618 in a certain format, it can request the resolution and format with
21619 INTERNALFORMAT. The GL will choose an internal representation that
21620 closely approximates that requested by INTERNALFORMAT, but it may not
21621 match exactly. (The representations specified by `GL_LUMINANCE',
21622 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
21623 numeric values 1, 2, 3, and 4 may also be used to specify the above
21624 representations.)
21625
21626 If the INTERNALFORMAT parameter is one of the generic compressed
21627 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
21628 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
21629 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
21630 internal format with the symbolic constant for a specific internal
21631 format and compress the texture before storage. If no corresponding
21632 internal format is available, or the GL can not compress that image for
21633 any reason, the internal format is instead replaced with a corresponding
21634 base internal format.
21635
21636 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
21637 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
21638 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
21639 treated as if the red, green, blue, or luminance components are encoded
21640 in the sRGB color space. Any alpha component is left unchanged. The
21641 conversion from the sRGB encoded component C_S to a linear component C_L
21642 is:
21643
21644 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
21645 C_S>0.04045)
21646
21647 Assume C_S is the sRGB component in the range [0,1].
21648
21649 Use the `GL_PROXY_TEXTURE_3D' target to try out a resolution and format.
21650 The implementation will update and recompute its best match for the
21651 requested storage resolution and format. To then query this state, call
21652 `glGetTexLevelParameter'. If the texture cannot be accommodated,
21653 texture state is set to 0.
21654
21655 A one-component texture image uses only the red component of the RGBA
21656 color extracted from DATA. A two-component image uses the R and A
21657 values. A three-component image uses the R, G, and B values. A
21658 four-component image uses all of the RGBA components.
21659
21660 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_3D' or
21661 `GL_PROXY_TEXTURE_3D'.
21662
21663 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
21664 constant. Format constants other than `GL_STENCIL_INDEX' and
21665 `GL_DEPTH_COMPONENT' are accepted.
21666
21667 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
21668
21669 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
21670 `GL_COLOR_INDEX'.
21671
21672 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
21673
21674 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
21675 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21676
21677 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
21678 one of the accepted resolution and format symbolic constants.
21679
21680 `GL_INVALID_VALUE' is generated if WIDTH, HEIGHT, or DEPTH is less than
21681 0 or greater than 2 + `GL_MAX_TEXTURE_SIZE'.
21682
21683 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
21684 supported and the WIDTH, HEIGHT, or DEPTH cannot be represented as
21685 2^K+2\u2061(BORDER,) for some integer value of K.
21686
21687 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
21688
21689 `GL_INVALID_OPERATION' is generated if TYPE is one of
21690 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21691 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21692 is not `GL_RGB'.
21693
21694 `GL_INVALID_OPERATION' is generated if TYPE is one of
21695 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21696 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21697 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21698 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21699 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21700
21701 `GL_INVALID_OPERATION' is generated if FORMAT or INTERNALFORMAT is
21702 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
21703 `GL_DEPTH_COMPONENT32'.
21704
21705 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21706 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21707 data store is currently mapped.
21708
21709 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21710 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21711 unpacked from the buffer object such that the memory reads required
21712 would exceed the data store size.
21713
21714 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21715 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21716 divisible into the number of bytes needed to store in memory a datum
21717 indicated by TYPE.
21718
21719 `GL_INVALID_OPERATION' is generated if `glTexImage3D' is executed
21720 between the execution of `glBegin' and the corresponding execution of
21721 `glEnd'.")
21722
21723 (define-gl-procedures
21724 ((glTexParameterf
21725 (target GLenum)
21726 (pname GLenum)
21727 (param GLfloat)
21728 ->
21729 void)
21730 (glTexParameteri
21731 (target GLenum)
21732 (pname GLenum)
21733 (param GLint)
21734 ->
21735 void)
21736 (glTexParameterfv
21737 (target GLenum)
21738 (pname GLenum)
21739 (params const-GLfloat-*)
21740 ->
21741 void)
21742 (glTexParameteriv
21743 (target GLenum)
21744 (pname GLenum)
21745 (params const-GLint-*)
21746 ->
21747 void))
21748 "Set texture parameters.
21749
21750 TARGET
21751 Specifies the target texture, which must be either `GL_TEXTURE_1D',
21752 `GL_TEXTURE_2D', `GL_TEXTURE_3D', or `GL_TEXTURE_CUBE_MAP'.
21753
21754 PNAME
21755 Specifies the symbolic name of a single-valued texture parameter.
21756 PNAME can be one of the following: `GL_TEXTURE_MIN_FILTER',
21757 `GL_TEXTURE_MAG_FILTER', `GL_TEXTURE_MIN_LOD',
21758 `GL_TEXTURE_MAX_LOD', `GL_TEXTURE_BASE_LEVEL',
21759 `GL_TEXTURE_MAX_LEVEL', `GL_TEXTURE_WRAP_S', `GL_TEXTURE_WRAP_T',
21760 `GL_TEXTURE_WRAP_R', `GL_TEXTURE_PRIORITY',
21761 `GL_TEXTURE_COMPARE_MODE', `GL_TEXTURE_COMPARE_FUNC',
21762 `GL_DEPTH_TEXTURE_MODE', or `GL_GENERATE_MIPMAP'.
21763
21764 PARAM
21765 Specifies the value of PNAME.
21766
21767 Texture mapping is a technique that applies an image onto an object's
21768 surface as if the image were a decal or cellophane shrink-wrap. The
21769 image is created in texture space, with an (S , T ) coordinate system. A
21770 texture is a one- or two-dimensional image and a set of parameters that
21771 determine how samples are derived from the image.
21772
21773 `glTexParameter' assigns the value or values in PARAMS to the texture
21774 parameter specified as PNAME. TARGET defines the target texture, either
21775 `GL_TEXTURE_1D', `GL_TEXTURE_2D', or `GL_TEXTURE_3D'. The following
21776 symbols are accepted in PNAME:
21777
21778 `GL_TEXTURE_MIN_FILTER'
21779 The texture minifying function is used whenever the pixel being
21780 textured maps to an area greater than one texture element. There
21781 are six defined minifying functions. Two of them use the nearest
21782 one or nearest four texture elements to compute the texture value.
21783 The other four use mipmaps.
21784
21785 A mipmap is an ordered set of arrays representing the same image at
21786 progressively lower resolutions. If the texture has dimensions
21787 2^N×2^M , there are MAX\u2061(N,M)+1 mipmaps. The first mipmap is the
21788 original texture, with dimensions 2^N×2^M . Each subsequent mipmap
21789 has dimensions 2^K-1,×2^L-1, , where 2^K×2^L are the dimensions of
21790 the previous mipmap, until either K=0 or L=0 . At that point,
21791 subsequent mipmaps have dimension 1×2^L-1, or 2^K-1,×1 until the
21792 final mipmap, which has dimension 1×1 . To define the mipmaps,
21793 call `glTexImage1D', `glTexImage2D', `glTexImage3D',
21794 `glCopyTexImage1D', or `glCopyTexImage2D' with the LEVEL argument
21795 indicating the order of the mipmaps. Level 0 is the original
21796 texture; level MAX\u2061(N,M) is the final 1×1 mipmap.
21797
21798 PARAMS supplies a function for minifying the texture as one of the
21799 following:
21800
21801 As more texture elements are sampled in the minification process,
21802 fewer aliasing artifacts will be apparent. While the `GL_NEAREST'
21803 and `GL_LINEAR' minification functions can be faster than the other
21804 four, they sample only one or four texture elements to determine
21805 the texture value of the pixel being rendered and can produce moire
21806 patterns or ragged transitions. The initial value of
21807 `GL_TEXTURE_MIN_FILTER' is `GL_NEAREST_MIPMAP_LINEAR'.
21808
21809 `GL_TEXTURE_MAG_FILTER'
21810 The texture magnification function is used when the pixel being
21811 textured maps to an area less than or equal to one texture element.
21812 It sets the texture magnification function to either `GL_NEAREST'
21813 or `GL_LINEAR' (see below). `GL_NEAREST' is generally faster than
21814 `GL_LINEAR', but it can produce textured images with sharper edges
21815 because the transition between texture elements is not as smooth.
21816 The initial value of `GL_TEXTURE_MAG_FILTER' is `GL_LINEAR'.
21817
21818 `GL_NEAREST'
21819 Returns the value of the texture element that is nearest (in
21820 Manhattan distance) to the center of the pixel being textured.
21821
21822 `GL_LINEAR'
21823 Returns the weighted average of the four texture elements that are
21824 closest to the center of the pixel being textured. These can
21825 include border texture elements, depending on the values of
21826 `GL_TEXTURE_WRAP_S' and `GL_TEXTURE_WRAP_T', and on the exact
21827 mapping.
21828
21829 `GL_NEAREST_MIPMAP_NEAREST'
21830 Chooses the mipmap that most closely matches the size of the pixel
21831 being textured and uses the `GL_NEAREST' criterion (the texture
21832 element nearest to the center of the pixel) to produce a texture
21833 value.
21834
21835 `GL_LINEAR_MIPMAP_NEAREST'
21836 Chooses the mipmap that most closely matches the size of the pixel
21837 being textured and uses the `GL_LINEAR' criterion (a weighted
21838 average of the four texture elements that are closest to the center
21839 of the pixel) to produce a texture value.
21840
21841 `GL_NEAREST_MIPMAP_LINEAR'
21842 Chooses the two mipmaps that most closely match the size of the
21843 pixel being textured and uses the `GL_NEAREST' criterion (the
21844 texture element nearest to the center of the pixel) to produce a
21845 texture value from each mipmap. The final texture value is a
21846 weighted average of those two values.
21847
21848 `GL_LINEAR_MIPMAP_LINEAR'
21849 Chooses the two mipmaps that most closely match the size of the
21850 pixel being textured and uses the `GL_LINEAR' criterion (a weighted
21851 average of the four texture elements that are closest to the center
21852 of the pixel) to produce a texture value from each mipmap. The
21853 final texture value is a weighted average of those two values.
21854
21855 `GL_NEAREST'
21856 Returns the value of the texture element that is nearest (in
21857 Manhattan distance) to the center of the pixel being textured.
21858
21859 `GL_LINEAR'
21860 Returns the weighted average of the four texture elements that are
21861 closest to the center of the pixel being textured. These can
21862 include border texture elements, depending on the values of
21863 `GL_TEXTURE_WRAP_S' and `GL_TEXTURE_WRAP_T', and on the exact
21864 mapping.
21865
21866
21867
21868 `GL_TEXTURE_MIN_LOD'
21869 Sets the minimum level-of-detail parameter. This floating-point
21870 value limits the selection of highest resolution mipmap (lowest
21871 mipmap level). The initial value is -1000.
21872
21873
21874
21875 `GL_TEXTURE_MAX_LOD'
21876 Sets the maximum level-of-detail parameter. This floating-point
21877 value limits the selection of the lowest resolution mipmap (highest
21878 mipmap level). The initial value is 1000.
21879
21880
21881
21882 `GL_TEXTURE_BASE_LEVEL'
21883 Specifies the index of the lowest defined mipmap level. This is an
21884 integer value. The initial value is 0.
21885
21886
21887
21888 `GL_TEXTURE_MAX_LEVEL'
21889 Sets the index of the highest defined mipmap level. This is an
21890 integer value. The initial value is 1000.
21891
21892
21893
21894 `GL_TEXTURE_WRAP_S'
21895 Sets the wrap parameter for texture coordinate S to either
21896 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21897 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. `GL_CLAMP' causes S
21898 coordinates to be clamped to the range [0,1] and is useful for
21899 preventing wrapping artifacts when mapping a single image onto an
21900 object. `GL_CLAMP_TO_BORDER' causes the S coordinate to be clamped
21901 to the range [-1/2N,,1+1/2N,] , where N is the size of the texture
21902 in the direction of clamping.`GL_CLAMP_TO_EDGE' causes S
21903 coordinates to be clamped to the range [1/2N,,1-1/2N,] , where N is
21904 the size of the texture in the direction of clamping. `GL_REPEAT'
21905 causes the integer part of the S coordinate to be ignored; the GL
21906 uses only the fractional part, thereby creating a repeating
21907 pattern. `GL_MIRRORED_REPEAT' causes the S coordinate to be set to
21908 the fractional part of the texture coordinate if the integer part
21909 of S is even; if the integer part of S is odd, then the S texture
21910 coordinate is set to 1-FRAC\u2061(S,) , where FRAC\u2061(S,) represents the
21911 fractional part of S . Border texture elements are accessed only
21912 if wrapping is set to `GL_CLAMP' or `GL_CLAMP_TO_BORDER'.
21913 Initially, `GL_TEXTURE_WRAP_S' is set to `GL_REPEAT'.
21914
21915
21916
21917 `GL_TEXTURE_WRAP_T'
21918 Sets the wrap parameter for texture coordinate T to either
21919 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21920 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. See the discussion under
21921 `GL_TEXTURE_WRAP_S'. Initially, `GL_TEXTURE_WRAP_T' is set to
21922 `GL_REPEAT'.
21923
21924 `GL_TEXTURE_WRAP_R'
21925 Sets the wrap parameter for texture coordinate R to either
21926 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21927 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. See the discussion under
21928 `GL_TEXTURE_WRAP_S'. Initially, `GL_TEXTURE_WRAP_R' is set to
21929 `GL_REPEAT'.
21930
21931 `GL_TEXTURE_BORDER_COLOR'
21932 Sets a border color. PARAMS contains four values that comprise the
21933 RGBA color of the texture border. Integer color components are
21934 interpreted linearly such that the most positive integer maps to
21935 1.0, and the most negative integer maps to -1.0. The values are
21936 clamped to the range [0,1] when they are specified. Initially, the
21937 border color is (0, 0, 0, 0).
21938
21939 `GL_TEXTURE_PRIORITY'
21940 Specifies the texture residence priority of the currently bound
21941 texture. Permissible values are in the range [0,1] . See
21942 `glPrioritizeTextures' and `glBindTexture' for more information.
21943
21944 `GL_TEXTURE_COMPARE_MODE'
21945 Specifies the texture comparison mode for currently bound depth
21946 textures. That is, a texture whose internal format is
21947 `GL_DEPTH_COMPONENT_*'; see `glTexImage2D') Permissible values are:
21948
21949 `GL_TEXTURE_COMPARE_FUNC'
21950 Specifies the comparison operator used when
21951 `GL_TEXTURE_COMPARE_MODE' is set to `GL_COMPARE_R_TO_TEXTURE'.
21952 Permissible values are: where R is the current interpolated texture
21953 coordinate, and D_T is the depth texture value sampled from the
21954 currently bound depth texture. RESULT is assigned to the either
21955 the luminance, intensity, or alpha (as specified by
21956 `GL_DEPTH_TEXTURE_MODE'.)
21957
21958 `GL_DEPTH_TEXTURE_MODE'
21959 Specifies a single symbolic constant indicating how depth values
21960 should be treated during filtering and texture application.
21961 Accepted values are `GL_LUMINANCE', `GL_INTENSITY', and `GL_ALPHA'.
21962 The initial value is `GL_LUMINANCE'.
21963
21964 `GL_GENERATE_MIPMAP'
21965 Specifies a boolean value that indicates if all levels of a mipmap
21966 array should be automatically updated when any modification to the
21967 base level mipmap is done. The initial value is `GL_FALSE'.
21968
21969 `GL_COMPARE_R_TO_TEXTURE'
21970 Specifies that the interpolated and clamped R texture coordinate
21971 should be compared to the value in the currently bound depth
21972 texture. See the discussion of `GL_TEXTURE_COMPARE_FUNC' for
21973 details of how the comparison is evaluated. The result of the
21974 comparison is assigned to luminance, intensity, or alpha (as
21975 specified by `GL_DEPTH_TEXTURE_MODE').
21976
21977 `GL_NONE'
21978 Specifies that the luminance, intensity, or alpha (as specified by
21979 `GL_DEPTH_TEXTURE_MODE') should be assigned the appropriate value
21980 from the currently bound depth texture.
21981
21982 *Texture Comparison Function*
21983 *Computed result*
21984
21985 `GL_LEQUAL'
21986 RESULT={(1.0), (0.0)\u2062\xa0(R<=D_T,), (R>D_T,),
21987
21988 `GL_GEQUAL'
21989 RESULT={(1.0), (0.0)\u2062\xa0(R>=D_T,), (R<D_T,),
21990
21991 `GL_LESS'
21992 RESULT={(1.0), (0.0)\u2062\xa0(R<D_T,), (R>=D_T,),
21993
21994 `GL_GREATER'
21995 RESULT={(1.0), (0.0)\u2062\xa0(R>D_T,), (R<=D_T,),
21996
21997 `GL_EQUAL'
21998 RESULT={(1.0), (0.0)\u2062\xa0(R=D_T,), (R≠D_T,),
21999
22000 `GL_NOTEQUAL'
22001 RESULT={(1.0), (0.0)\u2062\xa0(R≠D_T,), (R=D_T,),
22002
22003 `GL_ALWAYS'
22004 RESULT=`1.0'
22005
22006 `GL_NEVER'
22007 RESULT=`0.0'
22008
22009 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not one of the
22010 accepted defined values.
22011
22012 `GL_INVALID_ENUM' is generated if PARAMS should have a defined constant
22013 value (based on the value of PNAME) and does not.
22014
22015 `GL_INVALID_OPERATION' is generated if `glTexParameter' is executed
22016 between the execution of `glBegin' and the corresponding execution of
22017 `glEnd'.")
22018
22019 (define-gl-procedures
22020 ((glTexSubImage1D
22021 (target GLenum)
22022 (level GLint)
22023 (xoffset GLint)
22024 (width GLsizei)
22025 (format GLenum)
22026 (type GLenum)
22027 (data const-GLvoid-*)
22028 ->
22029 void))
22030 "Specify a one-dimensional texture subimage.
22031
22032 TARGET
22033 Specifies the target texture. Must be `GL_TEXTURE_1D'.
22034
22035 LEVEL
22036 Specifies the level-of-detail number. Level 0 is the base image
22037 level. Level N is the Nth mipmap reduction image.
22038
22039 XOFFSET
22040 Specifies a texel offset in the x direction within the texture
22041 array.
22042
22043 WIDTH
22044 Specifies the width of the texture subimage.
22045
22046 FORMAT
22047 Specifies the format of the pixel data. The following symbolic
22048 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
22049 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
22050 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
22051
22052 TYPE
22053 Specifies the data type of the pixel data. The following symbolic
22054 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
22055 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
22056 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22057 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
22058 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22059 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22060 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22061 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
22062
22063 DATA
22064 Specifies a pointer to the image data in memory.
22065
22066 Texturing maps a portion of a specified texture image onto each
22067 graphical primitive for which texturing is enabled. To enable or
22068 disable one-dimensional texturing, call `glEnable' and `glDisable' with
22069 argument `GL_TEXTURE_1D'.
22070
22071 `glTexSubImage1D' redefines a contiguous subregion of an existing
22072 one-dimensional texture image. The texels referenced by DATA replace
22073 the portion of the existing texture array with x indices XOFFSET and
22074 XOFFSET+WIDTH-1 , inclusive. This region may not include any texels
22075 outside the range of the texture array as it was originally specified.
22076 It is not an error to specify a subtexture with width of 0, but such a
22077 specification has no effect.
22078
22079 If a non-zero named buffer object is bound to the
22080 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
22081 image is specified, DATA is treated as a byte offset into the buffer
22082 object's data store.
22083
22084 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
22085 values.
22086
22087 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
22088 constant.
22089
22090 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
22091
22092 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
22093 `GL_COLOR_INDEX'.
22094
22095 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
22096
22097 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
22098 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
22099
22100 `GL_INVALID_VALUE' is generated if XOFFSET<-B , or if
22101 (XOFFSET+WIDTH,)>(W-B,) , where W is the `GL_TEXTURE_WIDTH', and B is
22102 the width of the `GL_TEXTURE_BORDER' of the texture image being
22103 modified. Note that W includes twice the border width.
22104
22105 `GL_INVALID_VALUE' is generated if WIDTH is less than 0.
22106
22107 `GL_INVALID_OPERATION' is generated if the texture array has not been
22108 defined by a previous `glTexImage1D' operation.
22109
22110 `GL_INVALID_OPERATION' is generated if TYPE is one of
22111 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22112 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
22113 is not `GL_RGB'.
22114
22115 `GL_INVALID_OPERATION' is generated if TYPE is one of
22116 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22117 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22118 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22119 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
22120 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
22121
22122 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22123 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
22124 data store is currently mapped.
22125
22126 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22127 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
22128 unpacked from the buffer object such that the memory reads required
22129 would exceed the data store size.
22130
22131 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22132 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
22133 divisible into the number of bytes needed to store in memory a datum
22134 indicated by TYPE.
22135
22136 `GL_INVALID_OPERATION' is generated if `glTexSubImage1D' is executed
22137 between the execution of `glBegin' and the corresponding execution of
22138 `glEnd'.")
22139
22140 (define-gl-procedures
22141 ((glTexSubImage2D
22142 (target GLenum)
22143 (level GLint)
22144 (xoffset GLint)
22145 (yoffset GLint)
22146 (width GLsizei)
22147 (height GLsizei)
22148 (format GLenum)
22149 (type GLenum)
22150 (data const-GLvoid-*)
22151 ->
22152 void))
22153 "Specify a two-dimensional texture subimage.
22154
22155 TARGET
22156 Specifies the target texture. Must be `GL_TEXTURE_2D',
22157 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
22158 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
22159 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
22160 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
22161
22162 LEVEL
22163 Specifies the level-of-detail number. Level 0 is the base image
22164 level. Level N is the Nth mipmap reduction image.
22165
22166 XOFFSET
22167 Specifies a texel offset in the x direction within the texture
22168 array.
22169
22170 YOFFSET
22171 Specifies a texel offset in the y direction within the texture
22172 array.
22173
22174 WIDTH
22175 Specifies the width of the texture subimage.
22176
22177 HEIGHT
22178 Specifies the height of the texture subimage.
22179
22180 FORMAT
22181 Specifies the format of the pixel data. The following symbolic
22182 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
22183 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
22184 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
22185
22186 TYPE
22187 Specifies the data type of the pixel data. The following symbolic
22188 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
22189 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
22190 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22191 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
22192 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22193 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22194 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22195 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
22196
22197 DATA
22198 Specifies a pointer to the image data in memory.
22199
22200 Texturing maps a portion of a specified texture image onto each
22201 graphical primitive for which texturing is enabled. To enable and
22202 disable two-dimensional texturing, call `glEnable' and `glDisable' with
22203 argument `GL_TEXTURE_2D'.
22204
22205 `glTexSubImage2D' redefines a contiguous subregion of an existing
22206 two-dimensional texture image. The texels referenced by DATA replace
22207 the portion of the existing texture array with x indices XOFFSET and
22208 XOFFSET+WIDTH-1 , inclusive, and y indices YOFFSET and YOFFSET+HEIGHT-1
22209 , inclusive. This region may not include any texels outside the range
22210 of the texture array as it was originally specified. It is not an error
22211 to specify a subtexture with zero width or height, but such a
22212 specification has no effect.
22213
22214 If a non-zero named buffer object is bound to the
22215 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
22216 image is specified, DATA is treated as a byte offset into the buffer
22217 object's data store.
22218
22219 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
22220 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
22221 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
22222 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
22223
22224 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
22225 constant.
22226
22227 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
22228
22229 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
22230 `GL_COLOR_INDEX'.
22231
22232 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
22233
22234 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
22235 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
22236
22237 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
22238 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , where W is the
22239 `GL_TEXTURE_WIDTH', H is the `GL_TEXTURE_HEIGHT', and B is the border
22240 width of the texture image being modified. Note that W and H include
22241 twice the border width.
22242
22243 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0.
22244
22245 `GL_INVALID_OPERATION' is generated if the texture array has not been
22246 defined by a previous `glTexImage2D' operation.
22247
22248 `GL_INVALID_OPERATION' is generated if TYPE is one of
22249 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22250 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
22251 is not `GL_RGB'.
22252
22253 `GL_INVALID_OPERATION' is generated if TYPE is one of
22254 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22255 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22256 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22257 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
22258 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
22259
22260 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22261 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
22262 data store is currently mapped.
22263
22264 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22265 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
22266 unpacked from the buffer object such that the memory reads required
22267 would exceed the data store size.
22268
22269 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22270 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
22271 divisible into the number of bytes needed to store in memory a datum
22272 indicated by TYPE.
22273
22274 `GL_INVALID_OPERATION' is generated if `glTexSubImage2D' is executed
22275 between the execution of `glBegin' and the corresponding execution of
22276 `glEnd'.")
22277
22278 (define-gl-procedures
22279 ((glTexSubImage3D
22280 (target GLenum)
22281 (level GLint)
22282 (xoffset GLint)
22283 (yoffset GLint)
22284 (zoffset GLint)
22285 (width GLsizei)
22286 (height GLsizei)
22287 (depth GLsizei)
22288 (format GLenum)
22289 (type GLenum)
22290 (data const-GLvoid-*)
22291 ->
22292 void))
22293 "Specify a three-dimensional texture subimage.
22294
22295 TARGET
22296 Specifies the target texture. Must be `GL_TEXTURE_3D'.
22297
22298 LEVEL
22299 Specifies the level-of-detail number. Level 0 is the base image
22300 level. Level N is the Nth mipmap reduction image.
22301
22302 XOFFSET
22303 Specifies a texel offset in the x direction within the texture
22304 array.
22305
22306 YOFFSET
22307 Specifies a texel offset in the y direction within the texture
22308 array.
22309
22310 ZOFFSET
22311 Specifies a texel offset in the z direction within the texture
22312 array.
22313
22314 WIDTH
22315 Specifies the width of the texture subimage.
22316
22317 HEIGHT
22318 Specifies the height of the texture subimage.
22319
22320 DEPTH
22321 Specifies the depth of the texture subimage.
22322
22323 FORMAT
22324 Specifies the format of the pixel data. The following symbolic
22325 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
22326 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
22327 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
22328
22329 TYPE
22330 Specifies the data type of the pixel data. The following symbolic
22331 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
22332 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
22333 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22334 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
22335 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22336 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22337 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22338 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
22339
22340 DATA
22341 Specifies a pointer to the image data in memory.
22342
22343 Texturing maps a portion of a specified texture image onto each
22344 graphical primitive for which texturing is enabled. To enable and
22345 disable three-dimensional texturing, call `glEnable' and `glDisable'
22346 with argument `GL_TEXTURE_3D'.
22347
22348 `glTexSubImage3D' redefines a contiguous subregion of an existing
22349 three-dimensional texture image. The texels referenced by DATA replace
22350 the portion of the existing texture array with x indices XOFFSET and
22351 XOFFSET+WIDTH-1 , inclusive, y indices YOFFSET and YOFFSET+HEIGHT-1 ,
22352 inclusive, and z indices ZOFFSET and ZOFFSET+DEPTH-1 , inclusive. This
22353 region may not include any texels outside the range of the texture array
22354 as it was originally specified. It is not an error to specify a
22355 subtexture with zero width, height, or depth but such a specification
22356 has no effect.
22357
22358 If a non-zero named buffer object is bound to the
22359 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
22360 image is specified, DATA is treated as a byte offset into the buffer
22361 object's data store.
22362
22363 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_3D'.
22364
22365 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
22366 constant.
22367
22368 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
22369
22370 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
22371 `GL_COLOR_INDEX'.
22372
22373 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
22374
22375 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
22376 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
22377
22378 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
22379 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , or ZOFFSET<-B , or
22380 (ZOFFSET+DEPTH,)>(D-B,) , where W is the `GL_TEXTURE_WIDTH', H is the
22381 `GL_TEXTURE_HEIGHT', D is the `GL_TEXTURE_DEPTH' and B is the border
22382 width of the texture image being modified. Note that W , H , and D
22383 include twice the border width.
22384
22385 `GL_INVALID_VALUE' is generated if WIDTH, HEIGHT, or DEPTH is less than
22386 0.
22387
22388 `GL_INVALID_OPERATION' is generated if the texture array has not been
22389 defined by a previous `glTexImage3D' operation.
22390
22391 `GL_INVALID_OPERATION' is generated if TYPE is one of
22392 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22393 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
22394 is not `GL_RGB'.
22395
22396 `GL_INVALID_OPERATION' is generated if TYPE is one of
22397 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22398 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22399 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22400 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
22401 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
22402
22403 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22404 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
22405 data store is currently mapped.
22406
22407 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22408 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
22409 unpacked from the buffer object such that the memory reads required
22410 would exceed the data store size.
22411
22412 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22413 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
22414 divisible into the number of bytes needed to store in memory a datum
22415 indicated by TYPE.
22416
22417 `GL_INVALID_OPERATION' is generated if `glTexSubImage3D' is executed
22418 between the execution of `glBegin' and the corresponding execution of
22419 `glEnd'.")
22420
22421 (define-gl-procedures
22422 ((glTranslated
22423 (x GLdouble)
22424 (y GLdouble)
22425 (z GLdouble)
22426 ->
22427 void)
22428 (glTranslatef
22429 (x GLfloat)
22430 (y GLfloat)
22431 (z GLfloat)
22432 ->
22433 void))
22434 "Multiply the current matrix by a translation matrix.
22435
22436 X
22437 Y
22438
22439 Z
22440
22441 Specify the X, Y, and Z coordinates of a translation vector.
22442
22443 `glTranslate' produces a translation by (X,YZ) . The current matrix
22444 (see `glMatrixMode') is multiplied by this translation matrix, with the
22445 product replacing the current matrix, as if `glMultMatrix' were called
22446 with the following matrix for its argument:
22447
22448 ((1 0 0 X), (0 1 0 Y), (0 0 1 Z), (0 0 0 1),)
22449
22450
22451
22452 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
22453 objects drawn after a call to `glTranslate' are translated.
22454
22455 Use `glPushMatrix' and `glPopMatrix' to save and restore the
22456 untranslated coordinate system.
22457
22458 `GL_INVALID_OPERATION' is generated if `glTranslate' is executed between
22459 the execution of `glBegin' and the corresponding execution of `glEnd'.")
22460
22461 (define-gl-procedures
22462 ((glUniform1f
22463 (location GLint)
22464 (v0 GLfloat)
22465 ->
22466 void)
22467 (glUniform2f
22468 (location GLint)
22469 (v0 GLfloat)
22470 (v1 GLfloat)
22471 ->
22472 void)
22473 (glUniform3f
22474 (location GLint)
22475 (v0 GLfloat)
22476 (v1 GLfloat)
22477 (v2 GLfloat)
22478 ->
22479 void)
22480 (glUniform4f
22481 (location GLint)
22482 (v0 GLfloat)
22483 (v1 GLfloat)
22484 (v2 GLfloat)
22485 (v3 GLfloat)
22486 ->
22487 void)
22488 (glUniform1i (location GLint) (v0 GLint) -> void)
22489 (glUniform2i
22490 (location GLint)
22491 (v0 GLint)
22492 (v1 GLint)
22493 ->
22494 void)
22495 (glUniform3i
22496 (location GLint)
22497 (v0 GLint)
22498 (v1 GLint)
22499 (v2 GLint)
22500 ->
22501 void)
22502 (glUniform4i
22503 (location GLint)
22504 (v0 GLint)
22505 (v1 GLint)
22506 (v2 GLint)
22507 (v3 GLint)
22508 ->
22509 void)
22510 (glUniform1fv
22511 (location GLint)
22512 (count GLsizei)
22513 (value const-GLfloat-*)
22514 ->
22515 void)
22516 (glUniform2fv
22517 (location GLint)
22518 (count GLsizei)
22519 (value const-GLfloat-*)
22520 ->
22521 void)
22522 (glUniform3fv
22523 (location GLint)
22524 (count GLsizei)
22525 (value const-GLfloat-*)
22526 ->
22527 void)
22528 (glUniform4fv
22529 (location GLint)
22530 (count GLsizei)
22531 (value const-GLfloat-*)
22532 ->
22533 void)
22534 (glUniform1iv
22535 (location GLint)
22536 (count GLsizei)
22537 (value const-GLint-*)
22538 ->
22539 void)
22540 (glUniform2iv
22541 (location GLint)
22542 (count GLsizei)
22543 (value const-GLint-*)
22544 ->
22545 void)
22546 (glUniform3iv
22547 (location GLint)
22548 (count GLsizei)
22549 (value const-GLint-*)
22550 ->
22551 void)
22552 (glUniform4iv
22553 (location GLint)
22554 (count GLsizei)
22555 (value const-GLint-*)
22556 ->
22557 void)
22558 (glUniformMatrix2fv
22559 (location GLint)
22560 (count GLsizei)
22561 (transpose GLboolean)
22562 (value const-GLfloat-*)
22563 ->
22564 void)
22565 (glUniformMatrix3fv
22566 (location GLint)
22567 (count GLsizei)
22568 (transpose GLboolean)
22569 (value const-GLfloat-*)
22570 ->
22571 void)
22572 (glUniformMatrix4fv
22573 (location GLint)
22574 (count GLsizei)
22575 (transpose GLboolean)
22576 (value const-GLfloat-*)
22577 ->
22578 void)
22579 (glUniformMatrix2x3fv
22580 (location GLint)
22581 (count GLsizei)
22582 (transpose GLboolean)
22583 (value const-GLfloat-*)
22584 ->
22585 void)
22586 (glUniformMatrix3x2fv
22587 (location GLint)
22588 (count GLsizei)
22589 (transpose GLboolean)
22590 (value const-GLfloat-*)
22591 ->
22592 void)
22593 (glUniformMatrix2x4fv
22594 (location GLint)
22595 (count GLsizei)
22596 (transpose GLboolean)
22597 (value const-GLfloat-*)
22598 ->
22599 void)
22600 (glUniformMatrix4x2fv
22601 (location GLint)
22602 (count GLsizei)
22603 (transpose GLboolean)
22604 (value const-GLfloat-*)
22605 ->
22606 void)
22607 (glUniformMatrix3x4fv
22608 (location GLint)
22609 (count GLsizei)
22610 (transpose GLboolean)
22611 (value const-GLfloat-*)
22612 ->
22613 void)
22614 (glUniformMatrix4x3fv
22615 (location GLint)
22616 (count GLsizei)
22617 (transpose GLboolean)
22618 (value const-GLfloat-*)
22619 ->
22620 void))
22621 "Specify the value of a uniform variable for the current program object.
22622
22623 LOCATION
22624 Specifies the location of the uniform variable to be modified.
22625
22626 V0, V1, V2, V3
22627 Specifies the new values to be used for the specified uniform
22628 variable.
22629
22630 `glUniform' modifies the value of a uniform variable or a uniform
22631 variable array. The location of the uniform variable to be modified is
22632 specified by LOCATION, which should be a value returned by
22633 `glGetUniformLocation'. `glUniform' operates on the program object that
22634 was made part of current state by calling `glUseProgram'.
22635
22636 The commands `glUniform{1|2|3|4}{f|i}' are used to change the value of
22637 the uniform variable specified by LOCATION using the values passed as
22638 arguments. The number specified in the command should match the number
22639 of components in the data type of the specified uniform variable (e.g.,
22640 `1' for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The suffix
22641 `f' indicates that floating-point values are being passed; the suffix
22642 `i' indicates that integer values are being passed, and this type should
22643 also match the data type of the specified uniform variable. The `i'
22644 variants of this function should be used to provide values for uniform
22645 variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The
22646 `f' variants should be used to provide values for uniform variables of
22647 type float, vec2, vec3, vec4, or arrays of these. Either the `i' or the
22648 `f' variants may be used to provide values for uniform variables of type
22649 bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable
22650 will be set to false if the input value is 0 or 0.0f, and it will be set
22651 to true otherwise.
22652
22653 All active uniform variables defined in a program object are initialized
22654 to 0 when the program object is linked successfully. They retain the
22655 values assigned to them by a call to `glUniform ' until the next
22656 successful link operation occurs on the program object, when they are
22657 once again initialized to 0.
22658
22659 The commands `glUniform{1|2|3|4}{f|i}v' can be used to modify a single
22660 uniform variable or a uniform variable array. These commands pass a
22661 count and a pointer to the values to be loaded into a uniform variable
22662 or a uniform variable array. A count of 1 should be used if modifying
22663 the value of a single uniform variable, and a count of 1 or greater can
22664 be used to modify an entire array or part of an array. When loading N
22665 elements starting at an arbitrary position M in a uniform variable
22666 array, elements M + N - 1 in the array will be replaced with the new
22667 values. If M + N - 1 is larger than the size of the uniform variable
22668 array, values for all array elements beyond the end of the array will be
22669 ignored. The number specified in the name of the command indicates the
22670 number of components for each element in VALUE, and it should match the
22671 number of components in the data type of the specified uniform variable
22672 (e.g., `1' for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The
22673 data type specified in the name of the command must match the data type
22674 for the specified uniform variable as described previously for
22675 `glUniform{1|2|3|4}{f|i}'.
22676
22677 For uniform variable arrays, each element of the array is considered to
22678 be of the type indicated in the name of the command (e.g., `glUniform3f'
22679 or `glUniform3fv' can be used to load a uniform variable array of type
22680 vec3). The number of elements of the uniform variable array to be
22681 modified is specified by COUNT
22682
22683 The commands `glUniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv' are used
22684 to modify a matrix or an array of matrices. The numbers in the command
22685 name are interpreted as the dimensionality of the matrix. The number
22686 `2' indicates a 2 × 2 matrix (i.e., 4 values), the number `3' indicates
22687 a 3 × 3 matrix (i.e., 9 values), and the number `4' indicates a 4 × 4
22688 matrix (i.e., 16 values). Non-square matrix dimensionality is explicit,
22689 with the first number representing the number of columns and the second
22690 number representing the number of rows. For example, `2x4' indicates a
22691 2 × 4 matrix with 2 columns and 4 rows (i.e., 8 values). If TRANSPOSE
22692 is `GL_FALSE', each matrix is assumed to be supplied in column major
22693 order. If TRANSPOSE is `GL_TRUE', each matrix is assumed to be supplied
22694 in row major order. The COUNT argument indicates the number of matrices
22695 to be passed. A count of 1 should be used if modifying the value of a
22696 single matrix, and a count greater than 1 can be used to modify an array
22697 of matrices.
22698
22699 `GL_INVALID_OPERATION' is generated if there is no current program
22700 object.
22701
22702 `GL_INVALID_OPERATION' is generated if the size of the uniform variable
22703 declared in the shader does not match the size indicated by the
22704 `glUniform' command.
22705
22706 `GL_INVALID_OPERATION' is generated if one of the integer variants of
22707 this function is used to load a uniform variable of type float, vec2,
22708 vec3, vec4, or an array of these, or if one of the floating-point
22709 variants of this function is used to load a uniform variable of type
22710 int, ivec2, ivec3, or ivec4, or an array of these.
22711
22712 `GL_INVALID_OPERATION' is generated if LOCATION is an invalid uniform
22713 location for the current program object and LOCATION is not equal to -1.
22714
22715 `GL_INVALID_VALUE' is generated if COUNT is less than 0.
22716
22717 `GL_INVALID_OPERATION' is generated if COUNT is greater than 1 and the
22718 indicated uniform variable is not an array variable.
22719
22720 `GL_INVALID_OPERATION' is generated if a sampler is loaded using a
22721 command other than `glUniform1i' and `glUniform1iv'.
22722
22723 `GL_INVALID_OPERATION' is generated if `glUniform' is executed between
22724 the execution of `glBegin' and the corresponding execution of `glEnd'.")
22725
22726 (define-gl-procedures
22727 ((glUseProgram (program GLuint) -> void))
22728 "Installs a program object as part of current rendering state.
22729
22730 PROGRAM
22731 Specifies the handle of the program object whose executables are to
22732 be used as part of current rendering state.
22733
22734 `glUseProgram' installs the program object specified by PROGRAM as part
22735 of current rendering state. One or more executables are created in a
22736 program object by successfully attaching shader objects to it with
22737 `glAttachShader', successfully compiling the shader objects with
22738 `glCompileShader', and successfully linking the program object with
22739 `glLinkProgram'.
22740
22741 A program object will contain an executable that will run on the vertex
22742 processor if it contains one or more shader objects of type
22743 `GL_VERTEX_SHADER' that have been successfully compiled and linked.
22744 Similarly, a program object will contain an executable that will run on
22745 the fragment processor if it contains one or more shader objects of type
22746 `GL_FRAGMENT_SHADER' that have been successfully compiled and linked.
22747
22748 Successfully installing an executable on a programmable processor will
22749 cause the corresponding fixed functionality of OpenGL to be disabled.
22750 Specifically, if an executable is installed on the vertex processor, the
22751 OpenGL fixed functionality will be disabled as follows.
22752
22753 * The projection matrix is not applied to vertex coordinates.
22754
22755 * The texture matrices are not applied to texture coordinates.
22756
22757 * Normals are not transformed to eye coordinates.
22758
22759 * Normals are not rescaled or normalized.
22760
22761 * Normalization of `GL_AUTO_NORMAL' evaluated normals is not
22762 performed.
22763
22764 * Texture coordinates are not generated automatically.
22765
22766 * Per-vertex lighting is not performed.
22767
22768 * Color material computations are not performed.
22769
22770 * Color index lighting is not performed.
22771
22772 * This list also applies when setting the current raster position.
22773
22774 The executable that is installed on the vertex processor is expected to
22775 implement any or all of the desired functionality from the preceding
22776 list. Similarly, if an executable is installed on the fragment
22777 processor, the OpenGL fixed functionality will be disabled as follows.
22778
22779 * Texture application is not applied.
22780
22781 * Color sum is not applied.
22782
22783 * Fog is not applied.
22784
22785 Again, the fragment shader that is installed is expected to implement
22786 any or all of the desired functionality from the preceding list.
22787
22788 While a program object is in use, applications are free to modify
22789 attached shader objects, compile attached shader objects, attach
22790 additional shader objects, and detach or delete shader objects. None of
22791 these operations will affect the executables that are part of the
22792 current state. However, relinking the program object that is currently
22793 in use will install the program object as part of the current rendering
22794 state if the link operation was successful (see `glLinkProgram' ). If
22795 the program object currently in use is relinked unsuccessfully, its link
22796 status will be set to `GL_FALSE', but the executables and associated
22797 state will remain part of the current state until a subsequent call to
22798 `glUseProgram' removes it from use. After it is removed from use, it
22799 cannot be made part of current state until it has been successfully
22800 relinked.
22801
22802 If PROGRAM contains shader objects of type `GL_VERTEX_SHADER' but it
22803 does not contain shader objects of type `GL_FRAGMENT_SHADER', an
22804 executable will be installed on the vertex processor, but fixed
22805 functionality will be used for fragment processing. Similarly, if
22806 PROGRAM contains shader objects of type `GL_FRAGMENT_SHADER' but it does
22807 not contain shader objects of type `GL_VERTEX_SHADER', an executable
22808 will be installed on the fragment processor, but fixed functionality
22809 will be used for vertex processing. If PROGRAM is 0, the programmable
22810 processors will be disabled, and fixed functionality will be used for
22811 both vertex and fragment processing.
22812
22813 `GL_INVALID_VALUE' is generated if PROGRAM is neither 0 nor a value
22814 generated by OpenGL.
22815
22816 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
22817
22818 `GL_INVALID_OPERATION' is generated if PROGRAM could not be made part of
22819 current state.
22820
22821 `GL_INVALID_OPERATION' is generated if `glUseProgram' is executed
22822 between the execution of `glBegin' and the corresponding execution of
22823 `glEnd'.")
22824
22825 (define-gl-procedures
22826 ((glValidateProgram (program GLuint) -> void))
22827 "Validates a program object.
22828
22829 PROGRAM
22830 Specifies the handle of the program object to be validated.
22831
22832 `glValidateProgram' checks to see whether the executables contained in
22833 PROGRAM can execute given the current OpenGL state. The information
22834 generated by the validation process will be stored in PROGRAM's
22835 information log. The validation information may consist of an empty
22836 string, or it may be a string containing information about how the
22837 current program object interacts with the rest of current OpenGL state.
22838 This provides a way for OpenGL implementers to convey more information
22839 about why the current program is inefficient, suboptimal, failing to
22840 execute, and so on.
22841
22842 The status of the validation operation will be stored as part of the
22843 program object's state. This value will be set to `GL_TRUE' if the
22844 validation succeeded, and `GL_FALSE' otherwise. It can be queried by
22845 calling `glGetProgram' with arguments PROGRAM and `GL_VALIDATE_STATUS'.
22846 If validation is successful, PROGRAM is guaranteed to execute given the
22847 current state. Otherwise, PROGRAM is guaranteed to not execute.
22848
22849 This function is typically useful only during application development.
22850 The informational string stored in the information log is completely
22851 implementation dependent; therefore, an application should not expect
22852 different OpenGL implementations to produce identical information
22853 strings.
22854
22855 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
22856 OpenGL.
22857
22858 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
22859
22860 `GL_INVALID_OPERATION' is generated if `glValidateProgram' is executed
22861 between the execution of `glBegin' and the corresponding execution of
22862 `glEnd'.")
22863
22864 (define-gl-procedures
22865 ((glVertexAttribPointer
22866 (index GLuint)
22867 (size GLint)
22868 (type GLenum)
22869 (normalized GLboolean)
22870 (stride GLsizei)
22871 (pointer const-GLvoid-*)
22872 ->
22873 void))
22874 "Define an array of generic vertex attribute data.
22875
22876 INDEX
22877 Specifies the index of the generic vertex attribute to be modified.
22878
22879 SIZE
22880 Specifies the number of components per generic vertex attribute.
22881 Must be 1, 2, 3, or 4. The initial value is 4.
22882
22883 TYPE
22884 Specifies the data type of each component in the array. Symbolic
22885 constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
22886 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', or
22887 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
22888
22889 NORMALIZED
22890 Specifies whether fixed-point data values should be normalized
22891 (`GL_TRUE') or converted directly as fixed-point values
22892 (`GL_FALSE') when they are accessed.
22893
22894 STRIDE
22895 Specifies the byte offset between consecutive generic vertex
22896 attributes. If STRIDE is 0, the generic vertex attributes are
22897 understood to be tightly packed in the array. The initial value is
22898 0.
22899
22900 POINTER
22901 Specifies a pointer to the first component of the first generic
22902 vertex attribute in the array. The initial value is 0.
22903
22904 `glVertexAttribPointer' specifies the location and data format of the
22905 array of generic vertex attributes at index INDEX to use when rendering.
22906 SIZE specifies the number of components per attribute and must be 1, 2,
22907 3, or 4. TYPE specifies the data type of each component, and STRIDE
22908 specifies the byte stride from one attribute to the next, allowing
22909 vertices and attributes to be packed into a single array or stored in
22910 separate arrays. If set to `GL_TRUE', NORMALIZED indicates that values
22911 stored in an integer format are to be mapped to the range [-1,1] (for
22912 signed values) or [0,1] (for unsigned values) when they are accessed and
22913 converted to floating point. Otherwise, values will be converted to
22914 floats directly without normalization.
22915
22916 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
22917 target (see `glBindBuffer') while a generic vertex attribute array is
22918 specified, POINTER is treated as a byte offset into the buffer object's
22919 data store. Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING')
22920 is saved as generic vertex attribute array client-side state
22921 (`GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING') for index INDEX.
22922
22923 When a generic vertex attribute array is specified, SIZE, TYPE,
22924 NORMALIZED, STRIDE, and POINTER are saved as client-side state, in
22925 addition to the current vertex array buffer object binding.
22926
22927 To enable and disable a generic vertex attribute array, call
22928 `glEnableVertexAttribArray' and `glDisableVertexAttribArray' with INDEX.
22929 If enabled, the generic vertex attribute array is used when
22930 `glArrayElement', `glDrawArrays', `glMultiDrawArrays', `glDrawElements',
22931 `glMultiDrawElements', or `glDrawRangeElements' is called.
22932
22933 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
22934 `GL_MAX_VERTEX_ATTRIBS'.
22935
22936 `GL_INVALID_VALUE' is generated if SIZE is not 1, 2, 3, or 4.
22937
22938 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
22939
22940 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
22941
22942 (define-gl-procedures
22943 ((glVertexAttrib1f
22944 (index GLuint)
22945 (v0 GLfloat)
22946 ->
22947 void)
22948 (glVertexAttrib1s
22949 (index GLuint)
22950 (v0 GLshort)
22951 ->
22952 void)
22953 (glVertexAttrib1d
22954 (index GLuint)
22955 (v0 GLdouble)
22956 ->
22957 void)
22958 (glVertexAttrib2f
22959 (index GLuint)
22960 (v0 GLfloat)
22961 (v1 GLfloat)
22962 ->
22963 void)
22964 (glVertexAttrib2s
22965 (index GLuint)
22966 (v0 GLshort)
22967 (v1 GLshort)
22968 ->
22969 void)
22970 (glVertexAttrib2d
22971 (index GLuint)
22972 (v0 GLdouble)
22973 (v1 GLdouble)
22974 ->
22975 void)
22976 (glVertexAttrib3f
22977 (index GLuint)
22978 (v0 GLfloat)
22979 (v1 GLfloat)
22980 (v2 GLfloat)
22981 ->
22982 void)
22983 (glVertexAttrib3s
22984 (index GLuint)
22985 (v0 GLshort)
22986 (v1 GLshort)
22987 (v2 GLshort)
22988 ->
22989 void)
22990 (glVertexAttrib3d
22991 (index GLuint)
22992 (v0 GLdouble)
22993 (v1 GLdouble)
22994 (v2 GLdouble)
22995 ->
22996 void)
22997 (glVertexAttrib4f
22998 (index GLuint)
22999 (v0 GLfloat)
23000 (v1 GLfloat)
23001 (v2 GLfloat)
23002 (v3 GLfloat)
23003 ->
23004 void)
23005 (glVertexAttrib4s
23006 (index GLuint)
23007 (v0 GLshort)
23008 (v1 GLshort)
23009 (v2 GLshort)
23010 (v3 GLshort)
23011 ->
23012 void)
23013 (glVertexAttrib4d
23014 (index GLuint)
23015 (v0 GLdouble)
23016 (v1 GLdouble)
23017 (v2 GLdouble)
23018 (v3 GLdouble)
23019 ->
23020 void)
23021 (glVertexAttrib4Nub
23022 (index GLuint)
23023 (v0 GLubyte)
23024 (v1 GLubyte)
23025 (v2 GLubyte)
23026 (v3 GLubyte)
23027 ->
23028 void)
23029 (glVertexAttrib1fv
23030 (index GLuint)
23031 (v const-GLfloat-*)
23032 ->
23033 void)
23034 (glVertexAttrib1sv
23035 (index GLuint)
23036 (v const-GLshort-*)
23037 ->
23038 void)
23039 (glVertexAttrib1dv
23040 (index GLuint)
23041 (v const-GLdouble-*)
23042 ->
23043 void)
23044 (glVertexAttrib2fv
23045 (index GLuint)
23046 (v const-GLfloat-*)
23047 ->
23048 void)
23049 (glVertexAttrib2sv
23050 (index GLuint)
23051 (v const-GLshort-*)
23052 ->
23053 void)
23054 (glVertexAttrib2dv
23055 (index GLuint)
23056 (v const-GLdouble-*)
23057 ->
23058 void)
23059 (glVertexAttrib3fv
23060 (index GLuint)
23061 (v const-GLfloat-*)
23062 ->
23063 void)
23064 (glVertexAttrib3sv
23065 (index GLuint)
23066 (v const-GLshort-*)
23067 ->
23068 void)
23069 (glVertexAttrib3dv
23070 (index GLuint)
23071 (v const-GLdouble-*)
23072 ->
23073 void)
23074 (glVertexAttrib4fv
23075 (index GLuint)
23076 (v const-GLfloat-*)
23077 ->
23078 void)
23079 (glVertexAttrib4sv
23080 (index GLuint)
23081 (v const-GLshort-*)
23082 ->
23083 void)
23084 (glVertexAttrib4dv
23085 (index GLuint)
23086 (v const-GLdouble-*)
23087 ->
23088 void)
23089 (glVertexAttrib4iv
23090 (index GLuint)
23091 (v const-GLint-*)
23092 ->
23093 void)
23094 (glVertexAttrib4bv
23095 (index GLuint)
23096 (v const-GLbyte-*)
23097 ->
23098 void)
23099 (glVertexAttrib4ubv
23100 (index GLuint)
23101 (v const-GLubyte-*)
23102 ->
23103 void)
23104 (glVertexAttrib4usv
23105 (index GLuint)
23106 (v const-GLushort-*)
23107 ->
23108 void)
23109 (glVertexAttrib4uiv
23110 (index GLuint)
23111 (v const-GLuint-*)
23112 ->
23113 void)
23114 (glVertexAttrib4Nbv
23115 (index GLuint)
23116 (v const-GLbyte-*)
23117 ->
23118 void)
23119 (glVertexAttrib4Nsv
23120 (index GLuint)
23121 (v const-GLshort-*)
23122 ->
23123 void)
23124 (glVertexAttrib4Niv
23125 (index GLuint)
23126 (v const-GLint-*)
23127 ->
23128 void)
23129 (glVertexAttrib4Nubv
23130 (index GLuint)
23131 (v const-GLubyte-*)
23132 ->
23133 void)
23134 (glVertexAttrib4Nusv
23135 (index GLuint)
23136 (v const-GLushort-*)
23137 ->
23138 void)
23139 (glVertexAttrib4Nuiv
23140 (index GLuint)
23141 (v const-GLuint-*)
23142 ->
23143 void))
23144 "Specifies the value of a generic vertex attribute.
23145
23146 INDEX
23147 Specifies the index of the generic vertex attribute to be modified.
23148
23149 V0, V1, V2, V3
23150 Specifies the new values to be used for the specified vertex
23151 attribute.
23152
23153 OpenGL defines a number of standard vertex attributes that applications
23154 can modify with standard API entry points (color, normal, texture
23155 coordinates, etc.). The `glVertexAttrib' family of entry points allows
23156 an application to pass generic vertex attributes in numbered locations.
23157
23158 Generic attributes are defined as four-component values that are
23159 organized into an array. The first entry of this array is numbered 0,
23160 and the size of the array is specified by the implementation-dependent
23161 constant `GL_MAX_VERTEX_ATTRIBS'. Individual elements of this array can
23162 be modified with a `glVertexAttrib' call that specifies the index of the
23163 element to be modified and a value for that element.
23164
23165 These commands can be used to specify one, two, three, or all four
23166 components of the generic vertex attribute specified by INDEX. A `1' in
23167 the name of the command indicates that only one value is passed, and it
23168 will be used to modify the first component of the generic vertex
23169 attribute. The second and third components will be set to 0, and the
23170 fourth component will be set to 1. Similarly, a `2' in the name of the
23171 command indicates that values are provided for the first two components,
23172 the third component will be set to 0, and the fourth component will be
23173 set to 1. A `3' in the name of the command indicates that values are
23174 provided for the first three components and the fourth component will be
23175 set to 1, whereas a `4' in the name indicates that values are provided
23176 for all four components.
23177
23178 The letters `s', `f', `i', `d', `ub', `us', and `ui' indicate whether
23179 the arguments are of type short, float, int, double, unsigned byte,
23180 unsigned short, or unsigned int. When `v' is appended to the name, the
23181 commands can take a pointer to an array of such values. The commands
23182 containing `N' indicate that the arguments will be passed as fixed-point
23183 values that are scaled to a normalized range according to the component
23184 conversion rules defined by the OpenGL specification. Signed values are
23185 understood to represent fixed-point values in the range [-1,1], and
23186 unsigned values are understood to represent fixed-point values in the
23187 range [0,1].
23188
23189 OpenGL Shading Language attribute variables are allowed to be of type
23190 mat2, mat3, or mat4. Attributes of these types may be loaded using the
23191 `glVertexAttrib' entry points. Matrices must be loaded into successive
23192 generic attribute slots in column major order, with one column of the
23193 matrix in each generic attribute slot.
23194
23195 A user-defined attribute variable declared in a vertex shader can be
23196 bound to a generic attribute index by calling `glBindAttribLocation'.
23197 This allows an application to use more descriptive variable names in a
23198 vertex shader. A subsequent change to the specified generic vertex
23199 attribute will be immediately reflected as a change to the corresponding
23200 attribute variable in the vertex shader.
23201
23202 The binding between a generic vertex attribute index and a user-defined
23203 attribute variable in a vertex shader is part of the state of a program
23204 object, but the current value of the generic vertex attribute is not.
23205 The value of each generic vertex attribute is part of current state,
23206 just like standard vertex attributes, and it is maintained even if a
23207 different program object is used.
23208
23209 An application may freely modify generic vertex attributes that are not
23210 bound to a named vertex shader attribute variable. These values are
23211 simply maintained as part of current state and will not be accessed by
23212 the vertex shader. If a generic vertex attribute bound to an attribute
23213 variable in a vertex shader is not updated while the vertex shader is
23214 executing, the vertex shader will repeatedly use the current value for
23215 the generic vertex attribute.
23216
23217 The generic vertex attribute with index 0 is the same as the vertex
23218 position attribute previously defined by OpenGL. A `glVertex2',
23219 `glVertex3', or `glVertex4' command is completely equivalent to the
23220 corresponding `glVertexAttrib' command with an index argument of 0. A
23221 vertex shader can access generic vertex attribute 0 by using the
23222 built-in attribute variable GL_VERTEX. There are no current values for
23223 generic vertex attribute 0. This is the only generic vertex attribute
23224 with this property; calls to set other standard vertex attributes can be
23225 freely mixed with calls to set any of the other generic vertex
23226 attributes.
23227
23228 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
23229 `GL_MAX_VERTEX_ATTRIBS'.")
23230
23231 (define-gl-procedures
23232 ((glVertexPointer
23233 (size GLint)
23234 (type GLenum)
23235 (stride GLsizei)
23236 (pointer const-GLvoid-*)
23237 ->
23238 void))
23239 "Define an array of vertex data.
23240
23241 SIZE
23242 Specifies the number of coordinates per vertex. Must be 2, 3, or
23243 4. The initial value is 4.
23244
23245 TYPE
23246 Specifies the data type of each coordinate in the array. Symbolic
23247 constants `GL_SHORT', `GL_INT', `GL_FLOAT', or `GL_DOUBLE' are
23248 accepted. The initial value is `GL_FLOAT'.
23249
23250 STRIDE
23251 Specifies the byte offset between consecutive vertices. If STRIDE
23252 is 0, the vertices are understood to be tightly packed in the
23253 array. The initial value is 0.
23254
23255 POINTER
23256 Specifies a pointer to the first coordinate of the first vertex in
23257 the array. The initial value is 0.
23258
23259 `glVertexPointer' specifies the location and data format of an array of
23260 vertex coordinates to use when rendering. SIZE specifies the number of
23261 coordinates per vertex, and must be 2, 3, or 4. TYPE specifies the data
23262 type of each coordinate, and STRIDE specifies the byte stride from one
23263 vertex to the next, allowing vertices and attributes to be packed into a
23264 single array or stored in separate arrays. (Single-array storage may be
23265 more efficient on some implementations; see `glInterleavedArrays'.)
23266
23267 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
23268 target (see `glBindBuffer') while a vertex array is specified, POINTER
23269 is treated as a byte offset into the buffer object's data store. Also,
23270 the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as vertex
23271 array client-side state (`GL_VERTEX_ARRAY_BUFFER_BINDING').
23272
23273 When a vertex array is specified, SIZE, TYPE, STRIDE, and POINTER are
23274 saved as client-side state, in addition to the current vertex array
23275 buffer object binding.
23276
23277 To enable and disable the vertex array, call `glEnableClientState' and
23278 `glDisableClientState' with the argument `GL_VERTEX_ARRAY'. If enabled,
23279 the vertex array is used when `glArrayElement', `glDrawArrays',
23280 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements', or
23281 `glDrawRangeElements' is called.
23282
23283 `GL_INVALID_VALUE' is generated if SIZE is not 2, 3, or 4.
23284
23285 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
23286
23287 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
23288
23289 (define-gl-procedures
23290 ((glVertex2s (x GLshort) (y GLshort) -> void)
23291 (glVertex2i (x GLint) (y GLint) -> void)
23292 (glVertex2f (x GLfloat) (y GLfloat) -> void)
23293 (glVertex2d (x GLdouble) (y GLdouble) -> void)
23294 (glVertex3s
23295 (x GLshort)
23296 (y GLshort)
23297 (z GLshort)
23298 ->
23299 void)
23300 (glVertex3i
23301 (x GLint)
23302 (y GLint)
23303 (z GLint)
23304 ->
23305 void)
23306 (glVertex3f
23307 (x GLfloat)
23308 (y GLfloat)
23309 (z GLfloat)
23310 ->
23311 void)
23312 (glVertex3d
23313 (x GLdouble)
23314 (y GLdouble)
23315 (z GLdouble)
23316 ->
23317 void)
23318 (glVertex4s
23319 (x GLshort)
23320 (y GLshort)
23321 (z GLshort)
23322 (w GLshort)
23323 ->
23324 void)
23325 (glVertex4i
23326 (x GLint)
23327 (y GLint)
23328 (z GLint)
23329 (w GLint)
23330 ->
23331 void)
23332 (glVertex4f
23333 (x GLfloat)
23334 (y GLfloat)
23335 (z GLfloat)
23336 (w GLfloat)
23337 ->
23338 void)
23339 (glVertex4d
23340 (x GLdouble)
23341 (y GLdouble)
23342 (z GLdouble)
23343 (w GLdouble)
23344 ->
23345 void)
23346 (glVertex2sv (v const-GLshort-*) -> void)
23347 (glVertex2iv (v const-GLint-*) -> void)
23348 (glVertex2fv (v const-GLfloat-*) -> void)
23349 (glVertex2dv (v const-GLdouble-*) -> void)
23350 (glVertex3sv (v const-GLshort-*) -> void)
23351 (glVertex3iv (v const-GLint-*) -> void)
23352 (glVertex3fv (v const-GLfloat-*) -> void)
23353 (glVertex3dv (v const-GLdouble-*) -> void)
23354 (glVertex4sv (v const-GLshort-*) -> void)
23355 (glVertex4iv (v const-GLint-*) -> void)
23356 (glVertex4fv (v const-GLfloat-*) -> void)
23357 (glVertex4dv (v const-GLdouble-*) -> void))
23358 "Specify a vertex.
23359
23360 X
23361 Y
23362
23363 Z
23364
23365 W
23366
23367 Specify X, Y, Z, and W coordinates of a vertex. Not all parameters
23368 are present in all forms of the command.
23369
23370 `glVertex' commands are used within `glBegin'/`glEnd' pairs to specify
23371 point, line, and polygon vertices. The current color, normal, texture
23372 coordinates, and fog coordinate are associated with the vertex when
23373 `glVertex' is called.
23374
23375 When only X and Y are specified, Z defaults to 0 and W defaults to 1.
23376 When X , Y , and Z are specified, W defaults to 1.")
23377
23378 (define-gl-procedures
23379 ((glViewport
23380 (x GLint)
23381 (y GLint)
23382 (width GLsizei)
23383 (height GLsizei)
23384 ->
23385 void))
23386 "Set the viewport.
23387
23388 X
23389 Y
23390
23391 Specify the lower left corner of the viewport rectangle, in pixels.
23392 The initial value is (0,0).
23393
23394 WIDTH
23395 HEIGHT
23396
23397 Specify the width and height of the viewport. When a GL context is
23398 first attached to a window, WIDTH and HEIGHT are set to the
23399 dimensions of that window.
23400
23401 `glViewport' specifies the affine transformation of X and Y from
23402 normalized device coordinates to window coordinates. Let (X_ND,Y_ND) be
23403 normalized device coordinates. Then the window coordinates (X_W,Y_W)
23404 are computed as follows:
23405
23406 X_W=(X_ND+1,)\u2062(WIDTH/2,)+X
23407
23408 Y_W=(Y_ND+1,)\u2062(HEIGHT/2,)+Y
23409
23410 Viewport width and height are silently clamped to a range that depends
23411 on the implementation. To query this range, call `glGet' with argument
23412 `GL_MAX_VIEWPORT_DIMS'.
23413
23414 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
23415
23416 `GL_INVALID_OPERATION' is generated if `glViewport' is executed between
23417 the execution of `glBegin' and the corresponding execution of `glEnd'.")
23418
23419 (define-gl-procedures
23420 ((glWindowPos2s (x GLshort) (y GLshort) -> void)
23421 (glWindowPos2i (x GLint) (y GLint) -> void)
23422 (glWindowPos2f (x GLfloat) (y GLfloat) -> void)
23423 (glWindowPos2d (x GLdouble) (y GLdouble) -> void)
23424 (glWindowPos3s
23425 (x GLshort)
23426 (y GLshort)
23427 (z GLshort)
23428 ->
23429 void)
23430 (glWindowPos3i
23431 (x GLint)
23432 (y GLint)
23433 (z GLint)
23434 ->
23435 void)
23436 (glWindowPos3f
23437 (x GLfloat)
23438 (y GLfloat)
23439 (z GLfloat)
23440 ->
23441 void)
23442 (glWindowPos3d
23443 (x GLdouble)
23444 (y GLdouble)
23445 (z GLdouble)
23446 ->
23447 void)
23448 (glWindowPos2sv (v const-GLshort-*) -> void)
23449 (glWindowPos2iv (v const-GLint-*) -> void)
23450 (glWindowPos2fv (v const-GLfloat-*) -> void)
23451 (glWindowPos2dv (v const-GLdouble-*) -> void)
23452 (glWindowPos3sv (v const-GLshort-*) -> void)
23453 (glWindowPos3iv (v const-GLint-*) -> void)
23454 (glWindowPos3fv (v const-GLfloat-*) -> void)
23455 (glWindowPos3dv (v const-GLdouble-*) -> void))
23456 "Specify the raster position in window coordinates for pixel operations.
23457
23458 X
23459 Y
23460
23461 Z
23462
23463 Specify the X , Y , Z coordinates for the raster position.
23464
23465 The GL maintains a 3D position in window coordinates. This position,
23466 called the raster position, is used to position pixel and bitmap write
23467 operations. It is maintained with subpixel accuracy. See `glBitmap',
23468 `glDrawPixels', and `glCopyPixels'.
23469
23470 `glWindowPos2' specifies the X and Y coordinates, while Z is implicitly
23471 set to 0. `glWindowPos3' specifies all three coordinates. The W
23472 coordinate of the current raster position is always set to 1.0.
23473
23474 `glWindowPos' directly updates the X and Y coordinates of the current
23475 raster position with the values specified. That is, the values are
23476 neither transformed by the current modelview and projection matrices,
23477 nor by the viewport-to-window transform. The Z coordinate of the
23478 current raster position is updated in the following manner:
23479
23480 Z={(N), (F), (N+Z×(F-N,),)\u2062(IF\u2062Z<=0), (IF\u2062Z>=1), (`otherwise',),
23481
23482
23483
23484 where N is `GL_DEPTH_RANGE''s near value, and F is `GL_DEPTH_RANGE''s
23485 far value. See `glDepthRange'.
23486
23487 The specified coordinates are not clip-tested, causing the raster
23488 position to always be valid.
23489
23490 The current raster position also includes some associated color data and
23491 texture coordinates. If lighting is enabled, then
23492 `GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `GL_CURRENT_RASTER_INDEX'
23493 (in color index mode) is set to the color produced by the lighting
23494 calculation (see `glLight', `glLightModel', and `glShadeModel'). If
23495 lighting is disabled, current color (in RGBA mode, state variable
23496 `GL_CURRENT_COLOR') or color index (in color index mode, state variable
23497 `GL_CURRENT_INDEX') is used to update the current raster color.
23498 `GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated.
23499
23500 Likewise, `GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of
23501 `GL_CURRENT_TEXTURE_COORDS', based on the texture matrix and the texture
23502 generation functions (see `glTexGen'). The `GL_CURRENT_RASTER_DISTANCE'
23503 is set to the `GL_CURRENT_FOG_COORD'.
23504
23505
23506
23507 `GL_INVALID_OPERATION' is generated if `glWindowPos' is executed between
23508 the execution of `glBegin' and the corresponding execution of `glEnd'.")
23509