20ab891778eaf5a3990f0e07d05b641e89884cd4
[clinton/guile-figl.git] / figl / gl / low-level.scm
1 ;;; figl -*- mode: scheme; coding: utf-8 -*-
2 ;;; Copyright (C) 2013 Andy Wingo <wingo@pobox.com>
3 ;;;
4 ;;; Figl is free software: you can redistribute it and/or modify it
5 ;;; under the terms of the GNU Lesser General Public License as
6 ;;; published by the Free Software Foundation, either version 3 of the
7 ;;; License, or (at your option) any later version.
8 ;;;
9 ;;; Figl is distributed in the hope that it will be useful, but WITHOUT
10 ;;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 ;;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
12 ;;; Public License for more details.
13 ;;;
14 ;;; You should have received a copy of the GNU Lesser General Public
15 ;;; License along with this program. If not, see
16 ;;; <http://www.gnu.org/licenses/>.
17 ;;;
18 ;;; Derived from upstream OpenGL documentation.
19 ;;;
20 ;;; Copyright (C) 1991-2006 Silicon Graphics, Inc. This document is licensed
21 ;;; under the SGI Free Software B License. For details, see
22 ;;; http://oss.sgi.com/projects/FreeB/ (http://oss.sgi.com/projects/FreeB/).
23 ;;;
24 ;;; Copyright (C) 2003-2005 3Dlabs Inc. Ltd. This material may be
25 ;;; distributed subject to the terms and conditions set forth in the Open
26 ;;; Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/
27 ;;; (http://opencontent.org/openpub/).
28 ;;;
29 ;;; Copyright (C) 2005 Addison-Wesley. This material may be distributed
30 ;;; subject to the terms and conditions set forth in the Open Publication
31 ;;; License, v 1.0, 8 June 1999. http://opencontent.org/openpub/
32 ;;; (http://opencontent.org/openpub/).
33 ;;;
34 ;;; Copyright (C) 2006 Khronos Group. This material may be distributed
35 ;;; subject to the terms and conditions set forth in the Open Publication
36 ;;; License, v 1.0, 8 June 1999. http://opencontent.org/openpub/
37 ;;; (http://opencontent.org/openpub/).
38 ;;;
39 ;;; Automatically generated; you probably don't want to edit this. To
40 ;;; update, run "make update" in the top-level build tree.
41 ;;;
42
43 (define-module
44 (figl gl low-level)
45 #:use-module
46 (figl gl runtime)
47 #:use-module
48 (figl gl types)
49 #:export
50 (glAccum
51 glActiveTexture
52 glAlphaFunc
53 glAreTexturesResident
54 glArrayElement
55 glAttachShader
56 glBeginQuery
57 glEndQuery
58 glBegin
59 glEnd
60 glBindAttribLocation
61 glBindBuffer
62 glBindTexture
63 glBitmap
64 glBlendColor
65 glBlendEquationSeparate
66 glBlendEquation
67 glBlendFuncSeparate
68 glBlendFunc
69 glBufferData
70 glBufferSubData
71 glCallLists
72 glCallList
73 glClearAccum
74 glClearColor
75 glClearDepth
76 glClearIndex
77 glClearStencil
78 glClear
79 glClientActiveTexture
80 glClipPlane
81 glColorMask
82 glColorMaterial
83 glColorPointer
84 glColorSubTable
85 glColorTableParameterfv
86 glColorTableParameteriv
87 glColorTable
88 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 drawn
775 if it also passes subsequent stencil and depth buffer tests. If the
776 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 not
811 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 of
856 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 created.
970
971 When `glBeginQuery' is executed, the query object's samples-passed
972 counter is reset to 0. Subsequent rendering will increment the counter
973 once for every sample that passes the depth test. When `glEndQuery' is
974 executed, the samples-passed counter is assigned to the query object's
975 result value. This value can be queried by calling `glGetQueryObject'
976 with PNAME`GL_QUERY_RESULT'.
977
978 Querying the `GL_QUERY_RESULT' implicitly flushes the GL pipeline until
979 the rendering delimited by the query object has completed and the result
980 is available. `GL_QUERY_RESULT_AVAILABLE' can be queried to determine if
981 the result is immediately available or if the rendering is not yet
982 complete.
983
984 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SAMPLES_PASSED'.
985
986 `GL_INVALID_OPERATION' is generated if `glBeginQuery' is executed while
987 a query object of the same TARGET is already active.
988
989 `GL_INVALID_OPERATION' is generated if `glEndQuery' is executed when a
990 query object of the same TARGET is not active.
991
992 `GL_INVALID_OPERATION' is generated if ID is 0.
993
994 `GL_INVALID_OPERATION' is generated if ID is the name of an already
995 active query object.
996
997 `GL_INVALID_OPERATION' is generated if `glBeginQuery' or `glEndQuery' is
998 executed between the execution of `glBegin' and the corresponding
999 execution of `glEnd'.")
1000
1001 (define-gl-procedures
1002 ((glBegin (mode GLenum) -> void) (glEnd -> void))
1003 "Delimit the vertices of a primitive or a group of like primitives.
1004
1005 MODE
1006 Specifies the primitive or primitives that will be created from
1007 vertices presented between `glBegin' and the subsequent `glEnd'.
1008 Ten symbolic constants are accepted: `GL_POINTS', `GL_LINES',
1009 `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_TRIANGLES',
1010 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_QUADS',
1011 `GL_QUAD_STRIP', and `GL_POLYGON'.
1012
1013 `glBegin' and `glEnd' delimit the vertices that define a primitive or a
1014 group of like primitives. `glBegin' accepts a single argument that
1015 specifies in which of ten ways the vertices are interpreted. Taking N as
1016 an integer count starting at one, and N as the total number of vertices
1017 specified, the interpretations are as follows:
1018
1019 `GL_POINTS'
1020 Treats each vertex as a single point. Vertex N defines point N . N
1021 points are drawn.
1022
1023 `GL_LINES'
1024 Treats each pair of vertices as an independent line segment.
1025 Vertices 2\u2062N-1 and 2\u2062N define line N . N/2 lines are drawn.
1026
1027 `GL_LINE_STRIP'
1028 Draws a connected group of line segments from the first vertex to
1029 the last. Vertices N and N+1 define line N . N-1 lines are drawn.
1030
1031 `GL_LINE_LOOP'
1032 Draws a connected group of line segments from the first vertex to
1033 the last, then back to the first. Vertices N and N+1 define line N
1034 . The last line, however, is defined by vertices N and 1 . N lines
1035 are drawn.
1036
1037 `GL_TRIANGLES'
1038 Treats each triplet of vertices as an independent triangle.
1039 Vertices 3\u2062N-2 , 3\u2062N-1 , and 3\u2062N define triangle N . N/3 triangles
1040 are drawn.
1041
1042 `GL_TRIANGLE_STRIP'
1043 Draws a connected group of triangles. One triangle is defined for
1044 each vertex presented after the first two vertices. For odd N ,
1045 vertices N , N+1 , and N+2 define triangle N . For even N ,
1046 vertices N+1 , N , and N+2 define triangle N . N-2 triangles are
1047 drawn.
1048
1049 `GL_TRIANGLE_FAN'
1050 Draws a connected group of triangles. One triangle is defined for
1051 each vertex presented after the first two vertices. Vertices 1 ,
1052 N+1 , and N+2 define triangle N . N-2 triangles are drawn.
1053
1054 `GL_QUADS'
1055 Treats each group of four vertices as an independent quadrilateral.
1056 Vertices 4\u2062N-3 , 4\u2062N-2 , 4\u2062N-1 , and 4\u2062N define quadrilateral N .
1057 N/4 quadrilaterals are drawn.
1058
1059 `GL_QUAD_STRIP'
1060 Draws a connected group of quadrilaterals. One quadrilateral is
1061 defined for each pair of vertices presented after the first pair.
1062 Vertices 2\u2062N-1 , 2\u2062N , 2\u2062N+2 , and 2\u2062N+1 define quadrilateral N .
1063 N/2-1 quadrilaterals are drawn. Note that the order in which
1064 vertices are used to construct a quadrilateral from strip data is
1065 different from that used with independent data.
1066
1067 `GL_POLYGON'
1068 Draws a single, convex polygon. Vertices 1 through N define this
1069 polygon.
1070
1071 Only a subset of GL commands can be used between `glBegin' and `glEnd'.
1072 The commands are `glVertex', `glColor', `glSecondaryColor', `glIndex',
1073 `glNormal', `glFogCoord', `glTexCoord', `glMultiTexCoord',
1074 `glVertexAttrib', `glEvalCoord', `glEvalPoint', `glArrayElement',
1075 `glMaterial', and `glEdgeFlag'. Also, it is acceptable to use
1076 `glCallList' or `glCallLists' to execute display lists that include only
1077 the preceding commands. If any other GL command is executed between
1078 `glBegin' and `glEnd', the error flag is set and the command is ignored.
1079
1080 Regardless of the value chosen for MODE, there is no limit to the number
1081 of vertices that can be defined between `glBegin' and `glEnd'. Lines,
1082 triangles, quadrilaterals, and polygons that are incompletely specified
1083 are not drawn. Incomplete specification results when either too few
1084 vertices are provided to specify even a single primitive or when an
1085 incorrect multiple of vertices is specified. The incomplete primitive is
1086 ignored; the rest are drawn.
1087
1088 The minimum specification of vertices for each primitive is as follows:
1089 1 for a point, 2 for a line, 3 for a triangle, 4 for a quadrilateral,
1090 and 3 for a polygon. Modes that require a certain multiple of vertices
1091 are `GL_LINES' (2), `GL_TRIANGLES' (3), `GL_QUADS' (4), and
1092 `GL_QUAD_STRIP' (2).
1093
1094 `GL_INVALID_ENUM' is generated if MODE is set to an unaccepted value.
1095
1096 `GL_INVALID_OPERATION' is generated if `glBegin' is executed between a
1097 `glBegin' and the corresponding execution of `glEnd'.
1098
1099 `GL_INVALID_OPERATION' is generated if `glEnd' is executed without being
1100 preceded by a `glBegin'.
1101
1102 `GL_INVALID_OPERATION' is generated if a command other than `glVertex',
1103 `glColor', `glSecondaryColor', `glIndex', `glNormal', `glFogCoord',
1104 `glTexCoord', `glMultiTexCoord', `glVertexAttrib', `glEvalCoord',
1105 `glEvalPoint', `glArrayElement', `glMaterial', `glEdgeFlag',
1106 `glCallList', or `glCallLists' is executed between the execution of
1107 `glBegin' and the corresponding execution `glEnd'.
1108
1109 Execution of `glEnableClientState', `glDisableClientState',
1110 `glEdgeFlagPointer', `glFogCoordPointer', `glTexCoordPointer',
1111 `glColorPointer', `glSecondaryColorPointer', `glIndexPointer',
1112 `glNormalPointer', `glVertexPointer', `glVertexAttribPointer',
1113 `glInterleavedArrays', or `glPixelStore' is not allowed after a call to
1114 `glBegin' and before the corresponding call to `glEnd', but an error may
1115 or may not be generated.")
1116
1117 (define-gl-procedures
1118 ((glBindAttribLocation
1119 (program GLuint)
1120 (index GLuint)
1121 (name const-GLchar-*)
1122 ->
1123 void))
1124 "Associates a generic vertex attribute index with a named attribute
1125 variable.
1126
1127 PROGRAM
1128 Specifies the handle of the program object in which the association
1129 is to be made.
1130
1131 INDEX
1132 Specifies the index of the generic vertex attribute to be bound.
1133
1134 NAME
1135 Specifies a null terminated string containing the name of the
1136 vertex shader attribute variable to which INDEX is to be bound.
1137
1138 `glBindAttribLocation' is used to associate a user-defined attribute
1139 variable in the program object specified by PROGRAM with a generic
1140 vertex attribute index. The name of the user-defined attribute variable
1141 is passed as a null terminated string in NAME. The generic vertex
1142 attribute index to be bound to this variable is specified by INDEX. When
1143 PROGRAM is made part of current state, values provided via the generic
1144 vertex attribute INDEX will modify the value of the user-defined
1145 attribute variable specified by NAME.
1146
1147 If NAME refers to a matrix attribute variable, INDEX refers to the first
1148 column of the matrix. Other matrix columns are then automatically bound
1149 to locations INDEX+1 for a matrix of type mat2; INDEX+1 and INDEX+2 for
1150 a matrix of type mat3; and INDEX+1, INDEX+2, and INDEX+3 for a matrix of
1151 type mat4.
1152
1153 This command makes it possible for vertex shaders to use descriptive
1154 names for attribute variables rather than generic variables that are
1155 numbered from 0 to `GL_MAX_VERTEX_ATTRIBS' -1. The values sent to each
1156 generic attribute index are part of current state, just like standard
1157 vertex attributes such as color, normal, and vertex position. If a
1158 different program object is made current by calling `glUseProgram', the
1159 generic vertex attributes are tracked in such a way that the same values
1160 will be observed by attributes in the new program object that are also
1161 bound to INDEX.
1162
1163 Attribute variable name-to-generic attribute index bindings for a
1164 program object can be explicitly assigned at any time by calling
1165 `glBindAttribLocation'. Attribute bindings do not go into effect until
1166 `glLinkProgram' is called. After a program object has been linked
1167 successfully, the index values for generic attributes remain fixed (and
1168 their values can be queried) until the next link command occurs.
1169
1170 Applications are not allowed to bind any of the standard OpenGL vertex
1171 attributes using this command, as they are bound automatically when
1172 needed. Any attribute binding that occurs after the program object has
1173 been linked will not take effect until the next time the program object
1174 is linked.
1175
1176 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
1177 `GL_MAX_VERTEX_ATTRIBS'.
1178
1179 `GL_INVALID_OPERATION' is generated if NAME starts with the reserved
1180 prefix \"gl_\".
1181
1182 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
1183 OpenGL.
1184
1185 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
1186
1187 `GL_INVALID_OPERATION' is generated if `glBindAttribLocation' is
1188 executed between the execution of `glBegin' and the corresponding
1189 execution of `glEnd'.")
1190
1191 (define-gl-procedures
1192 ((glBindBuffer
1193 (target GLenum)
1194 (buffer GLuint)
1195 ->
1196 void))
1197 "Bind a named buffer object.
1198
1199 TARGET
1200 Specifies the target to which the buffer object is bound. The
1201 symbolic constant must be `GL_ARRAY_BUFFER',
1202 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
1203 `GL_PIXEL_UNPACK_BUFFER'.
1204
1205 BUFFER
1206 Specifies the name of a buffer object.
1207
1208 `glBindBuffer' lets you create or use a named buffer object. Calling
1209 `glBindBuffer' with TARGET set to `GL_ARRAY_BUFFER',
1210 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER' or
1211 `GL_PIXEL_UNPACK_BUFFER' and BUFFER set to the name of the new buffer
1212 object binds the buffer object name to the target. When a buffer object
1213 is bound to a target, the previous binding for that target is
1214 automatically broken.
1215
1216 Buffer object names are unsigned integers. The value zero is reserved,
1217 but there is no default buffer object for each buffer object target.
1218 Instead, BUFFER set to zero effectively unbinds any buffer object
1219 previously bound, and restores client memory usage for that buffer
1220 object target. Buffer object names and the corresponding buffer object
1221 contents are local to the shared display-list space (see
1222 `glXCreateContext') of the current GL rendering context; two rendering
1223 contexts share buffer object names only if they also share display
1224 lists.
1225
1226 You may use `glGenBuffers' to generate a set of new buffer object names.
1227
1228 The state of a buffer object immediately after it is first bound is an
1229 unmapped zero-sized memory buffer with `GL_READ_WRITE' access and
1230 `GL_STATIC_DRAW' usage.
1231
1232 While a non-zero buffer object name is bound, GL operations on the
1233 target to which it is bound affect the bound buffer object, and queries
1234 of the target to which it is bound return state from the bound buffer
1235 object. While buffer object name zero is bound, as in the initial state,
1236 attempts to modify or query state on the target to which it is bound
1237 generates an `GL_INVALID_OPERATION' error.
1238
1239 When vertex array pointer state is changed, for example by a call to
1240 `glNormalPointer', the current buffer object binding
1241 (`GL_ARRAY_BUFFER_BINDING') is copied into the corresponding client
1242 state for the vertex array type being changed, for example
1243 `GL_NORMAL_ARRAY_BUFFER_BINDING'. While a non-zero buffer object is
1244 bound to the `GL_ARRAY_BUFFER' target, the vertex array pointer
1245 parameter that is traditionally interpreted as a pointer to client-side
1246 memory is instead interpreted as an offset within the buffer object
1247 measured in basic machine units.
1248
1249 While a non-zero buffer object is bound to the `GL_ELEMENT_ARRAY_BUFFER'
1250 target, the indices parameter of `glDrawElements',
1251 `glDrawRangeElements', or `glMultiDrawElements' that is traditionally
1252 interpreted as a pointer to client-side memory is instead interpreted as
1253 an offset within the buffer object measured in basic machine units.
1254
1255 While a non-zero buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
1256 target, the following commands are affected: `glGetCompressedTexImage',
1257 `glGetConvolutionFilter', `glGetHistogram', `glGetMinmax',
1258 `glGetPixelMap', `glGetPolygonStipple', `glGetSeparableFilter',
1259 `glGetTexImage', and `glReadPixels'. The pointer parameter that is
1260 traditionally interpreted as a pointer to client-side memory where the
1261 pixels are to be packed is instead interpreted as an offset within the
1262 buffer object measured in basic machine units.
1263
1264 While a non-zero buffer object is bound to the `GL_PIXEL_UNPACK_BUFFER'
1265 target, the following commands are affected: `glBitmap',
1266 `glColorSubTable', `glColorTable', `glCompressedTexImage1D',
1267 `glCompressedTexImage2D', `glCompressedTexImage3D',
1268 `glCompressedTexSubImage1D', `glCompressedTexSubImage2D',
1269 `glCompressedTexSubImage3D', `glConvolutionFilter1D',
1270 `glConvolutionFilter2D', `glDrawPixels', `glPixelMap',
1271 `glPolygonStipple', `glSeparableFilter2D', `glTexImage1D',
1272 `glTexImage2D', `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D',
1273 and `glTexSubImage3D'. The pointer parameter that is traditionally
1274 interpreted as a pointer to client-side memory from which the pixels are
1275 to be unpacked is instead interpreted as an offset within the buffer
1276 object measured in basic machine units.
1277
1278 A buffer object binding created with `glBindBuffer' remains active until
1279 a different buffer object name is bound to the same target, or until the
1280 bound buffer object is deleted with `glDeleteBuffers'.
1281
1282 Once created, a named buffer object may be re-bound to any target as
1283 often as needed. However, the GL implementation may make choices about
1284 how to optimize the storage of a buffer object based on its initial
1285 binding target.
1286
1287 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
1288 values.
1289
1290 `GL_INVALID_OPERATION' is generated if `glBindBuffer' is executed
1291 between the execution of `glBegin' and the corresponding execution of
1292 `glEnd'.")
1293
1294 (define-gl-procedures
1295 ((glBindTexture
1296 (target GLenum)
1297 (texture GLuint)
1298 ->
1299 void))
1300 "Bind a named texture to a texturing target.
1301
1302 TARGET
1303 Specifies the target to which the texture is bound. Must be either
1304 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D', or
1305 `GL_TEXTURE_CUBE_MAP'.
1306
1307 TEXTURE
1308 Specifies the name of a texture.
1309
1310 `glBindTexture' lets you create or use a named texture. Calling
1311 `glBindTexture' with TARGET set to `GL_TEXTURE_1D', `GL_TEXTURE_2D',
1312 `GL_TEXTURE_3D' or `GL_TEXTURE_CUBE_MAP' and TEXTURE set to the name of
1313 the new texture binds the texture name to the target. When a texture is
1314 bound to a target, the previous binding for that target is automatically
1315 broken.
1316
1317 Texture names are unsigned integers. The value zero is reserved to
1318 represent the default texture for each texture target. Texture names and
1319 the corresponding texture contents are local to the shared display-list
1320 space (see `glXCreateContext') of the current GL rendering context; two
1321 rendering contexts share texture names only if they also share display
1322 lists.
1323
1324 You may use `glGenTextures' to generate a set of new texture names.
1325
1326 When a texture is first bound, it assumes the specified target: A
1327 texture first bound to `GL_TEXTURE_1D' becomes one-dimensional texture,
1328 a texture first bound to `GL_TEXTURE_2D' becomes two-dimensional
1329 texture, a texture first bound to `GL_TEXTURE_3D' becomes
1330 three-dimensional texture, and a texture first bound to
1331 `GL_TEXTURE_CUBE_MAP' becomes a cube-mapped texture. The state of a
1332 one-dimensional texture immediately after it is first bound is
1333 equivalent to the state of the default `GL_TEXTURE_1D' at GL
1334 initialization, and similarly for two- and three-dimensional textures
1335 and cube-mapped textures.
1336
1337 While a texture is bound, GL operations on the target to which it is
1338 bound affect the bound texture, and queries of the target to which it is
1339 bound return state from the bound texture. If texture mapping is active
1340 on the target to which a texture is bound, the bound texture is used. In
1341 effect, the texture targets become aliases for the textures currently
1342 bound to them, and the texture name zero refers to the default textures
1343 that were bound to them at initialization.
1344
1345 A texture binding created with `glBindTexture' remains active until a
1346 different texture is bound to the same target, or until the bound
1347 texture is deleted with `glDeleteTextures'.
1348
1349 Once created, a named texture may be re-bound to its same original
1350 target as often as needed. It is usually much faster to use
1351 `glBindTexture' to bind an existing named texture to one of the texture
1352 targets than it is to reload the texture image using `glTexImage1D',
1353 `glTexImage2D', or `glTexImage3D'. For additional control over
1354 performance, use `glPrioritizeTextures'.
1355
1356 `glBindTexture' is included in display lists.
1357
1358 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
1359 values.
1360
1361 `GL_INVALID_OPERATION' is generated if TEXTURE was previously created
1362 with a target that doesn't match that of TARGET.
1363
1364 `GL_INVALID_OPERATION' is generated if `glBindTexture' is executed
1365 between the execution of `glBegin' and the corresponding execution of
1366 `glEnd'.")
1367
1368 (define-gl-procedures
1369 ((glBitmap
1370 (width GLsizei)
1371 (height GLsizei)
1372 (xorig GLfloat)
1373 (yorig GLfloat)
1374 (xmove GLfloat)
1375 (ymove GLfloat)
1376 (bitmap const-GLubyte-*)
1377 ->
1378 void))
1379 "Draw a bitmap.
1380
1381 WIDTH
1382 HEIGHT
1383
1384 Specify the pixel width and height of the bitmap image.
1385
1386 XORIG
1387 YORIG
1388
1389 Specify the location of the origin in the bitmap image. The origin
1390 is measured from the lower left corner of the bitmap, with right
1391 and up being the positive axes.
1392
1393 XMOVE
1394 YMOVE
1395
1396 Specify the X and Y offsets to be added to the current raster
1397 position after the bitmap is drawn.
1398
1399 BITMAP
1400 Specifies the address of the bitmap image.
1401
1402 A bitmap is a binary image. When drawn, the bitmap is positioned
1403 relative to the current raster position, and frame buffer pixels
1404 corresponding to 1's in the bitmap are written using the current raster
1405 color or index. Frame buffer pixels corresponding to 0's in the bitmap
1406 are not modified.
1407
1408 `glBitmap' takes seven arguments. The first pair specifies the width and
1409 height of the bitmap image. The second pair specifies the location of
1410 the bitmap origin relative to the lower left corner of the bitmap image.
1411 The third pair of arguments specifies X and Y offsets to be added to the
1412 current raster position after the bitmap has been drawn. The final
1413 argument is a pointer to the bitmap image itself.
1414
1415 If a non-zero named buffer object is bound to the
1416 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a bitmap
1417 image is specified, BITMAP is treated as a byte offset into the buffer
1418 object's data store.
1419
1420 The bitmap image is interpreted like image data for the `glDrawPixels'
1421 command, with WIDTH and HEIGHT corresponding to the width and height
1422 arguments of that command, and with TYPE set to `GL_BITMAP' and FORMAT
1423 set to `GL_COLOR_INDEX'. Modes specified using `glPixelStore' affect the
1424 interpretation of bitmap image data; modes specified using
1425 `glPixelTransfer' do not.
1426
1427 If the current raster position is invalid, `glBitmap' is ignored.
1428 Otherwise, the lower left corner of the bitmap image is positioned at
1429 the window coordinates
1430
1431 X_W=⌊X_R-X_O,⌋
1432
1433 Y_W=⌊Y_R-Y_O,⌋
1434
1435 where (X_R,Y_R) is the raster position and (X_O,Y_O) is the bitmap
1436 origin. Fragments are then generated for each pixel corresponding to a 1
1437 (one) in the bitmap image. These fragments are generated using the
1438 current raster Z coordinate, color or color index, and current raster
1439 texture coordinates. They are then treated just as if they had been
1440 generated by a point, line, or polygon, including texture mapping,
1441 fogging, and all per-fragment operations such as alpha and depth
1442 testing.
1443
1444 After the bitmap has been drawn, the X and Y coordinates of the current
1445 raster position are offset by XMOVE and YMOVE. No change is made to the
1446 Z coordinate of the current raster position, or to the current raster
1447 color, texture coordinates, or index.
1448
1449 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is negative.
1450
1451 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
1452 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
1453 data store is currently mapped.
1454
1455 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
1456 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
1457 unpacked from the buffer object such that the memory reads required
1458 would exceed the data store size.
1459
1460 `GL_INVALID_OPERATION' is generated if `glBitmap' is executed between
1461 the execution of `glBegin' and the corresponding execution of `glEnd'.")
1462
1463 (define-gl-procedures
1464 ((glBlendColor
1465 (red GLclampf)
1466 (green GLclampf)
1467 (blue GLclampf)
1468 (alpha GLclampf)
1469 ->
1470 void))
1471 "Set the blend color.
1472
1473 RED
1474 GREEN
1475
1476 BLUE
1477
1478 ALPHA
1479
1480 specify the components of `GL_BLEND_COLOR'
1481
1482 The `GL_BLEND_COLOR' may be used to calculate the source and destination
1483 blending factors. The color components are clamped to the range [0,1]
1484 before being stored. See `glBlendFunc' for a complete description of the
1485 blending operations. Initially the `GL_BLEND_COLOR' is set to (0, 0, 0,
1486 0).
1487
1488 `GL_INVALID_OPERATION' is generated if `glBlendColor' is executed
1489 between the execution of `glBegin' and the corresponding execution of
1490 `glEnd'.")
1491
1492 (define-gl-procedures
1493 ((glBlendEquationSeparate
1494 (modeRGB GLenum)
1495 (modeAlpha GLenum)
1496 ->
1497 void))
1498 "Set the RGB blend equation and the alpha blend equation separately.
1499
1500 MODERGB
1501 specifies the RGB blend equation, how the red, green, and blue
1502 components of the source and destination colors are combined. It
1503 must be `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
1504 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN', `GL_MAX'.
1505
1506 MODEALPHA
1507 specifies the alpha blend equation, how the alpha component of the
1508 source and destination colors are combined. It must be
1509 `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1510 `GL_MIN', `GL_MAX'.
1511
1512 The blend equations determines how a new pixel (the ''source'' color) is
1513 combined with a pixel already in the framebuffer (the ''destination''
1514 color). This function specifies one blend equation for the RGB-color
1515 components and one blend equation for the alpha component.
1516
1517 The blend equations use the source and destination blend factors
1518 specified by either `glBlendFunc' or `glBlendFuncSeparate'. See
1519 `glBlendFunc' or `glBlendFuncSeparate' for a description of the various
1520 blend factors.
1521
1522 In the equations that follow, source and destination color components
1523 are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) , respectively.
1524 The result color is referred to as (R_R,G_RB_RA_R) . The source and
1525 destination blend factors are denoted (S_R,S_GS_BS_A) and
1526 (D_R,D_GD_BD_A) , respectively. For these equations all color components
1527 are understood to have values in the range [0,1] .
1528
1529 *Mode*
1530 *RGB Components*, *Alpha Component*
1531
1532 `GL_FUNC_ADD'
1533 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 ,
1534 AR=A_S\u2062S_A+A_D\u2062D_A
1535
1536 `GL_FUNC_SUBTRACT'
1537 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 ,
1538 AR=A_S\u2062S_A-A_D\u2062D_A
1539
1540 `GL_FUNC_REVERSE_SUBTRACT'
1541 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 ,
1542 AR=A_D\u2062D_A-A_S\u2062S_A
1543
1544 `GL_MIN'
1545 RR=MIN\u2061(R_S,R_D) GR=MIN\u2061(G_S,G_D) BR=MIN\u2061(B_S,B_D) ,
1546 AR=MIN\u2061(A_S,A_D)
1547
1548 `GL_MAX'
1549 RR=MAX\u2061(R_S,R_D) GR=MAX\u2061(G_S,G_D) BR=MAX\u2061(B_S,B_D) ,
1550 AR=MAX\u2061(A_S,A_D)
1551
1552 The results of these equations are clamped to the range [0,1] .
1553
1554 The `GL_MIN' and `GL_MAX' equations are useful for applications that
1555 analyze image data (image thresholding against a constant color, for
1556 example). The `GL_FUNC_ADD' equation is useful for antialiasing and
1557 transparency, among other things.
1558
1559 Initially, both the RGB blend equation and the alpha blend equation are
1560 set to `GL_FUNC_ADD'.
1561
1562
1563
1564 `GL_INVALID_ENUM' is generated if either MODERGB or MODEALPHA is not one
1565 of `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1566 `GL_MAX', or `GL_MIN'.
1567
1568 `GL_INVALID_OPERATION' is generated if `glBlendEquationSeparate' is
1569 executed between the execution of `glBegin' and the corresponding
1570 execution of `glEnd'.")
1571
1572 (define-gl-procedures
1573 ((glBlendEquation (mode GLenum) -> void))
1574 "Specify the equation used for both the RGB blend equation and the Alpha
1575 blend equation.
1576
1577 MODE
1578 specifies how source and destination colors are combined. It must
1579 be `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1580 `GL_MIN', `GL_MAX'.
1581
1582 The blend equations determine how a new pixel (the ''source'' color) is
1583 combined with a pixel already in the framebuffer (the ''destination''
1584 color). This function sets both the RGB blend equation and the alpha
1585 blend equation to a single equation.
1586
1587 These equations use the source and destination blend factors specified
1588 by either `glBlendFunc' or `glBlendFuncSeparate'. See `glBlendFunc' or
1589 `glBlendFuncSeparate' for a description of the various blend factors.
1590
1591 In the equations that follow, source and destination color components
1592 are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) , respectively.
1593 The result color is referred to as (R_R,G_RB_RA_R) . The source and
1594 destination blend factors are denoted (S_R,S_GS_BS_A) and
1595 (D_R,D_GD_BD_A) , respectively. For these equations all color components
1596 are understood to have values in the range [0,1] .
1597
1598 *Mode*
1599 *RGB Components*, *Alpha Component*
1600
1601 `GL_FUNC_ADD'
1602 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 ,
1603 AR=A_S\u2062S_A+A_D\u2062D_A
1604
1605 `GL_FUNC_SUBTRACT'
1606 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 ,
1607 AR=A_S\u2062S_A-A_D\u2062D_A
1608
1609 `GL_FUNC_REVERSE_SUBTRACT'
1610 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 ,
1611 AR=A_D\u2062D_A-A_S\u2062S_A
1612
1613 `GL_MIN'
1614 RR=MIN\u2061(R_S,R_D) GR=MIN\u2061(G_S,G_D) BR=MIN\u2061(B_S,B_D) ,
1615 AR=MIN\u2061(A_S,A_D)
1616
1617 `GL_MAX'
1618 RR=MAX\u2061(R_S,R_D) GR=MAX\u2061(G_S,G_D) BR=MAX\u2061(B_S,B_D) ,
1619 AR=MAX\u2061(A_S,A_D)
1620
1621 The results of these equations are clamped to the range [0,1] .
1622
1623 The `GL_MIN' and `GL_MAX' equations are useful for applications that
1624 analyze image data (image thresholding against a constant color, for
1625 example). The `GL_FUNC_ADD' equation is useful for antialiasing and
1626 transparency, among other things.
1627
1628 Initially, both the RGB blend equation and the alpha blend equation are
1629 set to `GL_FUNC_ADD'.
1630
1631
1632
1633 `GL_INVALID_ENUM' is generated if MODE is not one of `GL_FUNC_ADD',
1634 `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT', `GL_MAX', or `GL_MIN'.
1635
1636 `GL_INVALID_OPERATION' is generated if `glBlendEquation' is executed
1637 between the execution of `glBegin' and the corresponding execution of
1638 `glEnd'.")
1639
1640 (define-gl-procedures
1641 ((glBlendFuncSeparate
1642 (srcRGB GLenum)
1643 (dstRGB GLenum)
1644 (srcAlpha GLenum)
1645 (dstAlpha GLenum)
1646 ->
1647 void))
1648 "Specify pixel arithmetic for RGB and alpha components separately.
1649
1650 SRCRGB
1651 Specifies how the red, green, and blue blending factors are
1652 computed. The following symbolic constants are accepted: `GL_ZERO',
1653 `GL_ONE', `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR',
1654 `GL_ONE_MINUS_DST_COLOR', `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA',
1655 `GL_DST_ALPHA', `GL_ONE_MINUS_DST_ALPHA', `GL_CONSTANT_COLOR',
1656 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA',
1657 `GL_ONE_MINUS_CONSTANT_ALPHA', and `GL_SRC_ALPHA_SATURATE'. The
1658 initial value is `GL_ONE'.
1659
1660 DSTRGB
1661 Specifies how the red, green, and blue destination blending factors
1662 are computed. The following symbolic constants are accepted:
1663 `GL_ZERO', `GL_ONE', `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR',
1664 `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR', `GL_SRC_ALPHA',
1665 `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA', `GL_ONE_MINUS_DST_ALPHA'.
1666 `GL_CONSTANT_COLOR', `GL_ONE_MINUS_CONSTANT_COLOR',
1667 `GL_CONSTANT_ALPHA', and `GL_ONE_MINUS_CONSTANT_ALPHA'. The initial
1668 value is `GL_ZERO'.
1669
1670 SRCALPHA
1671 Specified how the alpha source blending factor is computed. The
1672 same symbolic constants are accepted as for SRCRGB. The initial
1673 value is `GL_ONE'.
1674
1675 DSTALPHA
1676 Specified how the alpha destination blending factor is computed.
1677 The same symbolic constants are accepted as for DSTRGB. The initial
1678 value is `GL_ZERO'.
1679
1680 In RGBA mode, pixels can be drawn using a function that blends the
1681 incoming (source) RGBA values with the RGBA values that are already in
1682 the frame buffer (the destination values). Blending is initially
1683 disabled. Use `glEnable' and `glDisable' with argument `GL_BLEND' to
1684 enable and disable blending.
1685
1686 `glBlendFuncSeparate' defines the operation of blending when it is
1687 enabled. SRCRGB specifies which method is used to scale the source
1688 RGB-color components. DSTRGB specifies which method is used to scale the
1689 destination RGB-color components. Likewise, SRCALPHA specifies which
1690 method is used to scale the source alpha color component, and DSTALPHA
1691 specifies which method is used to scale the destination alpha component.
1692 The possible methods are described in the following table. Each method
1693 defines four scale factors, one each for red, green, blue, and alpha.
1694
1695 In the table and in subsequent equations, source and destination color
1696 components are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) . The
1697 color specified by `glBlendColor' is referred to as (R_C,G_CB_CA_C) .
1698 They are understood to have integer values between 0 and (K_R,K_GK_BK_A)
1699 , where
1700
1701 K_C=2^M_C,-1
1702
1703 and (M_R,M_GM_BM_A) is the number of red, green, blue, and alpha
1704 bitplanes.
1705
1706 Source and destination scale factors are referred to as (S_R,S_GS_BS_A)
1707 and (D_R,D_GD_BD_A) . All scale factors have range [0,1] .
1708
1709
1710
1711 *Parameter*
1712 *RGB Factor*, *Alpha Factor*
1713
1714 `GL_ZERO'
1715 (0,00) , 0
1716
1717 `GL_ONE'
1718 (1,11) , 1
1719
1720 `GL_SRC_COLOR'
1721 (R_S/K_R,G_S/K_GB_S/K_B) , A_S/K_A
1722
1723 `GL_ONE_MINUS_SRC_COLOR'
1724 (1,111)-(R_S/K_R,G_S/K_GB_S/K_B) , 1-A_S/K_A
1725
1726 `GL_DST_COLOR'
1727 (R_D/K_R,G_D/K_GB_D/K_B) , A_D/K_A
1728
1729 `GL_ONE_MINUS_DST_COLOR'
1730 (1,11)-(R_D/K_R,G_D/K_GB_D/K_B) , 1-A_D/K_A
1731
1732 `GL_SRC_ALPHA'
1733 (A_S/K_A,A_S/K_AA_S/K_A) , A_S/K_A
1734
1735 `GL_ONE_MINUS_SRC_ALPHA'
1736 (1,11)-(A_S/K_A,A_S/K_AA_S/K_A) , 1-A_S/K_A
1737
1738 `GL_DST_ALPHA'
1739 (A_D/K_A,A_D/K_AA_D/K_A) , A_D/K_A
1740
1741 `GL_ONE_MINUS_DST_ALPHA'
1742 (1,11)-(A_D/K_A,A_D/K_AA_D/K_A) , 1-A_D/K_A
1743
1744 `GL_CONSTANT_COLOR'
1745 (R_C,G_CB_C) , A_C
1746
1747 `GL_ONE_MINUS_CONSTANT_COLOR'
1748 (1,11)-(R_C,G_CB_C) , 1-A_C
1749
1750 `GL_CONSTANT_ALPHA'
1751 (A_C,A_CA_C) , A_C
1752
1753 `GL_ONE_MINUS_CONSTANT_ALPHA'
1754 (1,11)-(A_C,A_CA_C) , 1-A_C
1755
1756 `GL_SRC_ALPHA_SATURATE'
1757 (I,II) , 1
1758
1759 In the table,
1760
1761 I=MIN\u2061(A_S,1-A_D,)
1762
1763 To determine the blended RGBA values of a pixel when drawing in RGBA
1764 mode, the system uses the following equations:
1765
1766 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)
1767 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)
1768
1769 Despite the apparent precision of the above equations, blending
1770 arithmetic is not exactly specified, because blending operates with
1771 imprecise integer color values. However, a blend factor that should be
1772 equal to 1 is guaranteed not to modify its multiplicand, and a blend
1773 factor equal to 0 reduces its multiplicand to 0. For example, when
1774 SRCRGB is `GL_SRC_ALPHA', DSTRGB is `GL_ONE_MINUS_SRC_ALPHA', and A_S is
1775 equal to K_A , the equations reduce to simple replacement:
1776
1777 R_D=R_S G_D=G_S B_D=B_S A_D=A_S
1778
1779
1780
1781 `GL_INVALID_ENUM' is generated if either SRCRGB or DSTRGB is not an
1782 accepted value.
1783
1784 `GL_INVALID_OPERATION' is generated if `glBlendFuncSeparate' is executed
1785 between the execution of `glBegin' and the corresponding execution of
1786 `glEnd'.")
1787
1788 (define-gl-procedures
1789 ((glBlendFunc
1790 (sfactor GLenum)
1791 (dfactor GLenum)
1792 ->
1793 void))
1794 "Specify pixel arithmetic.
1795
1796 SFACTOR
1797 Specifies how the red, green, blue, and alpha source blending
1798 factors are computed. The following symbolic constants are
1799 accepted: `GL_ZERO', `GL_ONE', `GL_SRC_COLOR',
1800 `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR',
1801 `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA',
1802 `GL_ONE_MINUS_DST_ALPHA', `GL_CONSTANT_COLOR',
1803 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA',
1804 `GL_ONE_MINUS_CONSTANT_ALPHA', and `GL_SRC_ALPHA_SATURATE'. The
1805 initial value is `GL_ONE'.
1806
1807 DFACTOR
1808 Specifies how the red, green, blue, and alpha destination blending
1809 factors are computed. The following symbolic constants are
1810 accepted: `GL_ZERO', `GL_ONE', `GL_SRC_COLOR',
1811 `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR',
1812 `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA',
1813 `GL_ONE_MINUS_DST_ALPHA'. `GL_CONSTANT_COLOR',
1814 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA', and
1815 `GL_ONE_MINUS_CONSTANT_ALPHA'. The initial value is `GL_ZERO'.
1816
1817 In RGBA mode, pixels can be drawn using a function that blends the
1818 incoming (source) RGBA values with the RGBA values that are already in
1819 the frame buffer (the destination values). Blending is initially
1820 disabled. Use `glEnable' and `glDisable' with argument `GL_BLEND' to
1821 enable and disable blending.
1822
1823 `glBlendFunc' defines the operation of blending when it is enabled.
1824 SFACTOR specifies which method is used to scale the source color
1825 components. DFACTOR specifies which method is used to scale the
1826 destination color components. The possible methods are described in the
1827 following table. Each method defines four scale factors, one each for
1828 red, green, blue, and alpha. In the table and in subsequent equations,
1829 source and destination color components are referred to as
1830 (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) . The color specified by
1831 `glBlendColor' is referred to as (R_C,G_CB_CA_C) . They are understood
1832 to have integer values between 0 and (K_R,K_GK_BK_A) , where
1833
1834 K_C=2^M_C,-1
1835
1836 and (M_R,M_GM_BM_A) is the number of red, green, blue, and alpha
1837 bitplanes.
1838
1839 Source and destination scale factors are referred to as (S_R,S_GS_BS_A)
1840 and (D_R,D_GD_BD_A) . The scale factors described in the table, denoted
1841 (F_R,F_GF_BF_A) , represent either source or destination factors. All
1842 scale factors have range [0,1] .
1843
1844
1845
1846 *Parameter*
1847 * (F_R,F_GF_BF_A) *
1848
1849 `GL_ZERO'
1850 (0,000)
1851
1852 `GL_ONE'
1853 (1,111)
1854
1855 `GL_SRC_COLOR'
1856 (R_S/K_R,G_S/K_GB_S/K_BA_S/K_A)
1857
1858 `GL_ONE_MINUS_SRC_COLOR'
1859 (1,111)-(R_S/K_R,G_S/K_GB_S/K_BA_S/K_A)
1860
1861 `GL_DST_COLOR'
1862 (R_D/K_R,G_D/K_GB_D/K_BA_D/K_A)
1863
1864 `GL_ONE_MINUS_DST_COLOR'
1865 (1,111)-(R_D/K_R,G_D/K_GB_D/K_BA_D/K_A)
1866
1867 `GL_SRC_ALPHA'
1868 (A_S/K_A,A_S/K_AA_S/K_AA_S/K_A)
1869
1870 `GL_ONE_MINUS_SRC_ALPHA'
1871 (1,111)-(A_S/K_A,A_S/K_AA_S/K_AA_S/K_A)
1872
1873 `GL_DST_ALPHA'
1874 (A_D/K_A,A_D/K_AA_D/K_AA_D/K_A)
1875
1876 `GL_ONE_MINUS_DST_ALPHA'
1877 (1,111)-(A_D/K_A,A_D/K_AA_D/K_AA_D/K_A)
1878
1879 `GL_CONSTANT_COLOR'
1880 (R_C,G_CB_CA_C)
1881
1882 `GL_ONE_MINUS_CONSTANT_COLOR'
1883 (1,111)-(R_C,G_CB_CA_C)
1884
1885 `GL_CONSTANT_ALPHA'
1886 (A_C,A_CA_CA_C)
1887
1888 `GL_ONE_MINUS_CONSTANT_ALPHA'
1889 (1,111)-(A_C,A_CA_CA_C)
1890
1891 `GL_SRC_ALPHA_SATURATE'
1892 (I,II1)
1893
1894 In the table,
1895
1896 I=MIN\u2061(A_S,K_A-A_D)/K_A
1897
1898 To determine the blended RGBA values of a pixel when drawing in RGBA
1899 mode, the system uses the following equations:
1900
1901 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)
1902 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)
1903
1904 Despite the apparent precision of the above equations, blending
1905 arithmetic is not exactly specified, because blending operates with
1906 imprecise integer color values. However, a blend factor that should be
1907 equal to 1 is guaranteed not to modify its multiplicand, and a blend
1908 factor equal to 0 reduces its multiplicand to 0. For example, when
1909 SFACTOR is `GL_SRC_ALPHA', DFACTOR is `GL_ONE_MINUS_SRC_ALPHA', and A_S
1910 is equal to K_A , the equations reduce to simple replacement:
1911
1912 R_D=R_S G_D=G_S B_D=B_S A_D=A_S
1913
1914
1915
1916 `GL_INVALID_ENUM' is generated if either SFACTOR or DFACTOR is not an
1917 accepted value.
1918
1919 `GL_INVALID_OPERATION' is generated if `glBlendFunc' is executed between
1920 the execution of `glBegin' and the corresponding execution of `glEnd'.")
1921
1922 (define-gl-procedures
1923 ((glBufferData
1924 (target GLenum)
1925 (size GLsizeiptr)
1926 (data const-GLvoid-*)
1927 (usage GLenum)
1928 ->
1929 void))
1930 "Creates and initializes a buffer object's data store.
1931
1932 TARGET
1933 Specifies the target buffer object. The symbolic constant must be
1934 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
1935 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
1936
1937 SIZE
1938 Specifies the size in bytes of the buffer object's new data store.
1939
1940 DATA
1941 Specifies a pointer to data that will be copied into the data store
1942 for initialization, or `NULL' if no data is to be copied.
1943
1944 USAGE
1945 Specifies the expected usage pattern of the data store. The
1946 symbolic constant must be `GL_STREAM_DRAW', `GL_STREAM_READ',
1947 `GL_STREAM_COPY', `GL_STATIC_DRAW', `GL_STATIC_READ',
1948 `GL_STATIC_COPY', `GL_DYNAMIC_DRAW', `GL_DYNAMIC_READ', or
1949 `GL_DYNAMIC_COPY'.
1950
1951 `glBufferData' creates a new data store for the buffer object currently
1952 bound to TARGET. Any pre-existing data store is deleted. The new data
1953 store is created with the specified SIZE in bytes and USAGE. If DATA is
1954 not `NULL', the data store is initialized with data from this pointer.
1955 In its initial state, the new data store is not mapped, it has a `NULL'
1956 mapped pointer, and its mapped access is `GL_READ_WRITE'.
1957
1958 USAGE is a hint to the GL implementation as to how a buffer object's
1959 data store will be accessed. This enables the GL implementation to make
1960 more intelligent decisions that may significantly impact buffer object
1961 performance. It does not, however, constrain the actual usage of the
1962 data store. USAGE can be broken down into two parts: first, the
1963 frequency of access (modification and usage), and second, the nature of
1964 that access. The frequency of access may be one of these:
1965
1966 STREAM
1967 The data store contents will be modified once and used at most a
1968 few times.
1969
1970 STATIC
1971 The data store contents will be modified once and used many times.
1972
1973 DYNAMIC
1974 The data store contents will be modified repeatedly and used many
1975 times.
1976
1977 The nature of access may be one of these:
1978
1979 DRAW
1980 The data store contents are modified by the application, and used
1981 as the source for GL drawing and image specification commands.
1982
1983 READ
1984 The data store contents are modified by reading data from the GL,
1985 and used to return that data when queried by the application.
1986
1987 COPY
1988 The data store contents are modified by reading data from the GL,
1989 and used as the source for GL drawing and image specification
1990 commands.
1991
1992 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
1993 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
1994 `GL_PIXEL_UNPACK_BUFFER'.
1995
1996 `GL_INVALID_ENUM' is generated if USAGE is not `GL_STREAM_DRAW',
1997 `GL_STREAM_READ', `GL_STREAM_COPY', `GL_STATIC_DRAW', `GL_STATIC_READ',
1998 `GL_STATIC_COPY', `GL_DYNAMIC_DRAW', `GL_DYNAMIC_READ', or
1999 `GL_DYNAMIC_COPY'.
2000
2001 `GL_INVALID_VALUE' is generated if SIZE is negative.
2002
2003 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
2004 is bound to TARGET.
2005
2006 `GL_OUT_OF_MEMORY' is generated if the GL is unable to create a data
2007 store with the specified SIZE.
2008
2009 `GL_INVALID_OPERATION' is generated if `glBufferData' is executed
2010 between the execution of `glBegin' and the corresponding execution of
2011 `glEnd'.")
2012
2013 (define-gl-procedures
2014 ((glBufferSubData
2015 (target GLenum)
2016 (offset GLintptr)
2017 (size GLsizeiptr)
2018 (data const-GLvoid-*)
2019 ->
2020 void))
2021 "Updates a subset of a buffer object's data store.
2022
2023 TARGET
2024 Specifies the target buffer object. The symbolic constant must be
2025 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
2026 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
2027
2028 OFFSET
2029 Specifies the offset into the buffer object's data store where data
2030 replacement will begin, measured in bytes.
2031
2032 SIZE
2033 Specifies the size in bytes of the data store region being
2034 replaced.
2035
2036 DATA
2037 Specifies a pointer to the new data that will be copied into the
2038 data store.
2039
2040 `glBufferSubData' redefines some or all of the data store for the buffer
2041 object currently bound to TARGET. Data starting at byte offset OFFSET
2042 and extending for SIZE bytes is copied to the data store from the memory
2043 pointed to by DATA. An error is thrown if OFFSET and SIZE together
2044 define a range beyond the bounds of the buffer object's data store.
2045
2046 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
2047 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
2048 `GL_PIXEL_UNPACK_BUFFER'.
2049
2050 `GL_INVALID_VALUE' is generated if OFFSET or SIZE is negative, or if
2051 together they define a region of memory that extends beyond the buffer
2052 object's allocated data store.
2053
2054 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
2055 is bound to TARGET.
2056
2057 `GL_INVALID_OPERATION' is generated if the buffer object being updated
2058 is mapped.
2059
2060 `GL_INVALID_OPERATION' is generated if `glBufferSubData' is executed
2061 between the execution of `glBegin' and the corresponding execution of
2062 `glEnd'.")
2063
2064 (define-gl-procedures
2065 ((glCallLists
2066 (n GLsizei)
2067 (type GLenum)
2068 (lists const-GLvoid-*)
2069 ->
2070 void))
2071 "Execute a list of display lists.
2072
2073 N
2074 Specifies the number of display lists to be executed.
2075
2076 TYPE
2077 Specifies the type of values in LISTS. Symbolic constants
2078 `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_UNSIGNED_SHORT',
2079 `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', `GL_2_BYTES',
2080 `GL_3_BYTES', and `GL_4_BYTES' are accepted.
2081
2082 LISTS
2083 Specifies the address of an array of name offsets in the display
2084 list. The pointer type is void because the offsets can be bytes,
2085 shorts, ints, or floats, depending on the value of TYPE.
2086
2087 `glCallLists' causes each display list in the list of names passed as
2088 LISTS to be executed. As a result, the commands saved in each display
2089 list are executed in order, just as if they were called without using a
2090 display list. Names of display lists that have not been defined are
2091 ignored.
2092
2093 `glCallLists' provides an efficient means for executing more than one
2094 display list. TYPE allows lists with various name formats to be
2095 accepted. The formats are as follows:
2096
2097 `GL_BYTE'
2098 LISTS is treated as an array of signed bytes, each in the range
2099 -128 through 127.
2100
2101 `GL_UNSIGNED_BYTE'
2102 LISTS is treated as an array of unsigned bytes, each in the range 0
2103 through 255.
2104
2105 `GL_SHORT'
2106 LISTS is treated as an array of signed two-byte integers, each in
2107 the range -32768 through 32767.
2108
2109 `GL_UNSIGNED_SHORT'
2110 LISTS is treated as an array of unsigned two-byte integers, each in
2111 the range 0 through 65535.
2112
2113 `GL_INT'
2114 LISTS is treated as an array of signed four-byte integers.
2115
2116 `GL_UNSIGNED_INT'
2117 LISTS is treated as an array of unsigned four-byte integers.
2118
2119 `GL_FLOAT'
2120 LISTS is treated as an array of four-byte floating-point values.
2121
2122 `GL_2_BYTES'
2123 LISTS is treated as an array of unsigned bytes. Each pair of bytes
2124 specifies a single display-list name. The value of the pair is
2125 computed as 256 times the unsigned value of the first byte plus the
2126 unsigned value of the second byte.
2127
2128 `GL_3_BYTES'
2129 LISTS is treated as an array of unsigned bytes. Each triplet of
2130 bytes specifies a single display-list name. The value of the
2131 triplet is computed as 65536 times the unsigned value of the first
2132 byte, plus 256 times the unsigned value of the second byte, plus
2133 the unsigned value of the third byte.
2134
2135 `GL_4_BYTES'
2136 LISTS is treated as an array of unsigned bytes. Each quadruplet of
2137 bytes specifies a single display-list name. The value of the
2138 quadruplet is computed as 16777216 times the unsigned value of the
2139 first byte, plus 65536 times the unsigned value of the second byte,
2140 plus 256 times the unsigned value of the third byte, plus the
2141 unsigned value of the fourth byte.
2142
2143 The list of display-list names is not null-terminated. Rather, N
2144 specifies how many names are to be taken from LISTS.
2145
2146 An additional level of indirection is made available with the
2147 `glListBase' command, which specifies an unsigned offset that is added
2148 to each display-list name specified in LISTS before that display list is
2149 executed.
2150
2151 `glCallLists' can appear inside a display list. To avoid the possibility
2152 of infinite recursion resulting from display lists calling one another,
2153 a limit is placed on the nesting level of display lists during
2154 display-list execution. This limit must be at least 64, and it depends
2155 on the implementation.
2156
2157 GL state is not saved and restored across a call to `glCallLists'. Thus,
2158 changes made to GL state during the execution of the display lists
2159 remain after execution is completed. Use `glPushAttrib', `glPopAttrib',
2160 `glPushMatrix', and `glPopMatrix' to preserve GL state across
2161 `glCallLists' calls.
2162
2163 `GL_INVALID_VALUE' is generated if N is negative.
2164
2165 `GL_INVALID_ENUM' is generated if TYPE is not one of `GL_BYTE',
2166 `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_UNSIGNED_SHORT', `GL_INT',
2167 `GL_UNSIGNED_INT', `GL_FLOAT', `GL_2_BYTES', `GL_3_BYTES', `GL_4_BYTES'.")
2168
2169 (define-gl-procedures
2170 ((glCallList (list GLuint) -> void))
2171 "Execute a display list.
2172
2173 LIST
2174 Specifies the integer name of the display list to be executed.
2175
2176 `glCallList' causes the named display list to be executed. The commands
2177 saved in the display list are executed in order, just as if they were
2178 called without using a display list. If LIST has not been defined as a
2179 display list, `glCallList' is ignored.
2180
2181 `glCallList' can appear inside a display list. To avoid the possibility
2182 of infinite recursion resulting from display lists calling one another,
2183 a limit is placed on the nesting level of display lists during
2184 display-list execution. This limit is at least 64, and it depends on the
2185 implementation.
2186
2187 GL state is not saved and restored across a call to `glCallList'. Thus,
2188 changes made to GL state during the execution of a display list remain
2189 after execution of the display list is completed. Use `glPushAttrib',
2190 `glPopAttrib', `glPushMatrix', and `glPopMatrix' to preserve GL state
2191 across `glCallList' calls.")
2192
2193 (define-gl-procedures
2194 ((glClearAccum
2195 (red GLfloat)
2196 (green GLfloat)
2197 (blue GLfloat)
2198 (alpha GLfloat)
2199 ->
2200 void))
2201 "Specify clear values for the accumulation buffer.
2202
2203 RED
2204 GREEN
2205
2206 BLUE
2207
2208 ALPHA
2209
2210 Specify the red, green, blue, and alpha values used when the
2211 accumulation buffer is cleared. The initial values are all 0.
2212
2213 `glClearAccum' specifies the red, green, blue, and alpha values used by
2214 `glClear' to clear the accumulation buffer.
2215
2216 Values specified by `glClearAccum' are clamped to the range [-1,1] .
2217
2218 `GL_INVALID_OPERATION' is generated if `glClearAccum' is executed
2219 between the execution of `glBegin' and the corresponding execution of
2220 `glEnd'.")
2221
2222 (define-gl-procedures
2223 ((glClearColor
2224 (red GLclampf)
2225 (green GLclampf)
2226 (blue GLclampf)
2227 (alpha GLclampf)
2228 ->
2229 void))
2230 "Specify clear values for the color buffers.
2231
2232 RED
2233 GREEN
2234
2235 BLUE
2236
2237 ALPHA
2238
2239 Specify the red, green, blue, and alpha values used when the color
2240 buffers are cleared. The initial values are all 0.
2241
2242 `glClearColor' specifies the red, green, blue, and alpha values used by
2243 `glClear' to clear the color buffers. Values specified by `glClearColor'
2244 are clamped to the range [0,1] .
2245
2246 `GL_INVALID_OPERATION' is generated if `glClearColor' is executed
2247 between the execution of `glBegin' and the corresponding execution of
2248 `glEnd'.")
2249
2250 (define-gl-procedures
2251 ((glClearDepth (depth GLclampd) -> void))
2252 "Specify the clear value for the depth buffer.
2253
2254 DEPTH
2255 Specifies the depth value used when the depth buffer is cleared.
2256 The initial value is 1.
2257
2258 `glClearDepth' specifies the depth value used by `glClear' to clear the
2259 depth buffer. Values specified by `glClearDepth' are clamped to the
2260 range [0,1] .
2261
2262 `GL_INVALID_OPERATION' is generated if `glClearDepth' is executed
2263 between the execution of `glBegin' and the corresponding execution of
2264 `glEnd'.")
2265
2266 (define-gl-procedures
2267 ((glClearIndex (c GLfloat) -> void))
2268 "Specify the clear value for the color index buffers.
2269
2270 C
2271 Specifies the index used when the color index buffers are cleared.
2272 The initial value is 0.
2273
2274 `glClearIndex' specifies the index used by `glClear' to clear the color
2275 index buffers. C is not clamped. Rather, C is converted to a fixed-point
2276 value with unspecified precision to the right of the binary point. The
2277 integer part of this value is then masked with 2^M-1 , where M is the
2278 number of bits in a color index stored in the frame buffer.
2279
2280 `GL_INVALID_OPERATION' is generated if `glClearIndex' is executed
2281 between the execution of `glBegin' and the corresponding execution of
2282 `glEnd'.")
2283
2284 (define-gl-procedures
2285 ((glClearStencil (s GLint) -> void))
2286 "Specify the clear value for the stencil buffer.
2287
2288 S
2289 Specifies the index used when the stencil buffer is cleared. The
2290 initial value is 0.
2291
2292 `glClearStencil' specifies the index used by `glClear' to clear the
2293 stencil buffer. S is masked with 2^M-1 , where M is the number of bits
2294 in the stencil buffer.
2295
2296 `GL_INVALID_OPERATION' is generated if `glClearStencil' is executed
2297 between the execution of `glBegin' and the corresponding execution of
2298 `glEnd'.")
2299
2300 (define-gl-procedures
2301 ((glClear (mask GLbitfield) -> void))
2302 "Clear buffers to preset values.
2303
2304 MASK
2305 Bitwise OR of masks that indicate the buffers to be cleared. The
2306 four masks are `GL_COLOR_BUFFER_BIT', `GL_DEPTH_BUFFER_BIT',
2307 `GL_ACCUM_BUFFER_BIT', and `GL_STENCIL_BUFFER_BIT'.
2308
2309 `glClear' sets the bitplane area of the window to values previously
2310 selected by `glClearColor', `glClearIndex', `glClearDepth',
2311 `glClearStencil', and `glClearAccum'. Multiple color buffers can be
2312 cleared simultaneously by selecting more than one buffer at a time using
2313 `glDrawBuffer'.
2314
2315 The pixel ownership test, the scissor test, dithering, and the buffer
2316 writemasks affect the operation of `glClear'. The scissor box bounds the
2317 cleared region. Alpha function, blend function, logical operation,
2318 stenciling, texture mapping, and depth-buffering are ignored by
2319 `glClear'.
2320
2321 `glClear' takes a single argument that is the bitwise OR of several
2322 values indicating which buffer is to be cleared.
2323
2324 The values are as follows:
2325
2326 `GL_COLOR_BUFFER_BIT'
2327 Indicates the buffers currently enabled for color writing.
2328
2329 `GL_DEPTH_BUFFER_BIT'
2330 Indicates the depth buffer.
2331
2332 `GL_ACCUM_BUFFER_BIT'
2333 Indicates the accumulation buffer.
2334
2335 `GL_STENCIL_BUFFER_BIT'
2336 Indicates the stencil buffer.
2337
2338 The value to which each buffer is cleared depends on the setting of the
2339 clear value for that buffer.
2340
2341 `GL_INVALID_VALUE' is generated if any bit other than the four defined
2342 bits is set in MASK.
2343
2344 `GL_INVALID_OPERATION' is generated if `glClear' is executed between the
2345 execution of `glBegin' and the corresponding execution of `glEnd'.")
2346
2347 (define-gl-procedures
2348 ((glClientActiveTexture (texture GLenum) -> void))
2349 "Select active texture unit.
2350
2351 TEXTURE
2352 Specifies which texture unit to make active. The number of texture
2353 units is implementation dependent, but must be at least two.
2354 TEXTURE must be one of `GL_TEXTURE' I , where i ranges from 0 to
2355 the value of `GL_MAX_TEXTURE_COORDS' - 1, which is an
2356 implementation-dependent value. The initial value is `GL_TEXTURE0'.
2357
2358 `glClientActiveTexture' selects the vertex array client state parameters
2359 to be modified by `glTexCoordPointer', and enabled or disabled with
2360 `glEnableClientState' or `glDisableClientState', respectively, when
2361 called with a parameter of `GL_TEXTURE_COORD_ARRAY'.
2362
2363 `GL_INVALID_ENUM' is generated if TEXTURE is not one of `GL_TEXTURE'I ,
2364 where i ranges from 0 to the value of `GL_MAX_TEXTURE_COORDS' - 1.")
2365
2366 (define-gl-procedures
2367 ((glClipPlane
2368 (plane GLenum)
2369 (equation const-GLdouble-*)
2370 ->
2371 void))
2372 "Specify a plane against which all geometry is clipped.
2373
2374 PLANE
2375 Specifies which clipping plane is being positioned. Symbolic names
2376 of the form `GL_CLIP_PLANE'I, where I is an integer between 0 and
2377 `GL_MAX_CLIP_PLANES' -1 , are accepted.
2378
2379 EQUATION
2380 Specifies the address of an array of four double-precision
2381 floating-point values. These values are interpreted as a plane
2382 equation.
2383
2384 Geometry is always clipped against the boundaries of a six-plane frustum
2385 in X, Y, and Z. `glClipPlane' allows the specification of additional
2386 planes, not necessarily perpendicular to the X, Y, or Z axis, against
2387 which all geometry is clipped. To determine the maximum number of
2388 additional clipping planes, call `glGetIntegerv' with argument
2389 `GL_MAX_CLIP_PLANES'. All implementations support at least six such
2390 clipping planes. Because the resulting clipping region is the
2391 intersection of the defined half-spaces, it is always convex.
2392
2393 `glClipPlane' specifies a half-space using a four-component plane
2394 equation. When `glClipPlane' is called, EQUATION is transformed by the
2395 inverse of the modelview matrix and stored in the resulting eye
2396 coordinates. Subsequent changes to the modelview matrix have no effect
2397 on the stored plane-equation components. If the dot product of the eye
2398 coordinates of a vertex with the stored plane equation components is
2399 positive or zero, the vertex is IN with respect to that clipping plane.
2400 Otherwise, it is OUT.
2401
2402 To enable and disable clipping planes, call `glEnable' and `glDisable'
2403 with the argument `GL_CLIP_PLANE'I, where I is the plane number.
2404
2405 All clipping planes are initially defined as (0, 0, 0, 0) in eye
2406 coordinates and are disabled.
2407
2408 `GL_INVALID_ENUM' is generated if PLANE is not an accepted value.
2409
2410 `GL_INVALID_OPERATION' is generated if `glClipPlane' is executed between
2411 the execution of `glBegin' and the corresponding execution of `glEnd'.")
2412
2413 (define-gl-procedures
2414 ((glColorMask
2415 (red GLboolean)
2416 (green GLboolean)
2417 (blue GLboolean)
2418 (alpha GLboolean)
2419 ->
2420 void))
2421 "Enable and disable writing of frame buffer color components.
2422
2423 RED
2424 GREEN
2425
2426 BLUE
2427
2428 ALPHA
2429
2430 Specify whether red, green, blue, and alpha can or cannot be
2431 written into the frame buffer. The initial values are all
2432 `GL_TRUE', indicating that the color components can be written.
2433
2434 `glColorMask' specifies whether the individual color components in the
2435 frame buffer can or cannot be written. If RED is `GL_FALSE', for
2436 example, no change is made to the red component of any pixel in any of
2437 the color buffers, regardless of the drawing operation attempted.
2438
2439 Changes to individual bits of components cannot be controlled. Rather,
2440 changes are either enabled or disabled for entire color components.
2441
2442 `GL_INVALID_OPERATION' is generated if `glColorMask' is executed between
2443 the execution of `glBegin' and the corresponding execution of `glEnd'.")
2444
2445 (define-gl-procedures
2446 ((glColorMaterial
2447 (face GLenum)
2448 (mode GLenum)
2449 ->
2450 void))
2451 "Cause a material color to track the current color.
2452
2453 FACE
2454 Specifies whether front, back, or both front and back material
2455 parameters should track the current color. Accepted values are
2456 `GL_FRONT', `GL_BACK', and `GL_FRONT_AND_BACK'. The initial value
2457 is `GL_FRONT_AND_BACK'.
2458
2459 MODE
2460 Specifies which of several material parameters track the current
2461 color. Accepted values are `GL_EMISSION', `GL_AMBIENT',
2462 `GL_DIFFUSE', `GL_SPECULAR', and `GL_AMBIENT_AND_DIFFUSE'. The
2463 initial value is `GL_AMBIENT_AND_DIFFUSE'.
2464
2465 `glColorMaterial' specifies which material parameters track the current
2466 color. When `GL_COLOR_MATERIAL' is enabled, the material parameter or
2467 parameters specified by MODE, of the material or materials specified by
2468 FACE, track the current color at all times.
2469
2470 To enable and disable `GL_COLOR_MATERIAL', call `glEnable' and
2471 `glDisable' with argument `GL_COLOR_MATERIAL'. `GL_COLOR_MATERIAL' is
2472 initially disabled.
2473
2474 `GL_INVALID_ENUM' is generated if FACE or MODE is not an accepted value.
2475
2476 `GL_INVALID_OPERATION' is generated if `glColorMaterial' is executed
2477 between the execution of `glBegin' and the corresponding execution of
2478 `glEnd'.")
2479
2480 (define-gl-procedures
2481 ((glColorPointer
2482 (size GLint)
2483 (type GLenum)
2484 (stride GLsizei)
2485 (pointer const-GLvoid-*)
2486 ->
2487 void))
2488 "Define an array of colors.
2489
2490 SIZE
2491 Specifies the number of components per color. Must be 3 or 4. The
2492 initial value is 4.
2493
2494 TYPE
2495 Specifies the data type of each color component in the array.
2496 Symbolic constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
2497 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', and
2498 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
2499
2500 STRIDE
2501 Specifies the byte offset between consecutive colors. If STRIDE is
2502 0, the colors are understood to be tightly packed in the array. The
2503 initial value is 0.
2504
2505 POINTER
2506 Specifies a pointer to the first component of the first color
2507 element in the array. The initial value is 0.
2508
2509 `glColorPointer' specifies the location and data format of an array of
2510 color components to use when rendering. SIZE specifies the number of
2511 components per color, and must be 3 or 4. TYPE specifies the data type
2512 of each color component, and STRIDE specifies the byte stride from one
2513 color to the next, allowing vertices and attributes to be packed into a
2514 single array or stored in separate arrays. (Single-array storage may be
2515 more efficient on some implementations; see `glInterleavedArrays'.)
2516
2517 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
2518 target (see `glBindBuffer') while a color array is specified, POINTER is
2519 treated as a byte offset into the buffer object's data store. Also, the
2520 buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as color
2521 vertex array client-side state (`GL_COLOR_ARRAY_BUFFER_BINDING').
2522
2523 When a color array is specified, SIZE, TYPE, STRIDE, and POINTER are
2524 saved as client-side state, in addition to the current vertex array
2525 buffer object binding.
2526
2527 To enable and disable the color array, call `glEnableClientState' and
2528 `glDisableClientState' with the argument `GL_COLOR_ARRAY'. If enabled,
2529 the color array is used when `glDrawArrays', `glMultiDrawArrays',
2530 `glDrawElements', `glMultiDrawElements', `glDrawRangeElements', or
2531 `glArrayElement' is called.
2532
2533 `GL_INVALID_VALUE' is generated if SIZE is not 3 or 4.
2534
2535 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
2536
2537 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
2538
2539 (define-gl-procedures
2540 ((glColorSubTable
2541 (target GLenum)
2542 (start GLsizei)
2543 (count GLsizei)
2544 (format GLenum)
2545 (type GLenum)
2546 (data const-GLvoid-*)
2547 ->
2548 void))
2549 "Respecify a portion of a color table.
2550
2551 TARGET
2552 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
2553 or `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2554
2555 START
2556 The starting index of the portion of the color table to be
2557 replaced.
2558
2559 COUNT
2560 The number of table entries to replace.
2561
2562 FORMAT
2563 The format of the pixel data in DATA. The allowable values are
2564 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
2565 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
2566
2567 TYPE
2568 The type of the pixel data in DATA. The allowable values are
2569 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
2570 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
2571 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
2572 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
2573 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
2574 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
2575 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
2576 `GL_UNSIGNED_INT_2_10_10_10_REV'.
2577
2578 DATA
2579 Pointer to a one-dimensional array of pixel data that is processed
2580 to replace the specified region of the color table.
2581
2582 `glColorSubTable' is used to respecify a contiguous portion of a color
2583 table previously defined using `glColorTable'. The pixels referenced by
2584 DATA replace the portion of the existing table from indices START to
2585 START+COUNT-1 , inclusive. This region may not include any entries
2586 outside the range of the color table as it was originally specified. It
2587 is not an error to specify a subtexture with width of 0, but such a
2588 specification has no effect.
2589
2590 If a non-zero named buffer object is bound to the
2591 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a portion of
2592 a color table is respecified, DATA is treated as a byte offset into the
2593 buffer object's data store.
2594
2595 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
2596 values.
2597
2598 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
2599 values.
2600
2601 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
2602 values.
2603
2604 `GL_INVALID_VALUE' is generated if START+COUNT>WIDTH .
2605
2606 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2607 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
2608 data store is currently mapped.
2609
2610 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2611 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
2612 unpacked from the buffer object such that the memory reads required
2613 would exceed the data store size.
2614
2615 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2616 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
2617 divisible into the number of bytes needed to store in memory a datum
2618 indicated by TYPE.
2619
2620 `GL_INVALID_OPERATION' is generated if `glColorSubTable' is executed
2621 between the execution of `glBegin' and the corresponding execution of
2622 `glEnd'.")
2623
2624 (define-gl-procedures
2625 ((glColorTableParameterfv
2626 (target GLenum)
2627 (pname GLenum)
2628 (params const-GLfloat-*)
2629 ->
2630 void)
2631 (glColorTableParameteriv
2632 (target GLenum)
2633 (pname GLenum)
2634 (params const-GLint-*)
2635 ->
2636 void))
2637 "Set color lookup table parameters.
2638
2639 TARGET
2640 The target color table. Must be `GL_COLOR_TABLE',
2641 `GL_POST_CONVOLUTION_COLOR_TABLE', or
2642 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2643
2644 PNAME
2645 The symbolic name of a texture color lookup table parameter. Must
2646 be one of `GL_COLOR_TABLE_SCALE' or `GL_COLOR_TABLE_BIAS'.
2647
2648 PARAMS
2649 A pointer to an array where the values of the parameters are
2650 stored.
2651
2652 `glColorTableParameter' is used to specify the scale factors and bias
2653 terms applied to color components when they are loaded into a color
2654 table. TARGET indicates which color table the scale and bias terms apply
2655 to; it must be set to `GL_COLOR_TABLE',
2656 `GL_POST_CONVOLUTION_COLOR_TABLE', or
2657 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2658
2659 PNAME must be `GL_COLOR_TABLE_SCALE' to set the scale factors. In this
2660 case, PARAMS points to an array of four values, which are the scale
2661 factors for red, green, blue, and alpha, in that order.
2662
2663 PNAME must be `GL_COLOR_TABLE_BIAS' to set the bias terms. In this case,
2664 PARAMS points to an array of four values, which are the bias terms for
2665 red, green, blue, and alpha, in that order.
2666
2667 The color tables themselves are specified by calling `glColorTable'.
2668
2669 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an acceptable
2670 value.
2671
2672 `GL_INVALID_OPERATION' is generated if `glColorTableParameter' is
2673 executed between the execution of `glBegin' and the corresponding
2674 execution of `glEnd'.")
2675
2676 (define-gl-procedures
2677 ((glColorTable
2678 (target GLenum)
2679 (internalformat GLenum)
2680 (width GLsizei)
2681 (format GLenum)
2682 (type GLenum)
2683 (data const-GLvoid-*)
2684 ->
2685 void))
2686 "Define a color lookup table.
2687
2688 TARGET
2689 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
2690 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `GL_PROXY_COLOR_TABLE',
2691 `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
2692 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
2693
2694 INTERNALFORMAT
2695 The internal format of the color table. The allowable values are
2696 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
2697 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
2698 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
2699 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
2700 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
2701 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
2702 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
2703 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
2704 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
2705 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', and `GL_RGBA16'.
2706
2707 WIDTH
2708 The number of entries in the color lookup table specified by DATA.
2709
2710 FORMAT
2711 The format of the pixel data in DATA. The allowable values are
2712 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
2713 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
2714
2715 TYPE
2716 The type of the pixel data in DATA. The allowable values are
2717 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
2718 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
2719 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
2720 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
2721 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
2722 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
2723 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
2724 `GL_UNSIGNED_INT_2_10_10_10_REV'.
2725
2726 DATA
2727 Pointer to a one-dimensional array of pixel data that is processed
2728 to build the color table.
2729
2730 `glColorTable' may be used in two ways: to test the actual size and
2731 color resolution of a lookup table given a particular set of parameters,
2732 or to load the contents of a color lookup table. Use the targets
2733 `GL_PROXY_*' for the first case and the other targets for the second
2734 case.
2735
2736 If a non-zero named buffer object is bound to the
2737 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a color table
2738 is specified, DATA is treated as a byte offset into the buffer object's
2739 data store.
2740
2741 If TARGET is `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
2742 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `glColorTable' builds a color lookup
2743 table from an array of pixels. The pixel array specified by WIDTH,
2744 FORMAT, TYPE, and DATA is extracted from memory and processed just as if
2745 `glDrawPixels' were called, but processing stops after the final
2746 expansion to RGBA is completed.
2747
2748 The four scale parameters and the four bias parameters that are defined
2749 for the table are then used to scale and bias the R, G, B, and A
2750 components of each pixel. (Use `glColorTableParameter' to set these
2751 scale and bias parameters.)
2752
2753 Next, the R, G, B, and A values are clamped to the range [0,1] . Each
2754 pixel is then converted to the internal format specified by
2755 INTERNALFORMAT. This conversion simply maps the component values of the
2756 pixel (R, G, B, and A) to the values included in the internal format
2757 (red, green, blue, alpha, luminance, and intensity). The mapping is as
2758 follows:
2759
2760
2761
2762 *Internal Format*
2763 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
2764
2765 `GL_ALPHA'
2766 , , , A , ,
2767
2768 `GL_LUMINANCE'
2769 , , , , R ,
2770
2771 `GL_LUMINANCE_ALPHA'
2772 , , , A , R ,
2773
2774 `GL_INTENSITY'
2775 , , , , , R
2776
2777 `GL_RGB'
2778 R , G , B , , ,
2779
2780 `GL_RGBA'
2781 R , G , B , A , ,
2782
2783 Finally, the red, green, blue, alpha, luminance, and/or intensity
2784 components of the resulting pixels are stored in the color table. They
2785 form a one-dimensional table with indices in the range [0,WIDTH-1] .
2786
2787 If TARGET is `GL_PROXY_*', `glColorTable' recomputes and stores the
2788 values of the proxy color table's state variables
2789 `GL_COLOR_TABLE_FORMAT', `GL_COLOR_TABLE_WIDTH',
2790 `GL_COLOR_TABLE_RED_SIZE', `GL_COLOR_TABLE_GREEN_SIZE',
2791 `GL_COLOR_TABLE_BLUE_SIZE', `GL_COLOR_TABLE_ALPHA_SIZE',
2792 `GL_COLOR_TABLE_LUMINANCE_SIZE', and `GL_COLOR_TABLE_INTENSITY_SIZE'.
2793 There is no effect on the image or state of any actual color table. If
2794 the specified color table is too large to be supported, then all the
2795 proxy state variables listed above are set to zero. Otherwise, the color
2796 table could be supported by `glColorTable' using the corresponding
2797 non-proxy target, and the proxy state variables are set as if that
2798 target were being defined.
2799
2800 The proxy state variables can be retrieved by calling
2801 `glGetColorTableParameter' with a target of `GL_PROXY_*'. This allows
2802 the application to decide if a particular `glColorTable' command would
2803 succeed, and to determine what the resulting color table attributes
2804 would be.
2805
2806 If a color table is enabled, and its width is non-zero, then its
2807 contents are used to replace a subset of the components of each RGBA
2808 pixel group, based on the internal format of the table.
2809
2810 Each pixel group has color components (R, G, B, A) that are in the range
2811 [0.0,1.0] . The color components are rescaled to the size of the color
2812 lookup table to form an index. Then a subset of the components based on
2813 the internal format of the table are replaced by the table entry
2814 selected by that index. If the color components and contents of the
2815 table are represented as follows:
2816
2817
2818
2819 *Representation*
2820 *Meaning*
2821
2822 `r'
2823 Table index computed from `R'
2824
2825 `g'
2826 Table index computed from `G'
2827
2828 `b'
2829 Table index computed from `B'
2830
2831 `a'
2832 Table index computed from `A'
2833
2834 `L[i]'
2835 Luminance value at table index `i'
2836
2837 `I[i]'
2838 Intensity value at table index `i'
2839
2840 `R[i]'
2841 Red value at table index `i'
2842
2843 `G[i]'
2844 Green value at table index `i'
2845
2846 `B[i]'
2847 Blue value at table index `i'
2848
2849 `A[i]'
2850 Alpha value at table index `i'
2851
2852 then the result of color table lookup is as follows:
2853
2854
2855
2856 **
2857 *Resulting Texture Components*
2858
2859 *Table Internal Format*
2860 *R*, *G*, *B*, *A*
2861
2862 `GL_ALPHA'
2863 `R', `G', `B', `A[a]'
2864
2865 `GL_LUMINANCE'
2866 `L[r]', `L[g]', `L[b]', `At'
2867
2868 `GL_LUMINANCE_ALPHA'
2869 `L[r]', `L[g]', `L[b]', `A[a]'
2870
2871 `GL_INTENSITY'
2872 `I[r]', `I[g]', `I[b]', `I[a]'
2873
2874 `GL_RGB'
2875 `R[r]', `G[g]', `B[b]', `A'
2876
2877 `GL_RGBA'
2878 `R[r]', `G[g]', `B[b]', `A[a]'
2879
2880 When `GL_COLOR_TABLE' is enabled, the colors resulting from the pixel
2881 map operation (if it is enabled) are mapped by the color lookup table
2882 before being passed to the convolution operation. The colors resulting
2883 from the convolution operation are modified by the post convolution
2884 color lookup table when `GL_POST_CONVOLUTION_COLOR_TABLE' is enabled.
2885 These modified colors are then sent to the color matrix operation.
2886 Finally, if `GL_POST_COLOR_MATRIX_COLOR_TABLE' is enabled, the colors
2887 resulting from the color matrix operation are mapped by the post color
2888 matrix color lookup table before being used by the histogram operation.
2889
2890
2891
2892 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
2893 values.
2894
2895 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
2896 allowable values.
2897
2898 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
2899 values.
2900
2901 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
2902 values.
2903
2904 `GL_INVALID_VALUE' is generated if WIDTH is less than zero.
2905
2906 `GL_TABLE_TOO_LARGE' is generated if the requested color table is too
2907 large to be supported by the implementation, and TARGET is not a
2908 `GL_PROXY_*' target.
2909
2910 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2911 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
2912 data store is currently mapped.
2913
2914 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2915 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
2916 unpacked from the buffer object such that the memory reads required
2917 would exceed the data store size.
2918
2919 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2920 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
2921 divisible into the number of bytes needed to store in memory a datum
2922 indicated by TYPE.
2923
2924 `GL_INVALID_OPERATION' is generated if `glColorTable' is executed
2925 between the execution of `glBegin' and the corresponding execution of
2926 `glEnd'.")
2927
2928 (define-gl-procedures
2929 ((glColor3b
2930 (red GLbyte)
2931 (green GLbyte)
2932 (blue GLbyte)
2933 ->
2934 void)
2935 (glColor3s
2936 (red GLshort)
2937 (green GLshort)
2938 (blue GLshort)
2939 ->
2940 void)
2941 (glColor3i
2942 (red GLint)
2943 (green GLint)
2944 (blue GLint)
2945 ->
2946 void)
2947 (glColor3f
2948 (red GLfloat)
2949 (green GLfloat)
2950 (blue GLfloat)
2951 ->
2952 void)
2953 (glColor3d
2954 (red GLdouble)
2955 (green GLdouble)
2956 (blue GLdouble)
2957 ->
2958 void)
2959 (glColor3ub
2960 (red GLubyte)
2961 (green GLubyte)
2962 (blue GLubyte)
2963 ->
2964 void)
2965 (glColor3us
2966 (red GLushort)
2967 (green GLushort)
2968 (blue GLushort)
2969 ->
2970 void)
2971 (glColor3ui
2972 (red GLuint)
2973 (green GLuint)
2974 (blue GLuint)
2975 ->
2976 void)
2977 (glColor4b
2978 (red GLbyte)
2979 (green GLbyte)
2980 (blue GLbyte)
2981 (alpha GLbyte)
2982 ->
2983 void)
2984 (glColor4s
2985 (red GLshort)
2986 (green GLshort)
2987 (blue GLshort)
2988 (alpha GLshort)
2989 ->
2990 void)
2991 (glColor4i
2992 (red GLint)
2993 (green GLint)
2994 (blue GLint)
2995 (alpha GLint)
2996 ->
2997 void)
2998 (glColor4f
2999 (red GLfloat)
3000 (green GLfloat)
3001 (blue GLfloat)
3002 (alpha GLfloat)
3003 ->
3004 void)
3005 (glColor4d
3006 (red GLdouble)
3007 (green GLdouble)
3008 (blue GLdouble)
3009 (alpha GLdouble)
3010 ->
3011 void)
3012 (glColor4ub
3013 (red GLubyte)
3014 (green GLubyte)
3015 (blue GLubyte)
3016 (alpha GLubyte)
3017 ->
3018 void)
3019 (glColor4us
3020 (red GLushort)
3021 (green GLushort)
3022 (blue GLushort)
3023 (alpha GLushort)
3024 ->
3025 void)
3026 (glColor4ui
3027 (red GLuint)
3028 (green GLuint)
3029 (blue GLuint)
3030 (alpha GLuint)
3031 ->
3032 void)
3033 (glColor3bv (v const-GLbyte-*) -> void)
3034 (glColor3sv (v const-GLshort-*) -> void)
3035 (glColor3iv (v const-GLint-*) -> void)
3036 (glColor3fv (v const-GLfloat-*) -> void)
3037 (glColor3dv (v const-GLdouble-*) -> void)
3038 (glColor3ubv (v const-GLubyte-*) -> void)
3039 (glColor3usv (v const-GLushort-*) -> void)
3040 (glColor3uiv (v const-GLuint-*) -> void)
3041 (glColor4bv (v const-GLbyte-*) -> void)
3042 (glColor4sv (v const-GLshort-*) -> void)
3043 (glColor4iv (v const-GLint-*) -> void)
3044 (glColor4fv (v const-GLfloat-*) -> void)
3045 (glColor4dv (v const-GLdouble-*) -> void)
3046 (glColor4ubv (v const-GLubyte-*) -> void)
3047 (glColor4usv (v const-GLushort-*) -> void)
3048 (glColor4uiv (v const-GLuint-*) -> void))
3049 "Set the current color.
3050
3051 RED
3052 GREEN
3053
3054 BLUE
3055
3056 Specify new red, green, and blue values for the current color.
3057
3058 ALPHA
3059 Specifies a new alpha value for the current color. Included only in
3060 the four-argument `glColor4' commands.
3061
3062 The GL stores both a current single-valued color index and a current
3063 four-valued RGBA color. `glColor' sets a new four-valued RGBA color.
3064 `glColor' has two major variants: `glColor3' and `glColor4'. `glColor3'
3065 variants specify new red, green, and blue values explicitly and set the
3066 current alpha value to 1.0 (full intensity) implicitly. `glColor4'
3067 variants specify all four color components explicitly.
3068
3069 `glColor3b', `glColor4b', `glColor3s', `glColor4s', `glColor3i', and
3070 `glColor4i' take three or four signed byte, short, or long integers as
3071 arguments. When *v* is appended to the name, the color commands can take
3072 a pointer to an array of such values.
3073
3074 Current color values are stored in floating-point format, with
3075 unspecified mantissa and exponent sizes. Unsigned integer color
3076 components, when specified, are linearly mapped to floating-point values
3077 such that the largest representable value maps to 1.0 (full intensity),
3078 and 0 maps to 0.0 (zero intensity). Signed integer color components,
3079 when specified, are linearly mapped to floating-point values such that
3080 the most positive representable value maps to 1.0, and the most negative
3081 representable value maps to -1.0 . (Note that this mapping does not
3082 convert 0 precisely to 0.0.) Floating-point values are mapped directly.
3083
3084 Neither floating-point nor signed integer values are clamped to the
3085 range [0,1] before the current color is updated. However, color
3086 components are clamped to this range before they are interpolated or
3087 written into a color buffer.")
3088
3089 (define-gl-procedures
3090 ((glCompileShader (shader GLuint) -> void))
3091 "Compiles a shader object.
3092
3093 SHADER
3094 Specifies the shader object to be compiled.
3095
3096 `glCompileShader' compiles the source code strings that have been stored
3097 in the shader object specified by SHADER.
3098
3099 The compilation status will be stored as part of the shader object's
3100 state. This value will be set to `GL_TRUE' if the shader was compiled
3101 without errors and is ready for use, and `GL_FALSE' otherwise. It can be
3102 queried by calling `glGetShader' with arguments SHADER and
3103 `GL_COMPILE_STATUS'.
3104
3105 Compilation of a shader can fail for a number of reasons as specified by
3106 the OpenGL Shading Language Specification. Whether or not the
3107 compilation was successful, information about the compilation can be
3108 obtained from the shader object's information log by calling
3109 `glGetShaderInfoLog'.
3110
3111 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
3112 OpenGL.
3113
3114 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
3115
3116 `GL_INVALID_OPERATION' is generated if `glCompileShader' is executed
3117 between the execution of `glBegin' and the corresponding execution of
3118 `glEnd'.")
3119
3120 (define-gl-procedures
3121 ((glCompressedTexImage1D
3122 (target GLenum)
3123 (level GLint)
3124 (internalformat GLenum)
3125 (width GLsizei)
3126 (border GLint)
3127 (imageSize GLsizei)
3128 (data const-GLvoid-*)
3129 ->
3130 void))
3131 "Specify a one-dimensional texture image in a compressed format.
3132
3133 TARGET
3134 Specifies the target texture. Must be `GL_TEXTURE_1D' or
3135 `GL_PROXY_TEXTURE_1D'.
3136
3137 LEVEL
3138 Specifies the level-of-detail number. Level 0 is the base image
3139 level. Level N is the Nth mipmap reduction image.
3140
3141 INTERNALFORMAT
3142 Specifies the format of the compressed image data stored at address
3143 DATA.
3144
3145 WIDTH
3146 Specifies the width of the texture image including the border if
3147 any. If the GL version does not support non-power-of-two sizes,
3148 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3149 implementations support texture images that are at least 64 texels
3150 wide. The height of the 1D texture image is 1.
3151
3152 BORDER
3153 Specifies the width of the border. Must be either 0 or 1.
3154
3155 IMAGESIZE
3156 Specifies the number of unsigned bytes of image data starting at
3157 the address specified by DATA.
3158
3159 DATA
3160 Specifies a pointer to the compressed image data in memory.
3161
3162 Texturing maps a portion of a specified texture image onto each
3163 graphical primitive for which texturing is enabled. To enable and
3164 disable one-dimensional texturing, call `glEnable' and `glDisable' with
3165 argument `GL_TEXTURE_1D'.
3166
3167 `glCompressedTexImage1D' loads a previously defined, and retrieved,
3168 compressed one-dimensional texture image if TARGET is `GL_TEXTURE_1D'
3169 (see `glTexImage1D').
3170
3171 If TARGET is `GL_PROXY_TEXTURE_1D', no data is read from DATA, but all
3172 of the texture image state is recalculated, checked for consistency, and
3173 checked against the implementation's capabilities. If the implementation
3174 cannot handle a texture of the requested texture size, it sets all of
3175 the image state to 0, but does not generate an error (see `glGetError').
3176 To query for an entire mipmap array, use an image array level greater
3177 than or equal to 1.
3178
3179 INTERNALFORMAT must be extension-specified compressed-texture format.
3180 When a texture is loaded with `glTexImage1D' using a generic compressed
3181 texture format (e.g., `GL_COMPRESSED_RGB') the GL selects from one of
3182 its extensions supporting compressed textures. In order to load the
3183 compressed texture image using `glCompressedTexImage1D', query the
3184 compressed texture image's size and format using
3185 `glGetTexLevelParameter'.
3186
3187 If a non-zero named buffer object is bound to the
3188 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3189 image is specified, DATA is treated as a byte offset into the buffer
3190 object's data store.
3191
3192 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
3193 compressed internal formats: `GL_COMPRESSED_ALPHA',
3194 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3195 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
3196
3197 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3198 format, dimensions, and contents of the specified compressed image data.
3199
3200 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3201 supported by the specific compressed internal format as specified in the
3202 specific texture compression extension.
3203
3204 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3205 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3206 data store is currently mapped.
3207
3208 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3209 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3210 unpacked from the buffer object such that the memory reads required
3211 would exceed the data store size.
3212
3213 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage1D' is
3214 executed between the execution of `glBegin' and the corresponding
3215 execution of `glEnd'.
3216
3217 Undefined results, including abnormal program termination, are generated
3218 if DATA is not encoded in a manner consistent with the extension
3219 specification defining the internal compression format.")
3220
3221 (define-gl-procedures
3222 ((glCompressedTexImage2D
3223 (target GLenum)
3224 (level GLint)
3225 (internalformat GLenum)
3226 (width GLsizei)
3227 (height GLsizei)
3228 (border GLint)
3229 (imageSize GLsizei)
3230 (data const-GLvoid-*)
3231 ->
3232 void))
3233 "Specify a two-dimensional texture image in a compressed format.
3234
3235 TARGET
3236 Specifies the target texture. Must be `GL_TEXTURE_2D',
3237 `GL_PROXY_TEXTURE_2D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
3238 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
3239 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
3240 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
3241
3242 LEVEL
3243 Specifies the level-of-detail number. Level 0 is the base image
3244 level. Level N is the Nth mipmap reduction image.
3245
3246 INTERNALFORMAT
3247 Specifies the format of the compressed image data stored at address
3248 DATA.
3249
3250 WIDTH
3251 Specifies the width of the texture image including the border if
3252 any. If the GL version does not support non-power-of-two sizes,
3253 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3254 implementations support 2D texture images that are at least 64
3255 texels wide and cube-mapped texture images that are at least 16
3256 texels wide.
3257
3258 HEIGHT
3259 Specifies the height of the texture image including the border if
3260 any. If the GL version does not support non-power-of-two sizes,
3261 this value must be Must be 2^N+2\u2061(BORDER,) for some integer N . All
3262 implementations support 2D texture images that are at least 64
3263 texels high and cube-mapped texture images that are at least 16
3264 texels high.
3265
3266 BORDER
3267 Specifies the width of the border. Must be either 0 or 1.
3268
3269 IMAGESIZE
3270 Specifies the number of unsigned bytes of image data starting at
3271 the address specified by DATA.
3272
3273 DATA
3274 Specifies a pointer to the compressed image data in memory.
3275
3276 Texturing maps a portion of a specified texture image onto each
3277 graphical primitive for which texturing is enabled. To enable and
3278 disable two-dimensional texturing, call `glEnable' and `glDisable' with
3279 argument `GL_TEXTURE_2D'. To enable and disable texturing using
3280 cube-mapped textures, call `glEnable' and `glDisable' with argument
3281 `GL_TEXTURE_CUBE_MAP'.
3282
3283 `glCompressedTexImage2D' loads a previously defined, and retrieved,
3284 compressed two-dimensional texture image if TARGET is `GL_TEXTURE_2D'
3285 (see `glTexImage2D').
3286
3287 If TARGET is `GL_PROXY_TEXTURE_2D', no data is read from DATA, but all
3288 of the texture image state is recalculated, checked for consistency, and
3289 checked against the implementation's capabilities. If the implementation
3290 cannot handle a texture of the requested texture size, it sets all of
3291 the image state to 0, but does not generate an error (see `glGetError').
3292 To query for an entire mipmap array, use an image array level greater
3293 than or equal to 1.
3294
3295 INTERNALFORMAT must be an extension-specified compressed-texture format.
3296 When a texture is loaded with `glTexImage2D' using a generic compressed
3297 texture format (e.g., `GL_COMPRESSED_RGB'), the GL selects from one of
3298 its extensions supporting compressed textures. In order to load the
3299 compressed texture image using `glCompressedTexImage2D', query the
3300 compressed texture image's size and format using
3301 `glGetTexLevelParameter'.
3302
3303 If a non-zero named buffer object is bound to the
3304 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3305 image is specified, DATA is treated as a byte offset into the buffer
3306 object's data store.
3307
3308 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
3309 compressed internal formats: `GL_COMPRESSED_ALPHA',
3310 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3311 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
3312
3313 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3314 format, dimensions, and contents of the specified compressed image data.
3315
3316 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3317 supported by the specific compressed internal format as specified in the
3318 specific texture compression extension.
3319
3320 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3321 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3322 data store is currently mapped.
3323
3324 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3325 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3326 unpacked from the buffer object such that the memory reads required
3327 would exceed the data store size.
3328
3329 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage2D' is
3330 executed between the execution of `glBegin' and the corresponding
3331 execution of `glEnd'.
3332
3333 Undefined results, including abnormal program termination, are generated
3334 if DATA is not encoded in a manner consistent with the extension
3335 specification defining the internal compression format.")
3336
3337 (define-gl-procedures
3338 ((glCompressedTexImage3D
3339 (target GLenum)
3340 (level GLint)
3341 (internalformat GLenum)
3342 (width GLsizei)
3343 (height GLsizei)
3344 (depth GLsizei)
3345 (border GLint)
3346 (imageSize GLsizei)
3347 (data const-GLvoid-*)
3348 ->
3349 void))
3350 "Specify a three-dimensional texture image in a compressed format.
3351
3352 TARGET
3353 Specifies the target texture. Must be `GL_TEXTURE_3D' or
3354 `GL_PROXY_TEXTURE_3D'.
3355
3356 LEVEL
3357 Specifies the level-of-detail number. Level 0 is the base image
3358 level. Level N is the Nth mipmap reduction image.
3359
3360 INTERNALFORMAT
3361 Specifies the format of the compressed image data stored at address
3362 DATA.
3363
3364 WIDTH
3365 Specifies the width of the texture image including the border if
3366 any. If the GL version does not support non-power-of-two sizes,
3367 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3368 implementations support 3D texture images that are at least 16
3369 texels wide.
3370
3371 HEIGHT
3372 Specifies the height of the texture image including the border if
3373 any. If the GL version does not support non-power-of-two sizes,
3374 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3375 implementations support 3D texture images that are at least 16
3376 texels high.
3377
3378 DEPTH
3379 Specifies the depth of the texture image including the border if
3380 any. If the GL version does not support non-power-of-two sizes,
3381 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3382 implementations support 3D texture images that are at least 16
3383 texels deep.
3384
3385 BORDER
3386 Specifies the width of the border. Must be either 0 or 1.
3387
3388 IMAGESIZE
3389 Specifies the number of unsigned bytes of image data starting at
3390 the address specified by DATA.
3391
3392 DATA
3393 Specifies a pointer to the compressed image data in memory.
3394
3395 Texturing maps a portion of a specified texture image onto each
3396 graphical primitive for which texturing is enabled. To enable and
3397 disable three-dimensional texturing, call `glEnable' and `glDisable'
3398 with argument `GL_TEXTURE_3D'.
3399
3400 `glCompressedTexImage3D' loads a previously defined, and retrieved,
3401 compressed three-dimensional texture image if TARGET is `GL_TEXTURE_3D'
3402 (see `glTexImage3D').
3403
3404 If TARGET is `GL_PROXY_TEXTURE_3D', no data is read from DATA, but all
3405 of the texture image state is recalculated, checked for consistency, and
3406 checked against the implementation's capabilities. If the implementation
3407 cannot handle a texture of the requested texture size, it sets all of
3408 the image state to 0, but does not generate an error (see `glGetError').
3409 To query for an entire mipmap array, use an image array level greater
3410 than or equal to 1.
3411
3412 INTERNALFORMAT must be an extension-specified compressed-texture format.
3413 When a texture is loaded with `glTexImage2D' using a generic compressed
3414 texture format (e.g., `GL_COMPRESSED_RGB'), the GL selects from one of
3415 its extensions supporting compressed textures. In order to load the
3416 compressed texture image using `glCompressedTexImage3D', query the
3417 compressed texture image's size and format using
3418 `glGetTexLevelParameter'.
3419
3420 If a non-zero named buffer object is bound to the
3421 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3422 image is specified, DATA is treated as a byte offset into the buffer
3423 object's data store.
3424
3425 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
3426 compressed internal formats: `GL_COMPRESSED_ALPHA',
3427 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3428 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
3429
3430 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3431 format, dimensions, and contents of the specified compressed image data.
3432
3433 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3434 supported by the specific compressed internal format as specified in the
3435 specific texture compression extension.
3436
3437 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3438 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3439 data store is currently mapped.
3440
3441 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3442 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3443 unpacked from the buffer object such that the memory reads required
3444 would exceed the data store size.
3445
3446 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage3D' is
3447 executed between the execution of `glBegin' and the corresponding
3448 execution of `glEnd'.
3449
3450 Undefined results, including abnormal program termination, are generated
3451 if DATA is not encoded in a manner consistent with the extension
3452 specification defining the internal compression format.")
3453
3454 (define-gl-procedures
3455 ((glCompressedTexSubImage1D
3456 (target GLenum)
3457 (level GLint)
3458 (xoffset GLint)
3459 (width GLsizei)
3460 (format GLenum)
3461 (imageSize GLsizei)
3462 (data const-GLvoid-*)
3463 ->
3464 void))
3465 "Specify a one-dimensional texture subimage in a compressed format.
3466
3467 TARGET
3468 Specifies the target texture. Must be `GL_TEXTURE_1D'.
3469
3470 LEVEL
3471 Specifies the level-of-detail number. Level 0 is the base image
3472 level. Level N is the Nth mipmap reduction image.
3473
3474 XOFFSET
3475 Specifies a texel offset in the x direction within the texture
3476 array.
3477
3478 WIDTH
3479 Specifies the width of the texture subimage.
3480
3481 FORMAT
3482 Specifies the format of the compressed image data stored at address
3483 DATA.
3484
3485 IMAGESIZE
3486 Specifies the number of unsigned bytes of image data starting at
3487 the address specified by DATA.
3488
3489 DATA
3490 Specifies a pointer to the compressed image data in memory.
3491
3492 Texturing maps a portion of a specified texture image onto each
3493 graphical primitive for which texturing is enabled. To enable and
3494 disable one-dimensional texturing, call `glEnable' and `glDisable' with
3495 argument `GL_TEXTURE_1D'.
3496
3497 `glCompressedTexSubImage1D' redefines a contiguous subregion of an
3498 existing one-dimensional texture image. The texels referenced by DATA
3499 replace the portion of the existing texture array with x indices XOFFSET
3500 and XOFFSET+WIDTH-1 , inclusive. This region may not include any texels
3501 outside the range of the texture array as it was originally specified.
3502 It is not an error to specify a subtexture with width of 0, but such a
3503 specification has no effect.
3504
3505 FORMAT must be an extension-specified compressed-texture format. The
3506 FORMAT of the compressed texture image is selected by the GL
3507 implementation that compressed it (see `glTexImage1D'), and should be
3508 queried at the time the texture was compressed with
3509 `glGetTexLevelParameter'.
3510
3511 If a non-zero named buffer object is bound to the
3512 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3513 image is specified, DATA is treated as a byte offset into the buffer
3514 object's data store.
3515
3516 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3517 compressed internal formats: `GL_COMPRESSED_ALPHA',
3518 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3519 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3520 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3521 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3522 `GL_COMPRESSED_SRGB_ALPHA'.
3523
3524 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3525 format, dimensions, and contents of the specified compressed image data.
3526
3527 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3528 supported by the specific compressed internal format as specified in the
3529 specific texture compression extension.
3530
3531 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3532 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3533 data store is currently mapped.
3534
3535 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3536 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3537 unpacked from the buffer object such that the memory reads required
3538 would exceed the data store size.
3539
3540 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage1D' is
3541 executed between the execution of `glBegin' and the corresponding
3542 execution of `glEnd'.
3543
3544 Undefined results, including abnormal program termination, are generated
3545 if DATA is not encoded in a manner consistent with the extension
3546 specification defining the internal compression format.")
3547
3548 (define-gl-procedures
3549 ((glCompressedTexSubImage2D
3550 (target GLenum)
3551 (level GLint)
3552 (xoffset GLint)
3553 (yoffset GLint)
3554 (width GLsizei)
3555 (height GLsizei)
3556 (format GLenum)
3557 (imageSize GLsizei)
3558 (data const-GLvoid-*)
3559 ->
3560 void))
3561 "Specify a two-dimensional texture subimage in a compressed format.
3562
3563 TARGET
3564 Specifies the target texture. Must be `GL_TEXTURE_2D',
3565 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
3566 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
3567 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
3568 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
3569
3570 LEVEL
3571 Specifies the level-of-detail number. Level 0 is the base image
3572 level. Level N is the Nth mipmap reduction image.
3573
3574 XOFFSET
3575 Specifies a texel offset in the x direction within the texture
3576 array.
3577
3578 YOFFSET
3579 Specifies a texel offset in the y direction within the texture
3580 array.
3581
3582 WIDTH
3583 Specifies the width of the texture subimage.
3584
3585 HEIGHT
3586 Specifies the height of the texture subimage.
3587
3588 FORMAT
3589 Specifies the format of the compressed image data stored at address
3590 DATA.
3591
3592 IMAGESIZE
3593 Specifies the number of unsigned bytes of image data starting at
3594 the address specified by DATA.
3595
3596 DATA
3597 Specifies a pointer to the compressed image data in memory.
3598
3599 Texturing maps a portion of a specified texture image onto each
3600 graphical primitive for which texturing is enabled. To enable and
3601 disable two-dimensional texturing, call `glEnable' and `glDisable' with
3602 argument `GL_TEXTURE_2D'. To enable and disable texturing using
3603 cube-mapped texture, call `glEnable' and `glDisable' with argument
3604 `GL_TEXTURE_CUBE_MAP'.
3605
3606 `glCompressedTexSubImage2D' redefines a contiguous subregion of an
3607 existing two-dimensional texture image. The texels referenced by DATA
3608 replace the portion of the existing texture array with x indices XOFFSET
3609 and XOFFSET+WIDTH-1 , and the y indices YOFFSET and YOFFSET+HEIGHT-1 ,
3610 inclusive. This region may not include any texels outside the range of
3611 the texture array as it was originally specified. It is not an error to
3612 specify a subtexture with width of 0, but such a specification has no
3613 effect.
3614
3615 FORMAT must be an extension-specified compressed-texture format. The
3616 FORMAT of the compressed texture image is selected by the GL
3617 implementation that compressed it (see `glTexImage2D') and should be
3618 queried at the time the texture was compressed with
3619 `glGetTexLevelParameter'.
3620
3621 If a non-zero named buffer object is bound to the
3622 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3623 image is specified, DATA is treated as a byte offset into the buffer
3624 object's data store.
3625
3626 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3627 compressed internal formats: `GL_COMPRESSED_ALPHA',
3628 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3629 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3630 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3631 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3632 `GL_COMPRESSED_SRGB_ALPHA'.
3633
3634 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3635 format, dimensions, and contents of the specified compressed image data.
3636
3637 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3638 supported by the specific compressed internal format as specified in the
3639 specific texture compression extension.
3640
3641 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3642 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3643 data store is currently mapped.
3644
3645 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3646 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3647 unpacked from the buffer object such that the memory reads required
3648 would exceed the data store size.
3649
3650 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage2D' is
3651 executed between the execution of `glBegin' and the corresponding
3652 execution of `glEnd'.
3653
3654 Undefined results, including abnormal program termination, are generated
3655 if DATA is not encoded in a manner consistent with the extension
3656 specification defining the internal compression format.")
3657
3658 (define-gl-procedures
3659 ((glCompressedTexSubImage3D
3660 (target GLenum)
3661 (level GLint)
3662 (xoffset GLint)
3663 (yoffset GLint)
3664 (zoffset GLint)
3665 (width GLsizei)
3666 (height GLsizei)
3667 (depth GLsizei)
3668 (format GLenum)
3669 (imageSize GLsizei)
3670 (data const-GLvoid-*)
3671 ->
3672 void))
3673 "Specify a three-dimensional texture subimage in a compressed format.
3674
3675 TARGET
3676 Specifies the target texture. Must be `GL_TEXTURE_3D'.
3677
3678 LEVEL
3679 Specifies the level-of-detail number. Level 0 is the base image
3680 level. Level N is the Nth mipmap reduction image.
3681
3682 XOFFSET
3683 Specifies a texel offset in the x direction within the texture
3684 array.
3685
3686 YOFFSET
3687 Specifies a texel offset in the y direction within the texture
3688 array.
3689
3690 WIDTH
3691 Specifies the width of the texture subimage.
3692
3693 HEIGHT
3694 Specifies the height of the texture subimage.
3695
3696 DEPTH
3697 Specifies the depth of the texture subimage.
3698
3699 FORMAT
3700 Specifies the format of the compressed image data stored at address
3701 DATA.
3702
3703 IMAGESIZE
3704 Specifies the number of unsigned bytes of image data starting at
3705 the address specified by DATA.
3706
3707 DATA
3708 Specifies a pointer to the compressed image data in memory.
3709
3710 Texturing maps a portion of a specified texture image onto each
3711 graphical primitive for which texturing is enabled. To enable and
3712 disable three-dimensional texturing, call `glEnable' and `glDisable'
3713 with argument `GL_TEXTURE_3D'.
3714
3715 `glCompressedTexSubImage3D' redefines a contiguous subregion of an
3716 existing three-dimensional texture image. The texels referenced by DATA
3717 replace the portion of the existing texture array with x indices XOFFSET
3718 and XOFFSET+WIDTH-1 , and the y indices YOFFSET and YOFFSET+HEIGHT-1 ,
3719 and the z indices ZOFFSET and ZOFFSET+DEPTH-1 , inclusive. This region
3720 may not include any texels outside the range of the texture array as it
3721 was originally specified. It is not an error to specify a subtexture
3722 with width of 0, but such a specification has no effect.
3723
3724 FORMAT must be an extension-specified compressed-texture format. The
3725 FORMAT of the compressed texture image is selected by the GL
3726 implementation that compressed it (see `glTexImage3D') and should be
3727 queried at the time the texture was compressed with
3728 `glGetTexLevelParameter'.
3729
3730 If a non-zero named buffer object is bound to the
3731 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3732 image is specified, DATA is treated as a byte offset into the buffer
3733 object's data store.
3734
3735 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3736 compressed internal formats: `GL_COMPRESSED_ALPHA',
3737 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3738 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3739 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3740 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3741 `GL_COMPRESSED_SRGB_ALPHA'.
3742
3743 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3744 format, dimensions, and contents of the specified compressed image data.
3745
3746 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3747 supported by the specific compressed internal format as specified in the
3748 specific texture compression extension.
3749
3750 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3751 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3752 data store is currently mapped.
3753
3754 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3755 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3756 unpacked from the buffer object such that the memory reads required
3757 would exceed the data store size.
3758
3759 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage3D' is
3760 executed between the execution of `glBegin' and the corresponding
3761 execution of `glEnd'.
3762
3763 Undefined results, including abnormal program termination, are generated
3764 if DATA is not encoded in a manner consistent with the extension
3765 specification defining the internal compression format.")
3766
3767 (define-gl-procedures
3768 ((glConvolutionFilter1D
3769 (target GLenum)
3770 (internalformat GLenum)
3771 (width GLsizei)
3772 (format GLenum)
3773 (type GLenum)
3774 (data const-GLvoid-*)
3775 ->
3776 void))
3777 "Define a one-dimensional convolution filter.
3778
3779 TARGET
3780 Must be `GL_CONVOLUTION_1D'.
3781
3782 INTERNALFORMAT
3783 The internal format of the convolution filter kernel. The allowable
3784 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
3785 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
3786 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
3787 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
3788 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
3789 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
3790 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
3791 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
3792 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
3793 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
3794 `GL_RGBA12', or `GL_RGBA16'.
3795
3796 WIDTH
3797 The width of the pixel array referenced by DATA.
3798
3799 FORMAT
3800 The format of the pixel data in DATA. The allowable values are
3801 `GL_ALPHA', `GL_LUMINANCE', `GL_LUMINANCE_ALPHA', `GL_INTENSITY',
3802 `GL_RGB', and `GL_RGBA'.
3803
3804 TYPE
3805 The type of the pixel data in DATA. Symbolic constants
3806 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
3807 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
3808 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3809 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
3810 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3811 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3812 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3813 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
3814 are accepted.
3815
3816 DATA
3817 Pointer to a one-dimensional array of pixel data that is processed
3818 to build the convolution filter kernel.
3819
3820 `glConvolutionFilter1D' builds a one-dimensional convolution filter
3821 kernel from an array of pixels.
3822
3823 The pixel array specified by WIDTH, FORMAT, TYPE, and DATA is extracted
3824 from memory and processed just as if `glDrawPixels' were called, but
3825 processing stops after the final expansion to RGBA is completed.
3826
3827 If a non-zero named buffer object is bound to the
3828 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
3829 filter is specified, DATA is treated as a byte offset into the buffer
3830 object's data store.
3831
3832 The R, G, B, and A components of each pixel are next scaled by the four
3833 1D `GL_CONVOLUTION_FILTER_SCALE' parameters and biased by the four 1D
3834 `GL_CONVOLUTION_FILTER_BIAS' parameters. (The scale and bias parameters
3835 are set by `glConvolutionParameter' using the `GL_CONVOLUTION_1D' target
3836 and the names `GL_CONVOLUTION_FILTER_SCALE' and
3837 `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors of
3838 four values that are applied to red, green, blue, and alpha, in that
3839 order.) The R, G, B, and A values are not clamped to [0,1] at any time
3840 during this process.
3841
3842 Each pixel is then converted to the internal format specified by
3843 INTERNALFORMAT. This conversion simply maps the component values of the
3844 pixel (R, G, B, and A) to the values included in the internal format
3845 (red, green, blue, alpha, luminance, and intensity). The mapping is as
3846 follows:
3847
3848
3849
3850 *Internal Format*
3851 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
3852
3853 `GL_ALPHA'
3854 , , , A , ,
3855
3856 `GL_LUMINANCE'
3857 , , , , R ,
3858
3859 `GL_LUMINANCE_ALPHA'
3860 , , , A , R ,
3861
3862 `GL_INTENSITY'
3863 , , , , , R
3864
3865 `GL_RGB'
3866 R , G , B , , ,
3867
3868 `GL_RGBA'
3869 R , G , B , A , ,
3870
3871 The red, green, blue, alpha, luminance, and/or intensity components of
3872 the resulting pixels are stored in floating-point rather than integer
3873 format. They form a one-dimensional filter kernel image indexed with
3874 coordinate I such that I starts at 0 and increases from left to right.
3875 Kernel location I is derived from the Ith pixel, counting from 0.
3876
3877 Note that after a convolution is performed, the resulting color
3878 components are also scaled by their corresponding
3879 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
3880 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
3881 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
3882 set by `glPixelTransfer'.
3883
3884 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_1D'.
3885
3886 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
3887 allowable values.
3888
3889 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
3890 values.
3891
3892 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
3893 values.
3894
3895 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
3896 than the maximum supported value. This value may be queried with
3897 `glGetConvolutionParameter' using target `GL_CONVOLUTION_1D' and name
3898 `GL_MAX_CONVOLUTION_WIDTH'.
3899
3900 `GL_INVALID_OPERATION' is generated if FORMAT is one of
3901 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3902 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and TYPE is
3903 not `GL_RGB'.
3904
3905 `GL_INVALID_OPERATION' is generated if FORMAT is one of
3906 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3907 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3908 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3909 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
3910 TYPE is neither `GL_RGBA' nor `GL_BGRA'.
3911
3912 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3913 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3914 data store is currently mapped.
3915
3916 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3917 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3918 unpacked from the buffer object such that the memory reads required
3919 would exceed the data store size.
3920
3921 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3922 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
3923 divisible into the number of bytes needed to store in memory a datum
3924 indicated by TYPE.
3925
3926 `GL_INVALID_OPERATION' is generated if `glConvolutionFilter1D' is
3927 executed between the execution of `glBegin' and the corresponding
3928 execution of `glEnd'.")
3929
3930 (define-gl-procedures
3931 ((glConvolutionFilter2D
3932 (target GLenum)
3933 (internalformat GLenum)
3934 (width GLsizei)
3935 (height GLsizei)
3936 (format GLenum)
3937 (type GLenum)
3938 (data const-GLvoid-*)
3939 ->
3940 void))
3941 "Define a two-dimensional convolution filter.
3942
3943 TARGET
3944 Must be `GL_CONVOLUTION_2D'.
3945
3946 INTERNALFORMAT
3947 The internal format of the convolution filter kernel. The allowable
3948 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
3949 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
3950 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
3951 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
3952 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
3953 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
3954 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
3955 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
3956 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
3957 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
3958 `GL_RGBA12', or `GL_RGBA16'.
3959
3960 WIDTH
3961 The width of the pixel array referenced by DATA.
3962
3963 HEIGHT
3964 The height of the pixel array referenced by DATA.
3965
3966 FORMAT
3967 The format of the pixel data in DATA. The allowable values are
3968 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
3969 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
3970
3971 TYPE
3972 The type of the pixel data in DATA. Symbolic constants
3973 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
3974 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
3975 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3976 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
3977 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3978 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3979 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3980 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
3981 are accepted.
3982
3983 DATA
3984 Pointer to a two-dimensional array of pixel data that is processed
3985 to build the convolution filter kernel.
3986
3987 `glConvolutionFilter2D' builds a two-dimensional convolution filter
3988 kernel from an array of pixels.
3989
3990 The pixel array specified by WIDTH, HEIGHT, FORMAT, TYPE, and DATA is
3991 extracted from memory and processed just as if `glDrawPixels' were
3992 called, but processing stops after the final expansion to RGBA is
3993 completed.
3994
3995 If a non-zero named buffer object is bound to the
3996 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
3997 filter is specified, DATA is treated as a byte offset into the buffer
3998 object's data store.
3999
4000 The R, G, B, and A components of each pixel are next scaled by the four
4001 2D `GL_CONVOLUTION_FILTER_SCALE' parameters and biased by the four 2D
4002 `GL_CONVOLUTION_FILTER_BIAS' parameters. (The scale and bias parameters
4003 are set by `glConvolutionParameter' using the `GL_CONVOLUTION_2D' target
4004 and the names `GL_CONVOLUTION_FILTER_SCALE' and
4005 `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors of
4006 four values that are applied to red, green, blue, and alpha, in that
4007 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4008 during this process.
4009
4010 Each pixel is then converted to the internal format specified by
4011 INTERNALFORMAT. This conversion simply maps the component values of the
4012 pixel (R, G, B, and A) to the values included in the internal format
4013 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4014 follows:
4015
4016
4017
4018 *Internal Format*
4019 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4020
4021 `GL_ALPHA'
4022 , , , A , ,
4023
4024 `GL_LUMINANCE'
4025 , , , , R ,
4026
4027 `GL_LUMINANCE_ALPHA'
4028 , , , A , R ,
4029
4030 `GL_INTENSITY'
4031 , , , , , R
4032
4033 `GL_RGB'
4034 R , G , B , , ,
4035
4036 `GL_RGBA'
4037 R , G , B , A , ,
4038
4039 The red, green, blue, alpha, luminance, and/or intensity components of
4040 the resulting pixels are stored in floating-point rather than integer
4041 format. They form a two-dimensional filter kernel image indexed with
4042 coordinates I and J such that I starts at zero and increases from left
4043 to right, and J starts at zero and increases from bottom to top. Kernel
4044 location I,J is derived from the Nth pixel, where N is I+J*WIDTH.
4045
4046 Note that after a convolution is performed, the resulting color
4047 components are also scaled by their corresponding
4048 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4049 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4050 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4051 set by `glPixelTransfer'.
4052
4053 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_2D'.
4054
4055 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4056 allowable values.
4057
4058 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
4059 values.
4060
4061 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
4062 values.
4063
4064 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4065 than the maximum supported value. This value may be queried with
4066 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4067 `GL_MAX_CONVOLUTION_WIDTH'.
4068
4069 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
4070 than the maximum supported value. This value may be queried with
4071 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4072 `GL_MAX_CONVOLUTION_HEIGHT'.
4073
4074 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
4075 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
4076 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
4077 is not `GL_RGB'.
4078
4079 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
4080 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
4081 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
4082 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
4083 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
4084 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
4085
4086 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
4087 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
4088 data store is currently mapped.
4089
4090 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
4091 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
4092 unpacked from the buffer object such that the memory reads required
4093 would exceed the data store size.
4094
4095 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
4096 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
4097 divisible into the number of bytes needed to store in memory a datum
4098 indicated by TYPE.
4099
4100 `GL_INVALID_OPERATION' is generated if `glConvolutionFilter2D' is
4101 executed between the execution of `glBegin' and the corresponding
4102 execution of `glEnd'.")
4103
4104 (define-gl-procedures
4105 ((glConvolutionParameterf
4106 (target GLenum)
4107 (pname GLenum)
4108 (params GLfloat)
4109 ->
4110 void)
4111 (glConvolutionParameteri
4112 (target GLenum)
4113 (pname GLenum)
4114 (params GLint)
4115 ->
4116 void)
4117 (glConvolutionParameterfv
4118 (target GLenum)
4119 (pname GLenum)
4120 (params const-GLfloat-*)
4121 ->
4122 void)
4123 (glConvolutionParameteriv
4124 (target GLenum)
4125 (pname GLenum)
4126 (params const-GLint-*)
4127 ->
4128 void))
4129 "Set convolution parameters.
4130
4131 TARGET
4132 The target for the convolution parameter. Must be one of
4133 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D'.
4134
4135 PNAME
4136 The parameter to be set. Must be `GL_CONVOLUTION_BORDER_MODE'.
4137
4138 PARAMS
4139 The parameter value. Must be one of `GL_REDUCE',
4140 `GL_CONSTANT_BORDER', `GL_REPLICATE_BORDER'.
4141
4142
4143
4144 `glConvolutionParameter' sets the value of a convolution parameter.
4145
4146 TARGET selects the convolution filter to be affected:
4147 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D' for the
4148 1D, 2D, or separable 2D filter, respectively.
4149
4150 PNAME selects the parameter to be changed. `GL_CONVOLUTION_FILTER_SCALE'
4151 and `GL_CONVOLUTION_FILTER_BIAS' affect the definition of the
4152 convolution filter kernel; see `glConvolutionFilter1D',
4153 `glConvolutionFilter2D', and `glSeparableFilter2D' for details. In these
4154 cases, PARAMSv is an array of four values to be applied to red, green,
4155 blue, and alpha values, respectively. The initial value for
4156 `GL_CONVOLUTION_FILTER_SCALE' is (1, 1, 1, 1), and the initial value for
4157 `GL_CONVOLUTION_FILTER_BIAS' is (0, 0, 0, 0).
4158
4159 A PNAME value of `GL_CONVOLUTION_BORDER_MODE' controls the convolution
4160 border mode. The accepted modes are:
4161
4162 `GL_REDUCE'
4163 The image resulting from convolution is smaller than the source
4164 image. If the filter width is WF and height is HF , and the source
4165 image width is WS and height is HS , then the convolved image width
4166 will be WS-WF+1 and height will be HS-HF+1 . (If this reduction
4167 would generate an image with zero or negative width and/or height,
4168 the output is simply null, with no error generated.) The
4169 coordinates of the image resulting from convolution are zero
4170 through WS-WF in width and zero through HS-HF in height.
4171
4172 `GL_CONSTANT_BORDER'
4173 The image resulting from convolution is the same size as the source
4174 image, and processed as if the source image were surrounded by
4175 pixels with their color specified by the
4176 `GL_CONVOLUTION_BORDER_COLOR'.
4177
4178 `GL_REPLICATE_BORDER'
4179 The image resulting from convolution is the same size as the source
4180 image, and processed as if the outermost pixel on the border of the
4181 source image were replicated.
4182
4183 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
4184 values.
4185
4186 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
4187 values.
4188
4189 `GL_INVALID_ENUM' is generated if PNAME is `GL_CONVOLUTION_BORDER_MODE'
4190 and PARAMS is not one of `GL_REDUCE', `GL_CONSTANT_BORDER', or
4191 `GL_REPLICATE_BORDER'.
4192
4193 `GL_INVALID_OPERATION' is generated if `glConvolutionParameter' is
4194 executed between the execution of `glBegin' and the corresponding
4195 execution of `glEnd'.")
4196
4197 (define-gl-procedures
4198 ((glCopyColorSubTable
4199 (target GLenum)
4200 (start GLsizei)
4201 (x GLint)
4202 (y GLint)
4203 (width GLsizei)
4204 ->
4205 void))
4206 "Respecify a portion of a color table.
4207
4208 TARGET
4209 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
4210 or `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
4211
4212 START
4213 The starting index of the portion of the color table to be
4214 replaced.
4215
4216 X
4217 Y
4218
4219 The window coordinates of the left corner of the row of pixels to
4220 be copied.
4221
4222 WIDTH
4223 The number of table entries to replace.
4224
4225 `glCopyColorSubTable' is used to respecify a contiguous portion of a
4226 color table previously defined using `glColorTable'. The pixels copied
4227 from the framebuffer replace the portion of the existing table from
4228 indices START to START+X-1 , inclusive. This region may not include any
4229 entries outside the range of the color table, as was originally
4230 specified. It is not an error to specify a subtexture with width of 0,
4231 but such a specification has no effect.
4232
4233 `GL_INVALID_VALUE' is generated if TARGET is not a previously defined
4234 color table.
4235
4236 `GL_INVALID_VALUE' is generated if TARGET is not one of the allowable
4237 values.
4238
4239 `GL_INVALID_VALUE' is generated if START+X>WIDTH .
4240
4241 `GL_INVALID_OPERATION' is generated if `glCopyColorSubTable' is executed
4242 between the execution of `glBegin' and the corresponding execution of
4243 `glEnd'.")
4244
4245 (define-gl-procedures
4246 ((glCopyColorTable
4247 (target GLenum)
4248 (internalformat GLenum)
4249 (x GLint)
4250 (y GLint)
4251 (width GLsizei)
4252 ->
4253 void))
4254 "Copy pixels into a color table.
4255
4256 TARGET
4257 The color table target. Must be `GL_COLOR_TABLE',
4258 `GL_POST_CONVOLUTION_COLOR_TABLE', or
4259 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
4260
4261 INTERNALFORMAT
4262 The internal storage format of the texture image. Must be one of
4263 the following symbolic constants: `GL_ALPHA', `GL_ALPHA4',
4264 `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE',
4265 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4266 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4267 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4268 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4269 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4270 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
4271 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
4272 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
4273 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
4274
4275 X
4276 The x coordinate of the lower-left corner of the pixel rectangle to
4277 be transferred to the color table.
4278
4279 Y
4280 The y coordinate of the lower-left corner of the pixel rectangle to
4281 be transferred to the color table.
4282
4283 WIDTH
4284 The width of the pixel rectangle.
4285
4286 `glCopyColorTable' loads a color table with pixels from the current
4287 `GL_READ_BUFFER' (rather than from main memory, as is the case for
4288 `glColorTable').
4289
4290 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y)
4291 having width WIDTH and height 1 is loaded into the color table. If any
4292 pixels within this region are outside the window that is associated with
4293 the GL context, the values obtained for those pixels are undefined.
4294
4295 The pixels in the rectangle are processed just as if `glReadPixels' were
4296 called, with INTERNALFORMAT set to RGBA, but processing stops after the
4297 final conversion to RGBA.
4298
4299 The four scale parameters and the four bias parameters that are defined
4300 for the table are then used to scale and bias the R, G, B, and A
4301 components of each pixel. The scale and bias parameters are set by
4302 calling `glColorTableParameter'.
4303
4304 Next, the R, G, B, and A values are clamped to the range [0,1] . Each
4305 pixel is then converted to the internal format specified by
4306 INTERNALFORMAT. This conversion simply maps the component values of the
4307 pixel (R, G, B, and A) to the values included in the internal format
4308 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4309 follows:
4310
4311
4312
4313 *Internal Format*
4314 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4315
4316 `GL_ALPHA'
4317 , , , A , ,
4318
4319 `GL_LUMINANCE'
4320 , , , , R ,
4321
4322 `GL_LUMINANCE_ALPHA'
4323 , , , A , R ,
4324
4325 `GL_INTENSITY'
4326 , , , , , R
4327
4328 `GL_RGB'
4329 R , G , B , , ,
4330
4331 `GL_RGBA'
4332 R , G , B , A , ,
4333
4334 Finally, the red, green, blue, alpha, luminance, and/or intensity
4335 components of the resulting pixels are stored in the color table. They
4336 form a one-dimensional table with indices in the range [0,WIDTH-1] .
4337
4338
4339
4340 `GL_INVALID_ENUM' is generated when TARGET is not one of the allowable
4341 values.
4342
4343 `GL_INVALID_VALUE' is generated if WIDTH is less than zero.
4344
4345 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not one of the
4346 allowable values.
4347
4348 `GL_TABLE_TOO_LARGE' is generated if the requested color table is too
4349 large to be supported by the implementation.
4350
4351 `GL_INVALID_OPERATION' is generated if `glCopyColorTable' is executed
4352 between the execution of `glBegin' and the corresponding execution of
4353 `glEnd'.")
4354
4355 (define-gl-procedures
4356 ((glCopyConvolutionFilter1D
4357 (target GLenum)
4358 (internalformat GLenum)
4359 (x GLint)
4360 (y GLint)
4361 (width GLsizei)
4362 ->
4363 void))
4364 "Copy pixels into a one-dimensional convolution filter.
4365
4366 TARGET
4367 Must be `GL_CONVOLUTION_1D'.
4368
4369 INTERNALFORMAT
4370 The internal format of the convolution filter kernel. The allowable
4371 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
4372 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
4373 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
4374 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
4375 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
4376 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
4377 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
4378 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
4379 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
4380 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
4381 `GL_RGBA12', or `GL_RGBA16'.
4382
4383 X
4384 Y
4385
4386 The window space coordinates of the lower-left coordinate of the
4387 pixel array to copy.
4388
4389 WIDTH
4390 The width of the pixel array to copy.
4391
4392 `glCopyConvolutionFilter1D' defines a one-dimensional convolution filter
4393 kernel with pixels from the current `GL_READ_BUFFER' (rather than from
4394 main memory, as is the case for `glConvolutionFilter1D').
4395
4396 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y),
4397 width WIDTH and height 1 is used to define the convolution filter. If
4398 any pixels within this region are outside the window that is associated
4399 with the GL context, the values obtained for those pixels are undefined.
4400
4401 The pixels in the rectangle are processed exactly as if `glReadPixels'
4402 had been called with FORMAT set to RGBA, but the process stops just
4403 before final conversion. The R, G, B, and A components of each pixel are
4404 next scaled by the four 1D `GL_CONVOLUTION_FILTER_SCALE' parameters and
4405 biased by the four 1D `GL_CONVOLUTION_FILTER_BIAS' parameters. (The
4406 scale and bias parameters are set by `glConvolutionParameter' using the
4407 `GL_CONVOLUTION_1D' target and the names `GL_CONVOLUTION_FILTER_SCALE'
4408 and `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors
4409 of four values that are applied to red, green, blue, and alpha, in that
4410 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4411 during this process.
4412
4413 Each pixel is then converted to the internal format specified by
4414 INTERNALFORMAT. This conversion simply maps the component values of the
4415 pixel (R, G, B, and A) to the values included in the internal format
4416 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4417 follows:
4418
4419
4420
4421 *Internal Format*
4422 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4423
4424 `GL_ALPHA'
4425 , , , A , ,
4426
4427 `GL_LUMINANCE'
4428 , , , , R ,
4429
4430 `GL_LUMINANCE_ALPHA'
4431 , , , A , R ,
4432
4433 `GL_INTENSITY'
4434 , , , , , R
4435
4436 `GL_RGB'
4437 R , G , B , , ,
4438
4439 `GL_RGBA'
4440 R , G , B , A , ,
4441
4442 The red, green, blue, alpha, luminance, and/or intensity components of
4443 the resulting pixels are stored in floating-point rather than integer
4444 format.
4445
4446 Pixel ordering is such that lower x screen coordinates correspond to
4447 lower I filter image coordinates.
4448
4449 Note that after a convolution is performed, the resulting color
4450 components are also scaled by their corresponding
4451 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4452 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4453 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4454 set by `glPixelTransfer'.
4455
4456 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_1D'.
4457
4458 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4459 allowable values.
4460
4461 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4462 than the maximum supported value. This value may be queried with
4463 `glGetConvolutionParameter' using target `GL_CONVOLUTION_1D' and name
4464 `GL_MAX_CONVOLUTION_WIDTH'.
4465
4466 `GL_INVALID_OPERATION' is generated if `glCopyConvolutionFilter1D' is
4467 executed between the execution of `glBegin' and the corresponding
4468 execution of `glEnd'.")
4469
4470 (define-gl-procedures
4471 ((glCopyConvolutionFilter2D
4472 (target GLenum)
4473 (internalformat GLenum)
4474 (x GLint)
4475 (y GLint)
4476 (width GLsizei)
4477 (height GLsizei)
4478 ->
4479 void))
4480 "Copy pixels into a two-dimensional convolution filter.
4481
4482 TARGET
4483 Must be `GL_CONVOLUTION_2D'.
4484
4485 INTERNALFORMAT
4486 The internal format of the convolution filter kernel. The allowable
4487 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
4488 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
4489 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
4490 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
4491 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
4492 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
4493 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
4494 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
4495 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
4496 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
4497 `GL_RGBA12', or `GL_RGBA16'.
4498
4499 X
4500 Y
4501
4502 The window space coordinates of the lower-left coordinate of the
4503 pixel array to copy.
4504
4505 WIDTH
4506 The width of the pixel array to copy.
4507
4508 HEIGHT
4509 The height of the pixel array to copy.
4510
4511 `glCopyConvolutionFilter2D' defines a two-dimensional convolution filter
4512 kernel with pixels from the current `GL_READ_BUFFER' (rather than from
4513 main memory, as is the case for `glConvolutionFilter2D').
4514
4515 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y),
4516 width WIDTH and height HEIGHT is used to define the convolution filter.
4517 If any pixels within this region are outside the window that is
4518 associated with the GL context, the values obtained for those pixels are
4519 undefined.
4520
4521 The pixels in the rectangle are processed exactly as if `glReadPixels'
4522 had been called with FORMAT set to RGBA, but the process stops just
4523 before final conversion. The R, G, B, and A components of each pixel are
4524 next scaled by the four 2D `GL_CONVOLUTION_FILTER_SCALE' parameters and
4525 biased by the four 2D `GL_CONVOLUTION_FILTER_BIAS' parameters. (The
4526 scale and bias parameters are set by `glConvolutionParameter' using the
4527 `GL_CONVOLUTION_2D' target and the names `GL_CONVOLUTION_FILTER_SCALE'
4528 and `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors
4529 of four values that are applied to red, green, blue, and alpha, in that
4530 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4531 during this process.
4532
4533 Each pixel is then converted to the internal format specified by
4534 INTERNALFORMAT. This conversion simply maps the component values of the
4535 pixel (R, G, B, and A) to the values included in the internal format
4536 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4537 follows:
4538
4539
4540
4541 *Internal Format*
4542 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4543
4544 `GL_ALPHA'
4545 , , , A , ,
4546
4547 `GL_LUMINANCE'
4548 , , , , R ,
4549
4550 `GL_LUMINANCE_ALPHA'
4551 , , , A , R ,
4552
4553 `GL_INTENSITY'
4554 , , , , , R
4555
4556 `GL_RGB'
4557 R , G , B , , ,
4558
4559 `GL_RGBA'
4560 R , G , B , A , ,
4561
4562 The red, green, blue, alpha, luminance, and/or intensity components of
4563 the resulting pixels are stored in floating-point rather than integer
4564 format.
4565
4566 Pixel ordering is such that lower x screen coordinates correspond to
4567 lower I filter image coordinates, and lower y screen coordinates
4568 correspond to lower J filter image coordinates.
4569
4570 Note that after a convolution is performed, the resulting color
4571 components are also scaled by their corresponding
4572 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4573 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4574 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4575 set by `glPixelTransfer'.
4576
4577 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_2D'.
4578
4579 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4580 allowable values.
4581
4582 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4583 than the maximum supported value. This value may be queried with
4584 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4585 `GL_MAX_CONVOLUTION_WIDTH'.
4586
4587 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
4588 than the maximum supported value. This value may be queried with
4589 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4590 `GL_MAX_CONVOLUTION_HEIGHT'.
4591
4592 `GL_INVALID_OPERATION' is generated if `glCopyConvolutionFilter2D' is
4593 executed between the execution of `glBegin' and the corresponding
4594 execution of `glEnd'.")
4595
4596 (define-gl-procedures
4597 ((glCopyPixels
4598 (x GLint)
4599 (y GLint)
4600 (width GLsizei)
4601 (height GLsizei)
4602 (type GLenum)
4603 ->
4604 void))
4605 "Copy pixels in the frame buffer.
4606
4607 X
4608 Y
4609
4610 Specify the window coordinates of the lower left corner of the
4611 rectangular region of pixels to be copied.
4612
4613 WIDTH
4614 HEIGHT
4615
4616 Specify the dimensions of the rectangular region of pixels to be
4617 copied. Both must be nonnegative.
4618
4619 TYPE
4620 Specifies whether color values, depth values, or stencil values are
4621 to be copied. Symbolic constants `GL_COLOR', `GL_DEPTH', and
4622 `GL_STENCIL' are accepted.
4623
4624 `glCopyPixels' copies a screen-aligned rectangle of pixels from the
4625 specified frame buffer location to a region relative to the current
4626 raster position. Its operation is well defined only if the entire pixel
4627 source region is within the exposed portion of the window. Results of
4628 copies from outside the window, or from regions of the window that are
4629 not exposed, are hardware dependent and undefined.
4630
4631 X and Y specify the window coordinates of the lower left corner of the
4632 rectangular region to be copied. WIDTH and HEIGHT specify the dimensions
4633 of the rectangular region to be copied. Both WIDTH and HEIGHT must not
4634 be negative.
4635
4636 Several parameters control the processing of the pixel data while it is
4637 being copied. These parameters are set with three commands:
4638 `glPixelTransfer', `glPixelMap', and `glPixelZoom'. This reference page
4639 describes the effects on `glCopyPixels' of most, but not all, of the
4640 parameters specified by these three commands.
4641
4642 `glCopyPixels' copies values from each pixel with the lower left-hand
4643 corner at (X+I,Y+J) for 0<=I<WIDTH and 0<=J<HEIGHT . This pixel is said
4644 to be the I th pixel in the J th row. Pixels are copied in row order
4645 from the lowest to the highest row, left to right in each row.
4646
4647 TYPE specifies whether color, depth, or stencil data is to be copied.
4648 The details of the transfer for each data type are as follows:
4649
4650 `GL_COLOR'
4651 Indices or RGBA colors are read from the buffer currently specified
4652 as the read source buffer (see `glReadBuffer'). If the GL is in
4653 color index mode, each index that is read from this buffer is
4654 converted to a fixed-point format with an unspecified number of
4655 bits to the right of the binary point. Each index is then shifted
4656 left by `GL_INDEX_SHIFT' bits, and added to `GL_INDEX_OFFSET'. If
4657 `GL_INDEX_SHIFT' is negative, the shift is to the right. In either
4658 case, zero bits fill otherwise unspecified bit locations in the
4659 result. If `GL_MAP_COLOR' is true, the index is replaced with the
4660 value that it references in lookup table `GL_PIXEL_MAP_I_TO_I'.
4661 Whether the lookup replacement of the index is done or not, the
4662 integer part of the index is then ANDed with 2^B-1 , where B is the
4663 number of bits in a color index buffer.
4664
4665 If the GL is in RGBA mode, the red, green, blue, and alpha
4666 components of each pixel that is read are converted to an internal
4667 floating-point format with unspecified precision. The conversion
4668 maps the largest representable component value to 1.0, and
4669 component value 0 to 0.0. The resulting floating-point color values
4670 are then multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where
4671 C is RED, GREEN, BLUE, and ALPHA for the respective color
4672 components. The results are clamped to the range [0,1]. If
4673 `GL_MAP_COLOR' is true, each color component is scaled by the size
4674 of lookup table `GL_PIXEL_MAP_c_TO_c', then replaced by the value
4675 that it references in that table. C is R, G, B, or A.
4676
4677 If the `ARB_imaging' extension is supported, the color values may
4678 be additionally processed by color-table lookups, color-matrix
4679 transformations, and convolution filters.
4680
4681 The GL then converts the resulting indices or RGBA colors to
4682 fragments by attaching the current raster position Z coordinate and
4683 texture coordinates to each pixel, then assigning window
4684 coordinates (X_R+I,Y_R+J) , where (X_R,Y_R) is the current raster
4685 position, and the pixel was the I th pixel in the J th row. These
4686 pixel fragments are then treated just like the fragments generated
4687 by rasterizing points, lines, or polygons. Texture mapping, fog,
4688 and all the fragment operations are applied before the fragments
4689 are written to the frame buffer.
4690
4691 `GL_DEPTH'
4692 Depth values are read from the depth buffer and converted directly
4693 to an internal floating-point format with unspecified precision.
4694 The resulting floating-point depth value is then multiplied by
4695 `GL_DEPTH_SCALE' and added to `GL_DEPTH_BIAS'. The result is
4696 clamped to the range [0,1].
4697
4698 The GL then converts the resulting depth components to fragments by
4699 attaching the current raster position color or color index and
4700 texture coordinates to each pixel, then assigning window
4701 coordinates (X_R+I,Y_R+J) , where (X_R,Y_R) is the current raster
4702 position, and the pixel was the I th pixel in the J th row. These
4703 pixel fragments are then treated just like the fragments generated
4704 by rasterizing points, lines, or polygons. Texture mapping, fog,
4705 and all the fragment operations are applied before the fragments
4706 are written to the frame buffer.
4707
4708 `GL_STENCIL'
4709 Stencil indices are read from the stencil buffer and converted to
4710 an internal fixed-point format with an unspecified number of bits
4711 to the right of the binary point. Each fixed-point index is then
4712 shifted left by `GL_INDEX_SHIFT' bits, and added to
4713 `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is negative, the shift is to
4714 the right. In either case, zero bits fill otherwise unspecified bit
4715 locations in the result. If `GL_MAP_STENCIL' is true, the index is
4716 replaced with the value that it references in lookup table
4717 `GL_PIXEL_MAP_S_TO_S'. Whether the lookup replacement of the index
4718 is done or not, the integer part of the index is then ANDed with
4719 2^B-1 , where B is the number of bits in the stencil buffer. The
4720 resulting stencil indices are then written to the stencil buffer
4721 such that the index read from the I th location of the J th row is
4722 written to location (X_R+I,Y_R+J) , where (X_R,Y_R) is the current
4723 raster position. Only the pixel ownership test, the scissor test,
4724 and the stencil writemask affect these write operations.
4725
4726 The rasterization described thus far assumes pixel zoom factors of 1.0.
4727 If `glPixelZoom' is used to change the X and Y pixel zoom factors,
4728 pixels are converted to fragments as follows. If (X_R,Y_R) is the
4729 current raster position, and a given pixel is in the I th location in
4730 the J th row of the source pixel rectangle, then fragments are generated
4731 for pixels whose centers are in the rectangle with corners at
4732
4733 (X_R+ZOOM_X,\u2062I,Y_R+ZOOM_Y,\u2062J)
4734
4735 and
4736
4737 (X_R+ZOOM_X,\u2061(I+1,),Y_R+ZOOM_Y,\u2061(J+1,))
4738
4739 where ZOOM_X is the value of `GL_ZOOM_X' and ZOOM_Y is the value of
4740 `GL_ZOOM_Y'.
4741
4742 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
4743
4744 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
4745
4746 `GL_INVALID_OPERATION' is generated if TYPE is `GL_DEPTH' and there is
4747 no depth buffer.
4748
4749 `GL_INVALID_OPERATION' is generated if TYPE is `GL_STENCIL' and there is
4750 no stencil buffer.
4751
4752 `GL_INVALID_OPERATION' is generated if `glCopyPixels' is executed
4753 between the execution of `glBegin' and the corresponding execution of
4754 `glEnd'.")
4755
4756 (define-gl-procedures
4757 ((glCopyTexImage1D
4758 (target GLenum)
4759 (level GLint)
4760 (internalformat GLenum)
4761 (x GLint)
4762 (y GLint)
4763 (width GLsizei)
4764 (border GLint)
4765 ->
4766 void))
4767 "Copy pixels into a 1D texture image.
4768
4769 TARGET
4770 Specifies the target texture. Must be `GL_TEXTURE_1D'.
4771
4772 LEVEL
4773 Specifies the level-of-detail number. Level 0 is the base image
4774 level. Level N is the Nth mipmap reduction image.
4775
4776 INTERNALFORMAT
4777 Specifies the internal format of the texture. Must be one of the
4778 following symbolic constants: `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4779 `GL_ALPHA12', `GL_ALPHA16', `GL_COMPRESSED_ALPHA',
4780 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
4781 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB',
4782 `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
4783 `GL_DEPTH_COMPONENT24', `GL_DEPTH_COMPONENT32', `GL_LUMINANCE',
4784 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4785 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4786 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4787 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4788 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4789 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_RGB',
4790 `GL_R3_G3_B2', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10',
4791 `GL_RGB12', `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4',
4792 `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
4793 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
4794 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
4795 `GL_SRGB8_ALPHA8'.
4796
4797 X
4798 Y
4799
4800 Specify the window coordinates of the left corner of the row of
4801 pixels to be copied.
4802
4803 WIDTH
4804 Specifies the width of the texture image. Must be 0 or
4805 2^N+2\u2061(BORDER,) for some integer N . The height of the texture
4806 image is 1.
4807
4808 BORDER
4809 Specifies the width of the border. Must be either 0 or 1.
4810
4811 `glCopyTexImage1D' defines a one-dimensional texture image with pixels
4812 from the current `GL_READ_BUFFER'.
4813
4814 The screen-aligned pixel row with left corner at (X,Y) and with a length
4815 of WIDTH+2\u2061(BORDER,) defines the texture array at the mipmap level
4816 specified by LEVEL. INTERNALFORMAT specifies the internal format of the
4817 texture array.
4818
4819 The pixels in the row are processed exactly as if `glCopyPixels' had
4820 been called, but the process stops just before final conversion. At this
4821 point all pixel component values are clamped to the range [0,1] and then
4822 converted to the texture's internal format for storage in the texel
4823 array.
4824
4825 Pixel ordering is such that lower X screen coordinates correspond to
4826 lower texture coordinates.
4827
4828 If any of the pixels within the specified row of the current
4829 `GL_READ_BUFFER' are outside the window associated with the current
4830 rendering context, then the values obtained for those pixels are
4831 undefined.
4832
4833 `glCopyTexImage1D' defines a one-dimensional texture image with pixels
4834 from the current `GL_READ_BUFFER'.
4835
4836 When INTERNALFORMAT is one of the sRGB types, the GL does not
4837 automatically convert the source pixels to the sRGB color space. In this
4838 case, the `glPixelMap' function can be used to accomplish the
4839 conversion.
4840
4841 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
4842 values.
4843
4844 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4845
4846 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2\u2062MAX ,
4847 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
4848
4849 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not an allowable
4850 value.
4851
4852 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
4853 2 + `GL_MAX_TEXTURE_SIZE'.
4854
4855 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
4856 supported and the WIDTH cannot be represented as 2^N+2\u2061(BORDER,) for
4857 some integer value of N.
4858
4859 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
4860
4861 `GL_INVALID_OPERATION' is generated if `glCopyTexImage1D' is executed
4862 between the execution of `glBegin' and the corresponding execution of
4863 `glEnd'.
4864
4865 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
4866 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
4867 `GL_DEPTH_COMPONENT32' and there is no depth buffer.")
4868
4869 (define-gl-procedures
4870 ((glCopyTexImage2D
4871 (target GLenum)
4872 (level GLint)
4873 (internalformat GLenum)
4874 (x GLint)
4875 (y GLint)
4876 (width GLsizei)
4877 (height GLsizei)
4878 (border GLint)
4879 ->
4880 void))
4881 "Copy pixels into a 2D texture image.
4882
4883 TARGET
4884 Specifies the target texture. Must be `GL_TEXTURE_2D',
4885 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4886 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4887 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
4888 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4889
4890 LEVEL
4891 Specifies the level-of-detail number. Level 0 is the base image
4892 level. Level N is the Nth mipmap reduction image.
4893
4894 INTERNALFORMAT
4895 Specifies the internal format of the texture. Must be one of the
4896 following symbolic constants: `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4897 `GL_ALPHA12', `GL_ALPHA16', `GL_COMPRESSED_ALPHA',
4898 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
4899 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB',
4900 `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
4901 `GL_DEPTH_COMPONENT24', `GL_DEPTH_COMPONENT32', `GL_LUMINANCE',
4902 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4903 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4904 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4905 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4906 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4907 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_RGB',
4908 `GL_R3_G3_B2', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10',
4909 `GL_RGB12', `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4',
4910 `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
4911 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
4912 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
4913 `GL_SRGB8_ALPHA8'.
4914
4915 X
4916 Y
4917
4918 Specify the window coordinates of the lower left corner of the
4919 rectangular region of pixels to be copied.
4920
4921 WIDTH
4922 Specifies the width of the texture image. Must be 0 or
4923 2^N+2\u2061(BORDER,) for some integer N .
4924
4925 HEIGHT
4926 Specifies the height of the texture image. Must be 0 or
4927 2^M+2\u2061(BORDER,) for some integer M .
4928
4929 BORDER
4930 Specifies the width of the border. Must be either 0 or 1.
4931
4932 `glCopyTexImage2D' defines a two-dimensional texture image, or cube-map
4933 texture image with pixels from the current `GL_READ_BUFFER'.
4934
4935 The screen-aligned pixel rectangle with lower left corner at (X, Y) and
4936 with a width of WIDTH+2\u2061(BORDER,) and a height of HEIGHT+2\u2061(BORDER,)
4937 defines the texture array at the mipmap level specified by LEVEL.
4938 INTERNALFORMAT specifies the internal format of the texture array.
4939
4940 The pixels in the rectangle are processed exactly as if `glCopyPixels'
4941 had been called, but the process stops just before final conversion. At
4942 this point all pixel component values are clamped to the range [0,1] and
4943 then converted to the texture's internal format for storage in the texel
4944 array.
4945
4946 Pixel ordering is such that lower X and Y screen coordinates correspond
4947 to lower S and T texture coordinates.
4948
4949 If any of the pixels within the specified rectangle of the current
4950 `GL_READ_BUFFER' are outside the window associated with the current
4951 rendering context, then the values obtained for those pixels are
4952 undefined.
4953
4954 When INTERNALFORMAT is one of the sRGB types, the GL does not
4955 automatically convert the source pixels to the sRGB color space. In this
4956 case, the `glPixelMap' function can be used to accomplish the
4957 conversion.
4958
4959 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
4960 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4961 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4962 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4963
4964 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4965
4966 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2\u2062MAX ,
4967 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
4968
4969 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
4970 2 + `GL_MAX_TEXTURE_SIZE'.
4971
4972 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
4973 supported and the WIDTH or DEPTH cannot be represented as
4974 2^K+2\u2061(BORDER,) for some integer K .
4975
4976 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
4977
4978 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not an accepted
4979 format.
4980
4981 `GL_INVALID_OPERATION' is generated if `glCopyTexImage2D' is executed
4982 between the execution of `glBegin' and the corresponding execution of
4983 `glEnd'.
4984
4985 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
4986 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
4987 `GL_DEPTH_COMPONENT32' and there is no depth buffer.")
4988
4989 (define-gl-procedures
4990 ((glCopyTexSubImage1D
4991 (target GLenum)
4992 (level GLint)
4993 (xoffset GLint)
4994 (x GLint)
4995 (y GLint)
4996 (width GLsizei)
4997 ->
4998 void))
4999 "Copy a one-dimensional texture subimage.
5000
5001 TARGET
5002 Specifies the target texture. Must be `GL_TEXTURE_1D'.
5003
5004 LEVEL
5005 Specifies the level-of-detail number. Level 0 is the base image
5006 level. Level N is the Nth mipmap reduction image.
5007
5008 XOFFSET
5009 Specifies the texel offset within the texture array.
5010
5011 X
5012 Y
5013
5014 Specify the window coordinates of the left corner of the row of
5015 pixels to be copied.
5016
5017 WIDTH
5018 Specifies the width of the texture subimage.
5019
5020 `glCopyTexSubImage1D' replaces a portion of a one-dimensional texture
5021 image with pixels from the current `GL_READ_BUFFER' (rather than from
5022 main memory, as is the case for `glTexSubImage1D').
5023
5024 The screen-aligned pixel row with left corner at (X,\\ Y), and with
5025 length WIDTH replaces the portion of the texture array with x indices
5026 XOFFSET through XOFFSET+WIDTH-1 , inclusive. The destination in the
5027 texture array may not include any texels outside the texture array as it
5028 was originally specified.
5029
5030 The pixels in the row are processed exactly as if `glCopyPixels' had
5031 been called, but the process stops just before final conversion. At this
5032 point, all pixel component values are clamped to the range [0,1] and
5033 then converted to the texture's internal format for storage in the texel
5034 array.
5035
5036 It is not an error to specify a subtexture with zero width, but such a
5037 specification has no effect. If any of the pixels within the specified
5038 row of the current `GL_READ_BUFFER' are outside the read window
5039 associated with the current rendering context, then the values obtained
5040 for those pixels are undefined.
5041
5042 No change is made to the INTERNALFORMAT, WIDTH, or BORDER parameters of
5043 the specified texture array or to texel values outside the specified
5044 subregion.
5045
5046 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_1D'.
5047
5048 `GL_INVALID_OPERATION' is generated if the texture array has not been
5049 defined by a previous `glTexImage1D' or `glCopyTexImage1D' operation.
5050
5051 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
5052
5053 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
5054 the returned value of `GL_MAX_TEXTURE_SIZE'.
5055
5056 `GL_INVALID_VALUE' is generated if XOFFSET<-B , or
5057 (XOFFSET+WIDTH,)>(W-B,) , where W is the `GL_TEXTURE_WIDTH' and B is the
5058 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W
5059 includes twice the border width.")
5060
5061 (define-gl-procedures
5062 ((glCopyTexSubImage2D
5063 (target GLenum)
5064 (level GLint)
5065 (xoffset GLint)
5066 (yoffset GLint)
5067 (x GLint)
5068 (y GLint)
5069 (width GLsizei)
5070 (height GLsizei)
5071 ->
5072 void))
5073 "Copy a two-dimensional texture subimage.
5074
5075 TARGET
5076 Specifies the target texture. Must be `GL_TEXTURE_2D',
5077 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
5078 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
5079 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
5080 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
5081
5082 LEVEL
5083 Specifies the level-of-detail number. Level 0 is the base image
5084 level. Level N is the Nth mipmap reduction image.
5085
5086 XOFFSET
5087 Specifies a texel offset in the x direction within the texture
5088 array.
5089
5090 YOFFSET
5091 Specifies a texel offset in the y direction within the texture
5092 array.
5093
5094 X
5095 Y
5096
5097 Specify the window coordinates of the lower left corner of the
5098 rectangular region of pixels to be copied.
5099
5100 WIDTH
5101 Specifies the width of the texture subimage.
5102
5103 HEIGHT
5104 Specifies the height of the texture subimage.
5105
5106 `glCopyTexSubImage2D' replaces a rectangular portion of a
5107 two-dimensional texture image or cube-map texture image with pixels from
5108 the current `GL_READ_BUFFER' (rather than from main memory, as is the
5109 case for `glTexSubImage2D').
5110
5111 The screen-aligned pixel rectangle with lower left corner at (X,Y) and
5112 with width WIDTH and height HEIGHT replaces the portion of the texture
5113 array with x indices XOFFSET through XOFFSET+WIDTH-1 , inclusive, and y
5114 indices YOFFSET through YOFFSET+HEIGHT-1 , inclusive, at the mipmap
5115 level specified by LEVEL.
5116
5117 The pixels in the rectangle are processed exactly as if `glCopyPixels'
5118 had been called, but the process stops just before final conversion. At
5119 this point, all pixel component values are clamped to the range [0,1]
5120 and then converted to the texture's internal format for storage in the
5121 texel array.
5122
5123 The destination rectangle in the texture array may not include any
5124 texels outside the texture array as it was originally specified. It is
5125 not an error to specify a subtexture with zero width or height, but such
5126 a specification has no effect.
5127
5128 If any of the pixels within the specified rectangle of the current
5129 `GL_READ_BUFFER' are outside the read window associated with the current
5130 rendering context, then the values obtained for those pixels are
5131 undefined.
5132
5133 No change is made to the INTERNALFORMAT, WIDTH, HEIGHT, or BORDER
5134 parameters of the specified texture array or to texel values outside the
5135 specified subregion.
5136
5137 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
5138 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
5139 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
5140 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
5141
5142 `GL_INVALID_OPERATION' is generated if the texture array has not been
5143 defined by a previous `glTexImage2D' or `glCopyTexImage2D' operation.
5144
5145 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
5146
5147 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
5148 the returned value of `GL_MAX_TEXTURE_SIZE'.
5149
5150 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
5151 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , where W is the
5152 `GL_TEXTURE_WIDTH', H is the `GL_TEXTURE_HEIGHT', and B is the
5153 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W and
5154 H include twice the border width.
5155
5156 `GL_INVALID_OPERATION' is generated if `glCopyTexSubImage2D' is executed
5157 between the execution of `glBegin' and the corresponding execution of
5158 `glEnd'.")
5159
5160 (define-gl-procedures
5161 ((glCopyTexSubImage3D
5162 (target GLenum)
5163 (level GLint)
5164 (xoffset GLint)
5165 (yoffset GLint)
5166 (zoffset GLint)
5167 (x GLint)
5168 (y GLint)
5169 (width GLsizei)
5170 (height GLsizei)
5171 ->
5172 void))
5173 "Copy a three-dimensional texture subimage.
5174
5175 TARGET
5176 Specifies the target texture. Must be `GL_TEXTURE_3D'
5177
5178 LEVEL
5179 Specifies the level-of-detail number. Level 0 is the base image
5180 level. Level N is the Nth mipmap reduction image.
5181
5182 XOFFSET
5183 Specifies a texel offset in the x direction within the texture
5184 array.
5185
5186 YOFFSET
5187 Specifies a texel offset in the y direction within the texture
5188 array.
5189
5190 ZOFFSET
5191 Specifies a texel offset in the z direction within the texture
5192 array.
5193
5194 X
5195 Y
5196
5197 Specify the window coordinates of the lower left corner of the
5198 rectangular region of pixels to be copied.
5199
5200 WIDTH
5201 Specifies the width of the texture subimage.
5202
5203 HEIGHT
5204 Specifies the height of the texture subimage.
5205
5206 `glCopyTexSubImage3D' replaces a rectangular portion of a
5207 three-dimensional texture image with pixels from the current
5208 `GL_READ_BUFFER' (rather than from main memory, as is the case for
5209 `glTexSubImage3D').
5210
5211 The screen-aligned pixel rectangle with lower left corner at (X,\\ Y) and
5212 with width WIDTH and height HEIGHT replaces the portion of the texture
5213 array with x indices XOFFSET through XOFFSET+WIDTH-1 , inclusive, and y
5214 indices YOFFSET through YOFFSET+HEIGHT-1 , inclusive, at z index ZOFFSET
5215 and at the mipmap level specified by LEVEL.
5216
5217 The pixels in the rectangle are processed exactly as if `glCopyPixels'
5218 had been called, but the process stops just before final conversion. At
5219 this point, all pixel component values are clamped to the range [0,1]
5220 and then converted to the texture's internal format for storage in the
5221 texel array.
5222
5223 The destination rectangle in the texture array may not include any
5224 texels outside the texture array as it was originally specified. It is
5225 not an error to specify a subtexture with zero width or height, but such
5226 a specification has no effect.
5227
5228 If any of the pixels within the specified rectangle of the current
5229 `GL_READ_BUFFER' are outside the read window associated with the current
5230 rendering context, then the values obtained for those pixels are
5231 undefined.
5232
5233 No change is made to the INTERNALFORMAT, WIDTH, HEIGHT, DEPTH, or BORDER
5234 parameters of the specified texture array or to texel values outside the
5235 specified subregion.
5236
5237 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_3D'.
5238
5239 `GL_INVALID_OPERATION' is generated if the texture array has not been
5240 defined by a previous `glTexImage3D' operation.
5241
5242 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
5243
5244 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
5245 the returned value of `GL_MAX_3D_TEXTURE_SIZE'.
5246
5247 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
5248 , YOFFSET<-B , (YOFFSET+HEIGHT,)>(H-B,) , ZOFFSET<-B , or
5249 (ZOFFSET+1,)>(D-B,) , where W is the `GL_TEXTURE_WIDTH', H is the
5250 `GL_TEXTURE_HEIGHT', D is the `GL_TEXTURE_DEPTH', and B is the
5251 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W , H
5252 , and D include twice the border width.
5253
5254 `GL_INVALID_OPERATION' is generated if `glCopyTexSubImage3D' is executed
5255 between the execution of `glBegin' and the corresponding execution of
5256 `glEnd'.")
5257
5258 (define-gl-procedures
5259 ((glCreateProgram -> GLuint))
5260 "Creates a program object.
5261
5262 `glCreateProgram' creates an empty program object and returns a non-zero
5263 value by which it can be referenced. A program object is an object to
5264 which shader objects can be attached. This provides a mechanism to
5265 specify the shader objects that will be linked to create a program. It
5266 also provides a means for checking the compatibility of the shaders that
5267 will be used to create a program (for instance, checking the
5268 compatibility between a vertex shader and a fragment shader). When no
5269 longer needed as part of a program object, shader objects can be
5270 detached.
5271
5272 One or more executables are created in a program object by successfully
5273 attaching shader objects to it with `glAttachShader', successfully
5274 compiling the shader objects with `glCompileShader', and successfully
5275 linking the program object with `glLinkProgram'. These executables are
5276 made part of current state when `glUseProgram' is called. Program
5277 objects can be deleted by calling `glDeleteProgram'. The memory
5278 associated with the program object will be deleted when it is no longer
5279 part of current rendering state for any context.
5280
5281 This function returns 0 if an error occurs creating the program object.
5282
5283 `GL_INVALID_OPERATION' is generated if `glCreateProgram' is executed
5284 between the execution of `glBegin' and the corresponding execution of
5285 `glEnd'.")
5286
5287 (define-gl-procedures
5288 ((glCreateShader (shaderType GLenum) -> GLuint))
5289 "Creates a shader object.
5290
5291 SHADERTYPE
5292 Specifies the type of shader to be created. Must be either
5293 `GL_VERTEX_SHADER' or `GL_FRAGMENT_SHADER'.
5294
5295 `glCreateShader' creates an empty shader object and returns a non-zero
5296 value by which it can be referenced. A shader object is used to maintain
5297 the source code strings that define a shader. SHADERTYPE indicates the
5298 type of shader to be created. Two types of shaders are supported. A
5299 shader of type `GL_VERTEX_SHADER' is a shader that is intended to run on
5300 the programmable vertex processor and replace the fixed functionality
5301 vertex processing in OpenGL. A shader of type `GL_FRAGMENT_SHADER' is a
5302 shader that is intended to run on the programmable fragment processor
5303 and replace the fixed functionality fragment processing in OpenGL.
5304
5305 When created, a shader object's `GL_SHADER_TYPE' parameter is set to
5306 either `GL_VERTEX_SHADER' or `GL_FRAGMENT_SHADER', depending on the
5307 value of SHADERTYPE.
5308
5309 This function returns 0 if an error occurs creating the shader object.
5310
5311 `GL_INVALID_ENUM' is generated if SHADERTYPE is not an accepted value.
5312
5313 `GL_INVALID_OPERATION' is generated if `glCreateShader' is executed
5314 between the execution of `glBegin' and the corresponding execution of
5315 `glEnd'.")
5316
5317 (define-gl-procedures
5318 ((glCullFace (mode GLenum) -> void))
5319 "Specify whether front- or back-facing facets can be culled.
5320
5321 MODE
5322 Specifies whether front- or back-facing facets are candidates for
5323 culling. Symbolic constants `GL_FRONT', `GL_BACK', and
5324 `GL_FRONT_AND_BACK' are accepted. The initial value is `GL_BACK'.
5325
5326 `glCullFace' specifies whether front- or back-facing facets are culled
5327 (as specified by MODE) when facet culling is enabled. Facet culling is
5328 initially disabled. To enable and disable facet culling, call the
5329 `glEnable' and `glDisable' commands with the argument `GL_CULL_FACE'.
5330 Facets include triangles, quadrilaterals, polygons, and rectangles.
5331
5332 `glFrontFace' specifies which of the clockwise and counterclockwise
5333 facets are front-facing and back-facing. See `glFrontFace'.
5334
5335 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5336
5337 `GL_INVALID_OPERATION' is generated if `glCullFace' is executed between
5338 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5339
5340 (define-gl-procedures
5341 ((glDeleteBuffers
5342 (n GLsizei)
5343 (buffers const-GLuint-*)
5344 ->
5345 void))
5346 "Delete named buffer objects.
5347
5348 N
5349 Specifies the number of buffer objects to be deleted.
5350
5351 BUFFERS
5352 Specifies an array of buffer objects to be deleted.
5353
5354 `glDeleteBuffers' deletes N buffer objects named by the elements of the
5355 array BUFFERS. After a buffer object is deleted, it has no contents, and
5356 its name is free for reuse (for example by `glGenBuffers'). If a buffer
5357 object that is currently bound is deleted, the binding reverts to 0 (the
5358 absence of any buffer object, which reverts to client memory usage).
5359
5360 `glDeleteBuffers' silently ignores 0's and names that do not correspond
5361 to existing buffer objects.
5362
5363 `GL_INVALID_VALUE' is generated if N is negative.
5364
5365 `GL_INVALID_OPERATION' is generated if `glDeleteBuffers' is executed
5366 between the execution of `glBegin' and the corresponding execution of
5367 `glEnd'.")
5368
5369 (define-gl-procedures
5370 ((glDeleteLists
5371 (list GLuint)
5372 (range GLsizei)
5373 ->
5374 void))
5375 "Delete a contiguous group of display lists.
5376
5377 LIST
5378 Specifies the integer name of the first display list to delete.
5379
5380 RANGE
5381 Specifies the number of display lists to delete.
5382
5383 `glDeleteLists' causes a contiguous group of display lists to be
5384 deleted. LIST is the name of the first display list to be deleted, and
5385 RANGE is the number of display lists to delete. All display lists D with
5386 LIST<=D<=LIST+RANGE-1 are deleted.
5387
5388 All storage locations allocated to the specified display lists are
5389 freed, and the names are available for reuse at a later time. Names
5390 within the range that do not have an associated display list are
5391 ignored. If RANGE is 0, nothing happens.
5392
5393 `GL_INVALID_VALUE' is generated if RANGE is negative.
5394
5395 `GL_INVALID_OPERATION' is generated if `glDeleteLists' is executed
5396 between the execution of `glBegin' and the corresponding execution of
5397 `glEnd'.")
5398
5399 (define-gl-procedures
5400 ((glDeleteProgram (program GLuint) -> void))
5401 "Deletes a program object.
5402
5403 PROGRAM
5404 Specifies the program object to be deleted.
5405
5406 `glDeleteProgram' frees the memory and invalidates the name associated
5407 with the program object specified by PROGRAM. This command effectively
5408 undoes the effects of a call to `glCreateProgram'.
5409
5410 If a program object is in use as part of current rendering state, it
5411 will be flagged for deletion, but it will not be deleted until it is no
5412 longer part of current state for any rendering context. If a program
5413 object to be deleted has shader objects attached to it, those shader
5414 objects will be automatically detached but not deleted unless they have
5415 already been flagged for deletion by a previous call to
5416 `glDeleteShader'. A value of 0 for PROGRAM will be silently ignored.
5417
5418 To determine whether a program object has been flagged for deletion,
5419 call `glGetProgram' with arguments PROGRAM and `GL_DELETE_STATUS'.
5420
5421 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
5422 OpenGL.
5423
5424 `GL_INVALID_OPERATION' is generated if `glDeleteProgram' is executed
5425 between the execution of `glBegin' and the corresponding execution of
5426 `glEnd'.")
5427
5428 (define-gl-procedures
5429 ((glDeleteQueries
5430 (n GLsizei)
5431 (ids const-GLuint-*)
5432 ->
5433 void))
5434 "Delete named query objects.
5435
5436 N
5437 Specifies the number of query objects to be deleted.
5438
5439 IDS
5440 Specifies an array of query objects to be deleted.
5441
5442 `glDeleteQueries' deletes N query objects named by the elements of the
5443 array IDS. After a query object is deleted, it has no contents, and its
5444 name is free for reuse (for example by `glGenQueries').
5445
5446 `glDeleteQueries' silently ignores 0's and names that do not correspond
5447 to existing query objects.
5448
5449 `GL_INVALID_VALUE' is generated if N is negative.
5450
5451 `GL_INVALID_OPERATION' is generated if `glDeleteQueries' is executed
5452 between the execution of `glBegin' and the corresponding execution of
5453 `glEnd'.")
5454
5455 (define-gl-procedures
5456 ((glDeleteShader (shader GLuint) -> void))
5457 "Deletes a shader object.
5458
5459 SHADER
5460 Specifies the shader object to be deleted.
5461
5462 `glDeleteShader' frees the memory and invalidates the name associated
5463 with the shader object specified by SHADER. This command effectively
5464 undoes the effects of a call to `glCreateShader'.
5465
5466 If a shader object to be deleted is attached to a program object, it
5467 will be flagged for deletion, but it will not be deleted until it is no
5468 longer attached to any program object, for any rendering context (i.e.,
5469 it must be detached from wherever it was attached before it will be
5470 deleted). A value of 0 for SHADER will be silently ignored.
5471
5472 To determine whether an object has been flagged for deletion, call
5473 `glGetShader' with arguments SHADER and `GL_DELETE_STATUS'.
5474
5475 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
5476 OpenGL.
5477
5478 `GL_INVALID_OPERATION' is generated if `glDeleteShader' is executed
5479 between the execution of `glBegin' and the corresponding execution of
5480 `glEnd'.")
5481
5482 (define-gl-procedures
5483 ((glDeleteTextures
5484 (n GLsizei)
5485 (textures const-GLuint-*)
5486 ->
5487 void))
5488 "Delete named textures.
5489
5490 N
5491 Specifies the number of textures to be deleted.
5492
5493 TEXTURES
5494 Specifies an array of textures to be deleted.
5495
5496 `glDeleteTextures' deletes N textures named by the elements of the array
5497 TEXTURES. After a texture is deleted, it has no contents or
5498 dimensionality, and its name is free for reuse (for example by
5499 `glGenTextures'). If a texture that is currently bound is deleted, the
5500 binding reverts to 0 (the default texture).
5501
5502 `glDeleteTextures' silently ignores 0's and names that do not correspond
5503 to existing textures.
5504
5505 `GL_INVALID_VALUE' is generated if N is negative.
5506
5507 `GL_INVALID_OPERATION' is generated if `glDeleteTextures' is executed
5508 between the execution of `glBegin' and the corresponding execution of
5509 `glEnd'.")
5510
5511 (define-gl-procedures
5512 ((glDepthFunc (func GLenum) -> void))
5513 "Specify the value used for depth buffer comparisons.
5514
5515 FUNC
5516 Specifies the depth comparison function. Symbolic constants
5517 `GL_NEVER', `GL_LESS', `GL_EQUAL', `GL_LEQUAL', `GL_GREATER',
5518 `GL_NOTEQUAL', `GL_GEQUAL', and `GL_ALWAYS' are accepted. The
5519 initial value is `GL_LESS'.
5520
5521 `glDepthFunc' specifies the function used to compare each incoming pixel
5522 depth value with the depth value present in the depth buffer. The
5523 comparison is performed only if depth testing is enabled. (See
5524 `glEnable' and `glDisable' of `GL_DEPTH_TEST'.)
5525
5526 FUNC specifies the conditions under which the pixel will be drawn. The
5527 comparison functions are as follows:
5528
5529 `GL_NEVER'
5530 Never passes.
5531
5532 `GL_LESS'
5533 Passes if the incoming depth value is less than the stored depth
5534 value.
5535
5536 `GL_EQUAL'
5537 Passes if the incoming depth value is equal to the stored depth
5538 value.
5539
5540 `GL_LEQUAL'
5541 Passes if the incoming depth value is less than or equal to the
5542 stored depth value.
5543
5544 `GL_GREATER'
5545 Passes if the incoming depth value is greater than the stored depth
5546 value.
5547
5548 `GL_NOTEQUAL'
5549 Passes if the incoming depth value is not equal to the stored depth
5550 value.
5551
5552 `GL_GEQUAL'
5553 Passes if the incoming depth value is greater than or equal to the
5554 stored depth value.
5555
5556 `GL_ALWAYS'
5557 Always passes.
5558
5559 The initial value of FUNC is `GL_LESS'. Initially, depth testing is
5560 disabled. If depth testing is disabled or if no depth buffer exists, it
5561 is as if the depth test always passes.
5562
5563 `GL_INVALID_ENUM' is generated if FUNC is not an accepted value.
5564
5565 `GL_INVALID_OPERATION' is generated if `glDepthFunc' is executed between
5566 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5567
5568 (define-gl-procedures
5569 ((glDepthMask (flag GLboolean) -> void))
5570 "Enable or disable writing into the depth buffer.
5571
5572 FLAG
5573 Specifies whether the depth buffer is enabled for writing. If FLAG
5574 is `GL_FALSE', depth buffer writing is disabled. Otherwise, it is
5575 enabled. Initially, depth buffer writing is enabled.
5576
5577 `glDepthMask' specifies whether the depth buffer is enabled for writing.
5578 If FLAG is `GL_FALSE', depth buffer writing is disabled. Otherwise, it
5579 is enabled. Initially, depth buffer writing is enabled.
5580
5581 `GL_INVALID_OPERATION' is generated if `glDepthMask' is executed between
5582 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5583
5584 (define-gl-procedures
5585 ((glDepthRange
5586 (nearVal GLclampd)
5587 (farVal GLclampd)
5588 ->
5589 void))
5590 "Specify mapping of depth values from normalized device coordinates to
5591 window coordinates.
5592
5593 NEARVAL
5594 Specifies the mapping of the near clipping plane to window
5595 coordinates. The initial value is 0.
5596
5597 FARVAL
5598 Specifies the mapping of the far clipping plane to window
5599 coordinates. The initial value is 1.
5600
5601 After clipping and division by W, depth coordinates range from -1 to 1,
5602 corresponding to the near and far clipping planes. `glDepthRange'
5603 specifies a linear mapping of the normalized depth coordinates in this
5604 range to window depth coordinates. Regardless of the actual depth buffer
5605 implementation, window coordinate depth values are treated as though
5606 they range from 0 through 1 (like color components). Thus, the values
5607 accepted by `glDepthRange' are both clamped to this range before they
5608 are accepted.
5609
5610 The setting of (0,1) maps the near plane to 0 and the far plane to 1.
5611 With this mapping, the depth buffer range is fully utilized.
5612
5613 `GL_INVALID_OPERATION' is generated if `glDepthRange' is executed
5614 between the execution of `glBegin' and the corresponding execution of
5615 `glEnd'.")
5616
5617 (define-gl-procedures
5618 ((glDetachShader
5619 (program GLuint)
5620 (shader GLuint)
5621 ->
5622 void))
5623 "Detaches a shader object from a program object to which it is attached.
5624
5625 PROGRAM
5626 Specifies the program object from which to detach the shader
5627 object.
5628
5629 SHADER
5630 Specifies the shader object to be detached.
5631
5632 `glDetachShader' detaches the shader object specified by SHADER from the
5633 program object specified by PROGRAM. This command can be used to undo
5634 the effect of the command `glAttachShader'.
5635
5636 If SHADER has already been flagged for deletion by a call to
5637 `glDeleteShader' and it is not attached to any other program object, it
5638 will be deleted after it has been detached.
5639
5640 `GL_INVALID_VALUE' is generated if either PROGRAM or SHADER is a value
5641 that was not generated by OpenGL.
5642
5643 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
5644
5645 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
5646
5647 `GL_INVALID_OPERATION' is generated if SHADER is not attached to
5648 PROGRAM.
5649
5650 `GL_INVALID_OPERATION' is generated if `glDetachShader' is executed
5651 between the execution of `glBegin' and the corresponding execution of
5652 `glEnd'.")
5653
5654 (define-gl-procedures
5655 ((glDrawArrays
5656 (mode GLenum)
5657 (first GLint)
5658 (count GLsizei)
5659 ->
5660 void))
5661 "Render primitives from array data.
5662
5663 MODE
5664 Specifies what kind of primitives to render. Symbolic constants
5665 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
5666 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
5667 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
5668
5669 FIRST
5670 Specifies the starting index in the enabled arrays.
5671
5672 COUNT
5673 Specifies the number of indices to be rendered.
5674
5675 `glDrawArrays' specifies multiple geometric primitives with very few
5676 subroutine calls. Instead of calling a GL procedure to pass each
5677 individual vertex, normal, texture coordinate, edge flag, or color, you
5678 can prespecify separate arrays of vertices, normals, and colors and use
5679 them to construct a sequence of primitives with a single call to
5680 `glDrawArrays'.
5681
5682 When `glDrawArrays' is called, it uses COUNT sequential elements from
5683 each enabled array to construct a sequence of geometric primitives,
5684 beginning with element FIRST. MODE specifies what kind of primitives are
5685 constructed and how the array elements construct those primitives. If
5686 `GL_VERTEX_ARRAY' is not enabled, no geometric primitives are generated.
5687
5688 Vertex attributes that are modified by `glDrawArrays' have an
5689 unspecified value after `glDrawArrays' returns. For example, if
5690 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
5691 after `glDrawArrays' executes. Attributes that aren't modified remain
5692 well defined.
5693
5694 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5695
5696 `GL_INVALID_VALUE' is generated if COUNT is negative.
5697
5698 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5699 bound to an enabled array and the buffer object's data store is
5700 currently mapped.
5701
5702 `GL_INVALID_OPERATION' is generated if `glDrawArrays' is executed
5703 between the execution of `glBegin' and the corresponding `glEnd'.")
5704
5705 (define-gl-procedures
5706 ((glDrawBuffers
5707 (n GLsizei)
5708 (bufs const-GLenum-*)
5709 ->
5710 void))
5711 "Specifies a list of color buffers to be drawn into.
5712
5713 N
5714 Specifies the number of buffers in BUFS.
5715
5716 BUFS
5717 Points to an array of symbolic constants specifying the buffers
5718 into which fragment colors or data values will be written.
5719
5720 `glDrawBuffers' defines an array of buffers into which fragment color
5721 values or fragment data will be written. If no fragment shader is
5722 active, rendering operations will generate only one fragment color per
5723 fragment and it will be written into each of the buffers specified by
5724 BUFS. If a fragment shader is active and it writes a value to the output
5725 variable `gl_FragColor', then that value will be written into each of
5726 the buffers specified by BUFS. If a fragment shader is active and it
5727 writes a value to one or more elements of the output array variable
5728 `gl_FragData[]', then the value of `gl_FragData[0] ' will be written
5729 into the first buffer specified by BUFS, the value of `gl_FragData[1] '
5730 will be written into the second buffer specified by BUFS, and so on up
5731 to `gl_FragData[n-1]'. The draw buffer used for `gl_FragData[n]' and
5732 beyond is implicitly set to be `GL_NONE'.
5733
5734 The symbolic constants contained in BUFS may be any of the following:
5735
5736 `GL_NONE'
5737 The fragment color/data value is not written into any color buffer.
5738
5739 `GL_FRONT_LEFT'
5740 The fragment color/data value is written into the front left color
5741 buffer.
5742
5743 `GL_FRONT_RIGHT'
5744 The fragment color/data value is written into the front right color
5745 buffer.
5746
5747 `GL_BACK_LEFT'
5748 The fragment color/data value is written into the back left color
5749 buffer.
5750
5751 `GL_BACK_RIGHT'
5752 The fragment color/data value is written into the back right color
5753 buffer.
5754
5755 `GL_AUXi'
5756 The fragment color/data value is written into auxiliary buffer `i'.
5757
5758 Except for `GL_NONE', the preceding symbolic constants may not appear
5759 more than once in BUFS. The maximum number of draw buffers supported is
5760 implementation dependent and can be queried by calling `glGet' with the
5761 argument `GL_MAX_DRAW_BUFFERS'. The number of auxiliary buffers can be
5762 queried by calling `glGet' with the argument `GL_AUX_BUFFERS'.
5763
5764 `GL_INVALID_ENUM' is generated if one of the values in BUFS is not an
5765 accepted value.
5766
5767 `GL_INVALID_ENUM' is generated if N is less than 0.
5768
5769 `GL_INVALID_OPERATION' is generated if a symbolic constant other than
5770 `GL_NONE' appears more than once in BUFS.
5771
5772 `GL_INVALID_OPERATION' is generated if any of the entries in BUFS (other
5773 than `GL_NONE' ) indicates a color buffer that does not exist in the
5774 current GL context.
5775
5776 `GL_INVALID_VALUE' is generated if N is greater than
5777 `GL_MAX_DRAW_BUFFERS'.
5778
5779 `GL_INVALID_OPERATION' is generated if `glDrawBuffers' is executed
5780 between the execution of `glBegin' and the corresponding execution of
5781 `glEnd'.")
5782
5783 (define-gl-procedures
5784 ((glDrawBuffer (mode GLenum) -> void))
5785 "Specify which color buffers are to be drawn into.
5786
5787 MODE
5788 Specifies up to four color buffers to be drawn into. Symbolic
5789 constants `GL_NONE', `GL_FRONT_LEFT', `GL_FRONT_RIGHT',
5790 `GL_BACK_LEFT', `GL_BACK_RIGHT', `GL_FRONT', `GL_BACK', `GL_LEFT',
5791 `GL_RIGHT', `GL_FRONT_AND_BACK', and `GL_AUX'I, where I is between
5792 0 and the value of `GL_AUX_BUFFERS' minus 1, are accepted.
5793 (`GL_AUX_BUFFERS' is not the upper limit; use `glGet' to query the
5794 number of available aux buffers.) The initial value is `GL_FRONT'
5795 for single-buffered contexts, and `GL_BACK' for double-buffered
5796 contexts.
5797
5798 When colors are written to the frame buffer, they are written into the
5799 color buffers specified by `glDrawBuffer'. The specifications are as
5800 follows:
5801
5802 `GL_NONE'
5803 No color buffers are written.
5804
5805 `GL_FRONT_LEFT'
5806 Only the front left color buffer is written.
5807
5808 `GL_FRONT_RIGHT'
5809 Only the front right color buffer is written.
5810
5811 `GL_BACK_LEFT'
5812 Only the back left color buffer is written.
5813
5814 `GL_BACK_RIGHT'
5815 Only the back right color buffer is written.
5816
5817 `GL_FRONT'
5818 Only the front left and front right color buffers are written. If
5819 there is no front right color buffer, only the front left color
5820 buffer is written.
5821
5822 `GL_BACK'
5823 Only the back left and back right color buffers are written. If
5824 there is no back right color buffer, only the back left color
5825 buffer is written.
5826
5827 `GL_LEFT'
5828 Only the front left and back left color buffers are written. If
5829 there is no back left color buffer, only the front left color
5830 buffer is written.
5831
5832 `GL_RIGHT'
5833 Only the front right and back right color buffers are written. If
5834 there is no back right color buffer, only the front right color
5835 buffer is written.
5836
5837 `GL_FRONT_AND_BACK'
5838 All the front and back color buffers (front left, front right, back
5839 left, back right) are written. If there are no back color buffers,
5840 only the front left and front right color buffers are written. If
5841 there are no right color buffers, only the front left and back left
5842 color buffers are written. If there are no right or back color
5843 buffers, only the front left color buffer is written.
5844
5845 `GL_AUX'I
5846 Only auxiliary color buffer I is written.
5847
5848 If more than one color buffer is selected for drawing, then blending or
5849 logical operations are computed and applied independently for each color
5850 buffer and can produce different results in each buffer.
5851
5852 Monoscopic contexts include only LEFT buffers, and stereoscopic contexts
5853 include both LEFT and RIGHT buffers. Likewise, single-buffered contexts
5854 include only FRONT buffers, and double-buffered contexts include both
5855 FRONT and BACK buffers. The context is selected at GL initialization.
5856
5857 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5858
5859 `GL_INVALID_OPERATION' is generated if none of the buffers indicated by
5860 MODE exists.
5861
5862 `GL_INVALID_OPERATION' is generated if `glDrawBuffer' is executed
5863 between the execution of `glBegin' and the corresponding execution of
5864 `glEnd'.")
5865
5866 (define-gl-procedures
5867 ((glDrawElements
5868 (mode GLenum)
5869 (count GLsizei)
5870 (type GLenum)
5871 (indices const-GLvoid-*)
5872 ->
5873 void))
5874 "Render primitives from array data.
5875
5876 MODE
5877 Specifies what kind of primitives to render. Symbolic constants
5878 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
5879 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
5880 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
5881
5882 COUNT
5883 Specifies the number of elements to be rendered.
5884
5885 TYPE
5886 Specifies the type of the values in INDICES. Must be one of
5887 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
5888
5889 INDICES
5890 Specifies a pointer to the location where the indices are stored.
5891
5892 `glDrawElements' specifies multiple geometric primitives with very few
5893 subroutine calls. Instead of calling a GL function to pass each
5894 individual vertex, normal, texture coordinate, edge flag, or color, you
5895 can prespecify separate arrays of vertices, normals, and so on, and use
5896 them to construct a sequence of primitives with a single call to
5897 `glDrawElements'.
5898
5899 When `glDrawElements' is called, it uses COUNT sequential elements from
5900 an enabled array, starting at INDICES to construct a sequence of
5901 geometric primitives. MODE specifies what kind of primitives are
5902 constructed and how the array elements construct these primitives. If
5903 more than one array is enabled, each is used. If `GL_VERTEX_ARRAY' is
5904 not enabled, no geometric primitives are constructed.
5905
5906 Vertex attributes that are modified by `glDrawElements' have an
5907 unspecified value after `glDrawElements' returns. For example, if
5908 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
5909 after `glDrawElements' executes. Attributes that aren't modified
5910 maintain their previous values.
5911
5912 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5913
5914 `GL_INVALID_VALUE' is generated if COUNT is negative.
5915
5916 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5917 bound to an enabled array or the element array and the buffer object's
5918 data store is currently mapped.
5919
5920 `GL_INVALID_OPERATION' is generated if `glDrawElements' is executed
5921 between the execution of `glBegin' and the corresponding `glEnd'.")
5922
5923 (define-gl-procedures
5924 ((glDrawPixels
5925 (width GLsizei)
5926 (height GLsizei)
5927 (format GLenum)
5928 (type GLenum)
5929 (data const-GLvoid-*)
5930 ->
5931 void))
5932 "Write a block of pixels to the frame buffer.
5933
5934 WIDTH
5935 HEIGHT
5936
5937 Specify the dimensions of the pixel rectangle to be written into
5938 the frame buffer.
5939
5940 FORMAT
5941 Specifies the format of the pixel data. Symbolic constants
5942 `GL_COLOR_INDEX', `GL_STENCIL_INDEX', `GL_DEPTH_COMPONENT',
5943 `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_RED', `GL_GREEN',
5944 `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA' are
5945 accepted.
5946
5947 TYPE
5948 Specifies the data type for DATA. Symbolic constants
5949 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
5950 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
5951 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
5952 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
5953 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
5954 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
5955 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
5956 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
5957 are accepted.
5958
5959 DATA
5960 Specifies a pointer to the pixel data.
5961
5962 `glDrawPixels' reads pixel data from memory and writes it into the frame
5963 buffer relative to the current raster position, provided that the raster
5964 position is valid. Use `glRasterPos' or `glWindowPos' to set the current
5965 raster position; use `glGet' with argument
5966 `GL_CURRENT_RASTER_POSITION_VALID' to determine if the specified raster
5967 position is valid, and `glGet' with argument
5968 `GL_CURRENT_RASTER_POSITION' to query the raster position.
5969
5970 Several parameters define the encoding of pixel data in memory and
5971 control the processing of the pixel data before it is placed in the
5972 frame buffer. These parameters are set with four commands:
5973 `glPixelStore', `glPixelTransfer', `glPixelMap', and `glPixelZoom'. This
5974 reference page describes the effects on `glDrawPixels' of many, but not
5975 all, of the parameters specified by these four commands.
5976
5977 Data is read from DATA as a sequence of signed or unsigned bytes, signed
5978 or unsigned shorts, signed or unsigned integers, or single-precision
5979 floating-point values, depending on TYPE. When TYPE is one of
5980 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
5981 `GL_UNSIGNED_INT', `GL_INT', or `GL_FLOAT' each of these bytes, shorts,
5982 integers, or floating-point values is interpreted as one color or depth
5983 component, or one index, depending on FORMAT. When TYPE is one of
5984 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_SHORT_5_6_5',
5985 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_5_5_5_1',
5986 `GL_UNSIGNED_INT_8_8_8_8', or `GL_UNSIGNED_INT_10_10_10_2', each
5987 unsigned value is interpreted as containing all the components for a
5988 single pixel, with the color components arranged according to FORMAT.
5989 When TYPE is one of `GL_UNSIGNED_BYTE_2_3_3_REV',
5990 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
5991 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8_REV', or
5992 `GL_UNSIGNED_INT_2_10_10_10_REV', each unsigned value is interpreted as
5993 containing all color components, specified by FORMAT, for a single pixel
5994 in a reversed order. Indices are always treated individually. Color
5995 components are treated as groups of one, two, three, or four values,
5996 again based on FORMAT. Both individual indices and groups of components
5997 are referred to as pixels. If TYPE is `GL_BITMAP', the data must be
5998 unsigned bytes, and FORMAT must be either `GL_COLOR_INDEX' or
5999 `GL_STENCIL_INDEX'. Each unsigned byte is treated as eight 1-bit pixels,
6000 with bit ordering determined by `GL_UNPACK_LSB_FIRST' (see
6001 `glPixelStore').
6002
6003 WIDTH×HEIGHT pixels are read from memory, starting at location DATA. By
6004 default, these pixels are taken from adjacent memory locations, except
6005 that after all WIDTH pixels are read, the read pointer is advanced to
6006 the next four-byte boundary. The four-byte row alignment is specified by
6007 `glPixelStore' with argument `GL_UNPACK_ALIGNMENT', and it can be set to
6008 one, two, four, or eight bytes. Other pixel store parameters specify
6009 different read pointer advancements, both before the first pixel is read
6010 and after all WIDTH pixels are read. See the `glPixelStore' reference
6011 page for details on these options.
6012
6013 If a non-zero named buffer object is bound to the
6014 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a block of
6015 pixels is specified, DATA is treated as a byte offset into the buffer
6016 object's data store.
6017
6018 The WIDTH×HEIGHT pixels that are read from memory are each operated on
6019 in the same way, based on the values of several parameters specified by
6020 `glPixelTransfer' and `glPixelMap'. The details of these operations, as
6021 well as the target buffer into which the pixels are drawn, are specific
6022 to the format of the pixels, as specified by FORMAT. FORMAT can assume
6023 one of 13 symbolic values:
6024
6025 `GL_COLOR_INDEX'
6026 Each pixel is a single value, a color index. It is converted to
6027 fixed-point format, with an unspecified number of bits to the right
6028 of the binary point, regardless of the memory data type.
6029 Floating-point values convert to true fixed-point values. Signed
6030 and unsigned integer data is converted with all fraction bits set
6031 to 0. Bitmap data convert to either 0 or 1.
6032
6033 Each fixed-point index is then shifted left by `GL_INDEX_SHIFT'
6034 bits and added to `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is
6035 negative, the shift is to the right. In either case, zero bits fill
6036 otherwise unspecified bit locations in the result.
6037
6038 If the GL is in RGBA mode, the resulting index is converted to an
6039 RGBA pixel with the help of the `GL_PIXEL_MAP_I_TO_R',
6040 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
6041 `GL_PIXEL_MAP_I_TO_A' tables. If the GL is in color index mode, and
6042 if `GL_MAP_COLOR' is true, the index is replaced with the value
6043 that it references in lookup table `GL_PIXEL_MAP_I_TO_I'. Whether
6044 the lookup replacement of the index is done or not, the integer
6045 part of the index is then ANDed with 2^B-1 , where B is the number
6046 of bits in a color index buffer.
6047
6048 The GL then converts the resulting indices or RGBA colors to
6049 fragments by attaching the current raster position Z coordinate and
6050 texture coordinates to each pixel, then assigning X and Y window
6051 coordinates to the N th fragment such that X_N=X_R+N%WIDTH
6052 Y_N=Y_R+⌊N/WIDTH,⌋
6053
6054 where (X_R,Y_R) is the current raster position. These pixel
6055 fragments are then treated just like the fragments generated by
6056 rasterizing points, lines, or polygons. Texture mapping, fog, and
6057 all the fragment operations are applied before the fragments are
6058 written to the frame buffer.
6059
6060 `GL_STENCIL_INDEX'
6061 Each pixel is a single value, a stencil index. It is converted to
6062 fixed-point format, with an unspecified number of bits to the right
6063 of the binary point, regardless of the memory data type.
6064 Floating-point values convert to true fixed-point values. Signed
6065 and unsigned integer data is converted with all fraction bits set
6066 to 0. Bitmap data convert to either 0 or 1.
6067
6068 Each fixed-point index is then shifted left by `GL_INDEX_SHIFT'
6069 bits, and added to `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is
6070 negative, the shift is to the right. In either case, zero bits fill
6071 otherwise unspecified bit locations in the result. If
6072 `GL_MAP_STENCIL' is true, the index is replaced with the value that
6073 it references in lookup table `GL_PIXEL_MAP_S_TO_S'. Whether the
6074 lookup replacement of the index is done or not, the integer part of
6075 the index is then ANDed with 2^B-1 , where B is the number of bits
6076 in the stencil buffer. The resulting stencil indices are then
6077 written to the stencil buffer such that the N th index is written
6078 to location
6079
6080 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
6081
6082 where (X_R,Y_R) is the current raster position. Only the pixel
6083 ownership test, the scissor test, and the stencil writemask affect
6084 these write operations.
6085
6086 `GL_DEPTH_COMPONENT'
6087 Each pixel is a single-depth component. Floating-point data is
6088 converted directly to an internal floating-point format with
6089 unspecified precision. Signed integer data is mapped linearly to
6090 the internal floating-point format such that the most positive
6091 representable integer value maps to 1.0, and the most negative
6092 representable value maps to -1.0 . Unsigned integer data is mapped
6093 similarly: the largest integer value maps to 1.0, and 0 maps to
6094 0.0. The resulting floating-point depth value is then multiplied by
6095 `GL_DEPTH_SCALE' and added to `GL_DEPTH_BIAS'. The result is
6096 clamped to the range [0,1] .
6097
6098 The GL then converts the resulting depth components to fragments by
6099 attaching the current raster position color or color index and
6100 texture coordinates to each pixel, then assigning X and Y window
6101 coordinates to the N th fragment such that
6102
6103 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
6104
6105 where (X_R,Y_R) is the current raster position. These pixel
6106 fragments are then treated just like the fragments generated by
6107 rasterizing points, lines, or polygons. Texture mapping, fog, and
6108 all the fragment operations are applied before the fragments are
6109 written to the frame buffer.
6110
6111 `GL_RGBA'
6112 `GL_BGRA'
6113 Each pixel is a four-component group: For `GL_RGBA', the red
6114 component is first, followed by green, followed by blue, followed
6115 by alpha; for `GL_BGRA' the order is blue, green, red and then
6116 alpha. Floating-point values are converted directly to an internal
6117 floating-point format with unspecified precision. Signed integer
6118 values are mapped linearly to the internal floating-point format
6119 such that the most positive representable integer value maps to
6120 1.0, and the most negative representable value maps to -1.0 . (Note
6121 that this mapping does not convert 0 precisely to 0.0.) Unsigned
6122 integer data is mapped similarly: The largest integer value maps to
6123 1.0, and 0 maps to 0.0. The resulting floating-point color values
6124 are then multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where
6125 C is RED, GREEN, BLUE, and ALPHA for the respective color
6126 components. The results are clamped to the range [0,1] .
6127
6128 If `GL_MAP_COLOR' is true, each color component is scaled by the
6129 size of lookup table `GL_PIXEL_MAP_c_TO_c', then replaced by the
6130 value that it references in that table. C is R, G, B, or A
6131 respectively.
6132
6133 The GL then converts the resulting RGBA colors to fragments by
6134 attaching the current raster position Z coordinate and texture
6135 coordinates to each pixel, then assigning X and Y window
6136 coordinates to the N th fragment such that
6137
6138 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
6139
6140 where (X_R,Y_R) is the current raster position. These pixel
6141 fragments are then treated just like the fragments generated by
6142 rasterizing points, lines, or polygons. Texture mapping, fog, and
6143 all the fragment operations are applied before the fragments are
6144 written to the frame buffer.
6145
6146 `GL_RED'
6147 Each pixel is a single red component. This component is converted
6148 to the internal floating-point format in the same way the red
6149 component of an RGBA pixel is. It is then converted to an RGBA
6150 pixel with green and blue set to 0, and alpha set to 1. After this
6151 conversion, the pixel is treated as if it had been read as an RGBA
6152 pixel.
6153
6154 `GL_GREEN'
6155 Each pixel is a single green component. This component is converted
6156 to the internal floating-point format in the same way the green
6157 component of an RGBA pixel is. It is then converted to an RGBA
6158 pixel with red and blue set to 0, and alpha set to 1. After this
6159 conversion, the pixel is treated as if it had been read as an RGBA
6160 pixel.
6161
6162 `GL_BLUE'
6163 Each pixel is a single blue component. This component is converted
6164 to the internal floating-point format in the same way the blue
6165 component of an RGBA pixel is. It is then converted to an RGBA
6166 pixel with red and green set to 0, and alpha set to 1. After this
6167 conversion, the pixel is treated as if it had been read as an RGBA
6168 pixel.
6169
6170 `GL_ALPHA'
6171 Each pixel is a single alpha component. This component is converted
6172 to the internal floating-point format in the same way the alpha
6173 component of an RGBA pixel is. It is then converted to an RGBA
6174 pixel with red, green, and blue set to 0. After this conversion,
6175 the pixel is treated as if it had been read as an RGBA pixel.
6176
6177 `GL_RGB'
6178 `GL_BGR'
6179 Each pixel is a three-component group: red first, followed by
6180 green, followed by blue; for `GL_BGR', the first component is blue,
6181 followed by green and then red. Each component is converted to the
6182 internal floating-point format in the same way the red, green, and
6183 blue components of an RGBA pixel are. The color triple is converted
6184 to an RGBA pixel with alpha set to 1. After this conversion, the
6185 pixel is treated as if it had been read as an RGBA pixel.
6186
6187 `GL_LUMINANCE'
6188 Each pixel is a single luminance component. This component is
6189 converted to the internal floating-point format in the same way the
6190 red component of an RGBA pixel is. It is then converted to an RGBA
6191 pixel with red, green, and blue set to the converted luminance
6192 value, and alpha set to 1. After this conversion, the pixel is
6193 treated as if it had been read as an RGBA pixel.
6194
6195 `GL_LUMINANCE_ALPHA'
6196 Each pixel is a two-component group: luminance first, followed by
6197 alpha. The two components are converted to the internal
6198 floating-point format in the same way the red component of an RGBA
6199 pixel is. They are then converted to an RGBA pixel with red, green,
6200 and blue set to the converted luminance value, and alpha set to the
6201 converted alpha value. After this conversion, the pixel is treated
6202 as if it had been read as an RGBA pixel.
6203
6204 The following table summarizes the meaning of the valid constants for
6205 the TYPE parameter:
6206
6207
6208
6209 *Type*
6210 *Corresponding Type*
6211
6212 `GL_UNSIGNED_BYTE'
6213 unsigned 8-bit integer
6214
6215 `GL_BYTE'
6216 signed 8-bit integer
6217
6218 `GL_BITMAP'
6219 single bits in unsigned 8-bit integers
6220
6221 `GL_UNSIGNED_SHORT'
6222 unsigned 16-bit integer
6223
6224 `GL_SHORT'
6225 signed 16-bit integer
6226
6227 `GL_UNSIGNED_INT'
6228 unsigned 32-bit integer
6229
6230 `GL_INT'
6231 32-bit integer
6232
6233 `GL_FLOAT'
6234 single-precision floating-point
6235
6236 `GL_UNSIGNED_BYTE_3_3_2'
6237 unsigned 8-bit integer
6238
6239 `GL_UNSIGNED_BYTE_2_3_3_REV'
6240 unsigned 8-bit integer with reversed component ordering
6241
6242 `GL_UNSIGNED_SHORT_5_6_5'
6243 unsigned 16-bit integer
6244
6245 `GL_UNSIGNED_SHORT_5_6_5_REV'
6246 unsigned 16-bit integer with reversed component ordering
6247
6248 `GL_UNSIGNED_SHORT_4_4_4_4'
6249 unsigned 16-bit integer
6250
6251 `GL_UNSIGNED_SHORT_4_4_4_4_REV'
6252 unsigned 16-bit integer with reversed component ordering
6253
6254 `GL_UNSIGNED_SHORT_5_5_5_1'
6255 unsigned 16-bit integer
6256
6257 `GL_UNSIGNED_SHORT_1_5_5_5_REV'
6258 unsigned 16-bit integer with reversed component ordering
6259
6260 `GL_UNSIGNED_INT_8_8_8_8'
6261 unsigned 32-bit integer
6262
6263 `GL_UNSIGNED_INT_8_8_8_8_REV'
6264 unsigned 32-bit integer with reversed component ordering
6265
6266 `GL_UNSIGNED_INT_10_10_10_2'
6267 unsigned 32-bit integer
6268
6269 `GL_UNSIGNED_INT_2_10_10_10_REV'
6270 unsigned 32-bit integer with reversed component ordering
6271
6272
6273
6274 The rasterization described so far assumes pixel zoom factors of 1. If
6275 `glPixelZoom' is used to change the X and Y pixel zoom factors, pixels
6276 are converted to fragments as follows. If (X_R,Y_R) is the current
6277 raster position, and a given pixel is in the N th column and M th row of
6278 the pixel rectangle, then fragments are generated for pixels whose
6279 centers are in the rectangle with corners at
6280
6281 (X_R+ZOOM_X,\u2062N,Y_R+ZOOM_Y,\u2062M) (X_R+ZOOM_X,\u2061(N+1,),Y_R+ZOOM_Y,\u2061(M+1,))
6282
6283 where ZOOM_X is the value of `GL_ZOOM_X' and ZOOM_Y is the value of
6284 `GL_ZOOM_Y'.
6285
6286 `GL_INVALID_ENUM' is generated if FORMAT or TYPE is not one of the
6287 accepted values.
6288
6289 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
6290 either `GL_COLOR_INDEX' or `GL_STENCIL_INDEX'.
6291
6292 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
6293
6294 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_STENCIL_INDEX' and
6295 there is no stencil buffer.
6296
6297 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_RED', `GL_GREEN',
6298 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_RGBA', `GL_BGR', `GL_BGRA',
6299 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA', and the GL is in color index
6300 mode.
6301
6302 `GL_INVALID_OPERATION' is generated if FORMAT is one of
6303 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
6304 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
6305 is not `GL_RGB'.
6306
6307 `GL_INVALID_OPERATION' is generated if FORMAT is one of
6308 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
6309 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
6310 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
6311 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
6312 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
6313
6314 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6315 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
6316 data store is currently mapped.
6317
6318 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6319 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
6320 unpacked from the buffer object such that the memory reads required
6321 would exceed the data store size.
6322
6323 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6324 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
6325 divisible into the number of bytes needed to store in memory a datum
6326 indicated by TYPE.
6327
6328 `GL_INVALID_OPERATION' is generated if `glDrawPixels' is executed
6329 between the execution of `glBegin' and the corresponding execution of
6330 `glEnd'.")
6331
6332 (define-gl-procedures
6333 ((glDrawRangeElements
6334 (mode GLenum)
6335 (start GLuint)
6336 (end GLuint)
6337 (count GLsizei)
6338 (type GLenum)
6339 (indices const-GLvoid-*)
6340 ->
6341 void))
6342 "Render primitives from array data.
6343
6344 MODE
6345 Specifies what kind of primitives to render. Symbolic constants
6346 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
6347 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
6348 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
6349
6350 START
6351 Specifies the minimum array index contained in INDICES.
6352
6353 END
6354 Specifies the maximum array index contained in INDICES.
6355
6356 COUNT
6357 Specifies the number of elements to be rendered.
6358
6359 TYPE
6360 Specifies the type of the values in INDICES. Must be one of
6361 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
6362
6363 INDICES
6364 Specifies a pointer to the location where the indices are stored.
6365
6366 `glDrawRangeElements' is a restricted form of `glDrawElements'. MODE,
6367 START, END, and COUNT match the corresponding arguments to
6368 `glDrawElements', with the additional constraint that all values in the
6369 arrays COUNT must lie between START and END, inclusive.
6370
6371 Implementations denote recommended maximum amounts of vertex and index
6372 data, which may be queried by calling `glGet' with argument
6373 `GL_MAX_ELEMENTS_VERTICES' and `GL_MAX_ELEMENTS_INDICES'. If END-START+1
6374 is greater than the value of `GL_MAX_ELEMENTS_VERTICES', or if COUNT is
6375 greater than the value of `GL_MAX_ELEMENTS_INDICES', then the call may
6376 operate at reduced performance. There is no requirement that all
6377 vertices in the range [START,END] be referenced. However, the
6378 implementation may partially process unused vertices, reducing
6379 performance from what could be achieved with an optimal index set.
6380
6381 When `glDrawRangeElements' is called, it uses COUNT sequential elements
6382 from an enabled array, starting at START to construct a sequence of
6383 geometric primitives. MODE specifies what kind of primitives are
6384 constructed, and how the array elements construct these primitives. If
6385 more than one array is enabled, each is used. If `GL_VERTEX_ARRAY' is
6386 not enabled, no geometric primitives are constructed.
6387
6388 Vertex attributes that are modified by `glDrawRangeElements' have an
6389 unspecified value after `glDrawRangeElements' returns. For example, if
6390 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
6391 after `glDrawRangeElements' executes. Attributes that aren't modified
6392 maintain their previous values.
6393
6394 It is an error for indices to lie outside the range [START,END] , but
6395 implementations may not check for this situation. Such indices cause
6396 implementation-dependent behavior.
6397
6398 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
6399
6400 `GL_INVALID_VALUE' is generated if COUNT is negative.
6401
6402 `GL_INVALID_VALUE' is generated if END<START .
6403
6404 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6405 bound to an enabled array or the element array and the buffer object's
6406 data store is currently mapped.
6407
6408 `GL_INVALID_OPERATION' is generated if `glDrawRangeElements' is executed
6409 between the execution of `glBegin' and the corresponding `glEnd'.")
6410
6411 (define-gl-procedures
6412 ((glEdgeFlagPointer
6413 (stride GLsizei)
6414 (pointer const-GLvoid-*)
6415 ->
6416 void))
6417 "Define an array of edge flags.
6418
6419 STRIDE
6420 Specifies the byte offset between consecutive edge flags. If STRIDE
6421 is 0, the edge flags are understood to be tightly packed in the
6422 array. The initial value is 0.
6423
6424 POINTER
6425 Specifies a pointer to the first edge flag in the array. The
6426 initial value is 0.
6427
6428 `glEdgeFlagPointer' specifies the location and data format of an array
6429 of boolean edge flags to use when rendering. STRIDE specifies the byte
6430 stride from one edge flag to the next, allowing vertices and attributes
6431 to be packed into a single array or stored in separate arrays.
6432
6433 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
6434 target (see `glBindBuffer') while an edge flag array is specified,
6435 POINTER is treated as a byte offset into the buffer object's data store.
6436 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
6437 edge flag vertex array client-side state
6438 (`GL_EDGE_FLAG_ARRAY_BUFFER_BINDING').
6439
6440 When an edge flag array is specified, STRIDE and POINTER are saved as
6441 client-side state, in addition to the current vertex array buffer object
6442 binding.
6443
6444 To enable and disable the edge flag array, call `glEnableClientState'
6445 and `glDisableClientState' with the argument `GL_EDGE_FLAG_ARRAY'. If
6446 enabled, the edge flag array is used when `glDrawArrays',
6447 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements',
6448 `glDrawRangeElements', or `glArrayElement' is called.
6449
6450 `GL_INVALID_ENUM' is generated if STRIDE is negative.")
6451
6452 (define-gl-procedures
6453 ((glEdgeFlag (flag GLboolean) -> void)
6454 (glEdgeFlagv (flag const-GLboolean-*) -> void))
6455 "Flag edges as either boundary or nonboundary.
6456
6457 FLAG
6458 Specifies the current edge flag value, either `GL_TRUE' or
6459 `GL_FALSE'. The initial value is `GL_TRUE'.
6460
6461 Each vertex of a polygon, separate triangle, or separate quadrilateral
6462 specified between a `glBegin'/`glEnd' pair is marked as the start of
6463 either a boundary or nonboundary edge. If the current edge flag is true
6464 when the vertex is specified, the vertex is marked as the start of a
6465 boundary edge. Otherwise, the vertex is marked as the start of a
6466 nonboundary edge. `glEdgeFlag' sets the edge flag bit to `GL_TRUE' if
6467 FLAG is `GL_TRUE' and to `GL_FALSE' otherwise.
6468
6469 The vertices of connected triangles and connected quadrilaterals are
6470 always marked as boundary, regardless of the value of the edge flag.
6471
6472 Boundary and nonboundary edge flags on vertices are significant only if
6473 `GL_POLYGON_MODE' is set to `GL_POINT' or `GL_LINE'. See
6474 `glPolygonMode'.")
6475
6476 (define-gl-procedures
6477 ((glEnableClientState (cap GLenum) -> void)
6478 (glDisableClientState (cap GLenum) -> void))
6479 "Enable or disable client-side capability.
6480
6481 CAP
6482 Specifies the capability to enable. Symbolic constants
6483 `GL_COLOR_ARRAY', `GL_EDGE_FLAG_ARRAY', `GL_FOG_COORD_ARRAY',
6484 `GL_INDEX_ARRAY', `GL_NORMAL_ARRAY', `GL_SECONDARY_COLOR_ARRAY',
6485 `GL_TEXTURE_COORD_ARRAY', and `GL_VERTEX_ARRAY' are accepted.
6486
6487 `glEnableClientState' and `glDisableClientState' enable or disable
6488 individual client-side capabilities. By default, all client-side
6489 capabilities are disabled. Both `glEnableClientState' and
6490 `glDisableClientState' take a single argument, CAP, which can assume one
6491 of the following values:
6492
6493 `GL_COLOR_ARRAY'
6494 If enabled, the color array is enabled for writing and used during
6495 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6496 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6497 is called. See `glColorPointer'.
6498
6499 `GL_EDGE_FLAG_ARRAY'
6500 If enabled, the edge flag array is enabled for writing and used
6501 during rendering when `glArrayElement', `glDrawArrays',
6502 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6503 `glMultiDrawElements' is called. See `glEdgeFlagPointer'.
6504
6505 `GL_FOG_COORD_ARRAY'
6506 If enabled, the fog coordinate array is enabled for writing and
6507 used during rendering when `glArrayElement', `glDrawArrays',
6508 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6509 `glMultiDrawElements' is called. See `glFogCoordPointer'.
6510
6511 `GL_INDEX_ARRAY'
6512 If enabled, the index array is enabled for writing and used during
6513 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6514 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6515 is called. See `glIndexPointer'.
6516
6517 `GL_NORMAL_ARRAY'
6518 If enabled, the normal array is enabled for writing and used during
6519 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6520 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6521 is called. See `glNormalPointer'.
6522
6523 `GL_SECONDARY_COLOR_ARRAY'
6524 If enabled, the secondary color array is enabled for writing and
6525 used during rendering when `glArrayElement', `glDrawArrays',
6526 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6527 `glMultiDrawElements' is called. See `glColorPointer'.
6528
6529 `GL_TEXTURE_COORD_ARRAY'
6530 If enabled, the texture coordinate array is enabled for writing and
6531 used during rendering when `glArrayElement', `glDrawArrays',
6532 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6533 `glMultiDrawElements' is called. See `glTexCoordPointer'.
6534
6535 `GL_VERTEX_ARRAY'
6536 If enabled, the vertex array is enabled for writing and used during
6537 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6538 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6539 is called. See `glVertexPointer'.
6540
6541 `GL_INVALID_ENUM' is generated if CAP is not an accepted value.
6542
6543 `glEnableClientState' is not allowed between the execution of `glBegin'
6544 and the corresponding `glEnd', but an error may or may not be generated.
6545 If no error is generated, the behavior is undefined.")
6546
6547 (define-gl-procedures
6548 ((glEnableVertexAttribArray
6549 (index GLuint)
6550 ->
6551 void)
6552 (glDisableVertexAttribArray
6553 (index GLuint)
6554 ->
6555 void))
6556 "Enable or disable a generic vertex attribute array.
6557
6558 INDEX
6559 Specifies the index of the generic vertex attribute to be enabled
6560 or disabled.
6561
6562 `glEnableVertexAttribArray' enables the generic vertex attribute array
6563 specified by INDEX. `glDisableVertexAttribArray' disables the generic
6564 vertex attribute array specified by INDEX. By default, all client-side
6565 capabilities are disabled, including all generic vertex attribute
6566 arrays. If enabled, the values in the generic vertex attribute array
6567 will be accessed and used for rendering when calls are made to vertex
6568 array commands such as `glDrawArrays', `glDrawElements',
6569 `glDrawRangeElements', `glArrayElement', `glMultiDrawElements', or
6570 `glMultiDrawArrays'.
6571
6572 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
6573 `GL_MAX_VERTEX_ATTRIBS'.
6574
6575 `GL_INVALID_OPERATION' is generated if either `glEnableVertexAttribArray
6576 ' or `glDisableVertexAttribArray ' is executed between the execution of
6577 `glBegin' and the corresponding execution of `glEnd'.")
6578
6579 (define-gl-procedures
6580 ((glEnable (cap GLenum) -> void)
6581 (glDisable (cap GLenum) -> void))
6582 "Enable or disable server-side GL capabilities.
6583
6584 CAP
6585 Specifies a symbolic constant indicating a GL capability.
6586
6587 `glEnable' and `glDisable' enable and disable various capabilities. Use
6588 `glIsEnabled' or `glGet' to determine the current setting of any
6589 capability. The initial value for each capability with the exception of
6590 `GL_DITHER' and `GL_MULTISAMPLE' is `GL_FALSE'. The initial value for
6591 `GL_DITHER' and `GL_MULTISAMPLE' is `GL_TRUE'.
6592
6593 Both `glEnable' and `glDisable' take a single argument, CAP, which can
6594 assume one of the following values:
6595
6596 `GL_ALPHA_TEST'
6597
6598
6599 If enabled, do alpha testing. See `glAlphaFunc'.
6600
6601 `GL_AUTO_NORMAL'
6602
6603
6604 If enabled, generate normal vectors when either `GL_MAP2_VERTEX_3'
6605 or `GL_MAP2_VERTEX_4' is used to generate vertices. See `glMap2'.
6606
6607 `GL_BLEND'
6608
6609
6610 If enabled, blend the computed fragment color values with the
6611 values in the color buffers. See `glBlendFunc'.
6612
6613 `GL_CLIP_PLANE'I
6614
6615
6616 If enabled, clip geometry against user-defined clipping plane I.
6617 See `glClipPlane'.
6618
6619 `GL_COLOR_LOGIC_OP'
6620
6621
6622 If enabled, apply the currently selected logical operation to the
6623 computed fragment color and color buffer values. See `glLogicOp'.
6624
6625 `GL_COLOR_MATERIAL'
6626
6627
6628 If enabled, have one or more material parameters track the current
6629 color. See `glColorMaterial'.
6630
6631 `GL_COLOR_SUM'
6632
6633
6634 If enabled and no fragment shader is active, add the secondary
6635 color value to the computed fragment color. See `glSecondaryColor'.
6636
6637 `GL_COLOR_TABLE'
6638
6639
6640 If enabled, perform a color table lookup on the incoming RGBA color
6641 values. See `glColorTable'.
6642
6643 `GL_CONVOLUTION_1D'
6644
6645
6646 If enabled, perform a 1D convolution operation on incoming RGBA
6647 color values. See `glConvolutionFilter1D'.
6648
6649 `GL_CONVOLUTION_2D'
6650
6651
6652 If enabled, perform a 2D convolution operation on incoming RGBA
6653 color values. See `glConvolutionFilter2D'.
6654
6655 `GL_CULL_FACE'
6656
6657
6658 If enabled, cull polygons based on their winding in window
6659 coordinates. See `glCullFace'.
6660
6661 `GL_DEPTH_TEST'
6662
6663
6664 If enabled, do depth comparisons and update the depth buffer. Note
6665 that even if the depth buffer exists and the depth mask is
6666 non-zero, the depth buffer is not updated if the depth test is
6667 disabled. See `glDepthFunc' and `glDepthRange'.
6668
6669 `GL_DITHER'
6670
6671
6672 If enabled, dither color components or indices before they are
6673 written to the color buffer.
6674
6675 `GL_FOG'
6676
6677
6678 If enabled and no fragment shader is active, blend a fog color into
6679 the post-texturing color. See `glFog'.
6680
6681 `GL_HISTOGRAM'
6682
6683
6684 If enabled, histogram incoming RGBA color values. See
6685 `glHistogram'.
6686
6687 `GL_INDEX_LOGIC_OP'
6688
6689
6690 If enabled, apply the currently selected logical operation to the
6691 incoming index and color buffer indices. See `glLogicOp'.
6692
6693 `GL_LIGHT'I
6694
6695
6696 If enabled, include light I in the evaluation of the lighting
6697 equation. See `glLightModel' and `glLight'.
6698
6699 `GL_LIGHTING'
6700
6701
6702 If enabled and no vertex shader is active, use the current lighting
6703 parameters to compute the vertex color or index. Otherwise, simply
6704 associate the current color or index with each vertex. See
6705 `glMaterial', `glLightModel', and `glLight'.
6706
6707 `GL_LINE_SMOOTH'
6708
6709
6710 If enabled, draw lines with correct filtering. Otherwise, draw
6711 aliased lines. See `glLineWidth'.
6712
6713 `GL_LINE_STIPPLE'
6714
6715
6716 If enabled, use the current line stipple pattern when drawing
6717 lines. See `glLineStipple'.
6718
6719 `GL_MAP1_COLOR_4'
6720
6721
6722 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6723 `glEvalPoint1' generate RGBA values. See `glMap1'.
6724
6725 `GL_MAP1_INDEX'
6726
6727
6728 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6729 `glEvalPoint1' generate color indices. See `glMap1'.
6730
6731 `GL_MAP1_NORMAL'
6732
6733
6734 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6735 `glEvalPoint1' generate normals. See `glMap1'.
6736
6737 `GL_MAP1_TEXTURE_COORD_1'
6738
6739
6740 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6741 `glEvalPoint1' generate S texture coordinates. See `glMap1'.
6742
6743 `GL_MAP1_TEXTURE_COORD_2'
6744
6745
6746 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6747 `glEvalPoint1' generate S and T texture coordinates. See `glMap1'.
6748
6749 `GL_MAP1_TEXTURE_COORD_3'
6750
6751
6752 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6753 `glEvalPoint1' generate S, T, and R texture coordinates. See
6754 `glMap1'.
6755
6756 `GL_MAP1_TEXTURE_COORD_4'
6757
6758
6759 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6760 `glEvalPoint1' generate S, T, R, and Q texture coordinates. See
6761 `glMap1'.
6762
6763 `GL_MAP1_VERTEX_3'
6764
6765
6766 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6767 `glEvalPoint1' generate X, Y, and Z vertex coordinates. See
6768 `glMap1'.
6769
6770 `GL_MAP1_VERTEX_4'
6771
6772
6773 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6774 `glEvalPoint1' generate homogeneous X, Y, Z, and W vertex
6775 coordinates. See `glMap1'.
6776
6777 `GL_MAP2_COLOR_4'
6778
6779
6780 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6781 `glEvalPoint2' generate RGBA values. See `glMap2'.
6782
6783 `GL_MAP2_INDEX'
6784
6785
6786 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6787 `glEvalPoint2' generate color indices. See `glMap2'.
6788
6789 `GL_MAP2_NORMAL'
6790
6791
6792 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6793 `glEvalPoint2' generate normals. See `glMap2'.
6794
6795 `GL_MAP2_TEXTURE_COORD_1'
6796
6797
6798 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6799 `glEvalPoint2' generate S texture coordinates. See `glMap2'.
6800
6801 `GL_MAP2_TEXTURE_COORD_2'
6802
6803
6804 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6805 `glEvalPoint2' generate S and T texture coordinates. See `glMap2'.
6806
6807 `GL_MAP2_TEXTURE_COORD_3'
6808
6809
6810 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6811 `glEvalPoint2' generate S, T, and R texture coordinates. See
6812 `glMap2'.
6813
6814 `GL_MAP2_TEXTURE_COORD_4'
6815
6816
6817 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6818 `glEvalPoint2' generate S, T, R, and Q texture coordinates. See
6819 `glMap2'.
6820
6821 `GL_MAP2_VERTEX_3'
6822
6823
6824 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6825 `glEvalPoint2' generate X, Y, and Z vertex coordinates. See
6826 `glMap2'.
6827
6828 `GL_MAP2_VERTEX_4'
6829
6830
6831 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6832 `glEvalPoint2' generate homogeneous X, Y, Z, and W vertex
6833 coordinates. See `glMap2'.
6834
6835 `GL_MINMAX'
6836
6837
6838 If enabled, compute the minimum and maximum values of incoming RGBA
6839 color values. See `glMinmax'.
6840
6841 `GL_MULTISAMPLE'
6842
6843
6844 If enabled, use multiple fragment samples in computing the final
6845 color of a pixel. See `glSampleCoverage'.
6846
6847 `GL_NORMALIZE'
6848
6849
6850 If enabled and no vertex shader is active, normal vectors are
6851 normalized to unit length after transformation and before lighting.
6852 This method is generally less efficient than `GL_RESCALE_NORMAL'.
6853 See `glNormal' and `glNormalPointer'.
6854
6855 `GL_POINT_SMOOTH'
6856
6857
6858 If enabled, draw points with proper filtering. Otherwise, draw
6859 aliased points. See `glPointSize'.
6860
6861 `GL_POINT_SPRITE'
6862
6863
6864 If enabled, calculate texture coordinates for points based on
6865 texture environment and point parameter settings. Otherwise texture
6866 coordinates are constant across points.
6867
6868 `GL_POLYGON_OFFSET_FILL'
6869
6870
6871 If enabled, and if the polygon is rendered in `GL_FILL' mode, an
6872 offset is added to depth values of a polygon's fragments before the
6873 depth comparison is performed. See `glPolygonOffset'.
6874
6875 `GL_POLYGON_OFFSET_LINE'
6876
6877
6878 If enabled, and if the polygon is rendered in `GL_LINE' mode, an
6879 offset is added to depth values of a polygon's fragments before the
6880 depth comparison is performed. See `glPolygonOffset'.
6881
6882 `GL_POLYGON_OFFSET_POINT'
6883
6884
6885 If enabled, an offset is added to depth values of a polygon's
6886 fragments before the depth comparison is performed, if the polygon
6887 is rendered in `GL_POINT' mode. See `glPolygonOffset'.
6888
6889 `GL_POLYGON_SMOOTH'
6890
6891
6892 If enabled, draw polygons with proper filtering. Otherwise, draw
6893 aliased polygons. For correct antialiased polygons, an alpha buffer
6894 is needed and the polygons must be sorted front to back.
6895
6896 `GL_POLYGON_STIPPLE'
6897
6898
6899 If enabled, use the current polygon stipple pattern when rendering
6900 polygons. See `glPolygonStipple'.
6901
6902 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
6903
6904
6905 If enabled, perform a color table lookup on RGBA color values after
6906 color matrix transformation. See `glColorTable'.
6907
6908 `GL_POST_CONVOLUTION_COLOR_TABLE'
6909
6910
6911 If enabled, perform a color table lookup on RGBA color values after
6912 convolution. See `glColorTable'.
6913
6914 `GL_RESCALE_NORMAL'
6915
6916
6917 If enabled and no vertex shader is active, normal vectors are
6918 scaled after transformation and before lighting by a factor
6919 computed from the modelview matrix. If the modelview matrix scales
6920 space uniformly, this has the effect of restoring the transformed
6921 normal to unit length. This method is generally more efficient than
6922 `GL_NORMALIZE'. See `glNormal' and `glNormalPointer'.
6923
6924 `GL_SAMPLE_ALPHA_TO_COVERAGE'
6925
6926
6927 If enabled, compute a temporary coverage value where each bit is
6928 determined by the alpha value at the corresponding sample location.
6929 The temporary coverage value is then ANDed with the fragment
6930 coverage value.
6931
6932 `GL_SAMPLE_ALPHA_TO_ONE'
6933
6934
6935 If enabled, each sample alpha value is replaced by the maximum
6936 representable alpha value.
6937
6938 `GL_SAMPLE_COVERAGE'
6939
6940
6941 If enabled, the fragment's coverage is ANDed with the temporary
6942 coverage value. If `GL_SAMPLE_COVERAGE_INVERT' is set to `GL_TRUE',
6943 invert the coverage value. See `glSampleCoverage'.
6944
6945 `GL_SEPARABLE_2D'
6946
6947
6948 If enabled, perform a two-dimensional convolution operation using a
6949 separable convolution filter on incoming RGBA color values. See
6950 `glSeparableFilter2D'.
6951
6952 `GL_SCISSOR_TEST'
6953
6954
6955 If enabled, discard fragments that are outside the scissor
6956 rectangle. See `glScissor'.
6957
6958 `GL_STENCIL_TEST'
6959
6960
6961 If enabled, do stencil testing and update the stencil buffer. See
6962 `glStencilFunc' and `glStencilOp'.
6963
6964 `GL_TEXTURE_1D'
6965
6966
6967 If enabled and no fragment shader is active, one-dimensional
6968 texturing is performed (unless two- or three-dimensional or
6969 cube-mapped texturing is also enabled). See `glTexImage1D'.
6970
6971 `GL_TEXTURE_2D'
6972
6973
6974 If enabled and no fragment shader is active, two-dimensional
6975 texturing is performed (unless three-dimensional or cube-mapped
6976 texturing is also enabled). See `glTexImage2D'.
6977
6978 `GL_TEXTURE_3D'
6979
6980
6981 If enabled and no fragment shader is active, three-dimensional
6982 texturing is performed (unless cube-mapped texturing is also
6983 enabled). See `glTexImage3D'.
6984
6985 `GL_TEXTURE_CUBE_MAP'
6986
6987
6988 If enabled and no fragment shader is active, cube-mapped texturing
6989 is performed. See `glTexImage2D'.
6990
6991 `GL_TEXTURE_GEN_Q'
6992
6993
6994 If enabled and no vertex shader is active, the Q texture coordinate
6995 is computed using the texture generation function defined with
6996 `glTexGen'. Otherwise, the current Q texture coordinate is used.
6997 See `glTexGen'.
6998
6999 `GL_TEXTURE_GEN_R'
7000
7001
7002 If enabled and no vertex shader is active, the R texture coordinate
7003 is computed using the texture generation function defined with
7004 `glTexGen'. Otherwise, the current R texture coordinate is used.
7005 See `glTexGen'.
7006
7007 `GL_TEXTURE_GEN_S'
7008
7009
7010 If enabled and no vertex shader is active, the S texture coordinate
7011 is computed using the texture generation function defined with
7012 `glTexGen'. Otherwise, the current S texture coordinate is used.
7013 See `glTexGen'.
7014
7015 `GL_TEXTURE_GEN_T'
7016
7017
7018 If enabled and no vertex shader is active, the T texture coordinate
7019 is computed using the texture generation function defined with
7020 `glTexGen'. Otherwise, the current T texture coordinate is used.
7021 See `glTexGen'.
7022
7023 `GL_VERTEX_PROGRAM_POINT_SIZE'
7024
7025
7026 If enabled and a vertex shader is active, then the derived point
7027 size is taken from the (potentially clipped) shader builtin
7028 `gl_PointSize' and clamped to the implementation-dependent point
7029 size range.
7030
7031 `GL_VERTEX_PROGRAM_TWO_SIDE'
7032
7033
7034 If enabled and a vertex shader is active, it specifies that the GL
7035 will choose between front and back colors based on the polygon's
7036 face direction of which the vertex being shaded is a part. It has
7037 no effect on points or lines.
7038
7039 `GL_INVALID_ENUM' is generated if CAP is not one of the values listed
7040 previously.
7041
7042 `GL_INVALID_OPERATION' is generated if `glEnable' or `glDisable' is
7043 executed between the execution of `glBegin' and the corresponding
7044 execution of `glEnd'.")
7045
7046 (define-gl-procedures
7047 ((glEvalCoord1f (u GLfloat) -> void)
7048 (glEvalCoord1d (u GLdouble) -> void)
7049 (glEvalCoord2f (u GLfloat) (v GLfloat) -> void)
7050 (glEvalCoord2d (u GLdouble) (v GLdouble) -> void)
7051 (glEvalCoord1fv (u const-GLfloat-*) -> void)
7052 (glEvalCoord1dv (u const-GLdouble-*) -> void)
7053 (glEvalCoord2fv (u const-GLfloat-*) -> void)
7054 (glEvalCoord2dv (u const-GLdouble-*) -> void))
7055 "Evaluate enabled one- and two-dimensional maps.
7056
7057 U
7058 Specifies a value that is the domain coordinate U to the basis
7059 function defined in a previous `glMap1' or `glMap2' command.
7060
7061 V
7062 Specifies a value that is the domain coordinate V to the basis
7063 function defined in a previous `glMap2' command. This argument is
7064 not present in a `glEvalCoord1' command.
7065
7066 `glEvalCoord1' evaluates enabled one-dimensional maps at argument U.
7067 `glEvalCoord2' does the same for two-dimensional maps using two domain
7068 values, U and V. To define a map, call `glMap1' and `glMap2'; to enable
7069 and disable it, call `glEnable' and `glDisable'.
7070
7071 When one of the `glEvalCoord' commands is issued, all currently enabled
7072 maps of the indicated dimension are evaluated. Then, for each enabled
7073 map, it is as if the corresponding GL command had been issued with the
7074 computed value. That is, if `GL_MAP1_INDEX' or `GL_MAP2_INDEX' is
7075 enabled, a `glIndex' command is simulated. If `GL_MAP1_COLOR_4' or
7076 `GL_MAP2_COLOR_4' is enabled, a `glColor' command is simulated. If
7077 `GL_MAP1_NORMAL' or `GL_MAP2_NORMAL' is enabled, a normal vector is
7078 produced, and if any of `GL_MAP1_TEXTURE_COORD_1',
7079 `GL_MAP1_TEXTURE_COORD_2', `GL_MAP1_TEXTURE_COORD_3',
7080 `GL_MAP1_TEXTURE_COORD_4', `GL_MAP2_TEXTURE_COORD_1',
7081 `GL_MAP2_TEXTURE_COORD_2', `GL_MAP2_TEXTURE_COORD_3', or
7082 `GL_MAP2_TEXTURE_COORD_4' is enabled, then an appropriate `glTexCoord'
7083 command is simulated.
7084
7085 For color, color index, normal, and texture coordinates the GL uses
7086 evaluated values instead of current values for those evaluations that
7087 are enabled, and current values otherwise, However, the evaluated values
7088 do not update the current values. Thus, if `glVertex' commands are
7089 interspersed with `glEvalCoord' commands, the color, normal, and texture
7090 coordinates associated with the `glVertex' commands are not affected by
7091 the values generated by the `glEvalCoord' commands, but only by the most
7092 recent `glColor', `glIndex', `glNormal', and `glTexCoord' commands.
7093
7094 No commands are issued for maps that are not enabled. If more than one
7095 texture evaluation is enabled for a particular dimension (for example,
7096 `GL_MAP2_TEXTURE_COORD_1' and `GL_MAP2_TEXTURE_COORD_2'), then only the
7097 evaluation of the map that produces the larger number of coordinates (in
7098 this case, `GL_MAP2_TEXTURE_COORD_2') is carried out. `GL_MAP1_VERTEX_4'
7099 overrides `GL_MAP1_VERTEX_3', and `GL_MAP2_VERTEX_4' overrides
7100 `GL_MAP2_VERTEX_3', in the same manner. If neither a three- nor a
7101 four-component vertex map is enabled for the specified dimension, the
7102 `glEvalCoord' command is ignored.
7103
7104 If you have enabled automatic normal generation, by calling `glEnable'
7105 with argument `GL_AUTO_NORMAL', `glEvalCoord2' generates surface normals
7106 analytically, regardless of the contents or enabling of the
7107 `GL_MAP2_NORMAL' map. Let
7108
7109 `m'=∂`p',/∂U,,×∂`p',/∂V,,
7110
7111 Then the generated normal `n' is `n'=`m'/∥`m',∥,
7112
7113 If automatic normal generation is disabled, the corresponding normal map
7114 `GL_MAP2_NORMAL', if enabled, is used to produce a normal. If neither
7115 automatic normal generation nor a normal map is enabled, no normal is
7116 generated for `glEvalCoord2' commands.")
7117
7118 (define-gl-procedures
7119 ((glEvalMesh1
7120 (mode GLenum)
7121 (i1 GLint)
7122 (i2 GLint)
7123 ->
7124 void)
7125 (glEvalMesh2
7126 (mode GLenum)
7127 (i1 GLint)
7128 (i2 GLint)
7129 (j1 GLint)
7130 (j2 GLint)
7131 ->
7132 void))
7133 "Compute a one- or two-dimensional grid of points or lines.
7134
7135 MODE
7136 In `glEvalMesh1', specifies whether to compute a one-dimensional
7137 mesh of points or lines. Symbolic constants `GL_POINT' and
7138 `GL_LINE' are accepted.
7139
7140 I1
7141 I2
7142
7143 Specify the first and last integer values for grid domain variable
7144 I .
7145
7146 `glMapGrid' and `glEvalMesh' are used in tandem to efficiently generate
7147 and evaluate a series of evenly-spaced map domain values. `glEvalMesh'
7148 steps through the integer domain of a one- or two-dimensional grid,
7149 whose range is the domain of the evaluation maps specified by `glMap1'
7150 and `glMap2'. MODE determines whether the resulting vertices are
7151 connected as points, lines, or filled polygons.
7152
7153 In the one-dimensional case, `glEvalMesh1', the mesh is generated as if
7154 the following code fragment were executed:
7155
7156 where
7157
7158
7159 glBegin( TYPE );
7160 for ( i = I1; i <= I2; i += 1 )
7161 glEvalCoord1( i·ΔU+U_1
7162
7163 );
7164 glEnd();
7165
7166 ΔU=(U_2-U_1,)/N
7167
7168 and N , U_1 , and U_2 are the arguments to the most recent `glMapGrid1'
7169 command. TYPE is `GL_POINTS' if MODE is `GL_POINT', or `GL_LINES' if
7170 MODE is `GL_LINE'.
7171
7172 The one absolute numeric requirement is that if I=N , then the value
7173 computed from I·ΔU+U_1 is exactly U_2 .
7174
7175 In the two-dimensional case, `glEvalMesh2', let .cp ΔU=(U_2-U_1,)/N
7176
7177 ΔV=(V_2-V_1,)/M
7178
7179 where N , U_1 , U_2 , M , V_1 , and V_2 are the arguments to the most
7180 recent `glMapGrid2' command. Then, if MODE is `GL_FILL', the
7181 `glEvalMesh2' command is equivalent to:
7182
7183
7184
7185
7186 for ( j = J1; j < J2; j += 1 ) {
7187 glBegin( GL_QUAD_STRIP );
7188 for ( i = I1; i <= I2; i += 1 ) {
7189 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7190
7191 );
7192 glEvalCoord2( i·ΔU+U_1,(j+1,)·ΔV+V_1
7193
7194 );
7195 }
7196 glEnd();
7197 }
7198
7199 If MODE is `GL_LINE', then a call to `glEvalMesh2' is equivalent to:
7200
7201
7202
7203
7204 for ( j = J1; j <= J2; j += 1 ) {
7205 glBegin( GL_LINE_STRIP );
7206 for ( i = I1; i <= I2; i += 1 )
7207 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7208
7209 );
7210 glEnd();
7211 }
7212
7213 for ( i = I1; i <= I2; i += 1 ) {
7214 glBegin( GL_LINE_STRIP );
7215 for ( j = J1; j <= J1; j += 1 )
7216 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7217
7218 );
7219 glEnd();
7220 }
7221
7222 And finally, if MODE is `GL_POINT', then a call to `glEvalMesh2' is
7223 equivalent to:
7224
7225
7226
7227
7228 glBegin( GL_POINTS );
7229 for ( j = J1; j <= J2; j += 1 )
7230 for ( i = I1; i <= I2; i += 1 )
7231 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7232
7233 );
7234 glEnd();
7235
7236 In all three cases, the only absolute numeric requirements are that if
7237 I=N , then the value computed from I·ΔU+U_1 is exactly U_2 , and if J=M
7238 , then the value computed from J·ΔV+V_1 is exactly V_2 .
7239
7240 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
7241
7242 `GL_INVALID_OPERATION' is generated if `glEvalMesh' is executed between
7243 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7244
7245 (define-gl-procedures
7246 ((glEvalPoint1 (i GLint) -> void)
7247 (glEvalPoint2 (i GLint) (j GLint) -> void))
7248 "Generate and evaluate a single point in a mesh.
7249
7250 I
7251 Specifies the integer value for grid domain variable I .
7252
7253 J
7254 Specifies the integer value for grid domain variable J
7255 (`glEvalPoint2' only).
7256
7257 `glMapGrid' and `glEvalMesh' are used in tandem to efficiently generate
7258 and evaluate a series of evenly spaced map domain values. `glEvalPoint'
7259 can be used to evaluate a single grid point in the same gridspace that
7260 is traversed by `glEvalMesh'. Calling `glEvalPoint1' is equivalent to
7261 calling where ΔU=(U_2-U_1,)/N
7262
7263
7264 glEvalCoord1( i·ΔU+U_1
7265
7266 );
7267
7268 and N , U_1 , and U_2 are the arguments to the most recent `glMapGrid1'
7269 command. The one absolute numeric requirement is that if I=N , then the
7270 value computed from I·ΔU+U_1 is exactly U_2 .
7271
7272 In the two-dimensional case, `glEvalPoint2', let
7273
7274 ΔU=(U_2-U_1,)/N ΔV=(V_2-V_1,)/M
7275
7276 where N , U_1 , U_2 , M , V_1 , and V_2 are the arguments to the most
7277 recent `glMapGrid2' command. Then the `glEvalPoint2' command is
7278 equivalent to calling The only absolute numeric requirements are that if
7279 I=N , then the value computed from I·ΔU+U_1 is exactly U_2 , and if J=M
7280 , then the value computed from J·ΔV+V_1 is exactly V_2 .
7281
7282
7283 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7284
7285 );")
7286
7287 (define-gl-procedures
7288 ((glFeedbackBuffer
7289 (size GLsizei)
7290 (type GLenum)
7291 (buffer GLfloat-*)
7292 ->
7293 void))
7294 "Controls feedback mode.
7295
7296 SIZE
7297 Specifies the maximum number of values that can be written into
7298 BUFFER.
7299
7300 TYPE
7301 Specifies a symbolic constant that describes the information that
7302 will be returned for each vertex. `GL_2D', `GL_3D', `GL_3D_COLOR',
7303 `GL_3D_COLOR_TEXTURE', and `GL_4D_COLOR_TEXTURE' are accepted.
7304
7305 BUFFER
7306 Returns the feedback data.
7307
7308 The `glFeedbackBuffer' function controls feedback. Feedback, like
7309 selection, is a GL mode. The mode is selected by calling `glRenderMode'
7310 with `GL_FEEDBACK'. When the GL is in feedback mode, no pixels are
7311 produced by rasterization. Instead, information about primitives that
7312 would have been rasterized is fed back to the application using the GL.
7313
7314 `glFeedbackBuffer' has three arguments: BUFFER is a pointer to an array
7315 of floating-point values into which feedback information is placed. SIZE
7316 indicates the size of the array. TYPE is a symbolic constant describing
7317 the information that is fed back for each vertex. `glFeedbackBuffer'
7318 must be issued before feedback mode is enabled (by calling
7319 `glRenderMode' with argument `GL_FEEDBACK'). Setting `GL_FEEDBACK'
7320 without establishing the feedback buffer, or calling `glFeedbackBuffer'
7321 while the GL is in feedback mode, is an error.
7322
7323 When `glRenderMode' is called while in feedback mode, it returns the
7324 number of entries placed in the feedback array and resets the feedback
7325 array pointer to the base of the feedback buffer. The returned value
7326 never exceeds SIZE. If the feedback data required more room than was
7327 available in BUFFER, `glRenderMode' returns a negative value. To take
7328 the GL out of feedback mode, call `glRenderMode' with a parameter value
7329 other than `GL_FEEDBACK'.
7330
7331 While in feedback mode, each primitive, bitmap, or pixel rectangle that
7332 would be rasterized generates a block of values that are copied into the
7333 feedback array. If doing so would cause the number of entries to exceed
7334 the maximum, the block is partially written so as to fill the array (if
7335 there is any room left at all), and an overflow flag is set. Each block
7336 begins with a code indicating the primitive type, followed by values
7337 that describe the primitive's vertices and associated data. Entries are
7338 also written for bitmaps and pixel rectangles. Feedback occurs after
7339 polygon culling and `glPolygonMode' interpretation of polygons has taken
7340 place, so polygons that are culled are not returned in the feedback
7341 buffer. It can also occur after polygons with more than three edges are
7342 broken up into triangles, if the GL implementation renders polygons by
7343 performing this decomposition.
7344
7345 The `glPassThrough' command can be used to insert a marker into the
7346 feedback buffer. See `glPassThrough'.
7347
7348 Following is the grammar for the blocks of values written into the
7349 feedback buffer. Each primitive is indicated with a unique identifying
7350 value followed by some number of vertices. Polygon entries include an
7351 integer value indicating how many vertices follow. A vertex is fed back
7352 as some number of floating-point values, as determined by TYPE. Colors
7353 are fed back as four values in RGBA mode and one value in color index
7354 mode.
7355
7356 feedbackList ← feedbackItem feedbackList | feedbackItem feedbackItem ←
7357 point | lineSegment | polygon | bitmap | pixelRectangle | passThru point
7358 ← `GL_POINT_TOKEN' vertex lineSegment ← `GL_LINE_TOKEN' vertex vertex |
7359 `GL_LINE_RESET_TOKEN' vertex vertex polygon ← `GL_POLYGON_TOKEN' n
7360 polySpec polySpec ← polySpec vertex | vertex vertex vertex bitmap ←
7361 `GL_BITMAP_TOKEN' vertex pixelRectangle ← `GL_DRAW_PIXEL_TOKEN' vertex |
7362 `GL_COPY_PIXEL_TOKEN' vertex passThru ← `GL_PASS_THROUGH_TOKEN' value
7363 vertex ← 2d | 3d | 3dColor | 3dColorTexture | 4dColorTexture 2d ← value
7364 value 3d ← value value value 3dColor ← value value value color
7365 3dColorTexture ← value value value color tex 4dColorTexture ← value
7366 value value value color tex color ← rgba | index rgba ← value value
7367 value value index ← value tex ← value value value value
7368
7369 VALUE is a floating-point number, and N is a floating-point integer
7370 giving the number of vertices in the polygon. `GL_POINT_TOKEN',
7371 `GL_LINE_TOKEN', `GL_LINE_RESET_TOKEN', `GL_POLYGON_TOKEN',
7372 `GL_BITMAP_TOKEN', `GL_DRAW_PIXEL_TOKEN', `GL_COPY_PIXEL_TOKEN' and
7373 `GL_PASS_THROUGH_TOKEN' are symbolic floating-point constants.
7374 `GL_LINE_RESET_TOKEN' is returned whenever the line stipple pattern is
7375 reset. The data returned as a vertex depends on the feedback TYPE.
7376
7377 The following table gives the correspondence between TYPE and the number
7378 of values per vertex. K is 1 in color index mode and 4 in RGBA mode.
7379
7380
7381
7382 *Type*
7383 *Coordinates*, *Color*, *Texture*, *Total Number of Values*
7384
7385 `GL_2D'
7386 X, Y, , , 2
7387
7388 `GL_3D'
7389 X, Y, Z, , , 3
7390
7391 `GL_3D_COLOR'
7392 X, Y, Z, K , , 3+K
7393
7394 `GL_3D_COLOR_TEXTURE'
7395 X, Y, Z, K , 4 , 7+K
7396
7397 `GL_4D_COLOR_TEXTURE'
7398 X, Y, Z, W, K , 4 , 8+K
7399
7400 Feedback vertex coordinates are in window coordinates, except W, which
7401 is in clip coordinates. Feedback colors are lighted, if lighting is
7402 enabled. Feedback texture coordinates are generated, if texture
7403 coordinate generation is enabled. They are always transformed by the
7404 texture matrix.
7405
7406 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
7407
7408 `GL_INVALID_VALUE' is generated if SIZE is negative.
7409
7410 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is called
7411 while the render mode is `GL_FEEDBACK', or if `glRenderMode' is called
7412 with argument `GL_FEEDBACK' before `glFeedbackBuffer' is called at least
7413 once.
7414
7415 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is executed
7416 between the execution of `glBegin' and the corresponding execution of
7417 `glEnd'.")
7418
7419 (define-gl-procedures
7420 ((glFinish -> void))
7421 "Block until all GL execution is complete.
7422
7423 `glFinish' does not return until the effects of all previously called GL
7424 commands are complete. Such effects include all changes to GL state, all
7425 changes to connection state, and all changes to the frame buffer
7426 contents.
7427
7428 `GL_INVALID_OPERATION' is generated if `glFinish' is executed between
7429 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7430
7431 (define-gl-procedures
7432 ((glFlush -> void))
7433 "Force execution of GL commands in finite time.
7434
7435 Different GL implementations buffer commands in several different
7436 locations, including network buffers and the graphics accelerator
7437 itself. `glFlush' empties all of these buffers, causing all issued
7438 commands to be executed as quickly as they are accepted by the actual
7439 rendering engine. Though this execution may not be completed in any
7440 particular time period, it does complete in finite time.
7441
7442 Because any GL program might be executed over a network, or on an
7443 accelerator that buffers commands, all programs should call `glFlush'
7444 whenever they count on having all of their previously issued commands
7445 completed. For example, call `glFlush' before waiting for user input
7446 that depends on the generated image.
7447
7448 `GL_INVALID_OPERATION' is generated if `glFlush' is executed between the
7449 execution of `glBegin' and the corresponding execution of `glEnd'.")
7450
7451 (define-gl-procedures
7452 ((glFogCoordPointer
7453 (type GLenum)
7454 (stride GLsizei)
7455 (pointer GLvoid-*)
7456 ->
7457 void))
7458 "Define an array of fog coordinates.
7459
7460 TYPE
7461 Specifies the data type of each fog coordinate. Symbolic constants
7462 `GL_FLOAT', or `GL_DOUBLE' are accepted. The initial value is
7463 `GL_FLOAT'.
7464
7465 STRIDE
7466 Specifies the byte offset between consecutive fog coordinates. If
7467 STRIDE is 0, the array elements are understood to be tightly
7468 packed. The initial value is 0.
7469
7470 POINTER
7471 Specifies a pointer to the first coordinate of the first fog
7472 coordinate in the array. The initial value is 0.
7473
7474 `glFogCoordPointer' specifies the location and data format of an array
7475 of fog coordinates to use when rendering. TYPE specifies the data type
7476 of each fog coordinate, and STRIDE specifies the byte stride from one
7477 fog coordinate to the next, allowing vertices and attributes to be
7478 packed into a single array or stored in separate arrays.
7479
7480 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
7481 target (see `glBindBuffer') while a fog coordinate array is specified,
7482 POINTER is treated as a byte offset into the buffer object's data store.
7483 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
7484 fog coordinate vertex array client-side state
7485 (`GL_FOG_COORD_ARRAY_BUFFER_BINDING').
7486
7487 When a fog coordinate array is specified, TYPE, STRIDE, and POINTER are
7488 saved as client-side state, in addition to the current vertex array
7489 buffer object binding.
7490
7491 To enable and disable the fog coordinate array, call
7492 `glEnableClientState' and `glDisableClientState' with the argument
7493 `GL_FOG_COORD_ARRAY'. If enabled, the fog coordinate array is used when
7494 `glDrawArrays', `glMultiDrawArrays', `glDrawElements',
7495 `glMultiDrawElements', `glDrawRangeElements', or `glArrayElement' is
7496 called.
7497
7498 `GL_INVALID_ENUM' is generated if TYPE is not either `GL_FLOAT' or
7499 `GL_DOUBLE'.
7500
7501 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
7502
7503 (define-gl-procedures
7504 ((glFogCoordd (coord GLdouble) -> void)
7505 (glFogCoordf (coord GLfloat) -> void)
7506 (glFogCoorddv (coord GLdouble-*) -> void)
7507 (glFogCoordfv (coord GLfloat-*) -> void))
7508 "Set the current fog coordinates.
7509
7510 COORD
7511 Specify the fog distance.
7512
7513 `glFogCoord' specifies the fog coordinate that is associated with each
7514 vertex and the current raster position. The value specified is
7515 interpolated and used in computing the fog color (see `glFog').")
7516
7517 (define-gl-procedures
7518 ((glFogf (pname GLenum) (param GLfloat) -> void)
7519 (glFogi (pname GLenum) (param GLint) -> void)
7520 (glFogfv
7521 (pname GLenum)
7522 (params const-GLfloat-*)
7523 ->
7524 void)
7525 (glFogiv
7526 (pname GLenum)
7527 (params const-GLint-*)
7528 ->
7529 void))
7530 "Specify fog parameters.
7531
7532 PNAME
7533 Specifies a single-valued fog parameter. `GL_FOG_MODE',
7534 `GL_FOG_DENSITY', `GL_FOG_START', `GL_FOG_END', `GL_FOG_INDEX', and
7535 `GL_FOG_COORD_SRC' are accepted.
7536
7537 PARAM
7538 Specifies the value that PNAME will be set to.
7539
7540 Fog is initially disabled. While enabled, fog affects rasterized
7541 geometry, bitmaps, and pixel blocks, but not buffer clear operations. To
7542 enable and disable fog, call `glEnable' and `glDisable' with argument
7543 `GL_FOG'.
7544
7545 `glFog' assigns the value or values in PARAMS to the fog parameter
7546 specified by PNAME. The following values are accepted for PNAME:
7547
7548 `GL_FOG_MODE'
7549 PARAMS is a single integer or floating-point value that specifies
7550 the equation to be used to compute the fog blend factor, F . Three
7551 symbolic constants are accepted: `GL_LINEAR', `GL_EXP', and
7552 `GL_EXP2'. The equations corresponding to these symbolic constants
7553 are defined below. The initial fog mode is `GL_EXP'.
7554
7555 `GL_FOG_DENSITY'
7556 PARAMS is a single integer or floating-point value that specifies
7557 DENSITY , the fog density used in both exponential fog equations.
7558 Only nonnegative densities are accepted. The initial fog density is
7559 1.
7560
7561 `GL_FOG_START'
7562 PARAMS is a single integer or floating-point value that specifies
7563 START , the near distance used in the linear fog equation. The
7564 initial near distance is 0.
7565
7566 `GL_FOG_END'
7567 PARAMS is a single integer or floating-point value that specifies
7568 END , the far distance used in the linear fog equation. The initial
7569 far distance is 1.
7570
7571 `GL_FOG_INDEX'
7572 PARAMS is a single integer or floating-point value that specifies
7573 I_F , the fog color index. The initial fog index is 0.
7574
7575 `GL_FOG_COLOR'
7576 PARAMS contains four integer or floating-point values that specify
7577 C_F , the fog color. Integer values are mapped linearly such that
7578 the most positive representable value maps to 1.0, and the most
7579 negative representable value maps to -1.0 . Floating-point values
7580 are mapped directly. After conversion, all color components are
7581 clamped to the range [0,1] . The initial fog color is (0, 0, 0, 0).
7582
7583 `GL_FOG_COORD_SRC'
7584 PARAMS contains either of the following symbolic constants:
7585 `GL_FOG_COORD' or `GL_FRAGMENT_DEPTH'. `GL_FOG_COORD' specifies
7586 that the current fog coordinate should be used as distance value in
7587 the fog color computation. `GL_FRAGMENT_DEPTH' specifies that the
7588 current fragment depth should be used as distance value in the fog
7589 computation.
7590
7591 Fog blends a fog color with each rasterized pixel fragment's
7592 post-texturing color using a blending factor F . Factor F is computed in
7593 one of three ways, depending on the fog mode. Let C be either the
7594 distance in eye coordinate from the origin (in the case that the
7595 `GL_FOG_COORD_SRC' is `GL_FRAGMENT_DEPTH') or the current fog coordinate
7596 (in the case that `GL_FOG_COORD_SRC' is `GL_FOG_COORD'). The equation
7597 for `GL_LINEAR' fog is F=END-C,/END-START,
7598
7599 The equation for `GL_EXP' fog is F=E^-(DENSITY·C,),
7600
7601 The equation for `GL_EXP2' fog is F=E^-(DENSITY·C,),^2
7602
7603 Regardless of the fog mode, F is clamped to the range [0,1] after it is
7604 computed. Then, if the GL is in RGBA color mode, the fragment's red,
7605 green, and blue colors, represented by C_R , are replaced by
7606
7607 C_R,^″=F×C_R+(1-F,)×C_F
7608
7609 Fog does not affect a fragment's alpha component.
7610
7611 In color index mode, the fragment's color index I_R is replaced by
7612
7613 I_R,^″=I_R+(1-F,)×I_F
7614
7615
7616
7617 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value, or if
7618 PNAME is `GL_FOG_MODE' and PARAMS is not an accepted value.
7619
7620 `GL_INVALID_VALUE' is generated if PNAME is `GL_FOG_DENSITY' and PARAMS
7621 is negative.
7622
7623 `GL_INVALID_OPERATION' is generated if `glFog' is executed between the
7624 execution of `glBegin' and the corresponding execution of `glEnd'.")
7625
7626 (define-gl-procedures
7627 ((glFrontFace (mode GLenum) -> void))
7628 "Define front- and back-facing polygons.
7629
7630 MODE
7631 Specifies the orientation of front-facing polygons. `GL_CW' and
7632 `GL_CCW' are accepted. The initial value is `GL_CCW'.
7633
7634 In a scene composed entirely of opaque closed surfaces, back-facing
7635 polygons are never visible. Eliminating these invisible polygons has the
7636 obvious benefit of speeding up the rendering of the image. To enable and
7637 disable elimination of back-facing polygons, call `glEnable' and
7638 `glDisable' with argument `GL_CULL_FACE'.
7639
7640 The projection of a polygon to window coordinates is said to have
7641 clockwise winding if an imaginary object following the path from its
7642 first vertex, its second vertex, and so on, to its last vertex, and
7643 finally back to its first vertex, moves in a clockwise direction about
7644 the interior of the polygon. The polygon's winding is said to be
7645 counterclockwise if the imaginary object following the same path moves
7646 in a counterclockwise direction about the interior of the polygon.
7647 `glFrontFace' specifies whether polygons with clockwise winding in
7648 window coordinates, or counterclockwise winding in window coordinates,
7649 are taken to be front-facing. Passing `GL_CCW' to MODE selects
7650 counterclockwise polygons as front-facing; `GL_CW' selects clockwise
7651 polygons as front-facing. By default, counterclockwise polygons are
7652 taken to be front-facing.
7653
7654 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
7655
7656 `GL_INVALID_OPERATION' is generated if `glFrontFace' is executed between
7657 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7658
7659 (define-gl-procedures
7660 ((glFrustum
7661 (left GLdouble)
7662 (right GLdouble)
7663 (bottom GLdouble)
7664 (top GLdouble)
7665 (nearVal GLdouble)
7666 (farVal GLdouble)
7667 ->
7668 void))
7669 "Multiply the current matrix by a perspective matrix.
7670
7671 LEFT
7672 RIGHT
7673
7674 Specify the coordinates for the left and right vertical clipping
7675 planes.
7676
7677 BOTTOM
7678 TOP
7679
7680 Specify the coordinates for the bottom and top horizontal clipping
7681 planes.
7682
7683 NEARVAL
7684 FARVAL
7685
7686 Specify the distances to the near and far depth clipping planes.
7687 Both distances must be positive.
7688
7689 `glFrustum' describes a perspective matrix that produces a perspective
7690 projection. The current matrix (see `glMatrixMode') is multiplied by
7691 this matrix and the result replaces the current matrix, as if
7692 `glMultMatrix' were called with the following matrix as its argument:
7693
7694
7695
7696 [(2\u2062NEARVAL,/RIGHT-LEFT,, 0 A 0), (0 2\u2062NEARVAL,/TOP-BOTTOM,, B 0), (0 0
7697 C D), (0 0 -1 0),]
7698
7699 A=RIGHT+LEFT,/RIGHT-LEFT,
7700
7701 B=TOP+BOTTOM,/TOP-BOTTOM,
7702
7703 C=-FARVAL+NEARVAL,/FARVAL-NEARVAL,,
7704
7705 D=-2\u2062FARVAL\u2062NEARVAL,/FARVAL-NEARVAL,,
7706
7707
7708
7709 Typically, the matrix mode is `GL_PROJECTION', and (LEFT,BOTTOM-NEARVAL)
7710 and (RIGHT,TOP-NEARVAL) specify the points on the near clipping plane
7711 that are mapped to the lower left and upper right corners of the window,
7712 assuming that the eye is located at (0, 0, 0). -FARVAL specifies the
7713 location of the far clipping plane. Both NEARVAL and FARVAL must be
7714 positive.
7715
7716 Use `glPushMatrix' and `glPopMatrix' to save and restore the current
7717 matrix stack.
7718
7719 `GL_INVALID_VALUE' is generated if NEARVAL or FARVAL is not positive, or
7720 if LEFT = RIGHT, or BOTTOM = TOP, or NEAR = FAR.
7721
7722 `GL_INVALID_OPERATION' is generated if `glFrustum' is executed between
7723 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7724
7725 (define-gl-procedures
7726 ((glGenBuffers
7727 (n GLsizei)
7728 (buffers GLuint-*)
7729 ->
7730 void))
7731 "Generate buffer object names.
7732
7733 N
7734 Specifies the number of buffer object names to be generated.
7735
7736 BUFFERS
7737 Specifies an array in which the generated buffer object names are
7738 stored.
7739
7740 `glGenBuffers' returns N buffer object names in BUFFERS. There is no
7741 guarantee that the names form a contiguous set of integers; however, it
7742 is guaranteed that none of the returned names was in use immediately
7743 before the call to `glGenBuffers'.
7744
7745 Buffer object names returned by a call to `glGenBuffers' are not
7746 returned by subsequent calls, unless they are first deleted with
7747 `glDeleteBuffers'.
7748
7749 No buffer objects are associated with the returned buffer object names
7750 until they are first bound by calling `glBindBuffer'.
7751
7752 `GL_INVALID_VALUE' is generated if N is negative.
7753
7754 `GL_INVALID_OPERATION' is generated if `glGenBuffers' is executed
7755 between the execution of `glBegin' and the corresponding execution of
7756 `glEnd'.")
7757
7758 (define-gl-procedures
7759 ((glGenLists (range GLsizei) -> GLuint))
7760 "Generate a contiguous set of empty display lists.
7761
7762 RANGE
7763 Specifies the number of contiguous empty display lists to be
7764 generated.
7765
7766 `glGenLists' has one argument, RANGE. It returns an integer N such that
7767 RANGE contiguous empty display lists, named N , N+1 , ... , N+RANGE-1 ,
7768 are created. If RANGE is 0, if there is no group of RANGE contiguous
7769 names available, or if any error is generated, no display lists are
7770 generated, and 0 is returned.
7771
7772 `GL_INVALID_VALUE' is generated if RANGE is negative.
7773
7774 `GL_INVALID_OPERATION' is generated if `glGenLists' is executed between
7775 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7776
7777 (define-gl-procedures
7778 ((glGenQueries (n GLsizei) (ids GLuint-*) -> void))
7779 "Generate query object names.
7780
7781 N
7782 Specifies the number of query object names to be generated.
7783
7784 IDS
7785 Specifies an array in which the generated query object names are
7786 stored.
7787
7788 `glGenQueries' returns N query object names in IDS. There is no
7789 guarantee that the names form a contiguous set of integers; however, it
7790 is guaranteed that none of the returned names was in use immediately
7791 before the call to `glGenQueries'.
7792
7793 Query object names returned by a call to `glGenQueries' are not returned
7794 by subsequent calls, unless they are first deleted with
7795 `glDeleteQueries'.
7796
7797 No query objects are associated with the returned query object names
7798 until they are first used by calling `glBeginQuery'.
7799
7800 `GL_INVALID_VALUE' is generated if N is negative.
7801
7802 `GL_INVALID_OPERATION' is generated if `glGenQueries' is executed
7803 between the execution of `glBegin' and the corresponding execution of
7804 `glEnd'.")
7805
7806 (define-gl-procedures
7807 ((glGenTextures
7808 (n GLsizei)
7809 (textures GLuint-*)
7810 ->
7811 void))
7812 "Generate texture names.
7813
7814 N
7815 Specifies the number of texture names to be generated.
7816
7817 TEXTURES
7818 Specifies an array in which the generated texture names are stored.
7819
7820 `glGenTextures' returns N texture names in TEXTURES. There is no
7821 guarantee that the names form a contiguous set of integers; however, it
7822 is guaranteed that none of the returned names was in use immediately
7823 before the call to `glGenTextures'.
7824
7825 The generated textures have no dimensionality; they assume the
7826 dimensionality of the texture target to which they are first bound (see
7827 `glBindTexture').
7828
7829 Texture names returned by a call to `glGenTextures' are not returned by
7830 subsequent calls, unless they are first deleted with `glDeleteTextures'.
7831
7832 `GL_INVALID_VALUE' is generated if N is negative.
7833
7834 `GL_INVALID_OPERATION' is generated if `glGenTextures' is executed
7835 between the execution of `glBegin' and the corresponding execution of
7836 `glEnd'.")
7837
7838 (define-gl-procedures
7839 ((glGetActiveAttrib
7840 (program GLuint)
7841 (index GLuint)
7842 (bufSize GLsizei)
7843 (length GLsizei-*)
7844 (size GLint-*)
7845 (type GLenum-*)
7846 (name GLchar-*)
7847 ->
7848 void))
7849 "Returns information about an active attribute variable for the specified
7850 program object.
7851
7852 PROGRAM
7853 Specifies the program object to be queried.
7854
7855 INDEX
7856 Specifies the index of the attribute variable to be queried.
7857
7858 BUFSIZE
7859 Specifies the maximum number of characters OpenGL is allowed to
7860 write in the character buffer indicated by NAME.
7861
7862 LENGTH
7863 Returns the number of characters actually written by OpenGL in the
7864 string indicated by NAME (excluding the null terminator) if a value
7865 other than `NULL' is passed.
7866
7867 SIZE
7868 Returns the size of the attribute variable.
7869
7870 TYPE
7871 Returns the data type of the attribute variable.
7872
7873 NAME
7874 Returns a null terminated string containing the name of the
7875 attribute variable.
7876
7877 `glGetActiveAttrib' returns information about an active attribute
7878 variable in the program object specified by PROGRAM. The number of
7879 active attributes can be obtained by calling `glGetProgram' with the
7880 value `GL_ACTIVE_ATTRIBUTES'. A value of 0 for INDEX selects the first
7881 active attribute variable. Permissible values for INDEX range from 0 to
7882 the number of active attribute variables minus 1.
7883
7884 A vertex shader may use either built-in attribute variables,
7885 user-defined attribute variables, or both. Built-in attribute variables
7886 have a prefix of \"gl_\" and reference conventional OpenGL vertex
7887 attribtes (e.g., GL_VERTEX, GL_NORMAL, etc., see the OpenGL Shading
7888 Language specification for a complete list.) User-defined attribute
7889 variables have arbitrary names and obtain their values through numbered
7890 generic vertex attributes. An attribute variable (either built-in or
7891 user-defined) is considered active if it is determined during the link
7892 operation that it may be accessed during program execution. Therefore,
7893 PROGRAM should have previously been the target of a call to
7894 `glLinkProgram', but it is not necessary for it to have been linked
7895 successfully.
7896
7897 The size of the character buffer required to store the longest attribute
7898 variable name in PROGRAM can be obtained by calling `glGetProgram' with
7899 the value `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH'. This value should be used to
7900 allocate a buffer of sufficient size to store the returned attribute
7901 name. The size of this character buffer is passed in BUFSIZE, and a
7902 pointer to this character buffer is passed in NAME.
7903
7904 `glGetActiveAttrib' returns the name of the attribute variable indicated
7905 by INDEX, storing it in the character buffer specified by NAME. The
7906 string returned will be null terminated. The actual number of characters
7907 written into this buffer is returned in LENGTH, and this count does not
7908 include the null termination character. If the length of the returned
7909 string is not required, a value of `NULL' can be passed in the LENGTH
7910 argument.
7911
7912 The TYPE argument will return a pointer to the attribute variable's data
7913 type. The symbolic constants `GL_FLOAT', `GL_FLOAT_VEC2',
7914 `GL_FLOAT_VEC3', `GL_FLOAT_VEC4', `GL_FLOAT_MAT2', `GL_FLOAT_MAT3',
7915 `GL_FLOAT_MAT4', `GL_FLOAT_MAT2x3', `GL_FLOAT_MAT2x4',
7916 `GL_FLOAT_MAT3x2', `GL_FLOAT_MAT3x4', `GL_FLOAT_MAT4x2', or
7917 `GL_FLOAT_MAT4x3' may be returned. The SIZE argument will return the
7918 size of the attribute, in units of the type returned in TYPE.
7919
7920 The list of active attribute variables may include both built-in
7921 attribute variables (which begin with the prefix \"gl_\") as well as
7922 user-defined attribute variable names.
7923
7924 This function will return as much information as it can about the
7925 specified active attribute variable. If no information is available,
7926 LENGTH will be 0, and NAME will be an empty string. This situation could
7927 occur if this function is called after a link operation that failed. If
7928 an error occurs, the return values LENGTH, SIZE, TYPE, and NAME will be
7929 unmodified.
7930
7931 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
7932 OpenGL.
7933
7934 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
7935
7936 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to the
7937 number of active attribute variables in PROGRAM.
7938
7939 `GL_INVALID_OPERATION' is generated if `glGetActiveAttrib' is executed
7940 between the execution of `glBegin' and the corresponding execution of
7941 `glEnd'.
7942
7943 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.")
7944
7945 (define-gl-procedures
7946 ((glGetActiveUniform
7947 (program GLuint)
7948 (index GLuint)
7949 (bufSize GLsizei)
7950 (length GLsizei-*)
7951 (size GLint-*)
7952 (type GLenum-*)
7953 (name GLchar-*)
7954 ->
7955 void))
7956 "Returns information about an active uniform variable for the specified
7957 program object.
7958
7959 PROGRAM
7960 Specifies the program object to be queried.
7961
7962 INDEX
7963 Specifies the index of the uniform variable to be queried.
7964
7965 BUFSIZE
7966 Specifies the maximum number of characters OpenGL is allowed to
7967 write in the character buffer indicated by NAME.
7968
7969 LENGTH
7970 Returns the number of characters actually written by OpenGL in the
7971 string indicated by NAME (excluding the null terminator) if a value
7972 other than `NULL' is passed.
7973
7974 SIZE
7975 Returns the size of the uniform variable.
7976
7977 TYPE
7978 Returns the data type of the uniform variable.
7979
7980 NAME
7981 Returns a null terminated string containing the name of the uniform
7982 variable.
7983
7984 `glGetActiveUniform' returns information about an active uniform
7985 variable in the program object specified by PROGRAM. The number of
7986 active uniform variables can be obtained by calling `glGetProgram' with
7987 the value `GL_ACTIVE_UNIFORMS'. A value of 0 for INDEX selects the first
7988 active uniform variable. Permissible values for INDEX range from 0 to
7989 the number of active uniform variables minus 1.
7990
7991 Shaders may use either built-in uniform variables, user-defined uniform
7992 variables, or both. Built-in uniform variables have a prefix of \"gl_\"
7993 and reference existing OpenGL state or values derived from such state
7994 (e.g., GL_FOG, GL_MODELVIEWMATRIX, etc., see the OpenGL Shading Language
7995 specification for a complete list.) User-defined uniform variables have
7996 arbitrary names and obtain their values from the application through
7997 calls to `glUniform'. A uniform variable (either built-in or
7998 user-defined) is considered active if it is determined during the link
7999 operation that it may be accessed during program execution. Therefore,
8000 PROGRAM should have previously been the target of a call to
8001 `glLinkProgram', but it is not necessary for it to have been linked
8002 successfully.
8003
8004 The size of the character buffer required to store the longest uniform
8005 variable name in PROGRAM can be obtained by calling `glGetProgram' with
8006 the value `GL_ACTIVE_UNIFORM_MAX_LENGTH'. This value should be used to
8007 allocate a buffer of sufficient size to store the returned uniform
8008 variable name. The size of this character buffer is passed in BUFSIZE,
8009 and a pointer to this character buffer is passed in NAME.
8010
8011 `glGetActiveUniform' returns the name of the uniform variable indicated
8012 by INDEX, storing it in the character buffer specified by NAME. The
8013 string returned will be null terminated. The actual number of characters
8014 written into this buffer is returned in LENGTH, and this count does not
8015 include the null termination character. If the length of the returned
8016 string is not required, a value of `NULL' can be passed in the LENGTH
8017 argument.
8018
8019 The TYPE argument will return a pointer to the uniform variable's data
8020 type. The symbolic constants `GL_FLOAT', `GL_FLOAT_VEC2',
8021 `GL_FLOAT_VEC3', `GL_FLOAT_VEC4', `GL_INT', `GL_INT_VEC2',
8022 `GL_INT_VEC3', `GL_INT_VEC4', `GL_BOOL', `GL_BOOL_VEC2', `GL_BOOL_VEC3',
8023 `GL_BOOL_VEC4', `GL_FLOAT_MAT2', `GL_FLOAT_MAT3', `GL_FLOAT_MAT4',
8024 `GL_FLOAT_MAT2x3', `GL_FLOAT_MAT2x4', `GL_FLOAT_MAT3x2',
8025 `GL_FLOAT_MAT3x4', `GL_FLOAT_MAT4x2', `GL_FLOAT_MAT4x3',
8026 `GL_SAMPLER_1D', `GL_SAMPLER_2D', `GL_SAMPLER_3D', `GL_SAMPLER_CUBE',
8027 `GL_SAMPLER_1D_SHADOW', or `GL_SAMPLER_2D_SHADOW' may be returned.
8028
8029 If one or more elements of an array are active, the name of the array is
8030 returned in NAME, the type is returned in TYPE, and the SIZE parameter
8031 returns the highest array element index used, plus one, as determined by
8032 the compiler and/or linker. Only one active uniform variable will be
8033 reported for a uniform array.
8034
8035 Uniform variables that are declared as structures or arrays of
8036 structures will not be returned directly by this function. Instead, each
8037 of these uniform variables will be reduced to its fundamental components
8038 containing the \".\" and \"[]\" operators such that each of the names is
8039 valid as an argument to `glGetUniformLocation'. Each of these reduced
8040 uniform variables is counted as one active uniform variable and is
8041 assigned an index. A valid name cannot be a structure, an array of
8042 structures, or a subcomponent of a vector or matrix.
8043
8044 The size of the uniform variable will be returned in SIZE. Uniform
8045 variables other than arrays will have a size of 1. Structures and arrays
8046 of structures will be reduced as described earlier, such that each of
8047 the names returned will be a data type in the earlier list. If this
8048 reduction results in an array, the size returned will be as described
8049 for uniform arrays; otherwise, the size returned will be 1.
8050
8051 The list of active uniform variables may include both built-in uniform
8052 variables (which begin with the prefix \"gl_\") as well as user-defined
8053 uniform variable names.
8054
8055 This function will return as much information as it can about the
8056 specified active uniform variable. If no information is available,
8057 LENGTH will be 0, and NAME will be an empty string. This situation could
8058 occur if this function is called after a link operation that failed. If
8059 an error occurs, the return values LENGTH, SIZE, TYPE, and NAME will be
8060 unmodified.
8061
8062 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
8063 OpenGL.
8064
8065 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
8066
8067 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to the
8068 number of active uniform variables in PROGRAM.
8069
8070 `GL_INVALID_OPERATION' is generated if `glGetActiveUniform' is executed
8071 between the execution of `glBegin' and the corresponding execution of
8072 `glEnd'.
8073
8074 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.")
8075
8076 (define-gl-procedures
8077 ((glGetAttachedShaders
8078 (program GLuint)
8079 (maxCount GLsizei)
8080 (count GLsizei-*)
8081 (shaders GLuint-*)
8082 ->
8083 void))
8084 "Returns the handles of the shader objects attached to a program object.
8085
8086 PROGRAM
8087 Specifies the program object to be queried.
8088
8089 MAXCOUNT
8090 Specifies the size of the array for storing the returned object
8091 names.
8092
8093 COUNT
8094 Returns the number of names actually returned in OBJECTS.
8095
8096 SHADERS
8097 Specifies an array that is used to return the names of attached
8098 shader objects.
8099
8100 `glGetAttachedShaders' returns the names of the shader objects attached
8101 to PROGRAM. The names of shader objects that are attached to PROGRAM
8102 will be returned in SHADERS. The actual number of shader names written
8103 into SHADERS is returned in COUNT. If no shader objects are attached to
8104 PROGRAM, COUNT is set to 0. The maximum number of shader names that may
8105 be returned in SHADERS is specified by MAXCOUNT.
8106
8107 If the number of names actually returned is not required (for instance,
8108 if it has just been obtained by calling `glGetProgram'), a value of
8109 `NULL' may be passed for count. If no shader objects are attached to
8110 PROGRAM, a value of 0 will be returned in COUNT. The actual number of
8111 attached shaders can be obtained by calling `glGetProgram' with the
8112 value `GL_ATTACHED_SHADERS'.
8113
8114 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
8115 OpenGL.
8116
8117 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
8118
8119 `GL_INVALID_VALUE' is generated if MAXCOUNT is less than 0.
8120
8121 `GL_INVALID_OPERATION' is generated if `glGetAttachedShaders' is
8122 executed between the execution of `glBegin' and the corresponding
8123 execution of `glEnd'.")
8124
8125 (define-gl-procedures
8126 ((glGetAttribLocation
8127 (program GLuint)
8128 (name const-GLchar-*)
8129 ->
8130 GLint))
8131 "Returns the location of an attribute variable.
8132
8133 PROGRAM
8134 Specifies the program object to be queried.
8135
8136 NAME
8137 Points to a null terminated string containing the name of the
8138 attribute variable whose location is to be queried.
8139
8140 `glGetAttribLocation' queries the previously linked program object
8141 specified by PROGRAM for the attribute variable specified by NAME and
8142 returns the index of the generic vertex attribute that is bound to that
8143 attribute variable. If NAME is a matrix attribute variable, the index of
8144 the first column of the matrix is returned. If the named attribute
8145 variable is not an active attribute in the specified program object or
8146 if NAME starts with the reserved prefix \"gl_\", a value of -1 is
8147 returned.
8148
8149 The association between an attribute variable name and a generic
8150 attribute index can be specified at any time by calling
8151 `glBindAttribLocation'. Attribute bindings do not go into effect until
8152 `glLinkProgram' is called. After a program object has been linked
8153 successfully, the index values for attribute variables remain fixed
8154 until the next link command occurs. The attribute values can only be
8155 queried after a link if the link was successful. `glGetAttribLocation'
8156 returns the binding that actually went into effect the last time
8157 `glLinkProgram' was called for the specified program object. Attribute
8158 bindings that have been specified since the last link operation are not
8159 returned by `glGetAttribLocation'.
8160
8161 `GL_INVALID_OPERATION' is generated if PROGRAM is not a value generated
8162 by OpenGL.
8163
8164 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
8165
8166 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
8167 linked.
8168
8169 `GL_INVALID_OPERATION' is generated if `glGetAttribLocation' is executed
8170 between the execution of `glBegin' and the corresponding execution of
8171 `glEnd'.")
8172
8173 (define-gl-procedures
8174 ((glGetBufferParameteriv
8175 (target GLenum)
8176 (value GLenum)
8177 (data GLint-*)
8178 ->
8179 void))
8180 "Return parameters of a buffer object.
8181
8182 TARGET
8183 Specifies the target buffer object. The symbolic constant must be
8184 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
8185 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
8186
8187 VALUE
8188 Specifies the symbolic name of a buffer object parameter. Accepted
8189 values are `GL_BUFFER_ACCESS', `GL_BUFFER_MAPPED',
8190 `GL_BUFFER_SIZE', or `GL_BUFFER_USAGE'.
8191
8192 DATA
8193 Returns the requested parameter.
8194
8195 `glGetBufferParameteriv' returns in DATA a selected parameter of the
8196 buffer object specified by TARGET.
8197
8198 VALUE names a specific buffer object parameter, as follows:
8199
8200 `GL_BUFFER_ACCESS'
8201 PARAMS returns the access policy set while mapping the buffer
8202 object. The initial value is `GL_READ_WRITE'.
8203
8204 `GL_BUFFER_MAPPED'
8205 PARAMS returns a flag indicating whether the buffer object is
8206 currently mapped. The initial value is `GL_FALSE'.
8207
8208 `GL_BUFFER_SIZE'
8209 PARAMS returns the size of the buffer object, measured in bytes.
8210 The initial value is 0.
8211
8212 `GL_BUFFER_USAGE'
8213 PARAMS returns the buffer object's usage pattern. The initial value
8214 is `GL_STATIC_DRAW'.
8215
8216 `GL_INVALID_ENUM' is generated if TARGET or VALUE is not an accepted
8217 value.
8218
8219 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
8220 is bound to TARGET.
8221
8222 `GL_INVALID_OPERATION' is generated if `glGetBufferParameteriv' is
8223 executed between the execution of `glBegin' and the corresponding
8224 execution of `glEnd'.")
8225
8226 (define-gl-procedures
8227 ((glGetBufferPointerv
8228 (target GLenum)
8229 (pname GLenum)
8230 (params GLvoid-**)
8231 ->
8232 void))
8233 "Return the pointer to a mapped buffer object's data store.
8234
8235 TARGET
8236 Specifies the target buffer object. The symbolic constant must be
8237 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
8238 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
8239
8240 PNAME
8241 Specifies the pointer to be returned. The symbolic constant must be
8242 `GL_BUFFER_MAP_POINTER'.
8243
8244 PARAMS
8245 Returns the pointer value specified by PNAME.
8246
8247 `glGetBufferPointerv' returns pointer information. PNAME is a symbolic
8248 constant indicating the pointer to be returned, which must be
8249 `GL_BUFFER_MAP_POINTER', the pointer to which the buffer object's data
8250 store is mapped. If the data store is not currently mapped, `NULL' is
8251 returned. PARAMS is a pointer to a location in which to place the
8252 returned pointer value.
8253
8254 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
8255 value.
8256
8257 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
8258 is bound to TARGET.
8259
8260 `GL_INVALID_OPERATION' is generated if `glGetBufferPointerv' is executed
8261 between the execution of `glBegin' and the corresponding execution of
8262 `glEnd'.")
8263
8264 (define-gl-procedures
8265 ((glGetBufferSubData
8266 (target GLenum)
8267 (offset GLintptr)
8268 (size GLsizeiptr)
8269 (data GLvoid-*)
8270 ->
8271 void))
8272 "Returns a subset of a buffer object's data store.
8273
8274 TARGET
8275 Specifies the target buffer object. The symbolic constant must be
8276 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
8277 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
8278
8279 OFFSET
8280 Specifies the offset into the buffer object's data store from which
8281 data will be returned, measured in bytes.
8282
8283 SIZE
8284 Specifies the size in bytes of the data store region being
8285 returned.
8286
8287 DATA
8288 Specifies a pointer to the location where buffer object data is
8289 returned.
8290
8291 `glGetBufferSubData' returns some or all of the data from the buffer
8292 object currently bound to TARGET. Data starting at byte offset OFFSET
8293 and extending for SIZE bytes is copied from the data store to the memory
8294 pointed to by DATA. An error is thrown if the buffer object is currently
8295 mapped, or if OFFSET and SIZE together define a range beyond the bounds
8296 of the buffer object's data store.
8297
8298 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
8299 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
8300 `GL_PIXEL_UNPACK_BUFFER'.
8301
8302 `GL_INVALID_VALUE' is generated if OFFSET or SIZE is negative, or if
8303 together they define a region of memory that extends beyond the buffer
8304 object's allocated data store.
8305
8306 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
8307 is bound to TARGET.
8308
8309 `GL_INVALID_OPERATION' is generated if the buffer object being queried
8310 is mapped.
8311
8312 `GL_INVALID_OPERATION' is generated if `glGetBufferSubData' is executed
8313 between the execution of `glBegin' and the corresponding execution of
8314 `glEnd'.")
8315
8316 (define-gl-procedures
8317 ((glGetClipPlane
8318 (plane GLenum)
8319 (equation GLdouble-*)
8320 ->
8321 void))
8322 "Return the coefficients of the specified clipping plane.
8323
8324 PLANE
8325 Specifies a clipping plane. The number of clipping planes depends
8326 on the implementation, but at least six clipping planes are
8327 supported. They are identified by symbolic names of the form
8328 `GL_CLIP_PLANE' I where i ranges from 0 to the value of
8329 `GL_MAX_CLIP_PLANES' - 1.
8330
8331 EQUATION
8332 Returns four double-precision values that are the coefficients of
8333 the plane equation of PLANE in eye coordinates. The initial value
8334 is (0, 0, 0, 0).
8335
8336 `glGetClipPlane' returns in EQUATION the four coefficients of the plane
8337 equation for PLANE.
8338
8339 `GL_INVALID_ENUM' is generated if PLANE is not an accepted value.
8340
8341 `GL_INVALID_OPERATION' is generated if `glGetClipPlane' is executed
8342 between the execution of `glBegin' and the corresponding execution of
8343 `glEnd'.")
8344
8345 (define-gl-procedures
8346 ((glGetColorTableParameterfv
8347 (target GLenum)
8348 (pname GLenum)
8349 (params GLfloat-*)
8350 ->
8351 void)
8352 (glGetColorTableParameteriv
8353 (target GLenum)
8354 (pname GLenum)
8355 (params GLint-*)
8356 ->
8357 void))
8358 "Get color lookup table parameters.
8359
8360 TARGET
8361 The target color table. Must be `GL_COLOR_TABLE',
8362 `GL_POST_CONVOLUTION_COLOR_TABLE',
8363 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `GL_PROXY_COLOR_TABLE',
8364 `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
8365 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
8366
8367 PNAME
8368 The symbolic name of a color lookup table parameter. Must be one of
8369 `GL_COLOR_TABLE_BIAS', `GL_COLOR_TABLE_SCALE',
8370 `GL_COLOR_TABLE_FORMAT', `GL_COLOR_TABLE_WIDTH',
8371 `GL_COLOR_TABLE_RED_SIZE', `GL_COLOR_TABLE_GREEN_SIZE',
8372 `GL_COLOR_TABLE_BLUE_SIZE', `GL_COLOR_TABLE_ALPHA_SIZE',
8373 `GL_COLOR_TABLE_LUMINANCE_SIZE', or
8374 `GL_COLOR_TABLE_INTENSITY_SIZE'.
8375
8376 PARAMS
8377 A pointer to an array where the values of the parameter will be
8378 stored.
8379
8380 Returns parameters specific to color table TARGET.
8381
8382 When PNAME is set to `GL_COLOR_TABLE_SCALE' or `GL_COLOR_TABLE_BIAS',
8383 `glGetColorTableParameter' returns the color table scale or bias
8384 parameters for the table specified by TARGET. For these queries, TARGET
8385 must be set to `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
8386 `GL_POST_COLOR_MATRIX_COLOR_TABLE' and PARAMS points to an array of four
8387 elements, which receive the scale or bias factors for red, green, blue,
8388 and alpha, in that order.
8389
8390 `glGetColorTableParameter' can also be used to retrieve the format and
8391 size parameters for a color table. For these queries, set TARGET to
8392 either the color table target or the proxy color table target. The
8393 format and size parameters are set by `glColorTable'.
8394
8395 The following table lists the format and size parameters that may be
8396 queried. For each symbolic constant listed below for PNAME, PARAMS must
8397 point to an array of the given length and receive the values indicated.
8398
8399
8400
8401 *Parameter*
8402 *N*, *Meaning*
8403
8404 `GL_COLOR_TABLE_FORMAT'
8405 1 , Internal format (e.g., `GL_RGBA')
8406
8407 `GL_COLOR_TABLE_WIDTH'
8408 1 , Number of elements in table
8409
8410 `GL_COLOR_TABLE_RED_SIZE'
8411 1 , Size of red component, in bits
8412
8413 `GL_COLOR_TABLE_GREEN_SIZE'
8414 1 , Size of green component
8415
8416 `GL_COLOR_TABLE_BLUE_SIZE'
8417 1 , Size of blue component
8418
8419 `GL_COLOR_TABLE_ALPHA_SIZE'
8420 1 , Size of alpha component
8421
8422 `GL_COLOR_TABLE_LUMINANCE_SIZE'
8423 1 , Size of luminance component
8424
8425 `GL_COLOR_TABLE_INTENSITY_SIZE'
8426 1 , Size of intensity component
8427
8428
8429
8430 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an acceptable
8431 value.
8432
8433 `GL_INVALID_OPERATION' is generated if `glGetColorTableParameter' is
8434 executed between the execution of `glBegin' and the corresponding
8435 execution of `glEnd'.")
8436
8437 (define-gl-procedures
8438 ((glGetColorTable
8439 (target GLenum)
8440 (format GLenum)
8441 (type GLenum)
8442 (table GLvoid-*)
8443 ->
8444 void))
8445 "Retrieve contents of a color lookup table.
8446
8447 TARGET
8448 Must be `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
8449 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
8450
8451 FORMAT
8452 The format of the pixel data in TABLE. The possible values are
8453 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
8454 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
8455
8456 TYPE
8457 The type of the pixel data in TABLE. Symbolic constants
8458 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8459 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
8460 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8461 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
8462 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8463 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8464 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8465 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
8466 are accepted.
8467
8468 TABLE
8469 Pointer to a one-dimensional array of pixel data containing the
8470 contents of the color table.
8471
8472 `glGetColorTable' returns in TABLE the contents of the color table
8473 specified by TARGET. No pixel transfer operations are performed, but
8474 pixel storage modes that are applicable to `glReadPixels' are performed.
8475
8476 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8477 target (see `glBindBuffer') while a histogram table is requested, TABLE
8478 is treated as a byte offset into the buffer object's data store.
8479
8480 Color components that are requested in the specified FORMAT, but which
8481 are not included in the internal format of the color lookup table, are
8482 returned as zero. The assignments of internal color components to the
8483 components requested by FORMAT are
8484
8485 *Internal Component*
8486 *Resulting Component*
8487
8488 Red
8489 Red
8490
8491 Green
8492 Green
8493
8494 Blue
8495 Blue
8496
8497 Alpha
8498 Alpha
8499
8500 Luminance
8501 Red
8502
8503 Intensity
8504 Red
8505
8506
8507
8508 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8509 values.
8510
8511 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
8512 values.
8513
8514 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
8515 values.
8516
8517 `GL_INVALID_OPERATION' is generated if TYPE is one of
8518 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8519 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
8520 is not `GL_RGB'.
8521
8522 `GL_INVALID_OPERATION' is generated if TYPE is one of
8523 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8524 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8525 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8526 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
8527 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
8528
8529 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8530 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8531 store is currently mapped.
8532
8533 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8534 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8535 to the buffer object such that the memory writes required would exceed
8536 the data store size.
8537
8538 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8539 bound to the `GL_PIXEL_PACK_BUFFER' target and TABLE is not evenly
8540 divisible into the number of bytes needed to store in memory a datum
8541 indicated by TYPE.
8542
8543 `GL_INVALID_OPERATION' is generated if `glGetColorTable' is executed
8544 between the execution of `glBegin' and the corresponding execution of
8545 `glEnd'.")
8546
8547 (define-gl-procedures
8548 ((glGetCompressedTexImage
8549 (target GLenum)
8550 (lod GLint)
8551 (img GLvoid-*)
8552 ->
8553 void))
8554 "Return a compressed texture image.
8555
8556 TARGET
8557 Specifies which texture is to be obtained. `GL_TEXTURE_1D',
8558 `GL_TEXTURE_2D', and
8559 `GL_TEXTURE_3D'`GL_TEXTURE_CUBE_MAP_POSITIVE_X',
8560 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
8561 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
8562 and `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z' are accepted.
8563
8564 LOD
8565 Specifies the level-of-detail number of the desired image. Level 0
8566 is the base image level. Level N is the N th mipmap reduction
8567 image.
8568
8569 IMG
8570 Returns the compressed texture image.
8571
8572 `glGetCompressedTexImage' returns the compressed texture image
8573 associated with TARGET and LOD into IMG. IMG should be an array of
8574 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' bytes. TARGET specifies whether the
8575 desired texture image was one specified by `glTexImage1D'
8576 (`GL_TEXTURE_1D'), `glTexImage2D' (`GL_TEXTURE_2D' or any of
8577 `GL_TEXTURE_CUBE_MAP_*'), or `glTexImage3D' (`GL_TEXTURE_3D'). LOD
8578 specifies the level-of-detail number of the desired image.
8579
8580 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8581 target (see `glBindBuffer') while a texture image is requested, IMG is
8582 treated as a byte offset into the buffer object's data store.
8583
8584 To minimize errors, first verify that the texture is compressed by
8585 calling `glGetTexLevelParameter' with argument `GL_TEXTURE_COMPRESSED'.
8586 If the texture is compressed, then determine the amount of memory
8587 required to store the compressed texture by calling
8588 `glGetTexLevelParameter' with argument
8589 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE'. Finally, retrieve the internal
8590 format of the texture by calling `glGetTexLevelParameter' with argument
8591 `GL_TEXTURE_INTERNAL_FORMAT'. To store the texture for later use,
8592 associate the internal format and size with the retrieved texture image.
8593 These data can be used by the respective texture or subtexture loading
8594 routine used for loading TARGET textures.
8595
8596 `GL_INVALID_VALUE' is generated if LOD is less than zero or greater than
8597 the maximum number of LODs permitted by the implementation.
8598
8599 `GL_INVALID_OPERATION' is generated if `glGetCompressedTexImage' is used
8600 to retrieve a texture that is in an uncompressed internal format.
8601
8602 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8603 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8604 store is currently mapped.
8605
8606 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8607 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8608 to the buffer object such that the memory writes required would exceed
8609 the data store size.
8610
8611 `GL_INVALID_OPERATION' is generated if `glGetCompressedTexImage' is
8612 executed between the execution of `glBegin' and the corresponding
8613 execution of `glEnd'.")
8614
8615 (define-gl-procedures
8616 ((glGetConvolutionFilter
8617 (target GLenum)
8618 (format GLenum)
8619 (type GLenum)
8620 (image GLvoid-*)
8621 ->
8622 void))
8623 "Get current 1D or 2D convolution filter kernel.
8624
8625 TARGET
8626 The filter to be retrieved. Must be one of `GL_CONVOLUTION_1D' or
8627 `GL_CONVOLUTION_2D'.
8628
8629 FORMAT
8630 Format of the output image. Must be one of `GL_RED', `GL_GREEN',
8631 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
8632 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
8633
8634 TYPE
8635 Data type of components in the output image. Symbolic constants
8636 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8637 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
8638 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8639 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
8640 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8641 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8642 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8643 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
8644 are accepted.
8645
8646 IMAGE
8647 Pointer to storage for the output image.
8648
8649 `glGetConvolutionFilter' returns the current 1D or 2D convolution filter
8650 kernel as an image. The one- or two-dimensional image is placed in IMAGE
8651 according to the specifications in FORMAT and TYPE. No pixel transfer
8652 operations are performed on this image, but the relevant pixel storage
8653 modes are applied.
8654
8655 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8656 target (see `glBindBuffer') while a convolution filter is requested,
8657 IMAGE is treated as a byte offset into the buffer object's data store.
8658
8659 Color components that are present in FORMAT but not included in the
8660 internal format of the filter are returned as zero. The assignments of
8661 internal color components to the components of FORMAT are as follows.
8662
8663 *Internal Component*
8664 *Resulting Component*
8665
8666 Red
8667 Red
8668
8669 Green
8670 Green
8671
8672 Blue
8673 Blue
8674
8675 Alpha
8676 Alpha
8677
8678 Luminance
8679 Red
8680
8681 Intensity
8682 Red
8683
8684
8685
8686 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8687 values.
8688
8689 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
8690 values.
8691
8692 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
8693 values.
8694
8695 `GL_INVALID_OPERATION' is generated if TYPE is one of
8696 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8697 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
8698 is not `GL_RGB'.
8699
8700 `GL_INVALID_OPERATION' is generated if TYPE is one of
8701 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8702 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8703 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8704 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
8705 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
8706
8707 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8708 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8709 store is currently mapped.
8710
8711 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8712 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8713 to the buffer object such that the memory writes required would exceed
8714 the data store size.
8715
8716 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8717 bound to the `GL_PIXEL_PACK_BUFFER' target and IMAGE is not evenly
8718 divisible into the number of bytes needed to store in memory a datum
8719 indicated by TYPE.
8720
8721 `GL_INVALID_OPERATION' is generated if `glGetConvolutionFilter' is
8722 executed between the execution of `glBegin' and the corresponding
8723 execution of `glEnd'.")
8724
8725 (define-gl-procedures
8726 ((glGetConvolutionParameterfv
8727 (target GLenum)
8728 (pname GLenum)
8729 (params GLfloat-*)
8730 ->
8731 void)
8732 (glGetConvolutionParameteriv
8733 (target GLenum)
8734 (pname GLenum)
8735 (params GLint-*)
8736 ->
8737 void))
8738 "Get convolution parameters.
8739
8740 TARGET
8741 The filter whose parameters are to be retrieved. Must be one of
8742 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D'.
8743
8744 PNAME
8745 The parameter to be retrieved. Must be one of
8746 `GL_CONVOLUTION_BORDER_MODE', `GL_CONVOLUTION_BORDER_COLOR',
8747 `GL_CONVOLUTION_FILTER_SCALE', `GL_CONVOLUTION_FILTER_BIAS',
8748 `GL_CONVOLUTION_FORMAT', `GL_CONVOLUTION_WIDTH',
8749 `GL_CONVOLUTION_HEIGHT', `GL_MAX_CONVOLUTION_WIDTH', or
8750 `GL_MAX_CONVOLUTION_HEIGHT'.
8751
8752 PARAMS
8753 Pointer to storage for the parameters to be retrieved.
8754
8755 `glGetConvolutionParameter' retrieves convolution parameters. TARGET
8756 determines which convolution filter is queried. PNAME determines which
8757 parameter is returned:
8758
8759 `GL_CONVOLUTION_BORDER_MODE'
8760
8761
8762 The convolution border mode. See `glConvolutionParameter' for a
8763 list of border modes.
8764
8765 `GL_CONVOLUTION_BORDER_COLOR'
8766
8767
8768 The current convolution border color. PARAMS must be a pointer to
8769 an array of four elements, which will receive the red, green, blue,
8770 and alpha border colors.
8771
8772 `GL_CONVOLUTION_FILTER_SCALE'
8773
8774
8775 The current filter scale factors. PARAMS must be a pointer to an
8776 array of four elements, which will receive the red, green, blue,
8777 and alpha filter scale factors in that order.
8778
8779 `GL_CONVOLUTION_FILTER_BIAS'
8780
8781
8782 The current filter bias factors. PARAMS must be a pointer to an
8783 array of four elements, which will receive the red, green, blue,
8784 and alpha filter bias terms in that order.
8785
8786 `GL_CONVOLUTION_FORMAT'
8787
8788
8789 The current internal format. See `glConvolutionFilter1D',
8790 `glConvolutionFilter2D', and `glSeparableFilter2D' for lists of
8791 allowable formats.
8792
8793 `GL_CONVOLUTION_WIDTH'
8794
8795
8796 The current filter image width.
8797
8798 `GL_CONVOLUTION_HEIGHT'
8799
8800
8801 The current filter image height.
8802
8803 `GL_MAX_CONVOLUTION_WIDTH'
8804
8805
8806 The maximum acceptable filter image width.
8807
8808 `GL_MAX_CONVOLUTION_HEIGHT'
8809
8810
8811 The maximum acceptable filter image height.
8812
8813 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8814 values.
8815
8816 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
8817 values.
8818
8819 `GL_INVALID_ENUM' is generated if TARGET is `GL_CONVOLUTION_1D' and
8820 PNAME is `GL_CONVOLUTION_HEIGHT' or `GL_MAX_CONVOLUTION_HEIGHT'.
8821
8822 `GL_INVALID_OPERATION' is generated if `glGetConvolutionParameter' is
8823 executed between the execution of `glBegin' and the corresponding
8824 execution of `glEnd'.")
8825
8826 (define-gl-procedures
8827 ((glGetError -> GLenum))
8828 "Return error information.
8829
8830 `glGetError' returns the value of the error flag. Each detectable error
8831 is assigned a numeric code and symbolic name. When an error occurs, the
8832 error flag is set to the appropriate error code value. No other errors
8833 are recorded until `glGetError' is called, the error code is returned,
8834 and the flag is reset to `GL_NO_ERROR'. If a call to `glGetError'
8835 returns `GL_NO_ERROR', there has been no detectable error since the last
8836 call to `glGetError', or since the GL was initialized.
8837
8838 To allow for distributed implementations, there may be several error
8839 flags. If any single error flag has recorded an error, the value of that
8840 flag is returned and that flag is reset to `GL_NO_ERROR' when
8841 `glGetError' is called. If more than one flag has recorded an error,
8842 `glGetError' returns and clears an arbitrary error flag value. Thus,
8843 `glGetError' should always be called in a loop, until it returns
8844 `GL_NO_ERROR', if all error flags are to be reset.
8845
8846 Initially, all error flags are set to `GL_NO_ERROR'.
8847
8848 The following errors are currently defined:
8849
8850 `GL_NO_ERROR'
8851 No error has been recorded. The value of this symbolic constant is
8852 guaranteed to be 0.
8853
8854 `GL_INVALID_ENUM'
8855 An unacceptable value is specified for an enumerated argument. The
8856 offending command is ignored and has no other side effect than to
8857 set the error flag.
8858
8859 `GL_INVALID_VALUE'
8860 A numeric argument is out of range. The offending command is
8861 ignored and has no other side effect than to set the error flag.
8862
8863 `GL_INVALID_OPERATION'
8864 The specified operation is not allowed in the current state. The
8865 offending command is ignored and has no other side effect than to
8866 set the error flag.
8867
8868 `GL_STACK_OVERFLOW'
8869 This command would cause a stack overflow. The offending command is
8870 ignored and has no other side effect than to set the error flag.
8871
8872 `GL_STACK_UNDERFLOW'
8873 This command would cause a stack underflow. The offending command
8874 is ignored and has no other side effect than to set the error flag.
8875
8876 `GL_OUT_OF_MEMORY'
8877 There is not enough memory left to execute the command. The state
8878 of the GL is undefined, except for the state of the error flags,
8879 after this error is recorded.
8880
8881 `GL_TABLE_TOO_LARGE'
8882 The specified table exceeds the implementation's maximum supported
8883 table size. The offending command is ignored and has no other side
8884 effect than to set the error flag.
8885
8886 When an error flag is set, results of a GL operation are undefined only
8887 if `GL_OUT_OF_MEMORY' has occurred. In all other cases, the command
8888 generating the error is ignored and has no effect on the GL state or
8889 frame buffer contents. If the generating command returns a value, it
8890 returns 0. If `glGetError' itself generates an error, it returns 0.
8891
8892 `GL_INVALID_OPERATION' is generated if `glGetError' is executed between
8893 the execution of `glBegin' and the corresponding execution of `glEnd'.
8894 In this case, `glGetError' returns 0.")
8895
8896 (define-gl-procedures
8897 ((glGetHistogramParameterfv
8898 (target GLenum)
8899 (pname GLenum)
8900 (params GLfloat-*)
8901 ->
8902 void)
8903 (glGetHistogramParameteriv
8904 (target GLenum)
8905 (pname GLenum)
8906 (params GLint-*)
8907 ->
8908 void))
8909 "Get histogram parameters.
8910
8911 TARGET
8912 Must be one of `GL_HISTOGRAM' or `GL_PROXY_HISTOGRAM'.
8913
8914 PNAME
8915 The name of the parameter to be retrieved. Must be one of
8916 `GL_HISTOGRAM_WIDTH', `GL_HISTOGRAM_FORMAT',
8917 `GL_HISTOGRAM_RED_SIZE', `GL_HISTOGRAM_GREEN_SIZE',
8918 `GL_HISTOGRAM_BLUE_SIZE', `GL_HISTOGRAM_ALPHA_SIZE',
8919 `GL_HISTOGRAM_LUMINANCE_SIZE', or `GL_HISTOGRAM_SINK'.
8920
8921 PARAMS
8922 Pointer to storage for the returned values.
8923
8924 `glGetHistogramParameter' is used to query parameter values for the
8925 current histogram or for a proxy. The histogram state information may be
8926 queried by calling `glGetHistogramParameter' with a TARGET of
8927 `GL_HISTOGRAM' (to obtain information for the current histogram table)
8928 or `GL_PROXY_HISTOGRAM' (to obtain information from the most recent
8929 proxy request) and one of the following values for the PNAME argument:
8930
8931
8932
8933 *Parameter*
8934 *Description*
8935
8936 `GL_HISTOGRAM_WIDTH'
8937 Histogram table width
8938
8939 `GL_HISTOGRAM_FORMAT'
8940 Internal format
8941
8942 `GL_HISTOGRAM_RED_SIZE'
8943 Red component counter size, in bits
8944
8945 `GL_HISTOGRAM_GREEN_SIZE'
8946 Green component counter size, in bits
8947
8948 `GL_HISTOGRAM_BLUE_SIZE'
8949 Blue component counter size, in bits
8950
8951 `GL_HISTOGRAM_ALPHA_SIZE'
8952 Alpha component counter size, in bits
8953
8954 `GL_HISTOGRAM_LUMINANCE_SIZE'
8955 Luminance component counter size, in bits
8956
8957 `GL_HISTOGRAM_SINK'
8958 Value of the SINK parameter
8959
8960
8961
8962 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8963 values.
8964
8965 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
8966 values.
8967
8968 `GL_INVALID_OPERATION' is generated if `glGetHistogramParameter' is
8969 executed between the execution of `glBegin' and the corresponding
8970 execution of `glEnd'.")
8971
8972 (define-gl-procedures
8973 ((glGetHistogram
8974 (target GLenum)
8975 (reset GLboolean)
8976 (format GLenum)
8977 (type GLenum)
8978 (values GLvoid-*)
8979 ->
8980 void))
8981 "Get histogram table.
8982
8983 TARGET
8984 Must be `GL_HISTOGRAM'.
8985
8986 RESET
8987 If `GL_TRUE', each component counter that is actually returned is
8988 reset to zero. (Other counters are unaffected.) If `GL_FALSE', none
8989 of the counters in the histogram table is modified.
8990
8991 FORMAT
8992 The format of values to be returned in VALUES. Must be one of
8993 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
8994 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
8995
8996 TYPE
8997 The type of values to be returned in VALUES. Symbolic constants
8998 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8999 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9000 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9001 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9002 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9003 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9004 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9005 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9006 are accepted.
9007
9008 VALUES
9009 A pointer to storage for the returned histogram table.
9010
9011 `glGetHistogram' returns the current histogram table as a
9012 one-dimensional image with the same width as the histogram. No pixel
9013 transfer operations are performed on this image, but pixel storage modes
9014 that are applicable to 1D images are honored.
9015
9016 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9017 target (see `glBindBuffer') while a histogram table is requested, VALUES
9018 is treated as a byte offset into the buffer object's data store.
9019
9020 Color components that are requested in the specified FORMAT, but which
9021 are not included in the internal format of the histogram, are returned
9022 as zero. The assignments of internal color components to the components
9023 requested by FORMAT are:
9024
9025 *Internal Component*
9026 *Resulting Component*
9027
9028 Red
9029 Red
9030
9031 Green
9032 Green
9033
9034 Blue
9035 Blue
9036
9037 Alpha
9038 Alpha
9039
9040 Luminance
9041 Red
9042
9043
9044
9045 `GL_INVALID_ENUM' is generated if TARGET is not `GL_HISTOGRAM'.
9046
9047 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
9048 values.
9049
9050 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
9051 values.
9052
9053 `GL_INVALID_OPERATION' is generated if TYPE is one of
9054 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9055 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
9056 is not `GL_RGB'.
9057
9058 `GL_INVALID_OPERATION' is generated if TYPE is one of
9059 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9060 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9061 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9062 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
9063 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
9064
9065 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9066 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9067 store is currently mapped.
9068
9069 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9070 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9071 to the buffer object such that the memory writes required would exceed
9072 the data store size.
9073
9074 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9075 bound to the `GL_PIXEL_PACK_BUFFER' target and VALUES is not evenly
9076 divisible into the number of bytes needed to store in memory a datum
9077 indicated by TYPE.
9078
9079 `GL_INVALID_OPERATION' is generated if `glGetHistogram' is executed
9080 between the execution of `glBegin' and the corresponding execution of
9081 `glEnd'.")
9082
9083 (define-gl-procedures
9084 ((glGetLightfv
9085 (light GLenum)
9086 (pname GLenum)
9087 (params GLfloat-*)
9088 ->
9089 void)
9090 (glGetLightiv
9091 (light GLenum)
9092 (pname GLenum)
9093 (params GLint-*)
9094 ->
9095 void))
9096 "Return light source parameter values.
9097
9098 LIGHT
9099 Specifies a light source. The number of possible lights depends on
9100 the implementation, but at least eight lights are supported. They
9101 are identified by symbolic names of the form `GL_LIGHT' I where I
9102 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
9103
9104 PNAME
9105 Specifies a light source parameter for LIGHT. Accepted symbolic
9106 names are `GL_AMBIENT', `GL_DIFFUSE', `GL_SPECULAR', `GL_POSITION',
9107 `GL_SPOT_DIRECTION', `GL_SPOT_EXPONENT', `GL_SPOT_CUTOFF',
9108 `GL_CONSTANT_ATTENUATION', `GL_LINEAR_ATTENUATION', and
9109 `GL_QUADRATIC_ATTENUATION'.
9110
9111 PARAMS
9112 Returns the requested data.
9113
9114 `glGetLight' returns in PARAMS the value or values of a light source
9115 parameter. LIGHT names the light and is a symbolic name of the form
9116 `GL_LIGHT'I where i ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
9117 `GL_MAX_LIGHTS' is an implementation dependent constant that is greater
9118 than or equal to eight. PNAME specifies one of ten light source
9119 parameters, again by symbolic name.
9120
9121 The following parameters are defined:
9122
9123 `GL_AMBIENT'
9124 PARAMS returns four integer or floating-point values representing
9125 the ambient intensity of the light source. Integer values, when
9126 requested, are linearly mapped from the internal floating-point
9127 representation such that 1.0 maps to the most positive
9128 representable integer value, and -1.0 maps to the most negative
9129 representable integer value. If the internal value is outside the
9130 range [-1,1] , the corresponding integer return value is undefined.
9131 The initial value is (0, 0, 0, 1).
9132
9133 `GL_DIFFUSE'
9134 PARAMS returns four integer or floating-point values representing
9135 the diffuse 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 for `GL_LIGHT0' is (1, 1, 1, 1); for other
9142 lights, the initial value is (0, 0, 0, 0).
9143
9144 `GL_SPECULAR'
9145 PARAMS returns four integer or floating-point values representing
9146 the specular intensity of the light source. Integer values, when
9147 requested, are linearly mapped from the internal floating-point
9148 representation such that 1.0 maps to the most positive
9149 representable integer value, and -1.0 maps to the most negative
9150 representable integer value. If the internal value is outside the
9151 range [-1,1] , the corresponding integer return value is undefined.
9152 The initial value for `GL_LIGHT0' is (1, 1, 1, 1); for other
9153 lights, the initial value is (0, 0, 0, 0).
9154
9155 `GL_POSITION'
9156 PARAMS returns four integer or floating-point values representing
9157 the position of the light source. Integer values, when requested,
9158 are computed by rounding the internal floating-point values to the
9159 nearest integer value. The returned values are those maintained in
9160 eye coordinates. They will not be equal to the values specified
9161 using `glLight', unless the modelview matrix was identity at the
9162 time `glLight' was called. The initial value is (0, 0, 1, 0).
9163
9164 `GL_SPOT_DIRECTION'
9165 PARAMS returns three integer or floating-point values representing
9166 the direction of the light source. Integer values, when requested,
9167 are computed by rounding the internal floating-point values to the
9168 nearest integer value. The returned values are those maintained in
9169 eye coordinates. They will not be equal to the values specified
9170 using `glLight', unless the modelview matrix was identity at the
9171 time `glLight' was called. Although spot direction is normalized
9172 before being used in the lighting equation, the returned values are
9173 the transformed versions of the specified values prior to
9174 normalization. The initial value is (0,0-1) .
9175
9176 `GL_SPOT_EXPONENT'
9177 PARAMS returns a single integer or floating-point value
9178 representing the spot exponent of the light. An integer value, when
9179 requested, is computed by rounding the internal floating-point
9180 representation to the nearest integer. The initial value is 0.
9181
9182 `GL_SPOT_CUTOFF'
9183 PARAMS returns a single integer or floating-point value
9184 representing the spot cutoff angle of the light. An integer value,
9185 when requested, is computed by rounding the internal floating-point
9186 representation to the nearest integer. The initial value is 180.
9187
9188 `GL_CONSTANT_ATTENUATION'
9189 PARAMS returns a single integer or floating-point value
9190 representing the constant (not distance-related) attenuation of the
9191 light. An integer value, when requested, is computed by rounding
9192 the internal floating-point representation to the nearest integer.
9193 The initial value is 1.
9194
9195 `GL_LINEAR_ATTENUATION'
9196 PARAMS returns a single integer or floating-point value
9197 representing the linear attenuation of the light. An integer value,
9198 when requested, is computed by rounding the internal floating-point
9199 representation to the nearest integer. The initial value is 0.
9200
9201 `GL_QUADRATIC_ATTENUATION'
9202 PARAMS returns a single integer or floating-point value
9203 representing the quadratic attenuation of the light. An integer
9204 value, when requested, is computed by rounding the internal
9205 floating-point representation to the nearest integer. The initial
9206 value is 0.
9207
9208 `GL_INVALID_ENUM' is generated if LIGHT or PNAME is not an accepted
9209 value.
9210
9211 `GL_INVALID_OPERATION' is generated if `glGetLight' is executed between
9212 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9213
9214 (define-gl-procedures
9215 ((glGetMapdv
9216 (target GLenum)
9217 (query GLenum)
9218 (v GLdouble-*)
9219 ->
9220 void)
9221 (glGetMapfv
9222 (target GLenum)
9223 (query GLenum)
9224 (v GLfloat-*)
9225 ->
9226 void)
9227 (glGetMapiv
9228 (target GLenum)
9229 (query GLenum)
9230 (v GLint-*)
9231 ->
9232 void))
9233 "Return evaluator parameters.
9234
9235 TARGET
9236 Specifies the symbolic name of a map. Accepted values are
9237 `GL_MAP1_COLOR_4', `GL_MAP1_INDEX', `GL_MAP1_NORMAL',
9238 `GL_MAP1_TEXTURE_COORD_1', `GL_MAP1_TEXTURE_COORD_2',
9239 `GL_MAP1_TEXTURE_COORD_3', `GL_MAP1_TEXTURE_COORD_4',
9240 `GL_MAP1_VERTEX_3', `GL_MAP1_VERTEX_4', `GL_MAP2_COLOR_4',
9241 `GL_MAP2_INDEX', `GL_MAP2_NORMAL', `GL_MAP2_TEXTURE_COORD_1',
9242 `GL_MAP2_TEXTURE_COORD_2', `GL_MAP2_TEXTURE_COORD_3',
9243 `GL_MAP2_TEXTURE_COORD_4', `GL_MAP2_VERTEX_3', and
9244 `GL_MAP2_VERTEX_4'.
9245
9246 QUERY
9247 Specifies which parameter to return. Symbolic names `GL_COEFF',
9248 `GL_ORDER', and `GL_DOMAIN' are accepted.
9249
9250 V
9251 Returns the requested data.
9252
9253 `glMap1' and `glMap2' define evaluators. `glGetMap' returns evaluator
9254 parameters. TARGET chooses a map, QUERY selects a specific parameter,
9255 and V points to storage where the values will be returned.
9256
9257 The acceptable values for the TARGET parameter are described in the
9258 `glMap1' and `glMap2' reference pages.
9259
9260 QUERY can assume the following values:
9261
9262 `GL_COEFF'
9263 V returns the control points for the evaluator function.
9264 One-dimensional evaluators return ORDER control points, and
9265 two-dimensional evaluators return UORDER×VORDER control points.
9266 Each control point consists of one, two, three, or four integer,
9267 single-precision floating-point, or double-precision floating-point
9268 values, depending on the type of the evaluator. The GL returns
9269 two-dimensional control points in row-major order, incrementing the
9270 UORDER index quickly and the VORDER index after each row. Integer
9271 values, when requested, are computed by rounding the internal
9272 floating-point values to the nearest integer values.
9273
9274 `GL_ORDER'
9275 V returns the order of the evaluator function. One-dimensional
9276 evaluators return a single value, ORDER . The initial value is 1.
9277 Two-dimensional evaluators return two values, UORDER and VORDER .
9278 The initial value is 1,1.
9279
9280 `GL_DOMAIN'
9281 V returns the linear U and V mapping parameters. One-dimensional
9282 evaluators return two values, U1 and U2 , as specified by `glMap1'.
9283 Two-dimensional evaluators return four values ( U1 , U2 , V1 , and
9284 V2 ) as specified by `glMap2'. Integer values, when requested, are
9285 computed by rounding the internal floating-point values to the
9286 nearest integer values.
9287
9288 `GL_INVALID_ENUM' is generated if either TARGET or QUERY is not an
9289 accepted value.
9290
9291 `GL_INVALID_OPERATION' is generated if `glGetMap' is executed between
9292 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9293
9294 (define-gl-procedures
9295 ((glGetMaterialfv
9296 (face GLenum)
9297 (pname GLenum)
9298 (params GLfloat-*)
9299 ->
9300 void)
9301 (glGetMaterialiv
9302 (face GLenum)
9303 (pname GLenum)
9304 (params GLint-*)
9305 ->
9306 void))
9307 "Return material parameters.
9308
9309 FACE
9310 Specifies which of the two materials is being queried. `GL_FRONT'
9311 or `GL_BACK' are accepted, representing the front and back
9312 materials, respectively.
9313
9314 PNAME
9315 Specifies the material parameter to return. `GL_AMBIENT',
9316 `GL_DIFFUSE', `GL_SPECULAR', `GL_EMISSION', `GL_SHININESS', and
9317 `GL_COLOR_INDEXES' are accepted.
9318
9319 PARAMS
9320 Returns the requested data.
9321
9322 `glGetMaterial' returns in PARAMS the value or values of parameter PNAME
9323 of material FACE. Six parameters are defined:
9324
9325 `GL_AMBIENT'
9326 PARAMS returns four integer or floating-point values representing
9327 the ambient reflectance of the material. Integer values, when
9328 requested, are linearly mapped from the internal floating-point
9329 representation such that 1.0 maps to the most positive
9330 representable integer value, and -1.0 maps to the most negative
9331 representable integer value. If the internal value is outside the
9332 range [-1,1] , the corresponding integer return value is undefined.
9333 The initial value is (0.2, 0.2, 0.2, 1.0)
9334
9335 `GL_DIFFUSE'
9336 PARAMS returns four integer or floating-point values representing
9337 the diffuse reflectance of the material. Integer values, when
9338 requested, are linearly mapped from the internal floating-point
9339 representation such that 1.0 maps to the most positive
9340 representable integer value, and -1.0 maps to the most negative
9341 representable integer value. If the internal value is outside the
9342 range [-1,1] , the corresponding integer return value is undefined.
9343 The initial value is (0.8, 0.8, 0.8, 1.0).
9344
9345 `GL_SPECULAR'
9346 PARAMS returns four integer or floating-point values representing
9347 the specular reflectance of the material. Integer values, when
9348 requested, are linearly mapped from the internal floating-point
9349 representation such that 1.0 maps to the most positive
9350 representable integer value, and -1.0 maps to the most negative
9351 representable integer value. If the internal value is outside the
9352 range [-1,1] , the corresponding integer return value is undefined.
9353 The initial value is (0, 0, 0, 1).
9354
9355 `GL_EMISSION'
9356 PARAMS returns four integer or floating-point values representing
9357 the emitted light intensity of the material. Integer values, when
9358 requested, are linearly mapped from the internal floating-point
9359 representation such that 1.0 maps to the most positive
9360 representable integer value, and -1.0 maps to the most negative
9361 representable integer value. If the internal value is outside the
9362 range [-1,1] , the corresponding integer return value is undefined.
9363 The initial value is (0, 0, 0, 1).
9364
9365 `GL_SHININESS'
9366 PARAMS returns one integer or floating-point value representing the
9367 specular exponent of the material. Integer values, when requested,
9368 are computed by rounding the internal floating-point value to the
9369 nearest integer value. The initial value is 0.
9370
9371 `GL_COLOR_INDEXES'
9372 PARAMS returns three integer or floating-point values representing
9373 the ambient, diffuse, and specular indices of the material. These
9374 indices are used only for color index lighting. (All the other
9375 parameters are used only for RGBA lighting.) Integer values, when
9376 requested, are computed by rounding the internal floating-point
9377 values to the nearest integer values.
9378
9379 `GL_INVALID_ENUM' is generated if FACE or PNAME is not an accepted
9380 value.
9381
9382 `GL_INVALID_OPERATION' is generated if `glGetMaterial' is executed
9383 between the execution of `glBegin' and the corresponding execution of
9384 `glEnd'.")
9385
9386 (define-gl-procedures
9387 ((glGetMinmaxParameterfv
9388 (target GLenum)
9389 (pname GLenum)
9390 (params GLfloat-*)
9391 ->
9392 void)
9393 (glGetMinmaxParameteriv
9394 (target GLenum)
9395 (pname GLenum)
9396 (params GLint-*)
9397 ->
9398 void))
9399 "Get minmax parameters.
9400
9401 TARGET
9402 Must be `GL_MINMAX'.
9403
9404 PNAME
9405 The parameter to be retrieved. Must be one of `GL_MINMAX_FORMAT' or
9406 `GL_MINMAX_SINK'.
9407
9408 PARAMS
9409 A pointer to storage for the retrieved parameters.
9410
9411 `glGetMinmaxParameter' retrieves parameters for the current minmax table
9412 by setting PNAME to one of the following values:
9413
9414
9415
9416 *Parameter*
9417 *Description*
9418
9419 `GL_MINMAX_FORMAT'
9420 Internal format of minmax table
9421
9422 `GL_MINMAX_SINK'
9423 Value of the SINK parameter
9424
9425
9426
9427 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
9428
9429 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
9430 values.
9431
9432 `GL_INVALID_OPERATION' is generated if `glGetMinmaxParameter' is
9433 executed between the execution of `glBegin' and the corresponding
9434 execution of `glEnd'.")
9435
9436 (define-gl-procedures
9437 ((glGetMinmax
9438 (target GLenum)
9439 (reset GLboolean)
9440 (format GLenum)
9441 (types GLenum)
9442 (values GLvoid-*)
9443 ->
9444 void))
9445 "Get minimum and maximum pixel values.
9446
9447 TARGET
9448 Must be `GL_MINMAX'.
9449
9450 RESET
9451 If `GL_TRUE', all entries in the minmax table that are actually
9452 returned are reset to their initial values. (Other entries are
9453 unaltered.) If `GL_FALSE', the minmax table is unaltered.
9454
9455 FORMAT
9456 The format of the data to be returned in VALUES. Must be one of
9457 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
9458 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
9459
9460 TYPES
9461 The type of the data to be returned in VALUES. Symbolic constants
9462 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
9463 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9464 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9465 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9466 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9467 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9468 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9469 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9470 are accepted.
9471
9472 VALUES
9473 A pointer to storage for the returned values.
9474
9475 `glGetMinmax' returns the accumulated minimum and maximum pixel values
9476 (computed on a per-component basis) in a one-dimensional image of width
9477 2. The first set of return values are the minima, and the second set of
9478 return values are the maxima. The format of the return values is
9479 determined by FORMAT, and their type is determined by TYPES.
9480
9481 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9482 target (see `glBindBuffer') while minimum and maximum pixel values are
9483 requested, VALUES is treated as a byte offset into the buffer object's
9484 data store.
9485
9486 No pixel transfer operations are performed on the return values, but
9487 pixel storage modes that are applicable to one-dimensional images are
9488 performed. Color components that are requested in the specified FORMAT,
9489 but that are not included in the internal format of the minmax table,
9490 are returned as zero. The assignment of internal color components to the
9491 components requested by FORMAT are as follows:
9492
9493
9494
9495 *Internal Component*
9496 *Resulting Component*
9497
9498 Red
9499 Red
9500
9501 Green
9502 Green
9503
9504 Blue
9505 Blue
9506
9507 Alpha
9508 Alpha
9509
9510 Luminance
9511 Red
9512
9513 If RESET is `GL_TRUE', the minmax table entries corresponding to the
9514 return values are reset to their initial values. Minimum and maximum
9515 values that are not returned are not modified, even if RESET is
9516 `GL_TRUE'.
9517
9518 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
9519
9520 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
9521 values.
9522
9523 `GL_INVALID_ENUM' is generated if TYPES is not one of the allowable
9524 values.
9525
9526 `GL_INVALID_OPERATION' is generated if TYPES is one of
9527 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9528 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
9529 is not `GL_RGB'.
9530
9531 `GL_INVALID_OPERATION' is generated if TYPES is one of
9532 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9533 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9534 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9535 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
9536 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
9537
9538 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9539 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9540 store is currently mapped.
9541
9542 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9543 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9544 to the buffer object such that the memory writes required would exceed
9545 the data store size.
9546
9547 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9548 bound to the `GL_PIXEL_PACK_BUFFER' target and VALUES is not evenly
9549 divisible into the number of bytes needed to store in memory a datum
9550 indicated by TYPE.
9551
9552 `GL_INVALID_OPERATION' is generated if `glGetMinmax' is executed between
9553 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9554
9555 (define-gl-procedures
9556 ((glGetPixelMapfv
9557 (map GLenum)
9558 (data GLfloat-*)
9559 ->
9560 void)
9561 (glGetPixelMapuiv
9562 (map GLenum)
9563 (data GLuint-*)
9564 ->
9565 void)
9566 (glGetPixelMapusv
9567 (map GLenum)
9568 (data GLushort-*)
9569 ->
9570 void))
9571 "Return the specified pixel map.
9572
9573 MAP
9574 Specifies the name of the pixel map to return. Accepted values are
9575 `GL_PIXEL_MAP_I_TO_I', `GL_PIXEL_MAP_S_TO_S',
9576 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
9577 `GL_PIXEL_MAP_I_TO_B', `GL_PIXEL_MAP_I_TO_A',
9578 `GL_PIXEL_MAP_R_TO_R', `GL_PIXEL_MAP_G_TO_G',
9579 `GL_PIXEL_MAP_B_TO_B', and `GL_PIXEL_MAP_A_TO_A'.
9580
9581 DATA
9582 Returns the pixel map contents.
9583
9584 See the `glPixelMap' reference page for a description of the acceptable
9585 values for the MAP parameter. `glGetPixelMap' returns in DATA the
9586 contents of the pixel map specified in MAP. Pixel maps are used during
9587 the execution of `glReadPixels', `glDrawPixels', `glCopyPixels',
9588 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glTexSubImage1D',
9589 `glTexSubImage2D', `glTexSubImage3D', `glCopyTexImage1D',
9590 `glCopyTexImage2D', `glCopyTexSubImage1D', `glCopyTexSubImage2D', and
9591 `glCopyTexSubImage3D'. to map color indices, stencil indices, color
9592 components, and depth components to other values.
9593
9594 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9595 target (see `glBindBuffer') while a pixel map is requested, DATA is
9596 treated as a byte offset into the buffer object's data store.
9597
9598 Unsigned integer values, if requested, are linearly mapped from the
9599 internal fixed or floating-point representation such that 1.0 maps to
9600 the largest representable integer value, and 0.0 maps to 0. Return
9601 unsigned integer values are undefined if the map value was not in the
9602 range [0,1].
9603
9604 To determine the required size of MAP, call `glGet' with the appropriate
9605 symbolic constant.
9606
9607 `GL_INVALID_ENUM' is generated if MAP is not an accepted value.
9608
9609 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9610 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9611 store is currently mapped.
9612
9613 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9614 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9615 to the buffer object such that the memory writes required would exceed
9616 the data store size.
9617
9618 `GL_INVALID_OPERATION' is generated by `glGetPixelMapfv' if a non-zero
9619 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9620 DATA is not evenly divisible into the number of bytes needed to store in
9621 memory a GLfloat datum.
9622
9623 `GL_INVALID_OPERATION' is generated by `glGetPixelMapuiv' if a non-zero
9624 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9625 DATA is not evenly divisible into the number of bytes needed to store in
9626 memory a GLuint datum.
9627
9628 `GL_INVALID_OPERATION' is generated by `glGetPixelMapusv' if a non-zero
9629 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9630 DATA is not evenly divisible into the number of bytes needed to store in
9631 memory a GLushort datum.
9632
9633 `GL_INVALID_OPERATION' is generated if `glGetPixelMap' is executed
9634 between the execution of `glBegin' and the corresponding execution of
9635 `glEnd'.")
9636
9637 (define-gl-procedures
9638 ((glGetPointerv
9639 (pname GLenum)
9640 (params GLvoid-**)
9641 ->
9642 void))
9643 "Return the address of the specified pointer.
9644
9645 PNAME
9646 Specifies the array or buffer pointer to be returned. Symbolic
9647 constants `GL_COLOR_ARRAY_POINTER', `GL_EDGE_FLAG_ARRAY_POINTER',
9648 `GL_FOG_COORD_ARRAY_POINTER', `GL_FEEDBACK_BUFFER_POINTER',
9649 `GL_INDEX_ARRAY_POINTER', `GL_NORMAL_ARRAY_POINTER',
9650 `GL_SECONDARY_COLOR_ARRAY_POINTER', `GL_SELECTION_BUFFER_POINTER',
9651 `GL_TEXTURE_COORD_ARRAY_POINTER', or `GL_VERTEX_ARRAY_POINTER' are
9652 accepted.
9653
9654 PARAMS
9655 Returns the pointer value specified by PNAME.
9656
9657 `glGetPointerv' returns pointer information. PNAME is a symbolic
9658 constant indicating the pointer to be returned, and PARAMS is a pointer
9659 to a location in which to place the returned data.
9660
9661 For all PNAME arguments except `GL_FEEDBACK_BUFFER_POINTER' and
9662 `GL_SELECTION_BUFFER_POINTER', if a non-zero named buffer object was
9663 bound to the `GL_ARRAY_BUFFER' target (see `glBindBuffer') when the
9664 desired pointer was previously specified, the pointer returned is a byte
9665 offset into the buffer object's data store. Buffer objects are only
9666 available in OpenGL versions 1.5 and greater.
9667
9668 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.")
9669
9670 (define-gl-procedures
9671 ((glGetPolygonStipple (pattern GLubyte-*) -> void))
9672 "Return the polygon stipple pattern.
9673
9674 PATTERN
9675 Returns the stipple pattern. The initial value is all 1's.
9676
9677 `glGetPolygonStipple' returns to PATTERN a 32×32 polygon stipple
9678 pattern. The pattern is packed into memory as if `glReadPixels' with
9679 both HEIGHT and WIDTH of 32, TYPE of `GL_BITMAP', and FORMAT of
9680 `GL_COLOR_INDEX' were called, and the stipple pattern were stored in an
9681 internal 32×32 color index buffer. Unlike `glReadPixels', however, pixel
9682 transfer operations (shift, offset, pixel map) are not applied to the
9683 returned stipple image.
9684
9685 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9686 target (see `glBindBuffer') while a polygon stipple pattern is
9687 requested, PATTERN is treated as a byte offset into the buffer object's
9688 data store.
9689
9690 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9691 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9692 store is currently mapped.
9693
9694 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9695 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9696 to the buffer object such that the memory writes required would exceed
9697 the data store size.
9698
9699 `GL_INVALID_OPERATION' is generated if `glGetPolygonStipple' is executed
9700 between the execution of `glBegin' and the corresponding execution of
9701 `glEnd'.")
9702
9703 (define-gl-procedures
9704 ((glGetProgramInfoLog
9705 (program GLuint)
9706 (maxLength GLsizei)
9707 (length GLsizei-*)
9708 (infoLog GLchar-*)
9709 ->
9710 void))
9711 "Returns the information log for a program object.
9712
9713 PROGRAM
9714 Specifies the program object whose information log is to be
9715 queried.
9716
9717 MAXLENGTH
9718 Specifies the size of the character buffer for storing the returned
9719 information log.
9720
9721 LENGTH
9722 Returns the length of the string returned in INFOLOG (excluding the
9723 null terminator).
9724
9725 INFOLOG
9726 Specifies an array of characters that is used to return the
9727 information log.
9728
9729 `glGetProgramInfoLog' returns the information log for the specified
9730 program object. The information log for a program object is modified
9731 when the program object is linked or validated. The string that is
9732 returned will be null terminated.
9733
9734 `glGetProgramInfoLog' returns in INFOLOG as much of the information log
9735 as it can, up to a maximum of MAXLENGTH characters. The number of
9736 characters actually returned, excluding the null termination character,
9737 is specified by LENGTH. If the length of the returned string is not
9738 required, a value of `NULL' can be passed in the LENGTH argument. The
9739 size of the buffer required to store the returned information log can be
9740 obtained by calling `glGetProgram' with the value `GL_INFO_LOG_LENGTH'.
9741
9742 The information log for a program object is either an empty string, or a
9743 string containing information about the last link operation, or a string
9744 containing information about the last validation operation. It may
9745 contain diagnostic messages, warning messages, and other information.
9746 When a program object is created, its information log will be a string
9747 of length 0.
9748
9749 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
9750 OpenGL.
9751
9752 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
9753
9754 `GL_INVALID_VALUE' is generated if MAXLENGTH is less than 0.
9755
9756 `GL_INVALID_OPERATION' is generated if `glGetProgramInfoLog' is executed
9757 between the execution of `glBegin' and the corresponding execution of
9758 `glEnd'.")
9759
9760 (define-gl-procedures
9761 ((glGetProgramiv
9762 (program GLuint)
9763 (pname GLenum)
9764 (params GLint-*)
9765 ->
9766 void))
9767 "Returns a parameter from a program object.
9768
9769 PROGRAM
9770 Specifies the program object to be queried.
9771
9772 PNAME
9773 Specifies the object parameter. Accepted symbolic names are
9774 `GL_DELETE_STATUS', `GL_LINK_STATUS', `GL_VALIDATE_STATUS',
9775 `GL_INFO_LOG_LENGTH', `GL_ATTACHED_SHADERS',
9776 `GL_ACTIVE_ATTRIBUTES', `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH',
9777 `GL_ACTIVE_UNIFORMS', `GL_ACTIVE_UNIFORM_MAX_LENGTH'.
9778
9779 PARAMS
9780 Returns the requested object parameter.
9781
9782 `glGetProgram' returns in PARAMS the value of a parameter for a specific
9783 program object. The following parameters are defined:
9784
9785 `GL_DELETE_STATUS'
9786
9787
9788 PARAMS returns `GL_TRUE' if PROGRAM is currently flagged for
9789 deletion, and `GL_FALSE' otherwise.
9790
9791 `GL_LINK_STATUS'
9792
9793
9794 PARAMS returns `GL_TRUE' if the last link operation on PROGRAM was
9795 successful, and `GL_FALSE' otherwise.
9796
9797 `GL_VALIDATE_STATUS'
9798
9799
9800 PARAMS returns `GL_TRUE' or if the last validation operation on
9801 PROGRAM was successful, and `GL_FALSE' otherwise.
9802
9803 `GL_INFO_LOG_LENGTH'
9804
9805
9806 PARAMS returns the number of characters in the information log for
9807 PROGRAM including the null termination character (i.e., the size of
9808 the character buffer required to store the information log). If
9809 PROGRAM has no information log, a value of 0 is returned.
9810
9811 `GL_ATTACHED_SHADERS'
9812
9813
9814 PARAMS returns the number of shader objects attached to PROGRAM.
9815
9816 `GL_ACTIVE_ATTRIBUTES'
9817
9818
9819 PARAMS returns the number of active attribute variables for
9820 PROGRAM.
9821
9822 `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH'
9823
9824
9825 PARAMS returns the length of the longest active attribute name for
9826 PROGRAM, including the null termination character (i.e., the size
9827 of the character buffer required to store the longest attribute
9828 name). If no active attributes exist, 0 is returned.
9829
9830 `GL_ACTIVE_UNIFORMS'
9831
9832
9833 PARAMS returns the number of active uniform variables for PROGRAM.
9834
9835 `GL_ACTIVE_UNIFORM_MAX_LENGTH'
9836
9837
9838 PARAMS returns the length of the longest active uniform variable
9839 name for PROGRAM, including the null termination character (i.e.,
9840 the size of the character buffer required to store the longest
9841 uniform variable name). If no active uniform variables exist, 0 is
9842 returned.
9843
9844 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
9845 OpenGL.
9846
9847 `GL_INVALID_OPERATION' is generated if PROGRAM does not refer to a
9848 program object.
9849
9850 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
9851
9852 `GL_INVALID_OPERATION' is generated if `glGetProgram' is executed
9853 between the execution of `glBegin' and the corresponding execution of
9854 `glEnd'.")
9855
9856 (define-gl-procedures
9857 ((glGetQueryiv
9858 (target GLenum)
9859 (pname GLenum)
9860 (params GLint-*)
9861 ->
9862 void))
9863 "Return parameters of a query object target.
9864
9865 TARGET
9866 Specifies a query object target. Must be `GL_SAMPLES_PASSED'.
9867
9868 PNAME
9869 Specifies the symbolic name of a query object target parameter.
9870 Accepted values are `GL_CURRENT_QUERY' or `GL_QUERY_COUNTER_BITS'.
9871
9872 PARAMS
9873 Returns the requested data.
9874
9875 `glGetQueryiv' returns in PARAMS a selected parameter of the query
9876 object target specified by TARGET.
9877
9878 PNAME names a specific query object target parameter. When TARGET is
9879 `GL_SAMPLES_PASSED', PNAME can be as follows:
9880
9881 `GL_CURRENT_QUERY'
9882 PARAMS returns the name of the currently active occlusion query
9883 object. If no occlusion query is active, 0 is returned. The initial
9884 value is 0.
9885
9886 `GL_QUERY_COUNTER_BITS'
9887 PARAMS returns the number of bits in the query counter used to
9888 accumulate passing samples. If the number of bits returned is 0,
9889 the implementation does not support a query counter, and the
9890 results obtained from `glGetQueryObject' are useless.
9891
9892 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
9893 value.
9894
9895 `GL_INVALID_OPERATION' is generated if `glGetQueryiv' is executed
9896 between the execution of `glBegin' and the corresponding execution of
9897 `glEnd'.")
9898
9899 (define-gl-procedures
9900 ((glGetQueryObjectiv
9901 (id GLuint)
9902 (pname GLenum)
9903 (params GLint-*)
9904 ->
9905 void)
9906 (glGetQueryObjectuiv
9907 (id GLuint)
9908 (pname GLenum)
9909 (params GLuint-*)
9910 ->
9911 void))
9912 "Return parameters of a query object.
9913
9914 ID
9915 Specifies the name of a query object.
9916
9917 PNAME
9918 Specifies the symbolic name of a query object parameter. Accepted
9919 values are `GL_QUERY_RESULT' or `GL_QUERY_RESULT_AVAILABLE'.
9920
9921 PARAMS
9922 Returns the requested data.
9923
9924 `glGetQueryObject' returns in PARAMS a selected parameter of the query
9925 object specified by ID.
9926
9927 PNAME names a specific query object parameter. PNAME can be as follows:
9928
9929 `GL_QUERY_RESULT'
9930 PARAMS returns the value of the query object's passed samples
9931 counter. The initial value is 0.
9932
9933 `GL_QUERY_RESULT_AVAILABLE'
9934 PARAMS returns whether the passed samples counter is immediately
9935 available. If a delay would occur waiting for the query result,
9936 `GL_FALSE' is returned. Otherwise, `GL_TRUE' is returned, which
9937 also indicates that the results of all previous queries are
9938 available as well.
9939
9940 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
9941
9942 `GL_INVALID_OPERATION' is generated if ID is not the name of a query
9943 object.
9944
9945 `GL_INVALID_OPERATION' is generated if ID is the name of a currently
9946 active query object.
9947
9948 `GL_INVALID_OPERATION' is generated if `glGetQueryObject' is executed
9949 between the execution of `glBegin' and the corresponding execution of
9950 `glEnd'.")
9951
9952 (define-gl-procedures
9953 ((glGetSeparableFilter
9954 (target GLenum)
9955 (format GLenum)
9956 (type GLenum)
9957 (row GLvoid-*)
9958 (column GLvoid-*)
9959 (span GLvoid-*)
9960 ->
9961 void))
9962 "Get separable convolution filter kernel images.
9963
9964 TARGET
9965 The separable filter to be retrieved. Must be `GL_SEPARABLE_2D'.
9966
9967 FORMAT
9968 Format of the output images. Must be one of `GL_RED', `GL_GREEN',
9969 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR'`GL_RGBA', `GL_BGRA',
9970 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
9971
9972 TYPE
9973 Data type of components in the output images. Symbolic constants
9974 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
9975 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9976 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9977 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9978 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9979 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9980 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9981 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9982 are accepted.
9983
9984 ROW
9985 Pointer to storage for the row filter image.
9986
9987 COLUMN
9988 Pointer to storage for the column filter image.
9989
9990 SPAN
9991 Pointer to storage for the span filter image (currently unused).
9992
9993 `glGetSeparableFilter' returns the two one-dimensional filter kernel
9994 images for the current separable 2D convolution filter. The row image is
9995 placed in ROW and the column image is placed in COLUMN according to the
9996 specifications in FORMAT and TYPE. (In the current implementation, SPAN
9997 is not affected in any way.) No pixel transfer operations are performed
9998 on the images, but the relevant pixel storage modes are applied.
9999
10000 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
10001 target (see `glBindBuffer') while a separable convolution filter is
10002 requested, ROW, COLUMN, and SPAN are treated as a byte offset into the
10003 buffer object's data store.
10004
10005 Color components that are present in FORMAT but not included in the
10006 internal format of the filters are returned as zero. The assignments of
10007 internal color components to the components of FORMAT are as follows:
10008
10009
10010
10011 *Internal Component*
10012 *Resulting Component*
10013
10014 Red
10015 Red
10016
10017 Green
10018 Green
10019
10020 Blue
10021 Blue
10022
10023 Alpha
10024 Alpha
10025
10026 Luminance
10027 Red
10028
10029 Intensity
10030 Red
10031
10032
10033
10034 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SEPARABLE_2D'.
10035
10036 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
10037 values.
10038
10039 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
10040 values.
10041
10042 `GL_INVALID_OPERATION' is generated if TYPE is one of
10043 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
10044 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
10045 is not `GL_RGB'.
10046
10047 `GL_INVALID_OPERATION' is generated if TYPE is one of
10048 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
10049 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
10050 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
10051 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
10052 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
10053
10054 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10055 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
10056 store is currently mapped.
10057
10058 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10059 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
10060 to the buffer object such that the memory writes required would exceed
10061 the data store size.
10062
10063 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10064 bound to the `GL_PIXEL_PACK_BUFFER' target and ROW or COLUMN is not
10065 evenly divisible into the number of bytes needed to store in memory a
10066 datum indicated by TYPE.
10067
10068 `GL_INVALID_OPERATION' is generated if `glGetSeparableFilter' is
10069 executed between the execution of `glBegin' and the corresponding
10070 execution of `glEnd'.")
10071
10072 (define-gl-procedures
10073 ((glGetShaderInfoLog
10074 (shader GLuint)
10075 (maxLength GLsizei)
10076 (length GLsizei-*)
10077 (infoLog GLchar-*)
10078 ->
10079 void))
10080 "Returns the information log for a shader object.
10081
10082 SHADER
10083 Specifies the shader object whose information log is to be queried.
10084
10085 MAXLENGTH
10086 Specifies the size of the character buffer for storing the returned
10087 information log.
10088
10089 LENGTH
10090 Returns the length of the string returned in INFOLOG (excluding the
10091 null terminator).
10092
10093 INFOLOG
10094 Specifies an array of characters that is used to return the
10095 information log.
10096
10097 `glGetShaderInfoLog' returns the information log for the specified
10098 shader object. The information log for a shader object is modified when
10099 the shader is compiled. The string that is returned will be null
10100 terminated.
10101
10102 `glGetShaderInfoLog' returns in INFOLOG as much of the information log
10103 as it can, up to a maximum of MAXLENGTH characters. The number of
10104 characters actually returned, excluding the null termination character,
10105 is specified by LENGTH. If the length of the returned string is not
10106 required, a value of `NULL' can be passed in the LENGTH argument. The
10107 size of the buffer required to store the returned information log can be
10108 obtained by calling `glGetShader' with the value `GL_INFO_LOG_LENGTH'.
10109
10110 The information log for a shader object is a string that may contain
10111 diagnostic messages, warning messages, and other information about the
10112 last compile operation. When a shader object is created, its information
10113 log will be a string of length 0.
10114
10115 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
10116 OpenGL.
10117
10118 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
10119
10120 `GL_INVALID_VALUE' is generated if MAXLENGTH is less than 0.
10121
10122 `GL_INVALID_OPERATION' is generated if `glGetShaderInfoLog' is executed
10123 between the execution of `glBegin' and the corresponding execution of
10124 `glEnd'.")
10125
10126 (define-gl-procedures
10127 ((glGetShaderSource
10128 (shader GLuint)
10129 (bufSize GLsizei)
10130 (length GLsizei-*)
10131 (source GLchar-*)
10132 ->
10133 void))
10134 "Returns the source code string from a shader object.
10135
10136 SHADER
10137 Specifies the shader object to be queried.
10138
10139 BUFSIZE
10140 Specifies the size of the character buffer for storing the returned
10141 source code string.
10142
10143 LENGTH
10144 Returns the length of the string returned in SOURCE (excluding the
10145 null terminator).
10146
10147 SOURCE
10148 Specifies an array of characters that is used to return the source
10149 code string.
10150
10151 `glGetShaderSource' returns the concatenation of the source code strings
10152 from the shader object specified by SHADER. The source code strings for
10153 a shader object are the result of a previous call to `glShaderSource'.
10154 The string returned by the function will be null terminated.
10155
10156 `glGetShaderSource' returns in SOURCE as much of the source code string
10157 as it can, up to a maximum of BUFSIZE characters. The number of
10158 characters actually returned, excluding the null termination character,
10159 is specified by LENGTH. If the length of the returned string is not
10160 required, a value of `NULL' can be passed in the LENGTH argument. The
10161 size of the buffer required to store the returned source code string can
10162 be obtained by calling `glGetShader' with the value
10163 `GL_SHADER_SOURCE_LENGTH'.
10164
10165 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
10166 OpenGL.
10167
10168 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
10169
10170 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.
10171
10172 `GL_INVALID_OPERATION' is generated if `glGetShaderSource' is executed
10173 between the execution of `glBegin' and the corresponding execution of
10174 `glEnd'.")
10175
10176 (define-gl-procedures
10177 ((glGetShaderiv
10178 (shader GLuint)
10179 (pname GLenum)
10180 (params GLint-*)
10181 ->
10182 void))
10183 "Returns a parameter from a shader object.
10184
10185 SHADER
10186 Specifies the shader object to be queried.
10187
10188 PNAME
10189 Specifies the object parameter. Accepted symbolic names are
10190 `GL_SHADER_TYPE', `GL_DELETE_STATUS', `GL_COMPILE_STATUS',
10191 `GL_INFO_LOG_LENGTH', `GL_SHADER_SOURCE_LENGTH'.
10192
10193 PARAMS
10194 Returns the requested object parameter.
10195
10196 `glGetShader' returns in PARAMS the value of a parameter for a specific
10197 shader object. The following parameters are defined:
10198
10199 `GL_SHADER_TYPE'
10200 PARAMS returns `GL_VERTEX_SHADER' if SHADER is a vertex shader
10201 object, and `GL_FRAGMENT_SHADER' if SHADER is a fragment shader
10202 object.
10203
10204 `GL_DELETE_STATUS'
10205 PARAMS returns `GL_TRUE' if SHADER is currently flagged for
10206 deletion, and `GL_FALSE' otherwise.
10207
10208 `GL_COMPILE_STATUS'
10209 PARAMS returns `GL_TRUE' if the last compile operation on SHADER
10210 was successful, and `GL_FALSE' otherwise.
10211
10212 `GL_INFO_LOG_LENGTH'
10213 PARAMS returns the number of characters in the information log for
10214 SHADER including the null termination character (i.e., the size of
10215 the character buffer required to store the information log). If
10216 SHADER has no information log, a value of 0 is returned.
10217
10218 `GL_SHADER_SOURCE_LENGTH'
10219 PARAMS returns the length of the concatenation of the source
10220 strings that make up the shader source for the SHADER, including
10221 the null termination character. (i.e., the size of the character
10222 buffer required to store the shader source). If no source code
10223 exists, 0 is returned.
10224
10225 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
10226 OpenGL.
10227
10228 `GL_INVALID_OPERATION' is generated if SHADER does not refer to a shader
10229 object.
10230
10231 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
10232
10233 `GL_INVALID_OPERATION' is generated if `glGetShader' is executed between
10234 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10235
10236 (define-gl-procedures
10237 ((glGetString (name GLenum) -> const-GLubyte*))
10238 "Return a string describing the current GL connection.
10239
10240 NAME
10241 Specifies a symbolic constant, one of `GL_VENDOR', `GL_RENDERER',
10242 `GL_VERSION', `GL_SHADING_LANGUAGE_VERSION', or `GL_EXTENSIONS'.
10243
10244 `glGetString' returns a pointer to a static string describing some
10245 aspect of the current GL connection. NAME can be one of the following:
10246
10247 `GL_VENDOR'
10248
10249
10250 Returns the company responsible for this GL implementation. This
10251 name does not change from release to release.
10252
10253 `GL_RENDERER'
10254
10255
10256 Returns the name of the renderer. This name is typically specific
10257 to a particular configuration of a hardware platform. It does not
10258 change from release to release.
10259
10260 `GL_VERSION'
10261
10262
10263 Returns a version or release number.
10264
10265 `GL_SHADING_LANGUAGE_VERSION'
10266
10267
10268 Returns a version or release number for the shading language.
10269
10270 `GL_EXTENSIONS'
10271
10272
10273 Returns a space-separated list of supported extensions to GL.
10274
10275 Because the GL does not include queries for the performance
10276 characteristics of an implementation, some applications are written to
10277 recognize known platforms and modify their GL usage based on known
10278 performance characteristics of these platforms. Strings `GL_VENDOR' and
10279 `GL_RENDERER' together uniquely specify a platform. They do not change
10280 from release to release and should be used by platform-recognition
10281 algorithms.
10282
10283 Some applications want to make use of features that are not part of the
10284 standard GL. These features may be implemented as extensions to the
10285 standard GL. The `GL_EXTENSIONS' string is a space-separated list of
10286 supported GL extensions. (Extension names never contain a space
10287 character.)
10288
10289 The `GL_VERSION' and `GL_SHADING_LANGUAGE_VERSION' strings begin with a
10290 version number. The version number uses one of these forms:
10291
10292 MAJOR_NUMBER.MINOR_NUMBERMAJOR_NUMBER.MINOR_NUMBER.RELEASE_NUMBER
10293
10294 Vendor-specific information may follow the version number. Its format
10295 depends on the implementation, but a space always separates the version
10296 number and the vendor-specific information.
10297
10298 All strings are null-terminated.
10299
10300 `GL_INVALID_ENUM' is generated if NAME is not an accepted value.
10301
10302 `GL_INVALID_OPERATION' is generated if `glGetString' is executed between
10303 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10304
10305 (define-gl-procedures
10306 ((glGetTexEnvfv
10307 (target GLenum)
10308 (pname GLenum)
10309 (params GLfloat-*)
10310 ->
10311 void)
10312 (glGetTexEnviv
10313 (target GLenum)
10314 (pname GLenum)
10315 (params GLint-*)
10316 ->
10317 void))
10318 "Return texture environment parameters.
10319
10320 TARGET
10321 Specifies a texture environment. May be `GL_TEXTURE_ENV',
10322 `GL_TEXTURE_FILTER_CONTROL', or `GL_POINT_SPRITE'.
10323
10324 PNAME
10325 Specifies the symbolic name of a texture environment parameter.
10326 Accepted values are `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR',
10327 `GL_TEXTURE_LOD_BIAS', `GL_COMBINE_RGB', `GL_COMBINE_ALPHA',
10328 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
10329 `GL_SRC1_ALPHA', `GL_SRC2_ALPHA', `GL_OPERAND0_RGB',
10330 `GL_OPERAND1_RGB', `GL_OPERAND2_RGB', `GL_OPERAND0_ALPHA',
10331 `GL_OPERAND1_ALPHA', `GL_OPERAND2_ALPHA', `GL_RGB_SCALE',
10332 `GL_ALPHA_SCALE', or `GL_COORD_REPLACE'.
10333
10334 PARAMS
10335 Returns the requested data.
10336
10337 `glGetTexEnv' returns in PARAMS selected values of a texture environment
10338 that was specified with `glTexEnv'. TARGET specifies a texture
10339 environment.
10340
10341 When TARGET is `GL_TEXTURE_FILTER_CONTROL', PNAME must be
10342 `GL_TEXTURE_LOD_BIAS'. When TARGET is `GL_POINT_SPRITE', PNAME must be
10343 `GL_COORD_REPLACE'. When TARGET is `GL_TEXTURE_ENV', PNAME can be
10344 `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR', `GL_COMBINE_RGB',
10345 `GL_COMBINE_ALPHA', `GL_RGB_SCALE', `GL_ALPHA_SCALE', `GL_SRC0_RGB',
10346 `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA', `GL_SRC1_ALPHA', or
10347 `GL_SRC2_ALPHA'.
10348
10349 PNAME names a specific texture environment parameter, as follows:
10350
10351 `GL_TEXTURE_ENV_MODE'
10352 PARAMS returns the single-valued texture environment mode, a
10353 symbolic constant. The initial value is `GL_MODULATE'.
10354
10355 `GL_TEXTURE_ENV_COLOR'
10356 PARAMS returns four integer or floating-point values that are the
10357 texture environment color. Integer values, when requested, are
10358 linearly mapped from the internal floating-point representation
10359 such that 1.0 maps to the most positive representable integer, and
10360 -1.0 maps to the most negative representable integer. The initial
10361 value is (0, 0, 0, 0).
10362
10363 `GL_TEXTURE_LOD_BIAS'
10364 PARAMS returns a single floating-point value that is the texture
10365 level-of-detail bias. The initial value is 0.
10366
10367 `GL_COMBINE_RGB'
10368 PARAMS returns a single symbolic constant value representing the
10369 current RGB combine mode. The initial value is `GL_MODULATE'.
10370
10371 `GL_COMBINE_ALPHA'
10372 PARAMS returns a single symbolic constant value representing the
10373 current alpha combine mode. The initial value is `GL_MODULATE'.
10374
10375 `GL_SRC0_RGB'
10376 PARAMS returns a single symbolic constant value representing the
10377 texture combiner zero's RGB source. The initial value is
10378 `GL_TEXTURE'.
10379
10380 `GL_SRC1_RGB'
10381 PARAMS returns a single symbolic constant value representing the
10382 texture combiner one's RGB source. The initial value is
10383 `GL_PREVIOUS'.
10384
10385 `GL_SRC2_RGB'
10386 PARAMS returns a single symbolic constant value representing the
10387 texture combiner two's RGB source. The initial value is
10388 `GL_CONSTANT'.
10389
10390 `GL_SRC0_ALPHA'
10391 PARAMS returns a single symbolic constant value representing the
10392 texture combiner zero's alpha source. The initial value is
10393 `GL_TEXTURE'.
10394
10395 `GL_SRC1_ALPHA'
10396 PARAMS returns a single symbolic constant value representing the
10397 texture combiner one's alpha source. The initial value is
10398 `GL_PREVIOUS'.
10399
10400 `GL_SRC2_ALPHA'
10401 PARAMS returns a single symbolic constant value representing the
10402 texture combiner two's alpha source. The initial value is
10403 `GL_CONSTANT'.
10404
10405 `GL_OPERAND0_RGB'
10406 PARAMS returns a single symbolic constant value representing the
10407 texture combiner zero's RGB operand. The initial value is
10408 `GL_SRC_COLOR'.
10409
10410 `GL_OPERAND1_RGB'
10411 PARAMS returns a single symbolic constant value representing the
10412 texture combiner one's RGB operand. The initial value is
10413 `GL_SRC_COLOR'.
10414
10415 `GL_OPERAND2_RGB'
10416 PARAMS returns a single symbolic constant value representing the
10417 texture combiner two's RGB operand. The initial value is
10418 `GL_SRC_ALPHA'.
10419
10420 `GL_OPERAND0_ALPHA'
10421 PARAMS returns a single symbolic constant value representing the
10422 texture combiner zero's alpha operand. The initial value is
10423 `GL_SRC_ALPHA'.
10424
10425 `GL_OPERAND1_ALPHA'
10426 PARAMS returns a single symbolic constant value representing the
10427 texture combiner one's alpha operand. The initial value is
10428 `GL_SRC_ALPHA'.
10429
10430 `GL_OPERAND2_ALPHA'
10431 PARAMS returns a single symbolic constant value representing the
10432 texture combiner two's alpha operand. The initial value is
10433 `GL_SRC_ALPHA'.
10434
10435 `GL_RGB_SCALE'
10436 PARAMS returns a single floating-point value representing the
10437 current RGB texture combiner scaling factor. The initial value is
10438 1.0.
10439
10440 `GL_ALPHA_SCALE'
10441 PARAMS returns a single floating-point value representing the
10442 current alpha texture combiner scaling factor. The initial value is
10443 1.0.
10444
10445 `GL_COORD_REPLACE'
10446 PARAMS returns a single boolean value representing the current
10447 point sprite texture coordinate replacement enable state. The
10448 initial value is `GL_FALSE'.
10449
10450 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10451 value.
10452
10453 `GL_INVALID_OPERATION' is generated if `glGetTexEnv' is executed between
10454 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10455
10456 (define-gl-procedures
10457 ((glGetTexGendv
10458 (coord GLenum)
10459 (pname GLenum)
10460 (params GLdouble-*)
10461 ->
10462 void)
10463 (glGetTexGenfv
10464 (coord GLenum)
10465 (pname GLenum)
10466 (params GLfloat-*)
10467 ->
10468 void)
10469 (glGetTexGeniv
10470 (coord GLenum)
10471 (pname GLenum)
10472 (params GLint-*)
10473 ->
10474 void))
10475 "Return texture coordinate generation parameters.
10476
10477 COORD
10478 Specifies a texture coordinate. Must be `GL_S', `GL_T', `GL_R', or
10479 `GL_Q'.
10480
10481 PNAME
10482 Specifies the symbolic name of the value(s) to be returned. Must be
10483 either `GL_TEXTURE_GEN_MODE' or the name of one of the texture
10484 generation plane equations: `GL_OBJECT_PLANE' or `GL_EYE_PLANE'.
10485
10486 PARAMS
10487 Returns the requested data.
10488
10489 `glGetTexGen' returns in PARAMS selected parameters of a texture
10490 coordinate generation function that was specified using `glTexGen'.
10491 COORD names one of the (S, T, R, Q) texture coordinates, using the
10492 symbolic constant `GL_S', `GL_T', `GL_R', or `GL_Q'.
10493
10494 PNAME specifies one of three symbolic names:
10495
10496 `GL_TEXTURE_GEN_MODE'
10497 PARAMS returns the single-valued texture generation function, a
10498 symbolic constant. The initial value is `GL_EYE_LINEAR'.
10499
10500 `GL_OBJECT_PLANE'
10501 PARAMS returns the four plane equation coefficients that specify
10502 object linear-coordinate generation. Integer values, when
10503 requested, are mapped directly from the internal floating-point
10504 representation.
10505
10506 `GL_EYE_PLANE'
10507 PARAMS returns the four plane equation coefficients that specify
10508 eye linear-coordinate generation. Integer values, when requested,
10509 are mapped directly from the internal floating-point
10510 representation. The returned values are those maintained in eye
10511 coordinates. They are not equal to the values specified using
10512 `glTexGen', unless the modelview matrix was identity when
10513 `glTexGen' was called.
10514
10515 `GL_INVALID_ENUM' is generated if COORD or PNAME is not an accepted
10516 value.
10517
10518 `GL_INVALID_OPERATION' is generated if `glGetTexGen' is executed between
10519 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10520
10521 (define-gl-procedures
10522 ((glGetTexImage
10523 (target GLenum)
10524 (level GLint)
10525 (format GLenum)
10526 (type GLenum)
10527 (img GLvoid-*)
10528 ->
10529 void))
10530 "Return a texture image.
10531
10532 TARGET
10533 Specifies which texture is to be obtained. `GL_TEXTURE_1D',
10534 `GL_TEXTURE_2D', `GL_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10535 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10536 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10537 and `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z' are accepted.
10538
10539 LEVEL
10540 Specifies the level-of-detail number of the desired image. Level 0
10541 is the base image level. Level N is the N th mipmap reduction
10542 image.
10543
10544 FORMAT
10545 Specifies a pixel format for the returned data. The supported
10546 formats are `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
10547 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and
10548 `GL_LUMINANCE_ALPHA'.
10549
10550 TYPE
10551 Specifies a pixel type for the returned data. The supported types
10552 are `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
10553 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
10554 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
10555 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
10556 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
10557 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
10558 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
10559 `GL_UNSIGNED_INT_2_10_10_10_REV'.
10560
10561 IMG
10562 Returns the texture image. Should be a pointer to an array of the
10563 type specified by TYPE.
10564
10565 `glGetTexImage' returns a texture image into IMG. TARGET specifies
10566 whether the desired texture image is one specified by `glTexImage1D'
10567 (`GL_TEXTURE_1D'), `glTexImage2D' (`GL_TEXTURE_2D' or any of
10568 `GL_TEXTURE_CUBE_MAP_*'), or `glTexImage3D' (`GL_TEXTURE_3D'). LEVEL
10569 specifies the level-of-detail number of the desired image. FORMAT and
10570 TYPE specify the format and type of the desired image array. See the
10571 reference pages `glTexImage1D' and `glDrawPixels' for a description of
10572 the acceptable values for the FORMAT and TYPE parameters, respectively.
10573
10574 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
10575 target (see `glBindBuffer') while a texture image is requested, IMG is
10576 treated as a byte offset into the buffer object's data store.
10577
10578 To understand the operation of `glGetTexImage', consider the selected
10579 internal four-component texture image to be an RGBA color buffer the
10580 size of the image. The semantics of `glGetTexImage' are then identical
10581 to those of `glReadPixels', with the exception that no pixel transfer
10582 operations are performed, when called with the same FORMAT and TYPE,
10583 with X and Y set to 0, WIDTH set to the width of the texture image
10584 (including border if one was specified), and HEIGHT set to 1 for 1D
10585 images, or to the height of the texture image (including border if one
10586 was specified) for 2D images. Because the internal texture image is an
10587 RGBA image, pixel formats `GL_COLOR_INDEX', `GL_STENCIL_INDEX', and
10588 `GL_DEPTH_COMPONENT' are not accepted, and pixel type `GL_BITMAP' is not
10589 accepted.
10590
10591 If the selected texture image does not contain four components, the
10592 following mappings are applied. Single-component textures are treated as
10593 RGBA buffers with red set to the single-component value, green set to 0,
10594 blue set to 0, and alpha set to 1. Two-component textures are treated as
10595 RGBA buffers with red set to the value of component zero, alpha set to
10596 the value of component one, and green and blue set to 0. Finally,
10597 three-component textures are treated as RGBA buffers with red set to
10598 component zero, green set to component one, blue set to component two,
10599 and alpha set to 1.
10600
10601 To determine the required size of IMG, use `glGetTexLevelParameter' to
10602 determine the dimensions of the internal texture image, then scale the
10603 required number of pixels by the storage required for each pixel, based
10604 on FORMAT and TYPE. Be sure to take the pixel storage parameters into
10605 account, especially `GL_PACK_ALIGNMENT'.
10606
10607 `GL_INVALID_ENUM' is generated if TARGET, FORMAT, or TYPE is not an
10608 accepted value.
10609
10610 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
10611
10612 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
10613 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
10614
10615 `GL_INVALID_OPERATION' is returned if TYPE is one of
10616 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
10617 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
10618 is not `GL_RGB'.
10619
10620 `GL_INVALID_OPERATION' is returned if TYPE is one of
10621 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
10622 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
10623 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
10624 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV', and
10625 FORMAT is neither `GL_RGBA' or `GL_BGRA'.
10626
10627 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10628 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
10629 store is currently mapped.
10630
10631 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10632 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
10633 to the buffer object such that the memory writes required would exceed
10634 the data store size.
10635
10636 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10637 bound to the `GL_PIXEL_PACK_BUFFER' target and IMG is not evenly
10638 divisible into the number of bytes needed to store in memory a datum
10639 indicated by TYPE.
10640
10641 `GL_INVALID_OPERATION' is generated if `glGetTexImage' is executed
10642 between the execution of `glBegin' and the corresponding execution of
10643 `glEnd'.")
10644
10645 (define-gl-procedures
10646 ((glGetTexLevelParameterfv
10647 (target GLenum)
10648 (level GLint)
10649 (pname GLenum)
10650 (params GLfloat-*)
10651 ->
10652 void)
10653 (glGetTexLevelParameteriv
10654 (target GLenum)
10655 (level GLint)
10656 (pname GLenum)
10657 (params GLint-*)
10658 ->
10659 void))
10660 "Return texture parameter values for a specific level of detail.
10661
10662 TARGET
10663 Specifies the symbolic name of the target texture, either
10664 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D',
10665 `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_2D',
10666 `GL_PROXY_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10667 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10668 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10669 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
10670
10671 LEVEL
10672 Specifies the level-of-detail number of the desired image. Level 0
10673 is the base image level. Level N is the N th mipmap reduction
10674 image.
10675
10676 PNAME
10677 Specifies the symbolic name of a texture parameter.
10678 `GL_TEXTURE_WIDTH', `GL_TEXTURE_HEIGHT', `GL_TEXTURE_DEPTH',
10679 `GL_TEXTURE_INTERNAL_FORMAT', `GL_TEXTURE_BORDER',
10680 `GL_TEXTURE_RED_SIZE', `GL_TEXTURE_GREEN_SIZE',
10681 `GL_TEXTURE_BLUE_SIZE', `GL_TEXTURE_ALPHA_SIZE',
10682 `GL_TEXTURE_LUMINANCE_SIZE', `GL_TEXTURE_INTENSITY_SIZE',
10683 `GL_TEXTURE_DEPTH_SIZE', `GL_TEXTURE_COMPRESSED', and
10684 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' are accepted.
10685
10686 PARAMS
10687 Returns the requested data.
10688
10689 `glGetTexLevelParameter' returns in PARAMS texture parameter values for
10690 a specific level-of-detail value, specified as LEVEL. TARGET defines the
10691 target texture, either `GL_TEXTURE_1D', `GL_TEXTURE_2D',
10692 `GL_TEXTURE_3D', `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_2D',
10693 `GL_PROXY_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10694 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10695 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10696 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
10697
10698 `GL_MAX_TEXTURE_SIZE', and `GL_MAX_3D_TEXTURE_SIZE' are not really
10699 descriptive enough. It has to report the largest square texture image
10700 that can be accommodated with mipmaps and borders, but a long skinny
10701 texture, or a texture without mipmaps and borders, may easily fit in
10702 texture memory. The proxy targets allow the user to more accurately
10703 query whether the GL can accommodate a texture of a given configuration.
10704 If the texture cannot be accommodated, the texture state variables,
10705 which may be queried with `glGetTexLevelParameter', are set to 0. If the
10706 texture can be accommodated, the texture state values will be set as
10707 they would be set for a non-proxy target.
10708
10709 PNAME specifies the texture parameter whose value or values will be
10710 returned.
10711
10712 The accepted parameter names are as follows:
10713
10714 `GL_TEXTURE_WIDTH'
10715
10716
10717 PARAMS returns a single value, the width of the texture image. This
10718 value includes the border of the texture image. The initial value
10719 is 0.
10720
10721 `GL_TEXTURE_HEIGHT'
10722
10723
10724 PARAMS returns a single value, the height of the texture image.
10725 This value includes the border of the texture image. The initial
10726 value is 0.
10727
10728 `GL_TEXTURE_DEPTH'
10729
10730
10731 PARAMS returns a single value, the depth of the texture image. This
10732 value includes the border of the texture image. The initial value
10733 is 0.
10734
10735 `GL_TEXTURE_INTERNAL_FORMAT'
10736
10737
10738 PARAMS returns a single value, the internal format of the texture
10739 image.
10740
10741 `GL_TEXTURE_BORDER'
10742
10743
10744 PARAMS returns a single value, the width in pixels of the border of
10745 the texture image. The initial value is 0.
10746
10747 `GL_TEXTURE_RED_SIZE',
10748 `GL_TEXTURE_GREEN_SIZE',
10749 `GL_TEXTURE_BLUE_SIZE',
10750 `GL_TEXTURE_ALPHA_SIZE',
10751 `GL_TEXTURE_LUMINANCE_SIZE',
10752 `GL_TEXTURE_INTENSITY_SIZE',
10753 `GL_TEXTURE_DEPTH_SIZE'
10754
10755
10756 The internal storage resolution of an individual component. The
10757 resolution chosen by the GL will be a close match for the
10758 resolution requested by the user with the component argument of
10759 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glCopyTexImage1D',
10760 and `glCopyTexImage2D'. The initial value is 0.
10761
10762 `GL_TEXTURE_COMPRESSED'
10763
10764
10765 PARAMS returns a single boolean value indicating if the texture
10766 image is stored in a compressed internal format. The initiali value
10767 is `GL_FALSE'.
10768
10769 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE'
10770
10771
10772 PARAMS returns a single integer value, the number of unsigned bytes
10773 of the compressed texture image that would be returned from
10774 `glGetCompressedTexImage'.
10775
10776 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10777 value.
10778
10779 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
10780
10781 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
10782 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
10783
10784 `GL_INVALID_OPERATION' is generated if `glGetTexLevelParameter' is
10785 executed between the execution of `glBegin' and the corresponding
10786 execution of `glEnd'.
10787
10788 `GL_INVALID_OPERATION' is generated if
10789 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' is queried on texture images with an
10790 uncompressed internal format or on proxy targets.")
10791
10792 (define-gl-procedures
10793 ((glGetTexParameterfv
10794 (target GLenum)
10795 (pname GLenum)
10796 (params GLfloat-*)
10797 ->
10798 void)
10799 (glGetTexParameteriv
10800 (target GLenum)
10801 (pname GLenum)
10802 (params GLint-*)
10803 ->
10804 void))
10805 "Return texture parameter values.
10806
10807 TARGET
10808 Specifies the symbolic name of the target texture. `GL_TEXTURE_1D',
10809 `GL_TEXTURE_2D', `GL_TEXTURE_3D', and `GL_TEXTURE_CUBE_MAP' are
10810 accepted.
10811
10812 PNAME
10813 Specifies the symbolic name of a texture parameter.
10814 `GL_TEXTURE_MAG_FILTER', `GL_TEXTURE_MIN_FILTER',
10815 `GL_TEXTURE_MIN_LOD', `GL_TEXTURE_MAX_LOD',
10816 `GL_TEXTURE_BASE_LEVEL', `GL_TEXTURE_MAX_LEVEL',
10817 `GL_TEXTURE_WRAP_S', `GL_TEXTURE_WRAP_T', `GL_TEXTURE_WRAP_R',
10818 `GL_TEXTURE_BORDER_COLOR', `GL_TEXTURE_PRIORITY',
10819 `GL_TEXTURE_RESIDENT', `GL_TEXTURE_COMPARE_MODE',
10820 `GL_TEXTURE_COMPARE_FUNC', `GL_DEPTH_TEXTURE_MODE', and
10821 `GL_GENERATE_MIPMAP' are accepted.
10822
10823 PARAMS
10824 Returns the texture parameters.
10825
10826 `glGetTexParameter' returns in PARAMS the value or values of the texture
10827 parameter specified as PNAME. TARGET defines the target texture, either
10828 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D', or
10829 `GL_TEXTURE_CUBE_MAP', to specify one-, two-, or three-dimensional or
10830 cube-mapped texturing. PNAME accepts the same symbols as
10831 `glTexParameter', with the same interpretations:
10832
10833 `GL_TEXTURE_MAG_FILTER'
10834 Returns the single-valued texture magnification filter, a symbolic
10835 constant. The initial value is `GL_LINEAR'.
10836
10837 `GL_TEXTURE_MIN_FILTER'
10838 Returns the single-valued texture minification filter, a symbolic
10839 constant. The initial value is `GL_NEAREST_MIPMAP_LINEAR'.
10840
10841 `GL_TEXTURE_MIN_LOD'
10842 Returns the single-valued texture minimum level-of-detail value.
10843 The initial value is -1000 .
10844
10845 `GL_TEXTURE_MAX_LOD'
10846 Returns the single-valued texture maximum level-of-detail value.
10847 The initial value is 1000.
10848
10849 `GL_TEXTURE_BASE_LEVEL'
10850 Returns the single-valued base texture mipmap level. The initial
10851 value is 0.
10852
10853 `GL_TEXTURE_MAX_LEVEL'
10854 Returns the single-valued maximum texture mipmap array level. The
10855 initial value is 1000.
10856
10857 `GL_TEXTURE_WRAP_S'
10858 Returns the single-valued wrapping function for texture coordinate
10859 S , a symbolic constant. The initial value is `GL_REPEAT'.
10860
10861 `GL_TEXTURE_WRAP_T'
10862 Returns the single-valued wrapping function for texture coordinate
10863 T , a symbolic constant. The initial value is `GL_REPEAT'.
10864
10865 `GL_TEXTURE_WRAP_R'
10866 Returns the single-valued wrapping function for texture coordinate
10867 R , a symbolic constant. The initial value is `GL_REPEAT'.
10868
10869 `GL_TEXTURE_BORDER_COLOR'
10870 Returns four integer or floating-point numbers that comprise the
10871 RGBA color of the texture border. Floating-point values are
10872 returned in the range [0,1] . Integer values are returned as a
10873 linear mapping of the internal floating-point representation such
10874 that 1.0 maps to the most positive representable integer and -1.0
10875 maps to the most negative representable integer. The initial value
10876 is (0, 0, 0, 0).
10877
10878 `GL_TEXTURE_PRIORITY'
10879 Returns the residence priority of the target texture (or the named
10880 texture bound to it). The initial value is 1. See
10881 `glPrioritizeTextures'.
10882
10883 `GL_TEXTURE_RESIDENT'
10884 Returns the residence status of the target texture. If the value
10885 returned in PARAMS is `GL_TRUE', the texture is resident in texture
10886 memory. See `glAreTexturesResident'.
10887
10888 `GL_TEXTURE_COMPARE_MODE'
10889 Returns a single-valued texture comparison mode, a symbolic
10890 constant. The initial value is `GL_NONE'. See `glTexParameter'.
10891
10892 `GL_TEXTURE_COMPARE_FUNC'
10893 Returns a single-valued texture comparison function, a symbolic
10894 constant. The initial value is `GL_LEQUAL'. See `glTexParameter'.
10895
10896 `GL_DEPTH_TEXTURE_MODE'
10897 Returns a single-valued texture format indicating how the depth
10898 values should be converted into color components. The initial value
10899 is `GL_LUMINANCE'. See `glTexParameter'.
10900
10901 `GL_GENERATE_MIPMAP'
10902 Returns a single boolean value indicating if automatic mipmap level
10903 updates are enabled. See `glTexParameter'.
10904
10905 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10906 value.
10907
10908 `GL_INVALID_OPERATION' is generated if `glGetTexParameter' is executed
10909 between the execution of `glBegin' and the corresponding execution of
10910 `glEnd'.")
10911
10912 (define-gl-procedures
10913 ((glGetUniformLocation
10914 (program GLuint)
10915 (name const-GLchar-*)
10916 ->
10917 GLint))
10918 "Returns the location of a uniform variable.
10919
10920 PROGRAM
10921 Specifies the program object to be queried.
10922
10923 NAME
10924 Points to a null terminated string containing the name of the
10925 uniform variable whose location is to be queried.
10926
10927 `glGetUniformLocation ' returns an integer that represents the location
10928 of a specific uniform variable within a program object. NAME must be a
10929 null terminated string that contains no white space. NAME must be an
10930 active uniform variable name in PROGRAM that is not a structure, an
10931 array of structures, or a subcomponent of a vector or a matrix. This
10932 function returns -1 if NAME does not correspond to an active uniform
10933 variable in PROGRAM or if NAME starts with the reserved prefix \"gl_\".
10934
10935 Uniform variables that are structures or arrays of structures may be
10936 queried by calling `glGetUniformLocation' for each field within the
10937 structure. The array element operator \"[]\" and the structure field
10938 operator \".\" may be used in NAME in order to select elements within an
10939 array or fields within a structure. The result of using these operators
10940 is not allowed to be another structure, an array of structures, or a
10941 subcomponent of a vector or a matrix. Except if the last part of NAME
10942 indicates a uniform variable array, the location of the first element of
10943 an array can be retrieved by using the name of the array, or by using
10944 the name appended by \"[0]\".
10945
10946 The actual locations assigned to uniform variables are not known until
10947 the program object is linked successfully. After linking has occurred,
10948 the command `glGetUniformLocation' can be used to obtain the location of
10949 a uniform variable. This location value can then be passed to
10950 `glUniform' to set the value of the uniform variable or to
10951 `glGetUniform' in order to query the current value of the uniform
10952 variable. After a program object has been linked successfully, the index
10953 values for uniform variables remain fixed until the next link command
10954 occurs. Uniform variable locations and values can only be queried after
10955 a link if the link was successful.
10956
10957 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
10958 OpenGL.
10959
10960 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
10961
10962 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
10963 linked.
10964
10965 `GL_INVALID_OPERATION' is generated if `glGetUniformLocation' is
10966 executed between the execution of `glBegin' and the corresponding
10967 execution of `glEnd'.")
10968
10969 (define-gl-procedures
10970 ((glGetUniformfv
10971 (program GLuint)
10972 (location GLint)
10973 (params GLfloat-*)
10974 ->
10975 void)
10976 (glGetUniformiv
10977 (program GLuint)
10978 (location GLint)
10979 (params GLint-*)
10980 ->
10981 void))
10982 "Returns the value of a uniform variable.
10983
10984 PROGRAM
10985 Specifies the program object to be queried.
10986
10987 LOCATION
10988 Specifies the location of the uniform variable to be queried.
10989
10990 PARAMS
10991 Returns the value of the specified uniform variable.
10992
10993 `glGetUniform' returns in PARAMS the value(s) of the specified uniform
10994 variable. The type of the uniform variable specified by LOCATION
10995 determines the number of values returned. If the uniform variable is
10996 defined in the shader as a boolean, int, or float, a single value will
10997 be returned. If it is defined as a vec2, ivec2, or bvec2, two values
10998 will be returned. If it is defined as a vec3, ivec3, or bvec3, three
10999 values will be returned, and so on. To query values stored in uniform
11000 variables declared as arrays, call `glGetUniform' for each element of
11001 the array. To query values stored in uniform variables declared as
11002 structures, call `glGetUniform' for each field in the structure. The
11003 values for uniform variables declared as a matrix will be returned in
11004 column major order.
11005
11006 The locations assigned to uniform variables are not known until the
11007 program object is linked. After linking has occurred, the command
11008 `glGetUniformLocation' can be used to obtain the location of a uniform
11009 variable. This location value can then be passed to `glGetUniform' in
11010 order to query the current value of the uniform variable. After a
11011 program object has been linked successfully, the index values for
11012 uniform variables remain fixed until the next link command occurs. The
11013 uniform variable values can only be queried after a link if the link was
11014 successful.
11015
11016 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
11017 OpenGL.
11018
11019 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
11020
11021 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
11022 linked.
11023
11024 `GL_INVALID_OPERATION' is generated if LOCATION does not correspond to a
11025 valid uniform variable location for the specified program object.
11026
11027 `GL_INVALID_OPERATION' is generated if `glGetUniform' is executed
11028 between the execution of `glBegin' and the corresponding execution of
11029 `glEnd'.")
11030
11031 (define-gl-procedures
11032 ((glGetVertexAttribPointerv
11033 (index GLuint)
11034 (pname GLenum)
11035 (pointer GLvoid-**)
11036 ->
11037 void))
11038 "Return the address of the specified generic vertex attribute pointer.
11039
11040 INDEX
11041 Specifies the generic vertex attribute parameter to be returned.
11042
11043 PNAME
11044 Specifies the symbolic name of the generic vertex attribute
11045 parameter to be returned. Must be `GL_VERTEX_ATTRIB_ARRAY_POINTER'.
11046
11047 POINTER
11048 Returns the pointer value.
11049
11050 `glGetVertexAttribPointerv' returns pointer information. INDEX is the
11051 generic vertex attribute to be queried, PNAME is a symbolic constant
11052 indicating the pointer to be returned, and PARAMS is a pointer to a
11053 location in which to place the returned data.
11054
11055 If a non-zero named buffer object was bound to the `GL_ARRAY_BUFFER'
11056 target (see `glBindBuffer') when the desired pointer was previously
11057 specified, the POINTER returned is a byte offset into the buffer
11058 object's data store.
11059
11060 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
11061 `GL_MAX_VERTEX_ATTRIBS'.
11062
11063 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.")
11064
11065 (define-gl-procedures
11066 ((glGetVertexAttribdv
11067 (index GLuint)
11068 (pname GLenum)
11069 (params GLdouble-*)
11070 ->
11071 void)
11072 (glGetVertexAttribfv
11073 (index GLuint)
11074 (pname GLenum)
11075 (params GLfloat-*)
11076 ->
11077 void)
11078 (glGetVertexAttribiv
11079 (index GLuint)
11080 (pname GLenum)
11081 (params GLint-*)
11082 ->
11083 void))
11084 "Return a generic vertex attribute parameter.
11085
11086 INDEX
11087 Specifies the generic vertex attribute parameter to be queried.
11088
11089 PNAME
11090 Specifies the symbolic name of the vertex attribute parameter to be
11091 queried. Accepted values are
11092 `GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING',
11093 `GL_VERTEX_ATTRIB_ARRAY_ENABLED', `GL_VERTEX_ATTRIB_ARRAY_SIZE',
11094 `GL_VERTEX_ATTRIB_ARRAY_STRIDE', `GL_VERTEX_ATTRIB_ARRAY_TYPE',
11095 `GL_VERTEX_ATTRIB_ARRAY_NORMALIZED', or `GL_CURRENT_VERTEX_ATTRIB'.
11096
11097 PARAMS
11098 Returns the requested data.
11099
11100 `glGetVertexAttrib' returns in PARAMS the value of a generic vertex
11101 attribute parameter. The generic vertex attribute to be queried is
11102 specified by INDEX, and the parameter to be queried is specified by
11103 PNAME.
11104
11105 The accepted parameter names are as follows:
11106
11107 `GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING'
11108
11109
11110 PARAMS returns a single value, the name of the buffer object
11111 currently bound to the binding point corresponding to generic
11112 vertex attribute array INDEX. If no buffer object is bound, 0 is
11113 returned. The initial value is 0.
11114
11115 `GL_VERTEX_ATTRIB_ARRAY_ENABLED'
11116
11117
11118 PARAMS returns a single value that is non-zero (true) if the vertex
11119 attribute array for INDEX is enabled and 0 (false) if it is
11120 disabled. The initial value is `GL_FALSE'.
11121
11122 `GL_VERTEX_ATTRIB_ARRAY_SIZE'
11123
11124
11125 PARAMS returns a single value, the size of the vertex attribute
11126 array for INDEX. The size is the number of values for each element
11127 of the vertex attribute array, and it will be 1, 2, 3, or 4. The
11128 initial value is 4.
11129
11130 `GL_VERTEX_ATTRIB_ARRAY_STRIDE'
11131
11132
11133 PARAMS returns a single value, the array stride for (number of
11134 bytes between successive elements in) the vertex attribute array
11135 for INDEX. A value of 0 indicates that the array elements are
11136 stored sequentially in memory. The initial value is 0.
11137
11138 `GL_VERTEX_ATTRIB_ARRAY_TYPE'
11139
11140
11141 PARAMS returns a single value, a symbolic constant indicating the
11142 array type for the vertex attribute array for INDEX. Possible
11143 values are `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
11144 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', and
11145 `GL_DOUBLE'. The initial value is `GL_FLOAT'.
11146
11147 `GL_VERTEX_ATTRIB_ARRAY_NORMALIZED'
11148
11149
11150 PARAMS returns a single value that is non-zero (true) if
11151 fixed-point data types for the vertex attribute array indicated by
11152 INDEX are normalized when they are converted to floating point, and
11153 0 (false) otherwise. The initial value is `GL_FALSE'.
11154
11155 `GL_CURRENT_VERTEX_ATTRIB'
11156
11157
11158 PARAMS returns four values that represent the current value for the
11159 generic vertex attribute specified by index. Generic vertex
11160 attribute 0 is unique in that it has no current state, so an error
11161 will be generated if INDEX is 0. The initial value for all other
11162 generic vertex attributes is (0,0,0,1).
11163
11164 All of the parameters except `GL_CURRENT_VERTEX_ATTRIB' represent
11165 client-side state.
11166
11167 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
11168 `GL_MAX_VERTEX_ATTRIBS'.
11169
11170 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
11171
11172 `GL_INVALID_OPERATION' is generated if INDEX is 0 and PNAME is
11173 `GL_CURRENT_VERTEX_ATTRIB'.")
11174
11175 (define-gl-procedures
11176 ((glGetBooleanv
11177 (pname GLenum)
11178 (params GLboolean-*)
11179 ->
11180 void)
11181 (glGetDoublev
11182 (pname GLenum)
11183 (params GLdouble-*)
11184 ->
11185 void)
11186 (glGetFloatv
11187 (pname GLenum)
11188 (params GLfloat-*)
11189 ->
11190 void)
11191 (glGetIntegerv
11192 (pname GLenum)
11193 (params GLint-*)
11194 ->
11195 void))
11196 "Return the value or values of a selected parameter.
11197
11198 PNAME
11199 Specifies the parameter value to be returned. The symbolic
11200 constants in the list below are accepted.
11201
11202 PARAMS
11203 Returns the value or values of the specified parameter.
11204
11205 These four commands return values for simple state variables in GL.
11206 PNAME is a symbolic constant indicating the state variable to be
11207 returned, and PARAMS is a pointer to an array of the indicated type in
11208 which to place the returned data.
11209
11210 Type conversion is performed if PARAMS has a different type than the
11211 state variable value being requested. If `glGetBooleanv' is called, a
11212 floating-point (or integer) value is converted to `GL_FALSE' if and only
11213 if it is 0.0 (or 0). Otherwise, it is converted to `GL_TRUE'. If
11214 `glGetIntegerv' is called, boolean values are returned as `GL_TRUE' or
11215 `GL_FALSE', and most floating-point values are rounded to the nearest
11216 integer value. Floating-point colors and normals, however, are returned
11217 with a linear mapping that maps 1.0 to the most positive representable
11218 integer value and -1.0 to the most negative representable integer value.
11219 If `glGetFloatv' or `glGetDoublev' is called, boolean values are
11220 returned as `GL_TRUE' or `GL_FALSE', and integer values are converted to
11221 floating-point values.
11222
11223 The following symbolic constants are accepted by PNAME:
11224
11225 `GL_ACCUM_ALPHA_BITS'
11226
11227
11228 PARAMS returns one value, the number of alpha bitplanes in the
11229 accumulation buffer.
11230
11231 `GL_ACCUM_BLUE_BITS'
11232
11233
11234 PARAMS returns one value, the number of blue bitplanes in the
11235 accumulation buffer.
11236
11237 `GL_ACCUM_CLEAR_VALUE'
11238
11239
11240 PARAMS returns four values: the red, green, blue, and alpha values
11241 used to clear the accumulation buffer. Integer values, if
11242 requested, are linearly mapped from the internal floating-point
11243 representation such that 1.0 returns the most positive
11244 representable integer value, and -1.0 returns the most negative
11245 representable integer value. The initial value is (0, 0, 0, 0). See
11246 `glClearAccum'.
11247
11248 `GL_ACCUM_GREEN_BITS'
11249
11250
11251 PARAMS returns one value, the number of green bitplanes in the
11252 accumulation buffer.
11253
11254 `GL_ACCUM_RED_BITS'
11255
11256
11257 PARAMS returns one value, the number of red bitplanes in the
11258 accumulation buffer.
11259
11260 `GL_ACTIVE_TEXTURE'
11261
11262
11263 PARAMS returns a single value indicating the active multitexture
11264 unit. The initial value is `GL_TEXTURE0'. See `glActiveTexture'.
11265
11266 `GL_ALIASED_POINT_SIZE_RANGE'
11267
11268
11269 PARAMS returns two values, the smallest and largest supported sizes
11270 for aliased points.
11271
11272 `GL_ALIASED_LINE_WIDTH_RANGE'
11273
11274
11275 PARAMS returns two values, the smallest and largest supported
11276 widths for aliased lines.
11277
11278 `GL_ALPHA_BIAS'
11279
11280
11281 PARAMS returns one value, the alpha bias factor used during pixel
11282 transfers. The initial value is 0. See `glPixelTransfer'.
11283
11284 `GL_ALPHA_BITS'
11285
11286
11287 PARAMS returns one value, the number of alpha bitplanes in each
11288 color buffer.
11289
11290 `GL_ALPHA_SCALE'
11291
11292
11293 PARAMS returns one value, the alpha scale factor used during pixel
11294 transfers. The initial value is 1. See `glPixelTransfer'.
11295
11296 `GL_ALPHA_TEST'
11297
11298
11299 PARAMS returns a single boolean value indicating whether alpha
11300 testing of fragments is enabled. The initial value is `GL_FALSE'.
11301 See `glAlphaFunc'.
11302
11303 `GL_ALPHA_TEST_FUNC'PARAMS returns one value,
11304
11305
11306 the symbolic name of the alpha test function. The initial value is
11307 `GL_ALWAYS'. See `glAlphaFunc'.
11308
11309 `GL_ALPHA_TEST_REF'
11310
11311
11312 PARAMS returns one value, the reference value for the alpha test.
11313 The initial value is 0. See `glAlphaFunc'. An integer value, if
11314 requested, is linearly mapped from the internal floating-point
11315 representation such that 1.0 returns the most positive
11316 representable integer value, and -1.0 returns the most negative
11317 representable integer value.
11318
11319 `GL_ARRAY_BUFFER_BINDING'
11320
11321
11322 PARAMS returns a single value, the name of the buffer object
11323 currently bound to the target `GL_ARRAY_BUFFER'. If no buffer
11324 object is bound to this target, 0 is returned. The initial value is
11325 0. See `glBindBuffer'.
11326
11327 `GL_ATTRIB_STACK_DEPTH'
11328
11329
11330 PARAMS returns one value, the depth of the attribute stack. If the
11331 stack is empty, 0 is returned. The initial value is 0. See
11332 `glPushAttrib'.
11333
11334 `GL_AUTO_NORMAL'
11335
11336
11337 PARAMS returns a single boolean value indicating whether 2D map
11338 evaluation automatically generates surface normals. The initial
11339 value is `GL_FALSE'. See `glMap2'.
11340
11341 `GL_AUX_BUFFERS'
11342
11343
11344 PARAMS returns one value, the number of auxiliary color buffers
11345 available.
11346
11347 `GL_BLEND'
11348
11349
11350 PARAMS returns a single boolean value indicating whether blending
11351 is enabled. The initial value is `GL_FALSE'. See `glBlendFunc'.
11352
11353 `GL_BLEND_COLOR'
11354
11355
11356 PARAMS returns four values, the red, green, blue, and alpha values
11357 which are the components of the blend color. See `glBlendColor'.
11358
11359 `GL_BLEND_DST_ALPHA'
11360
11361
11362 PARAMS returns one value, the symbolic constant identifying the
11363 alpha destination blend function. The initial value is `GL_ZERO'.
11364 See `glBlendFunc' and `glBlendFuncSeparate'.
11365
11366 `GL_BLEND_DST_RGB'
11367
11368
11369 PARAMS returns one value, the symbolic constant identifying the RGB
11370 destination blend function. The initial value is `GL_ZERO'. See
11371 `glBlendFunc' and `glBlendFuncSeparate'.
11372
11373 `GL_BLEND_EQUATION_RGB'
11374
11375
11376 PARAMS returns one value, a symbolic constant indicating whether
11377 the RGB blend equation is `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
11378 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN' or `GL_MAX'. See
11379 `glBlendEquationSeparate'.
11380
11381 `GL_BLEND_EQUATION_ALPHA'
11382
11383
11384 PARAMS returns one value, a symbolic constant indicating whether
11385 the Alpha blend equation is `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
11386 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN' or `GL_MAX'. See
11387 `glBlendEquationSeparate'.
11388
11389 `GL_BLEND_SRC_ALPHA'
11390
11391
11392 PARAMS returns one value, the symbolic constant identifying the
11393 alpha source blend function. The initial value is `GL_ONE'. See
11394 `glBlendFunc' and `glBlendFuncSeparate'.
11395
11396 `GL_BLEND_SRC_RGB'
11397
11398
11399 PARAMS returns one value, the symbolic constant identifying the RGB
11400 source blend function. The initial value is `GL_ONE'. See
11401 `glBlendFunc' and `glBlendFuncSeparate'.
11402
11403 `GL_BLUE_BIAS'
11404
11405
11406 PARAMS returns one value, the blue bias factor used during pixel
11407 transfers. The initial value is 0. See `glPixelTransfer'.
11408
11409 `GL_BLUE_BITS'
11410
11411
11412 PARAMS returns one value, the number of blue bitplanes in each
11413 color buffer.
11414
11415 `GL_BLUE_SCALE'
11416
11417
11418 PARAMS returns one value, the blue scale factor used during pixel
11419 transfers. The initial value is 1. See `glPixelTransfer'.
11420
11421 `GL_CLIENT_ACTIVE_TEXTURE'
11422
11423
11424 PARAMS returns a single integer value indicating the current client
11425 active multitexture unit. The initial value is `GL_TEXTURE0'. See
11426 `glClientActiveTexture'.
11427
11428 `GL_CLIENT_ATTRIB_STACK_DEPTH'
11429
11430
11431 PARAMS returns one value indicating the depth of the attribute
11432 stack. The initial value is 0. See `glPushClientAttrib'.
11433
11434 `GL_CLIP_PLANE'I
11435
11436
11437 PARAMS returns a single boolean value indicating whether the
11438 specified clipping plane is enabled. The initial value is
11439 `GL_FALSE'. See `glClipPlane'.
11440
11441 `GL_COLOR_ARRAY'
11442
11443
11444 PARAMS returns a single boolean value indicating whether the color
11445 array is enabled. The initial value is `GL_FALSE'. See
11446 `glColorPointer'.
11447
11448 `GL_COLOR_ARRAY_BUFFER_BINDING'
11449
11450
11451 PARAMS returns a single value, the name of the buffer object
11452 associated with the color array. This buffer object would have been
11453 bound to the target `GL_ARRAY_BUFFER' at the time of the most
11454 recent call to `glColorPointer'. If no buffer object was bound to
11455 this target, 0 is returned. The initial value is 0. See
11456 `glBindBuffer'.
11457
11458 `GL_COLOR_ARRAY_SIZE'
11459
11460
11461 PARAMS returns one value, the number of components per color in the
11462 color array. The initial value is 4. See `glColorPointer'.
11463
11464 `GL_COLOR_ARRAY_STRIDE'
11465
11466
11467 PARAMS returns one value, the byte offset between consecutive
11468 colors in the color array. The initial value is 0. See
11469 `glColorPointer'.
11470
11471 `GL_COLOR_ARRAY_TYPE'
11472
11473
11474 PARAMS returns one value, the data type of each component in the
11475 color array. The initial value is `GL_FLOAT'. See `glColorPointer'.
11476
11477 `GL_COLOR_CLEAR_VALUE'
11478
11479
11480 PARAMS returns four values: the red, green, blue, and alpha values
11481 used to clear the color buffers. Integer values, if requested, are
11482 linearly mapped from the internal floating-point representation
11483 such that 1.0 returns the most positive representable integer
11484 value, and -1.0 returns the most negative representable integer
11485 value. The initial value is (0, 0, 0, 0). See `glClearColor'.
11486
11487 `GL_COLOR_LOGIC_OP'
11488
11489
11490 PARAMS returns a single boolean value indicating whether a
11491 fragment's RGBA color values are merged into the framebuffer using
11492 a logical operation. The initial value is `GL_FALSE'. See
11493 `glLogicOp'.
11494
11495 `GL_COLOR_MATERIAL'
11496
11497
11498 PARAMS returns a single boolean value indicating whether one or
11499 more material parameters are tracking the current color. The
11500 initial value is `GL_FALSE'. See `glColorMaterial'.
11501
11502 `GL_COLOR_MATERIAL_FACE'
11503
11504
11505 PARAMS returns one value, a symbolic constant indicating which
11506 materials have a parameter that is tracking the current color. The
11507 initial value is `GL_FRONT_AND_BACK'. See `glColorMaterial'.
11508
11509 `GL_COLOR_MATERIAL_PARAMETER'
11510
11511
11512 PARAMS returns one value, a symbolic constant indicating which
11513 material parameters are tracking the current color. The initial
11514 value is `GL_AMBIENT_AND_DIFFUSE'. See `glColorMaterial'.
11515
11516 `GL_COLOR_MATRIX'
11517
11518
11519 PARAMS returns sixteen values: the color matrix on the top of the
11520 color matrix stack. Initially this matrix is the identity matrix.
11521 See `glPushMatrix'.
11522
11523 `GL_COLOR_MATRIX_STACK_DEPTH'
11524
11525
11526 PARAMS returns one value, the maximum supported depth of the
11527 projection matrix stack. The value must be at least 2. See
11528 `glPushMatrix'.
11529
11530 `GL_COLOR_SUM'
11531
11532
11533 PARAMS returns a single boolean value indicating whether primary
11534 and secondary color sum is enabled. See `glSecondaryColor'.
11535
11536 `GL_COLOR_TABLE'
11537
11538
11539 PARAMS returns a single boolean value indicating whether the color
11540 table lookup is enabled. See `glColorTable'.
11541
11542 `GL_COLOR_WRITEMASK'
11543
11544
11545 PARAMS returns four boolean values: the red, green, blue, and alpha
11546 write enables for the color buffers. The initial value is
11547 (`GL_TRUE', `GL_TRUE', `GL_TRUE', `GL_TRUE'). See `glColorMask'.
11548
11549 `GL_COMPRESSED_TEXTURE_FORMATS'
11550
11551
11552 PARAMS returns a list of symbolic constants of length
11553 `GL_NUM_COMPRESSED_TEXTURE_FORMATS' indicating which compressed
11554 texture formats are available. See `glCompressedTexImage2D'.
11555
11556 `GL_CONVOLUTION_1D'
11557
11558
11559 PARAMS returns a single boolean value indicating whether 1D
11560 convolution is enabled. The initial value is `GL_FALSE'. See
11561 `glConvolutionFilter1D'.
11562
11563 `GL_CONVOLUTION_2D'
11564
11565
11566 PARAMS returns a single boolean value indicating whether 2D
11567 convolution is enabled. The initial value is `GL_FALSE'. See
11568 `glConvolutionFilter2D'.
11569
11570 `GL_CULL_FACE'
11571
11572
11573 PARAMS returns a single boolean value indicating whether polygon
11574 culling is enabled. The initial value is `GL_FALSE'. See
11575 `glCullFace'.
11576
11577 `GL_CULL_FACE_MODE'
11578
11579
11580 PARAMS returns one value, a symbolic constant indicating which
11581 polygon faces are to be culled. The initial value is `GL_BACK'. See
11582 `glCullFace'.
11583
11584 `GL_CURRENT_COLOR'
11585
11586
11587 PARAMS returns four values: the red, green, blue, and alpha values
11588 of the current color. Integer values, if requested, are linearly
11589 mapped from the internal floating-point representation such that
11590 1.0 returns the most positive representable integer value, and -1.0
11591 returns the most negative representable integer value. The initial
11592 value is (1, 1, 1, 1). See `glColor'.
11593
11594 `GL_CURRENT_FOG_COORD'
11595
11596
11597 PARAMS returns one value, the current fog coordinate. The initial
11598 value is 0. See `glFogCoord'.
11599
11600 `GL_CURRENT_INDEX'
11601
11602
11603 PARAMS returns one value, the current color index. The initial
11604 value is 1. See `glIndex'.
11605
11606 `GL_CURRENT_NORMAL'
11607
11608
11609 PARAMS returns three values: the X, Y, and Z values of the current
11610 normal. Integer values, if requested, are linearly mapped from the
11611 internal floating-point representation such that 1.0 returns the
11612 most positive representable integer value, and -1.0 returns the
11613 most negative representable integer value. The initial value is (0,
11614 0, 1). See `glNormal'.
11615
11616 `GL_CURRENT_PROGRAM'
11617
11618
11619 PARAMS returns one value, the name of the program object that is
11620 currently active, or 0 if no program object is active. See
11621 `glUseProgram'.
11622
11623 `GL_CURRENT_RASTER_COLOR'
11624
11625
11626 PARAMS returns four values: the red, green, blue, and alpha color
11627 values of the current raster position. Integer values, if
11628 requested, are linearly mapped from the internal floating-point
11629 representation such that 1.0 returns the most positive
11630 representable integer value, and -1.0 returns the most negative
11631 representable integer value. The initial value is (1, 1, 1, 1). See
11632 `glRasterPos'.
11633
11634 `GL_CURRENT_RASTER_DISTANCE'
11635
11636
11637 PARAMS returns one value, the distance from the eye to the current
11638 raster position. The initial value is 0. See `glRasterPos'.
11639
11640 `GL_CURRENT_RASTER_INDEX'
11641
11642
11643 PARAMS returns one value, the color index of the current raster
11644 position. The initial value is 1. See `glRasterPos'.
11645
11646 `GL_CURRENT_RASTER_POSITION'
11647
11648
11649 PARAMS returns four values: the X, Y, Z, and W components of the
11650 current raster position. X, Y, and Z are in window coordinates, and
11651 W is in clip coordinates. The initial value is (0, 0, 0, 1). See
11652 `glRasterPos'.
11653
11654 `GL_CURRENT_RASTER_POSITION_VALID'
11655
11656
11657 PARAMS returns a single boolean value indicating whether the
11658 current raster position is valid. The initial value is `GL_TRUE'.
11659 See `glRasterPos'.
11660
11661 `GL_CURRENT_RASTER_SECONDARY_COLOR'
11662
11663
11664 PARAMS returns four values: the red, green, blue, and alpha
11665 secondary color values of the current raster position. Integer
11666 values, if requested, are linearly mapped from the internal
11667 floating-point representation such that 1.0 returns the most
11668 positive representable integer value, and -1.0 returns the most
11669 negative representable integer value. The initial value is (1, 1,
11670 1, 1). See `glRasterPos'.
11671
11672 `GL_CURRENT_RASTER_TEXTURE_COORDS'
11673
11674
11675 PARAMS returns four values: the S, T, R, and Q texture coordinates
11676 of the current raster position. The initial value is (0, 0, 0, 1).
11677 See `glRasterPos' and `glMultiTexCoord'.
11678
11679 `GL_CURRENT_SECONDARY_COLOR'
11680
11681
11682 PARAMS returns four values: the red, green, blue, and alpha values
11683 of the current secondary color. Integer values, if requested, are
11684 linearly mapped from the internal floating-point representation
11685 such that 1.0 returns the most positive representable integer
11686 value, and -1.0 returns the most negative representable integer
11687 value. The initial value is (0, 0, 0, 0). See `glSecondaryColor'.
11688
11689 `GL_CURRENT_TEXTURE_COORDS'
11690
11691
11692 PARAMS returns four values: the S, T, R, and Q current texture
11693 coordinates. The initial value is (0, 0, 0, 1). See
11694 `glMultiTexCoord'.
11695
11696 `GL_DEPTH_BIAS'
11697
11698
11699 PARAMS returns one value, the depth bias factor used during pixel
11700 transfers. The initial value is 0. See `glPixelTransfer'.
11701
11702 `GL_DEPTH_BITS'
11703
11704
11705 PARAMS returns one value, the number of bitplanes in the depth
11706 buffer.
11707
11708 `GL_DEPTH_CLEAR_VALUE'
11709
11710
11711 PARAMS returns one value, the value that is used to clear the depth
11712 buffer. Integer values, if requested, are linearly mapped from the
11713 internal floating-point representation such that 1.0 returns the
11714 most positive representable integer value, and -1.0 returns the
11715 most negative representable integer value. The initial value is 1.
11716 See `glClearDepth'.
11717
11718 `GL_DEPTH_FUNC'
11719
11720
11721 PARAMS returns one value, the symbolic constant that indicates the
11722 depth comparison function. The initial value is `GL_LESS'. See
11723 `glDepthFunc'.
11724
11725 `GL_DEPTH_RANGE'
11726
11727
11728 PARAMS returns two values: the near and far mapping limits for the
11729 depth buffer. Integer values, if requested, are linearly mapped
11730 from the internal floating-point representation such that 1.0
11731 returns the most positive representable integer value, and -1.0
11732 returns the most negative representable integer value. The initial
11733 value is (0, 1). See `glDepthRange'.
11734
11735 `GL_DEPTH_SCALE'
11736
11737
11738 PARAMS returns one value, the depth scale factor used during pixel
11739 transfers. The initial value is 1. See `glPixelTransfer'.
11740
11741 `GL_DEPTH_TEST'
11742
11743
11744 PARAMS returns a single boolean value indicating whether depth
11745 testing of fragments is enabled. The initial value is `GL_FALSE'.
11746 See `glDepthFunc' and `glDepthRange'.
11747
11748 `GL_DEPTH_WRITEMASK'
11749
11750
11751 PARAMS returns a single boolean value indicating if the depth
11752 buffer is enabled for writing. The initial value is `GL_TRUE'. See
11753 `glDepthMask'.
11754
11755 `GL_DITHER'
11756
11757
11758 PARAMS returns a single boolean value indicating whether dithering
11759 of fragment colors and indices is enabled. The initial value is
11760 `GL_TRUE'.
11761
11762 `GL_DOUBLEBUFFER'
11763
11764
11765 PARAMS returns a single boolean value indicating whether double
11766 buffering is supported.
11767
11768 `GL_DRAW_BUFFER'
11769
11770
11771 PARAMS returns one value, a symbolic constant indicating which
11772 buffers are being drawn to. See `glDrawBuffer'. The initial value
11773 is `GL_BACK' if there are back buffers, otherwise it is `GL_FRONT'.
11774
11775 `GL_DRAW_BUFFER'I
11776
11777
11778 PARAMS returns one value, a symbolic constant indicating which
11779 buffers are being drawn to by the corresponding output color. See
11780 `glDrawBuffers'. The initial value of `GL_DRAW_BUFFER0' is
11781 `GL_BACK' if there are back buffers, otherwise it is `GL_FRONT'.
11782 The initial values of draw buffers for all other output colors is
11783 `GL_NONE'.
11784
11785 `GL_EDGE_FLAG'
11786
11787
11788 PARAMS returns a single boolean value indicating whether the
11789 current edge flag is `GL_TRUE' or `GL_FALSE'. The initial value is
11790 `GL_TRUE'. See `glEdgeFlag'.
11791
11792 `GL_EDGE_FLAG_ARRAY'
11793
11794
11795 PARAMS returns a single boolean value indicating whether the edge
11796 flag array is enabled. The initial value is `GL_FALSE'. See
11797 `glEdgeFlagPointer'.
11798
11799 `GL_EDGE_FLAG_ARRAY_BUFFER_BINDING'
11800
11801
11802 PARAMS returns a single value, the name of the buffer object
11803 associated with the edge flag array. This buffer object would have
11804 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
11805 recent call to `glEdgeFlagPointer'. If no buffer object was bound
11806 to this target, 0 is returned. The initial value is 0. See
11807 `glBindBuffer'.
11808
11809 `GL_EDGE_FLAG_ARRAY_STRIDE'
11810
11811
11812 PARAMS returns one value, the byte offset between consecutive edge
11813 flags in the edge flag array. The initial value is 0. See
11814 `glEdgeFlagPointer'.
11815
11816 `GL_ELEMENT_ARRAY_BUFFER_BINDING'
11817
11818
11819 PARAMS returns a single value, the name of the buffer object
11820 currently bound to the target `GL_ELEMENT_ARRAY_BUFFER'. If no
11821 buffer object is bound to this target, 0 is returned. The initial
11822 value is 0. See `glBindBuffer'.
11823
11824 `GL_FEEDBACK_BUFFER_SIZE'
11825
11826
11827 PARAMS returns one value, the size of the feedback buffer. See
11828 `glFeedbackBuffer'.
11829
11830 `GL_FEEDBACK_BUFFER_TYPE'
11831
11832
11833 PARAMS returns one value, the type of the feedback buffer. See
11834 `glFeedbackBuffer'.
11835
11836 `GL_FOG'
11837
11838
11839 PARAMS returns a single boolean value indicating whether fogging is
11840 enabled. The initial value is `GL_FALSE'. See `glFog'.
11841
11842 `GL_FOG_COORD_ARRAY'
11843
11844
11845 PARAMS returns a single boolean value indicating whether the fog
11846 coordinate array is enabled. The initial value is `GL_FALSE'. See
11847 `glFogCoordPointer'.
11848
11849 `GL_FOG_COORD_ARRAY_BUFFER_BINDING'
11850
11851
11852 PARAMS returns a single value, the name of the buffer object
11853 associated with the fog coordinate array. This buffer object would
11854 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
11855 most recent call to `glFogCoordPointer'. If no buffer object was
11856 bound to this target, 0 is returned. The initial value is 0. See
11857 `glBindBuffer'.
11858
11859 `GL_FOG_COORD_ARRAY_STRIDE'
11860
11861
11862 PARAMS returns one value, the byte offset between consecutive fog
11863 coordinates in the fog coordinate array. The initial value is 0.
11864 See `glFogCoordPointer'.
11865
11866 `GL_FOG_COORD_ARRAY_TYPE'
11867
11868
11869 PARAMS returns one value, the type of the fog coordinate array. The
11870 initial value is `GL_FLOAT'. See `glFogCoordPointer'.
11871
11872 `GL_FOG_COORD_SRC'
11873
11874
11875 PARAMS returns one value, a symbolic constant indicating the source
11876 of the fog coordinate. The initial value is `GL_FRAGMENT_DEPTH'.
11877 See `glFog'.
11878
11879 `GL_FOG_COLOR'
11880
11881
11882 PARAMS returns four values: the red, green, blue, and alpha
11883 components of the fog color. Integer values, if requested, are
11884 linearly mapped from the internal floating-point representation
11885 such that 1.0 returns the most positive representable integer
11886 value, and -1.0 returns the most negative representable integer
11887 value. The initial value is (0, 0, 0, 0). See `glFog'.
11888
11889 `GL_FOG_DENSITY'
11890
11891
11892 PARAMS returns one value, the fog density parameter. The initial
11893 value is 1. See `glFog'.
11894
11895 `GL_FOG_END'
11896
11897
11898 PARAMS returns one value, the end factor for the linear fog
11899 equation. The initial value is 1. See `glFog'.
11900
11901 `GL_FOG_HINT'
11902
11903
11904 PARAMS returns one value, a symbolic constant indicating the mode
11905 of the fog hint. The initial value is `GL_DONT_CARE'. See `glHint'.
11906
11907 `GL_FOG_INDEX'
11908
11909
11910 PARAMS returns one value, the fog color index. The initial value is
11911 0. See `glFog'.
11912
11913 `GL_FOG_MODE'
11914
11915
11916 PARAMS returns one value, a symbolic constant indicating which fog
11917 equation is selected. The initial value is `GL_EXP'. See `glFog'.
11918
11919 `GL_FOG_START'
11920
11921
11922 PARAMS returns one value, the start factor for the linear fog
11923 equation. The initial value is 0. See `glFog'.
11924
11925 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT'
11926
11927
11928 PARAMS returns one value, a symbolic constant indicating the mode
11929 of the derivative accuracy hint for fragment shaders. The initial
11930 value is `GL_DONT_CARE'. See `glHint'.
11931
11932 `GL_FRONT_FACE'
11933
11934
11935 PARAMS returns one value, a symbolic constant indicating whether
11936 clockwise or counterclockwise polygon winding is treated as
11937 front-facing. The initial value is `GL_CCW'. See `glFrontFace'.
11938
11939 `GL_GENERATE_MIPMAP_HINT'
11940
11941
11942 PARAMS returns one value, a symbolic constant indicating the mode
11943 of the mipmap generation filtering hint. The initial value is
11944 `GL_DONT_CARE'. See `glHint'.
11945
11946 `GL_GREEN_BIAS'
11947
11948
11949 PARAMS returns one value, the green bias factor used during pixel
11950 transfers. The initial value is 0.
11951
11952 `GL_GREEN_BITS'
11953
11954
11955 PARAMS returns one value, the number of green bitplanes in each
11956 color buffer.
11957
11958 `GL_GREEN_SCALE'
11959
11960
11961 PARAMS returns one value, the green scale factor used during pixel
11962 transfers. The initial value is 1. See `glPixelTransfer'.
11963
11964 `GL_HISTOGRAM'
11965
11966
11967 PARAMS returns a single boolean value indicating whether histogram
11968 is enabled. The initial value is `GL_FALSE'. See `glHistogram'.
11969
11970 `GL_INDEX_ARRAY'
11971
11972
11973 PARAMS returns a single boolean value indicating whether the color
11974 index array is enabled. The initial value is `GL_FALSE'. See
11975 `glIndexPointer'.
11976
11977 `GL_INDEX_ARRAY_BUFFER_BINDING'
11978
11979
11980 PARAMS returns a single value, the name of the buffer object
11981 associated with the color index array. This buffer object would
11982 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
11983 most recent call to `glIndexPointer'. If no buffer object was bound
11984 to this target, 0 is returned. The initial value is 0. See
11985 `glBindBuffer'.
11986
11987 `GL_INDEX_ARRAY_STRIDE'
11988
11989
11990 PARAMS returns one value, the byte offset between consecutive color
11991 indexes in the color index array. The initial value is 0. See
11992 `glIndexPointer'.
11993
11994 `GL_INDEX_ARRAY_TYPE'
11995
11996
11997 PARAMS returns one value, the data type of indexes in the color
11998 index array. The initial value is `GL_FLOAT'. See `glIndexPointer'.
11999
12000 `GL_INDEX_BITS'
12001
12002
12003 PARAMS returns one value, the number of bitplanes in each color
12004 index buffer.
12005
12006 `GL_INDEX_CLEAR_VALUE'
12007
12008
12009 PARAMS returns one value, the color index used to clear the color
12010 index buffers. The initial value is 0. See `glClearIndex'.
12011
12012 `GL_INDEX_LOGIC_OP'
12013
12014
12015 PARAMS returns a single boolean value indicating whether a
12016 fragment's index values are merged into the framebuffer using a
12017 logical operation. The initial value is `GL_FALSE'. See
12018 `glLogicOp'.
12019
12020 `GL_INDEX_MODE'
12021
12022
12023 PARAMS returns a single boolean value indicating whether the GL is
12024 in color index mode (`GL_TRUE') or RGBA mode (`GL_FALSE').
12025
12026 `GL_INDEX_OFFSET'
12027
12028
12029 PARAMS returns one value, the offset added to color and stencil
12030 indices during pixel transfers. The initial value is 0. See
12031 `glPixelTransfer'.
12032
12033 `GL_INDEX_SHIFT'
12034
12035
12036 PARAMS returns one value, the amount that color and stencil indices
12037 are shifted during pixel transfers. The initial value is 0. See
12038 `glPixelTransfer'.
12039
12040 `GL_INDEX_WRITEMASK'
12041
12042
12043 PARAMS returns one value, a mask indicating which bitplanes of each
12044 color index buffer can be written. The initial value is all 1's.
12045 See `glIndexMask'.
12046
12047 `GL_LIGHT'I
12048
12049
12050 PARAMS returns a single boolean value indicating whether the
12051 specified light is enabled. The initial value is `GL_FALSE'. See
12052 `glLight' and `glLightModel'.
12053
12054 `GL_LIGHTING'
12055
12056
12057 PARAMS returns a single boolean value indicating whether lighting
12058 is enabled. The initial value is `GL_FALSE'. See `glLightModel'.
12059
12060 `GL_LIGHT_MODEL_AMBIENT'
12061
12062
12063 PARAMS returns four values: the red, green, blue, and alpha
12064 components of the ambient intensity of the entire scene. Integer
12065 values, if requested, are linearly mapped from the internal
12066 floating-point representation such that 1.0 returns the most
12067 positive representable integer value, and -1.0 returns the most
12068 negative representable integer value. The initial value is (0.2,
12069 0.2, 0.2, 1.0). See `glLightModel'.
12070
12071 `GL_LIGHT_MODEL_COLOR_CONTROL'
12072
12073
12074 PARAMS returns single enumerated value indicating whether specular
12075 reflection calculations are separated from normal lighting
12076 computations. The initial value is `GL_SINGLE_COLOR'.
12077
12078 `GL_LIGHT_MODEL_LOCAL_VIEWER'
12079
12080
12081 PARAMS returns a single boolean value indicating whether specular
12082 reflection calculations treat the viewer as being local to the
12083 scene. The initial value is `GL_FALSE'. See `glLightModel'.
12084
12085 `GL_LIGHT_MODEL_TWO_SIDE'
12086
12087
12088 PARAMS returns a single boolean value indicating whether separate
12089 materials are used to compute lighting for front- and back-facing
12090 polygons. The initial value is `GL_FALSE'. See `glLightModel'.
12091
12092 `GL_LINE_SMOOTH'
12093
12094
12095 PARAMS returns a single boolean value indicating whether
12096 antialiasing of lines is enabled. The initial value is `GL_FALSE'.
12097 See `glLineWidth'.
12098
12099 `GL_LINE_SMOOTH_HINT'
12100
12101
12102 PARAMS returns one value, a symbolic constant indicating the mode
12103 of the line antialiasing hint. The initial value is `GL_DONT_CARE'.
12104 See `glHint'.
12105
12106 `GL_LINE_STIPPLE'
12107
12108
12109 PARAMS returns a single boolean value indicating whether stippling
12110 of lines is enabled. The initial value is `GL_FALSE'. See
12111 `glLineStipple'.
12112
12113 `GL_LINE_STIPPLE_PATTERN'
12114
12115
12116 PARAMS returns one value, the 16-bit line stipple pattern. The
12117 initial value is all 1's. See `glLineStipple'.
12118
12119 `GL_LINE_STIPPLE_REPEAT'
12120
12121
12122 PARAMS returns one value, the line stipple repeat factor. The
12123 initial value is 1. See `glLineStipple'.
12124
12125 `GL_LINE_WIDTH'
12126
12127
12128 PARAMS returns one value, the line width as specified with
12129 `glLineWidth'. The initial value is 1.
12130
12131 `GL_LINE_WIDTH_GRANULARITY'
12132
12133
12134 PARAMS returns one value, the width difference between adjacent
12135 supported widths for antialiased lines. See `glLineWidth'.
12136
12137 `GL_LINE_WIDTH_RANGE'
12138
12139
12140 PARAMS returns two values: the smallest and largest supported
12141 widths for antialiased lines. See `glLineWidth'.
12142
12143 `GL_LIST_BASE'
12144
12145
12146 PARAMS returns one value, the base offset added to all names in
12147 arrays presented to `glCallLists'. The initial value is 0. See
12148 `glListBase'.
12149
12150 `GL_LIST_INDEX'
12151
12152
12153 PARAMS returns one value, the name of the display list currently
12154 under construction. 0 is returned if no display list is currently
12155 under construction. The initial value is 0. See `glNewList'.
12156
12157 `GL_LIST_MODE'
12158
12159
12160 PARAMS returns one value, a symbolic constant indicating the
12161 construction mode of the display list currently under construction.
12162 The initial value is 0. See `glNewList'.
12163
12164 `GL_LOGIC_OP_MODE'
12165
12166
12167 PARAMS returns one value, a symbolic constant indicating the
12168 selected logic operation mode. The initial value is `GL_COPY'. See
12169 `glLogicOp'.
12170
12171 `GL_MAP1_COLOR_4'
12172
12173
12174 PARAMS returns a single boolean value indicating whether 1D
12175 evaluation generates colors. The initial value is `GL_FALSE'. See
12176 `glMap1'.
12177
12178 `GL_MAP1_GRID_DOMAIN'
12179
12180
12181 PARAMS returns two values: the endpoints of the 1D map's grid
12182 domain. The initial value is (0, 1). See `glMapGrid'.
12183
12184 `GL_MAP1_GRID_SEGMENTS'
12185
12186
12187 PARAMS returns one value, the number of partitions in the 1D map's
12188 grid domain. The initial value is 1. See `glMapGrid'.
12189
12190 `GL_MAP1_INDEX'
12191
12192
12193 PARAMS returns a single boolean value indicating whether 1D
12194 evaluation generates color indices. The initial value is
12195 `GL_FALSE'. See `glMap1'.
12196
12197 `GL_MAP1_NORMAL'
12198
12199
12200 PARAMS returns a single boolean value indicating whether 1D
12201 evaluation generates normals. The initial value is `GL_FALSE'. See
12202 `glMap1'.
12203
12204 `GL_MAP1_TEXTURE_COORD_1'
12205
12206
12207 PARAMS returns a single boolean value indicating whether 1D
12208 evaluation generates 1D texture coordinates. The initial value is
12209 `GL_FALSE'. See `glMap1'.
12210
12211 `GL_MAP1_TEXTURE_COORD_2'
12212
12213
12214 PARAMS returns a single boolean value indicating whether 1D
12215 evaluation generates 2D texture coordinates. The initial value is
12216 `GL_FALSE'. See `glMap1'.
12217
12218 `GL_MAP1_TEXTURE_COORD_3'
12219
12220
12221 PARAMS returns a single boolean value indicating whether 1D
12222 evaluation generates 3D texture coordinates. The initial value is
12223 `GL_FALSE'. See `glMap1'.
12224
12225 `GL_MAP1_TEXTURE_COORD_4'
12226
12227
12228 PARAMS returns a single boolean value indicating whether 1D
12229 evaluation generates 4D texture coordinates. The initial value is
12230 `GL_FALSE'. See `glMap1'.
12231
12232 `GL_MAP1_VERTEX_3'
12233
12234
12235 PARAMS returns a single boolean value indicating whether 1D
12236 evaluation generates 3D vertex coordinates. The initial value is
12237 `GL_FALSE'. See `glMap1'.
12238
12239 `GL_MAP1_VERTEX_4'
12240
12241
12242 PARAMS returns a single boolean value indicating whether 1D
12243 evaluation generates 4D vertex coordinates. The initial value is
12244 `GL_FALSE'. See `glMap1'.
12245
12246 `GL_MAP2_COLOR_4'
12247
12248
12249 PARAMS returns a single boolean value indicating whether 2D
12250 evaluation generates colors. The initial value is `GL_FALSE'. See
12251 `glMap2'.
12252
12253 `GL_MAP2_GRID_DOMAIN'
12254
12255
12256 PARAMS returns four values: the endpoints of the 2D map's I and J
12257 grid domains. The initial value is (0,1; 0,1). See `glMapGrid'.
12258
12259 `GL_MAP2_GRID_SEGMENTS'
12260
12261
12262 PARAMS returns two values: the number of partitions in the 2D map's
12263 I and J grid domains. The initial value is (1,1). See `glMapGrid'.
12264
12265 `GL_MAP2_INDEX'
12266
12267
12268 PARAMS returns a single boolean value indicating whether 2D
12269 evaluation generates color indices. The initial value is
12270 `GL_FALSE'. See `glMap2'.
12271
12272 `GL_MAP2_NORMAL'
12273
12274
12275 PARAMS returns a single boolean value indicating whether 2D
12276 evaluation generates normals. The initial value is `GL_FALSE'. See
12277 `glMap2'.
12278
12279 `GL_MAP2_TEXTURE_COORD_1'
12280
12281
12282 PARAMS returns a single boolean value indicating whether 2D
12283 evaluation generates 1D texture coordinates. The initial value is
12284 `GL_FALSE'. See `glMap2'.
12285
12286 `GL_MAP2_TEXTURE_COORD_2'
12287
12288
12289 PARAMS returns a single boolean value indicating whether 2D
12290 evaluation generates 2D texture coordinates. The initial value is
12291 `GL_FALSE'. See `glMap2'.
12292
12293 `GL_MAP2_TEXTURE_COORD_3'
12294
12295
12296 PARAMS returns a single boolean value indicating whether 2D
12297 evaluation generates 3D texture coordinates. The initial value is
12298 `GL_FALSE'. See `glMap2'.
12299
12300 `GL_MAP2_TEXTURE_COORD_4'
12301
12302
12303 PARAMS returns a single boolean value indicating whether 2D
12304 evaluation generates 4D texture coordinates. The initial value is
12305 `GL_FALSE'. See `glMap2'.
12306
12307 `GL_MAP2_VERTEX_3'
12308
12309
12310 PARAMS returns a single boolean value indicating whether 2D
12311 evaluation generates 3D vertex coordinates. The initial value is
12312 `GL_FALSE'. See `glMap2'.
12313
12314 `GL_MAP2_VERTEX_4'
12315
12316
12317 PARAMS returns a single boolean value indicating whether 2D
12318 evaluation generates 4D vertex coordinates. The initial value is
12319 `GL_FALSE'. See `glMap2'.
12320
12321 `GL_MAP_COLOR'
12322
12323
12324 PARAMS returns a single boolean value indicating if colors and
12325 color indices are to be replaced by table lookup during pixel
12326 transfers. The initial value is `GL_FALSE'. See `glPixelTransfer'.
12327
12328 `GL_MAP_STENCIL'
12329
12330
12331 PARAMS returns a single boolean value indicating if stencil indices
12332 are to be replaced by table lookup during pixel transfers. The
12333 initial value is `GL_FALSE'. See `glPixelTransfer'.
12334
12335 `GL_MATRIX_MODE'
12336
12337
12338 PARAMS returns one value, a symbolic constant indicating which
12339 matrix stack is currently the target of all matrix operations. The
12340 initial value is `GL_MODELVIEW'. See `glMatrixMode'.
12341
12342 `GL_MAX_3D_TEXTURE_SIZE'
12343
12344
12345 PARAMS returns one value, a rough estimate of the largest 3D
12346 texture that the GL can handle. The value must be at least 16. If
12347 the GL version is 1.2 or greater, use `GL_PROXY_TEXTURE_3D' to
12348 determine if a texture is too large. See `glTexImage3D'.
12349
12350 `GL_MAX_CLIENT_ATTRIB_STACK_DEPTH'
12351
12352
12353 PARAMS returns one value indicating the maximum supported depth of
12354 the client attribute stack. See `glPushClientAttrib'.
12355
12356 `GL_MAX_ATTRIB_STACK_DEPTH'
12357
12358
12359 PARAMS returns one value, the maximum supported depth of the
12360 attribute stack. The value must be at least 16. See `glPushAttrib'.
12361
12362 `GL_MAX_CLIP_PLANES'
12363
12364
12365 PARAMS returns one value, the maximum number of application-defined
12366 clipping planes. The value must be at least 6. See `glClipPlane'.
12367
12368 `GL_MAX_COLOR_MATRIX_STACK_DEPTH'
12369
12370
12371 PARAMS returns one value, the maximum supported depth of the color
12372 matrix stack. The value must be at least 2. See `glPushMatrix'.
12373
12374 `GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS'
12375
12376
12377 PARAMS returns one value, the maximum supported texture image units
12378 that can be used to access texture maps from the vertex shader and
12379 the fragment processor combined. If both the vertex shader and the
12380 fragment processing stage access the same texture image unit, then
12381 that counts as using two texture image units against this limit.
12382 The value must be at least 2. See `glActiveTexture'.
12383
12384 `GL_MAX_CUBE_MAP_TEXTURE_SIZE'
12385
12386
12387 PARAMS returns one value. The value gives a rough estimate of the
12388 largest cube-map texture that the GL can handle. The value must be
12389 at least 16. If the GL version is 1.3 or greater, use
12390 `GL_PROXY_TEXTURE_CUBE_MAP' to determine if a texture is too large.
12391 See `glTexImage2D'.
12392
12393 `GL_MAX_DRAW_BUFFERS'
12394
12395
12396 PARAMS returns one value, the maximum number of simultaneous output
12397 colors allowed from a fragment shader using the `gl_FragData'
12398 built-in array. The value must be at least 1. See `glDrawBuffers'.
12399
12400 `GL_MAX_ELEMENTS_INDICES'
12401
12402
12403 PARAMS returns one value, the recommended maximum number of vertex
12404 array indices. See `glDrawRangeElements'.
12405
12406 `GL_MAX_ELEMENTS_VERTICES'
12407
12408
12409 PARAMS returns one value, the recommended maximum number of vertex
12410 array vertices. See `glDrawRangeElements'.
12411
12412 `GL_MAX_EVAL_ORDER'
12413
12414
12415 PARAMS returns one value, the maximum equation order supported by
12416 1D and 2D evaluators. The value must be at least 8. See `glMap1'
12417 and `glMap2'.
12418
12419 `GL_MAX_FRAGMENT_UNIFORM_COMPONENTS'
12420
12421
12422 PARAMS returns one value, the maximum number of individual
12423 floating-point, integer, or boolean values that can be held in
12424 uniform variable storage for a fragment shader. The value must be
12425 at least 64. See `glUniform'.
12426
12427 `GL_MAX_LIGHTS'
12428
12429
12430 PARAMS returns one value, the maximum number of lights. The value
12431 must be at least 8. See `glLight'.
12432
12433 `GL_MAX_LIST_NESTING'
12434
12435
12436 PARAMS returns one value, the maximum recursion depth allowed
12437 during display-list traversal. The value must be at least 64. See
12438 `glCallList'.
12439
12440 `GL_MAX_MODELVIEW_STACK_DEPTH'
12441
12442
12443 PARAMS returns one value, the maximum supported depth of the
12444 modelview matrix stack. The value must be at least 32. See
12445 `glPushMatrix'.
12446
12447 `GL_MAX_NAME_STACK_DEPTH'
12448
12449
12450 PARAMS returns one value, the maximum supported depth of the
12451 selection name stack. The value must be at least 64. See
12452 `glPushName'.
12453
12454 `GL_MAX_PIXEL_MAP_TABLE'
12455
12456
12457 PARAMS returns one value, the maximum supported size of a
12458 `glPixelMap' lookup table. The value must be at least 32. See
12459 `glPixelMap'.
12460
12461 `GL_MAX_PROJECTION_STACK_DEPTH'
12462
12463
12464 PARAMS returns one value, the maximum supported depth of the
12465 projection matrix stack. The value must be at least 2. See
12466 `glPushMatrix'.
12467
12468 `GL_MAX_TEXTURE_COORDS'
12469
12470
12471 PARAMS returns one value, the maximum number of texture coordinate
12472 sets available to vertex and fragment shaders. The value must be at
12473 least 2. See `glActiveTexture' and `glClientActiveTexture'.
12474
12475 `GL_MAX_TEXTURE_IMAGE_UNITS'
12476
12477
12478 PARAMS returns one value, the maximum supported texture image units
12479 that can be used to access texture maps from the fragment shader.
12480 The value must be at least 2. See `glActiveTexture'.
12481
12482 `GL_MAX_TEXTURE_LOD_BIAS'
12483
12484
12485 PARAMS returns one value, the maximum, absolute value of the
12486 texture level-of-detail bias. The value must be at least 4.
12487
12488 `GL_MAX_TEXTURE_SIZE'
12489
12490
12491 PARAMS returns one value. The value gives a rough estimate of the
12492 largest texture that the GL can handle. The value must be at least
12493 64. If the GL version is 1.1 or greater, use `GL_PROXY_TEXTURE_1D'
12494 or `GL_PROXY_TEXTURE_2D' to determine if a texture is too large.
12495 See `glTexImage1D' and `glTexImage2D'.
12496
12497 `GL_MAX_TEXTURE_STACK_DEPTH'
12498
12499
12500 PARAMS returns one value, the maximum supported depth of the
12501 texture matrix stack. The value must be at least 2. See
12502 `glPushMatrix'.
12503
12504 `GL_MAX_TEXTURE_UNITS'
12505
12506
12507 PARAMS returns a single value indicating the number of conventional
12508 texture units supported. Each conventional texture unit includes
12509 both a texture coordinate set and a texture image unit.
12510 Conventional texture units may be used for fixed-function
12511 (non-shader) rendering. The value must be at least 2. Additional
12512 texture coordinate sets and texture image units may be accessed
12513 from vertex and fragment shaders. See `glActiveTexture' and
12514 `glClientActiveTexture'.
12515
12516 `GL_MAX_VARYING_FLOATS'
12517
12518
12519 PARAMS returns one value, the maximum number of interpolators
12520 available for processing varying variables used by vertex and
12521 fragment shaders. This value represents the number of individual
12522 floating-point values that can be interpolated; varying variables
12523 declared as vectors, matrices, and arrays will all consume multiple
12524 interpolators. The value must be at least 32.
12525
12526 `GL_MAX_VERTEX_ATTRIBS'
12527
12528
12529 PARAMS returns one value, the maximum number of 4-component generic
12530 vertex attributes accessible to a vertex shader. The value must be
12531 at least 16. See `glVertexAttrib'.
12532
12533 `GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS'
12534
12535
12536 PARAMS returns one value, the maximum supported texture image units
12537 that can be used to access texture maps from the vertex shader. The
12538 value may be 0. See `glActiveTexture'.
12539
12540 `GL_MAX_VERTEX_UNIFORM_COMPONENTS'
12541
12542
12543 PARAMS returns one value, the maximum number of individual
12544 floating-point, integer, or boolean values that can be held in
12545 uniform variable storage for a vertex shader. The value must be at
12546 least 512. See `glUniform'.
12547
12548 `GL_MAX_VIEWPORT_DIMS'
12549
12550
12551 PARAMS returns two values: the maximum supported width and height
12552 of the viewport. These must be at least as large as the visible
12553 dimensions of the display being rendered to. See `glViewport'.
12554
12555 `GL_MINMAX'
12556
12557
12558 PARAMS returns a single boolean value indicating whether pixel
12559 minmax values are computed. The initial value is `GL_FALSE'. See
12560 `glMinmax'.
12561
12562 `GL_MODELVIEW_MATRIX'
12563
12564
12565 PARAMS returns sixteen values: the modelview matrix on the top of
12566 the modelview matrix stack. Initially this matrix is the identity
12567 matrix. See `glPushMatrix'.
12568
12569 `GL_MODELVIEW_STACK_DEPTH'
12570
12571
12572 PARAMS returns one value, the number of matrices on the modelview
12573 matrix stack. The initial value is 1. See `glPushMatrix'.
12574
12575 `GL_NAME_STACK_DEPTH'
12576
12577
12578 PARAMS returns one value, the number of names on the selection name
12579 stack. The initial value is 0. See `glPushName'.
12580
12581 `GL_NORMAL_ARRAY'
12582
12583
12584 PARAMS returns a single boolean value, indicating whether the
12585 normal array is enabled. The initial value is `GL_FALSE'. See
12586 `glNormalPointer'.
12587
12588 `GL_NORMAL_ARRAY_BUFFER_BINDING'
12589
12590
12591 PARAMS returns a single value, the name of the buffer object
12592 associated with the normal array. This buffer object would have
12593 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
12594 recent call to `glNormalPointer'. If no buffer object was bound to
12595 this target, 0 is returned. The initial value is 0. See
12596 `glBindBuffer'.
12597
12598 `GL_NORMAL_ARRAY_STRIDE'
12599
12600
12601 PARAMS returns one value, the byte offset between consecutive
12602 normals in the normal array. The initial value is 0. See
12603 `glNormalPointer'.
12604
12605 `GL_NORMAL_ARRAY_TYPE'
12606
12607
12608 PARAMS returns one value, the data type of each coordinate in the
12609 normal array. The initial value is `GL_FLOAT'. See
12610 `glNormalPointer'.
12611
12612 `GL_NORMALIZE'
12613
12614
12615 PARAMS returns a single boolean value indicating whether normals
12616 are automatically scaled to unit length after they have been
12617 transformed to eye coordinates. The initial value is `GL_FALSE'.
12618 See `glNormal'.
12619
12620 `GL_NUM_COMPRESSED_TEXTURE_FORMATS'
12621
12622
12623 PARAMS returns a single integer value indicating the number of
12624 available compressed texture formats. The minimum value is 0. See
12625 `glCompressedTexImage2D'.
12626
12627 `GL_PACK_ALIGNMENT'
12628
12629
12630 PARAMS returns one value, the byte alignment used for writing pixel
12631 data to memory. The initial value is 4. See `glPixelStore'.
12632
12633 `GL_PACK_IMAGE_HEIGHT'
12634
12635
12636 PARAMS returns one value, the image height used for writing pixel
12637 data to memory. The initial value is 0. See `glPixelStore'.
12638
12639 `GL_PACK_LSB_FIRST'
12640
12641
12642 PARAMS returns a single boolean value indicating whether single-bit
12643 pixels being written to memory are written first to the least
12644 significant bit of each unsigned byte. The initial value is
12645 `GL_FALSE'. See `glPixelStore'.
12646
12647 `GL_PACK_ROW_LENGTH'
12648
12649
12650 PARAMS returns one value, the row length used for writing pixel
12651 data to memory. The initial value is 0. See `glPixelStore'.
12652
12653 `GL_PACK_SKIP_IMAGES'
12654
12655
12656 PARAMS returns one value, the number of pixel images skipped before
12657 the first pixel is written into memory. The initial value is 0. See
12658 `glPixelStore'.
12659
12660 `GL_PACK_SKIP_PIXELS'
12661
12662
12663 PARAMS returns one value, the number of pixel locations skipped
12664 before the first pixel is written into memory. The initial value is
12665 0. See `glPixelStore'.
12666
12667 `GL_PACK_SKIP_ROWS'
12668
12669
12670 PARAMS returns one value, the number of rows of pixel locations
12671 skipped before the first pixel is written into memory. The initial
12672 value is 0. See `glPixelStore'.
12673
12674 `GL_PACK_SWAP_BYTES'
12675
12676
12677 PARAMS returns a single boolean value indicating whether the bytes
12678 of two-byte and four-byte pixel indices and components are swapped
12679 before being written to memory. The initial value is `GL_FALSE'.
12680 See `glPixelStore'.
12681
12682 `GL_PERSPECTIVE_CORRECTION_HINT'
12683
12684
12685 PARAMS returns one value, a symbolic constant indicating the mode
12686 of the perspective correction hint. The initial value is
12687 `GL_DONT_CARE'. See `glHint'.
12688
12689 `GL_PIXEL_MAP_A_TO_A_SIZE'
12690
12691
12692 PARAMS returns one value, the size of the alpha-to-alpha pixel
12693 translation table. The initial value is 1. See `glPixelMap'.
12694
12695 `GL_PIXEL_MAP_B_TO_B_SIZE'
12696
12697
12698 PARAMS returns one value, the size of the blue-to-blue pixel
12699 translation table. The initial value is 1. See `glPixelMap'.
12700
12701 `GL_PIXEL_MAP_G_TO_G_SIZE'
12702
12703
12704 PARAMS returns one value, the size of the green-to-green pixel
12705 translation table. The initial value is 1. See `glPixelMap'.
12706
12707 `GL_PIXEL_MAP_I_TO_A_SIZE'
12708
12709
12710 PARAMS returns one value, the size of the index-to-alpha pixel
12711 translation table. The initial value is 1. See `glPixelMap'.
12712
12713 `GL_PIXEL_MAP_I_TO_B_SIZE'
12714
12715
12716 PARAMS returns one value, the size of the index-to-blue pixel
12717 translation table. The initial value is 1. See `glPixelMap'.
12718
12719 `GL_PIXEL_MAP_I_TO_G_SIZE'
12720
12721
12722 PARAMS returns one value, the size of the index-to-green pixel
12723 translation table. The initial value is 1. See `glPixelMap'.
12724
12725 `GL_PIXEL_MAP_I_TO_I_SIZE'
12726
12727
12728 PARAMS returns one value, the size of the index-to-index pixel
12729 translation table. The initial value is 1. See `glPixelMap'.
12730
12731 `GL_PIXEL_MAP_I_TO_R_SIZE'
12732
12733
12734 PARAMS returns one value, the size of the index-to-red pixel
12735 translation table. The initial value is 1. See `glPixelMap'.
12736
12737 `GL_PIXEL_MAP_R_TO_R_SIZE'
12738
12739
12740 PARAMS returns one value, the size of the red-to-red pixel
12741 translation table. The initial value is 1. See `glPixelMap'.
12742
12743 `GL_PIXEL_MAP_S_TO_S_SIZE'
12744
12745
12746 PARAMS returns one value, the size of the stencil-to-stencil pixel
12747 translation table. The initial value is 1. See `glPixelMap'.
12748
12749 `GL_PIXEL_PACK_BUFFER_BINDING'
12750
12751
12752 PARAMS returns a single value, the name of the buffer object
12753 currently bound to the target `GL_PIXEL_PACK_BUFFER'. If no buffer
12754 object is bound to this target, 0 is returned. The initial value is
12755 0. See `glBindBuffer'.
12756
12757 `GL_PIXEL_UNPACK_BUFFER_BINDING'
12758
12759
12760 PARAMS returns a single value, the name of the buffer object
12761 currently bound to the target `GL_PIXEL_UNPACK_BUFFER'. If no
12762 buffer object is bound to this target, 0 is returned. The initial
12763 value is 0. See `glBindBuffer'.
12764
12765 `GL_POINT_DISTANCE_ATTENUATION'
12766
12767
12768 PARAMS returns three values, the coefficients for computing the
12769 attenuation value for points. See `glPointParameter'.
12770
12771 `GL_POINT_FADE_THRESHOLD_SIZE'
12772
12773
12774 PARAMS returns one value, the point size threshold for determining
12775 the point size. See `glPointParameter'.
12776
12777 `GL_POINT_SIZE'
12778
12779
12780 PARAMS returns one value, the point size as specified by
12781 `glPointSize'. The initial value is 1.
12782
12783 `GL_POINT_SIZE_GRANULARITY'
12784
12785
12786 PARAMS returns one value, the size difference between adjacent
12787 supported sizes for antialiased points. See `glPointSize'.
12788
12789 `GL_POINT_SIZE_MAX'
12790
12791
12792 PARAMS returns one value, the upper bound for the attenuated point
12793 sizes. The initial value is 0.0. See `glPointParameter'.
12794
12795 `GL_POINT_SIZE_MIN'
12796
12797
12798 PARAMS returns one value, the lower bound for the attenuated point
12799 sizes. The initial value is 1.0. See `glPointParameter'.
12800
12801 `GL_POINT_SIZE_RANGE'
12802
12803
12804 PARAMS returns two values: the smallest and largest supported sizes
12805 for antialiased points. The smallest size must be at most 1, and
12806 the largest size must be at least 1. See `glPointSize'.
12807
12808 `GL_POINT_SMOOTH'
12809
12810
12811 PARAMS returns a single boolean value indicating whether
12812 antialiasing of points is enabled. The initial value is `GL_FALSE'.
12813 See `glPointSize'.
12814
12815 `GL_POINT_SMOOTH_HINT'
12816
12817
12818 PARAMS returns one value, a symbolic constant indicating the mode
12819 of the point antialiasing hint. The initial value is
12820 `GL_DONT_CARE'. See `glHint'.
12821
12822 `GL_POINT_SPRITE'
12823
12824
12825 PARAMS returns a single boolean value indicating whether point
12826 sprite is enabled. The initial value is `GL_FALSE'.
12827
12828 `GL_POLYGON_MODE'
12829
12830
12831 PARAMS returns two values: symbolic constants indicating whether
12832 front-facing and back-facing polygons are rasterized as points,
12833 lines, or filled polygons. The initial value is `GL_FILL'. See
12834 `glPolygonMode'.
12835
12836 `GL_POLYGON_OFFSET_FACTOR'
12837
12838
12839 PARAMS returns one value, the scaling factor used to determine the
12840 variable offset that is added to the depth value of each fragment
12841 generated when a polygon is rasterized. The initial value is 0. See
12842 `glPolygonOffset'.
12843
12844 `GL_POLYGON_OFFSET_UNITS'
12845
12846
12847 PARAMS returns one value. This value is multiplied by an
12848 implementation-specific value and then added to the depth value of
12849 each fragment generated when a polygon is rasterized. The initial
12850 value is 0. See `glPolygonOffset'.
12851
12852 `GL_POLYGON_OFFSET_FILL'
12853
12854
12855 PARAMS returns a single boolean value indicating whether polygon
12856 offset is enabled for polygons in fill mode. The initial value is
12857 `GL_FALSE'. See `glPolygonOffset'.
12858
12859 `GL_POLYGON_OFFSET_LINE'
12860
12861
12862 PARAMS returns a single boolean value indicating whether polygon
12863 offset is enabled for polygons in line mode. The initial value is
12864 `GL_FALSE'. See `glPolygonOffset'.
12865
12866 `GL_POLYGON_OFFSET_POINT'
12867
12868
12869 PARAMS returns a single boolean value indicating whether polygon
12870 offset is enabled for polygons in point mode. The initial value is
12871 `GL_FALSE'. See `glPolygonOffset'.
12872
12873 `GL_POLYGON_SMOOTH'
12874
12875
12876 PARAMS returns a single boolean value indicating whether
12877 antialiasing of polygons is enabled. The initial value is
12878 `GL_FALSE'. See `glPolygonMode'.
12879
12880 `GL_POLYGON_SMOOTH_HINT'
12881
12882
12883 PARAMS returns one value, a symbolic constant indicating the mode
12884 of the polygon antialiasing hint. The initial value is
12885 `GL_DONT_CARE'. See `glHint'.
12886
12887 `GL_POLYGON_STIPPLE'
12888
12889
12890 PARAMS returns a single boolean value indicating whether polygon
12891 stippling is enabled. The initial value is `GL_FALSE'. See
12892 `glPolygonStipple'.
12893
12894 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
12895
12896
12897 PARAMS returns a single boolean value indicating whether post color
12898 matrix transformation lookup is enabled. The initial value is
12899 `GL_FALSE'. See `glColorTable'.
12900
12901 `GL_POST_COLOR_MATRIX_RED_BIAS'
12902
12903
12904 PARAMS returns one value, the red bias factor applied to RGBA
12905 fragments after color matrix transformations. The initial value is
12906 0. See `glPixelTransfer'.
12907
12908 `GL_POST_COLOR_MATRIX_GREEN_BIAS'
12909
12910
12911 PARAMS returns one value, the green bias factor applied to RGBA
12912 fragments after color matrix transformations. The initial value is
12913 0. See `glPixelTransfer'
12914
12915 `GL_POST_COLOR_MATRIX_BLUE_BIAS'
12916
12917
12918 PARAMS returns one value, the blue bias factor applied to RGBA
12919 fragments after color matrix transformations. The initial value is
12920 0. See `glPixelTransfer'.
12921
12922 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'
12923
12924
12925 PARAMS returns one value, the alpha bias factor applied to RGBA
12926 fragments after color matrix transformations. The initial value is
12927 0. See `glPixelTransfer'.
12928
12929 `GL_POST_COLOR_MATRIX_RED_SCALE'
12930
12931
12932 PARAMS returns one value, the red scale factor applied to RGBA
12933 fragments after color matrix transformations. The initial value is
12934 1. See `glPixelTransfer'.
12935
12936 `GL_POST_COLOR_MATRIX_GREEN_SCALE'
12937
12938
12939 PARAMS returns one value, the green scale factor applied to RGBA
12940 fragments after color matrix transformations. The initial value is
12941 1. See `glPixelTransfer'.
12942
12943 `GL_POST_COLOR_MATRIX_BLUE_SCALE'
12944
12945
12946 PARAMS returns one value, the blue scale factor applied to RGBA
12947 fragments after color matrix transformations. The initial value is
12948 1. See `glPixelTransfer'.
12949
12950 `GL_POST_COLOR_MATRIX_ALPHA_SCALE'
12951
12952
12953 PARAMS returns one value, the alpha scale factor applied to RGBA
12954 fragments after color matrix transformations. The initial value is
12955 1. See `glPixelTransfer'.
12956
12957 `GL_POST_CONVOLUTION_COLOR_TABLE'
12958
12959
12960 PARAMS returns a single boolean value indicating whether post
12961 convolution lookup is enabled. The initial value is `GL_FALSE'. See
12962 `glColorTable'.
12963
12964 `GL_POST_CONVOLUTION_RED_BIAS'
12965
12966
12967 PARAMS returns one value, the red bias factor applied to RGBA
12968 fragments after convolution. The initial value is 0. See
12969 `glPixelTransfer'.
12970
12971 `GL_POST_CONVOLUTION_GREEN_BIAS'
12972
12973
12974 PARAMS returns one value, the green bias factor applied to RGBA
12975 fragments after convolution. The initial value is 0. See
12976 `glPixelTransfer'.
12977
12978 `GL_POST_CONVOLUTION_BLUE_BIAS'
12979
12980
12981 PARAMS returns one value, the blue bias factor applied to RGBA
12982 fragments after convolution. The initial value is 0. See
12983 `glPixelTransfer'.
12984
12985 `GL_POST_CONVOLUTION_ALPHA_BIAS'
12986
12987
12988 PARAMS returns one value, the alpha bias factor applied to RGBA
12989 fragments after convolution. The initial value is 0. See
12990 `glPixelTransfer'.
12991
12992 `GL_POST_CONVOLUTION_RED_SCALE'
12993
12994
12995 PARAMS returns one value, the red scale factor applied to RGBA
12996 fragments after convolution. The initial value is 1. See
12997 `glPixelTransfer'.
12998
12999 `GL_POST_CONVOLUTION_GREEN_SCALE'
13000
13001
13002 PARAMS returns one value, the green scale factor applied to RGBA
13003 fragments after convolution. The initial value is 1. See
13004 `glPixelTransfer'.
13005
13006 `GL_POST_CONVOLUTION_BLUE_SCALE'
13007
13008
13009 PARAMS returns one value, the blue scale factor applied to RGBA
13010 fragments after convolution. The initial value is 1. See
13011 `glPixelTransfer'.
13012
13013 `GL_POST_CONVOLUTION_ALPHA_SCALE'
13014
13015
13016 PARAMS returns one value, the alpha scale factor applied to RGBA
13017 fragments after convolution. The initial value is 1. See
13018 `glPixelTransfer'.
13019
13020 `GL_PROJECTION_MATRIX'
13021
13022
13023 PARAMS returns sixteen values: the projection matrix on the top of
13024 the projection matrix stack. Initially this matrix is the identity
13025 matrix. See `glPushMatrix'.
13026
13027 `GL_PROJECTION_STACK_DEPTH'
13028
13029
13030 PARAMS returns one value, the number of matrices on the projection
13031 matrix stack. The initial value is 1. See `glPushMatrix'.
13032
13033 `GL_READ_BUFFER'
13034
13035
13036 PARAMS returns one value, a symbolic constant indicating which
13037 color buffer is selected for reading. The initial value is
13038 `GL_BACK' if there is a back buffer, otherwise it is `GL_FRONT'.
13039 See `glReadPixels' and `glAccum'.
13040
13041 `GL_RED_BIAS'
13042
13043
13044 PARAMS returns one value, the red bias factor used during pixel
13045 transfers. The initial value is 0.
13046
13047 `GL_RED_BITS'
13048
13049
13050 PARAMS returns one value, the number of red bitplanes in each color
13051 buffer.
13052
13053 `GL_RED_SCALE'
13054
13055
13056 PARAMS returns one value, the red scale factor used during pixel
13057 transfers. The initial value is 1. See `glPixelTransfer'.
13058
13059 `GL_RENDER_MODE'
13060
13061
13062 PARAMS returns one value, a symbolic constant indicating whether
13063 the GL is in render, select, or feedback mode. The initial value is
13064 `GL_RENDER'. See `glRenderMode'.
13065
13066 `GL_RESCALE_NORMAL'
13067
13068
13069 PARAMS returns single boolean value indicating whether normal
13070 rescaling is enabled. See `glEnable'.
13071
13072 `GL_RGBA_MODE'
13073
13074
13075 PARAMS returns a single boolean value indicating whether the GL is
13076 in RGBA mode (true) or color index mode (false). See `glColor'.
13077
13078 `GL_SAMPLE_BUFFERS'
13079
13080
13081 PARAMS returns a single integer value indicating the number of
13082 sample buffers associated with the framebuffer. See
13083 `glSampleCoverage'.
13084
13085 `GL_SAMPLE_COVERAGE_VALUE'
13086
13087
13088 PARAMS returns a single positive floating-point value indicating
13089 the current sample coverage value. See `glSampleCoverage'.
13090
13091 `GL_SAMPLE_COVERAGE_INVERT'
13092
13093
13094 PARAMS returns a single boolean value indicating if the temporary
13095 coverage value should be inverted. See `glSampleCoverage'.
13096
13097 `GL_SAMPLES'
13098
13099
13100 PARAMS returns a single integer value indicating the coverage mask
13101 size. See `glSampleCoverage'.
13102
13103 `GL_SCISSOR_BOX'
13104
13105
13106 PARAMS returns four values: the X and Y window coordinates of the
13107 scissor box, followed by its width and height. Initially the X and
13108 Y window coordinates are both 0 and the width and height are set to
13109 the size of the window. See `glScissor'.
13110
13111 `GL_SCISSOR_TEST'
13112
13113
13114 PARAMS returns a single boolean value indicating whether scissoring
13115 is enabled. The initial value is `GL_FALSE'. See `glScissor'.
13116
13117 `GL_SECONDARY_COLOR_ARRAY'
13118
13119
13120 PARAMS returns a single boolean value indicating whether the
13121 secondary color array is enabled. The initial value is `GL_FALSE'.
13122 See `glSecondaryColorPointer'.
13123
13124 `GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING'
13125
13126
13127 PARAMS returns a single value, the name of the buffer object
13128 associated with the secondary color array. This buffer object would
13129 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
13130 most recent call to `glSecondaryColorPointer'. If no buffer object
13131 was bound to this target, 0 is returned. The initial value is 0.
13132 See `glBindBuffer'.
13133
13134 `GL_SECONDARY_COLOR_ARRAY_SIZE'
13135
13136
13137 PARAMS returns one value, the number of components per color in the
13138 secondary color array. The initial value is 3. See
13139 `glSecondaryColorPointer'.
13140
13141 `GL_SECONDARY_COLOR_ARRAY_STRIDE'
13142
13143
13144 PARAMS returns one value, the byte offset between consecutive
13145 colors in the secondary color array. The initial value is 0. See
13146 `glSecondaryColorPointer'.
13147
13148 `GL_SECONDARY_COLOR_ARRAY_TYPE'
13149
13150
13151 PARAMS returns one value, the data type of each component in the
13152 secondary color array. The initial value is `GL_FLOAT'. See
13153 `glSecondaryColorPointer'.
13154
13155 `GL_SELECTION_BUFFER_SIZE'
13156
13157
13158 PARAMS return one value, the size of the selection buffer. See
13159 `glSelectBuffer'.
13160
13161 `GL_SEPARABLE_2D'
13162
13163
13164 PARAMS returns a single boolean value indicating whether 2D
13165 separable convolution is enabled. The initial value is `GL_FALSE'.
13166 See `glSeparableFilter2D'.
13167
13168 `GL_SHADE_MODEL'
13169
13170
13171 PARAMS returns one value, a symbolic constant indicating whether
13172 the shading mode is flat or smooth. The initial value is
13173 `GL_SMOOTH'. See `glShadeModel'.
13174
13175 `GL_SMOOTH_LINE_WIDTH_RANGE'
13176
13177
13178 PARAMS returns two values, the smallest and largest supported
13179 widths for antialiased lines. See `glLineWidth'.
13180
13181 `GL_SMOOTH_LINE_WIDTH_GRANULARITY'
13182
13183
13184 PARAMS returns one value, the granularity of widths for antialiased
13185 lines. See `glLineWidth'.
13186
13187 `GL_SMOOTH_POINT_SIZE_RANGE'
13188
13189
13190 PARAMS returns two values, the smallest and largest supported
13191 widths for antialiased points. See `glPointSize'.
13192
13193 `GL_SMOOTH_POINT_SIZE_GRANULARITY'
13194
13195
13196 PARAMS returns one value, the granularity of sizes for antialiased
13197 points. See `glPointSize'.
13198
13199 `GL_STENCIL_BACK_FAIL'
13200
13201
13202 PARAMS returns one value, a symbolic constant indicating what
13203 action is taken for back-facing polygons when the stencil test
13204 fails. The initial value is `GL_KEEP'. See `glStencilOpSeparate'.
13205
13206 `GL_STENCIL_BACK_FUNC'
13207
13208
13209 PARAMS returns one value, a symbolic constant indicating what
13210 function is used for back-facing polygons to compare the stencil
13211 reference value with the stencil buffer value. The initial value is
13212 `GL_ALWAYS'. See `glStencilFuncSeparate'.
13213
13214 `GL_STENCIL_BACK_PASS_DEPTH_FAIL'
13215
13216
13217 PARAMS returns one value, a symbolic constant indicating what
13218 action is taken for back-facing polygons when the stencil test
13219 passes, but the depth test fails. The initial value is `GL_KEEP'.
13220 See `glStencilOpSeparate'.
13221
13222 `GL_STENCIL_BACK_PASS_DEPTH_PASS'
13223
13224
13225 PARAMS returns one value, a symbolic constant indicating what
13226 action is taken for back-facing polygons when the stencil test
13227 passes and the depth test passes. The initial value is `GL_KEEP'.
13228 See `glStencilOpSeparate'.
13229
13230 `GL_STENCIL_BACK_REF'
13231
13232
13233 PARAMS returns one value, the reference value that is compared with
13234 the contents of the stencil buffer for back-facing polygons. The
13235 initial value is 0. See `glStencilFuncSeparate'.
13236
13237 `GL_STENCIL_BACK_VALUE_MASK'
13238
13239
13240 PARAMS returns one value, the mask that is used for back-facing
13241 polygons to mask both the stencil reference value and the stencil
13242 buffer value before they are compared. The initial value is all
13243 1's. See `glStencilFuncSeparate'.
13244
13245 `GL_STENCIL_BACK_WRITEMASK'
13246
13247
13248 PARAMS returns one value, the mask that controls writing of the
13249 stencil bitplanes for back-facing polygons. The initial value is
13250 all 1's. See `glStencilMaskSeparate'.
13251
13252 `GL_STENCIL_BITS'
13253
13254
13255 PARAMS returns one value, the number of bitplanes in the stencil
13256 buffer.
13257
13258 `GL_STENCIL_CLEAR_VALUE'
13259
13260
13261 PARAMS returns one value, the index to which the stencil bitplanes
13262 are cleared. The initial value is 0. See `glClearStencil'.
13263
13264 `GL_STENCIL_FAIL'
13265
13266
13267 PARAMS returns one value, a symbolic constant indicating what
13268 action is taken when the stencil test fails. The initial value is
13269 `GL_KEEP'. See `glStencilOp'. If the GL version is 2.0 or greater,
13270 this stencil state only affects non-polygons and front-facing
13271 polygons. Back-facing polygons use separate stencil state. See
13272 `glStencilOpSeparate'.
13273
13274 `GL_STENCIL_FUNC'
13275
13276
13277 PARAMS returns one value, a symbolic constant indicating what
13278 function is used to compare the stencil reference value with the
13279 stencil buffer value. The initial value is `GL_ALWAYS'. See
13280 `glStencilFunc'. If the GL version is 2.0 or greater, this stencil
13281 state only affects non-polygons and front-facing polygons.
13282 Back-facing polygons use separate stencil state. See
13283 `glStencilFuncSeparate'.
13284
13285 `GL_STENCIL_PASS_DEPTH_FAIL'
13286
13287
13288 PARAMS returns one value, a symbolic constant indicating what
13289 action is taken when the stencil test passes, but the depth test
13290 fails. The initial value is `GL_KEEP'. See `glStencilOp'. If the GL
13291 version is 2.0 or greater, this stencil state only affects
13292 non-polygons and front-facing polygons. Back-facing polygons use
13293 separate stencil state. See `glStencilOpSeparate'.
13294
13295 `GL_STENCIL_PASS_DEPTH_PASS'
13296
13297
13298 PARAMS returns one value, a symbolic constant indicating what
13299 action is taken when the stencil test passes and the depth test
13300 passes. The initial value is `GL_KEEP'. See `glStencilOp'. If the
13301 GL version is 2.0 or greater, this stencil state only affects
13302 non-polygons and front-facing polygons. Back-facing polygons use
13303 separate stencil state. See `glStencilOpSeparate'.
13304
13305 `GL_STENCIL_REF'
13306
13307
13308 PARAMS returns one value, the reference value that is compared with
13309 the contents of the stencil buffer. The initial value is 0. See
13310 `glStencilFunc'. If the GL version is 2.0 or greater, this stencil
13311 state only affects non-polygons and front-facing polygons.
13312 Back-facing polygons use separate stencil state. See
13313 `glStencilFuncSeparate'.
13314
13315 `GL_STENCIL_TEST'
13316
13317
13318 PARAMS returns a single boolean value indicating whether stencil
13319 testing of fragments is enabled. The initial value is `GL_FALSE'.
13320 See `glStencilFunc' and `glStencilOp'.
13321
13322 `GL_STENCIL_VALUE_MASK'
13323
13324
13325 PARAMS returns one value, the mask that is used to mask both the
13326 stencil reference value and the stencil buffer value before they
13327 are compared. The initial value is all 1's. See `glStencilFunc'. If
13328 the GL version is 2.0 or greater, this stencil state only affects
13329 non-polygons and front-facing polygons. Back-facing polygons use
13330 separate stencil state. See `glStencilFuncSeparate'.
13331
13332 `GL_STENCIL_WRITEMASK'
13333
13334
13335 PARAMS returns one value, the mask that controls writing of the
13336 stencil bitplanes. The initial value is all 1's. See
13337 `glStencilMask'. If the GL version is 2.0 or greater, this stencil
13338 state only affects non-polygons and front-facing polygons.
13339 Back-facing polygons use separate stencil state. See
13340 `glStencilMaskSeparate'.
13341
13342 `GL_STEREO'
13343
13344
13345 PARAMS returns a single boolean value indicating whether stereo
13346 buffers (left and right) are supported.
13347
13348 `GL_SUBPIXEL_BITS'
13349
13350
13351 PARAMS returns one value, an estimate of the number of bits of
13352 subpixel resolution that are used to position rasterized geometry
13353 in window coordinates. The value must be at least 4.
13354
13355 `GL_TEXTURE_1D'
13356
13357
13358 PARAMS returns a single boolean value indicating whether 1D texture
13359 mapping is enabled. The initial value is `GL_FALSE'. See
13360 `glTexImage1D'.
13361
13362 `GL_TEXTURE_BINDING_1D'
13363
13364
13365 PARAMS returns a single value, the name of the texture currently
13366 bound to the target `GL_TEXTURE_1D'. The initial value is 0. See
13367 `glBindTexture'.
13368
13369 `GL_TEXTURE_2D'
13370
13371
13372 PARAMS returns a single boolean value indicating whether 2D texture
13373 mapping is enabled. The initial value is `GL_FALSE'. See
13374 `glTexImage2D'.
13375
13376 `GL_TEXTURE_BINDING_2D'
13377
13378
13379 PARAMS returns a single value, the name of the texture currently
13380 bound to the target `GL_TEXTURE_2D'. The initial value is 0. See
13381 `glBindTexture'.
13382
13383 `GL_TEXTURE_3D'
13384
13385
13386 PARAMS returns a single boolean value indicating whether 3D texture
13387 mapping is enabled. The initial value is `GL_FALSE'. See
13388 `glTexImage3D'.
13389
13390 `GL_TEXTURE_BINDING_3D'
13391
13392
13393 PARAMS returns a single value, the name of the texture currently
13394 bound to the target `GL_TEXTURE_3D'. The initial value is 0. See
13395 `glBindTexture'.
13396
13397 `GL_TEXTURE_BINDING_CUBE_MAP'
13398
13399
13400 PARAMS returns a single value, the name of the texture currently
13401 bound to the target `GL_TEXTURE_CUBE_MAP'. The initial value is 0.
13402 See `glBindTexture'.
13403
13404 `GL_TEXTURE_COMPRESSION_HINT'
13405
13406
13407 PARAMS returns a single value indicating the mode of the texture
13408 compression hint. The initial value is `GL_DONT_CARE'.
13409
13410 `GL_TEXTURE_COORD_ARRAY'
13411
13412
13413 PARAMS returns a single boolean value indicating whether the
13414 texture coordinate array is enabled. The initial value is
13415 `GL_FALSE'. See `glTexCoordPointer'.
13416
13417 `GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING'
13418
13419
13420 PARAMS returns a single value, the name of the buffer object
13421 associated with the texture coordinate array. This buffer object
13422 would have been bound to the target `GL_ARRAY_BUFFER' at the time
13423 of the most recent call to `glTexCoordPointer'. If no buffer object
13424 was bound to this target, 0 is returned. The initial value is 0.
13425 See `glBindBuffer'.
13426
13427 `GL_TEXTURE_COORD_ARRAY_SIZE'
13428
13429
13430 PARAMS returns one value, the number of coordinates per element in
13431 the texture coordinate array. The initial value is 4. See
13432 `glTexCoordPointer'.
13433
13434 `GL_TEXTURE_COORD_ARRAY_STRIDE'
13435
13436
13437 PARAMS returns one value, the byte offset between consecutive
13438 elements in the texture coordinate array. The initial value is 0.
13439 See `glTexCoordPointer'.
13440
13441 `GL_TEXTURE_COORD_ARRAY_TYPE'
13442
13443
13444 PARAMS returns one value, the data type of the coordinates in the
13445 texture coordinate array. The initial value is `GL_FLOAT'. See
13446 `glTexCoordPointer'.
13447
13448 `GL_TEXTURE_CUBE_MAP'
13449
13450
13451 PARAMS returns a single boolean value indicating whether
13452 cube-mapped texture mapping is enabled. The initial value is
13453 `GL_FALSE'. See `glTexImage2D'.
13454
13455 `GL_TEXTURE_GEN_Q'
13456
13457
13458 PARAMS returns a single boolean value indicating whether automatic
13459 generation of the Q texture coordinate is enabled. The initial
13460 value is `GL_FALSE'. See `glTexGen'.
13461
13462 `GL_TEXTURE_GEN_R'
13463
13464
13465 PARAMS returns a single boolean value indicating whether automatic
13466 generation of the R texture coordinate is enabled. The initial
13467 value is `GL_FALSE'. See `glTexGen'.
13468
13469 `GL_TEXTURE_GEN_S'
13470
13471
13472 PARAMS returns a single boolean value indicating whether automatic
13473 generation of the S texture coordinate is enabled. The initial
13474 value is `GL_FALSE'. See `glTexGen'.
13475
13476 `GL_TEXTURE_GEN_T'
13477
13478
13479 PARAMS returns a single boolean value indicating whether automatic
13480 generation of the T texture coordinate is enabled. The initial
13481 value is `GL_FALSE'. See `glTexGen'.
13482
13483 `GL_TEXTURE_MATRIX'
13484
13485
13486 PARAMS returns sixteen values: the texture matrix on the top of the
13487 texture matrix stack. Initially this matrix is the identity matrix.
13488 See `glPushMatrix'.
13489
13490 `GL_TEXTURE_STACK_DEPTH'
13491
13492
13493 PARAMS returns one value, the number of matrices on the texture
13494 matrix stack. The initial value is 1. See `glPushMatrix'.
13495
13496 `GL_TRANSPOSE_COLOR_MATRIX'
13497
13498
13499 PARAMS returns 16 values, the elements of the color matrix in
13500 row-major order. See `glLoadTransposeMatrix'.
13501
13502 `GL_TRANSPOSE_MODELVIEW_MATRIX'
13503
13504
13505 PARAMS returns 16 values, the elements of the modelview matrix in
13506 row-major order. See `glLoadTransposeMatrix'.
13507
13508 `GL_TRANSPOSE_PROJECTION_MATRIX'
13509
13510
13511 PARAMS returns 16 values, the elements of the projection matrix in
13512 row-major order. See `glLoadTransposeMatrix'.
13513
13514 `GL_TRANSPOSE_TEXTURE_MATRIX'
13515
13516
13517 PARAMS returns 16 values, the elements of the texture matrix in
13518 row-major order. See `glLoadTransposeMatrix'.
13519
13520 `GL_UNPACK_ALIGNMENT'
13521
13522
13523 PARAMS returns one value, the byte alignment used for reading pixel
13524 data from memory. The initial value is 4. See `glPixelStore'.
13525
13526 `GL_UNPACK_IMAGE_HEIGHT'
13527
13528
13529 PARAMS returns one value, the image height used for reading pixel
13530 data from memory. The initial is 0. See `glPixelStore'.
13531
13532 `GL_UNPACK_LSB_FIRST'
13533
13534
13535 PARAMS returns a single boolean value indicating whether single-bit
13536 pixels being read from memory are read first from the least
13537 significant bit of each unsigned byte. The initial value is
13538 `GL_FALSE'. See `glPixelStore'.
13539
13540 `GL_UNPACK_ROW_LENGTH'
13541
13542
13543 PARAMS returns one value, the row length used for reading pixel
13544 data from memory. The initial value is 0. See `glPixelStore'.
13545
13546 `GL_UNPACK_SKIP_IMAGES'
13547
13548
13549 PARAMS returns one value, the number of pixel images skipped before
13550 the first pixel is read from memory. The initial value is 0. See
13551 `glPixelStore'.
13552
13553 `GL_UNPACK_SKIP_PIXELS'
13554
13555
13556 PARAMS returns one value, the number of pixel locations skipped
13557 before the first pixel is read from memory. The initial value is 0.
13558 See `glPixelStore'.
13559
13560 `GL_UNPACK_SKIP_ROWS'
13561
13562
13563 PARAMS returns one value, the number of rows of pixel locations
13564 skipped before the first pixel is read from memory. The initial
13565 value is 0. See `glPixelStore'.
13566
13567 `GL_UNPACK_SWAP_BYTES'
13568
13569
13570 PARAMS returns a single boolean value indicating whether the bytes
13571 of two-byte and four-byte pixel indices and components are swapped
13572 after being read from memory. The initial value is `GL_FALSE'. See
13573 `glPixelStore'.
13574
13575 `GL_VERTEX_ARRAY'
13576
13577
13578 PARAMS returns a single boolean value indicating whether the vertex
13579 array is enabled. The initial value is `GL_FALSE'. See
13580 `glVertexPointer'.
13581
13582 `GL_VERTEX_ARRAY_BUFFER_BINDING'
13583
13584
13585 PARAMS returns a single value, the name of the buffer object
13586 associated with the vertex array. This buffer object would have
13587 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
13588 recent call to `glVertexPointer'. If no buffer object was bound to
13589 this target, 0 is returned. The initial value is 0. See
13590 `glBindBuffer'.
13591
13592 `GL_VERTEX_ARRAY_SIZE'
13593
13594
13595 PARAMS returns one value, the number of coordinates per vertex in
13596 the vertex array. The initial value is 4. See `glVertexPointer'.
13597
13598 `GL_VERTEX_ARRAY_STRIDE'
13599
13600
13601 PARAMS returns one value, the byte offset between consecutive
13602 vertices in the vertex array. The initial value is 0. See
13603 `glVertexPointer'.
13604
13605 `GL_VERTEX_ARRAY_TYPE'
13606
13607
13608 PARAMS returns one value, the data type of each coordinate in the
13609 vertex array. The initial value is `GL_FLOAT'. See
13610 `glVertexPointer'.
13611
13612 `GL_VERTEX_PROGRAM_POINT_SIZE'
13613
13614
13615 PARAMS returns a single boolean value indicating whether vertex
13616 program point size mode is enabled. If enabled, and a vertex shader
13617 is active, then the point size is taken from the shader built-in
13618 `gl_PointSize'. If disabled, and a vertex shader is active, then
13619 the point size is taken from the point state as specified by
13620 `glPointSize'. The initial value is `GL_FALSE'.
13621
13622 `GL_VERTEX_PROGRAM_TWO_SIDE'
13623
13624
13625 PARAMS returns a single boolean value indicating whether vertex
13626 program two-sided color mode is enabled. If enabled, and a vertex
13627 shader is active, then the GL chooses the back color output for
13628 back-facing polygons, and the front color output for non-polygons
13629 and front-facing polygons. If disabled, and a vertex shader is
13630 active, then the front color output is always selected. The initial
13631 value is `GL_FALSE'.
13632
13633 `GL_VIEWPORT'
13634
13635
13636 PARAMS returns four values: the X and Y window coordinates of the
13637 viewport, followed by its width and height. Initially the X and Y
13638 window coordinates are both set to 0, and the width and height are
13639 set to the width and height of the window into which the GL will do
13640 its rendering. See `glViewport'.
13641
13642 `GL_ZOOM_X'
13643
13644
13645 PARAMS returns one value, the X pixel zoom factor. The initial
13646 value is 1. See `glPixelZoom'.
13647
13648 `GL_ZOOM_Y'
13649
13650
13651 PARAMS returns one value, the Y pixel zoom factor. The initial
13652 value is 1. See `glPixelZoom'.
13653
13654 Many of the boolean parameters can also be queried more easily using
13655 `glIsEnabled'.
13656
13657 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
13658
13659 `GL_INVALID_OPERATION' is generated if `glGet' is executed between the
13660 execution of `glBegin' and the corresponding execution of `glEnd'.")
13661
13662 (define-gl-procedures
13663 ((glHint (target GLenum) (mode GLenum) -> void))
13664 "Specify implementation-specific hints.
13665
13666 TARGET
13667 Specifies a symbolic constant indicating the behavior to be
13668 controlled. `GL_FOG_HINT', `GL_GENERATE_MIPMAP_HINT',
13669 `GL_LINE_SMOOTH_HINT', `GL_PERSPECTIVE_CORRECTION_HINT',
13670 `GL_POINT_SMOOTH_HINT', `GL_POLYGON_SMOOTH_HINT',
13671 `GL_TEXTURE_COMPRESSION_HINT', and
13672 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT' are accepted.
13673
13674 MODE
13675 Specifies a symbolic constant indicating the desired behavior.
13676 `GL_FASTEST', `GL_NICEST', and `GL_DONT_CARE' are accepted.
13677
13678 Certain aspects of GL behavior, when there is room for interpretation,
13679 can be controlled with hints. A hint is specified with two arguments.
13680 TARGET is a symbolic constant indicating the behavior to be controlled,
13681 and MODE is another symbolic constant indicating the desired behavior.
13682 The initial value for each TARGET is `GL_DONT_CARE'. MODE can be one of
13683 the following:
13684
13685 `GL_FASTEST'
13686
13687
13688 The most efficient option should be chosen.
13689
13690 `GL_NICEST'
13691
13692
13693 The most correct, or highest quality, option should be chosen.
13694
13695 `GL_DONT_CARE'
13696
13697
13698 No preference.
13699
13700 Though the implementation aspects that can be hinted are well defined,
13701 the interpretation of the hints depends on the implementation. The hint
13702 aspects that can be specified with TARGET, along with suggested
13703 semantics, are as follows:
13704
13705 `GL_FOG_HINT'
13706
13707
13708 Indicates the accuracy of fog calculation. If per-pixel fog
13709 calculation is not efficiently supported by the GL implementation,
13710 hinting `GL_DONT_CARE' or `GL_FASTEST' can result in per-vertex
13711 calculation of fog effects.
13712
13713 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT'
13714
13715
13716 Indicates the accuracy of the derivative calculation for the GL
13717 shading language fragment processing built-in functions: `dFdx',
13718 `dFdy', and `fwidth'.
13719
13720 `GL_GENERATE_MIPMAP_HINT'
13721
13722
13723 Indicates the quality of filtering when generating mipmap images.
13724
13725 `GL_LINE_SMOOTH_HINT'
13726
13727
13728 Indicates the sampling quality of antialiased lines. If a larger
13729 filter function is applied, hinting `GL_NICEST' can result in more
13730 pixel fragments being generated during rasterization.
13731
13732 `GL_PERSPECTIVE_CORRECTION_HINT'
13733
13734
13735 Indicates the quality of color, texture coordinate, and fog
13736 coordinate interpolation. If perspective-corrected parameter
13737 interpolation is not efficiently supported by the GL
13738 implementation, hinting `GL_DONT_CARE' or `GL_FASTEST' can result
13739 in simple linear interpolation of colors and/or texture
13740 coordinates.
13741
13742 `GL_POINT_SMOOTH_HINT'
13743
13744
13745 Indicates the sampling quality of antialiased points. If a larger
13746 filter function is applied, hinting `GL_NICEST' can result in more
13747 pixel fragments being generated during rasterization.
13748
13749 `GL_POLYGON_SMOOTH_HINT'
13750
13751
13752 Indicates the sampling quality of antialiased polygons. Hinting
13753 `GL_NICEST' can result in more pixel fragments being generated
13754 during rasterization, if a larger filter function is applied.
13755
13756 `GL_TEXTURE_COMPRESSION_HINT'
13757
13758
13759 Indicates the quality and performance of the compressing texture
13760 images. Hinting `GL_FASTEST' indicates that texture images should
13761 be compressed as quickly as possible, while `GL_NICEST' indicates
13762 that texture images should be compressed with as little image
13763 quality loss as possible. `GL_NICEST' should be selected if the
13764 texture is to be retrieved by `glGetCompressedTexImage' for reuse.
13765
13766 `GL_INVALID_ENUM' is generated if either TARGET or MODE is not an
13767 accepted value.
13768
13769 `GL_INVALID_OPERATION' is generated if `glHint' is executed between the
13770 execution of `glBegin' and the corresponding execution of `glEnd'.")
13771
13772 (define-gl-procedures
13773 ((glHistogram
13774 (target GLenum)
13775 (width GLsizei)
13776 (internalformat GLenum)
13777 (sink GLboolean)
13778 ->
13779 void))
13780 "Define histogram table.
13781
13782 TARGET
13783 The histogram whose parameters are to be set. Must be one of
13784 `GL_HISTOGRAM' or `GL_PROXY_HISTOGRAM'.
13785
13786 WIDTH
13787 The number of entries in the histogram table. Must be a power of 2.
13788
13789 INTERNALFORMAT
13790 The format of entries in the histogram table. Must be one of
13791 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
13792 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
13793 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
13794 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
13795 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
13796 `GL_LUMINANCE16_ALPHA16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4',
13797 `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16',
13798 `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8',
13799 `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
13800
13801 SINK
13802 If `GL_TRUE', pixels will be consumed by the histogramming process
13803 and no drawing or texture loading will take place. If `GL_FALSE',
13804 pixels will proceed to the minmax process after histogramming.
13805
13806 When `GL_HISTOGRAM' is enabled, RGBA color components are converted to
13807 histogram table indices by clamping to the range [0,1], multiplying by
13808 the width of the histogram table, and rounding to the nearest integer.
13809 The table entries selected by the RGBA indices are then incremented. (If
13810 the internal format of the histogram table includes luminance, then the
13811 index derived from the R color component determines the luminance table
13812 entry to be incremented.) If a histogram table entry is incremented
13813 beyond its maximum value, then its value becomes undefined. (This is not
13814 an error.)
13815
13816 Histogramming is performed only for RGBA pixels (though these may be
13817 specified originally as color indices and converted to RGBA by index
13818 table lookup). Histogramming is enabled with `glEnable' and disabled
13819 with `glDisable'.
13820
13821 When TARGET is `GL_HISTOGRAM', `glHistogram' redefines the current
13822 histogram table to have WIDTH entries of the format specified by
13823 INTERNALFORMAT. The entries are indexed 0 through WIDTH-1 , and all
13824 entries are initialized to zero. The values in the previous histogram
13825 table, if any, are lost. If SINK is `GL_TRUE', then pixels are discarded
13826 after histogramming; no further processing of the pixels takes place,
13827 and no drawing, texture loading, or pixel readback will result.
13828
13829 When TARGET is `GL_PROXY_HISTOGRAM', `glHistogram' computes all state
13830 information as if the histogram table were to be redefined, but does not
13831 actually define the new table. If the requested histogram table is too
13832 large to be supported, then the state information will be set to zero.
13833 This provides a way to determine if a histogram table with the given
13834 parameters can be supported.
13835
13836
13837
13838 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
13839 values.
13840
13841 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or is not a
13842 power of 2.
13843
13844 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
13845 allowable values.
13846
13847 `GL_TABLE_TOO_LARGE' is generated if TARGET is `GL_HISTOGRAM' and the
13848 histogram table specified is too large for the implementation.
13849
13850 `GL_INVALID_OPERATION' is generated if `glHistogram' is executed between
13851 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13852
13853 (define-gl-procedures
13854 ((glIndexMask (mask GLuint) -> void))
13855 "Control the writing of individual bits in the color index buffers.
13856
13857 MASK
13858 Specifies a bit mask to enable and disable the writing of
13859 individual bits in the color index buffers. Initially, the mask is
13860 all 1's.
13861
13862 `glIndexMask' controls the writing of individual bits in the color index
13863 buffers. The least significant N bits of MASK, where N is the number of
13864 bits in a color index buffer, specify a mask. Where a 1 (one) appears in
13865 the mask, it's possible to write to the corresponding bit in the color
13866 index buffer (or buffers). Where a 0 (zero) appears, the corresponding
13867 bit is write-protected.
13868
13869 This mask is used only in color index mode, and it affects only the
13870 buffers currently selected for writing (see `glDrawBuffer'). Initially,
13871 all bits are enabled for writing.
13872
13873 `GL_INVALID_OPERATION' is generated if `glIndexMask' is executed between
13874 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13875
13876 (define-gl-procedures
13877 ((glIndexPointer
13878 (type GLenum)
13879 (stride GLsizei)
13880 (pointer const-GLvoid-*)
13881 ->
13882 void))
13883 "Define an array of color indexes.
13884
13885 TYPE
13886 Specifies the data type of each color index in the array. Symbolic
13887 constants `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_INT', `GL_FLOAT', and
13888 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
13889
13890 STRIDE
13891 Specifies the byte offset between consecutive color indexes. If
13892 STRIDE is 0, the color indexes are understood to be tightly packed
13893 in the array. The initial value is 0.
13894
13895 POINTER
13896 Specifies a pointer to the first index in the array. The initial
13897 value is 0.
13898
13899 `glIndexPointer' specifies the location and data format of an array of
13900 color indexes to use when rendering. TYPE specifies the data type of
13901 each color index and STRIDE specifies the byte stride from one color
13902 index to the next, allowing vertices and attributes to be packed into a
13903 single array or stored in separate arrays.
13904
13905 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
13906 target (see `glBindBuffer') while a color index array is specified,
13907 POINTER is treated as a byte offset into the buffer object's data store.
13908 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
13909 color index vertex array client-side state
13910 (`GL_INDEX_ARRAY_BUFFER_BINDING').
13911
13912 When a color index array is specified, TYPE, STRIDE, and POINTER are
13913 saved as client-side state, in addition to the current vertex array
13914 buffer object binding.
13915
13916 To enable and disable the color index array, call `glEnableClientState'
13917 and `glDisableClientState' with the argument `GL_INDEX_ARRAY'. If
13918 enabled, the color index array is used when `glDrawArrays',
13919 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements',
13920 `glDrawRangeElements', or `glArrayElement' is called.
13921
13922 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
13923
13924 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
13925
13926 (define-gl-procedures
13927 ((glIndexs (c GLshort) -> void)
13928 (glIndexi (c GLint) -> void)
13929 (glIndexf (c GLfloat) -> void)
13930 (glIndexd (c GLdouble) -> void)
13931 (glIndexub (c GLubyte) -> void)
13932 (glIndexsv (c const-GLshort-*) -> void)
13933 (glIndexiv (c const-GLint-*) -> void)
13934 (glIndexfv (c const-GLfloat-*) -> void)
13935 (glIndexdv (c const-GLdouble-*) -> void)
13936 (glIndexubv (c const-GLubyte-*) -> void))
13937 "Set the current color index.
13938
13939 C
13940 Specifies the new value for the current color index.
13941
13942
13943
13944 `glIndex' updates the current (single-valued) color index. It takes one
13945 argument, the new value for the current color index.
13946
13947 The current index is stored as a floating-point value. Integer values
13948 are converted directly to floating-point values, with no special
13949 mapping. The initial value is 1.
13950
13951 Index values outside the representable range of the color index buffer
13952 are not clamped. However, before an index is dithered (if enabled) and
13953 written to the frame buffer, it is converted to fixed-point format. Any
13954 bits in the integer portion of the resulting fixed-point value that do
13955 not correspond to bits in the frame buffer are masked out.")
13956
13957 (define-gl-procedures
13958 ((glInitNames -> void))
13959 "Initialize the name stack.
13960
13961 The name stack is used during selection mode to allow sets of rendering
13962 commands to be uniquely identified. It consists of an ordered set of
13963 unsigned integers. `glInitNames' causes the name stack to be initialized
13964 to its default empty state.
13965
13966 The name stack is always empty while the render mode is not `GL_SELECT'.
13967 Calls to `glInitNames' while the render mode is not `GL_SELECT' are
13968 ignored.
13969
13970 `GL_INVALID_OPERATION' is generated if `glInitNames' is executed between
13971 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13972
13973 (define-gl-procedures
13974 ((glInterleavedArrays
13975 (format GLenum)
13976 (stride GLsizei)
13977 (pointer const-GLvoid-*)
13978 ->
13979 void))
13980 "Simultaneously specify and enable several interleaved arrays.
13981
13982 FORMAT
13983 Specifies the type of array to enable. Symbolic constants `GL_V2F',
13984 `GL_V3F', `GL_C4UB_V2F', `GL_C4UB_V3F', `GL_C3F_V3F', `GL_N3F_V3F',
13985 `GL_C4F_N3F_V3F', `GL_T2F_V3F', `GL_T4F_V4F', `GL_T2F_C4UB_V3F',
13986 `GL_T2F_C3F_V3F', `GL_T2F_N3F_V3F', `GL_T2F_C4F_N3F_V3F', and
13987 `GL_T4F_C4F_N3F_V4F' are accepted.
13988
13989 STRIDE
13990 Specifies the offset in bytes between each aggregate array element.
13991
13992 `glInterleavedArrays' lets you specify and enable individual color,
13993 normal, texture and vertex arrays whose elements are part of a larger
13994 aggregate array element. For some implementations, this is more
13995 efficient than specifying the arrays separately.
13996
13997 If STRIDE is 0, the aggregate elements are stored consecutively.
13998 Otherwise, STRIDE bytes occur between the beginning of one aggregate
13999 array element and the beginning of the next aggregate array element.
14000
14001 FORMAT serves as a ``key'' describing the extraction of individual
14002 arrays from the aggregate array. If FORMAT contains a T, then texture
14003 coordinates are extracted from the interleaved array. If C is present,
14004 color values are extracted. If N is present, normal coordinates are
14005 extracted. Vertex coordinates are always extracted.
14006
14007 The digits 2, 3, and 4 denote how many values are extracted. F indicates
14008 that values are extracted as floating-point values. Colors may also be
14009 extracted as 4 unsigned bytes if 4UB follows the C. If a color is
14010 extracted as 4 unsigned bytes, the vertex array element which follows is
14011 located at the first possible floating-point aligned address.
14012
14013 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted value.
14014
14015 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
14016
14017 (define-gl-procedures
14018 ((glIsBuffer (buffer GLuint) -> GLboolean))
14019 "Determine if a name corresponds to a buffer object.
14020
14021 BUFFER
14022 Specifies a value that may be the name of a buffer object.
14023
14024 `glIsBuffer' returns `GL_TRUE' if BUFFER is currently the name of a
14025 buffer object. If BUFFER is zero, or is a non-zero value that is not
14026 currently the name of a buffer object, or if an error occurs,
14027 `glIsBuffer' returns `GL_FALSE'.
14028
14029 A name returned by `glGenBuffers', but not yet associated with a buffer
14030 object by calling `glBindBuffer', is not the name of a buffer object.
14031
14032 `GL_INVALID_OPERATION' is generated if `glIsBuffer' is executed between
14033 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14034
14035 (define-gl-procedures
14036 ((glIsEnabled (cap GLenum) -> GLboolean))
14037 "Test whether a capability is enabled.
14038
14039 CAP
14040 Specifies a symbolic constant indicating a GL capability.
14041
14042 `glIsEnabled' returns `GL_TRUE' if CAP is an enabled capability and
14043 returns `GL_FALSE' otherwise. Initially all capabilities except
14044 `GL_DITHER' are disabled; `GL_DITHER' is initially enabled.
14045
14046 The following capabilities are accepted for CAP:
14047
14048
14049
14050 *Constant*
14051 *See*
14052
14053 `GL_ALPHA_TEST'
14054 `glAlphaFunc'
14055
14056 `GL_AUTO_NORMAL'
14057 `glEvalCoord'
14058
14059 `GL_BLEND'
14060 `glBlendFunc', `glLogicOp'
14061
14062 `GL_CLIP_PLANE'I
14063 `glClipPlane'
14064
14065 `GL_COLOR_ARRAY'
14066 `glColorPointer'
14067
14068 `GL_COLOR_LOGIC_OP'
14069 `glLogicOp'
14070
14071 `GL_COLOR_MATERIAL'
14072 `glColorMaterial'
14073
14074 `GL_COLOR_SUM'
14075 `glSecondaryColor'
14076
14077 `GL_COLOR_TABLE'
14078 `glColorTable'
14079
14080 `GL_CONVOLUTION_1D'
14081 `glConvolutionFilter1D'
14082
14083 `GL_CONVOLUTION_2D'
14084 `glConvolutionFilter2D'
14085
14086 `GL_CULL_FACE'
14087 `glCullFace'
14088
14089 `GL_DEPTH_TEST'
14090 `glDepthFunc', `glDepthRange'
14091
14092 `GL_DITHER'
14093 `glEnable'
14094
14095 `GL_EDGE_FLAG_ARRAY'
14096 `glEdgeFlagPointer'
14097
14098 `GL_FOG'
14099 `glFog'
14100
14101 `GL_FOG_COORD_ARRAY'
14102 `glFogCoordPointer'
14103
14104 `GL_HISTOGRAM'
14105 `glHistogram'
14106
14107 `GL_INDEX_ARRAY'
14108 `glIndexPointer'
14109
14110 `GL_INDEX_LOGIC_OP'
14111 `glLogicOp'
14112
14113 `GL_LIGHT'I
14114 `glLightModel', `glLight'
14115
14116 `GL_LIGHTING'
14117 `glMaterial', `glLightModel', `glLight'
14118
14119 `GL_LINE_SMOOTH'
14120 `glLineWidth'
14121
14122 `GL_LINE_STIPPLE'
14123 `glLineStipple'
14124
14125 `GL_MAP1_COLOR_4'
14126 `glMap1'
14127
14128 `GL_MAP1_INDEX'
14129 `glMap1'
14130
14131 `GL_MAP1_NORMAL'
14132 `glMap1'
14133
14134 `GL_MAP1_TEXTURE_COORD_1'
14135 `glMap1'
14136
14137 `GL_MAP1_TEXTURE_COORD_2'
14138 `glMap1'
14139
14140 `GL_MAP1_TEXTURE_COORD_3'
14141 `glMap1'
14142
14143 `GL_MAP1_TEXTURE_COORD_4'
14144 `glMap1'
14145
14146 `GL_MAP2_COLOR_4'
14147 `glMap2'
14148
14149 `GL_MAP2_INDEX'
14150 `glMap2'
14151
14152 `GL_MAP2_NORMAL'
14153 `glMap2'
14154
14155 `GL_MAP2_TEXTURE_COORD_1'
14156 `glMap2'
14157
14158 `GL_MAP2_TEXTURE_COORD_2'
14159 `glMap2'
14160
14161 `GL_MAP2_TEXTURE_COORD_3'
14162 `glMap2'
14163
14164 `GL_MAP2_TEXTURE_COORD_4'
14165 `glMap2'
14166
14167 `GL_MAP2_VERTEX_3'
14168 `glMap2'
14169
14170 `GL_MAP2_VERTEX_4'
14171 `glMap2'
14172
14173 `GL_MINMAX'
14174 `glMinmax'
14175
14176 `GL_MULTISAMPLE'
14177 `glSampleCoverage'
14178
14179 `GL_NORMAL_ARRAY'
14180 `glNormalPointer'
14181
14182 `GL_NORMALIZE'
14183 `glNormal'
14184
14185 `GL_POINT_SMOOTH'
14186 `glPointSize'
14187
14188 `GL_POINT_SPRITE'
14189 `glEnable'
14190
14191 `GL_POLYGON_SMOOTH'
14192 `glPolygonMode'
14193
14194 `GL_POLYGON_OFFSET_FILL'
14195 `glPolygonOffset'
14196
14197 `GL_POLYGON_OFFSET_LINE'
14198 `glPolygonOffset'
14199
14200 `GL_POLYGON_OFFSET_POINT'
14201 `glPolygonOffset'
14202
14203 `GL_POLYGON_STIPPLE'
14204 `glPolygonStipple'
14205
14206 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
14207 `glColorTable'
14208
14209 `GL_POST_CONVOLUTION_COLOR_TABLE'
14210 `glColorTable'
14211
14212 `GL_RESCALE_NORMAL'
14213 `glNormal'
14214
14215 `GL_SAMPLE_ALPHA_TO_COVERAGE'
14216 `glSampleCoverage'
14217
14218 `GL_SAMPLE_ALPHA_TO_ONE'
14219 `glSampleCoverage'
14220
14221 `GL_SAMPLE_COVERAGE'
14222 `glSampleCoverage'
14223
14224 `GL_SCISSOR_TEST'
14225 `glScissor'
14226
14227 `GL_SECONDARY_COLOR_ARRAY'
14228 `glSecondaryColorPointer'
14229
14230 `GL_SEPARABLE_2D'
14231 `glSeparableFilter2D'
14232
14233 `GL_STENCIL_TEST'
14234 `glStencilFunc', `glStencilOp'
14235
14236 `GL_TEXTURE_1D'
14237 `glTexImage1D'
14238
14239 `GL_TEXTURE_2D'
14240 `glTexImage2D'
14241
14242 `GL_TEXTURE_3D'
14243 `glTexImage3D'
14244
14245 `GL_TEXTURE_COORD_ARRAY'
14246 `glTexCoordPointer'
14247
14248 `GL_TEXTURE_CUBE_MAP'
14249 `glTexImage2D'
14250
14251 `GL_TEXTURE_GEN_Q'
14252 `glTexGen'
14253
14254 `GL_TEXTURE_GEN_R'
14255 `glTexGen'
14256
14257 `GL_TEXTURE_GEN_S'
14258 `glTexGen'
14259
14260 `GL_TEXTURE_GEN_T'
14261 `glTexGen'
14262
14263 `GL_VERTEX_ARRAY'
14264 `glVertexPointer'
14265
14266 `GL_VERTEX_PROGRAM_POINT_SIZE'
14267 `glEnable'
14268
14269 `GL_VERTEX_PROGRAM_TWO_SIDE'
14270 `glEnable'
14271
14272
14273
14274 `GL_INVALID_ENUM' is generated if CAP is not an accepted value.
14275
14276 `GL_INVALID_OPERATION' is generated if `glIsEnabled' is executed between
14277 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14278
14279 (define-gl-procedures
14280 ((glIsList (list GLuint) -> GLboolean))
14281 "Determine if a name corresponds to a display list.
14282
14283 LIST
14284 Specifies a potential display list name.
14285
14286 `glIsList' returns `GL_TRUE' if LIST is the name of a display list and
14287 returns `GL_FALSE' if it is not, or if an error occurs.
14288
14289 A name returned by `glGenLists', but not yet associated with a display
14290 list by calling `glNewList', is not the name of a display list.
14291
14292 `GL_INVALID_OPERATION' is generated if `glIsList' is executed between
14293 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14294
14295 (define-gl-procedures
14296 ((glIsProgram (program GLuint) -> GLboolean))
14297 "Determines if a name corresponds to a program object.
14298
14299 PROGRAM
14300 Specifies a potential program object.
14301
14302 `glIsProgram' returns `GL_TRUE' if PROGRAM is the name of a program
14303 object previously created with `glCreateProgram' and not yet deleted
14304 with `glDeleteProgram'. If PROGRAM is zero or a non-zero value that is
14305 not the name of a program object, or if an error occurs, `glIsProgram'
14306 returns `GL_FALSE'.
14307
14308 `GL_INVALID_OPERATION' is generated if `glIsProgram' is executed between
14309 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14310
14311 (define-gl-procedures
14312 ((glIsQuery (id GLuint) -> GLboolean))
14313 "Determine if a name corresponds to a query object.
14314
14315 ID
14316 Specifies a value that may be the name of a query object.
14317
14318 `glIsQuery' returns `GL_TRUE' if ID is currently the name of a query
14319 object. If ID is zero, or is a non-zero value that is not currently the
14320 name of a query object, or if an error occurs, `glIsQuery' returns
14321 `GL_FALSE'.
14322
14323 A name returned by `glGenQueries', but not yet associated with a query
14324 object by calling `glBeginQuery', is not the name of a query object.
14325
14326 `GL_INVALID_OPERATION' is generated if `glIsQuery' is executed between
14327 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14328
14329 (define-gl-procedures
14330 ((glIsShader (shader GLuint) -> GLboolean))
14331 "Determines if a name corresponds to a shader object.
14332
14333 SHADER
14334 Specifies a potential shader object.
14335
14336 `glIsShader' returns `GL_TRUE' if SHADER is the name of a shader object
14337 previously created with `glCreateShader' and not yet deleted with
14338 `glDeleteShader'. If SHADER is zero or a non-zero value that is not the
14339 name of a shader object, or if an error occurs, `glIsShader ' returns
14340 `GL_FALSE'.
14341
14342 `GL_INVALID_OPERATION' is generated if `glIsShader' is executed between
14343 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14344
14345 (define-gl-procedures
14346 ((glIsTexture (texture GLuint) -> GLboolean))
14347 "Determine if a name corresponds to a texture.
14348
14349 TEXTURE
14350 Specifies a value that may be the name of a texture.
14351
14352 `glIsTexture' returns `GL_TRUE' if TEXTURE is currently the name of a
14353 texture. If TEXTURE is zero, or is a non-zero value that is not
14354 currently the name of a texture, or if an error occurs, `glIsTexture'
14355 returns `GL_FALSE'.
14356
14357 A name returned by `glGenTextures', but not yet associated with a
14358 texture by calling `glBindTexture', is not the name of a texture.
14359
14360 `GL_INVALID_OPERATION' is generated if `glIsTexture' is executed between
14361 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14362
14363 (define-gl-procedures
14364 ((glLightModelf
14365 (pname GLenum)
14366 (param GLfloat)
14367 ->
14368 void)
14369 (glLightModeli
14370 (pname GLenum)
14371 (param GLint)
14372 ->
14373 void)
14374 (glLightModelfv
14375 (pname GLenum)
14376 (params const-GLfloat-*)
14377 ->
14378 void)
14379 (glLightModeliv
14380 (pname GLenum)
14381 (params const-GLint-*)
14382 ->
14383 void))
14384 "Set the lighting model parameters.
14385
14386 PNAME
14387 Specifies a single-valued lighting model parameter.
14388 `GL_LIGHT_MODEL_LOCAL_VIEWER', `GL_LIGHT_MODEL_COLOR_CONTROL', and
14389 `GL_LIGHT_MODEL_TWO_SIDE' are accepted.
14390
14391 PARAM
14392 Specifies the value that PARAM will be set to.
14393
14394 `glLightModel' sets the lighting model parameter. PNAME names a
14395 parameter and PARAMS gives the new value. There are three lighting model
14396 parameters:
14397
14398 `GL_LIGHT_MODEL_AMBIENT'
14399
14400
14401 PARAMS contains four integer or floating-point values that specify
14402 the ambient RGBA intensity of the entire scene. Integer values are
14403 mapped linearly such that the most positive representable value
14404 maps to 1.0, and the most negative representable value maps to -1.0
14405 . Floating-point values are mapped directly. Neither integer nor
14406 floating-point values are clamped. The initial ambient scene
14407 intensity is (0.2, 0.2, 0.2, 1.0).
14408
14409 `GL_LIGHT_MODEL_COLOR_CONTROL'
14410
14411
14412 PARAMS must be either `GL_SEPARATE_SPECULAR_COLOR' or
14413 `GL_SINGLE_COLOR'. `GL_SINGLE_COLOR' specifies that a single color
14414 is generated from the lighting computation for a vertex.
14415 `GL_SEPARATE_SPECULAR_COLOR' specifies that the specular color
14416 computation of lighting be stored separately from the remainder of
14417 the lighting computation. The specular color is summed into the
14418 generated fragment's color after the application of texture mapping
14419 (if enabled). The initial value is `GL_SINGLE_COLOR'.
14420
14421 `GL_LIGHT_MODEL_LOCAL_VIEWER'
14422
14423
14424 PARAMS is a single integer or floating-point value that specifies
14425 how specular reflection angles are computed. If PARAMS is 0 (or
14426 0.0), specular reflection angles take the view direction to be
14427 parallel to and in the direction of the -Z axis, regardless of the
14428 location of the vertex in eye coordinates. Otherwise, specular
14429 reflections are computed from the origin of the eye coordinate
14430 system. The initial value is 0.
14431
14432 `GL_LIGHT_MODEL_TWO_SIDE'
14433
14434
14435 PARAMS is a single integer or floating-point value that specifies
14436 whether one- or two-sided lighting calculations are done for
14437 polygons. It has no effect on the lighting calculations for points,
14438 lines, or bitmaps. If PARAMS is 0 (or 0.0), one-sided lighting is
14439 specified, and only the FRONT material parameters are used in the
14440 lighting equation. Otherwise, two-sided lighting is specified. In
14441 this case, vertices of back-facing polygons are lighted using the
14442 BACK material parameters and have their normals reversed before the
14443 lighting equation is evaluated. Vertices of front-facing polygons
14444 are always lighted using the FRONT material parameters, with no
14445 change to their normals. The initial value is 0.
14446
14447 In RGBA mode, the lighted color of a vertex is the sum of the material
14448 emission intensity, the product of the material ambient reflectance and
14449 the lighting model full-scene ambient intensity, and the contribution of
14450 each enabled light source. Each light source contributes the sum of
14451 three terms: ambient, diffuse, and specular. The ambient light source
14452 contribution is the product of the material ambient reflectance and the
14453 light's ambient intensity. The diffuse light source contribution is the
14454 product of the material diffuse reflectance, the light's diffuse
14455 intensity, and the dot product of the vertex's normal with the
14456 normalized vector from the vertex to the light source. The specular
14457 light source contribution is the product of the material specular
14458 reflectance, the light's specular intensity, and the dot product of the
14459 normalized vertex-to-eye and vertex-to-light vectors, raised to the
14460 power of the shininess of the material. All three light source
14461 contributions are attenuated equally based on the distance from the
14462 vertex to the light source and on light source direction, spread
14463 exponent, and spread cutoff angle. All dot products are replaced with 0
14464 if they evaluate to a negative value.
14465
14466 The alpha component of the resulting lighted color is set to the alpha
14467 value of the material diffuse reflectance.
14468
14469 In color index mode, the value of the lighted index of a vertex ranges
14470 from the ambient to the specular values passed to `glMaterial' using
14471 `GL_COLOR_INDEXES'. Diffuse and specular coefficients, computed with a
14472 (.30, .59, .11) weighting of the lights' colors, the shininess of the
14473 material, and the same reflection and attenuation equations as in the
14474 RGBA case, determine how much above ambient the resulting index is.
14475
14476 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
14477
14478 `GL_INVALID_ENUM' is generated if PNAME is
14479 `GL_LIGHT_MODEL_COLOR_CONTROL' and PARAMS is not one of
14480 `GL_SINGLE_COLOR' or `GL_SEPARATE_SPECULAR_COLOR'.
14481
14482 `GL_INVALID_OPERATION' is generated if `glLightModel' is executed
14483 between the execution of `glBegin' and the corresponding execution of
14484 `glEnd'.")
14485
14486 (define-gl-procedures
14487 ((glLightf
14488 (light GLenum)
14489 (pname GLenum)
14490 (param GLfloat)
14491 ->
14492 void)
14493 (glLighti
14494 (light GLenum)
14495 (pname GLenum)
14496 (param GLint)
14497 ->
14498 void)
14499 (glLightfv
14500 (light GLenum)
14501 (pname GLenum)
14502 (params const-GLfloat-*)
14503 ->
14504 void)
14505 (glLightiv
14506 (light GLenum)
14507 (pname GLenum)
14508 (params const-GLint-*)
14509 ->
14510 void))
14511 "Set light source parameters.
14512
14513 LIGHT
14514 Specifies a light. The number of lights depends on the
14515 implementation, but at least eight lights are supported. They are
14516 identified by symbolic names of the form `GL_LIGHT' I , where i
14517 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
14518
14519 PNAME
14520 Specifies a single-valued light source parameter for LIGHT.
14521 `GL_SPOT_EXPONENT', `GL_SPOT_CUTOFF', `GL_CONSTANT_ATTENUATION',
14522 `GL_LINEAR_ATTENUATION', and `GL_QUADRATIC_ATTENUATION' are
14523 accepted.
14524
14525 PARAM
14526 Specifies the value that parameter PNAME of light source LIGHT will
14527 be set to.
14528
14529 `glLight' sets the values of individual light source parameters. LIGHT
14530 names the light and is a symbolic name of the form `GL_LIGHT'I , where i
14531 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1. PNAME specifies one
14532 of ten light source parameters, again by symbolic name. PARAMS is either
14533 a single value or a pointer to an array that contains the new values.
14534
14535 To enable and disable lighting calculation, call `glEnable' and
14536 `glDisable' with argument `GL_LIGHTING'. Lighting is initially disabled.
14537 When it is enabled, light sources that are enabled contribute to the
14538 lighting calculation. Light source I is enabled and disabled using
14539 `glEnable' and `glDisable' with argument `GL_LIGHT'I .
14540
14541 The ten light parameters are as follows:
14542
14543 `GL_AMBIENT'
14544 PARAMS contains four integer or floating-point values that specify
14545 the ambient RGBA intensity of the light. Integer values are mapped
14546 linearly such that the most positive representable value maps to
14547 1.0, and the most negative representable value maps to -1.0 .
14548 Floating-point values are mapped directly. Neither integer nor
14549 floating-point values are clamped. The initial ambient light
14550 intensity is (0, 0, 0, 1).
14551
14552 `GL_DIFFUSE'
14553 PARAMS contains four integer or floating-point values that specify
14554 the diffuse RGBA intensity of the light. Integer values are mapped
14555 linearly such that the most positive representable value maps to
14556 1.0, and the most negative representable value maps to -1.0 .
14557 Floating-point values are mapped directly. Neither integer nor
14558 floating-point values are clamped. The initial value for
14559 `GL_LIGHT0' is (1, 1, 1, 1); for other lights, the initial value is
14560 (0, 0, 0, 1).
14561
14562 `GL_SPECULAR'
14563 PARAMS contains four integer or floating-point values that specify
14564 the specular RGBA intensity of the light. Integer values are mapped
14565 linearly such that the most positive representable value maps to
14566 1.0, and the most negative representable value maps to -1.0 .
14567 Floating-point values are mapped directly. Neither integer nor
14568 floating-point values are clamped. The initial value for
14569 `GL_LIGHT0' is (1, 1, 1, 1); for other lights, the initial value is
14570 (0, 0, 0, 1).
14571
14572 `GL_POSITION'
14573 PARAMS contains four integer or floating-point values that specify
14574 the position of the light in homogeneous object coordinates. Both
14575 integer and floating-point values are mapped directly. Neither
14576 integer nor floating-point values are clamped.
14577
14578 The position is transformed by the modelview matrix when `glLight'
14579 is called (just as if it were a point), and it is stored in eye
14580 coordinates. If the W component of the position is 0, the light is
14581 treated as a directional source. Diffuse and specular lighting
14582 calculations take the light's direction, but not its actual
14583 position, into account, and attenuation is disabled. Otherwise,
14584 diffuse and specular lighting calculations are based on the actual
14585 location of the light in eye coordinates, and attenuation is
14586 enabled. The initial position is (0, 0, 1, 0); thus, the initial
14587 light source is directional, parallel to, and in the direction of
14588 the -Z axis.
14589
14590 `GL_SPOT_DIRECTION'
14591 PARAMS contains three integer or floating-point values that specify
14592 the direction of the light in homogeneous object coordinates. Both
14593 integer and floating-point values are mapped directly. Neither
14594 integer nor floating-point values are clamped.
14595
14596 The spot direction is transformed by the upper 3x3 of the modelview
14597 matrix when `glLight' is called, and it is stored in eye
14598 coordinates. It is significant only when `GL_SPOT_CUTOFF' is not
14599 180, which it is initially. The initial direction is (0,0-1) .
14600
14601 `GL_SPOT_EXPONENT'
14602 PARAMS is a single integer or floating-point value that specifies
14603 the intensity distribution of the light. Integer and floating-point
14604 values are mapped directly. Only values in the range [0,128] are
14605 accepted.
14606
14607 Effective light intensity is attenuated by the cosine of the angle
14608 between the direction of the light and the direction from the light
14609 to the vertex being lighted, raised to the power of the spot
14610 exponent. Thus, higher spot exponents result in a more focused
14611 light source, regardless of the spot cutoff angle (see
14612 `GL_SPOT_CUTOFF', next paragraph). The initial spot exponent is 0,
14613 resulting in uniform light distribution.
14614
14615 `GL_SPOT_CUTOFF'
14616 PARAMS is a single integer or floating-point value that specifies
14617 the maximum spread angle of a light source. Integer and
14618 floating-point values are mapped directly. Only values in the range
14619 [0,90] and the special value 180 are accepted. If the angle between
14620 the direction of the light and the direction from the light to the
14621 vertex being lighted is greater than the spot cutoff angle, the
14622 light is completely masked. Otherwise, its intensity is controlled
14623 by the spot exponent and the attenuation factors. The initial spot
14624 cutoff is 180, resulting in uniform light distribution.
14625
14626 `GL_CONSTANT_ATTENUATION'
14627 `GL_LINEAR_ATTENUATION'
14628 `GL_QUADRATIC_ATTENUATION'
14629 PARAMS is a single integer or floating-point value that specifies
14630 one of the three light attenuation factors. Integer and
14631 floating-point values are mapped directly. Only nonnegative values
14632 are accepted. If the light is positional, rather than directional,
14633 its intensity is attenuated by the reciprocal of the sum of the
14634 constant factor, the linear factor times the distance between the
14635 light and the vertex being lighted, and the quadratic factor times
14636 the square of the same distance. The initial attenuation factors
14637 are (1, 0, 0), resulting in no attenuation.
14638
14639 `GL_INVALID_ENUM' is generated if either LIGHT or PNAME is not an
14640 accepted value.
14641
14642 `GL_INVALID_VALUE' is generated if a spot exponent value is specified
14643 outside the range [0,128] , or if spot cutoff is specified outside the
14644 range [0,90] (except for the special value 180), or if a negative
14645 attenuation factor is specified.
14646
14647 `GL_INVALID_OPERATION' is generated if `glLight' is executed between the
14648 execution of `glBegin' and the corresponding execution of `glEnd'.")
14649
14650 (define-gl-procedures
14651 ((glLineStipple
14652 (factor GLint)
14653 (pattern GLushort)
14654 ->
14655 void))
14656 "Specify the line stipple pattern.
14657
14658 FACTOR
14659 Specifies a multiplier for each bit in the line stipple pattern. If
14660 FACTOR is 3, for example, each bit in the pattern is used three
14661 times before the next bit in the pattern is used. FACTOR is clamped
14662 to the range [1, 256] and defaults to 1.
14663
14664 PATTERN
14665 Specifies a 16-bit integer whose bit pattern determines which
14666 fragments of a line will be drawn when the line is rasterized. Bit
14667 zero is used first; the default pattern is all 1's.
14668
14669 Line stippling masks out certain fragments produced by rasterization;
14670 those fragments will not be drawn. The masking is achieved by using
14671 three parameters: the 16-bit line stipple pattern PATTERN, the repeat
14672 count FACTOR, and an integer stipple counter S .
14673
14674 Counter S is reset to 0 whenever `glBegin' is called and before each
14675 line segment of a `glBegin'(`GL_LINES')/`glEnd' sequence is generated.
14676 It is incremented after each fragment of a unit width aliased line
14677 segment is generated or after each I fragments of an I width line
14678 segment are generated. The I fragments associated with count S are
14679 masked out if
14680
14681 PATTERN bit (S/FACTOR,)%16
14682
14683 is 0, otherwise these fragments are sent to the frame buffer. Bit zero
14684 of PATTERN is the least significant bit.
14685
14686 Antialiased lines are treated as a sequence of 1×WIDTH rectangles for
14687 purposes of stippling. Whether rectangle S is rasterized or not depends
14688 on the fragment rule described for aliased lines, counting rectangles
14689 rather than groups of fragments.
14690
14691 To enable and disable line stippling, call `glEnable' and `glDisable'
14692 with argument `GL_LINE_STIPPLE'. When enabled, the line stipple pattern
14693 is applied as described above. When disabled, it is as if the pattern
14694 were all 1's. Initially, line stippling is disabled.
14695
14696 `GL_INVALID_OPERATION' is generated if `glLineStipple' is executed
14697 between the execution of `glBegin' and the corresponding execution of
14698 `glEnd'.")
14699
14700 (define-gl-procedures
14701 ((glLineWidth (width GLfloat) -> void))
14702 "Specify the width of rasterized lines.
14703
14704 WIDTH
14705 Specifies the width of rasterized lines. The initial value is 1.
14706
14707 `glLineWidth' specifies the rasterized width of both aliased and
14708 antialiased lines. Using a line width other than 1 has different
14709 effects, depending on whether line antialiasing is enabled. To enable
14710 and disable line antialiasing, call `glEnable' and `glDisable' with
14711 argument `GL_LINE_SMOOTH'. Line antialiasing is initially disabled.
14712
14713 If line antialiasing is disabled, the actual width is determined by
14714 rounding the supplied width to the nearest integer. (If the rounding
14715 results in the value 0, it is as if the line width were 1.) If
14716 ∣ΔX,∣>=∣ΔY,∣ , I pixels are filled in each column that is rasterized,
14717 where I is the rounded value of WIDTH. Otherwise, I pixels are filled in
14718 each row that is rasterized.
14719
14720 If antialiasing is enabled, line rasterization produces a fragment for
14721 each pixel square that intersects the region lying within the rectangle
14722 having width equal to the current line width, length equal to the actual
14723 length of the line, and centered on the mathematical line segment. The
14724 coverage value for each fragment is the window coordinate area of the
14725 intersection of the rectangular region with the corresponding pixel
14726 square. This value is saved and used in the final rasterization step.
14727
14728 Not all widths can be supported when line antialiasing is enabled. If an
14729 unsupported width is requested, the nearest supported width is used.
14730 Only width 1 is guaranteed to be supported; others depend on the
14731 implementation. Likewise, there is a range for aliased line widths as
14732 well. To query the range of supported widths and the size difference
14733 between supported widths within the range, call `glGet' with arguments
14734 `GL_ALIASED_LINE_WIDTH_RANGE', `GL_SMOOTH_LINE_WIDTH_RANGE', and
14735 `GL_SMOOTH_LINE_WIDTH_GRANULARITY'.
14736
14737 `GL_INVALID_VALUE' is generated if WIDTH is less than or equal to 0.
14738
14739 `GL_INVALID_OPERATION' is generated if `glLineWidth' is executed between
14740 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14741
14742 (define-gl-procedures
14743 ((glLinkProgram (program GLuint) -> void))
14744 "Links a program object.
14745
14746 PROGRAM
14747 Specifies the handle of the program object to be linked.
14748
14749 `glLinkProgram' links the program object specified by PROGRAM. If any
14750 shader objects of type `GL_VERTEX_SHADER' are attached to PROGRAM, they
14751 will be used to create an executable that will run on the programmable
14752 vertex processor. If any shader objects of type `GL_FRAGMENT_SHADER' are
14753 attached to PROGRAM, they will be used to create an executable that will
14754 run on the programmable fragment processor.
14755
14756 The status of the link operation will be stored as part of the program
14757 object's state. This value will be set to `GL_TRUE' if the program
14758 object was linked without errors and is ready for use, and `GL_FALSE'
14759 otherwise. It can be queried by calling `glGetProgram' with arguments
14760 PROGRAM and `GL_LINK_STATUS'.
14761
14762 As a result of a successful link operation, all active user-defined
14763 uniform variables belonging to PROGRAM will be initialized to 0, and
14764 each of the program object's active uniform variables will be assigned a
14765 location that can be queried by calling `glGetUniformLocation'. Also,
14766 any active user-defined attribute variables that have not been bound to
14767 a generic vertex attribute index will be bound to one at this time.
14768
14769 Linking of a program object can fail for a number of reasons as
14770 specified in the OPENGL SHADING LANGUAGE SPECIFICATION. The following
14771 lists some of the conditions that will cause a link error.
14772
14773 * The storage limit for uniform variables has been exceeded.
14774
14775 * The number of active uniform variables supported by the
14776 implementation has been exceeded.
14777
14778 * The `main' function is missing for the vertex shader or the
14779 fragment shader.
14780
14781 * A varying variable actually used in the fragment shader is not
14782 declared in the same way (or is not declared at all) in the vertex
14783 shader.
14784
14785 * A reference to a function or variable name is unresolved.
14786
14787 * A shared global is declared with two different types or two
14788 different initial values.
14789
14790 * One or more of the attached shader objects has not been
14791 successfully compiled.
14792
14793 * Binding a generic attribute matrix caused some rows of the matrix
14794 to fall outside the allowed maximum of `GL_MAX_VERTEX_ATTRIBS'.
14795
14796 * Not enough contiguous vertex attribute slots could be found to bind
14797 attribute matrices.
14798
14799 When a program object has been successfully linked, the program object
14800 can be made part of current state by calling `glUseProgram'. Whether or
14801 not the link operation was successful, the program object's information
14802 log will be overwritten. The information log can be retrieved by calling
14803 `glGetProgramInfoLog'.
14804
14805 `glLinkProgram' will also install the generated executables as part of
14806 the current rendering state if the link operation was successful and the
14807 specified program object is already currently in use as a result of a
14808 previous call to `glUseProgram'. If the program object currently in use
14809 is relinked unsuccessfully, its link status will be set to `GL_FALSE' ,
14810 but the executables and associated state will remain part of the current
14811 state until a subsequent call to `glUseProgram' removes it from use.
14812 After it is removed from use, it cannot be made part of current state
14813 until it has been successfully relinked.
14814
14815 If PROGRAM contains shader objects of type `GL_VERTEX_SHADER' but does
14816 not contain shader objects of type `GL_FRAGMENT_SHADER', the vertex
14817 shader will be linked against the implicit interface for fixed
14818 functionality fragment processing. Similarly, if PROGRAM contains shader
14819 objects of type `GL_FRAGMENT_SHADER' but it does not contain shader
14820 objects of type `GL_VERTEX_SHADER', the fragment shader will be linked
14821 against the implicit interface for fixed functionality vertex
14822 processing.
14823
14824 The program object's information log is updated and the program is
14825 generated at the time of the link operation. After the link operation,
14826 applications are free to modify attached shader objects, compile
14827 attached shader objects, detach shader objects, delete shader objects,
14828 and attach additional shader objects. None of these operations affects
14829 the information log or the program that is part of the program object.
14830
14831 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
14832 OpenGL.
14833
14834 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
14835
14836 `GL_INVALID_OPERATION' is generated if `glLinkProgram' is executed
14837 between the execution of `glBegin' and the corresponding execution of
14838 `glEnd'.")
14839
14840 (define-gl-procedures
14841 ((glListBase (base GLuint) -> void))
14842 "Set the display-list base for .
14843
14844 BASE
14845 Specifies an integer offset that will be added to `glCallLists'
14846 offsets to generate display-list names. The initial value is 0.
14847
14848 `glCallLists' specifies an array of offsets. Display-list names are
14849 generated by adding BASE to each offset. Names that reference valid
14850 display lists are executed; the others are ignored.
14851
14852 `GL_INVALID_OPERATION' is generated if `glListBase' is executed between
14853 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14854
14855 (define-gl-procedures
14856 ((glLoadIdentity -> void))
14857 "Replace the current matrix with the identity matrix.
14858
14859 `glLoadIdentity' replaces the current matrix with the identity matrix.
14860 It is semantically equivalent to calling `glLoadMatrix' with the
14861 identity matrix
14862
14863
14864
14865 ((1 0 0 0), (0 1 0 0), (0 0 1 0), (0 0 0 1),,)
14866
14867
14868
14869 but in some cases it is more efficient.
14870
14871 `GL_INVALID_OPERATION' is generated if `glLoadIdentity' is executed
14872 between the execution of `glBegin' and the corresponding execution of
14873 `glEnd'.")
14874
14875 (define-gl-procedures
14876 ((glLoadMatrixd (m const-GLdouble-*) -> void)
14877 (glLoadMatrixf (m const-GLfloat-*) -> void))
14878 "Replace the current matrix with the specified matrix.
14879
14880 M
14881 Specifies a pointer to 16 consecutive values, which are used as the
14882 elements of a 4×4 column-major matrix.
14883
14884 `glLoadMatrix' replaces the current matrix with the one whose elements
14885 are specified by M. The current matrix is the projection matrix,
14886 modelview matrix, or texture matrix, depending on the current matrix
14887 mode (see `glMatrixMode').
14888
14889 The current matrix, M, defines a transformation of coordinates. For
14890 instance, assume M refers to the modelview matrix. If
14891 V=(V\u2061[0,],V\u2061[1,]V\u2061[2,]V\u2061[3,]) is the set of object coordinates of a
14892 vertex, and M points to an array of 16 single- or double-precision
14893 floating-point values M={M\u2061[0,],M\u2061[1,]...M\u2061[15,]} , then the modelview
14894 transformation M\u2061(V,) does the following:
14895
14896 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,]),
14897 (M\u2061[2,] M\u2061[6,] M\u2061[10,] M\u2061[14,]), (M\u2061[3,] M\u2061[7,] M\u2061[11,]
14898 M\u2061[15,]),)×((V\u2061[0,]), (V\u2061[1,]), (V\u2061[2,]), (V\u2061[3,]),)
14899
14900
14901
14902 Projection and texture transformations are similarly defined.
14903
14904 `GL_INVALID_OPERATION' is generated if `glLoadMatrix' is executed
14905 between the execution of `glBegin' and the corresponding execution of
14906 `glEnd'.")
14907
14908 (define-gl-procedures
14909 ((glLoadName (name GLuint) -> void))
14910 "Load a name onto the name stack.
14911
14912 NAME
14913 Specifies a name that will replace the top value on the name stack.
14914
14915 The name stack is used during selection mode to allow sets of rendering
14916 commands to be uniquely identified. It consists of an ordered set of
14917 unsigned integers and is initially empty.
14918
14919 `glLoadName' causes NAME to replace the value on the top of the name
14920 stack.
14921
14922 The name stack is always empty while the render mode is not `GL_SELECT'.
14923 Calls to `glLoadName' while the render mode is not `GL_SELECT' are
14924 ignored.
14925
14926 `GL_INVALID_OPERATION' is generated if `glLoadName' is called while the
14927 name stack is empty.
14928
14929 `GL_INVALID_OPERATION' is generated if `glLoadName' is executed between
14930 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14931
14932 (define-gl-procedures
14933 ((glLoadTransposeMatrixd
14934 (m const-GLdouble-*)
14935 ->
14936 void)
14937 (glLoadTransposeMatrixf
14938 (m const-GLfloat-*)
14939 ->
14940 void))
14941 "Replace the current matrix with the specified row-major ordered matrix.
14942
14943 M
14944 Specifies a pointer to 16 consecutive values, which are used as the
14945 elements of a 4×4 row-major matrix.
14946
14947 `glLoadTransposeMatrix' replaces the current matrix with the one whose
14948 elements are specified by M. The current matrix is the projection
14949 matrix, modelview matrix, or texture matrix, depending on the current
14950 matrix mode (see `glMatrixMode').
14951
14952 The current matrix, M, defines a transformation of coordinates. For
14953 instance, assume M refers to the modelview matrix. If
14954 V=(V\u2061[0,],V\u2061[1,]V\u2061[2,]V\u2061[3,]) is the set of object coordinates of a
14955 vertex, and M points to an array of 16 single- or double-precision
14956 floating-point values M={M\u2061[0,],M\u2061[1,]...M\u2061[15,]} , then the modelview
14957 transformation M\u2061(V,) does the following:
14958
14959 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,]),
14960 (M\u2061[8,] M\u2061[9,] M\u2061[10,] M\u2061[11,]), (M\u2061[12,] M\u2061[13,] M\u2061[14,]
14961 M\u2061[15,]),)×((V\u2061[0,]), (V\u2061[1,]), (V\u2061[2,]), (V\u2061[3,]),)
14962
14963
14964
14965 Projection and texture transformations are similarly defined.
14966
14967 Calling `glLoadTransposeMatrix' with matrix M is identical in operation
14968 to `glLoadMatrix' with M^T , where T represents the transpose.
14969
14970 `GL_INVALID_OPERATION' is generated if `glLoadTransposeMatrix' is
14971 executed between the execution of `glBegin' and the corresponding
14972 execution of `glEnd'.")
14973
14974 (define-gl-procedures
14975 ((glLogicOp (opcode GLenum) -> void))
14976 "Specify a logical pixel operation for color index rendering.
14977
14978 OPCODE
14979 Specifies a symbolic constant that selects a logical operation. The
14980 following symbols are accepted: `GL_CLEAR', `GL_SET', `GL_COPY',
14981 `GL_COPY_INVERTED', `GL_NOOP', `GL_INVERT', `GL_AND', `GL_NAND',
14982 `GL_OR', `GL_NOR', `GL_XOR', `GL_EQUIV', `GL_AND_REVERSE',
14983 `GL_AND_INVERTED', `GL_OR_REVERSE', and `GL_OR_INVERTED'. The
14984 initial value is `GL_COPY'.
14985
14986 `glLogicOp' specifies a logical operation that, when enabled, is applied
14987 between the incoming color index or RGBA color and the color index or
14988 RGBA color at the corresponding location in the frame buffer. To enable
14989 or disable the logical operation, call `glEnable' and `glDisable' using
14990 the symbolic constant `GL_COLOR_LOGIC_OP' for RGBA mode or
14991 `GL_INDEX_LOGIC_OP' for color index mode. The initial value is disabled
14992 for both operations.
14993
14994
14995
14996 *Opcode*
14997 *Resulting Operation*
14998
14999 `GL_CLEAR'
15000 0
15001
15002 `GL_SET'
15003 1
15004
15005 `GL_COPY'
15006 s
15007
15008 `GL_COPY_INVERTED'
15009 ~s
15010
15011 `GL_NOOP'
15012 d
15013
15014 `GL_INVERT'
15015 ~d
15016
15017 `GL_AND'
15018 s & d
15019
15020 `GL_NAND'
15021 ~(s & d)
15022
15023 `GL_OR'
15024 s | d
15025
15026 `GL_NOR'
15027 ~(s | d)
15028
15029 `GL_XOR'
15030 s ^ d
15031
15032 `GL_EQUIV'
15033 ~(s ^ d)
15034
15035 `GL_AND_REVERSE'
15036 s & ~d
15037
15038 `GL_AND_INVERTED'
15039 ~s & d
15040
15041 `GL_OR_REVERSE'
15042 s | ~d
15043
15044 `GL_OR_INVERTED'
15045 ~s | d
15046
15047 OPCODE is a symbolic constant chosen from the list above. In the
15048 explanation of the logical operations, S represents the incoming color
15049 index and D represents the index in the frame buffer. Standard
15050 C-language operators are used. As these bitwise operators suggest, the
15051 logical operation is applied independently to each bit pair of the
15052 source and destination indices or colors.
15053
15054 `GL_INVALID_ENUM' is generated if OPCODE is not an accepted value.
15055
15056 `GL_INVALID_OPERATION' is generated if `glLogicOp' is executed between
15057 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15058
15059 (define-gl-procedures
15060 ((glMap1f
15061 (target GLenum)
15062 (u1 GLfloat)
15063 (u2 GLfloat)
15064 (stride GLint)
15065 (order GLint)
15066 (points const-GLfloat-*)
15067 ->
15068 void)
15069 (glMap1d
15070 (target GLenum)
15071 (u1 GLdouble)
15072 (u2 GLdouble)
15073 (stride GLint)
15074 (order GLint)
15075 (points const-GLdouble-*)
15076 ->
15077 void))
15078 "Define a one-dimensional evaluator.
15079
15080 TARGET
15081 Specifies the kind of values that are generated by the evaluator.
15082 Symbolic constants `GL_MAP1_VERTEX_3', `GL_MAP1_VERTEX_4',
15083 `GL_MAP1_INDEX', `GL_MAP1_COLOR_4', `GL_MAP1_NORMAL',
15084 `GL_MAP1_TEXTURE_COORD_1', `GL_MAP1_TEXTURE_COORD_2',
15085 `GL_MAP1_TEXTURE_COORD_3', and `GL_MAP1_TEXTURE_COORD_4' are
15086 accepted.
15087
15088 U1
15089 U2
15090
15091 Specify a linear mapping of U , as presented to `glEvalCoord1', to
15092 U^ , the variable that is evaluated by the equations specified by
15093 this command.
15094
15095 STRIDE
15096 Specifies the number of floats or doubles between the beginning of
15097 one control point and the beginning of the next one in the data
15098 structure referenced in POINTS. This allows control points to be
15099 embedded in arbitrary data structures. The only constraint is that
15100 the values for a particular control point must occupy contiguous
15101 memory locations.
15102
15103 ORDER
15104 Specifies the number of control points. Must be positive.
15105
15106 POINTS
15107 Specifies a pointer to the array of control points.
15108
15109 Evaluators provide a way to use polynomial or rational polynomial
15110 mapping to produce vertices, normals, texture coordinates, and colors.
15111 The values produced by an evaluator are sent to further stages of GL
15112 processing just as if they had been presented using `glVertex',
15113 `glNormal', `glTexCoord', and `glColor' commands, except that the
15114 generated values do not update the current normal, texture coordinates,
15115 or color.
15116
15117 All polynomial or rational polynomial splines of any degree (up to the
15118 maximum degree supported by the GL implementation) can be described
15119 using evaluators. These include almost all splines used in computer
15120 graphics: B-splines, Bezier curves, Hermite splines, and so on.
15121
15122 Evaluators define curves based on Bernstein polynomials. Define P\u2061(U^,)
15123 as
15124
15125 P\u2061(U^,)=ΣI=0NB_I,^N\u2061(U^,)\u2062R_I
15126
15127
15128
15129 where R_I is a control point and B_I,^N\u2061(U^,) is the I th Bernstein
15130 polynomial of degree N (ORDER = N+1 ):
15131
15132 B_I,^N\u2061(U^,)=((N), (I),,)\u2062U^,^I\u2062(1-U^,)^N-I,,
15133
15134 Recall that
15135
15136 0^0==1 and ((N), (0),,)==1
15137
15138 `glMap1' is used to define the basis and to specify what kind of values
15139 are produced. Once defined, a map can be enabled and disabled by calling
15140 `glEnable' and `glDisable' with the map name, one of the nine predefined
15141 values for TARGET described below. `glEvalCoord1' evaluates the
15142 one-dimensional maps that are enabled. When `glEvalCoord1' presents a
15143 value U , the Bernstein functions are evaluated using U^ , where
15144 U^=U-U1,/U2-U1,
15145
15146 TARGET is a symbolic constant that indicates what kind of control points
15147 are provided in POINTS, and what output is generated when the map is
15148 evaluated. It can assume one of nine predefined values:
15149
15150 `GL_MAP1_VERTEX_3'
15151 Each control point is three floating-point values representing X ,
15152 Y , and Z . Internal `glVertex3' commands are generated when the
15153 map is evaluated.
15154
15155 `GL_MAP1_VERTEX_4'
15156 Each control point is four floating-point values representing X , Y
15157 , Z , and W . Internal `glVertex4' commands are generated when the
15158 map is evaluated.
15159
15160 `GL_MAP1_INDEX'
15161 Each control point is a single floating-point value representing a
15162 color index. Internal `glIndex' commands are generated when the map
15163 is evaluated but the current index is not updated with the value of
15164 these `glIndex' commands.
15165
15166 `GL_MAP1_COLOR_4'
15167 Each control point is four floating-point values representing red,
15168 green, blue, and alpha. Internal `glColor4' commands are generated
15169 when the map is evaluated but the current color is not updated with
15170 the value of these `glColor4' commands.
15171
15172 `GL_MAP1_NORMAL'
15173 Each control point is three floating-point values representing the
15174 X , Y , and Z components of a normal vector. Internal `glNormal'
15175 commands are generated when the map is evaluated but the current
15176 normal is not updated with the value of these `glNormal' commands.
15177
15178 `GL_MAP1_TEXTURE_COORD_1'
15179 Each control point is a single floating-point value representing
15180 the S texture coordinate. Internal `glTexCoord1' commands are
15181 generated when the map is evaluated but the current texture
15182 coordinates are not updated with the value of these `glTexCoord'
15183 commands.
15184
15185 `GL_MAP1_TEXTURE_COORD_2'
15186 Each control point is two floating-point values representing the S
15187 and T texture coordinates. Internal `glTexCoord2' commands are
15188 generated when the map is evaluated but the current texture
15189 coordinates are not updated with the value of these `glTexCoord'
15190 commands.
15191
15192 `GL_MAP1_TEXTURE_COORD_3'
15193 Each control point is three floating-point values representing the
15194 S , T , and R texture coordinates. Internal `glTexCoord3' commands
15195 are generated when the map is evaluated but the current texture
15196 coordinates are not updated with the value of these `glTexCoord'
15197 commands.
15198
15199 `GL_MAP1_TEXTURE_COORD_4'
15200 Each control point is four floating-point values representing the S
15201 , T , R , and Q texture coordinates. Internal `glTexCoord4'
15202 commands are generated when the map is evaluated but the current
15203 texture coordinates are not updated with the value of these
15204 `glTexCoord' commands.
15205
15206 STRIDE, ORDER, and POINTS define the array addressing for accessing the
15207 control points. POINTS is the location of the first control point, which
15208 occupies one, two, three, or four contiguous memory locations, depending
15209 on which map is being defined. ORDER is the number of control points in
15210 the array. STRIDE specifies how many float or double locations to
15211 advance the internal memory pointer to reach the next control point.
15212
15213 `GL_INVALID_ENUM' is generated if TARGET is not an accepted value.
15214
15215 `GL_INVALID_VALUE' is generated if U1 is equal to U2.
15216
15217 `GL_INVALID_VALUE' is generated if STRIDE is less than the number of
15218 values in a control point.
15219
15220 `GL_INVALID_VALUE' is generated if ORDER is less than 1 or greater than
15221 the return value of `GL_MAX_EVAL_ORDER'.
15222
15223 `GL_INVALID_OPERATION' is generated if `glMap1' is executed between the
15224 execution of `glBegin' and the corresponding execution of `glEnd'.
15225
15226 `GL_INVALID_OPERATION' is generated if `glMap1' is called and the value
15227 of `GL_ACTIVE_TEXTURE' is not `GL_TEXTURE0'.")
15228
15229 (define-gl-procedures
15230 ((glMap2f
15231 (target GLenum)
15232 (u1 GLfloat)
15233 (u2 GLfloat)
15234 (ustride GLint)
15235 (uorder GLint)
15236 (v1 GLfloat)
15237 (v2 GLfloat)
15238 (vstride GLint)
15239 (vorder GLint)
15240 (points const-GLfloat-*)
15241 ->
15242 void)
15243 (glMap2d
15244 (target GLenum)
15245 (u1 GLdouble)
15246 (u2 GLdouble)
15247 (ustride GLint)
15248 (uorder GLint)
15249 (v1 GLdouble)
15250 (v2 GLdouble)
15251 (vstride GLint)
15252 (vorder GLint)
15253 (points const-GLdouble-*)
15254 ->
15255 void))
15256 "Define a two-dimensional evaluator.
15257
15258 TARGET
15259 Specifies the kind of values that are generated by the evaluator.
15260 Symbolic constants `GL_MAP2_VERTEX_3', `GL_MAP2_VERTEX_4',
15261 `GL_MAP2_INDEX', `GL_MAP2_COLOR_4', `GL_MAP2_NORMAL',
15262 `GL_MAP2_TEXTURE_COORD_1', `GL_MAP2_TEXTURE_COORD_2',
15263 `GL_MAP2_TEXTURE_COORD_3', and `GL_MAP2_TEXTURE_COORD_4' are
15264 accepted.
15265
15266 U1
15267 U2
15268
15269 Specify a linear mapping of U , as presented to `glEvalCoord2', to
15270 U^ , one of the two variables that are evaluated by the equations
15271 specified by this command. Initially, U1 is 0 and U2 is 1.
15272
15273 USTRIDE
15274 Specifies the number of floats or doubles between the beginning of
15275 control point R_IJ and the beginning of control point R_(I+1,)\u2062J, ,
15276 where I and J are the U and V control point indices, respectively.
15277 This allows control points to be embedded in arbitrary data
15278 structures. The only constraint is that the values for a particular
15279 control point must occupy contiguous memory locations. The initial
15280 value of USTRIDE is 0.
15281
15282 UORDER
15283 Specifies the dimension of the control point array in the U axis.
15284 Must be positive. The initial value is 1.
15285
15286 V1
15287 V2
15288
15289 Specify a linear mapping of V , as presented to `glEvalCoord2', to
15290 V^ , one of the two variables that are evaluated by the equations
15291 specified by this command. Initially, V1 is 0 and V2 is 1.
15292
15293 VSTRIDE
15294 Specifies the number of floats or doubles between the beginning of
15295 control point R_IJ and the beginning of control point R_I\u2061(J+1,), ,
15296 where I and J are the U and V control point indices, respectively.
15297 This allows control points to be embedded in arbitrary data
15298 structures. The only constraint is that the values for a particular
15299 control point must occupy contiguous memory locations. The initial
15300 value of VSTRIDE is 0.
15301
15302 VORDER
15303 Specifies the dimension of the control point array in the V axis.
15304 Must be positive. The initial value is 1.
15305
15306 POINTS
15307 Specifies a pointer to the array of control points.
15308
15309 Evaluators provide a way to use polynomial or rational polynomial
15310 mapping to produce vertices, normals, texture coordinates, and colors.
15311 The values produced by an evaluator are sent on to further stages of GL
15312 processing just as if they had been presented using `glVertex',
15313 `glNormal', `glTexCoord', and `glColor' commands, except that the
15314 generated values do not update the current normal, texture coordinates,
15315 or color.
15316
15317 All polynomial or rational polynomial splines of any degree (up to the
15318 maximum degree supported by the GL implementation) can be described
15319 using evaluators. These include almost all surfaces used in computer
15320 graphics, including B-spline surfaces, NURBS surfaces, Bezier surfaces,
15321 and so on.
15322
15323 Evaluators define surfaces based on bivariate Bernstein polynomials.
15324 Define P\u2061(U^,V^) as
15325
15326 P\u2061(U^,V^)=ΣI=0NΣJ=0MB_I,^N\u2061(U^,)\u2062B_J,^M\u2061(V^,)\u2062R_IJ
15327
15328
15329
15330 where R_IJ is a control point, B_I,^N\u2061(U^,) is the I th Bernstein
15331 polynomial of degree N (UORDER = N+1 )
15332
15333 B_I,^N\u2061(U^,)=((N), (I),,)\u2062U^,^I\u2062(1-U^,)^N-I,,
15334
15335 and B_J,^M\u2061(V^,) is the J th Bernstein polynomial of degree M (VORDER =
15336 M+1 )
15337
15338 B_J,^M\u2061(V^,)=((M), (J),,)\u2062V^,^J\u2062(1-V^,)^M-J,,
15339
15340 Recall that 0^0==1 and ((N), (0),,)==1
15341
15342 `glMap2' is used to define the basis and to specify what kind of values
15343 are produced. Once defined, a map can be enabled and disabled by calling
15344 `glEnable' and `glDisable' with the map name, one of the nine predefined
15345 values for TARGET, described below. When `glEvalCoord2' presents values
15346 U and V , the bivariate Bernstein polynomials are evaluated using U^ and
15347 V^ , where
15348
15349 U^=U-U1,/U2-U1,
15350
15351 V^=V-V1,/V2-V1,
15352
15353 TARGET is a symbolic constant that indicates what kind of control points
15354 are provided in POINTS, and what output is generated when the map is
15355 evaluated. It can assume one of nine predefined values:
15356
15357 `GL_MAP2_VERTEX_3'
15358 Each control point is three floating-point values representing X ,
15359 Y , and Z . Internal `glVertex3' commands are generated when the
15360 map is evaluated.
15361
15362 `GL_MAP2_VERTEX_4'
15363 Each control point is four floating-point values representing X , Y
15364 , Z , and W . Internal `glVertex4' commands are generated when the
15365 map is evaluated.
15366
15367 `GL_MAP2_INDEX'
15368 Each control point is a single floating-point value representing a
15369 color index. Internal `glIndex' commands are generated when the map
15370 is evaluated but the current index is not updated with the value of
15371 these `glIndex' commands.
15372
15373 `GL_MAP2_COLOR_4'
15374 Each control point is four floating-point values representing red,
15375 green, blue, and alpha. Internal `glColor4' commands are generated
15376 when the map is evaluated but the current color is not updated with
15377 the value of these `glColor4' commands.
15378
15379 `GL_MAP2_NORMAL'
15380 Each control point is three floating-point values representing the
15381 X , Y , and Z components of a normal vector. Internal `glNormal'
15382 commands are generated when the map is evaluated but the current
15383 normal is not updated with the value of these `glNormal' commands.
15384
15385 `GL_MAP2_TEXTURE_COORD_1'
15386 Each control point is a single floating-point value representing
15387 the S texture coordinate. Internal `glTexCoord1' commands are
15388 generated when the map is evaluated but the current texture
15389 coordinates are not updated with the value of these `glTexCoord'
15390 commands.
15391
15392 `GL_MAP2_TEXTURE_COORD_2'
15393 Each control point is two floating-point values representing the S
15394 and T texture coordinates. Internal `glTexCoord2' commands are
15395 generated when the map is evaluated but the current texture
15396 coordinates are not updated with the value of these `glTexCoord'
15397 commands.
15398
15399 `GL_MAP2_TEXTURE_COORD_3'
15400 Each control point is three floating-point values representing the
15401 S , T , and R texture coordinates. Internal `glTexCoord3' commands
15402 are generated when the map is evaluated but the current texture
15403 coordinates are not updated with the value of these `glTexCoord'
15404 commands.
15405
15406 `GL_MAP2_TEXTURE_COORD_4'
15407 Each control point is four floating-point values representing the S
15408 , T , R , and Q texture coordinates. Internal `glTexCoord4'
15409 commands are generated when the map is evaluated but the current
15410 texture coordinates are not updated with the value of these
15411 `glTexCoord' commands.
15412
15413 USTRIDE, UORDER, VSTRIDE, VORDER, and POINTS define the array addressing
15414 for accessing the control points. POINTS is the location of the first
15415 control point, which occupies one, two, three, or four contiguous memory
15416 locations, depending on which map is being defined. There are
15417 UORDER×VORDER control points in the array. USTRIDE specifies how many
15418 float or double locations are skipped to advance the internal memory
15419 pointer from control point R_I\u2062J, to control point R_(I+1,)\u2062J, . VSTRIDE
15420 specifies how many float or double locations are skipped to advance the
15421 internal memory pointer from control point R_I\u2062J, to control point
15422 R_I\u2061(J+1,), .
15423
15424 `GL_INVALID_ENUM' is generated if TARGET is not an accepted value.
15425
15426 `GL_INVALID_VALUE' is generated if U1 is equal to U2, or if V1 is equal
15427 to V2.
15428
15429 `GL_INVALID_VALUE' is generated if either USTRIDE or VSTRIDE is less
15430 than the number of values in a control point.
15431
15432 `GL_INVALID_VALUE' is generated if either UORDER or VORDER is less than
15433 1 or greater than the return value of `GL_MAX_EVAL_ORDER'.
15434
15435 `GL_INVALID_OPERATION' is generated if `glMap2' is executed between the
15436 execution of `glBegin' and the corresponding execution of `glEnd'.
15437
15438 `GL_INVALID_OPERATION' is generated if `glMap2' is called and the value
15439 of `GL_ACTIVE_TEXTURE' is not `GL_TEXTURE0'.")
15440
15441 (define-gl-procedures
15442 ((glMapBuffer
15443 (target GLenum)
15444 (access GLenum)
15445 ->
15446 void-*)
15447 (glUnmapBuffer (target GLenum) -> GLboolean))
15448 "Map a buffer object's data store.
15449
15450 TARGET
15451 Specifies the target buffer object being mapped. The symbolic
15452 constant must be `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
15453 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
15454
15455 ACCESS
15456 Specifies the access policy, indicating whether it will be possible
15457 to read from, write to, or both read from and write to the buffer
15458 object's mapped data store. The symbolic constant must be
15459 `GL_READ_ONLY', `GL_WRITE_ONLY', or `GL_READ_WRITE'.
15460
15461 `glMapBuffer' maps to the client's address space the entire data store
15462 of the buffer object currently bound to TARGET. The data can then be
15463 directly read and/or written relative to the returned pointer, depending
15464 on the specified ACCESS policy. If the GL is unable to map the buffer
15465 object's data store, `glMapBuffer' generates an error and returns
15466 `NULL'. This may occur for system-specific reasons, such as low virtual
15467 memory availability.
15468
15469 If a mapped data store is accessed in a way inconsistent with the
15470 specified ACCESS policy, no error is generated, but performance may be
15471 negatively impacted and system errors, including program termination,
15472 may result. Unlike the USAGE parameter of `glBufferData', ACCESS is not
15473 a hint, and does in fact constrain the usage of the mapped data store on
15474 some GL implementations. In order to achieve the highest performance
15475 available, a buffer object's data store should be used in ways
15476 consistent with both its specified USAGE and ACCESS parameters.
15477
15478 A mapped data store must be unmapped with `glUnmapBuffer' before its
15479 buffer object is used. Otherwise an error will be generated by any GL
15480 command that attempts to dereference the buffer object's data store.
15481 When a data store is unmapped, the pointer to its data store becomes
15482 invalid. `glUnmapBuffer' returns `GL_TRUE' unless the data store
15483 contents have become corrupt during the time the data store was mapped.
15484 This can occur for system-specific reasons that affect the availability
15485 of graphics memory, such as screen mode changes. In such situations,
15486 `GL_FALSE' is returned and the data store contents are undefined. An
15487 application must detect this rare condition and reinitialize the data
15488 store.
15489
15490 A buffer object's mapped data store is automatically unmapped when the
15491 buffer object is deleted or its data store is recreated with
15492 `glBufferData'.
15493
15494 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
15495 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
15496 `GL_PIXEL_UNPACK_BUFFER'.
15497
15498 `GL_INVALID_ENUM' is generated if ACCESS is not `GL_READ_ONLY',
15499 `GL_WRITE_ONLY', or `GL_READ_WRITE'.
15500
15501 `GL_OUT_OF_MEMORY' is generated when `glMapBuffer' is executed if the GL
15502 is unable to map the buffer object's data store. This may occur for a
15503 variety of system-specific reasons, such as the absence of sufficient
15504 remaining virtual memory.
15505
15506 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
15507 is bound to TARGET.
15508
15509 `GL_INVALID_OPERATION' is generated if `glMapBuffer' is executed for a
15510 buffer object whose data store is already mapped.
15511
15512 `GL_INVALID_OPERATION' is generated if `glUnmapBuffer' is executed for a
15513 buffer object whose data store is not currently mapped.
15514
15515 `GL_INVALID_OPERATION' is generated if `glMapBuffer' or `glUnmapBuffer'
15516 is executed between the execution of `glBegin' and the corresponding
15517 execution of `glEnd'.")
15518
15519 (define-gl-procedures
15520 ((glMapGrid1d
15521 (un GLint)
15522 (u1 GLdouble)
15523 (u2 GLdouble)
15524 ->
15525 void)
15526 (glMapGrid1f
15527 (un GLint)
15528 (u1 GLfloat)
15529 (u2 GLfloat)
15530 ->
15531 void)
15532 (glMapGrid2d
15533 (un GLint)
15534 (u1 GLdouble)
15535 (u2 GLdouble)
15536 (vn GLint)
15537 (v1 GLdouble)
15538 (v2 GLdouble)
15539 ->
15540 void)
15541 (glMapGrid2f
15542 (un GLint)
15543 (u1 GLfloat)
15544 (u2 GLfloat)
15545 (vn GLint)
15546 (v1 GLfloat)
15547 (v2 GLfloat)
15548 ->
15549 void))
15550 "Define a one- or two-dimensional mesh.
15551
15552 UN
15553 Specifies the number of partitions in the grid range interval [U1,
15554 U2]. Must be positive.
15555
15556 U1
15557 U2
15558
15559 Specify the mappings for integer grid domain values I=0 and I=UN .
15560
15561 VN
15562 Specifies the number of partitions in the grid range interval [V1,
15563 V2] (`glMapGrid2' only).
15564
15565 V1
15566 V2
15567
15568 Specify the mappings for integer grid domain values J=0 and J=VN
15569 (`glMapGrid2' only).
15570
15571 `glMapGrid' and `glEvalMesh' are used together to efficiently generate
15572 and evaluate a series of evenly-spaced map domain values. `glEvalMesh'
15573 steps through the integer domain of a one- or two-dimensional grid,
15574 whose range is the domain of the evaluation maps specified by `glMap1'
15575 and `glMap2'.
15576
15577 `glMapGrid1' and `glMapGrid2' specify the linear grid mappings between
15578 the I (or I and J ) integer grid coordinates, to the U (or U and V )
15579 floating-point evaluation map coordinates. See `glMap1' and `glMap2' for
15580 details of how U and V coordinates are evaluated.
15581
15582 `glMapGrid1' specifies a single linear mapping such that integer grid
15583 coordinate 0 maps exactly to U1, and integer grid coordinate UN maps
15584 exactly to U2. All other integer grid coordinates I are mapped so that
15585
15586 U=I\u2061(U2-U1,)/UN+U1
15587
15588 `glMapGrid2' specifies two such linear mappings. One maps integer grid
15589 coordinate I=0 exactly to U1, and integer grid coordinate I=UN exactly
15590 to U2. The other maps integer grid coordinate J=0 exactly to V1, and
15591 integer grid coordinate J=VN exactly to V2. Other integer grid
15592 coordinates I and J are mapped such that
15593
15594 U=I\u2061(U2-U1,)/UN+U1
15595
15596 V=J\u2061(V2-V1,)/VN+V1
15597
15598 The mappings specified by `glMapGrid' are used identically by
15599 `glEvalMesh' and `glEvalPoint'.
15600
15601 `GL_INVALID_VALUE' is generated if either UN or VN is not positive.
15602
15603 `GL_INVALID_OPERATION' is generated if `glMapGrid' is executed between
15604 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15605
15606 (define-gl-procedures
15607 ((glMaterialf
15608 (face GLenum)
15609 (pname GLenum)
15610 (param GLfloat)
15611 ->
15612 void)
15613 (glMateriali
15614 (face GLenum)
15615 (pname GLenum)
15616 (param GLint)
15617 ->
15618 void)
15619 (glMaterialfv
15620 (face GLenum)
15621 (pname GLenum)
15622 (params const-GLfloat-*)
15623 ->
15624 void)
15625 (glMaterialiv
15626 (face GLenum)
15627 (pname GLenum)
15628 (params const-GLint-*)
15629 ->
15630 void))
15631 "Specify material parameters for the lighting model.
15632
15633 FACE
15634 Specifies which face or faces are being updated. Must be one of
15635 `GL_FRONT', `GL_BACK', or `GL_FRONT_AND_BACK'.
15636
15637 PNAME
15638 Specifies the single-valued material parameter of the face or faces
15639 that is being updated. Must be `GL_SHININESS'.
15640
15641 PARAM
15642 Specifies the value that parameter `GL_SHININESS' will be set to.
15643
15644 `glMaterial' assigns values to material parameters. There are two
15645 matched sets of material parameters. One, the FRONT-FACING set, is used
15646 to shade points, lines, bitmaps, and all polygons (when two-sided
15647 lighting is disabled), or just front-facing polygons (when two-sided
15648 lighting is enabled). The other set, BACK-FACING, is used to shade
15649 back-facing polygons only when two-sided lighting is enabled. Refer to
15650 the `glLightModel' reference page for details concerning one- and
15651 two-sided lighting calculations.
15652
15653 `glMaterial' takes three arguments. The first, FACE, specifies whether
15654 the `GL_FRONT' materials, the `GL_BACK' materials, or both
15655 `GL_FRONT_AND_BACK' materials will be modified. The second, PNAME,
15656 specifies which of several parameters in one or both sets will be
15657 modified. The third, PARAMS, specifies what value or values will be
15658 assigned to the specified parameter.
15659
15660 Material parameters are used in the lighting equation that is optionally
15661 applied to each vertex. The equation is discussed in the `glLightModel'
15662 reference page. The parameters that can be specified using `glMaterial',
15663 and their interpretations by the lighting equation, are as follows:
15664
15665 `GL_AMBIENT'
15666 PARAMS contains four integer or floating-point values that specify
15667 the ambient RGBA reflectance of the material. Integer values are
15668 mapped linearly such that the most positive representable value
15669 maps to 1.0, and the most negative representable value maps to -1.0
15670 . Floating-point values are mapped directly. Neither integer nor
15671 floating-point values are clamped. The initial ambient reflectance
15672 for both front- and back-facing materials is (0.2, 0.2, 0.2, 1.0).
15673
15674 `GL_DIFFUSE'
15675 PARAMS contains four integer or floating-point values that specify
15676 the diffuse RGBA reflectance of the material. Integer values are
15677 mapped linearly such that the most positive representable value
15678 maps to 1.0, and the most negative representable value maps to -1.0
15679 . Floating-point values are mapped directly. Neither integer nor
15680 floating-point values are clamped. The initial diffuse reflectance
15681 for both front- and back-facing materials is (0.8, 0.8, 0.8, 1.0).
15682
15683 `GL_SPECULAR'
15684 PARAMS contains four integer or floating-point values that specify
15685 the specular RGBA reflectance of the material. Integer values are
15686 mapped linearly such that the most positive representable value
15687 maps to 1.0, and the most negative representable value maps to -1.0
15688 . Floating-point values are mapped directly. Neither integer nor
15689 floating-point values are clamped. The initial specular reflectance
15690 for both front- and back-facing materials is (0, 0, 0, 1).
15691
15692 `GL_EMISSION'
15693 PARAMS contains four integer or floating-point values that specify
15694 the RGBA emitted light intensity of the material. Integer values
15695 are mapped linearly such that the most positive representable value
15696 maps to 1.0, and the most negative representable value maps to -1.0
15697 . Floating-point values are mapped directly. Neither integer nor
15698 floating-point values are clamped. The initial emission intensity
15699 for both front- and back-facing materials is (0, 0, 0, 1).
15700
15701 `GL_SHININESS'
15702 PARAMS is a single integer or floating-point value that specifies
15703 the RGBA specular exponent of the material. Integer and
15704 floating-point values are mapped directly. Only values in the range
15705 [0,128] are accepted. The initial specular exponent for both front-
15706 and back-facing materials is 0.
15707
15708 `GL_AMBIENT_AND_DIFFUSE'
15709 Equivalent to calling `glMaterial' twice with the same parameter
15710 values, once with `GL_AMBIENT' and once with `GL_DIFFUSE'.
15711
15712 `GL_COLOR_INDEXES'
15713 PARAMS contains three integer or floating-point values specifying
15714 the color indices for ambient, diffuse, and specular lighting.
15715 These three values, and `GL_SHININESS', are the only material
15716 values used by the color index mode lighting equation. Refer to the
15717 `glLightModel' reference page for a discussion of color index
15718 lighting.
15719
15720 `GL_INVALID_ENUM' is generated if either FACE or PNAME is not an
15721 accepted value.
15722
15723 `GL_INVALID_VALUE' is generated if a specular exponent outside the range
15724 [0,128] is specified.")
15725
15726 (define-gl-procedures
15727 ((glMatrixMode (mode GLenum) -> void))
15728 "Specify which matrix is the current matrix.
15729
15730 MODE
15731 Specifies which matrix stack is the target for subsequent matrix
15732 operations. Three values are accepted: `GL_MODELVIEW',
15733 `GL_PROJECTION', and `GL_TEXTURE'. The initial value is
15734 `GL_MODELVIEW'. Additionally, if the `ARB_imaging' extension is
15735 supported, `GL_COLOR' is also accepted.
15736
15737 `glMatrixMode' sets the current matrix mode. MODE can assume one of four
15738 values:
15739
15740 `GL_MODELVIEW'
15741 Applies subsequent matrix operations to the modelview matrix stack.
15742
15743 `GL_PROJECTION'
15744 Applies subsequent matrix operations to the projection matrix
15745 stack.
15746
15747 `GL_TEXTURE'
15748 Applies subsequent matrix operations to the texture matrix stack.
15749
15750 `GL_COLOR'
15751 Applies subsequent matrix operations to the color matrix stack.
15752
15753 To find out which matrix stack is currently the target of all matrix
15754 operations, call `glGet' with argument `GL_MATRIX_MODE'. The initial
15755 value is `GL_MODELVIEW'.
15756
15757 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15758
15759 `GL_INVALID_OPERATION' is generated if `glMatrixMode' is executed
15760 between the execution of `glBegin' and the corresponding execution of
15761 `glEnd'.")
15762
15763 (define-gl-procedures
15764 ((glMinmax
15765 (target GLenum)
15766 (internalformat GLenum)
15767 (sink GLboolean)
15768 ->
15769 void))
15770 "Define minmax table.
15771
15772 TARGET
15773 The minmax table whose parameters are to be set. Must be
15774 `GL_MINMAX'.
15775
15776 INTERNALFORMAT
15777 The format of entries in the minmax table. Must be one of
15778 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
15779 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
15780 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
15781 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
15782 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
15783 `GL_LUMINANCE16_ALPHA16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4',
15784 `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16',
15785 `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8',
15786 `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
15787
15788 SINK
15789 If `GL_TRUE', pixels will be consumed by the minmax process and no
15790 drawing or texture loading will take place. If `GL_FALSE', pixels
15791 will proceed to the final conversion process after minmax.
15792
15793 When `GL_MINMAX' is enabled, the RGBA components of incoming pixels are
15794 compared to the minimum and maximum values for each component, which are
15795 stored in the two-element minmax table. (The first element stores the
15796 minima, and the second element stores the maxima.) If a pixel component
15797 is greater than the corresponding component in the maximum element, then
15798 the maximum element is updated with the pixel component value. If a
15799 pixel component is less than the corresponding component in the minimum
15800 element, then the minimum element is updated with the pixel component
15801 value. (In both cases, if the internal format of the minmax table
15802 includes luminance, then the R color component of incoming pixels is
15803 used for comparison.) The contents of the minmax table may be retrieved
15804 at a later time by calling `glGetMinmax'. The minmax operation is
15805 enabled or disabled by calling `glEnable' or `glDisable', respectively,
15806 with an argument of `GL_MINMAX'.
15807
15808 `glMinmax' redefines the current minmax table to have entries of the
15809 format specified by INTERNALFORMAT. The maximum element is initialized
15810 with the smallest possible component values, and the minimum element is
15811 initialized with the largest possible component values. The values in
15812 the previous minmax table, if any, are lost. If SINK is `GL_TRUE', then
15813 pixels are discarded after minmax; no further processing of the pixels
15814 takes place, and no drawing, texture loading, or pixel readback will
15815 result.
15816
15817
15818
15819 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
15820 values.
15821
15822 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
15823 allowable values.
15824
15825 `GL_INVALID_OPERATION' is generated if `glMinmax' is executed between
15826 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15827
15828 (define-gl-procedures
15829 ((glMultiDrawArrays
15830 (mode GLenum)
15831 (first GLint-*)
15832 (count GLsizei-*)
15833 (primcount GLsizei)
15834 ->
15835 void))
15836 "Render multiple sets of primitives from array data.
15837
15838 MODE
15839 Specifies what kind of primitives to render. Symbolic constants
15840 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
15841 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
15842 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
15843
15844 FIRST
15845 Points to an array of starting indices in the enabled arrays.
15846
15847 COUNT
15848 Points to an array of the number of indices to be rendered.
15849
15850 PRIMCOUNT
15851 Specifies the size of the first and count
15852
15853 `glMultiDrawArrays' specifies multiple sets of geometric primitives with
15854 very few subroutine calls. Instead of calling a GL procedure to pass
15855 each individual vertex, normal, texture coordinate, edge flag, or color,
15856 you can prespecify separate arrays of vertices, normals, and colors and
15857 use them to construct a sequence of primitives with a single call to
15858 `glMultiDrawArrays'.
15859
15860 `glMultiDrawArrays' behaves identically to `glDrawArrays' except that
15861 PRIMCOUNT separate ranges of elements are specified instead.
15862
15863 When `glMultiDrawArrays' is called, it uses COUNT sequential elements
15864 from each enabled array to construct a sequence of geometric primitives,
15865 beginning with element FIRST. MODE specifies what kind of primitives are
15866 constructed, and how the array elements construct those primitives. If
15867 `GL_VERTEX_ARRAY' is not enabled, no geometric primitives are generated.
15868
15869 Vertex attributes that are modified by `glMultiDrawArrays' have an
15870 unspecified value after `glMultiDrawArrays' returns. For example, if
15871 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
15872 after `glMultiDrawArrays' executes. Attributes that aren't modified
15873 remain well defined.
15874
15875 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15876
15877 `GL_INVALID_VALUE' is generated if PRIMCOUNT is negative.
15878
15879 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
15880 bound to an enabled array and the buffer object's data store is
15881 currently mapped.
15882
15883 `GL_INVALID_OPERATION' is generated if `glMultiDrawArrays' is executed
15884 between the execution of `glBegin' and the corresponding `glEnd'.")
15885
15886 (define-gl-procedures
15887 ((glMultiDrawElements
15888 (mode GLenum)
15889 (count const-GLsizei-*)
15890 (type GLenum)
15891 (indices const-GLvoid-**)
15892 (primcount GLsizei)
15893 ->
15894 void))
15895 "Render multiple sets of primitives by specifying indices of array data
15896 elements.
15897
15898 MODE
15899 Specifies what kind of primitives to render. Symbolic constants
15900 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
15901 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
15902 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
15903
15904 COUNT
15905 Points to an array of the elements counts.
15906
15907 TYPE
15908 Specifies the type of the values in INDICES. Must be one of
15909 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
15910
15911 INDICES
15912 Specifies a pointer to the location where the indices are stored.
15913
15914 PRIMCOUNT
15915 Specifies the size of the COUNT array.
15916
15917 `glMultiDrawElements' specifies multiple sets of geometric primitives
15918 with very few subroutine calls. Instead of calling a GL function to pass
15919 each individual vertex, normal, texture coordinate, edge flag, or color,
15920 you can prespecify separate arrays of vertices, normals, and so on, and
15921 use them to construct a sequence of primitives with a single call to
15922 `glMultiDrawElements'.
15923
15924 `glMultiDrawElements' is identical in operation to `glDrawElements'
15925 except that PRIMCOUNT separate lists of elements are specified.
15926
15927 Vertex attributes that are modified by `glMultiDrawElements' have an
15928 unspecified value after `glMultiDrawElements' returns. For example, if
15929 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
15930 after `glMultiDrawElements' executes. Attributes that aren't modified
15931 maintain their previous values.
15932
15933 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15934
15935 `GL_INVALID_VALUE' is generated if PRIMCOUNT is negative.
15936
15937 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
15938 bound to an enabled array or the element array and the buffer object's
15939 data store is currently mapped.
15940
15941 `GL_INVALID_OPERATION' is generated if `glMultiDrawElements' is executed
15942 between the execution of `glBegin' and the corresponding `glEnd'.")
15943
15944 (define-gl-procedures
15945 ((glMultiTexCoord1s
15946 (target GLenum)
15947 (s GLshort)
15948 ->
15949 void)
15950 (glMultiTexCoord1i
15951 (target GLenum)
15952 (s GLint)
15953 ->
15954 void)
15955 (glMultiTexCoord1f
15956 (target GLenum)
15957 (s GLfloat)
15958 ->
15959 void)
15960 (glMultiTexCoord1d
15961 (target GLenum)
15962 (s GLdouble)
15963 ->
15964 void)
15965 (glMultiTexCoord2s
15966 (target GLenum)
15967 (s GLshort)
15968 (t GLshort)
15969 ->
15970 void)
15971 (glMultiTexCoord2i
15972 (target GLenum)
15973 (s GLint)
15974 (t GLint)
15975 ->
15976 void)
15977 (glMultiTexCoord2f
15978 (target GLenum)
15979 (s GLfloat)
15980 (t GLfloat)
15981 ->
15982 void)
15983 (glMultiTexCoord2d
15984 (target GLenum)
15985 (s GLdouble)
15986 (t GLdouble)
15987 ->
15988 void)
15989 (glMultiTexCoord3s
15990 (target GLenum)
15991 (s GLshort)
15992 (t GLshort)
15993 (r GLshort)
15994 ->
15995 void)
15996 (glMultiTexCoord3i
15997 (target GLenum)
15998 (s GLint)
15999 (t GLint)
16000 (r GLint)
16001 ->
16002 void)
16003 (glMultiTexCoord3f
16004 (target GLenum)
16005 (s GLfloat)
16006 (t GLfloat)
16007 (r GLfloat)
16008 ->
16009 void)
16010 (glMultiTexCoord3d
16011 (target GLenum)
16012 (s GLdouble)
16013 (t GLdouble)
16014 (r GLdouble)
16015 ->
16016 void)
16017 (glMultiTexCoord4s
16018 (target GLenum)
16019 (s GLshort)
16020 (t GLshort)
16021 (r GLshort)
16022 (q GLshort)
16023 ->
16024 void)
16025 (glMultiTexCoord4i
16026 (target GLenum)
16027 (s GLint)
16028 (t GLint)
16029 (r GLint)
16030 (q GLint)
16031 ->
16032 void)
16033 (glMultiTexCoord4f
16034 (target GLenum)
16035 (s GLfloat)
16036 (t GLfloat)
16037 (r GLfloat)
16038 (q GLfloat)
16039 ->
16040 void)
16041 (glMultiTexCoord4d
16042 (target GLenum)
16043 (s GLdouble)
16044 (t GLdouble)
16045 (r GLdouble)
16046 (q GLdouble)
16047 ->
16048 void)
16049 (glMultiTexCoord1sv
16050 (target GLenum)
16051 (v const-GLshort-*)
16052 ->
16053 void)
16054 (glMultiTexCoord1iv
16055 (target GLenum)
16056 (v const-GLint-*)
16057 ->
16058 void)
16059 (glMultiTexCoord1fv
16060 (target GLenum)
16061 (v const-GLfloat-*)
16062 ->
16063 void)
16064 (glMultiTexCoord1dv
16065 (target GLenum)
16066 (v const-GLdouble-*)
16067 ->
16068 void)
16069 (glMultiTexCoord2sv
16070 (target GLenum)
16071 (v const-GLshort-*)
16072 ->
16073 void)
16074 (glMultiTexCoord2iv
16075 (target GLenum)
16076 (v const-GLint-*)
16077 ->
16078 void)
16079 (glMultiTexCoord2fv
16080 (target GLenum)
16081 (v const-GLfloat-*)
16082 ->
16083 void)
16084 (glMultiTexCoord2dv
16085 (target GLenum)
16086 (v const-GLdouble-*)
16087 ->
16088 void)
16089 (glMultiTexCoord3sv
16090 (target GLenum)
16091 (v const-GLshort-*)
16092 ->
16093 void)
16094 (glMultiTexCoord3iv
16095 (target GLenum)
16096 (v const-GLint-*)
16097 ->
16098 void)
16099 (glMultiTexCoord3fv
16100 (target GLenum)
16101 (v const-GLfloat-*)
16102 ->
16103 void)
16104 (glMultiTexCoord3dv
16105 (target GLenum)
16106 (v const-GLdouble-*)
16107 ->
16108 void)
16109 (glMultiTexCoord4sv
16110 (target GLenum)
16111 (v const-GLshort-*)
16112 ->
16113 void)
16114 (glMultiTexCoord4iv
16115 (target GLenum)
16116 (v const-GLint-*)
16117 ->
16118 void)
16119 (glMultiTexCoord4fv
16120 (target GLenum)
16121 (v const-GLfloat-*)
16122 ->
16123 void)
16124 (glMultiTexCoord4dv
16125 (target GLenum)
16126 (v const-GLdouble-*)
16127 ->
16128 void))
16129 "Set the current texture coordinates.
16130
16131 TARGET
16132 Specifies the texture unit whose coordinates should be modified.
16133 The number of texture units is implementation dependent, but must
16134 be at least two. Symbolic constant must be one of `GL_TEXTURE' I ,
16135 where i ranges from 0 to `GL_MAX_TEXTURE_COORDS' - 1, which is an
16136 implementation-dependent value.
16137
16138 S
16139 T
16140
16141 R
16142
16143 Q
16144
16145 Specify S, T, R, and Q texture coordinates for TARGET texture unit.
16146 Not all parameters are present in all forms of the command.
16147
16148 `glMultiTexCoord' specifies texture coordinates in one, two, three, or
16149 four dimensions. `glMultiTexCoord1' sets the current texture coordinates
16150 to (S,001) ; a call to `glMultiTexCoord2' sets them to (S,T01) .
16151 Similarly, `glMultiTexCoord3' specifies the texture coordinates as
16152 (S,TR1) , and `glMultiTexCoord4' defines all four components explicitly
16153 as (S,TRQ) .
16154
16155 The current texture coordinates are part of the data that is associated
16156 with each vertex and with the current raster position. Initially, the
16157 values for (S,TRQ) are (0,001) .")
16158
16159 (define-gl-procedures
16160 ((glMultMatrixd (m const-GLdouble-*) -> void)
16161 (glMultMatrixf (m const-GLfloat-*) -> void))
16162 "Multiply the current matrix with the specified matrix.
16163
16164 M
16165 Points to 16 consecutive values that are used as the elements of a
16166 4×4 column-major matrix.
16167
16168 `glMultMatrix' multiplies the current matrix with the one specified
16169 using M, and replaces the current matrix with the product.
16170
16171 The current matrix is determined by the current matrix mode (see
16172 `glMatrixMode'). It is either the projection matrix, modelview matrix,
16173 or the texture matrix.
16174
16175 `GL_INVALID_OPERATION' is generated if `glMultMatrix' is executed
16176 between the execution of `glBegin' and the corresponding execution of
16177 `glEnd'.")
16178
16179 (define-gl-procedures
16180 ((glMultTransposeMatrixd
16181 (m const-GLdouble-*)
16182 ->
16183 void)
16184 (glMultTransposeMatrixf
16185 (m const-GLfloat-*)
16186 ->
16187 void))
16188 "Multiply the current matrix with the specified row-major ordered matrix.
16189
16190 M
16191 Points to 16 consecutive values that are used as the elements of a
16192 4×4 row-major matrix.
16193
16194 `glMultTransposeMatrix' multiplies the current matrix with the one
16195 specified using M, and replaces the current matrix with the product.
16196
16197 The current matrix is determined by the current matrix mode (see
16198 `glMatrixMode'). It is either the projection matrix, modelview matrix,
16199 or the texture matrix.
16200
16201 `GL_INVALID_OPERATION' is generated if `glMultTransposeMatrix' is
16202 executed between the execution of `glBegin' and the corresponding
16203 execution of `glEnd'.")
16204
16205 (define-gl-procedures
16206 ((glNewList (list GLuint) (mode GLenum) -> void)
16207 (glEndList -> void))
16208 "Create or replace a display list.
16209
16210 LIST
16211 Specifies the display-list name.
16212
16213 MODE
16214 Specifies the compilation mode, which can be `GL_COMPILE' or
16215 `GL_COMPILE_AND_EXECUTE'.
16216
16217 Display lists are groups of GL commands that have been stored for
16218 subsequent execution. Display lists are created with `glNewList'. All
16219 subsequent commands are placed in the display list, in the order issued,
16220 until `glEndList' is called.
16221
16222 `glNewList' has two arguments. The first argument, LIST, is a positive
16223 integer that becomes the unique name for the display list. Names can be
16224 created and reserved with `glGenLists' and tested for uniqueness with
16225 `glIsList'. The second argument, MODE, is a symbolic constant that can
16226 assume one of two values:
16227
16228 `GL_COMPILE'
16229 Commands are merely compiled.
16230
16231 `GL_COMPILE_AND_EXECUTE'
16232 Commands are executed as they are compiled into the display list.
16233
16234 Certain commands are not compiled into the display list but are executed
16235 immediately, regardless of the display-list mode. These commands are
16236 `glAreTexturesResident', `glColorPointer', `glDeleteLists',
16237 `glDeleteTextures', `glDisableClientState', `glEdgeFlagPointer',
16238 `glEnableClientState', `glFeedbackBuffer', `glFinish', `glFlush',
16239 `glGenLists', `glGenTextures', `glIndexPointer', `glInterleavedArrays',
16240 `glIsEnabled', `glIsList', `glIsTexture', `glNormalPointer',
16241 `glPopClientAttrib', `glPixelStore', `glPushClientAttrib',
16242 `glReadPixels', `glRenderMode', `glSelectBuffer', `glTexCoordPointer',
16243 `glVertexPointer', and all of the `glGet' commands.
16244
16245 Similarly, `glTexImage1D', `glTexImage2D', and `glTexImage3D' are
16246 executed immediately and not compiled into the display list when their
16247 first argument is `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_1D', or
16248 `GL_PROXY_TEXTURE_3D', respectively.
16249
16250 When the `ARB_imaging' extension is supported, `glHistogram' executes
16251 immediately when its argument is `GL_PROXY_HISTOGRAM'. Similarly,
16252 `glColorTable' executes immediately when its first argument is
16253 `GL_PROXY_COLOR_TABLE', `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
16254 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
16255
16256 For OpenGL versions 1.3 and greater, or when the `ARB_multitexture'
16257 extension is supported, `glClientActiveTexture' is not compiled into
16258 display lists, but executed immediately.
16259
16260 When `glEndList' is encountered, the display-list definition is
16261 completed by associating the list with the unique name LIST (specified
16262 in the `glNewList' command). If a display list with name LIST already
16263 exists, it is replaced only when `glEndList' is called.
16264
16265 `GL_INVALID_VALUE' is generated if LIST is 0.
16266
16267 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
16268
16269 `GL_INVALID_OPERATION' is generated if `glEndList' is called without a
16270 preceding `glNewList', or if `glNewList' is called while a display list
16271 is being defined.
16272
16273 `GL_INVALID_OPERATION' is generated if `glNewList' or `glEndList' is
16274 executed between the execution of `glBegin' and the corresponding
16275 execution of `glEnd'.
16276
16277 `GL_OUT_OF_MEMORY' is generated if there is insufficient memory to
16278 compile the display list. If the GL version is 1.1 or greater, no change
16279 is made to the previous contents of the display list, if any, and no
16280 other change is made to the GL state. (It is as if no attempt had been
16281 made to create the new display list.)")
16282
16283 (define-gl-procedures
16284 ((glNormalPointer
16285 (type GLenum)
16286 (stride GLsizei)
16287 (pointer const-GLvoid-*)
16288 ->
16289 void))
16290 "Define an array of normals.
16291
16292 TYPE
16293 Specifies the data type of each coordinate in the array. Symbolic
16294 constants `GL_BYTE', `GL_SHORT', `GL_INT', `GL_FLOAT', and
16295 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
16296
16297 STRIDE
16298 Specifies the byte offset between consecutive normals. If STRIDE is
16299 0, the normals are understood to be tightly packed in the array.
16300 The initial value is 0.
16301
16302 POINTER
16303 Specifies a pointer to the first coordinate of the first normal in
16304 the array. The initial value is 0.
16305
16306 `glNormalPointer' specifies the location and data format of an array of
16307 normals to use when rendering. TYPE specifies the data type of each
16308 normal coordinate, and STRIDE specifies the byte stride from one normal
16309 to the next, allowing vertices and attributes to be packed into a single
16310 array or stored in separate arrays. (Single-array storage may be more
16311 efficient on some implementations; see `glInterleavedArrays'.)
16312
16313 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
16314 target (see `glBindBuffer') while a normal array is specified, POINTER
16315 is treated as a byte offset into the buffer object's data store. Also,
16316 the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as normal
16317 vertex array client-side state (`GL_NORMAL_ARRAY_BUFFER_BINDING').
16318
16319 When a normal array is specified, TYPE, STRIDE, and POINTER are saved as
16320 client-side state, in addition to the current vertex array buffer object
16321 binding.
16322
16323 To enable and disable the normal array, call `glEnableClientState' and
16324 `glDisableClientState' with the argument `GL_NORMAL_ARRAY'. If enabled,
16325 the normal array is used when `glDrawArrays', `glMultiDrawArrays',
16326 `glDrawElements', `glMultiDrawElements', `glDrawRangeElements', or
16327 `glArrayElement' is called.
16328
16329 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
16330
16331 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
16332
16333 (define-gl-procedures
16334 ((glNormal3b
16335 (nx GLbyte)
16336 (ny GLbyte)
16337 (nz GLbyte)
16338 ->
16339 void)
16340 (glNormal3d
16341 (nx GLdouble)
16342 (ny GLdouble)
16343 (nz GLdouble)
16344 ->
16345 void)
16346 (glNormal3f
16347 (nx GLfloat)
16348 (ny GLfloat)
16349 (nz GLfloat)
16350 ->
16351 void)
16352 (glNormal3i
16353 (nx GLint)
16354 (ny GLint)
16355 (nz GLint)
16356 ->
16357 void)
16358 (glNormal3s
16359 (nx GLshort)
16360 (ny GLshort)
16361 (nz GLshort)
16362 ->
16363 void)
16364 (glNormal3bv (v const-GLbyte-*) -> void)
16365 (glNormal3dv (v const-GLdouble-*) -> void)
16366 (glNormal3fv (v const-GLfloat-*) -> void)
16367 (glNormal3iv (v const-GLint-*) -> void)
16368 (glNormal3sv (v const-GLshort-*) -> void))
16369 "Set the current normal vector.
16370
16371 NX
16372 NY
16373
16374 NZ
16375
16376 Specify the X , Y , and Z coordinates of the new current normal.
16377 The initial value of the current normal is the unit vector, (0, 0,
16378 1).
16379
16380
16381
16382 The current normal is set to the given coordinates whenever `glNormal'
16383 is issued. Byte, short, or integer arguments are converted to
16384 floating-point format with a linear mapping that maps the most positive
16385 representable integer value to 1.0 and the most negative representable
16386 integer value to -1.0 .
16387
16388 Normals specified with `glNormal' need not have unit length. If
16389 `GL_NORMALIZE' is enabled, then normals of any length specified with
16390 `glNormal' are normalized after transformation. If `GL_RESCALE_NORMAL'
16391 is enabled, normals are scaled by a scaling factor derived from the
16392 modelview matrix. `GL_RESCALE_NORMAL' requires that the originally
16393 specified normals were of unit length, and that the modelview matrix
16394 contain only uniform scales for proper results. To enable and disable
16395 normalization, call `glEnable' and `glDisable' with either
16396 `GL_NORMALIZE' or `GL_RESCALE_NORMAL'. Normalization is initially
16397 disabled.")
16398
16399 (define-gl-procedures
16400 ((glOrtho
16401 (left GLdouble)
16402 (right GLdouble)
16403 (bottom GLdouble)
16404 (top GLdouble)
16405 (nearVal GLdouble)
16406 (farVal GLdouble)
16407 ->
16408 void))
16409 "Multiply the current matrix with an orthographic matrix.
16410
16411 LEFT
16412 RIGHT
16413
16414 Specify the coordinates for the left and right vertical clipping
16415 planes.
16416
16417 BOTTOM
16418 TOP
16419
16420 Specify the coordinates for the bottom and top horizontal clipping
16421 planes.
16422
16423 NEARVAL
16424 FARVAL
16425
16426 Specify the distances to the nearer and farther depth clipping
16427 planes. These values are negative if the plane is to be behind the
16428 viewer.
16429
16430 `glOrtho' describes a transformation that produces a parallel
16431 projection. The current matrix (see `glMatrixMode') is multiplied by
16432 this matrix and the result replaces the current matrix, as if
16433 `glMultMatrix' were called with the following matrix as its argument:
16434
16435 ((2/RIGHT-LEFT,, 0 0 T_X,), (0 2/TOP-BOTTOM,, 0 T_Y,), (0 0
16436 -2/FARVAL-NEARVAL,, T_Z,), (0 0 0 1),)
16437
16438 where T_X=-RIGHT+LEFT,/RIGHT-LEFT,, T_Y=-TOP+BOTTOM,/TOP-BOTTOM,,
16439 T_Z=-FARVAL+NEARVAL,/FARVAL-NEARVAL,,
16440
16441 Typically, the matrix mode is `GL_PROJECTION', and (LEFT,BOTTOM-NEARVAL)
16442 and (RIGHT,TOP-NEARVAL) specify the points on the near clipping plane
16443 that are mapped to the lower left and upper right corners of the window,
16444 respectively, assuming that the eye is located at (0, 0, 0). -FARVAL
16445 specifies the location of the far clipping plane. Both NEARVAL and
16446 FARVAL can be either positive or negative.
16447
16448 Use `glPushMatrix' and `glPopMatrix' to save and restore the current
16449 matrix stack.
16450
16451 `GL_INVALID_VALUE' is generated if LEFT = RIGHT, or BOTTOM = TOP, or
16452 NEAR = FAR.
16453
16454 `GL_INVALID_OPERATION' is generated if `glOrtho' is executed between the
16455 execution of `glBegin' and the corresponding execution of `glEnd'.")
16456
16457 (define-gl-procedures
16458 ((glPassThrough (token GLfloat) -> void))
16459 "Place a marker in the feedback buffer.
16460
16461 TOKEN
16462 Specifies a marker value to be placed in the feedback buffer
16463 following a `GL_PASS_THROUGH_TOKEN'.
16464
16465
16466
16467 Feedback is a GL render mode. The mode is selected by calling
16468 `glRenderMode' with `GL_FEEDBACK'. When the GL is in feedback mode, no
16469 pixels are produced by rasterization. Instead, information about
16470 primitives that would have been rasterized is fed back to the
16471 application using the GL. See the `glFeedbackBuffer' reference page for
16472 a description of the feedback buffer and the values in it.
16473
16474 `glPassThrough' inserts a user-defined marker in the feedback buffer
16475 when it is executed in feedback mode. TOKEN is returned as if it were a
16476 primitive; it is indicated with its own unique identifying value:
16477 `GL_PASS_THROUGH_TOKEN'. The order of `glPassThrough' commands with
16478 respect to the specification of graphics primitives is maintained.
16479
16480 `GL_INVALID_OPERATION' is generated if `glPassThrough' is executed
16481 between the execution of `glBegin' and the corresponding execution of
16482 `glEnd'.")
16483
16484 (define-gl-procedures
16485 ((glPixelMapfv
16486 (map GLenum)
16487 (mapsize GLsizei)
16488 (values const-GLfloat-*)
16489 ->
16490 void)
16491 (glPixelMapuiv
16492 (map GLenum)
16493 (mapsize GLsizei)
16494 (values const-GLuint-*)
16495 ->
16496 void)
16497 (glPixelMapusv
16498 (map GLenum)
16499 (mapsize GLsizei)
16500 (values const-GLushort-*)
16501 ->
16502 void))
16503 "Set up pixel transfer maps.
16504
16505 MAP
16506 Specifies a symbolic map name. Must be one of the following:
16507 `GL_PIXEL_MAP_I_TO_I', `GL_PIXEL_MAP_S_TO_S',
16508 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
16509 `GL_PIXEL_MAP_I_TO_B', `GL_PIXEL_MAP_I_TO_A',
16510 `GL_PIXEL_MAP_R_TO_R', `GL_PIXEL_MAP_G_TO_G',
16511 `GL_PIXEL_MAP_B_TO_B', or `GL_PIXEL_MAP_A_TO_A'.
16512
16513 MAPSIZE
16514 Specifies the size of the map being defined.
16515
16516 VALUES
16517 Specifies an array of MAPSIZE values.
16518
16519 `glPixelMap' sets up translation tables, or MAPS, used by
16520 `glCopyPixels', `glCopyTexImage1D', `glCopyTexImage2D',
16521 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D',
16522 `glDrawPixels', `glReadPixels', `glTexImage1D', `glTexImage2D',
16523 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D', and
16524 `glTexSubImage3D'. Additionally, if the `ARB_imaging' subset is
16525 supported, the routines `glColorTable', `glColorSubTable',
16526 `glConvolutionFilter1D', `glConvolutionFilter2D', `glHistogram',
16527 `glMinmax', and `glSeparableFilter2D'. Use of these maps is described
16528 completely in the `glPixelTransfer' reference page, and partly in the
16529 reference pages for the pixel and texture image commands. Only the
16530 specification of the maps is described in this reference page.
16531
16532 MAP is a symbolic map name, indicating one of ten maps to set. MAPSIZE
16533 specifies the number of entries in the map, and VALUES is a pointer to
16534 an array of MAPSIZE map values.
16535
16536 If a non-zero named buffer object is bound to the
16537 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a pixel
16538 transfer map is specified, VALUES is treated as a byte offset into the
16539 buffer object's data store.
16540
16541 The ten maps are as follows:
16542
16543 `GL_PIXEL_MAP_I_TO_I'
16544 Maps color indices to color indices.
16545
16546 `GL_PIXEL_MAP_S_TO_S'
16547 Maps stencil indices to stencil indices.
16548
16549 `GL_PIXEL_MAP_I_TO_R'
16550 Maps color indices to red components.
16551
16552 `GL_PIXEL_MAP_I_TO_G'
16553 Maps color indices to green components.
16554
16555 `GL_PIXEL_MAP_I_TO_B'
16556 Maps color indices to blue components.
16557
16558 `GL_PIXEL_MAP_I_TO_A'
16559 Maps color indices to alpha components.
16560
16561 `GL_PIXEL_MAP_R_TO_R'
16562 Maps red components to red components.
16563
16564 `GL_PIXEL_MAP_G_TO_G'
16565 Maps green components to green components.
16566
16567 `GL_PIXEL_MAP_B_TO_B'
16568 Maps blue components to blue components.
16569
16570 `GL_PIXEL_MAP_A_TO_A'
16571 Maps alpha components to alpha components.
16572
16573 The entries in a map can be specified as single-precision floating-point
16574 numbers, unsigned short integers, or unsigned int integers. Maps that
16575 store color component values (all but `GL_PIXEL_MAP_I_TO_I' and
16576 `GL_PIXEL_MAP_S_TO_S') retain their values in floating-point format,
16577 with unspecified mantissa and exponent sizes. Floating-point values
16578 specified by `glPixelMapfv' are converted directly to the internal
16579 floating-point format of these maps, then clamped to the range [0,1].
16580 Unsigned integer values specified by `glPixelMapusv' and `glPixelMapuiv'
16581 are converted linearly such that the largest representable integer maps
16582 to 1.0, and 0 maps to 0.0.
16583
16584 Maps that store indices, `GL_PIXEL_MAP_I_TO_I' and
16585 `GL_PIXEL_MAP_S_TO_S', retain their values in fixed-point format, with
16586 an unspecified number of bits to the right of the binary point.
16587 Floating-point values specified by `glPixelMapfv' are converted directly
16588 to the internal fixed-point format of these maps. Unsigned integer
16589 values specified by `glPixelMapusv' and `glPixelMapuiv' specify integer
16590 values, with all 0's to the right of the binary point.
16591
16592 The following table shows the initial sizes and values for each of the
16593 maps. Maps that are indexed by either color or stencil indices must have
16594 MAPSIZE = 2^N for some N or the results are undefined. The maximum
16595 allowable size for each map depends on the implementation and can be
16596 determined by calling `glGet' with argument `GL_MAX_PIXEL_MAP_TABLE'.
16597 The single maximum applies to all maps; it is at least 32.
16598
16599 *MAP*
16600 *Lookup Index*, *Lookup Value*, *Initial Size*, *Initial Value*
16601
16602 `GL_PIXEL_MAP_I_TO_I'
16603 color index , color index , 1 , 0
16604
16605 `GL_PIXEL_MAP_S_TO_S'
16606 stencil index , stencil index , 1 , 0
16607
16608 `GL_PIXEL_MAP_I_TO_R'
16609 color index , R , 1 , 0
16610
16611 `GL_PIXEL_MAP_I_TO_G'
16612 color index , G , 1 , 0
16613
16614 `GL_PIXEL_MAP_I_TO_B'
16615 color index , B , 1 , 0
16616
16617 `GL_PIXEL_MAP_I_TO_A'
16618 color index , A , 1 , 0
16619
16620 `GL_PIXEL_MAP_R_TO_R'
16621 R , R , 1 , 0
16622
16623 `GL_PIXEL_MAP_G_TO_G'
16624 G , G , 1 , 0
16625
16626 `GL_PIXEL_MAP_B_TO_B'
16627 B , B , 1 , 0
16628
16629 `GL_PIXEL_MAP_A_TO_A'
16630 A , A , 1 , 0
16631
16632 `GL_INVALID_ENUM' is generated if MAP is not an accepted value.
16633
16634 `GL_INVALID_VALUE' is generated if MAPSIZE is less than one or larger
16635 than `GL_MAX_PIXEL_MAP_TABLE'.
16636
16637 `GL_INVALID_VALUE' is generated if MAP is `GL_PIXEL_MAP_I_TO_I',
16638 `GL_PIXEL_MAP_S_TO_S', `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
16639 `GL_PIXEL_MAP_I_TO_B', or `GL_PIXEL_MAP_I_TO_A', and MAPSIZE is not a
16640 power of two.
16641
16642 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16643 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
16644 data store is currently mapped.
16645
16646 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16647 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
16648 unpacked from the buffer object such that the memory reads required
16649 would exceed the data store size.
16650
16651 `GL_INVALID_OPERATION' is generated by `glPixelMapfv' if a non-zero
16652 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16653 VALUES is not evenly divisible into the number of bytes needed to store
16654 in memory a GLfloat datum.
16655
16656 `GL_INVALID_OPERATION' is generated by `glPixelMapuiv' if a non-zero
16657 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16658 VALUES is not evenly divisible into the number of bytes needed to store
16659 in memory a GLuint datum.
16660
16661 `GL_INVALID_OPERATION' is generated by `glPixelMapusv' if a non-zero
16662 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16663 VALUES is not evenly divisible into the number of bytes needed to store
16664 in memory a GLushort datum.
16665
16666 `GL_INVALID_OPERATION' is generated if `glPixelMap' is executed between
16667 the execution of `glBegin' and the corresponding execution of `glEnd'.")
16668
16669 (define-gl-procedures
16670 ((glPixelStoref
16671 (pname GLenum)
16672 (param GLfloat)
16673 ->
16674 void)
16675 (glPixelStorei
16676 (pname GLenum)
16677 (param GLint)
16678 ->
16679 void))
16680 "Set pixel storage modes.
16681
16682 PNAME
16683 Specifies the symbolic name of the parameter to be set. Six values
16684 affect the packing of pixel data into memory: `GL_PACK_SWAP_BYTES',
16685 `GL_PACK_LSB_FIRST', `GL_PACK_ROW_LENGTH', `GL_PACK_IMAGE_HEIGHT',
16686 `GL_PACK_SKIP_PIXELS', `GL_PACK_SKIP_ROWS', `GL_PACK_SKIP_IMAGES',
16687 and `GL_PACK_ALIGNMENT'. Six more affect the unpacking of pixel
16688 data FROM memory: `GL_UNPACK_SWAP_BYTES', `GL_UNPACK_LSB_FIRST',
16689 `GL_UNPACK_ROW_LENGTH', `GL_UNPACK_IMAGE_HEIGHT',
16690 `GL_UNPACK_SKIP_PIXELS', `GL_UNPACK_SKIP_ROWS',
16691 `GL_UNPACK_SKIP_IMAGES', and `GL_UNPACK_ALIGNMENT'.
16692
16693 PARAM
16694 Specifies the value that PNAME is set to.
16695
16696 `glPixelStore' sets pixel storage modes that affect the operation of
16697 subsequent `glDrawPixels' and `glReadPixels' as well as the unpacking of
16698 polygon stipple patterns (see `glPolygonStipple'), bitmaps (see
16699 `glBitmap'), texture patterns (see `glTexImage1D', `glTexImage2D',
16700 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D',
16701 `glTexSubImage3D'). Additionally, if the `ARB_imaging' extension is
16702 supported, pixel storage modes affect convolution filters (see
16703 `glConvolutionFilter1D', `glConvolutionFilter2D', and
16704 `glSeparableFilter2D', color table (see `glColorTable', and
16705 `glColorSubTable', and unpacking histogram (See `glHistogram'), and
16706 minmax (See `glMinmax') data.
16707
16708 PNAME is a symbolic constant indicating the parameter to be set, and
16709 PARAM is the new value. Six of the twelve storage parameters affect how
16710 pixel data is returned to client memory. They are as follows:
16711
16712 `GL_PACK_SWAP_BYTES'
16713 If true, byte ordering for multibyte color components, depth
16714 components, color indices, or stencil indices is reversed. That is,
16715 if a four-byte component consists of bytes B_0 , B_1 , B_2 , B_3 ,
16716 it is stored in memory as B_3 , B_2 , B_1 , B_0 if
16717 `GL_PACK_SWAP_BYTES' is true. `GL_PACK_SWAP_BYTES' has no effect on
16718 the memory order of components within a pixel, only on the order of
16719 bytes within components or indices. For example, the three
16720 components of a `GL_RGB' format pixel are always stored with red
16721 first, green second, and blue third, regardless of the value of
16722 `GL_PACK_SWAP_BYTES'.
16723
16724 `GL_PACK_LSB_FIRST'
16725 If true, bits are ordered within a byte from least significant to
16726 most significant; otherwise, the first bit in each byte is the most
16727 significant one. This parameter is significant for bitmap data
16728 only.
16729
16730 `GL_PACK_ROW_LENGTH'
16731 If greater than 0, `GL_PACK_ROW_LENGTH' defines the number of
16732 pixels in a row. If the first pixel of a row is placed at location
16733 P in memory, then the location of the first pixel of the next row
16734 is obtained by skipping
16735
16736 K={(N\u2062L), (A/S,\u2062⌈S\u2062N\u2062L,/A,⌉)\u2062(S>=A), (S<A),
16737
16738 components or indices, where N is the number of components or
16739 indices in a pixel, L is the number of pixels in a row
16740 (`GL_PACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16741 to the pixel routine otherwise), A is the value of
16742 `GL_PACK_ALIGNMENT', and S is the size, in bytes, of a single
16743 component (if A<S , then it is as if A=S ). In the case of 1-bit
16744 values, the location of the next row is obtained by skipping
16745
16746 K=8\u2062A\u2062⌈N\u2062L,/8\u2062A,,⌉
16747
16748 components or indices.
16749
16750 The word COMPONENT in this description refers to the nonindex
16751 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16752 for example, has three components per pixel: first red, then green,
16753 and finally blue.
16754
16755 `GL_PACK_IMAGE_HEIGHT'
16756 If greater than 0, `GL_PACK_IMAGE_HEIGHT' defines the number of
16757 pixels in an image three-dimensional texture volume, where
16758 ``image'' is defined by all pixels sharing the same third dimension
16759 index. If the first pixel of a row is placed at location P in
16760 memory, then the location of the first pixel of the next row is
16761 obtained by skipping
16762
16763 K={(N\u2062L\u2062H), (A/S,\u2062⌈S\u2062N\u2062L\u2062H,/A,⌉)\u2062(S>=A), (S<A),
16764
16765 components or indices, where N is the number of components or
16766 indices in a pixel, L is the number of pixels in a row
16767 (`GL_PACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16768 to `glTexImage3D' otherwise), H is the number of rows in a pixel
16769 image (`GL_PACK_IMAGE_HEIGHT' if it is greater than 0, the HEIGHT
16770 argument to the `glTexImage3D' routine otherwise), A is the value
16771 of `GL_PACK_ALIGNMENT', and S is the size, in bytes, of a single
16772 component (if A<S , then it is as if A=S ).
16773
16774 The word COMPONENT in this description refers to the nonindex
16775 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16776 for example, has three components per pixel: first red, then green,
16777 and finally blue.
16778
16779 `GL_PACK_SKIP_PIXELS', `GL_PACK_SKIP_ROWS', and `GL_PACK_SKIP_IMAGES'
16780 These values are provided as a convenience to the programmer; they
16781 provide no functionality that cannot be duplicated simply by
16782 incrementing the pointer passed to `glReadPixels'. Setting
16783 `GL_PACK_SKIP_PIXELS' to I is equivalent to incrementing the
16784 pointer by I\u2062N components or indices, where N is the number of
16785 components or indices in each pixel. Setting `GL_PACK_SKIP_ROWS' to
16786 J is equivalent to incrementing the pointer by J\u2062M components or
16787 indices, where M is the number of components or indices per row, as
16788 just computed in the `GL_PACK_ROW_LENGTH' section. Setting
16789 `GL_PACK_SKIP_IMAGES' to K is equivalent to incrementing the
16790 pointer by K\u2062P , where P is the number of components or indices per
16791 image, as computed in the `GL_PACK_IMAGE_HEIGHT' section.
16792
16793 `GL_PACK_ALIGNMENT'
16794 Specifies the alignment requirements for the start of each pixel
16795 row in memory. The allowable values are 1 (byte-alignment), 2 (rows
16796 aligned to even-numbered bytes), 4 (word-alignment), and 8 (rows
16797 start on double-word boundaries).
16798
16799 The other six of the twelve storage parameters affect how pixel data is
16800 read from client memory. These values are significant for
16801 `glDrawPixels', `glTexImage1D', `glTexImage2D', `glTexImage3D',
16802 `glTexSubImage1D', `glTexSubImage2D', `glTexSubImage3D', `glBitmap', and
16803 `glPolygonStipple'.
16804
16805 Additionally, if the `ARB_imaging' extension is supported,
16806 `glColorTable', `glColorSubTable', `glConvolutionFilter1D',
16807 `glConvolutionFilter2D', and `glSeparableFilter2D'. They are as follows:
16808
16809 `GL_UNPACK_SWAP_BYTES'
16810 If true, byte ordering for multibyte color components, depth
16811 components, color indices, or stencil indices is reversed. That is,
16812 if a four-byte component consists of bytes B_0 , B_1 , B_2 , B_3 ,
16813 it is taken from memory as B_3 , B_2 , B_1 , B_0 if
16814 `GL_UNPACK_SWAP_BYTES' is true. `GL_UNPACK_SWAP_BYTES' has no
16815 effect on the memory order of components within a pixel, only on
16816 the order of bytes within components or indices. For example, the
16817 three components of a `GL_RGB' format pixel are always stored with
16818 red first, green second, and blue third, regardless of the value of
16819 `GL_UNPACK_SWAP_BYTES'.
16820
16821 `GL_UNPACK_LSB_FIRST'
16822 If true, bits are ordered within a byte from least significant to
16823 most significant; otherwise, the first bit in each byte is the most
16824 significant one. This is relevant only for bitmap data.
16825
16826 `GL_UNPACK_ROW_LENGTH'
16827 If greater than 0, `GL_UNPACK_ROW_LENGTH' defines the number of
16828 pixels in a row. If the first pixel of a row is placed at location
16829 P in memory, then the location of the first pixel of the next row
16830 is obtained by skipping
16831
16832 K={(N\u2062L), (A/S,\u2062⌈S\u2062N\u2062L,/A,⌉)\u2062(S>=A), (S<A),
16833
16834 components or indices, where N is the number of components or
16835 indices in a pixel, L is the number of pixels in a row
16836 (`GL_UNPACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16837 to the pixel routine otherwise), A is the value of
16838 `GL_UNPACK_ALIGNMENT', and S is the size, in bytes, of a single
16839 component (if A<S , then it is as if A=S ). In the case of 1-bit
16840 values, the location of the next row is obtained by skipping
16841
16842 K=8\u2062A\u2062⌈N\u2062L,/8\u2062A,,⌉
16843
16844 components or indices.
16845
16846 The word COMPONENT in this description refers to the nonindex
16847 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16848 for example, has three components per pixel: first red, then green,
16849 and finally blue.
16850
16851 `GL_UNPACK_IMAGE_HEIGHT'
16852 If greater than 0, `GL_UNPACK_IMAGE_HEIGHT' defines the number of
16853 pixels in an image of a three-dimensional texture volume. Where
16854 ``image'' is defined by all pixel sharing the same third dimension
16855 index. If the first pixel of a row is placed at location P in
16856 memory, then the location of the first pixel of the next row is
16857 obtained by skipping
16858
16859 K={(N\u2062L\u2062H), (A/S,\u2062⌈S\u2062N\u2062L\u2062H,/A,⌉)\u2062(S>=A), (S<A),
16860
16861 components or indices, where N is the number of components or
16862 indices in a pixel, L is the number of pixels in a row
16863 (`GL_UNPACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16864 to `glTexImage3D' otherwise), H is the number of rows in an image
16865 (`GL_UNPACK_IMAGE_HEIGHT' if it is greater than 0, the HEIGHT
16866 argument to `glTexImage3D' 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 ).
16869
16870 The word COMPONENT in this description refers to the nonindex
16871 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16872 for example, has three components per pixel: first red, then green,
16873 and finally blue.
16874
16875 `GL_UNPACK_SKIP_PIXELS' and `GL_UNPACK_SKIP_ROWS'
16876 These values are provided as a convenience to the programmer; they
16877 provide no functionality that cannot be duplicated by incrementing
16878 the pointer passed to `glDrawPixels', `glTexImage1D',
16879 `glTexImage2D', `glTexSubImage1D', `glTexSubImage2D', `glBitmap',
16880 or `glPolygonStipple'. Setting `GL_UNPACK_SKIP_PIXELS' to I is
16881 equivalent to incrementing the pointer by I\u2062N components or
16882 indices, where N is the number of components or indices in each
16883 pixel. Setting `GL_UNPACK_SKIP_ROWS' to J is equivalent to
16884 incrementing the pointer by J\u2062K components or indices, where K is
16885 the number of components or indices per row, as just computed in
16886 the `GL_UNPACK_ROW_LENGTH' section.
16887
16888 `GL_UNPACK_ALIGNMENT'
16889 Specifies the alignment requirements for the start of each pixel
16890 row in memory. The allowable values are 1 (byte-alignment), 2 (rows
16891 aligned to even-numbered bytes), 4 (word-alignment), and 8 (rows
16892 start on double-word boundaries).
16893
16894 The following table gives the type, initial value, and range of valid
16895 values for each storage parameter that can be set with `glPixelStore'.
16896
16897
16898
16899 *PNAME*
16900 *Type*, *Initial Value*, *Valid Range*
16901
16902 `GL_PACK_SWAP_BYTES'
16903 boolean , false , true or false
16904
16905 `GL_PACK_LSB_FIRST'
16906 boolean , false , true or false
16907
16908 `GL_PACK_ROW_LENGTH'
16909 integer , 0 , [0,∞)
16910
16911 `GL_PACK_IMAGE_HEIGHT'
16912 integer , 0 , [0,∞)
16913
16914 `GL_PACK_SKIP_ROWS'
16915 integer , 0 , [0,∞)
16916
16917 `GL_PACK_SKIP_PIXELS'
16918 integer , 0 , [0,∞)
16919
16920 `GL_PACK_SKIP_IMAGES'
16921 integer , 0 , [0,∞)
16922
16923 `GL_PACK_ALIGNMENT'
16924 integer , 4 , 1, 2, 4, or 8
16925
16926 `GL_UNPACK_SWAP_BYTES'
16927 boolean , false , true or false
16928
16929 `GL_UNPACK_LSB_FIRST'
16930 boolean , false , true or false
16931
16932 `GL_UNPACK_ROW_LENGTH'
16933 integer , 0 , [0,∞)
16934
16935 `GL_UNPACK_IMAGE_HEIGHT'
16936 integer , 0 , [0,∞)
16937
16938 `GL_UNPACK_SKIP_ROWS'
16939 integer , 0 , [0,∞)
16940
16941 `GL_UNPACK_SKIP_PIXELS'
16942 integer , 0 , [0,∞)
16943
16944 `GL_UNPACK_SKIP_IMAGES'
16945 integer , 0 , [0,∞)
16946
16947 `GL_UNPACK_ALIGNMENT'
16948 integer , 4 , 1, 2, 4, or 8
16949
16950 `glPixelStoref' can be used to set any pixel store parameter. If the
16951 parameter type is boolean, then if PARAM is 0, the parameter is false;
16952 otherwise it is set to true. If PNAME is a integer type parameter, PARAM
16953 is rounded to the nearest integer.
16954
16955 Likewise, `glPixelStorei' can also be used to set any of the pixel store
16956 parameters. Boolean parameters are set to false if PARAM is 0 and true
16957 otherwise.
16958
16959 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
16960
16961 `GL_INVALID_VALUE' is generated if a negative row length, pixel skip, or
16962 row skip value is specified, or if alignment is specified as other than
16963 1, 2, 4, or 8.
16964
16965 `GL_INVALID_OPERATION' is generated if `glPixelStore' is executed
16966 between the execution of `glBegin' and the corresponding execution of
16967 `glEnd'.")
16968
16969 (define-gl-procedures
16970 ((glPixelTransferf
16971 (pname GLenum)
16972 (param GLfloat)
16973 ->
16974 void)
16975 (glPixelTransferi
16976 (pname GLenum)
16977 (param GLint)
16978 ->
16979 void))
16980 "Set pixel transfer modes.
16981
16982 PNAME
16983 Specifies the symbolic name of the pixel transfer parameter to be
16984 set. Must be one of the following: `GL_MAP_COLOR',
16985 `GL_MAP_STENCIL', `GL_INDEX_SHIFT', `GL_INDEX_OFFSET',
16986 `GL_RED_SCALE', `GL_RED_BIAS', `GL_GREEN_SCALE', `GL_GREEN_BIAS',
16987 `GL_BLUE_SCALE', `GL_BLUE_BIAS', `GL_ALPHA_SCALE', `GL_ALPHA_BIAS',
16988 `GL_DEPTH_SCALE', or `GL_DEPTH_BIAS'.
16989
16990 Additionally, if the `ARB_imaging' extension is supported, the
16991 following symbolic names are accepted:
16992 `GL_POST_COLOR_MATRIX_RED_SCALE',
16993 `GL_POST_COLOR_MATRIX_GREEN_SCALE',
16994 `GL_POST_COLOR_MATRIX_BLUE_SCALE',
16995 `GL_POST_COLOR_MATRIX_ALPHA_SCALE',
16996 `GL_POST_COLOR_MATRIX_RED_BIAS', `GL_POST_COLOR_MATRIX_GREEN_BIAS',
16997 `GL_POST_COLOR_MATRIX_BLUE_BIAS',
16998 `GL_POST_COLOR_MATRIX_ALPHA_BIAS', `GL_POST_CONVOLUTION_RED_SCALE',
16999 `GL_POST_CONVOLUTION_GREEN_SCALE',
17000 `GL_POST_CONVOLUTION_BLUE_SCALE',
17001 `GL_POST_CONVOLUTION_ALPHA_SCALE', `GL_POST_CONVOLUTION_RED_BIAS',
17002 `GL_POST_CONVOLUTION_GREEN_BIAS', `GL_POST_CONVOLUTION_BLUE_BIAS',
17003 and `GL_POST_CONVOLUTION_ALPHA_BIAS'.
17004
17005 PARAM
17006 Specifies the value that PNAME is set to.
17007
17008 `glPixelTransfer' sets pixel transfer modes that affect the operation of
17009 subsequent `glCopyPixels', `glCopyTexImage1D', `glCopyTexImage2D',
17010 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D',
17011 `glDrawPixels', `glReadPixels', `glTexImage1D', `glTexImage2D',
17012 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D', and
17013 `glTexSubImage3D' commands. Additionally, if the `ARB_imaging' subset is
17014 supported, the routines `glColorTable', `glColorSubTable',
17015 `glConvolutionFilter1D', `glConvolutionFilter2D', `glHistogram',
17016 `glMinmax', and `glSeparableFilter2D' are also affected. The algorithms
17017 that are specified by pixel transfer modes operate on pixels after they
17018 are read from the frame buffer (`glCopyPixels'`glCopyTexImage1D',
17019 `glCopyTexImage2D', `glCopyTexSubImage1D', `glCopyTexSubImage2D',
17020 `glCopyTexSubImage3D', and `glReadPixels'), or unpacked from client
17021 memory (`glDrawPixels', `glTexImage1D', `glTexImage2D', `glTexImage3D',
17022 `glTexSubImage1D', `glTexSubImage2D', and `glTexSubImage3D'). Pixel
17023 transfer operations happen in the same order, and in the same manner,
17024 regardless of the command that resulted in the pixel operation. Pixel
17025 storage modes (see `glPixelStore') control the unpacking of pixels being
17026 read from client memory and the packing of pixels being written back
17027 into client memory.
17028
17029 Pixel transfer operations handle four fundamental pixel types: COLOR,
17030 COLOR INDEX, DEPTH, and STENCIL. COLOR pixels consist of four
17031 floating-point values with unspecified mantissa and exponent sizes,
17032 scaled such that 0 represents zero intensity and 1 represents full
17033 intensity. COLOR INDICES comprise a single fixed-point value, with
17034 unspecified precision to the right of the binary point. DEPTH pixels
17035 comprise a single floating-point value, with unspecified mantissa and
17036 exponent sizes, scaled such that 0.0 represents the minimum depth buffer
17037 value, and 1.0 represents the maximum depth buffer value. Finally,
17038 STENCIL pixels comprise a single fixed-point value, with unspecified
17039 precision to the right of the binary point.
17040
17041 The pixel transfer operations performed on the four basic pixel types
17042 are as follows:
17043
17044 COLOR
17045 Each of the four color components is multiplied by a scale factor,
17046 then added to a bias factor. That is, the red component is
17047 multiplied by `GL_RED_SCALE', then added to `GL_RED_BIAS'; the
17048 green component is multiplied by `GL_GREEN_SCALE', then added to
17049 `GL_GREEN_BIAS'; the blue component is multiplied by
17050 `GL_BLUE_SCALE', then added to `GL_BLUE_BIAS'; and the alpha
17051 component is multiplied by `GL_ALPHA_SCALE', then added to
17052 `GL_ALPHA_BIAS'. After all four color components are scaled and
17053 biased, each is clamped to the range [0,1] . All color, scale, and
17054 bias values are specified with `glPixelTransfer'.
17055
17056 If `GL_MAP_COLOR' is true, each color component is scaled by the
17057 size of the corresponding color-to-color map, then replaced by the
17058 contents of that map indexed by the scaled component. That is, the
17059 red component is scaled by `GL_PIXEL_MAP_R_TO_R_SIZE', then
17060 replaced by the contents of `GL_PIXEL_MAP_R_TO_R' indexed by
17061 itself. The green component is scaled by
17062 `GL_PIXEL_MAP_G_TO_G_SIZE', then replaced by the contents of
17063 `GL_PIXEL_MAP_G_TO_G' indexed by itself. The blue component is
17064 scaled by `GL_PIXEL_MAP_B_TO_B_SIZE', then replaced by the contents
17065 of `GL_PIXEL_MAP_B_TO_B' indexed by itself. And the alpha component
17066 is scaled by `GL_PIXEL_MAP_A_TO_A_SIZE', then replaced by the
17067 contents of `GL_PIXEL_MAP_A_TO_A' indexed by itself. All components
17068 taken from the maps are then clamped to the range [0,1] .
17069 `GL_MAP_COLOR' is specified with `glPixelTransfer'. The contents of
17070 the various maps are specified with `glPixelMap'.
17071
17072 If the `ARB_imaging' extension is supported, each of the four color
17073 components may be scaled and biased after transformation by the
17074 color matrix. That is, the red component is multiplied by
17075 `GL_POST_COLOR_MATRIX_RED_SCALE', then added to
17076 `GL_POST_COLOR_MATRIX_RED_BIAS'; the green component is multiplied
17077 by `GL_POST_COLOR_MATRIX_GREEN_SCALE', then added to
17078 `GL_POST_COLOR_MATRIX_GREEN_BIAS'; the blue component is multiplied
17079 by `GL_POST_COLOR_MATRIX_BLUE_SCALE', then added to
17080 `GL_POST_COLOR_MATRIX_BLUE_BIAS'; and the alpha component is
17081 multiplied by `GL_POST_COLOR_MATRIX_ALPHA_SCALE', then added to
17082 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'. After all four color components
17083 are scaled and biased, each is clamped to the range [0,1] .
17084
17085 Similarly, if the `ARB_imaging' extension is supported, each of the
17086 four color components may be scaled and biased after processing by
17087 the enabled convolution filter. That is, the red component is
17088 multiplied by `GL_POST_CONVOLUTION_RED_SCALE', then added to
17089 `GL_POST_CONVOLUTION_RED_BIAS'; the green component is multiplied
17090 by `GL_POST_CONVOLUTION_GREEN_SCALE', then added to
17091 `GL_POST_CONVOLUTION_GREEN_BIAS'; the blue component is multiplied
17092 by `GL_POST_CONVOLUTION_BLUE_SCALE', then added to
17093 `GL_POST_CONVOLUTION_BLUE_BIAS'; and the alpha component is
17094 multiplied by `GL_POST_CONVOLUTION_ALPHA_SCALE', then added to
17095 `GL_POST_CONVOLUTION_ALPHA_BIAS'. After all four color components
17096 are scaled and biased, each is clamped to the range [0,1] .
17097
17098 COLOR INDEX
17099 Each color index is shifted left by `GL_INDEX_SHIFT' bits; any bits
17100 beyond the number of fraction bits carried by the fixed-point index
17101 are filled with zeros. If `GL_INDEX_SHIFT' is negative, the shift
17102 is to the right, again zero filled. Then `GL_INDEX_OFFSET' is added
17103 to the index. `GL_INDEX_SHIFT' and `GL_INDEX_OFFSET' are specified
17104 with `glPixelTransfer'.
17105
17106 From this point, operation diverges depending on the required
17107 format of the resulting pixels. If the resulting pixels are to be
17108 written to a color index buffer, or if they are being read back to
17109 client memory in `GL_COLOR_INDEX' format, the pixels continue to be
17110 treated as indices. If `GL_MAP_COLOR' is true, each index is masked
17111 by 2^N-1 , where N is `GL_PIXEL_MAP_I_TO_I_SIZE', then replaced by
17112 the contents of `GL_PIXEL_MAP_I_TO_I' indexed by the masked value.
17113 `GL_MAP_COLOR' is specified with `glPixelTransfer'. The contents of
17114 the index map is specified with `glPixelMap'.
17115
17116 If the resulting pixels are to be written to an RGBA color buffer,
17117 or if they are read back to client memory in a format other than
17118 `GL_COLOR_INDEX', the pixels are converted from indices to colors
17119 by referencing the four maps `GL_PIXEL_MAP_I_TO_R',
17120 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
17121 `GL_PIXEL_MAP_I_TO_A'. Before being dereferenced, the index is
17122 masked by 2^N-1 , where N is `GL_PIXEL_MAP_I_TO_R_SIZE' for the red
17123 map, `GL_PIXEL_MAP_I_TO_G_SIZE' for the green map,
17124 `GL_PIXEL_MAP_I_TO_B_SIZE' for the blue map, and
17125 `GL_PIXEL_MAP_I_TO_A_SIZE' for the alpha map. All components taken
17126 from the maps are then clamped to the range [0,1] . The contents of
17127 the four maps is specified with `glPixelMap'.
17128
17129 DEPTH
17130 Each depth value is multiplied by `GL_DEPTH_SCALE', added to
17131 `GL_DEPTH_BIAS', then clamped to the range [0,1] .
17132
17133 STENCIL
17134 Each index is shifted `GL_INDEX_SHIFT' bits just as a color index
17135 is, then added to `GL_INDEX_OFFSET'. If `GL_MAP_STENCIL' is true,
17136 each index is masked by 2^N-1 , where N is
17137 `GL_PIXEL_MAP_S_TO_S_SIZE', then replaced by the contents of
17138 `GL_PIXEL_MAP_S_TO_S' indexed by the masked value.
17139
17140 The following table gives the type, initial value, and range of valid
17141 values for each of the pixel transfer parameters that are set with
17142 `glPixelTransfer'.
17143
17144
17145
17146 *PNAME*
17147 *Type*, *Initial Value*, *Valid Range*
17148
17149 `GL_MAP_COLOR'
17150 boolean , false , true/false
17151
17152 `GL_MAP_STENCIL'
17153 boolean , false , true/false
17154
17155 `GL_INDEX_SHIFT'
17156 integer , 0 , (-∞,∞)
17157
17158 `GL_INDEX_OFFSET'
17159 integer , 0 , (-∞,∞)
17160
17161 `GL_RED_SCALE'
17162 float , 1 , (-∞,∞)
17163
17164 `GL_GREEN_SCALE'
17165 float , 1 , (-∞,∞)
17166
17167 `GL_BLUE_SCALE'
17168 float , 1 , (-∞,∞)
17169
17170 `GL_ALPHA_SCALE'
17171 float , 1 , (-∞,∞)
17172
17173 `GL_DEPTH_SCALE'
17174 float , 1 , (-∞,∞)
17175
17176 `GL_RED_BIAS'
17177 float , 0 , (-∞,∞)
17178
17179 `GL_GREEN_BIAS'
17180 float , 0 , (-∞,∞)
17181
17182 `GL_BLUE_BIAS'
17183 float , 0 , (-∞,∞)
17184
17185 `GL_ALPHA_BIAS'
17186 float , 0 , (-∞,∞)
17187
17188 `GL_DEPTH_BIAS'
17189 float , 0 , (-∞,∞)
17190
17191 `GL_POST_COLOR_MATRIX_RED_SCALE'
17192 float , 1 , (-∞,∞)
17193
17194 `GL_POST_COLOR_MATRIX_GREEN_SCALE'
17195 float , 1 , (-∞,∞)
17196
17197 `GL_POST_COLOR_MATRIX_BLUE_SCALE'
17198 float , 1 , (-∞,∞)
17199
17200 `GL_POST_COLOR_MATRIX_ALPHA_SCALE'
17201 float , 1 , (-∞,∞)
17202
17203 `GL_POST_COLOR_MATRIX_RED_BIAS'
17204 float , 0 , (-∞,∞)
17205
17206 `GL_POST_COLOR_MATRIX_GREEN_BIAS'
17207 float , 0 , (-∞,∞)
17208
17209 `GL_POST_COLOR_MATRIX_BLUE_BIAS'
17210 float , 0 , (-∞,∞)
17211
17212 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'
17213 float , 0 , (-∞,∞)
17214
17215 `GL_POST_CONVOLUTION_RED_SCALE'
17216 float , 1 , (-∞,∞)
17217
17218 `GL_POST_CONVOLUTION_GREEN_SCALE'
17219 float , 1 , (-∞,∞)
17220
17221 `GL_POST_CONVOLUTION_BLUE_SCALE'
17222 float , 1 , (-∞,∞)
17223
17224 `GL_POST_CONVOLUTION_ALPHA_SCALE'
17225 float , 1 , (-∞,∞)
17226
17227 `GL_POST_CONVOLUTION_RED_BIAS'
17228 float , 0 , (-∞,∞)
17229
17230 `GL_POST_CONVOLUTION_GREEN_BIAS'
17231 float , 0 , (-∞,∞)
17232
17233 `GL_POST_CONVOLUTION_BLUE_BIAS'
17234 float , 0 , (-∞,∞)
17235
17236 `GL_POST_CONVOLUTION_ALPHA_BIAS'
17237 float , 0 , (-∞,∞)
17238
17239 `glPixelTransferf' can be used to set any pixel transfer parameter. If
17240 the parameter type is boolean, 0 implies false and any other value
17241 implies true. If PNAME is an integer parameter, PARAM is rounded to the
17242 nearest integer.
17243
17244 Likewise, `glPixelTransferi' can be used to set any of the pixel
17245 transfer parameters. Boolean parameters are set to false if PARAM is 0
17246 and to true otherwise. PARAM is converted to floating point before being
17247 assigned to real-valued parameters.
17248
17249 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
17250
17251 `GL_INVALID_OPERATION' is generated if `glPixelTransfer' is executed
17252 between the execution of `glBegin' and the corresponding execution of
17253 `glEnd'.")
17254
17255 (define-gl-procedures
17256 ((glPixelZoom
17257 (xfactor GLfloat)
17258 (yfactor GLfloat)
17259 ->
17260 void))
17261 "Specify the pixel zoom factors.
17262
17263 XFACTOR
17264 YFACTOR
17265
17266 Specify the X and Y zoom factors for pixel write operations.
17267
17268 `glPixelZoom' specifies values for the X and Y zoom factors. During the
17269 execution of `glDrawPixels' or `glCopyPixels', if (XR , YR ) is the
17270 current raster position, and a given element is in the M th row and N th
17271 column of the pixel rectangle, then pixels whose centers are in the
17272 rectangle with corners at
17273
17274 (XR+N·XFACTOR , YR+M·YFACTOR )
17275
17276 (XR+(N+1,)·XFACTOR , YR+(M+1,)·YFACTOR )
17277
17278 are candidates for replacement. Any pixel whose center lies on the
17279 bottom or left edge of this rectangular region is also modified.
17280
17281 Pixel zoom factors are not limited to positive values. Negative zoom
17282 factors reflect the resulting image about the current raster position.
17283
17284 `GL_INVALID_OPERATION' is generated if `glPixelZoom' is executed between
17285 the execution of `glBegin' and the corresponding execution of `glEnd'.")
17286
17287 (define-gl-procedures
17288 ((glPointParameterf
17289 (pname GLenum)
17290 (param GLfloat)
17291 ->
17292 void)
17293 (glPointParameteri
17294 (pname GLenum)
17295 (param GLint)
17296 ->
17297 void)
17298 (glPointParameterfv
17299 (pname GLenum)
17300 (params const-GLfloat-*)
17301 ->
17302 void)
17303 (glPointParameteriv
17304 (pname GLenum)
17305 (params const-GLint-*)
17306 ->
17307 void))
17308 "Specify point parameters.
17309
17310 PNAME
17311 Specifies a single-valued point parameter. `GL_POINT_SIZE_MIN',
17312 `GL_POINT_SIZE_MAX', `GL_POINT_FADE_THRESHOLD_SIZE', and
17313 `GL_POINT_SPRITE_COORD_ORIGIN' are accepted.
17314
17315 PARAM
17316 Specifies the value that PNAME will be set to.
17317
17318 The following values are accepted for PNAME:
17319
17320 `GL_POINT_SIZE_MIN'
17321
17322
17323 PARAMS is a single floating-point value that specifies the minimum
17324 point size. The default value is 0.0.
17325
17326 `GL_POINT_SIZE_MAX'
17327
17328
17329 PARAMS is a single floating-point value that specifies the maximum
17330 point size. The default value is 1.0.
17331
17332 `GL_POINT_FADE_THRESHOLD_SIZE'
17333
17334
17335 PARAMS is a single floating-point value that specifies the
17336 threshold value to which point sizes are clamped if they exceed the
17337 specified value. The default value is 1.0.
17338
17339 `GL_POINT_DISTANCE_ATTENUATION'
17340
17341
17342 PARAMS is an array of three floating-point values that specify the
17343 coefficients used for scaling the computed point size. The default
17344 values are (1,00) .
17345
17346 `GL_POINT_SPRITE_COORD_ORIGIN'
17347
17348
17349 PARAMS is a single enum specifying the point sprite texture
17350 coordinate origin, either `GL_LOWER_LEFT' or `GL_UPPER_LEFT'. The
17351 default value is `GL_UPPER_LEFT'.
17352
17353 `GL_INVALID_VALUE' is generated If the value specified for
17354 `GL_POINT_SIZE_MIN', `GL_POINT_SIZE_MAX', or
17355 `GL_POINT_FADE_THRESHOLD_SIZE' is less than zero.
17356
17357 `GL_INVALID_ENUM' is generated If the value specified for
17358 `GL_POINT_SPRITE_COORD_ORIGIN' is not `GL_LOWER_LEFT' or
17359 `GL_UPPER_LEFT'.
17360
17361 If the value for `GL_POINT_SIZE_MIN' is greater than
17362 `GL_POINT_SIZE_MAX', the point size after clamping is undefined, but no
17363 error is generated.")
17364
17365 (define-gl-procedures
17366 ((glPointSize (size GLfloat) -> void))
17367 "Specify the diameter of rasterized points.
17368
17369 SIZE
17370 Specifies the diameter of rasterized points. The initial value is
17371 1.
17372
17373 `glPointSize' specifies the rasterized diameter of both aliased and
17374 antialiased points. Using a point size other than 1 has different
17375 effects, depending on whether point antialiasing is enabled. To enable
17376 and disable point antialiasing, call `glEnable' and `glDisable' with
17377 argument `GL_POINT_SMOOTH'. Point antialiasing is initially disabled.
17378
17379 The specified point size is multiplied with a distance attenuation
17380 factor and clamped to the specified point size range, and further
17381 clamped to the implementation-dependent point size range to produce the
17382 derived point size using
17383
17384 POINTSIZE=CLAMP\u2062(SIZE×√(1/A+B×D+C×D^2,,,),,)
17385
17386 where D is the eye-coordinate distance from the eye to the vertex, and A
17387 , B , and C are the distance attenuation coefficients (see
17388 `glPointParameter').
17389
17390 If multisampling is disabled, the computed point size is used as the
17391 point's width.
17392
17393 If multisampling is enabled, the point may be faded by modifying the
17394 point alpha value (see `glSampleCoverage') instead of allowing the point
17395 width to go below a given threshold (see `glPointParameter'). In this
17396 case, the width is further modified in the following manner:
17397
17398 POINTWIDTH={(POINTSIZE), (THRESHOLD)\u2062(POINTSIZE>=THRESHOLD),
17399 (OTHERWISE),
17400
17401 The point alpha value is modified by computing:
17402
17403 POINTALPHA={(1), ((POINTSIZE/THRESHOLD,)^2)\u2062(POINTSIZE>=THRESHOLD),
17404 (OTHERWISE),
17405
17406 If point antialiasing is disabled, the actual size is determined by
17407 rounding the supplied size to the nearest integer. (If the rounding
17408 results in the value 0, it is as if the point size were 1.) If the
17409 rounded size is odd, then the center point (X , Y ) of the pixel
17410 fragment that represents the point is computed as
17411
17412 (⌊X_W,⌋+.5,⌊Y_W,⌋+.5)
17413
17414 where W subscripts indicate window coordinates. All pixels that lie
17415 within the square grid of the rounded size centered at (X , Y ) make up
17416 the fragment. If the size is even, the center point is
17417
17418 (⌊X_W+.5,⌋,⌊Y_W+.5,⌋)
17419
17420 and the rasterized fragment's centers are the half-integer window
17421 coordinates within the square of the rounded size centered at (X,Y) .
17422 All pixel fragments produced in rasterizing a nonantialiased point are
17423 assigned the same associated data, that of the vertex corresponding to
17424 the point.
17425
17426 If antialiasing is enabled, then point rasterization produces a fragment
17427 for each pixel square that intersects the region lying within the circle
17428 having diameter equal to the current point size and centered at the
17429 point's (X_W,Y_W) . The coverage value for each fragment is the window
17430 coordinate area of the intersection of the circular region with the
17431 corresponding pixel square. This value is saved and used in the final
17432 rasterization step. The data associated with each fragment is the data
17433 associated with the point being rasterized.
17434
17435 Not all sizes are supported when point antialiasing is enabled. If an
17436 unsupported size is requested, the nearest supported size is used. Only
17437 size 1 is guaranteed to be supported; others depend on the
17438 implementation. To query the range of supported sizes and the size
17439 difference between supported sizes within the range, call `glGet' with
17440 arguments `GL_SMOOTH_POINT_SIZE_RANGE' and
17441 `GL_SMOOTH_POINT_SIZE_GRANULARITY'. For aliased points, query the
17442 supported ranges and granularity with `glGet' with arguments
17443 `GL_ALIASED_POINT_SIZE_RANGE'.
17444
17445 `GL_INVALID_VALUE' is generated if SIZE is less than or equal to 0.
17446
17447 `GL_INVALID_OPERATION' is generated if `glPointSize' is executed between
17448 the execution of `glBegin' and the corresponding execution of `glEnd'.")
17449
17450 (define-gl-procedures
17451 ((glPolygonMode
17452 (face GLenum)
17453 (mode GLenum)
17454 ->
17455 void))
17456 "Select a polygon rasterization mode.
17457
17458 FACE
17459 Specifies the polygons that MODE applies to. Must be `GL_FRONT' for
17460 front-facing polygons, `GL_BACK' for back-facing polygons, or
17461 `GL_FRONT_AND_BACK' for front- and back-facing polygons.
17462
17463 MODE
17464 Specifies how polygons will be rasterized. Accepted values are
17465 `GL_POINT', `GL_LINE', and `GL_FILL'. The initial value is
17466 `GL_FILL' for both front- and back-facing polygons.
17467
17468 `glPolygonMode' controls the interpretation of polygons for
17469 rasterization. FACE describes which polygons MODE applies to:
17470 front-facing polygons (`GL_FRONT'), back-facing polygons (`GL_BACK'), or
17471 both (`GL_FRONT_AND_BACK'). The polygon mode affects only the final
17472 rasterization of polygons. In particular, a polygon's vertices are lit
17473 and the polygon is clipped and possibly culled before these modes are
17474 applied.
17475
17476 Three modes are defined and can be specified in MODE:
17477
17478 `GL_POINT'
17479 Polygon vertices that are marked as the start of a boundary edge
17480 are drawn as points. Point attributes such as `GL_POINT_SIZE' and
17481 `GL_POINT_SMOOTH' control the rasterization of the points. Polygon
17482 rasterization attributes other than `GL_POLYGON_MODE' have no
17483 effect.
17484
17485 `GL_LINE'
17486 Boundary edges of the polygon are drawn as line segments. They are
17487 treated as connected line segments for line stippling; the line
17488 stipple counter and pattern are not reset between segments (see
17489 `glLineStipple'). Line attributes such as `GL_LINE_WIDTH' and
17490 `GL_LINE_SMOOTH' control the rasterization of the lines. Polygon
17491 rasterization attributes other than `GL_POLYGON_MODE' have no
17492 effect.
17493
17494 `GL_FILL'
17495 The interior of the polygon is filled. Polygon attributes such as
17496 `GL_POLYGON_STIPPLE' and `GL_POLYGON_SMOOTH' control the
17497 rasterization of the polygon.
17498
17499 `GL_INVALID_ENUM' is generated if either FACE or MODE is not an accepted
17500 value.
17501
17502 `GL_INVALID_OPERATION' is generated if `glPolygonMode' is executed
17503 between the execution of `glBegin' and the corresponding execution of
17504 `glEnd'.")
17505
17506 (define-gl-procedures
17507 ((glPolygonOffset
17508 (factor GLfloat)
17509 (units GLfloat)
17510 ->
17511 void))
17512 "Set the scale and units used to calculate depth values.
17513
17514 FACTOR
17515 Specifies a scale factor that is used to create a variable depth
17516 offset for each polygon. The initial value is 0.
17517
17518 UNITS
17519 Is multiplied by an implementation-specific value to create a
17520 constant depth offset. The initial value is 0.
17521
17522 When `GL_POLYGON_OFFSET_FILL', `GL_POLYGON_OFFSET_LINE', or
17523 `GL_POLYGON_OFFSET_POINT' is enabled, each fragment's DEPTH value will
17524 be offset after it is interpolated from the DEPTH values of the
17525 appropriate vertices. The value of the offset is FACTOR×DZ+R×UNITS ,
17526 where DZ is a measurement of the change in depth relative to the screen
17527 area of the polygon, and R is the smallest value that is guaranteed to
17528 produce a resolvable offset for a given implementation. The offset is
17529 added before the depth test is performed and before the value is written
17530 into the depth buffer.
17531
17532 `glPolygonOffset' is useful for rendering hidden-line images, for
17533 applying decals to surfaces, and for rendering solids with highlighted
17534 edges.
17535
17536 `GL_INVALID_OPERATION' is generated if `glPolygonOffset' is executed
17537 between the execution of `glBegin' and the corresponding execution of
17538 `glEnd'.")
17539
17540 (define-gl-procedures
17541 ((glPolygonStipple
17542 (pattern const-GLubyte-*)
17543 ->
17544 void))
17545 "Set the polygon stippling pattern.
17546
17547 PATTERN
17548 Specifies a pointer to a 32×32 stipple pattern that will be
17549 unpacked from memory in the same way that `glDrawPixels' unpacks
17550 pixels.
17551
17552 Polygon stippling, like line stippling (see `glLineStipple'), masks out
17553 certain fragments produced by rasterization, creating a pattern.
17554 Stippling is independent of polygon antialiasing.
17555
17556 PATTERN is a pointer to a 32×32 stipple pattern that is stored in memory
17557 just like the pixel data supplied to a `glDrawPixels' call with height
17558 and WIDTH both equal to 32, a pixel format of `GL_COLOR_INDEX', and data
17559 type of `GL_BITMAP'. That is, the stipple pattern is represented as a
17560 32×32 array of 1-bit color indices packed in unsigned bytes.
17561 `glPixelStore' parameters like `GL_UNPACK_SWAP_BYTES' and
17562 `GL_UNPACK_LSB_FIRST' affect the assembling of the bits into a stipple
17563 pattern. Pixel transfer operations (shift, offset, pixel map) are not
17564 applied to the stipple image, however.
17565
17566 If a non-zero named buffer object is bound to the
17567 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a stipple
17568 pattern is specified, PATTERN is treated as a byte offset into the
17569 buffer object's data store.
17570
17571 To enable and disable polygon stippling, call `glEnable' and `glDisable'
17572 with argument `GL_POLYGON_STIPPLE'. Polygon stippling is initially
17573 disabled. If it's enabled, a rasterized polygon fragment with window
17574 coordinates X_W and Y_W is sent to the next stage of the GL if and only
17575 if the (X_W%32 )th bit in the (Y_W%32 )th row of the stipple pattern is
17576 1 (one). When polygon stippling is disabled, it is as if the stipple
17577 pattern consists of all 1's.
17578
17579 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
17580 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
17581 data store is currently mapped.
17582
17583 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
17584 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
17585 unpacked from the buffer object such that the memory reads required
17586 would exceed the data store size.
17587
17588 `GL_INVALID_OPERATION' is generated if `glPolygonStipple' is executed
17589 between the execution of `glBegin' and the corresponding execution of
17590 `glEnd'.")
17591
17592 (define-gl-procedures
17593 ((glPrioritizeTextures
17594 (n GLsizei)
17595 (textures const-GLuint-*)
17596 (priorities const-GLclampf-*)
17597 ->
17598 void))
17599 "Set texture residence priority.
17600
17601 N
17602 Specifies the number of textures to be prioritized.
17603
17604 TEXTURES
17605 Specifies an array containing the names of the textures to be
17606 prioritized.
17607
17608 PRIORITIES
17609 Specifies an array containing the texture priorities. A priority
17610 given in an element of PRIORITIES applies to the texture named by
17611 the corresponding element of TEXTURES.
17612
17613 `glPrioritizeTextures' assigns the N texture priorities given in
17614 PRIORITIES to the N textures named in TEXTURES.
17615
17616 The GL establishes a ``working set'' of textures that are resident in
17617 texture memory. These textures may be bound to a texture target much
17618 more efficiently than textures that are not resident. By specifying a
17619 priority for each texture, `glPrioritizeTextures' allows applications to
17620 guide the GL implementation in determining which textures should be
17621 resident.
17622
17623 The priorities given in PRIORITIES are clamped to the range [0,1] before
17624 they are assigned. 0 indicates the lowest priority; textures with
17625 priority 0 are least likely to be resident. 1 indicates the highest
17626 priority; textures with priority 1 are most likely to be resident.
17627 However, textures are not guaranteed to be resident until they are used.
17628
17629 `glPrioritizeTextures' silently ignores attempts to prioritize texture 0
17630 or any texture name that does not correspond to an existing texture.
17631
17632 `glPrioritizeTextures' does not require that any of the textures named
17633 by TEXTURES be bound to a texture target. `glTexParameter' may also be
17634 used to set a texture's priority, but only if the texture is currently
17635 bound. This is the only way to set the priority of a default texture.
17636
17637 `GL_INVALID_VALUE' is generated if N is negative.
17638
17639 `GL_INVALID_OPERATION' is generated if `glPrioritizeTextures' is
17640 executed between the execution of `glBegin' and the corresponding
17641 execution of `glEnd'.")
17642
17643 (define-gl-procedures
17644 ((glPushAttrib (mask GLbitfield) -> void)
17645 (glPopAttrib -> void))
17646 "Push and pop the server attribute stack.
17647
17648 MASK
17649 Specifies a mask that indicates which attributes to save. Values
17650 for MASK are listed below.
17651
17652 `glPushAttrib' takes one argument, a mask that indicates which groups of
17653 state variables to save on the attribute stack. Symbolic constants are
17654 used to set bits in the mask. MASK is typically constructed by
17655 specifying the bitwise-or of several of these constants together. The
17656 special mask `GL_ALL_ATTRIB_BITS' can be used to save all stackable
17657 states.
17658
17659 The symbolic mask constants and their associated GL state are as follows
17660 (the second column lists which attributes are saved):
17661
17662
17663
17664 `GL_ACCUM_BUFFER_BIT'
17665 Accumulation buffer clear value
17666
17667 `GL_COLOR_BUFFER_BIT'
17668 `GL_ALPHA_TEST' enable bit
17669
17670
17671 Alpha test function and reference value
17672
17673
17674 `GL_BLEND' enable bit
17675
17676
17677 Blending source and destination functions
17678
17679
17680 Constant blend color
17681
17682
17683 Blending equation
17684
17685
17686 `GL_DITHER' enable bit
17687
17688
17689 `GL_DRAW_BUFFER' setting
17690
17691
17692 `GL_COLOR_LOGIC_OP' enable bit
17693
17694
17695 `GL_INDEX_LOGIC_OP' enable bit
17696
17697
17698 Logic op function
17699
17700
17701 Color mode and index mode clear values
17702
17703
17704 Color mode and index mode writemasks
17705
17706 `GL_CURRENT_BIT'
17707 Current RGBA color
17708
17709
17710 Current color index
17711
17712
17713 Current normal vector
17714
17715
17716 Current texture coordinates
17717
17718
17719 Current raster position
17720
17721
17722 `GL_CURRENT_RASTER_POSITION_VALID' flag
17723
17724
17725 RGBA color associated with current raster position
17726
17727
17728 Color index associated with current raster position
17729
17730
17731 Texture coordinates associated with current raster position
17732
17733
17734 `GL_EDGE_FLAG' flag
17735
17736 `GL_DEPTH_BUFFER_BIT'
17737 `GL_DEPTH_TEST' enable bit
17738
17739
17740 Depth buffer test function
17741
17742
17743 Depth buffer clear value
17744
17745
17746 `GL_DEPTH_WRITEMASK' enable bit
17747
17748 `GL_ENABLE_BIT'
17749 `GL_ALPHA_TEST' flag
17750
17751
17752 `GL_AUTO_NORMAL' flag
17753
17754
17755 `GL_BLEND' flag
17756
17757
17758 Enable bits for the user-definable clipping planes
17759
17760
17761 `GL_COLOR_MATERIAL'
17762
17763
17764 `GL_CULL_FACE' flag
17765
17766
17767 `GL_DEPTH_TEST' flag
17768
17769
17770 `GL_DITHER' flag
17771
17772
17773 `GL_FOG' flag
17774
17775
17776 `GL_LIGHT'I where `0' <= I < `GL_MAX_LIGHTS'
17777
17778
17779 `GL_LIGHTING' flag
17780
17781
17782 `GL_LINE_SMOOTH' flag
17783
17784
17785 `GL_LINE_STIPPLE' flag
17786
17787
17788 `GL_COLOR_LOGIC_OP' flag
17789
17790
17791 `GL_INDEX_LOGIC_OP' flag
17792
17793
17794 `GL_MAP1_'X where X is a map type
17795
17796
17797 `GL_MAP2_'X where X is a map type
17798
17799
17800 `GL_MULTISAMPLE' flag
17801
17802
17803 `GL_NORMALIZE' flag
17804
17805
17806 `GL_POINT_SMOOTH' flag
17807
17808
17809 `GL_POLYGON_OFFSET_LINE' flag
17810
17811
17812 `GL_POLYGON_OFFSET_FILL' flag
17813
17814
17815 `GL_POLYGON_OFFSET_POINT' flag
17816
17817
17818 `GL_POLYGON_SMOOTH' flag
17819
17820
17821 `GL_POLYGON_STIPPLE' flag
17822
17823
17824 `GL_SAMPLE_ALPHA_TO_COVERAGE' flag
17825
17826
17827 `GL_SAMPLE_ALPHA_TO_ONE' flag
17828
17829
17830 `GL_SAMPLE_COVERAGE' flag
17831
17832
17833 `GL_SCISSOR_TEST' flag
17834
17835
17836 `GL_STENCIL_TEST' flag
17837
17838
17839 `GL_TEXTURE_1D' flag
17840
17841
17842 `GL_TEXTURE_2D' flag
17843
17844
17845 `GL_TEXTURE_3D' flag
17846
17847
17848 Flags `GL_TEXTURE_GEN_'X where X is S, T, R, or Q
17849
17850 `GL_EVAL_BIT'
17851 `GL_MAP1_'X enable bits, where X is a map type
17852
17853
17854 `GL_MAP2_'X enable bits, where X is a map type
17855
17856
17857 1D grid endpoints and divisions
17858
17859
17860 2D grid endpoints and divisions
17861
17862
17863 `GL_AUTO_NORMAL' enable bit
17864
17865 `GL_FOG_BIT'
17866 `GL_FOG' enable bit
17867
17868
17869 Fog color
17870
17871
17872 Fog density
17873
17874
17875 Linear fog start
17876
17877
17878 Linear fog end
17879
17880
17881 Fog index
17882
17883
17884 `GL_FOG_MODE' value
17885
17886 `GL_HINT_BIT'
17887 `GL_PERSPECTIVE_CORRECTION_HINT' setting
17888
17889
17890 `GL_POINT_SMOOTH_HINT' setting
17891
17892
17893 `GL_LINE_SMOOTH_HINT' setting
17894
17895
17896 `GL_POLYGON_SMOOTH_HINT' setting
17897
17898
17899 `GL_FOG_HINT' setting
17900
17901
17902 `GL_GENERATE_MIPMAP_HINT' setting
17903
17904
17905 `GL_TEXTURE_COMPRESSION_HINT' setting
17906
17907 `GL_LIGHTING_BIT'
17908 `GL_COLOR_MATERIAL' enable bit
17909
17910
17911 `GL_COLOR_MATERIAL_FACE' value
17912
17913
17914 Color material parameters that are tracking the current color
17915
17916
17917 Ambient scene color
17918
17919
17920 `GL_LIGHT_MODEL_LOCAL_VIEWER' value
17921
17922
17923 `GL_LIGHT_MODEL_TWO_SIDE' setting
17924
17925
17926 `GL_LIGHTING' enable bit
17927
17928
17929 Enable bit for each light
17930
17931
17932 Ambient, diffuse, and specular intensity for each light
17933
17934
17935 Direction, position, exponent, and cutoff angle for each light
17936
17937
17938 Constant, linear, and quadratic attenuation factors for each light
17939
17940
17941 Ambient, diffuse, specular, and emissive color for each material
17942
17943
17944 Ambient, diffuse, and specular color indices for each material
17945
17946
17947 Specular exponent for each material
17948
17949
17950 `GL_SHADE_MODEL' setting
17951
17952 `GL_LINE_BIT'
17953 `GL_LINE_SMOOTH' flag
17954
17955
17956 `GL_LINE_STIPPLE' enable bit
17957
17958
17959 Line stipple pattern and repeat counter
17960
17961
17962 Line width
17963
17964 `GL_LIST_BIT'
17965 `GL_LIST_BASE' setting
17966
17967 `GL_MULTISAMPLE_BIT'
17968 `GL_MULTISAMPLE' flag
17969
17970
17971 `GL_SAMPLE_ALPHA_TO_COVERAGE' flag
17972
17973
17974 `GL_SAMPLE_ALPHA_TO_ONE' flag
17975
17976
17977 `GL_SAMPLE_COVERAGE' flag
17978
17979
17980 `GL_SAMPLE_COVERAGE_VALUE' value
17981
17982
17983 `GL_SAMPLE_COVERAGE_INVERT' value
17984
17985 `GL_PIXEL_MODE_BIT'
17986 `GL_RED_BIAS' and `GL_RED_SCALE' settings
17987
17988
17989 `GL_GREEN_BIAS' and `GL_GREEN_SCALE' values
17990
17991
17992 `GL_BLUE_BIAS' and `GL_BLUE_SCALE'
17993
17994
17995 `GL_ALPHA_BIAS' and `GL_ALPHA_SCALE'
17996
17997
17998 `GL_DEPTH_BIAS' and `GL_DEPTH_SCALE'
17999
18000
18001 `GL_INDEX_OFFSET' and `GL_INDEX_SHIFT' values
18002
18003
18004 `GL_MAP_COLOR' and `GL_MAP_STENCIL' flags
18005
18006
18007 `GL_ZOOM_X' and `GL_ZOOM_Y' factors
18008
18009
18010 `GL_READ_BUFFER' setting
18011
18012 `GL_POINT_BIT'
18013 `GL_POINT_SMOOTH' flag
18014
18015
18016 Point size
18017
18018 `GL_POLYGON_BIT'
18019 `GL_CULL_FACE' enable bit
18020
18021
18022 `GL_CULL_FACE_MODE' value
18023
18024
18025 `GL_FRONT_FACE' indicator
18026
18027
18028 `GL_POLYGON_MODE' setting
18029
18030
18031 `GL_POLYGON_SMOOTH' flag
18032
18033
18034 `GL_POLYGON_STIPPLE' enable bit
18035
18036
18037 `GL_POLYGON_OFFSET_FILL' flag
18038
18039
18040 `GL_POLYGON_OFFSET_LINE' flag
18041
18042
18043 `GL_POLYGON_OFFSET_POINT' flag
18044
18045
18046 `GL_POLYGON_OFFSET_FACTOR'
18047
18048
18049 `GL_POLYGON_OFFSET_UNITS'
18050
18051 `GL_POLYGON_STIPPLE_BIT'
18052 Polygon stipple image
18053
18054 `GL_SCISSOR_BIT'
18055 `GL_SCISSOR_TEST' flag
18056
18057
18058 Scissor box
18059
18060 `GL_STENCIL_BUFFER_BIT'
18061 `GL_STENCIL_TEST' enable bit
18062
18063
18064 Stencil function and reference value
18065
18066
18067 Stencil value mask
18068
18069
18070 Stencil fail, pass, and depth buffer pass actions
18071
18072
18073 Stencil buffer clear value
18074
18075
18076 Stencil buffer writemask
18077
18078 `GL_TEXTURE_BIT'
18079 Enable bits for the four texture coordinates
18080
18081
18082 Border color for each texture image
18083
18084
18085 Minification function for each texture image
18086
18087
18088 Magnification function for each texture image
18089
18090
18091 Texture coordinates and wrap mode for each texture image
18092
18093
18094 Color and mode for each texture environment
18095
18096
18097 Enable bits `GL_TEXTURE_GEN_'X, X is S, T, R, and Q
18098
18099
18100 `GL_TEXTURE_GEN_MODE' setting for S, T, R, and Q
18101
18102
18103 `glTexGen' plane equations for S, T, R, and Q
18104
18105
18106 Current texture bindings (for example, `GL_TEXTURE_BINDING_2D')
18107
18108 `GL_TRANSFORM_BIT'
18109 Coefficients of the six clipping planes
18110
18111
18112 Enable bits for the user-definable clipping planes
18113
18114
18115 `GL_MATRIX_MODE' value
18116
18117
18118 `GL_NORMALIZE' flag
18119
18120
18121 `GL_RESCALE_NORMAL' flag
18122
18123 `GL_VIEWPORT_BIT'
18124 Depth range (near and far)
18125
18126
18127 Viewport origin and extent
18128
18129 `glPopAttrib' restores the values of the state variables saved with the
18130 last `glPushAttrib' command. Those not saved are left unchanged.
18131
18132 It is an error to push attributes onto a full stack or to pop attributes
18133 off an empty stack. In either case, the error flag is set and no other
18134 change is made to GL state.
18135
18136 Initially, the attribute stack is empty.
18137
18138 `GL_STACK_OVERFLOW' is generated if `glPushAttrib' is called while the
18139 attribute stack is full.
18140
18141 `GL_STACK_UNDERFLOW' is generated if `glPopAttrib' is called while the
18142 attribute stack is empty.
18143
18144 `GL_INVALID_OPERATION' is generated if `glPushAttrib' or `glPopAttrib'
18145 is executed between the execution of `glBegin' and the corresponding
18146 execution of `glEnd'.")
18147
18148 (define-gl-procedures
18149 ((glPushClientAttrib (mask GLbitfield) -> void)
18150 (glPopClientAttrib -> void))
18151 "Push and pop the client attribute stack.
18152
18153 MASK
18154 Specifies a mask that indicates which attributes to save. Values
18155 for MASK are listed below.
18156
18157 `glPushClientAttrib' takes one argument, a mask that indicates which
18158 groups of client-state variables to save on the client attribute stack.
18159 Symbolic constants are used to set bits in the mask. MASK is typically
18160 constructed by specifying the bitwise-or of several of these constants
18161 together. The special mask `GL_CLIENT_ALL_ATTRIB_BITS' can be used to
18162 save all stackable client state.
18163
18164 The symbolic mask constants and their associated GL client state are as
18165 follows (the second column lists which attributes are saved):
18166
18167 `GL_CLIENT_PIXEL_STORE_BIT' Pixel storage modes
18168 `GL_CLIENT_VERTEX_ARRAY_BIT' Vertex arrays (and enables)
18169
18170 `glPopClientAttrib' restores the values of the client-state variables
18171 saved with the last `glPushClientAttrib'. Those not saved are left
18172 unchanged.
18173
18174 It is an error to push attributes onto a full client attribute stack or
18175 to pop attributes off an empty stack. In either case, the error flag is
18176 set, and no other change is made to GL state.
18177
18178 Initially, the client attribute stack is empty.
18179
18180 `GL_STACK_OVERFLOW' is generated if `glPushClientAttrib' is called while
18181 the attribute stack is full.
18182
18183 `GL_STACK_UNDERFLOW' is generated if `glPopClientAttrib' is called while
18184 the attribute stack is empty.")
18185
18186 (define-gl-procedures
18187 ((glPushMatrix -> void) (glPopMatrix -> void))
18188 "Push and pop the current matrix stack.
18189
18190 There is a stack of matrices for each of the matrix modes. In
18191 `GL_MODELVIEW' mode, the stack depth is at least 32. In the other modes,
18192 `GL_COLOR', `GL_PROJECTION', and `GL_TEXTURE', the depth is at least 2.
18193 The current matrix in any mode is the matrix on the top of the stack for
18194 that mode.
18195
18196 `glPushMatrix' pushes the current matrix stack down by one, duplicating
18197 the current matrix. That is, after a `glPushMatrix' call, the matrix on
18198 top of the stack is identical to the one below it.
18199
18200 `glPopMatrix' pops the current matrix stack, replacing the current
18201 matrix with the one below it on the stack.
18202
18203 Initially, each of the stacks contains one matrix, an identity matrix.
18204
18205 It is an error to push a full matrix stack or to pop a matrix stack that
18206 contains only a single matrix. In either case, the error flag is set and
18207 no other change is made to GL state.
18208
18209 `GL_STACK_OVERFLOW' is generated if `glPushMatrix' is called while the
18210 current matrix stack is full.
18211
18212 `GL_STACK_UNDERFLOW' is generated if `glPopMatrix' is called while the
18213 current matrix stack contains only a single matrix.
18214
18215 `GL_INVALID_OPERATION' is generated if `glPushMatrix' or `glPopMatrix'
18216 is executed between the execution of `glBegin' and the corresponding
18217 execution of `glEnd'.")
18218
18219 (define-gl-procedures
18220 ((glPushName (name GLuint) -> void)
18221 (glPopName -> void))
18222 "Push and pop the name stack.
18223
18224 NAME
18225 Specifies a name that will be pushed onto the name stack.
18226
18227 The name stack is used during selection mode to allow sets of rendering
18228 commands to be uniquely identified. It consists of an ordered set of
18229 unsigned integers and is initially empty.
18230
18231 `glPushName' causes NAME to be pushed onto the name stack. `glPopName'
18232 pops one name off the top of the stack.
18233
18234 The maximum name stack depth is implementation-dependent; call
18235 `GL_MAX_NAME_STACK_DEPTH' to find out the value for a particular
18236 implementation. It is an error to push a name onto a full stack or to
18237 pop a name off an empty stack. It is also an error to manipulate the
18238 name stack between the execution of `glBegin' and the corresponding
18239 execution of `glEnd'. In any of these cases, the error flag is set and
18240 no other change is made to GL state.
18241
18242 The name stack is always empty while the render mode is not `GL_SELECT'.
18243 Calls to `glPushName' or `glPopName' while the render mode is not
18244 `GL_SELECT' are ignored.
18245
18246 `GL_STACK_OVERFLOW' is generated if `glPushName' is called while the
18247 name stack is full.
18248
18249 `GL_STACK_UNDERFLOW' is generated if `glPopName' is called while the
18250 name stack is empty.
18251
18252 `GL_INVALID_OPERATION' is generated if `glPushName' or `glPopName' is
18253 executed between a call to `glBegin' and the corresponding call to
18254 `glEnd'.")
18255
18256 (define-gl-procedures
18257 ((glRasterPos2s (x GLshort) (y GLshort) -> void)
18258 (glRasterPos2i (x GLint) (y GLint) -> void)
18259 (glRasterPos2f (x GLfloat) (y GLfloat) -> void)
18260 (glRasterPos2d (x GLdouble) (y GLdouble) -> void)
18261 (glRasterPos3s
18262 (x GLshort)
18263 (y GLshort)
18264 (z GLshort)
18265 ->
18266 void)
18267 (glRasterPos3i
18268 (x GLint)
18269 (y GLint)
18270 (z GLint)
18271 ->
18272 void)
18273 (glRasterPos3f
18274 (x GLfloat)
18275 (y GLfloat)
18276 (z GLfloat)
18277 ->
18278 void)
18279 (glRasterPos3d
18280 (x GLdouble)
18281 (y GLdouble)
18282 (z GLdouble)
18283 ->
18284 void)
18285 (glRasterPos4s
18286 (x GLshort)
18287 (y GLshort)
18288 (z GLshort)
18289 (w GLshort)
18290 ->
18291 void)
18292 (glRasterPos4i
18293 (x GLint)
18294 (y GLint)
18295 (z GLint)
18296 (w GLint)
18297 ->
18298 void)
18299 (glRasterPos4f
18300 (x GLfloat)
18301 (y GLfloat)
18302 (z GLfloat)
18303 (w GLfloat)
18304 ->
18305 void)
18306 (glRasterPos4d
18307 (x GLdouble)
18308 (y GLdouble)
18309 (z GLdouble)
18310 (w GLdouble)
18311 ->
18312 void)
18313 (glRasterPos2sv (v const-GLshort-*) -> void)
18314 (glRasterPos2iv (v const-GLint-*) -> void)
18315 (glRasterPos2fv (v const-GLfloat-*) -> void)
18316 (glRasterPos2dv (v const-GLdouble-*) -> void)
18317 (glRasterPos3sv (v const-GLshort-*) -> void)
18318 (glRasterPos3iv (v const-GLint-*) -> void)
18319 (glRasterPos3fv (v const-GLfloat-*) -> void)
18320 (glRasterPos3dv (v const-GLdouble-*) -> void)
18321 (glRasterPos4sv (v const-GLshort-*) -> void)
18322 (glRasterPos4iv (v const-GLint-*) -> void)
18323 (glRasterPos4fv (v const-GLfloat-*) -> void)
18324 (glRasterPos4dv (v const-GLdouble-*) -> void))
18325 "Specify the raster position for pixel operations.
18326
18327 X
18328 Y
18329
18330 Z
18331
18332 W
18333
18334 Specify the X , Y , Z , and W object coordinates (if present) for
18335 the raster position.
18336
18337 The GL maintains a 3D position in window coordinates. This position,
18338 called the raster position, is used to position pixel and bitmap write
18339 operations. It is maintained with subpixel accuracy. See `glBitmap',
18340 `glDrawPixels', and `glCopyPixels'.
18341
18342 The current raster position consists of three window coordinates (X , Y
18343 , Z ), a clip coordinate value (W ), an eye coordinate distance, a valid
18344 bit, and associated color data and texture coordinates. The W coordinate
18345 is a clip coordinate, because W is not projected to window coordinates.
18346 `glRasterPos4' specifies object coordinates X , Y , Z , and W
18347 explicitly. `glRasterPos3' specifies object coordinate X , Y , and Z
18348 explicitly, while W is implicitly set to 1. `glRasterPos2' uses the
18349 argument values for X and Y while implicitly setting Z and W to 0 and 1.
18350
18351 The object coordinates presented by `glRasterPos' are treated just like
18352 those of a `glVertex' command: They are transformed by the current
18353 modelview and projection matrices and passed to the clipping stage. If
18354 the vertex is not culled, then it is projected and scaled to window
18355 coordinates, which become the new current raster position, and the
18356 `GL_CURRENT_RASTER_POSITION_VALID' flag is set. If the vertex IS culled,
18357 then the valid bit is cleared and the current raster position and
18358 associated color and texture coordinates are undefined.
18359
18360 The current raster position also includes some associated color data and
18361 texture coordinates. If lighting is enabled, then
18362 `GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `GL_CURRENT_RASTER_INDEX'
18363 (in color index mode) is set to the color produced by the lighting
18364 calculation (see `glLight', `glLightModel', and `glShadeModel'). If
18365 lighting is disabled, current color (in RGBA mode, state variable
18366 `GL_CURRENT_COLOR') or color index (in color index mode, state variable
18367 `GL_CURRENT_INDEX') is used to update the current raster color.
18368 `GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated.
18369
18370 Likewise, `GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of
18371 `GL_CURRENT_TEXTURE_COORDS', based on the texture matrix and the texture
18372 generation functions (see `glTexGen'). Finally, the distance from the
18373 origin of the eye coordinate system to the vertex as transformed by only
18374 the modelview matrix replaces `GL_CURRENT_RASTER_DISTANCE'.
18375
18376 Initially, the current raster position is (0, 0, 0, 1), the current
18377 raster distance is 0, the valid bit is set, the associated RGBA color is
18378 (1, 1, 1, 1), the associated color index is 1, and the associated
18379 texture coordinates are (0, 0, 0, 1). In RGBA mode,
18380 `GL_CURRENT_RASTER_INDEX' is always 1; in color index mode, the current
18381 raster RGBA color always maintains its initial value.
18382
18383 `GL_INVALID_OPERATION' is generated if `glRasterPos' is executed between
18384 the execution of `glBegin' and the corresponding execution of `glEnd'.")
18385
18386 (define-gl-procedures
18387 ((glReadBuffer (mode GLenum) -> void))
18388 "Select a color buffer source for pixels.
18389
18390 MODE
18391 Specifies a color buffer. Accepted values are `GL_FRONT_LEFT',
18392 `GL_FRONT_RIGHT', `GL_BACK_LEFT', `GL_BACK_RIGHT', `GL_FRONT',
18393 `GL_BACK', `GL_LEFT', `GL_RIGHT', and `GL_AUX'I, where I is between
18394 0 and the value of `GL_AUX_BUFFERS' minus 1.
18395
18396 `glReadBuffer' specifies a color buffer as the source for subsequent
18397 `glReadPixels', `glCopyTexImage1D', `glCopyTexImage2D',
18398 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D', and
18399 `glCopyPixels' commands. MODE accepts one of twelve or more predefined
18400 values. (`GL_AUX0' through `GL_AUX3' are always defined.) In a fully
18401 configured system, `GL_FRONT', `GL_LEFT', and `GL_FRONT_LEFT' all name
18402 the front left buffer, `GL_FRONT_RIGHT' and `GL_RIGHT' name the front
18403 right buffer, and `GL_BACK_LEFT' and `GL_BACK' name the back left
18404 buffer.
18405
18406 Nonstereo double-buffered configurations have only a front left and a
18407 back left buffer. Single-buffered configurations have a front left and a
18408 front right buffer if stereo, and only a front left buffer if nonstereo.
18409 It is an error to specify a nonexistent buffer to `glReadBuffer'.
18410
18411 MODE is initially `GL_FRONT' in single-buffered configurations and
18412 `GL_BACK' in double-buffered configurations.
18413
18414 `GL_INVALID_ENUM' is generated if MODE is not one of the twelve (or
18415 more) accepted values.
18416
18417 `GL_INVALID_OPERATION' is generated if MODE specifies a buffer that does
18418 not exist.
18419
18420 `GL_INVALID_OPERATION' is generated if `glReadBuffer' is executed
18421 between the execution of `glBegin' and the corresponding execution of
18422 `glEnd'.")
18423
18424 (define-gl-procedures
18425 ((glReadPixels
18426 (x GLint)
18427 (y GLint)
18428 (width GLsizei)
18429 (height GLsizei)
18430 (format GLenum)
18431 (type GLenum)
18432 (data GLvoid-*)
18433 ->
18434 void))
18435 "Read a block of pixels from the frame buffer.
18436
18437 X
18438 Y
18439
18440 Specify the window coordinates of the first pixel that is read from
18441 the frame buffer. This location is the lower left corner of a
18442 rectangular block of pixels.
18443
18444 WIDTH
18445 HEIGHT
18446
18447 Specify the dimensions of the pixel rectangle. WIDTH and HEIGHT of
18448 one correspond to a single pixel.
18449
18450 FORMAT
18451 Specifies the format of the pixel data. The following symbolic
18452 values are accepted: `GL_COLOR_INDEX', `GL_STENCIL_INDEX',
18453 `GL_DEPTH_COMPONENT', `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA',
18454 `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and
18455 `GL_LUMINANCE_ALPHA'.
18456
18457 TYPE
18458 Specifies the data type of the pixel data. Must be one of
18459 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
18460 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
18461 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
18462 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
18463 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
18464 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
18465 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
18466 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV'.
18467
18468 DATA
18469 Returns the pixel data.
18470
18471 `glReadPixels' returns pixel data from the frame buffer, starting with
18472 the pixel whose lower left corner is at location (X, Y), into client
18473 memory starting at location DATA. Several parameters control the
18474 processing of the pixel data before it is placed into client memory.
18475 These parameters are set with three commands: `glPixelStore',
18476 `glPixelTransfer', and `glPixelMap'. This reference page describes the
18477 effects on `glReadPixels' of most, but not all of the parameters
18478 specified by these three commands.
18479
18480 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
18481 target (see `glBindBuffer') while a block of pixels is requested, DATA
18482 is treated as a byte offset into the buffer object's data store rather
18483 than a pointer to client memory.
18484
18485 When the `ARB_imaging' extension is supported, the pixel data may be
18486 processed by additional operations including color table lookup, color
18487 matrix transformations, convolutions, histograms, and minimum and
18488 maximum pixel value computations.
18489
18490 `glReadPixels' returns values from each pixel with lower left corner at
18491 (X+I,Y+J) for 0<=I<WIDTH and 0<=J<HEIGHT . This pixel is said to be the
18492 I th pixel in the J th row. Pixels are returned in row order from the
18493 lowest to the highest row, left to right in each row.
18494
18495 FORMAT specifies the format for the returned pixel values; accepted
18496 values are:
18497
18498 `GL_COLOR_INDEX'
18499 Color indices are read from the color buffer selected by
18500 `glReadBuffer'. Each index is converted to fixed point, shifted
18501 left or right depending on the value and sign of `GL_INDEX_SHIFT',
18502 and added to `GL_INDEX_OFFSET'. If `GL_MAP_COLOR' is `GL_TRUE',
18503 indices are replaced by their mappings in the table
18504 `GL_PIXEL_MAP_I_TO_I'.
18505
18506 `GL_STENCIL_INDEX'
18507 Stencil values are read from the stencil buffer. Each index is
18508 converted to fixed point, shifted left or right depending on the
18509 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'.
18510 If `GL_MAP_STENCIL' is `GL_TRUE', indices are replaced by their
18511 mappings in the table `GL_PIXEL_MAP_S_TO_S'.
18512
18513 `GL_DEPTH_COMPONENT'
18514 Depth values are read from the depth buffer. Each component is
18515 converted to floating point such that the minimum depth value maps
18516 to 0 and the maximum value maps to 1. Each component is then
18517 multiplied by `GL_DEPTH_SCALE', added to `GL_DEPTH_BIAS', and
18518 finally clamped to the range [0,1] .
18519
18520 `GL_RED'
18521 `GL_GREEN'
18522 `GL_BLUE'
18523 `GL_ALPHA'
18524 `GL_RGB'
18525 `GL_BGR'
18526 `GL_RGBA'
18527 `GL_BGRA'
18528 `GL_LUMINANCE'
18529 `GL_LUMINANCE_ALPHA'
18530 Processing differs depending on whether color buffers store color
18531 indices or RGBA color components. If color indices are stored, they
18532 are read from the color buffer selected by `glReadBuffer'. Each
18533 index is converted to fixed point, shifted left or right depending
18534 on the value and sign of `GL_INDEX_SHIFT', and added to
18535 `GL_INDEX_OFFSET'. Indices are then replaced by the red, green,
18536 blue, and alpha values obtained by indexing the tables
18537 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
18538 `GL_PIXEL_MAP_I_TO_B', and `GL_PIXEL_MAP_I_TO_A'. Each table must
18539 be of size 2^N , but N may be different for different tables.
18540 Before an index is used to look up a value in a table of size 2^N ,
18541 it must be masked against 2^N-1 .
18542
18543 If RGBA color components are stored in the color buffers, they are
18544 read from the color buffer selected by `glReadBuffer'. Each color
18545 component is converted to floating point such that zero intensity
18546 maps to 0.0 and full intensity maps to 1.0. Each component is then
18547 multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where C is
18548 RED, GREEN, BLUE, or ALPHA. Finally, if `GL_MAP_COLOR' is
18549 `GL_TRUE', each component is clamped to the range [0,1] , scaled to
18550 the size of its corresponding table, and is then replaced by its
18551 mapping in the table `GL_PIXEL_MAP_c_TO_c', where C is R, G, B, or
18552 A.
18553
18554 Unneeded data is then discarded. For example, `GL_RED' discards the
18555 green, blue, and alpha components, while `GL_RGB' discards only the
18556 alpha component. `GL_LUMINANCE' computes a single-component value
18557 as the sum of the red, green, and blue components, and
18558 `GL_LUMINANCE_ALPHA' does the same, while keeping alpha as a second
18559 value. The final values are clamped to the range [0,1] .
18560
18561 The shift, scale, bias, and lookup factors just described are all
18562 specified by `glPixelTransfer'. The lookup table contents themselves are
18563 specified by `glPixelMap'.
18564
18565 Finally, the indices or components are converted to the proper format,
18566 as specified by TYPE. If FORMAT is `GL_COLOR_INDEX' or
18567 `GL_STENCIL_INDEX' and TYPE is not `GL_FLOAT', each index is masked with
18568 the mask value given in the following table. If TYPE is `GL_FLOAT', then
18569 each integer index is converted to single-precision floating-point
18570 format.
18571
18572 If FORMAT is `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
18573 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'
18574 and TYPE is not `GL_FLOAT', each component is multiplied by the
18575 multiplier shown in the following table. If type is `GL_FLOAT', then
18576 each component is passed as is (or converted to the client's
18577 single-precision floating-point format if it is different from the one
18578 used by the GL).
18579
18580
18581
18582 TYPE
18583 *Index Mask*, *Component Conversion*
18584
18585 `GL_UNSIGNED_BYTE'
18586 2^8-1 , (2^8-1,)\u2062C
18587
18588 `GL_BYTE'
18589 2^7-1 , (2^8-1,)\u2062C-1,/2
18590
18591 `GL_BITMAP'
18592 1 , 1
18593
18594 `GL_UNSIGNED_SHORT'
18595 2^16-1 , (2^16-1,)\u2062C
18596
18597 `GL_SHORT'
18598 2^15-1 , (2^16-1,)\u2062C-1,/2
18599
18600 `GL_UNSIGNED_INT'
18601 2^32-1 , (2^32-1,)\u2062C
18602
18603 `GL_INT'
18604 2^31-1 , (2^32-1,)\u2062C-1,/2
18605
18606 `GL_FLOAT'
18607 none , C
18608
18609 Return values are placed in memory as follows. If FORMAT is
18610 `GL_COLOR_INDEX', `GL_STENCIL_INDEX', `GL_DEPTH_COMPONENT', `GL_RED',
18611 `GL_GREEN', `GL_BLUE', `GL_ALPHA', or `GL_LUMINANCE', a single value is
18612 returned and the data for the I th pixel in the J th row is placed in
18613 location (J,)\u2062WIDTH+I . `GL_RGB' and `GL_BGR' return three values,
18614 `GL_RGBA' and `GL_BGRA' return four values, and `GL_LUMINANCE_ALPHA'
18615 returns two values for each pixel, with all values corresponding to a
18616 single pixel occupying contiguous space in DATA. Storage parameters set
18617 by `glPixelStore', such as `GL_PACK_LSB_FIRST' and `GL_PACK_SWAP_BYTES',
18618 affect the way that data is written into memory. See `glPixelStore' for
18619 a description.
18620
18621 `GL_INVALID_ENUM' is generated if FORMAT or TYPE is not an accepted
18622 value.
18623
18624 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
18625 `GL_COLOR_INDEX' or `GL_STENCIL_INDEX'.
18626
18627 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
18628
18629 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_COLOR_INDEX' and
18630 the color buffers store RGBA color components.
18631
18632 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_STENCIL_INDEX' and
18633 there is no stencil buffer.
18634
18635 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
18636 and there is no depth buffer.
18637
18638 `GL_INVALID_OPERATION' is generated if TYPE is one of
18639 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
18640 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
18641 is not `GL_RGB'.
18642
18643 `GL_INVALID_OPERATION' is generated if TYPE is one of
18644 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
18645 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
18646 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
18647 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
18648 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
18649
18650 The formats `GL_BGR', and `GL_BGRA' and types `GL_UNSIGNED_BYTE_3_3_2',
18651 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
18652 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
18653 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
18654 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
18655 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
18656 `GL_UNSIGNED_INT_2_10_10_10_REV' are available only if the GL version is
18657 1.2 or greater.
18658
18659 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18660 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
18661 store is currently mapped.
18662
18663 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18664 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
18665 to the buffer object such that the memory writes required would exceed
18666 the data store size.
18667
18668 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18669 bound to the `GL_PIXEL_PACK_BUFFER' target and DATA is not evenly
18670 divisible into the number of bytes needed to store in memory a datum
18671 indicated by TYPE.
18672
18673 `GL_INVALID_OPERATION' is generated if `glReadPixels' is executed
18674 between the execution of `glBegin' and the corresponding execution of
18675 `glEnd'.")
18676
18677 (define-gl-procedures
18678 ((glRectd
18679 (x1 GLdouble)
18680 (y1 GLdouble)
18681 (x2 GLdouble)
18682 (y2 GLdouble)
18683 ->
18684 void)
18685 (glRectf
18686 (x1 GLfloat)
18687 (y1 GLfloat)
18688 (x2 GLfloat)
18689 (y2 GLfloat)
18690 ->
18691 void)
18692 (glRecti
18693 (x1 GLint)
18694 (y1 GLint)
18695 (x2 GLint)
18696 (y2 GLint)
18697 ->
18698 void)
18699 (glRects
18700 (x1 GLshort)
18701 (y1 GLshort)
18702 (x2 GLshort)
18703 (y2 GLshort)
18704 ->
18705 void)
18706 (glRectdv
18707 (v1 const-GLdouble-*)
18708 (v2 const-GLdouble-*)
18709 ->
18710 void)
18711 (glRectfv
18712 (v1 const-GLfloat-*)
18713 (v2 const-GLfloat-*)
18714 ->
18715 void)
18716 (glRectiv
18717 (v1 const-GLint-*)
18718 (v2 const-GLint-*)
18719 ->
18720 void)
18721 (glRectsv
18722 (v1 const-GLshort-*)
18723 (v2 const-GLshort-*)
18724 ->
18725 void))
18726 "Draw a rectangle.
18727
18728 X1
18729 Y1
18730
18731 Specify one vertex of a rectangle.
18732
18733 X2
18734 Y2
18735
18736 Specify the opposite vertex of the rectangle.
18737
18738 `glRect' supports efficient specification of rectangles as two corner
18739 points. Each rectangle command takes four arguments, organized either as
18740 two consecutive pairs of (X,Y) coordinates or as two pointers to arrays,
18741 each containing an (X,Y) pair. The resulting rectangle is defined in the
18742 Z=0 plane.
18743
18744 `glRect'(X1, Y1, X2, Y2) is exactly equivalent to the following
18745 sequence: Note that if the second vertex is above and to the right of
18746 the first vertex, the rectangle is constructed with a counterclockwise
18747 winding.
18748
18749
18750 glBegin(`GL_POLYGON');
18751 glVertex2(X1, Y1);
18752 glVertex2(X2, Y1);
18753 glVertex2(X2, Y2);
18754 glVertex2(X1, Y2);
18755 glEnd();
18756
18757 `GL_INVALID_OPERATION' is generated if `glRect' is executed between the
18758 execution of `glBegin' and the corresponding execution of `glEnd'.")
18759
18760 (define-gl-procedures
18761 ((glRenderMode (mode GLenum) -> GLint))
18762 "Set rasterization mode.
18763
18764 MODE
18765 Specifies the rasterization mode. Three values are accepted:
18766 `GL_RENDER', `GL_SELECT', and `GL_FEEDBACK'. The initial value is
18767 `GL_RENDER'.
18768
18769 `glRenderMode' sets the rasterization mode. It takes one argument, MODE,
18770 which can assume one of three predefined values:
18771
18772 `GL_RENDER'
18773 Render mode. Primitives are rasterized, producing pixel fragments,
18774 which are written into the frame buffer. This is the normal mode
18775 and also the default mode.
18776
18777 `GL_SELECT'
18778 Selection mode. No pixel fragments are produced, and no change to
18779 the frame buffer contents is made. Instead, a record of the names
18780 of primitives that would have been drawn if the render mode had
18781 been `GL_RENDER' is returned in a select buffer, which must be
18782 created (see `glSelectBuffer') before selection mode is entered.
18783
18784 `GL_FEEDBACK'
18785 Feedback mode. No pixel fragments are produced, and no change to
18786 the frame buffer contents is made. Instead, the coordinates and
18787 attributes of vertices that would have been drawn if the render
18788 mode had been `GL_RENDER' is returned in a feedback buffer, which
18789 must be created (see `glFeedbackBuffer') before feedback mode is
18790 entered.
18791
18792 The return value of `glRenderMode' is determined by the render mode at
18793 the time `glRenderMode' is called, rather than by MODE. The values
18794 returned for the three render modes are as follows:
18795
18796 `GL_RENDER'
18797 0.
18798
18799 `GL_SELECT'
18800 The number of hit records transferred to the select buffer.
18801
18802 `GL_FEEDBACK'
18803 The number of values (not vertices) transferred to the feedback
18804 buffer.
18805
18806 See the `glSelectBuffer' and `glFeedbackBuffer' reference pages for more
18807 details concerning selection and feedback operation.
18808
18809 `GL_INVALID_ENUM' is generated if MODE is not one of the three accepted
18810 values.
18811
18812 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is called while
18813 the render mode is `GL_SELECT', or if `glRenderMode' is called with
18814 argument `GL_SELECT' before `glSelectBuffer' is called at least once.
18815
18816 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is called
18817 while the render mode is `GL_FEEDBACK', or if `glRenderMode' is called
18818 with argument `GL_FEEDBACK' before `glFeedbackBuffer' is called at least
18819 once.
18820
18821 `GL_INVALID_OPERATION' is generated if `glRenderMode' is executed
18822 between the execution of `glBegin' and the corresponding execution of
18823 `glEnd'.")
18824
18825 (define-gl-procedures
18826 ((glResetHistogram (target GLenum) -> void))
18827 "Reset histogram table entries to zero.
18828
18829 TARGET
18830 Must be `GL_HISTOGRAM'.
18831
18832 `glResetHistogram' resets all the elements of the current histogram
18833 table to zero.
18834
18835 `GL_INVALID_ENUM' is generated if TARGET is not `GL_HISTOGRAM'.
18836
18837 `GL_INVALID_OPERATION' is generated if `glResetHistogram' is executed
18838 between the execution of `glBegin' and the corresponding execution of
18839 `glEnd'.")
18840
18841 (define-gl-procedures
18842 ((glResetMinmax (target GLenum) -> void))
18843 "Reset minmax table entries to initial values.
18844
18845 TARGET
18846 Must be `GL_MINMAX'.
18847
18848 `glResetMinmax' resets the elements of the current minmax table to their
18849 initial values: the ``maximum'' element receives the minimum possible
18850 component values, and the ``minimum'' element receives the maximum
18851 possible component values.
18852
18853 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
18854
18855 `GL_INVALID_OPERATION' is generated if `glResetMinmax' is executed
18856 between the execution of `glBegin' and the corresponding execution of
18857 `glEnd'.")
18858
18859 (define-gl-procedures
18860 ((glRotated
18861 (angle GLdouble)
18862 (x GLdouble)
18863 (y GLdouble)
18864 (z GLdouble)
18865 ->
18866 void)
18867 (glRotatef
18868 (angle GLfloat)
18869 (x GLfloat)
18870 (y GLfloat)
18871 (z GLfloat)
18872 ->
18873 void))
18874 "Multiply the current matrix by a rotation matrix.
18875
18876 ANGLE
18877 Specifies the angle of rotation, in degrees.
18878
18879 X
18880 Y
18881
18882 Z
18883
18884 Specify the X, Y, and Z coordinates of a vector, respectively.
18885
18886 `glRotate' produces a rotation of ANGLE degrees around the vector (X,YZ)
18887 . The current matrix (see `glMatrixMode') is multiplied by a rotation
18888 matrix with the product replacing the current matrix, as if
18889 `glMultMatrix' were called with the following matrix as its argument:
18890
18891 ((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
18892 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
18893 Z^2\u2061(1-C,)+C 0), (0 0 0 1),)
18894
18895
18896
18897 Where C=COS\u2061(ANGLE,) , S=SIN\u2061(ANGLE,) , and ∥(X,YZ),∥=1 (if not, the GL
18898 will normalize this vector).
18899
18900
18901
18902
18903
18904 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
18905 objects drawn after `glRotate' is called are rotated. Use `glPushMatrix'
18906 and `glPopMatrix' to save and restore the unrotated coordinate system.
18907
18908 `GL_INVALID_OPERATION' is generated if `glRotate' is executed between
18909 the execution of `glBegin' and the corresponding execution of `glEnd'.")
18910
18911 (define-gl-procedures
18912 ((glSampleCoverage
18913 (value GLclampf)
18914 (invert GLboolean)
18915 ->
18916 void))
18917 "Specify multisample coverage parameters.
18918
18919 VALUE
18920 Specify a single floating-point sample coverage value. The value is
18921 clamped to the range [0,1] . The initial value is 1.0.
18922
18923 INVERT
18924 Specify a single boolean value representing if the coverage masks
18925 should be inverted. `GL_TRUE' and `GL_FALSE' are accepted. The
18926 initial value is `GL_FALSE'.
18927
18928 Multisampling samples a pixel multiple times at various
18929 implementation-dependent subpixel locations to generate antialiasing
18930 effects. Multisampling transparently antialiases points, lines,
18931 polygons, bitmaps, and images if it is enabled.
18932
18933 VALUE is used in constructing a temporary mask used in determining which
18934 samples will be used in resolving the final fragment color. This mask is
18935 bitwise-anded with the coverage mask generated from the multisampling
18936 computation. If the INVERT flag is set, the temporary mask is inverted
18937 (all bits flipped) and then the bitwise-and is computed.
18938
18939 If an implementation does not have any multisample buffers available, or
18940 multisampling is disabled, rasterization occurs with only a single
18941 sample computing a pixel's final RGB color.
18942
18943 Provided an implementation supports multisample buffers, and
18944 multisampling is enabled, then a pixel's final color is generated by
18945 combining several samples per pixel. Each sample contains color, depth,
18946 and stencil information, allowing those operations to be performed on
18947 each sample.
18948
18949 `GL_INVALID_OPERATION' is generated if `glSampleCoverage' is executed
18950 between the execution of `glBegin' and the corresponding execution of
18951 `glEnd'.")
18952
18953 (define-gl-procedures
18954 ((glScaled
18955 (x GLdouble)
18956 (y GLdouble)
18957 (z GLdouble)
18958 ->
18959 void)
18960 (glScalef
18961 (x GLfloat)
18962 (y GLfloat)
18963 (z GLfloat)
18964 ->
18965 void))
18966 "Multiply the current matrix by a general scaling matrix.
18967
18968 X
18969 Y
18970
18971 Z
18972
18973 Specify scale factors along the X, Y, and Z axes, respectively.
18974
18975 `glScale' produces a nonuniform scaling along the X, Y, and Z axes. The
18976 three parameters indicate the desired scale factor along each of the
18977 three axes.
18978
18979 The current matrix (see `glMatrixMode') is multiplied by this scale
18980 matrix, and the product replaces the current matrix as if `glMultMatrix'
18981 were called with the following matrix as its argument:
18982
18983 ((X 0 0 0), (0 Y 0 0), (0 0 Z 0), (0 0 0 1),)
18984
18985 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
18986 objects drawn after `glScale' is called are scaled.
18987
18988 Use `glPushMatrix' and `glPopMatrix' to save and restore the unscaled
18989 coordinate system.
18990
18991 `GL_INVALID_OPERATION' is generated if `glScale' is executed between the
18992 execution of `glBegin' and the corresponding execution of `glEnd'.")
18993
18994 (define-gl-procedures
18995 ((glScissor
18996 (x GLint)
18997 (y GLint)
18998 (width GLsizei)
18999 (height GLsizei)
19000 ->
19001 void))
19002 "Define the scissor box.
19003
19004 X
19005 Y
19006
19007 Specify the lower left corner of the scissor box. Initially (0, 0).
19008
19009 WIDTH
19010 HEIGHT
19011
19012 Specify the width and height of the scissor box. When a GL context
19013 is first attached to a window, WIDTH and HEIGHT are set to the
19014 dimensions of that window.
19015
19016 `glScissor' defines a rectangle, called the scissor box, in window
19017 coordinates. The first two arguments, X and Y, specify the lower left
19018 corner of the box. WIDTH and HEIGHT specify the width and height of the
19019 box.
19020
19021 To enable and disable the scissor test, call `glEnable' and `glDisable'
19022 with argument `GL_SCISSOR_TEST'. The test is initially disabled. While
19023 the test is enabled, only pixels that lie within the scissor box can be
19024 modified by drawing commands. Window coordinates have integer values at
19025 the shared corners of frame buffer pixels. `glScissor(0,0,1,1)' allows
19026 modification of only the lower left pixel in the window, and
19027 `glScissor(0,0,0,0)' doesn't allow modification of any pixels in the
19028 window.
19029
19030 When the scissor test is disabled, it is as though the scissor box
19031 includes the entire window.
19032
19033 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
19034
19035 `GL_INVALID_OPERATION' is generated if `glScissor' is executed between
19036 the execution of `glBegin' and the corresponding execution of `glEnd'.")
19037
19038 (define-gl-procedures
19039 ((glSecondaryColorPointer
19040 (size GLint)
19041 (type GLenum)
19042 (stride GLsizei)
19043 (pointer const-GLvoid-*)
19044 ->
19045 void))
19046 "Define an array of secondary colors.
19047
19048 SIZE
19049 Specifies the number of components per color. Must be 3.
19050
19051 TYPE
19052 Specifies the data type of each color component in the array.
19053 Symbolic constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
19054 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', or
19055 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
19056
19057 STRIDE
19058 Specifies the byte offset between consecutive colors. If STRIDE is
19059 0, the colors are understood to be tightly packed in the array. The
19060 initial value is 0.
19061
19062 POINTER
19063 Specifies a pointer to the first component of the first color
19064 element in the array. The initial value is 0.
19065
19066 `glSecondaryColorPointer' specifies the location and data format of an
19067 array of color components to use when rendering. SIZE specifies the
19068 number of components per color, and must be 3. TYPE specifies the data
19069 type of each color component, and STRIDE specifies the byte stride from
19070 one color to the next, allowing vertices and attributes to be packed
19071 into a single array or stored in separate arrays.
19072
19073 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
19074 target (see `glBindBuffer') while a secondary color array is specified,
19075 POINTER is treated as a byte offset into the buffer object's data store.
19076 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
19077 secondary color vertex array client-side state
19078 (`GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING').
19079
19080 When a secondary color array is specified, SIZE, TYPE, STRIDE, and
19081 POINTER are saved as client-side state, in addition to the current
19082 vertex array buffer object binding.
19083
19084 To enable and disable the secondary color array, call
19085 `glEnableClientState' and `glDisableClientState' with the argument
19086 `GL_SECONDARY_COLOR_ARRAY'. If enabled, the secondary color array is
19087 used when `glArrayElement', `glDrawArrays', `glMultiDrawArrays',
19088 `glDrawElements', `glMultiDrawElements', or `glDrawRangeElements' is
19089 called.
19090
19091 `GL_INVALID_VALUE' is generated if SIZE is not 3.
19092
19093 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
19094
19095 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
19096
19097 (define-gl-procedures
19098 ((glSecondaryColor3b
19099 (red GLbyte)
19100 (green GLbyte)
19101 (blue GLbyte)
19102 ->
19103 void)
19104 (glSecondaryColor3s
19105 (red GLshort)
19106 (green GLshort)
19107 (blue GLshort)
19108 ->
19109 void)
19110 (glSecondaryColor3i
19111 (red GLint)
19112 (green GLint)
19113 (blue GLint)
19114 ->
19115 void)
19116 (glSecondaryColor3f
19117 (red GLfloat)
19118 (green GLfloat)
19119 (blue GLfloat)
19120 ->
19121 void)
19122 (glSecondaryColor3d
19123 (red GLdouble)
19124 (green GLdouble)
19125 (blue GLdouble)
19126 ->
19127 void)
19128 (glSecondaryColor3ub
19129 (red GLubyte)
19130 (green GLubyte)
19131 (blue GLubyte)
19132 ->
19133 void)
19134 (glSecondaryColor3us
19135 (red GLushort)
19136 (green GLushort)
19137 (blue GLushort)
19138 ->
19139 void)
19140 (glSecondaryColor3ui
19141 (red GLuint)
19142 (green GLuint)
19143 (blue GLuint)
19144 ->
19145 void)
19146 (glSecondaryColor3bv (v const-GLbyte-*) -> void)
19147 (glSecondaryColor3sv (v const-GLshort-*) -> void)
19148 (glSecondaryColor3iv (v const-GLint-*) -> void)
19149 (glSecondaryColor3fv (v const-GLfloat-*) -> void)
19150 (glSecondaryColor3dv
19151 (v const-GLdouble-*)
19152 ->
19153 void)
19154 (glSecondaryColor3ubv
19155 (v const-GLubyte-*)
19156 ->
19157 void)
19158 (glSecondaryColor3usv
19159 (v const-GLushort-*)
19160 ->
19161 void)
19162 (glSecondaryColor3uiv (v const-GLuint-*) -> void))
19163 "Set the current secondary color.
19164
19165 RED
19166 GREEN
19167
19168 BLUE
19169
19170 Specify new red, green, and blue values for the current secondary
19171 color.
19172
19173 The GL stores both a primary four-valued RGBA color and a secondary
19174 four-valued RGBA color (where alpha is always set to 0.0) that is
19175 associated with every vertex.
19176
19177 The secondary color is interpolated and applied to each fragment during
19178 rasterization when `GL_COLOR_SUM' is enabled. When lighting is enabled,
19179 and `GL_SEPARATE_SPECULAR_COLOR' is specified, the value of the
19180 secondary color is assigned the value computed from the specular term of
19181 the lighting computation. Both the primary and secondary current colors
19182 are applied to each fragment, regardless of the state of `GL_COLOR_SUM',
19183 under such conditions. When `GL_SEPARATE_SPECULAR_COLOR' is specified,
19184 the value returned from querying the current secondary color is
19185 undefined.
19186
19187 `glSecondaryColor3b', `glSecondaryColor3s', and `glSecondaryColor3i'
19188 take three signed byte, short, or long integers as arguments. When *v*
19189 is appended to the name, the color commands can take a pointer to an
19190 array of such values.
19191
19192 Color values are stored in floating-point format, with unspecified
19193 mantissa and exponent sizes. Unsigned integer color components, when
19194 specified, are linearly mapped to floating-point values such that the
19195 largest representable value maps to 1.0 (full intensity), and 0 maps to
19196 0.0 (zero intensity). Signed integer color components, when specified,
19197 are linearly mapped to floating-point values such that the most positive
19198 representable value maps to 1.0, and the most negative representable
19199 value maps to -1.0 . (Note that this mapping does not convert 0
19200 precisely to 0.0). Floating-point values are mapped directly.
19201
19202 Neither floating-point nor signed integer values are clamped to the
19203 range [0,1] before the current color is updated. However, color
19204 components are clamped to this range before they are interpolated or
19205 written into a color buffer.")
19206
19207 (define-gl-procedures
19208 ((glSelectBuffer
19209 (size GLsizei)
19210 (buffer GLuint-*)
19211 ->
19212 void))
19213 "Establish a buffer for selection mode values.
19214
19215 SIZE
19216 Specifies the size of BUFFER.
19217
19218 BUFFER
19219 Returns the selection data.
19220
19221 `glSelectBuffer' has two arguments: BUFFER is a pointer to an array of
19222 unsigned integers, and SIZE indicates the size of the array. BUFFER
19223 returns values from the name stack (see `glInitNames', `glLoadName',
19224 `glPushName') when the rendering mode is `GL_SELECT' (see
19225 `glRenderMode'). `glSelectBuffer' must be issued before selection mode
19226 is enabled, and it must not be issued while the rendering mode is
19227 `GL_SELECT'.
19228
19229 A programmer can use selection to determine which primitives are drawn
19230 into some region of a window. The region is defined by the current
19231 modelview and perspective matrices.
19232
19233 In selection mode, no pixel fragments are produced from rasterization.
19234 Instead, if a primitive or a raster position intersects the clipping
19235 volume defined by the viewing frustum and the user-defined clipping
19236 planes, this primitive causes a selection hit. (With polygons, no hit
19237 occurs if the polygon is culled.) When a change is made to the name
19238 stack, or when `glRenderMode' is called, a hit record is copied to
19239 BUFFER if any hits have occurred since the last such event (name stack
19240 change or `glRenderMode' call). The hit record consists of the number of
19241 names in the name stack at the time of the event, followed by the
19242 minimum and maximum depth values of all vertices that hit since the
19243 previous event, followed by the name stack contents, bottom name first.
19244
19245 Depth values (which are in the range [0,1]) are multiplied by 2^32-1 ,
19246 before being placed in the hit record.
19247
19248 An internal index into BUFFER is reset to 0 whenever selection mode is
19249 entered. Each time a hit record is copied into BUFFER, the index is
19250 incremented to point to the cell just past the end of the block of
19251 names\\(emthat is, to the next available cell If the hit record is larger
19252 than the number of remaining locations in BUFFER, as much data as can
19253 fit is copied, and the overflow flag is set. If the name stack is empty
19254 when a hit record is copied, that record consists of 0 followed by the
19255 minimum and maximum depth values.
19256
19257 To exit selection mode, call `glRenderMode' with an argument other than
19258 `GL_SELECT'. Whenever `glRenderMode' is called while the render mode is
19259 `GL_SELECT', it returns the number of hit records copied to BUFFER,
19260 resets the overflow flag and the selection buffer pointer, and
19261 initializes the name stack to be empty. If the overflow bit was set when
19262 `glRenderMode' was called, a negative hit record count is returned.
19263
19264 `GL_INVALID_VALUE' is generated if SIZE is negative.
19265
19266 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is called while
19267 the render mode is `GL_SELECT', or if `glRenderMode' is called with
19268 argument `GL_SELECT' before `glSelectBuffer' is called at least once.
19269
19270 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is executed
19271 between the execution of `glBegin' and the corresponding execution of
19272 `glEnd'.")
19273
19274 (define-gl-procedures
19275 ((glSeparableFilter2D
19276 (target GLenum)
19277 (internalformat GLenum)
19278 (width GLsizei)
19279 (height GLsizei)
19280 (format GLenum)
19281 (type GLenum)
19282 (row const-GLvoid-*)
19283 (column const-GLvoid-*)
19284 ->
19285 void))
19286 "Define a separable two-dimensional convolution filter.
19287
19288 TARGET
19289 Must be `GL_SEPARABLE_2D'.
19290
19291 INTERNALFORMAT
19292 The internal format of the convolution filter kernel. The allowable
19293 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
19294 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
19295 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
19296 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
19297 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
19298 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
19299 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
19300 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
19301 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
19302 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
19303 `GL_RGBA12', or `GL_RGBA16'.
19304
19305 WIDTH
19306 The number of elements in the pixel array referenced by ROW. (This
19307 is the width of the separable filter kernel.)
19308
19309 HEIGHT
19310 The number of elements in the pixel array referenced by COLUMN.
19311 (This is the height of the separable filter kernel.)
19312
19313 FORMAT
19314 The format of the pixel data in ROW and COLUMN. The allowable
19315 values are `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
19316 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_INTENSITY', `GL_LUMINANCE', and
19317 `GL_LUMINANCE_ALPHA'.
19318
19319 TYPE
19320 The type of the pixel data in ROW and COLUMN. Symbolic constants
19321 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
19322 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
19323 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
19324 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
19325 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
19326 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
19327 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
19328 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
19329 are accepted.
19330
19331 ROW
19332 Pointer to a one-dimensional array of pixel data that is processed
19333 to build the row filter kernel.
19334
19335 COLUMN
19336 Pointer to a one-dimensional array of pixel data that is processed
19337 to build the column filter kernel.
19338
19339 `glSeparableFilter2D' builds a two-dimensional separable convolution
19340 filter kernel from two arrays of pixels.
19341
19342 The pixel arrays specified by (WIDTH, FORMAT, TYPE, ROW) and (HEIGHT,
19343 FORMAT, TYPE, COLUMN) are processed just as if they had been passed to
19344 `glDrawPixels', but processing stops after the final expansion to RGBA
19345 is completed.
19346
19347 If a non-zero named buffer object is bound to the
19348 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
19349 filter is specified, ROW and COLUMN are treated as byte offsets into the
19350 buffer object's data store.
19351
19352 Next, the R, G, B, and A components of all pixels in both arrays are
19353 scaled by the four separable 2D `GL_CONVOLUTION_FILTER_SCALE' parameters
19354 and biased by the four separable 2D `GL_CONVOLUTION_FILTER_BIAS'
19355 parameters. (The scale and bias parameters are set by
19356 `glConvolutionParameter' using the `GL_SEPARABLE_2D' target and the
19357 names `GL_CONVOLUTION_FILTER_SCALE' and `GL_CONVOLUTION_FILTER_BIAS'.
19358 The parameters themselves are vectors of four values that are applied to
19359 red, green, blue, and alpha, in that order.) The R, G, B, and A values
19360 are not clamped to [0,1] at any time during this process.
19361
19362 Each pixel is then converted to the internal format specified by
19363 INTERNALFORMAT. This conversion simply maps the component values of the
19364 pixel (R, G, B, and A) to the values included in the internal format
19365 (red, green, blue, alpha, luminance, and intensity). The mapping is as
19366 follows:
19367
19368 *Internal Format*
19369 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
19370
19371 `GL_LUMINANCE'
19372 , , , , R ,
19373
19374 `GL_LUMINANCE_ALPHA'
19375 , , , A , R ,
19376
19377 `GL_INTENSITY'
19378 , , , , , R
19379
19380 `GL_RGB'
19381 R , G , B , , ,
19382
19383 `GL_RGBA'
19384 R , G , B , A , ,
19385
19386 The red, green, blue, alpha, luminance, and/or intensity components of
19387 the resulting pixels are stored in floating-point rather than integer
19388 format. They form two one-dimensional filter kernel images. The row
19389 image is indexed by coordinate I starting at zero and increasing from
19390 left to right. Each location in the row image is derived from element I
19391 of ROW. The column image is indexed by coordinate J starting at zero and
19392 increasing from bottom to top. Each location in the column image is
19393 derived from element J of COLUMN.
19394
19395 Note that after a convolution is performed, the resulting color
19396 components are also scaled by their corresponding
19397 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
19398 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
19399 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
19400 set by `glPixelTransfer'.
19401
19402 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SEPARABLE_2D'.
19403
19404 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
19405 allowable values.
19406
19407 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
19408 values.
19409
19410 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
19411 values.
19412
19413 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
19414 than the maximum supported value. This value may be queried with
19415 `glGetConvolutionParameter' using target `GL_SEPARABLE_2D' and name
19416 `GL_MAX_CONVOLUTION_WIDTH'.
19417
19418 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
19419 than the maximum supported value. This value may be queried with
19420 `glGetConvolutionParameter' using target `GL_SEPARABLE_2D' and name
19421 `GL_MAX_CONVOLUTION_HEIGHT'.
19422
19423 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
19424 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
19425 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
19426 is not `GL_RGB'.
19427
19428 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
19429 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
19430 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
19431 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
19432 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
19433 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
19434
19435 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
19436 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
19437 data store is currently mapped.
19438
19439 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
19440 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
19441 unpacked from the buffer object such that the memory reads required
19442 would exceed the data store size.
19443
19444 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
19445 bound to the `GL_PIXEL_UNPACK_BUFFER' target and ROW or COLUMN is not
19446 evenly divisible into the number of bytes needed to store in memory a
19447 datum indicated by TYPE.
19448
19449 `GL_INVALID_OPERATION' is generated if `glSeparableFilter2D' is executed
19450 between the execution of `glBegin' and the corresponding execution of
19451 `glEnd'.")
19452
19453 (define-gl-procedures
19454 ((glShadeModel (mode GLenum) -> void))
19455 "Select flat or smooth shading.
19456
19457 MODE
19458 Specifies a symbolic value representing a shading technique.
19459 Accepted values are `GL_FLAT' and `GL_SMOOTH'. The initial value is
19460 `GL_SMOOTH'.
19461
19462 GL primitives can have either flat or smooth shading. Smooth shading,
19463 the default, causes the computed colors of vertices to be interpolated
19464 as the primitive is rasterized, typically assigning different colors to
19465 each resulting pixel fragment. Flat shading selects the computed color
19466 of just one vertex and assigns it to all the pixel fragments generated
19467 by rasterizing a single primitive. In either case, the computed color of
19468 a vertex is the result of lighting if lighting is enabled, or it is the
19469 current color at the time the vertex was specified if lighting is
19470 disabled.
19471
19472 Flat and smooth shading are indistinguishable for points. Starting when
19473 `glBegin' is issued and counting vertices and primitives from 1, the GL
19474 gives each flat-shaded line segment I the computed color of vertex I+1 ,
19475 its second vertex. Counting similarly from 1, the GL gives each
19476 flat-shaded polygon the computed color of the vertex listed in the
19477 following table. This is the last vertex to specify the polygon in all
19478 cases except single polygons, where the first vertex specifies the
19479 flat-shaded color.
19480
19481
19482
19483 * Primitive Type of Polygon I *
19484 *Vertex*
19485
19486 Single polygon (I==1 )
19487 1
19488
19489 Triangle strip
19490 I+2
19491
19492 Triangle fan
19493 I+2
19494
19495 Independent triangle
19496 3\u2062I
19497
19498 Quad strip
19499 2\u2062I+2
19500
19501 Independent quad
19502 4\u2062I
19503
19504 Flat and smooth shading are specified by `glShadeModel' with MODE set to
19505 `GL_FLAT' and `GL_SMOOTH', respectively.
19506
19507 `GL_INVALID_ENUM' is generated if MODE is any value other than `GL_FLAT'
19508 or `GL_SMOOTH'.
19509
19510 `GL_INVALID_OPERATION' is generated if `glShadeModel' is executed
19511 between the execution of `glBegin' and the corresponding execution of
19512 `glEnd'.")
19513
19514 (define-gl-procedures
19515 ((glShaderSource
19516 (shader GLuint)
19517 (count GLsizei)
19518 (string const-GLchar-**)
19519 (length const-GLint-*)
19520 ->
19521 void))
19522 "Replaces the source code in a shader object.
19523
19524 SHADER
19525 Specifies the handle of the shader object whose source code is to
19526 be replaced.
19527
19528 COUNT
19529 Specifies the number of elements in the STRING and LENGTH arrays.
19530
19531 STRING
19532 Specifies an array of pointers to strings containing the source
19533 code to be loaded into the shader.
19534
19535 LENGTH
19536 Specifies an array of string lengths.
19537
19538 `glShaderSource' sets the source code in SHADER to the source code in
19539 the array of strings specified by STRING. Any source code previously
19540 stored in the shader object is completely replaced. The number of
19541 strings in the array is specified by COUNT. If LENGTH is `NULL', each
19542 string is assumed to be null terminated. If LENGTH is a value other than
19543 `NULL', it points to an array containing a string length for each of the
19544 corresponding elements of STRING. Each element in the LENGTH array may
19545 contain the length of the corresponding string (the null character is
19546 not counted as part of the string length) or a value less than 0 to
19547 indicate that the string is null terminated. The source code strings are
19548 not scanned or parsed at this time; they are simply copied into the
19549 specified shader object.
19550
19551 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
19552 OpenGL.
19553
19554 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
19555
19556 `GL_INVALID_VALUE' is generated if COUNT is less than 0.
19557
19558 `GL_INVALID_OPERATION' is generated if `glShaderSource' is executed
19559 between the execution of `glBegin' and the corresponding execution of
19560 `glEnd'.")
19561
19562 (define-gl-procedures
19563 ((glStencilFuncSeparate
19564 (face GLenum)
19565 (func GLenum)
19566 (ref GLint)
19567 (mask GLuint)
19568 ->
19569 void))
19570 "Set front and/or back function and reference value for stencil testing.
19571
19572 FACE
19573 Specifies whether front and/or back stencil state is updated. Three
19574 symbolic constants are valid: `GL_FRONT', `GL_BACK', and
19575 `GL_FRONT_AND_BACK'.
19576
19577 FUNC
19578 Specifies the test function. Eight symbolic constants are valid:
19579 `GL_NEVER', `GL_LESS', `GL_LEQUAL', `GL_GREATER', `GL_GEQUAL',
19580 `GL_EQUAL', `GL_NOTEQUAL', and `GL_ALWAYS'. The initial value is
19581 `GL_ALWAYS'.
19582
19583 REF
19584 Specifies the reference value for the stencil test. REF is clamped
19585 to the range [0,2^N-1] , where N is the number of bitplanes in the
19586 stencil buffer. The initial value is 0.
19587
19588 MASK
19589 Specifies a mask that is ANDed with both the reference value and
19590 the stored stencil value when the test is done. The initial value
19591 is all 1's.
19592
19593 Stenciling, like depth-buffering, enables and disables drawing on a
19594 per-pixel basis. You draw into the stencil planes using GL drawing
19595 primitives, then render geometry and images, using the stencil planes to
19596 mask out portions of the screen. Stenciling is typically used in
19597 multipass rendering algorithms to achieve special effects, such as
19598 decals, outlining, and constructive solid geometry rendering.
19599
19600 The stencil test conditionally eliminates a pixel based on the outcome
19601 of a comparison between the reference value and the value in the stencil
19602 buffer. To enable and disable the test, call `glEnable' and `glDisable'
19603 with argument `GL_STENCIL_TEST'. To specify actions based on the outcome
19604 of the stencil test, call `glStencilOp' or `glStencilOpSeparate'.
19605
19606 There can be two separate sets of FUNC, REF, and MASK parameters; one
19607 affects back-facing polygons, and the other affects front-facing
19608 polygons as well as other non-polygon primitives. `glStencilFunc' sets
19609 both front and back stencil state to the same values, as if
19610 `glStencilFuncSeparate' were called with FACE set to
19611 `GL_FRONT_AND_BACK'.
19612
19613 FUNC is a symbolic constant that determines the stencil comparison
19614 function. It accepts one of eight values, shown in the following list.
19615 REF is an integer reference value that is used in the stencil
19616 comparison. It is clamped to the range [0,2^N-1] , where N is the number
19617 of bitplanes in the stencil buffer. MASK is bitwise ANDed with both the
19618 reference value and the stored stencil value, with the ANDed values
19619 participating in the comparison.
19620
19621 If STENCIL represents the value stored in the corresponding stencil
19622 buffer location, the following list shows the effect of each comparison
19623 function that can be specified by FUNC. Only if the comparison succeeds
19624 is the pixel passed through to the next stage in the rasterization
19625 process (see `glStencilOp'). All tests treat STENCIL values as unsigned
19626 integers in the range [0,2^N-1] , where N is the number of bitplanes in
19627 the stencil buffer.
19628
19629 The following values are accepted by FUNC:
19630
19631 `GL_NEVER'
19632 Always fails.
19633
19634 `GL_LESS'
19635 Passes if ( REF & MASK ) < ( STENCIL & MASK ).
19636
19637 `GL_LEQUAL'
19638 Passes if ( REF & MASK ) <= ( STENCIL & MASK ).
19639
19640 `GL_GREATER'
19641 Passes if ( REF & MASK ) > ( STENCIL & MASK ).
19642
19643 `GL_GEQUAL'
19644 Passes if ( REF & MASK ) >= ( STENCIL & MASK ).
19645
19646 `GL_EQUAL'
19647 Passes if ( REF & MASK ) = ( STENCIL & MASK ).
19648
19649 `GL_NOTEQUAL'
19650 Passes if ( REF & MASK ) != ( STENCIL & MASK ).
19651
19652 `GL_ALWAYS'
19653 Always passes.
19654
19655 `GL_INVALID_ENUM' is generated if FUNC is not one of the eight accepted
19656 values.
19657
19658 `GL_INVALID_OPERATION' is generated if `glStencilFuncSeparate' is
19659 executed between the execution of `glBegin' and the corresponding
19660 execution of `glEnd'.")
19661
19662 (define-gl-procedures
19663 ((glStencilFunc
19664 (func GLenum)
19665 (ref GLint)
19666 (mask GLuint)
19667 ->
19668 void))
19669 "Set front and back function and reference value for stencil testing.
19670
19671 FUNC
19672 Specifies the test function. Eight symbolic constants are valid:
19673 `GL_NEVER', `GL_LESS', `GL_LEQUAL', `GL_GREATER', `GL_GEQUAL',
19674 `GL_EQUAL', `GL_NOTEQUAL', and `GL_ALWAYS'. The initial value is
19675 `GL_ALWAYS'.
19676
19677 REF
19678 Specifies the reference value for the stencil test. REF is clamped
19679 to the range [0,2^N-1] , where N is the number of bitplanes in the
19680 stencil buffer. The initial value is 0.
19681
19682 MASK
19683 Specifies a mask that is ANDed with both the reference value and
19684 the stored stencil value when the test is done. The initial value
19685 is all 1's.
19686
19687 Stenciling, like depth-buffering, enables and disables drawing on a
19688 per-pixel basis. Stencil planes are first drawn into using GL drawing
19689 primitives, then geometry and images are rendered using the stencil
19690 planes to mask out portions of the screen. Stenciling is typically used
19691 in multipass rendering algorithms to achieve special effects, such as
19692 decals, outlining, and constructive solid geometry rendering.
19693
19694 The stencil test conditionally eliminates a pixel based on the outcome
19695 of a comparison between the reference value and the value in the stencil
19696 buffer. To enable and disable the test, call `glEnable' and `glDisable'
19697 with argument `GL_STENCIL_TEST'. To specify actions based on the outcome
19698 of the stencil test, call `glStencilOp' or `glStencilOpSeparate'.
19699
19700 There can be two separate sets of FUNC, REF, and MASK parameters; one
19701 affects back-facing polygons, and the other affects front-facing
19702 polygons as well as other non-polygon primitives. `glStencilFunc' sets
19703 both front and back stencil state to the same values. Use
19704 `glStencilFuncSeparate' to set front and back stencil state to different
19705 values.
19706
19707 FUNC is a symbolic constant that determines the stencil comparison
19708 function. It accepts one of eight values, shown in the following list.
19709 REF is an integer reference value that is used in the stencil
19710 comparison. It is clamped to the range [0,2^N-1] , where N is the number
19711 of bitplanes in the stencil buffer. MASK is bitwise ANDed with both the
19712 reference value and the stored stencil value, with the ANDed values
19713 participating in the comparison.
19714
19715 If STENCIL represents the value stored in the corresponding stencil
19716 buffer location, the following list shows the effect of each comparison
19717 function that can be specified by FUNC. Only if the comparison succeeds
19718 is the pixel passed through to the next stage in the rasterization
19719 process (see `glStencilOp'). All tests treat STENCIL values as unsigned
19720 integers in the range [0,2^N-1] , where N is the number of bitplanes in
19721 the stencil buffer.
19722
19723 The following values are accepted by FUNC:
19724
19725 `GL_NEVER'
19726 Always fails.
19727
19728 `GL_LESS'
19729 Passes if ( REF & MASK ) < ( STENCIL & MASK ).
19730
19731 `GL_LEQUAL'
19732 Passes if ( REF & MASK ) <= ( STENCIL & MASK ).
19733
19734 `GL_GREATER'
19735 Passes if ( REF & MASK ) > ( STENCIL & MASK ).
19736
19737 `GL_GEQUAL'
19738 Passes if ( REF & MASK ) >= ( STENCIL & MASK ).
19739
19740 `GL_EQUAL'
19741 Passes if ( REF & MASK ) = ( STENCIL & MASK ).
19742
19743 `GL_NOTEQUAL'
19744 Passes if ( REF & MASK ) != ( STENCIL & MASK ).
19745
19746 `GL_ALWAYS'
19747 Always passes.
19748
19749 `GL_INVALID_ENUM' is generated if FUNC is not one of the eight accepted
19750 values.
19751
19752 `GL_INVALID_OPERATION' is generated if `glStencilFunc' is executed
19753 between the execution of `glBegin' and the corresponding execution of
19754 `glEnd'.")
19755
19756 (define-gl-procedures
19757 ((glStencilMaskSeparate
19758 (face GLenum)
19759 (mask GLuint)
19760 ->
19761 void))
19762 "Control the front and/or back writing of individual bits in the stencil
19763 planes.
19764
19765 FACE
19766 Specifies whether the front and/or back stencil writemask is
19767 updated. Three symbolic constants are valid: `GL_FRONT', `GL_BACK',
19768 and `GL_FRONT_AND_BACK'.
19769
19770 MASK
19771 Specifies a bit mask to enable and disable writing of individual
19772 bits in the stencil planes. Initially, the mask is all 1's.
19773
19774 `glStencilMaskSeparate' controls the writing of individual bits in the
19775 stencil planes. The least significant N bits of MASK, where N is the
19776 number of bits in the stencil buffer, specify a mask. Where a 1 appears
19777 in the mask, it's possible to write to the corresponding bit in the
19778 stencil buffer. Where a 0 appears, the corresponding bit is
19779 write-protected. Initially, all bits are enabled for writing.
19780
19781 There can be two separate MASK writemasks; one affects back-facing
19782 polygons, and the other affects front-facing polygons as well as other
19783 non-polygon primitives. `glStencilMask' sets both front and back stencil
19784 writemasks to the same values, as if `glStencilMaskSeparate' were called
19785 with FACE set to `GL_FRONT_AND_BACK'.
19786
19787 `GL_INVALID_OPERATION' is generated if `glStencilMaskSeparate' is
19788 executed between the execution of `glBegin' and the corresponding
19789 execution of `glEnd'.")
19790
19791 (define-gl-procedures
19792 ((glStencilMask (mask GLuint) -> void))
19793 "Control the front and back writing of individual bits in the stencil
19794 planes.
19795
19796 MASK
19797 Specifies a bit mask to enable and disable writing of individual
19798 bits in the stencil planes. Initially, the mask is all 1's.
19799
19800 `glStencilMask' controls the writing of individual bits in the stencil
19801 planes. The least significant N bits of MASK, where N is the number of
19802 bits in the stencil buffer, specify a mask. Where a 1 appears in the
19803 mask, it's possible to write to the corresponding bit in the stencil
19804 buffer. Where a 0 appears, the corresponding bit is write-protected.
19805 Initially, all bits are enabled for writing.
19806
19807 There can be two separate MASK writemasks; one affects back-facing
19808 polygons, and the other affects front-facing polygons as well as other
19809 non-polygon primitives. `glStencilMask' sets both front and back stencil
19810 writemasks to the same values. Use `glStencilMaskSeparate' to set front
19811 and back stencil writemasks to different values.
19812
19813 `GL_INVALID_OPERATION' is generated if `glStencilMask' is executed
19814 between the execution of `glBegin' and the corresponding execution of
19815 `glEnd'.")
19816
19817 (define-gl-procedures
19818 ((glStencilOpSeparate
19819 (face GLenum)
19820 (sfail GLenum)
19821 (dpfail GLenum)
19822 (dppass GLenum)
19823 ->
19824 void))
19825 "Set front and/or back stencil test actions.
19826
19827 FACE
19828 Specifies whether front and/or back stencil state is updated. Three
19829 symbolic constants are valid: `GL_FRONT', `GL_BACK', and
19830 `GL_FRONT_AND_BACK'.
19831
19832 SFAIL
19833 Specifies the action to take when the stencil test fails. Eight
19834 symbolic constants are accepted: `GL_KEEP', `GL_ZERO',
19835 `GL_REPLACE', `GL_INCR', `GL_INCR_WRAP', `GL_DECR', `GL_DECR_WRAP',
19836 and `GL_INVERT'. The initial value is `GL_KEEP'.
19837
19838 DPFAIL
19839 Specifies the stencil action when the stencil test passes, but the
19840 depth test fails. DPFAIL accepts the same symbolic constants as
19841 SFAIL. The initial value is `GL_KEEP'.
19842
19843 DPPASS
19844 Specifies the stencil action when both the stencil test and the
19845 depth test pass, or when the stencil test passes and either there
19846 is no depth buffer or depth testing is not enabled. DPPASS accepts
19847 the same symbolic constants as SFAIL. The initial value is
19848 `GL_KEEP'.
19849
19850 Stenciling, like depth-buffering, enables and disables drawing on a
19851 per-pixel basis. You draw into the stencil planes using GL drawing
19852 primitives, then render geometry and images, using the stencil planes to
19853 mask out portions of the screen. Stenciling is typically used in
19854 multipass rendering algorithms to achieve special effects, such as
19855 decals, outlining, and constructive solid geometry rendering.
19856
19857 The stencil test conditionally eliminates a pixel based on the outcome
19858 of a comparison between the value in the stencil buffer and a reference
19859 value. To enable and disable the test, call `glEnable' and `glDisable'
19860 with argument `GL_STENCIL_TEST'; to control it, call `glStencilFunc' or
19861 `glStencilFuncSeparate'.
19862
19863 There can be two separate sets of SFAIL, DPFAIL, and DPPASS parameters;
19864 one affects back-facing polygons, and the other affects front-facing
19865 polygons as well as other non-polygon primitives. `glStencilOp' sets
19866 both front and back stencil state to the same values, as if
19867 `glStencilOpSeparate' were called with FACE set to `GL_FRONT_AND_BACK'.
19868
19869 `glStencilOpSeparate' takes three arguments that indicate what happens
19870 to the stored stencil value while stenciling is enabled. If the stencil
19871 test fails, no change is made to the pixel's color or depth buffers, and
19872 SFAIL specifies what happens to the stencil buffer contents. The
19873 following eight actions are possible.
19874
19875 `GL_KEEP'
19876 Keeps the current value.
19877
19878 `GL_ZERO'
19879 Sets the stencil buffer value to 0.
19880
19881 `GL_REPLACE'
19882 Sets the stencil buffer value to REF, as specified by
19883 `glStencilFunc'.
19884
19885 `GL_INCR'
19886 Increments the current stencil buffer value. Clamps to the maximum
19887 representable unsigned value.
19888
19889 `GL_INCR_WRAP'
19890 Increments the current stencil buffer value. Wraps stencil buffer
19891 value to zero when incrementing the maximum representable unsigned
19892 value.
19893
19894 `GL_DECR'
19895 Decrements the current stencil buffer value. Clamps to 0.
19896
19897 `GL_DECR_WRAP'
19898 Decrements the current stencil buffer value. Wraps stencil buffer
19899 value to the maximum representable unsigned value when decrementing
19900 a stencil buffer value of zero.
19901
19902 `GL_INVERT'
19903 Bitwise inverts the current stencil buffer value.
19904
19905 Stencil buffer values are treated as unsigned integers. When incremented
19906 and decremented, values are clamped to 0 and 2^N-1 , where N is the
19907 value returned by querying `GL_STENCIL_BITS'.
19908
19909 The other two arguments to `glStencilOpSeparate' specify stencil buffer
19910 actions that depend on whether subsequent depth buffer tests succeed
19911 (DPPASS) or fail (DPFAIL) (see `glDepthFunc'). The actions are specified
19912 using the same eight symbolic constants as SFAIL. Note that DPFAIL is
19913 ignored when there is no depth buffer, or when the depth buffer is not
19914 enabled. In these cases, SFAIL and DPPASS specify stencil action when
19915 the stencil test fails and passes, respectively.
19916
19917 `GL_INVALID_ENUM' is generated if FACE is any value other than
19918 `GL_FRONT', `GL_BACK', or `GL_FRONT_AND_BACK'.
19919
19920 `GL_INVALID_ENUM' is generated if SFAIL, DPFAIL, or DPPASS is any value
19921 other than the eight defined constant values.
19922
19923 `GL_INVALID_OPERATION' is generated if `glStencilOpSeparate' is executed
19924 between the execution of `glBegin' and the corresponding execution of
19925 `glEnd'.")
19926
19927 (define-gl-procedures
19928 ((glStencilOp
19929 (sfail GLenum)
19930 (dpfail GLenum)
19931 (dppass GLenum)
19932 ->
19933 void))
19934 "Set front and back stencil test actions.
19935
19936 SFAIL
19937 Specifies the action to take when the stencil test fails. Eight
19938 symbolic constants are accepted: `GL_KEEP', `GL_ZERO',
19939 `GL_REPLACE', `GL_INCR', `GL_INCR_WRAP', `GL_DECR', `GL_DECR_WRAP',
19940 and `GL_INVERT'. The initial value is `GL_KEEP'.
19941
19942 DPFAIL
19943 Specifies the stencil action when the stencil test passes, but the
19944 depth test fails. DPFAIL accepts the same symbolic constants as
19945 SFAIL. The initial value is `GL_KEEP'.
19946
19947 DPPASS
19948 Specifies the stencil action when both the stencil test and the
19949 depth test pass, or when the stencil test passes and either there
19950 is no depth buffer or depth testing is not enabled. DPPASS accepts
19951 the same symbolic constants as SFAIL. The initial value is
19952 `GL_KEEP'.
19953
19954 Stenciling, like depth-buffering, enables and disables drawing on a
19955 per-pixel basis. You draw into the stencil planes using GL drawing
19956 primitives, then render geometry and images, using the stencil planes to
19957 mask out portions of the screen. Stenciling is typically used in
19958 multipass rendering algorithms to achieve special effects, such as
19959 decals, outlining, and constructive solid geometry rendering.
19960
19961 The stencil test conditionally eliminates a pixel based on the outcome
19962 of a comparison between the value in the stencil buffer and a reference
19963 value. To enable and disable the test, call `glEnable' and `glDisable'
19964 with argument `GL_STENCIL_TEST'; to control it, call `glStencilFunc' or
19965 `glStencilFuncSeparate'.
19966
19967 There can be two separate sets of SFAIL, DPFAIL, and DPPASS parameters;
19968 one affects back-facing polygons, and the other affects front-facing
19969 polygons as well as other non-polygon primitives. `glStencilOp' sets
19970 both front and back stencil state to the same values. Use
19971 `glStencilOpSeparate' to set front and back stencil state to different
19972 values.
19973
19974 `glStencilOp' takes three arguments that indicate what happens to the
19975 stored stencil value while stenciling is enabled. If the stencil test
19976 fails, no change is made to the pixel's color or depth buffers, and
19977 SFAIL specifies what happens to the stencil buffer contents. The
19978 following eight actions are possible.
19979
19980 `GL_KEEP'
19981 Keeps the current value.
19982
19983 `GL_ZERO'
19984 Sets the stencil buffer value to 0.
19985
19986 `GL_REPLACE'
19987 Sets the stencil buffer value to REF, as specified by
19988 `glStencilFunc'.
19989
19990 `GL_INCR'
19991 Increments the current stencil buffer value. Clamps to the maximum
19992 representable unsigned value.
19993
19994 `GL_INCR_WRAP'
19995 Increments the current stencil buffer value. Wraps stencil buffer
19996 value to zero when incrementing the maximum representable unsigned
19997 value.
19998
19999 `GL_DECR'
20000 Decrements the current stencil buffer value. Clamps to 0.
20001
20002 `GL_DECR_WRAP'
20003 Decrements the current stencil buffer value. Wraps stencil buffer
20004 value to the maximum representable unsigned value when decrementing
20005 a stencil buffer value of zero.
20006
20007 `GL_INVERT'
20008 Bitwise inverts the current stencil buffer value.
20009
20010 Stencil buffer values are treated as unsigned integers. When incremented
20011 and decremented, values are clamped to 0 and 2^N-1 , where N is the
20012 value returned by querying `GL_STENCIL_BITS'.
20013
20014 The other two arguments to `glStencilOp' specify stencil buffer actions
20015 that depend on whether subsequent depth buffer tests succeed (DPPASS) or
20016 fail (DPFAIL) (see `glDepthFunc'). The actions are specified using the
20017 same eight symbolic constants as SFAIL. Note that DPFAIL is ignored when
20018 there is no depth buffer, or when the depth buffer is not enabled. In
20019 these cases, SFAIL and DPPASS specify stencil action when the stencil
20020 test fails and passes, respectively.
20021
20022 `GL_INVALID_ENUM' is generated if SFAIL, DPFAIL, or DPPASS is any value
20023 other than the eight defined constant values.
20024
20025 `GL_INVALID_OPERATION' is generated if `glStencilOp' is executed between
20026 the execution of `glBegin' and the corresponding execution of `glEnd'.")
20027
20028 (define-gl-procedures
20029 ((glTexCoordPointer
20030 (size GLint)
20031 (type GLenum)
20032 (stride GLsizei)
20033 (pointer const-GLvoid-*)
20034 ->
20035 void))
20036 "Define an array of texture coordinates.
20037
20038 SIZE
20039 Specifies the number of coordinates per array element. Must be 1,
20040 2, 3, or 4. The initial value is 4.
20041
20042 TYPE
20043 Specifies the data type of each texture coordinate. Symbolic
20044 constants `GL_SHORT', `GL_INT', `GL_FLOAT', or `GL_DOUBLE' are
20045 accepted. The initial value is `GL_FLOAT'.
20046
20047 STRIDE
20048 Specifies the byte offset between consecutive texture coordinate
20049 sets. If STRIDE is 0, the array elements are understood to be
20050 tightly packed. The initial value is 0.
20051
20052 POINTER
20053 Specifies a pointer to the first coordinate of the first texture
20054 coordinate set in the array. The initial value is 0.
20055
20056 `glTexCoordPointer' specifies the location and data format of an array
20057 of texture coordinates to use when rendering. SIZE specifies the number
20058 of coordinates per texture coordinate set, and must be 1, 2, 3, or 4.
20059 TYPE specifies the data type of each texture coordinate, and STRIDE
20060 specifies the byte stride from one texture coordinate set to the next,
20061 allowing vertices and attributes to be packed into a single array or
20062 stored in separate arrays. (Single-array storage may be more efficient
20063 on some implementations; see `glInterleavedArrays'.)
20064
20065 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
20066 target (see `glBindBuffer') while a texture coordinate array is
20067 specified, POINTER is treated as a byte offset into the buffer object's
20068 data store. Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING')
20069 is saved as texture coordinate vertex array client-side state
20070 (`GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING').
20071
20072 When a texture coordinate array is specified, SIZE, TYPE, STRIDE, and
20073 POINTER are saved as client-side state, in addition to the current
20074 vertex array buffer object binding.
20075
20076 To enable and disable a texture coordinate array, call
20077 `glEnableClientState' and `glDisableClientState' with the argument
20078 `GL_TEXTURE_COORD_ARRAY'. If enabled, the texture coordinate array is
20079 used when `glArrayElement', `glDrawArrays', `glMultiDrawArrays',
20080 `glDrawElements', `glMultiDrawElements', or `glDrawRangeElements' is
20081 called.
20082
20083 `GL_INVALID_VALUE' is generated if SIZE is not 1, 2, 3, or 4.
20084
20085 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
20086
20087 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
20088
20089 (define-gl-procedures
20090 ((glTexCoord1s (s GLshort) -> void)
20091 (glTexCoord1i (s GLint) -> void)
20092 (glTexCoord1f (s GLfloat) -> void)
20093 (glTexCoord1d (s GLdouble) -> void)
20094 (glTexCoord2s (s GLshort) (t GLshort) -> void)
20095 (glTexCoord2i (s GLint) (t GLint) -> void)
20096 (glTexCoord2f (s GLfloat) (t GLfloat) -> void)
20097 (glTexCoord2d (s GLdouble) (t GLdouble) -> void)
20098 (glTexCoord3s
20099 (s GLshort)
20100 (t GLshort)
20101 (r GLshort)
20102 ->
20103 void)
20104 (glTexCoord3i
20105 (s GLint)
20106 (t GLint)
20107 (r GLint)
20108 ->
20109 void)
20110 (glTexCoord3f
20111 (s GLfloat)
20112 (t GLfloat)
20113 (r GLfloat)
20114 ->
20115 void)
20116 (glTexCoord3d
20117 (s GLdouble)
20118 (t GLdouble)
20119 (r GLdouble)
20120 ->
20121 void)
20122 (glTexCoord4s
20123 (s GLshort)
20124 (t GLshort)
20125 (r GLshort)
20126 (q GLshort)
20127 ->
20128 void)
20129 (glTexCoord4i
20130 (s GLint)
20131 (t GLint)
20132 (r GLint)
20133 (q GLint)
20134 ->
20135 void)
20136 (glTexCoord4f
20137 (s GLfloat)
20138 (t GLfloat)
20139 (r GLfloat)
20140 (q GLfloat)
20141 ->
20142 void)
20143 (glTexCoord4d
20144 (s GLdouble)
20145 (t GLdouble)
20146 (r GLdouble)
20147 (q GLdouble)
20148 ->
20149 void)
20150 (glTexCoord1sv (v const-GLshort-*) -> void)
20151 (glTexCoord1iv (v const-GLint-*) -> void)
20152 (glTexCoord1fv (v const-GLfloat-*) -> void)
20153 (glTexCoord1dv (v const-GLdouble-*) -> void)
20154 (glTexCoord2sv (v const-GLshort-*) -> void)
20155 (glTexCoord2iv (v const-GLint-*) -> void)
20156 (glTexCoord2fv (v const-GLfloat-*) -> void)
20157 (glTexCoord2dv (v const-GLdouble-*) -> void)
20158 (glTexCoord3sv (v const-GLshort-*) -> void)
20159 (glTexCoord3iv (v const-GLint-*) -> void)
20160 (glTexCoord3fv (v const-GLfloat-*) -> void)
20161 (glTexCoord3dv (v const-GLdouble-*) -> void)
20162 (glTexCoord4sv (v const-GLshort-*) -> void)
20163 (glTexCoord4iv (v const-GLint-*) -> void)
20164 (glTexCoord4fv (v const-GLfloat-*) -> void)
20165 (glTexCoord4dv (v const-GLdouble-*) -> void))
20166 "Set the current texture coordinates.
20167
20168 S
20169 T
20170
20171 R
20172
20173 Q
20174
20175 Specify S, T, R, and Q texture coordinates. Not all parameters are
20176 present in all forms of the command.
20177
20178 `glTexCoord' specifies texture coordinates in one, two, three, or four
20179 dimensions. `glTexCoord1' sets the current texture coordinates to
20180 (S,001) ; a call to `glTexCoord2' sets them to (S,T01) . Similarly,
20181 `glTexCoord3' specifies the texture coordinates as (S,TR1) , and
20182 `glTexCoord4' defines all four components explicitly as (S,TRQ) .
20183
20184 The current texture coordinates are part of the data that is associated
20185 with each vertex and with the current raster position. Initially, the
20186 values for S, T, R, and Q are (0, 0, 0, 1).")
20187
20188 (define-gl-procedures
20189 ((glTexEnvf
20190 (target GLenum)
20191 (pname GLenum)
20192 (param GLfloat)
20193 ->
20194 void)
20195 (glTexEnvi
20196 (target GLenum)
20197 (pname GLenum)
20198 (param GLint)
20199 ->
20200 void)
20201 (glTexEnvfv
20202 (target GLenum)
20203 (pname GLenum)
20204 (params const-GLfloat-*)
20205 ->
20206 void)
20207 (glTexEnviv
20208 (target GLenum)
20209 (pname GLenum)
20210 (params const-GLint-*)
20211 ->
20212 void))
20213 "Set texture environment parameters.
20214
20215 TARGET
20216 Specifies a texture environment. May be `GL_TEXTURE_ENV',
20217 `GL_TEXTURE_FILTER_CONTROL' or `GL_POINT_SPRITE'.
20218
20219 PNAME
20220 Specifies the symbolic name of a single-valued texture environment
20221 parameter. May be either `GL_TEXTURE_ENV_MODE',
20222 `GL_TEXTURE_LOD_BIAS', `GL_COMBINE_RGB', `GL_COMBINE_ALPHA',
20223 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
20224 `GL_SRC1_ALPHA', `GL_SRC2_ALPHA', `GL_OPERAND0_RGB',
20225 `GL_OPERAND1_RGB', `GL_OPERAND2_RGB', `GL_OPERAND0_ALPHA',
20226 `GL_OPERAND1_ALPHA', `GL_OPERAND2_ALPHA', `GL_RGB_SCALE',
20227 `GL_ALPHA_SCALE', or `GL_COORD_REPLACE'.
20228
20229 PARAM
20230 Specifies a single symbolic constant, one of `GL_ADD',
20231 `GL_ADD_SIGNED', `GL_INTERPOLATE', `GL_MODULATE', `GL_DECAL',
20232 `GL_BLEND', `GL_REPLACE', `GL_SUBTRACT', `GL_COMBINE',
20233 `GL_TEXTURE', `GL_CONSTANT', `GL_PRIMARY_COLOR', `GL_PREVIOUS',
20234 `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR', `GL_SRC_ALPHA',
20235 `GL_ONE_MINUS_SRC_ALPHA', a single boolean value for the point
20236 sprite texture coordinate replacement, a single floating-point
20237 value for the texture level-of-detail bias, or 1.0, 2.0, or 4.0
20238 when specifying the `GL_RGB_SCALE' or `GL_ALPHA_SCALE'.
20239
20240 A texture environment specifies how texture values are interpreted when
20241 a fragment is textured. When TARGET is `GL_TEXTURE_FILTER_CONTROL',
20242 PNAME must be `GL_TEXTURE_LOD_BIAS'. When TARGET is `GL_TEXTURE_ENV',
20243 PNAME can be `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR',
20244 `GL_COMBINE_RGB', `GL_COMBINE_ALPHA', `GL_RGB_SCALE', `GL_ALPHA_SCALE',
20245 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
20246 `GL_SRC1_ALPHA', or `GL_SRC2_ALPHA'.
20247
20248 If PNAME is `GL_TEXTURE_ENV_MODE', then PARAMS is (or points to) the
20249 symbolic name of a texture function. Six texture functions may be
20250 specified: `GL_ADD', `GL_MODULATE', `GL_DECAL', `GL_BLEND',
20251 `GL_REPLACE', or `GL_COMBINE'.
20252
20253 The following table shows the correspondence of filtered texture values
20254 R_T , G_T , B_T , A_T , L_T , I_T to texture source components. C_S and
20255 A_S are used by the texture functions described below.
20256
20257
20258
20259 Texture Base Internal Format
20260 `C'_S , `A'_S
20261
20262 `GL_ALPHA'
20263 (0, 0, 0) , A_T
20264
20265 `GL_LUMINANCE'
20266 ( L_T , L_T , L_T ) , 1
20267
20268 `GL_LUMINANCE_ALPHA'
20269 ( L_T , L_T , L_T ) , A_T
20270
20271 `GL_INTENSITY'
20272 ( I_T , I_T , I_T ) , I_T
20273
20274 `GL_RGB'
20275 ( R_T , G_T , B_T ) , 1
20276
20277 `GL_RGBA'
20278 ( R_T , G_T , B_T ) , A_T
20279
20280 A texture function acts on the fragment to be textured using the texture
20281 image value that applies to the fragment (see `glTexParameter') and
20282 produces an RGBA color for that fragment. The following table shows how
20283 the RGBA color is produced for each of the first five texture functions
20284 that can be chosen. C is a triple of color values (RGB) and A is the
20285 associated alpha value. RGBA values extracted from a texture image are
20286 in the range [0,1]. The subscript P refers to the color computed from
20287 the previous texture stage (or the incoming fragment if processing
20288 texture stage 0), the subscript S to the texture source color, the
20289 subscript C to the texture environment color, and the subscript V
20290 indicates a value produced by the texture function.
20291
20292
20293
20294 Texture Base Internal Format
20295 `Value', `GL_REPLACE' Function , `GL_MODULATE' Function ,
20296 `GL_DECAL' Function , `GL_BLEND' Function , `GL_ADD' Function
20297
20298 `GL_ALPHA'
20299 C_V= , C_P , C_P , undefined , C_P , C_P
20300
20301
20302 A_V= , A_S , A_P\u2062A_S , , A_V=A_P\u2062A_S , A_P\u2062A_S
20303
20304 `GL_LUMINANCE'
20305 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20306
20307 (or 1)
20308 A_V= , A_P , A_P , , A_P , A_P
20309
20310 `GL_LUMINANCE_ALPHA'
20311 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20312
20313 (or 2)
20314 A_V= , A_S , A_P\u2062A_S , , A_P\u2062A_S , A_P\u2062A_S
20315
20316 `GL_INTENSITY'
20317 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20318
20319
20320 A_V= , A_S , A_P\u2062A_S , , A_P\u2062(1-A_S,)+A_C\u2062A_S , A_P+A_S
20321
20322 `GL_RGB'
20323 C_V= , C_S , C_P\u2062C_S , C_S , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20324
20325 (or 3)
20326 A_V= , A_P , A_P , A_P , A_P , A_P
20327
20328 `GL_RGBA'
20329 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
20330 , C_P+C_S
20331
20332 (or 4)
20333 A_V= , A_S , A_P\u2062A_S , A_P , A_P\u2062A_S , A_P\u2062A_S
20334
20335 If PNAME is `GL_TEXTURE_ENV_MODE', and PARAMS is `GL_COMBINE', the form
20336 of the texture function depends on the values of `GL_COMBINE_RGB' and
20337 `GL_COMBINE_ALPHA'.
20338
20339 The following describes how the texture sources, as specified by
20340 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
20341 `GL_SRC1_ALPHA', and `GL_SRC2_ALPHA', are combined to produce a final
20342 texture color. In the following tables, `GL_SRC0_c' is represented by
20343 ARG0 , `GL_SRC1_c' is represented by ARG1 , and `GL_SRC2_c' is
20344 represented by ARG2 .
20345
20346 `GL_COMBINE_RGB' accepts any of `GL_REPLACE', `GL_MODULATE', `GL_ADD',
20347 `GL_ADD_SIGNED', `GL_INTERPOLATE', `GL_SUBTRACT', `GL_DOT3_RGB', or
20348 `GL_DOT3_RGBA'.
20349
20350
20351
20352 *`GL_COMBINE_RGB'*
20353 *Texture Function*
20354
20355 `GL_REPLACE'
20356 ARG0
20357
20358 `GL_MODULATE'
20359 ARG0×ARG1
20360
20361 `GL_ADD'
20362 ARG0+ARG1
20363
20364 `GL_ADD_SIGNED'
20365 ARG0+ARG1-0.5
20366
20367 `GL_INTERPOLATE'
20368 ARG0×ARG2+ARG1×(1-ARG2,)
20369
20370 `GL_SUBTRACT'
20371 ARG0-ARG1
20372
20373 `GL_DOT3_RGB' or `GL_DOT3_RGBA'
20374 4×(((ARG0_R,-0.5,)×(ARG1_R,-0.5,),)+((ARG0_G,-0.5,)×(ARG1_G,-0.5,),
20375 )+((ARG0_B,-0.5,)×(ARG1_B,-0.5,),),)
20376
20377 The scalar results for `GL_DOT3_RGB' and `GL_DOT3_RGBA' are placed into
20378 each of the 3 (RGB) or 4 (RGBA) components on output.
20379
20380 Likewise, `GL_COMBINE_ALPHA' accepts any of `GL_REPLACE', `GL_MODULATE',
20381 `GL_ADD', `GL_ADD_SIGNED', `GL_INTERPOLATE', or `GL_SUBTRACT'. The
20382 following table describes how alpha values are combined:
20383
20384
20385
20386 *`GL_COMBINE_ALPHA'*
20387 *Texture Function*
20388
20389 `GL_REPLACE'
20390 ARG0
20391
20392 `GL_MODULATE'
20393 ARG0×ARG1
20394
20395 `GL_ADD'
20396 ARG0+ARG1
20397
20398 `GL_ADD_SIGNED'
20399 ARG0+ARG1-0.5
20400
20401 `GL_INTERPOLATE'
20402 ARG0×ARG2+ARG1×(1-ARG2,)
20403
20404 `GL_SUBTRACT'
20405 ARG0-ARG1
20406
20407 In the following tables, the value C_S represents the color sampled from
20408 the currently bound texture, C_C represents the constant
20409 texture-environment color, C_F represents the primary color of the
20410 incoming fragment, and C_P represents the color computed from the
20411 previous texture stage or C_F if processing texture stage 0. Likewise,
20412 A_S , A_C , A_F , and A_P represent the respective alpha values.
20413
20414 The following table describes the values assigned to ARG0 , ARG1 , and
20415 ARG2 based upon the RGB sources and operands:
20416
20417
20418
20419 *`GL_SRCn_RGB'*
20420 *`GL_OPERANDn_RGB'*, *Argument Value*
20421
20422 `GL_TEXTURE'
20423 `GL_SRC_COLOR', C_S,
20424
20425
20426 `GL_ONE_MINUS_SRC_COLOR', 1-C_S,
20427
20428
20429 `GL_SRC_ALPHA', A_S,
20430
20431
20432 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20433
20434 `GL_TEXTUREn'
20435 `GL_SRC_COLOR', C_S,
20436
20437
20438 `GL_ONE_MINUS_SRC_COLOR', 1-C_S,
20439
20440
20441 `GL_SRC_ALPHA', A_S,
20442
20443
20444 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20445
20446 `GL_CONSTANT'
20447 `GL_SRC_COLOR', C_C,
20448
20449
20450 `GL_ONE_MINUS_SRC_COLOR', 1-C_C,
20451
20452
20453 `GL_SRC_ALPHA', A_C,
20454
20455
20456 `GL_ONE_MINUS_SRC_ALPHA', 1-A_C,
20457
20458 `GL_PRIMARY_COLOR'
20459 `GL_SRC_COLOR', C_F,
20460
20461
20462 `GL_ONE_MINUS_SRC_COLOR', 1-C_F,
20463
20464
20465 `GL_SRC_ALPHA', A_F,
20466
20467
20468 `GL_ONE_MINUS_SRC_ALPHA', 1-A_F,
20469
20470 `GL_PREVIOUS'
20471 `GL_SRC_COLOR', C_P,
20472
20473
20474 `GL_ONE_MINUS_SRC_COLOR', 1-C_P,
20475
20476
20477 `GL_SRC_ALPHA', A_P,
20478
20479
20480 `GL_ONE_MINUS_SRC_ALPHA', 1-A_P,
20481
20482 For `GL_TEXTUREn' sources, C_S and A_S represent the color and alpha,
20483 respectively, produced from texture stage N .
20484
20485 The follow table describes the values assigned to ARG0 , ARG1 , and ARG2
20486 based upon the alpha sources and operands:
20487
20488
20489
20490 *`GL_SRCn_ALPHA'*
20491 *`GL_OPERANDn_ALPHA'*, *Argument Value*
20492
20493 `GL_TEXTURE'
20494 `GL_SRC_ALPHA', A_S,
20495
20496
20497 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20498
20499 `GL_TEXTUREn'
20500 `GL_SRC_ALPHA', A_S,
20501
20502
20503 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20504
20505 `GL_CONSTANT'
20506 `GL_SRC_ALPHA', A_C,
20507
20508
20509 `GL_ONE_MINUS_SRC_ALPHA', 1-A_C,
20510
20511 `GL_PRIMARY_COLOR'
20512 `GL_SRC_ALPHA', A_F,
20513
20514
20515 `GL_ONE_MINUS_SRC_ALPHA', 1-A_F,
20516
20517 `GL_PREVIOUS'
20518 `GL_SRC_ALPHA', A_P,
20519
20520
20521 `GL_ONE_MINUS_SRC_ALPHA', 1-A_P,
20522
20523 The RGB and alpha results of the texture function are multipled by the
20524 values of `GL_RGB_SCALE' and `GL_ALPHA_SCALE', respectively, and clamped
20525 to the range [0,1] .
20526
20527 If PNAME is `GL_TEXTURE_ENV_COLOR', PARAMS is a pointer to an array that
20528 holds an RGBA color consisting of four values. Integer color components
20529 are interpreted linearly such that the most positive integer maps to
20530 1.0, and the most negative integer maps to -1.0. The values are clamped
20531 to the range [0,1] when they are specified. C_C takes these four values.
20532
20533 If PNAME is `GL_TEXTURE_LOD_BIAS', the value specified is added to the
20534 texture level-of-detail parameter, that selects which mipmap, or mipmaps
20535 depending upon the selected `GL_TEXTURE_MIN_FILTER', will be sampled.
20536
20537 `GL_TEXTURE_ENV_MODE' defaults to `GL_MODULATE' and
20538 `GL_TEXTURE_ENV_COLOR' defaults to (0, 0, 0, 0).
20539
20540 If TARGET is `GL_POINT_SPRITE' and PNAME is `GL_COORD_REPLACE', the
20541 boolean value specified is used to either enable or disable point sprite
20542 texture coordinate replacement. The default value is `GL_FALSE'.
20543
20544 `GL_INVALID_ENUM' is generated when TARGET or PNAME is not one of the
20545 accepted defined values, or when PARAMS should have a defined constant
20546 value (based on the value of PNAME) and does not.
20547
20548 `GL_INVALID_VALUE' is generated if the PARAMS value for `GL_RGB_SCALE'
20549 or `GL_ALPHA_SCALE' are not one of 1.0, 2.0, or 4.0.
20550
20551 `GL_INVALID_OPERATION' is generated if `glTexEnv' is executed between
20552 the execution of `glBegin' and the corresponding execution of `glEnd'.")
20553
20554 (define-gl-procedures
20555 ((glTexGeni
20556 (coord GLenum)
20557 (pname GLenum)
20558 (param GLint)
20559 ->
20560 void)
20561 (glTexGenf
20562 (coord GLenum)
20563 (pname GLenum)
20564 (param GLfloat)
20565 ->
20566 void)
20567 (glTexGend
20568 (coord GLenum)
20569 (pname GLenum)
20570 (param GLdouble)
20571 ->
20572 void)
20573 (glTexGeniv
20574 (coord GLenum)
20575 (pname GLenum)
20576 (params const-GLint-*)
20577 ->
20578 void)
20579 (glTexGenfv
20580 (coord GLenum)
20581 (pname GLenum)
20582 (params const-GLfloat-*)
20583 ->
20584 void)
20585 (glTexGendv
20586 (coord GLenum)
20587 (pname GLenum)
20588 (params const-GLdouble-*)
20589 ->
20590 void))
20591 "Control the generation of texture coordinates.
20592
20593 COORD
20594 Specifies a texture coordinate. Must be one of `GL_S', `GL_T',
20595 `GL_R', or `GL_Q'.
20596
20597 PNAME
20598 Specifies the symbolic name of the texture-coordinate generation
20599 function. Must be `GL_TEXTURE_GEN_MODE'.
20600
20601 PARAM
20602 Specifies a single-valued texture generation parameter, one of
20603 `GL_OBJECT_LINEAR', `GL_EYE_LINEAR', `GL_SPHERE_MAP',
20604 `GL_NORMAL_MAP', or `GL_REFLECTION_MAP'.
20605
20606 `glTexGen' selects a texture-coordinate generation function or supplies
20607 coefficients for one of the functions. COORD names one of the (S, T, R,
20608 Q) texture coordinates; it must be one of the symbols `GL_S', `GL_T',
20609 `GL_R', or `GL_Q'. PNAME must be one of three symbolic constants:
20610 `GL_TEXTURE_GEN_MODE', `GL_OBJECT_PLANE', or `GL_EYE_PLANE'. If PNAME is
20611 `GL_TEXTURE_GEN_MODE', then PARAMS chooses a mode, one of
20612 `GL_OBJECT_LINEAR', `GL_EYE_LINEAR', `GL_SPHERE_MAP', `GL_NORMAL_MAP',
20613 or `GL_REFLECTION_MAP'. If PNAME is either `GL_OBJECT_PLANE' or
20614 `GL_EYE_PLANE', PARAMS contains coefficients for the corresponding
20615 texture generation function.
20616
20617 If the texture generation function is `GL_OBJECT_LINEAR', the function
20618
20619 G=P_1×X_O+P_2×Y_O+P_3×Z_O+P_4×W_O
20620
20621 is used, where G is the value computed for the coordinate named in
20622 COORD, P_1 , P_2 , P_3 , and P_4 are the four values supplied in PARAMS,
20623 and X_O , Y_O , Z_O , and W_O are the object coordinates of the vertex.
20624 This function can be used, for example, to texture-map terrain using sea
20625 level as a reference plane (defined by P_1 , P_2 , P_3 , and P_4 ). The
20626 altitude of a terrain vertex is computed by the `GL_OBJECT_LINEAR'
20627 coordinate generation function as its distance from sea level; that
20628 altitude can then be used to index the texture image to map white snow
20629 onto peaks and green grass onto foothills.
20630
20631 If the texture generation function is `GL_EYE_LINEAR', the function
20632
20633 G=P_1,^″×X_E+P_2,^″×Y_E+P_3,^″×Z_E+P_4,^″×W_E
20634
20635 is used, where
20636
20637 (P_1,^″\u2062P_2,^″\u2062P_3,^″\u2062P_4,^″,)=(P_1\u2062P_2\u2062P_3\u2062P_4,)\u2062M^-1
20638
20639 and X_E , Y_E , Z_E , and W_E are the eye coordinates of the vertex, P_1
20640 , P_2 , P_3 , and P_4 are the values supplied in PARAMS, and M is the
20641 modelview matrix when `glTexGen' is invoked. If M is poorly conditioned
20642 or singular, texture coordinates generated by the resulting function may
20643 be inaccurate or undefined.
20644
20645 Note that the values in PARAMS define a reference plane in eye
20646 coordinates. The modelview matrix that is applied to them may not be the
20647 same one in effect when the polygon vertices are transformed. This
20648 function establishes a field of texture coordinates that can produce
20649 dynamic contour lines on moving objects.
20650
20651 If the texture generation function is `GL_SPHERE_MAP' and COORD is
20652 either `GL_S' or `GL_T', S and T texture coordinates are generated as
20653 follows. Let U be the unit vector pointing from the origin to the
20654 polygon vertex (in eye coordinates). Let N sup prime be the current
20655 normal, after transformation to eye coordinates. Let
20656
20657 F=(F_X\u2062F_Y\u2062F_Z,)^T be the reflection vector such that
20658
20659 F=U-2\u2062N^″\u2062N^″,^T\u2062U
20660
20661 Finally, let M=2\u2062√(F_X,^2+F_Y,^2+(F_Z+1,)^2,) . Then the values assigned
20662 to the S and T texture coordinates are
20663
20664 S=F_X/M+1/2
20665
20666 T=F_Y/M+1/2
20667
20668 To enable or disable a texture-coordinate generation function, call
20669 `glEnable' or `glDisable' with one of the symbolic texture-coordinate
20670 names (`GL_TEXTURE_GEN_S', `GL_TEXTURE_GEN_T', `GL_TEXTURE_GEN_R', or
20671 `GL_TEXTURE_GEN_Q') as the argument. When enabled, the specified texture
20672 coordinate is computed according to the generating function associated
20673 with that coordinate. When disabled, subsequent vertices take the
20674 specified texture coordinate from the current set of texture
20675 coordinates. Initially, all texture generation functions are set to
20676 `GL_EYE_LINEAR' and are disabled. Both S plane equations are (1, 0, 0,
20677 0), both T plane equations are (0, 1, 0, 0), and all R and Q plane
20678 equations are (0, 0, 0, 0).
20679
20680 When the `ARB_multitexture' extension is supported, `glTexGen' sets the
20681 texture generation parameters for the currently active texture unit,
20682 selected with `glActiveTexture'.
20683
20684 `GL_INVALID_ENUM' is generated when COORD or PNAME is not an accepted
20685 defined value, or when PNAME is `GL_TEXTURE_GEN_MODE' and PARAMS is not
20686 an accepted defined value.
20687
20688 `GL_INVALID_ENUM' is generated when PNAME is `GL_TEXTURE_GEN_MODE',
20689 PARAMS is `GL_SPHERE_MAP', and COORD is either `GL_R' or `GL_Q'.
20690
20691 `GL_INVALID_OPERATION' is generated if `glTexGen' is executed between
20692 the execution of `glBegin' and the corresponding execution of `glEnd'.")
20693
20694 (define-gl-procedures
20695 ((glTexImage1D
20696 (target GLenum)
20697 (level GLint)
20698 (internalFormat GLint)
20699 (width GLsizei)
20700 (border GLint)
20701 (format GLenum)
20702 (type GLenum)
20703 (data const-GLvoid-*)
20704 ->
20705 void))
20706 "Specify a one-dimensional texture image.
20707
20708 TARGET
20709 Specifies the target texture. Must be `GL_TEXTURE_1D' or
20710 `GL_PROXY_TEXTURE_1D'.
20711
20712 LEVEL
20713 Specifies the level-of-detail number. Level 0 is the base image
20714 level. Level N is the Nth mipmap reduction image.
20715
20716 INTERNALFORMAT
20717 Specifies the number of color components in the texture. Must be 1,
20718 2, 3, or 4, or one of the following symbolic constants: `GL_ALPHA',
20719 `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
20720 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
20721 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
20722 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT',
20723 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24',
20724 `GL_DEPTH_COMPONENT32', `GL_LUMINANCE', `GL_LUMINANCE4',
20725 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
20726 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
20727 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
20728 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
20729 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
20730 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
20731 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
20732 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
20733 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
20734 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
20735 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
20736 `GL_SRGB8_ALPHA8'.
20737
20738 WIDTH
20739 Specifies the width of the texture image including the border if
20740 any. If the GL version does not support non-power-of-two sizes,
20741 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
20742 implementations support texture images that are at least 64 texels
20743 wide. The height of the 1D texture image is 1.
20744
20745 BORDER
20746 Specifies the width of the border. Must be either 0 or 1.
20747
20748 FORMAT
20749 Specifies the format of the pixel data. The following symbolic
20750 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
20751 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
20752 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
20753
20754 TYPE
20755 Specifies the data type of the pixel data. The following symbolic
20756 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
20757 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
20758 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20759 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
20760 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20761 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20762 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20763 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
20764
20765 DATA
20766 Specifies a pointer to the image data in memory.
20767
20768 Texturing maps a portion of a specified texture image onto each
20769 graphical primitive for which texturing is enabled. To enable and
20770 disable one-dimensional texturing, call `glEnable' and `glDisable' with
20771 argument `GL_TEXTURE_1D'.
20772
20773 Texture images are defined with `glTexImage1D'. The arguments describe
20774 the parameters of the texture image, such as width, width of the border,
20775 level-of-detail number (see `glTexParameter'), and the internal
20776 resolution and format used to store the image. The last three arguments
20777 describe how the image is represented in memory; they are identical to
20778 the pixel formats used for `glDrawPixels'.
20779
20780 If TARGET is `GL_PROXY_TEXTURE_1D', no data is read from DATA, but all
20781 of the texture image state is recalculated, checked for consistency, and
20782 checked against the implementation's capabilities. If the implementation
20783 cannot handle a texture of the requested texture size, it sets all of
20784 the image state to 0, but does not generate an error (see `glGetError').
20785 To query for an entire mipmap array, use an image array level greater
20786 than or equal to 1.
20787
20788 If TARGET is `GL_TEXTURE_1D', data is read from DATA as a sequence of
20789 signed or unsigned bytes, shorts, or longs, or single-precision
20790 floating-point values, depending on TYPE. These values are grouped into
20791 sets of one, two, three, or four values, depending on FORMAT, to form
20792 elements. If TYPE is `GL_BITMAP', the data is considered as a string of
20793 unsigned bytes (and FORMAT must be `GL_COLOR_INDEX'). Each data byte is
20794 treated as eight 1-bit elements, with bit ordering determined by
20795 `GL_UNPACK_LSB_FIRST' (see `glPixelStore').
20796
20797 If a non-zero named buffer object is bound to the
20798 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
20799 image is specified, DATA is treated as a byte offset into the buffer
20800 object's data store.
20801
20802 The first element corresponds to the left end of the texture array.
20803 Subsequent elements progress left-to-right through the remaining texels
20804 in the texture array. The final element corresponds to the right end of
20805 the texture array.
20806
20807 FORMAT determines the composition of each element in DATA. It can assume
20808 one of these symbolic values:
20809
20810 `GL_COLOR_INDEX'
20811 Each element is a single value, a color index. The GL converts it
20812 to fixed point (with an unspecified number of zero bits to the
20813 right of the binary point), shifted left or right depending on the
20814 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
20815 (see `glPixelTransfer'). The resulting index is converted to a set
20816 of color components using the `GL_PIXEL_MAP_I_TO_R',
20817 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
20818 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
20819
20820 `GL_RED'
20821 Each element is a single red component. The GL converts it to
20822 floating point and assembles it into an RGBA element by attaching 0
20823 for green and blue, and 1 for alpha. Each component is then
20824 multiplied by the signed scale factor `GL_c_SCALE', added to the
20825 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20826 `glPixelTransfer').
20827
20828 `GL_GREEN'
20829 Each element is a single green component. The GL converts it to
20830 floating point and assembles it into an RGBA element by attaching 0
20831 for red and blue, and 1 for alpha. Each component is then
20832 multiplied by the signed scale factor `GL_c_SCALE', added to the
20833 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20834 `glPixelTransfer').
20835
20836 `GL_BLUE'
20837 Each element is a single blue component. The GL converts it to
20838 floating point and assembles it into an RGBA element by attaching 0
20839 for red and green, and 1 for alpha. Each component is then
20840 multiplied by the signed scale factor `GL_c_SCALE', added to the
20841 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20842 `glPixelTransfer').
20843
20844 `GL_ALPHA'
20845 Each element is a single alpha component. The GL converts it to
20846 floating point and assembles it into an RGBA element by attaching 0
20847 for red, green, and blue. Each component is then multiplied by the
20848 signed scale factor `GL_c_SCALE', added to the signed bias
20849 `GL_c_BIAS', and clamped to the range [0,1] (see
20850 `glPixelTransfer').
20851
20852 `GL_INTENSITY'
20853 Each element is a single intensity value. The GL converts it to
20854 floating point, then assembles it into an RGBA element by
20855 replicating the intensity value three times for red, green, blue,
20856 and alpha. Each component is then multiplied by the signed scale
20857 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
20858 clamped to the range [0,1] (see `glPixelTransfer').
20859
20860 `GL_RGB'
20861 `GL_BGR'
20862 Each element is an RGB triple. The GL converts it to floating point
20863 and assembles it into an RGBA element by attaching 1 for alpha.
20864 Each component is then multiplied by the signed scale factor
20865 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20866 the range [0,1] (see `glPixelTransfer').
20867
20868 `GL_RGBA'
20869 `GL_BGRA'
20870 Each element contains all four components. Each component is
20871 multiplied by the signed scale factor `GL_c_SCALE', added to the
20872 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20873 `glPixelTransfer').
20874
20875 `GL_LUMINANCE'
20876 Each element is a single luminance value. The GL converts it to
20877 floating point, then assembles it into an RGBA element by
20878 replicating the luminance value three times for red, green, and
20879 blue and attaching 1 for alpha. Each component is then multiplied
20880 by the signed scale factor `GL_c_SCALE', added to the signed bias
20881 `GL_c_BIAS', and clamped to the range [0,1] (see
20882 `glPixelTransfer').
20883
20884 `GL_LUMINANCE_ALPHA'
20885 Each element is a luminance/alpha pair. The GL converts it to
20886 floating point, then assembles it into an RGBA element by
20887 replicating the luminance value three times for red, green, and
20888 blue. Each component is then multiplied by the signed scale factor
20889 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20890 the range [0,1] (see `glPixelTransfer').
20891
20892 `GL_DEPTH_COMPONENT'
20893 Each element is a single depth value. The GL converts it to
20894 floating point, multiplies by the signed scale factor
20895 `GL_DEPTH_SCALE', adds the signed bias `GL_DEPTH_BIAS', and clamps
20896 to the range [0,1] (see `glPixelTransfer').
20897
20898 Refer to the `glDrawPixels' reference page for a description of the
20899 acceptable values for the TYPE parameter.
20900
20901 If an application wants to store the texture at a certain resolution or
20902 in a certain format, it can request the resolution and format with
20903 INTERNALFORMAT. The GL will choose an internal representation that
20904 closely approximates that requested by INTERNALFORMAT, but it may not
20905 match exactly. (The representations specified by `GL_LUMINANCE',
20906 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
20907 numeric values 1, 2, 3, and 4 may also be used to specify the above
20908 representations.)
20909
20910 If the INTERNALFORMAT parameter is one of the generic compressed
20911 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
20912 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
20913 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
20914 internal format with the symbolic constant for a specific internal
20915 format and compress the texture before storage. If no corresponding
20916 internal format is available, or the GL can not compress that image for
20917 any reason, the internal format is instead replaced with a corresponding
20918 base internal format.
20919
20920 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
20921 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
20922 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
20923 treated as if the red, green, blue, or luminance components are encoded
20924 in the sRGB color space. Any alpha component is left unchanged. The
20925 conversion from the sRGB encoded component C_S to a linear component C_L
20926 is:
20927
20928 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
20929 C_S>0.04045)
20930
20931 Assume C_S is the sRGB component in the range [0,1].
20932
20933 Use the `GL_PROXY_TEXTURE_1D' target to try out a resolution and format.
20934 The implementation will update and recompute its best match for the
20935 requested storage resolution and format. To then query this state, call
20936 `glGetTexLevelParameter'. If the texture cannot be accommodated, texture
20937 state is set to 0.
20938
20939 A one-component texture image uses only the red component of the RGBA
20940 color from DATA. A two-component image uses the R and A values. A
20941 three-component image uses the R, G, and B values. A four-component
20942 image uses all of the RGBA components.
20943
20944 Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures
20945 during texture filtering and application.\xa0Image-based shadowing\xa0can\xa0be
20946 \xa0enabled\xa0by\xa0comparing texture r coordinates to depth texture values to
20947 generate a boolean result. See `glTexParameter' for details on texture
20948 comparison.
20949
20950 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_1D' or
20951 `GL_PROXY_TEXTURE_1D'.
20952
20953 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
20954 constant. Format constants other than `GL_STENCIL_INDEX' are accepted.
20955
20956 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
20957
20958 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
20959 `GL_COLOR_INDEX'.
20960
20961 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
20962
20963 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
20964 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
20965
20966 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
20967 one of the accepted resolution and format symbolic constants.
20968
20969 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
20970 2 + `GL_MAX_TEXTURE_SIZE'.
20971
20972 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
20973 supported and the WIDTH cannot be represented as 2^N+2\u2061(BORDER,) for
20974 some integer value of N.
20975
20976 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
20977
20978 `GL_INVALID_OPERATION' is generated if TYPE is one of
20979 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20980 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
20981 is not `GL_RGB'.
20982
20983 `GL_INVALID_OPERATION' is generated if TYPE is one of
20984 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20985 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20986 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20987 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
20988 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
20989
20990 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
20991 and INTERNALFORMAT is not `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
20992 `GL_DEPTH_COMPONENT24', or `GL_DEPTH_COMPONENT32'.
20993
20994 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
20995 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
20996 `GL_DEPTH_COMPONENT32', and FORMAT is not `GL_DEPTH_COMPONENT'.
20997
20998 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20999 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21000 data store is currently mapped.
21001
21002 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21003 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21004 unpacked from the buffer object such that the memory reads required
21005 would exceed the data store size.
21006
21007 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21008 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21009 divisible into the number of bytes needed to store in memory a datum
21010 indicated by TYPE.
21011
21012 `GL_INVALID_OPERATION' is generated if `glTexImage1D' is executed
21013 between the execution of `glBegin' and the corresponding execution of
21014 `glEnd'.")
21015
21016 (define-gl-procedures
21017 ((glTexImage2D
21018 (target GLenum)
21019 (level GLint)
21020 (internalFormat GLint)
21021 (width GLsizei)
21022 (height GLsizei)
21023 (border GLint)
21024 (format GLenum)
21025 (type GLenum)
21026 (data const-GLvoid-*)
21027 ->
21028 void))
21029 "Specify a two-dimensional texture image.
21030
21031 TARGET
21032 Specifies the target texture. Must be `GL_TEXTURE_2D',
21033 `GL_PROXY_TEXTURE_2D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
21034 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
21035 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
21036 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
21037
21038 LEVEL
21039 Specifies the level-of-detail number. Level 0 is the base image
21040 level. Level N is the Nth mipmap reduction image.
21041
21042 INTERNALFORMAT
21043 Specifies the number of color components in the texture. Must be 1,
21044 2, 3, or 4, or one of the following symbolic constants: `GL_ALPHA',
21045 `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
21046 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
21047 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
21048 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT',
21049 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24',
21050 `GL_DEPTH_COMPONENT32', `GL_LUMINANCE', `GL_LUMINANCE4',
21051 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
21052 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
21053 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
21054 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
21055 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
21056 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
21057 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
21058 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
21059 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
21060 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
21061 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
21062 `GL_SRGB8_ALPHA8'.
21063
21064 WIDTH
21065 Specifies the width of the texture image including the border if
21066 any. If the GL version does not support non-power-of-two sizes,
21067 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
21068 implementations support texture images that are at least 64 texels
21069 wide.
21070
21071 HEIGHT
21072 Specifies the height of the texture image including the border if
21073 any. If the GL version does not support non-power-of-two sizes,
21074 this value must be 2^M+2\u2061(BORDER,) for some integer M . All
21075 implementations support texture images that are at least 64 texels
21076 high.
21077
21078 BORDER
21079 Specifies the width of the border. Must be either 0 or 1.
21080
21081 FORMAT
21082 Specifies the format of the pixel data. The following symbolic
21083 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
21084 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
21085 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
21086
21087 TYPE
21088 Specifies the data type of the pixel data. The following symbolic
21089 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
21090 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
21091 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21092 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
21093 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21094 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21095 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21096 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
21097
21098 DATA
21099 Specifies a pointer to the image data in memory.
21100
21101 Texturing maps a portion of a specified texture image onto each
21102 graphical primitive for which texturing is enabled. To enable and
21103 disable two-dimensional texturing, call `glEnable' and `glDisable' with
21104 argument `GL_TEXTURE_2D'. To enable and disable texturing using
21105 cube-mapped texture, call `glEnable' and `glDisable' with argument
21106 `GL_TEXTURE_CUBE_MAP'.
21107
21108 To define texture images, call `glTexImage2D'. The arguments describe
21109 the parameters of the texture image, such as height, width, width of the
21110 border, level-of-detail number (see `glTexParameter'), and number of
21111 color components provided. The last three arguments describe how the
21112 image is represented in memory; they are identical to the pixel formats
21113 used for `glDrawPixels'.
21114
21115 If TARGET is `GL_PROXY_TEXTURE_2D' or `GL_PROXY_TEXTURE_CUBE_MAP', no
21116 data is read from DATA, but all of the texture image state is
21117 recalculated, checked for consistency, and checked against the
21118 implementation's capabilities. If the implementation cannot handle a
21119 texture of the requested texture size, it sets all of the image state to
21120 0, but does not generate an error (see `glGetError'). To query for an
21121 entire mipmap array, use an image array level greater than or equal to
21122 1.
21123
21124 If TARGET is `GL_TEXTURE_2D', or one of the `GL_TEXTURE_CUBE_MAP'
21125 targets, data is read from DATA as a sequence of signed or unsigned
21126 bytes, shorts, or longs, or single-precision floating-point values,
21127 depending on TYPE. These values are grouped into sets of one, two,
21128 three, or four values, depending on FORMAT, to form elements. If TYPE is
21129 `GL_BITMAP', the data is considered as a string of unsigned bytes (and
21130 FORMAT must be `GL_COLOR_INDEX'). Each data byte is treated as eight
21131 1-bit elements, with bit ordering determined by `GL_UNPACK_LSB_FIRST'
21132 (see `glPixelStore').
21133
21134 If a non-zero named buffer object is bound to the
21135 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
21136 image is specified, DATA is treated as a byte offset into the buffer
21137 object's data store.
21138
21139 The first element corresponds to the lower left corner of the texture
21140 image. Subsequent elements progress left-to-right through the remaining
21141 texels in the lowest row of the texture image, and then in successively
21142 higher rows of the texture image. The final element corresponds to the
21143 upper right corner of the texture image.
21144
21145 FORMAT determines the composition of each element in DATA. It can assume
21146 one of these symbolic values:
21147
21148 `GL_COLOR_INDEX'
21149 Each element is a single value, a color index. The GL converts it
21150 to fixed point (with an unspecified number of zero bits to the
21151 right of the binary point), shifted left or right depending on the
21152 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
21153 (see `glPixelTransfer'). The resulting index is converted to a set
21154 of color components using the `GL_PIXEL_MAP_I_TO_R',
21155 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
21156 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
21157
21158 `GL_RED'
21159 Each element is a single red component. The GL converts it to
21160 floating point and assembles it into an RGBA element by attaching 0
21161 for green and blue, and 1 for alpha. Each component is then
21162 multiplied by the signed scale factor `GL_c_SCALE', added to the
21163 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21164 `glPixelTransfer').
21165
21166 `GL_GREEN'
21167 Each element is a single green component. The GL converts it to
21168 floating point and assembles it into an RGBA element by attaching 0
21169 for red and blue, and 1 for alpha. Each component is then
21170 multiplied by the signed scale factor `GL_c_SCALE', added to the
21171 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21172 `glPixelTransfer').
21173
21174 `GL_BLUE'
21175 Each element is a single blue component. The GL converts it to
21176 floating point and assembles it into an RGBA element by attaching 0
21177 for red and green, and 1 for alpha. Each component is then
21178 multiplied by the signed scale factor `GL_c_SCALE', added to the
21179 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21180 `glPixelTransfer').
21181
21182 `GL_ALPHA'
21183 Each element is a single alpha component. The GL converts it to
21184 floating point and assembles it into an RGBA element by attaching 0
21185 for red, green, and blue. Each component is then multiplied by the
21186 signed scale factor `GL_c_SCALE', added to the signed bias
21187 `GL_c_BIAS', and clamped to the range [0,1] (see
21188 `glPixelTransfer').
21189
21190 `GL_INTENSITY'
21191 Each element is a single intensity value. The GL converts it to
21192 floating point, then assembles it into an RGBA element by
21193 replicating the intensity value three times for red, green, blue,
21194 and alpha. Each component is then multiplied by the signed scale
21195 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
21196 clamped to the range [0,1] (see `glPixelTransfer').
21197
21198 `GL_RGB'
21199 `GL_BGR'
21200 Each element is an RGB triple. The GL converts it to floating point
21201 and assembles it into an RGBA element by attaching 1 for alpha.
21202 Each component is then multiplied by the signed scale factor
21203 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
21204 the range [0,1] (see `glPixelTransfer').
21205
21206 `GL_RGBA'
21207 `GL_BGRA'
21208 Each element contains all four components. Each component is
21209 multiplied by the signed scale factor `GL_c_SCALE', added to the
21210 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21211 `glPixelTransfer').
21212
21213 `GL_LUMINANCE'
21214 Each element is a single luminance value. The GL converts it to
21215 floating point, then assembles it into an RGBA element by
21216 replicating the luminance value three times for red, green, and
21217 blue and attaching 1 for alpha. Each component is then multiplied
21218 by the signed scale factor `GL_c_SCALE', added to the signed bias
21219 `GL_c_BIAS', and clamped to the range [0,1] (see
21220 `glPixelTransfer').
21221
21222 `GL_LUMINANCE_ALPHA'
21223 Each element is a luminance/alpha pair. The GL converts it to
21224 floating point, then assembles it into an RGBA element by
21225 replicating the luminance value three times for red, green, and
21226 blue. Each component is then multiplied by the signed scale factor
21227 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
21228 the range [0,1] (see `glPixelTransfer').
21229
21230 `GL_DEPTH_COMPONENT'
21231 Each element is a single depth value. The GL converts it to
21232 floating point, multiplies by the signed scale factor
21233 `GL_DEPTH_SCALE', adds the signed bias `GL_DEPTH_BIAS', and clamps
21234 to the range [0,1] (see `glPixelTransfer').
21235
21236 Refer to the `glDrawPixels' reference page for a description of the
21237 acceptable values for the TYPE parameter.
21238
21239 If an application wants to store the texture at a certain resolution or
21240 in a certain format, it can request the resolution and format with
21241 INTERNALFORMAT. The GL will choose an internal representation that
21242 closely approximates that requested by INTERNALFORMAT, but it may not
21243 match exactly. (The representations specified by `GL_LUMINANCE',
21244 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
21245 numeric values 1, 2, 3, and 4 may also be used to specify the above
21246 representations.)
21247
21248 If the INTERNALFORMAT parameter is one of the generic compressed
21249 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
21250 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
21251 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
21252 internal format with the symbolic constant for a specific internal
21253 format and compress the texture before storage. If no corresponding
21254 internal format is available, or the GL can not compress that image for
21255 any reason, the internal format is instead replaced with a corresponding
21256 base internal format.
21257
21258 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
21259 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
21260 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
21261 treated as if the red, green, blue, or luminance components are encoded
21262 in the sRGB color space. Any alpha component is left unchanged. The
21263 conversion from the sRGB encoded component C_S to a linear component C_L
21264 is:
21265
21266 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
21267 C_S>0.04045)
21268
21269 Assume C_S is the sRGB component in the range [0,1].
21270
21271 Use the `GL_PROXY_TEXTURE_2D' or `GL_PROXY_TEXTURE_CUBE_MAP' target to
21272 try out a resolution and format. The implementation will update and
21273 recompute its best match for the requested storage resolution and
21274 format. To then query this state, call `glGetTexLevelParameter'. If the
21275 texture cannot be accommodated, texture state is set to 0.
21276
21277 A one-component texture image uses only the red component of the RGBA
21278 color extracted from DATA. A two-component image uses the R and A
21279 values. A three-component image uses the R, G, and B values. A
21280 four-component image uses all of the RGBA components.
21281
21282 Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures
21283 during texture filtering and application.\xa0Image-based shadowing\xa0can\xa0be
21284 \xa0enabled\xa0by\xa0comparing texture r coordinates to depth texture values to
21285 generate a boolean result. See `glTexParameter' for details on texture
21286 comparison.
21287
21288 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
21289 `GL_PROXY_TEXTURE_2D', `GL_PROXY_TEXTURE_CUBE_MAP',
21290 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
21291 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
21292 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
21293
21294 `GL_INVALID_ENUM' is generated if TARGET is one of the six cube map 2D
21295 image targets and the width and height parameters are not equal.
21296
21297 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
21298
21299 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
21300 `GL_COLOR_INDEX'.
21301
21302 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0 or
21303 greater than 2 + `GL_MAX_TEXTURE_SIZE'.
21304
21305 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
21306
21307 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
21308 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21309
21310 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
21311 one of the accepted resolution and format symbolic constants.
21312
21313 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0 or
21314 greater than 2 + `GL_MAX_TEXTURE_SIZE'.
21315
21316 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
21317 supported and the WIDTH or HEIGHT cannot be represented as
21318 2^K+2\u2061(BORDER,) for some integer value of K.
21319
21320 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
21321
21322 `GL_INVALID_OPERATION' is generated if TYPE is one of
21323 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21324 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21325 is not `GL_RGB'.
21326
21327 `GL_INVALID_OPERATION' is generated if TYPE is one of
21328 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21329 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21330 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21331 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21332 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21333
21334 `GL_INVALID_OPERATION' is generated if TARGET is not `GL_TEXTURE_2D' or
21335 `GL_PROXY_TEXTURE_2D' and INTERNALFORMAT is `GL_DEPTH_COMPONENT',
21336 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
21337 `GL_DEPTH_COMPONENT32'.
21338
21339 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
21340 and INTERNALFORMAT is not `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
21341 `GL_DEPTH_COMPONENT24', or `GL_DEPTH_COMPONENT32'.
21342
21343 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
21344 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
21345 `GL_DEPTH_COMPONENT32', and FORMAT is not `GL_DEPTH_COMPONENT'.
21346
21347 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21348 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21349 data store is currently mapped.
21350
21351 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21352 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21353 unpacked from the buffer object such that the memory reads required
21354 would exceed the data store size.
21355
21356 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21357 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21358 divisible into the number of bytes needed to store in memory a datum
21359 indicated by TYPE.
21360
21361 `GL_INVALID_OPERATION' is generated if `glTexImage2D' is executed
21362 between the execution of `glBegin' and the corresponding execution of
21363 `glEnd'.")
21364
21365 (define-gl-procedures
21366 ((glTexImage3D
21367 (target GLenum)
21368 (level GLint)
21369 (internalFormat GLint)
21370 (width GLsizei)
21371 (height GLsizei)
21372 (depth GLsizei)
21373 (border GLint)
21374 (format GLenum)
21375 (type GLenum)
21376 (data const-GLvoid-*)
21377 ->
21378 void))
21379 "Specify a three-dimensional texture image.
21380
21381 TARGET
21382 Specifies the target texture. Must be `GL_TEXTURE_3D' or
21383 `GL_PROXY_TEXTURE_3D'.
21384
21385 LEVEL
21386 Specifies the level-of-detail number. Level 0 is the base image
21387 level. Level N is the N^TH mipmap reduction image.
21388
21389 INTERNALFORMAT
21390 Specifies the number of color components in the texture. Must be 1,
21391 2, 3, or 4, or one of the following symbolic constants: `GL_ALPHA',
21392 `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
21393 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
21394 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
21395 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_LUMINANCE',
21396 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
21397 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
21398 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
21399 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
21400 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
21401 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
21402 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
21403 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
21404 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
21405 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
21406 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
21407 `GL_SRGB8_ALPHA8'.
21408
21409 WIDTH
21410 Specifies the width of the texture image including the border if
21411 any. If the GL version does not support non-power-of-two sizes,
21412 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
21413 implementations support 3D texture images that are at least 16
21414 texels wide.
21415
21416 HEIGHT
21417 Specifies the height of the texture image including the border if
21418 any. If the GL version does not support non-power-of-two sizes,
21419 this value must be 2^M+2\u2061(BORDER,) for some integer M . All
21420 implementations support 3D texture images that are at least 16
21421 texels high.
21422
21423 DEPTH
21424 Specifies the depth of the texture image including the border if
21425 any. If the GL version does not support non-power-of-two sizes,
21426 this value must be 2^K+2\u2061(BORDER,) for some integer K . All
21427 implementations support 3D texture images that are at least 16
21428 texels deep.
21429
21430 BORDER
21431 Specifies the width of the border. Must be either 0 or 1.
21432
21433 FORMAT
21434 Specifies the format of the pixel data. The following symbolic
21435 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
21436 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
21437 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
21438
21439 TYPE
21440 Specifies the data type of the pixel data. The following symbolic
21441 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
21442 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
21443 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21444 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
21445 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21446 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21447 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21448 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
21449
21450 DATA
21451 Specifies a pointer to the image data in memory.
21452
21453 Texturing maps a portion of a specified texture image onto each
21454 graphical primitive for which texturing is enabled. To enable and
21455 disable three-dimensional texturing, call `glEnable' and `glDisable'
21456 with argument `GL_TEXTURE_3D'.
21457
21458 To define texture images, call `glTexImage3D'. The arguments describe
21459 the parameters of the texture image, such as height, width, depth, width
21460 of the border, level-of-detail number (see `glTexParameter'), and number
21461 of color components provided. The last three arguments describe how the
21462 image is represented in memory; they are identical to the pixel formats
21463 used for `glDrawPixels'.
21464
21465 If TARGET is `GL_PROXY_TEXTURE_3D', no data is read from DATA, but all
21466 of the texture image state is recalculated, checked for consistency, and
21467 checked against the implementation's capabilities. If the implementation
21468 cannot handle a texture of the requested texture size, it sets all of
21469 the image state to 0, but does not generate an error (see `glGetError').
21470 To query for an entire mipmap array, use an image array level greater
21471 than or equal to 1.
21472
21473 If TARGET is `GL_TEXTURE_3D', data is read from DATA as a sequence of
21474 signed or unsigned bytes, shorts, or longs, or single-precision
21475 floating-point values, depending on TYPE. These values are grouped into
21476 sets of one, two, three, or four values, depending on FORMAT, to form
21477 elements. If TYPE is `GL_BITMAP', the data is considered as a string of
21478 unsigned bytes (and FORMAT must be `GL_COLOR_INDEX'). Each data byte is
21479 treated as eight 1-bit elements, with bit ordering determined by
21480 `GL_UNPACK_LSB_FIRST' (see `glPixelStore').
21481
21482 If a non-zero named buffer object is bound to the
21483 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
21484 image is specified, DATA is treated as a byte offset into the buffer
21485 object's data store.
21486
21487 The first element corresponds to the lower left corner of the texture
21488 image. Subsequent elements progress left-to-right through the remaining
21489 texels in the lowest row of the texture image, and then in successively
21490 higher rows of the texture image. The final element corresponds to the
21491 upper right corner of the texture image.
21492
21493 FORMAT determines the composition of each element in DATA. It can assume
21494 one of these symbolic values:
21495
21496 `GL_COLOR_INDEX'
21497 Each element is a single value, a color index. The GL converts it
21498 to fixed point (with an unspecified number of zero bits to the
21499 right of the binary point), shifted left or right depending on the
21500 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
21501 (see `glPixelTransfer'). The resulting index is converted to a set
21502 of color components using the `GL_PIXEL_MAP_I_TO_R',
21503 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
21504 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
21505
21506 `GL_RED'
21507 Each element is a single red component. The GL converts it to
21508 floating point and assembles it into an RGBA element by attaching 0
21509 for green and blue, and 1 for alpha. Each component is then
21510 multiplied by the signed scale factor `GL_c_SCALE', added to the
21511 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21512 `glPixelTransfer').
21513
21514 `GL_GREEN'
21515 Each element is a single green component. The GL converts it to
21516 floating point and assembles it into an RGBA element by attaching 0
21517 for red and blue, and 1 for alpha. Each component is then
21518 multiplied by the signed scale factor `GL_c_SCALE', added to the
21519 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21520 `glPixelTransfer').
21521
21522 `GL_BLUE'
21523 Each element is a single blue component. The GL converts it to
21524 floating point and assembles it into an RGBA element by attaching 0
21525 for red and green, and 1 for alpha. Each component is then
21526 multiplied by the signed scale factor `GL_c_SCALE', added to the
21527 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21528 `glPixelTransfer').
21529
21530 `GL_ALPHA'
21531 Each element is a single alpha component. The GL converts it to
21532 floating point and assembles it into an RGBA element by attaching 0
21533 for red, green, and blue. Each component is then multiplied by the
21534 signed scale factor `GL_c_SCALE', added to the signed bias
21535 `GL_c_BIAS', and clamped to the range [0,1] (see
21536 `glPixelTransfer').
21537
21538 `GL_INTENSITY'
21539 Each element is a single intensity value. The GL converts it to
21540 floating point, then assembles it into an RGBA element by
21541 replicating the intensity value three times for red, green, blue,
21542 and alpha. Each component is then multiplied by the signed scale
21543 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
21544 clamped to the range [0,1] (see `glPixelTransfer').
21545
21546 `GL_RGB'
21547 `GL_BGR'
21548 Each element is an RGB triple. The GL converts it to floating point
21549 and assembles it into an RGBA element by attaching 1 for alpha.
21550 Each component is then multiplied by the signed scale factor
21551 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
21552 the range [0,1] (see `glPixelTransfer').
21553
21554 `GL_RGBA'
21555 `GL_BGRA'
21556 Each element contains all four components. Each component is
21557 multiplied by the signed scale factor `GL_c_SCALE', added to the
21558 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21559 `glPixelTransfer').
21560
21561 `GL_LUMINANCE'
21562 Each element is a single luminance value. The GL converts it to
21563 floating point, then assembles it into an RGBA element by
21564 replicating the luminance value three times for red, green, and
21565 blue and attaching 1 for alpha. Each component is then multiplied
21566 by the signed scale factor `GL_c_SCALE', added to the signed bias
21567 `GL_c_BIAS', and clamped to the range [0,1] (see
21568 `glPixelTransfer').
21569
21570 `GL_LUMINANCE_ALPHA'
21571 Each element is a luminance/alpha pair. The GL converts it to
21572 floating point, then assembles it into an RGBA element by
21573 replicating the luminance value three times for red, green, and
21574 blue. Each component is then multiplied by the signed scale factor
21575 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
21576 the range [0,1] (see `glPixelTransfer').
21577
21578 Refer to the `glDrawPixels' reference page for a description of the
21579 acceptable values for the TYPE parameter.
21580
21581 If an application wants to store the texture at a certain resolution or
21582 in a certain format, it can request the resolution and format with
21583 INTERNALFORMAT. The GL will choose an internal representation that
21584 closely approximates that requested by INTERNALFORMAT, but it may not
21585 match exactly. (The representations specified by `GL_LUMINANCE',
21586 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
21587 numeric values 1, 2, 3, and 4 may also be used to specify the above
21588 representations.)
21589
21590 If the INTERNALFORMAT parameter is one of the generic compressed
21591 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
21592 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
21593 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
21594 internal format with the symbolic constant for a specific internal
21595 format and compress the texture before storage. If no corresponding
21596 internal format is available, or the GL can not compress that image for
21597 any reason, the internal format is instead replaced with a corresponding
21598 base internal format.
21599
21600 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
21601 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
21602 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
21603 treated as if the red, green, blue, or luminance components are encoded
21604 in the sRGB color space. Any alpha component is left unchanged. The
21605 conversion from the sRGB encoded component C_S to a linear component C_L
21606 is:
21607
21608 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
21609 C_S>0.04045)
21610
21611 Assume C_S is the sRGB component in the range [0,1].
21612
21613 Use the `GL_PROXY_TEXTURE_3D' target to try out a resolution and format.
21614 The implementation will update and recompute its best match for the
21615 requested storage resolution and format. To then query this state, call
21616 `glGetTexLevelParameter'. If the texture cannot be accommodated, texture
21617 state is set to 0.
21618
21619 A one-component texture image uses only the red component of the RGBA
21620 color extracted from DATA. A two-component image uses the R and A
21621 values. A three-component image uses the R, G, and B values. A
21622 four-component image uses all of the RGBA components.
21623
21624 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_3D' or
21625 `GL_PROXY_TEXTURE_3D'.
21626
21627 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
21628 constant. Format constants other than `GL_STENCIL_INDEX' and
21629 `GL_DEPTH_COMPONENT' are accepted.
21630
21631 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
21632
21633 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
21634 `GL_COLOR_INDEX'.
21635
21636 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
21637
21638 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
21639 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21640
21641 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
21642 one of the accepted resolution and format symbolic constants.
21643
21644 `GL_INVALID_VALUE' is generated if WIDTH, HEIGHT, or DEPTH is less than
21645 0 or greater than 2 + `GL_MAX_TEXTURE_SIZE'.
21646
21647 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
21648 supported and the WIDTH, HEIGHT, or DEPTH cannot be represented as
21649 2^K+2\u2061(BORDER,) for some integer value of K.
21650
21651 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
21652
21653 `GL_INVALID_OPERATION' is generated if TYPE is one of
21654 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21655 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21656 is not `GL_RGB'.
21657
21658 `GL_INVALID_OPERATION' is generated if TYPE is one of
21659 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21660 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21661 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21662 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21663 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21664
21665 `GL_INVALID_OPERATION' is generated if FORMAT or INTERNALFORMAT is
21666 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
21667 `GL_DEPTH_COMPONENT32'.
21668
21669 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21670 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21671 data store is currently mapped.
21672
21673 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21674 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21675 unpacked from the buffer object such that the memory reads required
21676 would exceed the data store size.
21677
21678 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21679 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21680 divisible into the number of bytes needed to store in memory a datum
21681 indicated by TYPE.
21682
21683 `GL_INVALID_OPERATION' is generated if `glTexImage3D' is executed
21684 between the execution of `glBegin' and the corresponding execution of
21685 `glEnd'.")
21686
21687 (define-gl-procedures
21688 ((glTexParameterf
21689 (target GLenum)
21690 (pname GLenum)
21691 (param GLfloat)
21692 ->
21693 void)
21694 (glTexParameteri
21695 (target GLenum)
21696 (pname GLenum)
21697 (param GLint)
21698 ->
21699 void)
21700 (glTexParameterfv
21701 (target GLenum)
21702 (pname GLenum)
21703 (params const-GLfloat-*)
21704 ->
21705 void)
21706 (glTexParameteriv
21707 (target GLenum)
21708 (pname GLenum)
21709 (params const-GLint-*)
21710 ->
21711 void))
21712 "Set texture parameters.
21713
21714 TARGET
21715 Specifies the target texture, which must be either `GL_TEXTURE_1D',
21716 `GL_TEXTURE_2D', `GL_TEXTURE_3D', or `GL_TEXTURE_CUBE_MAP'.
21717
21718 PNAME
21719 Specifies the symbolic name of a single-valued texture parameter.
21720 PNAME can be one of the following: `GL_TEXTURE_MIN_FILTER',
21721 `GL_TEXTURE_MAG_FILTER', `GL_TEXTURE_MIN_LOD',
21722 `GL_TEXTURE_MAX_LOD', `GL_TEXTURE_BASE_LEVEL',
21723 `GL_TEXTURE_MAX_LEVEL', `GL_TEXTURE_WRAP_S', `GL_TEXTURE_WRAP_T',
21724 `GL_TEXTURE_WRAP_R', `GL_TEXTURE_PRIORITY',
21725 `GL_TEXTURE_COMPARE_MODE', `GL_TEXTURE_COMPARE_FUNC',
21726 `GL_DEPTH_TEXTURE_MODE', or `GL_GENERATE_MIPMAP'.
21727
21728 PARAM
21729 Specifies the value of PNAME.
21730
21731 Texture mapping is a technique that applies an image onto an object's
21732 surface as if the image were a decal or cellophane shrink-wrap. The
21733 image is created in texture space, with an (S , T ) coordinate system. A
21734 texture is a one- or two-dimensional image and a set of parameters that
21735 determine how samples are derived from the image.
21736
21737 `glTexParameter' assigns the value or values in PARAMS to the texture
21738 parameter specified as PNAME. TARGET defines the target texture, either
21739 `GL_TEXTURE_1D', `GL_TEXTURE_2D', or `GL_TEXTURE_3D'. The following
21740 symbols are accepted in PNAME:
21741
21742 `GL_TEXTURE_MIN_FILTER'
21743 The texture minifying function is used whenever the pixel being
21744 textured maps to an area greater than one texture element. There
21745 are six defined minifying functions. Two of them use the nearest
21746 one or nearest four texture elements to compute the texture value.
21747 The other four use mipmaps.
21748
21749 A mipmap is an ordered set of arrays representing the same image at
21750 progressively lower resolutions. If the texture has dimensions
21751 2^N×2^M , there are MAX\u2061(N,M)+1 mipmaps. The first mipmap is the
21752 original texture, with dimensions 2^N×2^M . Each subsequent mipmap
21753 has dimensions 2^K-1,×2^L-1, , where 2^K×2^L are the dimensions of
21754 the previous mipmap, until either K=0 or L=0 . At that point,
21755 subsequent mipmaps have dimension 1×2^L-1, or 2^K-1,×1 until the
21756 final mipmap, which has dimension 1×1 . To define the mipmaps, call
21757 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glCopyTexImage1D',
21758 or `glCopyTexImage2D' with the LEVEL argument indicating the order
21759 of the mipmaps. Level 0 is the original texture; level MAX\u2061(N,M) is
21760 the final 1×1 mipmap.
21761
21762 PARAMS supplies a function for minifying the texture as one of the
21763 following:
21764
21765 As more texture elements are sampled in the minification process,
21766 fewer aliasing artifacts will be apparent. While the `GL_NEAREST'
21767 and `GL_LINEAR' minification functions can be faster than the other
21768 four, they sample only one or four texture elements to determine
21769 the texture value of the pixel being rendered and can produce moire
21770 patterns or ragged transitions. The initial value of
21771 `GL_TEXTURE_MIN_FILTER' is `GL_NEAREST_MIPMAP_LINEAR'.
21772
21773 `GL_TEXTURE_MAG_FILTER'
21774 The texture magnification function is used when the pixel being
21775 textured maps to an area less than or equal to one texture element.
21776 It sets the texture magnification function to either `GL_NEAREST'
21777 or `GL_LINEAR' (see below). `GL_NEAREST' is generally faster than
21778 `GL_LINEAR', but it can produce textured images with sharper edges
21779 because the transition between texture elements is not as smooth.
21780 The initial value of `GL_TEXTURE_MAG_FILTER' is `GL_LINEAR'.
21781
21782 `GL_NEAREST'
21783 Returns the value of the texture element that is nearest (in
21784 Manhattan distance) to the center of the pixel being textured.
21785
21786 `GL_LINEAR'
21787 Returns the weighted average of the four texture elements that are
21788 closest to the center of the pixel being textured. These can
21789 include border texture elements, depending on the values of
21790 `GL_TEXTURE_WRAP_S' and `GL_TEXTURE_WRAP_T', and on the exact
21791 mapping.
21792
21793 `GL_NEAREST_MIPMAP_NEAREST'
21794 Chooses the mipmap that most closely matches the size of the pixel
21795 being textured and uses the `GL_NEAREST' criterion (the texture
21796 element nearest to the center of the pixel) to produce a texture
21797 value.
21798
21799 `GL_LINEAR_MIPMAP_NEAREST'
21800 Chooses the mipmap that most closely matches the size of the pixel
21801 being textured and uses the `GL_LINEAR' criterion (a weighted
21802 average of the four texture elements that are closest to the center
21803 of the pixel) to produce a texture value.
21804
21805 `GL_NEAREST_MIPMAP_LINEAR'
21806 Chooses the two mipmaps that most closely match the size of the
21807 pixel being textured and uses the `GL_NEAREST' criterion (the
21808 texture element nearest to the center of the pixel) to produce a
21809 texture value from each mipmap. The final texture value is a
21810 weighted average of those two values.
21811
21812 `GL_LINEAR_MIPMAP_LINEAR'
21813 Chooses the two mipmaps that most closely match the size of the
21814 pixel being textured and uses the `GL_LINEAR' criterion (a weighted
21815 average of the four texture elements that are closest to the center
21816 of the pixel) to produce a texture value from each mipmap. The
21817 final texture value is a weighted average of those two values.
21818
21819 `GL_NEAREST'
21820 Returns the value of the texture element that is nearest (in
21821 Manhattan distance) to the center of the pixel being textured.
21822
21823 `GL_LINEAR'
21824 Returns the weighted average of the four texture elements that are
21825 closest to the center of the pixel being textured. These can
21826 include border texture elements, depending on the values of
21827 `GL_TEXTURE_WRAP_S' and `GL_TEXTURE_WRAP_T', and on the exact
21828 mapping.
21829
21830
21831
21832 `GL_TEXTURE_MIN_LOD'
21833 Sets the minimum level-of-detail parameter. This floating-point
21834 value limits the selection of highest resolution mipmap (lowest
21835 mipmap level). The initial value is -1000.
21836
21837
21838
21839 `GL_TEXTURE_MAX_LOD'
21840 Sets the maximum level-of-detail parameter. This floating-point
21841 value limits the selection of the lowest resolution mipmap (highest
21842 mipmap level). The initial value is 1000.
21843
21844
21845
21846 `GL_TEXTURE_BASE_LEVEL'
21847 Specifies the index of the lowest defined mipmap level. This is an
21848 integer value. The initial value is 0.
21849
21850
21851
21852 `GL_TEXTURE_MAX_LEVEL'
21853 Sets the index of the highest defined mipmap level. This is an
21854 integer value. The initial value is 1000.
21855
21856
21857
21858 `GL_TEXTURE_WRAP_S'
21859 Sets the wrap parameter for texture coordinate S to either
21860 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21861 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. `GL_CLAMP' causes S
21862 coordinates to be clamped to the range [0,1] and is useful for
21863 preventing wrapping artifacts when mapping a single image onto an
21864 object. `GL_CLAMP_TO_BORDER' causes the S coordinate to be clamped
21865 to the range [-1/2N,,1+1/2N,] , where N is the size of the texture
21866 in the direction of clamping.`GL_CLAMP_TO_EDGE' causes S
21867 coordinates to be clamped to the range [1/2N,,1-1/2N,] , where N is
21868 the size of the texture in the direction of clamping. `GL_REPEAT'
21869 causes the integer part of the S coordinate to be ignored; the GL
21870 uses only the fractional part, thereby creating a repeating
21871 pattern. `GL_MIRRORED_REPEAT' causes the S coordinate to be set to
21872 the fractional part of the texture coordinate if the integer part
21873 of S is even; if the integer part of S is odd, then the S texture
21874 coordinate is set to 1-FRAC\u2061(S,) , where FRAC\u2061(S,) represents the
21875 fractional part of S . Border texture elements are accessed only if
21876 wrapping is set to `GL_CLAMP' or `GL_CLAMP_TO_BORDER'. Initially,
21877 `GL_TEXTURE_WRAP_S' is set to `GL_REPEAT'.
21878
21879
21880
21881 `GL_TEXTURE_WRAP_T'
21882 Sets the wrap parameter for texture coordinate T to either
21883 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21884 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. See the discussion under
21885 `GL_TEXTURE_WRAP_S'. Initially, `GL_TEXTURE_WRAP_T' is set to
21886 `GL_REPEAT'.
21887
21888 `GL_TEXTURE_WRAP_R'
21889 Sets the wrap parameter for texture coordinate R to either
21890 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21891 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. See the discussion under
21892 `GL_TEXTURE_WRAP_S'. Initially, `GL_TEXTURE_WRAP_R' is set to
21893 `GL_REPEAT'.
21894
21895 `GL_TEXTURE_BORDER_COLOR'
21896 Sets a border color. PARAMS contains four values that comprise the
21897 RGBA color of the texture border. Integer color components are
21898 interpreted linearly such that the most positive integer maps to
21899 1.0, and the most negative integer maps to -1.0. The values are
21900 clamped to the range [0,1] when they are specified. Initially, the
21901 border color is (0, 0, 0, 0).
21902
21903 `GL_TEXTURE_PRIORITY'
21904 Specifies the texture residence priority of the currently bound
21905 texture. Permissible values are in the range [0,1] . See
21906 `glPrioritizeTextures' and `glBindTexture' for more information.
21907
21908 `GL_TEXTURE_COMPARE_MODE'
21909 Specifies the texture comparison mode for currently bound depth
21910 textures. That is, a texture whose internal format is
21911 `GL_DEPTH_COMPONENT_*'; see `glTexImage2D') Permissible values are:
21912
21913 `GL_TEXTURE_COMPARE_FUNC'
21914 Specifies the comparison operator used when
21915 `GL_TEXTURE_COMPARE_MODE' is set to `GL_COMPARE_R_TO_TEXTURE'.
21916 Permissible values are: where R is the current interpolated texture
21917 coordinate, and D_T is the depth texture value sampled from the
21918 currently bound depth texture. RESULT is assigned to the either the
21919 luminance, intensity, or alpha (as specified by
21920 `GL_DEPTH_TEXTURE_MODE'.)
21921
21922 `GL_DEPTH_TEXTURE_MODE'
21923 Specifies a single symbolic constant indicating how depth values
21924 should be treated during filtering and texture application.
21925 Accepted values are `GL_LUMINANCE', `GL_INTENSITY', and `GL_ALPHA'.
21926 The initial value is `GL_LUMINANCE'.
21927
21928 `GL_GENERATE_MIPMAP'
21929 Specifies a boolean value that indicates if all levels of a mipmap
21930 array should be automatically updated when any modification to the
21931 base level mipmap is done. The initial value is `GL_FALSE'.
21932
21933 `GL_COMPARE_R_TO_TEXTURE'
21934 Specifies that the interpolated and clamped R texture coordinate
21935 should be compared to the value in the currently bound depth
21936 texture. See the discussion of `GL_TEXTURE_COMPARE_FUNC' for
21937 details of how the comparison is evaluated. The result of the
21938 comparison is assigned to luminance, intensity, or alpha (as
21939 specified by `GL_DEPTH_TEXTURE_MODE').
21940
21941 `GL_NONE'
21942 Specifies that the luminance, intensity, or alpha (as specified by
21943 `GL_DEPTH_TEXTURE_MODE') should be assigned the appropriate value
21944 from the currently bound depth texture.
21945
21946 *Texture Comparison Function*
21947 *Computed result*
21948
21949 `GL_LEQUAL'
21950 RESULT={(1.0), (0.0)\u2062\xa0(R<=D_T,), (R>D_T,),
21951
21952 `GL_GEQUAL'
21953 RESULT={(1.0), (0.0)\u2062\xa0(R>=D_T,), (R<D_T,),
21954
21955 `GL_LESS'
21956 RESULT={(1.0), (0.0)\u2062\xa0(R<D_T,), (R>=D_T,),
21957
21958 `GL_GREATER'
21959 RESULT={(1.0), (0.0)\u2062\xa0(R>D_T,), (R<=D_T,),
21960
21961 `GL_EQUAL'
21962 RESULT={(1.0), (0.0)\u2062\xa0(R=D_T,), (R≠D_T,),
21963
21964 `GL_NOTEQUAL'
21965 RESULT={(1.0), (0.0)\u2062\xa0(R≠D_T,), (R=D_T,),
21966
21967 `GL_ALWAYS'
21968 RESULT=`1.0'
21969
21970 `GL_NEVER'
21971 RESULT=`0.0'
21972
21973 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not one of the
21974 accepted defined values.
21975
21976 `GL_INVALID_ENUM' is generated if PARAMS should have a defined constant
21977 value (based on the value of PNAME) and does not.
21978
21979 `GL_INVALID_OPERATION' is generated if `glTexParameter' is executed
21980 between the execution of `glBegin' and the corresponding execution of
21981 `glEnd'.")
21982
21983 (define-gl-procedures
21984 ((glTexSubImage1D
21985 (target GLenum)
21986 (level GLint)
21987 (xoffset GLint)
21988 (width GLsizei)
21989 (format GLenum)
21990 (type GLenum)
21991 (data const-GLvoid-*)
21992 ->
21993 void))
21994 "Specify a one-dimensional texture subimage.
21995
21996 TARGET
21997 Specifies the target texture. Must be `GL_TEXTURE_1D'.
21998
21999 LEVEL
22000 Specifies the level-of-detail number. Level 0 is the base image
22001 level. Level N is the Nth mipmap reduction image.
22002
22003 XOFFSET
22004 Specifies a texel offset in the x direction within the texture
22005 array.
22006
22007 WIDTH
22008 Specifies the width of the texture subimage.
22009
22010 FORMAT
22011 Specifies the format of the pixel data. The following symbolic
22012 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
22013 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
22014 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
22015
22016 TYPE
22017 Specifies the data type of the pixel data. The following symbolic
22018 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
22019 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
22020 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22021 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
22022 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22023 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22024 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22025 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
22026
22027 DATA
22028 Specifies a pointer to the image data in memory.
22029
22030 Texturing maps a portion of a specified texture image onto each
22031 graphical primitive for which texturing is enabled. To enable or disable
22032 one-dimensional texturing, call `glEnable' and `glDisable' with argument
22033 `GL_TEXTURE_1D'.
22034
22035 `glTexSubImage1D' redefines a contiguous subregion of an existing
22036 one-dimensional texture image. The texels referenced by DATA replace the
22037 portion of the existing texture array with x indices XOFFSET and
22038 XOFFSET+WIDTH-1 , inclusive. This region may not include any texels
22039 outside the range of the texture array as it was originally specified.
22040 It is not an error to specify a subtexture with width of 0, but such a
22041 specification has no effect.
22042
22043 If a non-zero named buffer object is bound to the
22044 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
22045 image is specified, DATA is treated as a byte offset into the buffer
22046 object's data store.
22047
22048 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
22049 values.
22050
22051 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
22052 constant.
22053
22054 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
22055
22056 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
22057 `GL_COLOR_INDEX'.
22058
22059 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
22060
22061 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
22062 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
22063
22064 `GL_INVALID_VALUE' is generated if XOFFSET<-B , or if
22065 (XOFFSET+WIDTH,)>(W-B,) , where W is the `GL_TEXTURE_WIDTH', and B is
22066 the width of the `GL_TEXTURE_BORDER' of the texture image being
22067 modified. Note that W includes twice the border width.
22068
22069 `GL_INVALID_VALUE' is generated if WIDTH is less than 0.
22070
22071 `GL_INVALID_OPERATION' is generated if the texture array has not been
22072 defined by a previous `glTexImage1D' operation.
22073
22074 `GL_INVALID_OPERATION' is generated if TYPE is one of
22075 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22076 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
22077 is not `GL_RGB'.
22078
22079 `GL_INVALID_OPERATION' is generated if TYPE is one of
22080 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22081 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22082 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22083 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
22084 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
22085
22086 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22087 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
22088 data store is currently mapped.
22089
22090 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22091 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
22092 unpacked from the buffer object such that the memory reads required
22093 would exceed the data store size.
22094
22095 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22096 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
22097 divisible into the number of bytes needed to store in memory a datum
22098 indicated by TYPE.
22099
22100 `GL_INVALID_OPERATION' is generated if `glTexSubImage1D' is executed
22101 between the execution of `glBegin' and the corresponding execution of
22102 `glEnd'.")
22103
22104 (define-gl-procedures
22105 ((glTexSubImage2D
22106 (target GLenum)
22107 (level GLint)
22108 (xoffset GLint)
22109 (yoffset GLint)
22110 (width GLsizei)
22111 (height GLsizei)
22112 (format GLenum)
22113 (type GLenum)
22114 (data const-GLvoid-*)
22115 ->
22116 void))
22117 "Specify a two-dimensional texture subimage.
22118
22119 TARGET
22120 Specifies the target texture. Must be `GL_TEXTURE_2D',
22121 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
22122 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
22123 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
22124 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
22125
22126 LEVEL
22127 Specifies the level-of-detail number. Level 0 is the base image
22128 level. Level N is the Nth mipmap reduction image.
22129
22130 XOFFSET
22131 Specifies a texel offset in the x direction within the texture
22132 array.
22133
22134 YOFFSET
22135 Specifies a texel offset in the y direction within the texture
22136 array.
22137
22138 WIDTH
22139 Specifies the width of the texture subimage.
22140
22141 HEIGHT
22142 Specifies the height of the texture subimage.
22143
22144 FORMAT
22145 Specifies the format of the pixel data. The following symbolic
22146 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
22147 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
22148 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
22149
22150 TYPE
22151 Specifies the data type of the pixel data. The following symbolic
22152 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
22153 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
22154 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22155 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
22156 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22157 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22158 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22159 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
22160
22161 DATA
22162 Specifies a pointer to the image data in memory.
22163
22164 Texturing maps a portion of a specified texture image onto each
22165 graphical primitive for which texturing is enabled. To enable and
22166 disable two-dimensional texturing, call `glEnable' and `glDisable' with
22167 argument `GL_TEXTURE_2D'.
22168
22169 `glTexSubImage2D' redefines a contiguous subregion of an existing
22170 two-dimensional texture image. The texels referenced by DATA replace the
22171 portion of the existing texture array with x indices XOFFSET and
22172 XOFFSET+WIDTH-1 , inclusive, and y indices YOFFSET and YOFFSET+HEIGHT-1
22173 , inclusive. This region may not include any texels outside the range of
22174 the texture array as it was originally specified. It is not an error to
22175 specify a subtexture with zero width or height, but such a specification
22176 has no effect.
22177
22178 If a non-zero named buffer object is bound to the
22179 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
22180 image is specified, DATA is treated as a byte offset into the buffer
22181 object's data store.
22182
22183 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
22184 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
22185 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
22186 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
22187
22188 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
22189 constant.
22190
22191 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
22192
22193 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
22194 `GL_COLOR_INDEX'.
22195
22196 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
22197
22198 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
22199 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
22200
22201 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
22202 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , where W is the
22203 `GL_TEXTURE_WIDTH', H is the `GL_TEXTURE_HEIGHT', and B is the border
22204 width of the texture image being modified. Note that W and H include
22205 twice the border width.
22206
22207 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0.
22208
22209 `GL_INVALID_OPERATION' is generated if the texture array has not been
22210 defined by a previous `glTexImage2D' operation.
22211
22212 `GL_INVALID_OPERATION' is generated if TYPE is one of
22213 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22214 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
22215 is not `GL_RGB'.
22216
22217 `GL_INVALID_OPERATION' is generated if TYPE is one of
22218 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22219 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22220 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22221 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
22222 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
22223
22224 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22225 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
22226 data store is currently mapped.
22227
22228 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22229 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
22230 unpacked from the buffer object such that the memory reads required
22231 would exceed the data store size.
22232
22233 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22234 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
22235 divisible into the number of bytes needed to store in memory a datum
22236 indicated by TYPE.
22237
22238 `GL_INVALID_OPERATION' is generated if `glTexSubImage2D' is executed
22239 between the execution of `glBegin' and the corresponding execution of
22240 `glEnd'.")
22241
22242 (define-gl-procedures
22243 ((glTexSubImage3D
22244 (target GLenum)
22245 (level GLint)
22246 (xoffset GLint)
22247 (yoffset GLint)
22248 (zoffset GLint)
22249 (width GLsizei)
22250 (height GLsizei)
22251 (depth GLsizei)
22252 (format GLenum)
22253 (type GLenum)
22254 (data const-GLvoid-*)
22255 ->
22256 void))
22257 "Specify a three-dimensional texture subimage.
22258
22259 TARGET
22260 Specifies the target texture. Must be `GL_TEXTURE_3D'.
22261
22262 LEVEL
22263 Specifies the level-of-detail number. Level 0 is the base image
22264 level. Level N is the Nth mipmap reduction image.
22265
22266 XOFFSET
22267 Specifies a texel offset in the x direction within the texture
22268 array.
22269
22270 YOFFSET
22271 Specifies a texel offset in the y direction within the texture
22272 array.
22273
22274 ZOFFSET
22275 Specifies a texel offset in the z direction within the texture
22276 array.
22277
22278 WIDTH
22279 Specifies the width of the texture subimage.
22280
22281 HEIGHT
22282 Specifies the height of the texture subimage.
22283
22284 DEPTH
22285 Specifies the depth of the texture subimage.
22286
22287 FORMAT
22288 Specifies the format of the pixel data. The following symbolic
22289 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
22290 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
22291 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
22292
22293 TYPE
22294 Specifies the data type of the pixel data. The following symbolic
22295 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
22296 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
22297 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22298 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
22299 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22300 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22301 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22302 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
22303
22304 DATA
22305 Specifies a pointer to the image data in memory.
22306
22307 Texturing maps a portion of a specified texture image onto each
22308 graphical primitive for which texturing is enabled. To enable and
22309 disable three-dimensional texturing, call `glEnable' and `glDisable'
22310 with argument `GL_TEXTURE_3D'.
22311
22312 `glTexSubImage3D' redefines a contiguous subregion of an existing
22313 three-dimensional texture image. The texels referenced by DATA replace
22314 the portion of the existing texture array with x indices XOFFSET and
22315 XOFFSET+WIDTH-1 , inclusive, y indices YOFFSET and YOFFSET+HEIGHT-1 ,
22316 inclusive, and z indices ZOFFSET and ZOFFSET+DEPTH-1 , inclusive. This
22317 region may not include any texels outside the range of the texture array
22318 as it was originally specified. It is not an error to specify a
22319 subtexture with zero width, height, or depth but such a specification
22320 has no effect.
22321
22322 If a non-zero named buffer object is bound to the
22323 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
22324 image is specified, DATA is treated as a byte offset into the buffer
22325 object's data store.
22326
22327 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_3D'.
22328
22329 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
22330 constant.
22331
22332 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
22333
22334 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
22335 `GL_COLOR_INDEX'.
22336
22337 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
22338
22339 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
22340 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
22341
22342 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
22343 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , or ZOFFSET<-B , or
22344 (ZOFFSET+DEPTH,)>(D-B,) , where W is the `GL_TEXTURE_WIDTH', H is the
22345 `GL_TEXTURE_HEIGHT', D is the `GL_TEXTURE_DEPTH' and B is the border
22346 width of the texture image being modified. Note that W , H , and D
22347 include twice the border width.
22348
22349 `GL_INVALID_VALUE' is generated if WIDTH, HEIGHT, or DEPTH is less than
22350 0.
22351
22352 `GL_INVALID_OPERATION' is generated if the texture array has not been
22353 defined by a previous `glTexImage3D' operation.
22354
22355 `GL_INVALID_OPERATION' is generated if TYPE is one of
22356 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22357 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
22358 is not `GL_RGB'.
22359
22360 `GL_INVALID_OPERATION' is generated if TYPE is one of
22361 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22362 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22363 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22364 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
22365 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
22366
22367 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22368 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
22369 data store is currently mapped.
22370
22371 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22372 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
22373 unpacked from the buffer object such that the memory reads required
22374 would exceed the data store size.
22375
22376 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22377 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
22378 divisible into the number of bytes needed to store in memory a datum
22379 indicated by TYPE.
22380
22381 `GL_INVALID_OPERATION' is generated if `glTexSubImage3D' is executed
22382 between the execution of `glBegin' and the corresponding execution of
22383 `glEnd'.")
22384
22385 (define-gl-procedures
22386 ((glTranslated
22387 (x GLdouble)
22388 (y GLdouble)
22389 (z GLdouble)
22390 ->
22391 void)
22392 (glTranslatef
22393 (x GLfloat)
22394 (y GLfloat)
22395 (z GLfloat)
22396 ->
22397 void))
22398 "Multiply the current matrix by a translation matrix.
22399
22400 X
22401 Y
22402
22403 Z
22404
22405 Specify the X, Y, and Z coordinates of a translation vector.
22406
22407 `glTranslate' produces a translation by (X,YZ) . The current matrix (see
22408 `glMatrixMode') is multiplied by this translation matrix, with the
22409 product replacing the current matrix, as if `glMultMatrix' were called
22410 with the following matrix for its argument:
22411
22412 ((1 0 0 X), (0 1 0 Y), (0 0 1 Z), (0 0 0 1),)
22413
22414
22415
22416 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
22417 objects drawn after a call to `glTranslate' are translated.
22418
22419 Use `glPushMatrix' and `glPopMatrix' to save and restore the
22420 untranslated coordinate system.
22421
22422 `GL_INVALID_OPERATION' is generated if `glTranslate' is executed between
22423 the execution of `glBegin' and the corresponding execution of `glEnd'.")
22424
22425 (define-gl-procedures
22426 ((glUniform1f
22427 (location GLint)
22428 (v0 GLfloat)
22429 ->
22430 void)
22431 (glUniform2f
22432 (location GLint)
22433 (v0 GLfloat)
22434 (v1 GLfloat)
22435 ->
22436 void)
22437 (glUniform3f
22438 (location GLint)
22439 (v0 GLfloat)
22440 (v1 GLfloat)
22441 (v2 GLfloat)
22442 ->
22443 void)
22444 (glUniform4f
22445 (location GLint)
22446 (v0 GLfloat)
22447 (v1 GLfloat)
22448 (v2 GLfloat)
22449 (v3 GLfloat)
22450 ->
22451 void)
22452 (glUniform1i (location GLint) (v0 GLint) -> void)
22453 (glUniform2i
22454 (location GLint)
22455 (v0 GLint)
22456 (v1 GLint)
22457 ->
22458 void)
22459 (glUniform3i
22460 (location GLint)
22461 (v0 GLint)
22462 (v1 GLint)
22463 (v2 GLint)
22464 ->
22465 void)
22466 (glUniform4i
22467 (location GLint)
22468 (v0 GLint)
22469 (v1 GLint)
22470 (v2 GLint)
22471 (v3 GLint)
22472 ->
22473 void)
22474 (glUniform1fv
22475 (location GLint)
22476 (count GLsizei)
22477 (value const-GLfloat-*)
22478 ->
22479 void)
22480 (glUniform2fv
22481 (location GLint)
22482 (count GLsizei)
22483 (value const-GLfloat-*)
22484 ->
22485 void)
22486 (glUniform3fv
22487 (location GLint)
22488 (count GLsizei)
22489 (value const-GLfloat-*)
22490 ->
22491 void)
22492 (glUniform4fv
22493 (location GLint)
22494 (count GLsizei)
22495 (value const-GLfloat-*)
22496 ->
22497 void)
22498 (glUniform1iv
22499 (location GLint)
22500 (count GLsizei)
22501 (value const-GLint-*)
22502 ->
22503 void)
22504 (glUniform2iv
22505 (location GLint)
22506 (count GLsizei)
22507 (value const-GLint-*)
22508 ->
22509 void)
22510 (glUniform3iv
22511 (location GLint)
22512 (count GLsizei)
22513 (value const-GLint-*)
22514 ->
22515 void)
22516 (glUniform4iv
22517 (location GLint)
22518 (count GLsizei)
22519 (value const-GLint-*)
22520 ->
22521 void)
22522 (glUniformMatrix2fv
22523 (location GLint)
22524 (count GLsizei)
22525 (transpose GLboolean)
22526 (value const-GLfloat-*)
22527 ->
22528 void)
22529 (glUniformMatrix3fv
22530 (location GLint)
22531 (count GLsizei)
22532 (transpose GLboolean)
22533 (value const-GLfloat-*)
22534 ->
22535 void)
22536 (glUniformMatrix4fv
22537 (location GLint)
22538 (count GLsizei)
22539 (transpose GLboolean)
22540 (value const-GLfloat-*)
22541 ->
22542 void)
22543 (glUniformMatrix2x3fv
22544 (location GLint)
22545 (count GLsizei)
22546 (transpose GLboolean)
22547 (value const-GLfloat-*)
22548 ->
22549 void)
22550 (glUniformMatrix3x2fv
22551 (location GLint)
22552 (count GLsizei)
22553 (transpose GLboolean)
22554 (value const-GLfloat-*)
22555 ->
22556 void)
22557 (glUniformMatrix2x4fv
22558 (location GLint)
22559 (count GLsizei)
22560 (transpose GLboolean)
22561 (value const-GLfloat-*)
22562 ->
22563 void)
22564 (glUniformMatrix4x2fv
22565 (location GLint)
22566 (count GLsizei)
22567 (transpose GLboolean)
22568 (value const-GLfloat-*)
22569 ->
22570 void)
22571 (glUniformMatrix3x4fv
22572 (location GLint)
22573 (count GLsizei)
22574 (transpose GLboolean)
22575 (value const-GLfloat-*)
22576 ->
22577 void)
22578 (glUniformMatrix4x3fv
22579 (location GLint)
22580 (count GLsizei)
22581 (transpose GLboolean)
22582 (value const-GLfloat-*)
22583 ->
22584 void))
22585 "Specify the value of a uniform variable for the current program object.
22586
22587 LOCATION
22588 Specifies the location of the uniform variable to be modified.
22589
22590 V0, V1, V2, V3
22591 Specifies the new values to be used for the specified uniform
22592 variable.
22593
22594 `glUniform' modifies the value of a uniform variable or a uniform
22595 variable array. The location of the uniform variable to be modified is
22596 specified by LOCATION, which should be a value returned by
22597 `glGetUniformLocation'. `glUniform' operates on the program object that
22598 was made part of current state by calling `glUseProgram'.
22599
22600 The commands `glUniform{1|2|3|4}{f|i}' are used to change the value of
22601 the uniform variable specified by LOCATION using the values passed as
22602 arguments. The number specified in the command should match the number
22603 of components in the data type of the specified uniform variable (e.g.,
22604 `1' for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The suffix
22605 `f' indicates that floating-point values are being passed; the suffix
22606 `i' indicates that integer values are being passed, and this type should
22607 also match the data type of the specified uniform variable. The `i'
22608 variants of this function should be used to provide values for uniform
22609 variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The
22610 `f' variants should be used to provide values for uniform variables of
22611 type float, vec2, vec3, vec4, or arrays of these. Either the `i' or the
22612 `f' variants may be used to provide values for uniform variables of type
22613 bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable will
22614 be set to false if the input value is 0 or 0.0f, and it will be set to
22615 true otherwise.
22616
22617 All active uniform variables defined in a program object are initialized
22618 to 0 when the program object is linked successfully. They retain the
22619 values assigned to them by a call to `glUniform ' until the next
22620 successful link operation occurs on the program object, when they are
22621 once again initialized to 0.
22622
22623 The commands `glUniform{1|2|3|4}{f|i}v' can be used to modify a single
22624 uniform variable or a uniform variable array. These commands pass a
22625 count and a pointer to the values to be loaded into a uniform variable
22626 or a uniform variable array. A count of 1 should be used if modifying
22627 the value of a single uniform variable, and a count of 1 or greater can
22628 be used to modify an entire array or part of an array. When loading N
22629 elements starting at an arbitrary position M in a uniform variable
22630 array, elements M + N - 1 in the array will be replaced with the new
22631 values. If M + N - 1 is larger than the size of the uniform variable
22632 array, values for all array elements beyond the end of the array will be
22633 ignored. The number specified in the name of the command indicates the
22634 number of components for each element in VALUE, and it should match the
22635 number of components in the data type of the specified uniform variable
22636 (e.g., `1' for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The
22637 data type specified in the name of the command must match the data type
22638 for the specified uniform variable as described previously for
22639 `glUniform{1|2|3|4}{f|i}'.
22640
22641 For uniform variable arrays, each element of the array is considered to
22642 be of the type indicated in the name of the command (e.g., `glUniform3f'
22643 or `glUniform3fv' can be used to load a uniform variable array of type
22644 vec3). The number of elements of the uniform variable array to be
22645 modified is specified by COUNT
22646
22647 The commands `glUniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv' are used
22648 to modify a matrix or an array of matrices. The numbers in the command
22649 name are interpreted as the dimensionality of the matrix. The number `2'
22650 indicates a 2 × 2 matrix (i.e., 4 values), the number `3' indicates a 3
22651 × 3 matrix (i.e., 9 values), and the number `4' indicates a 4 × 4 matrix
22652 (i.e., 16 values). Non-square matrix dimensionality is explicit, with
22653 the first number representing the number of columns and the second
22654 number representing the number of rows. For example, `2x4' indicates a 2
22655 × 4 matrix with 2 columns and 4 rows (i.e., 8 values). If TRANSPOSE is
22656 `GL_FALSE', each matrix is assumed to be supplied in column major order.
22657 If TRANSPOSE is `GL_TRUE', each matrix is assumed to be supplied in row
22658 major order. The COUNT argument indicates the number of matrices to be
22659 passed. A count of 1 should be used if modifying the value of a single
22660 matrix, and a count greater than 1 can be used to modify an array of
22661 matrices.
22662
22663 `GL_INVALID_OPERATION' is generated if there is no current program
22664 object.
22665
22666 `GL_INVALID_OPERATION' is generated if the size of the uniform variable
22667 declared in the shader does not match the size indicated by the
22668 `glUniform' command.
22669
22670 `GL_INVALID_OPERATION' is generated if one of the integer variants of
22671 this function is used to load a uniform variable of type float, vec2,
22672 vec3, vec4, or an array of these, or if one of the floating-point
22673 variants of this function is used to load a uniform variable of type
22674 int, ivec2, ivec3, or ivec4, or an array of these.
22675
22676 `GL_INVALID_OPERATION' is generated if LOCATION is an invalid uniform
22677 location for the current program object and LOCATION is not equal to -1.
22678
22679 `GL_INVALID_VALUE' is generated if COUNT is less than 0.
22680
22681 `GL_INVALID_OPERATION' is generated if COUNT is greater than 1 and the
22682 indicated uniform variable is not an array variable.
22683
22684 `GL_INVALID_OPERATION' is generated if a sampler is loaded using a
22685 command other than `glUniform1i' and `glUniform1iv'.
22686
22687 `GL_INVALID_OPERATION' is generated if `glUniform' is executed between
22688 the execution of `glBegin' and the corresponding execution of `glEnd'.")
22689
22690 (define-gl-procedures
22691 ((glUseProgram (program GLuint) -> void))
22692 "Installs a program object as part of current rendering state.
22693
22694 PROGRAM
22695 Specifies the handle of the program object whose executables are to
22696 be used as part of current rendering state.
22697
22698 `glUseProgram' installs the program object specified by PROGRAM as part
22699 of current rendering state. One or more executables are created in a
22700 program object by successfully attaching shader objects to it with
22701 `glAttachShader', successfully compiling the shader objects with
22702 `glCompileShader', and successfully linking the program object with
22703 `glLinkProgram'.
22704
22705 A program object will contain an executable that will run on the vertex
22706 processor if it contains one or more shader objects of type
22707 `GL_VERTEX_SHADER' that have been successfully compiled and linked.
22708 Similarly, a program object will contain an executable that will run on
22709 the fragment processor if it contains one or more shader objects of type
22710 `GL_FRAGMENT_SHADER' that have been successfully compiled and linked.
22711
22712 Successfully installing an executable on a programmable processor will
22713 cause the corresponding fixed functionality of OpenGL to be disabled.
22714 Specifically, if an executable is installed on the vertex processor, the
22715 OpenGL fixed functionality will be disabled as follows.
22716
22717 * The projection matrix is not applied to vertex coordinates.
22718
22719 * The texture matrices are not applied to texture coordinates.
22720
22721 * Normals are not transformed to eye coordinates.
22722
22723 * Normals are not rescaled or normalized.
22724
22725 * Normalization of `GL_AUTO_NORMAL' evaluated normals is not
22726 performed.
22727
22728 * Texture coordinates are not generated automatically.
22729
22730 * Per-vertex lighting is not performed.
22731
22732 * Color material computations are not performed.
22733
22734 * Color index lighting is not performed.
22735
22736 * This list also applies when setting the current raster position.
22737
22738 The executable that is installed on the vertex processor is expected to
22739 implement any or all of the desired functionality from the preceding
22740 list. Similarly, if an executable is installed on the fragment
22741 processor, the OpenGL fixed functionality will be disabled as follows.
22742
22743 * Texture application is not applied.
22744
22745 * Color sum is not applied.
22746
22747 * Fog is not applied.
22748
22749 Again, the fragment shader that is installed is expected to implement
22750 any or all of the desired functionality from the preceding list.
22751
22752 While a program object is in use, applications are free to modify
22753 attached shader objects, compile attached shader objects, attach
22754 additional shader objects, and detach or delete shader objects. None of
22755 these operations will affect the executables that are part of the
22756 current state. However, relinking the program object that is currently
22757 in use will install the program object as part of the current rendering
22758 state if the link operation was successful (see `glLinkProgram' ). If
22759 the program object currently in use is relinked unsuccessfully, its link
22760 status will be set to `GL_FALSE', but the executables and associated
22761 state will remain part of the current state until a subsequent call to
22762 `glUseProgram' removes it from use. After it is removed from use, it
22763 cannot be made part of current state until it has been successfully
22764 relinked.
22765
22766 If PROGRAM contains shader objects of type `GL_VERTEX_SHADER' but it
22767 does not contain shader objects of type `GL_FRAGMENT_SHADER', an
22768 executable will be installed on the vertex processor, but fixed
22769 functionality will be used for fragment processing. Similarly, if
22770 PROGRAM contains shader objects of type `GL_FRAGMENT_SHADER' but it does
22771 not contain shader objects of type `GL_VERTEX_SHADER', an executable
22772 will be installed on the fragment processor, but fixed functionality
22773 will be used for vertex processing. If PROGRAM is 0, the programmable
22774 processors will be disabled, and fixed functionality will be used for
22775 both vertex and fragment processing.
22776
22777 `GL_INVALID_VALUE' is generated if PROGRAM is neither 0 nor a value
22778 generated by OpenGL.
22779
22780 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
22781
22782 `GL_INVALID_OPERATION' is generated if PROGRAM could not be made part of
22783 current state.
22784
22785 `GL_INVALID_OPERATION' is generated if `glUseProgram' is executed
22786 between the execution of `glBegin' and the corresponding execution of
22787 `glEnd'.")
22788
22789 (define-gl-procedures
22790 ((glValidateProgram (program GLuint) -> void))
22791 "Validates a program object.
22792
22793 PROGRAM
22794 Specifies the handle of the program object to be validated.
22795
22796 `glValidateProgram' checks to see whether the executables contained in
22797 PROGRAM can execute given the current OpenGL state. The information
22798 generated by the validation process will be stored in PROGRAM's
22799 information log. The validation information may consist of an empty
22800 string, or it may be a string containing information about how the
22801 current program object interacts with the rest of current OpenGL state.
22802 This provides a way for OpenGL implementers to convey more information
22803 about why the current program is inefficient, suboptimal, failing to
22804 execute, and so on.
22805
22806 The status of the validation operation will be stored as part of the
22807 program object's state. This value will be set to `GL_TRUE' if the
22808 validation succeeded, and `GL_FALSE' otherwise. It can be queried by
22809 calling `glGetProgram' with arguments PROGRAM and `GL_VALIDATE_STATUS'.
22810 If validation is successful, PROGRAM is guaranteed to execute given the
22811 current state. Otherwise, PROGRAM is guaranteed to not execute.
22812
22813 This function is typically useful only during application development.
22814 The informational string stored in the information log is completely
22815 implementation dependent; therefore, an application should not expect
22816 different OpenGL implementations to produce identical information
22817 strings.
22818
22819 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
22820 OpenGL.
22821
22822 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
22823
22824 `GL_INVALID_OPERATION' is generated if `glValidateProgram' is executed
22825 between the execution of `glBegin' and the corresponding execution of
22826 `glEnd'.")
22827
22828 (define-gl-procedures
22829 ((glVertexAttribPointer
22830 (index GLuint)
22831 (size GLint)
22832 (type GLenum)
22833 (normalized GLboolean)
22834 (stride GLsizei)
22835 (pointer const-GLvoid-*)
22836 ->
22837 void))
22838 "Define an array of generic vertex attribute data.
22839
22840 INDEX
22841 Specifies the index of the generic vertex attribute to be modified.
22842
22843 SIZE
22844 Specifies the number of components per generic vertex attribute.
22845 Must be 1, 2, 3, or 4. The initial value is 4.
22846
22847 TYPE
22848 Specifies the data type of each component in the array. Symbolic
22849 constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
22850 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', or
22851 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
22852
22853 NORMALIZED
22854 Specifies whether fixed-point data values should be normalized
22855 (`GL_TRUE') or converted directly as fixed-point values
22856 (`GL_FALSE') when they are accessed.
22857
22858 STRIDE
22859 Specifies the byte offset between consecutive generic vertex
22860 attributes. If STRIDE is 0, the generic vertex attributes are
22861 understood to be tightly packed in the array. The initial value is
22862 0.
22863
22864 POINTER
22865 Specifies a pointer to the first component of the first generic
22866 vertex attribute in the array. The initial value is 0.
22867
22868 `glVertexAttribPointer' specifies the location and data format of the
22869 array of generic vertex attributes at index INDEX to use when rendering.
22870 SIZE specifies the number of components per attribute and must be 1, 2,
22871 3, or 4. TYPE specifies the data type of each component, and STRIDE
22872 specifies the byte stride from one attribute to the next, allowing
22873 vertices and attributes to be packed into a single array or stored in
22874 separate arrays. If set to `GL_TRUE', NORMALIZED indicates that values
22875 stored in an integer format are to be mapped to the range [-1,1] (for
22876 signed values) or [0,1] (for unsigned values) when they are accessed and
22877 converted to floating point. Otherwise, values will be converted to
22878 floats directly without normalization.
22879
22880 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
22881 target (see `glBindBuffer') while a generic vertex attribute array is
22882 specified, POINTER is treated as a byte offset into the buffer object's
22883 data store. Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING')
22884 is saved as generic vertex attribute array client-side state
22885 (`GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING') for index INDEX.
22886
22887 When a generic vertex attribute array is specified, SIZE, TYPE,
22888 NORMALIZED, STRIDE, and POINTER are saved as client-side state, in
22889 addition to the current vertex array buffer object binding.
22890
22891 To enable and disable a generic vertex attribute array, call
22892 `glEnableVertexAttribArray' and `glDisableVertexAttribArray' with INDEX.
22893 If enabled, the generic vertex attribute array is used when
22894 `glArrayElement', `glDrawArrays', `glMultiDrawArrays', `glDrawElements',
22895 `glMultiDrawElements', or `glDrawRangeElements' is called.
22896
22897 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
22898 `GL_MAX_VERTEX_ATTRIBS'.
22899
22900 `GL_INVALID_VALUE' is generated if SIZE is not 1, 2, 3, or 4.
22901
22902 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
22903
22904 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
22905
22906 (define-gl-procedures
22907 ((glVertexAttrib1f
22908 (index GLuint)
22909 (v0 GLfloat)
22910 ->
22911 void)
22912 (glVertexAttrib1s
22913 (index GLuint)
22914 (v0 GLshort)
22915 ->
22916 void)
22917 (glVertexAttrib1d
22918 (index GLuint)
22919 (v0 GLdouble)
22920 ->
22921 void)
22922 (glVertexAttrib2f
22923 (index GLuint)
22924 (v0 GLfloat)
22925 (v1 GLfloat)
22926 ->
22927 void)
22928 (glVertexAttrib2s
22929 (index GLuint)
22930 (v0 GLshort)
22931 (v1 GLshort)
22932 ->
22933 void)
22934 (glVertexAttrib2d
22935 (index GLuint)
22936 (v0 GLdouble)
22937 (v1 GLdouble)
22938 ->
22939 void)
22940 (glVertexAttrib3f
22941 (index GLuint)
22942 (v0 GLfloat)
22943 (v1 GLfloat)
22944 (v2 GLfloat)
22945 ->
22946 void)
22947 (glVertexAttrib3s
22948 (index GLuint)
22949 (v0 GLshort)
22950 (v1 GLshort)
22951 (v2 GLshort)
22952 ->
22953 void)
22954 (glVertexAttrib3d
22955 (index GLuint)
22956 (v0 GLdouble)
22957 (v1 GLdouble)
22958 (v2 GLdouble)
22959 ->
22960 void)
22961 (glVertexAttrib4f
22962 (index GLuint)
22963 (v0 GLfloat)
22964 (v1 GLfloat)
22965 (v2 GLfloat)
22966 (v3 GLfloat)
22967 ->
22968 void)
22969 (glVertexAttrib4s
22970 (index GLuint)
22971 (v0 GLshort)
22972 (v1 GLshort)
22973 (v2 GLshort)
22974 (v3 GLshort)
22975 ->
22976 void)
22977 (glVertexAttrib4d
22978 (index GLuint)
22979 (v0 GLdouble)
22980 (v1 GLdouble)
22981 (v2 GLdouble)
22982 (v3 GLdouble)
22983 ->
22984 void)
22985 (glVertexAttrib4Nub
22986 (index GLuint)
22987 (v0 GLubyte)
22988 (v1 GLubyte)
22989 (v2 GLubyte)
22990 (v3 GLubyte)
22991 ->
22992 void)
22993 (glVertexAttrib1fv
22994 (index GLuint)
22995 (v const-GLfloat-*)
22996 ->
22997 void)
22998 (glVertexAttrib1sv
22999 (index GLuint)
23000 (v const-GLshort-*)
23001 ->
23002 void)
23003 (glVertexAttrib1dv
23004 (index GLuint)
23005 (v const-GLdouble-*)
23006 ->
23007 void)
23008 (glVertexAttrib2fv
23009 (index GLuint)
23010 (v const-GLfloat-*)
23011 ->
23012 void)
23013 (glVertexAttrib2sv
23014 (index GLuint)
23015 (v const-GLshort-*)
23016 ->
23017 void)
23018 (glVertexAttrib2dv
23019 (index GLuint)
23020 (v const-GLdouble-*)
23021 ->
23022 void)
23023 (glVertexAttrib3fv
23024 (index GLuint)
23025 (v const-GLfloat-*)
23026 ->
23027 void)
23028 (glVertexAttrib3sv
23029 (index GLuint)
23030 (v const-GLshort-*)
23031 ->
23032 void)
23033 (glVertexAttrib3dv
23034 (index GLuint)
23035 (v const-GLdouble-*)
23036 ->
23037 void)
23038 (glVertexAttrib4fv
23039 (index GLuint)
23040 (v const-GLfloat-*)
23041 ->
23042 void)
23043 (glVertexAttrib4sv
23044 (index GLuint)
23045 (v const-GLshort-*)
23046 ->
23047 void)
23048 (glVertexAttrib4dv
23049 (index GLuint)
23050 (v const-GLdouble-*)
23051 ->
23052 void)
23053 (glVertexAttrib4iv
23054 (index GLuint)
23055 (v const-GLint-*)
23056 ->
23057 void)
23058 (glVertexAttrib4bv
23059 (index GLuint)
23060 (v const-GLbyte-*)
23061 ->
23062 void)
23063 (glVertexAttrib4ubv
23064 (index GLuint)
23065 (v const-GLubyte-*)
23066 ->
23067 void)
23068 (glVertexAttrib4usv
23069 (index GLuint)
23070 (v const-GLushort-*)
23071 ->
23072 void)
23073 (glVertexAttrib4uiv
23074 (index GLuint)
23075 (v const-GLuint-*)
23076 ->
23077 void)
23078 (glVertexAttrib4Nbv
23079 (index GLuint)
23080 (v const-GLbyte-*)
23081 ->
23082 void)
23083 (glVertexAttrib4Nsv
23084 (index GLuint)
23085 (v const-GLshort-*)
23086 ->
23087 void)
23088 (glVertexAttrib4Niv
23089 (index GLuint)
23090 (v const-GLint-*)
23091 ->
23092 void)
23093 (glVertexAttrib4Nubv
23094 (index GLuint)
23095 (v const-GLubyte-*)
23096 ->
23097 void)
23098 (glVertexAttrib4Nusv
23099 (index GLuint)
23100 (v const-GLushort-*)
23101 ->
23102 void)
23103 (glVertexAttrib4Nuiv
23104 (index GLuint)
23105 (v const-GLuint-*)
23106 ->
23107 void))
23108 "Specifies the value of a generic vertex attribute.
23109
23110 INDEX
23111 Specifies the index of the generic vertex attribute to be modified.
23112
23113 V0, V1, V2, V3
23114 Specifies the new values to be used for the specified vertex
23115 attribute.
23116
23117 OpenGL defines a number of standard vertex attributes that applications
23118 can modify with standard API entry points (color, normal, texture
23119 coordinates, etc.). The `glVertexAttrib' family of entry points allows
23120 an application to pass generic vertex attributes in numbered locations.
23121
23122 Generic attributes are defined as four-component values that are
23123 organized into an array. The first entry of this array is numbered 0,
23124 and the size of the array is specified by the implementation-dependent
23125 constant `GL_MAX_VERTEX_ATTRIBS'. Individual elements of this array can
23126 be modified with a `glVertexAttrib' call that specifies the index of the
23127 element to be modified and a value for that element.
23128
23129 These commands can be used to specify one, two, three, or all four
23130 components of the generic vertex attribute specified by INDEX. A `1' in
23131 the name of the command indicates that only one value is passed, and it
23132 will be used to modify the first component of the generic vertex
23133 attribute. The second and third components will be set to 0, and the
23134 fourth component will be set to 1. Similarly, a `2' in the name of the
23135 command indicates that values are provided for the first two components,
23136 the third component will be set to 0, and the fourth component will be
23137 set to 1. A `3' in the name of the command indicates that values are
23138 provided for the first three components and the fourth component will be
23139 set to 1, whereas a `4' in the name indicates that values are provided
23140 for all four components.
23141
23142 The letters `s', `f', `i', `d', `ub', `us', and `ui' indicate whether
23143 the arguments are of type short, float, int, double, unsigned byte,
23144 unsigned short, or unsigned int. When `v' is appended to the name, the
23145 commands can take a pointer to an array of such values. The commands
23146 containing `N' indicate that the arguments will be passed as fixed-point
23147 values that are scaled to a normalized range according to the component
23148 conversion rules defined by the OpenGL specification. Signed values are
23149 understood to represent fixed-point values in the range [-1,1], and
23150 unsigned values are understood to represent fixed-point values in the
23151 range [0,1].
23152
23153 OpenGL Shading Language attribute variables are allowed to be of type
23154 mat2, mat3, or mat4. Attributes of these types may be loaded using the
23155 `glVertexAttrib' entry points. Matrices must be loaded into successive
23156 generic attribute slots in column major order, with one column of the
23157 matrix in each generic attribute slot.
23158
23159 A user-defined attribute variable declared in a vertex shader can be
23160 bound to a generic attribute index by calling `glBindAttribLocation'.
23161 This allows an application to use more descriptive variable names in a
23162 vertex shader. A subsequent change to the specified generic vertex
23163 attribute will be immediately reflected as a change to the corresponding
23164 attribute variable in the vertex shader.
23165
23166 The binding between a generic vertex attribute index and a user-defined
23167 attribute variable in a vertex shader is part of the state of a program
23168 object, but the current value of the generic vertex attribute is not.
23169 The value of each generic vertex attribute is part of current state,
23170 just like standard vertex attributes, and it is maintained even if a
23171 different program object is used.
23172
23173 An application may freely modify generic vertex attributes that are not
23174 bound to a named vertex shader attribute variable. These values are
23175 simply maintained as part of current state and will not be accessed by
23176 the vertex shader. If a generic vertex attribute bound to an attribute
23177 variable in a vertex shader is not updated while the vertex shader is
23178 executing, the vertex shader will repeatedly use the current value for
23179 the generic vertex attribute.
23180
23181 The generic vertex attribute with index 0 is the same as the vertex
23182 position attribute previously defined by OpenGL. A `glVertex2',
23183 `glVertex3', or `glVertex4' command is completely equivalent to the
23184 corresponding `glVertexAttrib' command with an index argument of 0. A
23185 vertex shader can access generic vertex attribute 0 by using the
23186 built-in attribute variable GL_VERTEX. There are no current values for
23187 generic vertex attribute 0. This is the only generic vertex attribute
23188 with this property; calls to set other standard vertex attributes can be
23189 freely mixed with calls to set any of the other generic vertex
23190 attributes.
23191
23192 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
23193 `GL_MAX_VERTEX_ATTRIBS'.")
23194
23195 (define-gl-procedures
23196 ((glVertexPointer
23197 (size GLint)
23198 (type GLenum)
23199 (stride GLsizei)
23200 (pointer const-GLvoid-*)
23201 ->
23202 void))
23203 "Define an array of vertex data.
23204
23205 SIZE
23206 Specifies the number of coordinates per vertex. Must be 2, 3, or 4.
23207 The initial value is 4.
23208
23209 TYPE
23210 Specifies the data type of each coordinate in the array. Symbolic
23211 constants `GL_SHORT', `GL_INT', `GL_FLOAT', or `GL_DOUBLE' are
23212 accepted. The initial value is `GL_FLOAT'.
23213
23214 STRIDE
23215 Specifies the byte offset between consecutive vertices. If STRIDE
23216 is 0, the vertices are understood to be tightly packed in the
23217 array. The initial value is 0.
23218
23219 POINTER
23220 Specifies a pointer to the first coordinate of the first vertex in
23221 the array. The initial value is 0.
23222
23223 `glVertexPointer' specifies the location and data format of an array of
23224 vertex coordinates to use when rendering. SIZE specifies the number of
23225 coordinates per vertex, and must be 2, 3, or 4. TYPE specifies the data
23226 type of each coordinate, and STRIDE specifies the byte stride from one
23227 vertex to the next, allowing vertices and attributes to be packed into a
23228 single array or stored in separate arrays. (Single-array storage may be
23229 more efficient on some implementations; see `glInterleavedArrays'.)
23230
23231 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
23232 target (see `glBindBuffer') while a vertex array is specified, POINTER
23233 is treated as a byte offset into the buffer object's data store. Also,
23234 the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as vertex
23235 array client-side state (`GL_VERTEX_ARRAY_BUFFER_BINDING').
23236
23237 When a vertex array is specified, SIZE, TYPE, STRIDE, and POINTER are
23238 saved as client-side state, in addition to the current vertex array
23239 buffer object binding.
23240
23241 To enable and disable the vertex array, call `glEnableClientState' and
23242 `glDisableClientState' with the argument `GL_VERTEX_ARRAY'. If enabled,
23243 the vertex array is used when `glArrayElement', `glDrawArrays',
23244 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements', or
23245 `glDrawRangeElements' is called.
23246
23247 `GL_INVALID_VALUE' is generated if SIZE is not 2, 3, or 4.
23248
23249 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
23250
23251 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
23252
23253 (define-gl-procedures
23254 ((glVertex2s (x GLshort) (y GLshort) -> void)
23255 (glVertex2i (x GLint) (y GLint) -> void)
23256 (glVertex2f (x GLfloat) (y GLfloat) -> void)
23257 (glVertex2d (x GLdouble) (y GLdouble) -> void)
23258 (glVertex3s
23259 (x GLshort)
23260 (y GLshort)
23261 (z GLshort)
23262 ->
23263 void)
23264 (glVertex3i
23265 (x GLint)
23266 (y GLint)
23267 (z GLint)
23268 ->
23269 void)
23270 (glVertex3f
23271 (x GLfloat)
23272 (y GLfloat)
23273 (z GLfloat)
23274 ->
23275 void)
23276 (glVertex3d
23277 (x GLdouble)
23278 (y GLdouble)
23279 (z GLdouble)
23280 ->
23281 void)
23282 (glVertex4s
23283 (x GLshort)
23284 (y GLshort)
23285 (z GLshort)
23286 (w GLshort)
23287 ->
23288 void)
23289 (glVertex4i
23290 (x GLint)
23291 (y GLint)
23292 (z GLint)
23293 (w GLint)
23294 ->
23295 void)
23296 (glVertex4f
23297 (x GLfloat)
23298 (y GLfloat)
23299 (z GLfloat)
23300 (w GLfloat)
23301 ->
23302 void)
23303 (glVertex4d
23304 (x GLdouble)
23305 (y GLdouble)
23306 (z GLdouble)
23307 (w GLdouble)
23308 ->
23309 void)
23310 (glVertex2sv (v const-GLshort-*) -> void)
23311 (glVertex2iv (v const-GLint-*) -> void)
23312 (glVertex2fv (v const-GLfloat-*) -> void)
23313 (glVertex2dv (v const-GLdouble-*) -> void)
23314 (glVertex3sv (v const-GLshort-*) -> void)
23315 (glVertex3iv (v const-GLint-*) -> void)
23316 (glVertex3fv (v const-GLfloat-*) -> void)
23317 (glVertex3dv (v const-GLdouble-*) -> void)
23318 (glVertex4sv (v const-GLshort-*) -> void)
23319 (glVertex4iv (v const-GLint-*) -> void)
23320 (glVertex4fv (v const-GLfloat-*) -> void)
23321 (glVertex4dv (v const-GLdouble-*) -> void))
23322 "Specify a vertex.
23323
23324 X
23325 Y
23326
23327 Z
23328
23329 W
23330
23331 Specify X, Y, Z, and W coordinates of a vertex. Not all parameters
23332 are present in all forms of the command.
23333
23334 `glVertex' commands are used within `glBegin'/`glEnd' pairs to specify
23335 point, line, and polygon vertices. The current color, normal, texture
23336 coordinates, and fog coordinate are associated with the vertex when
23337 `glVertex' is called.
23338
23339 When only X and Y are specified, Z defaults to 0 and W defaults to 1.
23340 When X , Y , and Z are specified, W defaults to 1.")
23341
23342 (define-gl-procedures
23343 ((glViewport
23344 (x GLint)
23345 (y GLint)
23346 (width GLsizei)
23347 (height GLsizei)
23348 ->
23349 void))
23350 "Set the viewport.
23351
23352 X
23353 Y
23354
23355 Specify the lower left corner of the viewport rectangle, in pixels.
23356 The initial value is (0,0).
23357
23358 WIDTH
23359 HEIGHT
23360
23361 Specify the width and height of the viewport. When a GL context is
23362 first attached to a window, WIDTH and HEIGHT are set to the
23363 dimensions of that window.
23364
23365 `glViewport' specifies the affine transformation of X and Y from
23366 normalized device coordinates to window coordinates. Let (X_ND,Y_ND) be
23367 normalized device coordinates. Then the window coordinates (X_W,Y_W) are
23368 computed as follows:
23369
23370 X_W=(X_ND+1,)\u2062(WIDTH/2,)+X
23371
23372 Y_W=(Y_ND+1,)\u2062(HEIGHT/2,)+Y
23373
23374 Viewport width and height are silently clamped to a range that depends
23375 on the implementation. To query this range, call `glGet' with argument
23376 `GL_MAX_VIEWPORT_DIMS'.
23377
23378 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
23379
23380 `GL_INVALID_OPERATION' is generated if `glViewport' is executed between
23381 the execution of `glBegin' and the corresponding execution of `glEnd'.")
23382
23383 (define-gl-procedures
23384 ((glWindowPos2s (x GLshort) (y GLshort) -> void)
23385 (glWindowPos2i (x GLint) (y GLint) -> void)
23386 (glWindowPos2f (x GLfloat) (y GLfloat) -> void)
23387 (glWindowPos2d (x GLdouble) (y GLdouble) -> void)
23388 (glWindowPos3s
23389 (x GLshort)
23390 (y GLshort)
23391 (z GLshort)
23392 ->
23393 void)
23394 (glWindowPos3i
23395 (x GLint)
23396 (y GLint)
23397 (z GLint)
23398 ->
23399 void)
23400 (glWindowPos3f
23401 (x GLfloat)
23402 (y GLfloat)
23403 (z GLfloat)
23404 ->
23405 void)
23406 (glWindowPos3d
23407 (x GLdouble)
23408 (y GLdouble)
23409 (z GLdouble)
23410 ->
23411 void)
23412 (glWindowPos2sv (v const-GLshort-*) -> void)
23413 (glWindowPos2iv (v const-GLint-*) -> void)
23414 (glWindowPos2fv (v const-GLfloat-*) -> void)
23415 (glWindowPos2dv (v const-GLdouble-*) -> void)
23416 (glWindowPos3sv (v const-GLshort-*) -> void)
23417 (glWindowPos3iv (v const-GLint-*) -> void)
23418 (glWindowPos3fv (v const-GLfloat-*) -> void)
23419 (glWindowPos3dv (v const-GLdouble-*) -> void))
23420 "Specify the raster position in window coordinates for pixel operations.
23421
23422 X
23423 Y
23424
23425 Z
23426
23427 Specify the X , Y , Z coordinates for the raster position.
23428
23429 The GL maintains a 3D position in window coordinates. This position,
23430 called the raster position, is used to position pixel and bitmap write
23431 operations. It is maintained with subpixel accuracy. See `glBitmap',
23432 `glDrawPixels', and `glCopyPixels'.
23433
23434 `glWindowPos2' specifies the X and Y coordinates, while Z is implicitly
23435 set to 0. `glWindowPos3' specifies all three coordinates. The W
23436 coordinate of the current raster position is always set to 1.0.
23437
23438 `glWindowPos' directly updates the X and Y coordinates of the current
23439 raster position with the values specified. That is, the values are
23440 neither transformed by the current modelview and projection matrices,
23441 nor by the viewport-to-window transform. The Z coordinate of the current
23442 raster position is updated in the following manner:
23443
23444 Z={(N), (F), (N+Z×(F-N,),)\u2062(IF\u2062Z<=0), (IF\u2062Z>=1), (`otherwise',),
23445
23446
23447
23448 where N is `GL_DEPTH_RANGE''s near value, and F is `GL_DEPTH_RANGE''s
23449 far value. See `glDepthRange'.
23450
23451 The specified coordinates are not clip-tested, causing the raster
23452 position to always be valid.
23453
23454 The current raster position also includes some associated color data and
23455 texture coordinates. If lighting is enabled, then
23456 `GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `GL_CURRENT_RASTER_INDEX'
23457 (in color index mode) is set to the color produced by the lighting
23458 calculation (see `glLight', `glLightModel', and `glShadeModel'). If
23459 lighting is disabled, current color (in RGBA mode, state variable
23460 `GL_CURRENT_COLOR') or color index (in color index mode, state variable
23461 `GL_CURRENT_INDEX') is used to update the current raster color.
23462 `GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated.
23463
23464 Likewise, `GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of
23465 `GL_CURRENT_TEXTURE_COORDS', based on the texture matrix and the texture
23466 generation functions (see `glTexGen'). The `GL_CURRENT_RASTER_DISTANCE'
23467 is set to the `GL_CURRENT_FOG_COORD'.
23468
23469
23470
23471 `GL_INVALID_OPERATION' is generated if `glWindowPos' is executed between
23472 the execution of `glBegin' and the corresponding execution of `glEnd'.")
23473