1 ;;; figl -*- mode: scheme; coding: utf-8 -*-
2 ;;; Copyright (C) 2013 Andy Wingo <wingo@pobox.com>
4 ;;; Figl is free software: you can redistribute it and/or modify it
5 ;;; under the terms of the GNU Lesser General Public License as
6 ;;; published by the Free Software Foundation, either version 3 of the
7 ;;; License, or (at your option) any later version.
9 ;;; Figl is distributed in the hope that it will be useful, but WITHOUT
10 ;;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 ;;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
12 ;;; Public License for more details.
14 ;;; You should have received a copy of the GNU Lesser General Public
15 ;;; License along with this program. If not, see
16 ;;; <http://www.gnu.org/licenses/>.
18 ;;; Derived from upstream OpenGL documentation.
23 ;;; Copyright (C) 1991-2006 Silicon Graphics, Inc. This document is licensed
24 ;;; under the SGI Free Software B License. For details, see
25 ;;; http://oss.sgi.com/projects/FreeB/ (http://oss.sgi.com/projects/FreeB/).
30 ;;; Copyright (C) 2003-2005 3Dlabs Inc. Ltd. This material may be
31 ;;; distributed subject to the terms and conditions set forth in the Open
32 ;;; Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/
33 ;;; (http://opencontent.org/openpub/).
38 ;;; Copyright (C) 2005 Addison-Wesley. This material may be distributed
39 ;;; subject to the terms and conditions set forth in the Open Publication
40 ;;; License, v 1.0, 8 June 1999. http://opencontent.org/openpub/
41 ;;; (http://opencontent.org/openpub/).
46 ;;; Copyright (C) 2006 Khronos Group. This material may be distributed
47 ;;; subject to the terms and conditions set forth in the Open Publication
48 ;;; License, v 1.0, 8 June 1999. http://opencontent.org/openpub/
49 ;;; (http://opencontent.org/openpub/).
51 ;;; Automatically generated; you probably don't want to edit this. To
52 ;;; update, run "make update" in the top-level build tree.
58 (figl low-level support)
73 glBlendEquationSeparate
97 glCompressedTexImage1D
98 glCompressedTexImage2D
99 glCompressedTexImage3D
100 glCompressedTexSubImage1D
101 glCompressedTexSubImage2D
102 glCompressedTexSubImage3D
103 glConvolutionFilter1D
104 glConvolutionFilter2D
105 glConvolutionParameter
108 glCopyConvolutionFilter1D
109 glCopyConvolutionFilter2D
138 glEnableVertexAttribArray
159 glGetBufferParameteriv
163 glGetColorTableParameter
165 glGetCompressedTexImage
166 glGetConvolutionFilter
167 glGetConvolutionParameter
169 glGetHistogramParameter
191 glGetTexLevelParameter
195 glGetVertexAttribPointerv
221 glLoadTransposeMatrix
234 glMultTransposeMatrix
265 glSecondaryColorPointer
271 glStencilFuncSeparate
273 glStencilMaskSeparate
292 glVertexAttribPointer
304 (funcdef "void " (function "glAccum"))
305 (paramdef "GLenum " (parameter "op"))
306 (paramdef "GLfloat " (parameter "value"))))
308 (heading "operate on the accumulation buffer")
309 (heading "Parameters")
310 (table (% (formatter (asis)))
311 (entry (% (heading (var "op")))
313 Specifies the accumulation buffer operation.
326 (entry (% (heading (var "value")))
328 Specifies a floating-point value used in the accumulation buffer operation. "
333 (heading "Description")
335 The accumulation buffer is an extended-range color buffer.
336 Images are not rendered into it.
338 images rendered into one of the color buffers
339 are added to the contents of the accumulation buffer after rendering.
340 Effects such as antialiasing (of points, lines, and polygons),
342 and depth of field can be created
343 by accumulating images generated with different transformation matrices. ")
345 Each pixel in the accumulation buffer consists of
346 red, green, blue, and alpha values.
347 The number of bits per component in the accumulation buffer
348 depends on the implementation. You can examine this number
350 (code "glGetIntegerv")
353 (code "GL_ACCUM_RED_BITS")
355 (code "GL_ACCUM_GREEN_BITS")
357 (code "GL_ACCUM_BLUE_BITS")
360 (code "GL_ACCUM_ALPHA_BITS")
362 Regardless of the number of bits per component,
363 the range of values stored by each component is "
364 (math "[" "-1" "," "1" "]")
366 The accumulation buffer pixels are mapped one-to-one with frame buffer pixels. ")
367 (para (code "glAccum")
368 " operates on the accumulation buffer.
369 The first argument, "
372 is a symbolic constant that selects an accumulation buffer operation.
373 The second argument, "
376 is a floating-point value to be used in that operation.
377 Five operations are specified: "
389 All accumulation buffer operations are limited
390 to the area of the current scissor box and applied identically to
391 the red, green, blue, and alpha components of each pixel.
394 " operation results in a value outside the range "
395 (math "[" "-1" "," "1" "]")
397 the contents of an accumulation buffer pixel component are undefined. ")
399 The operations are as follows: ")
400 (table (% (formatter (asis)))
401 (entry (% (heading (code "GL_ACCUM")))
403 Obtains R, G, B, and A values
404 from the buffer currently selected for reading (see "
405 (code "glReadBuffer")
407 Each component value is divided by "
408 (math "2" "^" (var "n") "-" "1")
413 is the number of bits allocated to each color component
414 in the currently selected buffer.
415 The result is a floating-point value in the range "
416 (math "[" "0" "," "1" "]")
418 which is multiplied by "
420 " and added to the corresponding pixel component
421 in the accumulation buffer,
422 thereby updating the accumulation buffer. "))
423 (entry (% (heading (code "GL_LOAD")))
428 except that the current value in the accumulation buffer is not used
429 in the calculation of the new value.
430 That is, the R, G, B, and A values from the currently selected buffer
432 (math "2" "^" (var "n") "-" "1")
437 and then stored in the corresponding accumulation buffer cell,
438 overwriting the current value. "))
439 (entry (% (heading (code "GL_ADD")))
443 " to each R, G, B, and A
444 in the accumulation buffer. "))
445 (entry (% (heading (code "GL_MULT")))
447 Multiplies each R, G, B, and A
448 in the accumulation buffer by "
450 " and returns the scaled component
451 to its corresponding accumulation buffer location. "))
452 (entry (% (heading (code "GL_RETURN")))
454 Transfers accumulation buffer values
455 to the color buffer or buffers currently selected for writing.
456 Each R, G, B, and A component is multiplied by "
460 (math "2" "^" (var "n") "-" "1")
462 clamped to the range "
463 (math "[" "0" "," "2" "^" (var "n") "-" "1" "]")
466 in the corresponding display buffer cell.
467 The only fragment operations that are applied to this transfer are
471 and color writemasks. ")))
473 To clear the accumulation buffer, call "
474 (code "glClearAccum")
476 and A values to set it to, then call "
479 accumulation buffer enabled. ")
481 (para (code "GL_INVALID_ENUM")
484 " is not an accepted value. ")
485 (para (code "GL_INVALID_OPERATION")
486 " is generated if there is no accumulation buffer. ")
487 (para (code "GL_INVALID_OPERATION")
491 is executed between the execution of "
493 " and the corresponding execution of "
502 (funcdef "void " (function "glActiveTexture"))
503 (paramdef "GLenum " (parameter "texture"))))
505 (heading "select active texture unit")
506 (heading "Parameters")
507 (table (% (formatter (asis)))
508 (entry (% (heading (var "texture")))
510 Specifies which texture unit to make active. The number
511 of texture units is implementation dependent, but must be at least
519 i ranges from 0 to the larger of ("
520 (code "GL_MAX_TEXTURE_COORDS")
523 (code "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS")
525 The initial value is "
528 (heading "Description")
529 (para (code "glActiveTexture")
530 " selects which texture unit subsequent texture state calls will
531 affect. The number of texture units an implementation supports is
532 implementation dependent, but must be at least 2. ")
534 Vertex arrays are client-side GL resources, which are selected by the "
535 (code "glClientActiveTexture")
538 (para (code "GL_INVALID_ENUM")
545 where i ranges from 0 to the larger of ("
546 (code "GL_MAX_TEXTURE_COORDS")
549 (code "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS")
557 (funcdef "void " (function "glAlphaFunc"))
558 (paramdef "GLenum " (parameter "func"))
559 (paramdef "GLclampf " (parameter "ref"))))
561 (heading "specify the alpha test function")
562 (heading "Parameters")
563 (table (% (formatter (asis)))
564 (entry (% (heading (var "func")))
566 Specifies the alpha comparison function.
583 " are accepted. The initial value is "
586 (entry (% (heading (var "ref")))
588 Specifies the reference value that incoming alpha values are compared to.
589 This value is clamped to the range "
590 (math "[" "0" "," "1" "]")
592 where 0 represents the lowest possible alpha value
593 and 1 the highest possible value.
594 The initial reference value is 0. ")))
595 (heading "Description")
597 The alpha test discards fragments depending on the outcome of a comparison
598 between an incoming fragment's alpha value and a constant reference value. "
600 " specifies the reference value and the comparison function.
601 The comparison is performed only if alpha testing is enabled. By
602 default, it is not enabled.
608 (code "GL_ALPHA_TEST")
613 " specify the conditions under which
615 The incoming alpha value is compared to "
618 using the function specified by "
621 If the value passes the comparison,
622 the incoming fragment is drawn
623 if it also passes subsequent stencil and depth buffer tests.
624 If the value fails the comparison,
625 no change is made to the frame buffer at that pixel location. The
626 comparison functions are as follows: ")
627 (table (% (formatter (asis)))
628 (entry (% (heading (code "GL_NEVER")))
631 (entry (% (heading (code "GL_LESS")))
633 Passes if the incoming alpha value is less than the reference value. "))
634 (entry (% (heading (code "GL_EQUAL")))
636 Passes if the incoming alpha value is equal to the reference value. "))
637 (entry (% (heading (code "GL_LEQUAL")))
639 Passes if the incoming alpha value is less than or equal to the reference value. "))
640 (entry (% (heading (code "GL_GREATER")))
642 Passes if the incoming alpha value is greater than the reference value. "))
643 (entry (% (heading (code "GL_NOTEQUAL")))
645 Passes if the incoming alpha value is not equal to the reference value. "))
646 (entry (% (heading (code "GL_GEQUAL")))
648 Passes if the incoming alpha value is greater than or equal to
649 the reference value. "))
650 (entry (% (heading (code "GL_ALWAYS")))
652 Always passes (initial value). ")))
653 (para (code "glAlphaFunc")
654 " operates on all pixel write operations,
655 including those resulting from the scan conversion of points,
659 and from pixel draw and copy operations. "
661 " does not affect screen clear operations. ")
663 (para (code "GL_INVALID_ENUM")
666 " is not an accepted value. ")
667 (para (code "GL_INVALID_OPERATION")
671 is executed between the execution of "
674 and the corresponding execution of "
679 glAreTexturesResident
680 "glAreTexturesResident"
685 (function "glAreTexturesResident"))
686 (paramdef "GLsizei " (parameter "n"))
689 (parameter "textures"))
692 (parameter "residences"))))
695 "determine if textures are loaded in texture memory")
696 (heading "Parameters")
697 (table (% (formatter (asis)))
698 (entry (% (heading (var "n")))
700 Specifies the number of textures to be queried. "))
701 (entry (% (heading (var "textures")))
703 Specifies an array containing the names of the textures to be queried. "))
704 (entry (% (heading (var "residences")))
706 Specifies an array in which the texture residence status is returned.
707 The residence status of a texture named by an element of "
710 returned in the corresponding element of "
713 (heading "Description")
716 a ``working set'' of textures that are resident in texture memory.
717 These textures can be bound to a texture target much more efficiently
718 than textures that are not resident. ")
719 (para (code "glAreTexturesResident")
720 " queries the texture residence status of the "
726 If all the named textures are resident, "
727 (code "glAreTexturesResident")
731 and the contents of "
734 If not all the named textures are resident, "
735 (code "glAreTexturesResident")
739 and detailed status is returned in the "
748 ", then the texture named by
749 the corresponding element of "
753 The residence status of a single bound texture may also be queried
755 (code "glGetTexParameter")
758 " argument set to the
759 target to which the texture is bound, and the "
763 (code "GL_TEXTURE_RESIDENT")
765 This is the only way that the residence status of a default texture can be
768 (para (code "GL_INVALID_VALUE")
772 (para (code "GL_INVALID_VALUE")
773 " is generated if any element in "
776 is 0 or does not name a texture. In that case, the function returns "
778 " and the contents of "
780 " is indeterminate. ")
781 (para (code "GL_INVALID_OPERATION")
783 (code "glAreTexturesResident")
785 between the execution of "
787 " and the corresponding
797 (funcdef "void " (function "glArrayElement"))
798 (paramdef "GLint " (parameter "i"))))
801 "render a vertex using the specified vertex array element")
802 (heading "Parameters")
803 (table (% (formatter (asis)))
804 (entry (% (heading (var "i")))
806 Specifies an index into the enabled vertex data arrays. ")))
807 (heading "Description")
808 (para (code "glArrayElement")
809 " commands are used within "
814 specify vertex and attribute data for point, line, and polygon
816 (code "GL_VERTEX_ARRAY")
818 (code "glArrayElement")
820 single vertex is drawn, using
821 vertex and attribute data taken from location "
825 (code "GL_VERTEX_ARRAY")
826 " is not enabled, no drawing occurs but
827 the attributes corresponding to the enabled arrays are modified. ")
830 (code "glArrayElement")
831 " to construct primitives by indexing vertex data, rather than
832 by streaming through arrays of data in first-to-last order. Because
833 each call specifies only a single vertex, it is possible to explicitly
834 specify per-primitive attributes such as a single normal for each
837 Changes made to array data between the execution of "
840 corresponding execution of "
842 " may affect calls to "
843 (code "glArrayElement")
849 " period in nonsequential ways.
851 (code "glArrayElement")
852 " that precedes a change to array data may
853 access the changed data, and a call that follows a change to array data
854 may access original data. ")
856 (para (code "GL_INVALID_VALUE")
857 " may be generated if "
860 (para (code "GL_INVALID_OPERATION")
861 " is generated if a non-zero buffer object name is bound to an
862 enabled array and the buffer object's data store is currently mapped. ")))
869 (funcdef "void " (function "glAttachShader"))
870 (paramdef "GLuint " (parameter "program"))
871 (paramdef "GLuint " (parameter "shader"))))
874 "Attaches a shader object to a program object")
875 (heading "Parameters")
876 (table (% (formatter (asis)))
877 (entry (% (heading (var "program")))
878 (para "Specifies the program object to which a shader
879 \t\t object will be attached."))
880 (entry (% (heading (var "shader")))
881 (para "Specifies the shader object that is to be attached.")))
882 (heading "Description")
883 (para "In order to create an executable, there must be a way to
884 \tspecify the list of things that will be linked together. Program
885 \tobjects provide this mechanism. Shaders that are to be linked
886 \ttogether in a program object must first be attached to that
888 (code "glAttachShader")
890 \tshader object specified by "
893 \tprogram object specified by "
898 " will be included in
899 \tlink operations that will be performed on\t"
902 (para "All operations that can be performed on a shader object
903 \tare valid whether or not the shader object is attached to a
904 \tprogram object. It is permissible to attach a shader object to a
905 \tprogram object before source code has been loaded into the
906 \tshader object or before the shader object has been compiled. It
907 \tis permissible to attach multiple shader objects of the same
908 \ttype because each may contain a portion of the complete shader.
909 \tIt is also permissible to attach a shader object to more than
910 \tone program object. If a shader object is deleted while it is
911 \tattached to a program object, it will be flagged for deletion,
912 \tand deletion will not occur until\t"
913 (code "glDetachShader")
915 is called to detach it from all program objects to which it is
918 (para (code "GL_INVALID_VALUE")
919 " is generated if either\t"
924 is not a value generated by OpenGL.")
925 (para (code "GL_INVALID_OPERATION")
928 " is not a program object.")
929 (para (code "GL_INVALID_OPERATION")
932 " is not a shader object.")
933 (para (code "GL_INVALID_OPERATION")
936 " is already attached to\t"
939 (para (code "GL_INVALID_OPERATION")
941 (code "glAttachShader")
942 " is executed between the
946 and the corresponding execution of\t"
955 (funcdef "void " (function "glBeginQuery"))
956 (paramdef "GLenum " (parameter "target"))
957 (paramdef "GLuint " (parameter "id"))))
960 "delimit the boundaries of a query object")
961 (heading "Parameters")
962 (table (% (formatter (asis)))
963 (entry (% (heading (var "target")))
965 Specifies the target type of query object established between "
966 (code "glBeginQuery")
967 " and the subsequent "
970 The symbolic constant must be "
971 (code "GL_SAMPLES_PASSED")
973 (entry (% (heading (var "id")))
975 Specifies the name of a query object. ")))
976 (heading "Description")
977 (para (code "glBeginQuery")
981 boundaries of a query object. If a query object with name "
983 " does not yet exist it is created. ")
986 (code "glBeginQuery")
987 " is executed, the query object's samples-passed counter is reset to 0. Subsequent
988 rendering will increment the counter once for every sample that passes the depth test. When "
991 is executed, the samples-passed counter is assigned to the query object's result value. This value can be queried by
993 (code "glGetQueryObject")
996 (code "GL_QUERY_RESULT")
1000 (code "GL_QUERY_RESULT")
1001 " implicitly flushes the GL pipeline until the rendering delimited by the
1002 query object has completed and the result is available. "
1003 (code "GL_QUERY_RESULT_AVAILABLE")
1005 determine if the result is immediately available or if the rendering is not yet complete. ")
1007 (para (code "GL_INVALID_ENUM")
1011 (code "GL_SAMPLES_PASSED")
1013 (para (code "GL_INVALID_OPERATION")
1015 (code "glBeginQuery")
1017 a query object of the same "
1019 " is already active. ")
1020 (para (code "GL_INVALID_OPERATION")
1024 is executed when a query object of the same "
1027 (para (code "GL_INVALID_OPERATION")
1031 (para (code "GL_INVALID_OPERATION")
1034 " is the name of an already active query object. ")
1035 (para (code "GL_INVALID_OPERATION")
1037 (code "glBeginQuery")
1040 " is executed between the execution of "
1042 " and the corresponding execution of "
1046 (define-gl-procedure
1051 (funcdef "void " (function "glBegin"))
1052 (paramdef "GLenum " (parameter "mode"))))
1055 "delimit the vertices of a primitive or a group of like primitives")
1056 (heading "Parameters")
1057 (table (% (formatter (asis)))
1058 (entry (% (heading (var "mode")))
1060 Specifies the primitive or primitives that will be created from vertices
1063 " and the subsequent "
1066 Ten symbolic constants are accepted: "
1071 (code "GL_LINE_STRIP")
1073 (code "GL_LINE_LOOP")
1075 (code "GL_TRIANGLES")
1077 (code "GL_TRIANGLE_STRIP")
1079 (code "GL_TRIANGLE_FAN")
1083 (code "GL_QUAD_STRIP")
1087 (heading "Description")
1088 (para (code "glBegin")
1091 " delimit the vertices that define a primitive or
1092 a group of like primitives. "
1094 " accepts a single argument that specifies in which of ten ways the
1095 vertices are interpreted.
1099 as an integer count starting at one,
1103 as the total number of vertices specified,
1104 the interpretations are as follows: ")
1105 (table (% (formatter (asis)))
1106 (entry (% (heading (code "GL_POINTS")))
1108 Treats each vertex as a single point.
1117 points are drawn. "))
1118 (entry (% (heading (code "GL_LINES")))
1120 Treats each pair of vertices as an independent line segment.
1122 (math "2" "\u2062" (var "n") "-" "1")
1125 (math "2" "\u2062" (var "n"))
1130 (math (var "N") "/" "2")
1132 lines are drawn. "))
1133 (entry (% (heading (code "GL_LINE_STRIP")))
1135 Draws a connected group of line segments from the first vertex
1141 (math (var "n") "+" "1")
1146 (math (var "N") "-" "1")
1148 lines are drawn. "))
1149 (entry (% (heading (code "GL_LINE_LOOP")))
1151 Draws a connected group of line segments from the first vertex
1153 then back to the first.
1158 (math (var "n") "+" "1")
1163 The last line, however, is defined by vertices "
1171 lines are drawn. "))
1172 (entry (% (heading (code "GL_TRIANGLES")))
1174 Treats each triplet of vertices as an independent triangle.
1176 (math "3" "\u2062" (var "n") "-" "2")
1178 (math "3" "\u2062" (var "n") "-" "1")
1181 (math "3" "\u2062" (var "n"))
1186 (math (var "N") "/" "3")
1188 triangles are drawn. "))
1189 (entry (% (heading (code "GL_TRIANGLE_STRIP")))
1191 Draws a connected group of triangles. One triangle is defined for each
1192 vertex presented after the first two vertices. For odd "
1198 (math (var "n") "+" "1")
1201 (math (var "n") "+" "2")
1210 (math (var "n") "+" "1")
1215 (math (var "n") "+" "2")
1220 (math (var "N") "-" "2")
1224 (entry (% (heading (code "GL_TRIANGLE_FAN")))
1226 Draws a connected group of triangles.
1227 One triangle is defined for each vertex presented after the first two vertices.
1231 (math (var "n") "+" "1")
1234 (math (var "n") "+" "2")
1239 (math (var "N") "-" "2")
1241 triangles are drawn. "))
1242 (entry (% (heading (code "GL_QUADS")))
1244 Treats each group of four vertices as an independent quadrilateral.
1246 (math "4" "\u2062" (var "n") "-" "3")
1248 (math "4" "\u2062" (var "n") "-" "2")
1250 (math "4" "\u2062" (var "n") "-" "1")
1253 (math "4" "\u2062" (var "n"))
1255 define quadrilateral "
1258 (math (var "N") "/" "4")
1260 quadrilaterals are drawn. "))
1261 (entry (% (heading (code "GL_QUAD_STRIP")))
1263 Draws a connected group of quadrilaterals.
1264 One quadrilateral is defined for each pair of vertices presented
1265 after the first pair.
1267 (math "2" "\u2062" (var "n") "-" "1")
1269 (math "2" "\u2062" (var "n"))
1271 (math "2" "\u2062" (var "n") "+" "2")
1274 (math "2" "\u2062" (var "n") "+" "1")
1276 define quadrilateral "
1279 (math (var "N") "/" "2" "-" "1")
1281 quadrilaterals are drawn.
1282 Note that the order in which vertices are used to construct a quadrilateral
1283 from strip data is different from that used with independent data. "))
1284 (entry (% (heading (code "GL_POLYGON")))
1294 define this polygon. ")))
1296 Only a subset of GL commands can be used between "
1306 (code "glSecondaryColor")
1316 (code "glMultiTexCoord")
1318 (code "glVertexAttrib")
1320 (code "glEvalCoord")
1322 (code "glEvalPoint")
1324 (code "glArrayElement")
1331 it is acceptable to use "
1334 (code "glCallLists")
1336 display lists that include only the preceding commands.
1337 If any other GL command is executed between "
1342 the error flag is set and the command is ignored. ")
1344 Regardless of the value chosen for "
1347 there is no limit to the number of vertices that can be defined
1356 and polygons that are incompletely specified are not drawn.
1357 Incomplete specification results when either too few vertices are
1358 provided to specify even a single primitive or when an incorrect multiple
1359 of vertices is specified. The incomplete primitive is ignored; the rest are drawn. ")
1361 The minimum specification of vertices
1362 for each primitive is as follows:
1366 4 for a quadrilateral,
1367 and 3 for a polygon.
1368 Modes that require a certain multiple of vertices are "
1371 (code "GL_TRIANGLES")
1376 (code "GL_QUAD_STRIP")
1379 (para (code "GL_INVALID_ENUM")
1382 " is set to an unaccepted value. ")
1383 (para (code "GL_INVALID_OPERATION")
1386 " is executed between a "
1389 and the corresponding execution of "
1392 (para (code "GL_INVALID_OPERATION")
1395 " is executed without being
1399 (para (code "GL_INVALID_OPERATION")
1400 " is generated if a command other than "
1405 (code "glSecondaryColor")
1415 (code "glMultiTexCoord")
1417 (code "glVertexAttrib")
1419 (code "glEvalCoord")
1421 (code "glEvalPoint")
1423 (code "glArrayElement")
1431 (code "glCallLists")
1432 " is executed between
1435 " and the corresponding
1441 (code "glEnableClientState")
1443 (code "glDisableClientState")
1445 (code "glEdgeFlagPointer")
1447 (code "glFogCoordPointer")
1449 (code "glTexCoordPointer")
1451 (code "glColorPointer")
1453 (code "glSecondaryColorPointer")
1455 (code "glIndexPointer")
1457 (code "glNormalPointer")
1459 (code "glVertexPointer")
1461 (code "glVertexAttribPointer")
1463 (code "glInterleavedArrays")
1465 (code "glPixelStore")
1466 " is not allowed after a call to "
1469 the corresponding call to "
1472 but an error may or may not be generated. ")))
1474 (define-gl-procedure
1475 glBindAttribLocation
1476 "glBindAttribLocation"
1481 (function "glBindAttribLocation"))
1482 (paramdef "GLuint " (parameter "program"))
1483 (paramdef "GLuint " (parameter "index"))
1484 (paramdef "const GLchar *" (parameter "name"))))
1487 "Associates a generic vertex attribute index with a named attribute variable")
1488 (heading "Parameters")
1489 (table (% (formatter (asis)))
1490 (entry (% (heading (var "program")))
1491 (para "Specifies the handle of the program object in
1492 \t\t which the association is to be made."))
1493 (entry (% (heading (var "index")))
1494 (para "Specifies the index of the generic vertex
1495 \t\t attribute to be bound."))
1496 (entry (% (heading (var "name")))
1497 (para "Specifies a null terminated string containing
1498 \t\t the name of the vertex shader attribute variable to
1503 (heading "Description")
1504 (para (code "glBindAttribLocation")
1506 \tassociate a user-defined attribute variable in the program
1507 \tobject specified by "
1510 \tgeneric vertex attribute index. The name of the user-defined
1511 \tattribute variable is passed as a null terminated string in\t"
1513 ". The generic vertex attribute index
1514 \tto be bound to this variable is specified by\t"
1518 " is made part of current state,
1519 \tvalues provided via the generic vertex attribute\t"
1521 " will modify the value of the
1522 \tuser-defined attribute variable specified by\t"
1527 " refers to a matrix
1528 \tattribute variable, "
1531 \tfirst column of the matrix. Other matrix columns are then
1532 \tautomatically bound to locations "
1535 for a matrix of type mat2; "
1539 " for a matrix of type mat3; and\t"
1546 " for a matrix of type
1548 (para "This command makes it possible for vertex shaders to use
1549 \tdescriptive names for attribute variables rather than generic
1550 \tvariables that are numbered from 0 to\t"
1551 (code "GL_MAX_VERTEX_ATTRIBS")
1552 " -1. The values sent
1553 \tto each generic attribute index are part of current state, just
1554 \tlike standard vertex attributes such as color, normal, and
1555 \tvertex position. If a different program object is made current
1557 (code "glUseProgram")
1559 \tthe generic vertex attributes are tracked in such a way that the
1560 \tsame values will be observed by attributes in the new program
1561 \tobject that are also bound to\t"
1564 (para "Attribute variable
1565 \tname-to-generic attribute index bindings for a program object
1566 \tcan be explicitly assigned at any time by calling\t"
1567 (code "glBindAttribLocation")
1568 ". Attribute bindings do
1569 \tnot go into effect until\t"
1570 (code "glLinkProgram")
1572 is called. After a program object has been linked successfully,
1573 \tthe index values for generic attributes remain fixed (and their
1574 \tvalues can be queried) until the next link command
1576 (para "Applications are not allowed to bind any of the standard
1577 \tOpenGL vertex attributes using this command, as they are bound
1578 \tautomatically when needed. Any attribute binding that occurs
1579 \tafter the program object has been linked will not take effect
1580 \tuntil the next time the program object is linked.")
1582 (para (code "GL_INVALID_VALUE")
1583 " is generated if\t"
1585 " is greater than or equal to\t"
1586 (code "GL_MAX_VERTEX_ATTRIBS")
1588 (para (code "GL_INVALID_OPERATION")
1589 " is generated if\t"
1591 " starts with the reserved prefix
1593 (para (code "GL_INVALID_VALUE")
1594 " is generated if\t"
1596 " is not a value generated by
1598 (para (code "GL_INVALID_OPERATION")
1599 " is generated if\t"
1601 " is not a program object.")
1602 (para (code "GL_INVALID_OPERATION")
1603 " is generated if\t"
1604 (code "glBindAttribLocation")
1605 " is executed between
1606 \tthe execution of\t"
1609 and the corresponding execution of\t"
1613 (define-gl-procedure
1618 (funcdef "void " (function "glBindBuffer"))
1619 (paramdef "GLenum " (parameter "target"))
1620 (paramdef "GLuint " (parameter "buffer"))))
1622 (heading "bind a named buffer object")
1623 (heading "Parameters")
1624 (table (% (formatter (asis)))
1625 (entry (% (heading (var "target")))
1627 Specifies the target to which the buffer object is bound.
1628 The symbolic constant must be "
1629 (code "GL_ARRAY_BUFFER")
1631 (code "GL_ELEMENT_ARRAY_BUFFER")
1633 (code "GL_PIXEL_PACK_BUFFER")
1635 (code "GL_PIXEL_UNPACK_BUFFER")
1637 (entry (% (heading (var "buffer")))
1639 Specifies the name of a buffer object. ")))
1640 (heading "Description")
1641 (para (code "glBindBuffer")
1642 " lets you create or use a named buffer object. Calling "
1643 (code "glBindBuffer")
1647 (code "GL_ARRAY_BUFFER")
1649 (code "GL_ELEMENT_ARRAY_BUFFER")
1651 (code "GL_PIXEL_PACK_BUFFER")
1653 (code "GL_PIXEL_UNPACK_BUFFER")
1657 of the new buffer object binds the buffer object name to the target.
1658 When a buffer object is bound to a target, the previous binding for that
1659 target is automatically broken. ")
1661 Buffer object names are unsigned integers. The value zero is reserved, but
1662 there is no default buffer object for each buffer object target. Instead, "
1665 effectively unbinds any buffer object previously bound, and restores client memory usage for that buffer object target.
1666 Buffer object names and the corresponding buffer object contents are local to
1667 the shared display-list space (see "
1668 (code "glXCreateContext")
1670 GL rendering context;
1671 two rendering contexts share buffer object names only if they
1672 also share display lists. ")
1675 (code "glGenBuffers")
1676 " to generate a set of new buffer object names. ")
1678 The state of a buffer object immediately after it is first bound is an unmapped zero-sized memory buffer with "
1679 (code "GL_READ_WRITE")
1681 (code "GL_STATIC_DRAW")
1684 While a non-zero buffer object name is bound, GL operations on the target to which it is
1685 bound affect the bound buffer object, and queries of the target to which it is bound return state
1686 from the bound buffer object. While buffer object name zero is bound, as in the initial state,
1687 attempts to modify or query state on the target to which it is bound generates an "
1688 (code "GL_INVALID_OPERATION")
1691 When vertex array pointer state is changed, for example by a call to "
1692 (code "glNormalPointer")
1694 the current buffer object binding ("
1695 (code "GL_ARRAY_BUFFER_BINDING")
1696 ") is copied into the
1697 corresponding client state for the vertex array type being changed, for example "
1698 (code "GL_NORMAL_ARRAY_BUFFER_BINDING")
1699 ". While a non-zero buffer object is bound to the "
1700 (code "GL_ARRAY_BUFFER")
1701 " target, the vertex array pointer parameter that is traditionally
1702 interpreted as a pointer to client-side memory is instead interpreted as an offset within the
1703 buffer object measured in basic machine units. ")
1705 While a non-zero buffer object is bound to the "
1706 (code "GL_ELEMENT_ARRAY_BUFFER")
1708 the indices parameter of "
1709 (code "glDrawElements")
1711 (code "glDrawRangeElements")
1713 (code "glMultiDrawElements")
1714 " that is traditionally
1715 interpreted as a pointer to client-side memory is instead interpreted as an offset within the
1716 buffer object measured in basic machine units. ")
1718 While a non-zero buffer object is bound to the "
1719 (code "GL_PIXEL_PACK_BUFFER")
1721 the following commands are affected: "
1722 (code "glGetCompressedTexImage")
1724 (code "glGetConvolutionFilter")
1726 (code "glGetHistogram")
1728 (code "glGetMinmax")
1730 (code "glGetPixelMap")
1732 (code "glGetPolygonStipple")
1734 (code "glGetSeparableFilter")
1736 (code "glGetTexImage")
1738 (code "glReadPixels")
1739 ". The pointer parameter that is
1740 traditionally interpreted as a pointer to client-side memory where the pixels are to be packed is instead
1741 interpreted as an offset within the buffer object measured in basic machine units. ")
1743 While a non-zero buffer object is bound to the "
1744 (code "GL_PIXEL_UNPACK_BUFFER")
1746 the following commands are affected: "
1749 (code "glColorSubTable")
1751 (code "glColorTable")
1753 (code "glCompressedTexImage1D")
1755 (code "glCompressedTexImage2D")
1757 (code "glCompressedTexImage3D")
1759 (code "glCompressedTexSubImage1D")
1761 (code "glCompressedTexSubImage2D")
1763 (code "glCompressedTexSubImage3D")
1765 (code "glConvolutionFilter1D")
1767 (code "glConvolutionFilter2D")
1769 (code "glDrawPixels")
1773 (code "glPolygonStipple")
1775 (code "glSeparableFilter2D")
1777 (code "glTexImage1D")
1779 (code "glTexImage2D")
1781 (code "glTexImage3D")
1783 (code "glTexSubImage1D")
1785 (code "glTexSubImage2D")
1787 (code "glTexSubImage3D")
1788 ". The pointer parameter that is
1789 traditionally interpreted as a pointer to client-side memory from which the pixels are to be unpacked is
1790 instead interpreted as an offset within the buffer object measured in basic machine units. ")
1792 A buffer object binding created with "
1793 (code "glBindBuffer")
1794 " remains active until a different
1795 buffer object name is bound to the same target, or until the bound buffer object is
1797 (code "glDeleteBuffers")
1800 Once created, a named buffer object may be re-bound to any target as often as needed. However,
1801 the GL implementation may make choices about how to optimize the storage of a buffer object based
1802 on its initial binding target. ")
1804 (para (code "GL_INVALID_ENUM")
1807 " is not one of the allowable
1809 (para (code "GL_INVALID_OPERATION")
1811 (code "glBindBuffer")
1813 between the execution of "
1815 " and the corresponding
1820 (define-gl-procedure
1825 (funcdef "void " (function "glBindTexture"))
1826 (paramdef "GLenum " (parameter "target"))
1827 (paramdef "GLuint " (parameter "texture"))))
1830 "bind a named texture to a texturing target")
1831 (heading "Parameters")
1832 (table (% (formatter (asis)))
1833 (entry (% (heading (var "target")))
1835 Specifies the target to which the texture is bound.
1837 (code "GL_TEXTURE_1D")
1839 (code "GL_TEXTURE_2D")
1841 (code "GL_TEXTURE_3D")
1843 (code "GL_TEXTURE_CUBE_MAP")
1845 (entry (% (heading (var "texture")))
1847 Specifies the name of a texture. ")))
1848 (heading "Description")
1849 (para (code "glBindTexture")
1850 " lets you create or use a named texture. Calling "
1851 (code "glBindTexture")
1855 (code "GL_TEXTURE_1D")
1857 (code "GL_TEXTURE_2D")
1859 (code "GL_TEXTURE_3D")
1861 (code "GL_TEXTURE_CUBE_MAP")
1865 of the new texture binds the texture name to the target.
1866 When a texture is bound to a target, the previous binding for that
1867 target is automatically broken. ")
1869 Texture names are unsigned integers. The value zero is reserved to
1870 represent the default texture for each texture target.
1871 Texture names and the corresponding texture contents are local to
1872 the shared display-list space (see "
1873 (code "glXCreateContext")
1875 GL rendering context;
1876 two rendering contexts share texture names only if they
1877 also share display lists. ")
1880 (code "glGenTextures")
1881 " to generate a set of new texture names. ")
1883 When a texture is first bound, it assumes the specified target:
1884 A texture first bound to "
1885 (code "GL_TEXTURE_1D")
1886 " becomes one-dimensional texture, a
1887 texture first bound to "
1888 (code "GL_TEXTURE_2D")
1889 " becomes two-dimensional texture, a
1890 texture first bound to "
1891 (code "GL_TEXTURE_3D")
1892 " becomes three-dimensional texture, and a
1893 texture first bound to "
1894 (code "GL_TEXTURE_CUBE_MAP")
1896 becomes a cube-mapped texture. The state of a one-dimensional texture
1897 immediately after it is first bound is equivalent to the state of the
1899 (code "GL_TEXTURE_1D")
1900 " at GL initialization, and similarly for two-
1901 and three-dimensional textures and cube-mapped textures. ")
1903 While a texture is bound, GL operations on the target to which it is
1904 bound affect the bound texture, and queries of the target to which it
1905 is bound return state from the bound texture. If texture mapping is active
1906 on the target to which a texture is bound, the bound texture is used.
1907 In effect, the texture targets become aliases for the textures currently
1908 bound to them, and the texture name zero refers to the default textures
1909 that were bound to them at initialization. ")
1911 A texture binding created with "
1912 (code "glBindTexture")
1913 " remains active until a different
1914 texture is bound to the same target, or until the bound texture is
1916 (code "glDeleteTextures")
1919 Once created, a named texture may be re-bound to its same original target as often as needed.
1920 It is usually much faster to use "
1921 (code "glBindTexture")
1922 " to bind an existing named
1923 texture to one of the texture targets than it is to reload the texture image
1925 (code "glTexImage1D")
1927 (code "glTexImage2D")
1929 (code "glTexImage3D")
1931 For additional control over performance, use "
1932 (code "glPrioritizeTextures")
1934 (para (code "glBindTexture")
1935 " is included in display lists. ")
1937 (para (code "GL_INVALID_ENUM")
1940 " is not one of the allowable
1942 (para (code "GL_INVALID_OPERATION")
1945 " was previously created with a target
1946 that doesn't match that of "
1949 (para (code "GL_INVALID_OPERATION")
1951 (code "glBindTexture")
1953 between the execution of "
1955 " and the corresponding
1960 (define-gl-procedure
1965 (funcdef "void " (function "glBitmap"))
1966 (paramdef "GLsizei " (parameter "width"))
1967 (paramdef "GLsizei " (parameter "height"))
1968 (paramdef "GLfloat " (parameter "xorig"))
1969 (paramdef "GLfloat " (parameter "yorig"))
1970 (paramdef "GLfloat " (parameter "xmove"))
1971 (paramdef "GLfloat " (parameter "ymove"))
1974 (parameter "bitmap"))))
1976 (heading "draw a bitmap")
1977 (heading "Parameters")
1978 (table (% (formatter (asis)))
1979 (entry (% (heading (var "width")))
1980 (itemx (var "height"))
1982 Specify the pixel width and height of the bitmap image. "))
1983 (entry (% (heading (var "xorig")))
1984 (itemx (var "yorig"))
1986 Specify the location of the origin in the bitmap image.
1987 The origin is measured from the lower left corner of the bitmap,
1988 with right and up being the positive axes. "))
1989 (entry (% (heading (var "xmove")))
1990 (itemx (var "ymove"))
1996 " offsets to be added to the current raster position
1997 after the bitmap is drawn. "))
1998 (entry (% (heading (var "bitmap")))
2000 Specifies the address of the bitmap image. ")))
2001 (heading "Description")
2003 A bitmap is a binary image.
2005 the bitmap is positioned relative to the current raster position,
2006 and frame buffer pixels corresponding to 1's in the bitmap are
2007 written using the current raster color or index.
2008 Frame buffer pixels corresponding to 0's in the bitmap are not modified. ")
2009 (para (code "glBitmap")
2010 " takes seven arguments.
2011 The first pair specifies the width and height of the bitmap image.
2012 The second pair specifies the location of the bitmap origin relative
2013 to the lower left corner of the bitmap image.
2014 The third pair of arguments specifies "
2018 " offsets to be added
2019 to the current raster position after the bitmap has been drawn.
2020 The final argument is a pointer to the bitmap image itself. ")
2022 If a non-zero named buffer object is bound to the "
2023 (code "GL_PIXEL_UNPACK_BUFFER")
2026 (code "glBindBuffer")
2027 ") while a bitmap image is
2030 " is treated as a byte offset into the buffer object's data store. ")
2032 The bitmap image is interpreted like image data for the "
2033 (code "glDrawPixels")
2040 " corresponding to the width and height arguments
2050 (code "GL_COLOR_INDEX")
2052 Modes specified using "
2053 (code "glPixelStore")
2055 interpretation of bitmap image data;
2056 modes specified using "
2057 (code "glPixelTransfer")
2060 If the current raster position is invalid, "
2064 the lower left corner of the bitmap image is positioned at the window coordinates ")
2065 (para (math (var "x")
2079 (para (math (var "y")
2105 is the raster position
2117 is the bitmap origin.
2118 Fragments are then generated for each pixel corresponding to a 1 (one)
2119 in the bitmap image.
2120 These fragments are generated using the current raster "
2123 color or color index, and current raster texture coordinates.
2124 They are then treated just as if they had been generated
2125 by a point, line, or polygon,
2126 including texture mapping,
2128 and all per-fragment operations such as alpha and depth testing. ")
2130 After the bitmap has been drawn,
2135 " coordinates of the current raster position are offset by "
2140 No change is made to the "
2142 " coordinate of the current raster position,
2143 or to the current raster color, texture coordinates, or index. ")
2145 (para (code "GL_INVALID_VALUE")
2151 (para (code "GL_INVALID_OPERATION")
2152 " is generated if a non-zero buffer object name is bound to the "
2153 (code "GL_PIXEL_UNPACK_BUFFER")
2154 " target and the buffer object's data store is currently mapped. ")
2155 (para (code "GL_INVALID_OPERATION")
2156 " is generated if a non-zero buffer object name is bound to the "
2157 (code "GL_PIXEL_UNPACK_BUFFER")
2158 " target and the data would be unpacked from the buffer
2159 object such that the memory reads required would exceed the data store size. ")
2160 (para (code "GL_INVALID_OPERATION")
2164 is executed between the execution of "
2166 " and the corresponding execution of "
2170 (define-gl-procedure
2175 (funcdef "void " (function "glBlendColor"))
2176 (paramdef "GLclampf " (parameter "red"))
2177 (paramdef "GLclampf " (parameter "green"))
2178 (paramdef "GLclampf " (parameter "blue"))
2179 (paramdef "GLclampf " (parameter "alpha"))))
2181 (heading "set the blend color")
2182 (heading "Parameters")
2183 (table (% (formatter (asis)))
2184 (entry (% (heading (var "red")))
2185 (itemx (var "green"))
2186 (itemx (var "blue"))
2187 (itemx (var "alpha"))
2189 specify the components of "
2190 (code "GL_BLEND_COLOR"))))
2191 (heading "Description")
2194 (code "GL_BLEND_COLOR")
2195 " may be used to calculate the source and destination
2196 blending factors. The color components are clamped to the range "
2197 (math "[" "0" "," "1" "]")
2199 before being stored. See "
2200 (code "glBlendFunc")
2201 " for a complete description of the
2202 blending operations.
2204 (code "GL_BLEND_COLOR")
2205 " is set to (0, 0, 0, 0). ")
2207 (para (code "GL_INVALID_OPERATION")
2209 (code "glBlendColor")
2211 between the execution of "
2213 " and the corresponding
2219 (define-gl-procedure
2220 glBlendEquationSeparate
2221 "glBlendEquationSeparate"
2226 (function "glBlendEquationSeparate"))
2227 (paramdef "GLenum " (parameter "modeRGB"))
2228 (paramdef "GLenum " (parameter "modeAlpha"))))
2231 "set the RGB blend equation and the alpha blend equation separately")
2232 (heading "Parameters")
2233 (table (% (formatter (asis)))
2234 (entry (% (heading (var "modeRGB")))
2236 specifies the RGB blend equation, how the red, green, and blue components of the source and destination colors are combined.
2238 (code "GL_FUNC_ADD")
2240 (code "GL_FUNC_SUBTRACT")
2242 (code "GL_FUNC_REVERSE_SUBTRACT")
2248 (entry (% (heading (var "modeAlpha")))
2250 specifies the alpha blend equation, how the alpha component of the source and destination colors are combined.
2252 (code "GL_FUNC_ADD")
2254 (code "GL_FUNC_SUBTRACT")
2256 (code "GL_FUNC_REVERSE_SUBTRACT")
2262 (heading "Description")
2264 The blend equations determines how a new pixel (the ''source'' color)
2265 is combined with a pixel already in the framebuffer (the ''destination''
2266 color). This function specifies one blend equation for the RGB-color
2267 components and one blend equation for the alpha component. ")
2269 The blend equations use the source and destination blend factors
2270 specified by either "
2271 (code "glBlendFunc")
2273 (code "glBlendFuncSeparate")
2276 (code "glBlendFunc")
2278 (code "glBlendFuncSeparate")
2280 for a description of the various blend factors. ")
2282 In the equations that follow, source and destination
2283 color components are referred to as "
2318 The result color is referred to as "
2335 The source and destination blend factors are denoted "
2370 For these equations all color components are understood to have values
2372 (math "[" "0" "," "1" "]")
2374 (table (% (formatter (asis)))
2375 (entry (% (heading (strong "Mode")))
2376 (para (strong "RGB Components")
2378 (strong "Alpha Component")))
2379 (entry (% (heading (code "GL_FUNC_ADD")))
2380 (para (math (var "Rr")
2449 (entry (% (heading (code "GL_FUNC_SUBTRACT")))
2450 (para (math (var "Rr")
2519 (entry (% (heading (code "GL_FUNC_REVERSE_SUBTRACT")))
2520 (para (math (var "Rr")
2589 (entry (% (heading (code "GL_MIN")))
2590 (para (math (var "Rr")
2643 (entry (% (heading (code "GL_MAX")))
2644 (para (math (var "Rr")
2698 The results of these equations are clamped to the range "
2699 (math "[" "0" "," "1" "]")
2706 " equations are useful for applications
2707 that analyze image data (image thresholding against a constant color,
2710 (code "GL_FUNC_ADD")
2711 " equation is useful
2712 for antialiasing and transparency, among other things. ")
2714 Initially, both the RGB blend equation and the alpha blend equation are set to "
2715 (code "GL_FUNC_ADD")
2719 (para (code "GL_INVALID_ENUM")
2720 " is generated if either "
2725 (code "GL_FUNC_ADD")
2727 (code "GL_FUNC_SUBTRACT")
2729 (code "GL_FUNC_REVERSE_SUBTRACT")
2735 (para (code "GL_INVALID_OPERATION")
2737 (code "glBlendEquationSeparate")
2739 between the execution of "
2741 " and the corresponding
2746 (define-gl-procedure
2751 (funcdef "void " (function "glBlendEquation"))
2752 (paramdef "GLenum " (parameter "mode"))))
2755 "specify the equation used for both the RGB blend equation and the Alpha blend equation")
2756 (heading "Parameters")
2757 (table (% (formatter (asis)))
2758 (entry (% (heading (var "mode")))
2760 specifies how source and destination colors are combined.
2762 (code "GL_FUNC_ADD")
2764 (code "GL_FUNC_SUBTRACT")
2766 (code "GL_FUNC_REVERSE_SUBTRACT")
2772 (heading "Description")
2774 The blend equations determine how a new pixel (the ''source'' color)
2775 is combined with a pixel already in the framebuffer (the ''destination''
2776 color). This function sets both the RGB blend equation and the alpha
2777 blend equation to a single equation. ")
2779 These equations use the source and destination blend factors
2780 specified by either "
2781 (code "glBlendFunc")
2783 (code "glBlendFuncSeparate")
2786 (code "glBlendFunc")
2788 (code "glBlendFuncSeparate")
2790 for a description of the various blend factors. ")
2792 In the equations that follow, source and destination
2793 color components are referred to as "
2828 The result color is referred to as "
2845 The source and destination blend factors are denoted "
2880 For these equations all color components are understood to have values
2882 (math "[" "0" "," "1" "]")
2884 (table (% (formatter (asis)))
2885 (entry (% (heading (strong "Mode")))
2886 (para (strong "RGB Components")
2888 (strong "Alpha Component")))
2889 (entry (% (heading (code "GL_FUNC_ADD")))
2890 (para (math (var "Rr")
2959 (entry (% (heading (code "GL_FUNC_SUBTRACT")))
2960 (para (math (var "Rr")
3029 (entry (% (heading (code "GL_FUNC_REVERSE_SUBTRACT")))
3030 (para (math (var "Rr")
3099 (entry (% (heading (code "GL_MIN")))
3100 (para (math (var "Rr")
3153 (entry (% (heading (code "GL_MAX")))
3154 (para (math (var "Rr")
3208 The results of these equations are clamped to the range "
3209 (math "[" "0" "," "1" "]")
3216 " equations are useful for applications
3217 that analyze image data (image thresholding against a constant color,
3220 (code "GL_FUNC_ADD")
3221 " equation is useful
3222 for antialiasing and transparency, among other things. ")
3224 Initially, both the RGB blend equation and the alpha blend equation are set to "
3225 (code "GL_FUNC_ADD")
3229 (para (code "GL_INVALID_ENUM")
3233 (code "GL_FUNC_ADD")
3235 (code "GL_FUNC_SUBTRACT")
3237 (code "GL_FUNC_REVERSE_SUBTRACT")
3243 (para (code "GL_INVALID_OPERATION")
3245 (code "glBlendEquation")
3247 between the execution of "
3249 " and the corresponding
3254 (define-gl-procedure
3256 "glBlendFuncSeparate"
3261 (function "glBlendFuncSeparate"))
3262 (paramdef "GLenum " (parameter "srcRGB"))
3263 (paramdef "GLenum " (parameter "dstRGB"))
3264 (paramdef "GLenum " (parameter "srcAlpha"))
3265 (paramdef "GLenum " (parameter "dstAlpha"))))
3268 "specify pixel arithmetic for RGB and alpha components separately")
3269 (heading "Parameters")
3270 (table (% (formatter (asis)))
3271 (entry (% (heading (var "srcRGB")))
3273 Specifies how the red, green, and blue blending factors are computed.
3274 The following symbolic constants are accepted: "
3279 (code "GL_SRC_COLOR")
3281 (code "GL_ONE_MINUS_SRC_COLOR")
3283 (code "GL_DST_COLOR")
3285 (code "GL_ONE_MINUS_DST_COLOR")
3287 (code "GL_SRC_ALPHA")
3289 (code "GL_ONE_MINUS_SRC_ALPHA")
3291 (code "GL_DST_ALPHA")
3293 (code "GL_ONE_MINUS_DST_ALPHA")
3295 (code "GL_CONSTANT_COLOR")
3297 (code "GL_ONE_MINUS_CONSTANT_COLOR")
3299 (code "GL_CONSTANT_ALPHA")
3301 (code "GL_ONE_MINUS_CONSTANT_ALPHA")
3303 (code "GL_SRC_ALPHA_SATURATE")
3305 The initial value is "
3308 (entry (% (heading (var "dstRGB")))
3310 Specifies how the red, green, and blue destination blending factors are
3311 computed. The following symbolic constants are accepted: "
3316 (code "GL_SRC_COLOR")
3318 (code "GL_ONE_MINUS_SRC_COLOR")
3320 (code "GL_DST_COLOR")
3322 (code "GL_ONE_MINUS_DST_COLOR")
3324 (code "GL_SRC_ALPHA")
3326 (code "GL_ONE_MINUS_SRC_ALPHA")
3328 (code "GL_DST_ALPHA")
3330 (code "GL_ONE_MINUS_DST_ALPHA")
3332 (code "GL_CONSTANT_COLOR")
3334 (code "GL_ONE_MINUS_CONSTANT_COLOR")
3336 (code "GL_CONSTANT_ALPHA")
3338 (code "GL_ONE_MINUS_CONSTANT_ALPHA")
3340 The initial value is "
3343 (entry (% (heading (var "srcAlpha")))
3345 Specified how the alpha source blending factor is computed. The same
3346 symbolic constants are accepted as for "
3349 The initial value is "
3352 (entry (% (heading (var "dstAlpha")))
3354 Specified how the alpha destination blending factor is computed. The same
3355 symbolic constants are accepted as for "
3358 The initial value is "
3361 (heading "Description")
3363 In RGBA mode, pixels can be drawn using a function that blends
3364 the incoming (source) RGBA values with the RGBA values
3365 that are already in the frame buffer (the destination values).
3366 Blending is initially disabled.
3374 to enable and disable blending. ")
3375 (para (code "glBlendFuncSeparate")
3376 " defines the operation of blending when it is enabled. "
3378 " specifies which method is used to scale the
3379 source RGB-color components. "
3381 " specifies which method is used to scale the
3382 destination RGB-color components.
3385 " specifies which method is used to scale the source alpha
3386 color component, and "
3388 " specifies which method is used to scale the
3389 destination alpha component.
3390 The possible methods are described in the following table.
3391 Each method defines four scale factors,
3392 one each for red, green, blue, and alpha. ")
3394 In the table and in subsequent equations, source and destination
3395 color components are referred to as "
3429 The color specified by "
3430 (code "glBlendColor")
3431 " is referred to as "
3448 They are understood to have integer values between 0 and "
3466 (para (para (math (var "k")
3496 is the number of red,
3499 and alpha bitplanes. ")
3501 Source and destination scale factors are referred to as "
3535 All scale factors have range "
3536 (math "[" "0" "," "1" "]")
3539 (table (% (formatter (asis)))
3540 (entry (% (heading (strong "Parameter")))
3541 (para (strong "RGB Factor")
3543 (strong "Alpha Factor")))
3544 (entry (% (heading (code "GL_ZERO")))
3545 (para (math "(" "0" "," "0" "0" ")")
3548 (entry (% (heading (code "GL_ONE")))
3549 (para (math "(" "1" "," "1" "1" ")")
3552 (entry (% (heading (code "GL_SRC_COLOR")))
3585 (entry (% (heading (code "GL_ONE_MINUS_SRC_COLOR")))
3628 (entry (% (heading (code "GL_DST_COLOR")))
3661 (entry (% (heading (code "GL_ONE_MINUS_DST_COLOR")))
3703 (entry (% (heading (code "GL_SRC_ALPHA")))
3736 (entry (% (heading (code "GL_ONE_MINUS_SRC_ALPHA")))
3778 (entry (% (heading (code "GL_DST_ALPHA")))
3811 (entry (% (heading (code "GL_ONE_MINUS_DST_ALPHA")))
3853 (entry (% (heading (code "GL_CONSTANT_COLOR")))
3867 (math (var "A") "_" (var "c"))))
3868 (entry (% (heading (code "GL_ONE_MINUS_CONSTANT_COLOR")))
3889 (math "1" "-" (var "A") "_" (var "c"))))
3890 (entry (% (heading (code "GL_CONSTANT_ALPHA")))
3904 (math (var "A") "_" (var "c"))))
3905 (entry (% (heading (code "GL_ONE_MINUS_CONSTANT_ALPHA")))
3926 (math "1" "-" (var "A") "_" (var "c"))))
3927 (entry (% (heading (code "GL_SRC_ALPHA_SATURATE")))
3928 (para (math "(" (var "i") "," (var "i") (var "i") ")")
3933 (para (para (math (var "i")
3950 To determine the blended RGBA values of a pixel when drawing in RGBA mode,
3951 the system uses the following equations: ")
3952 (para (para (math (var "R")
4061 Despite the apparent precision of the above equations, blending arithmetic
4062 is not exactly specified, because blending operates with imprecise integer
4063 color values. However, a blend factor that should be equal to 1 is
4064 guaranteed not to modify its multiplicand, and a blend factor equal to 0
4065 reduces its multiplicand to 0. For example, when "
4068 (code "GL_SRC_ALPHA")
4072 (code "GL_ONE_MINUS_SRC_ALPHA")
4074 (math (var "A") "_" (var "s"))
4078 (math (var "k") "_" (var "A"))
4080 the equations reduce to simple replacement: ")
4081 (para (para (math (var "R")
4111 (para (code "GL_INVALID_ENUM")
4112 " is generated if either "
4118 (para (code "GL_INVALID_OPERATION")
4120 (code "glBlendFuncSeparate")
4122 is executed between the execution of "
4125 and the corresponding execution of "
4129 (define-gl-procedure
4134 (funcdef "void " (function "glBlendFunc"))
4135 (paramdef "GLenum " (parameter "sfactor"))
4136 (paramdef "GLenum " (parameter "dfactor"))))
4138 (heading "specify pixel arithmetic")
4139 (heading "Parameters")
4140 (table (% (formatter (asis)))
4141 (entry (% (heading (var "sfactor")))
4143 Specifies how the red, green, blue,
4144 and alpha source blending factors are computed.
4145 The following symbolic constants are accepted: "
4150 (code "GL_SRC_COLOR")
4152 (code "GL_ONE_MINUS_SRC_COLOR")
4154 (code "GL_DST_COLOR")
4156 (code "GL_ONE_MINUS_DST_COLOR")
4158 (code "GL_SRC_ALPHA")
4160 (code "GL_ONE_MINUS_SRC_ALPHA")
4162 (code "GL_DST_ALPHA")
4164 (code "GL_ONE_MINUS_DST_ALPHA")
4166 (code "GL_CONSTANT_COLOR")
4168 (code "GL_ONE_MINUS_CONSTANT_COLOR")
4170 (code "GL_CONSTANT_ALPHA")
4172 (code "GL_ONE_MINUS_CONSTANT_ALPHA")
4174 (code "GL_SRC_ALPHA_SATURATE")
4176 The initial value is "
4179 (entry (% (heading (var "dfactor")))
4181 Specifies how the red, green, blue,
4182 and alpha destination blending factors are computed.
4183 The following symbolic constants are accepted: "
4188 (code "GL_SRC_COLOR")
4190 (code "GL_ONE_MINUS_SRC_COLOR")
4192 (code "GL_DST_COLOR")
4194 (code "GL_ONE_MINUS_DST_COLOR")
4196 (code "GL_SRC_ALPHA")
4198 (code "GL_ONE_MINUS_SRC_ALPHA")
4200 (code "GL_DST_ALPHA")
4202 (code "GL_ONE_MINUS_DST_ALPHA")
4204 (code "GL_CONSTANT_COLOR")
4206 (code "GL_ONE_MINUS_CONSTANT_COLOR")
4208 (code "GL_CONSTANT_ALPHA")
4210 (code "GL_ONE_MINUS_CONSTANT_ALPHA")
4212 The initial value is "
4215 (heading "Description")
4217 In RGBA mode, pixels can be drawn using a function that blends
4218 the incoming (source) RGBA values with the RGBA values
4219 that are already in the frame buffer (the destination values).
4220 Blending is initially disabled.
4228 to enable and disable blending. ")
4229 (para (code "glBlendFunc")
4230 " defines the operation of blending when it is enabled. "
4232 " specifies which method is used to scale the
4233 source color components. "
4235 " specifies which method is used to scale the
4236 destination color components.
4237 The possible methods are described in the following table.
4238 Each method defines four scale factors,
4239 one each for red, green, blue, and alpha.
4240 In the table and in subsequent equations, source and destination
4241 color components are referred to as "
4275 The color specified by "
4276 (code "glBlendColor")
4277 " is referred to as "
4294 They are understood to have integer values between 0 and "
4312 (para (para (math (var "k")
4342 is the number of red,
4345 and alpha bitplanes. ")
4347 Source and destination scale factors are referred to as "
4381 The scale factors described in the table,
4399 represent either source or destination factors.
4400 All scale factors have range "
4401 (math "[" "0" "," "1" "]")
4404 (table (% (formatter (asis)))
4405 (entry (% (heading (strong "Parameter")))
4422 (entry (% (heading (code "GL_ZERO")))
4423 (para (math "(" "0" "," "0" "0" "0" ")")))
4424 (entry (% (heading (code "GL_ONE")))
4425 (para (math "(" "1" "," "1" "1" "1" ")")))
4426 (entry (% (heading (code "GL_SRC_COLOR")))
4458 (entry (% (heading (code "GL_ONE_MINUS_SRC_COLOR")))
4498 (entry (% (heading (code "GL_DST_COLOR")))
4530 (entry (% (heading (code "GL_ONE_MINUS_DST_COLOR")))
4570 (entry (% (heading (code "GL_SRC_ALPHA")))
4602 (entry (% (heading (code "GL_ONE_MINUS_SRC_ALPHA")))
4642 (entry (% (heading (code "GL_DST_ALPHA")))
4674 (entry (% (heading (code "GL_ONE_MINUS_DST_ALPHA")))
4714 (entry (% (heading (code "GL_CONSTANT_COLOR")))
4730 (entry (% (heading (code "GL_ONE_MINUS_CONSTANT_COLOR")))
4754 (entry (% (heading (code "GL_CONSTANT_ALPHA")))
4770 (entry (% (heading (code "GL_ONE_MINUS_CONSTANT_ALPHA")))
4794 (entry (% (heading (code "GL_SRC_ALPHA_SATURATE")))
4804 (para (para (math (var "i")
4826 To determine the blended RGBA values of a pixel when drawing in RGBA mode,
4827 the system uses the following equations: ")
4828 (para (para (math (var "R")
4937 Despite the apparent precision of the above equations,
4938 blending arithmetic is not exactly specified,
4939 because blending operates with imprecise integer color values.
4941 a blend factor that should be equal to 1
4942 is guaranteed not to modify its multiplicand,
4943 and a blend factor equal to 0 reduces its multiplicand to 0.
4948 (code "GL_SRC_ALPHA")
4952 (code "GL_ONE_MINUS_SRC_ALPHA")
4955 (math (var "A") "_" (var "s"))
4958 (math (var "k") "_" (var "A"))
4960 the equations reduce to simple replacement: ")
4961 (para (para (math (var "R")
4991 (para (code "GL_INVALID_ENUM")
4992 " is generated if either "
4998 (para (code "GL_INVALID_OPERATION")
5000 (code "glBlendFunc")
5002 is executed between the execution of "
5005 and the corresponding execution of "
5009 (define-gl-procedure
5014 (funcdef "void " (function "glBufferData"))
5015 (paramdef "GLenum " (parameter "target"))
5016 (paramdef "GLsizeiptr " (parameter "size"))
5017 (paramdef "const GLvoid * " (parameter "data"))
5018 (paramdef "GLenum " (parameter "usage"))))
5021 "creates and initializes a buffer object's data store")
5022 (heading "Parameters")
5023 (table (% (formatter (asis)))
5024 (entry (% (heading (var "target")))
5026 Specifies the target buffer object.
5027 The symbolic constant must be "
5028 (code "GL_ARRAY_BUFFER")
5030 (code "GL_ELEMENT_ARRAY_BUFFER")
5032 (code "GL_PIXEL_PACK_BUFFER")
5034 (code "GL_PIXEL_UNPACK_BUFFER")
5036 (entry (% (heading (var "size")))
5038 Specifies the size in bytes of the buffer object's new data store. "))
5039 (entry (% (heading (var "data")))
5041 Specifies a pointer to data that will be copied into the data store for initialization,
5044 " if no data is to be copied. "))
5045 (entry (% (heading (var "usage")))
5047 Specifies the expected usage pattern of the data store. The symbolic constant must be "
5048 (code "GL_STREAM_DRAW")
5050 (code "GL_STREAM_READ")
5052 (code "GL_STREAM_COPY")
5054 (code "GL_STATIC_DRAW")
5056 (code "GL_STATIC_READ")
5058 (code "GL_STATIC_COPY")
5060 (code "GL_DYNAMIC_DRAW")
5062 (code "GL_DYNAMIC_READ")
5064 (code "GL_DYNAMIC_COPY")
5066 (heading "Description")
5067 (para (code "glBufferData")
5068 " creates a new data store for the buffer object currently bound to "
5070 ". Any pre-existing data store is deleted. The new data store is created with the
5080 ", the data store is initialized with data from this pointer. In its initial
5081 state, the new data store is not mapped, it has a "
5083 " mapped pointer, and its mapped access
5085 (code "GL_READ_WRITE")
5088 " is a hint to the GL implementation as to how a buffer object's data store will be
5089 accessed. This enables the GL implementation to make more intelligent decisions that may significantly
5090 impact buffer object performance. It does not, however, constrain the actual usage of the data store. "
5092 " can be broken down into two parts: first, the frequency of access (modification
5093 and usage), and second, the nature of that access. The frequency of access may be one of these: ")
5094 (table (% (formatter (asis)))
5095 (entry (% (heading "STREAM"))
5097 The data store contents will be modified once and used at most a few times. "))
5098 (entry (% (heading "STATIC"))
5100 The data store contents will be modified once and used many times. "))
5101 (entry (% (heading "DYNAMIC"))
5103 The data store contents will be modified repeatedly and used many times. ")))
5105 The nature of access may be one of these: ")
5106 (table (% (formatter (asis)))
5107 (entry (% (heading "DRAW"))
5109 The data store contents are modified by the application, and used as the source for GL drawing and
5110 image specification commands. "))
5111 (entry (% (heading "READ"))
5113 The data store contents are modified by reading data from the GL, and used to return that data
5114 when queried by the application. "))
5115 (entry (% (heading "COPY"))
5117 The data store contents are modified by reading data from the GL, and used as the source for GL
5118 drawing and image specification commands. ")))
5120 (para (code "GL_INVALID_ENUM")
5124 (code "GL_ARRAY_BUFFER")
5126 (code "GL_ELEMENT_ARRAY_BUFFER")
5128 (code "GL_PIXEL_PACK_BUFFER")
5130 (code "GL_PIXEL_UNPACK_BUFFER")
5132 (para (code "GL_INVALID_ENUM")
5136 (code "GL_STREAM_DRAW")
5138 (code "GL_STREAM_READ")
5140 (code "GL_STREAM_COPY")
5142 (code "GL_STATIC_DRAW")
5144 (code "GL_STATIC_READ")
5146 (code "GL_STATIC_COPY")
5148 (code "GL_DYNAMIC_DRAW")
5150 (code "GL_DYNAMIC_READ")
5152 (code "GL_DYNAMIC_COPY")
5154 (para (code "GL_INVALID_VALUE")
5158 (para (code "GL_INVALID_OPERATION")
5159 " is generated if the reserved buffer object name 0 is bound to "
5162 (para (code "GL_OUT_OF_MEMORY")
5163 " is generated if the GL is unable to create a data store with the specified "
5166 (para (code "GL_INVALID_OPERATION")
5168 (code "glBufferData")
5170 is executed between the execution of "
5172 " and the corresponding execution of "
5176 (define-gl-procedure
5181 (funcdef "void " (function "glBufferSubData"))
5182 (paramdef "GLenum " (parameter "target"))
5183 (paramdef "GLintptr " (parameter "offset"))
5184 (paramdef "GLsizeiptr " (parameter "size"))
5185 (paramdef "const GLvoid * " (parameter "data"))))
5188 "updates a subset of a buffer object's data store")
5189 (heading "Parameters")
5190 (table (% (formatter (asis)))
5191 (entry (% (heading (var "target")))
5193 Specifies the target buffer object.
5194 The symbolic constant must be "
5195 (code "GL_ARRAY_BUFFER")
5197 (code "GL_ELEMENT_ARRAY_BUFFER")
5199 (code "GL_PIXEL_PACK_BUFFER")
5201 (code "GL_PIXEL_UNPACK_BUFFER")
5203 (entry (% (heading (var "offset")))
5205 Specifies the offset into the buffer object's data store where data replacement will begin,
5206 measured in bytes. "))
5207 (entry (% (heading (var "size")))
5209 Specifies the size in bytes of the data store region being replaced. "))
5210 (entry (% (heading (var "data")))
5212 Specifies a pointer to the new data that will be copied into the data store. ")))
5213 (heading "Description")
5214 (para (code "glBufferSubData")
5215 " redefines some or all of the data store for the buffer object currently
5218 ". Data starting at byte offset "
5223 " bytes is copied to the data store from the memory pointed to by "
5225 ". An error is thrown if "
5230 together define a range beyond the bounds of the buffer object's data store. ")
5232 (para (code "GL_INVALID_ENUM")
5236 (code "GL_ARRAY_BUFFER")
5238 (code "GL_ELEMENT_ARRAY_BUFFER")
5240 (code "GL_PIXEL_PACK_BUFFER")
5242 (code "GL_PIXEL_UNPACK_BUFFER")
5244 (para (code "GL_INVALID_VALUE")
5249 " is negative, or if together they define a region of memory
5250 that extends beyond the buffer object's allocated data store. ")
5251 (para (code "GL_INVALID_OPERATION")
5252 " is generated if the reserved buffer object name 0 is bound to "
5255 (para (code "GL_INVALID_OPERATION")
5256 " is generated if the buffer object being updated is mapped. ")
5257 (para (code "GL_INVALID_OPERATION")
5259 (code "glBufferSubData")
5261 is executed between the execution of "
5263 " and the corresponding execution of "
5267 (define-gl-procedure
5272 (funcdef "void " (function "glCallLists"))
5273 (paramdef "GLsizei " (parameter "n"))
5274 (paramdef "GLenum " (parameter "type"))
5275 (paramdef "const GLvoid * " (parameter "lists"))))
5277 (heading "execute a list of display lists")
5278 (heading "Parameters")
5279 (table (% (formatter (asis)))
5280 (entry (% (heading (var "n")))
5282 Specifies the number of display lists to be executed. "))
5283 (entry (% (heading (var "type")))
5285 Specifies the type of values in "
5288 Symbolic constants "
5291 (code "GL_UNSIGNED_BYTE")
5295 (code "GL_UNSIGNED_SHORT")
5299 (code "GL_UNSIGNED_INT")
5309 (entry (% (heading (var "lists")))
5311 Specifies the address of an array of name offsets in the display list.
5312 The pointer type is void because the offsets can be bytes,
5316 depending on the value of "
5319 (heading "Description")
5320 (para (code "glCallLists")
5321 " causes each display list in the list of names passed as "
5326 the commands saved in each display list are executed in order,
5327 just as if they were called without using a display list.
5328 Names of display lists that have not been defined are ignored. ")
5329 (para (code "glCallLists")
5330 " provides an efficient means for executing more than one display list. "
5332 " allows lists with various name formats to be accepted.
5335 (table (% (formatter (asis)))
5336 (entry (% (heading (code "GL_BYTE")))
5338 " is treated as an array of signed bytes,
5343 (entry (% (heading (code "GL_UNSIGNED_BYTE")))
5345 " is treated as an array of unsigned bytes,
5346 each in the range 0 through 255. "))
5347 (entry (% (heading (code "GL_SHORT")))
5349 " is treated as an array of signed two-byte integers,
5354 (entry (% (heading (code "GL_UNSIGNED_SHORT")))
5356 " is treated as an array of unsigned two-byte integers,
5357 each in the range 0 through 65535. "))
5358 (entry (% (heading (code "GL_INT")))
5360 " is treated as an array of signed four-byte integers. "))
5361 (entry (% (heading (code "GL_UNSIGNED_INT")))
5363 " is treated as an array of unsigned four-byte integers. "))
5364 (entry (% (heading (code "GL_FLOAT")))
5366 " is treated as an array of four-byte floating-point values. "))
5367 (entry (% (heading (code "GL_2_BYTES")))
5369 " is treated as an array of unsigned bytes.
5370 Each pair of bytes specifies a single display-list name.
5371 The value of the pair is computed as 256 times the unsigned value
5372 of the first byte plus the unsigned value of the second byte. "))
5373 (entry (% (heading (code "GL_3_BYTES")))
5375 " is treated as an array of unsigned bytes.
5376 Each triplet of bytes specifies a single display-list name.
5377 The value of the triplet is computed as 65536 times the unsigned value
5379 plus 256 times the unsigned value of the second byte,
5380 plus the unsigned value of the third byte. "))
5381 (entry (% (heading (code "GL_4_BYTES")))
5383 " is treated as an array of unsigned bytes.
5384 Each quadruplet of bytes specifies a single display-list name.
5385 The value of the quadruplet is computed as 16777216 times the unsigned value
5387 plus 65536 times the unsigned value of the second byte,
5388 plus 256 times the unsigned value of the third byte,
5389 plus the unsigned value of the fourth byte. ")))
5391 The list of display-list names is not null-terminated.
5394 " specifies how many names are to be taken from "
5398 An additional level of indirection is made available with the "
5401 which specifies an unsigned offset that is added to each display-list
5404 " before that display list is executed. ")
5405 (para (code "glCallLists")
5406 " can appear inside a display list.
5407 To avoid the possibility of infinite recursion resulting from display lists
5408 calling one another,
5409 a limit is placed on the nesting level of display
5410 lists during display-list execution.
5411 This limit must be at least 64, and it depends on the implementation. ")
5413 GL state is not saved and restored across a call to "
5414 (code "glCallLists")
5417 changes made to GL state during the execution of the display lists
5418 remain after execution is completed.
5420 (code "glPushAttrib")
5422 (code "glPopAttrib")
5424 (code "glPushMatrix")
5427 (code "glPopMatrix")
5428 " to preserve GL state across "
5429 (code "glCallLists")
5432 (para (code "GL_INVALID_VALUE")
5436 (para (code "GL_INVALID_ENUM")
5442 (code "GL_UNSIGNED_BYTE")
5446 (code "GL_UNSIGNED_SHORT")
5450 (code "GL_UNSIGNED_INT")
5461 (define-gl-procedure
5466 (funcdef "void " (function "glCallList"))
5467 (paramdef "GLuint " (parameter "list"))))
5469 (heading "execute a display list")
5470 (heading "Parameters")
5471 (table (% (formatter (asis)))
5472 (entry (% (heading (var "list")))
5474 Specifies the integer name of the display list to be executed. ")))
5475 (heading "Description")
5476 (para (code "glCallList")
5477 " causes the named display list to be executed.
5478 The commands saved in the display list are executed in order,
5479 just as if they were called without using a display list.
5482 " has not been defined as a display list, "
5485 (para (code "glCallList")
5486 " can appear inside a display list.
5487 To avoid the possibility of infinite recursion resulting from display lists
5488 calling one another,
5489 a limit is placed on the nesting level of display
5490 lists during display-list execution.
5491 This limit is at least 64, and it depends on the implementation. ")
5493 GL state is not saved and restored across a call to "
5497 changes made to GL state during the execution of a display list
5498 remain after execution of the display list is completed.
5500 (code "glPushAttrib")
5502 (code "glPopAttrib")
5504 (code "glPushMatrix")
5507 (code "glPopMatrix")
5508 " to preserve GL state across "
5512 (define-gl-procedure
5517 (funcdef "void " (function "glClearAccum"))
5518 (paramdef "GLfloat " (parameter "red"))
5519 (paramdef "GLfloat " (parameter "green"))
5520 (paramdef "GLfloat " (parameter "blue"))
5521 (paramdef "GLfloat " (parameter "alpha"))))
5524 "specify clear values for the accumulation buffer")
5525 (heading "Parameters")
5526 (table (% (formatter (asis)))
5527 (entry (% (heading (var "red")))
5528 (itemx (var "green"))
5529 (itemx (var "blue"))
5530 (itemx (var "alpha"))
5532 Specify the red, green, blue, and alpha values used when the
5533 accumulation buffer is cleared.
5534 The initial values are all 0. ")))
5535 (heading "Description")
5536 (para (code "glClearAccum")
5537 " specifies the red, green, blue, and alpha values used by "
5540 to clear the accumulation buffer. ")
5542 Values specified by "
5543 (code "glClearAccum")
5544 " are clamped to the
5546 (math "[" "-1" "," "1" "]")
5549 (para (code "GL_INVALID_OPERATION")
5551 (code "glClearAccum")
5553 is executed between the execution of "
5556 and the corresponding execution of "
5560 (define-gl-procedure
5565 (funcdef "void " (function "glClearColor"))
5566 (paramdef "GLclampf " (parameter "red"))
5567 (paramdef "GLclampf " (parameter "green"))
5568 (paramdef "GLclampf " (parameter "blue"))
5569 (paramdef "GLclampf " (parameter "alpha"))))
5572 "specify clear values for the color buffers")
5573 (heading "Parameters")
5574 (table (% (formatter (asis)))
5575 (entry (% (heading (var "red")))
5576 (itemx (var "green"))
5577 (itemx (var "blue"))
5578 (itemx (var "alpha"))
5580 Specify the red, green, blue, and alpha values used when the
5581 color buffers are cleared.
5582 The initial values are all 0. ")))
5583 (heading "Description")
5584 (para (code "glClearColor")
5585 " specifies the red,
5588 and alpha values used by "
5590 " to clear the color buffers.
5591 Values specified by "
5592 (code "glClearColor")
5593 " are clamped to the range "
5594 (math "[" "0" "," "1" "]")
5597 (para (code "GL_INVALID_OPERATION")
5599 (code "glClearColor")
5601 is executed between the execution of "
5604 and the corresponding execution of "
5608 (define-gl-procedure
5613 (funcdef "void " (function "glClearDepth"))
5614 (paramdef "GLclampd " (parameter "depth"))))
5617 "specify the clear value for the depth buffer")
5618 (heading "Parameters")
5619 (table (% (formatter (asis)))
5620 (entry (% (heading (var "depth")))
5622 Specifies the depth value used when the depth buffer is cleared. The
5623 initial value is 1. ")))
5624 (heading "Description")
5625 (para (code "glClearDepth")
5626 " specifies the depth value used by "
5628 " to clear the depth buffer.
5629 Values specified by "
5630 (code "glClearDepth")
5631 " are clamped to the range "
5632 (math "[" "0" "," "1" "]")
5635 (para (code "GL_INVALID_OPERATION")
5637 (code "glClearDepth")
5639 is executed between the execution of "
5642 and the corresponding execution of "
5646 (define-gl-procedure
5651 (funcdef "void " (function "glClearIndex"))
5652 (paramdef "GLfloat " (parameter "c"))))
5655 "specify the clear value for the color index buffers")
5656 (heading "Parameters")
5657 (table (% (formatter (asis)))
5658 (entry (% (heading (var "c")))
5660 Specifies the index used when the color index buffers are cleared.
5661 The initial value is 0. ")))
5662 (heading "Description")
5663 (para (code "glClearIndex")
5664 " specifies the index used by "
5667 to clear the color index buffers. "
5672 " is converted to a fixed-point value with unspecified precision
5673 to the right of the binary point.
5674 The integer part of this value is then masked with "
5675 (math "2" "^" (var "m") "-" "1")
5680 is the number of bits in a color index stored in the frame buffer. ")
5682 (para (code "GL_INVALID_OPERATION")
5684 (code "glClearIndex")
5686 is executed between the execution of "
5689 and the corresponding execution of "
5693 (define-gl-procedure
5698 (funcdef "void " (function "glClearStencil"))
5699 (paramdef "GLint " (parameter "s"))))
5702 "specify the clear value for the stencil buffer")
5703 (heading "Parameters")
5704 (table (% (formatter (asis)))
5705 (entry (% (heading (var "s")))
5707 Specifies the index used when the stencil buffer is cleared.
5708 The initial value is 0. ")))
5709 (heading "Description")
5710 (para (code "glClearStencil")
5711 " specifies the index used by "
5713 " to clear the stencil buffer. "
5716 (math "2" "^" (var "m") "-" "1")
5721 is the number of bits in the stencil buffer. ")
5723 (para (code "GL_INVALID_OPERATION")
5725 (code "glClearStencil")
5727 is executed between the execution of "
5730 and the corresponding execution of "
5734 (define-gl-procedure
5739 (funcdef "void " (function "glClear"))
5740 (paramdef "GLbitfield " (parameter "mask"))))
5742 (heading "clear buffers to preset values")
5743 (heading "Parameters")
5744 (table (% (formatter (asis)))
5745 (entry (% (heading (var "mask")))
5747 Bitwise OR of masks that indicate the buffers to be cleared.
5748 The four masks are "
5749 (code "GL_COLOR_BUFFER_BIT")
5751 (code "GL_DEPTH_BUFFER_BIT")
5753 (code "GL_ACCUM_BUFFER_BIT")
5755 (code "GL_STENCIL_BUFFER_BIT")
5757 (heading "Description")
5758 (para (code "glClear")
5759 " sets the bitplane area of the window to values previously selected
5761 (code "glClearColor")
5763 (code "glClearIndex")
5765 (code "glClearDepth")
5767 (code "glClearStencil")
5769 (code "glClearAccum")
5771 Multiple color buffers can be cleared simultaneously by selecting
5772 more than one buffer at a time using "
5773 (code "glDrawBuffer")
5776 The pixel ownership test,
5778 dithering, and the buffer writemasks affect the operation of "
5781 The scissor box bounds the cleared region.
5787 and depth-buffering are ignored by "
5790 (para (code "glClear")
5791 " takes a single argument that is the bitwise OR of several
5792 values indicating which buffer is to be cleared. ")
5794 The values are as follows: ")
5795 (table (% (formatter (asis)))
5796 (entry (% (heading (code "GL_COLOR_BUFFER_BIT")))
5798 Indicates the buffers currently enabled for color
5800 (entry (% (heading (code "GL_DEPTH_BUFFER_BIT")))
5802 Indicates the depth buffer. "))
5803 (entry (% (heading (code "GL_ACCUM_BUFFER_BIT")))
5805 Indicates the accumulation buffer. "))
5806 (entry (% (heading (code "GL_STENCIL_BUFFER_BIT")))
5808 Indicates the stencil buffer. ")))
5810 The value to which each buffer is cleared depends on the setting of the
5811 clear value for that buffer. ")
5813 (para (code "GL_INVALID_VALUE")
5814 " is generated if any bit other than the four defined
5818 (para (code "GL_INVALID_OPERATION")
5822 is executed between the execution of "
5825 and the corresponding execution of "
5829 (define-gl-procedure
5830 glClientActiveTexture
5831 "glClientActiveTexture"
5836 (function "glClientActiveTexture"))
5837 (paramdef "GLenum " (parameter "texture"))))
5839 (heading "select active texture unit")
5840 (heading "Parameters")
5841 (table (% (formatter (asis)))
5842 (entry (% (heading (var "texture")))
5844 Specifies which texture unit to make active. The number
5845 of texture units is implementation dependent, but must be at least
5852 where i ranges from 0 to the value of "
5853 (code "GL_MAX_TEXTURE_COORDS")
5855 implementation-dependent value. The initial value is "
5856 (code "GL_TEXTURE0")
5858 (heading "Description")
5859 (para (code "glClientActiveTexture")
5860 " selects the vertex array client state parameters to be modified by "
5861 (code "glTexCoordPointer")
5862 ", and enabled or disabled with "
5863 (code "glEnableClientState")
5865 (code "glDisableClientState")
5867 when called with a parameter of "
5868 (code "GL_TEXTURE_COORD_ARRAY")
5871 (para (code "GL_INVALID_ENUM")
5879 i ranges from 0 to the value of "
5880 (code "GL_MAX_TEXTURE_COORDS")
5883 (define-gl-procedure
5888 (funcdef "void " (function "glClipPlane"))
5889 (paramdef "GLenum " (parameter "plane"))
5892 (parameter "equation"))))
5895 "specify a plane against which all geometry is clipped")
5896 (heading "Parameters")
5897 (table (% (formatter (asis)))
5898 (entry (% (heading (var "plane")))
5900 Specifies which clipping plane is being positioned.
5901 Symbolic names of the form "
5902 (code "GL_CLIP_PLANE")
5907 " is an integer between 0 and "
5908 (code "GL_MAX_CLIP_PLANES")
5912 (entry (% (heading (var "equation")))
5914 Specifies the address of an array of four double-precision floating-point values.
5915 These values are interpreted as a plane equation. ")))
5916 (heading "Description")
5918 Geometry is always clipped against the boundaries of a six-plane frustum
5926 (code "glClipPlane")
5927 " allows the specification of additional planes,
5928 not necessarily perpendicular to the "
5935 against which all geometry is clipped.
5936 To determine the maximum number of additional clipping planes, call "
5937 (code "glGetIntegerv")
5939 (code "GL_MAX_CLIP_PLANES")
5941 implementations support at least six such clipping planes.
5942 Because the resulting clipping region is the intersection
5943 of the defined half-spaces,
5944 it is always convex. ")
5945 (para (code "glClipPlane")
5946 " specifies a half-space using a four-component plane equation.
5948 (code "glClipPlane")
5951 " is transformed by the inverse of the modelview matrix
5952 and stored in the resulting eye coordinates.
5953 Subsequent changes to the modelview matrix have no effect on the
5954 stored plane-equation components.
5955 If the dot product of the eye coordinates of a vertex with the
5956 stored plane equation components is positive or zero,
5959 " with respect to that clipping plane.
5964 To enable and disable clipping planes, call "
5968 " with the argument "
5969 (code "GL_CLIP_PLANE")
5974 " is the plane number. ")
5976 All clipping planes are initially defined as (0, 0, 0, 0) in eye coordinates
5980 (para (code "GL_INVALID_ENUM")
5983 " is not an accepted value. ")
5984 (para (code "GL_INVALID_OPERATION")
5986 (code "glClipPlane")
5988 is executed between the execution of "
5991 and the corresponding execution of "
5995 (define-gl-procedure
6000 (funcdef "void " (function "glColorMask"))
6001 (paramdef "GLboolean " (parameter "red"))
6002 (paramdef "GLboolean " (parameter "green"))
6003 (paramdef "GLboolean " (parameter "blue"))
6004 (paramdef "GLboolean " (parameter "alpha"))))
6007 "enable and disable writing of frame buffer color components")
6008 (heading "Parameters")
6009 (table (% (formatter (asis)))
6010 (entry (% (heading (var "red")))
6011 (itemx (var "green"))
6012 (itemx (var "blue"))
6013 (itemx (var "alpha"))
6015 Specify whether red, green, blue, and alpha can or cannot be written
6016 into the frame buffer.
6017 The initial values are all "
6020 indicating that the color components can be written. ")))
6021 (heading "Description")
6022 (para (code "glColorMask")
6023 " specifies whether the individual color components in the frame buffer
6024 can or cannot be written.
6031 no change is made to the red component of any pixel in any of the
6033 regardless of the drawing operation attempted. ")
6035 Changes to individual bits of components cannot be controlled.
6037 changes are either enabled or disabled for entire color components. ")
6039 (para (code "GL_INVALID_OPERATION")
6041 (code "glColorMask")
6043 is executed between the execution of "
6046 and the corresponding execution of "
6050 (define-gl-procedure
6055 (funcdef "void " (function "glColorMaterial"))
6056 (paramdef "GLenum " (parameter "face"))
6057 (paramdef "GLenum " (parameter "mode"))))
6060 "cause a material color to track the current color")
6061 (heading "Parameters")
6062 (table (% (formatter (asis)))
6063 (entry (% (heading (var "face")))
6065 Specifies whether front,
6067 or both front and back material parameters should track the current color.
6068 Accepted values are "
6074 (code "GL_FRONT_AND_BACK")
6076 The initial value is "
6077 (code "GL_FRONT_AND_BACK")
6079 (entry (% (heading (var "mode")))
6081 Specifies which of several material parameters track the current color.
6082 Accepted values are "
6083 (code "GL_EMISSION")
6089 (code "GL_SPECULAR")
6092 (code "GL_AMBIENT_AND_DIFFUSE")
6094 The initial value is "
6095 (code "GL_AMBIENT_AND_DIFFUSE")
6097 (heading "Description")
6098 (para (code "glColorMaterial")
6099 " specifies which material parameters track the current color.
6101 (code "GL_COLOR_MATERIAL")
6103 the material parameter or parameters specified by "
6106 of the material or materials specified by "
6109 track the current color at all times. ")
6111 To enable and disable "
6112 (code "GL_COLOR_MATERIAL")
6118 (code "GL_COLOR_MATERIAL")
6120 (code "GL_COLOR_MATERIAL")
6121 " is initially disabled. ")
6123 (para (code "GL_INVALID_ENUM")
6130 (para (code "GL_INVALID_OPERATION")
6132 (code "glColorMaterial")
6133 " is executed between
6136 " and the corresponding execution of "
6140 (define-gl-procedure
6145 (funcdef "void " (function "glColorPointer"))
6146 (paramdef "GLint " (parameter "size"))
6147 (paramdef "GLenum " (parameter "type"))
6148 (paramdef "GLsizei " (parameter "stride"))
6151 (parameter "pointer"))))
6153 (heading "define an array of colors")
6154 (heading "Parameters")
6155 (table (% (formatter (asis)))
6156 (entry (% (heading (var "size")))
6158 Specifies the number of components per color. Must be 3 or 4.
6159 The initial value is 4. "))
6160 (entry (% (heading (var "type")))
6162 Specifies the data type of each color component in the array.
6163 Symbolic constants "
6166 (code "GL_UNSIGNED_BYTE")
6170 (code "GL_UNSIGNED_SHORT")
6174 (code "GL_UNSIGNED_INT")
6182 The initial value is "
6185 (entry (% (heading (var "stride")))
6187 Specifies the byte offset between consecutive colors.
6190 " is 0, the colors are understood to be
6191 tightly packed in the array. The initial value is 0. "))
6192 (entry (% (heading (var "pointer")))
6194 Specifies a pointer to the first component of the first color element
6195 in the array. The initial value is 0. ")))
6196 (heading "Description")
6197 (para (code "glColorPointer")
6198 " specifies the location and data format of an array of color components
6199 to use when rendering. "
6201 " specifies the number of components per color, and must be 3 or 4. "
6203 " specifies the data type of each color component, and "
6206 specifies the byte stride from one color to the next, allowing vertices and
6207 attributes to be packed into a single array or stored in separate arrays.
6208 (Single-array storage may be more efficient on some implementations;
6210 (code "glInterleavedArrays")
6213 If a non-zero named buffer object is bound to the "
6214 (code "GL_ARRAY_BUFFER")
6217 (code "glBindBuffer")
6218 ") while a color array is
6221 " is treated as a byte offset into the buffer object's data store.
6222 Also, the buffer object binding ("
6223 (code "GL_ARRAY_BUFFER_BINDING")
6224 ") is saved as color vertex array
6225 client-side state ("
6226 (code "GL_COLOR_ARRAY_BUFFER_BINDING")
6229 When a color array is specified, "
6237 " are saved as client-side
6238 state, in addition to the current vertex array buffer object binding. ")
6240 To enable and disable the color array, call "
6241 (code "glEnableClientState")
6243 (code "glDisableClientState")
6244 " with the argument "
6245 (code "GL_COLOR_ARRAY")
6247 enabled, the color array is used
6249 (code "glDrawArrays")
6251 (code "glMultiDrawArrays")
6253 (code "glDrawElements")
6255 (code "glMultiDrawElements")
6257 (code "glDrawRangeElements")
6259 (code "glArrayElement")
6262 (para (code "GL_INVALID_VALUE")
6266 (para (code "GL_INVALID_ENUM")
6269 " is not an accepted value. ")
6270 (para (code "GL_INVALID_VALUE")
6275 (define-gl-procedure
6280 (funcdef "void " (function "glColorSubTable"))
6281 (paramdef "GLenum " (parameter "target"))
6282 (paramdef "GLsizei " (parameter "start"))
6283 (paramdef "GLsizei " (parameter "count"))
6284 (paramdef "GLenum " (parameter "format"))
6285 (paramdef "GLenum " (parameter "type"))
6286 (paramdef "const GLvoid * " (parameter "data"))))
6288 (heading "respecify a portion of a color table")
6289 (heading "Parameters")
6290 (table (% (formatter (asis)))
6291 (entry (% (heading (var "target")))
6294 (code "GL_COLOR_TABLE")
6296 (code "GL_POST_CONVOLUTION_COLOR_TABLE")
6298 (code "GL_POST_COLOR_MATRIX_COLOR_TABLE")
6300 (entry (% (heading (var "start")))
6302 The starting index of the portion of the color table to be replaced. "))
6303 (entry (% (heading (var "count")))
6305 The number of table entries to replace. "))
6306 (entry (% (heading (var "format")))
6308 The format of the pixel data in "
6311 The allowable values are "
6320 (code "GL_LUMINANCE")
6322 (code "GL_LUMINANCE_ALPHA")
6332 (entry (% (heading (var "type")))
6334 The type of the pixel data in "
6337 The allowable values are "
6338 (code "GL_UNSIGNED_BYTE")
6342 (code "GL_UNSIGNED_SHORT")
6346 (code "GL_UNSIGNED_INT")
6352 (code "GL_UNSIGNED_BYTE_3_3_2")
6354 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
6356 (code "GL_UNSIGNED_SHORT_5_6_5")
6358 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
6360 (code "GL_UNSIGNED_SHORT_4_4_4_4")
6362 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
6364 (code "GL_UNSIGNED_SHORT_5_5_5_1")
6366 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
6368 (code "GL_UNSIGNED_INT_8_8_8_8")
6370 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
6372 (code "GL_UNSIGNED_INT_10_10_10_2")
6374 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
6376 (entry (% (heading (var "data")))
6378 Pointer to a one-dimensional array of pixel data that is processed to
6379 replace the specified region of the color table. ")))
6380 (heading "Description")
6381 (para (code "glColorSubTable")
6382 " is used to respecify a contiguous portion of a color table previously
6384 (code "glColorTable")
6385 ". The pixels referenced by "
6388 portion of the existing table from indices "
6391 (math (var "start") "+" (var "count") "-" "1")
6393 inclusive. This region may not include any
6394 entries outside the range of the color table as it was originally specified.
6395 It is not an error to specify a subtexture with width of 0, but such a
6396 specification has no effect. ")
6398 If a non-zero named buffer object is bound to the "
6399 (code "GL_PIXEL_UNPACK_BUFFER")
6402 (code "glBindBuffer")
6403 ") while a portion of a color table is
6406 " is treated as a byte offset into the buffer object's data store. ")
6408 (para (code "GL_INVALID_ENUM")
6411 " is not one of the allowable
6413 (para (code "GL_INVALID_ENUM")
6416 " is not one of the allowable
6418 (para (code "GL_INVALID_ENUM")
6421 " is not one of the allowable
6423 (para (code "GL_INVALID_VALUE")
6431 (para (code "GL_INVALID_OPERATION")
6432 " is generated if a non-zero buffer object name is bound to the "
6433 (code "GL_PIXEL_UNPACK_BUFFER")
6434 " target and the buffer object's data store is currently mapped. ")
6435 (para (code "GL_INVALID_OPERATION")
6436 " is generated if a non-zero buffer object name is bound to the "
6437 (code "GL_PIXEL_UNPACK_BUFFER")
6438 " target and the data would be unpacked from the buffer
6439 object such that the memory reads required would exceed the data store size. ")
6440 (para (code "GL_INVALID_OPERATION")
6441 " is generated if a non-zero buffer object name is bound to the "
6442 (code "GL_PIXEL_UNPACK_BUFFER")
6445 " is not evenly divisible
6446 into the number of bytes needed to store in memory a datum indicated by "
6449 (para (code "GL_INVALID_OPERATION")
6451 (code "glColorSubTable")
6453 between the execution of "
6455 " and the corresponding
6460 (define-gl-procedure
6461 glColorTableParameter
6462 "glColorTableParameter"
6467 (function "glColorTableParameterfv"))
6468 (paramdef "GLenum " (parameter "target"))
6469 (paramdef "GLenum " (parameter "pname"))
6472 (parameter "params"))))
6474 (heading "set color lookup table parameters")
6475 (heading "Parameters")
6476 (table (% (formatter (asis)))
6477 (entry (% (heading (var "target")))
6479 The target color table.
6481 (code "GL_COLOR_TABLE")
6483 (code "GL_POST_CONVOLUTION_COLOR_TABLE")
6485 (code "GL_POST_COLOR_MATRIX_COLOR_TABLE")
6487 (entry (% (heading (var "pname")))
6489 The symbolic name of a texture color lookup table parameter.
6491 (code "GL_COLOR_TABLE_SCALE")
6493 (code "GL_COLOR_TABLE_BIAS")
6495 (entry (% (heading (var "params")))
6497 A pointer to an array where the values of the parameters are stored. ")))
6498 (heading "Description")
6499 (para (code "glColorTableParameter")
6500 " is used to specify the scale factors and bias terms applied to
6501 color components when they are loaded into a color table. "
6504 indicates which color table the scale and bias terms apply to; it
6506 (code "GL_COLOR_TABLE")
6508 (code "GL_POST_CONVOLUTION_COLOR_TABLE")
6510 (code "GL_POST_COLOR_MATRIX_COLOR_TABLE")
6514 (code "GL_COLOR_TABLE_SCALE")
6519 " points to an array of four values, which are
6520 the scale factors for red, green, blue, and alpha, in that order. ")
6523 (code "GL_COLOR_TABLE_BIAS")
6525 bias terms. In this case, "
6527 " points to an array of four values, which are the bias
6528 terms for red, green, blue, and alpha, in that order. ")
6530 The color tables themselves are specified by
6532 (code "glColorTable")
6535 (para (code "GL_INVALID_ENUM")
6541 an acceptable value. ")
6542 (para (code "GL_INVALID_OPERATION")
6544 (code "glColorTableParameter")
6546 between the execution of "
6548 " and the corresponding
6553 (define-gl-procedure
6558 (funcdef "void " (function "glColorTable"))
6559 (paramdef "GLenum " (parameter "target"))
6560 (paramdef "GLenum " (parameter "internalformat"))
6561 (paramdef "GLsizei " (parameter "width"))
6562 (paramdef "GLenum " (parameter "format"))
6563 (paramdef "GLenum " (parameter "type"))
6564 (paramdef "const GLvoid * " (parameter "data"))))
6566 (heading "define a color lookup table")
6567 (heading "Parameters")
6568 (table (% (formatter (asis)))
6569 (entry (% (heading (var "target")))
6572 (code "GL_COLOR_TABLE")
6574 (code "GL_POST_CONVOLUTION_COLOR_TABLE")
6576 (code "GL_POST_COLOR_MATRIX_COLOR_TABLE")
6578 (code "GL_PROXY_COLOR_TABLE")
6580 (code "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE")
6583 (code "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE")
6585 (entry (% (heading (var "internalformat")))
6587 The internal format of the color table.
6588 The allowable values are "
6599 (code "GL_LUMINANCE")
6601 (code "GL_LUMINANCE4")
6603 (code "GL_LUMINANCE8")
6605 (code "GL_LUMINANCE12")
6607 (code "GL_LUMINANCE16")
6609 (code "GL_LUMINANCE_ALPHA")
6611 (code "GL_LUMINANCE4_ALPHA4")
6613 (code "GL_LUMINANCE6_ALPHA2")
6615 (code "GL_LUMINANCE8_ALPHA8")
6617 (code "GL_LUMINANCE12_ALPHA4")
6619 (code "GL_LUMINANCE12_ALPHA12")
6621 (code "GL_LUMINANCE16_ALPHA16")
6623 (code "GL_INTENSITY")
6625 (code "GL_INTENSITY4")
6627 (code "GL_INTENSITY8")
6629 (code "GL_INTENSITY12")
6631 (code "GL_INTENSITY16")
6633 (code "GL_R3_G3_B2")
6659 (code "GL_RGB10_A2")
6665 (entry (% (heading (var "width")))
6667 The number of entries in the color lookup table specified by "
6670 (entry (% (heading (var "format")))
6672 The format of the pixel data in "
6675 The allowable values are "
6684 (code "GL_LUMINANCE")
6686 (code "GL_LUMINANCE_ALPHA")
6696 (entry (% (heading (var "type")))
6698 The type of the pixel data in "
6701 The allowable values are "
6702 (code "GL_UNSIGNED_BYTE")
6706 (code "GL_UNSIGNED_SHORT")
6710 (code "GL_UNSIGNED_INT")
6716 (code "GL_UNSIGNED_BYTE_3_3_2")
6718 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
6720 (code "GL_UNSIGNED_SHORT_5_6_5")
6722 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
6724 (code "GL_UNSIGNED_SHORT_4_4_4_4")
6726 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
6728 (code "GL_UNSIGNED_SHORT_5_5_5_1")
6730 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
6732 (code "GL_UNSIGNED_INT_8_8_8_8")
6734 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
6736 (code "GL_UNSIGNED_INT_10_10_10_2")
6738 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
6740 (entry (% (heading (var "data")))
6742 Pointer to a one-dimensional array of pixel data that is processed to
6743 build the color table. ")))
6744 (heading "Description")
6745 (para (code "glColorTable")
6746 " may be used in two ways:
6747 to test the actual size and color resolution of a lookup table
6748 given a particular set of parameters,
6749 or to load the contents of a color lookup
6753 " for the first case
6754 and the other targets for the second case. ")
6756 If a non-zero named buffer object is bound to the "
6757 (code "GL_PIXEL_UNPACK_BUFFER")
6760 (code "glBindBuffer")
6761 ") while a color table is
6764 " is treated as a byte offset into the buffer object's data store. ")
6769 (code "GL_COLOR_TABLE")
6771 (code "GL_POST_CONVOLUTION_COLOR_TABLE")
6774 (code "GL_POST_COLOR_MATRIX_COLOR_TABLE")
6776 (code "glColorTable")
6777 " builds a color lookup table from an array of pixels.
6778 The pixel array specified by "
6787 is extracted from memory and
6788 processed just as if "
6789 (code "glDrawPixels")
6790 " were called, but processing
6791 stops after the final expansion to RGBA is completed. ")
6793 The four scale parameters and the four bias parameters that are defined
6794 for the table are then used to scale and bias the R, G, B, and A components
6797 (code "glColorTableParameter")
6798 " to set these scale and bias
6801 Next, the R, G, B, and A values are clamped to the range "
6802 (math "[" "0" "," "1" "]")
6804 Each pixel is then converted to the internal format specified by "
6805 (var "internalformat")
6807 This conversion simply maps the component values of the pixel (R, G, B,
6808 and A) to the values included in the internal format (red, green, blue,
6809 alpha, luminance, and intensity). The mapping is as follows: ")
6811 (table (% (formatter (asis)))
6812 (entry (% (heading (strong "Internal Format")))
6813 (para (strong "Red")
6821 (strong "Luminance")
6823 (strong "Intensity")))
6824 (entry (% (heading (code "GL_ALPHA")))
6825 (para ", " ", " ", " "
6827 (entry (% (heading (code "GL_LUMINANCE")))
6828 (para ", " ", " ", " ", " "
6830 (entry (% (heading (code "GL_LUMINANCE_ALPHA")))
6831 (para ", " ", " ", " "
6834 (entry (% (heading (code "GL_INTENSITY")))
6835 (para ", " ", " ", " ", " ", " "
6837 (entry (% (heading (code "GL_RGB")))
6841 B " ", " ", " ", "))
6842 (entry (% (heading (code "GL_RGBA")))
6857 Finally, the red, green, blue, alpha, luminance, and/or intensity components of
6858 the resulting pixels are stored in the color table.
6859 They form a one-dimensional table with indices in the range "
6860 (math "[" "0" "," (var "width") "-" "1" "]")
6868 (code "glColorTable")
6869 " recomputes and stores the values of the proxy color table's state
6871 (code "GL_COLOR_TABLE_FORMAT")
6873 (code "GL_COLOR_TABLE_WIDTH")
6875 (code "GL_COLOR_TABLE_RED_SIZE")
6877 (code "GL_COLOR_TABLE_GREEN_SIZE")
6879 (code "GL_COLOR_TABLE_BLUE_SIZE")
6881 (code "GL_COLOR_TABLE_ALPHA_SIZE")
6883 (code "GL_COLOR_TABLE_LUMINANCE_SIZE")
6885 (code "GL_COLOR_TABLE_INTENSITY_SIZE")
6887 There is no effect on the image or state of any actual color table.
6888 If the specified color table is too large to be supported, then all the
6889 proxy state variables listed above are set to zero.
6890 Otherwise, the color table could be supported by "
6891 (code "glColorTable")
6893 using the corresponding non-proxy target,
6894 and the proxy state variables are set as if that target were being defined. ")
6896 The proxy state variables can be retrieved by calling "
6897 (code "glGetColorTableParameter")
6898 " with a target of "
6901 This allows the application to decide if a particular "
6902 (code "glColorTable")
6904 command would succeed, and to determine what the resulting color table
6905 attributes would be. ")
6907 If a color table is enabled, and its width is non-zero, then its
6908 contents are used to replace a subset of the components of each RGBA
6909 pixel group, based on the internal format of the table. ")
6911 Each pixel group has color components (R, G, B, A)
6912 that are in the range "
6913 (math "[" "0.0" "," "1.0" "]")
6915 The color components are rescaled to
6916 the size of the color lookup table to form an index.
6917 Then a subset of the components based on the internal format of the table are
6918 replaced by the table entry selected by that index.
6919 If the color components and contents of the table are represented as follows: ")
6921 (table (% (formatter (asis)))
6922 (entry (% (heading (strong "Representation")))
6923 (para (strong "Meaning")))
6924 (entry (% (heading (code "r")))
6926 Table index computed from " (code "R")))
6927 (entry (% (heading (code "g")))
6929 Table index computed from " (code "G")))
6930 (entry (% (heading (code "b")))
6932 Table index computed from " (code "B")))
6933 (entry (% (heading (code "a")))
6935 Table index computed from " (code "A")))
6936 (entry (% (heading (code "L[i]")))
6938 Luminance value at table index "
6940 (entry (% (heading (code "I[i]")))
6942 Intensity value at table index "
6944 (entry (% (heading (code "R[i]")))
6946 Red value at table index " (code "i")))
6947 (entry (% (heading (code "G[i]")))
6949 Green value at table index " (code "i")))
6950 (entry (% (heading (code "B[i]")))
6952 Blue value at table index " (code "i")))
6953 (entry (% (heading (code "A[i]")))
6955 Alpha value at table index " (code "i"))))
6957 then the result of color table lookup is as follows: ")
6959 (table (% (formatter (asis)))
6960 (entry (% (heading (strong)))
6961 (para (strong "Resulting Texture Components")))
6962 (entry (% (heading (strong "Table Internal Format")))
6970 (entry (% (heading (code "GL_ALPHA")))
6978 (entry (% (heading (code "GL_LUMINANCE")))
6986 (entry (% (heading (code "GL_LUMINANCE_ALPHA")))
6994 (entry (% (heading (code "GL_INTENSITY")))
7002 (entry (% (heading (code "GL_RGB")))
7010 (entry (% (heading (code "GL_RGBA")))
7020 (code "GL_COLOR_TABLE")
7021 " is enabled, the colors resulting from
7022 the pixel map operation (if it is enabled) are mapped
7023 by the color lookup table before being passed to the convolution
7024 operation. The colors resulting from the convolution operation
7025 are modified by the post convolution color lookup table when "
7026 (code "GL_POST_CONVOLUTION_COLOR_TABLE")
7028 is enabled. These modified colors are then sent to the color matrix operation.
7030 (code "GL_POST_COLOR_MATRIX_COLOR_TABLE")
7032 is enabled, the colors resulting from the color matrix operation
7033 are mapped by the post color matrix color lookup table before being
7034 used by the histogram operation. ")
7037 (para (code "GL_INVALID_ENUM")
7040 " is not one of the allowable
7042 (para (code "GL_INVALID_ENUM")
7044 (var "internalformat")
7046 allowable values. ")
7047 (para (code "GL_INVALID_ENUM")
7050 " is not one of the allowable
7052 (para (code "GL_INVALID_ENUM")
7055 " is not one of the allowable
7057 (para (code "GL_INVALID_VALUE")
7060 " is less than zero. ")
7061 (para (code "GL_TABLE_TOO_LARGE")
7062 " is generated if the requested color table
7063 is too large to be supported by the implementation, and "
7069 (para (code "GL_INVALID_OPERATION")
7070 " is generated if a non-zero buffer object name is bound to the "
7071 (code "GL_PIXEL_UNPACK_BUFFER")
7072 " target and the buffer object's data store is currently mapped. ")
7073 (para (code "GL_INVALID_OPERATION")
7074 " is generated if a non-zero buffer object name is bound to the "
7075 (code "GL_PIXEL_UNPACK_BUFFER")
7076 " target and the data would be unpacked from the buffer
7077 object such that the memory reads required would exceed the data store size. ")
7078 (para (code "GL_INVALID_OPERATION")
7079 " is generated if a non-zero buffer object name is bound to the "
7080 (code "GL_PIXEL_UNPACK_BUFFER")
7083 " is not evenly divisible
7084 into the number of bytes needed to store in memory a datum indicated by "
7087 (para (code "GL_INVALID_OPERATION")
7089 (code "glColorTable")
7091 between the execution of "
7093 " and the corresponding
7098 (define-gl-procedure
7103 (funcdef "void " (function "glColor3b"))
7104 (paramdef "GLbyte " (parameter "red"))
7105 (paramdef "GLbyte " (parameter "green"))
7106 (paramdef "GLbyte " (parameter "blue"))))
7108 (heading "set the current color")
7109 (heading "Parameters")
7110 (table (% (formatter (asis)))
7111 (entry (% (heading (var "red")))
7112 (itemx (var "green"))
7113 (itemx (var "blue"))
7115 Specify new red, green, and blue values for the current color. "))
7116 (entry (% (heading (var "alpha")))
7118 Specifies a new alpha value for the current color.
7119 Included only in the four-argument "
7122 (heading "Description")
7124 The GL stores both a current single-valued color index
7125 and a current four-valued RGBA color. "
7127 " sets a new four-valued RGBA color. "
7129 " has two major variants: "
7135 " variants specify new red,
7137 and blue values explicitly
7138 and set the current alpha value to 1.0 (full intensity) implicitly. "
7140 " variants specify all four color components explicitly. ")
7141 (para (code "glColor3b")
7153 three or four signed byte, short, or long integers as arguments.
7156 " is appended to the name,
7157 the color commands can take a pointer to an array of such values. ")
7159 Current color values are stored in floating-point format,
7160 with unspecified mantissa and exponent sizes.
7161 Unsigned integer color components,
7163 are linearly mapped to floating-point values such that the largest
7164 representable value maps to 1.0 (full intensity),
7165 and 0 maps to 0.0 (zero intensity).
7166 Signed integer color components,
7168 are linearly mapped to floating-point values such that the most positive
7169 representable value maps to 1.0,
7170 and the most negative representable value maps to "
7174 this mapping does not convert 0 precisely to 0.0.)
7175 Floating-point values are mapped directly. ")
7177 Neither floating-point nor signed integer values are clamped
7179 (math "[" "0" "," "1" "]")
7181 before the current color is updated.
7183 color components are clamped to this range before they are interpolated
7184 or written into a color buffer. ")))
7186 (define-gl-procedure
7191 (funcdef "void " (function "glCompileShader"))
7192 (paramdef "GLuint " (parameter "shader"))))
7194 (heading "Compiles a shader object")
7195 (heading "Parameters")
7196 (table (% (formatter (asis)))
7197 (entry (% (heading (var "shader")))
7198 (para "Specifies the shader object to be
7200 (heading "Description")
7201 (para (code "glCompileShader")
7202 " compiles the source
7203 \tcode strings that have been stored in the shader object
7207 (para "The compilation status will be stored as part of the
7208 \tshader object's state. This value will be set to\t"
7210 " if the shader was compiled without
7211 \terrors and is ready for use, and "
7214 otherwise. It can be queried by calling\t"
7215 (code "glGetShader")
7220 (code "GL_COMPILE_STATUS")
7222 (para "Compilation of a shader can fail for a number of reasons
7223 \tas specified by the OpenGL Shading Language Specification.
7224 \tWhether or not the compilation was successful, information about
7225 \tthe compilation can be obtained from the shader object's
7226 \tinformation log by calling\t"
7227 (code "glGetShaderInfoLog")
7230 (para (code "GL_INVALID_VALUE")
7231 " is generated if\t"
7233 " is not a value generated by
7235 (para (code "GL_INVALID_OPERATION")
7236 " is generated if\t"
7238 " is not a shader object.")
7239 (para (code "GL_INVALID_OPERATION")
7240 " is generated if\t"
7241 (code "glCompileShader")
7242 " is executed between the
7246 and the corresponding execution of\t"
7250 (define-gl-procedure
7251 glCompressedTexImage1D
7252 "glCompressedTexImage1D"
7257 (function "glCompressedTexImage1D"))
7258 (paramdef "GLenum " (parameter "target"))
7259 (paramdef "GLint " (parameter "level"))
7260 (paramdef "GLenum " (parameter "internalformat"))
7261 (paramdef "GLsizei " (parameter "width"))
7262 (paramdef "GLint " (parameter "border"))
7263 (paramdef "GLsizei " (parameter "imageSize"))
7264 (paramdef "const GLvoid * " (parameter "data"))))
7267 "specify a one-dimensional texture image in a compressed format")
7268 (heading "Parameters")
7269 (table (% (formatter (asis)))
7270 (entry (% (heading (var "target")))
7272 Specifies the target texture.
7274 (code "GL_TEXTURE_1D")
7276 (code "GL_PROXY_TEXTURE_1D")
7278 (entry (% (heading (var "level")))
7280 Specifies the level-of-detail number.
7281 Level 0 is the base image level.
7286 "th mipmap reduction image. "))
7287 (entry (% (heading (var "internalformat")))
7289 Specifies the format of the compressed image data stored at address "
7292 (entry (% (heading (var "width")))
7294 Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be "
7309 All implementations support texture images that are at least 64 texels wide. The height of the 1D texture image is 1. "))
7310 (entry (% (heading (var "border")))
7312 Specifies the width of the border. Must be either 0 or 1. "))
7313 (entry (% (heading (var "imageSize")))
7315 Specifies the number of unsigned bytes of image data starting at the address specified by "
7318 (entry (% (heading (var "data")))
7320 Specifies a pointer to the compressed image data in memory. ")))
7321 (heading "Description")
7323 Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled. To enable and disable one-dimensional texturing, call "
7328 (code "GL_TEXTURE_1D")
7330 (para (code "glCompressedTexImage1D")
7331 " loads a previously defined, and retrieved, compressed one-dimensional texture image if "
7334 (code "GL_TEXTURE_1D")
7336 (code "glTexImage1D")
7342 (code "GL_PROXY_TEXTURE_1D")
7343 ", no data is read from "
7346 all of the texture image state is recalculated, checked for consistency, and checked against the implementation's capabilities. If the implementation cannot handle a texture of the requested texture size, it sets all of the image state to 0, but does not generate an error (see "
7348 "). To query for an entire mipmap array, use an image array level greater than or equal to 1. ")
7349 (para (var "internalformat")
7350 " must be extension-specified compressed-texture format. When a texture is loaded with "
7351 (code "glTexImage1D")
7352 " using a generic compressed texture format (e.g., "
7353 (code "GL_COMPRESSED_RGB")
7354 ") the GL selects from one of
7355 its extensions supporting compressed textures. In order to load the
7356 compressed texture image using "
7357 (code "glCompressedTexImage1D")
7358 ", query the compressed texture image's size and format using "
7359 (code "glGetTexLevelParameter")
7362 If a non-zero named buffer object is bound to the "
7363 (code "GL_PIXEL_UNPACK_BUFFER")
7366 (code "glBindBuffer")
7367 ") while a texture image is
7370 " is treated as a byte offset into the buffer object's data store. ")
7372 (para (code "GL_INVALID_ENUM")
7374 (var "internalformat")
7375 " is one of the generic compressed internal formats: "
7376 (code "GL_COMPRESSED_ALPHA")
7378 (code "GL_COMPRESSED_LUMINANCE")
7380 (code "GL_COMPRESSED_LUMINANCE_ALPHA")
7382 (code "GL_COMPRESSED_INTENSITY")
7384 (code "GL_COMPRESSED_RGB")
7386 (code "GL_COMPRESSED_RGBA")
7388 (para (code "GL_INVALID_VALUE")
7391 " is not consistent with
7392 the format, dimensions, and contents of the specified compressed image
7394 (para (code "GL_INVALID_OPERATION")
7395 " is generated if parameter combinations are not
7396 supported by the specific compressed internal format as specified in the
7397 specific texture compression extension. ")
7398 (para (code "GL_INVALID_OPERATION")
7399 " is generated if a non-zero buffer object name is bound to the "
7400 (code "GL_PIXEL_UNPACK_BUFFER")
7401 " target and the buffer object's data store is currently mapped. ")
7402 (para (code "GL_INVALID_OPERATION")
7403 " is generated if a non-zero buffer object name is bound to the "
7404 (code "GL_PIXEL_UNPACK_BUFFER")
7405 " target and the data would be unpacked from the buffer
7406 object such that the memory reads required would exceed the data store size. ")
7407 (para (code "GL_INVALID_OPERATION")
7409 (code "glCompressedTexImage1D")
7411 is executed between the execution of "
7414 and the corresponding execution of "
7418 Undefined results, including abnormal program termination, are generated if "
7420 " is not encoded in a manner consistent with the extension
7421 specification defining the internal compression format. ")))
7423 (define-gl-procedure
7424 glCompressedTexImage2D
7425 "glCompressedTexImage2D"
7430 (function "glCompressedTexImage2D"))
7431 (paramdef "GLenum " (parameter "target"))
7432 (paramdef "GLint " (parameter "level"))
7433 (paramdef "GLenum " (parameter "internalformat"))
7434 (paramdef "GLsizei " (parameter "width"))
7435 (paramdef "GLsizei " (parameter "height"))
7436 (paramdef "GLint " (parameter "border"))
7437 (paramdef "GLsizei " (parameter "imageSize"))
7438 (paramdef "const GLvoid * " (parameter "data"))))
7441 "specify a two-dimensional texture image in a compressed format")
7442 (heading "Parameters")
7443 (table (% (formatter (asis)))
7444 (entry (% (heading (var "target")))
7446 Specifies the target texture.
7448 (code "GL_TEXTURE_2D")
7450 (code "GL_PROXY_TEXTURE_2D")
7452 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_X")
7454 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_X")
7456 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Y")
7458 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y")
7460 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Z")
7462 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z")
7464 (code "GL_PROXY_TEXTURE_CUBE_MAP")
7466 (entry (% (heading (var "level")))
7468 Specifies the level-of-detail number.
7469 Level 0 is the base image level.
7474 "th mipmap reduction image. "))
7475 (entry (% (heading (var "internalformat")))
7477 Specifies the format of the compressed image data stored at address "
7480 (entry (% (heading (var "width")))
7482 Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be "
7498 implementations support 2D texture images that are at least 64 texels
7499 wide and cube-mapped texture images that are at least 16 texels wide. "))
7500 (entry (% (heading (var "height")))
7502 Specifies the height of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
7519 implementations support 2D texture images that are at least 64 texels
7520 high and cube-mapped texture images that are at least 16 texels high. "))
7521 (entry (% (heading (var "border")))
7523 Specifies the width of the border.
7524 Must be either 0 or 1. "))
7525 (entry (% (heading (var "imageSize")))
7527 Specifies the number of unsigned bytes of image data starting at the
7528 address specified by "
7531 (entry (% (heading (var "data")))
7533 Specifies a pointer to the compressed image data in memory. ")))
7534 (heading "Description")
7536 Texturing maps a portion of a specified texture image onto each graphical
7537 primitive for which texturing is enabled. To enable and disable
7538 two-dimensional texturing, call "
7543 (code "GL_TEXTURE_2D")
7544 ". To enable and disable texturing using
7545 cube-mapped textures, call "
7550 (code "GL_TEXTURE_CUBE_MAP")
7552 (para (code "glCompressedTexImage2D")
7553 " loads a previously defined, and retrieved, compressed two-dimensional
7557 (code "GL_TEXTURE_2D")
7559 (code "glTexImage2D")
7565 (code "GL_PROXY_TEXTURE_2D")
7566 ", no data is read from "
7569 all of the texture image state is recalculated, checked for consistency,
7570 and checked against the implementation's capabilities. If the
7571 implementation cannot handle a texture of the requested texture size, it
7572 sets all of the image state to 0, but does not generate an error (see "
7574 "). To query for an entire mipmap array, use an image array level
7575 greater than or equal to 1. ")
7576 (para (var "internalformat")
7577 " must be an extension-specified compressed-texture format.
7578 When a texture is loaded with "
7579 (code "glTexImage2D")
7580 " using a generic compressed
7581 texture format (e.g., "
7582 (code "GL_COMPRESSED_RGB")
7583 "), the GL selects from one of
7584 its extensions supporting compressed textures. In order to load the
7585 compressed texture image using "
7586 (code "glCompressedTexImage2D")
7587 ", query the compressed texture image's
7588 size and format using "
7589 (code "glGetTexLevelParameter")
7592 If a non-zero named buffer object is bound to the "
7593 (code "GL_PIXEL_UNPACK_BUFFER")
7596 (code "glBindBuffer")
7597 ") while a texture image is
7600 " is treated as a byte offset into the buffer object's data store. ")
7602 (para (code "GL_INVALID_ENUM")
7604 (var "internalformat")
7605 " is one of the generic compressed internal formats: "
7606 (code "GL_COMPRESSED_ALPHA")
7608 (code "GL_COMPRESSED_LUMINANCE")
7610 (code "GL_COMPRESSED_LUMINANCE_ALPHA")
7612 (code "GL_COMPRESSED_INTENSITY")
7614 (code "GL_COMPRESSED_RGB")
7616 (code "GL_COMPRESSED_RGBA")
7618 (para (code "GL_INVALID_VALUE")
7621 " is not consistent with
7622 the format, dimensions, and contents of the specified compressed image
7624 (para (code "GL_INVALID_OPERATION")
7625 " is generated if parameter combinations are not
7626 supported by the specific compressed internal format as specified in the
7627 specific texture compression extension. ")
7628 (para (code "GL_INVALID_OPERATION")
7629 " is generated if a non-zero buffer object name is bound to the "
7630 (code "GL_PIXEL_UNPACK_BUFFER")
7631 " target and the buffer object's data store is currently mapped. ")
7632 (para (code "GL_INVALID_OPERATION")
7633 " is generated if a non-zero buffer object name is bound to the "
7634 (code "GL_PIXEL_UNPACK_BUFFER")
7635 " target and the data would be unpacked from the buffer
7636 object such that the memory reads required would exceed the data store size. ")
7637 (para (code "GL_INVALID_OPERATION")
7639 (code "glCompressedTexImage2D")
7641 is executed between the execution of "
7644 and the corresponding execution of "
7648 Undefined results, including abnormal program termination, are generated if "
7650 " is not encoded in a manner consistent with the extension
7651 specification defining the internal compression format. ")))
7653 (define-gl-procedure
7654 glCompressedTexImage3D
7655 "glCompressedTexImage3D"
7660 (function "glCompressedTexImage3D"))
7661 (paramdef "GLenum " (parameter "target"))
7662 (paramdef "GLint " (parameter "level"))
7663 (paramdef "GLenum " (parameter "internalformat"))
7664 (paramdef "GLsizei " (parameter "width"))
7665 (paramdef "GLsizei " (parameter "height"))
7666 (paramdef "GLsizei " (parameter "depth"))
7667 (paramdef "GLint " (parameter "border"))
7668 (paramdef "GLsizei " (parameter "imageSize"))
7669 (paramdef "const GLvoid * " (parameter "data"))))
7672 "specify a three-dimensional texture image in a compressed format")
7673 (heading "Parameters")
7674 (table (% (formatter (asis)))
7675 (entry (% (heading (var "target")))
7677 Specifies the target texture.
7679 (code "GL_TEXTURE_3D")
7681 (code "GL_PROXY_TEXTURE_3D")
7683 (entry (% (heading (var "level")))
7685 Specifies the level-of-detail number.
7686 Level 0 is the base image level.
7691 "th mipmap reduction image. "))
7692 (entry (% (heading (var "internalformat")))
7694 Specifies the format of the compressed image data stored at address "
7697 (entry (% (heading (var "width")))
7699 Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be "
7715 implementations support 3D texture images that are at least 16 texels
7717 (entry (% (heading (var "height")))
7719 Specifies the height of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be "
7735 implementations support 3D texture images that are at least 16 texels
7737 (entry (% (heading (var "depth")))
7739 Specifies the depth of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be "
7755 implementations support 3D texture images that are at least 16 texels
7757 (entry (% (heading (var "border")))
7759 Specifies the width of the border.
7760 Must be either 0 or 1. "))
7761 (entry (% (heading (var "imageSize")))
7763 Specifies the number of unsigned bytes of image data starting at the
7764 address specified by "
7767 (entry (% (heading (var "data")))
7769 Specifies a pointer to the compressed image data in memory. ")))
7770 (heading "Description")
7772 Texturing maps a portion of a specified texture image onto each graphical
7773 primitive for which texturing is enabled. To enable and disable
7774 three-dimensional texturing, call "
7779 (code "GL_TEXTURE_3D")
7781 (para (code "glCompressedTexImage3D")
7782 " loads a previously defined, and retrieved, compressed three-dimensional
7786 (code "GL_TEXTURE_3D")
7788 (code "glTexImage3D")
7794 (code "GL_PROXY_TEXTURE_3D")
7795 ", no data is read from "
7798 all of the texture image state is recalculated, checked for consistency,
7799 and checked against the implementation's capabilities. If the
7800 implementation cannot handle a texture of the requested texture size, it
7801 sets all of the image state to 0, but does not generate an error (see "
7803 "). To query for an entire mipmap array, use an image array level
7804 greater than or equal to 1. ")
7805 (para (var "internalformat")
7806 " must be an extension-specified compressed-texture format.
7807 When a texture is loaded with "
7808 (code "glTexImage2D")
7809 " using a generic compressed
7810 texture format (e.g., "
7811 (code "GL_COMPRESSED_RGB")
7812 "), the GL selects from one of
7813 its extensions supporting compressed textures. In order to load the
7814 compressed texture image using "
7815 (code "glCompressedTexImage3D")
7816 ", query the compressed texture image's
7817 size and format using "
7818 (code "glGetTexLevelParameter")
7821 If a non-zero named buffer object is bound to the "
7822 (code "GL_PIXEL_UNPACK_BUFFER")
7825 (code "glBindBuffer")
7826 ") while a texture image is
7829 " is treated as a byte offset into the buffer object's data store. ")
7831 (para (code "GL_INVALID_ENUM")
7833 (var "internalformat")
7834 " is one of the generic compressed internal formats: "
7835 (code "GL_COMPRESSED_ALPHA")
7837 (code "GL_COMPRESSED_LUMINANCE")
7839 (code "GL_COMPRESSED_LUMINANCE_ALPHA")
7841 (code "GL_COMPRESSED_INTENSITY")
7843 (code "GL_COMPRESSED_RGB")
7845 (code "GL_COMPRESSED_RGBA")
7847 (para (code "GL_INVALID_VALUE")
7850 " is not consistent with
7851 the format, dimensions, and contents of the specified compressed image data. ")
7852 (para (code "GL_INVALID_OPERATION")
7853 " is generated if parameter combinations are not
7854 supported by the specific compressed internal format as specified in the
7855 specific texture compression extension. ")
7856 (para (code "GL_INVALID_OPERATION")
7857 " is generated if a non-zero buffer object name is bound to the "
7858 (code "GL_PIXEL_UNPACK_BUFFER")
7859 " target and the buffer object's data store is currently mapped. ")
7860 (para (code "GL_INVALID_OPERATION")
7861 " is generated if a non-zero buffer object name is bound to the "
7862 (code "GL_PIXEL_UNPACK_BUFFER")
7863 " target and the data would be unpacked from the buffer
7864 object such that the memory reads required would exceed the data store size. ")
7865 (para (code "GL_INVALID_OPERATION")
7867 (code "glCompressedTexImage3D")
7869 is executed between the execution of "
7872 and the corresponding execution of "
7876 Undefined results, including abnormal program termination, are generated if "
7878 " is not encoded in a manner consistent with the extension specification defining the internal compression format. ")))
7880 (define-gl-procedure
7881 glCompressedTexSubImage1D
7882 "glCompressedTexSubImage1D"
7887 (function "glCompressedTexSubImage1D"))
7888 (paramdef "GLenum " (parameter "target"))
7889 (paramdef "GLint " (parameter "level"))
7890 (paramdef "GLint " (parameter "xoffset"))
7891 (paramdef "GLsizei " (parameter "width"))
7892 (paramdef "GLenum " (parameter "format"))
7893 (paramdef "GLsizei " (parameter "imageSize"))
7894 (paramdef "const GLvoid * " (parameter "data"))))
7897 "specify a one-dimensional texture subimage in a compressed format")
7898 (heading "Parameters")
7899 (table (% (formatter (asis)))
7900 (entry (% (heading (var "target")))
7902 Specifies the target texture.
7904 (code "GL_TEXTURE_1D")
7906 (entry (% (heading (var "level")))
7908 Specifies the level-of-detail number.
7909 Level 0 is the base image level.
7914 "th mipmap reduction image. "))
7915 (entry (% (heading (var "xoffset")))
7917 Specifies a texel offset in the x direction within the texture array. "))
7918 (entry (% (heading (var "width")))
7920 Specifies the width of the texture subimage. "))
7921 (entry (% (heading (var "format")))
7923 Specifies the format of the compressed image data stored at address "
7926 (entry (% (heading (var "imageSize")))
7928 Specifies the number of unsigned bytes of image data starting at the
7929 address specified by "
7932 (entry (% (heading (var "data")))
7934 Specifies a pointer to the compressed image data in memory. ")))
7935 (heading "Description")
7937 Texturing maps a portion of a specified texture image onto each graphical
7938 primitive for which texturing is enabled. To enable and disable
7939 one-dimensional texturing, call "
7944 (code "GL_TEXTURE_1D")
7946 (para (code "glCompressedTexSubImage1D")
7947 " redefines a contiguous subregion of an existing one-dimensional
7948 texture image. The texels referenced by "
7950 " replace the portion of the
7951 existing texture array with x indices "
7954 (math (var "xoffset") "+" (var "width") "-" "1")
7956 inclusive. This region may not include any texels
7957 outside the range of the texture array as it was originally specified. It
7958 is not an error to specify a subtexture with width of 0, but such a
7959 specification has no effect. ")
7960 (para (var "format")
7961 " must be an extension-specified
7962 compressed-texture format. The "
7964 " of the compressed texture
7965 image is selected by the GL implementation that compressed it (see "
7966 (code "glTexImage1D")
7967 "), and should be queried at the time the texture was
7969 (code "glGetTexLevelParameter")
7972 If a non-zero named buffer object is bound to the "
7973 (code "GL_PIXEL_UNPACK_BUFFER")
7976 (code "glBindBuffer")
7977 ") while a texture image is
7980 " is treated as a byte offset into the buffer object's data store. ")
7982 (para (code "GL_INVALID_ENUM")
7985 " is one of these generic compressed internal formats: "
7986 (code "GL_COMPRESSED_ALPHA")
7988 (code "GL_COMPRESSED_LUMINANCE")
7990 (code "GL_COMPRESSED_LUMINANCE_ALPHA")
7992 (code "GL_COMPRESSED_INTENSITY")
7994 (code "GL_COMPRESSED_RGB")
7996 (code "GL_COMPRESSED_RGBA")
7998 (code "GL_COMPRESSED_SLUMINANCE")
8000 (code "GL_COMPRESSED_SLUMINANCE_ALPHA")
8002 (code "GL_COMPRESSED_SRGB")
8004 (code "GL_COMPRESSED_SRGBA")
8006 (code "GL_COMPRESSED_SRGB_ALPHA")
8008 (para (code "GL_INVALID_VALUE")
8011 " is not consistent with
8012 the format, dimensions, and contents of the specified compressed image
8014 (para (code "GL_INVALID_OPERATION")
8015 " is generated if parameter combinations are not
8016 supported by the specific compressed internal format as specified in the
8017 specific texture compression extension. ")
8018 (para (code "GL_INVALID_OPERATION")
8019 " is generated if a non-zero buffer object name is bound to the "
8020 (code "GL_PIXEL_UNPACK_BUFFER")
8021 " target and the buffer object's data store is currently mapped. ")
8022 (para (code "GL_INVALID_OPERATION")
8023 " is generated if a non-zero buffer object name is bound to the "
8024 (code "GL_PIXEL_UNPACK_BUFFER")
8025 " target and the data would be unpacked from the buffer
8026 object such that the memory reads required would exceed the data store size. ")
8027 (para (code "GL_INVALID_OPERATION")
8029 (code "glCompressedTexSubImage1D")
8031 is executed between the execution of "
8034 and the corresponding execution of "
8038 Undefined results, including abnormal program termination, are generated if "
8040 " is not encoded in a manner consistent with the extension
8041 specification defining the internal compression format. ")))
8043 (define-gl-procedure
8044 glCompressedTexSubImage2D
8045 "glCompressedTexSubImage2D"
8050 (function "glCompressedTexSubImage2D"))
8051 (paramdef "GLenum " (parameter "target"))
8052 (paramdef "GLint " (parameter "level"))
8053 (paramdef "GLint " (parameter "xoffset"))
8054 (paramdef "GLint " (parameter "yoffset"))
8055 (paramdef "GLsizei " (parameter "width"))
8056 (paramdef "GLsizei " (parameter "height"))
8057 (paramdef "GLenum " (parameter "format"))
8058 (paramdef "GLsizei " (parameter "imageSize"))
8059 (paramdef "const GLvoid * " (parameter "data"))))
8062 "specify a two-dimensional texture subimage in a compressed format")
8063 (heading "Parameters")
8064 (table (% (formatter (asis)))
8065 (entry (% (heading (var "target")))
8067 Specifies the target texture.
8069 (code "GL_TEXTURE_2D")
8071 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_X")
8073 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_X")
8075 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Y")
8077 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y")
8079 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Z")
8081 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z")
8083 (entry (% (heading (var "level")))
8085 Specifies the level-of-detail number.
8086 Level 0 is the base image level.
8091 "th mipmap reduction image. "))
8092 (entry (% (heading (var "xoffset")))
8094 Specifies a texel offset in the x direction within the texture array. "))
8095 (entry (% (heading (var "yoffset")))
8097 Specifies a texel offset in the y direction within the texture array. "))
8098 (entry (% (heading (var "width")))
8100 Specifies the width of the texture subimage. "))
8101 (entry (% (heading (var "height")))
8103 Specifies the height of the texture subimage. "))
8104 (entry (% (heading (var "format")))
8106 Specifies the format of the compressed image data stored at address "
8109 (entry (% (heading (var "imageSize")))
8111 Specifies the number of unsigned bytes of image data starting at the
8112 address specified by "
8115 (entry (% (heading (var "data")))
8117 Specifies a pointer to the compressed image data in memory. ")))
8118 (heading "Description")
8120 Texturing maps a portion of a specified texture image onto each graphical
8121 primitive for which texturing is enabled. To enable and disable
8122 two-dimensional texturing, call "
8127 (code "GL_TEXTURE_2D")
8128 ". To enable and disable texturing using
8129 cube-mapped texture, call "
8134 (code "GL_TEXTURE_CUBE_MAP")
8136 (para (code "glCompressedTexSubImage2D")
8137 " redefines a contiguous subregion of an existing two-dimensional
8138 texture image. The texels referenced by "
8140 " replace the portion of the
8141 existing texture array with x indices "
8144 (math (var "xoffset") "+" (var "width") "-" "1")
8149 (math (var "yoffset") "+" (var "height") "-" "1")
8152 This region may not include any texels
8153 outside the range of the texture array as it was originally specified. It
8154 is not an error to specify a subtexture with width of 0, but such a
8155 specification has no effect. ")
8156 (para (var "format")
8157 " must be an extension-specified
8158 compressed-texture format. The "
8160 " of the compressed texture
8161 image is selected by the GL implementation that compressed it (see "
8162 (code "glTexImage2D")
8163 ") and should be queried at the time the texture was
8165 (code "glGetTexLevelParameter")
8168 If a non-zero named buffer object is bound to the "
8169 (code "GL_PIXEL_UNPACK_BUFFER")
8172 (code "glBindBuffer")
8173 ") while a texture image is
8176 " is treated as a byte offset into the buffer object's data store. ")
8178 (para (code "GL_INVALID_ENUM")
8181 " is one of these generic compressed internal formats: "
8182 (code "GL_COMPRESSED_ALPHA")
8184 (code "GL_COMPRESSED_LUMINANCE")
8186 (code "GL_COMPRESSED_LUMINANCE_ALPHA")
8188 (code "GL_COMPRESSED_INTENSITY")
8190 (code "GL_COMPRESSED_RGB")
8192 (code "GL_COMPRESSED_RGBA")
8194 (code "GL_COMPRESSED_SLUMINANCE")
8196 (code "GL_COMPRESSED_SLUMINANCE_ALPHA")
8198 (code "GL_COMPRESSED_SRGB")
8200 (code "GL_COMPRESSED_SRGBA")
8202 (code "GL_COMPRESSED_SRGB_ALPHA")
8204 (para (code "GL_INVALID_VALUE")
8207 " is not consistent with
8208 the format, dimensions, and contents of the specified compressed image
8210 (para (code "GL_INVALID_OPERATION")
8211 " is generated if parameter combinations are not
8212 supported by the specific compressed internal format as specified in the
8213 specific texture compression extension. ")
8214 (para (code "GL_INVALID_OPERATION")
8215 " is generated if a non-zero buffer object name is bound to the "
8216 (code "GL_PIXEL_UNPACK_BUFFER")
8217 " target and the buffer object's data store is currently mapped. ")
8218 (para (code "GL_INVALID_OPERATION")
8219 " is generated if a non-zero buffer object name is bound to the "
8220 (code "GL_PIXEL_UNPACK_BUFFER")
8221 " target and the data would be unpacked from the buffer
8222 object such that the memory reads required would exceed the data store size. ")
8223 (para (code "GL_INVALID_OPERATION")
8225 (code "glCompressedTexSubImage2D")
8227 is executed between the execution of "
8230 and the corresponding execution of "
8234 Undefined results, including abnormal program termination, are generated if "
8236 " is not encoded in a manner consistent with the extension
8237 specification defining the internal compression format. ")))
8239 (define-gl-procedure
8240 glCompressedTexSubImage3D
8241 "glCompressedTexSubImage3D"
8246 (function "glCompressedTexSubImage3D"))
8247 (paramdef "GLenum " (parameter "target"))
8248 (paramdef "GLint " (parameter "level"))
8249 (paramdef "GLint " (parameter "xoffset"))
8250 (paramdef "GLint " (parameter "yoffset"))
8251 (paramdef "GLint " (parameter "zoffset"))
8252 (paramdef "GLsizei " (parameter "width"))
8253 (paramdef "GLsizei " (parameter "height"))
8254 (paramdef "GLsizei " (parameter "depth"))
8255 (paramdef "GLenum " (parameter "format"))
8256 (paramdef "GLsizei " (parameter "imageSize"))
8257 (paramdef "const GLvoid * " (parameter "data"))))
8260 "specify a three-dimensional texture subimage in a compressed format")
8261 (heading "Parameters")
8262 (table (% (formatter (asis)))
8263 (entry (% (heading (var "target")))
8265 Specifies the target texture.
8267 (code "GL_TEXTURE_3D")
8269 (entry (% (heading (var "level")))
8271 Specifies the level-of-detail number.
8272 Level 0 is the base image level.
8277 "th mipmap reduction image. "))
8278 (entry (% (heading (var "xoffset")))
8280 Specifies a texel offset in the x direction within the texture array. "))
8281 (entry (% (heading (var "yoffset")))
8283 Specifies a texel offset in the y direction within the texture array. "))
8284 (entry (% (heading (var "width")))
8286 Specifies the width of the texture subimage. "))
8287 (entry (% (heading (var "height")))
8289 Specifies the height of the texture subimage. "))
8290 (entry (% (heading (var "depth")))
8292 Specifies the depth of the texture subimage. "))
8293 (entry (% (heading (var "format")))
8295 Specifies the format of the compressed image data stored at address "
8298 (entry (% (heading (var "imageSize")))
8300 Specifies the number of unsigned bytes of image data starting at the
8301 address specified by "
8304 (entry (% (heading (var "data")))
8306 Specifies a pointer to the compressed image data in memory. ")))
8307 (heading "Description")
8309 Texturing maps a portion of a specified texture image onto each graphical
8310 primitive for which texturing is enabled. To enable and disable
8311 three-dimensional texturing, call "
8316 (code "GL_TEXTURE_3D")
8318 (para (code "glCompressedTexSubImage3D")
8319 " redefines a contiguous subregion of an existing three-dimensional
8320 texture image. The texels referenced by "
8322 " replace the portion of the
8323 existing texture array with x indices "
8326 (math (var "xoffset") "+" (var "width") "-" "1")
8331 (math (var "yoffset") "+" (var "height") "-" "1")
8336 (math (var "zoffset") "+" (var "depth") "-" "1")
8338 inclusive. This region may not include
8339 any texels outside the range of the texture array as it was originally
8340 specified. It is not an error to specify a subtexture with width of 0,
8341 but such a specification has no effect. ")
8342 (para (var "format")
8343 " must be an extension-specified
8344 compressed-texture format. The "
8346 " of the compressed texture
8347 image is selected by the GL implementation that compressed it (see "
8348 (code "glTexImage3D")
8349 ") and should be queried at the time the texture was
8351 (code "glGetTexLevelParameter")
8354 If a non-zero named buffer object is bound to the "
8355 (code "GL_PIXEL_UNPACK_BUFFER")
8358 (code "glBindBuffer")
8359 ") while a texture image is
8362 " is treated as a byte offset into the buffer object's data store. ")
8364 (para (code "GL_INVALID_ENUM")
8367 " is one of these generic compressed internal formats: "
8368 (code "GL_COMPRESSED_ALPHA")
8370 (code "GL_COMPRESSED_LUMINANCE")
8372 (code "GL_COMPRESSED_LUMINANCE_ALPHA")
8374 (code "GL_COMPRESSED_INTENSITY")
8376 (code "GL_COMPRESSED_RGB")
8378 (code "GL_COMPRESSED_RGBA")
8380 (code "GL_COMPRESSED_SLUMINANCE")
8382 (code "GL_COMPRESSED_SLUMINANCE_ALPHA")
8384 (code "GL_COMPRESSED_SRGB")
8386 (code "GL_COMPRESSED_SRGBA")
8388 (code "GL_COMPRESSED_SRGB_ALPHA")
8390 (para (code "GL_INVALID_VALUE")
8393 " is not consistent with
8394 the format, dimensions, and contents of the specified compressed image
8396 (para (code "GL_INVALID_OPERATION")
8397 " is generated if parameter combinations are not
8398 supported by the specific compressed internal format as specified in the
8399 specific texture compression extension. ")
8400 (para (code "GL_INVALID_OPERATION")
8401 " is generated if a non-zero buffer object name is bound to the "
8402 (code "GL_PIXEL_UNPACK_BUFFER")
8403 " target and the buffer object's data store is currently mapped. ")
8404 (para (code "GL_INVALID_OPERATION")
8405 " is generated if a non-zero buffer object name is bound to the "
8406 (code "GL_PIXEL_UNPACK_BUFFER")
8407 " target and the data would be unpacked from the buffer
8408 object such that the memory reads required would exceed the data store size. ")
8409 (para (code "GL_INVALID_OPERATION")
8411 (code "glCompressedTexSubImage3D")
8413 is executed between the execution of "
8416 and the corresponding execution of "
8420 Undefined results, including abnormal program termination, are generated if "
8422 " is not encoded in a manner consistent with the extension
8423 specification defining the internal compression format. ")))
8425 (define-gl-procedure
8426 glConvolutionFilter1D
8427 "glConvolutionFilter1D"
8432 (function "glConvolutionFilter1D"))
8433 (paramdef "GLenum " (parameter "target"))
8434 (paramdef "GLenum " (parameter "internalformat"))
8435 (paramdef "GLsizei " (parameter "width"))
8436 (paramdef "GLenum " (parameter "format"))
8437 (paramdef "GLenum " (parameter "type"))
8438 (paramdef "const GLvoid * " (parameter "data"))))
8441 "define a one-dimensional convolution filter")
8442 (heading "Parameters")
8443 (table (% (formatter (asis)))
8444 (entry (% (heading (var "target")))
8447 (code "GL_CONVOLUTION_1D")
8449 (entry (% (heading (var "internalformat")))
8451 The internal format of the convolution filter kernel.
8452 The allowable values are "
8463 (code "GL_LUMINANCE")
8465 (code "GL_LUMINANCE4")
8467 (code "GL_LUMINANCE8")
8469 (code "GL_LUMINANCE12")
8471 (code "GL_LUMINANCE16")
8473 (code "GL_LUMINANCE_ALPHA")
8475 (code "GL_LUMINANCE4_ALPHA4")
8477 (code "GL_LUMINANCE6_ALPHA2")
8479 (code "GL_LUMINANCE8_ALPHA8")
8481 (code "GL_LUMINANCE12_ALPHA4")
8483 (code "GL_LUMINANCE12_ALPHA12")
8485 (code "GL_LUMINANCE16_ALPHA16")
8487 (code "GL_INTENSITY")
8489 (code "GL_INTENSITY4")
8491 (code "GL_INTENSITY8")
8493 (code "GL_INTENSITY12")
8495 (code "GL_INTENSITY16")
8497 (code "GL_R3_G3_B2")
8523 (code "GL_RGB10_A2")
8529 (entry (% (heading (var "width")))
8531 The width of the pixel array referenced by "
8534 (entry (% (heading (var "format")))
8536 The format of the pixel data in "
8539 The allowable values are "
8542 (code "GL_LUMINANCE")
8544 (code "GL_LUMINANCE_ALPHA")
8546 (code "GL_INTENSITY")
8552 (entry (% (heading (var "type")))
8554 The type of the pixel data in "
8557 Symbolic constants "
8558 (code "GL_UNSIGNED_BYTE")
8564 (code "GL_UNSIGNED_SHORT")
8568 (code "GL_UNSIGNED_INT")
8574 (code "GL_UNSIGNED_BYTE_3_3_2")
8576 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
8578 (code "GL_UNSIGNED_SHORT_5_6_5")
8580 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
8582 (code "GL_UNSIGNED_SHORT_4_4_4_4")
8584 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
8586 (code "GL_UNSIGNED_SHORT_5_5_5_1")
8588 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
8590 (code "GL_UNSIGNED_INT_8_8_8_8")
8592 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
8594 (code "GL_UNSIGNED_INT_10_10_10_2")
8596 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
8599 (entry (% (heading (var "data")))
8601 Pointer to a one-dimensional array of pixel data that is processed to
8602 build the convolution filter kernel. ")))
8603 (heading "Description")
8604 (para (code "glConvolutionFilter1D")
8605 " builds a one-dimensional convolution filter kernel from an array of
8608 The pixel array specified by "
8617 is extracted from memory and
8618 processed just as if "
8619 (code "glDrawPixels")
8620 " were called, but processing
8621 stops after the final expansion to RGBA is completed. ")
8623 If a non-zero named buffer object is bound to the "
8624 (code "GL_PIXEL_UNPACK_BUFFER")
8627 (code "glBindBuffer")
8628 ") while a convolution filter is
8631 " is treated as a byte offset into the buffer object's data store. ")
8633 The R, G, B, and A components of each pixel are next scaled by the four
8635 (code "GL_CONVOLUTION_FILTER_SCALE")
8636 " parameters and biased by the
8638 (code "GL_CONVOLUTION_FILTER_BIAS")
8640 (The scale and bias parameters are set by "
8641 (code "glConvolutionParameter")
8644 (code "GL_CONVOLUTION_1D")
8645 " target and the names "
8646 (code "GL_CONVOLUTION_FILTER_SCALE")
8648 (code "GL_CONVOLUTION_FILTER_BIAS")
8650 The parameters themselves are vectors of four values that are applied to red,
8651 green, blue, and alpha, in that order.)
8652 The R, G, B, and A values are not clamped to [0,1] at any time during this
8655 Each pixel is then converted to the internal format specified by "
8656 (var "internalformat")
8658 This conversion simply maps the component values of the pixel (R, G, B,
8659 and A) to the values included in the internal format (red, green, blue,
8660 alpha, luminance, and intensity). The mapping is as follows: ")
8662 (table (% (formatter (asis)))
8663 (entry (% (heading (strong "Internal Format")))
8664 (para (strong "Red")
8672 (strong "Luminance")
8674 (strong "Intensity")))
8675 (entry (% (heading (code "GL_ALPHA")))
8676 (para ", " ", " ", " "
8678 (entry (% (heading (code "GL_LUMINANCE")))
8679 (para ", " ", " ", " ", " "
8681 (entry (% (heading (code "GL_LUMINANCE_ALPHA")))
8682 (para ", " ", " ", " "
8685 (entry (% (heading (code "GL_INTENSITY")))
8686 (para ", " ", " ", " ", " ", " "
8688 (entry (% (heading (code "GL_RGB")))
8692 B " ", " ", " ", "))
8693 (entry (% (heading (code "GL_RGBA")))
8708 The red, green, blue, alpha, luminance, and/or intensity components of
8709 the resulting pixels are stored in floating-point rather than integer
8711 They form a one-dimensional filter kernel image indexed with coordinate "
8715 " starts at 0 and increases from left to right.
8718 " is derived from the "
8720 "th pixel, counting from 0. ")
8722 Note that after a convolution is performed, the resulting color
8723 components are also scaled by their corresponding "
8724 (code "GL_POST_CONVOLUTION_c_SCALE")
8725 " parameters and biased by their
8727 (code "GL_POST_CONVOLUTION_c_BIAS")
8728 " parameters (where "
8730 " takes on the values "
8739 These parameters are set by "
8740 (code "glPixelTransfer")
8743 (para (code "GL_INVALID_ENUM")
8747 (code "GL_CONVOLUTION_1D")
8749 (para (code "GL_INVALID_ENUM")
8751 (var "internalformat")
8753 allowable values. ")
8754 (para (code "GL_INVALID_ENUM")
8757 " is not one of the allowable
8759 (para (code "GL_INVALID_ENUM")
8762 " is not one of the allowable
8764 (para (code "GL_INVALID_VALUE")
8767 " is less than zero or greater
8768 than the maximum supported value.
8769 This value may be queried with "
8770 (code "glGetConvolutionParameter")
8773 (code "GL_CONVOLUTION_1D")
8775 (code "GL_MAX_CONVOLUTION_WIDTH")
8777 (para (code "GL_INVALID_OPERATION")
8781 (code "GL_UNSIGNED_BYTE_3_3_2")
8783 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
8785 (code "GL_UNSIGNED_SHORT_5_6_5")
8787 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
8794 (para (code "GL_INVALID_OPERATION")
8798 (code "GL_UNSIGNED_SHORT_4_4_4_4")
8800 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
8802 (code "GL_UNSIGNED_SHORT_5_5_5_1")
8804 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
8806 (code "GL_UNSIGNED_INT_8_8_8_8")
8808 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
8810 (code "GL_UNSIGNED_INT_10_10_10_2")
8812 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
8821 (para (code "GL_INVALID_OPERATION")
8822 " is generated if a non-zero buffer object name is bound to the "
8823 (code "GL_PIXEL_UNPACK_BUFFER")
8824 " target and the buffer object's data store is currently mapped. ")
8825 (para (code "GL_INVALID_OPERATION")
8826 " is generated if a non-zero buffer object name is bound to the "
8827 (code "GL_PIXEL_UNPACK_BUFFER")
8828 " target and the data would be unpacked from the buffer
8829 object such that the memory reads required would exceed the data store size. ")
8830 (para (code "GL_INVALID_OPERATION")
8831 " is generated if a non-zero buffer object name is bound to the "
8832 (code "GL_PIXEL_UNPACK_BUFFER")
8835 " is not evenly divisible
8836 into the number of bytes needed to store in memory a datum indicated by "
8839 (para (code "GL_INVALID_OPERATION")
8841 (code "glConvolutionFilter1D")
8843 between the execution of "
8845 " and the corresponding
8850 (define-gl-procedure
8851 glConvolutionFilter2D
8852 "glConvolutionFilter2D"
8857 (function "glConvolutionFilter2D"))
8858 (paramdef "GLenum " (parameter "target"))
8859 (paramdef "GLenum " (parameter "internalformat"))
8860 (paramdef "GLsizei " (parameter "width"))
8861 (paramdef "GLsizei " (parameter "height"))
8862 (paramdef "GLenum " (parameter "format"))
8863 (paramdef "GLenum " (parameter "type"))
8864 (paramdef "const GLvoid * " (parameter "data"))))
8867 "define a two-dimensional convolution filter")
8868 (heading "Parameters")
8869 (table (% (formatter (asis)))
8870 (entry (% (heading (var "target")))
8873 (code "GL_CONVOLUTION_2D")
8875 (entry (% (heading (var "internalformat")))
8877 The internal format of the convolution filter kernel.
8878 The allowable values are "
8889 (code "GL_LUMINANCE")
8891 (code "GL_LUMINANCE4")
8893 (code "GL_LUMINANCE8")
8895 (code "GL_LUMINANCE12")
8897 (code "GL_LUMINANCE16")
8899 (code "GL_LUMINANCE_ALPHA")
8901 (code "GL_LUMINANCE4_ALPHA4")
8903 (code "GL_LUMINANCE6_ALPHA2")
8905 (code "GL_LUMINANCE8_ALPHA8")
8907 (code "GL_LUMINANCE12_ALPHA4")
8909 (code "GL_LUMINANCE12_ALPHA12")
8911 (code "GL_LUMINANCE16_ALPHA16")
8913 (code "GL_INTENSITY")
8915 (code "GL_INTENSITY4")
8917 (code "GL_INTENSITY8")
8919 (code "GL_INTENSITY12")
8921 (code "GL_INTENSITY16")
8923 (code "GL_R3_G3_B2")
8949 (code "GL_RGB10_A2")
8955 (entry (% (heading (var "width")))
8957 The width of the pixel array referenced by "
8960 (entry (% (heading (var "height")))
8962 The height of the pixel array referenced by "
8965 (entry (% (heading (var "format")))
8967 The format of the pixel data in "
8970 The allowable values are "
8987 (code "GL_LUMINANCE")
8989 (code "GL_LUMINANCE_ALPHA")
8991 (entry (% (heading (var "type")))
8993 The type of the pixel data in "
8996 Symbolic constants "
8997 (code "GL_UNSIGNED_BYTE")
9003 (code "GL_UNSIGNED_SHORT")
9007 (code "GL_UNSIGNED_INT")
9013 (code "GL_UNSIGNED_BYTE_3_3_2")
9015 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
9017 (code "GL_UNSIGNED_SHORT_5_6_5")
9019 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
9021 (code "GL_UNSIGNED_SHORT_4_4_4_4")
9023 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
9025 (code "GL_UNSIGNED_SHORT_5_5_5_1")
9027 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
9029 (code "GL_UNSIGNED_INT_8_8_8_8")
9031 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
9033 (code "GL_UNSIGNED_INT_10_10_10_2")
9035 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
9038 (entry (% (heading (var "data")))
9040 Pointer to a two-dimensional array of pixel data that is processed to
9041 build the convolution filter kernel. ")))
9042 (heading "Description")
9043 (para (code "glConvolutionFilter2D")
9044 " builds a two-dimensional convolution filter kernel from an array of
9047 The pixel array specified by "
9057 " is extracted from memory and processed just as if "
9058 (code "glDrawPixels")
9059 " were called, but processing stops after the final
9060 expansion to RGBA is completed. ")
9062 If a non-zero named buffer object is bound to the "
9063 (code "GL_PIXEL_UNPACK_BUFFER")
9066 (code "glBindBuffer")
9067 ") while a convolution filter is
9070 " is treated as a byte offset into the buffer object's data store. ")
9072 The R, G, B, and A components of each pixel are next scaled by the four
9074 (code "GL_CONVOLUTION_FILTER_SCALE")
9075 " parameters and biased by the
9077 (code "GL_CONVOLUTION_FILTER_BIAS")
9079 (The scale and bias parameters are set by "
9080 (code "glConvolutionParameter")
9083 (code "GL_CONVOLUTION_2D")
9084 " target and the names "
9085 (code "GL_CONVOLUTION_FILTER_SCALE")
9087 (code "GL_CONVOLUTION_FILTER_BIAS")
9089 The parameters themselves are vectors of four values that are applied to red,
9090 green, blue, and alpha, in that order.)
9091 The R, G, B, and A values are not clamped to [0,1] at any time during this
9094 Each pixel is then converted to the internal format specified by "
9095 (var "internalformat")
9097 This conversion simply maps the component values of the pixel (R, G, B,
9098 and A) to the values included in the internal format (red, green, blue,
9099 alpha, luminance, and intensity). The mapping is as follows: ")
9101 (table (% (formatter (asis)))
9102 (entry (% (heading (strong "Internal Format")))
9103 (para (strong "Red")
9111 (strong "Luminance")
9113 (strong "Intensity")))
9114 (entry (% (heading (code "GL_ALPHA")))
9115 (para ", " ", " ", " "
9117 (entry (% (heading (code "GL_LUMINANCE")))
9118 (para ", " ", " ", " ", " "
9120 (entry (% (heading (code "GL_LUMINANCE_ALPHA")))
9121 (para ", " ", " ", " "
9124 (entry (% (heading (code "GL_INTENSITY")))
9125 (para ", " ", " ", " ", " ", " "
9127 (entry (% (heading (code "GL_RGB")))
9131 B " ", " ", " ", "))
9132 (entry (% (heading (code "GL_RGBA")))
9147 The red, green, blue, alpha, luminance, and/or intensity components of
9148 the resulting pixels are stored in floating-point rather than integer
9150 They form a two-dimensional filter kernel image indexed with coordinates "
9156 " starts at zero and increases from left
9159 " starts at zero and increases from bottom to top.
9162 " is derived from the "
9175 Note that after a convolution is performed, the resulting color
9176 components are also scaled by their corresponding "
9177 (code "GL_POST_CONVOLUTION_c_SCALE")
9178 " parameters and biased by their
9180 (code "GL_POST_CONVOLUTION_c_BIAS")
9181 " parameters (where "
9183 " takes on the values "
9192 These parameters are set by "
9193 (code "glPixelTransfer")
9196 (para (code "GL_INVALID_ENUM")
9200 (code "GL_CONVOLUTION_2D")
9202 (para (code "GL_INVALID_ENUM")
9204 (var "internalformat")
9206 allowable values. ")
9207 (para (code "GL_INVALID_ENUM")
9210 " is not one of the allowable
9212 (para (code "GL_INVALID_ENUM")
9215 " is not one of the allowable
9217 (para (code "GL_INVALID_VALUE")
9220 " is less than zero or greater
9221 than the maximum supported value.
9222 This value may be queried with "
9223 (code "glGetConvolutionParameter")
9226 (code "GL_CONVOLUTION_2D")
9228 (code "GL_MAX_CONVOLUTION_WIDTH")
9230 (para (code "GL_INVALID_VALUE")
9233 " is less than zero or greater
9234 than the maximum supported value.
9235 This value may be queried with "
9236 (code "glGetConvolutionParameter")
9239 (code "GL_CONVOLUTION_2D")
9241 (code "GL_MAX_CONVOLUTION_HEIGHT")
9243 (para (code "GL_INVALID_OPERATION")
9247 (code "GL_UNSIGNED_BYTE_3_3_2")
9249 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
9251 (code "GL_UNSIGNED_SHORT_5_6_5")
9253 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
9260 (para (code "GL_INVALID_OPERATION")
9264 (code "GL_UNSIGNED_SHORT_4_4_4_4")
9266 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
9268 (code "GL_UNSIGNED_SHORT_5_5_5_1")
9270 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
9272 (code "GL_UNSIGNED_INT_8_8_8_8")
9274 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
9276 (code "GL_UNSIGNED_INT_10_10_10_2")
9278 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
9287 (para (code "GL_INVALID_OPERATION")
9288 " is generated if a non-zero buffer object name is bound to the "
9289 (code "GL_PIXEL_UNPACK_BUFFER")
9290 " target and the buffer object's data store is currently mapped. ")
9291 (para (code "GL_INVALID_OPERATION")
9292 " is generated if a non-zero buffer object name is bound to the "
9293 (code "GL_PIXEL_UNPACK_BUFFER")
9294 " target and the data would be unpacked from the buffer
9295 object such that the memory reads required would exceed the data store size. ")
9296 (para (code "GL_INVALID_OPERATION")
9297 " is generated if a non-zero buffer object name is bound to the "
9298 (code "GL_PIXEL_UNPACK_BUFFER")
9301 " is not evenly divisible
9302 into the number of bytes needed to store in memory a datum indicated by "
9305 (para (code "GL_INVALID_OPERATION")
9307 (code "glConvolutionFilter2D")
9309 between the execution of "
9311 " and the corresponding
9316 (define-gl-procedure
9317 glConvolutionParameter
9318 "glConvolutionParameter"
9323 (function "glConvolutionParameterf"))
9324 (paramdef "GLenum " (parameter "target"))
9325 (paramdef "GLenum " (parameter "pname"))
9326 (paramdef "GLfloat " (parameter "params"))))
9328 (heading "set convolution parameters")
9329 (heading "Parameters")
9330 (table (% (formatter (asis)))
9331 (entry (% (heading (var "target")))
9333 The target for the convolution parameter.
9335 (code "GL_CONVOLUTION_1D")
9337 (code "GL_CONVOLUTION_2D")
9339 (code "GL_SEPARABLE_2D")
9341 (entry (% (heading (var "pname")))
9343 The parameter to be set.
9345 (code "GL_CONVOLUTION_BORDER_MODE")
9347 (entry (% (heading (var "params")))
9349 The parameter value.
9353 (code "GL_CONSTANT_BORDER")
9355 (code "GL_REPLICATE_BORDER")
9358 (heading "Description")
9359 (para (code "glConvolutionParameter")
9360 " sets the value of a convolution parameter. ")
9361 (para (var "target")
9362 " selects the convolution filter to be affected: "
9363 (code "GL_CONVOLUTION_1D")
9365 (code "GL_CONVOLUTION_2D")
9367 (code "GL_SEPARABLE_2D")
9369 for the 1D, 2D, or separable 2D filter, respectively. ")
9371 " selects the parameter to be changed. "
9372 (code "GL_CONVOLUTION_FILTER_SCALE")
9374 (code "GL_CONVOLUTION_FILTER_BIAS")
9376 affect the definition of the convolution filter kernel; see "
9377 (code "glConvolutionFilter1D")
9379 (code "glConvolutionFilter2D")
9381 (code "glSeparableFilter2D")
9385 "v is an array of four values to be applied to
9386 red, green, blue, and alpha values, respectively. The initial value for "
9387 (code "GL_CONVOLUTION_FILTER_SCALE")
9388 " is (1, 1, 1, 1), and the initial value
9390 (code "GL_CONVOLUTION_FILTER_BIAS")
9391 " is (0, 0, 0, 0). ")
9396 (code "GL_CONVOLUTION_BORDER_MODE")
9398 convolution border mode. The accepted modes are: ")
9399 (table (% (formatter (asis)))
9400 (entry (% (heading (code "GL_REDUCE")))
9402 The image resulting from convolution is
9403 smaller than the source image.
9404 If the filter width is "
9410 and the source image width is "
9416 then the convolved image width will be "
9417 (math (var "Ws") "-" (var "Wf") "+" "1")
9421 (math (var "Hs") "-" (var "Hf") "+" "1")
9423 (If this reduction would generate an image with zero or negative width
9424 and/or height, the output is simply null, with no error generated.)
9425 The coordinates of the image resulting from convolution are zero
9427 (math (var "Ws") "-" (var "Wf"))
9429 in width and zero through "
9430 (math (var "Hs") "-" (var "Hf"))
9434 (entry (% (heading (code "GL_CONSTANT_BORDER")))
9436 The image resulting from convolution is the same size as the source image, and
9437 processed as if the source image were surrounded by pixels with their color
9439 (code "GL_CONVOLUTION_BORDER_COLOR")
9441 (entry (% (heading (code "GL_REPLICATE_BORDER")))
9443 The image resulting from convolution is the same size as the source image, and
9444 processed as if the outermost pixel on the border of the source image were
9447 (para (code "GL_INVALID_ENUM")
9450 " is not one of the allowable
9452 (para (code "GL_INVALID_ENUM")
9455 " is not one of the allowable
9457 (para (code "GL_INVALID_ENUM")
9461 (code "GL_CONVOLUTION_BORDER_MODE")
9467 (code "GL_CONSTANT_BORDER")
9469 (code "GL_REPLICATE_BORDER")
9471 (para (code "GL_INVALID_OPERATION")
9473 (code "glConvolutionParameter")
9475 between the execution of "
9477 " and the corresponding
9482 (define-gl-procedure
9484 "glCopyColorSubTable"
9489 (function "glCopyColorSubTable"))
9490 (paramdef "GLenum " (parameter "target"))
9491 (paramdef "GLsizei " (parameter "start"))
9492 (paramdef "GLint " (parameter "x"))
9493 (paramdef "GLint " (parameter "y"))
9494 (paramdef "GLsizei " (parameter "width"))))
9496 (heading "respecify a portion of a color table")
9497 (heading "Parameters")
9498 (table (% (formatter (asis)))
9499 (entry (% (heading (var "target")))
9502 (code "GL_COLOR_TABLE")
9504 (code "GL_POST_CONVOLUTION_COLOR_TABLE")
9506 (code "GL_POST_COLOR_MATRIX_COLOR_TABLE")
9508 (entry (% (heading (var "start")))
9510 The starting index of the portion of the color table to be replaced. "))
9511 (entry (% (heading (var "x")))
9514 The window coordinates of the left corner of the row of pixels to be
9516 (entry (% (heading (var "width")))
9518 The number of table entries to replace. ")))
9519 (heading "Description")
9520 (para (code "glCopyColorSubTable")
9521 " is used to respecify a contiguous portion of a color table previously
9523 (code "glColorTable")
9524 ". The pixels copied from the framebuffer
9525 replace the portion of the existing table from indices "
9528 (math (var "start") "+" (var "x") "-" "1")
9530 inclusive. This region may not include any
9531 entries outside the range of the color table, as was originally specified.
9532 It is not an error to specify a subtexture with width of 0, but such a
9533 specification has no effect. ")
9535 (para (code "GL_INVALID_VALUE")
9538 " is not a previously defined
9540 (para (code "GL_INVALID_VALUE")
9543 " is not one of the allowable
9545 (para (code "GL_INVALID_VALUE")
9553 (para (code "GL_INVALID_OPERATION")
9555 (code "glCopyColorSubTable")
9557 between the execution of "
9559 " and the corresponding
9564 (define-gl-procedure
9569 (funcdef "void " (function "glCopyColorTable"))
9570 (paramdef "GLenum " (parameter "target"))
9571 (paramdef "GLenum " (parameter "internalformat"))
9572 (paramdef "GLint " (parameter "x"))
9573 (paramdef "GLint " (parameter "y"))
9574 (paramdef "GLsizei " (parameter "width"))))
9576 (heading "copy pixels into a color table")
9577 (heading "Parameters")
9578 (table (% (formatter (asis)))
9579 (entry (% (heading (var "target")))
9581 The color table target. Must be "
9582 (code "GL_COLOR_TABLE")
9584 (code "GL_POST_CONVOLUTION_COLOR_TABLE")
9587 (code "GL_POST_COLOR_MATRIX_COLOR_TABLE")
9589 (entry (% (heading (var "internalformat")))
9591 The internal storage format of the texture image.
9592 Must be one of the following symbolic constants: "
9603 (code "GL_LUMINANCE")
9605 (code "GL_LUMINANCE4")
9607 (code "GL_LUMINANCE8")
9609 (code "GL_LUMINANCE12")
9611 (code "GL_LUMINANCE16")
9613 (code "GL_LUMINANCE_ALPHA")
9615 (code "GL_LUMINANCE4_ALPHA4")
9617 (code "GL_LUMINANCE6_ALPHA2")
9619 (code "GL_LUMINANCE8_ALPHA8")
9621 (code "GL_LUMINANCE12_ALPHA4")
9623 (code "GL_LUMINANCE12_ALPHA12")
9625 (code "GL_LUMINANCE16_ALPHA16")
9627 (code "GL_INTENSITY")
9629 (code "GL_INTENSITY4")
9631 (code "GL_INTENSITY8")
9633 (code "GL_INTENSITY12")
9635 (code "GL_INTENSITY16")
9637 (code "GL_R3_G3_B2")
9663 (code "GL_RGB10_A2")
9669 (entry (% (heading (var "x")))
9671 The x coordinate of the lower-left corner of the pixel rectangle
9672 to be transferred to the color table. "))
9673 (entry (% (heading (var "y")))
9675 The y coordinate of the lower-left corner of the pixel rectangle
9676 to be transferred to the color table. "))
9677 (entry (% (heading (var "width")))
9679 The width of the pixel rectangle. ")))
9680 (heading "Description")
9681 (para (code "glCopyColorTable")
9682 " loads a color table with pixels from the current "
9683 (code "GL_READ_BUFFER")
9684 " (rather than from main memory, as is the case for "
9685 (code "glColorTable")
9688 The screen-aligned pixel rectangle with lower-left corner at ("
9696 is loaded into the color table. If any pixels within
9697 this region are outside the window that is associated with the GL
9698 context, the values obtained for those pixels are undefined. ")
9700 The pixels in the rectangle are processed just as if "
9701 (code "glReadPixels")
9702 " were called, with "
9703 (var "internalformat")
9705 but processing stops after the final conversion to RGBA. ")
9707 The four scale parameters and the four bias parameters that are defined
9708 for the table are then used to scale and bias the R, G, B, and A components
9709 of each pixel. The scale and bias parameters are set by calling "
9710 (code "glColorTableParameter")
9713 Next, the R, G, B, and A values are clamped to the range "
9714 (math "[" "0" "," "1" "]")
9716 Each pixel is then converted to the internal format specified by "
9717 (var "internalformat")
9718 ". This conversion simply maps the component values of the pixel (R, G, B,
9719 and A) to the values included in the internal format (red, green, blue,
9720 alpha, luminance, and intensity). The mapping is as follows: ")
9722 (table (% (formatter (asis)))
9723 (entry (% (heading (strong "Internal Format")))
9724 (para (strong "Red")
9732 (strong "Luminance")
9734 (strong "Intensity")))
9735 (entry (% (heading (code "GL_ALPHA")))
9736 (para ", " ", " ", " "
9738 (entry (% (heading (code "GL_LUMINANCE")))
9739 (para ", " ", " ", " ", " "
9741 (entry (% (heading (code "GL_LUMINANCE_ALPHA")))
9742 (para ", " ", " ", " "
9745 (entry (% (heading (code "GL_INTENSITY")))
9746 (para ", " ", " ", " ", " ", " "
9748 (entry (% (heading (code "GL_RGB")))
9752 B " ", " ", " ", "))
9753 (entry (% (heading (code "GL_RGBA")))
9768 Finally, the red, green, blue, alpha, luminance, and/or intensity components of
9769 the resulting pixels are stored in the color table.
9770 They form a one-dimensional table with indices in the range "
9771 (math "[" "0" "," (var "width") "-" "1" "]")
9775 (para (code "GL_INVALID_ENUM")
9776 " is generated when "
9779 allowable values. ")
9780 (para (code "GL_INVALID_VALUE")
9783 " is less than zero. ")
9784 (para (code "GL_INVALID_VALUE")
9786 (var "internalformat")
9788 allowable values. ")
9789 (para (code "GL_TABLE_TOO_LARGE")
9790 " is generated if the requested color table
9791 is too large to be supported by the implementation. ")
9792 (para (code "GL_INVALID_OPERATION")
9794 (code "glCopyColorTable")
9796 between the execution of "
9798 " and the corresponding
9803 (define-gl-procedure
9804 glCopyConvolutionFilter1D
9805 "glCopyConvolutionFilter1D"
9810 (function "glCopyConvolutionFilter1D"))
9811 (paramdef "GLenum " (parameter "target"))
9812 (paramdef "GLenum " (parameter "internalformat"))
9813 (paramdef "GLint " (parameter "x"))
9814 (paramdef "GLint " (parameter "y"))
9815 (paramdef "GLsizei " (parameter "width"))))
9818 "copy pixels into a one-dimensional convolution filter")
9819 (heading "Parameters")
9820 (table (% (formatter (asis)))
9821 (entry (% (heading (var "target")))
9824 (code "GL_CONVOLUTION_1D")
9826 (entry (% (heading (var "internalformat")))
9828 The internal format of the convolution filter kernel.
9829 The allowable values are "
9840 (code "GL_LUMINANCE")
9842 (code "GL_LUMINANCE4")
9844 (code "GL_LUMINANCE8")
9846 (code "GL_LUMINANCE12")
9848 (code "GL_LUMINANCE16")
9850 (code "GL_LUMINANCE_ALPHA")
9852 (code "GL_LUMINANCE4_ALPHA4")
9854 (code "GL_LUMINANCE6_ALPHA2")
9856 (code "GL_LUMINANCE8_ALPHA8")
9858 (code "GL_LUMINANCE12_ALPHA4")
9860 (code "GL_LUMINANCE12_ALPHA12")
9862 (code "GL_LUMINANCE16_ALPHA16")
9864 (code "GL_INTENSITY")
9866 (code "GL_INTENSITY4")
9868 (code "GL_INTENSITY8")
9870 (code "GL_INTENSITY12")
9872 (code "GL_INTENSITY16")
9874 (code "GL_R3_G3_B2")
9900 (code "GL_RGB10_A2")
9906 (entry (% (heading (var "x")))
9909 The window space coordinates of the lower-left coordinate of the
9910 pixel array to copy. "))
9911 (entry (% (heading (var "width")))
9913 The width of the pixel array to copy. ")))
9914 (heading "Description")
9915 (para (code "glCopyConvolutionFilter1D")
9916 " defines a one-dimensional convolution filter kernel with pixels
9918 (code "GL_READ_BUFFER")
9919 " (rather than from main memory,
9920 as is the case for "
9921 (code "glConvolutionFilter1D")
9924 The screen-aligned pixel rectangle with lower-left corner at ("
9931 " and height 1 is used to define
9932 the convolution filter. If any pixels within this region are
9933 outside the window that is associated with the GL context, the
9934 values obtained for those pixels are undefined. ")
9936 The pixels in the rectangle are processed exactly as if "
9937 (code "glReadPixels")
9939 had been called with "
9942 set to RGBA, but the process stops just before final conversion.
9943 The R, G, B, and A components of each pixel are next scaled by the four
9945 (code "GL_CONVOLUTION_FILTER_SCALE")
9946 " parameters and biased by the
9948 (code "GL_CONVOLUTION_FILTER_BIAS")
9950 (The scale and bias parameters are set by "
9951 (code "glConvolutionParameter")
9954 (code "GL_CONVOLUTION_1D")
9955 " target and the names "
9956 (code "GL_CONVOLUTION_FILTER_SCALE")
9958 (code "GL_CONVOLUTION_FILTER_BIAS")
9960 The parameters themselves are vectors of four values that are applied to red,
9961 green, blue, and alpha, in that order.)
9962 The R, G, B, and A values are not clamped to [0,1] at any time during this
9965 Each pixel is then converted to the internal format specified by "
9966 (var "internalformat")
9968 This conversion simply maps the component values of the pixel (R, G, B,
9969 and A) to the values included in the internal format (red, green, blue,
9970 alpha, luminance, and intensity). The mapping is as follows: ")
9972 (table (% (formatter (asis)))
9973 (entry (% (heading (strong "Internal Format")))
9974 (para (strong "Red")
9982 (strong "Luminance")
9984 (strong "Intensity")))
9985 (entry (% (heading (code "GL_ALPHA")))
9986 (para ", " ", " ", " "
9988 (entry (% (heading (code "GL_LUMINANCE")))
9989 (para ", " ", " ", " ", " "
9991 (entry (% (heading (code "GL_LUMINANCE_ALPHA")))
9992 (para ", " ", " ", " "
9995 (entry (% (heading (code "GL_INTENSITY")))
9996 (para ", " ", " ", " ", " ", " "
9998 (entry (% (heading (code "GL_RGB")))
10002 B " ", " ", " ", "))
10003 (entry (% (heading (code "GL_RGBA")))
10018 The red, green, blue, alpha, luminance, and/or intensity components of
10019 the resulting pixels are stored in floating-point rather than integer
10022 Pixel ordering is such that lower x screen coordinates correspond to
10025 " filter image coordinates. ")
10027 Note that after a convolution is performed, the resulting color
10028 components are also scaled by their corresponding "
10029 (code "GL_POST_CONVOLUTION_c_SCALE")
10030 " parameters and biased by their
10032 (code "GL_POST_CONVOLUTION_c_BIAS")
10033 " parameters (where "
10035 " takes on the values "
10044 These parameters are set by "
10045 (code "glPixelTransfer")
10048 (para (code "GL_INVALID_ENUM")
10049 " is generated if "
10052 (code "GL_CONVOLUTION_1D")
10054 (para (code "GL_INVALID_ENUM")
10055 " is generated if "
10056 (var "internalformat")
10057 " is not one of the
10058 allowable values. ")
10059 (para (code "GL_INVALID_VALUE")
10060 " is generated if "
10062 " is less than zero or greater
10063 than the maximum supported value.
10064 This value may be queried with "
10065 (code "glGetConvolutionParameter")
10068 (code "GL_CONVOLUTION_1D")
10070 (code "GL_MAX_CONVOLUTION_WIDTH")
10072 (para (code "GL_INVALID_OPERATION")
10073 " is generated if "
10074 (code "glCopyConvolutionFilter1D")
10076 between the execution of "
10078 " and the corresponding
10083 (define-gl-procedure
10084 glCopyConvolutionFilter2D
10085 "glCopyConvolutionFilter2D"
10090 (function "glCopyConvolutionFilter2D"))
10091 (paramdef "GLenum " (parameter "target"))
10092 (paramdef "GLenum " (parameter "internalformat"))
10093 (paramdef "GLint " (parameter "x"))
10094 (paramdef "GLint " (parameter "y"))
10095 (paramdef "GLsizei " (parameter "width"))
10096 (paramdef "GLsizei " (parameter "height"))))
10099 "copy pixels into a two-dimensional convolution filter")
10100 (heading "Parameters")
10101 (table (% (formatter (asis)))
10102 (entry (% (heading (var "target")))
10105 (code "GL_CONVOLUTION_2D")
10107 (entry (% (heading (var "internalformat")))
10109 The internal format of the convolution filter kernel.
10110 The allowable values are "
10117 (code "GL_ALPHA12")
10119 (code "GL_ALPHA16")
10121 (code "GL_LUMINANCE")
10123 (code "GL_LUMINANCE4")
10125 (code "GL_LUMINANCE8")
10127 (code "GL_LUMINANCE12")
10129 (code "GL_LUMINANCE16")
10131 (code "GL_LUMINANCE_ALPHA")
10133 (code "GL_LUMINANCE4_ALPHA4")
10135 (code "GL_LUMINANCE6_ALPHA2")
10137 (code "GL_LUMINANCE8_ALPHA8")
10139 (code "GL_LUMINANCE12_ALPHA4")
10141 (code "GL_LUMINANCE12_ALPHA12")
10143 (code "GL_LUMINANCE16_ALPHA16")
10145 (code "GL_INTENSITY")
10147 (code "GL_INTENSITY4")
10149 (code "GL_INTENSITY8")
10151 (code "GL_INTENSITY12")
10153 (code "GL_INTENSITY16")
10155 (code "GL_R3_G3_B2")
10177 (code "GL_RGB5_A1")
10181 (code "GL_RGB10_A2")
10187 (entry (% (heading (var "x")))
10190 The window space coordinates of the lower-left coordinate of the
10191 pixel array to copy. "))
10192 (entry (% (heading (var "width")))
10194 The width of the pixel array to copy. "))
10195 (entry (% (heading (var "height")))
10197 The height of the pixel array to copy. ")))
10198 (heading "Description")
10199 (para (code "glCopyConvolutionFilter2D")
10200 " defines a two-dimensional convolution filter kernel with pixels
10202 (code "GL_READ_BUFFER")
10203 " (rather than from main memory,
10204 as is the case for "
10205 (code "glConvolutionFilter2D")
10208 The screen-aligned pixel rectangle with lower-left corner at ("
10218 is used to define the convolution filter. If any pixels within this
10220 outside the window that is associated with the GL context, the
10221 values obtained for those pixels are undefined. ")
10223 The pixels in the rectangle are processed
10225 (code "glReadPixels")
10226 " had been called with "
10229 set to RGBA, but the process stops just before final conversion.
10230 The R, G, B, and A components of each pixel are next scaled by the four
10232 (code "GL_CONVOLUTION_FILTER_SCALE")
10233 " parameters and biased by the
10235 (code "GL_CONVOLUTION_FILTER_BIAS")
10237 (The scale and bias parameters are set by "
10238 (code "glConvolutionParameter")
10241 (code "GL_CONVOLUTION_2D")
10242 " target and the names "
10243 (code "GL_CONVOLUTION_FILTER_SCALE")
10245 (code "GL_CONVOLUTION_FILTER_BIAS")
10247 The parameters themselves are vectors of four values that are applied to red,
10248 green, blue, and alpha, in that order.)
10249 The R, G, B, and A values are not clamped to [0,1] at any time during this
10252 Each pixel is then converted to the internal format specified by "
10253 (var "internalformat")
10255 This conversion simply maps the component values of the pixel (R, G, B,
10256 and A) to the values included in the internal format (red, green, blue,
10257 alpha, luminance, and intensity). The mapping is as follows: ")
10259 (table (% (formatter (asis)))
10260 (entry (% (heading (strong "Internal Format")))
10261 (para (strong "Red")
10269 (strong "Luminance")
10271 (strong "Intensity")))
10272 (entry (% (heading (code "GL_ALPHA")))
10273 (para ", " ", " ", " "
10275 (entry (% (heading (code "GL_LUMINANCE")))
10276 (para ", " ", " ", " ", " "
10278 (entry (% (heading (code "GL_LUMINANCE_ALPHA")))
10279 (para ", " ", " ", " "
10282 (entry (% (heading (code "GL_INTENSITY")))
10283 (para ", " ", " ", " ", " ", " "
10285 (entry (% (heading (code "GL_RGB")))
10289 B " ", " ", " ", "))
10290 (entry (% (heading (code "GL_RGBA")))
10305 The red, green, blue, alpha, luminance, and/or intensity components of
10306 the resulting pixels are stored in floating-point rather than integer
10309 Pixel ordering is such that lower x screen coordinates correspond to
10312 " filter image coordinates, and lower y screen coordinates
10313 correspond to lower "
10315 " filter image coordinates. ")
10317 Note that after a convolution is performed, the resulting color
10318 components are also scaled by their corresponding "
10319 (code "GL_POST_CONVOLUTION_c_SCALE")
10320 " parameters and biased by their
10322 (code "GL_POST_CONVOLUTION_c_BIAS")
10323 " parameters (where "
10325 " takes on the values "
10334 These parameters are set by "
10335 (code "glPixelTransfer")
10338 (para (code "GL_INVALID_ENUM")
10339 " is generated if "
10342 (code "GL_CONVOLUTION_2D")
10344 (para (code "GL_INVALID_ENUM")
10345 " is generated if "
10346 (var "internalformat")
10347 " is not one of the
10348 allowable values. ")
10349 (para (code "GL_INVALID_VALUE")
10350 " is generated if "
10352 " is less than zero or greater
10353 than the maximum supported value.
10354 This value may be queried with "
10355 (code "glGetConvolutionParameter")
10358 (code "GL_CONVOLUTION_2D")
10360 (code "GL_MAX_CONVOLUTION_WIDTH")
10362 (para (code "GL_INVALID_VALUE")
10363 " is generated if "
10365 " is less than zero or greater
10366 than the maximum supported value.
10367 This value may be queried with "
10368 (code "glGetConvolutionParameter")
10371 (code "GL_CONVOLUTION_2D")
10373 (code "GL_MAX_CONVOLUTION_HEIGHT")
10375 (para (code "GL_INVALID_OPERATION")
10376 " is generated if "
10377 (code "glCopyConvolutionFilter2D")
10379 between the execution of "
10381 " and the corresponding
10386 (define-gl-procedure
10391 (funcdef "void " (function "glCopyPixels"))
10392 (paramdef "GLint " (parameter "x"))
10393 (paramdef "GLint " (parameter "y"))
10394 (paramdef "GLsizei " (parameter "width"))
10395 (paramdef "GLsizei " (parameter "height"))
10396 (paramdef "GLenum " (parameter "type"))))
10398 (heading "copy pixels in the frame buffer")
10399 (heading "Parameters")
10400 (table (% (formatter (asis)))
10401 (entry (% (heading (var "x")))
10404 Specify the window coordinates of the lower left corner
10405 of the rectangular region of pixels to be copied. "))
10406 (entry (% (heading (var "width")))
10407 (itemx (var "height"))
10409 Specify the dimensions of the rectangular region of pixels to be copied.
10410 Both must be nonnegative. "))
10411 (entry (% (heading (var "type")))
10413 Specifies whether color values,
10415 or stencil values are to be copied.
10416 Symbolic constants "
10422 (code "GL_STENCIL")
10423 " are accepted. ")))
10424 (heading "Description")
10425 (para (code "glCopyPixels")
10426 " copies a screen-aligned rectangle of pixels
10427 from the specified frame buffer location to a region relative to the
10428 current raster position.
10429 Its operation is well defined only if the entire pixel source region
10430 is within the exposed portion of the window.
10431 Results of copies from outside the window,
10432 or from regions of the window that are not exposed,
10433 are hardware dependent and undefined. ")
10437 " specify the window coordinates of
10438 the lower left corner of the rectangular region to be copied. "
10442 " specify the dimensions of the
10443 rectangular region to be copied.
10448 " must not be negative. ")
10450 Several parameters control the processing of the pixel data
10451 while it is being copied.
10452 These parameters are set with three commands: "
10453 (code "glPixelTransfer")
10455 (code "glPixelMap")
10457 (code "glPixelZoom")
10459 This reference page describes the effects on "
10460 (code "glCopyPixels")
10462 but not all, of the parameters specified by these three commands. ")
10463 (para (code "glCopyPixels")
10464 " copies values from each pixel with the lower left-hand corner at "
10476 (math "0" "<=" (var "i") "<" (var "width"))
10479 (math "0" "<=" (var "j") "<" (var "height"))
10481 This pixel is said to be the "
10488 Pixels are copied in row order from the lowest to the highest row,
10489 left to right in each row. ")
10491 " specifies whether color, depth, or stencil data is to be copied.
10492 The details of the transfer for each data type are as follows: ")
10493 (table (% (formatter (asis)))
10494 (entry (% (heading (code "GL_COLOR")))
10496 Indices or RGBA colors are read from the buffer currently specified as the
10497 read source buffer (see "
10498 (code "glReadBuffer")
10500 If the GL is in color index mode,
10501 each index that is read from this buffer is converted
10502 to a fixed-point format with an unspecified
10503 number of bits to the right of the binary point.
10504 Each index is then shifted left by "
10505 (code "GL_INDEX_SHIFT")
10508 (code "GL_INDEX_OFFSET")
10511 (code "GL_INDEX_SHIFT")
10513 the shift is to the right.
10514 In either case, zero bits fill otherwise unspecified bit locations in the
10517 (code "GL_MAP_COLOR")
10519 the index is replaced with the value that it references in lookup table "
10520 (code "GL_PIXEL_MAP_I_TO_I")
10522 Whether the lookup replacement of the index is done or not,
10523 the integer part of the index is then ANDed with "
10524 (math "2" "^" (var "b") "-" "1")
10529 is the number of bits in a color index buffer. ")
10531 If the GL is in RGBA mode,
10532 the red, green, blue, and alpha components of each pixel that is read
10533 are converted to an internal floating-point format with unspecified
10535 The conversion maps the largest representable component value to 1.0,
10536 and component value 0 to 0.0.
10537 The resulting floating-point color values are then multiplied
10539 (code "GL_c_SCALE")
10545 " is RED, GREEN, BLUE, and ALPHA
10546 for the respective color components.
10547 The results are clamped to the range [0,1].
10549 (code "GL_MAP_COLOR")
10551 each color component is scaled by the size of lookup table "
10552 (code "GL_PIXEL_MAP_c_TO_c")
10554 then replaced by the value that it references in that table. "
10556 " is R, G, B, or A. ")
10559 (code "ARB_imaging")
10560 " extension is supported, the color values may
10562 additionally processed by color-table lookups, color-matrix
10563 transformations, and convolution filters. ")
10565 The GL then converts the resulting indices or RGBA colors to fragments
10566 by attaching the current raster position "
10569 texture coordinates to each pixel,
10570 then assigning window coordinates "
10596 is the current raster position,
10597 and the pixel was the "
10604 These pixel fragments are then treated just like the fragments generated by
10605 rasterizing points, lines, or polygons.
10608 and all the fragment operations are applied before the fragments are written
10609 to the frame buffer. "))
10610 (entry (% (heading (code "GL_DEPTH")))
10612 Depth values are read from the depth buffer and
10613 converted directly to an internal floating-point format
10614 with unspecified precision.
10615 The resulting floating-point depth value is then multiplied
10617 (code "GL_DEPTH_SCALE")
10619 (code "GL_DEPTH_BIAS")
10621 The result is clamped to the range [0,1]. ")
10623 The GL then converts the resulting depth components to fragments
10624 by attaching the current raster position color or color index and
10625 texture coordinates to each pixel,
10626 then assigning window coordinates "
10652 is the current raster position,
10653 and the pixel was the "
10660 These pixel fragments are then treated just like the fragments generated by
10661 rasterizing points, lines, or polygons.
10664 and all the fragment operations are applied before the fragments are written
10665 to the frame buffer. "))
10666 (entry (% (heading (code "GL_STENCIL")))
10668 Stencil indices are read from the stencil buffer and
10669 converted to an internal fixed-point format
10670 with an unspecified number of bits to the right of the binary point.
10671 Each fixed-point index is then shifted left by "
10672 (code "GL_INDEX_SHIFT")
10675 (code "GL_INDEX_OFFSET")
10678 (code "GL_INDEX_SHIFT")
10680 the shift is to the right.
10681 In either case, zero bits fill otherwise unspecified bit locations in the
10684 (code "GL_MAP_STENCIL")
10686 the index is replaced with the value that it references in lookup table "
10687 (code "GL_PIXEL_MAP_S_TO_S")
10689 Whether the lookup replacement of the index is done or not,
10690 the integer part of the index is then ANDed with "
10691 (math "2" "^" (var "b") "-" "1")
10696 is the number of bits in the stencil buffer.
10697 The resulting stencil indices are then written to the stencil buffer
10698 such that the index read from the "
10705 is written to location "
10731 is the current raster position.
10732 Only the pixel ownership test,
10734 and the stencil writemask affect these write operations. ")))
10736 The rasterization described thus far assumes pixel zoom factors of 1.0.
10738 (code "glPixelZoom")
10739 " is used to change the "
10745 pixel zoom factors,
10746 pixels are converted to fragments as follows.
10758 is the current raster position,
10759 and a given pixel is in the "
10767 then fragments are generated for pixels whose centers are in the rectangle
10829 (math (var "zoom") "_" (var "x"))
10834 (math (var "zoom") "_" (var "y"))
10840 (para (code "GL_INVALID_ENUM")
10841 " is generated if "
10843 " is not an accepted value. ")
10844 (para (code "GL_INVALID_VALUE")
10845 " is generated if either "
10850 (para (code "GL_INVALID_OPERATION")
10851 " is generated if "
10856 and there is no depth buffer. ")
10857 (para (code "GL_INVALID_OPERATION")
10858 " is generated if "
10861 (code "GL_STENCIL")
10863 and there is no stencil buffer. ")
10864 (para (code "GL_INVALID_OPERATION")
10865 " is generated if "
10866 (code "glCopyPixels")
10868 is executed between the execution of "
10871 and the corresponding execution of "
10875 (define-gl-procedure
10880 (funcdef "void " (function "glCopyTexImage1D"))
10881 (paramdef "GLenum " (parameter "target"))
10882 (paramdef "GLint " (parameter "level"))
10883 (paramdef "GLenum " (parameter "internalformat"))
10884 (paramdef "GLint " (parameter "x"))
10885 (paramdef "GLint " (parameter "y"))
10886 (paramdef "GLsizei " (parameter "width"))
10887 (paramdef "GLint " (parameter "border"))))
10889 (heading "copy pixels into a 1D texture image")
10890 (heading "Parameters")
10891 (table (% (formatter (asis)))
10892 (entry (% (heading (var "target")))
10894 Specifies the target texture.
10896 (code "GL_TEXTURE_1D")
10898 (entry (% (heading (var "level")))
10900 Specifies the level-of-detail number.
10901 Level 0 is the base image level.
10906 "th mipmap reduction image. "))
10907 (entry (% (heading (var "internalformat")))
10909 Specifies the internal format of the texture.
10910 Must be one of the following symbolic constants: "
10917 (code "GL_ALPHA12")
10919 (code "GL_ALPHA16")
10921 (code "GL_COMPRESSED_ALPHA")
10923 (code "GL_COMPRESSED_LUMINANCE")
10925 (code "GL_COMPRESSED_LUMINANCE_ALPHA")
10927 (code "GL_COMPRESSED_INTENSITY")
10929 (code "GL_COMPRESSED_RGB")
10931 (code "GL_COMPRESSED_RGBA")
10933 (code "GL_DEPTH_COMPONENT")
10935 (code "GL_DEPTH_COMPONENT16")
10937 (code "GL_DEPTH_COMPONENT24")
10939 (code "GL_DEPTH_COMPONENT32")
10941 (code "GL_LUMINANCE")
10943 (code "GL_LUMINANCE4")
10945 (code "GL_LUMINANCE8")
10947 (code "GL_LUMINANCE12")
10949 (code "GL_LUMINANCE16")
10951 (code "GL_LUMINANCE_ALPHA")
10953 (code "GL_LUMINANCE4_ALPHA4")
10955 (code "GL_LUMINANCE6_ALPHA2")
10957 (code "GL_LUMINANCE8_ALPHA8")
10959 (code "GL_LUMINANCE12_ALPHA4")
10961 (code "GL_LUMINANCE12_ALPHA12")
10963 (code "GL_LUMINANCE16_ALPHA16")
10965 (code "GL_INTENSITY")
10967 (code "GL_INTENSITY4")
10969 (code "GL_INTENSITY8")
10971 (code "GL_INTENSITY12")
10973 (code "GL_INTENSITY16")
10977 (code "GL_R3_G3_B2")
10997 (code "GL_RGB5_A1")
11001 (code "GL_RGB10_A2")
11007 (code "GL_SLUMINANCE")
11009 (code "GL_SLUMINANCE8")
11011 (code "GL_SLUMINANCE_ALPHA")
11013 (code "GL_SLUMINANCE8_ALPHA8")
11019 (code "GL_SRGB_ALPHA")
11021 (code "GL_SRGB8_ALPHA8")
11023 (entry (% (heading (var "x")))
11026 Specify the window coordinates of the left corner
11027 of the row of pixels to be copied. "))
11028 (entry (% (heading (var "width")))
11030 Specifies the width of the texture image.
11046 The height of the texture image is 1. "))
11047 (entry (% (heading (var "border")))
11049 Specifies the width of the border.
11050 Must be either 0 or 1. ")))
11051 (heading "Description")
11052 (para (code "glCopyTexImage1D")
11053 " defines a one-dimensional texture image with pixels from the current "
11054 (code "GL_READ_BUFFER")
11057 The screen-aligned pixel row with left corner at "
11058 (math "(" (var "x") "," (var "y") ")")
11060 and with a length of "
11061 (math (var "width")
11070 defines the texture array
11071 at the mipmap level specified by "
11074 (var "internalformat")
11075 " specifies the internal format of the texture array. ")
11077 The pixels in the row are processed exactly as if "
11078 (code "glCopyPixels")
11079 " had been called, but the process stops just before
11081 At this point all pixel component values are clamped to the range "
11082 (math "[" "0" "," "1" "]")
11084 and then converted to the texture's internal format for storage in the texel
11087 Pixel ordering is such that lower "
11090 screen coordinates correspond to
11091 lower texture coordinates. ")
11093 If any of the pixels within the specified row of the current "
11094 (code "GL_READ_BUFFER")
11095 " are outside the window associated with the current
11096 rendering context, then the values obtained for those pixels are undefined. ")
11097 (para (code "glCopyTexImage1D")
11098 " defines a one-dimensional texture image with pixels from the current "
11099 (code "GL_READ_BUFFER")
11103 (var "internalformat")
11104 " is one of the sRGB types, the GL does not automatically convert the source pixels to the sRGB color space. In this case, the "
11105 (code "glPixelMap")
11106 " function can be used to accomplish the conversion. ")
11108 (para (code "GL_INVALID_ENUM")
11109 " is generated if "
11111 " is not one of the allowable values. ")
11112 (para (code "GL_INVALID_VALUE")
11113 " is generated if "
11115 " is less than 0. ")
11116 (para (code "GL_INVALID_VALUE")
11117 " may be generated if "
11121 (math (var "log") "_" "2" "\u2062" (var "max"))
11126 is the returned value of "
11127 (code "GL_MAX_TEXTURE_SIZE")
11129 (para (code "GL_INVALID_VALUE")
11130 " is generated if "
11131 (var "internalformat")
11132 " is not an allowable value. ")
11133 (para (code "GL_INVALID_VALUE")
11134 " is generated if "
11136 " is less than 0 or greater than
11138 (code "GL_MAX_TEXTURE_SIZE")
11140 (para (code "GL_INVALID_VALUE")
11141 " is generated if non-power-of-two textures are not supported and the "
11143 " cannot be represented as "
11155 for some integer value of "
11158 (para (code "GL_INVALID_VALUE")
11159 " is generated if "
11161 " is not 0 or 1. ")
11162 (para (code "GL_INVALID_OPERATION")
11163 " is generated if "
11164 (code "glCopyTexImage1D")
11165 " is executed between the execution of "
11167 " and the corresponding execution of "
11170 (para (code "GL_INVALID_OPERATION")
11171 " is generated if "
11172 (var "internalformat")
11174 (code "GL_DEPTH_COMPONENT")
11176 (code "GL_DEPTH_COMPONENT16")
11178 (code "GL_DEPTH_COMPONENT24")
11180 (code "GL_DEPTH_COMPONENT32")
11181 " and there is no depth
11184 (define-gl-procedure
11189 (funcdef "void " (function "glCopyTexImage2D"))
11190 (paramdef "GLenum " (parameter "target"))
11191 (paramdef "GLint " (parameter "level"))
11192 (paramdef "GLenum " (parameter "internalformat"))
11193 (paramdef "GLint " (parameter "x"))
11194 (paramdef "GLint " (parameter "y"))
11195 (paramdef "GLsizei " (parameter "width"))
11196 (paramdef "GLsizei " (parameter "height"))
11197 (paramdef "GLint " (parameter "border"))))
11199 (heading "copy pixels into a 2D texture image")
11200 (heading "Parameters")
11201 (table (% (formatter (asis)))
11202 (entry (% (heading (var "target")))
11204 Specifies the target texture.
11206 (code "GL_TEXTURE_2D")
11208 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_X")
11210 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_X")
11212 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Y")
11214 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y")
11216 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Z")
11218 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z")
11220 (entry (% (heading (var "level")))
11222 Specifies the level-of-detail number.
11223 Level 0 is the base image level.
11228 "th mipmap reduction image. "))
11229 (entry (% (heading (var "internalformat")))
11231 Specifies the internal format of the texture.
11232 Must be one of the following symbolic constants: "
11239 (code "GL_ALPHA12")
11241 (code "GL_ALPHA16")
11243 (code "GL_COMPRESSED_ALPHA")
11245 (code "GL_COMPRESSED_LUMINANCE")
11247 (code "GL_COMPRESSED_LUMINANCE_ALPHA")
11249 (code "GL_COMPRESSED_INTENSITY")
11251 (code "GL_COMPRESSED_RGB")
11253 (code "GL_COMPRESSED_RGBA")
11255 (code "GL_DEPTH_COMPONENT")
11257 (code "GL_DEPTH_COMPONENT16")
11259 (code "GL_DEPTH_COMPONENT24")
11261 (code "GL_DEPTH_COMPONENT32")
11263 (code "GL_LUMINANCE")
11265 (code "GL_LUMINANCE4")
11267 (code "GL_LUMINANCE8")
11269 (code "GL_LUMINANCE12")
11271 (code "GL_LUMINANCE16")
11273 (code "GL_LUMINANCE_ALPHA")
11275 (code "GL_LUMINANCE4_ALPHA4")
11277 (code "GL_LUMINANCE6_ALPHA2")
11279 (code "GL_LUMINANCE8_ALPHA8")
11281 (code "GL_LUMINANCE12_ALPHA4")
11283 (code "GL_LUMINANCE12_ALPHA12")
11285 (code "GL_LUMINANCE16_ALPHA16")
11287 (code "GL_INTENSITY")
11289 (code "GL_INTENSITY4")
11291 (code "GL_INTENSITY8")
11293 (code "GL_INTENSITY12")
11295 (code "GL_INTENSITY16")
11299 (code "GL_R3_G3_B2")
11319 (code "GL_RGB5_A1")
11323 (code "GL_RGB10_A2")
11329 (code "GL_SLUMINANCE")
11331 (code "GL_SLUMINANCE8")
11333 (code "GL_SLUMINANCE_ALPHA")
11335 (code "GL_SLUMINANCE8_ALPHA8")
11341 (code "GL_SRGB_ALPHA")
11343 (code "GL_SRGB8_ALPHA8")
11345 (entry (% (heading (var "x")))
11348 Specify the window coordinates of the lower left corner
11349 of the rectangular region of pixels to be copied. "))
11350 (entry (% (heading (var "width")))
11352 Specifies the width of the texture image.
11368 (entry (% (heading (var "height")))
11370 Specifies the height of the texture image.
11386 (entry (% (heading (var "border")))
11388 Specifies the width of the border.
11389 Must be either 0 or 1. ")))
11390 (heading "Description")
11391 (para (code "glCopyTexImage2D")
11392 " defines a two-dimensional texture image, or cube-map texture image
11393 with pixels from the current "
11394 (code "GL_READ_BUFFER")
11397 The screen-aligned pixel rectangle with lower left corner at ("
11401 ") and with a width of "
11402 (math (var "width")
11412 (math (var "height")
11421 defines the texture array
11422 at the mipmap level specified by "
11425 (var "internalformat")
11426 " specifies the internal format of the texture array. ")
11428 The pixels in the rectangle are processed exactly as if "
11429 (code "glCopyPixels")
11430 " had been called, but the process stops just before
11432 At this point all pixel component values are clamped to the range "
11433 (math "[" "0" "," "1" "]")
11435 and then converted to the texture's internal format for storage in the texel
11438 Pixel ordering is such that lower "
11444 screen coordinates correspond to
11451 texture coordinates. ")
11453 If any of the pixels within the specified rectangle of the current "
11454 (code "GL_READ_BUFFER")
11455 " are outside the window associated with the current
11456 rendering context, then the values obtained for those pixels are undefined. ")
11459 (var "internalformat")
11460 " is one of the sRGB types, the GL does not automatically convert the source pixels to the sRGB color space. In this case, the "
11461 (code "glPixelMap")
11462 " function can be used to accomplish the conversion. ")
11464 (para (code "GL_INVALID_ENUM")
11465 " is generated if "
11468 (code "GL_TEXTURE_2D")
11470 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_X")
11472 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_X")
11474 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Y")
11476 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y")
11478 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Z")
11480 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z")
11482 (para (code "GL_INVALID_VALUE")
11483 " is generated if "
11485 " is less than 0. ")
11486 (para (code "GL_INVALID_VALUE")
11487 " may be generated if "
11491 (math (var "log") "_" "2" "\u2062" (var "max"))
11496 is the returned value of "
11497 (code "GL_MAX_TEXTURE_SIZE")
11499 (para (code "GL_INVALID_VALUE")
11500 " is generated if "
11505 (code "GL_MAX_TEXTURE_SIZE")
11507 (para (code "GL_INVALID_VALUE")
11508 " is generated if non-power-of-two textures are not supported and the "
11512 " cannot be represented as "
11527 (para (code "GL_INVALID_VALUE")
11528 " is generated if "
11530 " is not 0 or 1. ")
11531 (para (code "GL_INVALID_VALUE")
11532 " is generated if "
11533 (var "internalformat")
11535 accepted format. ")
11536 (para (code "GL_INVALID_OPERATION")
11537 " is generated if "
11538 (code "glCopyTexImage2D")
11540 between the execution of "
11542 " and the corresponding
11546 (para (code "GL_INVALID_OPERATION")
11547 " is generated if "
11548 (var "internalformat")
11550 (code "GL_DEPTH_COMPONENT")
11552 (code "GL_DEPTH_COMPONENT16")
11554 (code "GL_DEPTH_COMPONENT24")
11556 (code "GL_DEPTH_COMPONENT32")
11557 " and there is no depth
11560 (define-gl-procedure
11561 glCopyTexSubImage1D
11562 "glCopyTexSubImage1D"
11567 (function "glCopyTexSubImage1D"))
11568 (paramdef "GLenum " (parameter "target"))
11569 (paramdef "GLint " (parameter "level"))
11570 (paramdef "GLint " (parameter "xoffset"))
11571 (paramdef "GLint " (parameter "x"))
11572 (paramdef "GLint " (parameter "y"))
11573 (paramdef "GLsizei " (parameter "width"))))
11576 "copy a one-dimensional texture subimage")
11577 (heading "Parameters")
11578 (table (% (formatter (asis)))
11579 (entry (% (heading (var "target")))
11581 Specifies the target texture.
11583 (code "GL_TEXTURE_1D")
11585 (entry (% (heading (var "level")))
11587 Specifies the level-of-detail number.
11588 Level 0 is the base image level.
11593 "th mipmap reduction image. "))
11594 (entry (% (heading (var "xoffset")))
11596 Specifies the texel offset within the texture array. "))
11597 (entry (% (heading (var "x")))
11600 Specify the window coordinates of the left corner
11601 of the row of pixels to be copied. "))
11602 (entry (% (heading (var "width")))
11604 Specifies the width of the texture subimage. ")))
11605 (heading "Description")
11606 (para (code "glCopyTexSubImage1D")
11607 " replaces a portion of a one-dimensional
11608 texture image with pixels from the current "
11609 (code "GL_READ_BUFFER")
11611 than from main memory, as is the case for "
11612 (code "glTexSubImage1D")
11615 The screen-aligned pixel row with left corner at ("
11622 " replaces the portion of the
11623 texture array with x indices "
11626 (math (var "xoffset") "+" (var "width") "-" "1")
11628 inclusive. The destination in the texture array may not
11629 include any texels outside the texture array as it was
11630 originally specified. ")
11632 The pixels in the row are processed exactly as if "
11633 (code "glCopyPixels")
11634 " had been called, but the process stops just before
11636 At this point, all pixel component values are clamped to the range "
11637 (math "[" "0" "," "1" "]")
11639 and then converted to the texture's internal format for storage in the texel
11642 It is not an error to specify a subtexture with zero width, but
11643 such a specification has no effect.
11644 If any of the pixels within the specified row of the current "
11645 (code "GL_READ_BUFFER")
11646 " are outside the read window associated with the current
11647 rendering context, then the values obtained for those pixels are undefined. ")
11649 No change is made to the "
11650 (var "internalformat")
11656 " parameters of the specified texture
11657 array or to texel values outside the specified subregion. ")
11659 (para (code "GL_INVALID_ENUM")
11660 " is generated if /"
11663 (code "GL_TEXTURE_1D")
11665 (para (code "GL_INVALID_OPERATION")
11666 " is generated if the texture array has not
11667 been defined by a previous "
11668 (code "glTexImage1D")
11670 (code "glCopyTexImage1D")
11672 (para (code "GL_INVALID_VALUE")
11673 " is generated if "
11675 " is less than 0. ")
11676 (para (code "GL_INVALID_VALUE")
11677 " may be generated if "
11678 (math (var "level")
11691 " is the returned value of "
11692 (code "GL_MAX_TEXTURE_SIZE")
11694 (para (code "GL_INVALID_VALUE")
11695 " is generated if "
11696 (math (var "xoffset") "<" "-" (var "b"))
11717 (code "GL_TEXTURE_WIDTH")
11722 (code "GL_TEXTURE_BORDER")
11724 of the texture image being modified.
11728 includes twice the border width. ")
11731 (define-gl-procedure
11732 glCopyTexSubImage2D
11733 "glCopyTexSubImage2D"
11738 (function "glCopyTexSubImage2D"))
11739 (paramdef "GLenum " (parameter "target"))
11740 (paramdef "GLint " (parameter "level"))
11741 (paramdef "GLint " (parameter "xoffset"))
11742 (paramdef "GLint " (parameter "yoffset"))
11743 (paramdef "GLint " (parameter "x"))
11744 (paramdef "GLint " (parameter "y"))
11745 (paramdef "GLsizei " (parameter "width"))
11746 (paramdef "GLsizei " (parameter "height"))))
11749 "copy a two-dimensional texture subimage")
11750 (heading "Parameters")
11751 (table (% (formatter (asis)))
11752 (entry (% (heading (var "target")))
11754 Specifies the target texture.
11756 (code "GL_TEXTURE_2D")
11758 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_X")
11760 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_X")
11762 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Y")
11764 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y")
11766 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Z")
11768 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z")
11770 (entry (% (heading (var "level")))
11772 Specifies the level-of-detail number.
11773 Level 0 is the base image level.
11778 "th mipmap reduction image. "))
11779 (entry (% (heading (var "xoffset")))
11781 Specifies a texel offset in the x direction within the texture array. "))
11782 (entry (% (heading (var "yoffset")))
11784 Specifies a texel offset in the y direction within the texture array. "))
11785 (entry (% (heading (var "x")))
11788 Specify the window coordinates of the lower left corner
11789 of the rectangular region of pixels to be copied. "))
11790 (entry (% (heading (var "width")))
11792 Specifies the width of the texture subimage. "))
11793 (entry (% (heading (var "height")))
11795 Specifies the height of the texture subimage. ")))
11796 (heading "Description")
11797 (para (code "glCopyTexSubImage2D")
11798 " replaces a rectangular portion of a two-dimensional texture image or
11799 cube-map texture image with pixels from the current "
11800 (code "GL_READ_BUFFER")
11802 (rather than from main memory, as is the case for "
11803 (code "glTexSubImage2D")
11806 The screen-aligned pixel rectangle with lower left corner at "
11807 (math "(" (var "x") "," (var "y") ")")
11814 " replaces the portion of the
11815 texture array with x indices "
11818 (math (var "xoffset") "+" (var "width") "-" "1")
11820 inclusive, and y indices "
11823 (math (var "yoffset") "+" (var "height") "-" "1")
11825 inclusive, at the mipmap level specified by "
11829 The pixels in the rectangle are processed exactly as if "
11830 (code "glCopyPixels")
11831 " had been called, but the process stops just before
11833 At this point, all pixel component values are clamped to the range "
11834 (math "[" "0" "," "1" "]")
11836 and then converted to the texture's internal format for storage in the texel
11839 The destination rectangle in the texture array may not include any texels
11840 outside the texture array as it was originally specified.
11841 It is not an error to specify a subtexture with zero width or height, but
11842 such a specification has no effect. ")
11844 If any of the pixels within the specified rectangle of the current "
11845 (code "GL_READ_BUFFER")
11846 " are outside the read window associated with the current
11847 rendering context, then the values obtained for those pixels are undefined. ")
11849 No change is made to the "
11850 (var "internalformat")
11857 " parameters of the specified texture
11858 array or to texel values outside the specified subregion. ")
11860 (para (code "GL_INVALID_ENUM")
11861 " is generated if "
11864 (code "GL_TEXTURE_2D")
11866 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_X")
11868 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_X")
11870 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Y")
11872 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y")
11874 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Z")
11876 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z")
11878 (para (code "GL_INVALID_OPERATION")
11879 " is generated if the texture array has not been
11880 defined by a previous "
11881 (code "glTexImage2D")
11883 (code "glCopyTexImage2D")
11885 (para (code "GL_INVALID_VALUE")
11886 " is generated if "
11888 " is less than 0. ")
11889 (para (code "GL_INVALID_VALUE")
11890 " may be generated if "
11891 (math (var "level")
11905 is the returned value of "
11906 (code "GL_MAX_TEXTURE_SIZE")
11908 (para (code "GL_INVALID_VALUE")
11909 " is generated if "
11910 (math (var "xoffset") "<" "-" (var "b"))
11926 (math (var "yoffset") "<" "-" (var "b"))
11947 (code "GL_TEXTURE_WIDTH")
11952 (code "GL_TEXTURE_HEIGHT")
11958 (code "GL_TEXTURE_BORDER")
11960 of the texture image being modified.
11967 include twice the border width. ")
11968 (para (code "GL_INVALID_OPERATION")
11969 " is generated if "
11970 (code "glCopyTexSubImage2D")
11972 between the execution of "
11974 " and the corresponding
11979 (define-gl-procedure
11980 glCopyTexSubImage3D
11981 "glCopyTexSubImage3D"
11986 (function "glCopyTexSubImage3D"))
11987 (paramdef "GLenum " (parameter "target"))
11988 (paramdef "GLint " (parameter "level"))
11989 (paramdef "GLint " (parameter "xoffset"))
11990 (paramdef "GLint " (parameter "yoffset"))
11991 (paramdef "GLint " (parameter "zoffset"))
11992 (paramdef "GLint " (parameter "x"))
11993 (paramdef "GLint " (parameter "y"))
11994 (paramdef "GLsizei " (parameter "width"))
11995 (paramdef "GLsizei " (parameter "height"))))
11998 "copy a three-dimensional texture subimage")
11999 (heading "Parameters")
12000 (table (% (formatter (asis)))
12001 (entry (% (heading (var "target")))
12003 Specifies the target texture.
12005 (code "GL_TEXTURE_3D")))
12006 (entry (% (heading (var "level")))
12008 Specifies the level-of-detail number.
12009 Level 0 is the base image level.
12014 "th mipmap reduction image. "))
12015 (entry (% (heading (var "xoffset")))
12017 Specifies a texel offset in the x direction within the texture array. "))
12018 (entry (% (heading (var "yoffset")))
12020 Specifies a texel offset in the y direction within the texture array. "))
12021 (entry (% (heading (var "zoffset")))
12023 Specifies a texel offset in the z direction within the texture array. "))
12024 (entry (% (heading (var "x")))
12027 Specify the window coordinates of the lower left corner
12028 of the rectangular region of pixels to be copied. "))
12029 (entry (% (heading (var "width")))
12031 Specifies the width of the texture subimage. "))
12032 (entry (% (heading (var "height")))
12034 Specifies the height of the texture subimage. ")))
12035 (heading "Description")
12036 (para (code "glCopyTexSubImage3D")
12037 " replaces a rectangular portion of a three-dimensional
12038 texture image with pixels from the current "
12039 (code "GL_READ_BUFFER")
12041 than from main memory, as is the case for "
12042 (code "glTexSubImage3D")
12045 The screen-aligned pixel rectangle with lower left corner at
12055 " replaces the portion of the
12056 texture array with x indices "
12059 (math (var "xoffset") "+" (var "width") "-" "1")
12061 inclusive, and y indices "
12064 (math (var "yoffset") "+" (var "height") "-" "1")
12066 inclusive, at z index "
12068 " and at the mipmap level specified by "
12072 The pixels in the rectangle are processed exactly as if "
12073 (code "glCopyPixels")
12074 " had been called, but the process stops just before
12076 At this point, all pixel component values are clamped to the range "
12077 (math "[" "0" "," "1" "]")
12079 and then converted to the texture's internal format for storage in the texel
12082 The destination rectangle in the texture array may not include any texels
12083 outside the texture array as it was originally specified.
12084 It is not an error to specify a subtexture with zero width or height, but
12085 such a specification has no effect. ")
12087 If any of the pixels within the specified rectangle of the current "
12088 (code "GL_READ_BUFFER")
12089 " are outside the read window associated with the current
12090 rendering context, then the values obtained for those pixels are undefined. ")
12092 No change is made to the "
12093 (var "internalformat")
12102 " parameters of the specified texture
12103 array or to texel values outside the specified subregion. ")
12105 (para (code "GL_INVALID_ENUM")
12106 " is generated if /"
12109 (code "GL_TEXTURE_3D")
12111 (para (code "GL_INVALID_OPERATION")
12112 " is generated if the texture array has not
12113 been defined by a previous "
12114 (code "glTexImage3D")
12116 (para (code "GL_INVALID_VALUE")
12117 " is generated if "
12119 " is less than 0. ")
12120 (para (code "GL_INVALID_VALUE")
12121 " may be generated if "
12122 (math (var "level")
12136 is the returned value of "
12137 (code "GL_MAX_3D_TEXTURE_SIZE")
12139 (para (code "GL_INVALID_VALUE")
12140 " is generated if "
12141 (math (var "xoffset") "<" "-" (var "b"))
12157 (math (var "yoffset") "<" "-" (var "b"))
12173 (math (var "zoffset") "<" "-" (var "b"))
12194 (code "GL_TEXTURE_WIDTH")
12199 (code "GL_TEXTURE_HEIGHT")
12204 (code "GL_TEXTURE_DEPTH")
12210 (code "GL_TEXTURE_BORDER")
12212 of the texture image being modified.
12221 include twice the border width. ")
12222 (para (code "GL_INVALID_OPERATION")
12223 " is generated if "
12224 (code "glCopyTexSubImage3D")
12226 between the execution of "
12228 " and the corresponding
12233 (define-gl-procedure
12238 (funcdef "GLuint " (function "glCreateProgram"))
12239 (paramdef (parameter "void"))))
12241 (heading "Creates a program object")
12242 (heading "Description")
12243 (para (code "glCreateProgram")
12245 \tprogram object and returns a non-zero value by which it can be
12246 \treferenced. A program object is an object to which shader
12247 \tobjects can be attached. This provides a mechanism to specify
12248 \tthe shader objects that will be linked to create a program. It
12249 \talso provides a means for checking the compatibility of the
12250 \tshaders that will be used to create a program (for instance,
12251 \tchecking the compatibility between a vertex shader and a
12252 \tfragment shader). When no longer needed as part of a program
12253 \tobject, shader objects can be detached.")
12254 (para "One or more executables are created in a program object by
12255 \tsuccessfully attaching shader objects to it with\t"
12256 (code "glAttachShader")
12258 \tsuccessfully compiling the shader objects with\t"
12259 (code "glCompileShader")
12261 \tand successfully linking the program object with\t"
12262 (code "glLinkProgram")
12264 \tThese executables are made part of current state when\t"
12265 (code "glUseProgram")
12267 is called. Program objects can be deleted by calling\t"
12268 (code "glDeleteProgram")
12270 \tThe memory associated with the program object will be deleted
12271 \twhen it is no longer part of current rendering state for any
12274 (para "This function returns 0 if an error occurs creating the program object.")
12275 (para (code "GL_INVALID_OPERATION")
12276 " is generated if\t"
12277 (code "glCreateProgram")
12278 " is executed between the
12282 and the corresponding execution of\t"
12286 (define-gl-procedure
12291 (funcdef "GLuint " (function "glCreateShader"))
12292 (paramdef "GLenum " (parameter "shaderType"))))
12294 (heading "Creates a shader object")
12295 (heading "Parameters")
12296 (table (% (formatter (asis)))
12297 (entry (% (heading (var "shaderType")))
12298 (para "Specifies the type of shader to be created.
12299 \t\t Must be either "
12300 (code "GL_VERTEX_SHADER")
12303 (code "GL_FRAGMENT_SHADER")
12305 (heading "Description")
12306 (para (code "glCreateShader")
12308 \tshader object and returns a non-zero value by which it can be
12309 \treferenced. A shader object is used to maintain the source code
12310 \tstrings that define a shader. "
12313 indicates the type of shader to be created. Two types of shaders
12314 \tare supported. A shader of type\t"
12315 (code "GL_VERTEX_SHADER")
12316 " is a shader that is
12317 \tintended to run on the programmable vertex processor and replace
12318 \tthe fixed functionality vertex processing in OpenGL. A shader of
12320 (code "GL_FRAGMENT_SHADER")
12321 " is a shader that is
12322 \tintended to run on the programmable fragment processor and
12323 \treplace the fixed functionality fragment processing in
12325 (para "When created, a shader object's\t"
12326 (code "GL_SHADER_TYPE")
12327 " parameter is set to either\t"
12328 (code "GL_VERTEX_SHADER")
12330 (code "GL_FRAGMENT_SHADER")
12331 ", depending on the value
12336 (para "This function returns 0 if an error occurs creating the
12338 (para (code "GL_INVALID_ENUM")
12339 " is generated if\t"
12341 " is not an accepted value.")
12342 (para (code "GL_INVALID_OPERATION")
12343 " is generated if\t"
12344 (code "glCreateShader")
12345 " is executed between the
12349 and the corresponding execution of\t"
12353 (define-gl-procedure
12358 (funcdef "void " (function "glCullFace"))
12359 (paramdef "GLenum " (parameter "mode"))))
12362 "specify whether front- or back-facing facets can be culled")
12363 (heading "Parameters")
12364 (table (% (formatter (asis)))
12365 (entry (% (heading (var "mode")))
12367 Specifies whether front- or back-facing facets are candidates for culling.
12368 Symbolic constants "
12373 (code "GL_FRONT_AND_BACK")
12375 The initial value is "
12378 (heading "Description")
12379 (para (code "glCullFace")
12380 " specifies whether front- or back-facing facets are culled
12383 ") when facet culling is enabled. Facet
12384 culling is initially disabled.
12385 To enable and disable facet culling, call the "
12390 with the argument "
12391 (code "GL_CULL_FACE")
12393 Facets include triangles,
12397 (para (code "glFrontFace")
12398 " specifies which of the clockwise and counterclockwise facets
12399 are front-facing and back-facing.
12401 (code "glFrontFace")
12404 (para (code "GL_INVALID_ENUM")
12405 " is generated if "
12407 " is not an accepted value. ")
12408 (para (code "GL_INVALID_OPERATION")
12409 " is generated if "
12410 (code "glCullFace")
12412 is executed between the execution of "
12415 and the corresponding execution of "
12419 (define-gl-procedure
12424 (funcdef "void " (function "glDeleteBuffers"))
12425 (paramdef "GLsizei " (parameter "n"))
12428 (parameter "buffers"))))
12430 (heading "delete named buffer objects")
12431 (heading "Parameters")
12432 (table (% (formatter (asis)))
12433 (entry (% (heading (var "n")))
12435 Specifies the number of buffer objects to be deleted. "))
12436 (entry (% (heading (var "buffers")))
12438 Specifies an array of buffer objects to be deleted. ")))
12439 (heading "Description")
12440 (para (code "glDeleteBuffers")
12443 " buffer objects named by the elements of the array "
12446 After a buffer object is deleted, it has no contents,
12447 and its name is free for reuse (for example by "
12448 (code "glGenBuffers")
12450 If a buffer object that is currently bound is deleted, the binding reverts
12451 to 0 (the absence of any buffer object, which reverts to client memory usage). ")
12452 (para (code "glDeleteBuffers")
12453 " silently ignores 0's and names that do not correspond to
12454 existing buffer objects. ")
12456 (para (code "GL_INVALID_VALUE")
12457 " is generated if "
12460 (para (code "GL_INVALID_OPERATION")
12461 " is generated if "
12462 (code "glDeleteBuffers")
12464 between the execution of "
12466 " and the corresponding
12471 (define-gl-procedure
12476 (funcdef "void " (function "glDeleteLists"))
12477 (paramdef "GLuint " (parameter "list"))
12478 (paramdef "GLsizei " (parameter "range"))))
12481 "delete a contiguous group of display lists")
12482 (heading "Parameters")
12483 (table (% (formatter (asis)))
12484 (entry (% (heading (var "list")))
12486 Specifies the integer name of the first display list to delete. "))
12487 (entry (% (heading (var "range")))
12489 Specifies the number of display lists to delete. ")))
12490 (heading "Description")
12491 (para (code "glDeleteLists")
12492 " causes a contiguous group of display lists to be deleted. "
12494 " is the name of the first display list to be deleted,
12497 " is the number of display lists to delete.
12498 All display lists "
12514 All storage locations allocated to the specified display lists are freed,
12515 and the names are available for reuse at a later time.
12516 Names within the range that do not have an associated display list are ignored.
12519 " is 0, nothing happens. ")
12521 (para (code "GL_INVALID_VALUE")
12522 " is generated if "
12525 (para (code "GL_INVALID_OPERATION")
12526 " is generated if "
12527 (code "glDeleteLists")
12529 is executed between the execution of "
12532 and the corresponding execution of "
12536 (define-gl-procedure
12541 (funcdef "void " (function "glDeleteProgram"))
12542 (paramdef "GLuint " (parameter "program"))))
12544 (heading "Deletes a program object")
12545 (heading "Parameters")
12546 (table (% (formatter (asis)))
12547 (entry (% (heading (var "program")))
12548 (para "Specifies the program object to be
12550 (heading "Description")
12551 (para (code "glDeleteProgram")
12552 " frees the memory and
12553 \tinvalidates the name associated with the program object
12557 \teffectively undoes the effects of a call to\t"
12558 (code "glCreateProgram")
12560 (para "If a program object is in use as part of current rendering
12561 \tstate, it will be flagged for deletion, but it will not be
12562 \tdeleted until it is no longer part of current state for any
12563 \trendering context. If a program object to be deleted has shader
12564 \tobjects attached to it, those shader objects will be
12565 \tautomatically detached but not deleted unless they have already
12566 \tbeen flagged for deletion by a previous call to\t"
12567 (code "glDeleteShader")
12569 \tA value of 0 for "
12573 (para "To determine whether a program object has been flagged for
12574 \tdeletion, call\t"
12575 (code "glGetProgram")
12580 (code "GL_DELETE_STATUS")
12583 (para (code "GL_INVALID_VALUE")
12584 " is generated if\t"
12586 " is not a value generated by
12588 (para (code "GL_INVALID_OPERATION")
12589 " is generated if\t"
12590 (code "glDeleteProgram")
12591 " is executed between the
12595 and the corresponding execution of\t"
12599 (define-gl-procedure
12604 (funcdef "void " (function "glDeleteQueries"))
12605 (paramdef "GLsizei " (parameter "n"))
12606 (paramdef "const GLuint * " (parameter "ids"))))
12608 (heading "delete named query objects")
12609 (heading "Parameters")
12610 (table (% (formatter (asis)))
12611 (entry (% (heading (var "n")))
12613 Specifies the number of query objects to be deleted. "))
12614 (entry (% (heading (var "ids")))
12616 Specifies an array of query objects to be deleted. ")))
12617 (heading "Description")
12618 (para (code "glDeleteQueries")
12621 " query objects named by the elements of the array "
12624 After a query object is deleted, it has no contents,
12625 and its name is free for reuse (for example by "
12626 (code "glGenQueries")
12628 (para (code "glDeleteQueries")
12629 " silently ignores 0's and names that do not correspond to
12630 existing query objects. ")
12632 (para (code "GL_INVALID_VALUE")
12633 " is generated if "
12636 (para (code "GL_INVALID_OPERATION")
12637 " is generated if "
12638 (code "glDeleteQueries")
12640 between the execution of "
12642 " and the corresponding
12647 (define-gl-procedure
12652 (funcdef "void " (function "glDeleteShader"))
12653 (paramdef "GLuint " (parameter "shader"))))
12655 (heading "Deletes a shader object")
12656 (heading "Parameters")
12657 (table (% (formatter (asis)))
12658 (entry (% (heading (var "shader")))
12659 (para "Specifies the shader object to be deleted.")))
12660 (heading "Description")
12661 (para (code "glDeleteShader")
12662 " frees the memory and
12663 \tinvalidates the name associated with the shader object specified
12666 ". This command effectively
12667 \tundoes the effects of a call to\t"
12668 (code "glCreateShader")
12670 (para "If a shader object to be deleted is attached to a program
12671 \tobject, it will be flagged for deletion, but it will not be
12672 \tdeleted until it is no longer attached to any program object,
12673 \tfor any rendering context (i.e., it must be detached from
12674 \twherever it was attached before it will be deleted). A value of
12679 (para "To determine whether an object has been flagged for
12680 \tdeletion, call\t"
12681 (code "glGetShader")
12686 (code "GL_DELETE_STATUS")
12689 (para (code "GL_INVALID_VALUE")
12690 " is generated if\t"
12692 " is not a value generated by
12694 (para (code "GL_INVALID_OPERATION")
12695 " is generated if\t"
12696 (code "glDeleteShader")
12697 " is executed between the
12701 and the corresponding execution of\t"
12705 (define-gl-procedure
12710 (funcdef "void " (function "glDeleteTextures"))
12711 (paramdef "GLsizei " (parameter "n"))
12714 (parameter "textures"))))
12716 (heading "delete named textures")
12717 (heading "Parameters")
12718 (table (% (formatter (asis)))
12719 (entry (% (heading (var "n")))
12721 Specifies the number of textures to be deleted. "))
12722 (entry (% (heading (var "textures")))
12724 Specifies an array of textures to be deleted. ")))
12725 (heading "Description")
12726 (para (code "glDeleteTextures")
12729 " textures named by the elements of the array "
12732 After a texture is deleted, it has no contents or dimensionality,
12733 and its name is free for reuse (for example by "
12734 (code "glGenTextures")
12736 If a texture that is currently bound is deleted, the binding reverts
12737 to 0 (the default texture). ")
12738 (para (code "glDeleteTextures")
12739 " silently ignores 0's and names that do not correspond to
12740 existing textures. ")
12742 (para (code "GL_INVALID_VALUE")
12743 " is generated if "
12746 (para (code "GL_INVALID_OPERATION")
12747 " is generated if "
12748 (code "glDeleteTextures")
12750 between the execution of "
12752 " and the corresponding
12757 (define-gl-procedure
12762 (funcdef "void " (function "glDepthFunc"))
12763 (paramdef "GLenum " (parameter "func"))))
12766 "specify the value used for depth buffer comparisons")
12767 (heading "Parameters")
12768 (table (% (formatter (asis)))
12769 (entry (% (heading (var "func")))
12771 Specifies the depth comparison function.
12772 Symbolic constants "
12781 (code "GL_GREATER")
12783 (code "GL_NOTEQUAL")
12789 The initial value is "
12792 (heading "Description")
12793 (para (code "glDepthFunc")
12794 " specifies the function used to compare each incoming pixel depth value
12795 with the depth value present in the depth buffer.
12796 The comparison is performed only if depth testing is enabled.
12802 (code "GL_DEPTH_TEST")
12805 " specifies the conditions under which the pixel will be drawn.
12806 The comparison functions are as follows: ")
12807 (table (% (formatter (asis)))
12808 (entry (% (heading (code "GL_NEVER")))
12811 (entry (% (heading (code "GL_LESS")))
12813 Passes if the incoming depth value is less than the stored depth value. "))
12814 (entry (% (heading (code "GL_EQUAL")))
12816 Passes if the incoming depth value is equal to the stored depth value. "))
12817 (entry (% (heading (code "GL_LEQUAL")))
12819 Passes if the incoming depth value is less than or equal to
12820 the stored depth value. "))
12821 (entry (% (heading (code "GL_GREATER")))
12823 Passes if the incoming depth value is greater than the stored depth value. "))
12824 (entry (% (heading (code "GL_NOTEQUAL")))
12826 Passes if the incoming depth value is not equal to the stored depth value. "))
12827 (entry (% (heading (code "GL_GEQUAL")))
12829 Passes if the incoming depth value is greater than or equal to
12830 the stored depth value. "))
12831 (entry (% (heading (code "GL_ALWAYS")))
12833 Always passes. ")))
12835 The initial value of "
12840 Initially, depth testing is disabled. If depth testing is disabled or if no
12841 depth buffer exists, it is as if the depth test always passes. ")
12843 (para (code "GL_INVALID_ENUM")
12844 " is generated if "
12846 " is not an accepted value. ")
12847 (para (code "GL_INVALID_OPERATION")
12848 " is generated if "
12849 (code "glDepthFunc")
12851 is executed between the execution of "
12854 and the corresponding execution of "
12858 (define-gl-procedure
12863 (funcdef "void " (function "glDepthMask"))
12864 (paramdef "GLboolean " (parameter "flag"))))
12867 "enable or disable writing into the depth buffer")
12868 (heading "Parameters")
12869 (table (% (formatter (asis)))
12870 (entry (% (heading (var "flag")))
12872 Specifies whether the depth buffer is enabled for writing.
12878 depth buffer writing is disabled.
12879 Otherwise, it is enabled.
12880 Initially, depth buffer writing is enabled. ")))
12881 (heading "Description")
12882 (para (code "glDepthMask")
12883 " specifies whether the depth buffer is enabled for writing.
12889 depth buffer writing is disabled.
12890 Otherwise, it is enabled.
12891 Initially, depth buffer writing is enabled. ")
12893 (para (code "GL_INVALID_OPERATION")
12894 " is generated if "
12895 (code "glDepthMask")
12897 is executed between the execution of "
12900 and the corresponding execution of "
12904 (define-gl-procedure
12909 (funcdef "void " (function "glDepthRange"))
12910 (paramdef "GLclampd " (parameter "nearVal"))
12911 (paramdef "GLclampd " (parameter "farVal"))))
12914 "specify mapping of depth values from normalized device coordinates to window coordinates")
12915 (heading "Parameters")
12916 (table (% (formatter (asis)))
12917 (entry (% (heading (var "nearVal")))
12919 Specifies the mapping of the near clipping plane to window coordinates.
12920 The initial value is 0. "))
12921 (entry (% (heading (var "farVal")))
12923 Specifies the mapping of the far clipping plane to window coordinates.
12924 The initial value is 1. ")))
12925 (heading "Description")
12927 After clipping and division by "
12930 depth coordinates range from "
12934 corresponding to the near and far clipping planes. "
12935 (code "glDepthRange")
12936 " specifies a linear mapping of the normalized depth coordinates
12937 in this range to window depth coordinates.
12938 Regardless of the actual depth buffer implementation,
12939 window coordinate depth values are treated as though they range
12940 from 0 through 1 (like color components).
12942 the values accepted by "
12943 (code "glDepthRange")
12944 " are both clamped to this range
12945 before they are accepted. ")
12947 The setting of (0,1) maps the near plane to 0 and
12948 the far plane to 1.
12950 the depth buffer range is fully utilized. ")
12952 (para (code "GL_INVALID_OPERATION")
12953 " is generated if "
12954 (code "glDepthRange")
12956 is executed between the execution of "
12959 and the corresponding execution of "
12963 (define-gl-procedure
12968 (funcdef "void " (function "glDetachShader"))
12969 (paramdef "GLuint " (parameter "program"))
12970 (paramdef "GLuint " (parameter "shader"))))
12973 "Detaches a shader object from a program object to which it is attached")
12974 (heading "Parameters")
12975 (table (% (formatter (asis)))
12976 (entry (% (heading (var "program")))
12977 (para "Specifies the program object from which to
12978 \t\t detach the shader object."))
12979 (entry (% (heading (var "shader")))
12980 (para "Specifies the shader object to be
12982 (heading "Description")
12983 (para (code "glDetachShader")
12984 " detaches the shader
12985 \tobject specified by "
12988 \tprogram object specified by "
12991 \tcommand can be used to undo the effect of the command\t"
12992 (code "glAttachShader")
12996 " has already been flagged
12997 \tfor deletion by a call to\t"
12998 (code "glDeleteShader")
13000 and it is not attached to any other program object, it will be
13001 \tdeleted after it has been detached.")
13003 (para (code "GL_INVALID_VALUE")
13004 " is generated if either\t"
13009 is a value that was not generated by OpenGL.")
13010 (para (code "GL_INVALID_OPERATION")
13011 " is generated if\t"
13013 " is not a program object.")
13014 (para (code "GL_INVALID_OPERATION")
13015 " is generated if\t"
13017 " is not a shader object.")
13018 (para (code "GL_INVALID_OPERATION")
13019 " is generated if\t"
13021 " is not attached to\t"
13024 (para (code "GL_INVALID_OPERATION")
13025 " is generated if\t"
13026 (code "glDetachShader")
13027 " is executed between the
13031 and the corresponding execution of\t"
13035 (define-gl-procedure
13040 (funcdef "void " (function "glDrawArrays"))
13041 (paramdef "GLenum " (parameter "mode"))
13042 (paramdef "GLint " (parameter "first"))
13043 (paramdef "GLsizei " (parameter "count"))))
13045 (heading "render primitives from array data")
13046 (heading "Parameters")
13047 (table (% (formatter (asis)))
13048 (entry (% (heading (var "mode")))
13050 Specifies what kind of primitives to render.
13051 Symbolic constants "
13054 (code "GL_LINE_STRIP")
13056 (code "GL_LINE_LOOP")
13060 (code "GL_TRIANGLE_STRIP")
13062 (code "GL_TRIANGLE_FAN")
13064 (code "GL_TRIANGLES")
13066 (code "GL_QUAD_STRIP")
13071 (code "GL_POLYGON")
13072 " are accepted. "))
13073 (entry (% (heading (var "first")))
13075 Specifies the starting index in the enabled arrays. "))
13076 (entry (% (heading (var "count")))
13078 Specifies the number of indices to be rendered. ")))
13079 (heading "Description")
13080 (para (code "glDrawArrays")
13081 " specifies multiple geometric primitives
13082 with very few subroutine calls. Instead of calling a GL procedure
13083 to pass each individual vertex, normal, texture coordinate, edge
13084 flag, or color, you can prespecify
13085 separate arrays of vertices, normals, and colors and use them to
13086 construct a sequence of primitives with a single
13088 (code "glDrawArrays")
13092 (code "glDrawArrays")
13093 " is called, it uses "
13095 " sequential elements from each
13096 enabled array to construct a sequence of geometric primitives,
13097 beginning with element "
13101 " specifies what kind of
13102 primitives are constructed and how the array elements
13103 construct those primitives. If "
13104 (code "GL_VERTEX_ARRAY")
13105 " is not enabled, no
13106 geometric primitives are generated. ")
13108 Vertex attributes that are modified by "
13109 (code "glDrawArrays")
13111 unspecified value after "
13112 (code "glDrawArrays")
13113 " returns. For example, if "
13114 (code "GL_COLOR_ARRAY")
13115 " is enabled, the value of the current color is
13117 (code "glDrawArrays")
13118 " executes. Attributes that aren't
13119 modified remain well defined. ")
13121 (para (code "GL_INVALID_ENUM")
13122 " is generated if "
13124 " is not an accepted value. ")
13125 (para (code "GL_INVALID_VALUE")
13126 " is generated if "
13129 (para (code "GL_INVALID_OPERATION")
13130 " is generated if a non-zero buffer object name is bound to an
13131 enabled array and the buffer object's data store is currently mapped. ")
13132 (para (code "GL_INVALID_OPERATION")
13133 " is generated if "
13134 (code "glDrawArrays")
13135 " is executed between
13138 " and the corresponding "
13142 (define-gl-procedure
13147 (funcdef "void " (function "glDrawBuffers"))
13148 (paramdef "GLsizei " (parameter "n"))
13149 (paramdef "const GLenum *" (parameter "bufs"))))
13152 "Specifies a list of color buffers to be drawn into")
13153 (heading "Parameters")
13154 (table (% (formatter (asis)))
13155 (entry (% (heading (var "n")))
13156 (para "Specifies the number of buffers in "
13159 (entry (% (heading (var "bufs")))
13160 (para "Points to an array of symbolic constants
13161 \t\t specifying the buffers into which fragment colors or
13162 \t\t data values will be written.")))
13163 (heading "Description")
13164 (para (code "glDrawBuffers")
13165 " defines an array of
13166 \tbuffers into which fragment color values or fragment data will
13167 \tbe written. If no fragment shader is active, rendering
13168 \toperations will generate only one fragment color per fragment
13169 \tand it will be written into each of the buffers specified by\t"
13171 ". If a fragment shader is active and
13172 \tit writes a value to the output variable\t"
13173 (code "gl_FragColor")
13174 ", then that value will be
13175 \twritten into each of the buffers specified by\t"
13177 ". If a fragment shader is active and
13178 \tit writes a value to one or more elements of the output array
13180 (code "gl_FragData[]")
13181 ", then the value of\t"
13182 (code "gl_FragData[0] ")
13183 " will be written into the
13184 \tfirst buffer specified by "
13188 (code "gl_FragData[1] ")
13189 " will be written into the
13190 \tsecond buffer specified by "
13194 (code "gl_FragData[n-1]")
13197 (code "gl_FragData[n]")
13199 \timplicitly set to be "
13202 (para "The symbolic constants contained in\t"
13204 " may be any of the following:")
13205 (table (% (formatter (asis)))
13206 (entry (% (heading (code "GL_NONE")))
13207 (para "The fragment color/data value is not written into
13208 \t\t any color buffer."))
13209 (entry (% (heading (code "GL_FRONT_LEFT")))
13210 (para "The fragment color/data value is written into the
13211 \t\t front left color buffer."))
13212 (entry (% (heading (code "GL_FRONT_RIGHT")))
13213 (para "The fragment color/data value is written into the
13214 \t\t front right color buffer."))
13215 (entry (% (heading (code "GL_BACK_LEFT")))
13216 (para "The fragment color/data value is written into the
13217 \t\t back left color buffer."))
13218 (entry (% (heading (code "GL_BACK_RIGHT")))
13219 (para "The fragment color/data value is written into the
13220 \t\t back right color buffer."))
13221 (entry (% (heading (code "GL_AUXi")))
13222 (para "The fragment color/data value is written into
13223 \t\t auxiliary buffer "
13226 (para "Except for "
13229 \tsymbolic constants may not appear more than once in\t"
13231 ". The maximum number of draw buffers
13232 \tsupported is implementation dependent and can be queried by
13236 with the argument "
13237 (code "GL_MAX_DRAW_BUFFERS")
13239 \tnumber of auxiliary buffers can be queried by calling\t"
13242 with the argument "
13243 (code "GL_AUX_BUFFERS")
13246 (para (code "GL_INVALID_ENUM")
13247 " is generated if one of the
13250 " is not an accepted
13252 (para (code "GL_INVALID_ENUM")
13253 " is generated if\t"
13255 " is less than 0.")
13256 (para (code "GL_INVALID_OPERATION")
13257 " is generated if a
13258 \tsymbolic constant other than "
13261 appears more than once in "
13264 (para (code "GL_INVALID_OPERATION")
13265 " is generated if any of
13270 " ) indicates a color buffer that
13271 \tdoes not exist in the current GL context.")
13272 (para (code "GL_INVALID_VALUE")
13273 " is generated if\t"
13275 " is greater than\t"
13276 (code "GL_MAX_DRAW_BUFFERS")
13278 (para (code "GL_INVALID_OPERATION")
13279 " is generated if\t"
13280 (code "glDrawBuffers")
13281 " is executed between the
13285 and the corresponding execution of\t"
13289 (define-gl-procedure
13294 (funcdef "void " (function "glDrawBuffer"))
13295 (paramdef "GLenum " (parameter "mode"))))
13298 "specify which color buffers are to be drawn into")
13299 (heading "Parameters")
13300 (table (% (formatter (asis)))
13301 (entry (% (heading (var "mode")))
13303 Specifies up to four color buffers to be drawn into.
13304 Symbolic constants "
13307 (code "GL_FRONT_LEFT")
13309 (code "GL_FRONT_RIGHT")
13311 (code "GL_BACK_LEFT")
13313 (code "GL_BACK_RIGHT")
13323 (code "GL_FRONT_AND_BACK")
13330 " is between 0 and the value of "
13331 (code "GL_AUX_BUFFERS")
13334 (code "GL_AUX_BUFFERS")
13335 " is not the upper limit; use "
13338 to query the number of available aux buffers.)
13339 The initial value is "
13341 " for single-buffered contexts,
13344 " for double-buffered contexts. ")))
13345 (heading "Description")
13347 When colors are written to the frame buffer,
13348 they are written into the color buffers specified by "
13349 (code "glDrawBuffer")
13351 The specifications are as follows: ")
13352 (table (% (formatter (asis)))
13353 (entry (% (heading (code "GL_NONE")))
13355 No color buffers are written. "))
13356 (entry (% (heading (code "GL_FRONT_LEFT")))
13358 Only the front left color buffer is written. "))
13359 (entry (% (heading (code "GL_FRONT_RIGHT")))
13361 Only the front right color buffer is written. "))
13362 (entry (% (heading (code "GL_BACK_LEFT")))
13364 Only the back left color buffer is written. "))
13365 (entry (% (heading (code "GL_BACK_RIGHT")))
13367 Only the back right color buffer is written. "))
13368 (entry (% (heading (code "GL_FRONT")))
13370 Only the front left and front right color buffers are written.
13371 If there is no front right color buffer,
13372 only the front left color buffer is written. "))
13373 (entry (% (heading (code "GL_BACK")))
13375 Only the back left and back right color buffers are written.
13376 If there is no back right color buffer,
13377 only the back left color buffer is written. "))
13378 (entry (% (heading (code "GL_LEFT")))
13380 Only the front left and back left color buffers are written.
13381 If there is no back left color buffer,
13382 only the front left color buffer is written. "))
13383 (entry (% (heading (code "GL_RIGHT")))
13385 Only the front right and back right color buffers are written.
13386 If there is no back right color buffer,
13387 only the front right color buffer is written. "))
13388 (entry (% (heading (code "GL_FRONT_AND_BACK")))
13390 All the front and back color buffers
13391 (front left, front right, back left, back right)
13393 If there are no back color buffers,
13394 only the front left and front right color buffers are written.
13395 If there are no right color buffers,
13396 only the front left and back left color buffers are written.
13397 If there are no right or back color buffers,
13398 only the front left color buffer is written. "))
13399 (entry (% (heading (code "GL_AUX") (var "i")))
13401 Only auxiliary color buffer "
13405 If more than one color buffer is selected for drawing,
13406 then blending or logical operations are computed and applied independently
13407 for each color buffer and can produce different results in each buffer. ")
13409 Monoscopic contexts include only "
13412 buffers, and stereoscopic contexts include both "
13419 Likewise, single-buffered contexts include only "
13422 buffers, and double-buffered contexts include both "
13429 The context is selected at GL initialization. ")
13431 (para (code "GL_INVALID_ENUM")
13432 " is generated if "
13434 " is not an accepted value. ")
13435 (para (code "GL_INVALID_OPERATION")
13436 " is generated if none of the buffers indicated
13440 (para (code "GL_INVALID_OPERATION")
13441 " is generated if "
13442 (code "glDrawBuffer")
13444 is executed between the execution of "
13447 and the corresponding execution of "
13451 (define-gl-procedure
13456 (funcdef "void " (function "glDrawElements"))
13457 (paramdef "GLenum " (parameter "mode"))
13458 (paramdef "GLsizei " (parameter "count"))
13459 (paramdef "GLenum " (parameter "type"))
13462 (parameter "indices"))))
13464 (heading "render primitives from array data")
13465 (heading "Parameters")
13466 (table (% (formatter (asis)))
13467 (entry (% (heading (var "mode")))
13469 Specifies what kind of primitives to render.
13470 Symbolic constants "
13473 (code "GL_LINE_STRIP")
13475 (code "GL_LINE_LOOP")
13479 (code "GL_TRIANGLE_STRIP")
13481 (code "GL_TRIANGLE_FAN")
13483 (code "GL_TRIANGLES")
13485 (code "GL_QUAD_STRIP")
13490 (code "GL_POLYGON")
13491 " are accepted. "))
13492 (entry (% (heading (var "count")))
13494 Specifies the number of elements to be rendered. "))
13495 (entry (% (heading (var "type")))
13497 Specifies the type of the values in "
13499 ". Must be one of "
13500 (code "GL_UNSIGNED_BYTE")
13502 (code "GL_UNSIGNED_SHORT")
13504 (code "GL_UNSIGNED_INT")
13506 (entry (% (heading (var "indices")))
13508 Specifies a pointer to the location where the indices are stored. ")))
13509 (heading "Description")
13510 (para (code "glDrawElements")
13511 " specifies multiple geometric primitives
13512 with very few subroutine calls. Instead of calling a GL function
13513 to pass each individual vertex, normal, texture coordinate, edge
13514 flag, or color, you can prespecify
13515 separate arrays of vertices, normals, and so on, and use them to
13516 construct a sequence of primitives with a single
13518 (code "glDrawElements")
13522 (code "glDrawElements")
13523 " is called, it uses "
13525 " sequential elements from an
13526 enabled array, starting at "
13528 " to construct a sequence of
13529 geometric primitives. "
13531 " specifies what kind of primitives are
13532 constructed and how the array elements construct these primitives. If
13533 more than one array is enabled, each is used. If "
13534 (code "GL_VERTEX_ARRAY")
13535 " is not enabled, no geometric primitives are
13538 Vertex attributes that are modified by "
13539 (code "glDrawElements")
13541 unspecified value after "
13542 (code "glDrawElements")
13543 " returns. For example, if "
13544 (code "GL_COLOR_ARRAY")
13545 " is enabled, the value of the current color is
13547 (code "glDrawElements")
13548 " executes. Attributes that aren't
13549 modified maintain their previous values. ")
13551 (para (code "GL_INVALID_ENUM")
13552 " is generated if "
13554 " is not an accepted value. ")
13555 (para (code "GL_INVALID_VALUE")
13556 " is generated if "
13559 (para (code "GL_INVALID_OPERATION")
13560 " is generated if a non-zero buffer object name is bound to an
13561 enabled array or the element array and the buffer object's data store is currently mapped. ")
13562 (para (code "GL_INVALID_OPERATION")
13563 " is generated if "
13564 (code "glDrawElements")
13565 " is executed between
13568 " and the corresponding "
13572 (define-gl-procedure
13577 (funcdef "void " (function "glDrawPixels"))
13578 (paramdef "GLsizei " (parameter "width"))
13579 (paramdef "GLsizei " (parameter "height"))
13580 (paramdef "GLenum " (parameter "format"))
13581 (paramdef "GLenum " (parameter "type"))
13582 (paramdef "const GLvoid * " (parameter "data"))))
13585 "write a block of pixels to the frame buffer")
13586 (heading "Parameters")
13587 (table (% (formatter (asis)))
13588 (entry (% (heading (var "width")))
13589 (itemx (var "height"))
13591 Specify the dimensions of the pixel rectangle to be written
13592 into the frame buffer. "))
13593 (entry (% (heading (var "format")))
13595 Specifies the format of the pixel data.
13596 Symbolic constants "
13597 (code "GL_COLOR_INDEX")
13599 (code "GL_STENCIL_INDEX")
13601 (code "GL_DEPTH_COMPONENT")
13619 (code "GL_LUMINANCE")
13621 (code "GL_LUMINANCE_ALPHA")
13622 " are accepted. "))
13623 (entry (% (heading (var "type")))
13625 Specifies the data type for "
13628 Symbolic constants "
13629 (code "GL_UNSIGNED_BYTE")
13635 (code "GL_UNSIGNED_SHORT")
13639 (code "GL_UNSIGNED_INT")
13645 (code "GL_UNSIGNED_BYTE_3_3_2")
13647 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
13649 (code "GL_UNSIGNED_SHORT_5_6_5")
13651 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
13653 (code "GL_UNSIGNED_SHORT_4_4_4_4")
13655 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
13657 (code "GL_UNSIGNED_SHORT_5_5_5_1")
13659 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
13661 (code "GL_UNSIGNED_INT_8_8_8_8")
13663 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
13665 (code "GL_UNSIGNED_INT_10_10_10_2")
13667 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
13670 (entry (% (heading (var "data")))
13672 Specifies a pointer to the pixel data. ")))
13673 (heading "Description")
13674 (para (code "glDrawPixels")
13675 " reads pixel data from memory and writes it into the frame buffer
13676 relative to the current raster position, provided that the raster
13677 position is valid. Use "
13678 (code "glRasterPos")
13680 (code "glWindowPos")
13681 " to set the current raster position; use "
13684 (code "GL_CURRENT_RASTER_POSITION_VALID")
13686 to determine if the specified raster position is valid, and "
13689 (code "GL_CURRENT_RASTER_POSITION")
13691 to query the raster position. ")
13693 Several parameters define the encoding of pixel data in memory
13694 and control the processing of the pixel data
13695 before it is placed in the frame buffer.
13696 These parameters are set with four commands: "
13697 (code "glPixelStore")
13699 (code "glPixelTransfer")
13701 (code "glPixelMap")
13703 (code "glPixelZoom")
13705 This reference page describes the effects on "
13706 (code "glDrawPixels")
13708 but not all, of the parameters specified by these four commands. ")
13710 Data is read from "
13712 " as a sequence of signed or unsigned bytes,
13713 signed or unsigned shorts, signed or unsigned integers, or
13714 single-precision floating-point values, depending on "
13720 (code "GL_UNSIGNED_BYTE")
13724 (code "GL_UNSIGNED_SHORT")
13728 (code "GL_UNSIGNED_INT")
13733 " each of these bytes, shorts, integers, or
13734 floating-point values is interpreted as one color or depth component, or
13735 one index, depending on "
13741 (code "GL_UNSIGNED_BYTE_3_3_2")
13743 (code "GL_UNSIGNED_SHORT_5_6_5")
13745 (code "GL_UNSIGNED_SHORT_4_4_4_4")
13747 (code "GL_UNSIGNED_SHORT_5_5_5_1")
13749 (code "GL_UNSIGNED_INT_8_8_8_8")
13751 (code "GL_UNSIGNED_INT_10_10_10_2")
13752 ", each unsigned value is interpreted as
13753 containing all the components for a single pixel, with the color
13754 components arranged according to "
13760 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
13762 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
13764 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
13766 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
13768 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
13770 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
13771 ", each unsigned value is interpreted
13772 as containing all color components, specified by "
13775 pixel in a reversed order. Indices are always treated individually.
13776 Color components are treated as groups of one, two, three, or four
13777 values, again based on "
13779 ". Both individual indices and groups of
13780 components are referred to as pixels.
13785 ", the data must be unsigned bytes, and "
13788 (code "GL_COLOR_INDEX")
13790 (code "GL_STENCIL_INDEX")
13792 Each unsigned byte is treated as eight 1-bit pixels, with bit ordering
13794 (code "GL_UNPACK_LSB_FIRST")
13796 (code "glPixelStore")
13798 (para (math (var "width") "×" (var "height"))
13800 pixels are read from memory,
13801 starting at location "
13804 By default, these pixels are taken from adjacent memory locations,
13805 except that after all "
13808 the read pointer is advanced to the next four-byte boundary.
13809 The four-byte row alignment is specified by "
13810 (code "glPixelStore")
13813 (code "GL_UNPACK_ALIGNMENT")
13815 and it can be set to one, two, four, or eight bytes.
13816 Other pixel store parameters specify different read pointer advancements,
13817 both before the first pixel is read
13822 (code "glPixelStore")
13823 " reference page for details on these options. ")
13825 If a non-zero named buffer object is bound to the "
13826 (code "GL_PIXEL_UNPACK_BUFFER")
13829 (code "glBindBuffer")
13830 ") while a block of pixels is
13833 " is treated as a byte offset into the buffer object's data store. ")
13836 (math (var "width") "×" (var "height"))
13838 pixels that are read from memory are
13839 each operated on in the same way,
13840 based on the values of several parameters specified by "
13841 (code "glPixelTransfer")
13844 (code "glPixelMap")
13846 The details of these operations,
13847 as well as the target buffer into which the pixels are drawn,
13848 are specific to the format of the pixels,
13853 " can assume one of 13 symbolic values: ")
13854 (table (% (formatter (asis)))
13855 (entry (% (heading (code "GL_COLOR_INDEX")))
13857 Each pixel is a single value,
13859 It is converted to fixed-point format,
13860 with an unspecified number of bits to the right of the binary point,
13861 regardless of the memory data type.
13862 Floating-point values convert to true fixed-point values.
13863 Signed and unsigned integer data is converted with all fraction bits
13865 Bitmap data convert to either 0 or 1. ")
13867 Each fixed-point index is then shifted left by "
13868 (code "GL_INDEX_SHIFT")
13871 (code "GL_INDEX_OFFSET")
13874 (code "GL_INDEX_SHIFT")
13876 the shift is to the right.
13877 In either case, zero bits fill otherwise unspecified bit locations in the
13880 If the GL is in RGBA mode,
13881 the resulting index is converted to an RGBA pixel
13882 with the help of the "
13883 (code "GL_PIXEL_MAP_I_TO_R")
13885 (code "GL_PIXEL_MAP_I_TO_G")
13887 (code "GL_PIXEL_MAP_I_TO_B")
13890 (code "GL_PIXEL_MAP_I_TO_A")
13892 If the GL is in color index mode,
13894 (code "GL_MAP_COLOR")
13896 the index is replaced with the value that it references in lookup table "
13897 (code "GL_PIXEL_MAP_I_TO_I")
13899 Whether the lookup replacement of the index is done or not,
13900 the integer part of the index is then ANDed with "
13901 (math "2" "^" (var "b") "-" "1")
13906 is the number of bits in a color index buffer. ")
13908 The GL then converts the resulting indices or RGBA colors to fragments
13909 by attaching the current raster position "
13912 texture coordinates to each pixel,
13919 window coordinates to the "
13922 fragment such that "
13934 (para (math (var "y")
13961 is the current raster position.
13962 These pixel fragments are then treated just like the fragments generated by
13963 rasterizing points, lines, or polygons.
13966 and all the fragment operations are applied before the fragments are written
13967 to the frame buffer. "))
13968 (entry (% (heading (code "GL_STENCIL_INDEX")))
13970 Each pixel is a single value,
13972 It is converted to fixed-point format,
13973 with an unspecified number of bits to the right of the binary point,
13974 regardless of the memory data type.
13975 Floating-point values convert to true fixed-point values.
13976 Signed and unsigned integer data is converted with all fraction bits
13978 Bitmap data convert to either 0 or 1. ")
13980 Each fixed-point index is then shifted left by "
13981 (code "GL_INDEX_SHIFT")
13984 (code "GL_INDEX_OFFSET")
13987 (code "GL_INDEX_SHIFT")
13989 the shift is to the right.
13990 In either case, zero bits fill otherwise unspecified bit locations in the
13993 (code "GL_MAP_STENCIL")
13995 the index is replaced with the value that it references in lookup table "
13996 (code "GL_PIXEL_MAP_S_TO_S")
13998 Whether the lookup replacement of the index is done or not,
13999 the integer part of the index is then ANDed with "
14000 (math "2" "^" (var "b") "-" "1")
14005 is the number of bits in the stencil buffer.
14006 The resulting stencil indices are then written to the stencil buffer
14010 index is written to location ")
14011 (para (math (var "x")
14022 (para (math (var "y")
14048 is the current raster position.
14049 Only the pixel ownership test,
14051 and the stencil writemask affect these write operations. "))
14052 (entry (% (heading (code "GL_DEPTH_COMPONENT")))
14054 Each pixel is a single-depth component.
14055 Floating-point data is converted directly to an internal floating-point
14056 format with unspecified precision.
14057 Signed integer data is mapped linearly to the internal floating-point
14058 format such that the most positive representable integer value maps to 1.0,
14059 and the most negative representable value maps to "
14062 Unsigned integer data is mapped similarly:
14063 the largest integer value maps to 1.0,
14065 The resulting floating-point depth value is then multiplied
14067 (code "GL_DEPTH_SCALE")
14069 (code "GL_DEPTH_BIAS")
14071 The result is clamped to the range "
14072 (math "[" "0" "," "1" "]")
14075 The GL then converts the resulting depth components to fragments
14076 by attaching the current raster position color or color index and
14077 texture coordinates to each pixel,
14084 window coordinates to the "
14087 fragment such that ")
14088 (para (math (var "x")
14099 (para (math (var "y")
14125 is the current raster position.
14126 These pixel fragments are then treated just like the fragments generated by
14127 rasterizing points, lines, or polygons.
14130 and all the fragment operations are applied before the fragments are written
14131 to the frame buffer. "))
14132 (entry (% (heading (code "GL_RGBA"))))
14133 (entry (% (heading (code "GL_BGRA")))
14135 Each pixel is a four-component group: For "
14138 component is first, followed by green, followed by blue, followed by
14141 " the order is blue, green, red and then alpha.
14142 Floating-point values are converted directly to an internal floating-point
14143 format with unspecified precision.
14144 Signed integer values are mapped linearly to the internal floating-point
14145 format such that the most positive representable integer value maps to 1.0,
14146 and the most negative representable value maps to "
14150 this mapping does not convert 0 precisely to 0.0.)
14151 Unsigned integer data is mapped similarly:
14152 The largest integer value maps to 1.0,
14154 The resulting floating-point color values are then multiplied
14156 (code "GL_c_SCALE")
14162 " is RED, GREEN, BLUE, and ALPHA
14163 for the respective color components.
14164 The results are clamped to the range "
14165 (math "[" "0" "," "1" "]")
14169 (code "GL_MAP_COLOR")
14171 each color component is scaled by the size of lookup table "
14172 (code "GL_PIXEL_MAP_c_TO_c")
14174 then replaced by the value that it references in that table. "
14176 " is R, G, B, or A respectively. ")
14178 The GL then converts the resulting RGBA colors to fragments
14179 by attaching the current raster position "
14182 texture coordinates to each pixel,
14189 window coordinates to the "
14192 fragment such that ")
14193 (para (math (var "x")
14204 (para (math (var "y")
14230 is the current raster position.
14231 These pixel fragments are then treated just like the fragments generated by
14232 rasterizing points, lines, or polygons.
14235 and all the fragment operations are applied before the fragments are written
14236 to the frame buffer. "))
14237 (entry (% (heading (code "GL_RED")))
14239 Each pixel is a single red component.
14240 This component is converted to the internal floating-point format in
14241 the same way the red component of an RGBA pixel is. It is
14242 then converted to an RGBA pixel with green and blue set to 0,
14243 and alpha set to 1.
14244 After this conversion, the pixel is treated as if it had been read
14245 as an RGBA pixel. "))
14246 (entry (% (heading (code "GL_GREEN")))
14248 Each pixel is a single green component.
14249 This component is converted to the internal floating-point format in
14250 the same way the green component of an RGBA pixel is.
14251 It is then converted to an RGBA pixel with red and blue set to 0,
14252 and alpha set to 1.
14253 After this conversion, the pixel is treated as if it had been read
14254 as an RGBA pixel. "))
14255 (entry (% (heading (code "GL_BLUE")))
14257 Each pixel is a single blue component.
14258 This component is converted to the internal floating-point format in
14259 the same way the blue component of an RGBA pixel is.
14260 It is then converted to an RGBA pixel with red and green set to 0,
14261 and alpha set to 1.
14262 After this conversion, the pixel is treated as if it had been read
14263 as an RGBA pixel. "))
14264 (entry (% (heading (code "GL_ALPHA")))
14266 Each pixel is a single alpha component.
14267 This component is converted to the internal floating-point format in
14268 the same way the alpha component of an RGBA pixel is.
14269 It is then converted to an RGBA pixel with red, green, and blue set to 0.
14270 After this conversion, the pixel is treated as if it had been read
14271 as an RGBA pixel. "))
14272 (entry (% (heading (code "GL_RGB"))))
14273 (entry (% (heading (code "GL_BGR")))
14275 Each pixel is a three-component group:
14276 red first, followed by green, followed by blue; for "
14279 first component is blue, followed by green and then red.
14280 Each component is converted to the internal floating-point format in
14281 the same way the red, green, and blue components of an RGBA pixel are.
14282 The color triple is converted to an RGBA pixel with alpha set to 1.
14283 After this conversion, the pixel is treated as if it had been read
14284 as an RGBA pixel. "))
14285 (entry (% (heading (code "GL_LUMINANCE")))
14287 Each pixel is a single luminance component.
14288 This component is converted to the internal floating-point format in
14289 the same way the red component of an RGBA pixel is.
14290 It is then converted to an RGBA pixel with red, green, and blue set to the
14291 converted luminance value,
14292 and alpha set to 1.
14293 After this conversion, the pixel is treated as if it had been read
14294 as an RGBA pixel. "))
14295 (entry (% (heading (code "GL_LUMINANCE_ALPHA")))
14297 Each pixel is a two-component group:
14298 luminance first, followed by alpha.
14299 The two components are converted to the internal floating-point format in
14300 the same way the red component of an RGBA pixel is.
14301 They are then converted to an RGBA pixel with red, green, and blue set to the
14302 converted luminance value,
14303 and alpha set to the converted alpha value.
14304 After this conversion, the pixel is treated as if it had been read
14305 as an RGBA pixel. ")))
14307 The following table summarizes the meaning of the valid constants for the "
14311 (table (% (formatter (asis)))
14312 (entry (% (heading (strong "Type")))
14313 (para (strong "Corresponding Type")))
14314 (entry (% (heading (code "GL_UNSIGNED_BYTE")))
14316 unsigned 8-bit integer "))
14317 (entry (% (heading (code "GL_BYTE")))
14319 signed 8-bit integer "))
14320 (entry (% (heading (code "GL_BITMAP")))
14322 single bits in unsigned 8-bit integers "))
14323 (entry (% (heading (code "GL_UNSIGNED_SHORT")))
14325 unsigned 16-bit integer "))
14326 (entry (% (heading (code "GL_SHORT")))
14328 signed 16-bit integer "))
14329 (entry (% (heading (code "GL_UNSIGNED_INT")))
14331 unsigned 32-bit integer "))
14332 (entry (% (heading (code "GL_INT")))
14335 (entry (% (heading (code "GL_FLOAT")))
14337 single-precision floating-point "))
14338 (entry (% (heading (code "GL_UNSIGNED_BYTE_3_3_2")))
14340 unsigned 8-bit integer "))
14341 (entry (% (heading (code "GL_UNSIGNED_BYTE_2_3_3_REV")))
14343 unsigned 8-bit integer with reversed component ordering "))
14344 (entry (% (heading (code "GL_UNSIGNED_SHORT_5_6_5")))
14346 unsigned 16-bit integer "))
14347 (entry (% (heading (code "GL_UNSIGNED_SHORT_5_6_5_REV")))
14349 unsigned 16-bit integer with reversed component ordering "))
14350 (entry (% (heading (code "GL_UNSIGNED_SHORT_4_4_4_4")))
14352 unsigned 16-bit integer "))
14353 (entry (% (heading (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")))
14355 unsigned 16-bit integer with reversed component ordering "))
14356 (entry (% (heading (code "GL_UNSIGNED_SHORT_5_5_5_1")))
14358 unsigned 16-bit integer "))
14359 (entry (% (heading (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")))
14361 unsigned 16-bit integer with reversed component ordering "))
14362 (entry (% (heading (code "GL_UNSIGNED_INT_8_8_8_8")))
14364 unsigned 32-bit integer "))
14365 (entry (% (heading (code "GL_UNSIGNED_INT_8_8_8_8_REV")))
14367 unsigned 32-bit integer with reversed component ordering "))
14368 (entry (% (heading (code "GL_UNSIGNED_INT_10_10_10_2")))
14370 unsigned 32-bit integer "))
14371 (entry (% (heading (code "GL_UNSIGNED_INT_2_10_10_10_REV")))
14373 unsigned 32-bit integer with reversed component ordering ")))
14376 The rasterization described so far assumes pixel zoom factors of 1.
14378 (code "glPixelZoom")
14379 " is used to change the "
14385 pixel zoom factors,
14386 pixels are converted to fragments as follows.
14398 is the current raster position,
14399 and a given pixel is in the "
14406 of the pixel rectangle,
14407 then fragments are generated for pixels whose centers are in the rectangle
14467 (math (var "zoom") "_" (var "x"))
14472 (math (var "zoom") "_" (var "y"))
14478 (para (code "GL_INVALID_ENUM")
14479 " is generated if "
14484 the accepted values. ")
14485 (para (code "GL_INVALID_ENUM")
14486 " is generated if "
14493 (code "GL_COLOR_INDEX")
14495 (code "GL_STENCIL_INDEX")
14497 (para (code "GL_INVALID_VALUE")
14498 " is generated if either "
14503 (para (code "GL_INVALID_OPERATION")
14504 " is generated if "
14507 (code "GL_STENCIL_INDEX")
14509 and there is no stencil buffer. ")
14510 (para (code "GL_INVALID_OPERATION")
14511 " is generated if "
14530 (code "GL_LUMINANCE")
14533 (code "GL_LUMINANCE_ALPHA")
14535 and the GL is in color index mode. ")
14536 (para (code "GL_INVALID_OPERATION")
14537 " is generated if "
14540 (code "GL_UNSIGNED_BYTE_3_3_2")
14542 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
14544 (code "GL_UNSIGNED_SHORT_5_6_5")
14546 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
14553 (para (code "GL_INVALID_OPERATION")
14554 " is generated if "
14557 (code "GL_UNSIGNED_SHORT_4_4_4_4")
14559 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
14561 (code "GL_UNSIGNED_SHORT_5_5_5_1")
14563 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
14565 (code "GL_UNSIGNED_INT_8_8_8_8")
14567 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
14569 (code "GL_UNSIGNED_INT_10_10_10_2")
14571 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
14580 (para (code "GL_INVALID_OPERATION")
14581 " is generated if a non-zero buffer object name is bound to the "
14582 (code "GL_PIXEL_UNPACK_BUFFER")
14583 " target and the buffer object's data store is currently mapped. ")
14584 (para (code "GL_INVALID_OPERATION")
14585 " is generated if a non-zero buffer object name is bound to the "
14586 (code "GL_PIXEL_UNPACK_BUFFER")
14587 " target and the data would be unpacked from the buffer
14588 object such that the memory reads required would exceed the data store size. ")
14589 (para (code "GL_INVALID_OPERATION")
14590 " is generated if a non-zero buffer object name is bound to the "
14591 (code "GL_PIXEL_UNPACK_BUFFER")
14594 " is not evenly divisible
14595 into the number of bytes needed to store in memory a datum indicated by "
14598 (para (code "GL_INVALID_OPERATION")
14599 " is generated if "
14600 (code "glDrawPixels")
14602 is executed between the execution of "
14605 and the corresponding execution of "
14609 (define-gl-procedure
14610 glDrawRangeElements
14611 "glDrawRangeElements"
14616 (function "glDrawRangeElements"))
14617 (paramdef "GLenum " (parameter "mode"))
14618 (paramdef "GLuint " (parameter "start"))
14619 (paramdef "GLuint " (parameter "end"))
14620 (paramdef "GLsizei " (parameter "count"))
14621 (paramdef "GLenum " (parameter "type"))
14624 (parameter "indices"))))
14626 (heading "render primitives from array data")
14627 (heading "Parameters")
14628 (table (% (formatter (asis)))
14629 (entry (% (heading (var "mode")))
14631 Specifies what kind of primitives to render.
14632 Symbolic constants "
14635 (code "GL_LINE_STRIP")
14637 (code "GL_LINE_LOOP")
14641 (code "GL_TRIANGLE_STRIP")
14643 (code "GL_TRIANGLE_FAN")
14645 (code "GL_TRIANGLES")
14647 (code "GL_QUAD_STRIP")
14652 (code "GL_POLYGON")
14653 " are accepted. "))
14654 (entry (% (heading (var "start")))
14656 Specifies the minimum array index contained in "
14659 (entry (% (heading (var "end")))
14661 Specifies the maximum array index contained in "
14664 (entry (% (heading (var "count")))
14666 Specifies the number of elements to be rendered. "))
14667 (entry (% (heading (var "type")))
14669 Specifies the type of the values in "
14671 ". Must be one of "
14672 (code "GL_UNSIGNED_BYTE")
14674 (code "GL_UNSIGNED_SHORT")
14676 (code "GL_UNSIGNED_INT")
14678 (entry (% (heading (var "indices")))
14680 Specifies a pointer to the location where the indices are stored. ")))
14681 (heading "Description")
14682 (para (code "glDrawRangeElements")
14683 " is a restricted form of "
14684 (code "glDrawElements")
14694 " match the corresponding arguments to "
14695 (code "glDrawElements")
14697 the additional constraint that all values in the arrays "
14706 Implementations denote recommended maximum amounts of vertex and
14708 which may be queried by calling "
14711 (code "GL_MAX_ELEMENTS_VERTICES")
14713 (code "GL_MAX_ELEMENTS_INDICES")
14716 (math (var "end") "-" (var "start") "+" "1")
14718 is greater than the value of "
14719 (code "GL_MAX_ELEMENTS_VERTICES")
14722 " is greater than the value of "
14723 (code "GL_MAX_ELEMENTS_INDICES")
14724 ", then the call may operate at reduced
14725 performance. There is no requirement that all vertices in the range "
14726 (math "[" (var "start") "," (var "end") "]")
14728 be referenced. However, the implementation may
14729 partially process unused vertices, reducing performance from what could
14730 be achieved with an optimal index set. ")
14733 (code "glDrawRangeElements")
14734 " is called, it uses "
14736 " sequential elements from an
14737 enabled array, starting at "
14739 " to construct a sequence of
14740 geometric primitives. "
14742 " specifies what kind of primitives are
14743 constructed, and how the array elements construct these primitives. If
14744 more than one array is enabled, each is used. If "
14745 (code "GL_VERTEX_ARRAY")
14746 " is not enabled, no geometric primitives are
14749 Vertex attributes that are modified by "
14750 (code "glDrawRangeElements")
14752 unspecified value after "
14753 (code "glDrawRangeElements")
14754 " returns. For example, if "
14755 (code "GL_COLOR_ARRAY")
14756 " is enabled, the value of the current color is
14758 (code "glDrawRangeElements")
14759 " executes. Attributes that aren't
14760 modified maintain their previous values. ")
14763 It is an error for indices to lie outside the range "
14764 (math "[" (var "start") "," (var "end") "]")
14766 but implementations may not check for this situation. Such indices
14767 cause implementation-dependent behavior. ")
14768 (para (code "GL_INVALID_ENUM")
14769 " is generated if "
14771 " is not an accepted value. ")
14772 (para (code "GL_INVALID_VALUE")
14773 " is generated if "
14776 (para (code "GL_INVALID_VALUE")
14777 " is generated if "
14778 (math (var "end") "<" (var "start"))
14780 (para (code "GL_INVALID_OPERATION")
14781 " is generated if a non-zero buffer object name is bound to an
14782 enabled array or the element array and the buffer object's data store is currently mapped. ")
14783 (para (code "GL_INVALID_OPERATION")
14784 " is generated if "
14785 (code "glDrawRangeElements")
14786 " is executed between
14789 " and the corresponding "
14793 (define-gl-procedure
14795 "glEdgeFlagPointer"
14798 (funcdef "void " (function "glEdgeFlagPointer"))
14799 (paramdef "GLsizei " (parameter "stride"))
14802 (parameter "pointer"))))
14804 (heading "define an array of edge flags")
14805 (heading "Parameters")
14806 (table (% (formatter (asis)))
14807 (entry (% (heading (var "stride")))
14809 Specifies the byte offset between consecutive edge flags.
14812 " is 0, the edge flags are understood
14813 to be tightly packed in the array. The initial value is 0. "))
14814 (entry (% (heading (var "pointer")))
14816 Specifies a pointer to the first edge flag in the array. The initial
14818 (heading "Description")
14819 (para (code "glEdgeFlagPointer")
14820 " specifies the location and data format of an array of boolean edge
14821 flags to use when rendering. "
14823 " specifies the byte stride from one
14824 edge flag to the next, allowing vertices and attributes
14825 to be packed into a single array or stored in separate arrays. ")
14827 If a non-zero named buffer object is bound to the "
14828 (code "GL_ARRAY_BUFFER")
14831 (code "glBindBuffer")
14832 ") while an edge flag array is
14835 " is treated as a byte offset into the buffer object's data store.
14836 Also, the buffer object binding ("
14837 (code "GL_ARRAY_BUFFER_BINDING")
14838 ") is saved as edge flag vertex array
14839 client-side state ("
14840 (code "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING")
14843 When an edge flag array is
14848 " are saved as client-side
14849 state, in addition to the current vertex array buffer object binding. ")
14851 To enable and disable the edge flag array, call "
14852 (code "glEnableClientState")
14854 (code "glDisableClientState")
14855 " with the argument "
14856 (code "GL_EDGE_FLAG_ARRAY")
14858 enabled, the edge flag array is used
14860 (code "glDrawArrays")
14862 (code "glMultiDrawArrays")
14864 (code "glDrawElements")
14866 (code "glMultiDrawElements")
14868 (code "glDrawRangeElements")
14870 (code "glArrayElement")
14873 (para (code "GL_INVALID_ENUM")
14874 " is generated if "
14876 " is negative. ")))
14878 (define-gl-procedure
14883 (funcdef "void " (function "glEdgeFlag"))
14884 (paramdef "GLboolean " (parameter "flag"))))
14887 "flag edges as either boundary or nonboundary")
14888 (heading "Parameters")
14889 (table (% (formatter (asis)))
14890 (entry (% (heading (var "flag")))
14892 Specifies the current edge flag value,
14897 ". The initial value is "
14900 (heading "Description")
14902 Each vertex of a polygon,
14904 or separate quadrilateral specified between a "
14909 is marked as the start of either a boundary or nonboundary edge.
14910 If the current edge flag is true when the vertex is specified,
14911 the vertex is marked as the start of a boundary edge.
14912 Otherwise, the vertex is marked as the start of a nonboundary edge. "
14913 (code "glEdgeFlag")
14914 " sets the edge flag bit to "
14925 The vertices of connected triangles and connected quadrilaterals are always
14926 marked as boundary,
14927 regardless of the value of the edge flag. ")
14929 Boundary and nonboundary edge flags on vertices are significant only if "
14930 (code "GL_POLYGON_MODE")
14937 (code "glPolygonMode")
14940 (define-gl-procedure
14941 glEnableClientState
14942 "glEnableClientState"
14947 (function "glEnableClientState"))
14948 (paramdef "GLenum " (parameter "cap"))))
14951 "enable or disable client-side capability")
14952 (heading "Parameters")
14953 (table (% (formatter (asis)))
14954 (entry (% (heading (var "cap")))
14956 Specifies the capability to enable.
14957 Symbolic constants "
14958 (code "GL_COLOR_ARRAY")
14960 (code "GL_EDGE_FLAG_ARRAY")
14962 (code "GL_FOG_COORD_ARRAY")
14964 (code "GL_INDEX_ARRAY")
14966 (code "GL_NORMAL_ARRAY")
14968 (code "GL_SECONDARY_COLOR_ARRAY")
14970 (code "GL_TEXTURE_COORD_ARRAY")
14972 (code "GL_VERTEX_ARRAY")
14975 (heading "Description")
14976 (para (code "glEnableClientState")
14978 (code "glDisableClientState")
14980 enable or disable individual client-side capabilities. By default, all
14981 client-side capabilities are disabled.
14983 (code "glEnableClientState")
14985 (code "glDisableClientState")
14989 ", which can assume one of the following
14991 (table (% (formatter (asis)))
14992 (entry (% (heading (code "GL_COLOR_ARRAY")))
14994 If enabled, the color array is enabled for writing and used during
14996 (code "glArrayElement")
14998 (code "glDrawArrays")
15000 (code "glDrawElements")
15002 (code "glDrawRangeElements")
15003 (code "glMultiDrawArrays")
15005 (code "glMultiDrawElements")
15007 (code "glColorPointer")
15009 (entry (% (heading (code "GL_EDGE_FLAG_ARRAY")))
15011 If enabled, the edge flag array is enabled for writing and used during
15013 (code "glArrayElement")
15015 (code "glDrawArrays")
15017 (code "glDrawElements")
15019 (code "glDrawRangeElements")
15020 (code "glMultiDrawArrays")
15022 (code "glMultiDrawElements")
15024 (code "glEdgeFlagPointer")
15026 (entry (% (heading (code "GL_FOG_COORD_ARRAY")))
15028 If enabled, the fog coordinate array is enabled for writing and used during
15030 (code "glArrayElement")
15032 (code "glDrawArrays")
15034 (code "glDrawElements")
15036 (code "glDrawRangeElements")
15037 (code "glMultiDrawArrays")
15039 (code "glMultiDrawElements")
15041 (code "glFogCoordPointer")
15043 (entry (% (heading (code "GL_INDEX_ARRAY")))
15045 If enabled, the index array is enabled for writing and used during
15047 (code "glArrayElement")
15049 (code "glDrawArrays")
15051 (code "glDrawElements")
15053 (code "glDrawRangeElements")
15054 (code "glMultiDrawArrays")
15056 (code "glMultiDrawElements")
15058 (code "glIndexPointer")
15060 (entry (% (heading (code "GL_NORMAL_ARRAY")))
15062 If enabled, the normal array is enabled for writing and used during
15064 (code "glArrayElement")
15066 (code "glDrawArrays")
15068 (code "glDrawElements")
15070 (code "glDrawRangeElements")
15071 (code "glMultiDrawArrays")
15073 (code "glMultiDrawElements")
15075 (code "glNormalPointer")
15077 (entry (% (heading (code "GL_SECONDARY_COLOR_ARRAY")))
15079 If enabled, the secondary color array is enabled for writing and used
15080 during rendering when "
15081 (code "glArrayElement")
15083 (code "glDrawArrays")
15085 (code "glDrawElements")
15087 (code "glDrawRangeElements")
15088 (code "glMultiDrawArrays")
15090 (code "glMultiDrawElements")
15092 (code "glColorPointer")
15094 (entry (% (heading (code "GL_TEXTURE_COORD_ARRAY")))
15096 If enabled, the texture coordinate array is enabled for writing and used
15097 during rendering when "
15098 (code "glArrayElement")
15100 (code "glDrawArrays")
15102 (code "glDrawElements")
15104 (code "glDrawRangeElements")
15105 (code "glMultiDrawArrays")
15107 (code "glMultiDrawElements")
15109 (code "glTexCoordPointer")
15111 (entry (% (heading (code "GL_VERTEX_ARRAY")))
15113 If enabled, the vertex array is enabled for writing and used during
15115 (code "glArrayElement")
15117 (code "glDrawArrays")
15119 (code "glDrawElements")
15121 (code "glDrawRangeElements")
15122 (code "glMultiDrawArrays")
15124 (code "glMultiDrawElements")
15126 (code "glVertexPointer")
15129 (para (code "GL_INVALID_ENUM")
15130 " is generated if "
15132 " is not an accepted value. ")
15133 (para (code "glEnableClientState")
15134 " is not allowed between the execution of "
15139 ", but an error may or may not be generated. If
15140 no error is generated, the behavior is undefined. ")))
15142 (define-gl-procedure
15143 glEnableVertexAttribArray
15144 "glEnableVertexAttribArray"
15149 (function "glEnableVertexAttribArray"))
15150 (paramdef "GLuint " (parameter "index")))
15154 (function "glDisableVertexAttribArray"))
15155 (paramdef "GLuint " (parameter "index"))))
15158 "Enable or disable a generic vertex attribute array")
15159 (heading "Parameters")
15160 (table (% (formatter (asis)))
15161 (entry (% (heading (var "index")))
15162 (para "Specifies the index of the generic vertex
15163 \t\t attribute to be enabled or disabled.")))
15164 (heading "Description")
15165 (para (code "glEnableVertexAttribArray")
15167 \tgeneric vertex attribute array specified by\t"
15170 (code "glDisableVertexAttribArray")
15172 \tgeneric vertex attribute array specified by\t"
15174 ". By default, all client-side
15175 \tcapabilities are disabled, including all generic vertex
15176 \tattribute arrays. If enabled, the values in the generic vertex
15177 \tattribute array will be accessed and used for rendering when
15178 \tcalls are made to vertex array commands such as\t"
15179 (code "glDrawArrays")
15181 (code "glDrawElements")
15183 (code "glDrawRangeElements")
15185 (code "glArrayElement")
15187 (code "glMultiDrawElements")
15190 (code "glMultiDrawArrays")
15193 (para (code "GL_INVALID_VALUE")
15194 " is generated if\t"
15196 " is greater than or equal to\t"
15197 (code "GL_MAX_VERTEX_ATTRIBS")
15199 (para (code "GL_INVALID_OPERATION")
15200 " is generated if either\t"
15201 (code "glEnableVertexAttribArray ")
15203 (code "glDisableVertexAttribArray ")
15205 \tbetween the execution of\t"
15208 and the corresponding execution of\t"
15212 (define-gl-procedure
15217 (funcdef "void " (function "glEnable"))
15218 (paramdef "GLenum " (parameter "cap"))))
15221 "enable or disable server-side GL capabilities")
15222 (heading "Parameters")
15223 (table (% (formatter (asis)))
15224 (entry (% (heading (var "cap")))
15226 Specifies a symbolic constant indicating a GL capability. ")))
15227 (heading "Description")
15228 (para (code "glEnable")
15231 " enable and disable various capabilities.
15233 (code "glIsEnabled")
15236 " to determine the current setting
15237 of any capability. The initial value for each capability with the
15241 (code "GL_MULTISAMPLE")
15244 ". The initial value for "
15247 (code "GL_MULTISAMPLE")
15256 " take a single argument, "
15259 which can assume one of the following values: ")
15260 (table (% (formatter (asis)))
15261 (entry (% (heading (code "GL_ALPHA_TEST")))
15265 do alpha testing. See "
15266 (code "glAlphaFunc")
15268 (entry (% (heading (code "GL_AUTO_NORMAL")))
15272 generate normal vectors when either "
15273 (code "GL_MAP2_VERTEX_3")
15275 (code "GL_MAP2_VERTEX_4")
15276 " is used to generate vertices.
15280 (entry (% (heading (code "GL_BLEND")))
15284 blend the computed fragment color values with the values in the color
15286 (code "glBlendFunc")
15288 (entry (% (heading (code "GL_CLIP_PLANE") (var "i")))
15292 clip geometry against user-defined clipping plane "
15296 (code "glClipPlane")
15298 (entry (% (heading (code "GL_COLOR_LOGIC_OP")))
15302 apply the currently selected logical operation to the computed fragment
15303 color and color buffer values. See "
15306 (entry (% (heading (code "GL_COLOR_MATERIAL")))
15310 have one or more material parameters track the current color.
15312 (code "glColorMaterial")
15314 (entry (% (heading (code "GL_COLOR_SUM")))
15317 If enabled and no fragment shader is active,
15318 add the secondary color value to the computed fragment color.
15320 (code "glSecondaryColor")
15322 (entry (% (heading (code "GL_COLOR_TABLE")))
15326 perform a color table lookup on the incoming RGBA color values.
15328 (code "glColorTable")
15330 (entry (% (heading (code "GL_CONVOLUTION_1D")))
15334 perform a 1D convolution operation on incoming RGBA color values.
15336 (code "glConvolutionFilter1D")
15338 (entry (% (heading (code "GL_CONVOLUTION_2D")))
15342 perform a 2D convolution operation on incoming RGBA color values.
15344 (code "glConvolutionFilter2D")
15346 (entry (% (heading (code "GL_CULL_FACE")))
15350 cull polygons based on their winding in window coordinates.
15352 (code "glCullFace")
15354 (entry (% (heading (code "GL_DEPTH_TEST")))
15358 do depth comparisons and update the depth buffer. Note that even if
15359 the depth buffer exists and the depth mask is non-zero, the
15360 depth buffer is not updated if the depth test is disabled. See "
15361 (code "glDepthFunc")
15363 (code "glDepthRange")
15365 (entry (% (heading (code "GL_DITHER")))
15369 dither color components or indices before they are written to the
15371 (entry (% (heading (code "GL_FOG")))
15374 If enabled and no fragment shader is active,
15375 blend a fog color into the post-texturing color.
15379 (entry (% (heading (code "GL_HISTOGRAM")))
15383 histogram incoming RGBA color values.
15385 (code "glHistogram")
15387 (entry (% (heading (code "GL_INDEX_LOGIC_OP")))
15391 apply the currently selected logical operation to the incoming index and color
15396 (entry (% (heading (code "GL_LIGHT") (var "i")))
15402 " in the evaluation of the lighting
15404 (code "glLightModel")
15408 (entry (% (heading (code "GL_LIGHTING")))
15411 If enabled and no vertex shader is active,
15412 use the current lighting parameters to compute the vertex color or index.
15413 Otherwise, simply associate the current color or index with each
15415 (code "glMaterial")
15417 (code "glLightModel")
15421 (entry (% (heading (code "GL_LINE_SMOOTH")))
15425 draw lines with correct filtering.
15427 draw aliased lines.
15429 (code "glLineWidth")
15431 (entry (% (heading (code "GL_LINE_STIPPLE")))
15435 use the current line stipple pattern when drawing lines. See "
15436 (code "glLineStipple")
15438 (entry (% (heading (code "GL_MAP1_COLOR_4")))
15443 (code "glEvalCoord1")
15445 (code "glEvalMesh1")
15447 (code "glEvalPoint1")
15448 " generate RGBA values.
15452 (entry (% (heading (code "GL_MAP1_INDEX")))
15457 (code "glEvalCoord1")
15459 (code "glEvalMesh1")
15461 (code "glEvalPoint1")
15462 " generate color indices.
15466 (entry (% (heading (code "GL_MAP1_NORMAL")))
15471 (code "glEvalCoord1")
15473 (code "glEvalMesh1")
15475 (code "glEvalPoint1")
15476 " generate normals.
15480 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_1")))
15485 (code "glEvalCoord1")
15487 (code "glEvalMesh1")
15489 (code "glEvalPoint1")
15493 texture coordinates.
15497 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_2")))
15502 (code "glEvalCoord1")
15504 (code "glEvalMesh1")
15506 (code "glEvalPoint1")
15511 " texture coordinates.
15515 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_3")))
15520 (code "glEvalCoord1")
15522 (code "glEvalMesh1")
15524 (code "glEvalPoint1")
15531 " texture coordinates.
15535 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_4")))
15540 (code "glEvalCoord1")
15542 (code "glEvalMesh1")
15544 (code "glEvalPoint1")
15553 " texture coordinates.
15557 (entry (% (heading (code "GL_MAP1_VERTEX_3")))
15562 (code "glEvalCoord1")
15564 (code "glEvalMesh1")
15566 (code "glEvalPoint1")
15573 " vertex coordinates.
15577 (entry (% (heading (code "GL_MAP1_VERTEX_4")))
15582 (code "glEvalCoord1")
15584 (code "glEvalMesh1")
15586 (code "glEvalPoint1")
15596 " vertex coordinates.
15600 (entry (% (heading (code "GL_MAP2_COLOR_4")))
15605 (code "glEvalCoord2")
15607 (code "glEvalMesh2")
15609 (code "glEvalPoint2")
15610 " generate RGBA values.
15614 (entry (% (heading (code "GL_MAP2_INDEX")))
15619 (code "glEvalCoord2")
15621 (code "glEvalMesh2")
15623 (code "glEvalPoint2")
15624 " generate color indices.
15628 (entry (% (heading (code "GL_MAP2_NORMAL")))
15633 (code "glEvalCoord2")
15635 (code "glEvalMesh2")
15637 (code "glEvalPoint2")
15638 " generate normals.
15642 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_1")))
15647 (code "glEvalCoord2")
15649 (code "glEvalMesh2")
15651 (code "glEvalPoint2")
15655 texture coordinates.
15659 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_2")))
15664 (code "glEvalCoord2")
15666 (code "glEvalMesh2")
15668 (code "glEvalPoint2")
15673 " texture coordinates.
15677 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_3")))
15682 (code "glEvalCoord2")
15684 (code "glEvalMesh2")
15686 (code "glEvalPoint2")
15693 " texture coordinates.
15697 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_4")))
15702 (code "glEvalCoord2")
15704 (code "glEvalMesh2")
15706 (code "glEvalPoint2")
15715 " texture coordinates.
15719 (entry (% (heading (code "GL_MAP2_VERTEX_3")))
15724 (code "glEvalCoord2")
15726 (code "glEvalMesh2")
15728 (code "glEvalPoint2")
15735 " vertex coordinates.
15739 (entry (% (heading (code "GL_MAP2_VERTEX_4")))
15744 (code "glEvalCoord2")
15746 (code "glEvalMesh2")
15748 (code "glEvalPoint2")
15758 " vertex coordinates.
15762 (entry (% (heading (code "GL_MINMAX")))
15766 compute the minimum and maximum values of incoming RGBA color values.
15770 (entry (% (heading (code "GL_MULTISAMPLE")))
15774 use multiple fragment samples in computing the final color of a pixel.
15776 (code "glSampleCoverage")
15778 (entry (% (heading (code "GL_NORMALIZE")))
15781 If enabled and no vertex shader is active,
15782 normal vectors are normalized to unit length
15783 after transformation and before lighting. This method is generally
15784 less efficient than "
15785 (code "GL_RESCALE_NORMAL")
15789 (code "glNormalPointer")
15791 (entry (% (heading (code "GL_POINT_SMOOTH")))
15795 draw points with proper filtering.
15797 draw aliased points.
15799 (code "glPointSize")
15801 (entry (% (heading (code "GL_POINT_SPRITE")))
15805 calculate texture coordinates for points based on texture
15806 environment and point parameter settings. Otherwise texture coordinates
15807 are constant across points. "))
15808 (entry (% (heading (code "GL_POLYGON_OFFSET_FILL")))
15811 If enabled, and if the polygon is rendered in "
15813 " mode, an offset is added to depth values of a polygon's
15814 fragments before the depth comparison is performed.
15816 (code "glPolygonOffset")
15818 (entry (% (heading (code "GL_POLYGON_OFFSET_LINE")))
15821 If enabled, and if the polygon is rendered in "
15823 " mode, an offset is added to depth values of a polygon's
15824 fragments before the depth comparison is performed.
15826 (code "glPolygonOffset")
15828 (entry (% (heading (code "GL_POLYGON_OFFSET_POINT")))
15831 If enabled, an offset is added to depth values of a polygon's fragments
15832 before the depth comparison is performed, if the polygon is rendered in "
15835 (code "glPolygonOffset")
15837 (entry (% (heading (code "GL_POLYGON_SMOOTH")))
15840 If enabled, draw polygons with proper filtering.
15841 Otherwise, draw aliased polygons. For correct antialiased polygons,
15842 an alpha buffer is needed and the polygons must be sorted front to
15844 (entry (% (heading (code "GL_POLYGON_STIPPLE")))
15848 use the current polygon stipple pattern when rendering
15850 (code "glPolygonStipple")
15853 (code "GL_POST_COLOR_MATRIX_COLOR_TABLE")))
15857 perform a color table lookup on RGBA color values after color matrix
15860 (code "glColorTable")
15863 (code "GL_POST_CONVOLUTION_COLOR_TABLE")))
15867 perform a color table lookup on RGBA color values after convolution.
15869 (code "glColorTable")
15871 (entry (% (heading (code "GL_RESCALE_NORMAL")))
15874 If enabled and no vertex shader is active,
15875 normal vectors are scaled after transformation and before
15876 lighting by a factor computed from the modelview matrix. If the
15877 modelview matrix scales space uniformly, this has the effect of
15878 restoring the transformed normal to unit length. This method is generally
15879 more efficient than "
15880 (code "GL_NORMALIZE")
15884 (code "glNormalPointer")
15886 (entry (% (heading (code "GL_SAMPLE_ALPHA_TO_COVERAGE")))
15890 compute a temporary coverage value where each bit is determined by the
15891 alpha value at the corresponding sample location. The temporary coverage
15892 value is then ANDed with the fragment coverage value. "))
15893 (entry (% (heading (code "GL_SAMPLE_ALPHA_TO_ONE")))
15897 each sample alpha value is replaced by the maximum representable alpha value. "))
15898 (entry (% (heading (code "GL_SAMPLE_COVERAGE")))
15902 the fragment's coverage is ANDed with the temporary coverage value. If "
15903 (code "GL_SAMPLE_COVERAGE_INVERT")
15906 ", invert the coverage
15909 (code "glSampleCoverage")
15911 (entry (% (heading (code "GL_SEPARABLE_2D")))
15914 If enabled, perform a two-dimensional convolution operation using a separable
15915 convolution filter on incoming RGBA color values.
15917 (code "glSeparableFilter2D")
15919 (entry (% (heading (code "GL_SCISSOR_TEST")))
15923 discard fragments that are outside the scissor rectangle.
15927 (entry (% (heading (code "GL_STENCIL_TEST")))
15931 do stencil testing and update the stencil buffer.
15933 (code "glStencilFunc")
15935 (code "glStencilOp")
15937 (entry (% (heading (code "GL_TEXTURE_1D")))
15940 If enabled and no fragment shader is active,
15941 one-dimensional texturing is performed
15942 (unless two- or three-dimensional or cube-mapped texturing is also enabled).
15944 (code "glTexImage1D")
15946 (entry (% (heading (code "GL_TEXTURE_2D")))
15949 If enabled and no fragment shader is active,
15950 two-dimensional texturing is performed
15951 (unless three-dimensional or cube-mapped texturing is also enabled).
15953 (code "glTexImage2D")
15955 (entry (% (heading (code "GL_TEXTURE_3D")))
15958 If enabled and no fragment shader is active,
15959 three-dimensional texturing is performed
15960 (unless cube-mapped texturing is also enabled).
15962 (code "glTexImage3D")
15964 (entry (% (heading (code "GL_TEXTURE_CUBE_MAP")))
15967 If enabled and no fragment shader is active,
15968 cube-mapped texturing is performed.
15970 (code "glTexImage2D")
15972 (entry (% (heading (code "GL_TEXTURE_GEN_Q")))
15975 If enabled and no vertex shader is active,
15978 " texture coordinate is computed using
15979 the texture generation function defined with "
15982 Otherwise, the current "
15984 " texture coordinate is used.
15988 (entry (% (heading (code "GL_TEXTURE_GEN_R")))
15991 If enabled and no vertex shader is active,
15994 " texture coordinate is computed using
15995 the texture generation function defined with "
15998 Otherwise, the current "
16000 " texture coordinate is used.
16004 (entry (% (heading (code "GL_TEXTURE_GEN_S")))
16007 If enabled and no vertex shader is active,
16010 " texture coordinate is computed using
16011 the texture generation function defined with "
16014 Otherwise, the current "
16016 " texture coordinate is used.
16020 (entry (% (heading (code "GL_TEXTURE_GEN_T")))
16023 If enabled and no vertex shader is active,
16026 " texture coordinate is computed using
16027 the texture generation function defined with "
16030 Otherwise, the current "
16032 " texture coordinate is used.
16036 (entry (% (heading (code "GL_VERTEX_PROGRAM_POINT_SIZE")))
16040 and a vertex shader is active, then the derived point size is taken from the (potentially clipped) shader builtin "
16041 (code "gl_PointSize")
16042 " and clamped to the implementation-dependent point size range. "))
16043 (entry (% (heading (code "GL_VERTEX_PROGRAM_TWO_SIDE")))
16047 and a vertex shader is active, it specifies that the GL will choose between front and back colors based on the
16048 polygon's face direction of which the vertex being shaded is a part. It has no effect on points or lines. ")))
16050 (para (code "GL_INVALID_ENUM")
16051 " is generated if "
16053 " is not one of the values
16054 listed previously. ")
16055 (para (code "GL_INVALID_OPERATION")
16056 " is generated if "
16061 is executed between the execution of "
16064 and the corresponding execution of "
16068 (define-gl-procedure
16073 (funcdef "void " (function "glEvalCoord1f"))
16074 (paramdef "GLfloat " (parameter "u"))))
16077 "evaluate enabled one- and two-dimensional maps")
16078 (heading "Parameters")
16079 (table (% (formatter (asis)))
16080 (entry (% (heading (var "u")))
16082 Specifies a value that is the domain coordinate "
16085 to the basis function
16086 defined in a previous "
16091 (entry (% (heading (var "v")))
16093 Specifies a value that is the domain coordinate "
16096 to the basis function
16097 defined in a previous "
16100 This argument is not present in a "
16101 (code "glEvalCoord1")
16103 (heading "Description")
16104 (para (code "glEvalCoord1")
16105 " evaluates enabled one-dimensional maps at argument "
16108 (code "glEvalCoord2")
16109 " does the same for two-dimensional maps using
16110 two domain values, "
16115 To define a map, call "
16127 (code "glEvalCoord")
16128 " commands is issued,
16129 all currently enabled maps of the indicated dimension are evaluated.
16131 for each enabled map,
16132 it is as if the corresponding GL command had been issued with the
16136 (code "GL_MAP1_INDEX")
16138 (code "GL_MAP2_INDEX")
16142 " command is simulated.
16144 (code "GL_MAP1_COLOR_4")
16146 (code "GL_MAP2_COLOR_4")
16150 " command is simulated.
16152 (code "GL_MAP1_NORMAL")
16154 (code "GL_MAP2_NORMAL")
16156 a normal vector is produced,
16158 (code "GL_MAP1_TEXTURE_COORD_1")
16160 (code "GL_MAP1_TEXTURE_COORD_2")
16162 (code "GL_MAP1_TEXTURE_COORD_3")
16164 (code "GL_MAP1_TEXTURE_COORD_4")
16166 (code "GL_MAP2_TEXTURE_COORD_1")
16168 (code "GL_MAP2_TEXTURE_COORD_2")
16170 (code "GL_MAP2_TEXTURE_COORD_3")
16172 (code "GL_MAP2_TEXTURE_COORD_4")
16173 " is enabled, then an appropriate "
16174 (code "glTexCoord")
16175 " command is simulated. ")
16180 and texture coordinates the GL uses evaluated values instead of current values for those evaluations
16182 and current values otherwise,
16184 the evaluated values do not update the current values.
16187 " commands are interspersed with "
16188 (code "glEvalCoord")
16190 commands, the color,
16192 and texture coordinates associated with the "
16195 affected by the values generated by the "
16196 (code "glEvalCoord")
16198 but only by the most recent "
16205 (code "glTexCoord")
16208 No commands are issued for maps that are not enabled.
16209 If more than one texture evaluation is enabled for a particular dimension
16211 (code "GL_MAP2_TEXTURE_COORD_1")
16213 (code "GL_MAP2_TEXTURE_COORD_2")
16215 then only the evaluation of the map that produces the larger
16216 number of coordinates
16218 (code "GL_MAP2_TEXTURE_COORD_2")
16221 (code "GL_MAP1_VERTEX_4")
16223 (code "GL_MAP1_VERTEX_3")
16226 (code "GL_MAP2_VERTEX_4")
16228 (code "GL_MAP2_VERTEX_3")
16230 in the same manner.
16231 If neither a three- nor a four-component vertex map is enabled for the
16232 specified dimension,
16234 (code "glEvalCoord")
16235 " command is ignored. ")
16237 If you have enabled automatic normal generation,
16241 (code "GL_AUTO_NORMAL")
16243 (code "glEvalCoord2")
16244 " generates surface normals analytically,
16245 regardless of the contents or enabling of the "
16246 (code "GL_MAP2_NORMAL")
16249 (para (math (code "m")
16269 Then the generated normal "
16283 If automatic normal generation is disabled,
16284 the corresponding normal map "
16285 (code "GL_MAP2_NORMAL")
16288 is used to produce a normal.
16289 If neither automatic normal generation nor a normal map is enabled,
16290 no normal is generated for "
16291 (code "glEvalCoord2")
16294 (define-gl-procedure
16299 (funcdef "void " (function "glEvalMesh1"))
16300 (paramdef "GLenum " (parameter "mode"))
16301 (paramdef "GLint " (parameter "i1"))
16302 (paramdef "GLint " (parameter "i2"))))
16305 "compute a one- or two-dimensional grid of points or lines")
16306 (heading "Parameters")
16307 (table (% (formatter (asis)))
16308 (entry (% (heading (var "mode")))
16311 (code "glEvalMesh1")
16312 ", specifies whether to compute a one-dimensional mesh of points or lines.
16313 Symbolic constants "
16317 " are accepted. "))
16318 (entry (% (heading (var "i1")))
16321 Specify the first and last integer values for grid domain variable "
16324 (heading "Description")
16325 (para (code "glMapGrid")
16327 (code "glEvalMesh")
16328 " are used in tandem to efficiently
16329 generate and evaluate a series of evenly-spaced map domain values. "
16330 (code "glEvalMesh")
16331 " steps through the integer domain of a one- or two-dimensional grid,
16332 whose range is the domain of the evaluation maps specified by "
16338 " determines whether the resulting vertices are connected as
16341 or filled polygons. ")
16343 In the one-dimensional case, "
16344 (code "glEvalMesh1")
16346 the mesh is generated as if the following code fragment were executed: ")
16389 (math (var "u") "_" "1")
16392 (math (var "u") "_" "2")
16394 are the arguments to the most recent "
16395 (code "glMapGrid1")
16413 The one absolute numeric requirement is that if "
16414 (math (var "i") "=" (var "n"))
16417 value computed from "
16428 (math (var "u") "_" "2")
16431 In the two-dimensional case, "
16432 (code "glEvalMesh2")
16469 (math (var "u") "_" "1")
16471 (math (var "u") "_" "2")
16475 (math (var "v") "_" "1")
16478 (math (var "v") "_" "2")
16481 arguments to the most recent "
16482 (code "glMapGrid2")
16483 " command. Then, if "
16488 (code "glEvalMesh2")
16489 " command is equivalent
16499 glBegin( GL_QUAD_STRIP );
16556 ", then a call to "
16557 (code "glEvalMesh2")
16558 " is equivalent to: ")
16567 glBegin( GL_LINE_STRIP );
16600 glBegin( GL_LINE_STRIP );
16632 ", then a call to "
16633 (code "glEvalMesh2")
16634 " is equivalent to: ")
16638 glBegin( GL_POINTS );
16670 In all three cases, the only absolute numeric requirements are that if "
16671 (math (var "i") "=" (var "n"))
16673 then the value computed from "
16684 (math (var "u") "_" "2")
16687 (math (var "j") "=" (var "m"))
16689 then the value computed from "
16700 (math (var "v") "_" "2")
16703 (para (code "GL_INVALID_ENUM")
16704 " is generated if "
16706 " is not an accepted value. ")
16707 (para (code "GL_INVALID_OPERATION")
16708 " is generated if "
16709 (code "glEvalMesh")
16711 is executed between the execution of "
16714 and the corresponding execution of "
16718 (define-gl-procedure
16723 (funcdef "void " (function "glEvalPoint1"))
16724 (paramdef "GLint " (parameter "i"))))
16727 "generate and evaluate a single point in a mesh")
16728 (heading "Parameters")
16729 (table (% (formatter (asis)))
16730 (entry (% (heading (var "i")))
16732 Specifies the integer value for grid domain variable "
16735 (entry (% (heading (var "j")))
16737 Specifies the integer value for grid domain variable "
16741 (code "glEvalPoint2")
16743 (heading "Description")
16744 (para (code "glMapGrid")
16746 (code "glEvalMesh")
16747 " are used in tandem to efficiently
16748 generate and evaluate a series of evenly spaced map domain values. "
16749 (code "glEvalPoint")
16750 " can be used to evaluate a single grid point in the same gridspace
16751 that is traversed by "
16752 (code "glEvalMesh")
16755 (code "glEvalPoint1")
16756 " is equivalent to calling "
16790 (math (var "u") "_" "1")
16793 (math (var "u") "_" "2")
16795 are the arguments to the most recent "
16796 (code "glMapGrid1")
16798 The one absolute numeric requirement is that if "
16799 (math (var "i") "=" (var "n"))
16801 then the value computed from "
16812 (math (var "u") "_" "2")
16815 In the two-dimensional case, "
16816 (code "glEvalPoint2")
16852 (math (var "u") "_" "1")
16854 (math (var "u") "_" "2")
16858 (math (var "v") "_" "1")
16861 (math (var "v") "_" "2")
16863 are the arguments to the most recent "
16864 (code "glMapGrid2")
16867 (code "glEvalPoint2")
16868 " command is equivalent to calling "
16870 The only absolute numeric requirements are that if "
16871 (math (var "i") "=" (var "n"))
16873 then the value computed from "
16884 (math (var "u") "_" "2")
16887 (math (var "j") "=" (var "m"))
16889 then the value computed from "
16900 (math (var "v") "_" "2")
16924 (define-gl-procedure
16929 (funcdef "void " (function "glFeedbackBuffer"))
16930 (paramdef "GLsizei " (parameter "size"))
16931 (paramdef "GLenum " (parameter "type"))
16932 (paramdef "GLfloat * " (parameter "buffer"))))
16934 (heading "controls feedback mode")
16935 (heading "Parameters")
16936 (table (% (formatter (asis)))
16937 (entry (% (heading (var "size")))
16939 Specifies the maximum number of values that can be written into "
16942 (entry (% (heading (var "type")))
16944 Specifies a symbolic constant that describes the information
16945 that will be returned for each vertex. "
16950 (code "GL_3D_COLOR")
16952 (code "GL_3D_COLOR_TEXTURE")
16954 (code "GL_4D_COLOR_TEXTURE")
16955 " are accepted. "))
16956 (entry (% (heading (var "buffer")))
16958 Returns the feedback data. ")))
16959 (heading "Description")
16962 (code "glFeedbackBuffer")
16963 " function controls feedback.
16964 Feedback, like selection, is a GL mode.
16965 The mode is selected by calling "
16966 (code "glRenderMode")
16968 (code "GL_FEEDBACK")
16970 When the GL is in feedback mode,
16971 no pixels are produced by rasterization.
16972 Instead, information about primitives that would have been
16973 rasterized is fed back to the application using the GL. ")
16974 (para (code "glFeedbackBuffer")
16975 " has three arguments: "
16977 " is a pointer to an array of floating-point values
16978 into which feedback information is placed. "
16980 " indicates the size of the array. "
16982 " is a symbolic constant describing the information
16983 that is fed back for each vertex. "
16984 (code "glFeedbackBuffer")
16985 " must be issued before feedback mode is enabled
16987 (code "glRenderMode")
16989 (code "GL_FEEDBACK")
16992 (code "GL_FEEDBACK")
16993 " without establishing the feedback buffer,
16995 (code "glFeedbackBuffer")
16996 " while the GL is in feedback mode,
17000 (code "glRenderMode")
17001 " is called while in feedback mode, it returns the number of entries
17002 placed in the feedback array and resets the feedback array pointer to the base
17003 of the feedback buffer. The returned value never exceeds "
17006 data required more room than was available in "
17009 (code "glRenderMode")
17010 " returns a negative value.
17011 To take the GL out of feedback mode, call "
17012 (code "glRenderMode")
17013 " with a parameter value other than "
17014 (code "GL_FEEDBACK")
17017 While in feedback mode,
17018 each primitive, bitmap, or pixel rectangle that would be rasterized
17019 generates a block of values that are copied into the feedback array.
17020 If doing so would cause the number of entries to exceed the maximum,
17021 the block is partially written so as to fill the array
17022 (if there is any room left at all),
17023 and an overflow flag is set.
17024 Each block begins with a code indicating the primitive type,
17025 followed by values that describe the primitive's vertices and
17027 Entries are also written for bitmaps and pixel rectangles.
17028 Feedback occurs after polygon culling and "
17029 (code "glPolygonMode")
17031 of polygons has taken place,
17032 so polygons that are culled are not returned in the feedback buffer.
17033 It can also occur after polygons with more than three edges are broken up
17035 if the GL implementation renders polygons by performing this decomposition. ")
17038 (code "glPassThrough")
17039 " command can be used to insert a marker
17040 into the feedback buffer.
17042 (code "glPassThrough")
17045 Following is the grammar for the blocks of values written
17046 into the feedback buffer.
17047 Each primitive is indicated with a unique identifying value
17048 followed by some number of vertices.
17049 Polygon entries include an integer value indicating how many vertices follow.
17050 A vertex is fed back as some number of floating-point values,
17054 Colors are fed back as four values in RGBA mode and one value
17055 in color index mode. ")
17059 " feedbackItem feedbackList | feedbackItem ")
17063 " point | lineSegment | polygon | bitmap | pixelRectangle | passThru ")
17067 (code "GL_POINT_TOKEN")
17072 (code "GL_LINE_TOKEN")
17073 " vertex vertex | "
17074 (code "GL_LINE_RESET_TOKEN")
17079 (code "GL_POLYGON_TOKEN")
17084 " polySpec vertex | vertex vertex vertex ")
17088 (code "GL_BITMAP_TOKEN")
17093 (code "GL_DRAW_PIXEL_TOKEN")
17095 (code "GL_COPY_PIXEL_TOKEN")
17100 (code "GL_PASS_THROUGH_TOKEN")
17105 " 2d | 3d | 3dColor | 3dColorTexture | 4dColorTexture ")
17107 2d " (math "←") " value value ")
17109 3d " (math "←") " value value value ")
17113 " value value value color ")
17117 " value value value color tex ")
17121 " value value value value color tex ")
17123 color " (math "←") " rgba | index ")
17127 " value value value value ")
17129 index " (math "←") " value ")
17133 " value value value value ")
17135 (para (var "value")
17137 is a floating-point number,
17141 is a floating-point integer giving the number of vertices in the polygon. "
17142 (code "GL_POINT_TOKEN")
17144 (code "GL_LINE_TOKEN")
17146 (code "GL_LINE_RESET_TOKEN")
17148 (code "GL_POLYGON_TOKEN")
17150 (code "GL_BITMAP_TOKEN")
17152 (code "GL_DRAW_PIXEL_TOKEN")
17154 (code "GL_COPY_PIXEL_TOKEN")
17156 (code "GL_PASS_THROUGH_TOKEN")
17157 " are symbolic floating-point constants. "
17158 (code "GL_LINE_RESET_TOKEN")
17159 " is returned whenever the line stipple pattern
17161 The data returned as a vertex depends on the feedback "
17165 The following table gives the correspondence between "
17168 and the number of values per vertex. "
17170 " is 1 in color index mode and 4 in RGBA mode. ")
17172 (table (% (formatter (asis)))
17173 (entry (% (heading (strong "Type")))
17174 (para (strong "Coordinates")
17180 (strong "Total Number of Values")))
17181 (entry (% (heading (code "GL_2D")))
17190 (entry (% (heading (code "GL_3D")))
17201 (entry (% (heading (code "GL_3D_COLOR")))
17211 (math "3" "+" (var "k"))))
17212 (entry (% (heading (code "GL_3D_COLOR_TEXTURE")))
17224 (math "7" "+" (var "k"))))
17225 (entry (% (heading (code "GL_4D_COLOR_TEXTURE")))
17239 (math "8" "+" (var "k")))))
17241 Feedback vertex coordinates are in window coordinates,
17245 which is in clip coordinates.
17246 Feedback colors are lighted, if lighting is enabled.
17247 Feedback texture coordinates are generated,
17248 if texture coordinate generation is enabled.
17249 They are always transformed by the texture matrix. ")
17251 (para (code "GL_INVALID_ENUM")
17252 " is generated if "
17254 " is not an accepted value. ")
17255 (para (code "GL_INVALID_VALUE")
17256 " is generated if "
17259 (para (code "GL_INVALID_OPERATION")
17260 " is generated if "
17261 (code "glFeedbackBuffer")
17262 " is called while the
17264 (code "GL_FEEDBACK")
17267 (code "glRenderMode")
17268 " is called with argument "
17269 (code "GL_FEEDBACK")
17271 (code "glFeedbackBuffer")
17272 " is called at least once. ")
17273 (para (code "GL_INVALID_OPERATION")
17274 " is generated if "
17275 (code "glFeedbackBuffer")
17277 is executed between the execution of "
17280 and the corresponding execution of "
17284 (define-gl-procedure
17289 (funcdef "void " (function "glFinish"))
17290 (paramdef (parameter "void"))))
17293 "block until all GL execution is complete")
17294 (heading "Description")
17295 (para (code "glFinish")
17296 " does not return until the effects of all previously
17297 called GL commands are complete.
17298 Such effects include all changes to GL state,
17299 all changes to connection state,
17300 and all changes to the frame buffer contents. ")
17302 (para (code "GL_INVALID_OPERATION")
17303 " is generated if "
17305 " is executed between
17309 and the corresponding execution of "
17313 (define-gl-procedure
17318 (funcdef "void " (function "glFlush"))
17319 (paramdef (parameter "void"))))
17322 "force execution of GL commands in finite time")
17323 (heading "Description")
17325 Different GL implementations buffer commands in several different locations,
17326 including network buffers and the graphics accelerator itself. "
17328 " empties all of these buffers,
17329 causing all issued commands to be executed as quickly as
17330 they are accepted by the actual rendering engine.
17331 Though this execution may not be completed in any particular
17333 it does complete in finite time. ")
17335 Because any GL program might be executed over a network,
17336 or on an accelerator that buffers commands,
17337 all programs should call "
17339 " whenever they count on having
17340 all of their previously issued commands completed.
17344 " before waiting for user input that depends on
17345 the generated image. ")
17347 (para (code "GL_INVALID_OPERATION")
17348 " is generated if "
17351 is executed between the execution of "
17354 and the corresponding execution of "
17358 (define-gl-procedure
17360 "glFogCoordPointer"
17363 (funcdef "void " (function "glFogCoordPointer"))
17364 (paramdef "GLenum " (parameter "type"))
17365 (paramdef "GLsizei " (parameter "stride"))
17366 (paramdef "GLvoid * " (parameter "pointer"))))
17368 (heading "define an array of fog coordinates")
17369 (heading "Parameters")
17370 (table (% (formatter (asis)))
17371 (entry (% (heading (var "type")))
17373 Specifies the data type of each fog coordinate.
17374 Symbolic constants "
17380 are accepted. The initial value is "
17383 (entry (% (heading (var "stride")))
17385 Specifies the byte offset between consecutive fog coordinates.
17388 " is 0, the array elements are understood
17389 to be tightly packed. The initial value is 0. "))
17390 (entry (% (heading (var "pointer")))
17392 Specifies a pointer to the first coordinate of the first fog coordinate in the
17393 array. The initial value is 0. ")))
17394 (heading "Description")
17395 (para (code "glFogCoordPointer")
17396 " specifies the location and data format of an array of fog coordinates
17397 to use when rendering. "
17399 " specifies the data type of each fog
17402 " specifies the byte stride from one fog coordinate to
17403 the next, allowing vertices and attributes to be packed into a single array
17404 or stored in separate arrays. ")
17406 If a non-zero named buffer object is bound to the "
17407 (code "GL_ARRAY_BUFFER")
17410 (code "glBindBuffer")
17411 ") while a fog coordinate array is
17414 " is treated as a byte offset into the buffer object's data store.
17415 Also, the buffer object binding ("
17416 (code "GL_ARRAY_BUFFER_BINDING")
17417 ") is saved as fog coordinate vertex array
17418 client-side state ("
17419 (code "GL_FOG_COORD_ARRAY_BUFFER_BINDING")
17422 When a fog coordinate array is specified, "
17428 " are saved as client-side
17429 state, in addition to the current vertex array buffer object binding. ")
17431 To enable and disable the fog coordinate array, call "
17432 (code "glEnableClientState")
17434 (code "glDisableClientState")
17435 " with the argument "
17436 (code "GL_FOG_COORD_ARRAY")
17438 enabled, the fog coordinate array is used
17440 (code "glDrawArrays")
17442 (code "glMultiDrawArrays")
17444 (code "glDrawElements")
17446 (code "glMultiDrawElements")
17448 (code "glDrawRangeElements")
17450 (code "glArrayElement")
17453 (para (code "GL_INVALID_ENUM")
17454 " is generated if "
17462 (para (code "GL_INVALID_VALUE")
17463 " is generated if "
17465 " is negative. ")))
17467 (define-gl-procedure
17472 (funcdef "void " (function "glFogCoordd"))
17473 (paramdef "GLdouble " (parameter "coord"))))
17475 (heading "set the current fog coordinates")
17476 (heading "Parameters")
17477 (table (% (formatter (asis)))
17478 (entry (% (heading (var "coord")))
17480 Specify the fog distance. ")))
17481 (heading "Description")
17482 (para (code "glFogCoord")
17483 " specifies the fog coordinate that is associated with each vertex and
17484 the current raster position. The value specified is interpolated and used
17485 in computing the fog color (see "
17489 (define-gl-procedure
17494 (funcdef "void " (function "glFogf"))
17495 (paramdef "GLenum " (parameter "pname"))
17496 (paramdef "GLfloat " (parameter "param"))))
17498 (heading "specify fog parameters")
17499 (heading "Parameters")
17500 (table (% (formatter (asis)))
17501 (entry (% (heading (var "pname")))
17503 Specifies a single-valued fog parameter. "
17504 (code "GL_FOG_MODE")
17506 (code "GL_FOG_DENSITY")
17508 (code "GL_FOG_START")
17510 (code "GL_FOG_END")
17512 (code "GL_FOG_INDEX")
17514 (code "GL_FOG_COORD_SRC")
17517 (entry (% (heading (var "param")))
17519 Specifies the value that "
17521 " will be set to. ")))
17522 (heading "Description")
17524 Fog is initially disabled.
17525 While enabled, fog affects rasterized geometry,
17526 bitmaps, and pixel blocks, but not buffer clear operations. To enable
17527 and disable fog, call "
17534 (para (code "glFog")
17535 " assigns the value or values in "
17537 " to the fog parameter
17541 The following values are accepted for "
17544 (table (% (formatter (asis)))
17545 (entry (% (heading (code "GL_FOG_MODE")))
17546 (para (var "params")
17547 " is a single integer or floating-point value that specifies
17548 the equation to be used to compute the fog blend factor, "
17551 Three symbolic constants are accepted: "
17559 The equations corresponding to these symbolic constants are defined below.
17560 The initial fog mode is "
17563 (entry (% (heading (code "GL_FOG_DENSITY")))
17564 (para (var "params")
17565 " is a single integer or floating-point value that specifies "
17566 (math (var "density"))
17568 the fog density used in both exponential fog equations.
17569 Only nonnegative densities are accepted.
17570 The initial fog density is 1. "))
17571 (entry (% (heading (code "GL_FOG_START")))
17572 (para (var "params")
17573 " is a single integer or floating-point value that specifies "
17574 (math (var "start"))
17576 the near distance used in the linear fog equation.
17577 The initial near distance is 0. "))
17578 (entry (% (heading (code "GL_FOG_END")))
17579 (para (var "params")
17580 " is a single integer or floating-point value that specifies "
17583 the far distance used in the linear fog equation.
17584 The initial far distance is 1. "))
17585 (entry (% (heading (code "GL_FOG_INDEX")))
17586 (para (var "params")
17587 " is a single integer or floating-point value that specifies "
17588 (math (var "i") "_" (var "f"))
17590 the fog color index.
17591 The initial fog index is 0. "))
17592 (entry (% (heading (code "GL_FOG_COLOR")))
17593 (para (var "params")
17594 " contains four integer or floating-point values that specify "
17595 (math (var "C") "_" (var "f"))
17598 Integer values are mapped linearly such that the most positive representable
17600 and the most negative representable value maps to "
17603 Floating-point values are mapped directly.
17605 all color components are clamped to the range "
17606 (math "[" "0" "," "1" "]")
17608 The initial fog color is (0, 0, 0, 0). "))
17609 (entry (% (heading (code "GL_FOG_COORD_SRC")))
17610 (para (var "params")
17611 " contains either of the following symbolic constants: "
17612 (code "GL_FOG_COORD")
17614 (code "GL_FRAGMENT_DEPTH")
17616 (code "GL_FOG_COORD")
17618 specifies that the current fog coordinate should be used as distance value
17619 in the fog color computation. "
17620 (code "GL_FRAGMENT_DEPTH")
17621 " specifies that the
17622 current fragment depth should be used as distance value in the fog
17625 Fog blends a fog color with each rasterized pixel fragment's post-texturing
17626 color using a blending factor "
17632 is computed in one of three ways,
17633 depending on the fog mode.
17637 be either the distance in eye coordinate from the origin (in the
17639 (code "GL_FOG_COORD_SRC")
17641 (code "GL_FRAGMENT_DEPTH")
17643 the current fog coordinate (in the case that "
17644 (code "GL_FOG_COORD_SRC")
17647 (code "GL_FOG_COORD")
17698 Regardless of the fog mode, "
17701 is clamped to the range "
17702 (math "[" "0" "," "1" "]")
17704 after it is computed.
17706 if the GL is in RGBA color mode,
17707 the fragment's red, green, and blue colors, represented by "
17708 (math (var "C") "_" (var "r"))
17711 (para (math (var "C")
17735 Fog does not affect a fragment's alpha component. ")
17737 In color index mode, the fragment's color index "
17738 (math (var "i") "_" (var "r"))
17741 (para (math (var "i")
17764 (para (code "GL_INVALID_ENUM")
17765 " is generated if "
17767 " is not an accepted value,
17771 (code "GL_FOG_MODE")
17774 " is not an accepted value. ")
17775 (para (code "GL_INVALID_VALUE")
17776 " is generated if "
17779 (code "GL_FOG_DENSITY")
17784 (para (code "GL_INVALID_OPERATION")
17785 " is generated if "
17788 is executed between the execution of "
17791 and the corresponding execution of "
17795 (define-gl-procedure
17800 (funcdef "void " (function "glFrontFace"))
17801 (paramdef "GLenum " (parameter "mode"))))
17804 "define front- and back-facing polygons")
17805 (heading "Parameters")
17806 (table (% (formatter (asis)))
17807 (entry (% (heading (var "mode")))
17809 Specifies the orientation of front-facing polygons. "
17814 The initial value is "
17817 (heading "Description")
17819 In a scene composed entirely of opaque closed surfaces,
17820 back-facing polygons are never visible.
17821 Eliminating these invisible polygons has the obvious benefit
17822 of speeding up the rendering of the image.
17823 To enable and disable elimination of back-facing polygons, call "
17829 (code "GL_CULL_FACE")
17832 The projection of a polygon to window coordinates is said to have
17833 clockwise winding if an imaginary object following the path
17834 from its first vertex,
17837 to its last vertex,
17838 and finally back to its first vertex,
17839 moves in a clockwise direction about the interior of the polygon.
17840 The polygon's winding is said to be counterclockwise if the imaginary
17841 object following the same path moves in a counterclockwise direction
17842 about the interior of the polygon. "
17843 (code "glFrontFace")
17844 " specifies whether polygons with clockwise winding in window coordinates,
17845 or counterclockwise winding in window coordinates,
17846 are taken to be front-facing.
17851 " selects counterclockwise polygons as
17854 " selects clockwise polygons as front-facing.
17855 By default, counterclockwise polygons are taken to be front-facing. ")
17857 (para (code "GL_INVALID_ENUM")
17858 " is generated if "
17860 " is not an accepted value. ")
17861 (para (code "GL_INVALID_OPERATION")
17862 " is generated if "
17863 (code "glFrontFace")
17865 is executed between the execution of "
17868 and the corresponding execution of "
17872 (define-gl-procedure
17877 (funcdef "void " (function "glFrustum"))
17878 (paramdef "GLdouble " (parameter "left"))
17879 (paramdef "GLdouble " (parameter "right"))
17880 (paramdef "GLdouble " (parameter "bottom"))
17881 (paramdef "GLdouble " (parameter "top"))
17882 (paramdef "GLdouble " (parameter "nearVal"))
17883 (paramdef "GLdouble " (parameter "farVal"))))
17886 "multiply the current matrix by a perspective matrix")
17887 (heading "Parameters")
17888 (table (% (formatter (asis)))
17889 (entry (% (heading (var "left")))
17890 (itemx (var "right"))
17892 Specify the coordinates for the left and right vertical clipping planes. "))
17893 (entry (% (heading (var "bottom")))
17894 (itemx (var "top"))
17896 Specify the coordinates for the bottom and top horizontal clipping planes. "))
17897 (entry (% (heading (var "nearVal")))
17898 (itemx (var "farVal"))
17900 Specify the distances to the near and far depth clipping planes.
17901 Both distances must be positive. ")))
17902 (heading "Description")
17903 (para (code "glFrustum")
17904 " describes a perspective matrix that produces a perspective projection.
17905 The current matrix (see "
17906 (code "glMatrixMode")
17907 ") is multiplied by this matrix
17908 and the result replaces the current matrix, as if "
17909 (code "glMultMatrix")
17910 " were called with the following matrix
17911 as its argument: ")
17973 (para (math (var "A")
17984 (para (math (var "B")
17995 (para (math (var "C")
18008 (para (math (var "D")
18025 Typically, the matrix mode is "
18026 (code "GL_PROJECTION")
18045 specify the points on the near clipping plane that are mapped
18046 to the lower left and upper right corners of the window,
18047 assuming that the eye is located at (0, 0, 0). "
18048 (math "-" (var "farVal"))
18050 specifies the location of the far clipping plane.
18055 " must be positive. ")
18058 (code "glPushMatrix")
18060 (code "glPopMatrix")
18061 " to save and restore
18062 the current matrix stack. ")
18064 (para (code "GL_INVALID_VALUE")
18065 " is generated if "
18084 (para (code "GL_INVALID_OPERATION")
18085 " is generated if "
18088 is executed between the execution of "
18091 and the corresponding execution of "
18095 (define-gl-procedure
18100 (funcdef "void " (function "glGenBuffers"))
18101 (paramdef "GLsizei " (parameter "n"))
18102 (paramdef "GLuint * " (parameter "buffers"))))
18104 (heading "generate buffer object names")
18105 (heading "Parameters")
18106 (table (% (formatter (asis)))
18107 (entry (% (heading (var "n")))
18109 Specifies the number of buffer object names to be generated. "))
18110 (entry (% (heading (var "buffers")))
18112 Specifies an array in which the generated buffer object names are stored. ")))
18113 (heading "Description")
18114 (para (code "glGenBuffers")
18117 " buffer object names in "
18120 There is no guarantee that the names form a contiguous set of integers;
18121 however, it is guaranteed that none of the returned names was in use
18122 immediately before the call to "
18123 (code "glGenBuffers")
18126 Buffer object names returned by a call to "
18127 (code "glGenBuffers")
18128 " are not returned by
18129 subsequent calls, unless they are first deleted with "
18130 (code "glDeleteBuffers")
18133 No buffer objects are associated with the returned buffer object names until they are first bound by calling "
18134 (code "glBindBuffer")
18137 (para (code "GL_INVALID_VALUE")
18138 " is generated if "
18141 (para (code "GL_INVALID_OPERATION")
18142 " is generated if "
18143 (code "glGenBuffers")
18145 between the execution of "
18147 " and the corresponding
18152 (define-gl-procedure
18157 (funcdef "GLuint " (function "glGenLists"))
18158 (paramdef "GLsizei " (parameter "range"))))
18161 "generate a contiguous set of empty display lists")
18162 (heading "Parameters")
18163 (table (% (formatter (asis)))
18164 (entry (% (heading (var "range")))
18166 Specifies the number of contiguous empty display lists
18167 to be generated. ")))
18168 (heading "Description")
18169 (para (code "glGenLists")
18170 " has one argument, "
18173 It returns an integer "
18178 empty display lists,
18182 (math (var "n") "+" "1")
18186 (math (var "n") "+" (var "range") "-" "1")
18192 if there is no group of "
18194 " contiguous names available,
18195 or if any error is generated,
18196 no display lists are generated,
18197 and 0 is returned. ")
18199 (para (code "GL_INVALID_VALUE")
18200 " is generated if "
18203 (para (code "GL_INVALID_OPERATION")
18204 " is generated if "
18205 (code "glGenLists")
18207 is executed between the execution of "
18210 and the corresponding execution of "
18214 (define-gl-procedure
18219 (funcdef "void " (function "glGenQueries"))
18220 (paramdef "GLsizei " (parameter "n"))
18221 (paramdef "GLuint * " (parameter "ids"))))
18223 (heading "generate query object names")
18224 (heading "Parameters")
18225 (table (% (formatter (asis)))
18226 (entry (% (heading (var "n")))
18228 Specifies the number of query object names to be generated. "))
18229 (entry (% (heading (var "ids")))
18231 Specifies an array in which the generated query object names are stored. ")))
18232 (heading "Description")
18233 (para (code "glGenQueries")
18236 " query object names in "
18239 There is no guarantee that the names form a contiguous set of integers;
18240 however, it is guaranteed that none of the returned names was in use
18241 immediately before the call to "
18242 (code "glGenQueries")
18245 Query object names returned by a call to "
18246 (code "glGenQueries")
18247 " are not returned by
18248 subsequent calls, unless they are first deleted with "
18249 (code "glDeleteQueries")
18252 No query objects are associated with the returned query object names until they are first used by calling "
18253 (code "glBeginQuery")
18256 (para (code "GL_INVALID_VALUE")
18257 " is generated if "
18260 (para (code "GL_INVALID_OPERATION")
18261 " is generated if "
18262 (code "glGenQueries")
18264 between the execution of "
18266 " and the corresponding
18271 (define-gl-procedure
18276 (funcdef "void " (function "glGenTextures"))
18277 (paramdef "GLsizei " (parameter "n"))
18278 (paramdef "GLuint * " (parameter "textures"))))
18280 (heading "generate texture names")
18281 (heading "Parameters")
18282 (table (% (formatter (asis)))
18283 (entry (% (heading (var "n")))
18285 Specifies the number of texture names to be generated. "))
18286 (entry (% (heading (var "textures")))
18288 Specifies an array in which the generated texture names are stored. ")))
18289 (heading "Description")
18290 (para (code "glGenTextures")
18293 " texture names in "
18296 There is no guarantee that the names form a contiguous set of integers;
18297 however, it is guaranteed that none of the returned names was in use
18298 immediately before the call to "
18299 (code "glGenTextures")
18302 The generated textures have no dimensionality; they assume the dimensionality
18303 of the texture target to which they are first bound
18305 (code "glBindTexture")
18308 Texture names returned by a call to "
18309 (code "glGenTextures")
18310 " are not returned by
18311 subsequent calls, unless they are first deleted with "
18312 (code "glDeleteTextures")
18315 (para (code "GL_INVALID_VALUE")
18316 " is generated if "
18319 (para (code "GL_INVALID_OPERATION")
18320 " is generated if "
18321 (code "glGenTextures")
18323 between the execution of "
18325 " and the corresponding
18330 (define-gl-procedure
18332 "glGetActiveAttrib"
18335 (funcdef "void " (function "glGetActiveAttrib"))
18336 (paramdef "GLuint " (parameter "program"))
18337 (paramdef "GLuint " (parameter "index"))
18338 (paramdef "GLsizei " (parameter "bufSize"))
18339 (paramdef "GLsizei *" (parameter "length"))
18340 (paramdef "GLint *" (parameter "size"))
18341 (paramdef "GLenum *" (parameter "type"))
18342 (paramdef "GLchar *" (parameter "name"))))
18345 "Returns information about an active attribute variable for the specified program object")
18346 (heading "Parameters")
18347 (table (% (formatter (asis)))
18348 (entry (% (heading (var "program")))
18349 (para "Specifies the program object to be
18351 (entry (% (heading (var "index")))
18352 (para "Specifies the index of the attribute variable
18353 \t\t to be queried."))
18354 (entry (% (heading (var "bufSize")))
18355 (para "Specifies the maximum number of characters
18356 \t\t OpenGL is allowed to write in the character buffer
18357 \t\t indicated by "
18360 (entry (% (heading (var "length")))
18361 (para "Returns the number of characters actually
18362 \t\t written by OpenGL in the string indicated by "
18364 " (excluding the null
18365 \t\t terminator) if a value other than "
18368 (entry (% (heading (var "size")))
18369 (para "Returns the size of the attribute
18371 (entry (% (heading (var "type")))
18372 (para "Returns the data type of the attribute
18374 (entry (% (heading (var "name")))
18375 (para "Returns a null terminated string containing
18376 \t\t the name of the attribute variable.")))
18377 (heading "Description")
18378 (para (code "glGetActiveAttrib")
18379 " returns information
18380 \tabout an active attribute variable in the program object
18384 \tactive attributes can be obtained by calling\t"
18385 (code "glGetProgram")
18388 (code "GL_ACTIVE_ATTRIBUTES")
18392 " selects the first
18393 \tactive attribute variable. Permissible values for\t"
18395 " range from 0 to the number of
18396 \tactive attribute variables minus 1.")
18397 (para "A vertex shader may use either built-in attribute
18398 \tvariables, user-defined attribute variables, or both. Built-in
18399 \tattribute variables have a prefix of \"gl_\" and
18400 \treference conventional OpenGL vertex attribtes (e.g.,\t"
18404 ", etc., see the OpenGL Shading
18405 \tLanguage specification for a complete list.) User-defined
18406 \tattribute variables have arbitrary names and obtain their values
18407 \tthrough numbered generic vertex attributes. An attribute
18408 \tvariable (either built-in or user-defined) is considered active
18409 \tif it is determined during the link operation that it may be
18410 \taccessed during program execution. Therefore,\t"
18412 " should have previously been the
18413 \ttarget of a call to\t"
18414 (code "glLinkProgram")
18416 \tbut it is not necessary for it to have been linked
18418 (para "The size of the character buffer required to store the
18419 \tlongest attribute variable name in\t"
18421 " can be obtained by calling\t"
18422 (code "glGetProgram")
18425 (code "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH")
18427 \tshould be used to allocate a buffer of sufficient size to store
18428 \tthe returned attribute name. The size of this character buffer
18431 ", and a pointer to
18432 \tthis character buffer is passed in\t"
18435 (para (code "glGetActiveAttrib")
18436 " returns the name of
18437 \tthe attribute variable indicated by\t"
18439 ", storing it in the character buffer
18442 ". The string returned
18443 \twill be null terminated. The actual number of characters written
18444 \tinto this buffer is returned in "
18447 \tand this count does not include the null termination character.
18448 \tIf the length of the returned string is not required, a value of\t"
18450 " can be passed in the\t"
18455 " argument will return a
18456 \tpointer to the attribute variable's data type. The symbolic
18460 (code "GL_FLOAT_VEC2")
18462 (code "GL_FLOAT_VEC3")
18464 (code "GL_FLOAT_VEC4")
18466 (code "GL_FLOAT_MAT2")
18468 (code "GL_FLOAT_MAT3")
18470 (code "GL_FLOAT_MAT4")
18472 (code "GL_FLOAT_MAT2x3")
18474 (code "GL_FLOAT_MAT2x4")
18476 (code "GL_FLOAT_MAT3x2")
18478 (code "GL_FLOAT_MAT3x4")
18480 (code "GL_FLOAT_MAT4x2")
18482 (code "GL_FLOAT_MAT4x3")
18483 " may be returned. The\t"
18485 " argument will return the size of the
18486 \tattribute, in units of the type returned in\t"
18489 (para "The list of active attribute variables may include both
18490 \tbuilt-in attribute variables (which begin with the prefix
18491 \t\"gl_\") as well as user-defined attribute variable
18493 (para "This function will return as much information as it can
18494 \tabout the specified active attribute variable. If no information
18497 " will be 0, and\t"
18499 " will be an empty string. This
18500 \tsituation could occur if this function is called after a link
18501 \toperation that failed. If an error occurs, the return values\t"
18510 will be unmodified.")
18512 (para (code "GL_INVALID_VALUE")
18513 " is generated if\t"
18515 " is not a value generated by
18517 (para (code "GL_INVALID_OPERATION")
18518 " is generated if\t"
18520 " is not a program object.")
18521 (para (code "GL_INVALID_VALUE")
18522 " is generated if\t"
18524 " is greater than or equal to the
18525 \tnumber of active attribute variables in\t"
18528 (para (code "GL_INVALID_OPERATION")
18529 " is generated if\t"
18530 (code "glGetActiveAttrib")
18531 " is executed between the
18535 and the corresponding execution of\t"
18538 (para (code "GL_INVALID_VALUE")
18539 " is generated if\t"
18541 " is less than 0.")))
18543 (define-gl-procedure
18545 "glGetActiveUniform"
18548 (funcdef "void " (function "glGetActiveUniform"))
18549 (paramdef "GLuint " (parameter "program"))
18550 (paramdef "GLuint " (parameter "index"))
18551 (paramdef "GLsizei " (parameter "bufSize"))
18552 (paramdef "GLsizei *" (parameter "length"))
18553 (paramdef "GLint *" (parameter "size"))
18554 (paramdef "GLenum *" (parameter "type"))
18555 (paramdef "GLchar *" (parameter "name"))))
18558 "Returns information about an active uniform variable for the specified program object")
18559 (heading "Parameters")
18560 (table (% (formatter (asis)))
18561 (entry (% (heading (var "program")))
18562 (para "Specifies the program object to be
18564 (entry (% (heading (var "index")))
18565 (para "Specifies the index of the uniform variable to
18566 \t\t be queried."))
18567 (entry (% (heading (var "bufSize")))
18568 (para "Specifies the maximum number of characters
18569 \t\t OpenGL is allowed to write in the character buffer
18570 \t\t indicated by "
18573 (entry (% (heading (var "length")))
18574 (para "Returns the number of characters actually
18575 \t\t written by OpenGL in the string indicated by "
18577 " (excluding the null
18578 \t\t terminator) if a value other than "
18581 (entry (% (heading (var "size")))
18582 (para "Returns the size of the uniform
18584 (entry (% (heading (var "type")))
18585 (para "Returns the data type of the uniform
18587 (entry (% (heading (var "name")))
18588 (para "Returns a null terminated string containing
18589 \t\t the name of the uniform variable.")))
18590 (heading "Description")
18591 (para (code "glGetActiveUniform")
18593 \tinformation about an active uniform variable in the program
18594 \tobject specified by "
18597 \tof active uniform variables can be obtained by calling\t"
18598 (code "glGetProgram")
18601 (code "GL_ACTIVE_UNIFORMS")
18605 " selects the first active
18606 \tuniform variable. Permissible values for\t"
18608 " range from 0 to the number of
18609 \tactive uniform variables minus 1.")
18610 (para "Shaders may use either built-in uniform variables,
18611 \tuser-defined uniform variables, or both. Built-in uniform
18612 \tvariables have a prefix of \"gl_\" and reference
18613 \texisting OpenGL state or values derived from such state (e.g.,\t"
18616 (var "gl_ModelViewMatrix")
18617 ", etc., see the OpenGL
18618 \tShading Language specification for a complete list.)
18619 \tUser-defined uniform variables have arbitrary names and obtain
18620 \ttheir values from the application through calls to\t"
18623 \tA uniform variable (either built-in or user-defined) is
18624 \tconsidered active if it is determined during the link operation
18625 \tthat it may be accessed during program execution. Therefore,\t"
18627 " should have previously been the
18628 \ttarget of a call to\t"
18629 (code "glLinkProgram")
18631 \tbut it is not necessary for it to have been linked
18633 (para "The size of the character buffer required to store the
18634 \tlongest uniform variable name in "
18637 can be obtained by calling\t"
18638 (code "glGetProgram")
18641 (code "GL_ACTIVE_UNIFORM_MAX_LENGTH")
18643 \tshould be used to allocate a buffer of sufficient size to store
18644 \tthe returned uniform variable name. The size of this character
18645 \tbuffer is passed in "
18648 \tpointer to this character buffer is passed in\t"
18650 (para (code "glGetActiveUniform")
18652 \tof the uniform variable indicated by\t"
18654 ", storing it in the character buffer
18657 ". The string returned
18658 \twill be null terminated. The actual number of characters written
18659 \tinto this buffer is returned in "
18662 \tand this count does not include the null termination character.
18663 \tIf the length of the returned string is not required, a value of\t"
18665 " can be passed in the\t"
18671 argument will return a pointer to the uniform variable's data
18672 \ttype. The symbolic constants\t"
18675 (code "GL_FLOAT_VEC2")
18677 (code "GL_FLOAT_VEC3")
18679 (code "GL_FLOAT_VEC4")
18683 (code "GL_INT_VEC2")
18685 (code "GL_INT_VEC3")
18687 (code "GL_INT_VEC4")
18691 (code "GL_BOOL_VEC2")
18693 (code "GL_BOOL_VEC3")
18695 (code "GL_BOOL_VEC4")
18697 (code "GL_FLOAT_MAT2")
18699 (code "GL_FLOAT_MAT3")
18701 (code "GL_FLOAT_MAT4")
18703 (code "GL_FLOAT_MAT2x3")
18705 (code "GL_FLOAT_MAT2x4")
18707 (code "GL_FLOAT_MAT3x2")
18709 (code "GL_FLOAT_MAT3x4")
18711 (code "GL_FLOAT_MAT4x2")
18713 (code "GL_FLOAT_MAT4x3")
18715 (code "GL_SAMPLER_1D")
18717 (code "GL_SAMPLER_2D")
18719 (code "GL_SAMPLER_3D")
18721 (code "GL_SAMPLER_CUBE")
18723 (code "GL_SAMPLER_1D_SHADOW")
18725 (code "GL_SAMPLER_2D_SHADOW")
18728 (para "If one or more elements of an array are active, the name
18729 \tof the array is returned in "
18732 \ttype is returned in "
18736 " parameter returns the highest array
18737 \telement index used, plus one, as determined by the compiler
18738 \tand/or linker. Only one active uniform variable will be reported
18739 \tfor a uniform array.")
18740 (para "Uniform variables that are declared as structures or
18741 \tarrays of structures will not be returned directly by this
18742 \tfunction. Instead, each of these uniform variables will be
18743 \treduced to its fundamental components containing the
18744 \t\".\" and \"[]\" operators such that each of the
18745 \tnames is valid as an argument to\t"
18746 (code "glGetUniformLocation")
18748 \tEach of these reduced uniform variables is counted as one active
18749 \tuniform variable and is assigned an index. A valid name cannot
18750 \tbe a structure, an array of structures, or a subcomponent of a
18751 \tvector or matrix.")
18752 (para "The size of the uniform variable will be returned in\t"
18754 ". Uniform variables other than arrays
18755 \twill have a size of 1. Structures and arrays of structures will
18756 \tbe reduced as described earlier, such that each of the names
18757 \treturned will be a data type in the earlier list. If this
18758 \treduction results in an array, the size returned will be as
18759 \tdescribed for uniform arrays; otherwise, the size returned will
18761 (para "The list of active uniform variables may include both
18762 \tbuilt-in uniform variables (which begin with the prefix
18763 \t\"gl_\") as well as user-defined uniform variable
18765 (para "This function will return as much information as it can
18766 \tabout the specified active uniform variable. If no information
18769 " will be 0, and\t"
18771 " will be an empty string. This
18772 \tsituation could occur if this function is called after a link
18773 \toperation that failed. If an error occurs, the return values\t"
18782 will be unmodified.")
18784 (para (code "GL_INVALID_VALUE")
18785 " is generated if\t"
18787 " is not a value generated by
18789 (para (code "GL_INVALID_OPERATION")
18790 " is generated if\t"
18792 " is not a program object.")
18793 (para (code "GL_INVALID_VALUE")
18794 " is generated if\t"
18796 " is greater than or equal to the
18797 \tnumber of active uniform variables in\t"
18800 (para (code "GL_INVALID_OPERATION")
18801 " is generated if\t"
18802 (code "glGetActiveUniform")
18803 " is executed between the
18807 and the corresponding execution of\t"
18810 (para (code "GL_INVALID_VALUE")
18811 " is generated if\t"
18813 " is less than 0.")))
18815 (define-gl-procedure
18816 glGetAttachedShaders
18817 "glGetAttachedShaders"
18822 (function "glGetAttachedShaders"))
18823 (paramdef "GLuint " (parameter "program"))
18824 (paramdef "GLsizei " (parameter "maxCount"))
18825 (paramdef "GLsizei *" (parameter "count"))
18826 (paramdef "GLuint *" (parameter "shaders"))))
18829 "Returns the handles of the shader objects attached to a program object")
18830 (heading "Parameters")
18831 (table (% (formatter (asis)))
18832 (entry (% (heading (var "program")))
18833 (para "Specifies the program object to be
18835 (entry (% (heading (var "maxCount")))
18836 (para "Specifies the size of the array for storing
18837 \t\t the returned object names."))
18838 (entry (% (heading (var "count")))
18839 (para "Returns the number of names actually returned
18843 (entry (% (heading (var "shaders")))
18844 (para "Specifies an array that is used to return the
18845 \t\t names of attached shader objects.")))
18846 (heading "Description")
18847 (para (code "glGetAttachedShaders")
18849 \tnames of the shader objects attached to\t"
18851 ". The names of shader objects that
18852 \tare attached to "
18857 " The actual number of shader
18858 \tnames written into "
18860 " is returned in\t"
18862 " If no shader objects are attached
18868 is set to 0. The maximum number of shader names that may be
18871 " is specified by\t"
18874 (para "If the number of names actually returned is not required
18875 \t(for instance, if it has just been obtained by calling\t"
18876 (code "glGetProgram")
18880 " may be passed for count. If
18881 \tno shader objects are attached to\t"
18883 ", a value of 0 will be returned in\t"
18885 ". The actual number of attached
18886 \tshaders can be obtained by calling\t"
18887 (code "glGetProgram")
18890 (code "GL_ATTACHED_SHADERS")
18893 (para (code "GL_INVALID_VALUE")
18894 " is generated if\t"
18896 " is not a value generated by
18898 (para (code "GL_INVALID_OPERATION")
18899 " is generated if\t"
18901 " is not a program object.")
18902 (para (code "GL_INVALID_VALUE")
18903 " is generated if\t"
18905 " is less than 0.")
18906 (para (code "GL_INVALID_OPERATION")
18907 " is generated if\t"
18908 (code "glGetAttachedShaders")
18910 is executed between the execution of\t"
18913 and the corresponding execution of\t"
18917 (define-gl-procedure
18918 glGetAttribLocation
18919 "glGetAttribLocation"
18924 (function "glGetAttribLocation"))
18925 (paramdef "GLuint " (parameter "program"))
18926 (paramdef "const GLchar *" (parameter "name"))))
18929 "Returns the location of an attribute variable")
18930 (heading "Parameters")
18931 (table (% (formatter (asis)))
18932 (entry (% (heading (var "program")))
18933 (para "Specifies the program object to be
18935 (entry (% (heading (var "name")))
18936 (para "Points to a null terminated string containing
18937 \t\t the name of the attribute variable whose location is
18938 \t\t to be queried.")))
18939 (heading "Description")
18940 (para (code "glGetAttribLocation")
18942 \tpreviously linked program object specified by\t"
18944 " for the attribute variable
18947 " and returns the index
18948 \tof the generic vertex attribute that is bound to that attribute
18951 " is a matrix attribute
18952 \tvariable, the index of the first column of the matrix is
18953 \treturned. If the named attribute variable is not an active
18954 \tattribute in the specified program object or if\t"
18956 " starts with the reserved prefix
18957 \t\"gl_\", a value of -1 is returned.")
18958 (para "The association between an attribute variable name and a
18959 \tgeneric attribute index can be specified at any time by calling\t"
18960 (code "glBindAttribLocation")
18962 \tAttribute bindings do not go into effect until\t"
18963 (code "glLinkProgram")
18965 is called. After a program object has been linked successfully,
18966 \tthe index values for attribute variables remain fixed until the
18967 \tnext link command occurs. The attribute values can only be
18968 \tqueried after a link if the link was successful.\t"
18969 (code "glGetAttribLocation")
18970 " returns the binding
18971 \tthat actually went into effect the last time\t"
18972 (code "glLinkProgram")
18974 was called for the specified program object. Attribute bindings
18975 \tthat have been specified since the last link operation are not
18977 (code "glGetAttribLocation")
18980 (para (code "GL_INVALID_OPERATION")
18981 " is generated if\t"
18983 " is not a value generated by
18985 (para (code "GL_INVALID_OPERATION")
18986 " is generated if\t"
18988 " is not a program object.")
18989 (para (code "GL_INVALID_OPERATION")
18990 " is generated if\t"
18992 " has not been successfully
18994 (para (code "GL_INVALID_OPERATION")
18995 " is generated if\t"
18996 (code "glGetAttribLocation")
18997 " is executed between the
19001 and the corresponding execution of\t"
19005 (define-gl-procedure
19006 glGetBufferParameteriv
19007 "glGetBufferParameteriv"
19012 (function "glGetBufferParameteriv"))
19013 (paramdef "GLenum " (parameter "target"))
19014 (paramdef "GLenum " (parameter "value"))
19015 (paramdef "GLint * " (parameter "data"))))
19017 (heading "return parameters of a buffer object")
19018 (heading "Parameters")
19019 (table (% (formatter (asis)))
19020 (entry (% (heading (var "target")))
19022 Specifies the target buffer object.
19023 The symbolic constant must be "
19024 (code "GL_ARRAY_BUFFER")
19026 (code "GL_ELEMENT_ARRAY_BUFFER")
19028 (code "GL_PIXEL_PACK_BUFFER")
19030 (code "GL_PIXEL_UNPACK_BUFFER")
19032 (entry (% (heading (var "value")))
19034 Specifies the symbolic name of a buffer object parameter.
19035 Accepted values are "
19036 (code "GL_BUFFER_ACCESS")
19038 (code "GL_BUFFER_MAPPED")
19040 (code "GL_BUFFER_SIZE")
19042 (code "GL_BUFFER_USAGE")
19044 (entry (% (heading (var "data")))
19046 Returns the requested parameter. ")))
19047 (heading "Description")
19048 (para (code "glGetBufferParameteriv")
19051 " a selected parameter of the buffer object
19055 (para (var "value")
19056 " names a specific buffer object parameter, as follows: ")
19057 (table (% (formatter (asis)))
19058 (entry (% (heading (code "GL_BUFFER_ACCESS")))
19059 (para (var "params")
19060 " returns the access policy set while mapping the buffer object.
19061 The initial value is "
19062 (code "GL_READ_WRITE")
19064 (entry (% (heading (code "GL_BUFFER_MAPPED")))
19065 (para (var "params")
19066 " returns a flag indicating whether the buffer object is currently
19067 mapped. The initial value is "
19070 (entry (% (heading (code "GL_BUFFER_SIZE")))
19071 (para (var "params")
19072 " returns the size of the buffer object, measured in bytes.
19073 The initial value is 0. "))
19074 (entry (% (heading (code "GL_BUFFER_USAGE")))
19075 (para (var "params")
19076 " returns the buffer object's usage pattern. The initial value is "
19077 (code "GL_STATIC_DRAW")
19080 (para (code "GL_INVALID_ENUM")
19081 " is generated if "
19087 (para (code "GL_INVALID_OPERATION")
19088 " is generated if the reserved buffer object name 0 is bound to "
19091 (para (code "GL_INVALID_OPERATION")
19092 " is generated if "
19093 (code "glGetBufferParameteriv")
19095 is executed between the execution of "
19098 and the corresponding execution of "
19102 (define-gl-procedure
19103 glGetBufferPointerv
19104 "glGetBufferPointerv"
19109 (function "glGetBufferPointerv"))
19110 (paramdef "GLenum " (parameter "target"))
19111 (paramdef "GLenum " (parameter "pname"))
19112 (paramdef "GLvoid ** " (parameter "params"))))
19115 "return the pointer to a mapped buffer object's data store")
19116 (heading "Parameters")
19117 (table (% (formatter (asis)))
19118 (entry (% (heading (var "target")))
19120 Specifies the target buffer object.
19121 The symbolic constant must be "
19122 (code "GL_ARRAY_BUFFER")
19124 (code "GL_ELEMENT_ARRAY_BUFFER")
19126 (code "GL_PIXEL_PACK_BUFFER")
19128 (code "GL_PIXEL_UNPACK_BUFFER")
19130 (entry (% (heading (var "pname")))
19132 Specifies the pointer to be returned. The symbolic constant must be "
19133 (code "GL_BUFFER_MAP_POINTER")
19135 (entry (% (heading (var "params")))
19137 Returns the pointer value specified by "
19140 (heading "Description")
19141 (para (code "glGetBufferPointerv")
19142 " returns pointer information. "
19144 " is a symbolic constant
19145 indicating the pointer to be returned, which must be "
19146 (code "GL_BUFFER_MAP_POINTER")
19148 to which the buffer object's data store is mapped. If the data store is not currently mapped, "
19152 " is a pointer to a location in which to place the returned pointer value. ")
19154 (para (code "GL_INVALID_ENUM")
19155 " is generated if "
19161 (para (code "GL_INVALID_OPERATION")
19162 " is generated if the reserved buffer object name 0 is bound to "
19165 (para (code "GL_INVALID_OPERATION")
19166 " is generated if "
19167 (code "glGetBufferPointerv")
19169 is executed between the execution of "
19172 and the corresponding execution of "
19176 (define-gl-procedure
19178 "glGetBufferSubData"
19181 (funcdef "void " (function "glGetBufferSubData"))
19182 (paramdef "GLenum " (parameter "target"))
19183 (paramdef "GLintptr " (parameter "offset"))
19184 (paramdef "GLsizeiptr " (parameter "size"))
19185 (paramdef "GLvoid * " (parameter "data"))))
19188 "returns a subset of a buffer object's data store")
19189 (heading "Parameters")
19190 (table (% (formatter (asis)))
19191 (entry (% (heading (var "target")))
19193 Specifies the target buffer object.
19194 The symbolic constant must be "
19195 (code "GL_ARRAY_BUFFER")
19197 (code "GL_ELEMENT_ARRAY_BUFFER")
19199 (code "GL_PIXEL_PACK_BUFFER")
19201 (code "GL_PIXEL_UNPACK_BUFFER")
19203 (entry (% (heading (var "offset")))
19205 Specifies the offset into the buffer object's data store from which data will be returned,
19206 measured in bytes. "))
19207 (entry (% (heading (var "size")))
19209 Specifies the size in bytes of the data store region being returned. "))
19210 (entry (% (heading (var "data")))
19212 Specifies a pointer to the location where buffer object data is returned. ")))
19213 (heading "Description")
19214 (para (code "glGetBufferSubData")
19215 " returns some or all of the data from the buffer object currently
19218 ". Data starting at byte offset "
19223 " bytes is copied from the data store to the memory pointed to by "
19225 ". An error is thrown if the buffer object is currently mapped, or if "
19229 " together define a range beyond the bounds
19230 of the buffer object's data store. ")
19232 (para (code "GL_INVALID_ENUM")
19233 " is generated if "
19236 (code "GL_ARRAY_BUFFER")
19238 (code "GL_ELEMENT_ARRAY_BUFFER")
19240 (code "GL_PIXEL_PACK_BUFFER")
19242 (code "GL_PIXEL_UNPACK_BUFFER")
19244 (para (code "GL_INVALID_VALUE")
19245 " is generated if "
19249 " is negative, or if together they define a region of memory
19250 that extends beyond the buffer object's allocated data store. ")
19251 (para (code "GL_INVALID_OPERATION")
19252 " is generated if the reserved buffer object name 0 is bound to "
19255 (para (code "GL_INVALID_OPERATION")
19256 " is generated if the buffer object being queried is mapped. ")
19257 (para (code "GL_INVALID_OPERATION")
19258 " is generated if "
19259 (code "glGetBufferSubData")
19261 is executed between the execution of "
19263 " and the corresponding execution of "
19267 (define-gl-procedure
19272 (funcdef "void " (function "glGetClipPlane"))
19273 (paramdef "GLenum " (parameter "plane"))
19274 (paramdef "GLdouble * " (parameter "equation"))))
19277 "return the coefficients of the specified clipping plane")
19278 (heading "Parameters")
19279 (table (% (formatter (asis)))
19280 (entry (% (heading (var "plane")))
19282 Specifies a clipping plane.
19283 The number of clipping planes depends on the implementation,
19284 but at least six clipping planes are supported.
19285 They are identified by symbolic names of the form "
19286 (code "GL_CLIP_PLANE")
19289 where i ranges from 0 to the value of "
19290 (code "GL_MAX_CLIP_PLANES")
19292 (entry (% (heading (var "equation")))
19294 Returns four double-precision values that are the coefficients of the plane equation of "
19296 " in eye coordinates.
19297 The initial value is (0, 0, 0, 0). ")))
19298 (heading "Description")
19299 (para (code "glGetClipPlane")
19302 " the four coefficients of the plane equation
19307 (para (code "GL_INVALID_ENUM")
19308 " is generated if "
19310 " is not an accepted value. ")
19311 (para (code "GL_INVALID_OPERATION")
19312 " is generated if "
19313 (code "glGetClipPlane")
19315 is executed between the execution of "
19318 and the corresponding execution of "
19322 (define-gl-procedure
19323 glGetColorTableParameter
19324 "glGetColorTableParameter"
19329 (function "glGetColorTableParameterfv"))
19330 (paramdef "GLenum " (parameter "target"))
19331 (paramdef "GLenum " (parameter "pname"))
19332 (paramdef "GLfloat * " (parameter "params"))))
19334 (heading "get color lookup table parameters")
19335 (heading "Parameters")
19336 (table (% (formatter (asis)))
19337 (entry (% (heading (var "target")))
19339 The target color table.
19341 (code "GL_COLOR_TABLE")
19343 (code "GL_POST_CONVOLUTION_COLOR_TABLE")
19345 (code "GL_POST_COLOR_MATRIX_COLOR_TABLE")
19347 (code "GL_PROXY_COLOR_TABLE")
19349 (code "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE")
19351 (code "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE")
19353 (entry (% (heading (var "pname")))
19355 The symbolic name of a color lookup table parameter.
19357 (code "GL_COLOR_TABLE_BIAS")
19359 (code "GL_COLOR_TABLE_SCALE")
19361 (code "GL_COLOR_TABLE_FORMAT")
19363 (code "GL_COLOR_TABLE_WIDTH")
19365 (code "GL_COLOR_TABLE_RED_SIZE")
19367 (code "GL_COLOR_TABLE_GREEN_SIZE")
19369 (code "GL_COLOR_TABLE_BLUE_SIZE")
19371 (code "GL_COLOR_TABLE_ALPHA_SIZE")
19373 (code "GL_COLOR_TABLE_LUMINANCE_SIZE")
19375 (code "GL_COLOR_TABLE_INTENSITY_SIZE")
19377 (entry (% (heading (var "params")))
19379 A pointer to an array where the values of the parameter will be stored. ")))
19380 (heading "Description")
19382 Returns parameters specific to color table "
19389 (code "GL_COLOR_TABLE_SCALE")
19391 (code "GL_COLOR_TABLE_BIAS")
19393 (code "glGetColorTableParameter")
19394 " returns the color
19395 table scale or bias parameters for the table specified by "
19398 For these queries, "
19401 (code "GL_COLOR_TABLE")
19403 (code "GL_POST_CONVOLUTION_COLOR_TABLE")
19406 (code "GL_POST_COLOR_MATRIX_COLOR_TABLE")
19409 " points to an array of four elements, which receive
19410 the scale or bias factors for red, green, blue, and alpha, in that order. ")
19411 (para (code "glGetColorTableParameter")
19412 " can also be used to retrieve the format and size parameters
19413 for a color table. For these queries, set "
19416 color table target or the proxy color table target.
19417 The format and size parameters are set by "
19418 (code "glColorTable")
19421 The following table lists the format and size parameters that may
19423 For each symbolic constant listed below for "
19427 " must point to an array of the
19428 given length and receive the values indicated. ")
19430 (table (% (formatter (asis)))
19431 (entry (% (heading (strong "Parameter")))
19432 (para (strong "N") ", " (strong "Meaning")))
19433 (entry (% (heading (code "GL_COLOR_TABLE_FORMAT")))
19438 Internal format (e.g., "
19441 (entry (% (heading (code "GL_COLOR_TABLE_WIDTH")))
19444 Number of elements in table "))
19445 (entry (% (heading (code "GL_COLOR_TABLE_RED_SIZE")))
19450 Size of red component, in bits "))
19451 (entry (% (heading (code "GL_COLOR_TABLE_GREEN_SIZE")))
19454 Size of green component "))
19455 (entry (% (heading (code "GL_COLOR_TABLE_BLUE_SIZE")))
19458 Size of blue component "))
19459 (entry (% (heading (code "GL_COLOR_TABLE_ALPHA_SIZE")))
19462 Size of alpha component "))
19463 (entry (% (heading (code "GL_COLOR_TABLE_LUMINANCE_SIZE")))
19466 Size of luminance component "))
19467 (entry (% (heading (code "GL_COLOR_TABLE_INTENSITY_SIZE")))
19470 Size of intensity component ")))
19473 (para (code "GL_INVALID_ENUM")
19474 " is generated if "
19479 an acceptable value. ")
19480 (para (code "GL_INVALID_OPERATION")
19481 " is generated if "
19482 (code "glGetColorTableParameter")
19484 between the execution of "
19486 " and the corresponding
19491 (define-gl-procedure
19496 (funcdef "void " (function "glGetColorTable"))
19497 (paramdef "GLenum " (parameter "target"))
19498 (paramdef "GLenum " (parameter "format"))
19499 (paramdef "GLenum " (parameter "type"))
19500 (paramdef "GLvoid * " (parameter "table"))))
19503 "retrieve contents of a color lookup table")
19504 (heading "Parameters")
19505 (table (% (formatter (asis)))
19506 (entry (% (heading (var "target")))
19509 (code "GL_COLOR_TABLE")
19511 (code "GL_POST_CONVOLUTION_COLOR_TABLE")
19514 (code "GL_POST_COLOR_MATRIX_COLOR_TABLE")
19516 (entry (% (heading (var "format")))
19518 The format of the pixel data in "
19521 The possible values are "
19530 (code "GL_LUMINANCE")
19532 (code "GL_LUMINANCE_ALPHA")
19542 (entry (% (heading (var "type")))
19544 The type of the pixel data in "
19547 Symbolic constants "
19548 (code "GL_UNSIGNED_BYTE")
19554 (code "GL_UNSIGNED_SHORT")
19558 (code "GL_UNSIGNED_INT")
19564 (code "GL_UNSIGNED_BYTE_3_3_2")
19566 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
19568 (code "GL_UNSIGNED_SHORT_5_6_5")
19570 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
19572 (code "GL_UNSIGNED_SHORT_4_4_4_4")
19574 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
19576 (code "GL_UNSIGNED_SHORT_5_5_5_1")
19578 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
19580 (code "GL_UNSIGNED_INT_8_8_8_8")
19582 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
19584 (code "GL_UNSIGNED_INT_10_10_10_2")
19586 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
19589 (entry (% (heading (var "table")))
19591 Pointer to a one-dimensional array of pixel data containing the contents
19592 of the color table. ")))
19593 (heading "Description")
19594 (para (code "glGetColorTable")
19597 " the contents of the color table specified
19600 ". No pixel transfer operations are performed, but pixel
19601 storage modes that are applicable to "
19602 (code "glReadPixels")
19603 " are performed. ")
19605 If a non-zero named buffer object is bound to the "
19606 (code "GL_PIXEL_PACK_BUFFER")
19609 (code "glBindBuffer")
19610 ") while a histogram table is
19613 " is treated as a byte offset into the buffer object's data store. ")
19615 Color components that are requested in
19618 ", but which are not included in the internal
19619 format of the color lookup table, are returned as zero. The
19620 assignments of internal color components to the components
19624 (table (% (formatter (asis)))
19625 (entry (% (heading (strong "Internal Component")))
19626 (para (strong "Resulting Component")))
19627 (entry (% (heading "
19630 (entry (% (heading "
19633 (entry (% (heading "
19636 (entry (% (heading "
19639 (entry (% (heading "
19643 (entry (% (heading "
19649 (para (code "GL_INVALID_ENUM")
19650 " is generated if "
19652 " is not one of the allowable
19654 (para (code "GL_INVALID_ENUM")
19655 " is generated if "
19657 " is not one of the allowable
19659 (para (code "GL_INVALID_ENUM")
19660 " is generated if "
19662 " is not one of the allowable
19664 (para (code "GL_INVALID_OPERATION")
19665 " is generated if "
19668 (code "GL_UNSIGNED_BYTE_3_3_2")
19670 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
19672 (code "GL_UNSIGNED_SHORT_5_6_5")
19674 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
19681 (para (code "GL_INVALID_OPERATION")
19682 " is generated if "
19685 (code "GL_UNSIGNED_SHORT_4_4_4_4")
19687 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
19689 (code "GL_UNSIGNED_SHORT_5_5_5_1")
19691 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
19693 (code "GL_UNSIGNED_INT_8_8_8_8")
19695 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
19697 (code "GL_UNSIGNED_INT_10_10_10_2")
19699 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
19708 (para (code "GL_INVALID_OPERATION")
19709 " is generated if a non-zero buffer object name is bound to the "
19710 (code "GL_PIXEL_PACK_BUFFER")
19711 " target and the buffer object's data store is currently mapped. ")
19712 (para (code "GL_INVALID_OPERATION")
19713 " is generated if a non-zero buffer object name is bound to the "
19714 (code "GL_PIXEL_PACK_BUFFER")
19715 " target and the data would be packed to the buffer
19716 object such that the memory writes required would exceed the data store size. ")
19717 (para (code "GL_INVALID_OPERATION")
19718 " is generated if a non-zero buffer object name is bound to the "
19719 (code "GL_PIXEL_PACK_BUFFER")
19722 " is not evenly divisible
19723 into the number of bytes needed to store in memory a datum indicated by "
19726 (para (code "GL_INVALID_OPERATION")
19727 " is generated if "
19728 (code "glGetColorTable")
19730 between the execution of "
19732 " and the corresponding
19737 (define-gl-procedure
19738 glGetCompressedTexImage
19739 "glGetCompressedTexImage"
19744 (function "glGetCompressedTexImage"))
19745 (paramdef "GLenum " (parameter "target"))
19746 (paramdef "GLint " (parameter "lod"))
19747 (paramdef "GLvoid * " (parameter "img"))))
19749 (heading "return a compressed texture image")
19750 (heading "Parameters")
19751 (table (% (formatter (asis)))
19752 (entry (% (heading (var "target")))
19754 Specifies which texture is to be obtained. "
19755 (code "GL_TEXTURE_1D")
19757 (code "GL_TEXTURE_2D")
19759 (code "GL_TEXTURE_3D")
19760 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_X")
19762 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_X")
19764 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Y")
19766 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y")
19768 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Z")
19770 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z")
19773 (entry (% (heading (var "lod")))
19775 Specifies the level-of-detail number of the desired image.
19776 Level 0 is the base image level.
19783 mipmap reduction image. "))
19784 (entry (% (heading (var "img")))
19786 Returns the compressed texture image. ")))
19787 (heading "Description")
19788 (para (code "glGetCompressedTexImage")
19789 " returns the compressed texture image associated with "
19798 " should be an array of "
19799 (code "GL_TEXTURE_COMPRESSED_IMAGE_SIZE")
19802 " specifies whether the desired texture image was one specified by "
19803 (code "glTexImage1D")
19805 (code "GL_TEXTURE_1D")
19807 (code "glTexImage2D")
19809 (code "GL_TEXTURE_2D")
19811 (code "GL_TEXTURE_CUBE_MAP_*")
19813 (code "glTexImage3D")
19815 (code "GL_TEXTURE_3D")
19818 " specifies the level-of-detail number of the desired image. ")
19820 If a non-zero named buffer object is bound to the "
19821 (code "GL_PIXEL_PACK_BUFFER")
19824 (code "glBindBuffer")
19825 ") while a texture image is
19828 " is treated as a byte offset into the buffer object's data store. ")
19830 To minimize errors, first verify that the texture is compressed by calling "
19831 (code "glGetTexLevelParameter")
19833 (code "GL_TEXTURE_COMPRESSED")
19835 the texture is compressed, then determine the amount of memory required to
19836 store the compressed texture by calling "
19837 (code "glGetTexLevelParameter")
19840 (code "GL_TEXTURE_COMPRESSED_IMAGE_SIZE")
19841 ". Finally, retrieve the
19842 internal format of the texture by calling "
19843 (code "glGetTexLevelParameter")
19846 (code "GL_TEXTURE_INTERNAL_FORMAT")
19848 To store the texture for later use, associate the internal format and size
19849 with the retrieved texture image. These data can be used by the respective
19850 texture or subtexture loading routine used for loading "
19854 (para (code "GL_INVALID_VALUE")
19855 " is generated if "
19857 " is less than zero or greater
19858 than the maximum number of LODs permitted by the implementation. ")
19859 (para (code "GL_INVALID_OPERATION")
19860 " is generated if "
19861 (code "glGetCompressedTexImage")
19862 " is used to retrieve a
19863 texture that is in an uncompressed internal format. ")
19864 (para (code "GL_INVALID_OPERATION")
19865 " is generated if a non-zero buffer object name is bound to the "
19866 (code "GL_PIXEL_PACK_BUFFER")
19867 " target and the buffer object's data store is currently mapped. ")
19868 (para (code "GL_INVALID_OPERATION")
19869 " is generated if a non-zero buffer object name is bound to the "
19870 (code "GL_PIXEL_PACK_BUFFER")
19871 " target and the data would be packed to the buffer
19872 object such that the memory writes required would exceed the data store size. ")
19873 (para (code "GL_INVALID_OPERATION")
19874 " is generated if "
19875 (code "glGetCompressedTexImage")
19877 is executed between the execution of "
19880 and the corresponding execution of "
19884 (define-gl-procedure
19885 glGetConvolutionFilter
19886 "glGetConvolutionFilter"
19891 (function "glGetConvolutionFilter"))
19892 (paramdef "GLenum " (parameter "target"))
19893 (paramdef "GLenum " (parameter "format"))
19894 (paramdef "GLenum " (parameter "type"))
19895 (paramdef "GLvoid * " (parameter "image"))))
19898 "get current 1D or 2D convolution filter kernel")
19899 (heading "Parameters")
19900 (table (% (formatter (asis)))
19901 (entry (% (heading (var "target")))
19903 The filter to be retrieved.
19905 (code "GL_CONVOLUTION_1D")
19907 (code "GL_CONVOLUTION_2D")
19909 (entry (% (heading (var "format")))
19911 Format of the output image.
19929 (code "GL_LUMINANCE")
19931 (code "GL_LUMINANCE_ALPHA")
19933 (entry (% (heading (var "type")))
19935 Data type of components in the output image.
19936 Symbolic constants "
19937 (code "GL_UNSIGNED_BYTE")
19943 (code "GL_UNSIGNED_SHORT")
19947 (code "GL_UNSIGNED_INT")
19953 (code "GL_UNSIGNED_BYTE_3_3_2")
19955 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
19957 (code "GL_UNSIGNED_SHORT_5_6_5")
19959 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
19961 (code "GL_UNSIGNED_SHORT_4_4_4_4")
19963 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
19965 (code "GL_UNSIGNED_SHORT_5_5_5_1")
19967 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
19969 (code "GL_UNSIGNED_INT_8_8_8_8")
19971 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
19973 (code "GL_UNSIGNED_INT_10_10_10_2")
19975 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
19978 (entry (% (heading (var "image")))
19980 Pointer to storage for the output image. ")))
19981 (heading "Description")
19982 (para (code "glGetConvolutionFilter")
19983 " returns the current 1D or 2D convolution filter kernel as an image.
19984 The one- or two-dimensional image is placed in "
19987 specifications in "
19992 No pixel transfer operations are performed on this image, but the relevant
19993 pixel storage modes are applied. ")
19995 If a non-zero named buffer object is bound to the "
19996 (code "GL_PIXEL_PACK_BUFFER")
19999 (code "glBindBuffer")
20000 ") while a convolution filter is
20003 " is treated as a byte offset into the buffer object's data store. ")
20005 Color components that are present in "
20007 " but not included in the
20008 internal format of the filter are returned as zero.
20009 The assignments of internal color components to the components of "
20013 (table (% (formatter (asis)))
20014 (entry (% (heading (strong "Internal Component")))
20015 (para (strong "Resulting Component")))
20016 (entry (% (heading "
20019 (entry (% (heading "
20022 (entry (% (heading "
20025 (entry (% (heading "
20028 (entry (% (heading "
20032 (entry (% (heading "
20038 (para (code "GL_INVALID_ENUM")
20039 " is generated if "
20041 " is not one of the allowable
20043 (para (code "GL_INVALID_ENUM")
20044 " is generated if "
20046 " is not one of the allowable
20048 (para (code "GL_INVALID_ENUM")
20049 " is generated if "
20051 " is not one of the allowable
20053 (para (code "GL_INVALID_OPERATION")
20054 " is generated if "
20057 (code "GL_UNSIGNED_BYTE_3_3_2")
20059 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
20061 (code "GL_UNSIGNED_SHORT_5_6_5")
20063 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
20070 (para (code "GL_INVALID_OPERATION")
20071 " is generated if "
20074 (code "GL_UNSIGNED_SHORT_4_4_4_4")
20076 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
20078 (code "GL_UNSIGNED_SHORT_5_5_5_1")
20080 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
20082 (code "GL_UNSIGNED_INT_8_8_8_8")
20084 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
20086 (code "GL_UNSIGNED_INT_10_10_10_2")
20088 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
20097 (para (code "GL_INVALID_OPERATION")
20098 " is generated if a non-zero buffer object name is bound to the "
20099 (code "GL_PIXEL_PACK_BUFFER")
20100 " target and the buffer object's data store is currently mapped. ")
20101 (para (code "GL_INVALID_OPERATION")
20102 " is generated if a non-zero buffer object name is bound to the "
20103 (code "GL_PIXEL_PACK_BUFFER")
20104 " target and the data would be packed to the buffer
20105 object such that the memory writes required would exceed the data store size. ")
20106 (para (code "GL_INVALID_OPERATION")
20107 " is generated if a non-zero buffer object name is bound to the "
20108 (code "GL_PIXEL_PACK_BUFFER")
20111 " is not evenly divisible
20112 into the number of bytes needed to store in memory a datum indicated by "
20115 (para (code "GL_INVALID_OPERATION")
20116 " is generated if "
20117 (code "glGetConvolutionFilter")
20119 between the execution of "
20121 " and the corresponding
20126 (define-gl-procedure
20127 glGetConvolutionParameter
20128 "glGetConvolutionParameter"
20133 (function "glGetConvolutionParameterfv"))
20134 (paramdef "GLenum " (parameter "target"))
20135 (paramdef "GLenum " (parameter "pname"))
20136 (paramdef "GLfloat * " (parameter "params"))))
20138 (heading "get convolution parameters")
20139 (heading "Parameters")
20140 (table (% (formatter (asis)))
20141 (entry (% (heading (var "target")))
20143 The filter whose parameters are to be retrieved.
20145 (code "GL_CONVOLUTION_1D")
20147 (code "GL_CONVOLUTION_2D")
20149 (code "GL_SEPARABLE_2D")
20151 (entry (% (heading (var "pname")))
20153 The parameter to be retrieved.
20155 (code "GL_CONVOLUTION_BORDER_MODE")
20157 (code "GL_CONVOLUTION_BORDER_COLOR")
20159 (code "GL_CONVOLUTION_FILTER_SCALE")
20161 (code "GL_CONVOLUTION_FILTER_BIAS")
20163 (code "GL_CONVOLUTION_FORMAT")
20165 (code "GL_CONVOLUTION_WIDTH")
20167 (code "GL_CONVOLUTION_HEIGHT")
20169 (code "GL_MAX_CONVOLUTION_WIDTH")
20171 (code "GL_MAX_CONVOLUTION_HEIGHT")
20173 (entry (% (heading (var "params")))
20175 Pointer to storage for the parameters to be retrieved. ")))
20176 (heading "Description")
20177 (para (code "glGetConvolutionParameter")
20178 " retrieves convolution parameters. "
20180 " determines which convolution filter is queried. "
20182 " determines which parameter is returned: ")
20183 (table (% (formatter (asis)))
20184 (entry (% (heading (code "GL_CONVOLUTION_BORDER_MODE")))
20187 The convolution border mode.
20189 (code "glConvolutionParameter")
20190 " for a list of border modes. "))
20191 (entry (% (heading (code "GL_CONVOLUTION_BORDER_COLOR")))
20194 The current convolution border color. "
20196 " must be a pointer to an array of four elements,
20197 which will receive the red, green, blue, and alpha border colors. "))
20198 (entry (% (heading (code "GL_CONVOLUTION_FILTER_SCALE")))
20201 The current filter scale factors. "
20203 " must be a pointer to an array of four elements,
20204 which will receive the red, green, blue, and alpha filter scale
20205 factors in that order. "))
20206 (entry (% (heading (code "GL_CONVOLUTION_FILTER_BIAS")))
20209 The current filter bias factors. "
20211 " must be a pointer to an array of four elements,
20212 which will receive the red, green, blue, and alpha filter bias
20213 terms in that order. "))
20214 (entry (% (heading (code "GL_CONVOLUTION_FORMAT")))
20217 The current internal format.
20219 (code "glConvolutionFilter1D")
20221 (code "glConvolutionFilter2D")
20224 (code "glSeparableFilter2D")
20225 " for lists of allowable
20227 (entry (% (heading (code "GL_CONVOLUTION_WIDTH")))
20230 The current filter image width. "))
20231 (entry (% (heading (code "GL_CONVOLUTION_HEIGHT")))
20234 The current filter image height. "))
20235 (entry (% (heading (code "GL_MAX_CONVOLUTION_WIDTH")))
20238 The maximum acceptable filter image width. "))
20239 (entry (% (heading (code "GL_MAX_CONVOLUTION_HEIGHT")))
20242 The maximum acceptable filter image height. ")))
20244 (para (code "GL_INVALID_ENUM")
20245 " is generated if "
20247 " is not one of the allowable
20249 (para (code "GL_INVALID_ENUM")
20250 " is generated if "
20252 " is not one of the allowable
20254 (para (code "GL_INVALID_ENUM")
20255 " is generated if "
20258 (code "GL_CONVOLUTION_1D")
20263 (code "GL_CONVOLUTION_HEIGHT")
20265 (code "GL_MAX_CONVOLUTION_HEIGHT")
20267 (para (code "GL_INVALID_OPERATION")
20268 " is generated if "
20269 (code "glGetConvolutionParameter")
20271 between the execution of "
20273 " and the corresponding
20278 (define-gl-procedure
20283 (funcdef "GLenum " (function "glGetError"))
20284 (paramdef (parameter "void"))))
20286 (heading "return error information")
20287 (heading "Description")
20288 (para (code "glGetError")
20289 " returns the value of the error flag.
20290 Each detectable error is assigned a numeric code and symbolic name.
20291 When an error occurs,
20292 the error flag is set to the appropriate error code value.
20293 No other errors are recorded until "
20294 (code "glGetError")
20296 the error code is returned,
20297 and the flag is reset to "
20298 (code "GL_NO_ERROR")
20301 (code "glGetError")
20303 (code "GL_NO_ERROR")
20305 there has been no detectable error since the last call to "
20306 (code "glGetError")
20308 or since the GL was initialized. ")
20310 To allow for distributed implementations,
20311 there may be several error flags.
20312 If any single error flag has recorded an error,
20313 the value of that flag is returned
20314 and that flag is reset to "
20315 (code "GL_NO_ERROR")
20318 (code "glGetError")
20320 If more than one flag has recorded an error, "
20321 (code "glGetError")
20322 " returns and clears an arbitrary error flag value.
20324 (code "glGetError")
20325 " should always be called in a loop,
20327 (code "GL_NO_ERROR")
20329 if all error flags are to be reset. ")
20331 Initially, all error flags are set to "
20332 (code "GL_NO_ERROR")
20335 The following errors are currently defined: ")
20336 (table (% (formatter (asis)))
20337 (entry (% (heading (code "GL_NO_ERROR")))
20339 No error has been recorded.
20340 The value of this symbolic constant is guaranteed to be 0. "))
20341 (entry (% (heading (code "GL_INVALID_ENUM")))
20343 An unacceptable value is specified for an enumerated argument.
20344 The offending command is ignored
20345 and has no other side effect than to set the error flag. "))
20346 (entry (% (heading (code "GL_INVALID_VALUE")))
20348 A numeric argument is out of range.
20349 The offending command is ignored
20350 and has no other side effect than to set the error flag. "))
20351 (entry (% (heading (code "GL_INVALID_OPERATION")))
20353 The specified operation is not allowed in the current state.
20354 The offending command is ignored
20355 and has no other side effect than to set the error flag. "))
20356 (entry (% (heading (code "GL_STACK_OVERFLOW")))
20358 This command would cause a stack overflow.
20359 The offending command is ignored
20360 and has no other side effect than to set the error flag. "))
20361 (entry (% (heading (code "GL_STACK_UNDERFLOW")))
20363 This command would cause a stack underflow.
20364 The offending command is ignored
20365 and has no other side effect than to set the error flag. "))
20366 (entry (% (heading (code "GL_OUT_OF_MEMORY")))
20368 There is not enough memory left to execute the command.
20369 The state of the GL is undefined,
20370 except for the state of the error flags,
20371 after this error is recorded. "))
20372 (entry (% (heading (code "GL_TABLE_TOO_LARGE")))
20374 The specified table exceeds the implementation's maximum supported table
20375 size. The offending command is ignored and has no other side effect
20376 than to set the error flag. ")))
20378 When an error flag is set,
20379 results of a GL operation are undefined only if "
20380 (code "GL_OUT_OF_MEMORY")
20383 In all other cases,
20384 the command generating the error is ignored and has no effect on the GL state
20385 or frame buffer contents.
20386 If the generating command returns a value, it returns 0.
20388 (code "glGetError")
20389 " itself generates an error, it returns 0. ")
20391 (para (code "GL_INVALID_OPERATION")
20392 " is generated if "
20393 (code "glGetError")
20395 is executed between the execution of "
20398 and the corresponding execution of "
20402 (code "glGetError")
20405 (define-gl-procedure
20406 glGetHistogramParameter
20407 "glGetHistogramParameter"
20412 (function "glGetHistogramParameterfv"))
20413 (paramdef "GLenum " (parameter "target"))
20414 (paramdef "GLenum " (parameter "pname"))
20415 (paramdef "GLfloat * " (parameter "params"))))
20417 (heading "get histogram parameters")
20418 (heading "Parameters")
20419 (table (% (formatter (asis)))
20420 (entry (% (heading (var "target")))
20423 (code "GL_HISTOGRAM")
20425 (code "GL_PROXY_HISTOGRAM")
20427 (entry (% (heading (var "pname")))
20429 The name of the parameter to be retrieved.
20431 (code "GL_HISTOGRAM_WIDTH")
20433 (code "GL_HISTOGRAM_FORMAT")
20435 (code "GL_HISTOGRAM_RED_SIZE")
20437 (code "GL_HISTOGRAM_GREEN_SIZE")
20439 (code "GL_HISTOGRAM_BLUE_SIZE")
20441 (code "GL_HISTOGRAM_ALPHA_SIZE")
20443 (code "GL_HISTOGRAM_LUMINANCE_SIZE")
20445 (code "GL_HISTOGRAM_SINK")
20447 (entry (% (heading (var "params")))
20449 Pointer to storage for the returned values. ")))
20450 (heading "Description")
20451 (para (code "glGetHistogramParameter")
20452 " is used to query parameter values for the current histogram or for
20453 a proxy. The histogram state information may be queried by calling "
20454 (code "glGetHistogramParameter")
20458 (code "GL_HISTOGRAM")
20460 obtain information for the current histogram table) or "
20461 (code "GL_PROXY_HISTOGRAM")
20462 " (to obtain information from the most recent
20463 proxy request) and one of the following values for the "
20467 (table (% (formatter (asis)))
20468 (entry (% (heading (strong "Parameter")))
20469 (para (strong "Description")))
20470 (entry (% (heading (code "GL_HISTOGRAM_WIDTH")))
20472 Histogram table width "))
20473 (entry (% (heading (code "GL_HISTOGRAM_FORMAT")))
20475 Internal format "))
20476 (entry (% (heading (code "GL_HISTOGRAM_RED_SIZE")))
20478 Red component counter size, in bits "))
20479 (entry (% (heading (code "GL_HISTOGRAM_GREEN_SIZE")))
20481 Green component counter size, in bits "))
20482 (entry (% (heading (code "GL_HISTOGRAM_BLUE_SIZE")))
20484 Blue component counter size, in bits "))
20485 (entry (% (heading (code "GL_HISTOGRAM_ALPHA_SIZE")))
20487 Alpha component counter size, in bits "))
20488 (entry (% (heading (code "GL_HISTOGRAM_LUMINANCE_SIZE")))
20490 Luminance component counter size, in bits "))
20491 (entry (% (heading (code "GL_HISTOGRAM_SINK")))
20498 (para (code "GL_INVALID_ENUM")
20499 " is generated if "
20501 " is not one of the allowable
20503 (para (code "GL_INVALID_ENUM")
20504 " is generated if "
20506 " is not one of the allowable
20508 (para (code "GL_INVALID_OPERATION")
20509 " is generated if "
20510 (code "glGetHistogramParameter")
20512 between the execution of "
20514 " and the corresponding
20519 (define-gl-procedure
20524 (funcdef "void " (function "glGetHistogram"))
20525 (paramdef "GLenum " (parameter "target"))
20526 (paramdef "GLboolean " (parameter "reset"))
20527 (paramdef "GLenum " (parameter "format"))
20528 (paramdef "GLenum " (parameter "type"))
20529 (paramdef "GLvoid * " (parameter "values"))))
20531 (heading "get histogram table")
20532 (heading "Parameters")
20533 (table (% (formatter (asis)))
20534 (entry (% (heading (var "target")))
20536 Must be " (code "GL_HISTOGRAM") ". "))
20537 (entry (% (heading (var "reset")))
20541 ", each component counter that is actually returned
20542 is reset to zero. (Other counters are unaffected.)
20545 ", none of the counters in the histogram table is modified. "))
20546 (entry (% (heading (var "format")))
20548 The format of values to be returned in "
20568 (code "GL_LUMINANCE")
20570 (code "GL_LUMINANCE_ALPHA")
20572 (entry (% (heading (var "type")))
20574 The type of values to be returned in "
20577 Symbolic constants "
20578 (code "GL_UNSIGNED_BYTE")
20584 (code "GL_UNSIGNED_SHORT")
20588 (code "GL_UNSIGNED_INT")
20594 (code "GL_UNSIGNED_BYTE_3_3_2")
20596 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
20598 (code "GL_UNSIGNED_SHORT_5_6_5")
20600 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
20602 (code "GL_UNSIGNED_SHORT_4_4_4_4")
20604 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
20606 (code "GL_UNSIGNED_SHORT_5_5_5_1")
20608 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
20610 (code "GL_UNSIGNED_INT_8_8_8_8")
20612 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
20614 (code "GL_UNSIGNED_INT_10_10_10_2")
20616 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
20619 (entry (% (heading (var "values")))
20621 A pointer to storage for the returned histogram table. ")))
20622 (heading "Description")
20623 (para (code "glGetHistogram")
20624 " returns the current histogram table as a one-dimensional image
20625 with the same width as the histogram.
20626 No pixel transfer operations are performed on this image, but pixel storage
20627 modes that are applicable to 1D images are honored. ")
20629 If a non-zero named buffer object is bound to the "
20630 (code "GL_PIXEL_PACK_BUFFER")
20633 (code "glBindBuffer")
20634 ") while a histogram table is
20637 " is treated as a byte offset into the buffer object's data store. ")
20639 Color components that are requested in the specified "
20642 are not included in the internal format of the histogram, are returned as
20644 The assignments of internal color components to the components
20648 (table (% (formatter (asis)))
20649 (entry (% (heading (strong "Internal Component")))
20650 (para (strong "Resulting Component")))
20651 (entry (% (heading "
20654 (entry (% (heading "
20657 (entry (% (heading "
20660 (entry (% (heading "
20663 (entry (% (heading "
20669 (para (code "GL_INVALID_ENUM")
20670 " is generated if "
20673 (code "GL_HISTOGRAM")
20675 (para (code "GL_INVALID_ENUM")
20676 " is generated if "
20678 " is not one of the allowable
20680 (para (code "GL_INVALID_ENUM")
20681 " is generated if "
20683 " is not one of the allowable
20685 (para (code "GL_INVALID_OPERATION")
20686 " is generated if "
20689 (code "GL_UNSIGNED_BYTE_3_3_2")
20691 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
20693 (code "GL_UNSIGNED_SHORT_5_6_5")
20695 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
20702 (para (code "GL_INVALID_OPERATION")
20703 " is generated if "
20706 (code "GL_UNSIGNED_SHORT_4_4_4_4")
20708 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
20710 (code "GL_UNSIGNED_SHORT_5_5_5_1")
20712 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
20714 (code "GL_UNSIGNED_INT_8_8_8_8")
20716 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
20718 (code "GL_UNSIGNED_INT_10_10_10_2")
20720 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
20729 (para (code "GL_INVALID_OPERATION")
20730 " is generated if a non-zero buffer object name is bound to the "
20731 (code "GL_PIXEL_PACK_BUFFER")
20732 " target and the buffer object's data store is currently mapped. ")
20733 (para (code "GL_INVALID_OPERATION")
20734 " is generated if a non-zero buffer object name is bound to the "
20735 (code "GL_PIXEL_PACK_BUFFER")
20736 " target and the data would be packed to the buffer
20737 object such that the memory writes required would exceed the data store size. ")
20738 (para (code "GL_INVALID_OPERATION")
20739 " is generated if a non-zero buffer object name is bound to the "
20740 (code "GL_PIXEL_PACK_BUFFER")
20743 " is not evenly divisible
20744 into the number of bytes needed to store in memory a datum indicated by "
20747 (para (code "GL_INVALID_OPERATION")
20748 " is generated if "
20749 (code "glGetHistogram")
20751 between the execution of "
20753 " and the corresponding
20758 (define-gl-procedure
20763 (funcdef "void " (function "glGetLightfv"))
20764 (paramdef "GLenum " (parameter "light"))
20765 (paramdef "GLenum " (parameter "pname"))
20766 (paramdef "GLfloat * " (parameter "params"))))
20768 (heading "return light source parameter values")
20769 (heading "Parameters")
20770 (table (% (formatter (asis)))
20771 (entry (% (heading (var "light")))
20773 Specifies a light source.
20774 The number of possible lights depends on the implementation,
20775 but at least eight lights are supported.
20776 They are identified by symbolic names of the form "
20783 ranges from 0 to the value of "
20784 (code "GL_MAX_LIGHTS")
20786 (entry (% (heading (var "pname")))
20788 Specifies a light source parameter for "
20791 Accepted symbolic names are "
20792 (code "GL_AMBIENT")
20794 (code "GL_DIFFUSE")
20796 (code "GL_SPECULAR")
20798 (code "GL_POSITION")
20800 (code "GL_SPOT_DIRECTION")
20802 (code "GL_SPOT_EXPONENT")
20804 (code "GL_SPOT_CUTOFF")
20806 (code "GL_CONSTANT_ATTENUATION")
20808 (code "GL_LINEAR_ATTENUATION")
20810 (code "GL_QUADRATIC_ATTENUATION")
20812 (entry (% (heading (var "params")))
20814 Returns the requested data. ")))
20815 (heading "Description")
20816 (para (code "glGetLight")
20819 " the value or values of a light source parameter. "
20821 " names the light and is a symbolic name of the form "
20825 where i ranges from 0 to the value of "
20826 (code "GL_MAX_LIGHTS")
20828 (code "GL_MAX_LIGHTS")
20829 " is an implementation dependent constant that is
20830 greater than or equal to eight. "
20832 " specifies one of ten light source parameters,
20833 again by symbolic name. ")
20835 The following parameters are defined: ")
20836 (table (% (formatter (asis)))
20837 (entry (% (heading (code "GL_AMBIENT")))
20838 (para (var "params")
20839 " returns four integer or floating-point values representing the
20840 ambient intensity of the light source.
20843 are linearly mapped from the internal floating-point representation
20844 such that 1.0 maps to the most positive representable integer value,
20848 maps to the most negative representable integer value.
20849 If the internal value is outside the range "
20850 (math "[" "-1" "," "1" "]")
20852 the corresponding integer return value is undefined. The initial value is
20854 (entry (% (heading (code "GL_DIFFUSE")))
20855 (para (var "params")
20856 " returns four integer or floating-point values representing the
20857 diffuse intensity of the light source.
20860 are linearly mapped from the internal floating-point representation
20861 such that 1.0 maps to the most positive representable integer value,
20865 maps to the most negative representable integer value.
20866 If the internal value is outside the range "
20867 (math "[" "-1" "," "1" "]")
20869 the corresponding integer return value is undefined. The initial value
20872 " is (1, 1, 1, 1); for other lights, the
20873 initial value is (0, 0, 0, 0). "))
20874 (entry (% (heading (code "GL_SPECULAR")))
20875 (para (var "params")
20876 " returns four integer or floating-point values representing the
20877 specular intensity of the light source.
20880 are linearly mapped from the internal floating-point representation
20881 such that 1.0 maps to the most positive representable integer value,
20885 maps to the most negative representable integer value.
20886 If the internal value is outside the range "
20887 (math "[" "-1" "," "1" "]")
20889 the corresponding integer return value is undefined. The initial value
20892 " is (1, 1, 1, 1); for other lights, the
20893 initial value is (0, 0, 0, 0). "))
20894 (entry (% (heading (code "GL_POSITION")))
20895 (para (var "params")
20896 " returns four integer or floating-point values representing the
20897 position of the light source.
20900 are computed by rounding the internal floating-point values to the
20901 nearest integer value.
20902 The returned values are those maintained in eye coordinates.
20903 They will not be equal to the values specified using "
20906 unless the modelview matrix was identity at the time "
20909 called. The initial value is (0, 0, 1, 0). "))
20910 (entry (% (heading (code "GL_SPOT_DIRECTION")))
20911 (para (var "params")
20912 " returns three integer or floating-point values representing the
20913 direction of the light source.
20916 are computed by rounding the internal floating-point values to the
20917 nearest integer value.
20918 The returned values are those maintained in eye coordinates.
20919 They will not be equal to the values specified using "
20922 unless the modelview matrix was identity at the time "
20925 Although spot direction is normalized before being used in the lighting
20927 the returned values are the transformed versions of the specified values
20928 prior to normalization. The initial value is "
20929 (math "(" "0" "," "0" "-1" ")")
20931 (entry (% (heading (code "GL_SPOT_EXPONENT")))
20932 (para (var "params")
20933 " returns a single integer or floating-point value representing the
20934 spot exponent of the light.
20937 is computed by rounding the internal floating-point representation to
20938 the nearest integer. The initial value is 0. "))
20939 (entry (% (heading (code "GL_SPOT_CUTOFF")))
20940 (para (var "params")
20941 " returns a single integer or floating-point value representing the
20942 spot cutoff angle of the light.
20945 is computed by rounding the internal floating-point representation to
20946 the nearest integer. The initial value is 180. "))
20947 (entry (% (heading (code "GL_CONSTANT_ATTENUATION")))
20948 (para (var "params")
20949 " returns a single integer or floating-point value representing the
20950 constant (not distance-related) attenuation of the light.
20953 is computed by rounding the internal floating-point representation to
20954 the nearest integer. The initial value is 1. "))
20955 (entry (% (heading (code "GL_LINEAR_ATTENUATION")))
20956 (para (var "params")
20957 " returns a single integer or floating-point value representing the
20958 linear attenuation of the light.
20961 is computed by rounding the internal floating-point representation to
20962 the nearest integer. The initial value is 0. "))
20963 (entry (% (heading (code "GL_QUADRATIC_ATTENUATION")))
20964 (para (var "params")
20965 " returns a single integer or floating-point value representing the
20966 quadratic attenuation of the light.
20969 is computed by rounding the internal floating-point representation to
20970 the nearest integer. The initial value is 0. ")))
20972 (para (code "GL_INVALID_ENUM")
20973 " is generated if "
20979 (para (code "GL_INVALID_OPERATION")
20980 " is generated if "
20981 (code "glGetLight")
20983 is executed between the execution of "
20986 and the corresponding execution of "
20990 (define-gl-procedure
20995 (funcdef "void " (function "glGetMapdv"))
20996 (paramdef "GLenum " (parameter "target"))
20997 (paramdef "GLenum " (parameter "query"))
20998 (paramdef "GLdouble * " (parameter "v"))))
21000 (heading "return evaluator parameters")
21001 (heading "Parameters")
21002 (table (% (formatter (asis)))
21003 (entry (% (heading (var "target")))
21005 Specifies the symbolic name of a map.
21006 Accepted values are "
21007 (code "GL_MAP1_COLOR_4")
21009 (code "GL_MAP1_INDEX")
21011 (code "GL_MAP1_NORMAL")
21013 (code "GL_MAP1_TEXTURE_COORD_1")
21015 (code "GL_MAP1_TEXTURE_COORD_2")
21017 (code "GL_MAP1_TEXTURE_COORD_3")
21019 (code "GL_MAP1_TEXTURE_COORD_4")
21021 (code "GL_MAP1_VERTEX_3")
21023 (code "GL_MAP1_VERTEX_4")
21025 (code "GL_MAP2_COLOR_4")
21027 (code "GL_MAP2_INDEX")
21029 (code "GL_MAP2_NORMAL")
21031 (code "GL_MAP2_TEXTURE_COORD_1")
21033 (code "GL_MAP2_TEXTURE_COORD_2")
21035 (code "GL_MAP2_TEXTURE_COORD_3")
21037 (code "GL_MAP2_TEXTURE_COORD_4")
21039 (code "GL_MAP2_VERTEX_3")
21041 (code "GL_MAP2_VERTEX_4")
21043 (entry (% (heading (var "query")))
21045 Specifies which parameter to return.
21052 " are accepted. "))
21053 (entry (% (heading (var "v")))
21055 Returns the requested data. ")))
21056 (heading "Description")
21057 (para (code "glMap1")
21060 " define evaluators. "
21062 " returns evaluator parameters. "
21066 " selects a specific parameter,
21069 " points to storage where the values will be returned. ")
21071 The acceptable values for the "
21073 " parameter are described
21078 " reference pages. ")
21079 (para (var "query")
21080 " can assume the following values: ")
21081 (table (% (formatter (asis)))
21082 (entry (% (heading (code "GL_COEFF")))
21084 " returns the control points for the evaluator function.
21085 One-dimensional evaluators return "
21086 (math (var "order"))
21089 and two-dimensional evaluators return "
21090 (math (var "uorder") "×" (var "vorder"))
21093 Each control point consists of one, two, three, or four integer,
21094 single-precision floating-point,
21095 or double-precision floating-point values,
21096 depending on the type of the evaluator.
21097 The GL returns two-dimensional control points in row-major order,
21099 (math (var "uorder"))
21103 (math (var "vorder"))
21105 index after each row.
21108 are computed by rounding the internal floating-point values to the
21109 nearest integer values. "))
21110 (entry (% (heading (code "GL_ORDER")))
21112 " returns the order of the evaluator function.
21113 One-dimensional evaluators return a single value, "
21114 (math (var "order"))
21116 The initial value is 1.
21117 Two-dimensional evaluators return two values, "
21118 (math (var "uorder"))
21121 (math (var "vorder"))
21123 The initial value is 1,1. "))
21124 (entry (% (heading (code "GL_DOMAIN")))
21126 " returns the linear "
21132 mapping parameters.
21133 One-dimensional evaluators return two values, "
21142 Two-dimensional evaluators return four values
21158 are computed by rounding the internal floating-point values to the
21159 nearest integer values. ")))
21161 (para (code "GL_INVALID_ENUM")
21162 " is generated if either "
21167 an accepted value. ")
21168 (para (code "GL_INVALID_OPERATION")
21169 " is generated if "
21172 is executed between the execution of "
21175 and the corresponding execution of "
21179 (define-gl-procedure
21184 (funcdef "void " (function "glGetMaterialfv"))
21185 (paramdef "GLenum " (parameter "face"))
21186 (paramdef "GLenum " (parameter "pname"))
21187 (paramdef "GLfloat * " (parameter "params"))))
21189 (heading "return material parameters")
21190 (heading "Parameters")
21191 (table (% (formatter (asis)))
21192 (entry (% (heading (var "face")))
21194 Specifies which of the two materials is being queried. "
21199 representing the front and back materials,
21201 (entry (% (heading (var "pname")))
21203 Specifies the material parameter to return. "
21204 (code "GL_AMBIENT")
21206 (code "GL_DIFFUSE")
21208 (code "GL_SPECULAR")
21210 (code "GL_EMISSION")
21212 (code "GL_SHININESS")
21214 (code "GL_COLOR_INDEXES")
21217 (entry (% (heading (var "params")))
21219 Returns the requested data. ")))
21220 (heading "Description")
21221 (para (code "glGetMaterial")
21224 " the value or values of parameter "
21229 ". Six parameters are defined: ")
21230 (table (% (formatter (asis)))
21231 (entry (% (heading (code "GL_AMBIENT")))
21232 (para (var "params")
21233 " returns four integer or floating-point values representing the
21234 ambient reflectance of the material.
21237 are linearly mapped from the internal floating-point representation
21238 such that 1.0 maps to the most positive representable integer value,
21242 maps to the most negative representable integer value.
21243 If the internal value is outside the range "
21244 (math "[" "-1" "," "1" "]")
21246 the corresponding integer return value is undefined. The initial value is
21247 (0.2, 0.2, 0.2, 1.0) "))
21248 (entry (% (heading (code "GL_DIFFUSE")))
21249 (para (var "params")
21250 " returns four integer or floating-point values representing the
21251 diffuse reflectance of the material.
21254 are linearly mapped from the internal floating-point representation
21255 such that 1.0 maps to the most positive representable integer value,
21259 maps to the most negative representable integer value.
21260 If the internal value is outside the range "
21261 (math "[" "-1" "," "1" "]")
21263 the corresponding integer return value is undefined. The initial value is
21264 (0.8, 0.8, 0.8, 1.0). "))
21265 (entry (% (heading (code "GL_SPECULAR")))
21266 (para (var "params")
21267 " returns four integer or floating-point values representing the
21268 specular reflectance of the material.
21271 are linearly mapped from the internal floating-point representation
21272 such that 1.0 maps to the most positive representable integer value,
21276 maps to the most negative representable integer value.
21277 If the internal value is outside the range "
21278 (math "[" "-1" "," "1" "]")
21280 the corresponding integer return value is undefined. The initial value is
21282 (entry (% (heading (code "GL_EMISSION")))
21283 (para (var "params")
21284 " returns four integer or floating-point values representing the
21285 emitted light intensity of the material.
21288 are linearly mapped from the internal floating-point representation
21289 such that 1.0 maps to the most positive representable integer value,
21293 maps to the most negative representable integer value.
21294 If the internal value is outside the range "
21295 (math "[" "-1" "," "1" "]")
21297 the corresponding integer return value is undefined. The initial value is
21299 (entry (% (heading (code "GL_SHININESS")))
21300 (para (var "params")
21301 " returns one integer or floating-point value representing the
21302 specular exponent of the material.
21305 are computed by rounding the internal floating-point value to the
21306 nearest integer value. The initial value is 0. "))
21307 (entry (% (heading (code "GL_COLOR_INDEXES")))
21308 (para (var "params")
21309 " returns three integer or floating-point values representing the
21310 ambient, diffuse, and specular indices of the material.
21311 These indices are used only for color index lighting.
21312 (All the other parameters are used only for RGBA lighting.)
21315 are computed by rounding the internal floating-point values to the
21316 nearest integer values. ")))
21318 (para (code "GL_INVALID_ENUM")
21319 " is generated if "
21325 (para (code "GL_INVALID_OPERATION")
21326 " is generated if "
21327 (code "glGetMaterial")
21329 is executed between the execution of "
21332 and the corresponding execution of "
21336 (define-gl-procedure
21337 glGetMinmaxParameter
21338 "glGetMinmaxParameter"
21343 (function "glGetMinmaxParameterfv"))
21344 (paramdef "GLenum " (parameter "target"))
21345 (paramdef "GLenum " (parameter "pname"))
21346 (paramdef "GLfloat * " (parameter "params"))))
21348 (heading "get minmax parameters")
21349 (heading "Parameters")
21350 (table (% (formatter (asis)))
21351 (entry (% (heading (var "target")))
21353 Must be " (code "GL_MINMAX") ". "))
21354 (entry (% (heading (var "pname")))
21356 The parameter to be retrieved.
21358 (code "GL_MINMAX_FORMAT")
21360 (code "GL_MINMAX_SINK")
21362 (entry (% (heading (var "params")))
21364 A pointer to storage for the retrieved parameters. ")))
21365 (heading "Description")
21366 (para (code "glGetMinmaxParameter")
21367 " retrieves parameters for the current minmax table by setting "
21369 " to one of the following values: ")
21371 (table (% (formatter (asis)))
21372 (entry (% (heading (strong "Parameter")))
21373 (para (strong "Description")))
21374 (entry (% (heading (code "GL_MINMAX_FORMAT")))
21376 Internal format of minmax table "))
21377 (entry (% (heading (code "GL_MINMAX_SINK")))
21384 (para (code "GL_INVALID_ENUM")
21385 " is generated if "
21390 (para (code "GL_INVALID_ENUM")
21391 " is generated if "
21393 " is not one of the allowable
21395 (para (code "GL_INVALID_OPERATION")
21396 " is generated if "
21397 (code "glGetMinmaxParameter")
21399 between the execution of "
21401 " and the corresponding
21406 (define-gl-procedure
21411 (funcdef "void " (function "glGetMinmax"))
21412 (paramdef "GLenum " (parameter "target"))
21413 (paramdef "GLboolean " (parameter "reset"))
21414 (paramdef "GLenum " (parameter "format"))
21415 (paramdef "GLenum " (parameter "types"))
21416 (paramdef "GLvoid * " (parameter "values"))))
21418 (heading "get minimum and maximum pixel values")
21419 (heading "Parameters")
21420 (table (% (formatter (asis)))
21421 (entry (% (heading (var "target")))
21423 Must be " (code "GL_MINMAX") ". "))
21424 (entry (% (heading (var "reset")))
21428 ", all entries in the minmax table that are actually
21429 returned are reset to their initial values. (Other entries are unaltered.)
21432 ", the minmax table is unaltered. "))
21433 (entry (% (heading (var "format")))
21435 The format of the data to be returned in "
21455 (code "GL_LUMINANCE")
21457 (code "GL_LUMINANCE_ALPHA")
21459 (entry (% (heading (var "types")))
21461 The type of the data to be returned in "
21464 Symbolic constants "
21465 (code "GL_UNSIGNED_BYTE")
21471 (code "GL_UNSIGNED_SHORT")
21475 (code "GL_UNSIGNED_INT")
21481 (code "GL_UNSIGNED_BYTE_3_3_2")
21483 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
21485 (code "GL_UNSIGNED_SHORT_5_6_5")
21487 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
21489 (code "GL_UNSIGNED_SHORT_4_4_4_4")
21491 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
21493 (code "GL_UNSIGNED_SHORT_5_5_5_1")
21495 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
21497 (code "GL_UNSIGNED_INT_8_8_8_8")
21499 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
21501 (code "GL_UNSIGNED_INT_10_10_10_2")
21503 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
21506 (entry (% (heading (var "values")))
21508 A pointer to storage for the returned values. ")))
21509 (heading "Description")
21510 (para (code "glGetMinmax")
21511 " returns the accumulated minimum and maximum pixel values (computed on a
21512 per-component basis) in a one-dimensional image of width 2. The first set
21513 of return values are the minima, and the second set of return values
21515 The format of the return values is determined by "
21517 ", and their type is
21522 If a non-zero named buffer object is bound to the "
21523 (code "GL_PIXEL_PACK_BUFFER")
21526 (code "glBindBuffer")
21527 ") while minimum and maximum pixel values are
21530 " is treated as a byte offset into the buffer object's data store. ")
21532 No pixel transfer operations are performed on the return values, but pixel
21533 storage modes that are applicable to one-dimensional images are performed.
21534 Color components that are requested in the specified "
21537 are not included in the internal format of the minmax table, are
21538 returned as zero. The assignment of internal color components to the
21539 components requested by "
21541 " are as follows: ")
21543 (table (% (formatter (asis)))
21544 (entry (% (heading (strong "Internal Component")))
21545 (para (strong "Resulting Component")))
21546 (entry (% (heading "
21549 (entry (% (heading "
21552 (entry (% (heading "
21555 (entry (% (heading "
21558 (entry (% (heading "
21567 ", the minmax table entries corresponding
21568 to the return values are reset to their initial
21569 values. Minimum and maximum values that are not returned are not
21570 modified, even if "
21576 (para (code "GL_INVALID_ENUM")
21577 " is generated if "
21582 (para (code "GL_INVALID_ENUM")
21583 " is generated if "
21585 " is not one of the allowable
21587 (para (code "GL_INVALID_ENUM")
21588 " is generated if "
21590 " is not one of the allowable
21592 (para (code "GL_INVALID_OPERATION")
21593 " is generated if "
21596 (code "GL_UNSIGNED_BYTE_3_3_2")
21598 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
21600 (code "GL_UNSIGNED_SHORT_5_6_5")
21602 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
21609 (para (code "GL_INVALID_OPERATION")
21610 " is generated if "
21613 (code "GL_UNSIGNED_SHORT_4_4_4_4")
21615 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
21617 (code "GL_UNSIGNED_SHORT_5_5_5_1")
21619 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
21621 (code "GL_UNSIGNED_INT_8_8_8_8")
21623 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
21625 (code "GL_UNSIGNED_INT_10_10_10_2")
21627 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
21636 (para (code "GL_INVALID_OPERATION")
21637 " is generated if a non-zero buffer object name is bound to the "
21638 (code "GL_PIXEL_PACK_BUFFER")
21639 " target and the buffer object's data store is currently mapped. ")
21640 (para (code "GL_INVALID_OPERATION")
21641 " is generated if a non-zero buffer object name is bound to the "
21642 (code "GL_PIXEL_PACK_BUFFER")
21643 " target and the data would be packed to the buffer
21644 object such that the memory writes required would exceed the data store size. ")
21645 (para (code "GL_INVALID_OPERATION")
21646 " is generated if a non-zero buffer object name is bound to the "
21647 (code "GL_PIXEL_PACK_BUFFER")
21650 " is not evenly divisible
21651 into the number of bytes needed to store in memory a datum indicated by "
21654 (para (code "GL_INVALID_OPERATION")
21655 " is generated if "
21656 (code "glGetMinmax")
21658 between the execution of "
21660 " and the corresponding
21665 (define-gl-procedure
21670 (funcdef "void " (function "glGetPixelMapfv"))
21671 (paramdef "GLenum " (parameter "map"))
21672 (paramdef "GLfloat * " (parameter "data"))))
21674 (heading "return the specified pixel map")
21675 (heading "Parameters")
21676 (table (% (formatter (asis)))
21677 (entry (% (heading (var "map")))
21679 Specifies the name of the pixel map to return.
21680 Accepted values are "
21681 (code "GL_PIXEL_MAP_I_TO_I")
21683 (code "GL_PIXEL_MAP_S_TO_S")
21685 (code "GL_PIXEL_MAP_I_TO_R")
21687 (code "GL_PIXEL_MAP_I_TO_G")
21689 (code "GL_PIXEL_MAP_I_TO_B")
21691 (code "GL_PIXEL_MAP_I_TO_A")
21693 (code "GL_PIXEL_MAP_R_TO_R")
21695 (code "GL_PIXEL_MAP_G_TO_G")
21697 (code "GL_PIXEL_MAP_B_TO_B")
21699 (code "GL_PIXEL_MAP_A_TO_A")
21701 (entry (% (heading (var "data")))
21703 Returns the pixel map contents. ")))
21704 (heading "Description")
21707 (code "glPixelMap")
21708 " reference page for a description of the acceptable
21712 (code "glGetPixelMap")
21715 " the contents of the pixel map
21719 Pixel maps are used during the execution of "
21720 (code "glReadPixels")
21722 (code "glDrawPixels")
21724 (code "glCopyPixels")
21726 (code "glTexImage1D")
21728 (code "glTexImage2D")
21730 (code "glTexImage3D")
21732 (code "glTexSubImage1D")
21734 (code "glTexSubImage2D")
21736 (code "glTexSubImage3D")
21738 (code "glCopyTexImage1D")
21740 (code "glCopyTexImage2D")
21742 (code "glCopyTexSubImage1D")
21744 (code "glCopyTexSubImage2D")
21746 (code "glCopyTexSubImage3D")
21748 to map color indices,
21751 and depth components to other values. ")
21753 If a non-zero named buffer object is bound to the "
21754 (code "GL_PIXEL_PACK_BUFFER")
21757 (code "glBindBuffer")
21758 ") while a pixel map is
21761 " is treated as a byte offset into the buffer object's data store. ")
21763 Unsigned integer values,
21765 are linearly mapped from the internal fixed or floating-point representation
21766 such that 1.0 maps to the largest representable integer value,
21768 Return unsigned integer values are undefined if the map value was
21769 not in the range [0,1]. ")
21771 To determine the required size of "
21776 " with the appropriate symbolic
21779 (para (code "GL_INVALID_ENUM")
21780 " is generated if "
21782 " is not an accepted value. ")
21783 (para (code "GL_INVALID_OPERATION")
21784 " is generated if a non-zero buffer object name is bound to the "
21785 (code "GL_PIXEL_PACK_BUFFER")
21786 " target and the buffer object's data store is currently mapped. ")
21787 (para (code "GL_INVALID_OPERATION")
21788 " is generated if a non-zero buffer object name is bound to the "
21789 (code "GL_PIXEL_PACK_BUFFER")
21790 " target and the data would be packed to the buffer
21791 object such that the memory writes required would exceed the data store size. ")
21792 (para (code "GL_INVALID_OPERATION")
21793 " is generated by "
21794 (code "glGetPixelMapfv")
21795 " if a non-zero buffer object name is bound to the "
21796 (code "GL_PIXEL_PACK_BUFFER")
21799 " is not evenly divisible
21800 into the number of bytes needed to store in memory a GLfloat datum. ")
21801 (para (code "GL_INVALID_OPERATION")
21802 " is generated by "
21803 (code "glGetPixelMapuiv")
21804 " if a non-zero buffer object name is bound to the "
21805 (code "GL_PIXEL_PACK_BUFFER")
21808 " is not evenly divisible
21809 into the number of bytes needed to store in memory a GLuint datum. ")
21810 (para (code "GL_INVALID_OPERATION")
21811 " is generated by "
21812 (code "glGetPixelMapusv")
21813 " if a non-zero buffer object name is bound to the "
21814 (code "GL_PIXEL_PACK_BUFFER")
21817 " is not evenly divisible
21818 into the number of bytes needed to store in memory a GLushort datum. ")
21819 (para (code "GL_INVALID_OPERATION")
21820 " is generated if "
21821 (code "glGetPixelMap")
21823 is executed between the execution of "
21826 and the corresponding execution of "
21830 (define-gl-procedure
21835 (funcdef "void " (function "glGetPointerv"))
21836 (paramdef "GLenum " (parameter "pname"))
21837 (paramdef "GLvoid ** " (parameter "params"))))
21840 "return the address of the specified pointer")
21841 (heading "Parameters")
21842 (table (% (formatter (asis)))
21843 (entry (% (heading (var "pname")))
21845 Specifies the array or buffer pointer to be returned.
21846 Symbolic constants "
21847 (code "GL_COLOR_ARRAY_POINTER")
21849 (code "GL_EDGE_FLAG_ARRAY_POINTER")
21851 (code "GL_FOG_COORD_ARRAY_POINTER")
21853 (code "GL_FEEDBACK_BUFFER_POINTER")
21855 (code "GL_INDEX_ARRAY_POINTER")
21857 (code "GL_NORMAL_ARRAY_POINTER")
21859 (code "GL_SECONDARY_COLOR_ARRAY_POINTER")
21861 (code "GL_SELECTION_BUFFER_POINTER")
21863 (code "GL_TEXTURE_COORD_ARRAY_POINTER")
21866 (code "GL_VERTEX_ARRAY_POINTER")
21869 (entry (% (heading (var "params")))
21871 Returns the pointer value specified by "
21874 (heading "Description")
21875 (para (code "glGetPointerv")
21876 " returns pointer information. "
21878 " is a symbolic constant
21879 indicating the pointer to be returned, and "
21881 " is a pointer to a
21882 location in which to place the returned data. ")
21886 " arguments except "
21887 (code "GL_FEEDBACK_BUFFER_POINTER")
21889 (code "GL_SELECTION_BUFFER_POINTER")
21891 if a non-zero named buffer object was bound to the "
21892 (code "GL_ARRAY_BUFFER")
21895 (code "glBindBuffer")
21896 ") when the desired pointer was previously
21897 specified, the pointer returned is a byte offset into the buffer object's data store.
21898 Buffer objects are only available in OpenGL versions 1.5 and greater. ")
21900 (para (code "GL_INVALID_ENUM")
21901 " is generated if "
21903 " is not an accepted value. ")))
21905 (define-gl-procedure
21906 glGetPolygonStipple
21907 "glGetPolygonStipple"
21912 (function "glGetPolygonStipple"))
21913 (paramdef "GLubyte * " (parameter "pattern"))))
21915 (heading "return the polygon stipple pattern")
21916 (heading "Parameters")
21917 (table (% (formatter (asis)))
21918 (entry (% (heading (var "pattern")))
21920 Returns the stipple pattern. The initial value is all 1's. ")))
21921 (heading "Description")
21922 (para (code "glGetPolygonStipple")
21926 (math "32" "×" "32")
21928 polygon stipple pattern.
21929 The pattern is packed into memory as if "
21930 (code "glReadPixels")
21944 (code "GL_COLOR_INDEX")
21946 and the stipple pattern were stored in an internal "
21947 (math "32" "×" "32")
21952 (code "glReadPixels")
21955 pixel transfer operations
21956 (shift, offset, pixel map)
21957 are not applied to the returned stipple image. ")
21959 If a non-zero named buffer object is bound to the "
21960 (code "GL_PIXEL_PACK_BUFFER")
21963 (code "glBindBuffer")
21964 ") while a polygon stipple pattern is
21967 " is treated as a byte offset into the buffer object's data store. ")
21969 (para (code "GL_INVALID_OPERATION")
21970 " is generated if a non-zero buffer object name is bound to the "
21971 (code "GL_PIXEL_PACK_BUFFER")
21972 " target and the buffer object's data store is currently mapped. ")
21973 (para (code "GL_INVALID_OPERATION")
21974 " is generated if a non-zero buffer object name is bound to the "
21975 (code "GL_PIXEL_PACK_BUFFER")
21976 " target and the data would be packed to the buffer
21977 object such that the memory writes required would exceed the data store size. ")
21978 (para (code "GL_INVALID_OPERATION")
21979 " is generated if "
21980 (code "glGetPolygonStipple")
21982 is executed between the execution of "
21985 and the corresponding execution of "
21989 (define-gl-procedure
21990 glGetProgramInfoLog
21991 "glGetProgramInfoLog"
21996 (function "glGetProgramInfoLog"))
21997 (paramdef "GLuint " (parameter "program"))
21998 (paramdef "GLsizei " (parameter "maxLength"))
21999 (paramdef "GLsizei *" (parameter "length"))
22000 (paramdef "GLchar *" (parameter "infoLog"))))
22003 "Returns the information log for a program object")
22004 (heading "Parameters")
22005 (table (% (formatter (asis)))
22006 (entry (% (heading (var "program")))
22007 (para "Specifies the program object whose information
22008 \t\t log is to be queried."))
22009 (entry (% (heading (var "maxLength")))
22010 (para "Specifies the size of the character buffer for
22011 \t\t storing the returned information log."))
22012 (entry (% (heading (var "length")))
22013 (para "Returns the length of the string returned in "
22015 " (excluding the null
22016 \t\t terminator)."))
22017 (entry (% (heading (var "infoLog")))
22018 (para "Specifies an array of characters that is used
22019 \t\t to return the information log.")))
22020 (heading "Description")
22021 (para (code "glGetProgramInfoLog")
22023 \tinformation log for the specified program object. The
22024 \tinformation log for a program object is modified when the
22025 \tprogram object is linked or validated. The string that is
22026 \treturned will be null terminated.")
22027 (para (code "glGetProgramInfoLog")
22030 " as much of the information log as
22031 \tit can, up to a maximum of "
22034 characters. The number of characters actually returned,
22035 \texcluding the null termination character, is specified by\t"
22037 ". If the length of the returned
22038 \tstring is not required, a value of "
22041 \tbe passed in the "
22044 \tsize of the buffer required to store the returned information
22045 \tlog can be obtained by calling\t"
22046 (code "glGetProgram")
22049 (code "GL_INFO_LOG_LENGTH")
22051 (para "The information log for a program object is either an
22052 \tempty string, or a string containing information about the last
22053 \tlink operation, or a string containing information about the
22054 \tlast validation operation. It may contain diagnostic messages,
22055 \twarning messages, and other information. When a program object
22056 \tis created, its information log will be a string of length
22059 (para (code "GL_INVALID_VALUE")
22060 " is generated if\t"
22062 " is not a value generated by
22064 (para (code "GL_INVALID_OPERATION")
22065 " is generated if\t"
22067 " is not a program object.")
22068 (para (code "GL_INVALID_VALUE")
22069 " is generated if\t"
22071 " is less than 0.")
22072 (para (code "GL_INVALID_OPERATION")
22073 " is generated if\t"
22074 (code "glGetProgramInfoLog")
22075 " is executed between the
22079 and the corresponding execution of\t"
22083 (define-gl-procedure
22088 (funcdef "void " (function "glGetProgramiv"))
22089 (paramdef "GLuint " (parameter "program"))
22090 (paramdef "GLenum " (parameter "pname"))
22091 (paramdef "GLint *" (parameter "params"))))
22094 "Returns a parameter from a program object")
22095 (heading "Parameters")
22096 (table (% (formatter (asis)))
22097 (entry (% (heading (var "program")))
22098 (para "Specifies the program object to be
22100 (entry (% (heading (var "pname")))
22101 (para "Specifies the object parameter. Accepted
22102 \t\t symbolic names are "
22103 (code "GL_DELETE_STATUS")
22105 (code "GL_LINK_STATUS")
22107 (code "GL_VALIDATE_STATUS")
22109 (code "GL_INFO_LOG_LENGTH")
22111 (code "GL_ATTACHED_SHADERS")
22113 (code "GL_ACTIVE_ATTRIBUTES")
22115 (code "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH")
22117 (code "GL_ACTIVE_UNIFORMS")
22119 (code "GL_ACTIVE_UNIFORM_MAX_LENGTH")
22121 (entry (% (heading (var "params")))
22122 (para "Returns the requested object parameter.")))
22123 (heading "Description")
22124 (para (code "glGetProgram")
22129 the value of a parameter for a specific program object. The following parameters are defined:")
22130 (table (% (formatter (asis)))
22131 (entry (% (heading (code "GL_DELETE_STATUS")))
22133 (para (var "params")
22138 " is currently flagged
22139 \t\t for deletion, and "
22143 (entry (% (heading (code "GL_LINK_STATUS")))
22145 (para (var "params")
22149 \t\t operation on "
22152 \t\t successful, and "
22156 (entry (% (heading (code "GL_VALIDATE_STATUS")))
22158 (para (var "params")
22162 \t\t validation operation on "
22164 " was successful, and "
22168 (entry (% (heading (code "GL_INFO_LOG_LENGTH")))
22170 (para (var "params")
22172 \t\t number of characters in the information log for "
22174 " including the null
22175 \t\t termination character (i.e., the size of the
22176 \t\t character buffer required to store the information
22180 \t\t information log, a value of 0 is
22182 (entry (% (heading (code "GL_ATTACHED_SHADERS")))
22184 (para (var "params")
22186 \t\t number of shader objects attached to "
22189 (entry (% (heading (code "GL_ACTIVE_ATTRIBUTES")))
22191 (para (var "params")
22193 \t\t number of active attribute variables for "
22196 (entry (% (heading (code "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH")))
22198 (para (var "params")
22200 \t\t length of the longest active attribute name for "
22202 ", including the null
22203 \t\t termination character (i.e., the size of the
22204 \t\t character buffer required to store the longest
22205 \t\t attribute name). If no active attributes exist, 0 is
22207 (entry (% (heading (code "GL_ACTIVE_UNIFORMS")))
22209 (para (var "params")
22211 \t\t number of active uniform variables for "
22214 (entry (% (heading (code "GL_ACTIVE_UNIFORM_MAX_LENGTH")))
22216 (para (var "params")
22218 \t\t length of the longest active uniform variable name
22222 \t\t null termination character (i.e., the size of the
22223 \t\t character buffer required to store the longest
22224 \t\t uniform variable name). If no active uniform
22225 \t\t variables exist, 0 is returned.")))
22227 (para (code "GL_INVALID_VALUE")
22232 is not a value generated by OpenGL.")
22233 (para (code "GL_INVALID_OPERATION")
22238 does not refer to a program object.")
22239 (para (code "GL_INVALID_ENUM")
22244 is not an accepted value.")
22245 (para (code "GL_INVALID_OPERATION")
22246 " is generated if\t"
22247 (code "glGetProgram")
22248 " is executed between the
22252 and the corresponding execution of\t"
22256 (define-gl-procedure
22261 (funcdef "void " (function "glGetQueryiv"))
22262 (paramdef "GLenum " (parameter "target"))
22263 (paramdef "GLenum " (parameter "pname"))
22264 (paramdef "GLint * " (parameter "params"))))
22267 "return parameters of a query object target")
22268 (heading "Parameters")
22269 (table (% (formatter (asis)))
22270 (entry (% (heading (var "target")))
22272 Specifies a query object target.
22274 (code "GL_SAMPLES_PASSED")
22276 (entry (% (heading (var "pname")))
22278 Specifies the symbolic name of a query object target parameter.
22279 Accepted values are "
22280 (code "GL_CURRENT_QUERY")
22282 (code "GL_QUERY_COUNTER_BITS")
22284 (entry (% (heading (var "params")))
22286 Returns the requested data. ")))
22287 (heading "Description")
22288 (para (code "glGetQueryiv")
22291 " a selected parameter of the query object target
22295 (para (var "pname")
22296 " names a specific query object target parameter. When "
22299 (code "GL_SAMPLES_PASSED")
22302 " can be as follows: ")
22303 (table (% (formatter (asis)))
22304 (entry (% (heading (code "GL_CURRENT_QUERY")))
22305 (para (var "params")
22306 " returns the name of the currently active occlusion query object.
22307 If no occlusion query is active, 0 is returned. The initial value is 0. "))
22308 (entry (% (heading (code "GL_QUERY_COUNTER_BITS")))
22309 (para (var "params")
22310 " returns the number of bits in the query counter used to accumulate passing samples.
22311 If the number of bits returned is 0, the implementation does not support a query counter, and the results
22313 (code "glGetQueryObject")
22314 " are useless. ")))
22316 (para (code "GL_INVALID_ENUM")
22317 " is generated if "
22323 (para (code "GL_INVALID_OPERATION")
22324 " is generated if "
22325 (code "glGetQueryiv")
22327 is executed between the execution of "
22330 and the corresponding execution of "
22334 (define-gl-procedure
22339 (funcdef "void " (function "glGetQueryObjectiv"))
22340 (paramdef "GLuint " (parameter "id"))
22341 (paramdef "GLenum " (parameter "pname"))
22342 (paramdef "GLint * " (parameter "params"))))
22344 (heading "return parameters of a query object")
22345 (heading "Parameters")
22346 (table (% (formatter (asis)))
22347 (entry (% (heading (var "id")))
22349 Specifies the name of a query object. "))
22350 (entry (% (heading (var "pname")))
22352 Specifies the symbolic name of a query object parameter.
22353 Accepted values are "
22354 (code "GL_QUERY_RESULT")
22356 (code "GL_QUERY_RESULT_AVAILABLE")
22358 (entry (% (heading (var "params")))
22360 Returns the requested data. ")))
22361 (heading "Description")
22362 (para (code "glGetQueryObject")
22365 " a selected parameter of the query object
22369 (para (var "pname")
22370 " names a specific query object parameter. "
22372 " can be as follows: ")
22373 (table (% (formatter (asis)))
22374 (entry (% (heading (code "GL_QUERY_RESULT")))
22375 (para (var "params")
22376 " returns the value of the query object's passed samples counter.
22377 The initial value is 0. "))
22378 (entry (% (heading (code "GL_QUERY_RESULT_AVAILABLE")))
22379 (para (var "params")
22380 " returns whether the passed samples counter is immediately available.
22381 If a delay would occur waiting for the query result, "
22386 " is returned, which also indicates that the results of all
22387 previous queries are available as well. ")))
22389 (para (code "GL_INVALID_ENUM")
22390 " is generated if "
22392 " is not an accepted value. ")
22393 (para (code "GL_INVALID_OPERATION")
22394 " is generated if "
22396 " is not the name of a query object. ")
22397 (para (code "GL_INVALID_OPERATION")
22398 " is generated if "
22400 " is the name of a currently active
22402 (para (code "GL_INVALID_OPERATION")
22403 " is generated if "
22404 (code "glGetQueryObject")
22406 is executed between the execution of "
22409 and the corresponding execution of "
22413 (define-gl-procedure
22414 glGetSeparableFilter
22415 "glGetSeparableFilter"
22420 (function "glGetSeparableFilter"))
22421 (paramdef "GLenum " (parameter "target"))
22422 (paramdef "GLenum " (parameter "format"))
22423 (paramdef "GLenum " (parameter "type"))
22424 (paramdef "GLvoid * " (parameter "row"))
22425 (paramdef "GLvoid * " (parameter "column"))
22426 (paramdef "GLvoid * " (parameter "span"))))
22429 "get separable convolution filter kernel images")
22430 (heading "Parameters")
22431 (table (% (formatter (asis)))
22432 (entry (% (heading (var "target")))
22434 The separable filter to be retrieved.
22436 (code "GL_SEPARABLE_2D")
22438 (entry (% (heading (var "format")))
22440 Format of the output images.
22457 (code "GL_LUMINANCE")
22459 (code "GL_LUMINANCE_ALPHA")
22461 (entry (% (heading (var "type")))
22463 Data type of components in the output images.
22464 Symbolic constants "
22465 (code "GL_UNSIGNED_BYTE")
22471 (code "GL_UNSIGNED_SHORT")
22475 (code "GL_UNSIGNED_INT")
22481 (code "GL_UNSIGNED_BYTE_3_3_2")
22483 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
22485 (code "GL_UNSIGNED_SHORT_5_6_5")
22487 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
22489 (code "GL_UNSIGNED_SHORT_4_4_4_4")
22491 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
22493 (code "GL_UNSIGNED_SHORT_5_5_5_1")
22495 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
22497 (code "GL_UNSIGNED_INT_8_8_8_8")
22499 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
22501 (code "GL_UNSIGNED_INT_10_10_10_2")
22503 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
22506 (entry (% (heading (var "row")))
22508 Pointer to storage for the row filter image. "))
22509 (entry (% (heading (var "column")))
22511 Pointer to storage for the column filter image. "))
22512 (entry (% (heading (var "span")))
22514 Pointer to storage for the span filter image (currently unused). ")))
22515 (heading "Description")
22516 (para (code "glGetSeparableFilter")
22517 " returns the two one-dimensional filter kernel images for the
22518 current separable 2D convolution filter.
22519 The row image is placed in "
22521 " and the column image is placed in "
22523 " according to the specifications in "
22528 (In the current implementation, "
22530 " is not affected in any way.)
22531 No pixel transfer operations are performed on the images, but the relevant
22532 pixel storage modes are applied. ")
22534 If a non-zero named buffer object is bound to the "
22535 (code "GL_PIXEL_PACK_BUFFER")
22538 (code "glBindBuffer")
22539 ") while a separable convolution filter is
22546 " are treated as a byte offset into the buffer object's data store. ")
22548 Color components that are present in "
22550 " but not included in the
22551 internal format of the filters are returned as zero.
22552 The assignments of internal color components to the components of "
22557 (table (% (formatter (asis)))
22558 (entry (% (heading (strong "Internal Component")))
22559 (para (strong "Resulting Component")))
22560 (entry (% (heading "
22563 (entry (% (heading "
22566 (entry (% (heading "
22569 (entry (% (heading "
22572 (entry (% (heading "
22576 (entry (% (heading "
22582 (para (code "GL_INVALID_ENUM")
22583 " is generated if "
22586 (code "GL_SEPARABLE_2D")
22588 (para (code "GL_INVALID_ENUM")
22589 " is generated if "
22591 " is not one of the allowable
22593 (para (code "GL_INVALID_ENUM")
22594 " is generated if "
22596 " is not one of the allowable
22598 (para (code "GL_INVALID_OPERATION")
22599 " is generated if "
22602 (code "GL_UNSIGNED_BYTE_3_3_2")
22604 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
22606 (code "GL_UNSIGNED_SHORT_5_6_5")
22608 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
22615 (para (code "GL_INVALID_OPERATION")
22616 " is generated if "
22619 (code "GL_UNSIGNED_SHORT_4_4_4_4")
22621 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
22623 (code "GL_UNSIGNED_SHORT_5_5_5_1")
22625 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
22627 (code "GL_UNSIGNED_INT_8_8_8_8")
22629 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
22631 (code "GL_UNSIGNED_INT_10_10_10_2")
22633 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
22642 (para (code "GL_INVALID_OPERATION")
22643 " is generated if a non-zero buffer object name is bound to the "
22644 (code "GL_PIXEL_PACK_BUFFER")
22645 " target and the buffer object's data store is currently mapped. ")
22646 (para (code "GL_INVALID_OPERATION")
22647 " is generated if a non-zero buffer object name is bound to the "
22648 (code "GL_PIXEL_PACK_BUFFER")
22649 " target and the data would be packed to the buffer
22650 object such that the memory writes required would exceed the data store size. ")
22651 (para (code "GL_INVALID_OPERATION")
22652 " is generated if a non-zero buffer object name is bound to the "
22653 (code "GL_PIXEL_PACK_BUFFER")
22658 " is not evenly divisible
22659 into the number of bytes needed to store in memory a datum indicated by "
22662 (para (code "GL_INVALID_OPERATION")
22663 " is generated if "
22664 (code "glGetSeparableFilter")
22666 between the execution of "
22668 " and the corresponding
22673 (define-gl-procedure
22675 "glGetShaderInfoLog"
22678 (funcdef "void " (function "glGetShaderInfoLog"))
22679 (paramdef "GLuint " (parameter "shader"))
22680 (paramdef "GLsizei " (parameter "maxLength"))
22681 (paramdef "GLsizei *" (parameter "length"))
22682 (paramdef "GLchar *" (parameter "infoLog"))))
22685 "Returns the information log for a shader object")
22686 (heading "Parameters")
22687 (table (% (formatter (asis)))
22688 (entry (% (heading (var "shader")))
22689 (para "Specifies the shader object whose information
22690 \t\t log is to be queried."))
22691 (entry (% (heading (var "maxLength")))
22692 (para "Specifies the size of the character buffer for
22693 \t\t storing the returned information log."))
22694 (entry (% (heading (var "length")))
22695 (para "Returns the length of the string returned in "
22697 " (excluding the null
22698 \t\t terminator)."))
22699 (entry (% (heading (var "infoLog")))
22700 (para "Specifies an array of characters that is used
22701 \t\t to return the information log.")))
22702 (heading "Description")
22703 (para (code "glGetShaderInfoLog")
22705 \tinformation log for the specified shader object. The information
22706 \tlog for a shader object is modified when the shader is compiled.
22707 \tThe string that is returned will be null terminated.")
22708 (para (code "glGetShaderInfoLog")
22711 " as much of the information log as
22712 \tit can, up to a maximum of "
22715 characters. The number of characters actually returned,
22716 \texcluding the null termination character, is specified by\t"
22718 ". If the length of the returned
22719 \tstring is not required, a value of "
22722 \tbe passed in the "
22725 \tsize of the buffer required to store the returned information
22726 \tlog can be obtained by calling\t"
22727 (code "glGetShader")
22730 (code "GL_INFO_LOG_LENGTH")
22732 (para "The information log for a shader object is a string that
22733 \tmay contain diagnostic messages, warning messages, and other
22734 \tinformation about the last compile operation. When a shader
22735 \tobject is created, its information log will be a string of
22738 (para (code "GL_INVALID_VALUE")
22739 " is generated if\t"
22741 " is not a value generated by
22743 (para (code "GL_INVALID_OPERATION")
22744 " is generated if\t"
22746 " is not a shader object.")
22747 (para (code "GL_INVALID_VALUE")
22748 " is generated if\t"
22750 " is less than 0.")
22751 (para (code "GL_INVALID_OPERATION")
22752 " is generated if\t"
22753 (code "glGetShaderInfoLog")
22754 " is executed between the
22758 and the corresponding execution of\t"
22762 (define-gl-procedure
22764 "glGetShaderSource"
22767 (funcdef "void " (function "glGetShaderSource"))
22768 (paramdef "GLuint " (parameter "shader"))
22769 (paramdef "GLsizei " (parameter "bufSize"))
22770 (paramdef "GLsizei *" (parameter "length"))
22771 (paramdef "GLchar *" (parameter "source"))))
22774 "Returns the source code string from a shader object")
22775 (heading "Parameters")
22776 (table (% (formatter (asis)))
22777 (entry (% (heading (var "shader")))
22778 (para "Specifies the shader object to be
22780 (entry (% (heading (var "bufSize")))
22781 (para "Specifies the size of the character buffer for
22782 \t\t storing the returned source code string."))
22783 (entry (% (heading (var "length")))
22784 (para "Returns the length of the string returned in "
22786 " (excluding the null
22787 \t\t terminator)."))
22788 (entry (% (heading (var "source")))
22789 (para "Specifies an array of characters that is used
22790 \t\t to return the source code string.")))
22791 (heading "Description")
22792 (para (code "glGetShaderSource")
22794 \tconcatenation of the source code strings from the shader object
22798 \tstrings for a shader object are the result of a previous call to\t"
22799 (code "glShaderSource")
22801 \tThe string returned by the function will be null
22803 (para (code "glGetShaderSource")
22806 " as much of the source code string
22807 \tas it can, up to a maximum of "
22810 characters. The number of characters actually returned,
22811 \texcluding the null termination character, is specified by\t"
22813 ". If the length of the returned
22814 \tstring is not required, a value of "
22817 \tbe passed in the "
22820 \tsize of the buffer required to store the returned source code
22821 \tstring can be obtained by calling\t"
22822 (code "glGetShader")
22825 (code "GL_SHADER_SOURCE_LENGTH")
22828 (para (code "GL_INVALID_VALUE")
22829 " is generated if\t"
22831 " is not a value generated by
22833 (para (code "GL_INVALID_OPERATION")
22834 " is generated if\t"
22836 " is not a shader object.")
22837 (para (code "GL_INVALID_VALUE")
22838 " is generated if\t"
22840 " is less than 0.")
22841 (para (code "GL_INVALID_OPERATION")
22842 " is generated if\t"
22843 (code "glGetShaderSource")
22844 " is executed between the
22848 and the corresponding execution of\t"
22852 (define-gl-procedure
22857 (funcdef "void " (function "glGetShaderiv"))
22858 (paramdef "GLuint " (parameter "shader"))
22859 (paramdef "GLenum " (parameter "pname"))
22860 (paramdef "GLint *" (parameter "params"))))
22863 "Returns a parameter from a shader object")
22864 (heading "Parameters")
22865 (table (% (formatter (asis)))
22866 (entry (% (heading (var "shader")))
22867 (para "Specifies the shader object to be
22869 (entry (% (heading (var "pname")))
22870 (para "Specifies the object parameter. Accepted
22871 \t\t symbolic names are "
22872 (code "GL_SHADER_TYPE")
22874 (code "GL_DELETE_STATUS")
22876 (code "GL_COMPILE_STATUS")
22878 (code "GL_INFO_LOG_LENGTH")
22880 (code "GL_SHADER_SOURCE_LENGTH")
22882 (entry (% (heading (var "params")))
22883 (para "Returns the requested object parameter.")))
22884 (heading "Description")
22885 (para (code "glGetShader")
22890 the value of a parameter for a specific shader object. The
22891 \tfollowing parameters are defined:")
22892 (table (% (formatter (asis)))
22893 (entry (% (heading (code "GL_SHADER_TYPE")))
22894 (para (var "params")
22896 (code "GL_VERTEX_SHADER")
22899 " is a vertex shader
22901 (code "GL_FRAGMENT_SHADER")
22906 \t\t shader object."))
22907 (entry (% (heading (code "GL_DELETE_STATUS")))
22908 (para (var "params")
22913 " is currently flagged
22914 \t\t for deletion, and "
22918 (entry (% (heading (code "GL_COMPILE_STATUS")))
22919 (para (var "params")
22922 " if the last compile
22923 \t\t operation on "
22926 \t\t successful, and "
22930 (entry (% (heading (code "GL_INFO_LOG_LENGTH")))
22931 (para (var "params")
22933 \t\t number of characters in the information log for "
22935 " including the null
22936 \t\t termination character (i.e., the size of the
22937 \t\t character buffer required to store the information
22941 \t\t information log, a value of 0 is returned."))
22942 (entry (% (heading (code "GL_SHADER_SOURCE_LENGTH")))
22943 (para (var "params")
22945 \t\t length of the concatenation of the source strings
22946 \t\t that make up the shader source for the "
22948 ", including the null
22949 \t\t termination character. (i.e., the size of the
22950 \t\t character buffer required to store the shader
22951 \t\t source). If no source code exists, 0 is
22954 (para (code "GL_INVALID_VALUE")
22955 " is generated if\t"
22957 " is not a value generated by
22959 (para (code "GL_INVALID_OPERATION")
22960 " is generated if\t"
22962 " does not refer to a shader
22964 (para (code "GL_INVALID_ENUM")
22965 " is generated if\t"
22967 " is not an accepted value.")
22968 (para (code "GL_INVALID_OPERATION")
22969 " is generated if\t"
22970 (code "glGetShader")
22971 " is executed between the
22975 and the corresponding execution of\t"
22979 (define-gl-procedure
22986 (function "glGetString"))
22987 (paramdef "GLenum " (parameter "name"))))
22990 "return a string describing the current GL connection")
22991 (heading "Parameters")
22992 (table (% (formatter (asis)))
22993 (entry (% (heading (var "name")))
22995 Specifies a symbolic constant, one of "
22998 (code "GL_RENDERER")
23000 (code "GL_VERSION")
23002 (code "GL_SHADING_LANGUAGE_VERSION")
23004 (code "GL_EXTENSIONS")
23006 (heading "Description")
23007 (para (code "glGetString")
23008 " returns a pointer to a static string
23009 describing some aspect of the current GL connection. "
23011 " can be one of the following: ")
23012 (table (% (formatter (asis)))
23013 (entry (% (heading (code "GL_VENDOR")))
23016 Returns the company responsible for this GL implementation.
23017 This name does not change from release to release. "))
23018 (entry (% (heading (code "GL_RENDERER")))
23021 Returns the name of the renderer.
23022 This name is typically specific to a particular configuration of a hardware
23024 It does not change from release to release. "))
23025 (entry (% (heading (code "GL_VERSION")))
23028 Returns a version or release number. "))
23029 (entry (% (heading (code "GL_SHADING_LANGUAGE_VERSION")))
23032 Returns a version or release number for the shading language. "))
23033 (entry (% (heading (code "GL_EXTENSIONS")))
23036 Returns a space-separated list of supported extensions to GL. ")))
23038 Because the GL does not include queries for the performance
23039 characteristics of an implementation, some applications are written to
23040 recognize known platforms and modify their GL usage based on known
23041 performance characteristics of these platforms.
23045 (code "GL_RENDERER")
23046 " together uniquely specify
23047 a platform. They do not change from release to release and should be used
23048 by platform-recognition algorithms. ")
23050 Some applications want to make use of features that
23051 are not part of the standard GL. These features
23052 may be implemented as extensions to the standard GL.
23054 (code "GL_EXTENSIONS")
23055 " string is a space-separated
23056 list of supported GL extensions.
23057 (Extension names never contain a space character.) ")
23060 (code "GL_VERSION")
23062 (code "GL_SHADING_LANGUAGE_VERSION")
23063 " strings begin with a version number.
23064 The version number uses one
23066 (para (var "major_number.minor_number")
23067 (var "major_number.minor_number.release_number"))
23069 Vendor-specific information may follow the version
23070 number. Its format depends on the implementation, but
23071 a space always separates the version number and
23072 the vendor-specific information. ")
23074 All strings are null-terminated. ")
23076 (para (code "GL_INVALID_ENUM")
23077 " is generated if "
23079 " is not an accepted value. ")
23080 (para (code "GL_INVALID_OPERATION")
23081 " is generated if "
23082 (code "glGetString")
23084 is executed between the execution of "
23087 and the corresponding execution of "
23091 (define-gl-procedure
23096 (funcdef "void " (function "glGetTexEnvfv"))
23097 (paramdef "GLenum " (parameter "target"))
23098 (paramdef "GLenum " (parameter "pname"))
23099 (paramdef "GLfloat * " (parameter "params"))))
23101 (heading "return texture environment parameters")
23102 (heading "Parameters")
23103 (table (% (formatter (asis)))
23104 (entry (% (heading (var "target")))
23106 Specifies a texture environment. May be "
23107 (code "GL_TEXTURE_ENV")
23109 (code "GL_TEXTURE_FILTER_CONTROL")
23111 (code "GL_POINT_SPRITE")
23113 (entry (% (heading (var "pname")))
23115 Specifies the symbolic name of a texture environment parameter.
23116 Accepted values are "
23117 (code "GL_TEXTURE_ENV_MODE")
23119 (code "GL_TEXTURE_ENV_COLOR")
23121 (code "GL_TEXTURE_LOD_BIAS")
23123 (code "GL_COMBINE_RGB")
23125 (code "GL_COMBINE_ALPHA")
23127 (code "GL_SRC0_RGB")
23129 (code "GL_SRC1_RGB")
23131 (code "GL_SRC2_RGB")
23133 (code "GL_SRC0_ALPHA")
23135 (code "GL_SRC1_ALPHA")
23137 (code "GL_SRC2_ALPHA")
23139 (code "GL_OPERAND0_RGB")
23141 (code "GL_OPERAND1_RGB")
23143 (code "GL_OPERAND2_RGB")
23145 (code "GL_OPERAND0_ALPHA")
23147 (code "GL_OPERAND1_ALPHA")
23149 (code "GL_OPERAND2_ALPHA")
23151 (code "GL_RGB_SCALE")
23153 (code "GL_ALPHA_SCALE")
23155 (code "GL_COORD_REPLACE")
23157 (entry (% (heading (var "params")))
23159 Returns the requested data. ")))
23160 (heading "Description")
23161 (para (code "glGetTexEnv")
23164 " selected values of a texture environment that
23165 was specified with "
23169 " specifies a texture environment. ")
23174 (code "GL_TEXTURE_FILTER_CONTROL")
23178 (code "GL_TEXTURE_LOD_BIAS")
23183 (code "GL_POINT_SPRITE")
23187 (code "GL_COORD_REPLACE")
23192 (code "GL_TEXTURE_ENV")
23196 (code "GL_TEXTURE_ENV_MODE")
23198 (code "GL_TEXTURE_ENV_COLOR")
23200 (code "GL_COMBINE_RGB")
23202 (code "GL_COMBINE_ALPHA")
23204 (code "GL_RGB_SCALE")
23206 (code "GL_ALPHA_SCALE")
23208 (code "GL_SRC0_RGB")
23210 (code "GL_SRC1_RGB")
23212 (code "GL_SRC2_RGB")
23214 (code "GL_SRC0_ALPHA")
23216 (code "GL_SRC1_ALPHA")
23218 (code "GL_SRC2_ALPHA")
23220 (para (var "pname")
23221 " names a specific texture environment parameter, as follows: ")
23222 (table (% (formatter (asis)))
23223 (entry (% (heading (code "GL_TEXTURE_ENV_MODE")))
23224 (para (var "params")
23225 " returns the single-valued texture environment mode,
23226 a symbolic constant. The initial value is "
23227 (code "GL_MODULATE")
23229 (entry (% (heading (code "GL_TEXTURE_ENV_COLOR")))
23230 (para (var "params")
23231 " returns four integer or floating-point values that are the
23232 texture environment color.
23235 are linearly mapped from the internal floating-point representation
23236 such that 1.0 maps to the most positive representable integer,
23240 maps to the most negative representable integer. The initial
23241 value is (0, 0, 0, 0). "))
23242 (entry (% (heading (code "GL_TEXTURE_LOD_BIAS")))
23243 (para (var "params")
23244 " returns a single floating-point value that is the texture
23245 level-of-detail bias. The initial value is 0. "))
23246 (entry (% (heading (code "GL_COMBINE_RGB")))
23247 (para (var "params")
23248 " returns a single symbolic constant value representing the current
23249 RGB combine mode. The initial value is "
23250 (code "GL_MODULATE")
23252 (entry (% (heading (code "GL_COMBINE_ALPHA")))
23253 (para (var "params")
23254 " returns a single symbolic constant value representing the current
23255 alpha combine mode. The initial value is "
23256 (code "GL_MODULATE")
23258 (entry (% (heading (code "GL_SRC0_RGB")))
23259 (para (var "params")
23260 " returns a single symbolic constant value representing the texture
23261 combiner zero's RGB source. The initial value is "
23262 (code "GL_TEXTURE")
23264 (entry (% (heading (code "GL_SRC1_RGB")))
23265 (para (var "params")
23266 " returns a single symbolic constant value representing the texture
23267 combiner one's RGB source. The initial value is "
23268 (code "GL_PREVIOUS")
23270 (entry (% (heading (code "GL_SRC2_RGB")))
23271 (para (var "params")
23272 " returns a single symbolic constant value representing the texture
23273 combiner two's RGB source. The initial value is "
23274 (code "GL_CONSTANT")
23276 (entry (% (heading (code "GL_SRC0_ALPHA")))
23277 (para (var "params")
23278 " returns a single symbolic constant value representing the texture
23279 combiner zero's alpha source. The initial value is "
23280 (code "GL_TEXTURE")
23282 (entry (% (heading (code "GL_SRC1_ALPHA")))
23283 (para (var "params")
23284 " returns a single symbolic constant value representing the texture
23285 combiner one's alpha source. The initial value is "
23286 (code "GL_PREVIOUS")
23288 (entry (% (heading (code "GL_SRC2_ALPHA")))
23289 (para (var "params")
23290 " returns a single symbolic constant value representing the texture
23291 combiner two's alpha source. The initial value is "
23292 (code "GL_CONSTANT")
23294 (entry (% (heading (code "GL_OPERAND0_RGB")))
23295 (para (var "params")
23296 " returns a single symbolic constant value representing the texture
23297 combiner zero's RGB operand. The initial value is "
23298 (code "GL_SRC_COLOR")
23300 (entry (% (heading (code "GL_OPERAND1_RGB")))
23301 (para (var "params")
23302 " returns a single symbolic constant value representing the texture
23303 combiner one's RGB operand. The initial value is "
23304 (code "GL_SRC_COLOR")
23306 (entry (% (heading (code "GL_OPERAND2_RGB")))
23307 (para (var "params")
23308 " returns a single symbolic constant value representing the texture
23309 combiner two's RGB operand. The initial value is "
23310 (code "GL_SRC_ALPHA")
23312 (entry (% (heading (code "GL_OPERAND0_ALPHA")))
23313 (para (var "params")
23314 " returns a single symbolic constant value representing the texture
23315 combiner zero's alpha operand. The initial value is "
23316 (code "GL_SRC_ALPHA")
23318 (entry (% (heading (code "GL_OPERAND1_ALPHA")))
23319 (para (var "params")
23320 " returns a single symbolic constant value representing the texture
23321 combiner one's alpha operand. The initial value is "
23322 (code "GL_SRC_ALPHA")
23324 (entry (% (heading (code "GL_OPERAND2_ALPHA")))
23325 (para (var "params")
23326 " returns a single symbolic constant value representing the texture
23327 combiner two's alpha operand. The initial value is "
23328 (code "GL_SRC_ALPHA")
23330 (entry (% (heading (code "GL_RGB_SCALE")))
23331 (para (var "params")
23332 " returns a single floating-point value representing the current RGB
23333 texture combiner scaling factor. The initial value is 1.0. "))
23334 (entry (% (heading (code "GL_ALPHA_SCALE")))
23335 (para (var "params")
23336 " returns a single floating-point value representing the current alpha
23337 texture combiner scaling factor. The initial value is 1.0. "))
23338 (entry (% (heading (code "GL_COORD_REPLACE")))
23339 (para (var "params")
23340 " returns a single boolean value representing the current point sprite
23341 texture coordinate replacement enable state. The initial value is "
23345 (para (code "GL_INVALID_ENUM")
23346 " is generated if "
23352 (para (code "GL_INVALID_OPERATION")
23353 " is generated if "
23354 (code "glGetTexEnv")
23356 is executed between the execution of "
23359 and the corresponding execution of "
23363 (define-gl-procedure
23368 (funcdef "void " (function "glGetTexGendv"))
23369 (paramdef "GLenum " (parameter "coord"))
23370 (paramdef "GLenum " (parameter "pname"))
23371 (paramdef "GLdouble * " (parameter "params"))))
23374 "return texture coordinate generation parameters")
23375 (heading "Parameters")
23376 (table (% (formatter (asis)))
23377 (entry (% (heading (var "coord")))
23379 Specifies a texture coordinate.
23389 (entry (% (heading (var "pname")))
23391 Specifies the symbolic name of the value(s) to be returned.
23393 (code "GL_TEXTURE_GEN_MODE")
23395 or the name of one of the texture generation plane equations: "
23396 (code "GL_OBJECT_PLANE")
23398 (code "GL_EYE_PLANE")
23400 (entry (% (heading (var "params")))
23402 Returns the requested data. ")))
23403 (heading "Description")
23404 (para (code "glGetTexGen")
23407 " selected parameters of a texture coordinate
23408 generation function that was specified using "
23412 " names one of the ("
23421 texture coordinates,
23422 using the symbolic constant "
23431 (para (var "pname")
23432 " specifies one of three symbolic names: ")
23433 (table (% (formatter (asis)))
23434 (entry (% (heading (code "GL_TEXTURE_GEN_MODE")))
23435 (para (var "params")
23436 " returns the single-valued texture generation function,
23437 a symbolic constant. The initial value is "
23438 (code "GL_EYE_LINEAR")
23440 (entry (% (heading (code "GL_OBJECT_PLANE")))
23441 (para (var "params")
23442 " returns the four plane equation coefficients that specify
23443 object linear-coordinate generation.
23444 Integer values, when requested,
23445 are mapped directly from the internal floating-point representation. "))
23446 (entry (% (heading (code "GL_EYE_PLANE")))
23447 (para (var "params")
23448 " returns the four plane equation coefficients that specify
23449 eye linear-coordinate generation.
23452 are mapped directly from the internal floating-point representation.
23453 The returned values are those maintained in eye coordinates.
23454 They are not equal to the values specified using "
23457 unless the modelview matrix was identity when "
23461 (para (code "GL_INVALID_ENUM")
23462 " is generated if "
23468 (para (code "GL_INVALID_OPERATION")
23469 " is generated if "
23470 (code "glGetTexGen")
23472 is executed between the execution of "
23475 and the corresponding execution of "
23479 (define-gl-procedure
23484 (funcdef "void " (function "glGetTexImage"))
23485 (paramdef "GLenum " (parameter "target"))
23486 (paramdef "GLint " (parameter "level"))
23487 (paramdef "GLenum " (parameter "format"))
23488 (paramdef "GLenum " (parameter "type"))
23489 (paramdef "GLvoid * " (parameter "img"))))
23491 (heading "return a texture image")
23492 (heading "Parameters")
23493 (table (% (formatter (asis)))
23494 (entry (% (heading (var "target")))
23496 Specifies which texture is to be obtained. "
23497 (code "GL_TEXTURE_1D")
23499 (code "GL_TEXTURE_2D")
23501 (code "GL_TEXTURE_3D")
23503 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_X")
23505 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_X")
23507 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Y")
23509 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y")
23511 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Z")
23513 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z")
23514 " are accepted. "))
23515 (entry (% (heading (var "level")))
23517 Specifies the level-of-detail number of the desired image.
23518 Level 0 is the base image level.
23525 mipmap reduction image. "))
23526 (entry (% (heading (var "format")))
23528 Specifies a pixel format for the returned data.
23529 The supported formats are "
23546 (code "GL_LUMINANCE")
23548 (code "GL_LUMINANCE_ALPHA")
23550 (entry (% (heading (var "type")))
23552 Specifies a pixel type for the returned data.
23553 The supported types are "
23554 (code "GL_UNSIGNED_BYTE")
23558 (code "GL_UNSIGNED_SHORT")
23562 (code "GL_UNSIGNED_INT")
23568 (code "GL_UNSIGNED_BYTE_3_3_2")
23570 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
23572 (code "GL_UNSIGNED_SHORT_5_6_5")
23574 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
23576 (code "GL_UNSIGNED_SHORT_4_4_4_4")
23578 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
23580 (code "GL_UNSIGNED_SHORT_5_5_5_1")
23582 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
23584 (code "GL_UNSIGNED_INT_8_8_8_8")
23586 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
23588 (code "GL_UNSIGNED_INT_10_10_10_2")
23590 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
23592 (entry (% (heading (var "img")))
23594 Returns the texture image.
23595 Should be a pointer to an array of the type specified by "
23598 (heading "Description")
23599 (para (code "glGetTexImage")
23600 " returns a texture image into "
23604 " specifies whether the desired texture image is one specified by "
23605 (code "glTexImage1D")
23607 (code "GL_TEXTURE_1D")
23609 (code "glTexImage2D")
23611 (code "GL_TEXTURE_2D")
23613 (code "GL_TEXTURE_CUBE_MAP_*")
23616 (code "glTexImage3D")
23618 (code "GL_TEXTURE_3D")
23621 " specifies the level-of-detail number of the desired image. "
23625 " specify the format and type of the desired image array.
23626 See the reference pages "
23627 (code "glTexImage1D")
23629 (code "glDrawPixels")
23631 for a description of the acceptable values for the "
23636 parameters, respectively. ")
23638 If a non-zero named buffer object is bound to the "
23639 (code "GL_PIXEL_PACK_BUFFER")
23642 (code "glBindBuffer")
23643 ") while a texture image is
23646 " is treated as a byte offset into the buffer object's data store. ")
23648 To understand the operation of "
23649 (code "glGetTexImage")
23650 ", consider the selected internal
23651 four-component texture image to be an RGBA color buffer the size of the image.
23653 (code "glGetTexImage")
23654 " are then identical to those of "
23655 (code "glReadPixels")
23657 with the exception that no pixel transfer operations are performed,
23658 when called with the same "
23669 " set to the width of the texture image
23670 (including border if one was specified),
23673 " set to 1 for 1D images,
23674 or to the height of the texture image
23675 (including border if one was specified)
23677 Because the internal texture image is an RGBA image,
23679 (code "GL_COLOR_INDEX")
23681 (code "GL_STENCIL_INDEX")
23684 (code "GL_DEPTH_COMPONENT")
23685 " are not accepted,
23688 " is not accepted. ")
23690 If the selected texture image does not contain four components,
23691 the following mappings are applied.
23692 Single-component textures are treated as RGBA buffers with red set
23693 to the single-component value,
23694 green set to 0, blue set to 0, and alpha set to 1.
23695 Two-component textures are treated as RGBA buffers with red set to
23696 the value of component zero,
23697 alpha set to the value of component one,
23698 and green and blue set to 0.
23700 three-component textures are treated as RGBA buffers with red set to
23702 green set to component one,
23703 blue set to component two,
23704 and alpha set to 1. ")
23706 To determine the required size of "
23710 (code "glGetTexLevelParameter")
23711 " to determine the dimensions of the
23712 internal texture image,
23713 then scale the required number of pixels by the storage required for
23720 Be sure to take the pixel storage parameters into account,
23722 (code "GL_PACK_ALIGNMENT")
23725 (para (code "GL_INVALID_ENUM")
23726 " is generated if "
23733 an accepted value. ")
23734 (para (code "GL_INVALID_VALUE")
23735 " is generated if "
23737 " is less than 0. ")
23738 (para (code "GL_INVALID_VALUE")
23739 " may be generated if "
23755 is the returned value of "
23756 (code "GL_MAX_TEXTURE_SIZE")
23758 (para (code "GL_INVALID_OPERATION")
23762 (code "GL_UNSIGNED_BYTE_3_3_2")
23764 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
23766 (code "GL_UNSIGNED_SHORT_5_6_5")
23768 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
23774 (para (code "GL_INVALID_OPERATION")
23778 (code "GL_UNSIGNED_SHORT_4_4_4_4")
23780 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
23782 (code "GL_UNSIGNED_SHORT_5_5_5_1")
23784 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
23786 (code "GL_UNSIGNED_INT_8_8_8_8")
23788 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
23790 (code "GL_UNSIGNED_INT_10_10_10_2")
23792 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
23801 (para (code "GL_INVALID_OPERATION")
23802 " is generated if a non-zero buffer object name is bound to the "
23803 (code "GL_PIXEL_PACK_BUFFER")
23804 " target and the buffer object's data store is currently mapped. ")
23805 (para (code "GL_INVALID_OPERATION")
23806 " is generated if a non-zero buffer object name is bound to the "
23807 (code "GL_PIXEL_PACK_BUFFER")
23808 " target and the data would be packed to the buffer
23809 object such that the memory writes required would exceed the data store size. ")
23810 (para (code "GL_INVALID_OPERATION")
23811 " is generated if a non-zero buffer object name is bound to the "
23812 (code "GL_PIXEL_PACK_BUFFER")
23815 " is not evenly divisible
23816 into the number of bytes needed to store in memory a datum indicated by "
23819 (para (code "GL_INVALID_OPERATION")
23820 " is generated if "
23821 (code "glGetTexImage")
23823 is executed between the execution of "
23826 and the corresponding execution of "
23830 (define-gl-procedure
23831 glGetTexLevelParameter
23832 "glGetTexLevelParameter"
23837 (function "glGetTexLevelParameterfv"))
23838 (paramdef "GLenum " (parameter "target"))
23839 (paramdef "GLint " (parameter "level"))
23840 (paramdef "GLenum " (parameter "pname"))
23841 (paramdef "GLfloat * " (parameter "params"))))
23844 "return texture parameter values for a specific level of detail")
23845 (heading "Parameters")
23846 (table (% (formatter (asis)))
23847 (entry (% (heading (var "target")))
23849 Specifies the symbolic name of the target texture,
23851 (code "GL_TEXTURE_1D")
23853 (code "GL_TEXTURE_2D")
23855 (code "GL_TEXTURE_3D")
23857 (code "GL_PROXY_TEXTURE_1D")
23859 (code "GL_PROXY_TEXTURE_2D")
23861 (code "GL_PROXY_TEXTURE_3D")
23863 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_X")
23865 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_X")
23867 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Y")
23869 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y")
23871 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Z")
23873 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z")
23875 (code "GL_PROXY_TEXTURE_CUBE_MAP")
23877 (entry (% (heading (var "level")))
23879 Specifies the level-of-detail number of the desired image.
23880 Level 0 is the base image level.
23887 mipmap reduction image. "))
23888 (entry (% (heading (var "pname")))
23890 Specifies the symbolic name of a texture parameter. "
23891 (code "GL_TEXTURE_WIDTH")
23893 (code "GL_TEXTURE_HEIGHT")
23895 (code "GL_TEXTURE_DEPTH")
23897 (code "GL_TEXTURE_INTERNAL_FORMAT")
23899 (code "GL_TEXTURE_BORDER")
23901 (code "GL_TEXTURE_RED_SIZE")
23903 (code "GL_TEXTURE_GREEN_SIZE")
23905 (code "GL_TEXTURE_BLUE_SIZE")
23907 (code "GL_TEXTURE_ALPHA_SIZE")
23909 (code "GL_TEXTURE_LUMINANCE_SIZE")
23911 (code "GL_TEXTURE_INTENSITY_SIZE")
23913 (code "GL_TEXTURE_DEPTH_SIZE")
23915 (code "GL_TEXTURE_COMPRESSED")
23917 (code "GL_TEXTURE_COMPRESSED_IMAGE_SIZE")
23920 (entry (% (heading (var "params")))
23922 Returns the requested data. ")))
23923 (heading "Description")
23924 (para (code "glGetTexLevelParameter")
23927 " texture parameter values for a specific
23928 level-of-detail value,
23933 " defines the target texture,
23935 (code "GL_TEXTURE_1D")
23937 (code "GL_TEXTURE_2D")
23939 (code "GL_TEXTURE_3D")
23941 (code "GL_PROXY_TEXTURE_1D")
23943 (code "GL_PROXY_TEXTURE_2D")
23945 (code "GL_PROXY_TEXTURE_3D")
23947 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_X")
23949 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_X")
23951 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Y")
23953 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y")
23955 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Z")
23957 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z")
23959 (code "GL_PROXY_TEXTURE_CUBE_MAP")
23961 (para (code "GL_MAX_TEXTURE_SIZE")
23963 (code "GL_MAX_3D_TEXTURE_SIZE")
23965 descriptive enough.
23966 It has to report the largest square texture image that can be
23967 accommodated with mipmaps and borders,
23968 but a long skinny texture, or a texture without mipmaps and borders, may
23969 easily fit in texture memory.
23970 The proxy targets allow the user to more accurately query
23971 whether the GL can accommodate a texture of a given configuration.
23972 If the texture cannot be accommodated, the texture state variables, which
23973 may be queried with "
23974 (code "glGetTexLevelParameter")
23975 ", are set to 0. If the texture can be accommodated,
23976 the texture state values will be set as they would be set for a
23977 non-proxy target. ")
23978 (para (var "pname")
23979 " specifies the texture parameter whose value or values
23980 will be returned. ")
23982 The accepted parameter names are as follows: ")
23983 (table (% (formatter (asis)))
23984 (entry (% (heading (code "GL_TEXTURE_WIDTH")))
23986 (para (var "params")
23987 " returns a single value,
23988 the width of the texture image.
23989 This value includes the border of the texture image. The initial value is
23991 (entry (% (heading (code "GL_TEXTURE_HEIGHT")))
23993 (para (var "params")
23994 " returns a single value,
23995 the height of the texture image.
23996 This value includes the border of the texture image. The initial value is
23998 (entry (% (heading (code "GL_TEXTURE_DEPTH")))
24000 (para (var "params")
24001 " returns a single value,
24002 the depth of the texture image.
24003 This value includes the border of the texture image. The initial value is
24005 (entry (% (heading (code "GL_TEXTURE_INTERNAL_FORMAT")))
24007 (para (var "params")
24008 " returns a single value,
24009 the internal format of the texture image. "))
24010 (entry (% (heading (code "GL_TEXTURE_BORDER")))
24012 (para (var "params")
24013 " returns a single value,
24014 the width in pixels of the border of the texture image. The initial value
24016 (entry (% (heading (code "GL_TEXTURE_RED_SIZE") ",")))
24017 (entry (% (heading (code "GL_TEXTURE_GREEN_SIZE") ",")))
24018 (entry (% (heading (code "GL_TEXTURE_BLUE_SIZE") ",")))
24019 (entry (% (heading (code "GL_TEXTURE_ALPHA_SIZE") ",")))
24020 (entry (% (heading (code "GL_TEXTURE_LUMINANCE_SIZE") ",")))
24021 (entry (% (heading (code "GL_TEXTURE_INTENSITY_SIZE") ",")))
24022 (entry (% (heading (code "GL_TEXTURE_DEPTH_SIZE")))
24025 The internal storage resolution of an individual component.
24026 The resolution chosen by the GL will be a close match for the resolution
24027 requested by the user with the component argument of "
24028 (code "glTexImage1D")
24030 (code "glTexImage2D")
24032 (code "glTexImage3D")
24034 (code "glCopyTexImage1D")
24036 (code "glCopyTexImage2D")
24037 ". The initial value is 0. "))
24038 (entry (% (heading (code "GL_TEXTURE_COMPRESSED")))
24040 (para (var "params")
24041 " returns a single boolean value indicating if the texture image is
24042 stored in a compressed internal format. The initiali value is "
24046 (code "GL_TEXTURE_COMPRESSED_IMAGE_SIZE")))
24048 (para (var "params")
24049 " returns a single integer value, the number of unsigned bytes of the
24050 compressed texture image that would be returned from "
24051 (code "glGetCompressedTexImage")
24054 (para (code "GL_INVALID_ENUM")
24055 " is generated if "
24061 (para (code "GL_INVALID_VALUE")
24062 " is generated if "
24064 " is less than 0. ")
24065 (para (code "GL_INVALID_VALUE")
24066 " may be generated if "
24070 (math (var "log") "_" "2")
24075 " is the returned value of "
24076 (code "GL_MAX_TEXTURE_SIZE")
24078 (para (code "GL_INVALID_OPERATION")
24079 " is generated if "
24080 (code "glGetTexLevelParameter")
24082 is executed between the execution of "
24085 and the corresponding execution of "
24088 (para (code "GL_INVALID_OPERATION")
24089 " is generated if "
24090 (code "GL_TEXTURE_COMPRESSED_IMAGE_SIZE")
24091 " is queried on texture images with an
24092 uncompressed internal format or on proxy targets. ")))
24094 (define-gl-procedure
24096 "glGetTexParameter"
24101 (function "glGetTexParameterfv"))
24102 (paramdef "GLenum " (parameter "target"))
24103 (paramdef "GLenum " (parameter "pname"))
24104 (paramdef "GLfloat * " (parameter "params"))))
24106 (heading "return texture parameter values")
24107 (heading "Parameters")
24108 (table (% (formatter (asis)))
24109 (entry (% (heading (var "target")))
24111 Specifies the symbolic name of the target texture. "
24112 (code "GL_TEXTURE_1D")
24114 (code "GL_TEXTURE_2D")
24116 (code "GL_TEXTURE_3D")
24118 (code "GL_TEXTURE_CUBE_MAP")
24121 (entry (% (heading (var "pname")))
24123 Specifies the symbolic name of a texture parameter. "
24124 (code "GL_TEXTURE_MAG_FILTER")
24126 (code "GL_TEXTURE_MIN_FILTER")
24128 (code "GL_TEXTURE_MIN_LOD")
24130 (code "GL_TEXTURE_MAX_LOD")
24132 (code "GL_TEXTURE_BASE_LEVEL")
24134 (code "GL_TEXTURE_MAX_LEVEL")
24136 (code "GL_TEXTURE_WRAP_S")
24138 (code "GL_TEXTURE_WRAP_T")
24140 (code "GL_TEXTURE_WRAP_R")
24142 (code "GL_TEXTURE_BORDER_COLOR")
24144 (code "GL_TEXTURE_PRIORITY")
24146 (code "GL_TEXTURE_RESIDENT")
24148 (code "GL_TEXTURE_COMPARE_MODE")
24150 (code "GL_TEXTURE_COMPARE_FUNC")
24152 (code "GL_DEPTH_TEXTURE_MODE")
24154 (code "GL_GENERATE_MIPMAP")
24157 (entry (% (heading (var "params")))
24159 Returns the texture parameters. ")))
24160 (heading "Description")
24161 (para (code "glGetTexParameter")
24164 " the value or values of the texture parameter
24169 " defines the target texture,
24171 (code "GL_TEXTURE_1D")
24173 (code "GL_TEXTURE_2D")
24175 (code "GL_TEXTURE_3D")
24177 (code "GL_TEXTURE_CUBE_MAP")
24179 to specify one-, two-, or three-dimensional or cube-mapped texturing. "
24181 " accepts the same symbols as "
24182 (code "glTexParameter")
24184 with the same interpretations: ")
24185 (table (% (formatter (asis)))
24186 (entry (% (heading (code "GL_TEXTURE_MAG_FILTER")))
24188 Returns the single-valued texture magnification filter,
24189 a symbolic constant. The initial value is "
24192 (entry (% (heading (code "GL_TEXTURE_MIN_FILTER")))
24194 Returns the single-valued texture minification filter,
24195 a symbolic constant. The initial value is "
24196 (code "GL_NEAREST_MIPMAP_LINEAR")
24198 (entry (% (heading (code "GL_TEXTURE_MIN_LOD")))
24200 Returns the single-valued texture minimum level-of-detail value. The
24204 (entry (% (heading (code "GL_TEXTURE_MAX_LOD")))
24206 Returns the single-valued texture maximum level-of-detail value. The
24207 initial value is 1000. "))
24208 (entry (% (heading (code "GL_TEXTURE_BASE_LEVEL")))
24210 Returns the single-valued base texture mipmap level. The initial value is 0. "))
24211 (entry (% (heading (code "GL_TEXTURE_MAX_LEVEL")))
24213 Returns the single-valued maximum texture mipmap array level. The initial
24215 (entry (% (heading (code "GL_TEXTURE_WRAP_S")))
24217 Returns the single-valued wrapping function for texture coordinate "
24220 a symbolic constant. The initial value is "
24223 (entry (% (heading (code "GL_TEXTURE_WRAP_T")))
24225 Returns the single-valued wrapping function for texture coordinate "
24228 a symbolic constant. The initial value is "
24231 (entry (% (heading (code "GL_TEXTURE_WRAP_R")))
24233 Returns the single-valued wrapping function for texture coordinate "
24236 a symbolic constant. The initial value is "
24239 (entry (% (heading (code "GL_TEXTURE_BORDER_COLOR")))
24241 Returns four integer or floating-point numbers that comprise the RGBA color
24242 of the texture border.
24243 Floating-point values are returned in the range "
24244 (math "[" "0" "," "1" "]")
24246 Integer values are returned as a linear mapping of the internal floating-point
24247 representation such that 1.0 maps to the most positive representable
24251 maps to the most negative representable
24252 integer. The initial value is (0, 0, 0, 0). "))
24253 (entry (% (heading (code "GL_TEXTURE_PRIORITY")))
24255 Returns the residence priority of the target texture (or the named
24256 texture bound to it). The initial value is 1.
24258 (code "glPrioritizeTextures")
24260 (entry (% (heading (code "GL_TEXTURE_RESIDENT")))
24262 Returns the residence status of the target texture.
24263 If the value returned in "
24268 resident in texture memory.
24270 (code "glAreTexturesResident")
24272 (entry (% (heading (code "GL_TEXTURE_COMPARE_MODE")))
24274 Returns a single-valued texture comparison mode, a symbolic constant. The
24278 (code "glTexParameter")
24280 (entry (% (heading (code "GL_TEXTURE_COMPARE_FUNC")))
24282 Returns a single-valued texture comparison function, a symbolic constant. The
24286 (code "glTexParameter")
24288 (entry (% (heading (code "GL_DEPTH_TEXTURE_MODE")))
24290 Returns a single-valued texture format indicating how the depth values
24291 should be converted into color components. The initial value is "
24292 (code "GL_LUMINANCE")
24294 (code "glTexParameter")
24296 (entry (% (heading (code "GL_GENERATE_MIPMAP")))
24298 Returns a single boolean value indicating if automatic mipmap level updates
24301 (code "glTexParameter")
24304 (para (code "GL_INVALID_ENUM")
24305 " is generated if "
24311 (para (code "GL_INVALID_OPERATION")
24312 " is generated if "
24313 (code "glGetTexParameter")
24315 is executed between the execution of "
24318 and the corresponding execution of "
24322 (define-gl-procedure
24323 glGetUniformLocation
24324 "glGetUniformLocation"
24329 (function "glGetUniformLocation"))
24330 (paramdef "GLuint " (parameter "program"))
24331 (paramdef "const GLchar *" (parameter "name"))))
24334 "Returns the location of a uniform variable")
24335 (heading "Parameters")
24336 (table (% (formatter (asis)))
24337 (entry (% (heading (var "program")))
24338 (para "Specifies the program object to be
24340 (entry (% (heading (var "name")))
24341 (para "Points to a null terminated string containing
24342 \t\t the name of the uniform variable whose location is
24343 \t\t to be queried.")))
24344 (heading "Description")
24345 (para (code "glGetUniformLocation ")
24347 \tinteger that represents the location of a specific uniform
24348 \tvariable within a program object. "
24351 must be a null terminated string that contains no white space.\t"
24353 " must be an active uniform variable
24356 " that is not a structure,
24357 \tan array of structures, or a subcomponent of a vector or a
24358 \tmatrix. This function returns -1 if "
24361 does not correspond to an active uniform variable in\t"
24366 starts with the reserved prefix \"gl_\".")
24367 (para "Uniform variables that are structures or arrays of
24368 \tstructures may be queried by calling\t"
24369 (code "glGetUniformLocation")
24370 " for each field within
24371 \tthe structure. The array element operator \"[]\" and the
24372 \tstructure field operator \".\" may be used in\t"
24374 " in order to select elements within
24375 \tan array or fields within a structure. The result of using these
24376 \toperators is not allowed to be another structure, an array of
24377 \tstructures, or a subcomponent of a vector or a matrix. Except if
24378 \tthe last part of "
24380 " indicates a uniform
24381 \tvariable array, the location of the first element of an array
24382 \tcan be retrieved by using the name of the array, or by using the
24383 \tname appended by \"[0]\".")
24384 (para "The actual locations assigned to uniform variables are not
24385 \tknown until the program object is linked successfully. After
24386 \tlinking has occurred, the command\t"
24387 (code "glGetUniformLocation")
24388 " can be used to obtain
24389 \tthe location of a uniform variable. This location value can then
24393 to set the value of the uniform variable or to\t"
24394 (code "glGetUniform")
24396 in order to query the current value of the uniform variable.
24397 \tAfter a program object has been linked successfully, the index
24398 \tvalues for uniform variables remain fixed until the next link
24399 \tcommand occurs. Uniform variable locations and values can only
24400 \tbe queried after a link if the link was successful.")
24402 (para (code "GL_INVALID_VALUE")
24403 " is generated if\t"
24405 " is not a value generated by
24407 (para (code "GL_INVALID_OPERATION")
24408 " is generated if\t"
24410 " is not a program object.")
24411 (para (code "GL_INVALID_OPERATION")
24412 " is generated if\t"
24414 " has not been successfully
24416 (para (code "GL_INVALID_OPERATION")
24417 " is generated if\t"
24418 (code "glGetUniformLocation")
24419 " is executed between
24420 \tthe execution of\t"
24423 and the corresponding execution of\t"
24427 (define-gl-procedure
24432 (funcdef "void " (function "glGetUniformfv"))
24433 (paramdef "GLuint " (parameter "program"))
24434 (paramdef "GLint " (parameter "location"))
24435 (paramdef "GLfloat *" (parameter "params")))
24437 (funcdef "void " (function "glGetUniformiv"))
24438 (paramdef "GLuint " (parameter "program"))
24439 (paramdef "GLint " (parameter "location"))
24440 (paramdef "GLint *" (parameter "params"))))
24443 "Returns the value of a uniform variable")
24444 (heading "Parameters")
24445 (table (% (formatter (asis)))
24446 (entry (% (heading (var "program")))
24447 (para "Specifies the program object to be
24449 (entry (% (heading (var "location")))
24450 (para "Specifies the location of the uniform variable
24451 \t\t to be queried."))
24452 (entry (% (heading (var "params")))
24453 (para "Returns the value of the specified uniform
24455 (heading "Description")
24456 (para (code "glGetUniform")
24459 " the value(s) of the specified
24460 \tuniform variable. The type of the uniform variable specified by\t"
24462 " determines the number of values
24463 \treturned. If the uniform variable is defined in the shader as a
24464 \tboolean, int, or float, a single value will be returned. If it
24465 \tis defined as a vec2, ivec2, or bvec2, two values will be
24466 \treturned. If it is defined as a vec3, ivec3, or bvec3, three
24467 \tvalues will be returned, and so on. To query values stored in
24468 \tuniform variables declared as arrays, call\t"
24469 (code "glGetUniform")
24470 " for each element of the array.
24471 \tTo query values stored in uniform variables declared as
24472 \tstructures, call "
24473 (code "glGetUniform")
24475 \tfield in the structure. The values for uniform variables
24476 \tdeclared as a matrix will be returned in column major
24478 (para "The locations assigned to uniform variables are not known
24479 \tuntil the program object is linked. After linking has occurred,
24481 (code "glGetUniformLocation")
24483 can be used to obtain the location of a uniform variable. This
24484 \tlocation value can then be passed to\t"
24485 (code "glGetUniform")
24486 " in order to query the current
24487 \tvalue of the uniform variable. After a program object has been
24488 \tlinked successfully, the index values for uniform variables
24489 \tremain fixed until the next link command occurs. The uniform
24490 \tvariable values can only be queried after a link if the link was
24493 (para (code "GL_INVALID_VALUE")
24494 " is generated if\t"
24496 " is not a value generated by
24498 (para (code "GL_INVALID_OPERATION")
24499 " is generated if\t"
24501 " is not a program object.")
24502 (para (code "GL_INVALID_OPERATION")
24503 " is generated if\t"
24505 " has not been successfully
24507 (para (code "GL_INVALID_OPERATION")
24508 " is generated if\t"
24510 " does not correspond to a valid
24511 \tuniform variable location for the specified program object.")
24512 (para (code "GL_INVALID_OPERATION")
24513 " is generated if\t"
24514 (code "glGetUniform")
24515 " is executed between the
24519 and the corresponding execution of\t"
24523 (define-gl-procedure
24524 glGetVertexAttribPointerv
24525 "glGetVertexAttribPointerv"
24530 (function "glGetVertexAttribPointerv"))
24531 (paramdef "GLuint " (parameter "index"))
24532 (paramdef "GLenum " (parameter "pname"))
24533 (paramdef "GLvoid **" (parameter "pointer"))))
24536 "return the address of the specified generic vertex attribute pointer")
24537 (heading "Parameters")
24538 (table (% (formatter (asis)))
24539 (entry (% (heading (var "index")))
24540 (para "Specifies the generic vertex attribute
24541 \t\t parameter to be returned."))
24542 (entry (% (heading (var "pname")))
24543 (para "Specifies the symbolic name of the generic
24544 \t\t vertex attribute parameter to be returned. Must be "
24545 (code "GL_VERTEX_ATTRIB_ARRAY_POINTER")
24547 (entry (% (heading (var "pointer")))
24548 (para "Returns the pointer value.")))
24549 (heading "Description")
24550 (para (code "glGetVertexAttribPointerv")
24552 \tpointer information. "
24555 \tvertex attribute to be queried, "
24558 \ta symbolic constant indicating the pointer to be returned, and\t"
24560 " is a pointer to a location in
24561 \twhich to place the returned data.")
24562 (para "If a non-zero named buffer object was bound to the "
24563 (code "GL_ARRAY_BUFFER")
24566 (code "glBindBuffer")
24567 ") when the desired pointer was previously
24570 " returned is a byte offset into the buffer object's data store. ")
24572 (para (code "GL_INVALID_VALUE")
24577 is greater than or equal to "
24578 (code "GL_MAX_VERTEX_ATTRIBS")
24580 (para (code "GL_INVALID_ENUM")
24585 is not an accepted value.")))
24587 (define-gl-procedure
24588 glGetVertexAttribdv
24589 "glGetVertexAttribdv"
24594 (function "glGetVertexAttribdv"))
24595 (paramdef "GLuint " (parameter "index"))
24596 (paramdef "GLenum " (parameter "pname"))
24597 (paramdef "GLdouble *" (parameter "params")))
24601 (function "glGetVertexAttribfv"))
24602 (paramdef "GLuint " (parameter "index"))
24603 (paramdef "GLenum " (parameter "pname"))
24604 (paramdef "GLfloat *" (parameter "params")))
24608 (function "glGetVertexAttribiv"))
24609 (paramdef "GLuint " (parameter "index"))
24610 (paramdef "GLenum " (parameter "pname"))
24611 (paramdef "GLint *" (parameter "params"))))
24614 "Return a generic vertex attribute parameter")
24615 (heading "Parameters")
24616 (table (% (formatter (asis)))
24617 (entry (% (heading (var "index")))
24618 (para "Specifies the generic vertex attribute
24619 \t\t parameter to be queried."))
24620 (entry (% (heading (var "pname")))
24621 (para "Specifies the symbolic name of the vertex
24622 \t\t attribute parameter to be queried. Accepted values are "
24623 (code "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING")
24625 (code "GL_VERTEX_ATTRIB_ARRAY_ENABLED")
24627 (code "GL_VERTEX_ATTRIB_ARRAY_SIZE")
24629 (code "GL_VERTEX_ATTRIB_ARRAY_STRIDE")
24631 (code "GL_VERTEX_ATTRIB_ARRAY_TYPE")
24633 (code "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED")
24635 (code "GL_CURRENT_VERTEX_ATTRIB")
24637 (entry (% (heading (var "params")))
24638 (para "Returns the requested data.")))
24639 (heading "Description")
24640 (para (code "glGetVertexAttrib")
24643 " the value of a generic vertex
24644 \tattribute parameter. The generic vertex attribute to be queried
24645 \tis specified by "
24647 ", and the parameter
24648 \tto be queried is specified by "
24651 (para "The accepted parameter names are as follows:")
24652 (table (% (formatter (asis)))
24654 (code "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING")))
24656 (para (var "params")
24658 \t\t single value, the name of the buffer object currently bound to
24659 the binding point corresponding to generic vertex attribute array "
24661 ". If no buffer object is bound,
24662 0 is returned. The initial value is 0."))
24663 (entry (% (heading (code "GL_VERTEX_ATTRIB_ARRAY_ENABLED")))
24665 (para (var "params")
24667 \t\t single value that is non-zero (true) if the vertex
24668 \t\t attribute array for "
24671 \t\t enabled and 0 (false) if it is disabled. The initial
24675 (entry (% (heading (code "GL_VERTEX_ATTRIB_ARRAY_SIZE")))
24677 (para (var "params")
24679 \t\t single value, the size of the vertex attribute array
24683 \t\t number of values for each element of the vertex
24684 \t\t attribute array, and it will be 1, 2, 3, or 4. The
24685 \t\t initial value is 4."))
24686 (entry (% (heading (code "GL_VERTEX_ATTRIB_ARRAY_STRIDE")))
24688 (para (var "params")
24690 \t\t single value, the array stride for (number of bytes
24691 \t\t between successive elements in) the vertex attribute
24695 \t\t indicates that the array elements are stored
24696 \t\t sequentially in memory. The initial value is 0."))
24697 (entry (% (heading (code "GL_VERTEX_ATTRIB_ARRAY_TYPE")))
24699 (para (var "params")
24701 \t\t single value, a symbolic constant indicating the
24702 \t\t array type for the vertex attribute array for "
24704 ". Possible values are "
24707 (code "GL_UNSIGNED_BYTE")
24711 (code "GL_UNSIGNED_SHORT")
24715 (code "GL_UNSIGNED_INT")
24720 ". The initial value is "
24724 (code "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED")))
24726 (para (var "params")
24728 \t\t single value that is non-zero (true) if fixed-point
24729 \t\t data types for the vertex attribute array indicated
24732 " are normalized when
24733 \t\t they are converted to floating point, and 0 (false)
24734 \t\t otherwise. The initial value is "
24737 (entry (% (heading (code "GL_CURRENT_VERTEX_ATTRIB")))
24739 (para (var "params")
24741 \t\t values that represent the current value for the
24742 \t\t generic vertex attribute specified by index. Generic
24743 \t\t vertex attribute 0 is unique in that it has no
24744 \t\t current state, so an error will be generated if "
24746 " is 0. The initial value
24747 \t\t for all other generic vertex attributes is
24748 \t\t (0,0,0,1).")))
24749 (para "All of the parameters except "
24750 (code "GL_CURRENT_VERTEX_ATTRIB")
24752 represent client-side state.")
24754 (para (code "GL_INVALID_VALUE")
24755 " is generated if\t"
24757 " is greater than or equal to\t"
24758 (code "GL_MAX_VERTEX_ATTRIBS")
24760 (para (code "GL_INVALID_ENUM")
24761 " is generated if\t"
24763 " is not an accepted value.")
24764 (para (code "GL_INVALID_OPERATION")
24765 " is generated if\t"
24770 (code "GL_CURRENT_VERTEX_ATTRIB")
24773 (define-gl-procedure
24778 (funcdef "void " (function "glGetBooleanv"))
24779 (paramdef "GLenum " (parameter "pname"))
24780 (paramdef "GLboolean * " (parameter "params"))))
24783 "return the value or values of a selected parameter")
24784 (heading "Parameters")
24785 (table (% (formatter (asis)))
24786 (entry (% (heading (var "pname")))
24788 Specifies the parameter value to be returned.
24789 The symbolic constants in the list below are accepted. "))
24790 (entry (% (heading (var "params")))
24792 Returns the value or values of the specified parameter. ")))
24793 (heading "Description")
24795 These four commands return values for simple state variables in GL. "
24797 " is a symbolic constant indicating the state variable to be returned,
24800 " is a pointer to an array of the indicated type in
24801 which to place the returned data. ")
24803 Type conversion is performed if "
24805 " has a different type than
24806 the state variable value being requested.
24808 (code "glGetBooleanv")
24810 a floating-point (or integer) value is converted to "
24813 and only if it is 0.0 (or 0).
24815 it is converted to "
24819 (code "glGetIntegerv")
24820 " is called, boolean values are returned as "
24824 ", and most floating-point values are
24825 rounded to the nearest integer value. Floating-point colors and
24826 normals, however, are returned with a linear mapping that maps 1.0 to
24827 the most positive representable integer value
24831 to the most negative representable integer value.
24833 (code "glGetFloatv")
24835 (code "glGetDoublev")
24837 boolean values are returned as "
24842 and integer values are converted to floating-point values. ")
24844 The following symbolic constants are accepted by "
24847 (table (% (formatter (asis)))
24848 (entry (% (heading (code "GL_ACCUM_ALPHA_BITS")))
24850 (para (var "params")
24851 " returns one value,
24852 the number of alpha bitplanes in the accumulation buffer. "))
24853 (entry (% (heading (code "GL_ACCUM_BLUE_BITS")))
24855 (para (var "params")
24856 " returns one value,
24857 the number of blue bitplanes in the accumulation buffer. "))
24858 (entry (% (heading (code "GL_ACCUM_CLEAR_VALUE")))
24860 (para (var "params")
24861 " returns four values:
24862 the red, green, blue, and alpha values used to clear the accumulation buffer.
24865 are linearly mapped from the internal floating-point representation such
24866 that 1.0 returns the most positive representable integer value,
24870 returns the most negative representable integer
24871 value. The initial value is (0, 0, 0, 0).
24873 (code "glClearAccum")
24875 (entry (% (heading (code "GL_ACCUM_GREEN_BITS")))
24877 (para (var "params")
24878 " returns one value,
24879 the number of green bitplanes in the accumulation buffer. "))
24880 (entry (% (heading (code "GL_ACCUM_RED_BITS")))
24882 (para (var "params")
24883 " returns one value,
24884 the number of red bitplanes in the accumulation buffer. "))
24885 (entry (% (heading (code "GL_ACTIVE_TEXTURE")))
24887 (para (var "params")
24888 " returns a single value indicating the active multitexture unit.
24889 The initial value is "
24890 (code "GL_TEXTURE0")
24893 (code "glActiveTexture")
24895 (entry (% (heading (code "GL_ALIASED_POINT_SIZE_RANGE")))
24897 (para (var "params")
24898 " returns two values,
24899 the smallest and largest supported sizes for aliased points. "))
24900 (entry (% (heading (code "GL_ALIASED_LINE_WIDTH_RANGE")))
24902 (para (var "params")
24903 " returns two values,
24904 the smallest and largest supported widths for aliased lines. "))
24905 (entry (% (heading (code "GL_ALPHA_BIAS")))
24907 (para (var "params")
24908 " returns one value,
24909 the alpha bias factor used during pixel transfers. The initial value is 0.
24911 (code "glPixelTransfer")
24913 (entry (% (heading (code "GL_ALPHA_BITS")))
24915 (para (var "params")
24916 " returns one value,
24917 the number of alpha bitplanes in each color buffer. "))
24918 (entry (% (heading (code "GL_ALPHA_SCALE")))
24920 (para (var "params")
24921 " returns one value,
24922 the alpha scale factor used
24923 during pixel transfers. The initial value is 1.
24925 (code "glPixelTransfer")
24927 (entry (% (heading (code "GL_ALPHA_TEST")))
24929 (para (var "params")
24930 " returns a single boolean value indicating whether alpha testing
24931 of fragments is enabled. The initial value is "
24935 (code "glAlphaFunc")
24938 (code "GL_ALPHA_TEST_FUNC")
24940 " returns one value,"))
24943 the symbolic name of the alpha test function. The initial value is "
24947 (code "glAlphaFunc")
24949 (entry (% (heading (code "GL_ALPHA_TEST_REF")))
24951 (para (var "params")
24952 " returns one value,
24953 the reference value for the alpha test. The initial value is 0.
24955 (code "glAlphaFunc")
24959 is linearly mapped from the internal floating-point representation such
24960 that 1.0 returns the most positive representable integer value,
24964 returns the most negative representable integer value. "))
24965 (entry (% (heading (code "GL_ARRAY_BUFFER_BINDING")))
24967 (para (var "params")
24968 " returns a single value, the name of the buffer object
24969 currently bound to the target "
24970 (code "GL_ARRAY_BUFFER")
24971 ". If no buffer object
24972 is bound to this target, 0 is returned. The initial value is 0.
24974 (code "glBindBuffer")
24976 (entry (% (heading (code "GL_ATTRIB_STACK_DEPTH")))
24978 (para (var "params")
24979 " returns one value,
24980 the depth of the attribute stack.
24981 If the stack is empty,
24982 0 is returned. The initial value is 0.
24984 (code "glPushAttrib")
24986 (entry (% (heading (code "GL_AUTO_NORMAL")))
24988 (para (var "params")
24989 " returns a single boolean value indicating whether 2D map evaluation
24990 automatically generates surface normals. The initial value is "
24996 (entry (% (heading (code "GL_AUX_BUFFERS")))
24998 (para (var "params")
24999 " returns one value,
25000 the number of auxiliary color buffers available. "))
25001 (entry (% (heading (code "GL_BLEND")))
25003 (para (var "params")
25004 " returns a single boolean value indicating whether blending is
25005 enabled. The initial value is "
25009 (code "glBlendFunc")
25011 (entry (% (heading (code "GL_BLEND_COLOR")))
25013 (para (var "params")
25014 " returns four values,
25015 the red, green, blue, and alpha values which are the components of
25018 (code "glBlendColor")
25020 (entry (% (heading (code "GL_BLEND_DST_ALPHA")))
25022 (para (var "params")
25023 " returns one value,
25024 the symbolic constant identifying the alpha destination blend
25025 function. The initial value is "
25029 (code "glBlendFunc")
25031 (code "glBlendFuncSeparate")
25033 (entry (% (heading (code "GL_BLEND_DST_RGB")))
25035 (para (var "params")
25036 " returns one value,
25037 the symbolic constant identifying the RGB destination blend
25038 function. The initial value is "
25042 (code "glBlendFunc")
25044 (code "glBlendFuncSeparate")
25046 (entry (% (heading (code "GL_BLEND_EQUATION_RGB")))
25048 (para (var "params")
25049 " returns one value, a symbolic constant indicating whether
25050 the RGB blend equation is "
25051 (code "GL_FUNC_ADD")
25053 (code "GL_FUNC_SUBTRACT")
25055 (code "GL_FUNC_REVERSE_SUBTRACT")
25062 (code "glBlendEquationSeparate")
25064 (entry (% (heading (code "GL_BLEND_EQUATION_ALPHA")))
25066 (para (var "params")
25067 " returns one value, a symbolic constant indicating whether
25068 the Alpha blend equation is "
25069 (code "GL_FUNC_ADD")
25071 (code "GL_FUNC_SUBTRACT")
25073 (code "GL_FUNC_REVERSE_SUBTRACT")
25080 (code "glBlendEquationSeparate")
25082 (entry (% (heading (code "GL_BLEND_SRC_ALPHA")))
25084 (para (var "params")
25085 " returns one value,
25086 the symbolic constant identifying the alpha source blend function. The initial
25091 (code "glBlendFunc")
25093 (code "glBlendFuncSeparate")
25095 (entry (% (heading (code "GL_BLEND_SRC_RGB")))
25097 (para (var "params")
25098 " returns one value,
25099 the symbolic constant identifying the RGB source blend function. The initial
25104 (code "glBlendFunc")
25106 (code "glBlendFuncSeparate")
25108 (entry (% (heading (code "GL_BLUE_BIAS")))
25110 (para (var "params")
25111 " returns one value,
25112 the blue bias factor used during pixel transfers. The initial value is 0.
25114 (code "glPixelTransfer")
25116 (entry (% (heading (code "GL_BLUE_BITS")))
25118 (para (var "params")
25119 " returns one value,
25120 the number of blue bitplanes in each color buffer. "))
25121 (entry (% (heading (code "GL_BLUE_SCALE")))
25123 (para (var "params")
25124 " returns one value,
25125 the blue scale factor used during pixel transfers. The initial value is 1.
25127 (code "glPixelTransfer")
25129 (entry (% (heading (code "GL_CLIENT_ACTIVE_TEXTURE")))
25131 (para (var "params")
25132 " returns a single integer value indicating the current client active
25133 multitexture unit. The initial value is "
25134 (code "GL_TEXTURE0")
25137 (code "glClientActiveTexture")
25139 (entry (% (heading (code "GL_CLIENT_ATTRIB_STACK_DEPTH")))
25141 (para (var "params")
25142 " returns one value indicating the depth of the
25143 attribute stack. The initial value is 0.
25145 (code "glPushClientAttrib")
25147 (entry (% (heading (code "GL_CLIP_PLANE") (var "i")))
25149 (para (var "params")
25150 " returns a single boolean value indicating whether the specified
25151 clipping plane is enabled. The initial value is "
25155 (code "glClipPlane")
25157 (entry (% (heading (code "GL_COLOR_ARRAY")))
25159 (para (var "params")
25160 " returns a single boolean value indicating whether the color array is enabled. The initial value is "
25164 (code "glColorPointer")
25166 (entry (% (heading (code "GL_COLOR_ARRAY_BUFFER_BINDING")))
25168 (para (var "params")
25169 " returns a single value, the name of the buffer object
25170 associated with the color array. This buffer object would have been bound to the
25172 (code "GL_ARRAY_BUFFER")
25173 " at the time of the most recent call to "
25174 (code "glColorPointer")
25176 If no buffer object was bound to this target, 0 is returned. The initial value is 0.
25178 (code "glBindBuffer")
25180 (entry (% (heading (code "GL_COLOR_ARRAY_SIZE")))
25182 (para (var "params")
25183 " returns one value,
25184 the number of components per color in the color array. The initial value
25187 (code "glColorPointer")
25189 (entry (% (heading (code "GL_COLOR_ARRAY_STRIDE")))
25191 (para (var "params")
25192 " returns one value,
25193 the byte offset between consecutive colors in the color array. The initial
25196 (code "glColorPointer")
25198 (entry (% (heading (code "GL_COLOR_ARRAY_TYPE")))
25200 (para (var "params")
25201 " returns one value,
25202 the data type of each component in the color array. The initial value
25207 (code "glColorPointer")
25209 (entry (% (heading (code "GL_COLOR_CLEAR_VALUE")))
25211 (para (var "params")
25212 " returns four values:
25213 the red, green, blue, and alpha values used to clear the color buffers.
25216 are linearly mapped from the internal floating-point representation such
25217 that 1.0 returns the most positive representable integer value,
25221 returns the most negative representable integer
25222 value. The initial value is (0, 0, 0, 0).
25224 (code "glClearColor")
25226 (entry (% (heading (code "GL_COLOR_LOGIC_OP")))
25228 (para (var "params")
25229 " returns a single boolean value indicating whether a fragment's
25230 RGBA color values are merged into the framebuffer using a logical
25231 operation. The initial value is "
25237 (entry (% (heading (code "GL_COLOR_MATERIAL")))
25239 (para (var "params")
25240 " returns a single boolean value indicating whether one or more
25241 material parameters are tracking the current color. The initial value
25246 (code "glColorMaterial")
25248 (entry (% (heading (code "GL_COLOR_MATERIAL_FACE")))
25250 (para (var "params")
25251 " returns one value,
25252 a symbolic constant indicating which materials have a parameter that is
25253 tracking the current color. The initial value is "
25254 (code "GL_FRONT_AND_BACK")
25257 (code "glColorMaterial")
25259 (entry (% (heading (code "GL_COLOR_MATERIAL_PARAMETER")))
25261 (para (var "params")
25262 " returns one value,
25263 a symbolic constant indicating which material parameters are
25264 tracking the current color. The initial value is "
25265 (code "GL_AMBIENT_AND_DIFFUSE")
25268 (code "glColorMaterial")
25270 (entry (% (heading (code "GL_COLOR_MATRIX")))
25272 (para (var "params")
25273 " returns sixteen values:
25274 the color matrix on the top of the color matrix stack. Initially
25275 this matrix is the identity matrix.
25277 (code "glPushMatrix")
25279 (entry (% (heading (code "GL_COLOR_MATRIX_STACK_DEPTH")))
25281 (para (var "params")
25282 " returns one value,
25283 the maximum supported depth of the projection matrix stack. The value must
25286 (code "glPushMatrix")
25288 (entry (% (heading (code "GL_COLOR_SUM")))
25290 (para (var "params")
25291 " returns a single boolean value indicating whether primary and
25292 secondary color sum is enabled.
25294 (code "glSecondaryColor")
25296 (entry (% (heading (code "GL_COLOR_TABLE")))
25298 (para (var "params")
25299 " returns a single boolean value indicating whether the color table
25302 (code "glColorTable")
25304 (entry (% (heading (code "GL_COLOR_WRITEMASK")))
25306 (para (var "params")
25307 " returns four boolean values:
25308 the red, green, blue, and alpha write enables for the color
25309 buffers. The initial value is ("
25319 (code "glColorMask")
25321 (entry (% (heading (code "GL_COMPRESSED_TEXTURE_FORMATS")))
25323 (para (var "params")
25324 " returns a list of symbolic
25325 constants of length "
25326 (code "GL_NUM_COMPRESSED_TEXTURE_FORMATS")
25327 " indicating which compressed texture formats are available.
25329 (code "glCompressedTexImage2D")
25331 (entry (% (heading (code "GL_CONVOLUTION_1D")))
25333 (para (var "params")
25334 " returns a single boolean value indicating whether 1D convolution
25335 is enabled. The initial value is "
25339 (code "glConvolutionFilter1D")
25341 (entry (% (heading (code "GL_CONVOLUTION_2D")))
25343 (para (var "params")
25344 " returns a single boolean value indicating whether 2D convolution
25345 is enabled. The initial value is "
25349 (code "glConvolutionFilter2D")
25351 (entry (% (heading (code "GL_CULL_FACE")))
25353 (para (var "params")
25354 " returns a single boolean value indicating whether polygon culling
25355 is enabled. The initial value is "
25359 (code "glCullFace")
25361 (entry (% (heading (code "GL_CULL_FACE_MODE")))
25363 (para (var "params")
25364 " returns one value,
25365 a symbolic constant indicating which polygon faces are to be
25366 culled. The initial value is "
25370 (code "glCullFace")
25372 (entry (% (heading (code "GL_CURRENT_COLOR")))
25374 (para (var "params")
25375 " returns four values:
25376 the red, green, blue, and alpha values of the current color.
25379 are linearly mapped from the internal floating-point representation such
25380 that 1.0 returns the most positive representable integer value,
25384 returns the most negative representable integer value.
25385 The initial value is (1, 1, 1, 1).
25389 (entry (% (heading (code "GL_CURRENT_FOG_COORD")))
25391 (para (var "params")
25392 " returns one value, the current fog coordinate. The initial value
25395 (code "glFogCoord")
25397 (entry (% (heading (code "GL_CURRENT_INDEX")))
25399 (para (var "params")
25400 " returns one value,
25401 the current color index. The initial value is 1.
25405 (entry (% (heading (code "GL_CURRENT_NORMAL")))
25407 (para (var "params")
25408 " returns three values:
25415 " values of the current normal.
25418 are linearly mapped from the internal floating-point representation such
25419 that 1.0 returns the most positive representable integer value,
25423 returns the most negative representable integer value.
25424 The initial value is (0, 0, 1).
25428 (entry (% (heading (code "GL_CURRENT_PROGRAM")))
25430 (para (var "params")
25431 " returns one value,
25432 the name of the program object that is currently active, or 0 if no program object is active.
25434 (code "glUseProgram")
25436 (entry (% (heading (code "GL_CURRENT_RASTER_COLOR")))
25438 (para (var "params")
25439 " returns four values:
25440 the red, green, blue, and alpha color values of the current raster position.
25443 are linearly mapped from the internal floating-point representation such
25444 that 1.0 returns the most positive representable integer value,
25448 returns the most negative representable integer
25449 value. The initial value is (1, 1, 1, 1).
25451 (code "glRasterPos")
25453 (entry (% (heading (code "GL_CURRENT_RASTER_DISTANCE")))
25455 (para (var "params")
25456 " returns one value, the distance from the eye to the current
25457 raster position. The initial value is 0.
25459 (code "glRasterPos")
25461 (entry (% (heading (code "GL_CURRENT_RASTER_INDEX")))
25463 (para (var "params")
25464 " returns one value,
25465 the color index of the current raster position. The initial value is 1.
25467 (code "glRasterPos")
25469 (entry (% (heading (code "GL_CURRENT_RASTER_POSITION")))
25471 (para (var "params")
25472 " returns four values:
25481 " components of the current
25488 " are in window coordinates,
25491 " is in clip coordinates. The initial value is (0, 0, 0, 1).
25493 (code "glRasterPos")
25496 (code "GL_CURRENT_RASTER_POSITION_VALID")))
25498 (para (var "params")
25499 " returns a single boolean value indicating whether the current
25500 raster position is valid. The initial value is "
25504 (code "glRasterPos")
25507 (code "GL_CURRENT_RASTER_SECONDARY_COLOR")))
25509 (para (var "params")
25510 " returns four values:
25511 the red, green, blue, and alpha secondary color values of the current raster position.
25514 are linearly mapped from the internal floating-point representation such
25515 that 1.0 returns the most positive representable integer value,
25519 returns the most negative representable integer
25520 value. The initial value is (1, 1, 1, 1).
25522 (code "glRasterPos")
25525 (code "GL_CURRENT_RASTER_TEXTURE_COORDS")))
25527 (para (var "params")
25528 " returns four values: the "
25537 texture coordinates of the current raster position. The initial value is (0, 0, 0, 1).
25539 (code "glRasterPos")
25541 (code "glMultiTexCoord")
25543 (entry (% (heading (code "GL_CURRENT_SECONDARY_COLOR")))
25545 (para (var "params")
25546 " returns four values: the red, green, blue, and alpha values of the
25547 current secondary color. Integer values, if requested, are linearly mapped
25548 from the internal floating-point representation such that 1.0 returns the
25549 most positive representable integer value, and "
25553 negative representable integer value. The initial value is (0, 0, 0, 0).
25555 (code "glSecondaryColor")
25557 (entry (% (heading (code "GL_CURRENT_TEXTURE_COORDS")))
25559 (para (var "params")
25560 " returns four values:
25570 coordinates. The initial value is (0, 0, 0, 1).
25572 (code "glMultiTexCoord")
25574 (entry (% (heading (code "GL_DEPTH_BIAS")))
25576 (para (var "params")
25577 " returns one value,
25578 the depth bias factor used during pixel transfers. The initial value is 0.
25580 (code "glPixelTransfer")
25582 (entry (% (heading (code "GL_DEPTH_BITS")))
25584 (para (var "params")
25585 " returns one value,
25586 the number of bitplanes in the depth buffer. "))
25587 (entry (% (heading (code "GL_DEPTH_CLEAR_VALUE")))
25589 (para (var "params")
25590 " returns one value,
25591 the value that is used to clear the depth buffer.
25594 are linearly mapped from the internal floating-point representation such
25595 that 1.0 returns the most positive representable integer value,
25599 returns the most negative representable integer
25600 value. The initial value is 1.
25602 (code "glClearDepth")
25604 (entry (% (heading (code "GL_DEPTH_FUNC")))
25606 (para (var "params")
25607 " returns one value,
25608 the symbolic constant that indicates the depth comparison
25609 function. The initial value is "
25613 (code "glDepthFunc")
25615 (entry (% (heading (code "GL_DEPTH_RANGE")))
25617 (para (var "params")
25618 " returns two values:
25619 the near and far mapping limits for the depth buffer.
25622 are linearly mapped from the internal floating-point representation such
25623 that 1.0 returns the most positive representable integer value,
25627 returns the most negative representable integer
25628 value. The initial value is (0, 1).
25630 (code "glDepthRange")
25632 (entry (% (heading (code "GL_DEPTH_SCALE")))
25634 (para (var "params")
25635 " returns one value,
25636 the depth scale factor used during pixel transfers. The initial value is 1.
25638 (code "glPixelTransfer")
25640 (entry (% (heading (code "GL_DEPTH_TEST")))
25642 (para (var "params")
25643 " returns a single boolean value indicating whether depth testing
25644 of fragments is enabled. The initial value is "
25648 (code "glDepthFunc")
25650 (code "glDepthRange")
25652 (entry (% (heading (code "GL_DEPTH_WRITEMASK")))
25654 (para (var "params")
25655 " returns a single boolean value indicating if the depth buffer
25656 is enabled for writing. The initial value is "
25660 (code "glDepthMask")
25662 (entry (% (heading (code "GL_DITHER")))
25664 (para (var "params")
25665 " returns a single boolean value indicating whether dithering of
25666 fragment colors and indices is enabled. The initial value is "
25669 (entry (% (heading (code "GL_DOUBLEBUFFER")))
25671 (para (var "params")
25672 " returns a single boolean value indicating whether double buffering
25674 (entry (% (heading (code "GL_DRAW_BUFFER")))
25676 (para (var "params")
25677 " returns one value,
25678 a symbolic constant indicating which buffers are being drawn to.
25680 (code "glDrawBuffer")
25681 ". The initial value is "
25684 are back buffers, otherwise it is "
25687 (entry (% (heading (code "GL_DRAW_BUFFER") (var "i")))
25689 (para (var "params")
25690 " returns one value,
25691 a symbolic constant indicating which buffers are being drawn to by the corresponding output color.
25693 (code "glDrawBuffers")
25695 The initial value of "
25696 (code "GL_DRAW_BUFFER0")
25700 are back buffers, otherwise it is "
25703 initial values of draw buffers for all other output colors is "
25706 (entry (% (heading (code "GL_EDGE_FLAG")))
25708 (para (var "params")
25709 " returns a single boolean value indicating whether the current
25714 ". The initial value is "
25718 (code "glEdgeFlag")
25720 (entry (% (heading (code "GL_EDGE_FLAG_ARRAY")))
25722 (para (var "params")
25723 " returns a single boolean value indicating whether the edge
25724 flag array is enabled. The initial value is "
25728 (code "glEdgeFlagPointer")
25731 (code "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING")))
25733 (para (var "params")
25734 " returns a single value, the name of the buffer object
25735 associated with the edge flag array. This buffer object would have been bound to the
25737 (code "GL_ARRAY_BUFFER")
25738 " at the time of the most recent call to "
25739 (code "glEdgeFlagPointer")
25741 If no buffer object was bound to this target, 0 is returned. The initial value is 0.
25743 (code "glBindBuffer")
25745 (entry (% (heading (code "GL_EDGE_FLAG_ARRAY_STRIDE")))
25747 (para (var "params")
25748 " returns one value,
25749 the byte offset between consecutive edge flags in the edge flag
25750 array. The initial value is 0.
25752 (code "glEdgeFlagPointer")
25755 (code "GL_ELEMENT_ARRAY_BUFFER_BINDING")))
25757 (para (var "params")
25758 " returns a single value, the name of the buffer object
25759 currently bound to the target "
25760 (code "GL_ELEMENT_ARRAY_BUFFER")
25761 ". If no buffer object
25762 is bound to this target, 0 is returned. The initial value is 0.
25764 (code "glBindBuffer")
25766 (entry (% (heading (code "GL_FEEDBACK_BUFFER_SIZE")))
25768 (para (var "params")
25769 " returns one value, the size of the feedback buffer.
25771 (code "glFeedbackBuffer")
25773 (entry (% (heading (code "GL_FEEDBACK_BUFFER_TYPE")))
25775 (para (var "params")
25776 " returns one value, the type of the feedback buffer.
25778 (code "glFeedbackBuffer")
25780 (entry (% (heading (code "GL_FOG")))
25782 (para (var "params")
25783 " returns a single boolean value indicating whether fogging is
25784 enabled. The initial value is "
25790 (entry (% (heading (code "GL_FOG_COORD_ARRAY")))
25792 (para (var "params")
25793 " returns a single boolean value indicating whether the fog coordinate array is enabled. The initial value is "
25797 (code "glFogCoordPointer")
25800 (code "GL_FOG_COORD_ARRAY_BUFFER_BINDING")))
25802 (para (var "params")
25803 " returns a single value, the name of the buffer object
25804 associated with the fog coordinate array. This buffer object would have been bound to the
25806 (code "GL_ARRAY_BUFFER")
25807 " at the time of the most recent call to "
25808 (code "glFogCoordPointer")
25810 If no buffer object was bound to this target, 0 is returned. The initial value is 0.
25812 (code "glBindBuffer")
25814 (entry (% (heading (code "GL_FOG_COORD_ARRAY_STRIDE")))
25816 (para (var "params")
25817 " returns one value,
25818 the byte offset between consecutive fog coordinates in the fog coordinate
25819 array. The initial value is 0.
25821 (code "glFogCoordPointer")
25823 (entry (% (heading (code "GL_FOG_COORD_ARRAY_TYPE")))
25825 (para (var "params")
25826 " returns one value, the type of the fog coordinate array.
25827 The initial value is "
25831 (code "glFogCoordPointer")
25833 (entry (% (heading (code "GL_FOG_COORD_SRC")))
25835 (para (var "params")
25836 " returns one value, a symbolic constant indicating the source of the fog coordinate.
25837 The initial value is "
25838 (code "GL_FRAGMENT_DEPTH")
25843 (entry (% (heading (code "GL_FOG_COLOR")))
25845 (para (var "params")
25846 " returns four values:
25847 the red, green, blue, and alpha components of the fog color.
25850 are linearly mapped from the internal floating-point representation such
25851 that 1.0 returns the most positive representable integer value,
25855 returns the most negative representable integer
25856 value. The initial value is (0, 0, 0, 0).
25860 (entry (% (heading (code "GL_FOG_DENSITY")))
25862 (para (var "params")
25863 " returns one value,
25864 the fog density parameter. The initial value is 1.
25868 (entry (% (heading (code "GL_FOG_END")))
25870 (para (var "params")
25871 " returns one value,
25872 the end factor for the linear fog equation. The initial value is 1.
25876 (entry (% (heading (code "GL_FOG_HINT")))
25878 (para (var "params")
25879 " returns one value,
25880 a symbolic constant indicating the mode of the fog hint. The initial value
25882 (code "GL_DONT_CARE")
25887 (entry (% (heading (code "GL_FOG_INDEX")))
25889 (para (var "params")
25890 " returns one value,
25891 the fog color index. The initial value is 0.
25895 (entry (% (heading (code "GL_FOG_MODE")))
25897 (para (var "params")
25898 " returns one value,
25899 a symbolic constant indicating which fog equation is selected. The initial
25906 (entry (% (heading (code "GL_FOG_START")))
25908 (para (var "params")
25909 " returns one value,
25910 the start factor for the linear fog equation. The initial value is 0.
25915 (code "GL_FRAGMENT_SHADER_DERIVATIVE_HINT")))
25917 (para (var "params")
25918 " returns one value,
25919 a symbolic constant indicating the mode of the derivative accuracy hint
25920 for fragment shaders. The initial value
25922 (code "GL_DONT_CARE")
25927 (entry (% (heading (code "GL_FRONT_FACE")))
25929 (para (var "params")
25930 " returns one value,
25931 a symbolic constant indicating whether clockwise or counterclockwise
25932 polygon winding is treated as front-facing. The initial value is "
25936 (code "glFrontFace")
25938 (entry (% (heading (code "GL_GENERATE_MIPMAP_HINT")))
25940 (para (var "params")
25941 " returns one value,
25942 a symbolic constant indicating the mode of the mipmap generation filtering
25943 hint. The initial value is "
25944 (code "GL_DONT_CARE")
25949 (entry (% (heading (code "GL_GREEN_BIAS")))
25951 (para (var "params")
25952 " returns one value,
25953 the green bias factor used during pixel transfers. The initial value is 0. "))
25954 (entry (% (heading (code "GL_GREEN_BITS")))
25956 (para (var "params")
25957 " returns one value,
25958 the number of green bitplanes in each color buffer. "))
25959 (entry (% (heading (code "GL_GREEN_SCALE")))
25961 (para (var "params")
25962 " returns one value,
25963 the green scale factor used during pixel transfers. The initial value is 1.
25965 (code "glPixelTransfer")
25967 (entry (% (heading (code "GL_HISTOGRAM")))
25969 (para (var "params")
25970 " returns a single boolean value indicating whether histogram is
25971 enabled. The initial value is "
25975 (code "glHistogram")
25977 (entry (% (heading (code "GL_INDEX_ARRAY")))
25979 (para (var "params")
25980 " returns a single boolean value indicating whether the color
25981 index array is enabled. The initial value is "
25985 (code "glIndexPointer")
25987 (entry (% (heading (code "GL_INDEX_ARRAY_BUFFER_BINDING")))
25989 (para (var "params")
25990 " returns a single value, the name of the buffer object
25991 associated with the color index array. This buffer object would have been bound to the
25993 (code "GL_ARRAY_BUFFER")
25994 " at the time of the most recent call to "
25995 (code "glIndexPointer")
25997 If no buffer object was bound to this target, 0 is returned. The initial value is 0.
25999 (code "glBindBuffer")
26001 (entry (% (heading (code "GL_INDEX_ARRAY_STRIDE")))
26003 (para (var "params")
26004 " returns one value,
26005 the byte offset between consecutive color indexes in the color index
26006 array. The initial value is 0.
26008 (code "glIndexPointer")
26010 (entry (% (heading (code "GL_INDEX_ARRAY_TYPE")))
26012 (para (var "params")
26013 " returns one value,
26014 the data type of indexes in the color index array. The initial value is "
26018 (code "glIndexPointer")
26020 (entry (% (heading (code "GL_INDEX_BITS")))
26022 (para (var "params")
26023 " returns one value,
26024 the number of bitplanes in each color index buffer. "))
26025 (entry (% (heading (code "GL_INDEX_CLEAR_VALUE")))
26027 (para (var "params")
26028 " returns one value,
26029 the color index used to clear the color index buffers. The initial value
26032 (code "glClearIndex")
26034 (entry (% (heading (code "GL_INDEX_LOGIC_OP")))
26036 (para (var "params")
26037 " returns a single boolean value indicating whether a fragment's index
26038 values are merged into the framebuffer using a logical
26039 operation. The initial value is "
26045 (entry (% (heading (code "GL_INDEX_MODE")))
26047 (para (var "params")
26048 " returns a single boolean value indicating whether the GL is in
26049 color index mode ("
26054 (entry (% (heading (code "GL_INDEX_OFFSET")))
26056 (para (var "params")
26057 " returns one value,
26058 the offset added to color and stencil indices during pixel
26059 transfers. The initial value is 0.
26061 (code "glPixelTransfer")
26063 (entry (% (heading (code "GL_INDEX_SHIFT")))
26065 (para (var "params")
26066 " returns one value,
26067 the amount that color and stencil indices are shifted during pixel
26068 transfers. The initial value is 0.
26070 (code "glPixelTransfer")
26072 (entry (% (heading (code "GL_INDEX_WRITEMASK")))
26074 (para (var "params")
26075 " returns one value,
26076 a mask indicating which bitplanes of each color index buffer can be
26077 written. The initial value is all 1's.
26079 (code "glIndexMask")
26081 (entry (% (heading (code "GL_LIGHT") (var "i")))
26083 (para (var "params")
26084 " returns a single boolean value indicating whether the specified
26085 light is enabled. The initial value is "
26091 (code "glLightModel")
26093 (entry (% (heading (code "GL_LIGHTING")))
26095 (para (var "params")
26096 " returns a single boolean value indicating whether lighting is
26097 enabled. The initial value is "
26101 (code "glLightModel")
26103 (entry (% (heading (code "GL_LIGHT_MODEL_AMBIENT")))
26105 (para (var "params")
26106 " returns four values:
26107 the red, green, blue, and alpha components of the ambient intensity of
26111 are linearly mapped from the internal floating-point representation such
26112 that 1.0 returns the most positive representable integer value,
26116 returns the most negative representable integer
26117 value. The initial value is (0.2, 0.2, 0.2, 1.0).
26119 (code "glLightModel")
26121 (entry (% (heading (code "GL_LIGHT_MODEL_COLOR_CONTROL")))
26123 (para (var "params")
26124 " returns single enumerated value indicating whether specular
26125 reflection calculations are separated from normal lighting computations.
26126 The initial value is "
26127 (code "GL_SINGLE_COLOR")
26129 (entry (% (heading (code "GL_LIGHT_MODEL_LOCAL_VIEWER")))
26131 (para (var "params")
26132 " returns a single boolean value indicating whether specular reflection
26133 calculations treat the viewer as being local to the scene. The initial
26138 (code "glLightModel")
26140 (entry (% (heading (code "GL_LIGHT_MODEL_TWO_SIDE")))
26142 (para (var "params")
26143 " returns a single boolean value indicating whether separate materials
26144 are used to compute lighting for front- and back-facing
26145 polygons. The initial value is "
26149 (code "glLightModel")
26151 (entry (% (heading (code "GL_LINE_SMOOTH")))
26153 (para (var "params")
26154 " returns a single boolean value indicating whether antialiasing of
26155 lines is enabled. The initial value is "
26159 (code "glLineWidth")
26161 (entry (% (heading (code "GL_LINE_SMOOTH_HINT")))
26163 (para (var "params")
26164 " returns one value,
26165 a symbolic constant indicating the mode of the line antialiasing
26166 hint. The initial value is "
26167 (code "GL_DONT_CARE")
26172 (entry (% (heading (code "GL_LINE_STIPPLE")))
26174 (para (var "params")
26175 " returns a single boolean value indicating whether stippling of lines
26176 is enabled. The initial value is "
26180 (code "glLineStipple")
26182 (entry (% (heading (code "GL_LINE_STIPPLE_PATTERN")))
26184 (para (var "params")
26185 " returns one value,
26186 the 16-bit line stipple pattern. The initial value is all 1's.
26188 (code "glLineStipple")
26190 (entry (% (heading (code "GL_LINE_STIPPLE_REPEAT")))
26192 (para (var "params")
26193 " returns one value,
26194 the line stipple repeat factor. The initial value is 1.
26196 (code "glLineStipple")
26198 (entry (% (heading (code "GL_LINE_WIDTH")))
26200 (para (var "params")
26201 " returns one value,
26202 the line width as specified with "
26203 (code "glLineWidth")
26204 ". The initial value is
26206 (entry (% (heading (code "GL_LINE_WIDTH_GRANULARITY")))
26208 (para (var "params")
26209 " returns one value,
26210 the width difference between adjacent supported widths for antialiased lines.
26212 (code "glLineWidth")
26214 (entry (% (heading (code "GL_LINE_WIDTH_RANGE")))
26216 (para (var "params")
26217 " returns two values:
26218 the smallest and largest supported widths for antialiased
26221 (code "glLineWidth")
26223 (entry (% (heading (code "GL_LIST_BASE")))
26225 (para (var "params")
26226 " returns one value,
26227 the base offset added to all names in arrays presented to "
26228 (code "glCallLists")
26229 ". The initial value is 0.
26231 (code "glListBase")
26233 (entry (% (heading (code "GL_LIST_INDEX")))
26235 (para (var "params")
26236 " returns one value,
26237 the name of the display list currently under construction.
26238 0 is returned if no display list is currently under
26239 construction. The initial value is 0.
26243 (entry (% (heading (code "GL_LIST_MODE")))
26245 (para (var "params")
26246 " returns one value,
26247 a symbolic constant indicating the construction mode of the display list
26248 currently under construction. The initial value is 0.
26252 (entry (% (heading (code "GL_LOGIC_OP_MODE")))
26254 (para (var "params")
26255 " returns one value,
26256 a symbolic constant indicating the selected logic operation
26257 mode. The initial value is "
26263 (entry (% (heading (code "GL_MAP1_COLOR_4")))
26265 (para (var "params")
26266 " returns a single boolean value indicating whether
26267 1D evaluation generates colors. The initial value is "
26273 (entry (% (heading (code "GL_MAP1_GRID_DOMAIN")))
26275 (para (var "params")
26276 " returns two values:
26277 the endpoints of the 1D map's grid domain. The initial value is (0, 1).
26281 (entry (% (heading (code "GL_MAP1_GRID_SEGMENTS")))
26283 (para (var "params")
26284 " returns one value,
26285 the number of partitions in the 1D map's grid domain. The initial value
26290 (entry (% (heading (code "GL_MAP1_INDEX")))
26292 (para (var "params")
26293 " returns a single boolean value indicating whether
26294 1D evaluation generates color indices. The initial value is "
26300 (entry (% (heading (code "GL_MAP1_NORMAL")))
26302 (para (var "params")
26303 " returns a single boolean value indicating whether
26304 1D evaluation generates normals. The initial value is "
26310 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_1")))
26312 (para (var "params")
26313 " returns a single boolean value indicating whether
26314 1D evaluation generates 1D texture coordinates. The initial value is "
26320 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_2")))
26322 (para (var "params")
26323 " returns a single boolean value indicating whether
26324 1D evaluation generates 2D texture coordinates. The initial value is "
26330 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_3")))
26332 (para (var "params")
26333 " returns a single boolean value indicating whether
26334 1D evaluation generates 3D texture coordinates. The initial value is "
26340 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_4")))
26342 (para (var "params")
26343 " returns a single boolean value indicating whether
26344 1D evaluation generates 4D texture coordinates. The initial value is "
26350 (entry (% (heading (code "GL_MAP1_VERTEX_3")))
26352 (para (var "params")
26353 " returns a single boolean value indicating whether
26354 1D evaluation generates 3D vertex coordinates. The initial value is "
26360 (entry (% (heading (code "GL_MAP1_VERTEX_4")))
26362 (para (var "params")
26363 " returns a single boolean value indicating whether
26364 1D evaluation generates 4D vertex coordinates. The initial value is "
26370 (entry (% (heading (code "GL_MAP2_COLOR_4")))
26372 (para (var "params")
26373 " returns a single boolean value indicating whether
26374 2D evaluation generates colors. The initial value is "
26380 (entry (% (heading (code "GL_MAP2_GRID_DOMAIN")))
26382 (para (var "params")
26383 " returns four values:
26384 the endpoints of the 2D map's "
26390 grid domains. The initial value
26395 (entry (% (heading (code "GL_MAP2_GRID_SEGMENTS")))
26397 (para (var "params")
26398 " returns two values:
26399 the number of partitions in the 2D map's "
26406 domains. The initial value is (1,1).
26410 (entry (% (heading (code "GL_MAP2_INDEX")))
26412 (para (var "params")
26413 " returns a single boolean value indicating whether
26414 2D evaluation generates color indices. The initial value is "
26420 (entry (% (heading (code "GL_MAP2_NORMAL")))
26422 (para (var "params")
26423 " returns a single boolean value indicating whether
26424 2D evaluation generates normals. The initial value is "
26430 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_1")))
26432 (para (var "params")
26433 " returns a single boolean value indicating whether
26434 2D evaluation generates 1D texture coordinates. The initial value is "
26440 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_2")))
26442 (para (var "params")
26443 " returns a single boolean value indicating whether
26444 2D evaluation generates 2D texture coordinates. The initial value is "
26450 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_3")))
26452 (para (var "params")
26453 " returns a single boolean value indicating whether
26454 2D evaluation generates 3D texture coordinates. The initial value is "
26460 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_4")))
26462 (para (var "params")
26463 " returns a single boolean value indicating whether
26464 2D evaluation generates 4D texture coordinates. The initial value is "
26470 (entry (% (heading (code "GL_MAP2_VERTEX_3")))
26472 (para (var "params")
26473 " returns a single boolean value indicating whether
26474 2D evaluation generates 3D vertex coordinates. The initial value is "
26480 (entry (% (heading (code "GL_MAP2_VERTEX_4")))
26482 (para (var "params")
26483 " returns a single boolean value indicating whether
26484 2D evaluation generates 4D vertex coordinates. The initial value is "
26490 (entry (% (heading (code "GL_MAP_COLOR")))
26492 (para (var "params")
26493 " returns a single boolean value indicating if colors and
26494 color indices are to be replaced by table lookup during pixel
26495 transfers. The initial value is "
26499 (code "glPixelTransfer")
26501 (entry (% (heading (code "GL_MAP_STENCIL")))
26503 (para (var "params")
26504 " returns a single boolean value indicating if stencil indices
26505 are to be replaced by table lookup during pixel transfers. The initial
26510 (code "glPixelTransfer")
26512 (entry (% (heading (code "GL_MATRIX_MODE")))
26514 (para (var "params")
26515 " returns one value,
26516 a symbolic constant indicating which matrix stack is currently the
26517 target of all matrix operations. The initial value is "
26518 (code "GL_MODELVIEW")
26521 (code "glMatrixMode")
26523 (entry (% (heading (code "GL_MAX_3D_TEXTURE_SIZE")))
26525 (para (var "params")
26526 " returns one value,
26527 a rough estimate of the largest 3D texture that the GL can handle.
26528 The value must be at least 16.
26529 If the GL version is 1.2 or greater, use "
26530 (code "GL_PROXY_TEXTURE_3D")
26531 " to determine if a texture is too large.
26533 (code "glTexImage3D")
26536 (code "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH")))
26538 (para (var "params")
26539 " returns one value indicating the maximum supported depth
26540 of the client attribute stack.
26542 (code "glPushClientAttrib")
26544 (entry (% (heading (code "GL_MAX_ATTRIB_STACK_DEPTH")))
26546 (para (var "params")
26547 " returns one value,
26548 the maximum supported depth of the attribute stack. The value must be
26551 (code "glPushAttrib")
26553 (entry (% (heading (code "GL_MAX_CLIP_PLANES")))
26555 (para (var "params")
26556 " returns one value,
26557 the maximum number of application-defined clipping planes. The value must be at least 6.
26559 (code "glClipPlane")
26562 (code "GL_MAX_COLOR_MATRIX_STACK_DEPTH")))
26564 (para (var "params")
26565 " returns one value, the maximum supported depth of the color matrix
26566 stack. The value must be at least 2.
26568 (code "glPushMatrix")
26571 (code "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS")))
26573 (para (var "params")
26574 " returns one value, the maximum supported texture image units that
26575 can be used to access texture maps from the vertex shader and the fragment processor combined.
26576 If both the vertex shader and the fragment processing stage access the same texture image
26577 unit, then that counts as using two texture image units against this limit.
26578 The value must be at least 2.
26580 (code "glActiveTexture")
26582 (entry (% (heading (code "GL_MAX_CUBE_MAP_TEXTURE_SIZE")))
26584 (para (var "params")
26585 " returns one value.
26586 The value gives a rough estimate of the largest cube-map texture that
26587 the GL can handle. The value must be at least 16.
26588 If the GL version is 1.3 or greater, use "
26589 (code "GL_PROXY_TEXTURE_CUBE_MAP")
26591 to determine if a texture is too large.
26593 (code "glTexImage2D")
26595 (entry (% (heading (code "GL_MAX_DRAW_BUFFERS")))
26597 (para (var "params")
26598 " returns one value, the maximum number
26599 of simultaneous output colors allowed from a fragment shader using the "
26600 (code "gl_FragData")
26601 " built-in array. The value must be at least 1.
26603 (code "glDrawBuffers")
26605 (entry (% (heading (code "GL_MAX_ELEMENTS_INDICES")))
26607 (para (var "params")
26608 " returns one value,
26609 the recommended maximum number of vertex array indices.
26611 (code "glDrawRangeElements")
26613 (entry (% (heading (code "GL_MAX_ELEMENTS_VERTICES")))
26615 (para (var "params")
26616 " returns one value,
26617 the recommended maximum number of vertex array vertices.
26619 (code "glDrawRangeElements")
26621 (entry (% (heading (code "GL_MAX_EVAL_ORDER")))
26623 (para (var "params")
26624 " returns one value,
26625 the maximum equation order supported by 1D and 2D
26626 evaluators. The value must be at least 8.
26633 (code "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS")))
26635 (para (var "params")
26636 " returns one value,
26637 the maximum number of individual floating-point, integer, or boolean values that can be held
26638 in uniform variable storage for a fragment shader. The value must be at least 64.
26642 (entry (% (heading (code "GL_MAX_LIGHTS")))
26644 (para (var "params")
26645 " returns one value,
26646 the maximum number of lights. The value must be at least 8.
26650 (entry (% (heading (code "GL_MAX_LIST_NESTING")))
26652 (para (var "params")
26653 " returns one value,
26654 the maximum recursion depth allowed during display-list
26655 traversal. The value must be at least 64.
26657 (code "glCallList")
26659 (entry (% (heading (code "GL_MAX_MODELVIEW_STACK_DEPTH")))
26661 (para (var "params")
26662 " returns one value,
26663 the maximum supported depth of the modelview matrix stack. The value must
26666 (code "glPushMatrix")
26668 (entry (% (heading (code "GL_MAX_NAME_STACK_DEPTH")))
26670 (para (var "params")
26671 " returns one value,
26672 the maximum supported depth of the selection name stack. The value must be at least 64.
26674 (code "glPushName")
26676 (entry (% (heading (code "GL_MAX_PIXEL_MAP_TABLE")))
26678 (para (var "params")
26679 " returns one value,
26680 the maximum supported size of a "
26681 (code "glPixelMap")
26683 The value must be at least 32.
26685 (code "glPixelMap")
26687 (entry (% (heading (code "GL_MAX_PROJECTION_STACK_DEPTH")))
26689 (para (var "params")
26690 " returns one value, the maximum supported depth of the projection
26691 matrix stack. The value must be at least 2.
26693 (code "glPushMatrix")
26695 (entry (% (heading (code "GL_MAX_TEXTURE_COORDS")))
26697 (para (var "params")
26698 " returns one value,
26699 the maximum number of texture coordinate sets available to vertex and fragment shaders.
26700 The value must be at least 2.
26702 (code "glActiveTexture")
26704 (code "glClientActiveTexture")
26706 (entry (% (heading (code "GL_MAX_TEXTURE_IMAGE_UNITS")))
26708 (para (var "params")
26709 " returns one value, the maximum supported texture image units that
26710 can be used to access texture maps from the fragment shader.
26711 The value must be at least 2.
26713 (code "glActiveTexture")
26715 (entry (% (heading (code "GL_MAX_TEXTURE_LOD_BIAS")))
26717 (para (var "params")
26718 " returns one value,
26719 the maximum, absolute value of the texture level-of-detail bias. The
26720 value must be at least 4. "))
26721 (entry (% (heading (code "GL_MAX_TEXTURE_SIZE")))
26723 (para (var "params")
26724 " returns one value.
26725 The value gives a rough estimate of the largest texture that
26726 the GL can handle. The value must be at least 64.
26727 If the GL version is 1.1 or greater, use "
26728 (code "GL_PROXY_TEXTURE_1D")
26730 (code "GL_PROXY_TEXTURE_2D")
26732 to determine if a texture is too large.
26734 (code "glTexImage1D")
26736 (code "glTexImage2D")
26738 (entry (% (heading (code "GL_MAX_TEXTURE_STACK_DEPTH")))
26740 (para (var "params")
26741 " returns one value,
26742 the maximum supported depth of the texture matrix stack. The value must be at least 2.
26744 (code "glPushMatrix")
26746 (entry (% (heading (code "GL_MAX_TEXTURE_UNITS")))
26748 (para (var "params")
26749 " returns a single value indicating the number of conventional
26750 texture units supported. Each conventional texture unit includes both a texture coordinate set
26751 and a texture image unit. Conventional texture units may be used for fixed-function (non-shader)
26752 rendering. The value must be at least 2. Additional texture coordinate sets and texture
26753 image units may be accessed from vertex and fragment shaders.
26755 (code "glActiveTexture")
26757 (code "glClientActiveTexture")
26759 (entry (% (heading (code "GL_MAX_VARYING_FLOATS")))
26761 (para (var "params")
26762 " returns one value,
26763 the maximum number of interpolators available for processing varying variables used by
26764 vertex and fragment shaders. This value represents the number of individual floating-point
26765 values that can be interpolated; varying variables declared as vectors, matrices, and arrays
26766 will all consume multiple interpolators. The value must be at least 32. "))
26767 (entry (% (heading (code "GL_MAX_VERTEX_ATTRIBS")))
26769 (para (var "params")
26770 " returns one value,
26771 the maximum number of 4-component generic vertex attributes accessible to a vertex shader.
26772 The value must be at least 16.
26774 (code "glVertexAttrib")
26777 (code "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS")))
26779 (para (var "params")
26780 " returns one value, the maximum supported texture image units that
26781 can be used to access texture maps from the vertex shader. The value may be 0.
26783 (code "glActiveTexture")
26786 (code "GL_MAX_VERTEX_UNIFORM_COMPONENTS")))
26788 (para (var "params")
26789 " returns one value,
26790 the maximum number of individual floating-point, integer, or boolean values that can be held
26791 in uniform variable storage for a vertex shader. The value must be at least 512.
26795 (entry (% (heading (code "GL_MAX_VIEWPORT_DIMS")))
26797 (para (var "params")
26798 " returns two values:
26799 the maximum supported width and height of the viewport.
26800 These must be at least as large as the visible dimensions of the display
26803 (code "glViewport")
26805 (entry (% (heading (code "GL_MINMAX")))
26807 (para (var "params")
26808 " returns a single boolean value indicating whether pixel minmax
26809 values are computed. The initial value is "
26815 (entry (% (heading (code "GL_MODELVIEW_MATRIX")))
26817 (para (var "params")
26818 " returns sixteen values:
26819 the modelview matrix on the top of the modelview matrix stack. Initially
26820 this matrix is the identity matrix.
26822 (code "glPushMatrix")
26824 (entry (% (heading (code "GL_MODELVIEW_STACK_DEPTH")))
26826 (para (var "params")
26827 " returns one value,
26828 the number of matrices on the modelview matrix stack.
26829 The initial value is 1.
26831 (code "glPushMatrix")
26833 (entry (% (heading (code "GL_NAME_STACK_DEPTH")))
26835 (para (var "params")
26836 " returns one value,
26837 the number of names on the selection name stack. The initial value is 0.
26839 (code "glPushName")
26841 (entry (% (heading (code "GL_NORMAL_ARRAY")))
26843 (para (var "params")
26844 " returns a single boolean value, indicating whether the normal
26845 array is enabled. The initial value is "
26849 (code "glNormalPointer")
26851 (entry (% (heading (code "GL_NORMAL_ARRAY_BUFFER_BINDING")))
26853 (para (var "params")
26854 " returns a single value, the name of the buffer object
26855 associated with the normal array. This buffer object would have been bound to the
26857 (code "GL_ARRAY_BUFFER")
26858 " at the time of the most recent call to "
26859 (code "glNormalPointer")
26861 If no buffer object was bound to this target, 0 is returned. The initial value is 0.
26863 (code "glBindBuffer")
26865 (entry (% (heading (code "GL_NORMAL_ARRAY_STRIDE")))
26867 (para (var "params")
26868 " returns one value,
26869 the byte offset between consecutive normals in the normal
26870 array. The initial value is 0.
26872 (code "glNormalPointer")
26874 (entry (% (heading (code "GL_NORMAL_ARRAY_TYPE")))
26876 (para (var "params")
26877 " returns one value,
26878 the data type of each coordinate in the normal array. The initial value is "
26882 (code "glNormalPointer")
26884 (entry (% (heading (code "GL_NORMALIZE")))
26886 (para (var "params")
26887 " returns a single boolean value indicating whether normals are
26888 automatically scaled to unit length after they have been transformed to
26889 eye coordinates. The initial value is "
26896 (code "GL_NUM_COMPRESSED_TEXTURE_FORMATS")))
26898 (para (var "params")
26899 " returns a single integer value indicating the number of available
26900 compressed texture formats. The minimum value is 0.
26902 (code "glCompressedTexImage2D")
26904 (entry (% (heading (code "GL_PACK_ALIGNMENT")))
26906 (para (var "params")
26907 " returns one value,
26908 the byte alignment used for writing pixel data to memory. The initial
26911 (code "glPixelStore")
26913 (entry (% (heading (code "GL_PACK_IMAGE_HEIGHT")))
26915 (para (var "params")
26916 " returns one value,
26917 the image height used for writing pixel data to memory. The initial
26920 (code "glPixelStore")
26922 (entry (% (heading (code "GL_PACK_LSB_FIRST")))
26924 (para (var "params")
26925 " returns a single boolean value indicating whether single-bit
26926 pixels being written to memory are written first to the least significant
26927 bit of each unsigned byte. The initial value is "
26931 (code "glPixelStore")
26933 (entry (% (heading (code "GL_PACK_ROW_LENGTH")))
26935 (para (var "params")
26936 " returns one value,
26937 the row length used for writing pixel data to memory. The initial value is
26940 (code "glPixelStore")
26942 (entry (% (heading (code "GL_PACK_SKIP_IMAGES")))
26944 (para (var "params")
26945 " returns one value,
26946 the number of pixel images skipped before the first pixel is written
26947 into memory. The initial value is 0.
26949 (code "glPixelStore")
26951 (entry (% (heading (code "GL_PACK_SKIP_PIXELS")))
26953 (para (var "params")
26954 " returns one value,
26955 the number of pixel locations skipped before the first pixel is written
26956 into memory. The initial value is 0.
26958 (code "glPixelStore")
26960 (entry (% (heading (code "GL_PACK_SKIP_ROWS")))
26962 (para (var "params")
26963 " returns one value,
26964 the number of rows of pixel locations skipped before the first pixel is written
26965 into memory. The initial value is 0.
26967 (code "glPixelStore")
26969 (entry (% (heading (code "GL_PACK_SWAP_BYTES")))
26971 (para (var "params")
26972 " returns a single boolean value indicating whether the bytes of
26973 two-byte and four-byte pixel indices and components are swapped before being
26974 written to memory. The initial value is "
26978 (code "glPixelStore")
26980 (entry (% (heading (code "GL_PERSPECTIVE_CORRECTION_HINT")))
26982 (para (var "params")
26983 " returns one value,
26984 a symbolic constant indicating the mode of the perspective correction
26985 hint. The initial value is "
26986 (code "GL_DONT_CARE")
26991 (entry (% (heading (code "GL_PIXEL_MAP_A_TO_A_SIZE")))
26993 (para (var "params")
26994 " returns one value,
26995 the size of the alpha-to-alpha pixel translation table.
26996 The initial value is 1.
26998 (code "glPixelMap")
27000 (entry (% (heading (code "GL_PIXEL_MAP_B_TO_B_SIZE")))
27002 (para (var "params")
27003 " returns one value,
27004 the size of the blue-to-blue pixel translation table.
27005 The initial value is 1.
27007 (code "glPixelMap")
27009 (entry (% (heading (code "GL_PIXEL_MAP_G_TO_G_SIZE")))
27011 (para (var "params")
27012 " returns one value,
27013 the size of the green-to-green pixel translation table.
27014 The initial value is 1.
27016 (code "glPixelMap")
27018 (entry (% (heading (code "GL_PIXEL_MAP_I_TO_A_SIZE")))
27020 (para (var "params")
27021 " returns one value,
27022 the size of the index-to-alpha pixel translation table.
27023 The initial value is 1.
27025 (code "glPixelMap")
27027 (entry (% (heading (code "GL_PIXEL_MAP_I_TO_B_SIZE")))
27029 (para (var "params")
27030 " returns one value,
27031 the size of the index-to-blue pixel translation table.
27032 The initial value is 1.
27034 (code "glPixelMap")
27036 (entry (% (heading (code "GL_PIXEL_MAP_I_TO_G_SIZE")))
27038 (para (var "params")
27039 " returns one value,
27040 the size of the index-to-green pixel translation table.
27041 The initial value is 1.
27043 (code "glPixelMap")
27045 (entry (% (heading (code "GL_PIXEL_MAP_I_TO_I_SIZE")))
27047 (para (var "params")
27048 " returns one value,
27049 the size of the index-to-index pixel translation table.
27050 The initial value is 1.
27052 (code "glPixelMap")
27054 (entry (% (heading (code "GL_PIXEL_MAP_I_TO_R_SIZE")))
27056 (para (var "params")
27057 " returns one value,
27058 the size of the index-to-red pixel translation table.
27059 The initial value is 1.
27061 (code "glPixelMap")
27063 (entry (% (heading (code "GL_PIXEL_MAP_R_TO_R_SIZE")))
27065 (para (var "params")
27066 " returns one value,
27067 the size of the red-to-red pixel translation table.
27068 The initial value is 1.
27070 (code "glPixelMap")
27072 (entry (% (heading (code "GL_PIXEL_MAP_S_TO_S_SIZE")))
27074 (para (var "params")
27075 " returns one value,
27076 the size of the stencil-to-stencil pixel translation table.
27077 The initial value is 1.
27079 (code "glPixelMap")
27081 (entry (% (heading (code "GL_PIXEL_PACK_BUFFER_BINDING")))
27083 (para (var "params")
27084 " returns a single value, the name of the buffer object
27085 currently bound to the target "
27086 (code "GL_PIXEL_PACK_BUFFER")
27087 ". If no buffer object
27088 is bound to this target, 0 is returned. The initial value is 0.
27090 (code "glBindBuffer")
27092 (entry (% (heading (code "GL_PIXEL_UNPACK_BUFFER_BINDING")))
27094 (para (var "params")
27095 " returns a single value, the name of the buffer object
27096 currently bound to the target "
27097 (code "GL_PIXEL_UNPACK_BUFFER")
27098 ". If no buffer object
27099 is bound to this target, 0 is returned. The initial value is 0.
27101 (code "glBindBuffer")
27103 (entry (% (heading (code "GL_POINT_DISTANCE_ATTENUATION")))
27105 (para (var "params")
27106 " returns three values,
27107 the coefficients for computing the attenuation value for points.
27109 (code "glPointParameter")
27111 (entry (% (heading (code "GL_POINT_FADE_THRESHOLD_SIZE")))
27113 (para (var "params")
27114 " returns one value,
27115 the point size threshold for determining the point size.
27117 (code "glPointParameter")
27119 (entry (% (heading (code "GL_POINT_SIZE")))
27121 (para (var "params")
27122 " returns one value,
27123 the point size as specified by "
27124 (code "glPointSize")
27125 ". The initial value is 1. "))
27126 (entry (% (heading (code "GL_POINT_SIZE_GRANULARITY")))
27128 (para (var "params")
27129 " returns one value,
27130 the size difference between adjacent supported sizes for antialiased points.
27132 (code "glPointSize")
27134 (entry (% (heading (code "GL_POINT_SIZE_MAX")))
27136 (para (var "params")
27137 " returns one value,
27138 the upper bound for the attenuated point sizes. The initial value is 0.0.
27140 (code "glPointParameter")
27142 (entry (% (heading (code "GL_POINT_SIZE_MIN")))
27144 (para (var "params")
27145 " returns one value,
27146 the lower bound for the attenuated point sizes. The initial value is 1.0.
27148 (code "glPointParameter")
27150 (entry (% (heading (code "GL_POINT_SIZE_RANGE")))
27152 (para (var "params")
27153 " returns two values:
27154 the smallest and largest supported sizes for antialiased
27155 points. The smallest size must be at most 1, and the largest size must
27158 (code "glPointSize")
27160 (entry (% (heading (code "GL_POINT_SMOOTH")))
27162 (para (var "params")
27163 " returns a single boolean value indicating whether antialiasing of
27164 points is enabled. The initial value is "
27168 (code "glPointSize")
27170 (entry (% (heading (code "GL_POINT_SMOOTH_HINT")))
27172 (para (var "params")
27173 " returns one value,
27174 a symbolic constant indicating the mode of the point antialiasing
27175 hint. The initial value is "
27176 (code "GL_DONT_CARE")
27181 (entry (% (heading (code "GL_POINT_SPRITE")))
27183 (para (var "params")
27184 " returns a single boolean value indicating whether point sprite is
27185 enabled. The initial value is "
27188 (entry (% (heading (code "GL_POLYGON_MODE")))
27190 (para (var "params")
27191 " returns two values:
27192 symbolic constants indicating whether front-facing and back-facing polygons
27193 are rasterized as points, lines, or filled polygons. The initial value is "
27197 (code "glPolygonMode")
27199 (entry (% (heading (code "GL_POLYGON_OFFSET_FACTOR")))
27201 (para (var "params")
27202 " returns one value,
27203 the scaling factor used to determine the variable offset that is added
27204 to the depth value of each fragment generated when a polygon is
27205 rasterized. The initial value is 0.
27207 (code "glPolygonOffset")
27209 (entry (% (heading (code "GL_POLYGON_OFFSET_UNITS")))
27211 (para (var "params")
27212 " returns one value.
27213 This value is multiplied by an implementation-specific value and then
27214 added to the depth value of each fragment
27215 generated when a polygon is rasterized. The initial value is 0.
27217 (code "glPolygonOffset")
27219 (entry (% (heading (code "GL_POLYGON_OFFSET_FILL")))
27221 (para (var "params")
27222 " returns a single boolean value indicating whether polygon offset
27223 is enabled for polygons in fill mode. The initial value is "
27227 (code "glPolygonOffset")
27229 (entry (% (heading (code "GL_POLYGON_OFFSET_LINE")))
27231 (para (var "params")
27232 " returns a single boolean value indicating whether polygon offset
27233 is enabled for polygons in line mode. The initial value is "
27237 (code "glPolygonOffset")
27239 (entry (% (heading (code "GL_POLYGON_OFFSET_POINT")))
27241 (para (var "params")
27242 " returns a single boolean value indicating whether polygon offset
27243 is enabled for polygons in point mode. The initial value is "
27247 (code "glPolygonOffset")
27249 (entry (% (heading (code "GL_POLYGON_SMOOTH")))
27251 (para (var "params")
27252 " returns a single boolean value indicating whether antialiasing of
27253 polygons is enabled. The initial value is "
27257 (code "glPolygonMode")
27259 (entry (% (heading (code "GL_POLYGON_SMOOTH_HINT")))
27261 (para (var "params")
27262 " returns one value,
27263 a symbolic constant indicating the mode of the polygon antialiasing
27264 hint. The initial value is "
27265 (code "GL_DONT_CARE")
27270 (entry (% (heading (code "GL_POLYGON_STIPPLE")))
27272 (para (var "params")
27273 " returns a single boolean value indicating whether polygon
27274 stippling is enabled. The initial value is "
27278 (code "glPolygonStipple")
27281 (code "GL_POST_COLOR_MATRIX_COLOR_TABLE")))
27283 (para (var "params")
27284 " returns a single boolean value indicating whether post color
27285 matrix transformation lookup is enabled.
27286 The initial value is "
27290 (code "glColorTable")
27292 (entry (% (heading (code "GL_POST_COLOR_MATRIX_RED_BIAS")))
27294 (para (var "params")
27295 " returns one value, the red bias factor applied to RGBA fragments
27296 after color matrix transformations.
27297 The initial value is 0.
27299 (code "glPixelTransfer")
27302 (code "GL_POST_COLOR_MATRIX_GREEN_BIAS")))
27304 (para (var "params")
27305 " returns one value, the green bias factor applied to RGBA fragments
27306 after color matrix transformations.
27307 The initial value is 0.
27309 (code "glPixelTransfer")))
27310 (entry (% (heading (code "GL_POST_COLOR_MATRIX_BLUE_BIAS")))
27312 (para (var "params")
27313 " returns one value, the blue bias factor applied to RGBA fragments
27314 after color matrix transformations.
27315 The initial value is 0.
27317 (code "glPixelTransfer")
27320 (code "GL_POST_COLOR_MATRIX_ALPHA_BIAS")))
27322 (para (var "params")
27323 " returns one value, the alpha bias factor applied to RGBA fragments
27324 after color matrix transformations.
27325 The initial value is 0.
27327 (code "glPixelTransfer")
27329 (entry (% (heading (code "GL_POST_COLOR_MATRIX_RED_SCALE")))
27331 (para (var "params")
27332 " returns one value, the red scale factor applied to RGBA fragments
27333 after color matrix transformations.
27334 The initial value is 1.
27336 (code "glPixelTransfer")
27339 (code "GL_POST_COLOR_MATRIX_GREEN_SCALE")))
27341 (para (var "params")
27342 " returns one value, the green scale factor applied to RGBA fragments
27343 after color matrix transformations.
27344 The initial value is 1.
27346 (code "glPixelTransfer")
27349 (code "GL_POST_COLOR_MATRIX_BLUE_SCALE")))
27351 (para (var "params")
27352 " returns one value, the blue scale factor applied to RGBA fragments
27353 after color matrix transformations.
27354 The initial value is 1.
27356 (code "glPixelTransfer")
27359 (code "GL_POST_COLOR_MATRIX_ALPHA_SCALE")))
27361 (para (var "params")
27362 " returns one value, the alpha scale factor applied to RGBA fragments
27363 after color matrix transformations.
27364 The initial value is 1.
27366 (code "glPixelTransfer")
27369 (code "GL_POST_CONVOLUTION_COLOR_TABLE")))
27371 (para (var "params")
27372 " returns a single boolean value indicating whether post convolution
27373 lookup is enabled. The initial value is "
27377 (code "glColorTable")
27379 (entry (% (heading (code "GL_POST_CONVOLUTION_RED_BIAS")))
27381 (para (var "params")
27382 " returns one value, the red bias factor applied to RGBA fragments
27383 after convolution. The initial value is 0.
27385 (code "glPixelTransfer")
27387 (entry (% (heading (code "GL_POST_CONVOLUTION_GREEN_BIAS")))
27389 (para (var "params")
27390 " returns one value, the green bias factor applied to RGBA fragments
27391 after convolution. The initial value is 0.
27393 (code "glPixelTransfer")
27395 (entry (% (heading (code "GL_POST_CONVOLUTION_BLUE_BIAS")))
27397 (para (var "params")
27398 " returns one value, the blue bias factor applied to RGBA fragments
27399 after convolution. The initial value is 0.
27401 (code "glPixelTransfer")
27403 (entry (% (heading (code "GL_POST_CONVOLUTION_ALPHA_BIAS")))
27405 (para (var "params")
27406 " returns one value, the alpha bias factor applied to RGBA fragments
27407 after convolution. The initial value is 0.
27409 (code "glPixelTransfer")
27411 (entry (% (heading (code "GL_POST_CONVOLUTION_RED_SCALE")))
27413 (para (var "params")
27414 " returns one value, the red scale factor applied to RGBA fragments
27415 after convolution. The initial value is 1.
27417 (code "glPixelTransfer")
27420 (code "GL_POST_CONVOLUTION_GREEN_SCALE")))
27422 (para (var "params")
27423 " returns one value, the green scale factor applied to RGBA fragments
27424 after convolution. The initial value is 1.
27426 (code "glPixelTransfer")
27428 (entry (% (heading (code "GL_POST_CONVOLUTION_BLUE_SCALE")))
27430 (para (var "params")
27431 " returns one value, the blue scale factor applied to RGBA fragments
27432 after convolution. The initial value is 1.
27434 (code "glPixelTransfer")
27437 (code "GL_POST_CONVOLUTION_ALPHA_SCALE")))
27439 (para (var "params")
27440 " returns one value, the alpha scale factor applied to RGBA fragments
27441 after convolution. The initial value is 1.
27443 (code "glPixelTransfer")
27445 (entry (% (heading (code "GL_PROJECTION_MATRIX")))
27447 (para (var "params")
27448 " returns sixteen values:
27449 the projection matrix on the top of the projection matrix
27450 stack. Initially this matrix is the identity matrix.
27452 (code "glPushMatrix")
27454 (entry (% (heading (code "GL_PROJECTION_STACK_DEPTH")))
27456 (para (var "params")
27457 " returns one value,
27458 the number of matrices on the projection matrix stack.
27459 The initial value is 1.
27461 (code "glPushMatrix")
27463 (entry (% (heading (code "GL_READ_BUFFER")))
27465 (para (var "params")
27466 " returns one value,
27467 a symbolic constant indicating which color buffer is selected for
27468 reading. The initial value is "
27470 " if there is a back buffer,
27475 (code "glReadPixels")
27479 (entry (% (heading (code "GL_RED_BIAS")))
27481 (para (var "params")
27482 " returns one value,
27483 the red bias factor used during pixel transfers. The initial value is 0. "))
27484 (entry (% (heading (code "GL_RED_BITS")))
27486 (para (var "params")
27487 " returns one value,
27488 the number of red bitplanes in each color buffer. "))
27489 (entry (% (heading (code "GL_RED_SCALE")))
27491 (para (var "params")
27492 " returns one value,
27493 the red scale factor used during pixel transfers. The initial value is 1.
27495 (code "glPixelTransfer")
27497 (entry (% (heading (code "GL_RENDER_MODE")))
27499 (para (var "params")
27500 " returns one value,
27501 a symbolic constant indicating whether the GL is in render,
27503 or feedback mode. The initial value is "
27507 (code "glRenderMode")
27509 (entry (% (heading (code "GL_RESCALE_NORMAL")))
27511 (para (var "params")
27512 " returns single boolean value
27513 indicating whether normal rescaling is enabled.
27517 (entry (% (heading (code "GL_RGBA_MODE")))
27519 (para (var "params")
27520 " returns a single boolean value indicating whether the GL is in RGBA
27521 mode (true) or color index mode (false).
27525 (entry (% (heading (code "GL_SAMPLE_BUFFERS")))
27527 (para (var "params")
27528 " returns a single integer value indicating the number of sample buffers
27529 associated with the framebuffer.
27531 (code "glSampleCoverage")
27533 (entry (% (heading (code "GL_SAMPLE_COVERAGE_VALUE")))
27535 (para (var "params")
27536 " returns a single positive floating-point value indicating the
27537 current sample coverage value.
27539 (code "glSampleCoverage")
27541 (entry (% (heading (code "GL_SAMPLE_COVERAGE_INVERT")))
27543 (para (var "params")
27544 " returns a single boolean value indicating if the temporary
27545 coverage value should be inverted.
27547 (code "glSampleCoverage")
27549 (entry (% (heading (code "GL_SAMPLES")))
27551 (para (var "params")
27552 " returns a single integer value indicating the coverage mask size.
27554 (code "glSampleCoverage")
27556 (entry (% (heading (code "GL_SCISSOR_BOX")))
27558 (para (var "params")
27559 " returns four values:
27566 window coordinates of the scissor box,
27567 followed by its width and height.
27574 window coordinates are both 0 and the
27575 width and height are set to the size of the window.
27579 (entry (% (heading (code "GL_SCISSOR_TEST")))
27581 (para (var "params")
27582 " returns a single boolean value indicating whether scissoring is
27583 enabled. The initial value is "
27589 (entry (% (heading (code "GL_SECONDARY_COLOR_ARRAY")))
27591 (para (var "params")
27592 " returns a single boolean value indicating whether the secondary color array is enabled. The initial value is "
27596 (code "glSecondaryColorPointer")
27599 (code "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING")))
27601 (para (var "params")
27602 " returns a single value, the name of the buffer object
27603 associated with the secondary color array. This buffer object would have been bound to the
27605 (code "GL_ARRAY_BUFFER")
27606 " at the time of the most recent call to "
27607 (code "glSecondaryColorPointer")
27609 If no buffer object was bound to this target, 0 is returned. The initial value is 0.
27611 (code "glBindBuffer")
27613 (entry (% (heading (code "GL_SECONDARY_COLOR_ARRAY_SIZE")))
27615 (para (var "params")
27616 " returns one value, the number of components per color in the
27617 secondary color array. The initial value is 3.
27619 (code "glSecondaryColorPointer")
27622 (code "GL_SECONDARY_COLOR_ARRAY_STRIDE")))
27624 (para (var "params")
27625 " returns one value, the byte offset between consecutive colors in
27626 the secondary color array. The initial value is 0.
27628 (code "glSecondaryColorPointer")
27630 (entry (% (heading (code "GL_SECONDARY_COLOR_ARRAY_TYPE")))
27632 (para (var "params")
27633 " returns one value, the data type of each component in the secondary
27634 color array. The initial value is "
27638 (code "glSecondaryColorPointer")
27640 (entry (% (heading (code "GL_SELECTION_BUFFER_SIZE")))
27642 (para (var "params")
27643 " return one value,
27644 the size of the selection buffer.
27646 (code "glSelectBuffer")
27648 (entry (% (heading (code "GL_SEPARABLE_2D")))
27650 (para (var "params")
27651 " returns a single boolean value indicating whether 2D separable
27652 convolution is enabled. The initial value is "
27656 (code "glSeparableFilter2D")
27658 (entry (% (heading (code "GL_SHADE_MODEL")))
27660 (para (var "params")
27661 " returns one value,
27662 a symbolic constant indicating whether the shading mode is flat or
27663 smooth. The initial value is "
27667 (code "glShadeModel")
27669 (entry (% (heading (code "GL_SMOOTH_LINE_WIDTH_RANGE")))
27671 (para (var "params")
27672 " returns two values,
27673 the smallest and largest supported widths for antialiased lines.
27675 (code "glLineWidth")
27678 (code "GL_SMOOTH_LINE_WIDTH_GRANULARITY")))
27680 (para (var "params")
27681 " returns one value,
27682 the granularity of widths for antialiased lines.
27684 (code "glLineWidth")
27686 (entry (% (heading (code "GL_SMOOTH_POINT_SIZE_RANGE")))
27688 (para (var "params")
27689 " returns two values,
27690 the smallest and largest supported widths for antialiased points.
27692 (code "glPointSize")
27695 (code "GL_SMOOTH_POINT_SIZE_GRANULARITY")))
27697 (para (var "params")
27698 " returns one value,
27699 the granularity of sizes for antialiased points.
27701 (code "glPointSize")
27703 (entry (% (heading (code "GL_STENCIL_BACK_FAIL")))
27705 (para (var "params")
27706 " returns one value,
27707 a symbolic constant indicating what action is taken for back-facing polygons when the stencil
27708 test fails. The initial value is "
27712 (code "glStencilOpSeparate")
27714 (entry (% (heading (code "GL_STENCIL_BACK_FUNC")))
27716 (para (var "params")
27717 " returns one value,
27718 a symbolic constant indicating what function is used for back-facing polygons to compare the
27719 stencil reference value with the stencil buffer value. The initial value
27724 (code "glStencilFuncSeparate")
27727 (code "GL_STENCIL_BACK_PASS_DEPTH_FAIL")))
27729 (para (var "params")
27730 " returns one value,
27731 a symbolic constant indicating what action is taken for back-facing polygons when the stencil
27733 but the depth test fails. The initial value is "
27737 (code "glStencilOpSeparate")
27740 (code "GL_STENCIL_BACK_PASS_DEPTH_PASS")))
27742 (para (var "params")
27743 " returns one value,
27744 a symbolic constant indicating what action is taken for back-facing polygons when the stencil
27745 test passes and the depth test passes. The initial value is "
27749 (code "glStencilOpSeparate")
27751 (entry (% (heading (code "GL_STENCIL_BACK_REF")))
27753 (para (var "params")
27754 " returns one value,
27755 the reference value that is compared with the contents of the stencil
27756 buffer for back-facing polygons. The initial value is 0.
27758 (code "glStencilFuncSeparate")
27760 (entry (% (heading (code "GL_STENCIL_BACK_VALUE_MASK")))
27762 (para (var "params")
27763 " returns one value,
27764 the mask that is used for back-facing polygons to mask both the stencil reference value and the
27765 stencil buffer value before they are compared. The initial value is all 1's.
27767 (code "glStencilFuncSeparate")
27769 (entry (% (heading (code "GL_STENCIL_BACK_WRITEMASK")))
27771 (para (var "params")
27772 " returns one value,
27773 the mask that controls writing of the stencil bitplanes for back-facing polygons. The initial value
27776 (code "glStencilMaskSeparate")
27778 (entry (% (heading (code "GL_STENCIL_BITS")))
27780 (para (var "params")
27781 " returns one value,
27782 the number of bitplanes in the stencil buffer. "))
27783 (entry (% (heading (code "GL_STENCIL_CLEAR_VALUE")))
27785 (para (var "params")
27786 " returns one value,
27787 the index to which the stencil bitplanes are cleared. The initial value is
27790 (code "glClearStencil")
27792 (entry (% (heading (code "GL_STENCIL_FAIL")))
27794 (para (var "params")
27795 " returns one value,
27796 a symbolic constant indicating what action is taken when the stencil
27797 test fails. The initial value is "
27801 (code "glStencilOp")
27803 If the GL version is 2.0 or greater, this stencil state only affects non-polygons
27804 and front-facing polygons. Back-facing polygons use separate stencil state.
27806 (code "glStencilOpSeparate")
27808 (entry (% (heading (code "GL_STENCIL_FUNC")))
27810 (para (var "params")
27811 " returns one value,
27812 a symbolic constant indicating what function is used to compare the
27813 stencil reference value with the stencil buffer value. The initial value
27818 (code "glStencilFunc")
27820 If the GL version is 2.0 or greater, this stencil state only affects non-polygons
27821 and front-facing polygons. Back-facing polygons use separate stencil state.
27823 (code "glStencilFuncSeparate")
27825 (entry (% (heading (code "GL_STENCIL_PASS_DEPTH_FAIL")))
27827 (para (var "params")
27828 " returns one value,
27829 a symbolic constant indicating what action is taken when the stencil
27831 but the depth test fails. The initial value is "
27835 (code "glStencilOp")
27837 If the GL version is 2.0 or greater, this stencil state only affects non-polygons
27838 and front-facing polygons. Back-facing polygons use separate stencil state.
27840 (code "glStencilOpSeparate")
27842 (entry (% (heading (code "GL_STENCIL_PASS_DEPTH_PASS")))
27844 (para (var "params")
27845 " returns one value,
27846 a symbolic constant indicating what action is taken when the stencil
27847 test passes and the depth test passes. The initial value is "
27851 (code "glStencilOp")
27853 If the GL version is 2.0 or greater, this stencil state only affects non-polygons
27854 and front-facing polygons. Back-facing polygons use separate stencil state.
27856 (code "glStencilOpSeparate")
27858 (entry (% (heading (code "GL_STENCIL_REF")))
27860 (para (var "params")
27861 " returns one value,
27862 the reference value that is compared with the contents of the stencil
27863 buffer. The initial value is 0.
27865 (code "glStencilFunc")
27867 If the GL version is 2.0 or greater, this stencil state only affects non-polygons
27868 and front-facing polygons. Back-facing polygons use separate stencil state.
27870 (code "glStencilFuncSeparate")
27872 (entry (% (heading (code "GL_STENCIL_TEST")))
27874 (para (var "params")
27875 " returns a single boolean value indicating whether stencil testing
27876 of fragments is enabled. The initial value is "
27880 (code "glStencilFunc")
27882 (code "glStencilOp")
27884 (entry (% (heading (code "GL_STENCIL_VALUE_MASK")))
27886 (para (var "params")
27887 " returns one value,
27888 the mask that is used to mask both the stencil reference value and the
27889 stencil buffer value before they are compared. The initial value is all 1's.
27891 (code "glStencilFunc")
27893 If the GL version is 2.0 or greater, this stencil state only affects non-polygons
27894 and front-facing polygons. Back-facing polygons use separate stencil state.
27896 (code "glStencilFuncSeparate")
27898 (entry (% (heading (code "GL_STENCIL_WRITEMASK")))
27900 (para (var "params")
27901 " returns one value,
27902 the mask that controls writing of the stencil bitplanes. The initial value
27905 (code "glStencilMask")
27907 If the GL version is 2.0 or greater, this stencil state only affects non-polygons
27908 and front-facing polygons. Back-facing polygons use separate stencil state.
27910 (code "glStencilMaskSeparate")
27912 (entry (% (heading (code "GL_STEREO")))
27914 (para (var "params")
27915 " returns a single boolean value indicating whether stereo buffers
27916 (left and right) are supported. "))
27917 (entry (% (heading (code "GL_SUBPIXEL_BITS")))
27919 (para (var "params")
27920 " returns one value,
27921 an estimate of the number of bits of subpixel resolution that are used to
27922 position rasterized geometry in window coordinates. The value must be at least 4. "))
27923 (entry (% (heading (code "GL_TEXTURE_1D")))
27925 (para (var "params")
27926 " returns a single boolean value indicating whether 1D texture
27927 mapping is enabled. The initial value is "
27931 (code "glTexImage1D")
27933 (entry (% (heading (code "GL_TEXTURE_BINDING_1D")))
27935 (para (var "params")
27936 " returns a single value, the name of the texture
27937 currently bound to the target "
27938 (code "GL_TEXTURE_1D")
27939 ". The initial value is 0.
27941 (code "glBindTexture")
27943 (entry (% (heading (code "GL_TEXTURE_2D")))
27945 (para (var "params")
27946 " returns a single boolean value indicating whether 2D texture
27947 mapping is enabled. The initial value is "
27951 (code "glTexImage2D")
27953 (entry (% (heading (code "GL_TEXTURE_BINDING_2D")))
27955 (para (var "params")
27956 " returns a single value, the name of the texture
27957 currently bound to the target "
27958 (code "GL_TEXTURE_2D")
27959 ". The initial value is 0.
27961 (code "glBindTexture")
27963 (entry (% (heading (code "GL_TEXTURE_3D")))
27965 (para (var "params")
27966 " returns a single boolean value indicating whether 3D texture
27967 mapping is enabled. The initial value is "
27971 (code "glTexImage3D")
27973 (entry (% (heading (code "GL_TEXTURE_BINDING_3D")))
27975 (para (var "params")
27976 " returns a single value, the name of the texture
27977 currently bound to the target "
27978 (code "GL_TEXTURE_3D")
27979 ". The initial value is 0.
27981 (code "glBindTexture")
27983 (entry (% (heading (code "GL_TEXTURE_BINDING_CUBE_MAP")))
27985 (para (var "params")
27986 " returns a single value, the name of the texture
27987 currently bound to the target "
27988 (code "GL_TEXTURE_CUBE_MAP")
27989 ". The initial value is 0.
27991 (code "glBindTexture")
27993 (entry (% (heading (code "GL_TEXTURE_COMPRESSION_HINT")))
27995 (para (var "params")
27996 " returns a single value indicating the mode of the texture
27997 compression hint. The initial value is "
27998 (code "GL_DONT_CARE")
28000 (entry (% (heading (code "GL_TEXTURE_COORD_ARRAY")))
28002 (para (var "params")
28003 " returns a single boolean value indicating whether the texture
28004 coordinate array is enabled. The initial value is "
28008 (code "glTexCoordPointer")
28011 (code "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING")))
28013 (para (var "params")
28014 " returns a single value, the name of the buffer object
28015 associated with the texture coordinate array. This buffer object would have been bound to the
28017 (code "GL_ARRAY_BUFFER")
28018 " at the time of the most recent call to "
28019 (code "glTexCoordPointer")
28021 If no buffer object was bound to this target, 0 is returned. The initial value is 0.
28023 (code "glBindBuffer")
28025 (entry (% (heading (code "GL_TEXTURE_COORD_ARRAY_SIZE")))
28027 (para (var "params")
28028 " returns one value,
28029 the number of coordinates per element in the texture coordinate
28030 array. The initial value is 4.
28032 (code "glTexCoordPointer")
28034 (entry (% (heading (code "GL_TEXTURE_COORD_ARRAY_STRIDE")))
28036 (para (var "params")
28037 " returns one value,
28038 the byte offset between consecutive elements in the texture coordinate
28039 array. The initial value is 0.
28041 (code "glTexCoordPointer")
28043 (entry (% (heading (code "GL_TEXTURE_COORD_ARRAY_TYPE")))
28045 (para (var "params")
28046 " returns one value,
28047 the data type of the coordinates in the texture coordinate
28048 array. The initial value is "
28052 (code "glTexCoordPointer")
28054 (entry (% (heading (code "GL_TEXTURE_CUBE_MAP")))
28056 (para (var "params")
28057 " returns a single boolean value indicating whether cube-mapped texture
28058 mapping is enabled. The initial value is "
28062 (code "glTexImage2D")
28064 (entry (% (heading (code "GL_TEXTURE_GEN_Q")))
28066 (para (var "params")
28067 " returns a single boolean value indicating whether automatic generation
28070 " texture coordinate is enabled. The initial value is "
28076 (entry (% (heading (code "GL_TEXTURE_GEN_R")))
28078 (para (var "params")
28079 " returns a single boolean value indicating whether automatic generation
28082 " texture coordinate is enabled. The initial value is "
28088 (entry (% (heading (code "GL_TEXTURE_GEN_S")))
28090 (para (var "params")
28091 " returns a single boolean value indicating whether automatic generation
28094 " texture coordinate is enabled. The initial value is "
28100 (entry (% (heading (code "GL_TEXTURE_GEN_T")))
28102 (para (var "params")
28103 " returns a single boolean value indicating whether automatic generation
28104 of the T texture coordinate is enabled. The initial value is "
28110 (entry (% (heading (code "GL_TEXTURE_MATRIX")))
28112 (para (var "params")
28113 " returns sixteen values:
28114 the texture matrix on the top of the texture matrix stack. Initially this
28115 matrix is the identity matrix.
28117 (code "glPushMatrix")
28119 (entry (% (heading (code "GL_TEXTURE_STACK_DEPTH")))
28121 (para (var "params")
28122 " returns one value,
28123 the number of matrices on the texture matrix stack.
28124 The initial value is 1.
28126 (code "glPushMatrix")
28128 (entry (% (heading (code "GL_TRANSPOSE_COLOR_MATRIX")))
28130 (para (var "params")
28131 " returns 16 values, the elements of the color matrix in row-major
28134 (code "glLoadTransposeMatrix")
28136 (entry (% (heading (code "GL_TRANSPOSE_MODELVIEW_MATRIX")))
28138 (para (var "params")
28139 " returns 16 values, the elements of the modelview matrix in row-major
28142 (code "glLoadTransposeMatrix")
28144 (entry (% (heading (code "GL_TRANSPOSE_PROJECTION_MATRIX")))
28146 (para (var "params")
28147 " returns 16 values, the elements of the projection matrix in row-major
28150 (code "glLoadTransposeMatrix")
28152 (entry (% (heading (code "GL_TRANSPOSE_TEXTURE_MATRIX")))
28154 (para (var "params")
28155 " returns 16 values, the elements of the texture matrix in row-major
28158 (code "glLoadTransposeMatrix")
28160 (entry (% (heading (code "GL_UNPACK_ALIGNMENT")))
28162 (para (var "params")
28163 " returns one value,
28164 the byte alignment used for reading pixel data from memory. The initial
28167 (code "glPixelStore")
28169 (entry (% (heading (code "GL_UNPACK_IMAGE_HEIGHT")))
28171 (para (var "params")
28172 " returns one value,
28173 the image height used for reading pixel data from memory. The initial
28176 (code "glPixelStore")
28178 (entry (% (heading (code "GL_UNPACK_LSB_FIRST")))
28180 (para (var "params")
28181 " returns a single boolean value indicating whether single-bit
28182 pixels being read from memory are read first from the least significant
28183 bit of each unsigned byte. The initial value is "
28187 (code "glPixelStore")
28189 (entry (% (heading (code "GL_UNPACK_ROW_LENGTH")))
28191 (para (var "params")
28192 " returns one value,
28193 the row length used for reading pixel data from memory. The initial value
28196 (code "glPixelStore")
28198 (entry (% (heading (code "GL_UNPACK_SKIP_IMAGES")))
28200 (para (var "params")
28201 " returns one value,
28202 the number of pixel images skipped before the first pixel is read
28203 from memory. The initial value is 0.
28205 (code "glPixelStore")
28207 (entry (% (heading (code "GL_UNPACK_SKIP_PIXELS")))
28209 (para (var "params")
28210 " returns one value,
28211 the number of pixel locations skipped before the first pixel is read
28212 from memory. The initial value is 0.
28214 (code "glPixelStore")
28216 (entry (% (heading (code "GL_UNPACK_SKIP_ROWS")))
28218 (para (var "params")
28219 " returns one value,
28220 the number of rows of pixel locations skipped before the first pixel is read
28221 from memory. The initial value is 0.
28223 (code "glPixelStore")
28225 (entry (% (heading (code "GL_UNPACK_SWAP_BYTES")))
28227 (para (var "params")
28228 " returns a single boolean value indicating whether the bytes of
28229 two-byte and four-byte pixel indices and components are swapped after being
28230 read from memory. The initial value is "
28234 (code "glPixelStore")
28236 (entry (% (heading (code "GL_VERTEX_ARRAY")))
28238 (para (var "params")
28239 " returns a single boolean value indicating whether the vertex
28240 array is enabled. The initial value is "
28244 (code "glVertexPointer")
28246 (entry (% (heading (code "GL_VERTEX_ARRAY_BUFFER_BINDING")))
28248 (para (var "params")
28249 " returns a single value, the name of the buffer object
28250 associated with the vertex array. This buffer object would have been bound to the
28252 (code "GL_ARRAY_BUFFER")
28253 " at the time of the most recent call to "
28254 (code "glVertexPointer")
28256 If no buffer object was bound to this target, 0 is returned. The initial value is 0.
28258 (code "glBindBuffer")
28260 (entry (% (heading (code "GL_VERTEX_ARRAY_SIZE")))
28262 (para (var "params")
28263 " returns one value,
28264 the number of coordinates per vertex in the vertex array. The initial
28267 (code "glVertexPointer")
28269 (entry (% (heading (code "GL_VERTEX_ARRAY_STRIDE")))
28271 (para (var "params")
28272 " returns one value,
28273 the byte offset between consecutive vertices in the vertex
28274 array. The initial value is 0.
28276 (code "glVertexPointer")
28278 (entry (% (heading (code "GL_VERTEX_ARRAY_TYPE")))
28280 (para (var "params")
28281 " returns one value,
28282 the data type of each coordinate in the vertex array. The initial value is "
28286 (code "glVertexPointer")
28288 (entry (% (heading (code "GL_VERTEX_PROGRAM_POINT_SIZE")))
28290 (para (var "params")
28291 " returns a single boolean value indicating whether vertex
28292 program point size mode is enabled. If enabled, and a vertex shader is active, then the
28293 point size is taken from the shader built-in "
28294 (code "gl_PointSize")
28296 and a vertex shader is active, then the point size is taken from the point state as specified
28298 (code "glPointSize")
28300 The initial value is "
28303 (entry (% (heading (code "GL_VERTEX_PROGRAM_TWO_SIDE")))
28305 (para (var "params")
28306 " returns a single boolean value indicating whether vertex
28307 program two-sided color mode is enabled. If enabled, and a vertex shader is active, then the
28308 GL chooses the back color output for back-facing polygons, and the front color output for
28309 non-polygons and front-facing polygons. If disabled, and a vertex shader is active, then the
28310 front color output is always selected. The initial value is "
28313 (entry (% (heading (code "GL_VIEWPORT")))
28315 (para (var "params")
28316 " returns four values:
28323 window coordinates of the viewport,
28324 followed by its width and height.
28331 window coordinates are both set to 0,
28332 and the width and height are set to the width and height of the window into
28333 which the GL will do its rendering.
28335 (code "glViewport")
28337 (entry (% (heading (code "GL_ZOOM_X")))
28339 (para (var "params")
28340 " returns one value,
28344 pixel zoom factor. The initial value is 1.
28346 (code "glPixelZoom")
28348 (entry (% (heading (code "GL_ZOOM_Y")))
28350 (para (var "params")
28351 " returns one value,
28355 pixel zoom factor. The initial value is 1.
28357 (code "glPixelZoom")
28360 Many of the boolean parameters can also be queried more easily using "
28361 (code "glIsEnabled")
28364 (para (code "GL_INVALID_ENUM")
28365 " is generated if "
28367 " is not an accepted value. ")
28368 (para (code "GL_INVALID_OPERATION")
28369 " is generated if "
28372 is executed between the execution of "
28375 and the corresponding execution of "
28380 (define-gl-procedure
28385 (funcdef "void " (function "glHint"))
28386 (paramdef "GLenum " (parameter "target"))
28387 (paramdef "GLenum " (parameter "mode"))))
28389 (heading "specify implementation-specific hints")
28390 (heading "Parameters")
28391 (table (% (formatter (asis)))
28392 (entry (% (heading (var "target")))
28394 Specifies a symbolic constant indicating the behavior to be controlled. "
28395 (code "GL_FOG_HINT")
28397 (code "GL_GENERATE_MIPMAP_HINT")
28399 (code "GL_LINE_SMOOTH_HINT")
28401 (code "GL_PERSPECTIVE_CORRECTION_HINT")
28403 (code "GL_POINT_SMOOTH_HINT")
28405 (code "GL_POLYGON_SMOOTH_HINT")
28407 (code "GL_TEXTURE_COMPRESSION_HINT")
28409 (code "GL_FRAGMENT_SHADER_DERIVATIVE_HINT")
28412 (entry (% (heading (var "mode")))
28414 Specifies a symbolic constant indicating the desired behavior. "
28415 (code "GL_FASTEST")
28419 (code "GL_DONT_CARE")
28420 " are accepted. ")))
28421 (heading "Description")
28423 Certain aspects of GL behavior,
28424 when there is room for interpretation,
28425 can be controlled with hints.
28426 A hint is specified with two arguments. "
28429 constant indicating the behavior to be controlled,
28432 " is another symbolic constant indicating the desired
28433 behavior. The initial value for each "
28436 (code "GL_DONT_CARE")
28439 " can be one of the following: ")
28440 (table (% (formatter (asis)))
28441 (entry (% (heading (code "GL_FASTEST")))
28444 The most efficient option should be chosen. "))
28445 (entry (% (heading (code "GL_NICEST")))
28449 or highest quality,
28450 option should be chosen. "))
28451 (entry (% (heading (code "GL_DONT_CARE")))
28454 No preference. ")))
28456 Though the implementation aspects that can be hinted are well defined,
28457 the interpretation of the hints depends on the implementation.
28458 The hint aspects that can be specified with "
28461 along with suggested semantics,
28463 (table (% (formatter (asis)))
28464 (entry (% (heading (code "GL_FOG_HINT")))
28467 Indicates the accuracy of fog calculation.
28468 If per-pixel fog calculation is not efficiently supported
28469 by the GL implementation,
28471 (code "GL_DONT_CARE")
28473 (code "GL_FASTEST")
28474 " can result in per-vertex
28475 calculation of fog effects. "))
28477 (code "GL_FRAGMENT_SHADER_DERIVATIVE_HINT")))
28480 Indicates the accuracy of the derivative calculation for the GL shading language fragment processing built-in functions: "
28487 (entry (% (heading (code "GL_GENERATE_MIPMAP_HINT")))
28490 Indicates the quality of filtering when generating mipmap images. "))
28491 (entry (% (heading (code "GL_LINE_SMOOTH_HINT")))
28494 Indicates the sampling quality of antialiased lines.
28495 If a larger filter function is applied, hinting "
28498 result in more pixel fragments being generated during rasterization. "))
28499 (entry (% (heading (code "GL_PERSPECTIVE_CORRECTION_HINT")))
28502 Indicates the quality of color, texture coordinate, and fog coordinate
28503 interpolation. If perspective-corrected parameter interpolation is not
28504 efficiently supported by the GL implementation, hinting "
28505 (code "GL_DONT_CARE")
28508 (code "GL_FASTEST")
28509 " can result in simple linear interpolation of colors
28510 and/or texture coordinates. "))
28511 (entry (% (heading (code "GL_POINT_SMOOTH_HINT")))
28514 Indicates the sampling quality of antialiased points.
28515 If a larger filter function is applied, hinting "
28518 result in more pixel fragments being generated during rasterization. "))
28519 (entry (% (heading (code "GL_POLYGON_SMOOTH_HINT")))
28522 Indicates the sampling quality of antialiased polygons.
28525 " can result in more pixel fragments being generated
28526 during rasterization,
28527 if a larger filter function is applied. "))
28528 (entry (% (heading (code "GL_TEXTURE_COMPRESSION_HINT")))
28531 Indicates the quality and performance of the compressing texture images.
28533 (code "GL_FASTEST")
28534 " indicates that texture images should be compressed
28535 as quickly as possible, while "
28537 " indicates that texture images
28538 should be compressed with as little image quality loss as possible. "
28540 " should be selected if the texture is to be retrieved by "
28541 (code "glGetCompressedTexImage")
28544 (para (code "GL_INVALID_ENUM")
28545 " is generated if either "
28550 an accepted value. ")
28551 (para (code "GL_INVALID_OPERATION")
28552 " is generated if "
28555 is executed between the execution of "
28558 and the corresponding execution of "
28562 (define-gl-procedure
28567 (funcdef "void " (function "glHistogram"))
28568 (paramdef "GLenum " (parameter "target"))
28569 (paramdef "GLsizei " (parameter "width"))
28570 (paramdef "GLenum " (parameter "internalformat"))
28571 (paramdef "GLboolean " (parameter "sink"))))
28573 (heading "define histogram table")
28574 (heading "Parameters")
28575 (table (% (formatter (asis)))
28576 (entry (% (heading (var "target")))
28578 The histogram whose parameters are to be set.
28580 (code "GL_HISTOGRAM")
28582 (code "GL_PROXY_HISTOGRAM")
28584 (entry (% (heading (var "width")))
28586 The number of entries in the histogram table. Must be a power of 2. "))
28587 (entry (% (heading (var "internalformat")))
28589 The format of entries in the histogram table.
28597 (code "GL_ALPHA12")
28599 (code "GL_ALPHA16")
28601 (code "GL_LUMINANCE")
28603 (code "GL_LUMINANCE4")
28605 (code "GL_LUMINANCE8")
28607 (code "GL_LUMINANCE12")
28609 (code "GL_LUMINANCE16")
28611 (code "GL_LUMINANCE_ALPHA")
28613 (code "GL_LUMINANCE4_ALPHA4")
28615 (code "GL_LUMINANCE6_ALPHA2")
28617 (code "GL_LUMINANCE8_ALPHA8")
28619 (code "GL_LUMINANCE12_ALPHA4")
28621 (code "GL_LUMINANCE12_ALPHA12")
28623 (code "GL_LUMINANCE16_ALPHA16")
28625 (code "GL_R3_G3_B2")
28647 (code "GL_RGB5_A1")
28651 (code "GL_RGB10_A2")
28657 (entry (% (heading (var "sink")))
28661 ", pixels will be consumed by the histogramming
28662 process and no drawing or texture loading will take place.
28665 ", pixels will proceed to the minmax process after
28666 histogramming. ")))
28667 (heading "Description")
28670 (code "GL_HISTOGRAM")
28671 " is enabled, RGBA color components are converted to
28672 histogram table indices by clamping to the range [0,1], multiplying by
28673 the width of the histogram table, and rounding to the nearest integer.
28674 The table entries selected by the RGBA indices are then incremented.
28675 (If the internal format of the histogram table includes luminance, then
28676 the index derived from the R color component determines the luminance
28677 table entry to be incremented.) If a histogram table entry is incremented
28678 beyond its maximum value, then its value becomes undefined. (This is
28681 Histogramming is performed only for RGBA pixels (though these may
28682 be specified originally as color indices and converted to RGBA by
28683 index table lookup).
28684 Histogramming is enabled with "
28686 " and disabled with "
28693 (code "GL_HISTOGRAM")
28695 (code "glHistogram")
28696 " redefines the current
28697 histogram table to have "
28699 " entries of the format specified by "
28700 (var "internalformat")
28702 The entries are indexed 0 through "
28703 (math (var "width") "-" "1")
28706 all entries are initialized to zero.
28707 The values in the previous histogram table, if any, are lost.
28712 ", then pixels are discarded after histogramming;
28713 no further processing of the pixels takes place, and no drawing,
28714 texture loading, or pixel readback will result. ")
28719 (code "GL_PROXY_HISTOGRAM")
28721 (code "glHistogram")
28723 state information as if the histogram table were to be redefined,
28724 but does not actually define the new table.
28725 If the requested histogram table is too large to be supported, then the
28726 state information will be set to zero.
28727 This provides a way to determine if a histogram table with the given
28728 parameters can be supported. ")
28731 (para (code "GL_INVALID_ENUM")
28732 " is generated if "
28734 " is not one of the allowable
28736 (para (code "GL_INVALID_VALUE")
28737 " is generated if "
28739 " is less than zero or is
28740 not a power of 2. ")
28741 (para (code "GL_INVALID_ENUM")
28742 " is generated if "
28743 (var "internalformat")
28744 " is not one of the
28745 allowable values. ")
28746 (para (code "GL_TABLE_TOO_LARGE")
28747 " is generated if "
28750 (code "GL_HISTOGRAM")
28752 and the histogram table specified is too large for the implementation. ")
28753 (para (code "GL_INVALID_OPERATION")
28754 " is generated if "
28755 (code "glHistogram")
28757 between the execution of "
28759 " and the corresponding
28764 (define-gl-procedure
28769 (funcdef "void " (function "glIndexMask"))
28770 (paramdef "GLuint " (parameter "mask"))))
28773 "control the writing of individual bits in the color index buffers")
28774 (heading "Parameters")
28775 (table (% (formatter (asis)))
28776 (entry (% (heading (var "mask")))
28778 Specifies a bit mask to enable and disable the writing of individual bits
28779 in the color index buffers.
28780 Initially, the mask is all 1's. ")))
28781 (heading "Description")
28782 (para (code "glIndexMask")
28783 " controls the writing of individual bits in the color index buffers.
28784 The least significant "
28793 is the number of bits in a color index buffer,
28795 Where a 1 (one) appears in the mask,
28796 it's possible to write to the corresponding bit in the color index
28797 buffer (or buffers).
28798 Where a 0 (zero) appears,
28799 the corresponding bit is write-protected. ")
28801 This mask is used only in color index mode,
28802 and it affects only the buffers currently selected for writing
28804 (code "glDrawBuffer")
28806 Initially, all bits are enabled for writing. ")
28808 (para (code "GL_INVALID_OPERATION")
28809 " is generated if "
28810 (code "glIndexMask")
28812 is executed between the execution of "
28815 and the corresponding execution of "
28819 (define-gl-procedure
28824 (funcdef "void " (function "glIndexPointer"))
28825 (paramdef "GLenum " (parameter "type"))
28826 (paramdef "GLsizei " (parameter "stride"))
28829 (parameter "pointer"))))
28831 (heading "define an array of color indexes")
28832 (heading "Parameters")
28833 (table (% (formatter (asis)))
28834 (entry (% (heading (var "type")))
28836 Specifies the data type of each color index in the array.
28837 Symbolic constants "
28838 (code "GL_UNSIGNED_BYTE")
28849 are accepted. The initial value is "
28852 (entry (% (heading (var "stride")))
28854 Specifies the byte offset between consecutive color indexes.
28857 " is 0, the color indexes are understood to
28858 be tightly packed in the array. The initial value is 0. "))
28859 (entry (% (heading (var "pointer")))
28861 Specifies a pointer to the first index in the array.
28862 The initial value is 0. ")))
28863 (heading "Description")
28864 (para (code "glIndexPointer")
28865 " specifies the location and data format of an array of color indexes
28866 to use when rendering. "
28868 " specifies the data type of
28869 each color index and "
28871 " specifies the byte stride from one
28872 color index to the next, allowing vertices and attributes
28873 to be packed into a single array or stored in separate arrays. ")
28875 If a non-zero named buffer object is bound to the "
28876 (code "GL_ARRAY_BUFFER")
28879 (code "glBindBuffer")
28880 ") while a color index array is
28883 " is treated as a byte offset into the buffer object's data store.
28884 Also, the buffer object binding ("
28885 (code "GL_ARRAY_BUFFER_BINDING")
28886 ") is saved as color index vertex array
28887 client-side state ("
28888 (code "GL_INDEX_ARRAY_BUFFER_BINDING")
28891 When a color index array is specified, "
28897 " are saved as client-side
28898 state, in addition to the current vertex array buffer object binding. ")
28900 To enable and disable the color index array, call "
28901 (code "glEnableClientState")
28903 (code "glDisableClientState")
28904 " with the argument "
28905 (code "GL_INDEX_ARRAY")
28907 enabled, the color index array is used
28909 (code "glDrawArrays")
28911 (code "glMultiDrawArrays")
28913 (code "glDrawElements")
28915 (code "glMultiDrawElements")
28917 (code "glDrawRangeElements")
28919 (code "glArrayElement")
28922 (para (code "GL_INVALID_ENUM")
28923 " is generated if "
28925 " is not an accepted value. ")
28926 (para (code "GL_INVALID_VALUE")
28927 " is generated if "
28929 " is negative. ")))
28931 (define-gl-procedure
28936 (funcdef "void " (function "glIndexs"))
28937 (paramdef "GLshort " (parameter "c"))))
28939 (heading "set the current color index")
28940 (heading "Parameters")
28941 (table (% (formatter (asis)))
28942 (entry (% (heading (var "c")))
28944 Specifies the new value for the current color index. ")
28946 (heading "Description")
28947 (para (code "glIndex")
28948 " updates the current (single-valued) color index.
28949 It takes one argument, the new value for the current color index. ")
28951 The current index is stored as a floating-point value.
28952 Integer values are converted directly to floating-point values,
28953 with no special mapping.
28954 The initial value is 1. ")
28956 Index values outside the representable range of the color index buffer
28959 before an index is dithered (if enabled) and written to the frame buffer,
28960 it is converted to fixed-point format.
28961 Any bits in the integer portion of the resulting fixed-point value
28962 that do not correspond to bits in the frame buffer are masked out. ")))
28964 (define-gl-procedure
28969 (funcdef "void " (function "glInitNames"))
28970 (paramdef (parameter "void"))))
28972 (heading "initialize the name stack")
28973 (heading "Description")
28975 The name stack is used during selection mode to allow sets of rendering
28976 commands to be uniquely identified.
28977 It consists of an ordered set of unsigned integers. "
28978 (code "glInitNames")
28979 " causes the name stack to be initialized to its default empty state. ")
28981 The name stack is always empty while the render mode is not "
28985 (code "glInitNames")
28986 " while the render mode is not "
28990 (para (code "GL_INVALID_OPERATION")
28991 " is generated if "
28992 (code "glInitNames")
28994 is executed between the execution of "
28996 " and the corresponding execution of "
29000 (define-gl-procedure
29001 glInterleavedArrays
29002 "glInterleavedArrays"
29007 (function "glInterleavedArrays"))
29008 (paramdef "GLenum " (parameter "format"))
29009 (paramdef "GLsizei " (parameter "stride"))
29012 (parameter "pointer"))))
29015 "simultaneously specify and enable several interleaved arrays")
29016 (heading "Parameters")
29017 (table (% (formatter (asis)))
29018 (entry (% (heading (var "format")))
29020 Specifies the type of array to enable. Symbolic constants "
29025 (code "GL_C4UB_V2F")
29027 (code "GL_C4UB_V3F")
29029 (code "GL_C3F_V3F")
29031 (code "GL_N3F_V3F")
29033 (code "GL_C4F_N3F_V3F")
29035 (code "GL_T2F_V3F")
29037 (code "GL_T4F_V4F")
29039 (code "GL_T2F_C4UB_V3F")
29041 (code "GL_T2F_C3F_V3F")
29043 (code "GL_T2F_N3F_V3F")
29045 (code "GL_T2F_C4F_N3F_V3F")
29048 (code "GL_T4F_C4F_N3F_V4F")
29051 (entry (% (heading (var "stride")))
29053 Specifies the offset in bytes between each aggregate array element. ")))
29054 (heading "Description")
29055 (para (code "glInterleavedArrays")
29056 " lets you specify and enable individual color,
29059 arrays whose elements are part of a larger aggregate array element.
29060 For some implementations, this is more efficient than specifying the arrays
29065 " is 0, the aggregate elements are stored consecutively.
29068 " bytes occur between the beginning of one
29069 aggregate array element and the beginning of the next aggregate array
29071 (para (var "format")
29072 " serves as a ``key''
29073 describing the extraction of individual arrays from the aggregate array.
29076 " contains a T, then texture coordinates are
29077 extracted from the interleaved array. If C is present, color values
29078 are extracted. If N is present, normal coordinates are extracted.
29079 Vertex coordinates are always extracted. ")
29081 The digits 2, 3, and 4 denote how many values are extracted.
29082 F indicates that values are extracted as floating-point values.
29083 Colors may also be extracted as 4 unsigned bytes if 4UB follows the
29084 C. If a color is extracted as 4 unsigned bytes, the vertex
29085 array element which follows is located at the first possible
29086 floating-point aligned address. ")
29088 (para (code "GL_INVALID_ENUM")
29089 " is generated if "
29091 " is not an accepted value. ")
29092 (para (code "GL_INVALID_VALUE")
29093 " is generated if "
29095 " is negative. ")))
29097 (define-gl-procedure
29102 (funcdef "GLboolean " (function "glIsBuffer"))
29103 (paramdef "GLuint " (parameter "buffer"))))
29106 "determine if a name corresponds to a buffer object")
29107 (heading "Parameters")
29108 (table (% (formatter (asis)))
29109 (entry (% (heading (var "buffer")))
29111 Specifies a value that may be the name of a buffer object. ")))
29112 (heading "Description")
29113 (para (code "glIsBuffer")
29118 " is currently the name of a buffer object.
29121 " is zero, or is a non-zero value that is not currently the
29122 name of a buffer object, or if an error occurs, "
29123 (code "glIsBuffer")
29128 A name returned by "
29129 (code "glGenBuffers")
29130 ", but not yet associated with a buffer object
29132 (code "glBindBuffer")
29133 ", is not the name of a buffer object. ")
29135 (para (code "GL_INVALID_OPERATION")
29136 " is generated if "
29137 (code "glIsBuffer")
29139 between the execution of "
29141 " and the corresponding
29146 (define-gl-procedure
29151 (funcdef "GLboolean " (function "glIsEnabled"))
29152 (paramdef "GLenum " (parameter "cap"))))
29154 (heading "test whether a capability is enabled")
29155 (heading "Parameters")
29156 (table (% (formatter (asis)))
29157 (entry (% (heading (var "cap")))
29159 Specifies a symbolic constant indicating a GL capability. ")))
29160 (heading "Description")
29161 (para (code "glIsEnabled")
29166 " is an enabled capability
29170 Initially all capabilities except "
29174 " is initially enabled. ")
29176 The following capabilities are accepted for "
29180 (table (% (formatter (asis)))
29181 (entry (% (heading (strong "Constant")))
29182 (para (strong "See")))
29183 (entry (% (heading (code "GL_ALPHA_TEST")))
29184 (para (code "glAlphaFunc")))
29185 (entry (% (heading (code "GL_AUTO_NORMAL")))
29186 (para (code "glEvalCoord")))
29187 (entry (% (heading (code "GL_BLEND")))
29188 (para (code "glBlendFunc")
29190 (code "glLogicOp")))
29191 (entry (% (heading (code "GL_CLIP_PLANE") (var "i")))
29192 (para (code "glClipPlane")))
29193 (entry (% (heading (code "GL_COLOR_ARRAY")))
29194 (para (code "glColorPointer")))
29195 (entry (% (heading (code "GL_COLOR_LOGIC_OP")))
29196 (para (code "glLogicOp")))
29197 (entry (% (heading (code "GL_COLOR_MATERIAL")))
29198 (para (code "glColorMaterial")))
29199 (entry (% (heading (code "GL_COLOR_SUM")))
29200 (para (code "glSecondaryColor")))
29201 (entry (% (heading (code "GL_COLOR_TABLE")))
29202 (para (code "glColorTable")))
29203 (entry (% (heading (code "GL_CONVOLUTION_1D")))
29204 (para (code "glConvolutionFilter1D")))
29205 (entry (% (heading (code "GL_CONVOLUTION_2D")))
29206 (para (code "glConvolutionFilter2D")))
29207 (entry (% (heading (code "GL_CULL_FACE")))
29208 (para (code "glCullFace")))
29209 (entry (% (heading (code "GL_DEPTH_TEST")))
29210 (para (code "glDepthFunc")
29212 (code "glDepthRange")))
29213 (entry (% (heading (code "GL_DITHER")))
29214 (para (code "glEnable")))
29215 (entry (% (heading (code "GL_EDGE_FLAG_ARRAY")))
29216 (para (code "glEdgeFlagPointer")))
29217 (entry (% (heading (code "GL_FOG")))
29218 (para (code "glFog")))
29219 (entry (% (heading (code "GL_FOG_COORD_ARRAY")))
29220 (para (code "glFogCoordPointer")))
29221 (entry (% (heading (code "GL_HISTOGRAM")))
29222 (para (code "glHistogram")))
29223 (entry (% (heading (code "GL_INDEX_ARRAY")))
29224 (para (code "glIndexPointer")))
29225 (entry (% (heading (code "GL_INDEX_LOGIC_OP")))
29226 (para (code "glLogicOp")))
29227 (entry (% (heading (code "GL_LIGHT") (var "i")))
29228 (para (code "glLightModel")
29231 (entry (% (heading (code "GL_LIGHTING")))
29232 (para (code "glMaterial")
29234 (code "glLightModel")
29237 (entry (% (heading (code "GL_LINE_SMOOTH")))
29238 (para (code "glLineWidth")))
29239 (entry (% (heading (code "GL_LINE_STIPPLE")))
29240 (para (code "glLineStipple")))
29241 (entry (% (heading (code "GL_MAP1_COLOR_4")))
29242 (para (code "glMap1")))
29243 (entry (% (heading (code "GL_MAP1_INDEX")))
29244 (para (code "glMap1")))
29245 (entry (% (heading (code "GL_MAP1_NORMAL")))
29246 (para (code "glMap1")))
29247 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_1")))
29248 (para (code "glMap1")))
29249 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_2")))
29250 (para (code "glMap1")))
29251 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_3")))
29252 (para (code "glMap1")))
29253 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_4")))
29254 (para (code "glMap1")))
29255 (entry (% (heading (code "GL_MAP2_COLOR_4")))
29256 (para (code "glMap2")))
29257 (entry (% (heading (code "GL_MAP2_INDEX")))
29258 (para (code "glMap2")))
29259 (entry (% (heading (code "GL_MAP2_NORMAL")))
29260 (para (code "glMap2")))
29261 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_1")))
29262 (para (code "glMap2")))
29263 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_2")))
29264 (para (code "glMap2")))
29265 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_3")))
29266 (para (code "glMap2")))
29267 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_4")))
29268 (para (code "glMap2")))
29269 (entry (% (heading (code "GL_MAP2_VERTEX_3")))
29270 (para (code "glMap2")))
29271 (entry (% (heading (code "GL_MAP2_VERTEX_4")))
29272 (para (code "glMap2")))
29273 (entry (% (heading (code "GL_MINMAX")))
29274 (para (code "glMinmax")))
29275 (entry (% (heading (code "GL_MULTISAMPLE")))
29276 (para (code "glSampleCoverage")))
29277 (entry (% (heading (code "GL_NORMAL_ARRAY")))
29278 (para (code "glNormalPointer")))
29279 (entry (% (heading (code "GL_NORMALIZE")))
29280 (para (code "glNormal")))
29281 (entry (% (heading (code "GL_POINT_SMOOTH")))
29282 (para (code "glPointSize")))
29283 (entry (% (heading (code "GL_POINT_SPRITE")))
29284 (para (code "glEnable")))
29285 (entry (% (heading (code "GL_POLYGON_SMOOTH")))
29286 (para (code "glPolygonMode")))
29287 (entry (% (heading (code "GL_POLYGON_OFFSET_FILL")))
29288 (para (code "glPolygonOffset")))
29289 (entry (% (heading (code "GL_POLYGON_OFFSET_LINE")))
29290 (para (code "glPolygonOffset")))
29291 (entry (% (heading (code "GL_POLYGON_OFFSET_POINT")))
29292 (para (code "glPolygonOffset")))
29293 (entry (% (heading (code "GL_POLYGON_STIPPLE")))
29294 (para (code "glPolygonStipple")))
29296 (code "GL_POST_COLOR_MATRIX_COLOR_TABLE")))
29297 (para (code "glColorTable")))
29299 (code "GL_POST_CONVOLUTION_COLOR_TABLE")))
29300 (para (code "glColorTable")))
29301 (entry (% (heading (code "GL_RESCALE_NORMAL")))
29302 (para (code "glNormal")))
29303 (entry (% (heading (code "GL_SAMPLE_ALPHA_TO_COVERAGE")))
29304 (para (code "glSampleCoverage")))
29305 (entry (% (heading (code "GL_SAMPLE_ALPHA_TO_ONE")))
29306 (para (code "glSampleCoverage")))
29307 (entry (% (heading (code "GL_SAMPLE_COVERAGE")))
29308 (para (code "glSampleCoverage")))
29309 (entry (% (heading (code "GL_SCISSOR_TEST")))
29310 (para (code "glScissor")))
29311 (entry (% (heading (code "GL_SECONDARY_COLOR_ARRAY")))
29312 (para (code "glSecondaryColorPointer")))
29313 (entry (% (heading (code "GL_SEPARABLE_2D")))
29314 (para (code "glSeparableFilter2D")))
29315 (entry (% (heading (code "GL_STENCIL_TEST")))
29316 (para (code "glStencilFunc")
29318 (code "glStencilOp")))
29319 (entry (% (heading (code "GL_TEXTURE_1D")))
29320 (para (code "glTexImage1D")))
29321 (entry (% (heading (code "GL_TEXTURE_2D")))
29322 (para (code "glTexImage2D")))
29323 (entry (% (heading (code "GL_TEXTURE_3D")))
29324 (para (code "glTexImage3D")))
29325 (entry (% (heading (code "GL_TEXTURE_COORD_ARRAY")))
29326 (para (code "glTexCoordPointer")))
29327 (entry (% (heading (code "GL_TEXTURE_CUBE_MAP")))
29328 (para (code "glTexImage2D")))
29329 (entry (% (heading (code "GL_TEXTURE_GEN_Q")))
29330 (para (code "glTexGen")))
29331 (entry (% (heading (code "GL_TEXTURE_GEN_R")))
29332 (para (code "glTexGen")))
29333 (entry (% (heading (code "GL_TEXTURE_GEN_S")))
29334 (para (code "glTexGen")))
29335 (entry (% (heading (code "GL_TEXTURE_GEN_T")))
29336 (para (code "glTexGen")))
29337 (entry (% (heading (code "GL_VERTEX_ARRAY")))
29338 (para (code "glVertexPointer")))
29339 (entry (% (heading (code "GL_VERTEX_PROGRAM_POINT_SIZE")))
29340 (para (code "glEnable")))
29341 (entry (% (heading (code "GL_VERTEX_PROGRAM_TWO_SIDE")))
29342 (para (code "glEnable"))))
29345 (para (code "GL_INVALID_ENUM")
29346 " is generated if "
29348 " is not an accepted value. ")
29349 (para (code "GL_INVALID_OPERATION")
29350 " is generated if "
29351 (code "glIsEnabled")
29353 is executed between the execution of "
29356 and the corresponding execution of "
29360 (define-gl-procedure
29365 (funcdef "GLboolean " (function "glIsList"))
29366 (paramdef "GLuint " (parameter "list"))))
29369 "determine if a name corresponds to a display list")
29370 (heading "Parameters")
29371 (table (% (formatter (asis)))
29372 (entry (% (heading (var "list")))
29374 Specifies a potential display list name. ")))
29375 (heading "Description")
29376 (para (code "glIsList")
29382 of a display list and returns "
29384 " if it is not, or if an error occurs. ")
29386 A name returned by "
29387 (code "glGenLists")
29388 ", but not yet associated with a display list
29391 ", is not the name of a display list. ")
29393 (para (code "GL_INVALID_OPERATION")
29394 " is generated if "
29397 is executed between the execution of "
29400 and the corresponding execution of "
29404 (define-gl-procedure
29409 (funcdef "GLboolean " (function "glIsProgram"))
29410 (paramdef "GLuint " (parameter "program"))))
29413 "Determines if a name corresponds to a program object")
29414 (heading "Parameters")
29415 (table (% (formatter (asis)))
29416 (entry (% (heading (var "program")))
29417 (para "Specifies a potential program object.")))
29418 (heading "Description")
29419 (para (code "glIsProgram")
29425 is the name of a program object previously created with "
29426 (code "glCreateProgram")
29427 " and not yet deleted with "
29428 (code "glDeleteProgram")
29432 " is zero or a non-zero value that
29433 \tis not the name of a program object, or if an error occurs, "
29434 (code "glIsProgram")
29439 (para (code "GL_INVALID_OPERATION")
29440 " is generated if\t"
29441 (code "glIsProgram")
29442 " is executed between the
29446 and the corresponding execution of\t"
29450 (define-gl-procedure
29455 (funcdef "GLboolean " (function "glIsQuery"))
29456 (paramdef "GLuint " (parameter "id"))))
29459 "determine if a name corresponds to a query object")
29460 (heading "Parameters")
29461 (table (% (formatter (asis)))
29462 (entry (% (heading (var "id")))
29464 Specifies a value that may be the name of a query object. ")))
29465 (heading "Description")
29466 (para (code "glIsQuery")
29471 " is currently the name of a query object.
29474 " is zero, or is a non-zero value that is not currently the
29475 name of a query object, or if an error occurs, "
29481 A name returned by "
29482 (code "glGenQueries")
29483 ", but not yet associated with a query object
29485 (code "glBeginQuery")
29486 ", is not the name of a query object. ")
29488 (para (code "GL_INVALID_OPERATION")
29489 " is generated if "
29492 between the execution of "
29494 " and the corresponding
29499 (define-gl-procedure
29504 (funcdef "GLboolean " (function "glIsShader"))
29505 (paramdef "GLuint " (parameter "shader"))))
29508 "Determines if a name corresponds to a shader object")
29509 (heading "Parameters")
29510 (table (% (formatter (asis)))
29511 (entry (% (heading (var "shader")))
29512 (para "Specifies a potential shader object.")))
29513 (heading "Description")
29514 (para (code "glIsShader")
29520 \tthe name of a shader object previously created with "
29521 (code "glCreateShader")
29522 " and not yet deleted with "
29523 (code "glDeleteShader")
29528 \tzero or a non-zero value that is not the name of a shader
29529 \tobject, or if an error occurs, "
29530 (code "glIsShader ")
29535 (para (code "GL_INVALID_OPERATION")
29536 " is generated if\t"
29537 (code "glIsShader")
29538 " is executed between the
29542 and the corresponding execution of\t"
29546 (define-gl-procedure
29551 (funcdef "GLboolean " (function "glIsTexture"))
29552 (paramdef "GLuint " (parameter "texture"))))
29555 "determine if a name corresponds to a texture")
29556 (heading "Parameters")
29557 (table (% (formatter (asis)))
29558 (entry (% (heading (var "texture")))
29560 Specifies a value that may be the name of a texture. ")))
29561 (heading "Description")
29562 (para (code "glIsTexture")
29567 " is currently the name of a texture.
29570 " is zero, or is a non-zero value that is not currently the
29571 name of a texture, or if an error occurs, "
29572 (code "glIsTexture")
29577 A name returned by "
29578 (code "glGenTextures")
29579 ", but not yet associated with a texture
29581 (code "glBindTexture")
29582 ", is not the name of a texture. ")
29584 (para (code "GL_INVALID_OPERATION")
29585 " is generated if "
29586 (code "glIsTexture")
29588 between the execution of "
29590 " and the corresponding
29595 (define-gl-procedure
29600 (funcdef "void " (function "glLightModelf"))
29601 (paramdef "GLenum " (parameter "pname"))
29602 (paramdef "GLfloat " (parameter "param"))))
29604 (heading "set the lighting model parameters")
29605 (heading "Parameters")
29606 (table (% (formatter (asis)))
29607 (entry (% (heading (var "pname")))
29609 Specifies a single-valued lighting model parameter. "
29610 (code "GL_LIGHT_MODEL_LOCAL_VIEWER")
29612 (code "GL_LIGHT_MODEL_COLOR_CONTROL")
29614 (code "GL_LIGHT_MODEL_TWO_SIDE")
29615 " are accepted. "))
29616 (entry (% (heading (var "param")))
29618 Specifies the value that "
29620 " will be set to. ")))
29621 (heading "Description")
29622 (para (code "glLightModel")
29623 " sets the lighting model parameter. "
29625 " names a parameter and "
29627 " gives the new value.
29628 There are three lighting model parameters: ")
29629 (table (% (formatter (asis)))
29630 (entry (% (heading (code "GL_LIGHT_MODEL_AMBIENT")))
29632 (para (var "params")
29633 " contains four integer or floating-point values that specify
29634 the ambient RGBA intensity of the entire scene.
29635 Integer values are mapped linearly such that the most positive representable
29637 and the most negative representable value maps to "
29640 Floating-point values are mapped directly.
29641 Neither integer nor floating-point values are clamped.
29642 The initial ambient scene intensity is (0.2, 0.2, 0.2, 1.0). "))
29643 (entry (% (heading (code "GL_LIGHT_MODEL_COLOR_CONTROL")))
29645 (para (var "params")
29647 (code "GL_SEPARATE_SPECULAR_COLOR")
29649 (code "GL_SINGLE_COLOR")
29651 (code "GL_SINGLE_COLOR")
29652 " specifies that a single color is generated from the
29653 lighting computation for a vertex. "
29654 (code "GL_SEPARATE_SPECULAR_COLOR")
29656 specifies that the specular color computation of lighting be stored
29657 separately from the remainder of the lighting computation. The specular
29658 color is summed into the generated fragment's color after the application
29659 of texture mapping (if enabled). The initial value is "
29660 (code "GL_SINGLE_COLOR")
29662 (entry (% (heading (code "GL_LIGHT_MODEL_LOCAL_VIEWER")))
29664 (para (var "params")
29665 " is a single integer or floating-point value that specifies
29666 how specular reflection angles are computed.
29669 " is 0 (or 0.0), specular reflection angles take the
29670 view direction to be parallel to and in the direction of the -"
29673 regardless of the location of the vertex in eye coordinates.
29674 Otherwise, specular reflections are computed from the origin
29675 of the eye coordinate system.
29676 The initial value is 0. "))
29677 (entry (% (heading (code "GL_LIGHT_MODEL_TWO_SIDE")))
29679 (para (var "params")
29680 " is a single integer or floating-point value that specifies
29681 whether one- or two-sided lighting calculations are done for polygons.
29682 It has no effect on the lighting calculations for points,
29687 " is 0 (or 0.0), one-sided lighting is specified,
29690 " material parameters are used in the
29692 Otherwise, two-sided lighting is specified.
29693 In this case, vertices of back-facing polygons are lighted using the "
29695 " material parameters
29696 and have their normals reversed before the lighting equation is evaluated.
29697 Vertices of front-facing polygons are always lighted using the "
29699 " material parameters,
29700 with no change to their normals. The initial value is 0. ")))
29702 In RGBA mode, the lighted color of a vertex is the sum of
29703 the material emission intensity,
29704 the product of the material ambient reflectance and the lighting model full-scene
29706 and the contribution of each enabled light source.
29707 Each light source contributes the sum of three terms:
29708 ambient, diffuse, and specular.
29709 The ambient light source contribution is the product of the material ambient
29710 reflectance and the light's ambient intensity.
29711 The diffuse light source contribution is the product of the material diffuse
29713 the light's diffuse intensity,
29714 and the dot product of the vertex's normal with the normalized vector from
29715 the vertex to the light source.
29716 The specular light source contribution is the product of the material specular
29718 the light's specular intensity,
29719 and the dot product of the normalized vertex-to-eye and vertex-to-light
29721 raised to the power of the shininess of the material.
29722 All three light source contributions are attenuated equally based on
29723 the distance from the vertex to the light source and on light source
29724 direction, spread exponent, and spread cutoff angle.
29725 All dot products are replaced with 0 if they evaluate to a negative value. ")
29727 The alpha component of the resulting lighted color is set to the alpha value
29728 of the material diffuse reflectance. ")
29730 In color index mode,
29731 the value of the lighted index of a vertex ranges from the ambient
29732 to the specular values passed to "
29733 (code "glMaterial")
29735 (code "GL_COLOR_INDEXES")
29737 Diffuse and specular coefficients,
29738 computed with a (.30, .59, .11) weighting of the lights' colors,
29739 the shininess of the material,
29740 and the same reflection and attenuation equations as in the RGBA case,
29741 determine how much above ambient the resulting index is. ")
29743 (para (code "GL_INVALID_ENUM")
29744 " is generated if "
29746 " is not an accepted value. ")
29747 (para (code "GL_INVALID_ENUM")
29748 " is generated if "
29751 (code "GL_LIGHT_MODEL_COLOR_CONTROL")
29755 (code "GL_SINGLE_COLOR")
29757 (code "GL_SEPARATE_SPECULAR_COLOR")
29759 (para (code "GL_INVALID_OPERATION")
29760 " is generated if "
29761 (code "glLightModel")
29762 " is executed between
29765 " and the corresponding execution of "
29769 (define-gl-procedure
29774 (funcdef "void " (function "glLightf"))
29775 (paramdef "GLenum " (parameter "light"))
29776 (paramdef "GLenum " (parameter "pname"))
29777 (paramdef "GLfloat " (parameter "param"))))
29779 (heading "set light source parameters")
29780 (heading "Parameters")
29781 (table (% (formatter (asis)))
29782 (entry (% (heading (var "light")))
29785 The number of lights depends on the implementation,
29786 but at least eight lights are supported.
29787 They are identified by symbolic names of the form "
29791 where i ranges from 0 to the value of "
29792 (code "GL_MAX_LIGHTS")
29794 (entry (% (heading (var "pname")))
29796 Specifies a single-valued light source parameter for "
29799 (code "GL_SPOT_EXPONENT")
29801 (code "GL_SPOT_CUTOFF")
29803 (code "GL_CONSTANT_ATTENUATION")
29805 (code "GL_LINEAR_ATTENUATION")
29807 (code "GL_QUADRATIC_ATTENUATION")
29808 " are accepted. "))
29809 (entry (% (heading (var "param")))
29811 Specifies the value that parameter "
29813 " of light source "
29816 will be set to. ")))
29817 (heading "Description")
29818 (para (code "glLight")
29819 " sets the values of individual light source parameters. "
29821 " names the light and is a symbolic name of the form "
29825 where i ranges from 0 to the value of "
29826 (code "GL_MAX_LIGHTS")
29829 " specifies one of ten light source parameters,
29830 again by symbolic name. "
29832 " is either a single value or a pointer to an array that contains
29835 To enable and disable lighting calculation, call "
29841 (code "GL_LIGHTING")
29843 initially disabled.
29844 When it is enabled,
29845 light sources that are enabled contribute to the lighting calculation.
29849 is enabled and disabled using "
29858 The ten light parameters are as follows: ")
29859 (table (% (formatter (asis)))
29860 (entry (% (heading (code "GL_AMBIENT")))
29861 (para (var "params")
29862 " contains four integer or floating-point values that specify
29863 the ambient RGBA intensity of the light.
29864 Integer values are mapped linearly such that the most positive representable
29866 and the most negative representable value maps to "
29869 Floating-point values are mapped directly.
29870 Neither integer nor floating-point values are clamped.
29871 The initial ambient light intensity is (0, 0, 0, 1). "))
29872 (entry (% (heading (code "GL_DIFFUSE")))
29873 (para (var "params")
29874 " contains four integer or floating-point values that specify
29875 the diffuse RGBA intensity of the light.
29876 Integer values are mapped linearly such that the most positive representable
29878 and the most negative representable value maps to "
29881 Floating-point values are mapped directly.
29882 Neither integer nor floating-point values are clamped.
29886 " is (1, 1, 1, 1); for other lights, the
29887 initial value is (0, 0, 0, 1). "))
29888 (entry (% (heading (code "GL_SPECULAR")))
29889 (para (var "params")
29890 " contains four integer or floating-point values that specify
29891 the specular RGBA intensity of the light.
29892 Integer values are mapped linearly such that the most positive representable
29894 and the most negative representable value maps to "
29897 Floating-point values are mapped directly.
29898 Neither integer nor floating-point values are clamped.
29902 " is (1, 1, 1, 1); for other lights, the
29903 initial value is (0, 0, 0, 1). "))
29904 (entry (% (heading (code "GL_POSITION")))
29905 (para (var "params")
29906 " contains four integer or floating-point values that specify
29907 the position of the light in homogeneous object coordinates.
29908 Both integer and floating-point values are mapped directly.
29909 Neither integer nor floating-point values are clamped. ")
29911 The position is transformed by the modelview matrix when "
29913 " is called (just as if it were a point),
29914 and it is stored in eye coordinates.
29918 component of the position is 0,
29919 the light is treated as a directional source.
29920 Diffuse and specular lighting calculations take the light's direction,
29921 but not its actual position,
29923 and attenuation is disabled.
29925 diffuse and specular lighting calculations are based on the actual location
29926 of the light in eye coordinates,
29927 and attenuation is enabled.
29928 The initial position is (0, 0, 1, 0);
29929 thus, the initial light source is directional,
29930 parallel to, and in the direction of the "
29931 (math "-" (var "z"))
29934 (entry (% (heading (code "GL_SPOT_DIRECTION")))
29935 (para (var "params")
29936 " contains three integer or floating-point values that specify
29937 the direction of the light in homogeneous object coordinates.
29938 Both integer and floating-point values are mapped directly.
29939 Neither integer nor floating-point values are clamped. ")
29941 The spot direction is transformed by the upper 3x3 of the modelview matrix when "
29944 and it is stored in eye coordinates.
29945 It is significant only when "
29946 (code "GL_SPOT_CUTOFF")
29948 which it is initially.
29949 The initial direction is "
29950 (math "(" "0" "," "0" "-1" ")")
29952 (entry (% (heading (code "GL_SPOT_EXPONENT")))
29953 (para (var "params")
29954 " is a single integer or floating-point value that specifies
29955 the intensity distribution of the light.
29956 Integer and floating-point values are mapped directly.
29957 Only values in the range "
29958 (math "[" "0" "," "128" "]")
29962 Effective light intensity is attenuated by the cosine of the angle between
29963 the direction of the light and the direction from the light to the vertex
29965 raised to the power of the spot exponent.
29966 Thus, higher spot exponents result in a more focused light source,
29967 regardless of the spot cutoff angle (see "
29968 (code "GL_SPOT_CUTOFF")
29969 ", next paragraph).
29970 The initial spot exponent is 0,
29971 resulting in uniform light distribution. "))
29972 (entry (% (heading (code "GL_SPOT_CUTOFF")))
29973 (para (var "params")
29974 " is a single integer or floating-point value that specifies
29975 the maximum spread angle of a light source.
29976 Integer and floating-point values are mapped directly.
29977 Only values in the range "
29978 (math "[" "0" "," "90" "]")
29980 and the special value 180
29982 If the angle between the direction of the light and the direction from the
29983 light to the vertex being lighted is greater than the spot cutoff angle,
29984 the light is completely masked.
29985 Otherwise, its intensity is controlled by the spot exponent and the
29986 attenuation factors.
29987 The initial spot cutoff is 180,
29988 resulting in uniform light distribution. "))
29989 (entry (% (heading (code "GL_CONSTANT_ATTENUATION"))))
29990 (entry (% (heading (code "GL_LINEAR_ATTENUATION"))))
29991 (entry (% (heading (code "GL_QUADRATIC_ATTENUATION")))
29992 (para (var "params")
29993 " is a single integer or floating-point value that specifies
29994 one of the three light attenuation factors.
29995 Integer and floating-point values are mapped directly.
29996 Only nonnegative values are accepted.
29997 If the light is positional,
29998 rather than directional,
29999 its intensity is attenuated by the reciprocal of the sum of the constant
30000 factor, the linear factor times the distance between the light
30001 and the vertex being lighted,
30002 and the quadratic factor times the square of the same distance.
30003 The initial attenuation factors are (1, 0, 0),
30004 resulting in no attenuation. ")))
30006 (para (code "GL_INVALID_ENUM")
30007 " is generated if either "
30012 is not an accepted value. ")
30013 (para (code "GL_INVALID_VALUE")
30014 " is generated if a spot exponent value is specified
30015 outside the range "
30016 (math "[" "0" "," "128" "]")
30018 or if spot cutoff is specified outside the range "
30019 (math "[" "0" "," "90" "]")
30022 special value 180),
30023 or if a negative attenuation factor is specified. ")
30024 (para (code "GL_INVALID_OPERATION")
30025 " is generated if "
30027 " is executed between
30030 " and the corresponding execution of "
30034 (define-gl-procedure
30039 (funcdef "void " (function "glLineStipple"))
30040 (paramdef "GLint " (parameter "factor"))
30041 (paramdef "GLushort " (parameter "pattern"))))
30043 (heading "specify the line stipple pattern")
30044 (heading "Parameters")
30045 (table (% (formatter (asis)))
30046 (entry (% (heading (var "factor")))
30048 Specifies a multiplier for each bit in the line stipple pattern.
30053 each bit in the pattern is used three times
30054 before the next bit in the pattern is used. "
30056 " is clamped to the range [1, 256] and defaults to 1. "))
30057 (entry (% (heading (var "pattern")))
30059 Specifies a 16-bit integer whose bit pattern determines
30060 which fragments of a line will be drawn when the line is rasterized.
30061 Bit zero is used first; the default pattern is all 1's. ")))
30062 (heading "Description")
30064 Line stippling masks out certain fragments produced by rasterization;
30065 those fragments will not be drawn.
30066 The masking is achieved by using three parameters:
30067 the 16-bit line stipple pattern "
30073 and an integer stipple counter "
30080 is reset to 0 whenever "
30083 and before each line segment of a "
30090 sequence is generated.
30091 It is incremented after each fragment of a unit width aliased line segment
30099 width line segment are generated.
30103 fragments associated with count "
30106 are masked out if ")
30107 (para (var "pattern")
30118 is 0, otherwise these fragments are sent to the frame buffer.
30121 " is the least significant bit. ")
30123 Antialiased lines are treated as a sequence of "
30124 (math "1" "×" (var "width"))
30127 for purposes of stippling.
30128 Whether rectangle "
30131 is rasterized or not depends on the fragment rule
30132 described for aliased lines,
30133 counting rectangles rather than groups of fragments. ")
30135 To enable and disable line stippling, call "
30141 (code "GL_LINE_STIPPLE")
30144 the line stipple pattern is applied as described above.
30146 it is as if the pattern were all 1's.
30147 Initially, line stippling is disabled. ")
30149 (para (code "GL_INVALID_OPERATION")
30150 " is generated if "
30151 (code "glLineStipple")
30153 is executed between the execution of "
30156 and the corresponding execution of "
30160 (define-gl-procedure
30165 (funcdef "void " (function "glLineWidth"))
30166 (paramdef "GLfloat " (parameter "width"))))
30168 (heading "specify the width of rasterized lines")
30169 (heading "Parameters")
30170 (table (% (formatter (asis)))
30171 (entry (% (heading (var "width")))
30173 Specifies the width of rasterized lines.
30174 The initial value is 1. ")))
30175 (heading "Description")
30176 (para (code "glLineWidth")
30177 " specifies the rasterized width of both aliased and antialiased
30179 Using a line width other than 1 has different effects,
30180 depending on whether line antialiasing is enabled.
30181 To enable and disable line antialiasing, call "
30187 (code "GL_LINE_SMOOTH")
30188 ". Line antialiasing is initially
30191 If line antialiasing is disabled,
30192 the actual width is determined by rounding the supplied width
30193 to the nearest integer.
30194 (If the rounding results in the value 0,
30195 it is as if the line width were 1.)
30210 " pixels are filled in each column that is rasterized,
30213 " is the rounded value of "
30218 " pixels are filled in each row that is rasterized. ")
30220 If antialiasing is enabled,
30221 line rasterization produces a fragment for each pixel square
30222 that intersects the region lying within the rectangle having width
30223 equal to the current line width,
30224 length equal to the actual length of the line,
30225 and centered on the mathematical line segment.
30226 The coverage value for each fragment is the window coordinate area
30227 of the intersection of the rectangular region with the corresponding
30229 This value is saved and used in the final rasterization step. ")
30231 Not all widths can be supported when line antialiasing is enabled. If an
30232 unsupported width is requested, the nearest supported width is used.
30233 Only width 1 is guaranteed to be supported; others depend on the
30234 implementation. Likewise, there is a range for aliased line widths as well.
30235 To query the range of supported widths and the size
30236 difference between supported widths within the range, call "
30240 (code "GL_ALIASED_LINE_WIDTH_RANGE")
30242 (code "GL_SMOOTH_LINE_WIDTH_RANGE")
30244 (code "GL_SMOOTH_LINE_WIDTH_GRANULARITY")
30247 (para (code "GL_INVALID_VALUE")
30248 " is generated if "
30250 " is less than or equal to 0. ")
30251 (para (code "GL_INVALID_OPERATION")
30252 " is generated if "
30253 (code "glLineWidth")
30255 is executed between the execution of "
30258 and the corresponding execution of "
30262 (define-gl-procedure
30267 (funcdef "void " (function "glLinkProgram"))
30268 (paramdef "GLuint " (parameter "program"))))
30270 (heading "Links a program object")
30271 (heading "Parameters")
30272 (table (% (formatter (asis)))
30273 (entry (% (heading (var "program")))
30274 (para "Specifies the handle of the program object to be linked.")))
30275 (heading "Description")
30276 (para (code "glLinkProgram")
30277 " links the program
30278 \tobject specified by "
30281 \tshader objects of type "
30282 (code "GL_VERTEX_SHADER")
30286 ", they will be used to
30287 \tcreate an executable that will run on the programmable vertex
30288 \tprocessor. If any shader objects of type\t"
30289 (code "GL_FRAGMENT_SHADER")
30290 " are attached to\t"
30292 ", they will be used to create an
30293 \texecutable that will run on the programmable fragment
30295 (para "The status of the link operation will be stored as part of
30296 \tthe program object's state. This value will be set to\t"
30298 " if the program object was linked
30299 \twithout errors and is ready for use, and\t"
30301 " otherwise. It can be queried by
30303 (code "glGetProgram")
30308 (code "GL_LINK_STATUS")
30310 (para "As a result of a successful link operation, all active
30311 \tuser-defined uniform variables belonging to\t"
30313 " will be initialized to 0, and
30314 \teach of the program object's active uniform variables will be
30315 \tassigned a location that can be queried by calling\t"
30316 (code "glGetUniformLocation")
30318 \tAlso, any active user-defined attribute variables that have not
30319 \tbeen bound to a generic vertex attribute index will be bound to
30320 \tone at this time.")
30321 (para "Linking of a program object can fail for a number of
30322 \treasons as specified in the "
30323 (var "OpenGL Shading Language
30325 ". The following lists some of the
30326 \tconditions that will cause a link error.")
30328 (item (para "The number of active attribute variables supported
30329 \t\tby the implementation has been exceeded."))
30330 (item (para "The storage limit for uniform variables has been
30332 (item (para "The number of active uniform variables supported
30333 \t\tby the implementation has been exceeded."))
30336 " function is missing
30337 \t\tfor the vertex shader or the fragment shader."))
30338 (item (para "A varying variable actually used in the fragment
30339 \t\tshader is not declared in the same way (or is not
30340 \t\tdeclared at all) in the vertex shader."))
30341 (item (para "A reference to a function or variable name is
30343 (item (para "A shared global is declared with two different
30344 \t\ttypes or two different initial values."))
30345 (item (para "One or more of the attached shader objects has not
30346 \t\tbeen successfully compiled."))
30347 (item (para "Binding a generic attribute matrix caused some
30348 \t\trows of the matrix to fall outside the allowed maximum
30350 (code "GL_MAX_VERTEX_ATTRIBS")
30352 (item (para "Not enough contiguous vertex attribute slots could
30353 \t\tbe found to bind attribute matrices.")))
30354 (para "When a program object has been successfully linked, the
30355 \tprogram object can be made part of current state by calling\t"
30356 (code "glUseProgram")
30358 \tWhether or not the link operation was successful, the program
30359 \tobject's information log will be overwritten. The information
30360 \tlog can be retrieved by calling\t"
30361 (code "glGetProgramInfoLog")
30363 (para (code "glLinkProgram")
30364 " will also install the
30365 \tgenerated executables as part of the current rendering state if
30366 \tthe link operation was successful and the specified program
30367 \tobject is already currently in use as a result of a previous
30369 (code "glUseProgram")
30371 \tIf the program object currently in use is relinked
30372 \tunsuccessfully, its link status will be set to\t"
30374 " , but the executables and
30375 \tassociated state will remain part of the current state until a
30376 \tsubsequent call to "
30377 (code "glUseProgram")
30379 \tfrom use. After it is removed from use, it cannot be made part
30380 \tof current state until it has been successfully relinked.")
30383 " contains shader objects
30385 (code "GL_VERTEX_SHADER")
30387 \tcontain shader objects of type\t"
30388 (code "GL_FRAGMENT_SHADER")
30389 ", the vertex shader will
30390 \tbe linked against the implicit interface for fixed functionality
30391 \tfragment processing. Similarly, if\t"
30393 " contains shader objects of type\t"
30394 (code "GL_FRAGMENT_SHADER")
30395 " but it does not contain
30396 \tshader objects of type "
30397 (code "GL_VERTEX_SHADER")
30399 \tthe fragment shader will be linked against the implicit
30400 \tinterface for fixed functionality vertex processing.")
30401 (para "The program object's information log is updated and the
30402 \tprogram is generated at the time of the link operation. After
30403 \tthe link operation, applications are free to modify attached
30404 \tshader objects, compile attached shader objects, detach shader
30405 \tobjects, delete shader objects, and attach additional shader
30406 \tobjects. None of these operations affects the information log or
30407 \tthe program that is part of the program object.")
30409 (para (code "GL_INVALID_VALUE")
30414 is not a value generated by OpenGL.")
30415 (para (code "GL_INVALID_OPERATION")
30420 is not a program object.")
30421 (para (code "GL_INVALID_OPERATION")
30424 (code "glLinkProgram")
30426 is executed between the execution of "
30429 and the corresponding execution of "
30433 (define-gl-procedure
30438 (funcdef "void " (function "glListBase"))
30439 (paramdef "GLuint " (parameter "base"))))
30441 (heading "set the display-list base for ")
30442 (heading "Parameters")
30443 (table (% (formatter (asis)))
30444 (entry (% (heading (var "base")))
30446 Specifies an integer offset that will be added to "
30447 (code "glCallLists")
30449 offsets to generate display-list names.
30450 The initial value is 0. ")))
30451 (heading "Description")
30452 (para (code "glCallLists")
30453 " specifies an array of offsets.
30454 Display-list names are generated by adding "
30457 Names that reference valid display lists are executed;
30458 the others are ignored. ")
30460 (para (code "GL_INVALID_OPERATION")
30461 " is generated if "
30462 (code "glListBase")
30464 is executed between the execution of "
30467 and the corresponding execution of "
30471 (define-gl-procedure
30476 (funcdef "void " (function "glLoadIdentity"))
30477 (paramdef (parameter "void"))))
30480 "replace the current matrix with the identity matrix")
30481 (heading "Description")
30482 (para (code "glLoadIdentity")
30483 " replaces the current matrix with the identity matrix.
30484 It is semantically equivalent to calling "
30485 (code "glLoadMatrix")
30487 with the identity matrix ")
30534 but in some cases it is more efficient. ")
30536 (para (code "GL_INVALID_OPERATION")
30537 " is generated if "
30538 (code "glLoadIdentity")
30540 is executed between the execution of "
30543 and the corresponding execution of "
30547 (define-gl-procedure
30552 (funcdef "void " (function "glLoadMatrixd"))
30553 (paramdef "const GLdouble * " (parameter "m"))))
30556 "replace the current matrix with the specified matrix")
30557 (heading "Parameters")
30558 (table (% (formatter (asis)))
30559 (entry (% (heading (var "m")))
30561 Specifies a pointer to 16 consecutive values, which are used as the
30565 column-major matrix. ")))
30566 (heading "Description")
30567 (para (code "glLoadMatrix")
30568 " replaces the current matrix with the one whose elements are specified by "
30571 The current matrix is the projection matrix,
30574 depending on the current matrix mode
30576 (code "glMatrixMode")
30579 The current matrix, M, defines a transformation of coordinates.
30580 For instance, assume M refers to the modelview matrix.
30612 is the set of object coordinates
30616 " points to an array of "
30619 single- or double-precision
30620 floating-point values "
30646 then the modelview transformation "
30647 (math (var "M") "\u2061" "(" (var "v") "," ")")
30649 does the following: ")
30650 (para (math (var "M")
30820 Projection and texture transformations are similarly defined. ")
30822 (para (code "GL_INVALID_OPERATION")
30823 " is generated if "
30824 (code "glLoadMatrix")
30826 is executed between the execution of "
30829 and the corresponding execution of "
30833 (define-gl-procedure
30838 (funcdef "void " (function "glLoadName"))
30839 (paramdef "GLuint " (parameter "name"))))
30841 (heading "load a name onto the name stack")
30842 (heading "Parameters")
30843 (table (% (formatter (asis)))
30844 (entry (% (heading (var "name")))
30846 Specifies a name that will replace the top value on the name stack. ")))
30847 (heading "Description")
30849 The name stack is used during selection mode to allow sets of rendering
30850 commands to be uniquely identified.
30851 It consists of an ordered set of unsigned integers and is initially empty. ")
30852 (para (code "glLoadName")
30855 " to replace the value on the top of the name stack. ")
30857 The name stack is always empty while the render mode is not "
30861 (code "glLoadName")
30862 " while the render mode is not "
30866 (para (code "GL_INVALID_OPERATION")
30867 " is generated if "
30868 (code "glLoadName")
30869 " is called while the
30870 name stack is empty. ")
30871 (para (code "GL_INVALID_OPERATION")
30872 " is generated if "
30873 (code "glLoadName")
30874 " is executed between
30877 " and the corresponding execution of "
30881 (define-gl-procedure
30882 glLoadTransposeMatrix
30883 "glLoadTransposeMatrix"
30888 (function "glLoadTransposeMatrixd"))
30889 (paramdef "const GLdouble * " (parameter "m"))))
30892 "replace the current matrix with the specified row-major ordered matrix")
30893 (heading "Parameters")
30894 (table (% (formatter (asis)))
30895 (entry (% (heading (var "m")))
30897 Specifies a pointer to 16 consecutive values, which are used as the
30901 row-major matrix. ")))
30902 (heading "Description")
30903 (para (code "glLoadTransposeMatrix")
30904 " replaces the current matrix with the one whose elements are specified by "
30907 The current matrix is the projection matrix,
30910 depending on the current matrix mode
30912 (code "glMatrixMode")
30915 The current matrix, M, defines a transformation of coordinates.
30916 For instance, assume M refers to the modelview matrix.
30948 is the set of object coordinates
30952 " points to an array of "
30955 single- or double-precision
30956 floating-point values "
30982 then the modelview transformation "
30983 (math (var "M") "\u2061" "(" (var "v") "," ")")
30985 does the following: ")
30986 (para (math (var "M")
31156 Projection and texture transformations are similarly defined. ")
31159 (code "glLoadTransposeMatrix")
31163 is identical in operation to "
31164 (code "glLoadMatrix")
31166 (math (var "M") "^" (var "T"))
31171 represents the transpose. ")
31173 (para (code "GL_INVALID_OPERATION")
31174 " is generated if "
31175 (code "glLoadTransposeMatrix")
31177 is executed between the execution of "
31180 and the corresponding execution of "
31184 (define-gl-procedure
31189 (funcdef "void " (function "glLogicOp"))
31190 (paramdef "GLenum " (parameter "opcode"))))
31193 "specify a logical pixel operation for color index rendering")
31194 (heading "Parameters")
31195 (table (% (formatter (asis)))
31196 (entry (% (heading (var "opcode")))
31198 Specifies a symbolic constant that selects a logical operation.
31199 The following symbols are accepted: "
31206 (code "GL_COPY_INVERTED")
31224 (code "GL_AND_REVERSE")
31226 (code "GL_AND_INVERTED")
31228 (code "GL_OR_REVERSE")
31230 (code "GL_OR_INVERTED")
31231 ". The initial value is "
31234 (heading "Description")
31235 (para (code "glLogicOp")
31236 " specifies a logical operation that,
31238 is applied between the incoming color index or RGBA color
31239 and the color index or RGBA color at the corresponding location in the
31241 To enable or disable the logical operation, call "
31246 using the symbolic constant "
31247 (code "GL_COLOR_LOGIC_OP")
31248 " for RGBA mode or "
31249 (code "GL_INDEX_LOGIC_OP")
31250 " for color index mode. The initial value is
31251 disabled for both operations. ")
31253 (table (% (formatter (asis)))
31254 (entry (% (heading (strong "Opcode")))
31255 (para (strong "Resulting Operation")))
31256 (entry (% (heading (code "GL_CLEAR")))
31259 (entry (% (heading (code "GL_SET")))
31262 (entry (% (heading (code "GL_COPY")))
31265 (entry (% (heading (code "GL_COPY_INVERTED")))
31268 (entry (% (heading (code "GL_NOOP")))
31271 (entry (% (heading (code "GL_INVERT")))
31274 (entry (% (heading (code "GL_AND")))
31277 (entry (% (heading (code "GL_NAND")))
31280 (entry (% (heading (code "GL_OR")))
31283 (entry (% (heading (code "GL_NOR")))
31286 (entry (% (heading (code "GL_XOR")))
31289 (entry (% (heading (code "GL_EQUIV")))
31292 (entry (% (heading (code "GL_AND_REVERSE")))
31295 (entry (% (heading (code "GL_AND_INVERTED")))
31298 (entry (% (heading (code "GL_OR_REVERSE")))
31301 (entry (% (heading (code "GL_OR_INVERTED")))
31304 (para (var "opcode")
31305 " is a symbolic constant chosen from the list above.
31306 In the explanation of the logical operations, "
31308 " represents the incoming color index and "
31310 " represents the index in the frame buffer.
31311 Standard C-language operators are used.
31312 As these bitwise operators suggest,
31313 the logical operation is applied independently to each bit pair of the
31314 source and destination indices or colors. ")
31316 (para (code "GL_INVALID_ENUM")
31317 " is generated if "
31319 " is not an accepted value. ")
31320 (para (code "GL_INVALID_OPERATION")
31321 " is generated if "
31324 is executed between the execution of "
31327 and the corresponding execution of "
31331 (define-gl-procedure
31336 (funcdef "void " (function "glMap1f"))
31337 (paramdef "GLenum " (parameter "target"))
31338 (paramdef "GLfloat " (parameter "u1"))
31339 (paramdef "GLfloat " (parameter "u2"))
31340 (paramdef "GLint " (parameter "stride"))
31341 (paramdef "GLint " (parameter "order"))
31344 (parameter "points"))))
31346 (heading "define a one-dimensional evaluator")
31347 (heading "Parameters")
31348 (table (% (formatter (asis)))
31349 (entry (% (heading (var "target")))
31351 Specifies the kind of values that are generated by the evaluator.
31352 Symbolic constants "
31353 (code "GL_MAP1_VERTEX_3")
31355 (code "GL_MAP1_VERTEX_4")
31357 (code "GL_MAP1_INDEX")
31359 (code "GL_MAP1_COLOR_4")
31361 (code "GL_MAP1_NORMAL")
31363 (code "GL_MAP1_TEXTURE_COORD_1")
31365 (code "GL_MAP1_TEXTURE_COORD_2")
31367 (code "GL_MAP1_TEXTURE_COORD_3")
31369 (code "GL_MAP1_TEXTURE_COORD_4")
31370 " are accepted. "))
31371 (entry (% (heading (var "u1")))
31374 Specify a linear mapping of "
31378 (code "glEvalCoord1")
31381 (math (var "u") "^")
31383 the variable that is evaluated by the equations specified by this command. "))
31384 (entry (% (heading (var "stride")))
31386 Specifies the number of floats or doubles between
31387 the beginning of one control point and the beginning of the next one
31388 in the data structure referenced in "
31391 This allows control points to be embedded in arbitrary data structures.
31392 The only constraint is that the values for a particular control point
31393 must occupy contiguous memory locations. "))
31394 (entry (% (heading (var "order")))
31396 Specifies the number of control points.
31397 Must be positive. "))
31398 (entry (% (heading (var "points")))
31400 Specifies a pointer to the array of control points. ")))
31401 (heading "Description")
31403 Evaluators provide a way to use polynomial or rational polynomial mapping
31404 to produce vertices,
31406 texture coordinates,
31408 The values produced by an evaluator are sent to further stages
31409 of GL processing just as if they had been presented using "
31414 (code "glTexCoord")
31418 except that the generated values do not update the current normal,
31419 texture coordinates,
31422 All polynomial or rational polynomial splines of any degree
31423 (up to the maximum degree supported by the GL implementation)
31424 can be described using evaluators.
31425 These include almost all splines used in computer graphics: B-splines,
31426 Bezier curves, Hermite splines, and so on. ")
31428 Evaluators define curves based on Bernstein polynomials.
31439 (para (math (var "p")
31471 (math (var "R") "_" (var "i"))
31473 is a control point and "
31490 Bernstein polynomial of degree "
31496 (math (var "n") "+" "1")
31498 (para (math (var "B")
31544 (para (math "0" "^" "0" "==" "1")
31560 (para (code "glMap1")
31561 " is used to define the basis and to specify what kind of values
31564 a map can be enabled and disabled by calling "
31569 with the map name, one of the nine predefined values for "
31573 (code "glEvalCoord1")
31574 " evaluates the one-dimensional maps that are enabled.
31576 (code "glEvalCoord1")
31577 " presents a value "
31580 the Bernstein functions are evaluated using "
31581 (math (var "u") "^")
31596 (para (var "target")
31597 " is a symbolic constant that indicates what kind of control points
31601 and what output is generated when the map is evaluated.
31602 It can assume one of nine predefined values: ")
31603 (table (% (formatter (asis)))
31604 (entry (% (heading (code "GL_MAP1_VERTEX_3")))
31606 Each control point is three floating-point values representing "
31616 " commands are generated when the map is evaluated. "))
31617 (entry (% (heading (code "GL_MAP1_VERTEX_4")))
31619 Each control point is four floating-point values representing "
31631 " commands are generated when the map is evaluated. "))
31632 (entry (% (heading (code "GL_MAP1_INDEX")))
31634 Each control point is a single floating-point value representing a color index.
31637 " commands are generated when the map is evaluated
31638 but the current index is not updated with the value of these "
31642 (entry (% (heading (code "GL_MAP1_COLOR_4")))
31644 Each control point is four floating-point values representing
31645 red, green, blue, and alpha.
31648 " commands are generated when the map is
31649 evaluated but the current color is not updated with the value of these "
31652 (entry (% (heading (code "GL_MAP1_NORMAL")))
31654 Each control point is three floating-point values representing
31663 components of a normal vector.
31666 " commands are generated when the map is
31667 evaluated but the current normal is not updated with the value of
31671 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_1")))
31673 Each control point is a single floating-point value representing
31677 texture coordinate.
31679 (code "glTexCoord1")
31680 " commands are generated when the map is
31681 evaluated but the current texture coordinates are not updated with the value
31683 (code "glTexCoord")
31685 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_2")))
31687 Each control point is two floating-point values representing
31694 texture coordinates.
31696 (code "glTexCoord2")
31697 " commands are generated when the map is
31698 evaluated but the current texture coordinates are not updated with the value
31700 (code "glTexCoord")
31702 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_3")))
31704 Each control point is three floating-point values representing
31713 texture coordinates.
31715 (code "glTexCoord3")
31716 " commands are generated when the map is
31717 evaluated but the current texture coordinates are not updated with the value
31719 (code "glTexCoord")
31721 (entry (% (heading (code "GL_MAP1_TEXTURE_COORD_4")))
31723 Each control point is four floating-point values representing
31734 texture coordinates.
31736 (code "glTexCoord4")
31737 " commands are generated when the map is evaluated but
31738 the current texture coordinates are not updated with the value
31740 (code "glTexCoord")
31742 (para (var "stride")
31747 " define the array addressing for accessing the control points. "
31749 " is the location of the first control point,
31750 which occupies one, two, three, or four contiguous memory locations,
31751 depending on which map is being defined. "
31753 " is the number of control points in the array. "
31755 " specifies how many float or double locations to advance the internal
31756 memory pointer to reach the next control point. ")
31758 (para (code "GL_INVALID_ENUM")
31759 " is generated if "
31761 " is not an accepted value. ")
31762 (para (code "GL_INVALID_VALUE")
31763 " is generated if "
31768 (para (code "GL_INVALID_VALUE")
31769 " is generated if "
31771 " is less than the number
31772 of values in a control point. ")
31773 (para (code "GL_INVALID_VALUE")
31774 " is generated if "
31776 " is less than 1 or
31777 greater than the return value of "
31778 (code "GL_MAX_EVAL_ORDER")
31780 (para (code "GL_INVALID_OPERATION")
31781 " is generated if "
31784 is executed between the execution of "
31787 and the corresponding execution of "
31790 (para (code "GL_INVALID_OPERATION")
31791 " is generated if "
31793 " is called and the value
31795 (code "GL_ACTIVE_TEXTURE")
31797 (code "GL_TEXTURE0")
31800 (define-gl-procedure
31805 (funcdef "void " (function "glMap2f"))
31806 (paramdef "GLenum " (parameter "target"))
31807 (paramdef "GLfloat " (parameter "u1"))
31808 (paramdef "GLfloat " (parameter "u2"))
31809 (paramdef "GLint " (parameter "ustride"))
31810 (paramdef "GLint " (parameter "uorder"))
31811 (paramdef "GLfloat " (parameter "v1"))
31812 (paramdef "GLfloat " (parameter "v2"))
31813 (paramdef "GLint " (parameter "vstride"))
31814 (paramdef "GLint " (parameter "vorder"))
31817 (parameter "points"))))
31819 (heading "define a two-dimensional evaluator")
31820 (heading "Parameters")
31821 (table (% (formatter (asis)))
31822 (entry (% (heading (var "target")))
31824 Specifies the kind of values that are generated by the evaluator.
31825 Symbolic constants "
31826 (code "GL_MAP2_VERTEX_3")
31828 (code "GL_MAP2_VERTEX_4")
31830 (code "GL_MAP2_INDEX")
31832 (code "GL_MAP2_COLOR_4")
31834 (code "GL_MAP2_NORMAL")
31836 (code "GL_MAP2_TEXTURE_COORD_1")
31838 (code "GL_MAP2_TEXTURE_COORD_2")
31840 (code "GL_MAP2_TEXTURE_COORD_3")
31842 (code "GL_MAP2_TEXTURE_COORD_4")
31843 " are accepted. "))
31844 (entry (% (heading (var "u1")))
31847 Specify a linear mapping of "
31851 (code "glEvalCoord2")
31854 (math (var "u") "^")
31856 one of the two variables that are evaluated by the equations specified
31857 by this command. Initially, "
31862 (entry (% (heading (var "ustride")))
31864 Specifies the number of floats or doubles between
31865 the beginning of control point "
31866 (math (var "R") "_" (var "ij"))
31868 and the beginning of control point "
31893 control point indices, respectively.
31894 This allows control points to be embedded in arbitrary data structures.
31895 The only constraint is that the values for a particular control point
31896 must occupy contiguous memory locations. The initial value of "
31899 (entry (% (heading (var "uorder")))
31901 Specifies the dimension of the control point array in the "
31905 Must be positive. The initial value is 1. "))
31906 (entry (% (heading (var "v1")))
31909 Specify a linear mapping of "
31913 (code "glEvalCoord2")
31916 (math (var "v") "^")
31918 one of the two variables that are evaluated by the equations specified
31919 by this command. Initially, "
31924 (entry (% (heading (var "vstride")))
31926 Specifies the number of floats or doubles between
31927 the beginning of control point "
31928 (math (var "R") "_" (var "ij"))
31930 and the beginning of control point "
31955 control point indices, respectively.
31956 This allows control points to be embedded in arbitrary data structures.
31957 The only constraint is that the values for a particular control point
31958 must occupy contiguous memory locations. The initial value of "
31961 (entry (% (heading (var "vorder")))
31963 Specifies the dimension of the control point array in the "
31967 Must be positive. The initial value is 1. "))
31968 (entry (% (heading (var "points")))
31970 Specifies a pointer to the array of control points. ")))
31971 (heading "Description")
31973 Evaluators provide a way to use polynomial or rational polynomial mapping
31974 to produce vertices,
31976 texture coordinates,
31978 The values produced by an evaluator are sent on to further stages
31979 of GL processing just as if they had been presented using "
31984 (code "glTexCoord")
31988 except that the generated values do not update the current normal,
31989 texture coordinates,
31992 All polynomial or rational polynomial splines of any degree
31993 (up to the maximum degree supported by the GL implementation)
31994 can be described using evaluators.
31995 These include almost all surfaces used in computer graphics,
31996 including B-spline surfaces,
31998 Bezier surfaces, and so on. ")
32000 Evaluators define surfaces based on bivariate Bernstein polynomials.
32013 (para (math (var "p")
32065 (math (var "R") "_" (var "ij"))
32067 is a control point, "
32084 Bernstein polynomial of degree "
32090 (math (var "n") "+" "1")
32092 (para (math (var "B")
32154 Bernstein polynomial of degree "
32160 (math (var "m") "+" "1")
32162 (para (math (var "B")
32208 (math "0" "^" "0" "==" "1")
32224 (para (code "glMap2")
32225 " is used to define the basis and to specify what kind of values
32228 a map can be enabled and disabled by calling "
32233 with the map name, one of the nine predefined values for "
32238 (code "glEvalCoord2")
32239 " presents values "
32245 the bivariate Bernstein polynomials are evaluated using "
32246 (math (var "u") "^")
32249 (math (var "v") "^")
32252 (para (math (var "u")
32264 (para (math (var "v")
32276 (para (var "target")
32277 " is a symbolic constant that indicates what kind of control points
32281 and what output is generated when the map is evaluated.
32282 It can assume one of nine predefined values: ")
32283 (table (% (formatter (asis)))
32284 (entry (% (heading (code "GL_MAP2_VERTEX_3")))
32286 Each control point is three floating-point values representing "
32296 " commands are generated when the map is evaluated. "))
32297 (entry (% (heading (code "GL_MAP2_VERTEX_4")))
32299 Each control point is four floating-point values representing "
32311 " commands are generated when the map is evaluated. "))
32312 (entry (% (heading (code "GL_MAP2_INDEX")))
32314 Each control point is a single floating-point value representing a color index.
32317 " commands are generated when the map is evaluated
32318 but the current index is not updated with the value of these "
32321 (entry (% (heading (code "GL_MAP2_COLOR_4")))
32323 Each control point is four floating-point values representing
32324 red, green, blue, and alpha.
32327 " commands are generated when the map is
32328 evaluated but the current color is not updated with the value of
32332 (entry (% (heading (code "GL_MAP2_NORMAL")))
32334 Each control point is three floating-point values representing
32343 components of a normal vector.
32346 " commands are generated when the map is
32347 evaluated but the current normal is not updated with the value of
32351 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_1")))
32353 Each control point is a single floating-point value representing
32357 texture coordinate.
32359 (code "glTexCoord1")
32360 " commands are generated when the map is evaluated but
32361 the current texture coordinates are not updated with the value
32363 (code "glTexCoord")
32365 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_2")))
32367 Each control point is two floating-point values representing
32374 texture coordinates.
32376 (code "glTexCoord2")
32377 " commands are generated when the map is evaluated but
32378 the current texture coordinates are not updated with the value
32380 (code "glTexCoord")
32382 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_3")))
32384 Each control point is three floating-point values representing
32393 texture coordinates.
32395 (code "glTexCoord3")
32396 " commands are generated when the map is
32397 evaluated but the current texture coordinates are not updated with the value
32399 (code "glTexCoord")
32401 (entry (% (heading (code "GL_MAP2_TEXTURE_COORD_4")))
32403 Each control point is four floating-point values representing
32414 texture coordinates.
32416 (code "glTexCoord4")
32417 " commands are generated when the map is evaluated but the current texture coordinates are not updated with the value
32419 (code "glTexCoord")
32421 (para (var "ustride")
32430 " define the array addressing for accessing the control points. "
32432 " is the location of the first control point,
32433 which occupies one, two, three, or four contiguous memory locations,
32434 depending on which map is being defined.
32436 (math (var "uorder") "×" (var "vorder"))
32438 control points in the array. "
32440 " specifies how many float or double locations are skipped to advance
32441 the internal memory pointer from control point "
32463 " specifies how many float or double locations are skipped to advance
32464 the internal memory pointer from control point "
32486 (para (code "GL_INVALID_ENUM")
32487 " is generated if "
32489 " is not an accepted value. ")
32490 (para (code "GL_INVALID_VALUE")
32491 " is generated if "
32501 (para (code "GL_INVALID_VALUE")
32502 " is generated if either "
32507 is less than the number of values in a control point. ")
32508 (para (code "GL_INVALID_VALUE")
32509 " is generated if either "
32514 is less than 1 or greater than the return value of "
32515 (code "GL_MAX_EVAL_ORDER")
32517 (para (code "GL_INVALID_OPERATION")
32518 " is generated if "
32521 is executed between the execution of "
32524 and the corresponding execution of "
32527 (para (code "GL_INVALID_OPERATION")
32528 " is generated if "
32530 " is called and the value
32532 (code "GL_ACTIVE_TEXTURE")
32534 (code "GL_TEXTURE0")
32537 (define-gl-procedure
32542 (funcdef "void * " (function "glMapBuffer"))
32543 (paramdef "GLenum " (parameter "target"))
32544 (paramdef "GLenum " (parameter "access"))))
32546 (heading "map a buffer object's data store")
32547 (heading "Parameters")
32548 (table (% (formatter (asis)))
32549 (entry (% (heading (var "target")))
32551 Specifies the target buffer object being mapped.
32552 The symbolic constant must be "
32553 (code "GL_ARRAY_BUFFER")
32555 (code "GL_ELEMENT_ARRAY_BUFFER")
32557 (code "GL_PIXEL_PACK_BUFFER")
32559 (code "GL_PIXEL_UNPACK_BUFFER")
32561 (entry (% (heading (var "access")))
32563 Specifies the access policy, indicating whether it will be possible to read from, write to,
32564 or both read from and write to the buffer object's mapped data store. The symbolic constant must be "
32565 (code "GL_READ_ONLY")
32567 (code "GL_WRITE_ONLY")
32569 (code "GL_READ_WRITE")
32571 (heading "Description")
32572 (para (code "glMapBuffer")
32573 " maps to the client's address space the entire data store of the buffer object
32574 currently bound to "
32576 ". The data can then be directly read and/or written relative to
32577 the returned pointer, depending on the specified "
32579 " policy. If the GL is unable to
32580 map the buffer object's data store, "
32581 (code "glMapBuffer")
32582 " generates an error and returns "
32584 ". This may occur for system-specific reasons, such as low virtual memory availability. ")
32586 If a mapped data store is accessed in a way inconsistent with the specified "
32589 no error is generated, but performance may be negatively impacted and system errors, including program
32590 termination, may result. Unlike the "
32593 (code "glBufferData")
32596 " is not a hint, and does in fact constrain the usage of the mapped data store on
32597 some GL implementations. In order to achieve the highest performance available, a buffer object's data store
32598 should be used in ways consistent with both its specified "
32604 A mapped data store must be unmapped with "
32605 (code "glUnmapBuffer")
32606 " before its buffer object is used.
32607 Otherwise an error will be generated by any GL command that attempts to dereference the buffer object's data store.
32608 When a data store is unmapped, the pointer to its data store becomes invalid. "
32609 (code "glUnmapBuffer")
32613 " unless the data store contents have become corrupt during the time
32614 the data store was mapped. This can occur for system-specific reasons that affect the availability of graphics
32615 memory, such as screen mode changes. In such situations, "
32617 " is returned and the
32618 data store contents are undefined. An application must detect this rare condition and reinitialize the data store. ")
32620 A buffer object's mapped data store is automatically unmapped when the buffer object is deleted or its data store
32621 is recreated with "
32622 (code "glBufferData")
32625 (para (code "GL_INVALID_ENUM")
32626 " is generated if "
32629 (code "GL_ARRAY_BUFFER")
32631 (code "GL_ELEMENT_ARRAY_BUFFER")
32633 (code "GL_PIXEL_PACK_BUFFER")
32635 (code "GL_PIXEL_UNPACK_BUFFER")
32637 (para (code "GL_INVALID_ENUM")
32638 " is generated if "
32641 (code "GL_READ_ONLY")
32643 (code "GL_WRITE_ONLY")
32645 (code "GL_READ_WRITE")
32647 (para (code "GL_OUT_OF_MEMORY")
32648 " is generated when "
32649 (code "glMapBuffer")
32651 if the GL is unable to map the buffer object's data store. This may occur for a variety of system-specific
32652 reasons, such as the absence of sufficient remaining virtual memory. ")
32653 (para (code "GL_INVALID_OPERATION")
32654 " is generated if the reserved buffer object name 0 is bound to "
32657 (para (code "GL_INVALID_OPERATION")
32658 " is generated if "
32659 (code "glMapBuffer")
32661 a buffer object whose data store is already mapped. ")
32662 (para (code "GL_INVALID_OPERATION")
32663 " is generated if "
32664 (code "glUnmapBuffer")
32666 a buffer object whose data store is not currently mapped. ")
32667 (para (code "GL_INVALID_OPERATION")
32668 " is generated if "
32669 (code "glMapBuffer")
32671 (code "glUnmapBuffer")
32673 between the execution of "
32675 " and the corresponding
32680 (define-gl-procedure
32685 (funcdef "void " (function "glMapGrid1d"))
32686 (paramdef "GLint " (parameter "un"))
32687 (paramdef "GLdouble " (parameter "u1"))
32688 (paramdef "GLdouble " (parameter "u2"))))
32690 (heading "define a one- or two-dimensional mesh")
32691 (heading "Parameters")
32692 (table (% (formatter (asis)))
32693 (entry (% (heading (var "un")))
32695 Specifies the number of partitions in the grid range interval
32701 Must be positive. "))
32702 (entry (% (heading (var "u1")))
32705 Specify the mappings for integer grid domain values "
32706 (math (var "i") "=" "0")
32709 (math (var "i") "=" (var "un"))
32711 (entry (% (heading (var "vn")))
32713 Specifies the number of partitions in the grid range interval
32720 (code "glMapGrid2")
32722 (entry (% (heading (var "v1")))
32725 Specify the mappings for integer grid domain values "
32726 (math (var "j") "=" "0")
32729 (math (var "j") "=" (var "vn"))
32732 (code "glMapGrid2")
32734 (heading "Description")
32735 (para (code "glMapGrid")
32737 (code "glEvalMesh")
32738 " are used together to efficiently
32739 generate and evaluate a series of evenly-spaced map domain values. "
32740 (code "glEvalMesh")
32741 " steps through the integer domain
32742 of a one- or two-dimensional grid,
32743 whose range is the domain of the evaluation maps specified by "
32748 (para (code "glMapGrid1")
32750 (code "glMapGrid2")
32751 " specify the linear grid mappings
32761 integer grid coordinates,
32771 floating-point evaluation map coordinates.
32776 " for details of how "
32784 (para (code "glMapGrid1")
32785 " specifies a single linear mapping
32786 such that integer grid coordinate 0 maps exactly to "
32789 and integer grid coordinate "
32791 " maps exactly to "
32794 All other integer grid coordinates "
32797 are mapped so that ")
32798 (para (math (var "u")
32812 (para (code "glMapGrid2")
32813 " specifies two such linear mappings.
32814 One maps integer grid coordinate "
32815 (math (var "i") "=" "0")
32820 and integer grid coordinate "
32821 (math (var "i") "=" (var "un"))
32826 The other maps integer grid coordinate "
32827 (math (var "j") "=" "0")
32832 and integer grid coordinate "
32833 (math (var "j") "=" (var "vn"))
32838 Other integer grid coordinates "
32844 are mapped such that ")
32845 (para (math (var "u")
32859 (para (math (var "v")
32874 The mappings specified by "
32876 " are used identically by "
32877 (code "glEvalMesh")
32879 (code "glEvalPoint")
32882 (para (code "GL_INVALID_VALUE")
32883 " is generated if either "
32889 (para (code "GL_INVALID_OPERATION")
32890 " is generated if "
32893 is executed between the execution of "
32896 and the corresponding execution of "
32900 (define-gl-procedure
32905 (funcdef "void " (function "glMaterialf"))
32906 (paramdef "GLenum " (parameter "face"))
32907 (paramdef "GLenum " (parameter "pname"))
32908 (paramdef "GLfloat " (parameter "param"))))
32911 "specify material parameters for the lighting model")
32912 (heading "Parameters")
32913 (table (% (formatter (asis)))
32914 (entry (% (heading (var "face")))
32916 Specifies which face or faces are being updated.
32922 (code "GL_FRONT_AND_BACK")
32924 (entry (% (heading (var "pname")))
32926 Specifies the single-valued material parameter of the face or faces
32927 that is being updated.
32929 (code "GL_SHININESS")
32931 (entry (% (heading (var "param")))
32933 Specifies the value that parameter "
32934 (code "GL_SHININESS")
32935 " will be set to. ")))
32936 (heading "Description")
32937 (para (code "glMaterial")
32938 " assigns values to material parameters.
32939 There are two matched sets of material parameters.
32942 (var "front-facing")
32944 is used to shade points,
32948 (when two-sided lighting is disabled),
32949 or just front-facing polygons
32950 (when two-sided lighting is enabled).
32952 (var "back-facing")
32954 is used to shade back-facing polygons only when two-sided lighting is enabled.
32956 (code "glLightModel")
32957 " reference page for details concerning one- and
32958 two-sided lighting calculations. ")
32959 (para (code "glMaterial")
32960 " takes three arguments.
32964 specifies whether the "
32968 " materials, or both "
32969 (code "GL_FRONT_AND_BACK")
32970 " materials will be modified.
32974 specifies which of several parameters in one or both sets will be modified.
32978 specifies what value or values will be assigned to the specified parameter. ")
32980 Material parameters are used in the lighting equation that is optionally
32981 applied to each vertex.
32982 The equation is discussed in the "
32983 (code "glLightModel")
32985 The parameters that can be specified using "
32986 (code "glMaterial")
32988 and their interpretations by the lighting equation, are as follows: ")
32989 (table (% (formatter (asis)))
32990 (entry (% (heading (code "GL_AMBIENT")))
32991 (para (var "params")
32992 " contains four integer or floating-point values that specify
32993 the ambient RGBA reflectance of the material.
32994 Integer values are mapped linearly such that the most positive representable
32996 and the most negative representable value maps to "
32999 Floating-point values are mapped directly.
33000 Neither integer nor floating-point values are clamped.
33001 The initial ambient reflectance for both front- and back-facing materials
33002 is (0.2, 0.2, 0.2, 1.0). "))
33003 (entry (% (heading (code "GL_DIFFUSE")))
33004 (para (var "params")
33005 " contains four integer or floating-point values that specify
33006 the diffuse RGBA reflectance of the material.
33007 Integer values are mapped linearly such that the most positive representable
33009 and the most negative representable value maps to "
33012 Floating-point values are mapped directly.
33013 Neither integer nor floating-point values are clamped.
33014 The initial diffuse reflectance for both front- and back-facing materials
33015 is (0.8, 0.8, 0.8, 1.0). "))
33016 (entry (% (heading (code "GL_SPECULAR")))
33017 (para (var "params")
33018 " contains four integer or floating-point values that specify
33019 the specular RGBA reflectance of the material.
33020 Integer values are mapped linearly such that the most positive representable
33022 and the most negative representable value maps to "
33025 Floating-point values are mapped directly.
33026 Neither integer nor floating-point values are clamped.
33027 The initial specular reflectance for both front- and back-facing materials
33028 is (0, 0, 0, 1). "))
33029 (entry (% (heading (code "GL_EMISSION")))
33030 (para (var "params")
33031 " contains four integer or floating-point values that specify
33032 the RGBA emitted light intensity of the material.
33033 Integer values are mapped linearly such that the most positive representable
33035 and the most negative representable value maps to "
33038 Floating-point values are mapped directly.
33039 Neither integer nor floating-point values are clamped.
33040 The initial emission intensity for both front- and back-facing materials
33041 is (0, 0, 0, 1). "))
33042 (entry (% (heading (code "GL_SHININESS")))
33043 (para (var "params")
33044 " is a single integer or floating-point value that specifies
33045 the RGBA specular exponent of the material.
33046 Integer and floating-point values are mapped directly.
33047 Only values in the range "
33048 (math "[" "0" "," "128" "]")
33051 The initial specular exponent for both front- and back-facing materials
33053 (entry (% (heading (code "GL_AMBIENT_AND_DIFFUSE")))
33055 Equivalent to calling "
33056 (code "glMaterial")
33057 " twice with the same parameter values,
33059 (code "GL_AMBIENT")
33061 (code "GL_DIFFUSE")
33063 (entry (% (heading (code "GL_COLOR_INDEXES")))
33064 (para (var "params")
33065 " contains three integer or floating-point values specifying
33066 the color indices for ambient,
33068 and specular lighting.
33069 These three values,
33071 (code "GL_SHININESS")
33073 are the only material values used by the color index mode lighting equation.
33075 (code "glLightModel")
33076 " reference page for a discussion
33077 of color index lighting. ")))
33079 (para (code "GL_INVALID_ENUM")
33080 " is generated if either "
33085 an accepted value. ")
33086 (para (code "GL_INVALID_VALUE")
33087 " is generated if a specular exponent outside the range "
33088 (math "[" "0" "," "128" "]")
33092 (define-gl-procedure
33097 (funcdef "void " (function "glMatrixMode"))
33098 (paramdef "GLenum " (parameter "mode"))))
33101 "specify which matrix is the current matrix")
33102 (heading "Parameters")
33103 (table (% (formatter (asis)))
33104 (entry (% (heading (var "mode")))
33106 Specifies which matrix stack is the target
33107 for subsequent matrix operations.
33108 Three values are accepted: "
33109 (code "GL_MODELVIEW")
33111 (code "GL_PROJECTION")
33113 (code "GL_TEXTURE")
33115 The initial value is "
33116 (code "GL_MODELVIEW")
33118 Additionally, if the "
33119 (code "ARB_imaging")
33120 " extension is supported, "
33122 " is also accepted. ")))
33123 (heading "Description")
33124 (para (code "glMatrixMode")
33125 " sets the current matrix mode. "
33127 " can assume one of four values: ")
33128 (table (% (formatter (asis)))
33129 (entry (% (heading (code "GL_MODELVIEW")))
33131 Applies subsequent matrix operations to the modelview matrix stack. "))
33132 (entry (% (heading (code "GL_PROJECTION")))
33134 Applies subsequent matrix operations to the projection matrix stack. "))
33135 (entry (% (heading (code "GL_TEXTURE")))
33137 Applies subsequent matrix operations to the texture matrix stack. "))
33138 (entry (% (heading (code "GL_COLOR")))
33140 Applies subsequent matrix operations to the color matrix stack. ")))
33142 To find out which matrix stack is currently the target of all matrix
33146 (code "GL_MATRIX_MODE")
33149 (code "GL_MODELVIEW")
33152 (para (code "GL_INVALID_ENUM")
33153 " is generated if "
33155 " is not an accepted value. ")
33156 (para (code "GL_INVALID_OPERATION")
33157 " is generated if "
33158 (code "glMatrixMode")
33160 is executed between the execution of "
33163 and the corresponding execution of "
33167 (define-gl-procedure
33172 (funcdef "void " (function "glMinmax"))
33173 (paramdef "GLenum " (parameter "target"))
33174 (paramdef "GLenum " (parameter "internalformat"))
33175 (paramdef "GLboolean " (parameter "sink"))))
33177 (heading "define minmax table")
33178 (heading "Parameters")
33179 (table (% (formatter (asis)))
33180 (entry (% (heading (var "target")))
33182 The minmax table whose parameters are to be set.
33186 (entry (% (heading (var "internalformat")))
33188 The format of entries in the minmax table.
33196 (code "GL_ALPHA12")
33198 (code "GL_ALPHA16")
33200 (code "GL_LUMINANCE")
33202 (code "GL_LUMINANCE4")
33204 (code "GL_LUMINANCE8")
33206 (code "GL_LUMINANCE12")
33208 (code "GL_LUMINANCE16")
33210 (code "GL_LUMINANCE_ALPHA")
33212 (code "GL_LUMINANCE4_ALPHA4")
33214 (code "GL_LUMINANCE6_ALPHA2")
33216 (code "GL_LUMINANCE8_ALPHA8")
33218 (code "GL_LUMINANCE12_ALPHA4")
33220 (code "GL_LUMINANCE12_ALPHA12")
33222 (code "GL_LUMINANCE16_ALPHA16")
33224 (code "GL_R3_G3_B2")
33246 (code "GL_RGB5_A1")
33250 (code "GL_RGB10_A2")
33256 (entry (% (heading (var "sink")))
33260 ", pixels will be consumed by the minmax
33261 process and no drawing or texture loading will take place.
33264 ", pixels will proceed to the final conversion process after
33266 (heading "Description")
33270 " is enabled, the RGBA components of incoming pixels are
33271 compared to the minimum and maximum values for each component, which are
33272 stored in the two-element minmax table.
33273 (The first element stores the minima, and the second element stores
33275 If a pixel component is greater than the corresponding component
33276 in the maximum element, then the maximum element is updated with the
33277 pixel component value.
33278 If a pixel component is less than the corresponding component in
33279 the minimum element, then the minimum element is updated with the
33280 pixel component value.
33281 (In both cases, if the internal format of the minmax table includes
33282 luminance, then the R color component of incoming pixels is used
33284 The contents of the minmax table may be retrieved at a later time
33286 (code "glGetMinmax")
33288 The minmax operation is enabled or disabled by calling "
33292 ", respectively, with an argument of "
33295 (para (code "glMinmax")
33296 " redefines the current minmax table to have entries of the format
33298 (var "internalformat")
33300 The maximum element is initialized with the smallest possible component
33301 values, and the minimum element is initialized with the largest possible
33303 The values in the previous minmax table, if any, are lost.
33308 ", then pixels are discarded after minmax;
33309 no further processing of the pixels takes place, and no drawing,
33310 texture loading, or pixel readback will result. ")
33313 (para (code "GL_INVALID_ENUM")
33314 " is generated if "
33316 " is not one of the allowable
33318 (para (code "GL_INVALID_ENUM")
33319 " is generated if "
33320 (var "internalformat")
33321 " is not one of the
33322 allowable values. ")
33323 (para (code "GL_INVALID_OPERATION")
33324 " is generated if "
33327 between the execution of "
33329 " and the corresponding
33334 (define-gl-procedure
33336 "glMultiDrawArrays"
33339 (funcdef "void " (function "glMultiDrawArrays"))
33340 (paramdef "GLenum " (parameter "mode"))
33341 (paramdef "GLint * " (parameter "first"))
33342 (paramdef "GLsizei * " (parameter "count"))
33343 (paramdef "GLsizei " (parameter "primcount"))))
33346 "render multiple sets of primitives from array data")
33347 (heading "Parameters")
33348 (table (% (formatter (asis)))
33349 (entry (% (heading (var "mode")))
33351 Specifies what kind of primitives to render.
33352 Symbolic constants "
33355 (code "GL_LINE_STRIP")
33357 (code "GL_LINE_LOOP")
33361 (code "GL_TRIANGLE_STRIP")
33363 (code "GL_TRIANGLE_FAN")
33365 (code "GL_TRIANGLES")
33367 (code "GL_QUAD_STRIP")
33372 (code "GL_POLYGON")
33373 " are accepted. "))
33374 (entry (% (heading (var "first")))
33376 Points to an array of starting indices in the enabled arrays. "))
33377 (entry (% (heading (var "count")))
33379 Points to an array of the number of indices to be rendered. "))
33380 (entry (% (heading (var "primcount")))
33382 Specifies the size of the first and count ")))
33383 (heading "Description")
33384 (para (code "glMultiDrawArrays")
33385 " specifies multiple sets of geometric primitives
33386 with very few subroutine calls. Instead of calling a GL procedure
33387 to pass each individual vertex, normal, texture coordinate, edge
33388 flag, or color, you can prespecify
33389 separate arrays of vertices, normals, and colors and use them to
33390 construct a sequence of primitives with a single
33392 (code "glMultiDrawArrays")
33394 (para (code "glMultiDrawArrays")
33395 " behaves identically to "
33396 (code "glDrawArrays")
33400 separate ranges of elements are specified instead. ")
33403 (code "glMultiDrawArrays")
33404 " is called, it uses "
33406 " sequential elements from each
33407 enabled array to construct a sequence of geometric primitives,
33408 beginning with element "
33412 " specifies what kind of
33413 primitives are constructed, and how the array elements
33414 construct those primitives. If "
33415 (code "GL_VERTEX_ARRAY")
33416 " is not enabled, no
33417 geometric primitives are generated. ")
33419 Vertex attributes that are modified by "
33420 (code "glMultiDrawArrays")
33422 unspecified value after "
33423 (code "glMultiDrawArrays")
33424 " returns. For example, if "
33425 (code "GL_COLOR_ARRAY")
33426 " is enabled, the value of the current color is
33428 (code "glMultiDrawArrays")
33429 " executes. Attributes that aren't
33430 modified remain well defined. ")
33432 (para (code "GL_INVALID_ENUM")
33433 " is generated if "
33435 " is not an accepted value. ")
33436 (para (code "GL_INVALID_VALUE")
33437 " is generated if "
33440 (para (code "GL_INVALID_OPERATION")
33441 " is generated if a non-zero buffer object name is bound to an
33442 enabled array and the buffer object's data store is currently mapped. ")
33443 (para (code "GL_INVALID_OPERATION")
33444 " is generated if "
33445 (code "glMultiDrawArrays")
33446 " is executed between
33449 " and the corresponding "
33453 (define-gl-procedure
33454 glMultiDrawElements
33455 "glMultiDrawElements"
33460 (function "glMultiDrawElements"))
33461 (paramdef "GLenum " (parameter "mode"))
33462 (paramdef "const GLsizei * " (parameter "count"))
33463 (paramdef "GLenum " (parameter "type"))
33466 (parameter "indices"))
33467 (paramdef "GLsizei " (parameter "primcount"))))
33470 "render multiple sets of primitives by specifying indices of array data elements")
33471 (heading "Parameters")
33472 (table (% (formatter (asis)))
33473 (entry (% (heading (var "mode")))
33475 Specifies what kind of primitives to render.
33476 Symbolic constants "
33479 (code "GL_LINE_STRIP")
33481 (code "GL_LINE_LOOP")
33485 (code "GL_TRIANGLE_STRIP")
33487 (code "GL_TRIANGLE_FAN")
33489 (code "GL_TRIANGLES")
33491 (code "GL_QUAD_STRIP")
33496 (code "GL_POLYGON")
33497 " are accepted. "))
33498 (entry (% (heading (var "count")))
33500 Points to an array of the elements counts. "))
33501 (entry (% (heading (var "type")))
33503 Specifies the type of the values in "
33505 ". Must be one of "
33506 (code "GL_UNSIGNED_BYTE")
33508 (code "GL_UNSIGNED_SHORT")
33510 (code "GL_UNSIGNED_INT")
33512 (entry (% (heading (var "indices")))
33514 Specifies a pointer to the location where the indices are stored. "))
33515 (entry (% (heading (var "primcount")))
33517 Specifies the size of the "
33520 (heading "Description")
33521 (para (code "glMultiDrawElements")
33522 " specifies multiple sets of geometric primitives with very few subroutine
33523 calls. Instead of calling a GL function to pass each individual vertex,
33524 normal, texture coordinate, edge flag, or color, you can prespecify
33525 separate arrays of vertices, normals, and so on, and use them to construct a
33526 sequence of primitives with a single call to "
33527 (code "glMultiDrawElements")
33529 (para (code "glMultiDrawElements")
33530 " is identical in operation to "
33531 (code "glDrawElements")
33534 " separate lists of elements are specified. ")
33536 Vertex attributes that are modified by "
33537 (code "glMultiDrawElements")
33539 unspecified value after "
33540 (code "glMultiDrawElements")
33541 " returns. For example, if "
33542 (code "GL_COLOR_ARRAY")
33543 " is enabled, the value of the current color is
33545 (code "glMultiDrawElements")
33546 " executes. Attributes that aren't
33547 modified maintain their previous values. ")
33549 (para (code "GL_INVALID_ENUM")
33550 " is generated if "
33552 " is not an accepted value. ")
33553 (para (code "GL_INVALID_VALUE")
33554 " is generated if "
33557 (para (code "GL_INVALID_OPERATION")
33558 " is generated if a non-zero buffer object name is bound to an
33559 enabled array or the element array and the buffer object's data store is currently mapped. ")
33560 (para (code "GL_INVALID_OPERATION")
33561 " is generated if "
33562 (code "glMultiDrawElements")
33563 " is executed between
33566 " and the corresponding "
33570 (define-gl-procedure
33575 (funcdef "void " (function "glMultiTexCoord1s"))
33576 (paramdef "GLenum " (parameter "target"))
33577 (paramdef "GLshort " (parameter "s"))))
33579 (heading "set the current texture coordinates")
33580 (heading "Parameters")
33581 (table (% (formatter (asis)))
33582 (entry (% (heading (var "target")))
33584 Specifies the texture unit whose coordinates should be modified. The number
33585 of texture units is implementation dependent, but must be at least
33586 two. Symbolic constant must be one of "
33587 (code "GL_TEXTURE")
33590 where i ranges from 0 to "
33591 (code "GL_MAX_TEXTURE_COORDS")
33593 which is an implementation-dependent value. "))
33594 (entry (% (heading (var "s")))
33607 " texture coordinates for "
33609 " texture unit. Not all parameters are present in all forms
33610 of the command. ")))
33611 (heading "Description")
33612 (para (code "glMultiTexCoord")
33613 " specifies texture coordinates in one, two, three, or four
33615 (code "glMultiTexCoord1")
33616 " sets the current texture
33618 (math "(" (var "s") "," "0" "0" "1" ")")
33621 (code "glMultiTexCoord2")
33624 (math "(" (var "s") "," (var "t") "0" "1" ")")
33627 (code "glMultiTexCoord3")
33628 " specifies the texture coordinates as "
33638 (code "glMultiTexCoord4")
33640 defines all four components explicitly as "
33650 The current texture coordinates are part of the data
33651 that is associated with each vertex and with the current
33653 Initially, the values for "
33663 (math "(" "0" "," "0" "0" "1" ")")
33667 (define-gl-procedure
33672 (funcdef "void " (function "glMultMatrixd"))
33673 (paramdef "const GLdouble * " (parameter "m"))))
33676 "multiply the current matrix with the specified matrix")
33677 (heading "Parameters")
33678 (table (% (formatter (asis)))
33679 (entry (% (heading (var "m")))
33681 Points to 16 consecutive values that are used as the elements of
33685 column-major matrix. ")))
33686 (heading "Description")
33687 (para (code "glMultMatrix")
33688 " multiplies the current matrix with the one specified using "
33691 replaces the current matrix with the product. ")
33693 The current matrix is determined by the current matrix mode (see "
33694 (code "glMatrixMode")
33695 "). It is either the projection matrix,
33697 or the texture matrix. ")
33699 (para (code "GL_INVALID_OPERATION")
33700 " is generated if "
33701 (code "glMultMatrix")
33703 is executed between the execution of "
33706 and the corresponding execution of "
33710 (define-gl-procedure
33711 glMultTransposeMatrix
33712 "glMultTransposeMatrix"
33717 (function "glMultTransposeMatrixd"))
33718 (paramdef "const GLdouble * " (parameter "m"))))
33721 "multiply the current matrix with the specified row-major ordered matrix")
33722 (heading "Parameters")
33723 (table (% (formatter (asis)))
33724 (entry (% (heading (var "m")))
33726 Points to 16 consecutive values that are used as the elements of
33730 row-major matrix. ")))
33731 (heading "Description")
33732 (para (code "glMultTransposeMatrix")
33733 " multiplies the current matrix with the one specified using "
33736 replaces the current matrix with the product. ")
33738 The current matrix is determined by the current matrix mode (see "
33739 (code "glMatrixMode")
33740 "). It is either the projection matrix, modelview matrix,
33741 or the texture matrix. ")
33743 (para (code "GL_INVALID_OPERATION")
33744 " is generated if "
33745 (code "glMultTransposeMatrix")
33747 is executed between the execution of "
33750 and the corresponding execution of "
33754 (define-gl-procedure
33759 (funcdef "void " (function "glNewList"))
33760 (paramdef "GLuint " (parameter "list"))
33761 (paramdef "GLenum " (parameter "mode"))))
33763 (heading "create or replace a display list")
33764 (heading "Parameters")
33765 (table (% (formatter (asis)))
33766 (entry (% (heading (var "list")))
33768 Specifies the display-list name. "))
33769 (entry (% (heading (var "mode")))
33771 Specifies the compilation mode,
33773 (code "GL_COMPILE")
33775 (code "GL_COMPILE_AND_EXECUTE")
33777 (heading "Description")
33779 Display lists are groups of GL commands that have been stored
33780 for subsequent execution.
33781 Display lists are created with "
33784 All subsequent commands are placed in the display list,
33785 in the order issued,
33789 (para (code "glNewList")
33790 " has two arguments.
33791 The first argument, "
33794 is a positive integer that becomes the unique name for the display list.
33795 Names can be created and reserved with "
33796 (code "glGenLists")
33798 and tested for uniqueness with "
33801 The second argument, "
33804 is a symbolic constant that can assume one of two values: ")
33805 (table (% (formatter (asis)))
33806 (entry (% (heading (code "GL_COMPILE")))
33808 Commands are merely compiled. "))
33809 (entry (% (heading (code "GL_COMPILE_AND_EXECUTE")))
33811 Commands are executed as they are compiled into the display list. ")))
33813 Certain commands are not compiled into the display list
33814 but are executed immediately,
33815 regardless of the display-list mode.
33816 These commands are "
33817 (code "glAreTexturesResident")
33819 (code "glColorPointer")
33821 (code "glDeleteLists")
33823 (code "glDeleteTextures")
33825 (code "glDisableClientState")
33827 (code "glEdgeFlagPointer")
33829 (code "glEnableClientState")
33831 (code "glFeedbackBuffer")
33837 (code "glGenLists")
33839 (code "glGenTextures")
33841 (code "glIndexPointer")
33843 (code "glInterleavedArrays")
33845 (code "glIsEnabled")
33849 (code "glIsTexture")
33851 (code "glNormalPointer")
33853 (code "glPopClientAttrib")
33855 (code "glPixelStore")
33857 (code "glPushClientAttrib")
33859 (code "glReadPixels")
33861 (code "glRenderMode")
33863 (code "glSelectBuffer")
33865 (code "glTexCoordPointer")
33867 (code "glVertexPointer")
33874 (code "glTexImage1D")
33876 (code "glTexImage2D")
33878 (code "glTexImage3D")
33880 are executed immediately and not compiled into the display list when their
33881 first argument is "
33882 (code "GL_PROXY_TEXTURE_1D")
33884 (code "GL_PROXY_TEXTURE_1D")
33886 (code "GL_PROXY_TEXTURE_3D")
33887 ", respectively. ")
33890 (code "ARB_imaging")
33891 " extension is supported, "
33892 (code "glHistogram")
33893 " executes immediately when its argument is "
33894 (code "GL_PROXY_HISTOGRAM")
33896 (code "glColorTable")
33898 immediately when its first argument is "
33899 (code "GL_PROXY_COLOR_TABLE")
33901 (code "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE")
33903 (code "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE")
33906 For OpenGL versions 1.3 and greater, or when the "
33907 (code "ARB_multitexture")
33908 " extension is supported, "
33909 (code "glClientActiveTexture")
33910 " is not compiled into display lists, but
33911 executed immediately. ")
33916 the display-list definition is completed by associating the list
33917 with the unique name "
33920 (specified in the "
33923 If a display list with name "
33926 it is replaced only when "
33930 (para (code "GL_INVALID_VALUE")
33931 " is generated if "
33934 (para (code "GL_INVALID_ENUM")
33935 " is generated if "
33937 " is not an accepted value. ")
33938 (para (code "GL_INVALID_OPERATION")
33939 " is generated if "
33942 without a preceding "
33947 " is called while a display list is being defined. ")
33948 (para (code "GL_INVALID_OPERATION")
33949 " is generated if "
33954 is executed between the execution of "
33957 and the corresponding execution of "
33960 (para (code "GL_OUT_OF_MEMORY")
33961 " is generated if there is insufficient memory to
33962 compile the display list. If the GL version is 1.1 or greater, no
33963 change is made to the previous contents of the display list, if any,
33964 and no other change is made to the GL state. (It is as if no attempt
33965 had been made to create the new display list.) ")))
33967 (define-gl-procedure
33972 (funcdef "void " (function "glNormalPointer"))
33973 (paramdef "GLenum " (parameter "type"))
33974 (paramdef "GLsizei " (parameter "stride"))
33977 (parameter "pointer"))))
33979 (heading "define an array of normals")
33980 (heading "Parameters")
33981 (table (% (formatter (asis)))
33982 (entry (% (heading (var "type")))
33984 Specifies the data type of each coordinate in the array.
33985 Symbolic constants "
33996 are accepted. The initial value is "
33999 (entry (% (heading (var "stride")))
34001 Specifies the byte offset between consecutive normals. If "
34004 0, the normals are understood to be tightly packed in
34005 the array. The initial value is 0. "))
34006 (entry (% (heading (var "pointer")))
34008 Specifies a pointer to the first coordinate of the first normal in the
34009 array. The initial value is 0. ")))
34010 (heading "Description")
34011 (para (code "glNormalPointer")
34012 " specifies the location and data format of an array of normals
34013 to use when rendering. "
34015 " specifies the data type of each normal coordinate,
34018 " specifies the byte stride from one
34019 normal to the next, allowing vertices and attributes
34020 to be packed into a single array or stored in separate arrays.
34021 (Single-array storage may be more efficient on some implementations;
34023 (code "glInterleavedArrays")
34026 If a non-zero named buffer object is bound to the "
34027 (code "GL_ARRAY_BUFFER")
34030 (code "glBindBuffer")
34031 ") while a normal array is
34034 " is treated as a byte offset into the buffer object's data store.
34035 Also, the buffer object binding ("
34036 (code "GL_ARRAY_BUFFER_BINDING")
34037 ") is saved as normal vertex array
34038 client-side state ("
34039 (code "GL_NORMAL_ARRAY_BUFFER_BINDING")
34042 When a normal array is specified, "
34048 " are saved as client-side
34049 state, in addition to the current vertex array buffer object binding. ")
34051 To enable and disable the normal array, call "
34052 (code "glEnableClientState")
34054 (code "glDisableClientState")
34055 " with the argument "
34056 (code "GL_NORMAL_ARRAY")
34058 enabled, the normal array is used
34060 (code "glDrawArrays")
34062 (code "glMultiDrawArrays")
34064 (code "glDrawElements")
34066 (code "glMultiDrawElements")
34068 (code "glDrawRangeElements")
34070 (code "glArrayElement")
34073 (para (code "GL_INVALID_ENUM")
34074 " is generated if "
34076 " is not an accepted value. ")
34077 (para (code "GL_INVALID_VALUE")
34078 " is generated if "
34080 " is negative. ")))
34082 (define-gl-procedure
34087 (funcdef "void " (function "glNormal3b"))
34088 (paramdef "GLbyte " (parameter "nx"))
34089 (paramdef "GLbyte " (parameter "ny"))
34090 (paramdef "GLbyte " (parameter "nz"))))
34092 (heading "set the current normal vector")
34093 (heading "Parameters")
34094 (table (% (formatter (asis)))
34095 (entry (% (heading (var "nx")))
34107 coordinates of the new current normal.
34108 The initial value of the current normal is the unit vector, (0, 0, 1). ")
34110 (heading "Description")
34112 The current normal is set to the given coordinates
34116 Byte, short, or integer arguments are converted to floating-point
34117 format with a linear mapping that maps the most positive representable integer
34119 and the most negative representable integer value to "
34123 Normals specified with "
34125 " need not have unit length.
34127 (code "GL_NORMALIZE")
34129 then normals of any length specified with "
34131 " are normalized after transformation.
34133 (code "GL_RESCALE_NORMAL")
34134 " is enabled, normals are scaled by a scaling factor
34135 derived from the modelview matrix. "
34136 (code "GL_RESCALE_NORMAL")
34137 " requires that the
34138 originally specified normals were of unit length, and that the modelview
34139 matrix contain only uniform scales for proper results.
34140 To enable and disable normalization, call "
34146 (code "GL_NORMALIZE")
34148 (code "GL_RESCALE_NORMAL")
34150 Normalization is initially disabled. ")))
34152 (define-gl-procedure
34157 (funcdef "void " (function "glOrtho"))
34158 (paramdef "GLdouble " (parameter "left"))
34159 (paramdef "GLdouble " (parameter "right"))
34160 (paramdef "GLdouble " (parameter "bottom"))
34161 (paramdef "GLdouble " (parameter "top"))
34162 (paramdef "GLdouble " (parameter "nearVal"))
34163 (paramdef "GLdouble " (parameter "farVal"))))
34166 "multiply the current matrix with an orthographic matrix")
34167 (heading "Parameters")
34168 (table (% (formatter (asis)))
34169 (entry (% (heading (var "left")))
34170 (itemx (var "right"))
34172 Specify the coordinates for the left and right vertical clipping planes. "))
34173 (entry (% (heading (var "bottom")))
34174 (itemx (var "top"))
34176 Specify the coordinates for the bottom and top horizontal clipping planes. "))
34177 (entry (% (heading (var "nearVal")))
34178 (itemx (var "farVal"))
34180 Specify the distances to the nearer and farther depth clipping planes.
34181 These values are negative if the plane is to be behind the viewer. ")))
34182 (heading "Description")
34183 (para (code "glOrtho")
34184 " describes a transformation that produces a parallel projection.
34185 The current matrix (see "
34186 (code "glMatrixMode")
34187 ") is multiplied by this matrix
34188 and the result replaces the current matrix, as if "
34189 (code "glMultMatrix")
34190 " were called with the following matrix
34191 as its argument: ")
34309 Typically, the matrix mode is "
34310 (code "GL_PROJECTION")
34329 specify the points on the near clipping plane that are mapped
34330 to the lower left and upper right corners of the window,
34332 assuming that the eye is located at (0, 0, 0). "
34333 (math "-" (var "farVal"))
34335 specifies the location of the far clipping plane.
34340 " can be either positive or negative. ")
34343 (code "glPushMatrix")
34345 (code "glPopMatrix")
34346 " to save and restore
34347 the current matrix stack. ")
34349 (para (code "GL_INVALID_VALUE")
34350 " is generated if "
34363 (para (code "GL_INVALID_OPERATION")
34364 " is generated if "
34367 is executed between the execution of "
34370 and the corresponding execution of "
34374 (define-gl-procedure
34379 (funcdef "void " (function "glPassThrough"))
34380 (paramdef "GLfloat " (parameter "token"))))
34382 (heading "place a marker in the feedback buffer")
34383 (heading "Parameters")
34384 (table (% (formatter (asis)))
34385 (entry (% (heading (var "token")))
34387 Specifies a marker value to be placed in the feedback buffer
34389 (code "GL_PASS_THROUGH_TOKEN")
34391 (heading "Description")
34394 Feedback is a GL render mode.
34395 The mode is selected by calling "
34396 (code "glRenderMode")
34398 (code "GL_FEEDBACK")
34400 When the GL is in feedback mode,
34401 no pixels are produced by rasterization.
34403 information about primitives that would have been rasterized
34404 is fed back to the application using the GL.
34406 (code "glFeedbackBuffer")
34407 " reference page for a description of the
34408 feedback buffer and the values in it. ")
34409 (para (code "glPassThrough")
34410 " inserts a user-defined marker in the feedback buffer
34411 when it is executed in feedback mode. "
34413 " is returned as if it were a primitive;
34414 it is indicated with its own unique identifying value: "
34415 (code "GL_PASS_THROUGH_TOKEN")
34418 (code "glPassThrough")
34419 " commands with respect to the specification
34420 of graphics primitives is maintained. ")
34422 (para (code "GL_INVALID_OPERATION")
34423 " is generated if "
34424 (code "glPassThrough")
34425 " is executed between
34428 " and the corresponding execution of "
34432 (define-gl-procedure
34437 (funcdef "void " (function "glPixelMapfv"))
34438 (paramdef "GLenum " (parameter "map"))
34439 (paramdef "GLsizei " (parameter "mapsize"))
34442 (parameter "values"))))
34444 (heading "set up pixel transfer maps")
34445 (heading "Parameters")
34446 (table (% (formatter (asis)))
34447 (entry (% (heading (var "map")))
34449 Specifies a symbolic map name.
34450 Must be one of the following: "
34451 (code "GL_PIXEL_MAP_I_TO_I")
34453 (code "GL_PIXEL_MAP_S_TO_S")
34455 (code "GL_PIXEL_MAP_I_TO_R")
34457 (code "GL_PIXEL_MAP_I_TO_G")
34459 (code "GL_PIXEL_MAP_I_TO_B")
34461 (code "GL_PIXEL_MAP_I_TO_A")
34463 (code "GL_PIXEL_MAP_R_TO_R")
34465 (code "GL_PIXEL_MAP_G_TO_G")
34467 (code "GL_PIXEL_MAP_B_TO_B")
34469 (code "GL_PIXEL_MAP_A_TO_A")
34471 (entry (% (heading (var "mapsize")))
34473 Specifies the size of the map being defined. "))
34474 (entry (% (heading (var "values")))
34476 Specifies an array of "
34479 (heading "Description")
34480 (para (code "glPixelMap")
34481 " sets up translation tables,
34486 (code "glCopyPixels")
34488 (code "glCopyTexImage1D")
34490 (code "glCopyTexImage2D")
34492 (code "glCopyTexSubImage1D")
34494 (code "glCopyTexSubImage2D")
34496 (code "glCopyTexSubImage3D")
34498 (code "glDrawPixels")
34500 (code "glReadPixels")
34502 (code "glTexImage1D")
34504 (code "glTexImage2D")
34506 (code "glTexImage3D")
34508 (code "glTexSubImage1D")
34510 (code "glTexSubImage2D")
34512 (code "glTexSubImage3D")
34514 Additionally, if the "
34515 (code "ARB_imaging")
34516 " subset is supported, the
34518 (code "glColorTable")
34520 (code "glColorSubTable")
34522 (code "glConvolutionFilter1D")
34524 (code "glConvolutionFilter2D")
34526 (code "glHistogram")
34530 (code "glSeparableFilter2D")
34532 Use of these maps is described completely in the "
34533 (code "glPixelTransfer")
34535 and partly in the reference pages for the pixel and texture image commands.
34536 Only the specification of the maps is described in this reference page. ")
34538 " is a symbolic map name,
34539 indicating one of ten maps to set. "
34541 " specifies the number of entries in the map,
34544 " is a pointer to an array of "
34548 If a non-zero named buffer object is bound to the "
34549 (code "GL_PIXEL_UNPACK_BUFFER")
34552 (code "glBindBuffer")
34553 ") while a pixel transfer map is
34556 " is treated as a byte offset into the buffer object's data store. ")
34558 The ten maps are as follows: ")
34559 (table (% (formatter (asis)))
34560 (entry (% (heading (code "GL_PIXEL_MAP_I_TO_I")))
34562 Maps color indices to color indices. "))
34563 (entry (% (heading (code "GL_PIXEL_MAP_S_TO_S")))
34565 Maps stencil indices to stencil indices. "))
34566 (entry (% (heading (code "GL_PIXEL_MAP_I_TO_R")))
34568 Maps color indices to red components. "))
34569 (entry (% (heading (code "GL_PIXEL_MAP_I_TO_G")))
34571 Maps color indices to green components. "))
34572 (entry (% (heading (code "GL_PIXEL_MAP_I_TO_B")))
34574 Maps color indices to blue components. "))
34575 (entry (% (heading (code "GL_PIXEL_MAP_I_TO_A")))
34577 Maps color indices to alpha components. "))
34578 (entry (% (heading (code "GL_PIXEL_MAP_R_TO_R")))
34580 Maps red components to red components. "))
34581 (entry (% (heading (code "GL_PIXEL_MAP_G_TO_G")))
34583 Maps green components to green components. "))
34584 (entry (% (heading (code "GL_PIXEL_MAP_B_TO_B")))
34586 Maps blue components to blue components. "))
34587 (entry (% (heading (code "GL_PIXEL_MAP_A_TO_A")))
34589 Maps alpha components to alpha components. ")))
34591 The entries in a map can be specified as single-precision
34592 floating-point numbers,
34593 unsigned short integers,
34594 or unsigned int integers.
34595 Maps that store color component values
34597 (code "GL_PIXEL_MAP_I_TO_I")
34599 (code "GL_PIXEL_MAP_S_TO_S")
34601 retain their values in floating-point format,
34602 with unspecified mantissa and exponent sizes.
34603 Floating-point values specified by "
34604 (code "glPixelMapfv")
34605 " are converted directly
34606 to the internal floating-point format of these maps,
34607 then clamped to the range [0,1].
34608 Unsigned integer values specified by "
34609 (code "glPixelMapusv")
34611 (code "glPixelMapuiv")
34612 " are converted linearly such that
34613 the largest representable integer maps to 1.0,
34614 and 0 maps to 0.0. ")
34616 Maps that store indices, "
34617 (code "GL_PIXEL_MAP_I_TO_I")
34619 (code "GL_PIXEL_MAP_S_TO_S")
34621 retain their values in fixed-point format,
34622 with an unspecified number of bits to the right of the binary point.
34623 Floating-point values specified by "
34624 (code "glPixelMapfv")
34625 " are converted directly
34626 to the internal fixed-point format of these maps.
34627 Unsigned integer values specified by "
34628 (code "glPixelMapusv")
34630 (code "glPixelMapuiv")
34631 " specify integer values,
34632 with all 0's to the right of the binary point. ")
34634 The following table shows the initial sizes and values for each of the maps.
34635 Maps that are indexed by either color or stencil indices must have "
34638 (math "2" "^" (var "n"))
34643 or the results are undefined.
34644 The maximum allowable size for each map depends on the implementation
34645 and can be determined by calling "
34648 (code "GL_MAX_PIXEL_MAP_TABLE")
34650 The single maximum applies to all maps; it is at
34652 (table (% (formatter (asis)))
34653 (entry (% (heading (strong (var "map"))))
34654 (para (strong "Lookup Index")
34656 (strong "Lookup Value")
34658 (strong "Initial Size")
34660 (strong "Initial Value")))
34661 (entry (% (heading (code "GL_PIXEL_MAP_I_TO_I")))
34673 (entry (% (heading (code "GL_PIXEL_MAP_S_TO_S")))
34685 (entry (% (heading (code "GL_PIXEL_MAP_I_TO_R")))
34697 (entry (% (heading (code "GL_PIXEL_MAP_I_TO_G")))
34709 (entry (% (heading (code "GL_PIXEL_MAP_I_TO_B")))
34721 (entry (% (heading (code "GL_PIXEL_MAP_I_TO_A")))
34733 (entry (% (heading (code "GL_PIXEL_MAP_R_TO_R")))
34739 (entry (% (heading (code "GL_PIXEL_MAP_G_TO_G")))
34745 (entry (% (heading (code "GL_PIXEL_MAP_B_TO_B")))
34751 (entry (% (heading (code "GL_PIXEL_MAP_A_TO_A")))
34758 (para (code "GL_INVALID_ENUM")
34759 " is generated if "
34761 " is not an accepted value. ")
34762 (para (code "GL_INVALID_VALUE")
34763 " is generated if "
34767 (code "GL_MAX_PIXEL_MAP_TABLE")
34769 (para (code "GL_INVALID_VALUE")
34770 " is generated if "
34773 (code "GL_PIXEL_MAP_I_TO_I")
34775 (code "GL_PIXEL_MAP_S_TO_S")
34777 (code "GL_PIXEL_MAP_I_TO_R")
34779 (code "GL_PIXEL_MAP_I_TO_G")
34781 (code "GL_PIXEL_MAP_I_TO_B")
34783 (code "GL_PIXEL_MAP_I_TO_A")
34787 " is not a power of two. ")
34788 (para (code "GL_INVALID_OPERATION")
34789 " is generated if a non-zero buffer object name is bound to the "
34790 (code "GL_PIXEL_UNPACK_BUFFER")
34791 " target and the buffer object's data store is currently mapped. ")
34792 (para (code "GL_INVALID_OPERATION")
34793 " is generated if a non-zero buffer object name is bound to the "
34794 (code "GL_PIXEL_UNPACK_BUFFER")
34795 " target and the data would be unpacked from the buffer
34796 object such that the memory reads required would exceed the data store size. ")
34797 (para (code "GL_INVALID_OPERATION")
34798 " is generated by "
34799 (code "glPixelMapfv")
34800 " if a non-zero buffer object name is bound to the "
34801 (code "GL_PIXEL_UNPACK_BUFFER")
34804 " is not evenly divisible
34805 into the number of bytes needed to store in memory a GLfloat datum. ")
34806 (para (code "GL_INVALID_OPERATION")
34807 " is generated by "
34808 (code "glPixelMapuiv")
34809 " if a non-zero buffer object name is bound to the "
34810 (code "GL_PIXEL_UNPACK_BUFFER")
34813 " is not evenly divisible
34814 into the number of bytes needed to store in memory a GLuint datum. ")
34815 (para (code "GL_INVALID_OPERATION")
34816 " is generated by "
34817 (code "glPixelMapusv")
34818 " if a non-zero buffer object name is bound to the "
34819 (code "GL_PIXEL_UNPACK_BUFFER")
34822 " is not evenly divisible
34823 into the number of bytes needed to store in memory a GLushort datum. ")
34824 (para (code "GL_INVALID_OPERATION")
34825 " is generated if "
34826 (code "glPixelMap")
34828 is executed between the execution of "
34831 and the corresponding execution of "
34835 (define-gl-procedure
34840 (funcdef "void " (function "glPixelStoref"))
34841 (paramdef "GLenum " (parameter "pname"))
34842 (paramdef "GLfloat " (parameter "param"))))
34844 (heading "set pixel storage modes")
34845 (heading "Parameters")
34846 (table (% (formatter (asis)))
34847 (entry (% (heading (var "pname")))
34849 Specifies the symbolic name of the parameter to be set.
34850 Six values affect the packing of pixel data into memory: "
34851 (code "GL_PACK_SWAP_BYTES")
34853 (code "GL_PACK_LSB_FIRST")
34855 (code "GL_PACK_ROW_LENGTH")
34857 (code "GL_PACK_IMAGE_HEIGHT")
34859 (code "GL_PACK_SKIP_PIXELS")
34861 (code "GL_PACK_SKIP_ROWS")
34863 (code "GL_PACK_SKIP_IMAGES")
34865 (code "GL_PACK_ALIGNMENT")
34867 Six more affect the unpacking of pixel data "
34870 (code "GL_UNPACK_SWAP_BYTES")
34872 (code "GL_UNPACK_LSB_FIRST")
34874 (code "GL_UNPACK_ROW_LENGTH")
34876 (code "GL_UNPACK_IMAGE_HEIGHT")
34878 (code "GL_UNPACK_SKIP_PIXELS")
34880 (code "GL_UNPACK_SKIP_ROWS")
34882 (code "GL_UNPACK_SKIP_IMAGES")
34884 (code "GL_UNPACK_ALIGNMENT")
34886 (entry (% (heading (var "param")))
34888 Specifies the value that "
34891 (heading "Description")
34892 (para (code "glPixelStore")
34893 " sets pixel storage modes that affect the operation of subsequent "
34894 (code "glDrawPixels")
34896 (code "glReadPixels")
34897 " as well as the unpacking of
34898 polygon stipple patterns (see "
34899 (code "glPolygonStipple")
34902 "), texture patterns (see "
34903 (code "glTexImage1D")
34905 (code "glTexImage2D")
34907 (code "glTexImage3D")
34909 (code "glTexSubImage1D")
34911 (code "glTexSubImage2D")
34913 (code "glTexSubImage3D")
34915 Additionally, if the "
34916 (code "ARB_imaging")
34917 " extension is supported, pixel
34918 storage modes affect convolution filters
34920 (code "glConvolutionFilter1D")
34922 (code "glConvolutionFilter2D")
34924 (code "glSeparableFilter2D")
34925 ", color table (see "
34926 (code "glColorTable")
34928 (code "glColorSubTable")
34929 ", and unpacking histogram (See "
34930 (code "glHistogram")
34935 (para (var "pname")
34936 " is a symbolic constant indicating the parameter to be set, and "
34938 " is the new value. Six of the twelve storage parameters affect
34939 how pixel data is returned to client memory.
34940 They are as follows: ")
34941 (table (% (formatter (asis)))
34942 (entry (% (heading (code "GL_PACK_SWAP_BYTES")))
34945 byte ordering for multibyte color components,
34951 if a four-byte component consists of bytes "
34952 (math (var "b") "_" "0")
34954 (math (var "b") "_" "1")
34956 (math (var "b") "_" "2")
34958 (math (var "b") "_" "3")
34960 it is stored in memory as "
34961 (math (var "b") "_" "3")
34963 (math (var "b") "_" "2")
34965 (math (var "b") "_" "1")
34967 (math (var "b") "_" "0")
34970 (code "GL_PACK_SWAP_BYTES")
34972 (code "GL_PACK_SWAP_BYTES")
34973 " has no effect on the memory order of components
34975 only on the order of bytes within components or indices.
34977 the three components of a "
34979 " format pixel are always stored with
34983 regardless of the value of "
34984 (code "GL_PACK_SWAP_BYTES")
34986 (entry (% (heading (code "GL_PACK_LSB_FIRST")))
34989 bits are ordered within a byte from least significant to most significant;
34991 the first bit in each byte is the most significant one.
34992 This parameter is significant for bitmap data only. "))
34993 (entry (% (heading (code "GL_PACK_ROW_LENGTH")))
34995 If greater than 0, "
34996 (code "GL_PACK_ROW_LENGTH")
34997 " defines the number of pixels in a row.
34998 If the first pixel of a row is placed at location "
35002 then the location of the first pixel of the next row is obtained by skipping ")
35003 (para (math (var "k")
35044 components or indices,
35048 is the number of components or indices in a pixel, "
35051 is the number of pixels in a row
35053 (code "GL_PACK_ROW_LENGTH")
35054 " if it is greater than 0,
35056 (math (var "width"))
35058 argument to the pixel routine otherwise), "
35062 (code "GL_PACK_ALIGNMENT")
35066 is the size, in bytes, of a single component
35068 (math (var "a") "<" (var "s"))
35071 (math (var "a") "=" (var "s"))
35073 In the case of 1-bit values,
35074 the location of the next row is obtained by skipping ")
35075 (para (math (var "k")
35094 components or indices. ")
35098 " in this description refers to the nonindex values
35108 has three components per pixel:
35111 and finally blue. "))
35112 (entry (% (heading (code "GL_PACK_IMAGE_HEIGHT")))
35114 If greater than 0, "
35115 (code "GL_PACK_IMAGE_HEIGHT")
35116 " defines the number of pixels in an image
35117 three-dimensional texture volume, where ``image'' is defined by all pixels
35118 sharing the same third dimension index.
35119 If the first pixel of a row is placed at location "
35123 then the location of the first pixel of the next row is obtained by skipping ")
35124 (para (math (var "k")
35169 components or indices, where "
35172 is the number of components or indices
35176 is the number of pixels in a row
35178 (code "GL_PACK_ROW_LENGTH")
35179 " if it is greater than 0, the "
35180 (math (var "width"))
35183 (code "glTexImage3D")
35188 rows in a pixel image ("
35189 (code "GL_PACK_IMAGE_HEIGHT")
35190 " if it is greater than
35192 (math (var "height"))
35195 (code "glTexImage3D")
35196 " routine otherwise), "
35200 (code "GL_PACK_ALIGNMENT")
35204 is the size, in bytes, of a single
35206 (math (var "a") "<" (var "s"))
35209 (math (var "a") "=" (var "s"))
35214 " in this description refers to the nonindex values
35224 has three components per pixel:
35227 and finally blue. "))
35229 (code "GL_PACK_SKIP_PIXELS")
35231 (code "GL_PACK_SKIP_ROWS")
35233 (code "GL_PACK_SKIP_IMAGES")))
35235 These values are provided as a convenience to the programmer;
35236 they provide no functionality that cannot be duplicated simply by
35237 incrementing the pointer passed to "
35238 (code "glReadPixels")
35241 (code "GL_PACK_SKIP_PIXELS")
35245 is equivalent to incrementing
35247 (math (var "i") "\u2062" (var "n"))
35249 components or indices,
35253 is the number of components or indices in each pixel.
35255 (code "GL_PACK_SKIP_ROWS")
35259 is equivalent to incrementing
35261 (math (var "j") "\u2062" (var "m"))
35263 components or indices,
35267 is the number of components or indices per row,
35268 as just computed in the "
35269 (code "GL_PACK_ROW_LENGTH")
35272 (code "GL_PACK_SKIP_IMAGES")
35276 is equivalent to incrementing
35278 (math (var "k") "\u2062" (var "p"))
35283 is the number of components or indices
35284 per image, as computed in the "
35285 (code "GL_PACK_IMAGE_HEIGHT")
35287 (entry (% (heading (code "GL_PACK_ALIGNMENT")))
35289 Specifies the alignment requirements for the start of each pixel row in memory.
35290 The allowable values are
35291 1 (byte-alignment),
35292 2 (rows aligned to even-numbered bytes),
35293 4 (word-alignment), and
35294 8 (rows start on double-word boundaries). ")))
35296 The other six of the twelve storage parameters affect how pixel data is
35297 read from client memory.
35298 These values are significant for "
35299 (code "glDrawPixels")
35301 (code "glTexImage1D")
35303 (code "glTexImage2D")
35305 (code "glTexImage3D")
35307 (code "glTexSubImage1D")
35309 (code "glTexSubImage2D")
35311 (code "glTexSubImage3D")
35315 (code "glPolygonStipple")
35318 Additionally, if the "
35319 (code "ARB_imaging")
35320 " extension is supported, "
35321 (code "glColorTable")
35323 (code "glColorSubTable")
35325 (code "glConvolutionFilter1D")
35327 (code "glConvolutionFilter2D")
35329 (code "glSeparableFilter2D")
35331 They are as follows: ")
35332 (table (% (formatter (asis)))
35333 (entry (% (heading (code "GL_UNPACK_SWAP_BYTES")))
35336 byte ordering for multibyte color components,
35342 if a four-byte component consists of bytes "
35343 (math (var "b") "_" "0")
35345 (math (var "b") "_" "1")
35347 (math (var "b") "_" "2")
35349 (math (var "b") "_" "3")
35351 it is taken from memory as "
35352 (math (var "b") "_" "3")
35354 (math (var "b") "_" "2")
35356 (math (var "b") "_" "1")
35358 (math (var "b") "_" "0")
35361 (code "GL_UNPACK_SWAP_BYTES")
35363 (code "GL_UNPACK_SWAP_BYTES")
35364 " has no effect on the memory order of components
35366 only on the order of bytes within components or indices.
35368 the three components of a "
35370 " format pixel are always stored with
35374 regardless of the value of "
35375 (code "GL_UNPACK_SWAP_BYTES")
35377 (entry (% (heading (code "GL_UNPACK_LSB_FIRST")))
35380 bits are ordered within a byte from least significant to most significant;
35382 the first bit in each byte is the most significant one.
35383 This is relevant only for bitmap data. "))
35384 (entry (% (heading (code "GL_UNPACK_ROW_LENGTH")))
35386 If greater than 0, "
35387 (code "GL_UNPACK_ROW_LENGTH")
35388 " defines the number of pixels in a row.
35389 If the first pixel of a row is placed at location "
35393 then the location of the first pixel of the next row is obtained by skipping ")
35394 (para (math (var "k")
35435 components or indices,
35439 is the number of components or indices in a pixel, "
35442 is the number of pixels in a row
35444 (code "GL_UNPACK_ROW_LENGTH")
35445 " if it is greater than 0,
35447 (math (var "width"))
35449 argument to the pixel routine otherwise), "
35453 (code "GL_UNPACK_ALIGNMENT")
35457 is the size, in bytes, of a single component
35459 (math (var "a") "<" (var "s"))
35462 (math (var "a") "=" (var "s"))
35464 In the case of 1-bit values,
35465 the location of the next row is obtained by skipping ")
35466 (para (math (var "k")
35485 components or indices. ")
35489 " in this description refers to the nonindex values
35499 has three components per pixel:
35502 and finally blue. "))
35503 (entry (% (heading (code "GL_UNPACK_IMAGE_HEIGHT")))
35505 If greater than 0, "
35506 (code "GL_UNPACK_IMAGE_HEIGHT")
35507 " defines the number of pixels in an image of
35508 a three-dimensional texture volume. Where ``image'' is defined by all
35509 pixel sharing the same third dimension index.
35510 If the first pixel of a row is placed at location "
35514 then the location of the first pixel of the next row is obtained by skipping ")
35515 (para (math (var "k")
35560 components or indices,
35564 is the number of components or indices in a pixel, "
35567 is the number of pixels in a row
35569 (code "GL_UNPACK_ROW_LENGTH")
35570 " if it is greater than 0,
35572 (math (var "width"))
35575 (code "glTexImage3D")
35579 is the number of rows in an image ("
35580 (code "GL_UNPACK_IMAGE_HEIGHT")
35582 it is greater than 0, the "
35583 (math (var "height"))
35586 (code "glTexImage3D")
35591 (code "GL_UNPACK_ALIGNMENT")
35595 is the size, in bytes, of a single component
35597 (math (var "a") "<" (var "s"))
35600 (math (var "a") "=" (var "s"))
35605 " in this description refers to the nonindex values
35615 has three components per pixel:
35618 and finally blue. "))
35620 (code "GL_UNPACK_SKIP_PIXELS")
35622 (code "GL_UNPACK_SKIP_ROWS")))
35624 These values are provided as a convenience to the programmer;
35625 they provide no functionality that cannot be duplicated by
35626 incrementing the pointer passed to "
35627 (code "glDrawPixels")
35629 (code "glTexImage1D")
35631 (code "glTexImage2D")
35633 (code "glTexSubImage1D")
35635 (code "glTexSubImage2D")
35639 (code "glPolygonStipple")
35642 (code "GL_UNPACK_SKIP_PIXELS")
35646 is equivalent to incrementing
35648 (math (var "i") "\u2062" (var "n"))
35650 components or indices,
35654 is the number of components or indices in each pixel.
35656 (code "GL_UNPACK_SKIP_ROWS")
35660 is equivalent to incrementing
35662 (math (var "j") "\u2062" (var "k"))
35664 components or indices,
35668 is the number of components or indices per row,
35669 as just computed in the "
35670 (code "GL_UNPACK_ROW_LENGTH")
35672 (entry (% (heading (code "GL_UNPACK_ALIGNMENT")))
35674 Specifies the alignment requirements for the start of each pixel row in memory.
35675 The allowable values are
35676 1 (byte-alignment),
35677 2 (rows aligned to even-numbered bytes),
35678 4 (word-alignment), and
35679 8 (rows start on double-word boundaries). ")))
35681 The following table gives the type,
35683 and range of valid values for each storage parameter
35684 that can be set with "
35685 (code "glPixelStore")
35688 (table (% (formatter (asis)))
35689 (entry (% (heading (strong (var "pname"))))
35690 (para (strong "Type")
35692 (strong "Initial Value")
35694 (strong "Valid Range")))
35695 (entry (% (heading (code "GL_PACK_SWAP_BYTES")))
35704 (entry (% (heading (code "GL_PACK_LSB_FIRST")))
35713 (entry (% (heading (code "GL_PACK_ROW_LENGTH")))
35720 (math "[" "0" "," "∞" ")")))
35721 (entry (% (heading (code "GL_PACK_IMAGE_HEIGHT")))
35728 (math "[" "0" "," "∞" ")")))
35729 (entry (% (heading (code "GL_PACK_SKIP_ROWS")))
35736 (math "[" "0" "," "∞" ")")))
35737 (entry (% (heading (code "GL_PACK_SKIP_PIXELS")))
35744 (math "[" "0" "," "∞" ")")))
35745 (entry (% (heading (code "GL_PACK_SKIP_IMAGES")))
35752 (math "[" "0" "," "∞" ")")))
35753 (entry (% (heading (code "GL_PACK_ALIGNMENT")))
35762 (entry (% (heading (code "GL_UNPACK_SWAP_BYTES")))
35771 (entry (% (heading (code "GL_UNPACK_LSB_FIRST")))
35780 (entry (% (heading (code "GL_UNPACK_ROW_LENGTH")))
35787 (math "[" "0" "," "∞" ")")))
35788 (entry (% (heading (code "GL_UNPACK_IMAGE_HEIGHT")))
35795 (math "[" "0" "," "∞" ")")))
35796 (entry (% (heading (code "GL_UNPACK_SKIP_ROWS")))
35803 (math "[" "0" "," "∞" ")")))
35804 (entry (% (heading (code "GL_UNPACK_SKIP_PIXELS")))
35811 (math "[" "0" "," "∞" ")")))
35812 (entry (% (heading (code "GL_UNPACK_SKIP_IMAGES")))
35819 (math "[" "0" "," "∞" ")")))
35820 (entry (% (heading (code "GL_UNPACK_ALIGNMENT")))
35829 (para (code "glPixelStoref")
35830 " can be used to set any pixel store parameter.
35831 If the parameter type is boolean,
35835 the parameter is false;
35836 otherwise it is set to true.
35839 " is a integer type parameter, "
35841 " is rounded to the nearest integer. ")
35844 (code "glPixelStorei")
35845 " can also be used to set any of the
35846 pixel store parameters.
35847 Boolean parameters are set to false if "
35849 " is 0 and true otherwise. ")
35851 (para (code "GL_INVALID_ENUM")
35852 " is generated if "
35854 " is not an accepted value. ")
35855 (para (code "GL_INVALID_VALUE")
35856 " is generated if a negative row length,
35858 or row skip value is specified,
35859 or if alignment is specified as other than 1, 2, 4, or 8. ")
35860 (para (code "GL_INVALID_OPERATION")
35861 " is generated if "
35862 (code "glPixelStore")
35864 is executed between the execution of "
35867 and the corresponding execution of "
35871 (define-gl-procedure
35876 (funcdef "void " (function "glPixelTransferf"))
35877 (paramdef "GLenum " (parameter "pname"))
35878 (paramdef "GLfloat " (parameter "param"))))
35880 (heading "set pixel transfer modes")
35881 (heading "Parameters")
35882 (table (% (formatter (asis)))
35883 (entry (% (heading (var "pname")))
35885 Specifies the symbolic name of the pixel transfer parameter to be set.
35886 Must be one of the following: "
35887 (code "GL_MAP_COLOR")
35889 (code "GL_MAP_STENCIL")
35891 (code "GL_INDEX_SHIFT")
35893 (code "GL_INDEX_OFFSET")
35895 (code "GL_RED_SCALE")
35897 (code "GL_RED_BIAS")
35899 (code "GL_GREEN_SCALE")
35901 (code "GL_GREEN_BIAS")
35903 (code "GL_BLUE_SCALE")
35905 (code "GL_BLUE_BIAS")
35907 (code "GL_ALPHA_SCALE")
35909 (code "GL_ALPHA_BIAS")
35911 (code "GL_DEPTH_SCALE")
35913 (code "GL_DEPTH_BIAS")
35916 Additionally, if the "
35917 (code "ARB_imaging")
35918 " extension is supported, the
35919 following symbolic names are accepted: "
35920 (code "GL_POST_COLOR_MATRIX_RED_SCALE")
35922 (code "GL_POST_COLOR_MATRIX_GREEN_SCALE")
35924 (code "GL_POST_COLOR_MATRIX_BLUE_SCALE")
35926 (code "GL_POST_COLOR_MATRIX_ALPHA_SCALE")
35928 (code "GL_POST_COLOR_MATRIX_RED_BIAS")
35930 (code "GL_POST_COLOR_MATRIX_GREEN_BIAS")
35932 (code "GL_POST_COLOR_MATRIX_BLUE_BIAS")
35934 (code "GL_POST_COLOR_MATRIX_ALPHA_BIAS")
35936 (code "GL_POST_CONVOLUTION_RED_SCALE")
35938 (code "GL_POST_CONVOLUTION_GREEN_SCALE")
35940 (code "GL_POST_CONVOLUTION_BLUE_SCALE")
35942 (code "GL_POST_CONVOLUTION_ALPHA_SCALE")
35944 (code "GL_POST_CONVOLUTION_RED_BIAS")
35946 (code "GL_POST_CONVOLUTION_GREEN_BIAS")
35948 (code "GL_POST_CONVOLUTION_BLUE_BIAS")
35950 (code "GL_POST_CONVOLUTION_ALPHA_BIAS")
35952 (entry (% (heading (var "param")))
35954 Specifies the value that "
35957 (heading "Description")
35958 (para (code "glPixelTransfer")
35959 " sets pixel transfer modes that affect the operation of subsequent "
35960 (code "glCopyPixels")
35962 (code "glCopyTexImage1D")
35964 (code "glCopyTexImage2D")
35966 (code "glCopyTexSubImage1D")
35968 (code "glCopyTexSubImage2D")
35970 (code "glCopyTexSubImage3D")
35972 (code "glDrawPixels")
35974 (code "glReadPixels")
35976 (code "glTexImage1D")
35978 (code "glTexImage2D")
35980 (code "glTexImage3D")
35982 (code "glTexSubImage1D")
35984 (code "glTexSubImage2D")
35986 (code "glTexSubImage3D")
35988 Additionally, if the "
35989 (code "ARB_imaging")
35990 " subset is supported, the
35992 (code "glColorTable")
35994 (code "glColorSubTable")
35996 (code "glConvolutionFilter1D")
35998 (code "glConvolutionFilter2D")
36000 (code "glHistogram")
36004 (code "glSeparableFilter2D")
36005 " are also affected.
36006 The algorithms that are specified by pixel transfer modes operate on
36007 pixels after they are read from the frame buffer
36009 (code "glCopyPixels")
36010 (code "glCopyTexImage1D")
36012 (code "glCopyTexImage2D")
36014 (code "glCopyTexSubImage1D")
36016 (code "glCopyTexSubImage2D")
36018 (code "glCopyTexSubImage3D")
36020 (code "glReadPixels")
36022 or unpacked from client memory
36024 (code "glDrawPixels")
36026 (code "glTexImage1D")
36028 (code "glTexImage2D")
36030 (code "glTexImage3D")
36032 (code "glTexSubImage1D")
36034 (code "glTexSubImage2D")
36036 (code "glTexSubImage3D")
36038 Pixel transfer operations happen in the same order,
36039 and in the same manner,
36040 regardless of the command that resulted in the pixel operation.
36041 Pixel storage modes
36043 (code "glPixelStore")
36045 control the unpacking of pixels being read from client memory
36046 and the packing of pixels being written back into client memory. ")
36048 Pixel transfer operations handle four fundamental pixel types: "
36051 (var "color index")
36058 " pixels consist of four floating-point values
36059 with unspecified mantissa and exponent sizes,
36060 scaled such that 0 represents zero intensity
36061 and 1 represents full intensity. "
36062 (var "Color indices")
36063 " comprise a single fixed-point value,
36064 with unspecified precision to the right of the binary point. "
36066 " pixels comprise a single floating-point value,
36067 with unspecified mantissa and exponent sizes,
36068 scaled such that 0.0 represents the minimum depth buffer value,
36069 and 1.0 represents the maximum depth buffer value.
36072 " pixels comprise a single fixed-point value,
36073 with unspecified precision to the right of the binary point. ")
36075 The pixel transfer operations performed on the four basic pixel types are
36077 (table (% (formatter (asis)))
36078 (entry (% (heading (var "Color")))
36080 Each of the four color components is multiplied by a scale factor,
36081 then added to a bias factor.
36083 the red component is multiplied by "
36084 (code "GL_RED_SCALE")
36087 (code "GL_RED_BIAS")
36089 the green component is multiplied by "
36090 (code "GL_GREEN_SCALE")
36093 (code "GL_GREEN_BIAS")
36095 the blue component is multiplied by "
36096 (code "GL_BLUE_SCALE")
36099 (code "GL_BLUE_BIAS")
36101 the alpha component is multiplied by "
36102 (code "GL_ALPHA_SCALE")
36105 (code "GL_ALPHA_BIAS")
36107 After all four color components are scaled and biased,
36108 each is clamped to the range "
36109 (math "[" "0" "," "1" "]")
36111 All color, scale, and bias values are specified with "
36112 (code "glPixelTransfer")
36116 (code "GL_MAP_COLOR")
36118 each color component is scaled by the size of the corresponding
36119 color-to-color map,
36120 then replaced by the contents of that map indexed by the scaled component.
36122 the red component is scaled by "
36123 (code "GL_PIXEL_MAP_R_TO_R_SIZE")
36125 then replaced by the contents of "
36126 (code "GL_PIXEL_MAP_R_TO_R")
36127 " indexed by itself.
36128 The green component is scaled by "
36129 (code "GL_PIXEL_MAP_G_TO_G_SIZE")
36131 then replaced by the contents of "
36132 (code "GL_PIXEL_MAP_G_TO_G")
36133 " indexed by itself.
36134 The blue component is scaled by "
36135 (code "GL_PIXEL_MAP_B_TO_B_SIZE")
36137 then replaced by the contents of "
36138 (code "GL_PIXEL_MAP_B_TO_B")
36139 " indexed by itself.
36141 the alpha component is scaled by "
36142 (code "GL_PIXEL_MAP_A_TO_A_SIZE")
36144 then replaced by the contents of "
36145 (code "GL_PIXEL_MAP_A_TO_A")
36146 " indexed by itself.
36147 All components taken from the maps are then clamped to the range "
36148 (math "[" "0" "," "1" "]")
36150 (code "GL_MAP_COLOR")
36151 " is specified with "
36152 (code "glPixelTransfer")
36154 The contents of the various maps are specified with "
36155 (code "glPixelMap")
36159 (code "ARB_imaging")
36160 " extension is supported, each of the four
36161 color components may be scaled and biased after transformation by the
36164 the red component is multiplied by "
36165 (code "GL_POST_COLOR_MATRIX_RED_SCALE")
36168 (code "GL_POST_COLOR_MATRIX_RED_BIAS")
36170 the green component is multiplied by "
36171 (code "GL_POST_COLOR_MATRIX_GREEN_SCALE")
36174 (code "GL_POST_COLOR_MATRIX_GREEN_BIAS")
36176 the blue component is multiplied by "
36177 (code "GL_POST_COLOR_MATRIX_BLUE_SCALE")
36180 (code "GL_POST_COLOR_MATRIX_BLUE_BIAS")
36182 the alpha component is multiplied by "
36183 (code "GL_POST_COLOR_MATRIX_ALPHA_SCALE")
36186 (code "GL_POST_COLOR_MATRIX_ALPHA_BIAS")
36188 After all four color components are scaled and biased,
36189 each is clamped to the range "
36190 (math "[" "0" "," "1" "]")
36193 Similarly, if the "
36194 (code "ARB_imaging")
36195 " extension is supported, each of
36196 the four color components may be scaled and biased after processing by
36197 the enabled convolution filter.
36199 the red component is multiplied by "
36200 (code "GL_POST_CONVOLUTION_RED_SCALE")
36203 (code "GL_POST_CONVOLUTION_RED_BIAS")
36205 the green component is multiplied by "
36206 (code "GL_POST_CONVOLUTION_GREEN_SCALE")
36209 (code "GL_POST_CONVOLUTION_GREEN_BIAS")
36211 the blue component is multiplied by "
36212 (code "GL_POST_CONVOLUTION_BLUE_SCALE")
36215 (code "GL_POST_CONVOLUTION_BLUE_BIAS")
36217 the alpha component is multiplied by "
36218 (code "GL_POST_CONVOLUTION_ALPHA_SCALE")
36221 (code "GL_POST_CONVOLUTION_ALPHA_BIAS")
36223 After all four color components are scaled and biased,
36224 each is clamped to the range "
36225 (math "[" "0" "," "1" "]")
36227 (entry (% (heading (var "Color index")))
36229 Each color index is shifted left by "
36230 (code "GL_INDEX_SHIFT")
36232 beyond the number of fraction bits carried
36233 by the fixed-point index are filled with zeros.
36235 (code "GL_INDEX_SHIFT")
36237 the shift is to the right,
36240 (code "GL_INDEX_OFFSET")
36241 " is added to the index. "
36242 (code "GL_INDEX_SHIFT")
36244 (code "GL_INDEX_OFFSET")
36245 " are specified with "
36246 (code "glPixelTransfer")
36249 From this point, operation diverges depending on the required format of
36250 the resulting pixels.
36251 If the resulting pixels are to be written to a color index buffer,
36252 or if they are being read back to client memory in "
36253 (code "GL_COLOR_INDEX")
36255 the pixels continue to be treated as indices.
36257 (code "GL_MAP_COLOR")
36259 each index is masked by "
36260 (math "2" "^" (var "n") "-" "1")
36266 (code "GL_PIXEL_MAP_I_TO_I_SIZE")
36268 then replaced by the contents of "
36269 (code "GL_PIXEL_MAP_I_TO_I")
36272 (code "GL_MAP_COLOR")
36273 " is specified with "
36274 (code "glPixelTransfer")
36276 The contents of the index map is specified with "
36277 (code "glPixelMap")
36280 If the resulting pixels are to be written to an RGBA color buffer,
36281 or if they are read back to client memory in a format other than "
36282 (code "GL_COLOR_INDEX")
36284 the pixels are converted from indices to colors by referencing the
36286 (code "GL_PIXEL_MAP_I_TO_R")
36288 (code "GL_PIXEL_MAP_I_TO_G")
36290 (code "GL_PIXEL_MAP_I_TO_B")
36292 (code "GL_PIXEL_MAP_I_TO_A")
36294 Before being dereferenced,
36295 the index is masked by "
36296 (math "2" "^" (var "n") "-" "1")
36302 (code "GL_PIXEL_MAP_I_TO_R_SIZE")
36303 " for the red map, "
36304 (code "GL_PIXEL_MAP_I_TO_G_SIZE")
36305 " for the green map, "
36306 (code "GL_PIXEL_MAP_I_TO_B_SIZE")
36307 " for the blue map, and "
36308 (code "GL_PIXEL_MAP_I_TO_A_SIZE")
36309 " for the alpha map.
36310 All components taken from the maps are then clamped to the range "
36311 (math "[" "0" "," "1" "]")
36313 The contents of the four maps is specified with "
36314 (code "glPixelMap")
36316 (entry (% (heading (var "Depth")))
36318 Each depth value is multiplied by "
36319 (code "GL_DEPTH_SCALE")
36322 (code "GL_DEPTH_BIAS")
36324 then clamped to the range "
36325 (math "[" "0" "," "1" "]")
36327 (entry (% (heading (var "Stencil")))
36329 Each index is shifted "
36330 (code "GL_INDEX_SHIFT")
36331 " bits just as a color index is,
36333 (code "GL_INDEX_OFFSET")
36336 (code "GL_MAP_STENCIL")
36338 each index is masked by "
36339 (math "2" "^" (var "n") "-" "1")
36345 (code "GL_PIXEL_MAP_S_TO_S_SIZE")
36347 then replaced by the contents of "
36348 (code "GL_PIXEL_MAP_S_TO_S")
36352 The following table gives the type,
36354 and range of valid values for each of the pixel transfer parameters
36355 that are set with "
36356 (code "glPixelTransfer")
36359 (table (% (formatter (asis)))
36360 (entry (% (heading (strong (var "pname"))))
36361 (para (strong "Type")
36363 (strong "Initial Value")
36365 (strong "Valid Range")))
36366 (entry (% (heading (code "GL_MAP_COLOR")))
36375 (entry (% (heading (code "GL_MAP_STENCIL")))
36384 (entry (% (heading (code "GL_INDEX_SHIFT")))
36391 (math "(" "-" "∞" "," "∞" ")")))
36392 (entry (% (heading (code "GL_INDEX_OFFSET")))
36399 (math "(" "-" "∞" "," "∞" ")")))
36400 (entry (% (heading (code "GL_RED_SCALE")))
36407 (math "(" "-" "∞" "," "∞" ")")))
36408 (entry (% (heading (code "GL_GREEN_SCALE")))
36415 (math "(" "-" "∞" "," "∞" ")")))
36416 (entry (% (heading (code "GL_BLUE_SCALE")))
36423 (math "(" "-" "∞" "," "∞" ")")))
36424 (entry (% (heading (code "GL_ALPHA_SCALE")))
36431 (math "(" "-" "∞" "," "∞" ")")))
36432 (entry (% (heading (code "GL_DEPTH_SCALE")))
36439 (math "(" "-" "∞" "," "∞" ")")))
36440 (entry (% (heading (code "GL_RED_BIAS")))
36447 (math "(" "-" "∞" "," "∞" ")")))
36448 (entry (% (heading (code "GL_GREEN_BIAS")))
36455 (math "(" "-" "∞" "," "∞" ")")))
36456 (entry (% (heading (code "GL_BLUE_BIAS")))
36463 (math "(" "-" "∞" "," "∞" ")")))
36464 (entry (% (heading (code "GL_ALPHA_BIAS")))
36471 (math "(" "-" "∞" "," "∞" ")")))
36472 (entry (% (heading (code "GL_DEPTH_BIAS")))
36479 (math "(" "-" "∞" "," "∞" ")")))
36480 (entry (% (heading (code "GL_POST_COLOR_MATRIX_RED_SCALE")))
36487 (math "(" "-" "∞" "," "∞" ")")))
36489 (code "GL_POST_COLOR_MATRIX_GREEN_SCALE")))
36496 (math "(" "-" "∞" "," "∞" ")")))
36498 (code "GL_POST_COLOR_MATRIX_BLUE_SCALE")))
36505 (math "(" "-" "∞" "," "∞" ")")))
36507 (code "GL_POST_COLOR_MATRIX_ALPHA_SCALE")))
36514 (math "(" "-" "∞" "," "∞" ")")))
36515 (entry (% (heading (code "GL_POST_COLOR_MATRIX_RED_BIAS")))
36522 (math "(" "-" "∞" "," "∞" ")")))
36524 (code "GL_POST_COLOR_MATRIX_GREEN_BIAS")))
36531 (math "(" "-" "∞" "," "∞" ")")))
36532 (entry (% (heading (code "GL_POST_COLOR_MATRIX_BLUE_BIAS")))
36539 (math "(" "-" "∞" "," "∞" ")")))
36541 (code "GL_POST_COLOR_MATRIX_ALPHA_BIAS")))
36548 (math "(" "-" "∞" "," "∞" ")")))
36549 (entry (% (heading (code "GL_POST_CONVOLUTION_RED_SCALE")))
36556 (math "(" "-" "∞" "," "∞" ")")))
36558 (code "GL_POST_CONVOLUTION_GREEN_SCALE")))
36565 (math "(" "-" "∞" "," "∞" ")")))
36566 (entry (% (heading (code "GL_POST_CONVOLUTION_BLUE_SCALE")))
36573 (math "(" "-" "∞" "," "∞" ")")))
36575 (code "GL_POST_CONVOLUTION_ALPHA_SCALE")))
36582 (math "(" "-" "∞" "," "∞" ")")))
36583 (entry (% (heading (code "GL_POST_CONVOLUTION_RED_BIAS")))
36590 (math "(" "-" "∞" "," "∞" ")")))
36591 (entry (% (heading (code "GL_POST_CONVOLUTION_GREEN_BIAS")))
36598 (math "(" "-" "∞" "," "∞" ")")))
36599 (entry (% (heading (code "GL_POST_CONVOLUTION_BLUE_BIAS")))
36606 (math "(" "-" "∞" "," "∞" ")")))
36607 (entry (% (heading (code "GL_POST_CONVOLUTION_ALPHA_BIAS")))
36614 (math "(" "-" "∞" "," "∞" ")"))))
36615 (para (code "glPixelTransferf")
36616 " can be used to set any pixel transfer parameter.
36617 If the parameter type is boolean,
36618 0 implies false and any other value implies true.
36621 " is an integer parameter, "
36623 " is rounded to the nearest integer. ")
36626 (code "glPixelTransferi")
36627 " can be used to set any of the
36628 pixel transfer parameters.
36629 Boolean parameters are set to false if "
36631 " is 0 and to true otherwise. "
36633 " is converted to floating point before being assigned to real-valued parameters. ")
36635 (para (code "GL_INVALID_ENUM")
36636 " is generated if "
36638 " is not an accepted value. ")
36639 (para (code "GL_INVALID_OPERATION")
36640 " is generated if "
36641 (code "glPixelTransfer")
36643 is executed between the execution of "
36646 and the corresponding execution of "
36650 (define-gl-procedure
36655 (funcdef "void " (function "glPixelZoom"))
36656 (paramdef "GLfloat " (parameter "xfactor"))
36657 (paramdef "GLfloat " (parameter "yfactor"))))
36659 (heading "specify the pixel zoom factors")
36660 (heading "Parameters")
36661 (table (% (formatter (asis)))
36662 (entry (% (heading (var "xfactor")))
36663 (itemx (var "yfactor"))
36671 zoom factors for pixel write operations. ")))
36672 (heading "Description")
36673 (para (code "glPixelZoom")
36674 " specifies values for the "
36681 During the execution of "
36682 (code "glDrawPixels")
36684 (code "glCopyPixels")
36692 is the current raster position,
36693 and a given element is in the "
36699 column of the pixel rectangle,
36700 then pixels whose centers are in the rectangle with corners at ")
36740 are candidates for replacement.
36741 Any pixel whose center lies on the bottom or left edge of this rectangular
36742 region is also modified. ")
36744 Pixel zoom factors are not limited to positive values.
36745 Negative zoom factors reflect the resulting image about the current
36746 raster position. ")
36748 (para (code "GL_INVALID_OPERATION")
36749 " is generated if "
36750 (code "glPixelZoom")
36752 is executed between the execution of "
36755 and the corresponding execution of "
36759 (define-gl-procedure
36764 (funcdef "void " (function "glPointParameterf"))
36765 (paramdef "GLenum " (parameter "pname"))
36766 (paramdef "GLfloat " (parameter "param"))))
36768 (heading "specify point parameters")
36769 (heading "Parameters")
36770 (table (% (formatter (asis)))
36771 (entry (% (heading (var "pname")))
36773 Specifies a single-valued point parameter. "
36774 (code "GL_POINT_SIZE_MIN")
36776 (code "GL_POINT_SIZE_MAX")
36778 (code "GL_POINT_FADE_THRESHOLD_SIZE")
36780 (code "GL_POINT_SPRITE_COORD_ORIGIN")
36783 (entry (% (heading (var "param")))
36785 Specifies the value that "
36787 " will be set to. ")))
36788 (heading "Description")
36790 The following values are accepted for "
36793 (table (% (formatter (asis)))
36794 (entry (% (heading (code "GL_POINT_SIZE_MIN")))
36796 (para (var "params")
36797 " is a single floating-point value that specifies the minimum point size. The default value is 0.0. "))
36798 (entry (% (heading (code "GL_POINT_SIZE_MAX")))
36800 (para (var "params")
36801 " is a single floating-point value that specifies the maximum point size. The default value is 1.0. "))
36802 (entry (% (heading (code "GL_POINT_FADE_THRESHOLD_SIZE")))
36804 (para (var "params")
36805 " is a single floating-point value that specifies the threshold value
36806 to which point sizes are clamped if they exceed the specified value. The
36807 default value is 1.0. "))
36808 (entry (% (heading (code "GL_POINT_DISTANCE_ATTENUATION")))
36810 (para (var "params")
36811 " is an array of three floating-point values that specify the
36812 coefficients used for scaling the computed point size. The default values
36814 (math "(" "1" "," "0" "0" ")")
36816 (entry (% (heading (code "GL_POINT_SPRITE_COORD_ORIGIN")))
36818 (para (var "params")
36819 " is a single enum specifying the point sprite texture coordinate origin, either "
36820 (code "GL_LOWER_LEFT")
36822 (code "GL_UPPER_LEFT")
36824 The default value is "
36825 (code "GL_UPPER_LEFT")
36828 (para (code "GL_INVALID_VALUE")
36829 " is generated If the value specified for "
36830 (code "GL_POINT_SIZE_MIN")
36832 (code "GL_POINT_SIZE_MAX")
36834 (code "GL_POINT_FADE_THRESHOLD_SIZE")
36835 " is less than zero. ")
36836 (para (code "GL_INVALID_ENUM")
36837 " is generated If the value specified for "
36838 (code "GL_POINT_SPRITE_COORD_ORIGIN")
36840 (code "GL_LOWER_LEFT")
36842 (code "GL_UPPER_LEFT")
36846 (code "GL_POINT_SIZE_MIN")
36847 " is greater than "
36848 (code "GL_POINT_SIZE_MAX")
36849 ", the point size after clamping is undefined, but no
36850 error is generated. ")
36853 (define-gl-procedure
36858 (funcdef "void " (function "glPointSize"))
36859 (paramdef "GLfloat " (parameter "size"))))
36862 "specify the diameter of rasterized points")
36863 (heading "Parameters")
36864 (table (% (formatter (asis)))
36865 (entry (% (heading (var "size")))
36867 Specifies the diameter of rasterized points.
36868 The initial value is 1. ")))
36869 (heading "Description")
36870 (para (code "glPointSize")
36871 " specifies the rasterized diameter of both aliased and antialiased
36872 points. Using a point size other than 1 has different effects, depending
36873 on whether point antialiasing is enabled. To enable and disable point
36874 antialiasing, call "
36879 (code "GL_POINT_SMOOTH")
36880 ". Point antialiasing is initially disabled. ")
36882 The specified point size is multiplied with a distance attenuation factor
36883 and clamped to the specified point size range, and further clamped to the
36884 implementation-dependent point size range to produce the derived point size
36886 (para (math (var "pointSize")
36919 is the eye-coordinate distance from the eye to the vertex, and "
36927 are the distance attenuation coefficients (see "
36928 (code "glPointParameter")
36931 If multisampling is disabled, the computed point size is used as the
36934 If multisampling is enabled, the point may be faded by modifying the point
36936 (code "glSampleCoverage")
36937 ") instead of allowing the point width
36938 to go below a given threshold (see "
36939 (code "glPointParameter")
36941 the width is further modified in the following manner: ")
36942 (para (math (var "pointWidth")
36964 The point alpha value is modified by computing: ")
36965 (para (math (var "pointAlpha")
36994 If point antialiasing is disabled, the actual size is determined by
36995 rounding the supplied size to the nearest integer. (If the rounding
36996 results in the value 0, it is as if the point size were 1.) If the rounded
36997 size is odd, then the center point
37003 of the pixel fragment
37004 that represents the point is computed as ")
37028 subscripts indicate window coordinates. All pixels that lie
37029 within the square grid of the rounded size centered at
37036 up the fragment. If the size is even, the center point is ")
37057 and the rasterized fragment's centers are the half-integer window
37058 coordinates within the square of the rounded size centered at "
37059 (math "(" (var "x") "," (var "y") ")")
37061 All pixel fragments produced in rasterizing a nonantialiased point are
37062 assigned the same associated data, that of the vertex corresponding to the
37065 If antialiasing is enabled, then point rasterization produces a fragment
37066 for each pixel square that intersects the region lying within the circle
37067 having diameter equal to the current point size and centered at the point's "
37078 The coverage value for each fragment is the
37079 window coordinate area of the intersection of the circular region with the
37080 corresponding pixel square. This value is saved and used in the final
37081 rasterization step. The data associated with each fragment is the data
37082 associated with the point being rasterized. ")
37084 Not all sizes are supported when point antialiasing is enabled. If an
37085 unsupported size is requested, the nearest supported size is used. Only
37086 size 1 is guaranteed to be supported; others depend on the implementation.
37087 To query the range of supported sizes and the size difference between
37088 supported sizes within the range, call "
37091 (code "GL_SMOOTH_POINT_SIZE_RANGE")
37093 (code "GL_SMOOTH_POINT_SIZE_GRANULARITY")
37095 For aliased points, query the supported ranges and granularity with "
37098 (code "GL_ALIASED_POINT_SIZE_RANGE")
37101 (para (code "GL_INVALID_VALUE")
37102 " is generated if "
37104 " is less than or equal to 0. ")
37105 (para (code "GL_INVALID_OPERATION")
37106 " is generated if "
37107 (code "glPointSize")
37109 is executed between the execution of "
37112 and the corresponding execution of "
37116 (define-gl-procedure
37121 (funcdef "void " (function "glPolygonMode"))
37122 (paramdef "GLenum " (parameter "face"))
37123 (paramdef "GLenum " (parameter "mode"))))
37125 (heading "select a polygon rasterization mode")
37126 (heading "Parameters")
37127 (table (% (formatter (asis)))
37128 (entry (% (heading (var "face")))
37130 Specifies the polygons that "
37135 " for front-facing polygons, "
37137 " for back-facing polygons,
37139 (code "GL_FRONT_AND_BACK")
37140 " for front- and back-facing polygons. "))
37141 (entry (% (heading (var "mode")))
37143 Specifies how polygons will be rasterized.
37144 Accepted values are "
37151 The initial value is "
37153 " for both front- and back-facing polygons. ")))
37154 (heading "Description")
37155 (para (code "glPolygonMode")
37156 " controls the interpretation of polygons for rasterization. "
37158 " describes which polygons "
37161 front-facing polygons ("
37164 back-facing polygons ("
37168 (code "GL_FRONT_AND_BACK")
37170 The polygon mode affects only the final rasterization of polygons.
37172 a polygon's vertices are lit and
37173 the polygon is clipped and possibly culled before these modes are applied. ")
37175 Three modes are defined and can be specified in "
37178 (table (% (formatter (asis)))
37179 (entry (% (heading (code "GL_POINT")))
37181 Polygon vertices that are marked as the start of a boundary edge
37182 are drawn as points.
37183 Point attributes such as "
37184 (code "GL_POINT_SIZE")
37186 (code "GL_POINT_SMOOTH")
37188 the rasterization of the points.
37189 Polygon rasterization attributes other than "
37190 (code "GL_POLYGON_MODE")
37191 " have no effect. "))
37192 (entry (% (heading (code "GL_LINE")))
37194 Boundary edges of the polygon are drawn as line segments.
37195 They are treated as connected line segments for line stippling;
37196 the line stipple counter and pattern are not reset between segments
37198 (code "glLineStipple")
37200 Line attributes such as "
37201 (code "GL_LINE_WIDTH")
37203 (code "GL_LINE_SMOOTH")
37205 the rasterization of the lines.
37206 Polygon rasterization attributes other than "
37207 (code "GL_POLYGON_MODE")
37208 " have no effect. "))
37209 (entry (% (heading (code "GL_FILL")))
37211 The interior of the polygon is filled.
37212 Polygon attributes such as "
37213 (code "GL_POLYGON_STIPPLE")
37215 (code "GL_POLYGON_SMOOTH")
37216 " control the rasterization of the polygon. ")))
37218 (para (code "GL_INVALID_ENUM")
37219 " is generated if either "
37224 an accepted value. ")
37225 (para (code "GL_INVALID_OPERATION")
37226 " is generated if "
37227 (code "glPolygonMode")
37229 is executed between the execution of "
37232 and the corresponding execution of "
37236 (define-gl-procedure
37241 (funcdef "void " (function "glPolygonOffset"))
37242 (paramdef "GLfloat " (parameter "factor"))
37243 (paramdef "GLfloat " (parameter "units"))))
37246 "set the scale and units used to calculate depth values")
37247 (heading "Parameters")
37248 (table (% (formatter (asis)))
37249 (entry (% (heading (var "factor")))
37251 Specifies a scale factor that is used to create a variable
37252 depth offset for each polygon. The initial value is 0. "))
37253 (entry (% (heading (var "units")))
37255 Is multiplied by an implementation-specific value to
37256 create a constant depth offset. The initial value is 0. ")))
37257 (heading "Description")
37260 (code "GL_POLYGON_OFFSET_FILL")
37262 (code "GL_POLYGON_OFFSET_LINE")
37264 (code "GL_POLYGON_OFFSET_POINT")
37268 " value will be offset after it is interpolated
37271 " values of the appropriate vertices.
37272 The value of the offset is "
37273 (math (var "factor")
37284 is a measurement of the change in depth relative to the screen
37285 area of the polygon, and "
37288 is the smallest value that is guaranteed to
37289 produce a resolvable offset for a given implementation.
37290 The offset is added before the depth test is performed and before
37291 the value is written into the depth buffer. ")
37292 (para (code "glPolygonOffset")
37293 " is useful for rendering hidden-line images, for applying decals
37294 to surfaces, and for rendering solids with highlighted edges. ")
37296 (para (code "GL_INVALID_OPERATION")
37297 " is generated if "
37298 (code "glPolygonOffset")
37300 between the execution of "
37302 " and the corresponding
37307 (define-gl-procedure
37312 (funcdef "void " (function "glPolygonStipple"))
37315 (parameter "pattern"))))
37317 (heading "set the polygon stippling pattern")
37318 (heading "Parameters")
37319 (table (% (formatter (asis)))
37320 (entry (% (heading (var "pattern")))
37322 Specifies a pointer to a "
37323 (math "32" "×" "32")
37325 stipple pattern that will be unpacked
37326 from memory in the same way that "
37327 (code "glDrawPixels")
37328 " unpacks pixels. ")))
37329 (heading "Description")
37332 like line stippling
37334 (code "glLineStipple")
37336 masks out certain fragments produced by rasterization,
37337 creating a pattern.
37338 Stippling is independent of polygon antialiasing. ")
37339 (para (var "pattern")
37340 " is a pointer to a "
37341 (math "32" "×" "32")
37343 stipple pattern that is stored
37344 in memory just like the pixel data supplied to a "
37345 (code "glDrawPixels")
37354 both equal to 32, a pixel format
37356 (code "GL_COLOR_INDEX")
37362 the stipple pattern is represented as a "
37363 (math "32" "×" "32")
37366 of 1-bit color indices packed in unsigned bytes. "
37367 (code "glPixelStore")
37368 " parameters like "
37369 (code "GL_UNPACK_SWAP_BYTES")
37372 (code "GL_UNPACK_LSB_FIRST")
37373 " affect the assembling of the bits into a
37375 Pixel transfer operations
37376 (shift, offset, pixel map)
37377 are not applied to the stipple image,
37380 If a non-zero named buffer object is bound to the "
37381 (code "GL_PIXEL_UNPACK_BUFFER")
37384 (code "glBindBuffer")
37385 ") while a stipple pattern is
37388 " is treated as a byte offset into the buffer object's data store. ")
37390 To enable and disable polygon stippling, call "
37396 (code "GL_POLYGON_STIPPLE")
37397 ". Polygon stippling is initially
37398 disabled. If it's enabled,
37399 a rasterized polygon fragment with window coordinates "
37400 (math (var "x") "_" (var "w"))
37403 (math (var "y") "_" (var "w"))
37405 is sent to the next stage of the GL if and only if the
37407 (math (var "x") "_" (var "w") "%" "32")
37411 (math (var "y") "_" (var "w") "%" "32")
37414 of the stipple pattern is 1 (one).
37415 When polygon stippling is disabled, it is as if the stipple pattern
37416 consists of all 1's. ")
37418 (para (code "GL_INVALID_OPERATION")
37419 " is generated if a non-zero buffer object name is bound to the "
37420 (code "GL_PIXEL_UNPACK_BUFFER")
37421 " target and the buffer object's data store is currently mapped. ")
37422 (para (code "GL_INVALID_OPERATION")
37423 " is generated if a non-zero buffer object name is bound to the "
37424 (code "GL_PIXEL_UNPACK_BUFFER")
37425 " target and the data would be unpacked from the buffer
37426 object such that the memory reads required would exceed the data store size. ")
37427 (para (code "GL_INVALID_OPERATION")
37428 " is generated if "
37429 (code "glPolygonStipple")
37431 is executed between the execution of "
37434 and the corresponding execution of "
37438 (define-gl-procedure
37439 glPrioritizeTextures
37440 "glPrioritizeTextures"
37445 (function "glPrioritizeTextures"))
37446 (paramdef "GLsizei " (parameter "n"))
37449 (parameter "textures"))
37451 "const GLclampf * "
37452 (parameter "priorities"))))
37454 (heading "set texture residence priority")
37455 (heading "Parameters")
37456 (table (% (formatter (asis)))
37457 (entry (% (heading (var "n")))
37459 Specifies the number of textures to be prioritized. "))
37460 (entry (% (heading (var "textures")))
37462 Specifies an array containing the names of the textures to be prioritized. "))
37463 (entry (% (heading (var "priorities")))
37465 Specifies an array containing the texture priorities.
37466 A priority given in an element of "
37468 " applies to the texture
37469 named by the corresponding element of "
37472 (heading "Description")
37473 (para (code "glPrioritizeTextures")
37476 " texture priorities given in "
37480 " textures named in "
37485 a ``working set'' of textures that are resident in texture memory.
37486 These textures may be bound to a texture target much more efficiently
37487 than textures that are not resident.
37488 By specifying a priority for each texture, "
37489 (code "glPrioritizeTextures")
37490 " allows applications to guide the GL implementation in determining
37491 which textures should be resident. ")
37493 The priorities given in "
37495 " are clamped to the range "
37496 (math "[" "0" "," "1" "]")
37498 before they are assigned.
37499 0 indicates the lowest priority; textures with priority 0
37500 are least likely to be resident.
37501 1 indicates the highest priority; textures with priority 1
37502 are most likely to be resident.
37503 However, textures are not guaranteed to be resident until they are used. ")
37504 (para (code "glPrioritizeTextures")
37505 " silently ignores attempts to prioritize texture 0 or any texture
37506 name that does not correspond to an existing texture. ")
37507 (para (code "glPrioritizeTextures")
37508 " does not require that any of the textures named by "
37511 be bound to a texture target. "
37512 (code "glTexParameter")
37513 " may also be used to set a texture's priority,
37514 but only if the texture is currently bound.
37515 This is the only way to set the priority of a default texture. ")
37517 (para (code "GL_INVALID_VALUE")
37518 " is generated if "
37521 (para (code "GL_INVALID_OPERATION")
37522 " is generated if "
37523 (code "glPrioritizeTextures")
37525 between the execution of "
37527 " and the corresponding
37532 (define-gl-procedure
37537 (funcdef "void " (function "glPushAttrib"))
37538 (paramdef "GLbitfield " (parameter "mask"))))
37541 "push and pop the server attribute stack")
37542 (heading "Parameters")
37543 (table (% (formatter (asis)))
37544 (entry (% (heading (var "mask")))
37546 Specifies a mask that indicates which attributes to save. Values for "
37548 " are listed below. ")))
37549 (heading "Description")
37550 (para (code "glPushAttrib")
37551 " takes one argument,
37552 a mask that indicates which groups of state variables
37553 to save on the attribute stack.
37554 Symbolic constants are used to set bits in the mask. "
37557 is typically constructed by specifying the bitwise-or of several
37558 of these constants together.
37560 (code "GL_ALL_ATTRIB_BITS")
37562 can be used to save all stackable states. ")
37564 The symbolic mask constants and their associated GL state are as follows
37565 (the second column lists which attributes are saved): ")
37567 (table (% (formatter (asis)))
37568 (entry (% (heading (code "GL_ACCUM_BUFFER_BIT")))
37570 Accumulation buffer clear value "))
37571 (entry (% (heading (code "GL_COLOR_BUFFER_BIT")))
37572 (para (code "GL_ALPHA_TEST") " enable bit "))
37573 (entry (% (heading))
37575 Alpha test function and reference value "))
37576 (entry (% (heading))
37577 (para (code "GL_BLEND") " enable bit "))
37578 (entry (% (heading))
37580 Blending source and destination functions "))
37581 (entry (% (heading))
37583 Constant blend color "))
37584 (entry (% (heading))
37586 Blending equation "))
37587 (entry (% (heading))
37588 (para (code "GL_DITHER") " enable bit "))
37589 (entry (% (heading))
37590 (para (code "GL_DRAW_BUFFER") " setting "))
37591 (entry (% (heading))
37592 (para (code "GL_COLOR_LOGIC_OP") " enable bit "))
37593 (entry (% (heading))
37594 (para (code "GL_INDEX_LOGIC_OP") " enable bit "))
37595 (entry (% (heading))
37597 Logic op function "))
37598 (entry (% (heading))
37600 Color mode and index mode clear values "))
37601 (entry (% (heading))
37603 Color mode and index mode writemasks "))
37604 (entry (% (heading (code "GL_CURRENT_BIT")))
37606 Current RGBA color "))
37607 (entry (% (heading))
37609 Current color index "))
37610 (entry (% (heading))
37612 Current normal vector "))
37613 (entry (% (heading))
37615 Current texture coordinates "))
37616 (entry (% (heading))
37618 Current raster position "))
37619 (entry (% (heading))
37620 (para (code "GL_CURRENT_RASTER_POSITION_VALID")
37622 (entry (% (heading))
37624 RGBA color associated with current raster position "))
37625 (entry (% (heading))
37627 Color index associated with current raster position "))
37628 (entry (% (heading))
37630 Texture coordinates associated with current raster position "))
37631 (entry (% (heading))
37632 (para (code "GL_EDGE_FLAG") " flag "))
37633 (entry (% (heading (code "GL_DEPTH_BUFFER_BIT")))
37634 (para (code "GL_DEPTH_TEST") " enable bit "))
37635 (entry (% (heading))
37637 Depth buffer test function "))
37638 (entry (% (heading))
37640 Depth buffer clear value "))
37641 (entry (% (heading))
37642 (para (code "GL_DEPTH_WRITEMASK") " enable bit "))
37643 (entry (% (heading (code "GL_ENABLE_BIT")))
37644 (para (code "GL_ALPHA_TEST") " flag "))
37645 (entry (% (heading))
37646 (para (code "GL_AUTO_NORMAL") " flag "))
37647 (entry (% (heading))
37648 (para (code "GL_BLEND") " flag "))
37649 (entry (% (heading))
37651 Enable bits for the user-definable clipping planes "))
37652 (entry (% (heading))
37653 (para (code "GL_COLOR_MATERIAL")))
37654 (entry (% (heading))
37655 (para (code "GL_CULL_FACE") " flag "))
37656 (entry (% (heading))
37657 (para (code "GL_DEPTH_TEST") " flag "))
37658 (entry (% (heading))
37659 (para (code "GL_DITHER") " flag "))
37660 (entry (% (heading))
37661 (para (code "GL_FOG") " flag "))
37662 (entry (% (heading))
37663 (para (code "GL_LIGHT")
37671 (code "GL_MAX_LIGHTS")))
37672 (entry (% (heading))
37673 (para (code "GL_LIGHTING") " flag "))
37674 (entry (% (heading))
37675 (para (code "GL_LINE_SMOOTH") " flag "))
37676 (entry (% (heading))
37677 (para (code "GL_LINE_STIPPLE") " flag "))
37678 (entry (% (heading))
37679 (para (code "GL_COLOR_LOGIC_OP") " flag "))
37680 (entry (% (heading))
37681 (para (code "GL_INDEX_LOGIC_OP") " flag "))
37682 (entry (% (heading))
37683 (para (code "GL_MAP1_")
37687 " is a map type "))
37688 (entry (% (heading))
37689 (para (code "GL_MAP2_")
37693 " is a map type "))
37694 (entry (% (heading))
37695 (para (code "GL_MULTISAMPLE") " flag "))
37696 (entry (% (heading))
37697 (para (code "GL_NORMALIZE") " flag "))
37698 (entry (% (heading))
37699 (para (code "GL_POINT_SMOOTH") " flag "))
37700 (entry (% (heading))
37701 (para (code "GL_POLYGON_OFFSET_LINE") " flag "))
37702 (entry (% (heading))
37703 (para (code "GL_POLYGON_OFFSET_FILL") " flag "))
37704 (entry (% (heading))
37705 (para (code "GL_POLYGON_OFFSET_POINT") " flag "))
37706 (entry (% (heading))
37707 (para (code "GL_POLYGON_SMOOTH") " flag "))
37708 (entry (% (heading))
37709 (para (code "GL_POLYGON_STIPPLE") " flag "))
37710 (entry (% (heading))
37711 (para (code "GL_SAMPLE_ALPHA_TO_COVERAGE")
37713 (entry (% (heading))
37714 (para (code "GL_SAMPLE_ALPHA_TO_ONE") " flag "))
37715 (entry (% (heading))
37716 (para (code "GL_SAMPLE_COVERAGE") " flag "))
37717 (entry (% (heading))
37718 (para (code "GL_SCISSOR_TEST") " flag "))
37719 (entry (% (heading))
37720 (para (code "GL_STENCIL_TEST") " flag "))
37721 (entry (% (heading))
37722 (para (code "GL_TEXTURE_1D") " flag "))
37723 (entry (% (heading))
37724 (para (code "GL_TEXTURE_2D") " flag "))
37725 (entry (% (heading))
37726 (para (code "GL_TEXTURE_3D") " flag "))
37727 (entry (% (heading))
37730 (code "GL_TEXTURE_GEN_")
37734 " is S, T, R, or Q "))
37735 (entry (% (heading (code "GL_EVAL_BIT")))
37736 (para (code "GL_MAP1_")
37738 " enable bits, where "
37740 " is a map type "))
37741 (entry (% (heading))
37742 (para (code "GL_MAP2_")
37744 " enable bits, where "
37746 " is a map type "))
37747 (entry (% (heading))
37749 1D grid endpoints and divisions "))
37750 (entry (% (heading))
37752 2D grid endpoints and divisions "))
37753 (entry (% (heading))
37754 (para (code "GL_AUTO_NORMAL") " enable bit "))
37755 (entry (% (heading (code "GL_FOG_BIT")))
37756 (para (code "GL_FOG") " enable bit "))
37757 (entry (% (heading)) (para "
37759 (entry (% (heading)) (para "
37761 (entry (% (heading)) (para "
37762 Linear fog start "))
37763 (entry (% (heading)) (para "
37765 (entry (% (heading)) (para "
37767 (entry (% (heading))
37768 (para (code "GL_FOG_MODE") " value "))
37769 (entry (% (heading (code "GL_HINT_BIT")))
37770 (para (code "GL_PERSPECTIVE_CORRECTION_HINT")
37772 (entry (% (heading))
37773 (para (code "GL_POINT_SMOOTH_HINT") " setting "))
37774 (entry (% (heading))
37775 (para (code "GL_LINE_SMOOTH_HINT") " setting "))
37776 (entry (% (heading))
37777 (para (code "GL_POLYGON_SMOOTH_HINT")
37779 (entry (% (heading))
37780 (para (code "GL_FOG_HINT") " setting "))
37781 (entry (% (heading))
37782 (para (code "GL_GENERATE_MIPMAP_HINT")
37784 (entry (% (heading))
37785 (para (code "GL_TEXTURE_COMPRESSION_HINT")
37787 (entry (% (heading (code "GL_LIGHTING_BIT")))
37788 (para (code "GL_COLOR_MATERIAL") " enable bit "))
37789 (entry (% (heading))
37790 (para (code "GL_COLOR_MATERIAL_FACE") " value "))
37791 (entry (% (heading))
37793 Color material parameters that are tracking the current color "))
37794 (entry (% (heading))
37796 Ambient scene color "))
37797 (entry (% (heading))
37798 (para (code "GL_LIGHT_MODEL_LOCAL_VIEWER")
37800 (entry (% (heading))
37801 (para (code "GL_LIGHT_MODEL_TWO_SIDE")
37803 (entry (% (heading))
37804 (para (code "GL_LIGHTING") " enable bit "))
37805 (entry (% (heading))
37807 Enable bit for each light "))
37808 (entry (% (heading))
37810 Ambient, diffuse, and specular intensity for each light "))
37811 (entry (% (heading))
37813 Direction, position, exponent, and cutoff angle for each light "))
37814 (entry (% (heading))
37816 Constant, linear, and quadratic attenuation factors for each light "))
37817 (entry (% (heading))
37819 Ambient, diffuse, specular, and emissive color for each material "))
37820 (entry (% (heading))
37822 Ambient, diffuse, and specular color indices for each material "))
37823 (entry (% (heading))
37825 Specular exponent for each material "))
37826 (entry (% (heading))
37827 (para (code "GL_SHADE_MODEL") " setting "))
37828 (entry (% (heading (code "GL_LINE_BIT")))
37829 (para (code "GL_LINE_SMOOTH") " flag "))
37830 (entry (% (heading))
37831 (para (code "GL_LINE_STIPPLE") " enable bit "))
37832 (entry (% (heading))
37834 Line stipple pattern and repeat counter "))
37835 (entry (% (heading)) (para "
37837 (entry (% (heading (code "GL_LIST_BIT")))
37838 (para (code "GL_LIST_BASE") " setting "))
37839 (entry (% (heading (code "GL_MULTISAMPLE_BIT")))
37840 (para (code "GL_MULTISAMPLE") " flag "))
37841 (entry (% (heading))
37842 (para (code "GL_SAMPLE_ALPHA_TO_COVERAGE")
37844 (entry (% (heading))
37845 (para (code "GL_SAMPLE_ALPHA_TO_ONE") " flag "))
37846 (entry (% (heading))
37847 (para (code "GL_SAMPLE_COVERAGE") " flag "))
37848 (entry (% (heading))
37849 (para (code "GL_SAMPLE_COVERAGE_VALUE")
37851 (entry (% (heading))
37852 (para (code "GL_SAMPLE_COVERAGE_INVERT")
37854 (entry (% (heading (code "GL_PIXEL_MODE_BIT")))
37855 (para (code "GL_RED_BIAS")
37857 (code "GL_RED_SCALE")
37859 (entry (% (heading))
37860 (para (code "GL_GREEN_BIAS")
37862 (code "GL_GREEN_SCALE")
37864 (entry (% (heading))
37865 (para (code "GL_BLUE_BIAS")
37867 (code "GL_BLUE_SCALE")))
37868 (entry (% (heading))
37869 (para (code "GL_ALPHA_BIAS")
37871 (code "GL_ALPHA_SCALE")))
37872 (entry (% (heading))
37873 (para (code "GL_DEPTH_BIAS")
37875 (code "GL_DEPTH_SCALE")))
37876 (entry (% (heading))
37877 (para (code "GL_INDEX_OFFSET")
37879 (code "GL_INDEX_SHIFT")
37881 (entry (% (heading))
37882 (para (code "GL_MAP_COLOR")
37884 (code "GL_MAP_STENCIL")
37886 (entry (% (heading))
37887 (para (code "GL_ZOOM_X")
37891 (entry (% (heading))
37892 (para (code "GL_READ_BUFFER") " setting "))
37893 (entry (% (heading (code "GL_POINT_BIT")))
37894 (para (code "GL_POINT_SMOOTH") " flag "))
37895 (entry (% (heading)) (para "
37897 (entry (% (heading (code "GL_POLYGON_BIT")))
37898 (para (code "GL_CULL_FACE") " enable bit "))
37899 (entry (% (heading))
37900 (para (code "GL_CULL_FACE_MODE") " value "))
37901 (entry (% (heading))
37902 (para (code "GL_FRONT_FACE") " indicator "))
37903 (entry (% (heading))
37904 (para (code "GL_POLYGON_MODE") " setting "))
37905 (entry (% (heading))
37906 (para (code "GL_POLYGON_SMOOTH") " flag "))
37907 (entry (% (heading))
37908 (para (code "GL_POLYGON_STIPPLE") " enable bit "))
37909 (entry (% (heading))
37910 (para (code "GL_POLYGON_OFFSET_FILL") " flag "))
37911 (entry (% (heading))
37912 (para (code "GL_POLYGON_OFFSET_LINE") " flag "))
37913 (entry (% (heading))
37914 (para (code "GL_POLYGON_OFFSET_POINT") " flag "))
37915 (entry (% (heading))
37916 (para (code "GL_POLYGON_OFFSET_FACTOR")))
37917 (entry (% (heading))
37918 (para (code "GL_POLYGON_OFFSET_UNITS")))
37919 (entry (% (heading (code "GL_POLYGON_STIPPLE_BIT")))
37921 Polygon stipple image "))
37922 (entry (% (heading (code "GL_SCISSOR_BIT")))
37923 (para (code "GL_SCISSOR_TEST") " flag "))
37924 (entry (% (heading)) (para "
37926 (entry (% (heading (code "GL_STENCIL_BUFFER_BIT")))
37927 (para (code "GL_STENCIL_TEST") " enable bit "))
37928 (entry (% (heading))
37930 Stencil function and reference value "))
37931 (entry (% (heading))
37933 Stencil value mask "))
37934 (entry (% (heading))
37936 Stencil fail, pass, and depth buffer pass actions "))
37937 (entry (% (heading))
37939 Stencil buffer clear value "))
37940 (entry (% (heading))
37942 Stencil buffer writemask "))
37943 (entry (% (heading (code "GL_TEXTURE_BIT")))
37945 Enable bits for the four texture coordinates "))
37946 (entry (% (heading))
37948 Border color for each texture image "))
37949 (entry (% (heading))
37951 Minification function for each texture image "))
37952 (entry (% (heading))
37954 Magnification function for each texture image "))
37955 (entry (% (heading))
37957 Texture coordinates and wrap mode for each texture image "))
37958 (entry (% (heading))
37960 Color and mode for each texture environment "))
37961 (entry (% (heading))
37964 (code "GL_TEXTURE_GEN_")
37968 " is S, T, R, and Q "))
37969 (entry (% (heading))
37970 (para (code "GL_TEXTURE_GEN_MODE")
37971 " setting for S, T, R, and Q "))
37972 (entry (% (heading))
37973 (para (code "glTexGen")
37974 " plane equations for S, T, R, and Q "))
37975 (entry (% (heading))
37977 Current texture bindings (for example, "
37978 (code "GL_TEXTURE_BINDING_2D")
37980 (entry (% (heading (code "GL_TRANSFORM_BIT")))
37982 Coefficients of the six clipping planes "))
37983 (entry (% (heading))
37985 Enable bits for the user-definable clipping planes "))
37986 (entry (% (heading))
37987 (para (code "GL_MATRIX_MODE") " value "))
37988 (entry (% (heading))
37989 (para (code "GL_NORMALIZE") " flag "))
37990 (entry (% (heading))
37991 (para (code "GL_RESCALE_NORMAL") " flag "))
37992 (entry (% (heading (code "GL_VIEWPORT_BIT")))
37994 Depth range (near and far) "))
37995 (entry (% (heading))
37997 Viewport origin and extent ")))
37998 (para (code "glPopAttrib")
37999 " restores the values of the state variables saved with the last "
38000 (code "glPushAttrib")
38002 Those not saved are left unchanged. ")
38004 It is an error to push attributes onto a full stack
38005 or to pop attributes off an empty stack.
38006 In either case, the error flag is set
38007 and no other change is made to GL state. ")
38009 Initially, the attribute stack is empty. ")
38011 (para (code "GL_STACK_OVERFLOW")
38012 " is generated if "
38013 (code "glPushAttrib")
38015 the attribute stack is full. ")
38016 (para (code "GL_STACK_UNDERFLOW")
38017 " is generated if "
38018 (code "glPopAttrib")
38020 the attribute stack is empty. ")
38021 (para (code "GL_INVALID_OPERATION")
38022 " is generated if "
38023 (code "glPushAttrib")
38025 (code "glPopAttrib")
38027 is executed between the execution of "
38030 and the corresponding execution of "
38034 (define-gl-procedure
38036 "glPushClientAttrib"
38039 (funcdef "void " (function "glPushClientAttrib"))
38040 (paramdef "GLbitfield " (parameter "mask"))))
38043 "push and pop the client attribute stack")
38044 (heading "Parameters")
38045 (table (% (formatter (asis)))
38046 (entry (% (heading (var "mask")))
38048 Specifies a mask that indicates which attributes to save. Values for "
38050 " are listed below. ")))
38051 (heading "Description")
38052 (para (code "glPushClientAttrib")
38053 " takes one argument,
38054 a mask that indicates which groups of client-state variables
38055 to save on the client attribute stack.
38056 Symbolic constants are used to set bits in the mask. "
38059 is typically constructed by specifying the bitwise-or of several
38060 \t of these constants together.
38062 (code "GL_CLIENT_ALL_ATTRIB_BITS")
38064 can be used to save all stackable client state. ")
38066 The symbolic mask constants and their associated GL client state are as follows
38067 (the second column lists which attributes are saved): ")
38068 (para (code "GL_CLIENT_PIXEL_STORE_BIT")
38069 "\tPixel storage modes "
38070 (code "GL_CLIENT_VERTEX_ARRAY_BIT")
38071 "\tVertex arrays (and enables) ")
38072 (para (code "glPopClientAttrib")
38073 " restores the values of the client-state variables
38074 saved with the last "
38075 (code "glPushClientAttrib")
38077 Those not saved are left unchanged. ")
38079 It is an error to push attributes onto a full client attribute stack
38080 or to pop attributes off an empty stack.
38081 In either case, the error flag is set,
38082 and no other change is made to GL state. ")
38084 Initially, the client attribute stack is empty. ")
38086 (para (code "GL_STACK_OVERFLOW")
38087 " is generated if "
38088 (code "glPushClientAttrib")
38090 the attribute stack is full. ")
38091 (para (code "GL_STACK_UNDERFLOW")
38092 " is generated if "
38093 (code "glPopClientAttrib")
38095 the attribute stack is empty. ")))
38097 (define-gl-procedure
38102 (funcdef "void " (function "glPushMatrix"))
38103 (paramdef (parameter "void"))))
38105 (heading "push and pop the current matrix stack")
38106 (heading "Description")
38108 There is a stack of matrices for each of the matrix modes.
38110 (code "GL_MODELVIEW")
38112 the stack depth is at least 32.
38113 In the other modes, "
38116 (code "GL_PROJECTION")
38118 (code "GL_TEXTURE")
38120 the depth is at least 2.
38121 The current matrix in any mode is the matrix on the top of the stack
38123 (para (code "glPushMatrix")
38124 " pushes the current matrix stack down by one,
38125 duplicating the current matrix.
38128 (code "glPushMatrix")
38130 the matrix on top of the stack is identical to the one below it. ")
38131 (para (code "glPopMatrix")
38132 " pops the current matrix stack,
38133 replacing the current matrix with the one below it on the stack. ")
38135 Initially, each of the stacks contains one matrix, an identity matrix. ")
38137 It is an error to push a full matrix stack
38138 or to pop a matrix stack that contains only a single matrix.
38139 In either case, the error flag is set
38140 and no other change is made to GL state. ")
38142 (para (code "GL_STACK_OVERFLOW")
38143 " is generated if "
38144 (code "glPushMatrix")
38146 the current matrix stack is full. ")
38147 (para (code "GL_STACK_UNDERFLOW")
38148 " is generated if "
38149 (code "glPopMatrix")
38151 the current matrix stack contains only a single matrix. ")
38152 (para (code "GL_INVALID_OPERATION")
38153 " is generated if "
38154 (code "glPushMatrix")
38156 (code "glPopMatrix")
38158 is executed between the execution of "
38161 and the corresponding execution of "
38165 (define-gl-procedure
38170 (funcdef "void " (function "glPushName"))
38171 (paramdef "GLuint " (parameter "name"))))
38173 (heading "push and pop the name stack")
38174 (heading "Parameters")
38175 (table (% (formatter (asis)))
38176 (entry (% (heading (var "name")))
38178 Specifies a name that will be pushed onto the name stack. ")))
38179 (heading "Description")
38181 The name stack is used during selection mode to allow sets of rendering
38182 commands to be uniquely identified.
38183 It consists of an ordered set of unsigned integers and is initially empty. ")
38184 (para (code "glPushName")
38187 " to be pushed onto the name stack. "
38189 " pops one name off the top of the stack. ")
38191 The maximum name stack depth is implementation-dependent; call "
38192 (code "GL_MAX_NAME_STACK_DEPTH")
38193 " to find out the value for a particular
38194 implementation. It is an
38195 error to push a name onto a full stack
38196 or to pop a name off an empty stack.
38197 It is also an error to manipulate the name stack between the execution of "
38199 " and the corresponding execution of "
38202 In any of these cases, the error flag is set and no other change is
38203 made to GL state. ")
38205 The name stack is always empty while the render mode is not "
38209 (code "glPushName")
38212 " while the render mode is not "
38216 (para (code "GL_STACK_OVERFLOW")
38217 " is generated if "
38218 (code "glPushName")
38219 " is called while the
38220 name stack is full. ")
38221 (para (code "GL_STACK_UNDERFLOW")
38222 " is generated if "
38224 " is called while the
38225 name stack is empty. ")
38226 (para (code "GL_INVALID_OPERATION")
38227 " is generated if "
38228 (code "glPushName")
38232 is executed between a call to "
38234 " and the corresponding call to "
38238 (define-gl-procedure
38243 (funcdef "void " (function "glRasterPos2s"))
38244 (paramdef "GLshort " (parameter "x"))
38245 (paramdef "GLshort " (parameter "y"))))
38248 "specify the raster position for pixel operations")
38249 (heading "Parameters")
38250 (table (% (formatter (asis)))
38251 (entry (% (heading (var "x")))
38270 (heading "Description")
38272 The GL maintains a 3D position in window coordinates.
38274 called the raster position,
38275 is used to position pixel and bitmap write operations. It is
38276 maintained with subpixel accuracy.
38280 (code "glDrawPixels")
38282 (code "glCopyPixels")
38285 The current raster position consists of three window coordinates
38293 a clip coordinate value
38297 an eye coordinate distance,
38299 and associated color data and texture coordinates.
38303 coordinate is a clip coordinate,
38307 is not projected to window coordinates. "
38308 (code "glRasterPos4")
38309 " specifies object coordinates "
38320 (code "glRasterPos3")
38321 " specifies object coordinate "
38333 is implicitly set to 1. "
38334 (code "glRasterPos2")
38335 " uses the argument values for "
38342 implicitly setting "
38350 The object coordinates presented by "
38351 (code "glRasterPos")
38352 " are treated just like those
38356 They are transformed by the current modelview and projection matrices
38357 and passed to the clipping stage.
38358 If the vertex is not culled,
38359 then it is projected and scaled to window coordinates,
38360 which become the new current raster position,
38362 (code "GL_CURRENT_RASTER_POSITION_VALID")
38368 then the valid bit is cleared and the current raster position
38369 and associated color and texture coordinates are undefined. ")
38371 The current raster position also includes some associated color data
38372 and texture coordinates.
38373 If lighting is enabled,
38375 (code "GL_CURRENT_RASTER_COLOR")
38379 (code "GL_CURRENT_RASTER_INDEX")
38381 (in color index mode)
38382 is set to the color produced by the lighting calculation
38386 (code "glLightModel")
38388 (code "glShadeModel")
38390 If lighting is disabled,
38392 (in RGBA mode, state variable "
38393 (code "GL_CURRENT_COLOR")
38396 (in color index mode, state variable "
38397 (code "GL_CURRENT_INDEX")
38399 is used to update the current raster color. "
38400 (code "GL_CURRENT_RASTER_SECONDARY_COLOR")
38401 " (in RGBA mode) is likewise updated. ")
38404 (code "GL_CURRENT_RASTER_TEXTURE_COORDS")
38405 " is updated as a function
38407 (code "GL_CURRENT_TEXTURE_COORDS")
38409 based on the texture matrix and the texture generation functions
38414 the distance from the origin of the eye coordinate system to the
38415 vertex as transformed by only the modelview matrix replaces "
38416 (code "GL_CURRENT_RASTER_DISTANCE")
38419 Initially, the current raster position is (0, 0, 0, 1),
38420 the current raster distance is 0,
38421 the valid bit is set,
38422 the associated RGBA color is (1, 1, 1, 1),
38423 the associated color index is 1,
38424 and the associated texture coordinates are (0, 0, 0, 1).
38426 (code "GL_CURRENT_RASTER_INDEX")
38428 in color index mode,
38429 the current raster RGBA color always maintains its initial value. ")
38431 (para (code "GL_INVALID_OPERATION")
38432 " is generated if "
38433 (code "glRasterPos")
38435 is executed between the execution of "
38438 and the corresponding execution of "
38442 (define-gl-procedure
38447 (funcdef "void " (function "glReadBuffer"))
38448 (paramdef "GLenum " (parameter "mode"))))
38451 "select a color buffer source for pixels")
38452 (heading "Parameters")
38453 (table (% (formatter (asis)))
38454 (entry (% (heading (var "mode")))
38456 Specifies a color buffer.
38457 Accepted values are "
38458 (code "GL_FRONT_LEFT")
38460 (code "GL_FRONT_RIGHT")
38462 (code "GL_BACK_LEFT")
38464 (code "GL_BACK_RIGHT")
38479 " is between 0 and the value of "
38480 (code "GL_AUX_BUFFERS")
38482 (heading "Description")
38483 (para (code "glReadBuffer")
38484 " specifies a color buffer as the source for subsequent "
38485 (code "glReadPixels")
38487 (code "glCopyTexImage1D")
38489 (code "glCopyTexImage2D")
38491 (code "glCopyTexSubImage1D")
38493 (code "glCopyTexSubImage2D")
38495 (code "glCopyTexSubImage3D")
38497 (code "glCopyPixels")
38500 " accepts one of twelve or more predefined values.
38505 " are always defined.)
38506 In a fully configured system, "
38511 (code "GL_FRONT_LEFT")
38512 " all name the front left buffer, "
38513 (code "GL_FRONT_RIGHT")
38516 " name the front right buffer, and "
38517 (code "GL_BACK_LEFT")
38520 " name the back left buffer. ")
38522 Nonstereo double-buffered configurations have only a front left and a
38524 Single-buffered configurations have a front left and a front right
38525 buffer if stereo, and only a front left buffer if nonstereo.
38526 It is an error to specify a nonexistent buffer to "
38527 (code "glReadBuffer")
38532 " in single-buffered configurations
38535 " in double-buffered configurations. ")
38537 (para (code "GL_INVALID_ENUM")
38538 " is generated if "
38540 " is not one of the twelve
38541 (or more) accepted values. ")
38542 (para (code "GL_INVALID_OPERATION")
38543 " is generated if "
38545 " specifies a buffer
38546 that does not exist. ")
38547 (para (code "GL_INVALID_OPERATION")
38548 " is generated if "
38549 (code "glReadBuffer")
38551 is executed between the execution of "
38554 and the corresponding execution of "
38558 (define-gl-procedure
38563 (funcdef "void " (function "glReadPixels"))
38564 (paramdef "GLint " (parameter "x"))
38565 (paramdef "GLint " (parameter "y"))
38566 (paramdef "GLsizei " (parameter "width"))
38567 (paramdef "GLsizei " (parameter "height"))
38568 (paramdef "GLenum " (parameter "format"))
38569 (paramdef "GLenum " (parameter "type"))
38570 (paramdef "GLvoid * " (parameter "data"))))
38573 "read a block of pixels from the frame buffer")
38574 (heading "Parameters")
38575 (table (% (formatter (asis)))
38576 (entry (% (heading (var "x")))
38579 Specify the window coordinates of the first pixel
38580 that is read from the frame buffer.
38581 This location is the lower left corner of a rectangular block of pixels. "))
38582 (entry (% (heading (var "width")))
38583 (itemx (var "height"))
38585 Specify the dimensions of the pixel rectangle. "
38589 " of one correspond to a single pixel. "))
38590 (entry (% (heading (var "format")))
38592 Specifies the format of the pixel data.
38593 The following symbolic values are accepted: "
38594 (code "GL_COLOR_INDEX")
38596 (code "GL_STENCIL_INDEX")
38598 (code "GL_DEPTH_COMPONENT")
38616 (code "GL_LUMINANCE")
38618 (code "GL_LUMINANCE_ALPHA")
38620 (entry (% (heading (var "type")))
38622 Specifies the data type of the pixel data.
38624 (code "GL_UNSIGNED_BYTE")
38630 (code "GL_UNSIGNED_SHORT")
38634 (code "GL_UNSIGNED_INT")
38640 (code "GL_UNSIGNED_BYTE_3_3_2")
38642 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
38644 (code "GL_UNSIGNED_SHORT_5_6_5")
38646 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
38648 (code "GL_UNSIGNED_SHORT_4_4_4_4")
38650 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
38652 (code "GL_UNSIGNED_SHORT_5_5_5_1")
38654 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
38656 (code "GL_UNSIGNED_INT_8_8_8_8")
38658 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
38660 (code "GL_UNSIGNED_INT_10_10_10_2")
38662 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
38664 (entry (% (heading (var "data")))
38666 Returns the pixel data. ")))
38667 (heading "Description")
38668 (para (code "glReadPixels")
38669 " returns pixel data from the frame buffer,
38670 starting with the pixel whose lower left corner
38676 into client memory starting at location "
38679 Several parameters control the processing of the pixel data before
38680 it is placed into client memory.
38681 These parameters are set with three commands: "
38682 (code "glPixelStore")
38684 (code "glPixelTransfer")
38686 (code "glPixelMap")
38688 This reference page describes the effects on "
38689 (code "glReadPixels")
38691 but not all of the parameters specified by these three commands. ")
38693 If a non-zero named buffer object is bound to the "
38694 (code "GL_PIXEL_PACK_BUFFER")
38697 (code "glBindBuffer")
38698 ") while a block of pixels is
38701 " is treated as a byte offset into the buffer object's data store
38702 rather than a pointer to client memory. ")
38705 (code "ARB_imaging")
38706 " extension is supported, the pixel data may
38707 be processed by additional operations including color table lookup,
38708 color matrix transformations, convolutions, histograms, and minimum and
38709 maximum pixel value computations. ")
38710 (para (code "glReadPixels")
38711 " returns values from each pixel with lower left corner at "
38723 (math "0" "<=" (var "i") "<" (var "width"))
38726 (math "0" "<=" (var "j") "<" (var "height"))
38728 This pixel is said to be the "
38735 Pixels are returned in row order from the lowest to the highest row,
38736 left to right in each row. ")
38737 (para (var "format")
38738 " specifies the format for the returned pixel values;
38739 accepted values are: ")
38740 (table (% (formatter (asis)))
38741 (entry (% (heading (code "GL_COLOR_INDEX")))
38743 Color indices are read from the color buffer
38745 (code "glReadBuffer")
38747 Each index is converted to fixed point,
38748 shifted left or right depending on the value and sign of "
38749 (code "GL_INDEX_SHIFT")
38752 (code "GL_INDEX_OFFSET")
38755 (code "GL_MAP_COLOR")
38759 indices are replaced by their mappings in the table "
38760 (code "GL_PIXEL_MAP_I_TO_I")
38762 (entry (% (heading (code "GL_STENCIL_INDEX")))
38764 Stencil values are read from the stencil buffer.
38765 Each index is converted to fixed point,
38766 shifted left or right depending on the value and sign of "
38767 (code "GL_INDEX_SHIFT")
38770 (code "GL_INDEX_OFFSET")
38773 (code "GL_MAP_STENCIL")
38777 indices are replaced by their mappings in the table "
38778 (code "GL_PIXEL_MAP_S_TO_S")
38780 (entry (% (heading (code "GL_DEPTH_COMPONENT")))
38782 Depth values are read from the depth buffer.
38783 Each component is converted to floating point such that the minimum depth
38784 value maps to 0 and the maximum value maps to 1.
38785 Each component is then multiplied by "
38786 (code "GL_DEPTH_SCALE")
38789 (code "GL_DEPTH_BIAS")
38791 and finally clamped to the range "
38792 (math "[" "0" "," "1" "]")
38794 (entry (% (heading (code "GL_RED"))))
38795 (entry (% (heading (code "GL_GREEN"))))
38796 (entry (% (heading (code "GL_BLUE"))))
38797 (entry (% (heading (code "GL_ALPHA"))))
38798 (entry (% (heading (code "GL_RGB"))))
38799 (entry (% (heading (code "GL_BGR"))))
38800 (entry (% (heading (code "GL_RGBA"))))
38801 (entry (% (heading (code "GL_BGRA"))))
38802 (entry (% (heading (code "GL_LUMINANCE"))))
38803 (entry (% (heading (code "GL_LUMINANCE_ALPHA")))
38805 Processing differs depending on whether color buffers store color indices
38806 or RGBA color components.
38807 If color indices are stored,
38808 they are read from the color buffer selected by "
38809 (code "glReadBuffer")
38811 Each index is converted to fixed point,
38812 shifted left or right depending on the value and sign of "
38813 (code "GL_INDEX_SHIFT")
38816 (code "GL_INDEX_OFFSET")
38818 Indices are then replaced by the red,
38821 and alpha values obtained by indexing the tables "
38822 (code "GL_PIXEL_MAP_I_TO_R")
38824 (code "GL_PIXEL_MAP_I_TO_G")
38826 (code "GL_PIXEL_MAP_I_TO_B")
38828 (code "GL_PIXEL_MAP_I_TO_A")
38830 Each table must be of size "
38831 (math "2" "^" (var "n"))
38836 may be different for
38838 Before an index is used to look up a value in a table of
38840 (math "2" "^" (var "n"))
38842 it must be masked against "
38843 (math "2" "^" (var "n") "-" "1")
38846 If RGBA color components are stored in the color buffers,
38847 they are read from the color buffer selected by "
38848 (code "glReadBuffer")
38850 Each color component is converted to floating point such that zero intensity
38851 maps to 0.0 and full intensity maps to 1.0.
38852 Each component is then multiplied by "
38853 (code "GL_c_SCALE")
38860 " is RED, GREEN, BLUE, or ALPHA.
38863 (code "GL_MAP_COLOR")
38867 each component is clamped to the range "
38868 (math "[" "0" "," "1" "]")
38870 scaled to the size of its corresponding table, and is then
38871 replaced by its mapping in the table "
38872 (code "GL_PIXEL_MAP_c_TO_c")
38876 " is R, G, B, or A. ")
38878 Unneeded data is then discarded.
38881 " discards the green, blue, and alpha components,
38884 " discards only the alpha component. "
38885 (code "GL_LUMINANCE")
38886 " computes a single-component value as the sum of
38889 and blue components,
38891 (code "GL_LUMINANCE_ALPHA")
38893 while keeping alpha as a second value.
38894 The final values are clamped to the range "
38895 (math "[" "0" "," "1" "]")
38901 and lookup factors just described are all specified by "
38902 (code "glPixelTransfer")
38904 The lookup table contents themselves are specified by "
38905 (code "glPixelMap")
38908 Finally, the indices or components
38909 are converted to the proper format,
38916 (code "GL_COLOR_INDEX")
38918 (code "GL_STENCIL_INDEX")
38925 each index is masked with the mask value given in the following table.
38930 ", then each integer index is converted to
38931 single-precision floating-point format. ")
38952 (code "GL_LUMINANCE")
38954 (code "GL_LUMINANCE_ALPHA")
38960 each component is multiplied by the multiplier shown in the following table.
38963 ", then each component is passed as is
38964 (or converted to the client's single-precision floating-point format if
38965 it is different from the one used by the GL). ")
38967 (table (% (formatter (asis)))
38968 (entry (% (heading (var "type")))
38969 (para (strong "Index Mask")
38971 (strong "Component Conversion")))
38972 (entry (% (heading (code "GL_UNSIGNED_BYTE")))
38973 (para (math "2" "^" "8" "-" "1")
38985 (entry (% (heading (code "GL_BYTE")))
38986 (para (math "2" "^" "7" "-" "1")
39003 (entry (% (heading (code "GL_BITMAP")))
39004 (para (math "1") ", " (math "1")))
39005 (entry (% (heading (code "GL_UNSIGNED_SHORT")))
39006 (para (math "2" "^" "16" "-" "1")
39018 (entry (% (heading (code "GL_SHORT")))
39019 (para (math "2" "^" "15" "-" "1")
39036 (entry (% (heading (code "GL_UNSIGNED_INT")))
39037 (para (math "2" "^" "32" "-" "1")
39049 (entry (% (heading (code "GL_INT")))
39050 (para (math "2" "^" "31" "-" "1")
39067 (entry (% (heading (code "GL_FLOAT")))
39069 none " ", " (math (var "c")))))
39071 Return values are placed in memory as follows.
39075 (code "GL_COLOR_INDEX")
39077 (code "GL_STENCIL_INDEX")
39079 (code "GL_DEPTH_COMPONENT")
39089 (code "GL_LUMINANCE")
39091 a single value is returned and the data for the "
39098 is placed in location "
39111 " return three values, "
39115 " return four values,
39117 (code "GL_LUMINANCE_ALPHA")
39118 " returns two values for each pixel,
39119 with all values corresponding to a single pixel occupying contiguous space
39123 Storage parameters set by "
39124 (code "glPixelStore")
39127 (code "GL_PACK_LSB_FIRST")
39129 (code "GL_PACK_SWAP_BYTES")
39131 affect the way that data is written into memory.
39133 (code "glPixelStore")
39134 " for a description. ")
39136 (para (code "GL_INVALID_ENUM")
39137 " is generated if "
39143 (para (code "GL_INVALID_ENUM")
39144 " is generated if "
39152 (code "GL_COLOR_INDEX")
39154 (code "GL_STENCIL_INDEX")
39156 (para (code "GL_INVALID_VALUE")
39157 " is generated if either "
39162 (para (code "GL_INVALID_OPERATION")
39163 " is generated if "
39166 (code "GL_COLOR_INDEX")
39168 and the color buffers store RGBA color components. ")
39169 (para (code "GL_INVALID_OPERATION")
39170 " is generated if "
39173 (code "GL_STENCIL_INDEX")
39175 and there is no stencil buffer. ")
39176 (para (code "GL_INVALID_OPERATION")
39177 " is generated if "
39180 (code "GL_DEPTH_COMPONENT")
39182 and there is no depth buffer. ")
39183 (para (code "GL_INVALID_OPERATION")
39184 " is generated if "
39187 (code "GL_UNSIGNED_BYTE_3_3_2")
39189 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
39191 (code "GL_UNSIGNED_SHORT_5_6_5")
39193 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
39200 (para (code "GL_INVALID_OPERATION")
39201 " is generated if "
39204 (code "GL_UNSIGNED_SHORT_4_4_4_4")
39206 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
39208 (code "GL_UNSIGNED_SHORT_5_5_5_1")
39210 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
39212 (code "GL_UNSIGNED_INT_8_8_8_8")
39214 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
39216 (code "GL_UNSIGNED_INT_10_10_10_2")
39218 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
39233 (code "GL_UNSIGNED_BYTE_3_3_2")
39235 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
39237 (code "GL_UNSIGNED_SHORT_5_6_5")
39239 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
39241 (code "GL_UNSIGNED_SHORT_4_4_4_4")
39243 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
39245 (code "GL_UNSIGNED_SHORT_5_5_5_1")
39247 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
39249 (code "GL_UNSIGNED_INT_8_8_8_8")
39251 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
39253 (code "GL_UNSIGNED_INT_10_10_10_2")
39255 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
39256 " are available only if the GL version
39257 is 1.2 or greater. ")
39258 (para (code "GL_INVALID_OPERATION")
39259 " is generated if a non-zero buffer object name is bound to the "
39260 (code "GL_PIXEL_PACK_BUFFER")
39261 " target and the buffer object's data store is currently mapped. ")
39262 (para (code "GL_INVALID_OPERATION")
39263 " is generated if a non-zero buffer object name is bound to the "
39264 (code "GL_PIXEL_PACK_BUFFER")
39265 " target and the data would be packed to the buffer
39266 object such that the memory writes required would exceed the data store size. ")
39267 (para (code "GL_INVALID_OPERATION")
39268 " is generated if a non-zero buffer object name is bound to the "
39269 (code "GL_PIXEL_PACK_BUFFER")
39272 " is not evenly divisible
39273 into the number of bytes needed to store in memory a datum indicated by "
39276 (para (code "GL_INVALID_OPERATION")
39277 " is generated if "
39278 (code "glReadPixels")
39280 is executed between the execution of "
39283 and the corresponding execution of "
39287 (define-gl-procedure
39292 (funcdef "void " (function "glRectd"))
39293 (paramdef "GLdouble " (parameter "x1"))
39294 (paramdef "GLdouble " (parameter "y1"))
39295 (paramdef "GLdouble " (parameter "x2"))
39296 (paramdef "GLdouble " (parameter "y2"))))
39298 (heading "draw a rectangle")
39299 (heading "Parameters")
39300 (table (% (formatter (asis)))
39301 (entry (% (heading (var "x1")))
39304 Specify one vertex of a rectangle. "))
39305 (entry (% (heading (var "x2")))
39308 Specify the opposite vertex of the rectangle. ")))
39309 (heading "Description")
39310 (para (code "glRect")
39311 " supports efficient specification of rectangles as two corner points.
39313 rectangle command takes four arguments,
39314 organized either as two consecutive pairs of "
39315 (math "(" (var "x") "," (var "y") ")")
39318 or as two pointers to arrays,
39319 each containing an "
39320 (math "(" (var "x") "," (var "y") ")")
39323 The resulting rectangle is defined in the "
39324 (math (var "z") "=" "0")
39327 (para (code "glRect")
39337 is exactly equivalent to the following sequence: "
39339 Note that if the second vertex is above and to the right of the first vertex,
39340 the rectangle is constructed with a counterclockwise winding. ")
39344 (code "GL_POLYGON")
39368 (para (code "GL_INVALID_OPERATION")
39369 " is generated if "
39372 is executed between the execution of "
39375 and the corresponding execution of "
39379 (define-gl-procedure
39384 (funcdef "GLint " (function "glRenderMode"))
39385 (paramdef "GLenum " (parameter "mode"))))
39387 (heading "set rasterization mode")
39388 (heading "Parameters")
39389 (table (% (formatter (asis)))
39390 (entry (% (heading (var "mode")))
39392 Specifies the rasterization mode.
39393 Three values are accepted: "
39398 (code "GL_FEEDBACK")
39400 The initial value is "
39403 (heading "Description")
39404 (para (code "glRenderMode")
39405 " sets the rasterization mode.
39406 It takes one argument, "
39409 which can assume one of three predefined values: ")
39410 (table (% (formatter (asis)))
39411 (entry (% (heading (code "GL_RENDER")))
39413 Render mode. Primitives are rasterized,
39414 producing pixel fragments,
39415 which are written into the frame buffer.
39416 This is the normal mode
39417 and also the default mode. "))
39418 (entry (% (heading (code "GL_SELECT")))
39421 No pixel fragments are produced,
39422 and no change to the frame buffer contents is made.
39424 a record of the names of primitives that would have been drawn
39425 if the render mode had been "
39427 " is returned in a select buffer,
39428 which must be created (see "
39429 (code "glSelectBuffer")
39430 ") before selection mode
39432 (entry (% (heading (code "GL_FEEDBACK")))
39435 No pixel fragments are produced,
39436 and no change to the frame buffer contents is made.
39438 the coordinates and attributes of vertices that would have been drawn
39439 if the render mode had been "
39441 " is returned in a feedback buffer,
39442 which must be created (see "
39443 (code "glFeedbackBuffer")
39444 ") before feedback mode
39447 The return value of "
39448 (code "glRenderMode")
39449 " is determined by the render mode at the time "
39450 (code "glRenderMode")
39455 The values returned for the three render modes are as follows: ")
39456 (table (% (formatter (asis)))
39457 (entry (% (heading (code "GL_RENDER")))
39460 (entry (% (heading (code "GL_SELECT")))
39462 The number of hit records transferred to the select buffer. "))
39463 (entry (% (heading (code "GL_FEEDBACK")))
39465 The number of values (not vertices) transferred to the feedback buffer. ")))
39468 (code "glSelectBuffer")
39470 (code "glFeedbackBuffer")
39471 " reference pages for
39472 more details concerning selection and feedback operation. ")
39474 (para (code "GL_INVALID_ENUM")
39475 " is generated if "
39477 " is not one of the three
39478 accepted values. ")
39479 (para (code "GL_INVALID_OPERATION")
39480 " is generated if "
39481 (code "glSelectBuffer")
39483 while the render mode is "
39487 (code "glRenderMode")
39488 " is called with argument "
39491 (code "glSelectBuffer")
39492 " is called at least once. ")
39493 (para (code "GL_INVALID_OPERATION")
39494 " is generated if "
39495 (code "glFeedbackBuffer")
39497 while the render mode is "
39498 (code "GL_FEEDBACK")
39501 (code "glRenderMode")
39502 " is called with argument "
39503 (code "GL_FEEDBACK")
39505 (code "glFeedbackBuffer")
39506 " is called at least once. ")
39507 (para (code "GL_INVALID_OPERATION")
39508 " is generated if "
39509 (code "glRenderMode")
39511 is executed between the execution of "
39514 and the corresponding execution of "
39518 (define-gl-procedure
39523 (funcdef "void " (function "glResetHistogram"))
39524 (paramdef "GLenum " (parameter "target"))))
39526 (heading "reset histogram table entries to zero")
39527 (heading "Parameters")
39528 (table (% (formatter (asis)))
39529 (entry (% (heading (var "target")))
39531 Must be " (code "GL_HISTOGRAM") ". ")))
39532 (heading "Description")
39533 (para (code "glResetHistogram")
39534 " resets all the elements of the current histogram table to zero. ")
39536 (para (code "GL_INVALID_ENUM")
39537 " is generated if "
39540 (code "GL_HISTOGRAM")
39542 (para (code "GL_INVALID_OPERATION")
39543 " is generated if "
39544 (code "glResetHistogram")
39546 between the execution of "
39548 " and the corresponding
39553 (define-gl-procedure
39558 (funcdef "void " (function "glResetMinmax"))
39559 (paramdef "GLenum " (parameter "target"))))
39562 "reset minmax table entries to initial values")
39563 (heading "Parameters")
39564 (table (% (formatter (asis)))
39565 (entry (% (heading (var "target")))
39567 Must be " (code "GL_MINMAX") ". ")))
39568 (heading "Description")
39569 (para (code "glResetMinmax")
39570 " resets the elements of the current minmax table to their
39571 initial values: the ``maximum'' element receives the minimum possible
39572 component values, and the ``minimum'' element receives the maximum
39573 possible component values. ")
39575 (para (code "GL_INVALID_ENUM")
39576 " is generated if "
39581 (para (code "GL_INVALID_OPERATION")
39582 " is generated if "
39583 (code "glResetMinmax")
39585 between the execution of "
39587 " and the corresponding
39592 (define-gl-procedure
39597 (funcdef "void " (function "glRotated"))
39598 (paramdef "GLdouble " (parameter "angle"))
39599 (paramdef "GLdouble " (parameter "x"))
39600 (paramdef "GLdouble " (parameter "y"))
39601 (paramdef "GLdouble " (parameter "z"))))
39604 "multiply the current matrix by a rotation matrix")
39605 (heading "Parameters")
39606 (table (% (formatter (asis)))
39607 (entry (% (heading (var "angle")))
39609 Specifies the angle of rotation, in degrees. "))
39610 (entry (% (heading (var "x")))
39620 " coordinates of a vector, respectively. ")))
39621 (heading "Description")
39622 (para (code "glRotate")
39623 " produces a rotation of "
39627 (math "(" (var "x") "," (var "y") (var "z") ")")
39629 The current matrix (see "
39630 (code "glMatrixMode")
39631 ") is multiplied by a rotation
39632 matrix with the product
39633 replacing the current matrix, as if "
39634 (code "glMultMatrix")
39636 with the following matrix as its argument: ")
39825 will normalize this vector). ")
39829 If the matrix mode is either "
39830 (code "GL_MODELVIEW")
39832 (code "GL_PROJECTION")
39834 all objects drawn after "
39836 " is called are rotated.
39838 (code "glPushMatrix")
39840 (code "glPopMatrix")
39841 " to save and restore
39842 the unrotated coordinate system. ")
39844 (para (code "GL_INVALID_OPERATION")
39845 " is generated if "
39848 is executed between the execution of "
39851 and the corresponding execution of "
39855 (define-gl-procedure
39860 (funcdef "void " (function "glSampleCoverage"))
39861 (paramdef "GLclampf " (parameter "value"))
39862 (paramdef "GLboolean " (parameter "invert"))))
39865 "specify multisample coverage parameters")
39866 (heading "Parameters")
39867 (table (% (formatter (asis)))
39868 (entry (% (heading (var "value")))
39870 Specify a single floating-point sample coverage value. The value is
39871 clamped to the range "
39872 (math "[" "0" "," "1" "]")
39874 The initial value is 1.0. "))
39875 (entry (% (heading (var "invert")))
39877 Specify a single boolean value representing if the coverage masks should be
39882 " are accepted. The initial value
39886 (heading "Description")
39888 Multisampling samples a pixel multiple times at various
39889 implementation-dependent subpixel locations to generate antialiasing
39890 effects. Multisampling transparently antialiases points, lines, polygons,
39891 bitmaps, and images if it is enabled. ")
39892 (para (var "value")
39893 " is used in constructing a temporary mask used in determining which
39894 samples will be used in resolving the final fragment color. This mask is
39895 bitwise-anded with the coverage mask generated from the multisampling
39896 computation. If the "
39898 " flag is set, the temporary mask is inverted
39899 (all bits flipped) and then the bitwise-and is computed. ")
39901 If an implementation does not have any multisample buffers available, or
39902 multisampling is disabled, rasterization occurs with only a single sample
39903 computing a pixel's final RGB color. ")
39905 Provided an implementation supports multisample buffers, and multisampling
39906 is enabled, then a pixel's final color is generated by combining several
39907 samples per pixel. Each sample contains color, depth, and stencil
39908 information, allowing those operations to be performed on each sample. ")
39910 (para (code "GL_INVALID_OPERATION")
39911 " is generated if "
39912 (code "glSampleCoverage")
39913 " is executed between the
39916 " and the corresponding execution of "
39920 (define-gl-procedure
39925 (funcdef "void " (function "glScaled"))
39926 (paramdef "GLdouble " (parameter "x"))
39927 (paramdef "GLdouble " (parameter "y"))
39928 (paramdef "GLdouble " (parameter "z"))))
39931 "multiply the current matrix by a general scaling matrix")
39932 (heading "Parameters")
39933 (table (% (formatter (asis)))
39934 (entry (% (heading (var "x")))
39938 Specify scale factors along the "
39944 " axes, respectively. ")))
39945 (heading "Description")
39946 (para (code "glScale")
39947 " produces a nonuniform scaling along the "
39954 The three parameters indicate the desired scale factor along
39955 each of the three axes. ")
39959 (code "glMatrixMode")
39961 is multiplied by this scale matrix,
39962 and the product replaces the current matrix
39964 (code "glMultMatrix")
39965 " were called with the following matrix
39966 as its argument: ")
40010 If the matrix mode is either "
40011 (code "GL_MODELVIEW")
40013 (code "GL_PROJECTION")
40015 all objects drawn after "
40017 " is called are scaled. ")
40020 (code "glPushMatrix")
40022 (code "glPopMatrix")
40023 " to save and restore
40024 the unscaled coordinate
40027 (para (code "GL_INVALID_OPERATION")
40028 " is generated if "
40031 is executed between the execution of "
40034 and the corresponding execution of "
40038 (define-gl-procedure
40043 (funcdef "void " (function "glScissor"))
40044 (paramdef "GLint " (parameter "x"))
40045 (paramdef "GLint " (parameter "y"))
40046 (paramdef "GLsizei " (parameter "width"))
40047 (paramdef "GLsizei " (parameter "height"))))
40049 (heading "define the scissor box")
40050 (heading "Parameters")
40051 (table (% (formatter (asis)))
40052 (entry (% (heading (var "x")))
40055 Specify the lower left corner of the scissor box.
40056 Initially (0, 0). "))
40057 (entry (% (heading (var "width")))
40058 (itemx (var "height"))
40060 Specify the width and height of the scissor box.
40061 When a GL context is first attached to a window, "
40065 " are set to the dimensions of that
40067 (heading "Description")
40068 (para (code "glScissor")
40069 " defines a rectangle, called the scissor box,
40070 in window coordinates.
40071 The first two arguments, "
40076 specify the lower left corner of the box. "
40080 " specify the width and height of the box. ")
40082 To enable and disable the scissor test, call "
40087 (code "GL_SCISSOR_TEST")
40088 ". The test is initially disabled.
40089 While the test is enabled, only pixels that lie within the scissor box
40090 can be modified by drawing commands.
40091 Window coordinates have integer values at the shared corners of
40092 frame buffer pixels. "
40093 (code "glScissor(0,0,1,1)")
40094 " allows modification of only the lower left
40095 pixel in the window, and "
40096 (code "glScissor(0,0,0,0)")
40098 modification of any pixels in the window. ")
40100 When the scissor test is disabled,
40101 it is as though the scissor box includes the entire window. ")
40103 (para (code "GL_INVALID_VALUE")
40104 " is generated if either "
40109 (para (code "GL_INVALID_OPERATION")
40110 " is generated if "
40113 is executed between the execution of "
40116 and the corresponding execution of "
40120 (define-gl-procedure
40121 glSecondaryColorPointer
40122 "glSecondaryColorPointer"
40127 (function "glSecondaryColorPointer"))
40128 (paramdef "GLint " (parameter "size"))
40129 (paramdef "GLenum " (parameter "type"))
40130 (paramdef "GLsizei " (parameter "stride"))
40133 (parameter "pointer"))))
40135 (heading "define an array of secondary colors")
40136 (heading "Parameters")
40137 (table (% (formatter (asis)))
40138 (entry (% (heading (var "size")))
40140 Specifies the number of components per color. Must be 3. "))
40141 (entry (% (heading (var "type")))
40143 Specifies the data type of each color component in the array.
40144 Symbolic constants "
40147 (code "GL_UNSIGNED_BYTE")
40151 (code "GL_UNSIGNED_SHORT")
40155 (code "GL_UNSIGNED_INT")
40163 The initial value is "
40166 (entry (% (heading (var "stride")))
40168 Specifies the byte offset between consecutive colors.
40171 " is 0, the colors are understood to be
40172 tightly packed in the array. The initial value is 0. "))
40173 (entry (% (heading (var "pointer")))
40175 Specifies a pointer to the first component of the first color element
40176 in the array. The initial value is 0. ")))
40177 (heading "Description")
40178 (para (code "glSecondaryColorPointer")
40179 " specifies the location and data format of an array of color components
40180 to use when rendering. "
40182 " specifies the number of components per color, and must be 3. "
40184 " specifies the data type of each color component, and "
40187 specifies the byte stride from one color to the next, allowing vertices and
40188 attributes to be packed into a single array or stored in separate arrays. ")
40190 If a non-zero named buffer object is bound to the "
40191 (code "GL_ARRAY_BUFFER")
40194 (code "glBindBuffer")
40195 ") while a secondary color array is
40198 " is treated as a byte offset into the buffer object's data store.
40199 Also, the buffer object binding ("
40200 (code "GL_ARRAY_BUFFER_BINDING")
40201 ") is saved as secondary color vertex array
40202 client-side state ("
40203 (code "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING")
40206 When a secondary color array is specified, "
40214 " are saved as client-side
40215 state, in addition to the current vertex array buffer object binding. ")
40217 To enable and disable the secondary color array, call "
40218 (code "glEnableClientState")
40220 (code "glDisableClientState")
40221 " with the argument "
40222 (code "GL_SECONDARY_COLOR_ARRAY")
40223 ". If enabled, the secondary color array is used when "
40224 (code "glArrayElement")
40226 (code "glDrawArrays")
40228 (code "glMultiDrawArrays")
40230 (code "glDrawElements")
40232 (code "glMultiDrawElements")
40234 (code "glDrawRangeElements")
40238 (para (code "GL_INVALID_VALUE")
40239 " is generated if "
40242 (para (code "GL_INVALID_ENUM")
40243 " is generated if "
40245 " is not an accepted value. ")
40246 (para (code "GL_INVALID_VALUE")
40247 " is generated if "
40249 " is negative. ")))
40251 (define-gl-procedure
40256 (funcdef "void " (function "glSecondaryColor3b"))
40257 (paramdef "GLbyte " (parameter "red"))
40258 (paramdef "GLbyte " (parameter "green"))
40259 (paramdef "GLbyte " (parameter "blue"))))
40261 (heading "set the current secondary color")
40262 (heading "Parameters")
40263 (table (% (formatter (asis)))
40264 (entry (% (heading (var "red")))
40265 (itemx (var "green"))
40266 (itemx (var "blue"))
40268 Specify new red, green, and blue values for the current secondary color. ")))
40269 (heading "Description")
40271 The GL stores both a primary four-valued RGBA color and a
40272 secondary four-valued RGBA color (where alpha is always set to 0.0) that is
40273 associated with every vertex. ")
40275 The secondary color is interpolated and applied to each fragment during
40276 rasterization when "
40277 (code "GL_COLOR_SUM")
40278 " is enabled. When lighting is enabled,
40280 (code "GL_SEPARATE_SPECULAR_COLOR")
40281 " is specified, the value of the
40282 secondary color is assigned the value computed from the specular term of
40283 the lighting computation. Both the primary and secondary current colors are
40284 applied to each fragment, regardless of the state of "
40285 (code "GL_COLOR_SUM")
40287 under such conditions. When "
40288 (code "GL_SEPARATE_SPECULAR_COLOR")
40290 the value returned from querying the current secondary color is undefined. ")
40291 (para (code "glSecondaryColor3b")
40293 (code "glSecondaryColor3s")
40295 (code "glSecondaryColor3i")
40296 " take three signed byte, short, or long integers as
40299 " is appended to the name, the color commands can
40300 take a pointer to an array of such values. ")
40302 Color values are stored in floating-point format, with
40303 unspecified mantissa and exponent sizes. Unsigned integer color
40304 components, when specified, are linearly mapped to floating-point values
40305 such that the largest representable value maps to 1.0 (full intensity), and
40306 0 maps to 0.0 (zero intensity). Signed integer color components, when
40307 specified, are linearly mapped to floating-point values such that the most
40308 positive representable value maps to 1.0, and the most negative
40309 representable value maps to "
40312 (Note that this mapping does not convert
40313 0 precisely to 0.0). Floating-point values are mapped directly. ")
40315 Neither floating-point nor signed integer values are clamped to the range "
40316 (math "[" "0" "," "1" "]")
40318 before the current color is updated. However, color components are
40319 clamped to this range before they are interpolated or written into a color
40322 (define-gl-procedure
40327 (funcdef "void " (function "glSelectBuffer"))
40328 (paramdef "GLsizei " (parameter "size"))
40329 (paramdef "GLuint * " (parameter "buffer"))))
40332 "establish a buffer for selection mode values")
40333 (heading "Parameters")
40334 (table (% (formatter (asis)))
40335 (entry (% (heading (var "size")))
40337 Specifies the size of "
40340 (entry (% (heading (var "buffer")))
40342 Returns the selection data. ")))
40343 (heading "Description")
40344 (para (code "glSelectBuffer")
40345 " has two arguments: "
40347 " is a pointer to an array of unsigned integers,
40350 " indicates the size of the array. "
40352 " returns values from the name stack
40354 (code "glInitNames")
40356 (code "glLoadName")
40358 (code "glPushName")
40360 when the rendering mode is "
40363 (code "glRenderMode")
40365 (code "glSelectBuffer")
40366 " must be issued before selection mode is enabled,
40367 and it must not be issued while the rendering mode is "
40371 A programmer can use selection to determine which primitives
40372 are drawn into some region of a window.
40373 The region is defined by the current modelview and perspective matrices. ")
40375 In selection mode, no pixel fragments are produced from rasterization.
40377 if a primitive or a raster position intersects the clipping
40378 volume defined by the viewing frustum
40379 and the user-defined clipping planes,
40380 this primitive causes a selection hit.
40381 (With polygons, no hit occurs if the polygon is culled.)
40382 When a change is made to the name stack,
40384 (code "glRenderMode")
40386 a hit record is copied to "
40388 " if any hits have occurred since the
40390 (name stack change or "
40391 (code "glRenderMode")
40393 The hit record consists of the number of names in the name stack at the
40394 time of the event, followed by the minimum and maximum depth values
40395 of all vertices that hit since the previous event,
40396 followed by the name stack contents,
40397 bottom name first. ")
40399 Depth values (which are in the range [0,1]) are multiplied by "
40400 (math "2" "^" "32" "-" "1")
40402 before being placed in the hit record. ")
40404 An internal index into "
40406 " is reset to 0 whenever selection mode
40408 Each time a hit record is copied into "
40411 the index is incremented to point to the cell just past the end
40412 of the block of names\\(emthat is, to the next available cell
40413 If the hit record is larger than the number of remaining locations in "
40416 as much data as can fit is copied,
40417 and the overflow flag is set.
40418 If the name stack is empty when a hit record is copied,
40419 that record consists of 0 followed by the minimum and maximum depth values. ")
40421 To exit selection mode, call "
40422 (code "glRenderMode")
40428 (code "glRenderMode")
40429 " is called while the render mode is "
40432 it returns the number of hit records copied to "
40435 resets the overflow flag and the selection buffer pointer,
40436 and initializes the name stack to be empty.
40437 If the overflow bit was set when "
40438 (code "glRenderMode")
40440 a negative hit record count is returned. ")
40442 (para (code "GL_INVALID_VALUE")
40443 " is generated if "
40446 (para (code "GL_INVALID_OPERATION")
40447 " is generated if "
40448 (code "glSelectBuffer")
40449 " is called while the
40454 (code "glRenderMode")
40455 " is called with argument "
40458 (code "glSelectBuffer")
40459 " is called at least once. ")
40460 (para (code "GL_INVALID_OPERATION")
40461 " is generated if "
40462 (code "glSelectBuffer")
40464 is executed between the execution of "
40467 and the corresponding execution of "
40471 (define-gl-procedure
40472 glSeparableFilter2D
40473 "glSeparableFilter2D"
40478 (function "glSeparableFilter2D"))
40479 (paramdef "GLenum " (parameter "target"))
40480 (paramdef "GLenum " (parameter "internalformat"))
40481 (paramdef "GLsizei " (parameter "width"))
40482 (paramdef "GLsizei " (parameter "height"))
40483 (paramdef "GLenum " (parameter "format"))
40484 (paramdef "GLenum " (parameter "type"))
40485 (paramdef "const GLvoid * " (parameter "row"))
40486 (paramdef "const GLvoid * " (parameter "column"))))
40489 "define a separable two-dimensional convolution filter")
40490 (heading "Parameters")
40491 (table (% (formatter (asis)))
40492 (entry (% (heading (var "target")))
40494 Must be " (code "GL_SEPARABLE_2D") ". "))
40495 (entry (% (heading (var "internalformat")))
40497 The internal format of the convolution filter kernel.
40498 The allowable values are "
40505 (code "GL_ALPHA12")
40507 (code "GL_ALPHA16")
40509 (code "GL_LUMINANCE")
40511 (code "GL_LUMINANCE4")
40513 (code "GL_LUMINANCE8")
40515 (code "GL_LUMINANCE12")
40517 (code "GL_LUMINANCE16")
40519 (code "GL_LUMINANCE_ALPHA")
40521 (code "GL_LUMINANCE4_ALPHA4")
40523 (code "GL_LUMINANCE6_ALPHA2")
40525 (code "GL_LUMINANCE8_ALPHA8")
40527 (code "GL_LUMINANCE12_ALPHA4")
40529 (code "GL_LUMINANCE12_ALPHA12")
40531 (code "GL_LUMINANCE16_ALPHA16")
40533 (code "GL_INTENSITY")
40535 (code "GL_INTENSITY4")
40537 (code "GL_INTENSITY8")
40539 (code "GL_INTENSITY12")
40541 (code "GL_INTENSITY16")
40543 (code "GL_R3_G3_B2")
40565 (code "GL_RGB5_A1")
40569 (code "GL_RGB10_A2")
40575 (entry (% (heading (var "width")))
40577 The number of elements in the pixel array referenced by "
40580 (This is the width of the separable filter kernel.) "))
40581 (entry (% (heading (var "height")))
40583 The number of elements in the pixel array referenced by "
40586 (This is the height of the separable filter kernel.) "))
40587 (entry (% (heading (var "format")))
40589 The format of the pixel data in "
40594 The allowable values are "
40611 (code "GL_INTENSITY")
40613 (code "GL_LUMINANCE")
40615 (code "GL_LUMINANCE_ALPHA")
40617 (entry (% (heading (var "type")))
40619 The type of the pixel data in "
40624 Symbolic constants "
40625 (code "GL_UNSIGNED_BYTE")
40631 (code "GL_UNSIGNED_SHORT")
40635 (code "GL_UNSIGNED_INT")
40641 (code "GL_UNSIGNED_BYTE_3_3_2")
40643 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
40645 (code "GL_UNSIGNED_SHORT_5_6_5")
40647 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
40649 (code "GL_UNSIGNED_SHORT_4_4_4_4")
40651 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
40653 (code "GL_UNSIGNED_SHORT_5_5_5_1")
40655 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
40657 (code "GL_UNSIGNED_INT_8_8_8_8")
40659 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
40661 (code "GL_UNSIGNED_INT_10_10_10_2")
40663 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
40666 (entry (% (heading (var "row")))
40668 Pointer to a one-dimensional array of pixel data that is processed to
40669 build the row filter kernel. "))
40670 (entry (% (heading (var "column")))
40672 Pointer to a one-dimensional array of pixel data that is processed to
40673 build the column filter kernel. ")))
40674 (heading "Description")
40675 (para (code "glSeparableFilter2D")
40676 " builds a two-dimensional separable convolution filter kernel from
40677 two arrays of pixels. ")
40679 The pixel arrays specified by ("
40696 ") are processed just as if
40697 they had been passed to "
40698 (code "glDrawPixels")
40700 but processing stops after the final expansion to RGBA is completed. ")
40702 If a non-zero named buffer object is bound to the "
40703 (code "GL_PIXEL_UNPACK_BUFFER")
40706 (code "glBindBuffer")
40707 ") while a convolution filter is
40712 " are treated as byte offsets into the buffer object's data store. ")
40714 Next, the R, G, B, and A components of all pixels in both arrays are scaled
40715 by the four separable 2D "
40716 (code "GL_CONVOLUTION_FILTER_SCALE")
40718 biased by the four separable 2D "
40719 (code "GL_CONVOLUTION_FILTER_BIAS")
40721 (The scale and bias parameters are set by "
40722 (code "glConvolutionParameter")
40725 (code "GL_SEPARABLE_2D")
40726 " target and the names "
40727 (code "GL_CONVOLUTION_FILTER_SCALE")
40729 (code "GL_CONVOLUTION_FILTER_BIAS")
40731 The parameters themselves are vectors of four values that are applied to red,
40732 green, blue, and alpha, in that order.)
40733 The R, G, B, and A values are not clamped to [0,1] at any time during this
40736 Each pixel is then converted to the internal format specified by "
40737 (var "internalformat")
40739 This conversion simply maps the component values of the pixel (R, G, B,
40740 and A) to the values included in the internal format (red, green, blue,
40741 alpha, luminance, and intensity). The mapping is as follows: ")
40742 (table (% (formatter (asis)))
40743 (entry (% (heading (strong "Internal Format")))
40744 (para (strong "Red")
40752 (strong "Luminance")
40754 (strong "Intensity")))
40755 (entry (% (heading (code "GL_LUMINANCE")))
40756 (para ", " ", " ", " ", " "
40758 (entry (% (heading (code "GL_LUMINANCE_ALPHA")))
40759 (para ", " ", " ", " "
40762 (entry (% (heading (code "GL_INTENSITY")))
40763 (para ", " ", " ", " ", " ", " "
40765 (entry (% (heading (code "GL_RGB")))
40769 B " ", " ", " ", "))
40770 (entry (% (heading (code "GL_RGBA")))
40785 The red, green, blue, alpha, luminance, and/or intensity components of
40786 the resulting pixels are stored in floating-point rather than integer
40788 They form two one-dimensional filter kernel images.
40789 The row image is indexed by coordinate "
40791 " starting at zero and
40792 increasing from left to right.
40793 Each location in the row image is derived from element "
40798 The column image is indexed by coordinate "
40801 and increasing from bottom to top.
40802 Each location in the column image is derived from element "
40808 Note that after a convolution is performed, the resulting color
40809 components are also scaled by their corresponding "
40810 (code "GL_POST_CONVOLUTION_c_SCALE")
40811 " parameters and biased by their
40813 (code "GL_POST_CONVOLUTION_c_BIAS")
40814 " parameters (where "
40816 " takes on the values "
40825 These parameters are set by "
40826 (code "glPixelTransfer")
40829 (para (code "GL_INVALID_ENUM")
40830 " is generated if "
40833 (code "GL_SEPARABLE_2D")
40835 (para (code "GL_INVALID_ENUM")
40836 " is generated if "
40837 (var "internalformat")
40838 " is not one of the
40839 allowable values. ")
40840 (para (code "GL_INVALID_ENUM")
40841 " is generated if "
40843 " is not one of the allowable
40845 (para (code "GL_INVALID_ENUM")
40846 " is generated if "
40848 " is not one of the allowable
40850 (para (code "GL_INVALID_VALUE")
40851 " is generated if "
40853 " is less than zero or greater
40854 than the maximum supported value.
40855 This value may be queried with "
40856 (code "glGetConvolutionParameter")
40859 (code "GL_SEPARABLE_2D")
40861 (code "GL_MAX_CONVOLUTION_WIDTH")
40863 (para (code "GL_INVALID_VALUE")
40864 " is generated if "
40866 " is less than zero or greater
40867 than the maximum supported value.
40868 This value may be queried with "
40869 (code "glGetConvolutionParameter")
40872 (code "GL_SEPARABLE_2D")
40874 (code "GL_MAX_CONVOLUTION_HEIGHT")
40876 (para (code "GL_INVALID_OPERATION")
40877 " is generated if "
40880 (code "GL_UNSIGNED_BYTE_3_3_2")
40882 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
40884 (code "GL_UNSIGNED_SHORT_5_6_5")
40886 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
40893 (para (code "GL_INVALID_OPERATION")
40894 " is generated if "
40897 (code "GL_UNSIGNED_SHORT_4_4_4_4")
40899 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
40901 (code "GL_UNSIGNED_SHORT_5_5_5_1")
40903 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
40905 (code "GL_UNSIGNED_INT_8_8_8_8")
40907 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
40909 (code "GL_UNSIGNED_INT_10_10_10_2")
40911 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
40920 (para (code "GL_INVALID_OPERATION")
40921 " is generated if a non-zero buffer object name is bound to the "
40922 (code "GL_PIXEL_UNPACK_BUFFER")
40923 " target and the buffer object's data store is currently mapped. ")
40924 (para (code "GL_INVALID_OPERATION")
40925 " is generated if a non-zero buffer object name is bound to the "
40926 (code "GL_PIXEL_UNPACK_BUFFER")
40927 " target and the data would be unpacked from the buffer
40928 object such that the memory reads required would exceed the data store size. ")
40929 (para (code "GL_INVALID_OPERATION")
40930 " is generated if a non-zero buffer object name is bound to the "
40931 (code "GL_PIXEL_UNPACK_BUFFER")
40936 " is not evenly divisible
40937 into the number of bytes needed to store in memory a datum indicated by "
40940 (para (code "GL_INVALID_OPERATION")
40941 " is generated if "
40942 (code "glSeparableFilter2D")
40944 between the execution of "
40946 " and the corresponding
40951 (define-gl-procedure
40956 (funcdef "void " (function "glShadeModel"))
40957 (paramdef "GLenum " (parameter "mode"))))
40959 (heading "select flat or smooth shading")
40960 (heading "Parameters")
40961 (table (% (formatter (asis)))
40962 (entry (% (heading (var "mode")))
40964 Specifies a symbolic value representing a shading technique.
40965 Accepted values are "
40970 The initial value is "
40973 (heading "Description")
40975 GL primitives can have either flat or smooth shading.
40978 causes the computed colors of vertices to be interpolated as the
40979 primitive is rasterized,
40980 typically assigning different colors to each resulting pixel fragment.
40981 Flat shading selects the computed color of just one vertex
40982 and assigns it to all the pixel fragments
40983 generated by rasterizing a single primitive.
40984 In either case, the computed color of a vertex is the result of
40985 lighting if lighting is enabled,
40986 or it is the current color at the time the vertex was specified if
40987 lighting is disabled. ")
40989 Flat and smooth shading are indistinguishable for points.
40992 " is issued and counting vertices and
40993 primitives from 1, the GL gives each flat-shaded line segment "
40997 computed color of vertex "
40998 (math (var "i") "+" "1")
41001 Counting similarly from 1,
41002 the GL gives each flat-shaded polygon the computed color of the vertex listed
41003 in the following table.
41004 This is the last vertex to specify the polygon in all cases except single
41006 where the first vertex specifies the flat-shaded color. ")
41008 (table (% (formatter (asis)))
41012 Primitive Type of Polygon "
41013 (math (var "i")))))
41014 (para (strong "Vertex")))
41019 (math (var "i") "==" "1")
41023 (entry (% (heading "
41025 (para (math (var "i") "+" "2")))
41026 (entry (% (heading "
41028 (para (math (var "i") "+" "2")))
41029 (entry (% (heading "
41030 Independent triangle "))
41031 (para (math "3" "\u2062" (var "i"))))
41032 (entry (% (heading "
41034 (para (math "2" "\u2062" (var "i") "+" "2")))
41035 (entry (% (heading "
41036 Independent quad "))
41037 (para (math "4" "\u2062" (var "i")))))
41039 Flat and smooth shading are specified by "
41040 (code "glShadeModel")
41047 ", respectively. ")
41049 (para (code "GL_INVALID_ENUM")
41050 " is generated if "
41052 " is any value other than "
41057 (para (code "GL_INVALID_OPERATION")
41058 " is generated if "
41059 (code "glShadeModel")
41061 is executed between the execution of "
41064 and the corresponding execution of "
41068 (define-gl-procedure
41073 (funcdef "void " (function "glShaderSource"))
41074 (paramdef "GLuint " (parameter "shader"))
41075 (paramdef "GLsizei " (parameter "count"))
41076 (paramdef "const GLchar **" (parameter "string"))
41077 (paramdef "const GLint *" (parameter "length"))))
41080 "Replaces the source code in a shader object")
41081 (heading "Parameters")
41082 (table (% (formatter (asis)))
41083 (entry (% (heading (var "shader")))
41084 (para "Specifies the handle of the shader object
41085 \t\t whose source code is to be replaced."))
41086 (entry (% (heading (var "count")))
41087 (para "Specifies the number of elements in the "
41093 (entry (% (heading (var "string")))
41094 (para "Specifies an array of pointers to strings
41095 \t\t containing the source code to be loaded into the
41097 (entry (% (heading (var "length")))
41098 (para "Specifies an array of string lengths.")))
41099 (heading "Description")
41100 (para (code "glShaderSource")
41101 " sets the source code
41104 " to the source code in the array
41105 \tof strings specified by "
41108 \tsource code previously stored in the shader object is completely
41109 \treplaced. The number of strings in the array is specified by\t"
41116 ", each string is assumed to be null
41122 ", it points to an array containing
41123 \ta string length for each of the corresponding elements of\t"
41125 ". Each element in the\t"
41127 " array may contain the length of
41128 \tthe corresponding string (the null character is not counted as
41129 \tpart of the string length) or a value less than 0 to indicate
41130 \tthat the string is null terminated. The source code strings are
41131 \tnot scanned or parsed at this time; they are simply copied into
41132 \tthe specified shader object.")
41134 (para (code "GL_INVALID_VALUE")
41135 " is generated if\t"
41137 " is not a value generated by
41139 (para (code "GL_INVALID_OPERATION")
41140 " is generated if\t"
41142 " is not a shader object.")
41143 (para (code "GL_INVALID_VALUE")
41144 " is generated if\t"
41146 " is less than 0.")
41147 (para (code "GL_INVALID_OPERATION")
41148 " is generated if\t"
41149 (code "glShaderSource")
41150 " is executed between the
41154 and the corresponding execution of\t"
41158 (define-gl-procedure
41159 glStencilFuncSeparate
41160 "glStencilFuncSeparate"
41165 (function "glStencilFuncSeparate"))
41166 (paramdef "GLenum " (parameter "face"))
41167 (paramdef "GLenum " (parameter "func"))
41168 (paramdef "GLint " (parameter "ref"))
41169 (paramdef "GLuint " (parameter "mask"))))
41172 "set front and/or back function and reference value for stencil testing")
41173 (heading "Parameters")
41174 (table (% (formatter (asis)))
41175 (entry (% (heading (var "face")))
41177 Specifies whether front and/or back stencil state is updated.
41178 Three symbolic constants are valid: "
41183 (code "GL_FRONT_AND_BACK")
41185 (entry (% (heading (var "func")))
41187 Specifies the test function.
41188 Eight symbolic constants are valid: "
41195 (code "GL_GREATER")
41201 (code "GL_NOTEQUAL")
41204 ". The initial value is "
41207 (entry (% (heading (var "ref")))
41209 Specifies the reference value for the stencil test. "
41211 " is clamped to the range "
41212 (math "[" "0" "," "2" "^" (var "n") "-" "1" "]")
41217 is the number of bitplanes in the stencil buffer. The
41218 initial value is 0. "))
41219 (entry (% (heading (var "mask")))
41221 Specifies a mask that is ANDed with both the reference value
41222 and the stored stencil value when the test is done. The initial value
41224 (heading "Description")
41227 like depth-buffering,
41228 enables and disables drawing on a per-pixel basis.
41229 You draw into the stencil planes using GL drawing primitives,
41230 then render geometry and images,
41231 using the stencil planes to mask out portions of the screen.
41232 Stenciling is typically used in multipass rendering algorithms
41233 to achieve special effects,
41236 and constructive solid geometry rendering. ")
41238 The stencil test conditionally eliminates a pixel based on the outcome
41239 of a comparison between the reference value
41240 and the value in the stencil buffer.
41241 To enable and disable the test, call "
41247 (code "GL_STENCIL_TEST")
41249 To specify actions based on the outcome of the stencil test, call "
41250 (code "glStencilOp")
41252 (code "glStencilOpSeparate")
41255 There can be two separate sets of "
41261 " parameters; one affects back-facing polygons, and the other
41262 affects front-facing polygons as well as other non-polygon primitives. "
41263 (code "glStencilFunc")
41265 and back stencil state to the same values, as if "
41266 (code "glStencilFuncSeparate")
41271 (code "GL_FRONT_AND_BACK")
41274 " is a symbolic constant that determines the stencil comparison function.
41275 It accepts one of eight values,
41276 shown in the following list. "
41278 " is an integer reference value that is used in the stencil comparison.
41279 It is clamped to the range "
41280 (math "[" "0" "," "2" "^" (var "n") "-" "1" "]")
41285 is the number of bitplanes in the stencil buffer. "
41287 " is bitwise ANDed with both the reference value
41288 and the stored stencil value,
41289 with the ANDed values participating in the comparison. ")
41293 " represents the value stored in the corresponding
41294 stencil buffer location,
41295 the following list shows the effect of each comparison function
41296 that can be specified by "
41299 Only if the comparison succeeds is the pixel passed through
41300 to the next stage in the rasterization process
41302 (code "glStencilOp")
41306 " values as unsigned integers in the range "
41307 (math "[" "0" "," "2" "^" (var "n") "-" "1" "]")
41312 is the number of bitplanes in the stencil buffer. ")
41314 The following values are accepted by "
41317 (table (% (formatter (asis)))
41318 (entry (% (heading (code "GL_NEVER")))
41321 (entry (% (heading (code "GL_LESS")))
41332 (entry (% (heading (code "GL_LEQUAL")))
41343 (entry (% (heading (code "GL_GREATER")))
41354 (entry (% (heading (code "GL_GEQUAL")))
41365 (entry (% (heading (code "GL_EQUAL")))
41376 (entry (% (heading (code "GL_NOTEQUAL")))
41387 (entry (% (heading (code "GL_ALWAYS")))
41389 Always passes. ")))
41391 (para (code "GL_INVALID_ENUM")
41392 " is generated if "
41394 " is not one of the eight
41395 accepted values. ")
41396 (para (code "GL_INVALID_OPERATION")
41397 " is generated if "
41398 (code "glStencilFuncSeparate")
41400 is executed between the execution of "
41403 and the corresponding execution of "
41407 (define-gl-procedure
41412 (funcdef "void " (function "glStencilFunc"))
41413 (paramdef "GLenum " (parameter "func"))
41414 (paramdef "GLint " (parameter "ref"))
41415 (paramdef "GLuint " (parameter "mask"))))
41418 "set front and back function and reference value for stencil testing")
41419 (heading "Parameters")
41420 (table (% (formatter (asis)))
41421 (entry (% (heading (var "func")))
41423 Specifies the test function.
41424 Eight symbolic constants are valid: "
41431 (code "GL_GREATER")
41437 (code "GL_NOTEQUAL")
41440 ". The initial value is "
41443 (entry (% (heading (var "ref")))
41445 Specifies the reference value for the stencil test. "
41447 " is clamped to the range "
41448 (math "[" "0" "," "2" "^" (var "n") "-" "1" "]")
41453 is the number of bitplanes in the stencil buffer. The
41454 initial value is 0. "))
41455 (entry (% (heading (var "mask")))
41457 Specifies a mask that is ANDed with both the reference value
41458 and the stored stencil value when the test is done. The initial value
41460 (heading "Description")
41463 like depth-buffering,
41464 enables and disables drawing on a per-pixel basis.
41465 Stencil planes are first drawn into using GL drawing primitives, then
41466 geometry and images are rendered using the stencil planes to mask out
41467 portions of the screen.
41468 Stenciling is typically used in multipass rendering algorithms
41469 to achieve special effects,
41472 and constructive solid geometry rendering. ")
41474 The stencil test conditionally eliminates a pixel based on the outcome
41475 of a comparison between the reference value
41476 and the value in the stencil buffer.
41477 To enable and disable the test, call "
41483 (code "GL_STENCIL_TEST")
41485 To specify actions based on the outcome of the stencil test, call "
41486 (code "glStencilOp")
41488 (code "glStencilOpSeparate")
41491 There can be two separate sets of "
41497 " parameters; one affects back-facing polygons, and the other
41498 affects front-facing polygons as well as other non-polygon primitives. "
41499 (code "glStencilFunc")
41501 and back stencil state to the same values. Use "
41502 (code "glStencilFuncSeparate")
41504 to set front and back stencil state to different values. ")
41506 " is a symbolic constant that determines the stencil comparison function.
41507 It accepts one of eight values,
41508 shown in the following list. "
41510 " is an integer reference value that is used in the stencil comparison.
41511 It is clamped to the range "
41512 (math "[" "0" "," "2" "^" (var "n") "-" "1" "]")
41517 is the number of bitplanes in the stencil buffer. "
41519 " is bitwise ANDed with both the reference value
41520 and the stored stencil value,
41521 with the ANDed values participating in the comparison. ")
41525 " represents the value stored in the corresponding
41526 stencil buffer location,
41527 the following list shows the effect of each comparison function
41528 that can be specified by "
41531 Only if the comparison succeeds is the pixel passed through
41532 to the next stage in the rasterization process
41534 (code "glStencilOp")
41538 " values as unsigned integers in the range "
41539 (math "[" "0" "," "2" "^" (var "n") "-" "1" "]")
41544 is the number of bitplanes in the stencil buffer. ")
41546 The following values are accepted by "
41549 (table (% (formatter (asis)))
41550 (entry (% (heading (code "GL_NEVER")))
41553 (entry (% (heading (code "GL_LESS")))
41564 (entry (% (heading (code "GL_LEQUAL")))
41575 (entry (% (heading (code "GL_GREATER")))
41586 (entry (% (heading (code "GL_GEQUAL")))
41597 (entry (% (heading (code "GL_EQUAL")))
41608 (entry (% (heading (code "GL_NOTEQUAL")))
41619 (entry (% (heading (code "GL_ALWAYS")))
41621 Always passes. ")))
41623 (para (code "GL_INVALID_ENUM")
41624 " is generated if "
41626 " is not one of the eight
41627 accepted values. ")
41628 (para (code "GL_INVALID_OPERATION")
41629 " is generated if "
41630 (code "glStencilFunc")
41632 is executed between the execution of "
41635 and the corresponding execution of "
41639 (define-gl-procedure
41640 glStencilMaskSeparate
41641 "glStencilMaskSeparate"
41646 (function "glStencilMaskSeparate"))
41647 (paramdef "GLenum " (parameter "face"))
41648 (paramdef "GLuint " (parameter "mask"))))
41651 "control the front and/or back writing of individual bits in the stencil planes")
41652 (heading "Parameters")
41653 (table (% (formatter (asis)))
41654 (entry (% (heading (var "face")))
41656 Specifies whether the front and/or back stencil writemask is updated.
41657 Three symbolic constants are valid: "
41662 (code "GL_FRONT_AND_BACK")
41664 (entry (% (heading (var "mask")))
41666 Specifies a bit mask to enable and disable writing of individual bits
41667 in the stencil planes.
41668 Initially, the mask is all 1's. ")))
41669 (heading "Description")
41670 (para (code "glStencilMaskSeparate")
41671 " controls the writing of individual bits in the stencil planes.
41672 The least significant "
41681 is the number of bits in the stencil buffer,
41683 Where a 1 appears in the mask,
41684 it's possible to write to the corresponding bit in the stencil buffer.
41686 the corresponding bit is write-protected.
41687 Initially, all bits are enabled for writing. ")
41689 There can be two separate "
41691 " writemasks; one affects back-facing polygons, and the other
41692 affects front-facing polygons as well as other non-polygon primitives. "
41693 (code "glStencilMask")
41695 and back stencil writemasks to the same values, as if "
41696 (code "glStencilMaskSeparate")
41701 (code "GL_FRONT_AND_BACK")
41704 (para (code "GL_INVALID_OPERATION")
41705 " is generated if "
41706 (code "glStencilMaskSeparate")
41708 is executed between the execution of "
41711 and the corresponding execution of "
41715 (define-gl-procedure
41720 (funcdef "void " (function "glStencilMask"))
41721 (paramdef "GLuint " (parameter "mask"))))
41724 "control the front and back writing of individual bits in the stencil planes")
41725 (heading "Parameters")
41726 (table (% (formatter (asis)))
41727 (entry (% (heading (var "mask")))
41729 Specifies a bit mask to enable and disable writing of individual bits
41730 in the stencil planes.
41731 Initially, the mask is all 1's. ")))
41732 (heading "Description")
41733 (para (code "glStencilMask")
41734 " controls the writing of individual bits in the stencil planes.
41735 The least significant "
41744 is the number of bits in the stencil buffer,
41746 Where a 1 appears in the mask,
41747 it's possible to write to the corresponding bit in the stencil buffer.
41749 the corresponding bit is write-protected.
41750 Initially, all bits are enabled for writing. ")
41752 There can be two separate "
41754 " writemasks; one affects back-facing polygons, and the other
41755 affects front-facing polygons as well as other non-polygon primitives. "
41756 (code "glStencilMask")
41758 and back stencil writemasks to the same values. Use "
41759 (code "glStencilMaskSeparate")
41761 to set front and back stencil writemasks to different values. ")
41763 (para (code "GL_INVALID_OPERATION")
41764 " is generated if "
41765 (code "glStencilMask")
41767 is executed between the execution of "
41770 and the corresponding execution of "
41774 (define-gl-procedure
41775 glStencilOpSeparate
41776 "glStencilOpSeparate"
41781 (function "glStencilOpSeparate"))
41782 (paramdef "GLenum " (parameter "face"))
41783 (paramdef "GLenum " (parameter "sfail"))
41784 (paramdef "GLenum " (parameter "dpfail"))
41785 (paramdef "GLenum " (parameter "dppass"))))
41788 "set front and/or back stencil test actions")
41789 (heading "Parameters")
41790 (table (% (formatter (asis)))
41791 (entry (% (heading (var "face")))
41793 Specifies whether front and/or back stencil state is updated.
41794 Three symbolic constants are valid: "
41799 (code "GL_FRONT_AND_BACK")
41801 (entry (% (heading (var "sfail")))
41803 Specifies the action to take when the stencil test fails.
41804 Eight symbolic constants are accepted: "
41809 (code "GL_REPLACE")
41813 (code "GL_INCR_WRAP")
41817 (code "GL_DECR_WRAP")
41820 ". The initial value is "
41823 (entry (% (heading (var "dpfail")))
41825 Specifies the stencil action when the stencil test passes,
41826 but the depth test fails. "
41828 " accepts the same symbolic constants as "
41830 ". The initial value
41834 (entry (% (heading (var "dppass")))
41836 Specifies the stencil action when both the stencil test and the depth
41837 test pass, or when the stencil test passes and either there is no
41838 depth buffer or depth testing is not enabled. "
41840 " accepts the same symbolic constants as "
41842 ". The initial value
41846 (heading "Description")
41849 like depth-buffering,
41850 enables and disables drawing on a per-pixel basis.
41851 You draw into the stencil planes using GL drawing primitives,
41852 then render geometry and images,
41853 using the stencil planes to mask out portions of the screen.
41854 Stenciling is typically used in multipass rendering algorithms
41855 to achieve special effects,
41858 and constructive solid geometry rendering. ")
41860 The stencil test conditionally eliminates a pixel based on the outcome
41861 of a comparison between the value in the stencil buffer and a
41862 reference value. To enable and disable the test, call "
41868 (code "GL_STENCIL_TEST")
41869 "; to control it, call "
41870 (code "glStencilFunc")
41872 (code "glStencilFuncSeparate")
41875 There can be two separate sets of "
41881 " parameters; one affects back-facing polygons, and the other
41882 affects front-facing polygons as well as other non-polygon primitives. "
41883 (code "glStencilOp")
41885 and back stencil state to the same values, as if "
41886 (code "glStencilOpSeparate")
41891 (code "GL_FRONT_AND_BACK")
41893 (para (code "glStencilOpSeparate")
41894 " takes three arguments that indicate what happens
41895 to the stored stencil value while stenciling is enabled.
41896 If the stencil test fails,
41897 no change is made to the pixel's color or depth buffers,
41900 " specifies what happens to the stencil buffer contents.
41901 The following eight actions are possible. ")
41902 (table (% (formatter (asis)))
41903 (entry (% (heading (code "GL_KEEP")))
41905 Keeps the current value. "))
41906 (entry (% (heading (code "GL_ZERO")))
41908 Sets the stencil buffer value to 0. "))
41909 (entry (% (heading (code "GL_REPLACE")))
41911 Sets the stencil buffer value to "
41915 (code "glStencilFunc")
41917 (entry (% (heading (code "GL_INCR")))
41919 Increments the current stencil buffer value.
41920 Clamps to the maximum representable unsigned value. "))
41921 (entry (% (heading (code "GL_INCR_WRAP")))
41923 Increments the current stencil buffer value.
41924 Wraps stencil buffer value to zero when incrementing the maximum
41925 representable unsigned value. "))
41926 (entry (% (heading (code "GL_DECR")))
41928 Decrements the current stencil buffer value.
41930 (entry (% (heading (code "GL_DECR_WRAP")))
41932 Decrements the current stencil buffer value.
41933 Wraps stencil buffer value to the maximum representable unsigned value when
41934 decrementing a stencil buffer value of zero. "))
41935 (entry (% (heading (code "GL_INVERT")))
41937 Bitwise inverts the current stencil buffer value. ")))
41939 Stencil buffer values are treated as unsigned integers.
41940 When incremented and decremented,
41941 values are clamped to 0 and "
41942 (math "2" "^" (var "n") "-" "1")
41947 is the value returned by querying "
41948 (code "GL_STENCIL_BITS")
41951 The other two arguments to "
41952 (code "glStencilOpSeparate")
41953 " specify stencil buffer actions
41954 that depend on whether subsequent depth buffer tests succeed ("
41960 (code "glDepthFunc")
41962 The actions are specified using the same eight symbolic constants as "
41967 " is ignored when there is no depth buffer,
41968 or when the depth buffer is not enabled.
41973 " specify stencil action when the
41974 stencil test fails and passes,
41977 (para (code "GL_INVALID_ENUM")
41978 " is generated if "
41986 (code "GL_FRONT_AND_BACK")
41988 (para (code "GL_INVALID_ENUM")
41989 " is generated if "
41995 " is any value other than the eight defined constant values. ")
41996 (para (code "GL_INVALID_OPERATION")
41997 " is generated if "
41998 (code "glStencilOpSeparate")
42000 is executed between the execution of "
42003 and the corresponding execution of "
42007 (define-gl-procedure
42012 (funcdef "void " (function "glStencilOp"))
42013 (paramdef "GLenum " (parameter "sfail"))
42014 (paramdef "GLenum " (parameter "dpfail"))
42015 (paramdef "GLenum " (parameter "dppass"))))
42018 "set front and back stencil test actions")
42019 (heading "Parameters")
42020 (table (% (formatter (asis)))
42021 (entry (% (heading (var "sfail")))
42023 Specifies the action to take when the stencil test fails.
42024 Eight symbolic constants are accepted: "
42029 (code "GL_REPLACE")
42033 (code "GL_INCR_WRAP")
42037 (code "GL_DECR_WRAP")
42040 ". The initial value is "
42043 (entry (% (heading (var "dpfail")))
42045 Specifies the stencil action when the stencil test passes,
42046 but the depth test fails. "
42048 " accepts the same symbolic constants as "
42050 ". The initial value
42054 (entry (% (heading (var "dppass")))
42056 Specifies the stencil action when both the stencil test and the depth
42057 test pass, or when the stencil test passes and either there is no
42058 depth buffer or depth testing is not enabled. "
42060 " accepts the same symbolic constants as "
42062 ". The initial value
42066 (heading "Description")
42069 like depth-buffering,
42070 enables and disables drawing on a per-pixel basis.
42071 You draw into the stencil planes using GL drawing primitives,
42072 then render geometry and images,
42073 using the stencil planes to mask out portions of the screen.
42074 Stenciling is typically used in multipass rendering algorithms
42075 to achieve special effects,
42078 and constructive solid geometry rendering. ")
42080 The stencil test conditionally eliminates a pixel based on the outcome
42081 of a comparison between the value in the stencil buffer and a
42082 reference value. To enable and disable the test, call "
42088 (code "GL_STENCIL_TEST")
42089 "; to control it, call "
42090 (code "glStencilFunc")
42092 (code "glStencilFuncSeparate")
42095 There can be two separate sets of "
42101 " parameters; one affects back-facing polygons, and the other
42102 affects front-facing polygons as well as other non-polygon primitives. "
42103 (code "glStencilOp")
42105 and back stencil state to the same values. Use "
42106 (code "glStencilOpSeparate")
42108 to set front and back stencil state to different values. ")
42109 (para (code "glStencilOp")
42110 " takes three arguments that indicate what happens
42111 to the stored stencil value while stenciling is enabled.
42112 If the stencil test fails,
42113 no change is made to the pixel's color or depth buffers,
42116 " specifies what happens to the stencil buffer contents.
42117 The following eight actions are possible. ")
42118 (table (% (formatter (asis)))
42119 (entry (% (heading (code "GL_KEEP")))
42121 Keeps the current value. "))
42122 (entry (% (heading (code "GL_ZERO")))
42124 Sets the stencil buffer value to 0. "))
42125 (entry (% (heading (code "GL_REPLACE")))
42127 Sets the stencil buffer value to "
42131 (code "glStencilFunc")
42133 (entry (% (heading (code "GL_INCR")))
42135 Increments the current stencil buffer value.
42136 Clamps to the maximum representable unsigned value. "))
42137 (entry (% (heading (code "GL_INCR_WRAP")))
42139 Increments the current stencil buffer value.
42140 Wraps stencil buffer value to zero when incrementing the maximum
42141 representable unsigned value. "))
42142 (entry (% (heading (code "GL_DECR")))
42144 Decrements the current stencil buffer value.
42146 (entry (% (heading (code "GL_DECR_WRAP")))
42148 Decrements the current stencil buffer value.
42149 Wraps stencil buffer value to the maximum representable unsigned value when
42150 decrementing a stencil buffer value of zero. "))
42151 (entry (% (heading (code "GL_INVERT")))
42153 Bitwise inverts the current stencil buffer value. ")))
42155 Stencil buffer values are treated as unsigned integers.
42156 When incremented and decremented,
42157 values are clamped to 0 and "
42158 (math "2" "^" (var "n") "-" "1")
42163 is the value returned by querying "
42164 (code "GL_STENCIL_BITS")
42167 The other two arguments to "
42168 (code "glStencilOp")
42169 " specify stencil buffer actions
42170 that depend on whether subsequent depth buffer tests succeed ("
42176 (code "glDepthFunc")
42178 The actions are specified using the same eight symbolic constants as "
42183 " is ignored when there is no depth buffer,
42184 or when the depth buffer is not enabled.
42189 " specify stencil action when the
42190 stencil test fails and passes,
42193 (para (code "GL_INVALID_ENUM")
42194 " is generated if "
42200 " is any value other than the eight defined constant values. ")
42201 (para (code "GL_INVALID_OPERATION")
42202 " is generated if "
42203 (code "glStencilOp")
42205 is executed between the execution of "
42208 and the corresponding execution of "
42212 (define-gl-procedure
42214 "glTexCoordPointer"
42217 (funcdef "void " (function "glTexCoordPointer"))
42218 (paramdef "GLint " (parameter "size"))
42219 (paramdef "GLenum " (parameter "type"))
42220 (paramdef "GLsizei " (parameter "stride"))
42223 (parameter "pointer"))))
42226 "define an array of texture coordinates")
42227 (heading "Parameters")
42228 (table (% (formatter (asis)))
42229 (entry (% (heading (var "size")))
42231 Specifies the number of coordinates per array element. Must be 1, 2, 3,
42232 or 4. The initial value is 4. "))
42233 (entry (% (heading (var "type")))
42235 Specifies the data type of each texture coordinate.
42236 Symbolic constants "
42246 are accepted. The initial value is "
42249 (entry (% (heading (var "stride")))
42251 Specifies the byte offset between consecutive texture coordinate sets.
42254 " is 0, the array elements are understood
42255 to be tightly packed. The initial value is 0. "))
42256 (entry (% (heading (var "pointer")))
42258 Specifies a pointer to the first coordinate of the first texture coordinate set in the
42259 array. The initial value is 0. ")))
42260 (heading "Description")
42261 (para (code "glTexCoordPointer")
42262 " specifies the location and data format of an array of texture
42263 coordinates to use when rendering. "
42265 " specifies the number of coordinates per
42266 texture coordinate set, and must be 1, 2, 3, or 4. "
42268 " specifies the data type of each texture coordinate,
42271 " specifies the byte stride from one
42272 texture coordinate set to the next, allowing vertices and attributes
42273 to be packed into a single array or stored in separate arrays.
42274 (Single-array storage may be more efficient on some implementations;
42276 (code "glInterleavedArrays")
42279 If a non-zero named buffer object is bound to the "
42280 (code "GL_ARRAY_BUFFER")
42283 (code "glBindBuffer")
42284 ") while a texture coordinate array is
42287 " is treated as a byte offset into the buffer object's data store.
42288 Also, the buffer object binding ("
42289 (code "GL_ARRAY_BUFFER_BINDING")
42290 ") is saved as texture coordinate vertex array
42291 client-side state ("
42292 (code "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING")
42295 When a texture coordinate array is specified, "
42303 " are saved as client-side
42304 state, in addition to the current vertex array buffer object binding. ")
42306 To enable and disable a texture coordinate array, call "
42307 (code "glEnableClientState")
42309 (code "glDisableClientState")
42310 " with the argument "
42311 (code "GL_TEXTURE_COORD_ARRAY")
42312 ". If enabled, the texture coordinate array is used when "
42313 (code "glArrayElement")
42315 (code "glDrawArrays")
42317 (code "glMultiDrawArrays")
42319 (code "glDrawElements")
42321 (code "glMultiDrawElements")
42323 (code "glDrawRangeElements")
42327 (para (code "GL_INVALID_VALUE")
42328 " is generated if "
42330 " is not 1, 2, 3, or 4. ")
42331 (para (code "GL_INVALID_ENUM")
42332 " is generated if "
42334 " is not an accepted value. ")
42335 (para (code "GL_INVALID_VALUE")
42336 " is generated if "
42338 " is negative. ")))
42340 (define-gl-procedure
42345 (funcdef "void " (function "glTexCoord1s"))
42346 (paramdef "GLshort " (parameter "s"))))
42348 (heading "set the current texture coordinates")
42349 (heading "Parameters")
42350 (table (% (formatter (asis)))
42351 (entry (% (heading (var "s")))
42364 " texture coordinates.
42365 Not all parameters are present in all forms of the command. ")))
42366 (heading "Description")
42367 (para (code "glTexCoord")
42368 " specifies texture coordinates in
42373 (code "glTexCoord1")
42374 " sets the current texture coordinates to "
42375 (math "(" (var "s") "," "0" "0" "1" ")")
42378 (code "glTexCoord2")
42380 (math "(" (var "s") "," (var "t") "0" "1" ")")
42383 (code "glTexCoord3")
42384 " specifies the texture coordinates as "
42394 (code "glTexCoord4")
42395 " defines all four components explicitly as "
42405 The current texture coordinates are part of the data
42406 that is associated with each vertex and with the current
42408 Initially, the values for "
42417 are (0, 0, 0, 1). ")
42420 (define-gl-procedure
42425 (funcdef "void " (function "glTexEnvf"))
42426 (paramdef "GLenum " (parameter "target"))
42427 (paramdef "GLenum " (parameter "pname"))
42428 (paramdef "GLfloat " (parameter "param"))))
42430 (heading "set texture environment parameters")
42431 (heading "Parameters")
42432 (table (% (formatter (asis)))
42433 (entry (% (heading (var "target")))
42435 Specifies a texture environment.
42437 (code "GL_TEXTURE_ENV")
42439 (code "GL_TEXTURE_FILTER_CONTROL")
42441 (code "GL_POINT_SPRITE")
42443 (entry (% (heading (var "pname")))
42445 Specifies the symbolic name of a single-valued texture environment parameter.
42447 (code "GL_TEXTURE_ENV_MODE")
42449 (code "GL_TEXTURE_LOD_BIAS")
42451 (code "GL_COMBINE_RGB")
42453 (code "GL_COMBINE_ALPHA")
42455 (code "GL_SRC0_RGB")
42457 (code "GL_SRC1_RGB")
42459 (code "GL_SRC2_RGB")
42461 (code "GL_SRC0_ALPHA")
42463 (code "GL_SRC1_ALPHA")
42465 (code "GL_SRC2_ALPHA")
42467 (code "GL_OPERAND0_RGB")
42469 (code "GL_OPERAND1_RGB")
42471 (code "GL_OPERAND2_RGB")
42473 (code "GL_OPERAND0_ALPHA")
42475 (code "GL_OPERAND1_ALPHA")
42477 (code "GL_OPERAND2_ALPHA")
42479 (code "GL_RGB_SCALE")
42481 (code "GL_ALPHA_SCALE")
42483 (code "GL_COORD_REPLACE")
42485 (entry (% (heading (var "param")))
42487 Specifies a single symbolic constant, one of "
42490 (code "GL_ADD_SIGNED")
42492 (code "GL_INTERPOLATE")
42494 (code "GL_MODULATE")
42500 (code "GL_REPLACE")
42502 (code "GL_SUBTRACT")
42504 (code "GL_COMBINE")
42506 (code "GL_TEXTURE")
42508 (code "GL_CONSTANT")
42510 (code "GL_PRIMARY_COLOR")
42512 (code "GL_PREVIOUS")
42514 (code "GL_SRC_COLOR")
42516 (code "GL_ONE_MINUS_SRC_COLOR")
42518 (code "GL_SRC_ALPHA")
42520 (code "GL_ONE_MINUS_SRC_ALPHA")
42522 a single boolean value for the point sprite texture coordinate replacement,
42523 a single floating-point value for the texture level-of-detail bias,
42524 or 1.0, 2.0, or 4.0 when specifying the "
42525 (code "GL_RGB_SCALE")
42527 (code "GL_ALPHA_SCALE")
42529 (heading "Description")
42531 A texture environment specifies how texture values are interpreted when a
42532 fragment is textured. When "
42535 (code "GL_TEXTURE_FILTER_CONTROL")
42539 (code "GL_TEXTURE_LOD_BIAS")
42543 (code "GL_TEXTURE_ENV")
42547 (code "GL_TEXTURE_ENV_MODE")
42549 (code "GL_TEXTURE_ENV_COLOR")
42551 (code "GL_COMBINE_RGB")
42553 (code "GL_COMBINE_ALPHA")
42555 (code "GL_RGB_SCALE")
42557 (code "GL_ALPHA_SCALE")
42559 (code "GL_SRC0_RGB")
42561 (code "GL_SRC1_RGB")
42563 (code "GL_SRC2_RGB")
42565 (code "GL_SRC0_ALPHA")
42567 (code "GL_SRC1_ALPHA")
42569 (code "GL_SRC2_ALPHA")
42575 (code "GL_TEXTURE_ENV_MODE")
42579 " is (or points to) the symbolic name of a texture function.
42580 Six texture functions may be specified: "
42583 (code "GL_MODULATE")
42589 (code "GL_REPLACE")
42591 (code "GL_COMBINE")
42594 The following table shows the correspondence of filtered texture
42596 (math (var "R") "_" (var "t"))
42598 (math (var "G") "_" (var "t"))
42600 (math (var "B") "_" (var "t"))
42602 (math (var "A") "_" (var "t"))
42604 (math (var "L") "_" (var "t"))
42606 (math (var "I") "_" (var "t"))
42608 to texture source components. "
42609 (math (var "C") "_" (var "s"))
42612 (math (var "A") "_" (var "s"))
42614 are used by the texture functions described below. ")
42616 (table (% (formatter (asis)))
42617 (entry (% (heading "
42618 Texture Base Internal Format "))
42619 (para (math (code "C") "_" (var "s"))
42621 (math (code "A") "_" (var "s"))))
42622 (entry (% (heading (code "GL_ALPHA")))
42626 (math (var "A") "_" (var "t"))))
42627 (entry (% (heading (code "GL_LUMINANCE")))
42630 (math (var "L") "_" (var "t"))
42632 (math (var "L") "_" (var "t"))
42634 (math (var "L") "_" (var "t"))
42640 (entry (% (heading (code "GL_LUMINANCE_ALPHA")))
42643 (math (var "L") "_" (var "t"))
42645 (math (var "L") "_" (var "t"))
42647 (math (var "L") "_" (var "t"))
42651 (math (var "A") "_" (var "t"))))
42652 (entry (% (heading (code "GL_INTENSITY")))
42655 (math (var "I") "_" (var "t"))
42657 (math (var "I") "_" (var "t"))
42659 (math (var "I") "_" (var "t"))
42663 (math (var "I") "_" (var "t"))))
42664 (entry (% (heading (code "GL_RGB")))
42667 (math (var "R") "_" (var "t"))
42669 (math (var "G") "_" (var "t"))
42671 (math (var "B") "_" (var "t"))
42677 (entry (% (heading (code "GL_RGBA")))
42680 (math (var "R") "_" (var "t"))
42682 (math (var "G") "_" (var "t"))
42684 (math (var "B") "_" (var "t"))
42688 (math (var "A") "_" (var "t")))))
42690 A texture function acts on the fragment to be textured using
42691 the texture image value that applies to the fragment
42693 (code "glTexParameter")
42695 and produces an RGBA color for that fragment.
42696 The following table shows how the RGBA color is produced for each
42697 of the first five texture functions that can be chosen. "
42700 is a triple of color values (RGB) and "
42703 is the associated alpha value.
42704 RGBA values extracted from a texture image are in the range [0,1].
42708 refers to the color computed from the previous texture stage (or the incoming fragment if processing texture stage 0),
42712 to the texture source color,
42716 to the texture environment color,
42717 and the subscript "
42720 indicates a value produced by the texture function. ")
42722 (table (% (formatter (asis)))
42723 (entry (% (heading "
42724 Texture Base Internal Format "))
42725 (para (code "Value")
42727 (code "GL_REPLACE")
42730 (code "GL_MODULATE")
42741 (entry (% (heading (code "GL_ALPHA")))
42742 (para (math (var "C") "_" (var "v") "=")
42744 (math (var "C") "_" (var "p"))
42746 (math (var "C") "_" (var "p"))
42751 (math (var "C") "_" (var "p"))
42753 (math (var "C") "_" (var "p"))))
42754 (entry (% (heading))
42755 (para (math (var "A") "_" (var "v") "=")
42757 (math (var "A") "_" (var "s"))
42787 (entry (% (heading (code "GL_LUMINANCE")))
42788 (para (math (var "C") "_" (var "v") "=")
42790 (math (var "C") "_" (var "s"))
42831 (entry (% (heading "
42833 (para (math (var "A") "_" (var "v") "=")
42835 (math (var "A") "_" (var "p"))
42837 (math (var "A") "_" (var "p"))
42840 (math (var "A") "_" (var "p"))
42842 (math (var "A") "_" (var "p"))))
42843 (entry (% (heading (code "GL_LUMINANCE_ALPHA")))
42844 (para (math (var "C") "_" (var "v") "=")
42846 (math (var "C") "_" (var "s"))
42887 (entry (% (heading "
42889 (para (math (var "A") "_" (var "v") "=")
42891 (math (var "A") "_" (var "s"))
42917 (entry (% (heading (code "GL_INTENSITY")))
42918 (para (math (var "C") "_" (var "v") "=")
42920 (math (var "C") "_" (var "s"))
42961 (entry (% (heading))
42962 (para (math (var "A") "_" (var "v") "=")
42964 (math (var "A") "_" (var "s"))
43003 (entry (% (heading (code "GL_RGB")))
43004 (para (math (var "C") "_" (var "v") "=")
43006 (math (var "C") "_" (var "s"))
43016 (math (var "C") "_" (var "s"))
43046 (entry (% (heading "
43048 (para (math (var "A") "_" (var "v") "=")
43050 (math (var "A") "_" (var "p"))
43052 (math (var "A") "_" (var "p"))
43054 (math (var "A") "_" (var "p"))
43056 (math (var "A") "_" (var "p"))
43058 (math (var "A") "_" (var "p"))))
43059 (entry (% (heading (code "GL_RGBA")))
43060 (para (math (var "C") "_" (var "v") "=")
43062 (math (var "C") "_" (var "s"))
43121 (entry (% (heading "
43123 (para (math (var "A") "_" (var "v") "=")
43125 (math (var "A") "_" (var "s"))
43135 (math (var "A") "_" (var "p"))
43156 (code "GL_TEXTURE_ENV_MODE")
43160 (code "GL_COMBINE")
43162 form of the texture function depends on the values of "
43163 (code "GL_COMBINE_RGB")
43166 (code "GL_COMBINE_ALPHA")
43169 The following describes how the texture sources, as specified by "
43170 (code "GL_SRC0_RGB")
43172 (code "GL_SRC1_RGB")
43174 (code "GL_SRC2_RGB")
43176 (code "GL_SRC0_ALPHA")
43178 (code "GL_SRC1_ALPHA")
43180 (code "GL_SRC2_ALPHA")
43182 are combined to produce a final texture color. In the following tables, "
43184 " is represented by "
43185 (math (var "Arg0"))
43190 (math (var "Arg1"))
43194 " is represented by "
43195 (math (var "Arg2"))
43197 (para (code "GL_COMBINE_RGB")
43199 (code "GL_REPLACE")
43201 (code "GL_MODULATE")
43205 (code "GL_ADD_SIGNED")
43207 (code "GL_INTERPOLATE")
43209 (code "GL_SUBTRACT")
43211 (code "GL_DOT3_RGB")
43213 (code "GL_DOT3_RGBA")
43216 (table (% (formatter (asis)))
43217 (entry (% (heading (strong (code "GL_COMBINE_RGB"))))
43218 (para (strong "Texture Function")))
43219 (entry (% (heading (code "GL_REPLACE")))
43220 (para (math (var "Arg0"))))
43221 (entry (% (heading (code "GL_MODULATE")))
43222 (para (math (var "Arg0") "×" (var "Arg1"))))
43223 (entry (% (heading (code "GL_ADD")))
43224 (para (math (var "Arg0") "+" (var "Arg1"))))
43225 (entry (% (heading (code "GL_ADD_SIGNED")))
43226 (para (math (var "Arg0") "+" (var "Arg1") "-" "0.5")))
43227 (entry (% (heading (code "GL_INTERPOLATE")))
43228 (para (math (var "Arg0")
43240 (entry (% (heading (code "GL_SUBTRACT")))
43241 (para (math (var "Arg0") "-" (var "Arg1"))))
43243 (code "GL_DOT3_RGB")
43246 (code "GL_DOT3_RGBA")))
43321 The scalar results for "
43322 (code "GL_DOT3_RGB")
43324 (code "GL_DOT3_RGBA")
43326 into each of the 3 (RGB) or 4 (RGBA) components on output. ")
43329 (code "GL_COMBINE_ALPHA")
43331 (code "GL_REPLACE")
43333 (code "GL_MODULATE")
43337 (code "GL_ADD_SIGNED")
43339 (code "GL_INTERPOLATE")
43341 (code "GL_SUBTRACT")
43342 ". The following table describes how alpha values are
43345 (table (% (formatter (asis)))
43346 (entry (% (heading (strong (code "GL_COMBINE_ALPHA"))))
43347 (para (strong "Texture Function")))
43348 (entry (% (heading (code "GL_REPLACE")))
43349 (para (math (var "Arg0"))))
43350 (entry (% (heading (code "GL_MODULATE")))
43351 (para (math (var "Arg0") "×" (var "Arg1"))))
43352 (entry (% (heading (code "GL_ADD")))
43353 (para (math (var "Arg0") "+" (var "Arg1"))))
43354 (entry (% (heading (code "GL_ADD_SIGNED")))
43355 (para (math (var "Arg0") "+" (var "Arg1") "-" "0.5")))
43356 (entry (% (heading (code "GL_INTERPOLATE")))
43357 (para (math (var "Arg0")
43369 (entry (% (heading (code "GL_SUBTRACT")))
43370 (para (math (var "Arg0") "-" (var "Arg1")))))
43372 In the following tables, the value "
43373 (math (var "C") "_" (var "s"))
43375 represents the color sampled
43376 from the currently bound texture, "
43377 (math (var "C") "_" (var "c"))
43379 represents the constant
43380 texture-environment color, "
43381 (math (var "C") "_" (var "f"))
43383 represents the primary color of the
43384 incoming fragment, and "
43385 (math (var "C") "_" (var "p"))
43387 represents the color computed from the
43388 previous texture stage or "
43389 (math (var "C") "_" (var "f"))
43391 if processing texture stage 0. Likewise, "
43392 (math (var "A") "_" (var "s"))
43394 (math (var "A") "_" (var "c"))
43396 (math (var "A") "_" (var "f"))
43399 (math (var "A") "_" (var "p"))
43401 represent the respective
43404 The following table describes the values assigned to "
43405 (math (var "Arg0"))
43407 (math (var "Arg1"))
43410 (math (var "Arg2"))
43412 based upon the RGB sources and operands: ")
43414 (table (% (formatter (asis)))
43415 (entry (% (heading (strong (code "GL_SRCn_RGB"))))
43416 (para (strong (code "GL_OPERANDn_RGB"))
43418 (strong "Argument Value")))
43419 (entry (% (heading (code "GL_TEXTURE")))
43420 (para (code "GL_SRC_COLOR")
43422 (math (var "C") "_" (var "s") ",")))
43423 (entry (% (heading))
43424 (para (code "GL_ONE_MINUS_SRC_COLOR")
43426 (math "1" "-" (var "C") "_" (var "s") ",")))
43427 (entry (% (heading))
43428 (para (code "GL_SRC_ALPHA")
43430 (math (var "A") "_" (var "s") ",")))
43431 (entry (% (heading))
43432 (para (code "GL_ONE_MINUS_SRC_ALPHA")
43434 (math "1" "-" (var "A") "_" (var "s") ",")))
43435 (entry (% (heading (code "GL_TEXTUREn")))
43436 (para (code "GL_SRC_COLOR")
43438 (math (var "C") "_" (var "s") ",")))
43439 (entry (% (heading))
43440 (para (code "GL_ONE_MINUS_SRC_COLOR")
43442 (math "1" "-" (var "C") "_" (var "s") ",")))
43443 (entry (% (heading))
43444 (para (code "GL_SRC_ALPHA")
43446 (math (var "A") "_" (var "s") ",")))
43447 (entry (% (heading))
43448 (para (code "GL_ONE_MINUS_SRC_ALPHA")
43450 (math "1" "-" (var "A") "_" (var "s") ",")))
43451 (entry (% (heading (code "GL_CONSTANT")))
43452 (para (code "GL_SRC_COLOR")
43454 (math (var "C") "_" (var "c") ",")))
43455 (entry (% (heading))
43456 (para (code "GL_ONE_MINUS_SRC_COLOR")
43458 (math "1" "-" (var "C") "_" (var "c") ",")))
43459 (entry (% (heading))
43460 (para (code "GL_SRC_ALPHA")
43462 (math (var "A") "_" (var "c") ",")))
43463 (entry (% (heading))
43464 (para (code "GL_ONE_MINUS_SRC_ALPHA")
43466 (math "1" "-" (var "A") "_" (var "c") ",")))
43467 (entry (% (heading (code "GL_PRIMARY_COLOR")))
43468 (para (code "GL_SRC_COLOR")
43470 (math (var "C") "_" (var "f") ",")))
43471 (entry (% (heading))
43472 (para (code "GL_ONE_MINUS_SRC_COLOR")
43474 (math "1" "-" (var "C") "_" (var "f") ",")))
43475 (entry (% (heading))
43476 (para (code "GL_SRC_ALPHA")
43478 (math (var "A") "_" (var "f") ",")))
43479 (entry (% (heading))
43480 (para (code "GL_ONE_MINUS_SRC_ALPHA")
43482 (math "1" "-" (var "A") "_" (var "f") ",")))
43483 (entry (% (heading (code "GL_PREVIOUS")))
43484 (para (code "GL_SRC_COLOR")
43486 (math (var "C") "_" (var "p") ",")))
43487 (entry (% (heading))
43488 (para (code "GL_ONE_MINUS_SRC_COLOR")
43490 (math "1" "-" (var "C") "_" (var "p") ",")))
43491 (entry (% (heading))
43492 (para (code "GL_SRC_ALPHA")
43494 (math (var "A") "_" (var "p") ",")))
43495 (entry (% (heading))
43496 (para (code "GL_ONE_MINUS_SRC_ALPHA")
43498 (math "1" "-" (var "A") "_" (var "p") ","))))
43501 (code "GL_TEXTUREn")
43503 (math (var "C") "_" (var "s"))
43506 (math (var "A") "_" (var "s"))
43508 represent the color
43509 and alpha, respectively, produced from texture stage "
43513 The follow table describes the values assigned to "
43514 (math (var "Arg0"))
43516 (math (var "Arg1"))
43519 (math (var "Arg2"))
43521 based upon the alpha sources and operands: ")
43523 (table (% (formatter (asis)))
43524 (entry (% (heading (strong (code "GL_SRCn_ALPHA"))))
43525 (para (strong (code "GL_OPERANDn_ALPHA"))
43527 (strong "Argument Value")))
43528 (entry (% (heading (code "GL_TEXTURE")))
43529 (para (code "GL_SRC_ALPHA")
43531 (math (var "A") "_" (var "s") ",")))
43532 (entry (% (heading))
43533 (para (code "GL_ONE_MINUS_SRC_ALPHA")
43535 (math "1" "-" (var "A") "_" (var "s") ",")))
43536 (entry (% (heading (code "GL_TEXTUREn")))
43537 (para (code "GL_SRC_ALPHA")
43539 (math (var "A") "_" (var "s") ",")))
43540 (entry (% (heading))
43541 (para (code "GL_ONE_MINUS_SRC_ALPHA")
43543 (math "1" "-" (var "A") "_" (var "s") ",")))
43544 (entry (% (heading (code "GL_CONSTANT")))
43545 (para (code "GL_SRC_ALPHA")
43547 (math (var "A") "_" (var "c") ",")))
43548 (entry (% (heading))
43549 (para (code "GL_ONE_MINUS_SRC_ALPHA")
43551 (math "1" "-" (var "A") "_" (var "c") ",")))
43552 (entry (% (heading (code "GL_PRIMARY_COLOR")))
43553 (para (code "GL_SRC_ALPHA")
43555 (math (var "A") "_" (var "f") ",")))
43556 (entry (% (heading))
43557 (para (code "GL_ONE_MINUS_SRC_ALPHA")
43559 (math "1" "-" (var "A") "_" (var "f") ",")))
43560 (entry (% (heading (code "GL_PREVIOUS")))
43561 (para (code "GL_SRC_ALPHA")
43563 (math (var "A") "_" (var "p") ",")))
43564 (entry (% (heading))
43565 (para (code "GL_ONE_MINUS_SRC_ALPHA")
43567 (math "1" "-" (var "A") "_" (var "p") ","))))
43569 The RGB and alpha results of the texture function are multipled by the
43571 (code "GL_RGB_SCALE")
43573 (code "GL_ALPHA_SCALE")
43574 ", respectively, and
43575 clamped to the range "
43576 (math "[" "0" "," "1" "]")
43582 (code "GL_TEXTURE_ENV_COLOR")
43585 " is a pointer to an array that holds an RGBA color consisting of four
43587 Integer color components are interpreted linearly such that the most
43588 positive integer maps to 1.0,
43589 and the most negative integer maps to -1.0.
43590 The values are clamped to the range [0,1] when they are specified. "
43591 (math (var "C") "_" (var "c"))
43593 takes these four values. ")
43598 (code "GL_TEXTURE_LOD_BIAS")
43599 ", the value specified is added to the
43600 texture level-of-detail parameter, that selects which mipmap, or mipmaps
43601 depending upon the selected "
43602 (code "GL_TEXTURE_MIN_FILTER")
43603 ", will be sampled. ")
43604 (para (code "GL_TEXTURE_ENV_MODE")
43606 (code "GL_MODULATE")
43608 (code "GL_TEXTURE_ENV_COLOR")
43609 " defaults to (0, 0, 0, 0). ")
43614 (code "GL_POINT_SPRITE")
43618 (code "GL_COORD_REPLACE")
43619 ", the boolean value specified
43620 is used to either enable or disable point sprite texture coordinate replacement. The default value is "
43624 (para (code "GL_INVALID_ENUM")
43625 " is generated when "
43630 one of the accepted defined values,
43633 " should have a defined constant value
43634 (based on the value of "
43638 (para (code "GL_INVALID_VALUE")
43639 " is generated if the "
43642 (code "GL_RGB_SCALE")
43644 (code "GL_ALPHA_SCALE")
43645 " are not one of 1.0, 2.0,
43647 (para (code "GL_INVALID_OPERATION")
43648 " is generated if "
43651 is executed between the execution of "
43654 and the corresponding execution of "
43658 (define-gl-procedure
43663 (funcdef "void " (function "glTexGeni"))
43664 (paramdef "GLenum " (parameter "coord"))
43665 (paramdef "GLenum " (parameter "pname"))
43666 (paramdef "GLint " (parameter "param"))))
43669 "control the generation of texture coordinates")
43670 (heading "Parameters")
43671 (table (% (formatter (asis)))
43672 (entry (% (heading (var "coord")))
43674 Specifies a texture coordinate.
43684 (entry (% (heading (var "pname")))
43686 Specifies the symbolic name of the texture-coordinate generation function.
43688 (code "GL_TEXTURE_GEN_MODE")
43690 (entry (% (heading (var "param")))
43692 Specifies a single-valued texture generation parameter,
43694 (code "GL_OBJECT_LINEAR")
43696 (code "GL_EYE_LINEAR")
43698 (code "GL_SPHERE_MAP")
43700 (code "GL_NORMAL_MAP")
43702 (code "GL_REFLECTION_MAP")
43704 (heading "Description")
43705 (para (code "glTexGen")
43706 " selects a texture-coordinate generation function
43707 or supplies coefficients for one of the functions. "
43709 " names one of the ("
43718 coordinates; it must be one of the symbols "
43728 " must be one of three symbolic constants: "
43729 (code "GL_TEXTURE_GEN_MODE")
43731 (code "GL_OBJECT_PLANE")
43733 (code "GL_EYE_PLANE")
43738 (code "GL_TEXTURE_GEN_MODE")
43744 (code "GL_OBJECT_LINEAR")
43746 (code "GL_EYE_LINEAR")
43748 (code "GL_SPHERE_MAP")
43750 (code "GL_NORMAL_MAP")
43752 (code "GL_REFLECTION_MAP")
43757 (code "GL_OBJECT_PLANE")
43759 (code "GL_EYE_PLANE")
43762 " contains coefficients for the corresponding
43763 texture generation function. ")
43765 If the texture generation function is "
43766 (code "GL_OBJECT_LINEAR")
43769 (para (math (var "g")
43806 is the value computed for the coordinate named in "
43809 (math (var "p") "_" "1")
43811 (math (var "p") "_" "2")
43813 (math (var "p") "_" "3")
43816 (math (var "p") "_" "4")
43818 are the four values supplied in "
43821 (math (var "x") "_" (var "o"))
43823 (math (var "y") "_" (var "o"))
43825 (math (var "z") "_" (var "o"))
43828 (math (var "w") "_" (var "o"))
43830 are the object coordinates of the vertex.
43831 This function can be used, for example, to texture-map terrain using sea level
43832 as a reference plane
43834 (math (var "p") "_" "1")
43836 (math (var "p") "_" "2")
43838 (math (var "p") "_" "3")
43841 (math (var "p") "_" "4")
43843 The altitude of a terrain vertex is computed by the "
43844 (code "GL_OBJECT_LINEAR")
43846 coordinate generation function as its distance from sea level;
43847 that altitude can then be used to index the texture image to map white snow
43848 onto peaks and green grass onto foothills. ")
43850 If the texture generation function is "
43851 (code "GL_EYE_LINEAR")
43853 (para (math (var "g")
43955 (math (var "x") "_" (var "e"))
43957 (math (var "y") "_" (var "e"))
43959 (math (var "z") "_" (var "e"))
43962 (math (var "w") "_" (var "e"))
43964 are the eye coordinates of the vertex, "
43965 (math (var "p") "_" "1")
43967 (math (var "p") "_" "2")
43969 (math (var "p") "_" "3")
43972 (math (var "p") "_" "4")
43974 are the values supplied in "
43979 is the modelview matrix when "
43985 is poorly conditioned or singular,
43986 texture coordinates generated by the resulting function may be inaccurate
43989 Note that the values in "
43991 " define a reference plane in eye coordinates.
43992 The modelview matrix that is applied to them may not be the same one
43993 in effect when the polygon vertices are transformed.
43994 This function establishes a field of texture coordinates
43995 that can produce dynamic contour lines on moving objects. ")
43997 If the texture generation function is "
43998 (code "GL_SPHERE_MAP")
44011 texture coordinates are generated as follows.
44014 " be the unit vector pointing from the origin to the polygon vertex
44015 (in eye coordinates).
44018 " sup prime be the current normal,
44019 after transformation to eye coordinates.
44021 (para (math (var "f")
44040 be the reflection vector such that ")
44041 (para (math (var "f")
44094 Then the values assigned to the "
44100 texture coordinates are ")
44101 (para (math (var "s")
44112 (para (math (var "t")
44124 To enable or disable a texture-coordinate generation function, call "
44129 with one of the symbolic texture-coordinate names
44131 (code "GL_TEXTURE_GEN_S")
44133 (code "GL_TEXTURE_GEN_T")
44135 (code "GL_TEXTURE_GEN_R")
44137 (code "GL_TEXTURE_GEN_Q")
44138 ") as the argument.
44140 the specified texture coordinate is computed
44141 according to the generating function associated with that coordinate.
44143 subsequent vertices take the specified texture coordinate
44144 from the current set of texture coordinates. Initially, all texture
44145 generation functions are set to "
44146 (code "GL_EYE_LINEAR")
44147 " and are disabled.
44151 plane equations are (1, 0, 0, 0),
44155 plane equations are (0, 1, 0, 0),
44162 plane equations are (0, 0, 0, 0). ")
44165 (code "ARB_multitexture")
44166 " extension is supported, "
44169 texture generation parameters for the currently active texture unit,
44171 (code "glActiveTexture")
44174 (para (code "GL_INVALID_ENUM")
44175 " is generated when "
44180 accepted defined value,
44184 (code "GL_TEXTURE_GEN_MODE")
44188 accepted defined value. ")
44189 (para (code "GL_INVALID_ENUM")
44190 " is generated when "
44193 (code "GL_TEXTURE_GEN_MODE")
44197 (code "GL_SPHERE_MAP")
44206 (para (code "GL_INVALID_OPERATION")
44207 " is generated if "
44210 is executed between the execution of "
44213 and the corresponding execution of "
44217 (define-gl-procedure
44222 (funcdef "void " (function "glTexImage1D"))
44223 (paramdef "GLenum " (parameter "target"))
44224 (paramdef "GLint " (parameter "level"))
44225 (paramdef "GLint " (parameter "internalFormat"))
44226 (paramdef "GLsizei " (parameter "width"))
44227 (paramdef "GLint " (parameter "border"))
44228 (paramdef "GLenum " (parameter "format"))
44229 (paramdef "GLenum " (parameter "type"))
44230 (paramdef "const GLvoid * " (parameter "data"))))
44233 "specify a one-dimensional texture image")
44234 (heading "Parameters")
44235 (table (% (formatter (asis)))
44236 (entry (% (heading (var "target")))
44238 Specifies the target texture.
44240 (code "GL_TEXTURE_1D")
44242 (code "GL_PROXY_TEXTURE_1D")
44244 (entry (% (heading (var "level")))
44246 Specifies the level-of-detail number.
44247 Level 0 is the base image level.
44252 "th mipmap reduction image. "))
44253 (entry (% (heading (var "internalFormat")))
44255 Specifies the number of color components in the texture.
44256 Must be 1, 2, 3, or 4, or one of the following symbolic constants: "
44263 (code "GL_ALPHA12")
44265 (code "GL_ALPHA16")
44267 (code "GL_COMPRESSED_ALPHA")
44269 (code "GL_COMPRESSED_LUMINANCE")
44271 (code "GL_COMPRESSED_LUMINANCE_ALPHA")
44273 (code "GL_COMPRESSED_INTENSITY")
44275 (code "GL_COMPRESSED_RGB")
44277 (code "GL_COMPRESSED_RGBA")
44279 (code "GL_DEPTH_COMPONENT")
44281 (code "GL_DEPTH_COMPONENT16")
44283 (code "GL_DEPTH_COMPONENT24")
44285 (code "GL_DEPTH_COMPONENT32")
44287 (code "GL_LUMINANCE")
44289 (code "GL_LUMINANCE4")
44291 (code "GL_LUMINANCE8")
44293 (code "GL_LUMINANCE12")
44295 (code "GL_LUMINANCE16")
44297 (code "GL_LUMINANCE_ALPHA")
44299 (code "GL_LUMINANCE4_ALPHA4")
44301 (code "GL_LUMINANCE6_ALPHA2")
44303 (code "GL_LUMINANCE8_ALPHA8")
44305 (code "GL_LUMINANCE12_ALPHA4")
44307 (code "GL_LUMINANCE12_ALPHA12")
44309 (code "GL_LUMINANCE16_ALPHA16")
44311 (code "GL_INTENSITY")
44313 (code "GL_INTENSITY4")
44315 (code "GL_INTENSITY8")
44317 (code "GL_INTENSITY12")
44319 (code "GL_INTENSITY16")
44321 (code "GL_R3_G3_B2")
44343 (code "GL_RGB5_A1")
44347 (code "GL_RGB10_A2")
44353 (code "GL_SLUMINANCE")
44355 (code "GL_SLUMINANCE8")
44357 (code "GL_SLUMINANCE_ALPHA")
44359 (code "GL_SLUMINANCE8_ALPHA8")
44365 (code "GL_SRGB_ALPHA")
44367 (code "GL_SRGB8_ALPHA8")
44369 (entry (% (heading (var "width")))
44371 Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be "
44387 implementations support texture images that are at least 64 texels
44388 wide. The height of the 1D texture image is 1. "))
44389 (entry (% (heading (var "border")))
44391 Specifies the width of the border.
44392 Must be either 0 or 1. "))
44393 (entry (% (heading (var "format")))
44395 Specifies the format of the pixel data.
44396 The following symbolic values are accepted: "
44397 (code "GL_COLOR_INDEX")
44415 (code "GL_LUMINANCE")
44417 (code "GL_LUMINANCE_ALPHA")
44419 (entry (% (heading (var "type")))
44421 Specifies the data type of the pixel data.
44422 The following symbolic values are accepted: "
44423 (code "GL_UNSIGNED_BYTE")
44429 (code "GL_UNSIGNED_SHORT")
44433 (code "GL_UNSIGNED_INT")
44439 (code "GL_UNSIGNED_BYTE_3_3_2")
44441 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
44443 (code "GL_UNSIGNED_SHORT_5_6_5")
44445 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
44447 (code "GL_UNSIGNED_SHORT_4_4_4_4")
44449 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
44451 (code "GL_UNSIGNED_SHORT_5_5_5_1")
44453 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
44455 (code "GL_UNSIGNED_INT_8_8_8_8")
44457 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
44459 (code "GL_UNSIGNED_INT_10_10_10_2")
44461 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
44463 (entry (% (heading (var "data")))
44465 Specifies a pointer to the image data in memory. ")))
44466 (heading "Description")
44468 Texturing maps a portion of a specified texture image
44469 onto each graphical primitive for which texturing is enabled.
44470 To enable and disable one-dimensional texturing, call "
44476 (code "GL_TEXTURE_1D")
44479 Texture images are defined with "
44480 (code "glTexImage1D")
44482 The arguments describe the parameters of the texture image,
44484 width of the border,
44485 level-of-detail number
44487 (code "glTexParameter")
44489 and the internal resolution and format used to store the image.
44490 The last three arguments describe how the image is represented in
44491 memory; they are identical to the pixel formats used for "
44492 (code "glDrawPixels")
44498 (code "GL_PROXY_TEXTURE_1D")
44499 ", no data is read from "
44502 all of the texture image state is recalculated, checked for
44503 consistency, and checked against the implementation's capabilities.
44504 If the implementation cannot handle a texture of the
44505 requested texture size, it sets all of the image state to 0,
44506 but does not generate an error (see "
44507 (code "glGetError")
44508 "). To query for an
44509 entire mipmap array, use an image array level greater than or equal to
44515 (code "GL_TEXTURE_1D")
44517 data is read from "
44519 " as a sequence of signed or unsigned bytes,
44522 or single-precision floating-point values,
44526 These values are grouped into sets of one,
44539 the data is considered as a string of unsigned bytes
44543 (code "GL_COLOR_INDEX")
44545 Each data byte is treated as eight 1-bit elements,
44546 with bit ordering determined by "
44547 (code "GL_UNPACK_LSB_FIRST")
44550 (code "glPixelStore")
44553 If a non-zero named buffer object is bound to the "
44554 (code "GL_PIXEL_UNPACK_BUFFER")
44557 (code "glBindBuffer")
44558 ") while a texture image is
44561 " is treated as a byte offset into the buffer object's data store. ")
44563 The first element corresponds to the left end of the texture array.
44564 Subsequent elements progress left-to-right through the remaining texels
44565 in the texture array.
44566 The final element corresponds to the right end of the texture array. ")
44567 (para (var "format")
44568 " determines the composition of each element in "
44571 It can assume one of these symbolic values: ")
44572 (table (% (formatter (asis)))
44573 (entry (% (heading (code "GL_COLOR_INDEX")))
44575 Each element is a single value,
44577 The GL converts it to fixed point
44578 (with an unspecified number of zero bits to the right of the binary point),
44579 shifted left or right depending on the value and sign of "
44580 (code "GL_INDEX_SHIFT")
44583 (code "GL_INDEX_OFFSET")
44586 (code "glPixelTransfer")
44588 The resulting index is converted to a set of color components
44590 (code "GL_PIXEL_MAP_I_TO_R")
44592 (code "GL_PIXEL_MAP_I_TO_G")
44594 (code "GL_PIXEL_MAP_I_TO_B")
44596 (code "GL_PIXEL_MAP_I_TO_A")
44598 and clamped to the range [0,1]. "))
44599 (entry (% (heading (code "GL_RED")))
44601 Each element is a single red component.
44602 The GL converts it to floating point and assembles it into an RGBA element
44603 by attaching 0 for green and blue, and 1 for alpha.
44604 Each component is then multiplied by the signed scale factor "
44605 (code "GL_c_SCALE")
44607 added to the signed bias "
44610 and clamped to the range [0,1]
44612 (code "glPixelTransfer")
44614 (entry (% (heading (code "GL_GREEN")))
44616 Each element is a single green component.
44617 The GL converts it to floating point and assembles it into an RGBA element
44618 by attaching 0 for red and blue, and 1 for alpha.
44619 Each component is then multiplied by the signed scale factor "
44620 (code "GL_c_SCALE")
44622 added to the signed bias "
44625 and clamped to the range [0,1]
44627 (code "glPixelTransfer")
44629 (entry (% (heading (code "GL_BLUE")))
44631 Each element is a single blue component.
44632 The GL converts it to floating point and assembles it into an RGBA element
44633 by attaching 0 for red and green, and 1 for alpha.
44634 Each component is then multiplied by the signed scale factor "
44635 (code "GL_c_SCALE")
44637 added to the signed bias "
44640 and clamped to the range [0,1]
44642 (code "glPixelTransfer")
44644 (entry (% (heading (code "GL_ALPHA")))
44646 Each element is a single alpha component.
44647 The GL converts it to floating point and assembles it into an RGBA element
44648 by attaching 0 for red, green, and blue.
44649 Each component is then multiplied by the signed scale factor "
44650 (code "GL_c_SCALE")
44652 added to the signed bias "
44655 and clamped to the range [0,1]
44657 (code "glPixelTransfer")
44659 (entry (% (heading (code "GL_INTENSITY")))
44661 Each element is a single intensity value.
44662 The GL converts it to floating point,
44663 then assembles it into an RGBA element by replicating the intensity value
44664 three times for red, green, blue, and alpha.
44665 Each component is then multiplied by the signed scale factor "
44666 (code "GL_c_SCALE")
44668 added to the signed bias "
44671 and clamped to the range [0,1]
44673 (code "glPixelTransfer")
44675 (entry (% (heading (code "GL_RGB"))))
44676 (entry (% (heading (code "GL_BGR")))
44678 Each element is an RGB triple.
44679 The GL converts it to floating point and assembles it into an RGBA element
44680 by attaching 1 for alpha.
44681 Each component is then multiplied by the signed scale factor "
44682 (code "GL_c_SCALE")
44684 added to the signed bias "
44687 and clamped to the range [0,1]
44689 (code "glPixelTransfer")
44691 (entry (% (heading (code "GL_RGBA"))))
44692 (entry (% (heading (code "GL_BGRA")))
44694 Each element contains all four components.
44695 Each component is multiplied by the signed scale factor "
44696 (code "GL_c_SCALE")
44698 added to the signed bias "
44701 and clamped to the range [0,1]
44703 (code "glPixelTransfer")
44705 (entry (% (heading (code "GL_LUMINANCE")))
44707 Each element is a single luminance value.
44708 The GL converts it to floating point,
44709 then assembles it into an RGBA element by replicating the luminance value
44710 three times for red, green, and blue and attaching 1 for alpha.
44711 Each component is then multiplied by the signed scale factor "
44712 (code "GL_c_SCALE")
44714 added to the signed bias "
44717 and clamped to the range [0,1]
44719 (code "glPixelTransfer")
44721 (entry (% (heading (code "GL_LUMINANCE_ALPHA")))
44723 Each element is a luminance/alpha pair.
44724 The GL converts it to floating point,
44725 then assembles it into an RGBA element by replicating the luminance value
44726 three times for red, green, and blue.
44727 Each component is then multiplied by the signed scale factor "
44728 (code "GL_c_SCALE")
44730 added to the signed bias "
44733 and clamped to the range [0,1] (see "
44734 (code "glPixelTransfer")
44736 (entry (% (heading (code "GL_DEPTH_COMPONENT")))
44738 Each element is a single depth value.
44739 The GL converts it to floating point, multiplies by the signed scale factor "
44740 (code "GL_DEPTH_SCALE")
44741 ", adds the signed bias "
44742 (code "GL_DEPTH_BIAS")
44744 and clamps to the range [0,1] (see "
44745 (code "glPixelTransfer")
44749 (code "glDrawPixels")
44750 " reference page for a description of
44751 the acceptable values for the "
44755 If an application wants to store the texture at a certain
44756 resolution or in a certain format, it can request the resolution
44758 (var "internalFormat")
44759 ". The GL will choose an internal
44760 representation that closely approximates that requested by "
44761 (var "internalFormat")
44763 it may not match exactly.
44764 (The representations specified by "
44765 (code "GL_LUMINANCE")
44767 (code "GL_LUMINANCE_ALPHA")
44773 " must match exactly. The numeric values 1, 2, 3, and 4
44774 may also be used to specify the above representations.) ")
44777 (var "internalFormat")
44778 " parameter is one of the generic compressed formats,\t"
44779 (code "GL_COMPRESSED_ALPHA")
44781 (code "GL_COMPRESSED_INTENSITY")
44783 (code "GL_COMPRESSED_LUMINANCE")
44785 (code "GL_COMPRESSED_LUMINANCE_ALPHA")
44787 (code "GL_COMPRESSED_RGB")
44789 (code "GL_COMPRESSED_RGBA")
44790 ", the GL will replace the internal format with the symbolic constant for a specific internal format and compress the texture before storage. If no corresponding internal format is available, or the GL can not compress that image for any reason, the internal format is instead replaced with a corresponding base internal format. ")
44793 (var "internalFormat")
44799 (code "GL_SRGB_ALPHA")
44801 (code "GL_SRGB8_ALPHA8")
44803 (code "GL_SLUMINANCE")
44805 (code "GL_SLUMINANCE8")
44807 (code "GL_SLUMINANCE_ALPHA")
44809 (code "GL_SLUMINANCE8_ALPHA8")
44810 ", the texture is treated as if the red, green, blue, or luminance components are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion from the sRGB encoded component\t"
44811 (math (var "c") "_" (var "s"))
44813 to a linear component\t"
44814 (math (var "c") "_" (var "l"))
44817 (para (math (var "c")
44863 (math (var "c") "_" (var "s"))
44865 is the sRGB component in the range [0,1]. ")
44868 (code "GL_PROXY_TEXTURE_1D")
44869 " target to try out a resolution and
44870 format. The implementation will
44871 update and recompute its best match for the requested storage resolution
44872 and format. To then query this state, call "
44873 (code "glGetTexLevelParameter")
44875 If the texture cannot be accommodated, texture state is set to 0. ")
44877 A one-component texture image uses only the red component of the RGBA
44881 A two-component image uses the R and A values.
44882 A three-component image uses the R, G, and B values.
44883 A four-component image uses all of the RGBA components. ")
44885 Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures during texture filtering and application.\xa0Image-based shadowing\xa0can\xa0be\xa0enabled\xa0by\xa0comparing texture r coordinates to depth texture values to generate a boolean result. See "
44886 (code "glTexParameter")
44887 " for details on texture comparison. ")
44889 (para (code "GL_INVALID_ENUM")
44890 " is generated if "
44893 (code "GL_TEXTURE_1D")
44896 (code "GL_PROXY_TEXTURE_1D")
44898 (para (code "GL_INVALID_ENUM")
44899 " is generated if "
44901 " is not an accepted
44902 format constant. Format constants other than "
44903 (code "GL_STENCIL_INDEX")
44906 (para (code "GL_INVALID_ENUM")
44907 " is generated if "
44909 " is not a type constant. ")
44910 (para (code "GL_INVALID_ENUM")
44911 " is generated if "
44918 (code "GL_COLOR_INDEX")
44920 (para (code "GL_INVALID_VALUE")
44921 " is generated if "
44923 " is less than 0. ")
44924 (para (code "GL_INVALID_VALUE")
44925 " may be generated if "
44927 " is greater than "
44939 " is the returned value of "
44940 (code "GL_MAX_TEXTURE_SIZE")
44942 (para (code "GL_INVALID_VALUE")
44943 " is generated if "
44944 (var "internalFormat")
44945 " is not 1, 2, 3, 4, or
44946 one of the accepted resolution and format symbolic constants. ")
44947 (para (code "GL_INVALID_VALUE")
44948 " is generated if "
44951 or greater than 2 + "
44952 (code "GL_MAX_TEXTURE_SIZE")
44954 (para (code "GL_INVALID_VALUE")
44955 " is generated if non-power-of-two textures are not supported and the "
44957 " cannot be represented as\t"
44969 for some integer value of "
44972 (para (code "GL_INVALID_VALUE")
44973 " is generated if "
44975 " is not 0 or 1. ")
44976 (para (code "GL_INVALID_OPERATION")
44977 " is generated if "
44980 (code "GL_UNSIGNED_BYTE_3_3_2")
44982 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
44984 (code "GL_UNSIGNED_SHORT_5_6_5")
44986 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
44993 (para (code "GL_INVALID_OPERATION")
44994 " is generated if "
44997 (code "GL_UNSIGNED_SHORT_4_4_4_4")
44999 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
45001 (code "GL_UNSIGNED_SHORT_5_5_5_1")
45003 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
45005 (code "GL_UNSIGNED_INT_8_8_8_8")
45007 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
45009 (code "GL_UNSIGNED_INT_10_10_10_2")
45011 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
45020 (para (code "GL_INVALID_OPERATION")
45021 " is generated if "
45024 (code "GL_DEPTH_COMPONENT")
45026 (var "internalFormat")
45028 (code "GL_DEPTH_COMPONENT")
45030 (code "GL_DEPTH_COMPONENT16")
45032 (code "GL_DEPTH_COMPONENT24")
45034 (code "GL_DEPTH_COMPONENT32")
45036 (para (code "GL_INVALID_OPERATION")
45037 " is generated if "
45038 (var "internalFormat")
45040 (code "GL_DEPTH_COMPONENT")
45042 (code "GL_DEPTH_COMPONENT16")
45044 (code "GL_DEPTH_COMPONENT24")
45046 (code "GL_DEPTH_COMPONENT32")
45051 (code "GL_DEPTH_COMPONENT")
45053 (para (code "GL_INVALID_OPERATION")
45054 " is generated if a non-zero buffer object name is bound to the "
45055 (code "GL_PIXEL_UNPACK_BUFFER")
45056 " target and the buffer object's data store is currently mapped. ")
45057 (para (code "GL_INVALID_OPERATION")
45058 " is generated if a non-zero buffer object name is bound to the "
45059 (code "GL_PIXEL_UNPACK_BUFFER")
45060 " target and the data would be unpacked from the buffer
45061 object such that the memory reads required would exceed the data store size. ")
45062 (para (code "GL_INVALID_OPERATION")
45063 " is generated if a non-zero buffer object name is bound to the "
45064 (code "GL_PIXEL_UNPACK_BUFFER")
45067 " is not evenly divisible
45068 into the number of bytes needed to store in memory a datum indicated by "
45071 (para (code "GL_INVALID_OPERATION")
45072 " is generated if "
45073 (code "glTexImage1D")
45075 is executed between the execution of "
45078 and the corresponding execution of "
45082 (define-gl-procedure
45087 (funcdef "void " (function "glTexImage2D"))
45088 (paramdef "GLenum " (parameter "target"))
45089 (paramdef "GLint " (parameter "level"))
45090 (paramdef "GLint " (parameter "internalFormat"))
45091 (paramdef "GLsizei " (parameter "width"))
45092 (paramdef "GLsizei " (parameter "height"))
45093 (paramdef "GLint " (parameter "border"))
45094 (paramdef "GLenum " (parameter "format"))
45095 (paramdef "GLenum " (parameter "type"))
45096 (paramdef "const GLvoid * " (parameter "data"))))
45099 "specify a two-dimensional texture image")
45100 (heading "Parameters")
45101 (table (% (formatter (asis)))
45102 (entry (% (heading (var "target")))
45104 Specifies the target texture.
45106 (code "GL_TEXTURE_2D")
45108 (code "GL_PROXY_TEXTURE_2D")
45110 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_X")
45112 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_X")
45114 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Y")
45116 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y")
45118 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Z")
45120 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z")
45122 (code "GL_PROXY_TEXTURE_CUBE_MAP")
45124 (entry (% (heading (var "level")))
45126 Specifies the level-of-detail number.
45127 Level 0 is the base image level.
45132 "th mipmap reduction image. "))
45133 (entry (% (heading (var "internalFormat")))
45135 Specifies the number of color components in the texture.
45136 Must be 1, 2, 3, or 4, or one of the following symbolic constants: "
45143 (code "GL_ALPHA12")
45145 (code "GL_ALPHA16")
45147 (code "GL_COMPRESSED_ALPHA")
45149 (code "GL_COMPRESSED_LUMINANCE")
45151 (code "GL_COMPRESSED_LUMINANCE_ALPHA")
45153 (code "GL_COMPRESSED_INTENSITY")
45155 (code "GL_COMPRESSED_RGB")
45157 (code "GL_COMPRESSED_RGBA")
45159 (code "GL_DEPTH_COMPONENT")
45161 (code "GL_DEPTH_COMPONENT16")
45163 (code "GL_DEPTH_COMPONENT24")
45165 (code "GL_DEPTH_COMPONENT32")
45167 (code "GL_LUMINANCE")
45169 (code "GL_LUMINANCE4")
45171 (code "GL_LUMINANCE8")
45173 (code "GL_LUMINANCE12")
45175 (code "GL_LUMINANCE16")
45177 (code "GL_LUMINANCE_ALPHA")
45179 (code "GL_LUMINANCE4_ALPHA4")
45181 (code "GL_LUMINANCE6_ALPHA2")
45183 (code "GL_LUMINANCE8_ALPHA8")
45185 (code "GL_LUMINANCE12_ALPHA4")
45187 (code "GL_LUMINANCE12_ALPHA12")
45189 (code "GL_LUMINANCE16_ALPHA16")
45191 (code "GL_INTENSITY")
45193 (code "GL_INTENSITY4")
45195 (code "GL_INTENSITY8")
45197 (code "GL_INTENSITY12")
45199 (code "GL_INTENSITY16")
45201 (code "GL_R3_G3_B2")
45223 (code "GL_RGB5_A1")
45227 (code "GL_RGB10_A2")
45233 (code "GL_SLUMINANCE")
45235 (code "GL_SLUMINANCE8")
45237 (code "GL_SLUMINANCE_ALPHA")
45239 (code "GL_SLUMINANCE8_ALPHA8")
45245 (code "GL_SRGB_ALPHA")
45247 (code "GL_SRGB8_ALPHA8")
45249 (entry (% (heading (var "width")))
45251 Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be "
45267 implementations support texture images that are at least 64 texels
45269 (entry (% (heading (var "height")))
45271 Specifies the height of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be "
45287 implementations support texture images that are at least 64 texels
45289 (entry (% (heading (var "border")))
45291 Specifies the width of the border.
45292 Must be either 0 or 1. "))
45293 (entry (% (heading (var "format")))
45295 Specifies the format of the pixel data.
45296 The following symbolic values are accepted: "
45297 (code "GL_COLOR_INDEX")
45315 (code "GL_LUMINANCE")
45317 (code "GL_LUMINANCE_ALPHA")
45319 (entry (% (heading (var "type")))
45321 Specifies the data type of the pixel data.
45322 The following symbolic values are accepted: "
45323 (code "GL_UNSIGNED_BYTE")
45329 (code "GL_UNSIGNED_SHORT")
45333 (code "GL_UNSIGNED_INT")
45339 (code "GL_UNSIGNED_BYTE_3_3_2")
45341 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
45343 (code "GL_UNSIGNED_SHORT_5_6_5")
45345 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
45347 (code "GL_UNSIGNED_SHORT_4_4_4_4")
45349 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
45351 (code "GL_UNSIGNED_SHORT_5_5_5_1")
45353 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
45355 (code "GL_UNSIGNED_INT_8_8_8_8")
45357 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
45359 (code "GL_UNSIGNED_INT_10_10_10_2")
45361 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
45363 (entry (% (heading (var "data")))
45365 Specifies a pointer to the image data in memory. ")))
45366 (heading "Description")
45368 Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled. To enable and disable two-dimensional texturing, call "
45373 (code "GL_TEXTURE_2D")
45374 ". To enable and disable texturing using cube-mapped texture, call "
45379 (code "GL_TEXTURE_CUBE_MAP")
45382 To define texture images, call "
45383 (code "glTexImage2D")
45385 The arguments describe the parameters of the texture image,
45388 width of the border,
45389 level-of-detail number
45391 (code "glTexParameter")
45393 and number of color components provided.
45394 The last three arguments describe how the image is represented in memory;
45395 they are identical to the pixel formats used for "
45396 (code "glDrawPixels")
45402 (code "GL_PROXY_TEXTURE_2D")
45404 (code "GL_PROXY_TEXTURE_CUBE_MAP")
45405 ", no data is read from "
45408 all of the texture image state is recalculated, checked for
45409 consistency, and checked
45410 against the implementation's capabilities. If the implementation cannot
45411 handle a texture of the requested texture size, it sets
45412 all of the image state to 0,
45413 but does not generate an error (see "
45414 (code "glGetError")
45415 "). To query for an
45416 entire mipmap array, use an image array level greater than or equal to
45422 (code "GL_TEXTURE_2D")
45424 (code "GL_TEXTURE_CUBE_MAP")
45426 targets, data is read from "
45428 " as a sequence of signed or unsigned
45429 bytes, shorts, or longs, or single-precision floating-point values,
45432 ". These values are grouped into sets of one, two,
45433 three, or four values, depending on "
45435 ", to form elements. If "
45440 ", the data is considered as a string of unsigned bytes
45444 (code "GL_COLOR_INDEX")
45446 Each data byte is treated as eight 1-bit elements,
45447 with bit ordering determined by "
45448 (code "GL_UNPACK_LSB_FIRST")
45451 (code "glPixelStore")
45454 If a non-zero named buffer object is bound to the "
45455 (code "GL_PIXEL_UNPACK_BUFFER")
45458 (code "glBindBuffer")
45459 ") while a texture image is
45462 " is treated as a byte offset into the buffer object's data store. ")
45464 The first element corresponds to the lower left corner of the texture
45466 Subsequent elements progress left-to-right through the remaining texels
45467 in the lowest row of the texture image, and then in successively higher
45468 rows of the texture image.
45469 The final element corresponds to the upper right corner of the texture
45471 (para (var "format")
45472 " determines the composition of each element in "
45475 It can assume one of these symbolic values: ")
45476 (table (% (formatter (asis)))
45477 (entry (% (heading (code "GL_COLOR_INDEX")))
45479 Each element is a single value,
45481 The GL converts it to fixed point
45482 (with an unspecified number of zero bits to the right of the binary point),
45483 shifted left or right depending on the value and sign of "
45484 (code "GL_INDEX_SHIFT")
45487 (code "GL_INDEX_OFFSET")
45490 (code "glPixelTransfer")
45492 The resulting index is converted to a set of color components
45494 (code "GL_PIXEL_MAP_I_TO_R")
45496 (code "GL_PIXEL_MAP_I_TO_G")
45498 (code "GL_PIXEL_MAP_I_TO_B")
45500 (code "GL_PIXEL_MAP_I_TO_A")
45502 and clamped to the range [0,1]. "))
45503 (entry (% (heading (code "GL_RED")))
45505 Each element is a single red component.
45506 The GL converts it to floating point and assembles it into an RGBA element
45507 by attaching 0 for green and blue, and 1 for alpha.
45508 Each component is then multiplied by the signed scale factor "
45509 (code "GL_c_SCALE")
45511 added to the signed bias "
45514 and clamped to the range [0,1]
45516 (code "glPixelTransfer")
45518 (entry (% (heading (code "GL_GREEN")))
45520 Each element is a single green component.
45521 The GL converts it to floating point and assembles it into an RGBA element
45522 by attaching 0 for red and blue, and 1 for alpha.
45523 Each component is then multiplied by the signed scale factor "
45524 (code "GL_c_SCALE")
45526 added to the signed bias "
45529 and clamped to the range [0,1]
45531 (code "glPixelTransfer")
45533 (entry (% (heading (code "GL_BLUE")))
45535 Each element is a single blue component.
45536 The GL converts it to floating point and assembles it into an RGBA element
45537 by attaching 0 for red and green, and 1 for alpha.
45538 Each component is then multiplied by the signed scale factor "
45539 (code "GL_c_SCALE")
45541 added to the signed bias "
45544 and clamped to the range [0,1]
45546 (code "glPixelTransfer")
45548 (entry (% (heading (code "GL_ALPHA")))
45550 Each element is a single alpha component.
45551 The GL converts it to floating point and assembles it into an RGBA element
45552 by attaching 0 for red, green, and blue.
45553 Each component is then multiplied by the signed scale factor "
45554 (code "GL_c_SCALE")
45556 added to the signed bias "
45559 and clamped to the range [0,1]
45561 (code "glPixelTransfer")
45563 (entry (% (heading (code "GL_INTENSITY")))
45565 Each element is a single intensity value.
45566 The GL converts it to floating point,
45567 then assembles it into an RGBA element by replicating the intensity value
45568 three times for red, green, blue, and alpha.
45569 Each component is then multiplied by the signed scale factor "
45570 (code "GL_c_SCALE")
45572 added to the signed bias "
45575 and clamped to the range [0,1]
45577 (code "glPixelTransfer")
45579 (entry (% (heading (code "GL_RGB"))))
45580 (entry (% (heading (code "GL_BGR")))
45582 Each element is an RGB triple.
45583 The GL converts it to floating point and assembles it into an RGBA element
45584 by attaching 1 for alpha.
45585 Each component is then multiplied by the signed scale factor "
45586 (code "GL_c_SCALE")
45588 added to the signed bias "
45591 and clamped to the range [0,1]
45593 (code "glPixelTransfer")
45595 (entry (% (heading (code "GL_RGBA"))))
45596 (entry (% (heading (code "GL_BGRA")))
45598 Each element contains all four components.
45599 Each component is multiplied by the signed scale factor "
45600 (code "GL_c_SCALE")
45602 added to the signed bias "
45605 and clamped to the range [0,1]
45607 (code "glPixelTransfer")
45609 (entry (% (heading (code "GL_LUMINANCE")))
45611 Each element is a single luminance value.
45612 The GL converts it to floating point,
45613 then assembles it into an RGBA element by replicating the luminance value
45614 three times for red, green, and blue and attaching 1 for alpha.
45615 Each component is then multiplied by the signed scale factor "
45616 (code "GL_c_SCALE")
45618 added to the signed bias "
45621 and clamped to the range [0,1]
45623 (code "glPixelTransfer")
45625 (entry (% (heading (code "GL_LUMINANCE_ALPHA")))
45627 Each element is a luminance/alpha pair.
45628 The GL converts it to floating point,
45629 then assembles it into an RGBA element by replicating the luminance value
45630 three times for red, green, and blue.
45631 Each component is then multiplied by the signed scale factor "
45632 (code "GL_c_SCALE")
45634 added to the signed bias "
45637 and clamped to the range [0,1] (see "
45638 (code "glPixelTransfer")
45640 (entry (% (heading (code "GL_DEPTH_COMPONENT")))
45642 Each element is a single depth value.
45643 The GL converts it to floating point, multiplies by the signed scale factor "
45644 (code "GL_DEPTH_SCALE")
45645 ", adds the signed bias "
45646 (code "GL_DEPTH_BIAS")
45648 and clamps to the range [0,1] (see "
45649 (code "glPixelTransfer")
45653 (code "glDrawPixels")
45654 " reference page for a description of
45655 the acceptable values for the "
45659 If an application wants to store the texture at a certain
45660 resolution or in a certain format, it can request the resolution
45662 (var "internalFormat")
45663 ". The GL will choose an internal
45664 representation that closely approximates that requested by "
45665 (var "internalFormat")
45667 it may not match exactly.
45668 (The representations specified by "
45669 (code "GL_LUMINANCE")
45671 (code "GL_LUMINANCE_ALPHA")
45677 " must match exactly. The numeric values 1, 2, 3, and 4
45678 may also be used to specify the above representations.) ")
45681 (var "internalFormat")
45682 " parameter is one of the generic compressed formats,\t"
45683 (code "GL_COMPRESSED_ALPHA")
45685 (code "GL_COMPRESSED_INTENSITY")
45687 (code "GL_COMPRESSED_LUMINANCE")
45689 (code "GL_COMPRESSED_LUMINANCE_ALPHA")
45691 (code "GL_COMPRESSED_RGB")
45693 (code "GL_COMPRESSED_RGBA")
45694 ", the GL will replace the internal format with the symbolic constant for a specific internal format and compress the texture before storage. If no corresponding internal format is available, or the GL can not compress that image for any reason, the internal format is instead replaced with a corresponding base internal format. ")
45697 (var "internalFormat")
45703 (code "GL_SRGB_ALPHA")
45705 (code "GL_SRGB8_ALPHA8")
45707 (code "GL_SLUMINANCE")
45709 (code "GL_SLUMINANCE8")
45711 (code "GL_SLUMINANCE_ALPHA")
45713 (code "GL_SLUMINANCE8_ALPHA8")
45714 ", the texture is treated as if the red, green, blue, or luminance components are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion from the sRGB encoded component\t"
45715 (math (var "c") "_" (var "s"))
45717 to a linear component\t"
45718 (math (var "c") "_" (var "l"))
45721 (para (math (var "c")
45767 (math (var "c") "_" (var "s"))
45769 is the sRGB component in the range [0,1]. ")
45772 (code "GL_PROXY_TEXTURE_2D")
45774 (code "GL_PROXY_TEXTURE_CUBE_MAP")
45775 " target to try out a resolution and
45776 format. The implementation will
45777 update and recompute its best match for the requested storage resolution
45778 and format. To then query this state, call "
45779 (code "glGetTexLevelParameter")
45781 If the texture cannot be accommodated, texture state is set to 0. ")
45783 A one-component texture image uses only the red component of the RGBA
45784 color extracted from "
45787 A two-component image uses the R and A values.
45788 A three-component image uses the R, G, and B values.
45789 A four-component image uses all of the RGBA components. ")
45791 Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures during texture filtering and application.\xa0Image-based shadowing\xa0can\xa0be\xa0enabled\xa0by\xa0comparing texture r coordinates to depth texture values to generate a boolean result. See "
45792 (code "glTexParameter")
45793 " for details on texture comparison. ")
45795 (para (code "GL_INVALID_ENUM")
45796 " is generated if "
45799 (code "GL_TEXTURE_2D")
45801 (code "GL_PROXY_TEXTURE_2D")
45803 (code "GL_PROXY_TEXTURE_CUBE_MAP")
45805 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_X")
45807 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_X")
45809 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Y")
45811 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y")
45813 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Z")
45815 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z")
45817 (para (code "GL_INVALID_ENUM")
45818 " is generated if "
45820 " is one of the six cube map 2D image targets and the width and height parameters are not equal. ")
45821 (para (code "GL_INVALID_ENUM")
45822 " is generated if "
45824 " is not a type constant. ")
45825 (para (code "GL_INVALID_ENUM")
45826 " is generated if "
45833 (code "GL_COLOR_INDEX")
45835 (para (code "GL_INVALID_VALUE")
45836 " is generated if "
45841 or greater than 2 + "
45842 (code "GL_MAX_TEXTURE_SIZE")
45844 (para (code "GL_INVALID_VALUE")
45845 " is generated if "
45847 " is less than 0. ")
45848 (para (code "GL_INVALID_VALUE")
45849 " may be generated if "
45851 " is greater than "
45863 " is the returned value of "
45864 (code "GL_MAX_TEXTURE_SIZE")
45866 (para (code "GL_INVALID_VALUE")
45867 " is generated if "
45868 (var "internalFormat")
45869 " is not 1, 2, 3, 4, or one of the
45870 accepted resolution and format symbolic constants. ")
45871 (para (code "GL_INVALID_VALUE")
45872 " is generated if "
45877 or greater than 2 + "
45878 (code "GL_MAX_TEXTURE_SIZE")
45880 (para (code "GL_INVALID_VALUE")
45881 " is generated if non-power-of-two textures are not supported and the "
45885 " cannot be represented as "
45901 (para (code "GL_INVALID_VALUE")
45902 " is generated if "
45904 " is not 0 or 1. ")
45905 (para (code "GL_INVALID_OPERATION")
45906 " is generated if "
45909 (code "GL_UNSIGNED_BYTE_3_3_2")
45911 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
45913 (code "GL_UNSIGNED_SHORT_5_6_5")
45915 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
45922 (para (code "GL_INVALID_OPERATION")
45923 " is generated if "
45926 (code "GL_UNSIGNED_SHORT_4_4_4_4")
45928 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
45930 (code "GL_UNSIGNED_SHORT_5_5_5_1")
45932 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
45934 (code "GL_UNSIGNED_INT_8_8_8_8")
45936 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
45938 (code "GL_UNSIGNED_INT_10_10_10_2")
45940 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
45949 (para (code "GL_INVALID_OPERATION")
45950 " is generated if "
45953 (code "GL_TEXTURE_2D")
45955 (code "GL_PROXY_TEXTURE_2D")
45957 (var "internalFormat")
45959 (code "GL_DEPTH_COMPONENT")
45961 (code "GL_DEPTH_COMPONENT16")
45963 (code "GL_DEPTH_COMPONENT24")
45965 (code "GL_DEPTH_COMPONENT32")
45967 (para (code "GL_INVALID_OPERATION")
45968 " is generated if "
45971 (code "GL_DEPTH_COMPONENT")
45973 (var "internalFormat")
45975 (code "GL_DEPTH_COMPONENT")
45977 (code "GL_DEPTH_COMPONENT16")
45979 (code "GL_DEPTH_COMPONENT24")
45981 (code "GL_DEPTH_COMPONENT32")
45983 (para (code "GL_INVALID_OPERATION")
45984 " is generated if "
45985 (var "internalFormat")
45987 (code "GL_DEPTH_COMPONENT")
45989 (code "GL_DEPTH_COMPONENT16")
45991 (code "GL_DEPTH_COMPONENT24")
45993 (code "GL_DEPTH_COMPONENT32")
45998 (code "GL_DEPTH_COMPONENT")
46000 (para (code "GL_INVALID_OPERATION")
46001 " is generated if a non-zero buffer object name is bound to the "
46002 (code "GL_PIXEL_UNPACK_BUFFER")
46003 " target and the buffer object's data store is currently mapped. ")
46004 (para (code "GL_INVALID_OPERATION")
46005 " is generated if a non-zero buffer object name is bound to the "
46006 (code "GL_PIXEL_UNPACK_BUFFER")
46007 " target and the data would be unpacked from the buffer
46008 object such that the memory reads required would exceed the data store size. ")
46009 (para (code "GL_INVALID_OPERATION")
46010 " is generated if a non-zero buffer object name is bound to the "
46011 (code "GL_PIXEL_UNPACK_BUFFER")
46014 " is not evenly divisible
46015 into the number of bytes needed to store in memory a datum indicated by "
46018 (para (code "GL_INVALID_OPERATION")
46019 " is generated if "
46020 (code "glTexImage2D")
46022 is executed between the execution of "
46025 and the corresponding execution of "
46029 (define-gl-procedure
46034 (funcdef "void " (function "glTexImage3D"))
46035 (paramdef "GLenum " (parameter "target"))
46036 (paramdef "GLint " (parameter "level"))
46037 (paramdef "GLint " (parameter "internalFormat"))
46038 (paramdef "GLsizei " (parameter "width"))
46039 (paramdef "GLsizei " (parameter "height"))
46040 (paramdef "GLsizei " (parameter "depth"))
46041 (paramdef "GLint " (parameter "border"))
46042 (paramdef "GLenum " (parameter "format"))
46043 (paramdef "GLenum " (parameter "type"))
46044 (paramdef "const GLvoid * " (parameter "data"))))
46047 "specify a three-dimensional texture image")
46048 (heading "Parameters")
46049 (table (% (formatter (asis)))
46050 (entry (% (heading (var "target")))
46052 Specifies the target texture.
46054 (code "GL_TEXTURE_3D")
46056 (code "GL_PROXY_TEXTURE_3D")
46058 (entry (% (heading (var "level")))
46060 Specifies the level-of-detail number.
46061 Level 0 is the base image level.
46066 (math (var "n") "^" (var "th"))
46068 mipmap reduction image. "))
46069 (entry (% (heading (var "internalFormat")))
46071 Specifies the number of color components in the texture.
46072 Must be 1, 2, 3, or 4, or one of the following symbolic constants: "
46079 (code "GL_ALPHA12")
46081 (code "GL_ALPHA16")
46083 (code "GL_COMPRESSED_ALPHA")
46085 (code "GL_COMPRESSED_LUMINANCE")
46087 (code "GL_COMPRESSED_LUMINANCE_ALPHA")
46089 (code "GL_COMPRESSED_INTENSITY")
46091 (code "GL_COMPRESSED_RGB")
46093 (code "GL_COMPRESSED_RGBA")
46095 (code "GL_LUMINANCE")
46097 (code "GL_LUMINANCE4")
46099 (code "GL_LUMINANCE8")
46101 (code "GL_LUMINANCE12")
46103 (code "GL_LUMINANCE16")
46105 (code "GL_LUMINANCE_ALPHA")
46107 (code "GL_LUMINANCE4_ALPHA4")
46109 (code "GL_LUMINANCE6_ALPHA2")
46111 (code "GL_LUMINANCE8_ALPHA8")
46113 (code "GL_LUMINANCE12_ALPHA4")
46115 (code "GL_LUMINANCE12_ALPHA12")
46117 (code "GL_LUMINANCE16_ALPHA16")
46119 (code "GL_INTENSITY")
46121 (code "GL_INTENSITY4")
46123 (code "GL_INTENSITY8")
46125 (code "GL_INTENSITY12")
46127 (code "GL_INTENSITY16")
46129 (code "GL_R3_G3_B2")
46151 (code "GL_RGB5_A1")
46155 (code "GL_RGB10_A2")
46161 (code "GL_SLUMINANCE")
46163 (code "GL_SLUMINANCE8")
46165 (code "GL_SLUMINANCE_ALPHA")
46167 (code "GL_SLUMINANCE8_ALPHA8")
46173 (code "GL_SRGB_ALPHA")
46175 (code "GL_SRGB8_ALPHA8")
46177 (entry (% (heading (var "width")))
46179 Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be "
46195 implementations support 3D texture images that are at least 16 texels
46197 (entry (% (heading (var "height")))
46199 Specifies the height of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be "
46215 implementations support 3D texture images that are at least 16 texels
46217 (entry (% (heading (var "depth")))
46219 Specifies the depth of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be "
46235 implementations support 3D texture images that are at least 16 texels
46237 (entry (% (heading (var "border")))
46239 Specifies the width of the border.
46240 Must be either 0 or 1. "))
46241 (entry (% (heading (var "format")))
46243 Specifies the format of the pixel data.
46244 The following symbolic values are accepted: "
46245 (code "GL_COLOR_INDEX")
46263 (code "GL_LUMINANCE")
46265 (code "GL_LUMINANCE_ALPHA")
46267 (entry (% (heading (var "type")))
46269 Specifies the data type of the pixel data.
46270 The following symbolic values are accepted: "
46271 (code "GL_UNSIGNED_BYTE")
46277 (code "GL_UNSIGNED_SHORT")
46281 (code "GL_UNSIGNED_INT")
46287 (code "GL_UNSIGNED_BYTE_3_3_2")
46289 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
46291 (code "GL_UNSIGNED_SHORT_5_6_5")
46293 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
46295 (code "GL_UNSIGNED_SHORT_4_4_4_4")
46297 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
46299 (code "GL_UNSIGNED_SHORT_5_5_5_1")
46301 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
46303 (code "GL_UNSIGNED_INT_8_8_8_8")
46305 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
46307 (code "GL_UNSIGNED_INT_10_10_10_2")
46309 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
46311 (entry (% (heading (var "data")))
46313 Specifies a pointer to the image data in memory. ")))
46314 (heading "Description")
46316 Texturing maps a portion of a specified texture image
46317 onto each graphical primitive for which texturing is enabled.
46318 To enable and disable three-dimensional texturing, call "
46324 (code "GL_TEXTURE_3D")
46327 To define texture images, call "
46328 (code "glTexImage3D")
46330 The arguments describe the parameters of the texture image,
46333 width of the border,
46334 level-of-detail number
46336 (code "glTexParameter")
46338 and number of color components provided.
46339 The last three arguments describe how the image is represented in memory;
46340 they are identical to the pixel formats used for "
46341 (code "glDrawPixels")
46347 (code "GL_PROXY_TEXTURE_3D")
46348 ", no data is read from "
46351 all of the texture image state is recalculated, checked for
46352 consistency, and checked
46353 against the implementation's capabilities. If the implementation cannot
46354 handle a texture of the requested texture size, it sets
46355 all of the image state to 0,
46356 but does not generate an error (see "
46357 (code "glGetError")
46358 "). To query for an
46359 entire mipmap array, use an image array level greater than or equal to
46365 (code "GL_TEXTURE_3D")
46367 data is read from "
46369 " as a sequence of signed or unsigned bytes,
46372 or single-precision floating-point values,
46376 These values are grouped into sets of one,
46389 the data is considered as a string of unsigned bytes (and "
46392 (code "GL_COLOR_INDEX")
46394 Each data byte is treated as eight 1-bit elements,
46395 with bit ordering determined by "
46396 (code "GL_UNPACK_LSB_FIRST")
46399 (code "glPixelStore")
46402 If a non-zero named buffer object is bound to the "
46403 (code "GL_PIXEL_UNPACK_BUFFER")
46406 (code "glBindBuffer")
46407 ") while a texture image is
46410 " is treated as a byte offset into the buffer object's data store. ")
46412 The first element corresponds to the lower left corner of the texture
46414 Subsequent elements progress left-to-right through the remaining texels
46415 in the lowest row of the texture image, and then in successively higher
46416 rows of the texture image.
46417 The final element corresponds to the upper right corner of the texture
46419 (para (var "format")
46420 " determines the composition of each element in "
46423 It can assume one of these symbolic values: ")
46424 (table (% (formatter (asis)))
46425 (entry (% (heading (code "GL_COLOR_INDEX")))
46427 Each element is a single value,
46429 The GL converts it to fixed point
46430 (with an unspecified number of zero bits to the right of the binary point),
46431 shifted left or right depending on the value and sign of "
46432 (code "GL_INDEX_SHIFT")
46435 (code "GL_INDEX_OFFSET")
46438 (code "glPixelTransfer")
46440 The resulting index is converted to a set of color components
46442 (code "GL_PIXEL_MAP_I_TO_R")
46444 (code "GL_PIXEL_MAP_I_TO_G")
46446 (code "GL_PIXEL_MAP_I_TO_B")
46448 (code "GL_PIXEL_MAP_I_TO_A")
46450 and clamped to the range [0,1]. "))
46451 (entry (% (heading (code "GL_RED")))
46453 Each element is a single red component.
46454 The GL converts it to floating point and assembles it into an RGBA element
46455 by attaching 0 for green and blue, and 1 for alpha.
46456 Each component is then multiplied by the signed scale factor "
46457 (code "GL_c_SCALE")
46459 added to the signed bias "
46462 and clamped to the range [0,1]
46464 (code "glPixelTransfer")
46466 (entry (% (heading (code "GL_GREEN")))
46468 Each element is a single green component.
46469 The GL converts it to floating point and assembles it into an RGBA element
46470 by attaching 0 for red and blue, and 1 for alpha.
46471 Each component is then multiplied by the signed scale factor "
46472 (code "GL_c_SCALE")
46474 added to the signed bias "
46477 and clamped to the range [0,1]
46479 (code "glPixelTransfer")
46481 (entry (% (heading (code "GL_BLUE")))
46483 Each element is a single blue component.
46484 The GL converts it to floating point and assembles it into an RGBA element
46485 by attaching 0 for red and green, and 1 for alpha.
46486 Each component is then multiplied by the signed scale factor "
46487 (code "GL_c_SCALE")
46489 added to the signed bias "
46492 and clamped to the range [0,1]
46494 (code "glPixelTransfer")
46496 (entry (% (heading (code "GL_ALPHA")))
46498 Each element is a single alpha component.
46499 The GL converts it to floating point and assembles it into an RGBA element
46500 by attaching 0 for red, green, and blue.
46501 Each component is then multiplied by the signed scale factor "
46502 (code "GL_c_SCALE")
46504 added to the signed bias "
46507 and clamped to the range [0,1]
46509 (code "glPixelTransfer")
46511 (entry (% (heading (code "GL_INTENSITY")))
46513 Each element is a single intensity value.
46514 The GL converts it to floating point,
46515 then assembles it into an RGBA element by replicating the intensity value
46516 three times for red, green, blue, and alpha.
46517 Each component is then multiplied by the signed scale factor "
46518 (code "GL_c_SCALE")
46520 added to the signed bias "
46523 and clamped to the range [0,1]
46525 (code "glPixelTransfer")
46527 (entry (% (heading (code "GL_RGB"))))
46528 (entry (% (heading (code "GL_BGR")))
46530 Each element is an RGB triple.
46531 The GL converts it to floating point and assembles it into an RGBA element
46532 by attaching 1 for alpha.
46533 Each component is then multiplied by the signed scale factor "
46534 (code "GL_c_SCALE")
46536 added to the signed bias "
46539 and clamped to the range [0,1]
46541 (code "glPixelTransfer")
46543 (entry (% (heading (code "GL_RGBA"))))
46544 (entry (% (heading (code "GL_BGRA")))
46546 Each element contains all four components.
46547 Each component is multiplied by the signed scale factor "
46548 (code "GL_c_SCALE")
46550 added to the signed bias "
46553 and clamped to the range [0,1]
46555 (code "glPixelTransfer")
46557 (entry (% (heading (code "GL_LUMINANCE")))
46559 Each element is a single luminance value.
46560 The GL converts it to floating point,
46561 then assembles it into an RGBA element by replicating the luminance value
46562 three times for red, green, and blue and attaching 1 for alpha.
46563 Each component is then multiplied by the signed scale factor "
46564 (code "GL_c_SCALE")
46566 added to the signed bias "
46569 and clamped to the range [0,1]
46571 (code "glPixelTransfer")
46573 (entry (% (heading (code "GL_LUMINANCE_ALPHA")))
46575 Each element is a luminance/alpha pair.
46576 The GL converts it to floating point,
46577 then assembles it into an RGBA element by replicating the luminance value
46578 three times for red, green, and blue.
46579 Each component is then multiplied by the signed scale factor "
46580 (code "GL_c_SCALE")
46582 added to the signed bias "
46585 and clamped to the range [0,1] (see "
46586 (code "glPixelTransfer")
46590 (code "glDrawPixels")
46591 " reference page for a description of
46592 the acceptable values for the "
46596 If an application wants to store the texture at a certain
46597 resolution or in a certain format, it can request the resolution
46599 (var "internalFormat")
46600 ". The GL will choose an internal
46601 representation that closely approximates that requested by "
46602 (var "internalFormat")
46604 it may not match exactly.
46605 (The representations specified by "
46606 (code "GL_LUMINANCE")
46608 (code "GL_LUMINANCE_ALPHA")
46614 " must match exactly. The numeric values 1, 2, 3, and 4
46615 may also be used to specify the above representations.) ")
46618 (var "internalFormat")
46619 " parameter is one of the generic compressed formats,\t"
46620 (code "GL_COMPRESSED_ALPHA")
46622 (code "GL_COMPRESSED_INTENSITY")
46624 (code "GL_COMPRESSED_LUMINANCE")
46626 (code "GL_COMPRESSED_LUMINANCE_ALPHA")
46628 (code "GL_COMPRESSED_RGB")
46630 (code "GL_COMPRESSED_RGBA")
46631 ", the GL will replace the internal format with the symbolic constant for a specific internal format and compress the texture before storage. If no corresponding internal format is available, or the GL can not compress that image for any reason, the internal format is instead replaced with a corresponding base internal format. ")
46634 (var "internalFormat")
46640 (code "GL_SRGB_ALPHA")
46642 (code "GL_SRGB8_ALPHA8")
46644 (code "GL_SLUMINANCE")
46646 (code "GL_SLUMINANCE8")
46648 (code "GL_SLUMINANCE_ALPHA")
46650 (code "GL_SLUMINANCE8_ALPHA8")
46651 ", the texture is treated as if the red, green, blue, or luminance components are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion from the sRGB encoded component\t"
46652 (math (var "c") "_" (var "s"))
46654 to a linear component\t"
46655 (math (var "c") "_" (var "l"))
46658 (para (math (var "c")
46704 (math (var "c") "_" (var "s"))
46706 is the sRGB component in the range [0,1]. ")
46709 (code "GL_PROXY_TEXTURE_3D")
46710 " target to try out a resolution and
46711 format. The implementation will
46712 update and recompute its best match for the requested storage resolution
46713 and format. To then query this state, call "
46714 (code "glGetTexLevelParameter")
46716 If the texture cannot be accommodated, texture state is set to 0. ")
46718 A one-component texture image uses only the red component of the RGBA
46719 color extracted from "
46722 A two-component image uses the R and A values.
46723 A three-component image uses the R, G, and B values.
46724 A four-component image uses all of the RGBA components. ")
46726 (para (code "GL_INVALID_ENUM")
46727 " is generated if "
46730 (code "GL_TEXTURE_3D")
46733 (code "GL_PROXY_TEXTURE_3D")
46735 (para (code "GL_INVALID_ENUM")
46736 " is generated if "
46738 " is not an accepted
46739 format constant. Format constants other than "
46740 (code "GL_STENCIL_INDEX")
46742 (code "GL_DEPTH_COMPONENT")
46745 (para (code "GL_INVALID_ENUM")
46746 " is generated if "
46748 " is not a type constant. ")
46749 (para (code "GL_INVALID_ENUM")
46750 " is generated if "
46757 (code "GL_COLOR_INDEX")
46759 (para (code "GL_INVALID_VALUE")
46760 " is generated if "
46762 " is less than 0. ")
46763 (para (code "GL_INVALID_VALUE")
46764 " may be generated if "
46766 " is greater than "
46778 " is the returned value of "
46779 (code "GL_MAX_TEXTURE_SIZE")
46781 (para (code "GL_INVALID_VALUE")
46782 " is generated if "
46783 (var "internalFormat")
46784 " is not 1, 2, 3, 4, or one of the
46785 accepted resolution and format symbolic constants. ")
46786 (para (code "GL_INVALID_VALUE")
46787 " is generated if "
46793 " is less than 0 or greater than 2 + "
46794 (code "GL_MAX_TEXTURE_SIZE")
46796 (para (code "GL_INVALID_VALUE")
46797 " is generated if non-power-of-two textures are not supported and the "
46803 " cannot be represented as "
46819 (para (code "GL_INVALID_VALUE")
46820 " is generated if "
46822 " is not 0 or 1. ")
46823 (para (code "GL_INVALID_OPERATION")
46824 " is generated if "
46827 (code "GL_UNSIGNED_BYTE_3_3_2")
46829 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
46831 (code "GL_UNSIGNED_SHORT_5_6_5")
46833 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
46840 (para (code "GL_INVALID_OPERATION")
46841 " is generated if "
46844 (code "GL_UNSIGNED_SHORT_4_4_4_4")
46846 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
46848 (code "GL_UNSIGNED_SHORT_5_5_5_1")
46850 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
46852 (code "GL_UNSIGNED_INT_8_8_8_8")
46854 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
46856 (code "GL_UNSIGNED_INT_10_10_10_2")
46858 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
46867 (para (code "GL_INVALID_OPERATION")
46868 " is generated if "
46871 (var "internalFormat")
46873 (code "GL_DEPTH_COMPONENT")
46875 (code "GL_DEPTH_COMPONENT16")
46877 (code "GL_DEPTH_COMPONENT24")
46879 (code "GL_DEPTH_COMPONENT32")
46881 (para (code "GL_INVALID_OPERATION")
46882 " is generated if a non-zero buffer object name is bound to the "
46883 (code "GL_PIXEL_UNPACK_BUFFER")
46884 " target and the buffer object's data store is currently mapped. ")
46885 (para (code "GL_INVALID_OPERATION")
46886 " is generated if a non-zero buffer object name is bound to the "
46887 (code "GL_PIXEL_UNPACK_BUFFER")
46888 " target and the data would be unpacked from the buffer
46889 object such that the memory reads required would exceed the data store size. ")
46890 (para (code "GL_INVALID_OPERATION")
46891 " is generated if a non-zero buffer object name is bound to the "
46892 (code "GL_PIXEL_UNPACK_BUFFER")
46895 " is not evenly divisible
46896 into the number of bytes needed to store in memory a datum indicated by "
46899 (para (code "GL_INVALID_OPERATION")
46900 " is generated if "
46901 (code "glTexImage3D")
46903 is executed between the execution of "
46906 and the corresponding execution of "
46910 (define-gl-procedure
46915 (funcdef "void " (function "glTexParameterf"))
46916 (paramdef "GLenum " (parameter "target"))
46917 (paramdef "GLenum " (parameter "pname"))
46918 (paramdef "GLfloat " (parameter "param"))))
46920 (heading "set texture parameters")
46921 (heading "Parameters")
46922 (table (% (formatter (asis)))
46923 (entry (% (heading (var "target")))
46925 Specifies the target texture,
46926 which must be either "
46927 (code "GL_TEXTURE_1D")
46929 (code "GL_TEXTURE_2D")
46931 (code "GL_TEXTURE_3D")
46933 (code "GL_TEXTURE_CUBE_MAP")
46935 (entry (% (heading (var "pname")))
46937 Specifies the symbolic name of a single-valued texture parameter. "
46939 " can be one of the following: "
46940 (code "GL_TEXTURE_MIN_FILTER")
46942 (code "GL_TEXTURE_MAG_FILTER")
46944 (code "GL_TEXTURE_MIN_LOD")
46946 (code "GL_TEXTURE_MAX_LOD")
46948 (code "GL_TEXTURE_BASE_LEVEL")
46950 (code "GL_TEXTURE_MAX_LEVEL")
46952 (code "GL_TEXTURE_WRAP_S")
46954 (code "GL_TEXTURE_WRAP_T")
46956 (code "GL_TEXTURE_WRAP_R")
46958 (code "GL_TEXTURE_PRIORITY")
46960 (code "GL_TEXTURE_COMPARE_MODE")
46962 (code "GL_TEXTURE_COMPARE_FUNC")
46964 (code "GL_DEPTH_TEXTURE_MODE")
46966 (code "GL_GENERATE_MIPMAP")
46968 (entry (% (heading (var "param")))
46970 Specifies the value of "
46973 (heading "Description")
46975 Texture mapping is a technique that applies an image onto an object's surface
46976 as if the image were a decal or cellophane shrink-wrap.
46977 The image is created in texture space,
46985 A texture is a one- or two-dimensional image and a set of parameters
46986 that determine how samples are derived from the image. ")
46987 (para (code "glTexParameter")
46988 " assigns the value or values in "
46990 " to the texture parameter
46995 " defines the target texture,
46997 (code "GL_TEXTURE_1D")
46999 (code "GL_TEXTURE_2D")
47001 (code "GL_TEXTURE_3D")
47003 The following symbols are accepted in "
47006 (table (% (formatter (asis)))
47007 (entry (% (heading (code "GL_TEXTURE_MIN_FILTER")))
47009 The texture minifying function is used whenever the pixel being textured
47010 maps to an area greater than one texture element.
47011 There are six defined minifying functions.
47012 Two of them use the nearest one or nearest four texture elements
47013 to compute the texture value.
47014 The other four use mipmaps. ")
47016 A mipmap is an ordered set of arrays representing the same image
47017 at progressively lower resolutions.
47018 If the texture has dimensions "
47019 (math "2" "^" (var "n") "×" "2" "^" (var "m"))
47033 The first mipmap is the original texture,
47035 (math "2" "^" (var "n") "×" "2" "^" (var "m"))
47037 Each subsequent mipmap has dimensions "
47053 (math "2" "^" (var "k") "×" "2" "^" (var "l"))
47055 are the dimensions of the previous mipmap,
47057 (math (var "k") "=" "0")
47060 (math (var "l") "=" "0")
47063 subsequent mipmaps have dimension "
47064 (math "1" "×" "2" "^" (var "l") "-" "1" ",")
47067 (math "2" "^" (var "k") "-" "1" "," "×" "1")
47069 until the final mipmap,
47070 which has dimension "
47073 To define the mipmaps, call "
47074 (code "glTexImage1D")
47076 (code "glTexImage2D")
47078 (code "glTexImage3D")
47080 (code "glCopyTexImage1D")
47082 (code "glCopyTexImage2D")
47086 " argument indicating the order of the mipmaps.
47087 Level 0 is the original texture;
47101 (para (var "params")
47102 " supplies a function for minifying the texture as one of the
47105 As more texture elements are sampled in the minification process,
47106 fewer aliasing artifacts will be apparent.
47108 (code "GL_NEAREST")
47111 " minification functions can be
47112 faster than the other four,
47113 they sample only one or four texture elements to determine the texture value
47114 of the pixel being rendered and can produce moire patterns
47115 or ragged transitions.
47116 The initial value of "
47117 (code "GL_TEXTURE_MIN_FILTER")
47119 (code "GL_NEAREST_MIPMAP_LINEAR")
47121 (entry (% (heading (code "GL_TEXTURE_MAG_FILTER")))
47123 The texture magnification function is used when the pixel being textured
47124 maps to an area less than or equal to one texture element.
47125 It sets the texture magnification function to either "
47126 (code "GL_NEAREST")
47131 (code "GL_NEAREST")
47132 " is generally faster
47136 but it can produce textured images with sharper edges
47137 because the transition between texture elements is not as smooth.
47138 The initial value of "
47139 (code "GL_TEXTURE_MAG_FILTER")
47144 (table (% (formatter (asis)))
47145 (entry (% (heading (code "GL_NEAREST")))
47147 Returns the value of the texture element that is nearest
47148 (in Manhattan distance)
47149 to the center of the pixel being textured. "))
47150 (entry (% (heading (code "GL_LINEAR")))
47152 Returns the weighted average of the four texture elements
47153 that are closest to the center of the pixel being textured.
47154 These can include border texture elements,
47155 depending on the values of "
47156 (code "GL_TEXTURE_WRAP_S")
47158 (code "GL_TEXTURE_WRAP_T")
47160 and on the exact mapping. "))
47161 (entry (% (heading (code "GL_NEAREST_MIPMAP_NEAREST")))
47163 Chooses the mipmap that most closely matches the size of the pixel
47164 being textured and uses the "
47165 (code "GL_NEAREST")
47167 (the texture element nearest to the center of the pixel)
47168 to produce a texture value. "))
47169 (entry (% (heading (code "GL_LINEAR_MIPMAP_NEAREST")))
47171 Chooses the mipmap that most closely matches the size of the pixel
47172 being textured and uses the "
47175 (a weighted average of the four texture elements that are closest
47176 to the center of the pixel)
47177 to produce a texture value. "))
47178 (entry (% (heading (code "GL_NEAREST_MIPMAP_LINEAR")))
47180 Chooses the two mipmaps that most closely match the size of the pixel
47181 being textured and uses the "
47182 (code "GL_NEAREST")
47184 (the texture element nearest to the center of the pixel)
47185 to produce a texture value from each mipmap.
47186 The final texture value is a weighted average of those two values. "))
47187 (entry (% (heading (code "GL_LINEAR_MIPMAP_LINEAR")))
47189 Chooses the two mipmaps that most closely match the size of the pixel
47190 being textured and uses the "
47193 (a weighted average of the four texture elements that are closest
47194 to the center of the pixel)
47195 to produce a texture value from each mipmap.
47196 The final texture value is a weighted average of those two values. ")))
47197 (table (% (formatter (asis)))
47198 (entry (% (heading (code "GL_NEAREST")))
47200 Returns the value of the texture element that is nearest
47201 (in Manhattan distance)
47202 to the center of the pixel being textured. "))
47203 (entry (% (heading (code "GL_LINEAR")))
47205 Returns the weighted average of the four texture elements
47206 that are closest to the center of the pixel being textured.
47207 These can include border texture elements,
47208 depending on the values of "
47209 (code "GL_TEXTURE_WRAP_S")
47211 (code "GL_TEXTURE_WRAP_T")
47213 and on the exact mapping. ")))
47215 (table (% (formatter (asis)))
47216 (entry (% (heading (code "GL_TEXTURE_MIN_LOD")))
47218 Sets the minimum level-of-detail parameter. This floating-point value
47219 limits the selection of highest resolution mipmap (lowest mipmap
47220 level). The initial value is -1000. ")))
47222 (table (% (formatter (asis)))
47223 (entry (% (heading (code "GL_TEXTURE_MAX_LOD")))
47225 Sets the maximum level-of-detail parameter. This floating-point value
47226 limits the selection of the lowest resolution mipmap (highest mipmap
47227 level). The initial value is 1000. ")))
47229 (table (% (formatter (asis)))
47230 (entry (% (heading (code "GL_TEXTURE_BASE_LEVEL")))
47232 Specifies the index of the lowest defined mipmap level. This is an
47233 integer value. The initial value is 0. ")))
47235 (table (% (formatter (asis)))
47236 (entry (% (heading (code "GL_TEXTURE_MAX_LEVEL")))
47238 Sets the index of the highest defined mipmap level. This is an integer
47239 value. The initial value is 1000. ")))
47241 (table (% (formatter (asis)))
47242 (entry (% (heading (code "GL_TEXTURE_WRAP_S")))
47244 Sets the wrap parameter for texture coordinate "
47250 (code "GL_CLAMP_TO_BORDER")
47252 (code "GL_CLAMP_TO_EDGE")
47254 (code "GL_MIRRORED_REPEAT")
47262 coordinates to be clamped to the
47263 range [0,1] and is useful for preventing wrapping artifacts when mapping a
47264 single image onto an object. "
47265 (code "GL_CLAMP_TO_BORDER")
47269 coordinate to be clamped to the range "
47289 is the size of the texture in the direction of
47291 (code "GL_CLAMP_TO_EDGE")
47295 coordinates to be clamped to the
47317 of the texture in the direction of clamping. "
47320 integer part of the "
47323 coordinate to be ignored; the GL uses only the
47324 fractional part, thereby creating a repeating pattern. "
47325 (code "GL_MIRRORED_REPEAT")
47329 coordinate to be set to the
47330 fractional part of the texture coordinate if the integer part of "
47334 even; if the integer part of "
47340 texture coordinate is
47359 represents the fractional part of "
47363 elements are accessed only if wrapping is set to "
47366 (code "GL_CLAMP_TO_BORDER")
47368 (code "GL_TEXTURE_WRAP_S")
47373 (table (% (formatter (asis)))
47374 (entry (% (heading (code "GL_TEXTURE_WRAP_T")))
47376 Sets the wrap parameter for texture coordinate "
47382 (code "GL_CLAMP_TO_BORDER")
47384 (code "GL_CLAMP_TO_EDGE")
47386 (code "GL_MIRRORED_REPEAT")
47389 ". See the discussion under "
47390 (code "GL_TEXTURE_WRAP_S")
47393 (code "GL_TEXTURE_WRAP_T")
47397 (entry (% (heading (code "GL_TEXTURE_WRAP_R")))
47399 Sets the wrap parameter for texture coordinate "
47405 (code "GL_CLAMP_TO_BORDER")
47407 (code "GL_CLAMP_TO_EDGE")
47409 (code "GL_MIRRORED_REPEAT")
47412 ". See the discussion under "
47413 (code "GL_TEXTURE_WRAP_S")
47416 (code "GL_TEXTURE_WRAP_R")
47420 (entry (% (heading (code "GL_TEXTURE_BORDER_COLOR")))
47422 Sets a border color. "
47424 " contains four values that comprise the RGBA
47425 color of the texture border. Integer color components are interpreted
47426 linearly such that the most positive integer maps to 1.0, and the most
47427 negative integer maps to -1.0. The values are clamped to the range [0,1]
47428 when they are specified. Initially, the border color is (0, 0, 0, 0). "))
47429 (entry (% (heading (code "GL_TEXTURE_PRIORITY")))
47431 Specifies the texture residence priority of the currently bound texture.
47432 Permissible values are in the range "
47433 (math "[" "0" "," "1" "]")
47436 (code "glPrioritizeTextures")
47438 (code "glBindTexture")
47439 " for more information. "))
47440 (entry (% (heading (code "GL_TEXTURE_COMPARE_MODE")))
47442 Specifies the texture comparison mode for currently bound depth textures.
47443 That is, a texture whose internal format is "
47444 (code "GL_DEPTH_COMPONENT_*")
47446 (code "glTexImage2D")
47448 Permissible values are: "))
47449 (entry (% (heading (code "GL_TEXTURE_COMPARE_FUNC")))
47451 Specifies the comparison operator used when "
47452 (code "GL_TEXTURE_COMPARE_MODE")
47455 (code "GL_COMPARE_R_TO_TEXTURE")
47456 ". Permissible values are: "
47461 is the current interpolated texture coordinate, and "
47462 (math (var "D") "_" (var "t"))
47464 is the depth texture value sampled from the currently bound depth texture. "
47465 (math (var "result"))
47467 is assigned to the either the luminance, intensity, or alpha (as
47469 (code "GL_DEPTH_TEXTURE_MODE")
47471 (entry (% (heading (code "GL_DEPTH_TEXTURE_MODE")))
47473 Specifies a single symbolic constant indicating how depth values should be
47474 treated during filtering and texture application. Accepted values are "
47475 (code "GL_LUMINANCE")
47477 (code "GL_INTENSITY")
47480 ". The initial value
47482 (code "GL_LUMINANCE")
47484 (entry (% (heading (code "GL_GENERATE_MIPMAP")))
47486 Specifies a boolean value that indicates if all levels of a mipmap array
47487 should be automatically updated when any modification to the base level
47488 mipmap is done. The initial value is "
47491 (table (% (formatter (asis)))
47492 (entry (% (heading (code "GL_COMPARE_R_TO_TEXTURE")))
47494 Specifies that the interpolated and clamped "
47497 texture coordinate should
47498 be compared to the value in the currently bound depth texture. See the
47500 (code "GL_TEXTURE_COMPARE_FUNC")
47501 " for details of how the comparison
47502 is evaluated. The result of the comparison is assigned to luminance,
47503 intensity, or alpha (as specified by "
47504 (code "GL_DEPTH_TEXTURE_MODE")
47506 (entry (% (heading (code "GL_NONE")))
47508 Specifies that the luminance, intensity, or alpha (as specified by "
47509 (code "GL_DEPTH_TEXTURE_MODE")
47510 ") should be assigned the
47511 appropriate value from the currently bound depth texture. ")))
47512 (table (% (formatter (asis)))
47513 (entry (% (heading (strong "Texture Comparison Function")))
47514 (para (strong "Computed result")))
47515 (entry (% (heading (code "GL_LEQUAL")))
47516 (para (math (var "result")
47545 (entry (% (heading (code "GL_GEQUAL")))
47546 (para (math (var "result")
47575 (entry (% (heading (code "GL_LESS")))
47576 (para (math (var "result")
47605 (entry (% (heading (code "GL_GREATER")))
47606 (para (math (var "result")
47635 (entry (% (heading (code "GL_EQUAL")))
47636 (para (math (var "result")
47665 (entry (% (heading (code "GL_NOTEQUAL")))
47666 (para (math (var "result")
47695 (entry (% (heading (code "GL_ALWAYS")))
47696 (para (math (var "result") "=" (code "1.0"))))
47697 (entry (% (heading (code "GL_NEVER")))
47698 (para (math (var "result") "=" (code "0.0")))))
47700 (para (code "GL_INVALID_ENUM")
47701 " is generated if "
47706 one of the accepted defined values. ")
47707 (para (code "GL_INVALID_ENUM")
47708 " is generated if "
47710 " should have a defined
47711 constant value (based on the value of "
47713 ") and does not. ")
47714 (para (code "GL_INVALID_OPERATION")
47715 " is generated if "
47716 (code "glTexParameter")
47717 " is executed between the
47720 " and the corresponding execution of "
47724 (define-gl-procedure
47729 (funcdef "void " (function "glTexSubImage1D"))
47730 (paramdef "GLenum " (parameter "target"))
47731 (paramdef "GLint " (parameter "level"))
47732 (paramdef "GLint " (parameter "xoffset"))
47733 (paramdef "GLsizei " (parameter "width"))
47734 (paramdef "GLenum " (parameter "format"))
47735 (paramdef "GLenum " (parameter "type"))
47736 (paramdef "const GLvoid * " (parameter "data"))))
47739 "specify a one-dimensional texture subimage")
47740 (heading "Parameters")
47741 (table (% (formatter (asis)))
47742 (entry (% (heading (var "target")))
47744 Specifies the target texture.
47746 (code "GL_TEXTURE_1D")
47748 (entry (% (heading (var "level")))
47750 Specifies the level-of-detail number.
47751 Level 0 is the base image level.
47756 "th mipmap reduction image. "))
47757 (entry (% (heading (var "xoffset")))
47759 Specifies a texel offset in the x direction within the texture array. "))
47760 (entry (% (heading (var "width")))
47762 Specifies the width of the texture subimage. "))
47763 (entry (% (heading (var "format")))
47765 Specifies the format of the pixel data.
47766 The following symbolic values are accepted: "
47767 (code "GL_COLOR_INDEX")
47785 (code "GL_LUMINANCE")
47787 (code "GL_LUMINANCE_ALPHA")
47789 (entry (% (heading (var "type")))
47791 Specifies the data type of the pixel data.
47792 The following symbolic values are accepted: "
47793 (code "GL_UNSIGNED_BYTE")
47799 (code "GL_UNSIGNED_SHORT")
47803 (code "GL_UNSIGNED_INT")
47809 (code "GL_UNSIGNED_BYTE_3_3_2")
47811 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
47813 (code "GL_UNSIGNED_SHORT_5_6_5")
47815 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
47817 (code "GL_UNSIGNED_SHORT_4_4_4_4")
47819 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
47821 (code "GL_UNSIGNED_SHORT_5_5_5_1")
47823 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
47825 (code "GL_UNSIGNED_INT_8_8_8_8")
47827 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
47829 (code "GL_UNSIGNED_INT_10_10_10_2")
47831 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
47833 (entry (% (heading (var "data")))
47835 Specifies a pointer to the image data in memory. ")))
47836 (heading "Description")
47838 Texturing maps a portion of a specified texture image
47839 onto each graphical primitive for which texturing is enabled.
47840 To enable or disable one-dimensional texturing, call "
47846 (code "GL_TEXTURE_1D")
47848 (para (code "glTexSubImage1D")
47849 " redefines a contiguous subregion of an existing one-dimensional
47851 The texels referenced by "
47853 " replace the portion of the
47854 existing texture array with x indices "
47857 (math (var "xoffset") "+" (var "width") "-" "1")
47860 This region may not include any texels outside the range of the
47861 texture array as it was originally specified.
47862 It is not an error to specify a subtexture with width of 0, but
47863 such a specification has no effect. ")
47865 If a non-zero named buffer object is bound to the "
47866 (code "GL_PIXEL_UNPACK_BUFFER")
47869 (code "glBindBuffer")
47870 ") while a texture image is
47873 " is treated as a byte offset into the buffer object's data store. ")
47875 (para (code "GL_INVALID_ENUM")
47876 " is generated if "
47878 " is not one of the
47879 allowable values. ")
47880 (para (code "GL_INVALID_ENUM")
47881 " is generated if "
47883 " is not an accepted
47884 format constant. ")
47885 (para (code "GL_INVALID_ENUM")
47886 " is generated if "
47888 " is not a type constant. ")
47889 (para (code "GL_INVALID_ENUM")
47890 " is generated if "
47897 (code "GL_COLOR_INDEX")
47899 (para (code "GL_INVALID_VALUE")
47900 " is generated if "
47902 " is less than 0. ")
47903 (para (code "GL_INVALID_VALUE")
47904 " may be generated if "
47908 (math (var "log") "_" "2")
47913 " is the returned value of "
47914 (code "GL_MAX_TEXTURE_SIZE")
47916 (para (code "GL_INVALID_VALUE")
47917 " is generated if "
47918 (math (var "xoffset") "<" "-" (var "b"))
47939 (code "GL_TEXTURE_WIDTH")
47945 (code "GL_TEXTURE_BORDER")
47947 of the texture image being modified.
47951 includes twice the border width. ")
47952 (para (code "GL_INVALID_VALUE")
47953 " is generated if "
47955 " is less than 0. ")
47956 (para (code "GL_INVALID_OPERATION")
47957 " is generated if the texture array has not
47958 been defined by a previous "
47959 (code "glTexImage1D")
47961 (para (code "GL_INVALID_OPERATION")
47962 " is generated if "
47965 (code "GL_UNSIGNED_BYTE_3_3_2")
47967 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
47969 (code "GL_UNSIGNED_SHORT_5_6_5")
47971 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
47978 (para (code "GL_INVALID_OPERATION")
47979 " is generated if "
47982 (code "GL_UNSIGNED_SHORT_4_4_4_4")
47984 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
47986 (code "GL_UNSIGNED_SHORT_5_5_5_1")
47988 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
47990 (code "GL_UNSIGNED_INT_8_8_8_8")
47992 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
47994 (code "GL_UNSIGNED_INT_10_10_10_2")
47996 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
48005 (para (code "GL_INVALID_OPERATION")
48006 " is generated if a non-zero buffer object name is bound to the "
48007 (code "GL_PIXEL_UNPACK_BUFFER")
48008 " target and the buffer object's data store is currently mapped. ")
48009 (para (code "GL_INVALID_OPERATION")
48010 " is generated if a non-zero buffer object name is bound to the "
48011 (code "GL_PIXEL_UNPACK_BUFFER")
48012 " target and the data would be unpacked from the buffer
48013 object such that the memory reads required would exceed the data store size. ")
48014 (para (code "GL_INVALID_OPERATION")
48015 " is generated if a non-zero buffer object name is bound to the "
48016 (code "GL_PIXEL_UNPACK_BUFFER")
48019 " is not evenly divisible
48020 into the number of bytes needed to store in memory a datum indicated by "
48023 (para (code "GL_INVALID_OPERATION")
48024 " is generated if "
48025 (code "glTexSubImage1D")
48027 between the execution of "
48029 " and the corresponding
48034 (define-gl-procedure
48039 (funcdef "void " (function "glTexSubImage2D"))
48040 (paramdef "GLenum " (parameter "target"))
48041 (paramdef "GLint " (parameter "level"))
48042 (paramdef "GLint " (parameter "xoffset"))
48043 (paramdef "GLint " (parameter "yoffset"))
48044 (paramdef "GLsizei " (parameter "width"))
48045 (paramdef "GLsizei " (parameter "height"))
48046 (paramdef "GLenum " (parameter "format"))
48047 (paramdef "GLenum " (parameter "type"))
48048 (paramdef "const GLvoid * " (parameter "data"))))
48051 "specify a two-dimensional texture subimage")
48052 (heading "Parameters")
48053 (table (% (formatter (asis)))
48054 (entry (% (heading (var "target")))
48056 Specifies the target texture.
48058 (code "GL_TEXTURE_2D")
48060 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_X")
48062 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_X")
48064 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Y")
48066 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y")
48068 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Z")
48070 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z")
48072 (entry (% (heading (var "level")))
48074 Specifies the level-of-detail number.
48075 Level 0 is the base image level.
48080 "th mipmap reduction image. "))
48081 (entry (% (heading (var "xoffset")))
48083 Specifies a texel offset in the x direction within the texture array. "))
48084 (entry (% (heading (var "yoffset")))
48086 Specifies a texel offset in the y direction within the texture array. "))
48087 (entry (% (heading (var "width")))
48089 Specifies the width of the texture subimage. "))
48090 (entry (% (heading (var "height")))
48092 Specifies the height of the texture subimage. "))
48093 (entry (% (heading (var "format")))
48095 Specifies the format of the pixel data.
48096 The following symbolic values are accepted: "
48097 (code "GL_COLOR_INDEX")
48115 (code "GL_LUMINANCE")
48117 (code "GL_LUMINANCE_ALPHA")
48119 (entry (% (heading (var "type")))
48121 Specifies the data type of the pixel data.
48122 The following symbolic values are accepted: "
48123 (code "GL_UNSIGNED_BYTE")
48129 (code "GL_UNSIGNED_SHORT")
48133 (code "GL_UNSIGNED_INT")
48139 (code "GL_UNSIGNED_BYTE_3_3_2")
48141 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
48143 (code "GL_UNSIGNED_SHORT_5_6_5")
48145 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
48147 (code "GL_UNSIGNED_SHORT_4_4_4_4")
48149 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
48151 (code "GL_UNSIGNED_SHORT_5_5_5_1")
48153 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
48155 (code "GL_UNSIGNED_INT_8_8_8_8")
48157 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
48159 (code "GL_UNSIGNED_INT_10_10_10_2")
48161 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
48163 (entry (% (heading (var "data")))
48165 Specifies a pointer to the image data in memory. ")))
48166 (heading "Description")
48168 Texturing maps a portion of a specified texture image
48169 onto each graphical primitive for which texturing is enabled.
48170 To enable and disable two-dimensional texturing, call "
48176 (code "GL_TEXTURE_2D")
48178 (para (code "glTexSubImage2D")
48179 " redefines a contiguous subregion of an existing two-dimensional
48181 The texels referenced by "
48183 " replace the portion of the
48184 existing texture array with x indices "
48187 (math (var "xoffset") "+" (var "width") "-" "1")
48193 (math (var "yoffset") "+" (var "height") "-" "1")
48196 This region may not include any texels outside the range of the
48197 texture array as it was originally specified.
48198 It is not an error to specify a subtexture with zero width or height, but
48199 such a specification has no effect. ")
48201 If a non-zero named buffer object is bound to the "
48202 (code "GL_PIXEL_UNPACK_BUFFER")
48205 (code "glBindBuffer")
48206 ") while a texture image is
48209 " is treated as a byte offset into the buffer object's data store. ")
48211 (para (code "GL_INVALID_ENUM")
48212 " is generated if "
48215 (code "GL_TEXTURE_2D")
48217 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_X")
48219 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_X")
48221 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Y")
48223 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y")
48225 (code "GL_TEXTURE_CUBE_MAP_POSITIVE_Z")
48227 (code "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z")
48229 (para (code "GL_INVALID_ENUM")
48230 " is generated if "
48232 " is not an accepted
48233 format constant. ")
48234 (para (code "GL_INVALID_ENUM")
48235 " is generated if "
48237 " is not a type constant. ")
48238 (para (code "GL_INVALID_ENUM")
48239 " is generated if "
48246 (code "GL_COLOR_INDEX")
48248 (para (code "GL_INVALID_VALUE")
48249 " is generated if "
48251 " is less than 0. ")
48252 (para (code "GL_INVALID_VALUE")
48253 " may be generated if "
48257 (math (var "log") "_" "2")
48262 " is the returned value of "
48263 (code "GL_MAX_TEXTURE_SIZE")
48265 (para (code "GL_INVALID_VALUE")
48266 " is generated if "
48267 (math (var "xoffset") "<" "-" (var "b"))
48283 (math (var "yoffset") "<" "-" (var "b"))
48304 (code "GL_TEXTURE_WIDTH")
48309 (code "GL_TEXTURE_HEIGHT")
48313 is the border width
48314 of the texture image being modified.
48321 include twice the border width. ")
48322 (para (code "GL_INVALID_VALUE")
48323 " is generated if "
48327 " is less than 0. ")
48328 (para (code "GL_INVALID_OPERATION")
48329 " is generated if the texture array has not
48330 been defined by a previous "
48331 (code "glTexImage2D")
48333 (para (code "GL_INVALID_OPERATION")
48334 " is generated if "
48337 (code "GL_UNSIGNED_BYTE_3_3_2")
48339 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
48341 (code "GL_UNSIGNED_SHORT_5_6_5")
48343 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
48350 (para (code "GL_INVALID_OPERATION")
48351 " is generated if "
48354 (code "GL_UNSIGNED_SHORT_4_4_4_4")
48356 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
48358 (code "GL_UNSIGNED_SHORT_5_5_5_1")
48360 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
48362 (code "GL_UNSIGNED_INT_8_8_8_8")
48364 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
48366 (code "GL_UNSIGNED_INT_10_10_10_2")
48368 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
48377 (para (code "GL_INVALID_OPERATION")
48378 " is generated if a non-zero buffer object name is bound to the "
48379 (code "GL_PIXEL_UNPACK_BUFFER")
48380 " target and the buffer object's data store is currently mapped. ")
48381 (para (code "GL_INVALID_OPERATION")
48382 " is generated if a non-zero buffer object name is bound to the "
48383 (code "GL_PIXEL_UNPACK_BUFFER")
48384 " target and the data would be unpacked from the buffer
48385 object such that the memory reads required would exceed the data store size. ")
48386 (para (code "GL_INVALID_OPERATION")
48387 " is generated if a non-zero buffer object name is bound to the "
48388 (code "GL_PIXEL_UNPACK_BUFFER")
48391 " is not evenly divisible
48392 into the number of bytes needed to store in memory a datum indicated by "
48395 (para (code "GL_INVALID_OPERATION")
48396 " is generated if "
48397 (code "glTexSubImage2D")
48399 between the execution of "
48401 " and the corresponding
48406 (define-gl-procedure
48411 (funcdef "void " (function "glTexSubImage3D"))
48412 (paramdef "GLenum " (parameter "target"))
48413 (paramdef "GLint " (parameter "level"))
48414 (paramdef "GLint " (parameter "xoffset"))
48415 (paramdef "GLint " (parameter "yoffset"))
48416 (paramdef "GLint " (parameter "zoffset"))
48417 (paramdef "GLsizei " (parameter "width"))
48418 (paramdef "GLsizei " (parameter "height"))
48419 (paramdef "GLsizei " (parameter "depth"))
48420 (paramdef "GLenum " (parameter "format"))
48421 (paramdef "GLenum " (parameter "type"))
48422 (paramdef "const GLvoid * " (parameter "data"))))
48425 "specify a three-dimensional texture subimage")
48426 (heading "Parameters")
48427 (table (% (formatter (asis)))
48428 (entry (% (heading (var "target")))
48430 Specifies the target texture.
48432 (code "GL_TEXTURE_3D")
48434 (entry (% (heading (var "level")))
48436 Specifies the level-of-detail number.
48437 Level 0 is the base image level.
48442 "th mipmap reduction image. "))
48443 (entry (% (heading (var "xoffset")))
48445 Specifies a texel offset in the x direction within the texture array. "))
48446 (entry (% (heading (var "yoffset")))
48448 Specifies a texel offset in the y direction within the texture array. "))
48449 (entry (% (heading (var "zoffset")))
48451 Specifies a texel offset in the z direction within the texture array. "))
48452 (entry (% (heading (var "width")))
48454 Specifies the width of the texture subimage. "))
48455 (entry (% (heading (var "height")))
48457 Specifies the height of the texture subimage. "))
48458 (entry (% (heading (var "depth")))
48460 Specifies the depth of the texture subimage. "))
48461 (entry (% (heading (var "format")))
48463 Specifies the format of the pixel data.
48464 The following symbolic values are accepted: "
48465 (code "GL_COLOR_INDEX")
48483 (code "GL_LUMINANCE")
48485 (code "GL_LUMINANCE_ALPHA")
48487 (entry (% (heading (var "type")))
48489 Specifies the data type of the pixel data.
48490 The following symbolic values are accepted: "
48491 (code "GL_UNSIGNED_BYTE")
48497 (code "GL_UNSIGNED_SHORT")
48501 (code "GL_UNSIGNED_INT")
48507 (code "GL_UNSIGNED_BYTE_3_3_2")
48509 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
48511 (code "GL_UNSIGNED_SHORT_5_6_5")
48513 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
48515 (code "GL_UNSIGNED_SHORT_4_4_4_4")
48517 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
48519 (code "GL_UNSIGNED_SHORT_5_5_5_1")
48521 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
48523 (code "GL_UNSIGNED_INT_8_8_8_8")
48525 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
48527 (code "GL_UNSIGNED_INT_10_10_10_2")
48529 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
48531 (entry (% (heading (var "data")))
48533 Specifies a pointer to the image data in memory. ")))
48534 (heading "Description")
48536 Texturing maps a portion of a specified texture image
48537 onto each graphical primitive for which texturing is enabled.
48538 To enable and disable three-dimensional texturing, call "
48544 (code "GL_TEXTURE_3D")
48546 (para (code "glTexSubImage3D")
48547 " redefines a contiguous subregion of an existing three-dimensional
48549 The texels referenced by "
48551 " replace the portion of the
48552 existing texture array with x indices "
48555 (math (var "xoffset") "+" (var "width") "-" "1")
48561 (math (var "yoffset") "+" (var "height") "-" "1")
48567 (math (var "zoffset") "+" (var "depth") "-" "1")
48570 This region may not include any texels outside the range of the
48571 texture array as it was originally specified.
48572 It is not an error to specify a subtexture with zero width, height, or
48573 depth but such a specification has no effect. ")
48575 If a non-zero named buffer object is bound to the "
48576 (code "GL_PIXEL_UNPACK_BUFFER")
48579 (code "glBindBuffer")
48580 ") while a texture image is
48583 " is treated as a byte offset into the buffer object's data store. ")
48585 (para (code "GL_INVALID_ENUM")
48586 " is generated if /"
48589 (code "GL_TEXTURE_3D")
48591 (para (code "GL_INVALID_ENUM")
48592 " is generated if "
48594 " is not an accepted
48595 format constant. ")
48596 (para (code "GL_INVALID_ENUM")
48597 " is generated if "
48599 " is not a type constant. ")
48600 (para (code "GL_INVALID_ENUM")
48601 " is generated if "
48608 (code "GL_COLOR_INDEX")
48610 (para (code "GL_INVALID_VALUE")
48611 " is generated if "
48613 " is less than 0. ")
48614 (para (code "GL_INVALID_VALUE")
48615 " may be generated if "
48619 (math (var "log") "_" "2")
48624 " is the returned value of "
48625 (code "GL_MAX_TEXTURE_SIZE")
48627 (para (code "GL_INVALID_VALUE")
48628 " is generated if "
48629 (math (var "xoffset") "<" "-" (var "b"))
48645 (math (var "yoffset") "<" "-" (var "b"))
48663 (math (var "zoffset") "<" "-" (var "b"))
48684 (code "GL_TEXTURE_WIDTH")
48689 (code "GL_TEXTURE_HEIGHT")
48694 (code "GL_TEXTURE_DEPTH")
48699 is the border width of the texture image being modified.
48708 include twice the border width. ")
48709 (para (code "GL_INVALID_VALUE")
48710 " is generated if "
48718 (para (code "GL_INVALID_OPERATION")
48719 " is generated if the texture array has not
48720 been defined by a previous "
48721 (code "glTexImage3D")
48723 (para (code "GL_INVALID_OPERATION")
48724 " is generated if "
48727 (code "GL_UNSIGNED_BYTE_3_3_2")
48729 (code "GL_UNSIGNED_BYTE_2_3_3_REV")
48731 (code "GL_UNSIGNED_SHORT_5_6_5")
48733 (code "GL_UNSIGNED_SHORT_5_6_5_REV")
48740 (para (code "GL_INVALID_OPERATION")
48741 " is generated if "
48744 (code "GL_UNSIGNED_SHORT_4_4_4_4")
48746 (code "GL_UNSIGNED_SHORT_4_4_4_4_REV")
48748 (code "GL_UNSIGNED_SHORT_5_5_5_1")
48750 (code "GL_UNSIGNED_SHORT_1_5_5_5_REV")
48752 (code "GL_UNSIGNED_INT_8_8_8_8")
48754 (code "GL_UNSIGNED_INT_8_8_8_8_REV")
48756 (code "GL_UNSIGNED_INT_10_10_10_2")
48758 (code "GL_UNSIGNED_INT_2_10_10_10_REV")
48767 (para (code "GL_INVALID_OPERATION")
48768 " is generated if a non-zero buffer object name is bound to the "
48769 (code "GL_PIXEL_UNPACK_BUFFER")
48770 " target and the buffer object's data store is currently mapped. ")
48771 (para (code "GL_INVALID_OPERATION")
48772 " is generated if a non-zero buffer object name is bound to the "
48773 (code "GL_PIXEL_UNPACK_BUFFER")
48774 " target and the data would be unpacked from the buffer
48775 object such that the memory reads required would exceed the data store size. ")
48776 (para (code "GL_INVALID_OPERATION")
48777 " is generated if a non-zero buffer object name is bound to the "
48778 (code "GL_PIXEL_UNPACK_BUFFER")
48781 " is not evenly divisible
48782 into the number of bytes needed to store in memory a datum indicated by "
48785 (para (code "GL_INVALID_OPERATION")
48786 " is generated if "
48787 (code "glTexSubImage3D")
48789 between the execution of "
48791 " and the corresponding
48796 (define-gl-procedure
48801 (funcdef "void " (function "glTranslated"))
48802 (paramdef "GLdouble " (parameter "x"))
48803 (paramdef "GLdouble " (parameter "y"))
48804 (paramdef "GLdouble " (parameter "z"))))
48807 "multiply the current matrix by a translation matrix")
48808 (heading "Parameters")
48809 (table (% (formatter (asis)))
48810 (entry (% (heading (var "x")))
48820 " coordinates of a translation vector. ")))
48821 (heading "Description")
48822 (para (code "glTranslate")
48823 " produces a translation by "
48824 (math "(" (var "x") "," (var "y") (var "z") ")")
48828 (code "glMatrixMode")
48830 is multiplied by this translation matrix,
48831 with the product replacing the current matrix, as if "
48832 (code "glMultMatrix")
48833 " were called with the following matrix
48834 for its argument: ")
48879 If the matrix mode is either "
48880 (code "GL_MODELVIEW")
48882 (code "GL_PROJECTION")
48884 all objects drawn after a call to "
48885 (code "glTranslate")
48886 " are translated. ")
48889 (code "glPushMatrix")
48891 (code "glPopMatrix")
48892 " to save and restore
48893 the untranslated coordinate system. ")
48895 (para (code "GL_INVALID_OPERATION")
48896 " is generated if "
48897 (code "glTranslate")
48899 is executed between the execution of "
48902 and the corresponding execution of "
48906 (define-gl-procedure
48911 (funcdef "void " (function "glUniform1f"))
48912 (paramdef "GLint " (parameter "location"))
48913 (paramdef "GLfloat " (parameter "v0")))
48915 (funcdef "void " (function "glUniform2f"))
48916 (paramdef "GLint " (parameter "location"))
48917 (paramdef "GLfloat " (parameter "v0"))
48918 (paramdef "GLfloat " (parameter "v1")))
48920 (funcdef "void " (function "glUniform3f"))
48921 (paramdef "GLint " (parameter "location"))
48922 (paramdef "GLfloat " (parameter "v0"))
48923 (paramdef "GLfloat " (parameter "v1"))
48924 (paramdef "GLfloat " (parameter "v2")))
48926 (funcdef "void " (function "glUniform4f"))
48927 (paramdef "GLint " (parameter "location"))
48928 (paramdef "GLfloat " (parameter "v0"))
48929 (paramdef "GLfloat " (parameter "v1"))
48930 (paramdef "GLfloat " (parameter "v2"))
48931 (paramdef "GLfloat " (parameter "v3")))
48933 (funcdef "void " (function "glUniform1i"))
48934 (paramdef "GLint " (parameter "location"))
48935 (paramdef "GLint " (parameter "v0")))
48937 (funcdef "void " (function "glUniform2i"))
48938 (paramdef "GLint " (parameter "location"))
48939 (paramdef "GLint " (parameter "v0"))
48940 (paramdef "GLint " (parameter "v1")))
48942 (funcdef "void " (function "glUniform3i"))
48943 (paramdef "GLint " (parameter "location"))
48944 (paramdef "GLint " (parameter "v0"))
48945 (paramdef "GLint " (parameter "v1"))
48946 (paramdef "GLint " (parameter "v2")))
48948 (funcdef "void " (function "glUniform4i"))
48949 (paramdef "GLint " (parameter "location"))
48950 (paramdef "GLint " (parameter "v0"))
48951 (paramdef "GLint " (parameter "v1"))
48952 (paramdef "GLint " (parameter "v2"))
48953 (paramdef "GLint " (parameter "v3"))))
48956 "Specify the value of a uniform variable for the current program object")
48957 (heading "Parameters")
48958 (table (% (formatter (asis)))
48959 (entry (% (heading (var "location")))
48960 (para "Specifies the location of the uniform variable
48961 \t\t to be modified."))
48970 (para "Specifies the new values to be used for the
48971 \t\t specified uniform variable.")))
48972 (heading "Description")
48973 (para (code "glUniform")
48974 " modifies the value of a
48975 \tuniform variable or a uniform variable array. The location of
48976 \tthe uniform variable to be modified is specified by\t"
48978 ", which should be a value
48980 (code "glGetUniformLocation")
48983 " operates on the program object
48984 \tthat was made part of current state by calling\t"
48985 (code "glUseProgram")
48987 (para "The commands "
48988 (code "glUniform{1|2|3|4}{f|i}")
48990 are used to change the value of the uniform variable specified
48993 " using the values passed as
48994 \targuments. The number specified in the command should match the
48995 \tnumber of components in the data type of the specified uniform
48996 \tvariable (e.g., "
48998 " for float, int, bool;\t"
49000 " for vec2, ivec2, bvec2, etc.). The suffix\t"
49002 " indicates that floating-point values are
49003 \tbeing passed; the suffix "
49006 \tinteger values are being passed, and this type should also match
49007 \tthe data type of the specified uniform variable. The\t"
49009 " variants of this function should be used
49010 \tto provide values for uniform variables defined as int, ivec2,
49011 \tivec3, ivec4, or arrays of these. The "
49014 variants should be used to provide values for uniform variables
49015 \tof type float, vec2, vec3, vec4, or arrays of these. Either the\t"
49020 \tmay be used to provide values for uniform variables of type
49021 \tbool, bvec2, bvec3, bvec4, or arrays of these. The uniform
49022 \tvariable will be set to false if the input value is 0 or 0.0f,
49023 \tand it will be set to true otherwise.")
49024 (para "All active uniform variables defined in a program object
49025 \tare initialized to 0 when the program object is linked
49026 \tsuccessfully. They retain the values assigned to them by a call
49028 (code "glUniform ")
49029 " until the next successful
49030 \tlink operation occurs on the program object, when they are once
49031 \tagain initialized to 0.")
49032 (para "The commands "
49033 (code "glUniform{1|2|3|4}{f|i}v")
49035 can be used to modify a single uniform variable or a uniform
49036 \tvariable array. These commands pass a count and a pointer to the
49037 \tvalues to be loaded into a uniform variable or a uniform
49038 \tvariable array. A count of 1 should be used if modifying the
49039 \tvalue of a single uniform variable, and a count of 1 or greater
49040 \tcan be used to modify an entire array or part of an array. When
49043 " elements starting at an arbitrary
49046 " in a uniform variable array,
49052 \tthe array will be replaced with the new values. If\t"
49057 \tlarger than the size of the uniform variable array, values for
49058 \tall array elements beyond the end of the array will be ignored.
49059 \tThe number specified in the name of the command indicates the
49060 \tnumber of components for each element in\t"
49062 ", and it should match the number of
49063 \tcomponents in the data type of the specified uniform variable
49066 " for float, int, bool;\t"
49068 " for vec2, ivec2, bvec2, etc.). The data
49069 \ttype specified in the name of the command must match the data
49070 \ttype for the specified uniform variable as described previously
49072 (code "glUniform{1|2|3|4}{f|i}")
49074 (para "For uniform variable arrays, each element of the array is
49075 \tconsidered to be of the type indicated in the name of the
49077 (code "glUniform3f")
49079 (code "glUniform3fv")
49080 " can be used to load a uniform
49081 \tvariable array of type vec3). The number of elements of the
49082 \tuniform variable array to be modified is specified by\t"
49084 (para "The commands\t"
49085 (code "glUniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv")
49086 " are used to modify a matrix or an array of matrices. The numbers in the
49087 \tcommand name are interpreted as the dimensionality of the matrix.
49090 " indicates a 2 × 2 matrix
49091 \t(i.e., 4 values), the number "
49094 \t3 × 3 matrix (i.e., 9 values), and the number\t"
49096 " indicates a 4 × 4 matrix (i.e., 16
49097 \tvalues). Non-square matrix dimensionality is explicit, with the first
49098 number representing the number of columns and the second number
49099 representing the number of rows. For example, "
49101 " indicates a 2 × 4 matrix with 2 columns
49102 and 4 rows (i.e., 8 values).
49107 ", each matrix is assumed to be
49108 \tsupplied in column major order. If\t"
49112 ", each matrix is assumed to be
49113 \tsupplied in row major order. The "
49116 argument indicates the number of matrices to be passed. A count
49117 \tof 1 should be used if modifying the value of a single matrix,
49118 \tand a count greater than 1 can be used to modify an array of
49121 (para (code "GL_INVALID_OPERATION")
49122 " is generated if there
49123 \tis no current program object.")
49124 (para (code "GL_INVALID_OPERATION")
49125 " is generated if the
49126 \tsize of the uniform variable declared in the shader does not
49127 \tmatch the size indicated by the "
49131 (para (code "GL_INVALID_OPERATION")
49132 " is generated if one of
49133 \tthe integer variants of this function is used to load a uniform
49134 \tvariable of type float, vec2, vec3, vec4, or an array of these,
49135 \tor if one of the floating-point variants of this function is
49136 \tused to load a uniform variable of type int, ivec2, ivec3, or
49137 \tivec4, or an array of these.")
49138 (para (code "GL_INVALID_OPERATION")
49139 " is generated if\t"
49141 " is an invalid uniform location
49142 \tfor the current program object and\t"
49144 " is not equal to -1.")
49145 (para (code "GL_INVALID_VALUE")
49146 " is generated if\t"
49148 " is less than 0.")
49149 (para (code "GL_INVALID_OPERATION")
49150 " is generated if\t"
49152 " is greater than 1 and the indicated
49153 \tuniform variable is not an array variable.")
49154 (para (code "GL_INVALID_OPERATION")
49155 " is generated if a
49156 \tsampler is loaded using a command other than\t"
49157 (code "glUniform1i")
49159 (code "glUniform1iv")
49161 (para (code "GL_INVALID_OPERATION")
49162 " is generated if\t"
49164 " is executed between the execution
49168 and the corresponding execution of\t"
49172 (define-gl-procedure
49177 (funcdef "void " (function "glUseProgram"))
49178 (paramdef "GLuint " (parameter "program"))))
49181 "Installs a program object as part of current rendering state")
49182 (heading "Parameters")
49183 (table (% (formatter (asis)))
49184 (entry (% (heading (var "program")))
49185 (para "Specifies the handle of the program object
49186 \t\t whose executables are to be used as part of current
49187 \t\t rendering state.")))
49188 (heading "Description")
49189 (para (code "glUseProgram")
49190 " installs the program
49191 \tobject specified by "
49194 \tcurrent rendering state. One or more executables are created in
49195 \ta program object by successfully attaching shader objects to it
49197 (code "glAttachShader")
49199 \tsuccessfully compiling the shader objects with\t"
49200 (code "glCompileShader")
49202 \tand successfully linking the program object with\t"
49203 (code "glLinkProgram")
49205 (para "A program object will contain an executable that will run
49206 \ton the vertex processor if it contains one or more shader
49207 \tobjects of type "
49208 (code "GL_VERTEX_SHADER")
49210 \tbeen successfully compiled and linked. Similarly, a program
49211 \tobject will contain an executable that will run on the fragment
49212 \tprocessor if it contains one or more shader objects of type\t"
49213 (code "GL_FRAGMENT_SHADER")
49215 \tsuccessfully compiled and linked.")
49216 (para "Successfully installing an executable on a programmable
49217 \tprocessor will cause the corresponding fixed functionality of
49218 \tOpenGL to be disabled. Specifically, if an executable is
49219 \tinstalled on the vertex processor, the OpenGL fixed
49220 \tfunctionality will be disabled as follows.")
49222 (item (para "The modelview matrix is not applied to vertex
49223 \t\tcoordinates."))
49224 (item (para "The projection matrix is not applied to vertex
49225 \t\tcoordinates."))
49226 (item (para "The texture matrices are not applied to texture
49227 \t\tcoordinates."))
49228 (item (para "Normals are not transformed to eye
49229 \t\tcoordinates."))
49230 (item (para "Normals are not rescaled or normalized."))
49231 (item (para "Normalization of\t"
49232 (code "GL_AUTO_NORMAL")
49233 " evaluated normals is
49234 \t\tnot performed."))
49235 (item (para "Texture coordinates are not generated
49236 \t\tautomatically."))
49237 (item (para "Per-vertex lighting is not performed."))
49238 (item (para "Color material computations are not
49240 (item (para "Color index lighting is not performed."))
49241 (item (para "This list also applies when setting the current
49242 \t\traster position.")))
49243 (para "The executable that is installed on the vertex processor
49244 \tis expected to implement any or all of the desired functionality
49245 \tfrom the preceding list. Similarly, if an executable is
49246 \tinstalled on the fragment processor, the OpenGL fixed
49247 \tfunctionality will be disabled as follows.")
49249 (item (para "Texture environment and texture functions are not
49251 (item (para "Texture application is not applied."))
49252 (item (para "Color sum is not applied."))
49253 (item (para "Fog is not applied.")))
49254 (para "Again, the fragment shader that is installed is expected
49255 \tto implement any or all of the desired functionality from the
49256 \tpreceding list.")
49257 (para "While a program object is in use, applications are free to
49258 \tmodify attached shader objects, compile attached shader objects,
49259 \tattach additional shader objects, and detach or delete shader
49260 \tobjects. None of these operations will affect the executables
49261 \tthat are part of the current state. However, relinking the
49262 \tprogram object that is currently in use will install the program
49263 \tobject as part of the current rendering state if the link
49264 \toperation was successful (see\t"
49265 (code "glLinkProgram")
49267 ). If the program object currently in use is relinked
49268 \tunsuccessfully, its link status will be set to\t"
49270 ", but the executables and
49271 \tassociated state will remain part of the current state until a
49272 \tsubsequent call to "
49273 (code "glUseProgram")
49275 \tfrom use. After it is removed from use, it cannot be made part
49276 \tof current state until it has been successfully relinked.")
49279 " contains shader objects
49281 (code "GL_VERTEX_SHADER")
49283 \tcontain shader objects of type\t"
49284 (code "GL_FRAGMENT_SHADER")
49285 ", an executable will be
49286 \tinstalled on the vertex processor, but fixed functionality will
49287 \tbe used for fragment processing. Similarly, if\t"
49289 " contains shader objects of type\t"
49290 (code "GL_FRAGMENT_SHADER")
49291 " but it does not contain
49292 \tshader objects of type "
49293 (code "GL_VERTEX_SHADER")
49295 \texecutable will be installed on the fragment processor, but
49296 \tfixed functionality will be used for vertex processing. If\t"
49298 " is 0, the programmable processors
49299 \twill be disabled, and fixed functionality will be used for both
49300 \tvertex and fragment processing.")
49302 (para (code "GL_INVALID_VALUE")
49303 " is generated if\t"
49305 " is neither 0 nor a value
49306 \tgenerated by OpenGL.")
49307 (para (code "GL_INVALID_OPERATION")
49308 " is generated if\t"
49310 " is not a program object.")
49311 (para (code "GL_INVALID_OPERATION")
49312 " is generated if\t"
49314 " could not be made part of current
49316 (para (code "GL_INVALID_OPERATION")
49317 " is generated if\t"
49318 (code "glUseProgram")
49319 " is executed between the
49323 and the corresponding execution of\t"
49327 (define-gl-procedure
49329 "glValidateProgram"
49332 (funcdef "void " (function "glValidateProgram"))
49333 (paramdef "GLuint " (parameter "program"))))
49335 (heading "Validates a program object")
49336 (heading "Parameters")
49337 (table (% (formatter (asis)))
49338 (entry (% (heading (var "program")))
49339 (para "Specifies the handle of the program object to
49340 \t\t be validated.")))
49341 (heading "Description")
49342 (para (code "glValidateProgram")
49344 \twhether the executables contained in\t"
49346 " can execute given the current
49347 \tOpenGL state. The information generated by the validation
49348 \tprocess will be stored in "
49351 \tinformation log. The validation information may consist of an
49352 \tempty string, or it may be a string containing information about
49353 \thow the current program object interacts with the rest of
49354 \tcurrent OpenGL state. This provides a way for OpenGL
49355 \timplementers to convey more information about why the current
49356 \tprogram is inefficient, suboptimal, failing to execute, and so
49358 (para "The status of the validation operation will be stored as
49359 \tpart of the program object's state. This value will be set to\t"
49361 " if the validation succeeded, and\t"
49363 " otherwise. It can be queried by
49365 (code "glGetProgram")
49370 (code "GL_VALIDATE_STATUS")
49371 ". If validation is
49375 \texecute given the current state. Otherwise,\t"
49377 " is guaranteed to not execute.")
49378 (para "This function is typically useful only during application
49379 \tdevelopment. The informational string stored in the information
49380 \tlog is completely implementation dependent; therefore, an
49381 \tapplication should not expect different OpenGL implementations
49382 \tto produce identical information strings.")
49384 (para (code "GL_INVALID_VALUE")
49385 " is generated if\t"
49387 " is not a value generated by
49389 (para (code "GL_INVALID_OPERATION")
49390 " is generated if\t"
49392 " is not a program object.")
49393 (para (code "GL_INVALID_OPERATION")
49394 " is generated if\t"
49395 (code "glValidateProgram")
49396 " is executed between the
49400 and the corresponding execution of\t"
49404 (define-gl-procedure
49405 glVertexAttribPointer
49406 "glVertexAttribPointer"
49411 (function "glVertexAttribPointer"))
49412 (paramdef "GLuint " (parameter "index"))
49413 (paramdef "GLint " (parameter "size"))
49414 (paramdef "GLenum " (parameter "type"))
49415 (paramdef "GLboolean " (parameter "normalized"))
49416 (paramdef "GLsizei " (parameter "stride"))
49419 (parameter "pointer"))))
49422 "define an array of generic vertex attribute data")
49423 (heading "Parameters")
49424 (table (% (formatter (asis)))
49425 (entry (% (heading (var "index")))
49426 (para "Specifies the index of the generic vertex
49427 \t\t attribute to be modified."))
49428 (entry (% (heading (var "size")))
49429 (para "Specifies the number of components per
49430 \t\t generic vertex attribute. Must
49431 \t\t be 1, 2, 3, or 4. The initial value is 4."))
49432 (entry (% (heading (var "type")))
49433 (para "Specifies the data type of each component in
49434 \t\t the array. Symbolic constants "
49437 (code "GL_UNSIGNED_BYTE")
49441 (code "GL_UNSIGNED_SHORT")
49445 (code "GL_UNSIGNED_INT")
49451 \t\t accepted. The initial value is "
49454 (entry (% (heading (var "normalized")))
49455 (para "Specifies whether fixed-point data values
49456 \t\t should be normalized ("
49459 \t\t or converted directly as fixed-point values
49464 (entry (% (heading (var "stride")))
49465 (para "Specifies the byte offset between consecutive
49466 \t\t generic vertex attributes. If "
49469 is 0, the generic vertex attributes are
49470 \t\t understood to be tightly packed in the
49471 \t\t array. The initial value is 0."))
49472 (entry (% (heading (var "pointer")))
49473 (para "Specifies a pointer to the first component of
49474 \t\t the first generic vertex attribute in the array. The initial value is 0.")))
49475 (heading "Description")
49476 (para (code "glVertexAttribPointer")
49478 \tlocation and data format of the array of generic vertex attributes at index "
49481 to use when rendering. "
49484 specifies the number of components per attribute and must be 1,
49487 " specifies the data type
49488 \tof each component, and "
49491 \tthe byte stride from one attribute to the next, allowing vertices and
49492 \tattributes to be packed into a single array or
49493 \tstored in separate arrays.
49498 " indicates that values stored
49499 \tin an integer format are to be mapped to the range [-1,1] (for
49500 \tsigned values) or [0,1] (for unsigned values) when they are
49501 \taccessed and converted to floating point. Otherwise, values will
49502 \tbe converted to floats directly without normalization.")
49503 (para "If a non-zero named buffer object is bound to the "
49504 (code "GL_ARRAY_BUFFER")
49507 (code "glBindBuffer")
49508 ") while a generic vertex attribute array is
49511 " is treated as a byte offset into the buffer object's data store.
49512 Also, the buffer object binding ("
49513 (code "GL_ARRAY_BUFFER_BINDING")
49514 ") is saved as generic vertex attribute array
49515 client-side state ("
49516 (code "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING")
49520 (para "When a generic vertex attribute array is specified,\t"
49530 " are saved as client-side
49531 \tstate, in addition to the current vertex array buffer object binding.")
49532 (para "To enable and disable a generic vertex attribute array,
49534 (code "glEnableVertexAttribArray")
49537 (code "glDisableVertexAttribArray")
49541 ". If enabled, the generic
49542 \tvertex attribute array is used when "
49543 (code "glArrayElement")
49545 (code "glDrawArrays")
49547 (code "glMultiDrawArrays")
49549 (code "glDrawElements")
49551 (code "glMultiDrawElements")
49553 (code "glDrawRangeElements")
49557 (para (code "GL_INVALID_VALUE")
49558 " is generated if\t"
49560 " is greater than or equal to\t"
49561 (code "GL_MAX_VERTEX_ATTRIBS")
49563 (para (code "GL_INVALID_VALUE")
49564 " is generated if\t"
49566 " is not 1, 2, 3, or 4.")
49567 (para (code "GL_INVALID_ENUM")
49568 " is generated if\t"
49570 " is not an accepted value.")
49571 (para (code "GL_INVALID_VALUE")
49572 " is generated if\t"
49576 (define-gl-procedure
49581 (funcdef "void " (function "glVertexAttrib1f"))
49582 (paramdef "GLuint " (parameter "index"))
49583 (paramdef "GLfloat " (parameter "v0")))
49585 (funcdef "void " (function "glVertexAttrib1s"))
49586 (paramdef "GLuint " (parameter "index"))
49587 (paramdef "GLshort " (parameter "v0")))
49589 (funcdef "void " (function "glVertexAttrib1d"))
49590 (paramdef "GLuint " (parameter "index"))
49591 (paramdef "GLdouble " (parameter "v0")))
49593 (funcdef "void " (function "glVertexAttrib2f"))
49594 (paramdef "GLuint " (parameter "index"))
49595 (paramdef "GLfloat " (parameter "v0"))
49596 (paramdef "GLfloat " (parameter "v1")))
49598 (funcdef "void " (function "glVertexAttrib2s"))
49599 (paramdef "GLuint " (parameter "index"))
49600 (paramdef "GLshort " (parameter "v0"))
49601 (paramdef "GLshort " (parameter "v1")))
49603 (funcdef "void " (function "glVertexAttrib2d"))
49604 (paramdef "GLuint " (parameter "index"))
49605 (paramdef "GLdouble " (parameter "v0"))
49606 (paramdef "GLdouble " (parameter "v1")))
49608 (funcdef "void " (function "glVertexAttrib3f"))
49609 (paramdef "GLuint " (parameter "index"))
49610 (paramdef "GLfloat " (parameter "v0"))
49611 (paramdef "GLfloat " (parameter "v1"))
49612 (paramdef "GLfloat " (parameter "v2")))
49614 (funcdef "void " (function "glVertexAttrib3s"))
49615 (paramdef "GLuint " (parameter "index"))
49616 (paramdef "GLshort " (parameter "v0"))
49617 (paramdef "GLshort " (parameter "v1"))
49618 (paramdef "GLshort " (parameter "v2")))
49620 (funcdef "void " (function "glVertexAttrib3d"))
49621 (paramdef "GLuint " (parameter "index"))
49622 (paramdef "GLdouble " (parameter "v0"))
49623 (paramdef "GLdouble " (parameter "v1"))
49624 (paramdef "GLdouble " (parameter "v2")))
49626 (funcdef "void " (function "glVertexAttrib4f"))
49627 (paramdef "GLuint " (parameter "index"))
49628 (paramdef "GLfloat " (parameter "v0"))
49629 (paramdef "GLfloat " (parameter "v1"))
49630 (paramdef "GLfloat " (parameter "v2"))
49631 (paramdef "GLfloat " (parameter "v3")))
49633 (funcdef "void " (function "glVertexAttrib4s"))
49634 (paramdef "GLuint " (parameter "index"))
49635 (paramdef "GLshort " (parameter "v0"))
49636 (paramdef "GLshort " (parameter "v1"))
49637 (paramdef "GLshort " (parameter "v2"))
49638 (paramdef "GLshort " (parameter "v3")))
49640 (funcdef "void " (function "glVertexAttrib4d"))
49641 (paramdef "GLuint " (parameter "index"))
49642 (paramdef "GLdouble " (parameter "v0"))
49643 (paramdef "GLdouble " (parameter "v1"))
49644 (paramdef "GLdouble " (parameter "v2"))
49645 (paramdef "GLdouble " (parameter "v3")))
49647 (funcdef "void " (function "glVertexAttrib4Nub"))
49648 (paramdef "GLuint " (parameter "index"))
49649 (paramdef "GLubyte " (parameter "v0"))
49650 (paramdef "GLubyte " (parameter "v1"))
49651 (paramdef "GLubyte " (parameter "v2"))
49652 (paramdef "GLubyte " (parameter "v3"))))
49655 "Specifies the value of a generic vertex attribute")
49656 (heading "Parameters")
49657 (table (% (formatter (asis)))
49658 (entry (% (heading (var "index")))
49659 (para "Specifies the index of the generic vertex
49660 \t\t attribute to be modified."))
49669 (para "Specifies the new values to be used for the
49670 \t\t specified vertex attribute.")))
49671 (heading "Description")
49672 (para "OpenGL defines a number of standard vertex attributes that
49673 \tapplications can modify with standard API entry points (color,
49674 \tnormal, texture coordinates, etc.). The\t"
49675 (code "glVertexAttrib")
49676 " family of entry points
49677 \tallows an application to pass generic vertex attributes in
49678 \tnumbered locations.")
49679 (para "Generic attributes are defined as four-component values
49680 \tthat are organized into an array. The first entry of this array
49681 \tis numbered 0, and the size of the array is specified by the
49682 \timplementation-dependent constant\t"
49683 (code "GL_MAX_VERTEX_ATTRIBS")
49684 ". Individual elements
49685 \tof this array can be modified with a\t"
49686 (code "glVertexAttrib")
49687 " call that specifies the
49688 \tindex of the element to be modified and a value for that
49690 (para "These commands can be used to specify one, two, three, or
49691 \tall four components of the generic vertex attribute specified by\t"
49696 \tname of the command indicates that only one value is passed, and
49697 \tit will be used to modify the first component of the generic
49698 \tvertex attribute. The second and third components will be set to
49699 \t0, and the fourth component will be set to 1. Similarly, a\t"
49701 " in the name of the command indicates that
49702 \tvalues are provided for the first two components, the third
49703 \tcomponent will be set to 0, and the fourth component will be set
49706 " in the name of the command
49707 \tindicates that values are provided for the first three
49708 \tcomponents and the fourth component will be set to 1, whereas a\t"
49710 " in the name indicates that values are
49711 \tprovided for all four components.")
49712 (para "The letters "
49727 \twhether the arguments are of type short, float, int, double,
49728 \tunsigned byte, unsigned short, or unsigned int. When\t"
49730 " is appended to the name, the commands can
49731 \ttake a pointer to an array of such values. The commands
49734 " indicate that the arguments
49735 \twill be passed as fixed-point values that are scaled to a
49736 \tnormalized range according to the component conversion rules
49737 \tdefined by the OpenGL specification. Signed values are
49738 \tunderstood to represent fixed-point values in the range [-1,1],
49739 \tand unsigned values are understood to represent fixed-point
49740 \tvalues in the range [0,1].")
49741 (para "OpenGL Shading Language attribute variables are allowed to
49742 \tbe of type mat2, mat3, or mat4. Attributes of these types may be
49743 \tloaded using the "
49744 (code "glVertexAttrib")
49746 \tpoints. Matrices must be loaded into successive generic
49747 \tattribute slots in column major order, with one column of the
49748 \tmatrix in each generic attribute slot.")
49749 (para "A user-defined attribute variable declared in a vertex
49750 \tshader can be bound to a generic attribute index by calling\t"
49751 (code "glBindAttribLocation")
49753 \tThis allows an application to use more descriptive variable
49754 \tnames in a vertex shader. A subsequent change to the specified
49755 \tgeneric vertex attribute will be immediately reflected as a
49756 \tchange to the corresponding attribute variable in the vertex
49758 (para "The binding between a generic vertex attribute index and a
49759 \tuser-defined attribute variable in a vertex shader is part of
49760 \tthe state of a program object, but the current value of the
49761 \tgeneric vertex attribute is not. The value of each generic
49762 \tvertex attribute is part of current state, just like standard
49763 \tvertex attributes, and it is maintained even if a different
49764 \tprogram object is used.")
49765 (para "An application may freely modify generic vertex attributes
49766 \tthat are not bound to a named vertex shader attribute variable.
49767 \tThese values are simply maintained as part of current state and
49768 \twill not be accessed by the vertex shader. If a generic vertex
49769 \tattribute bound to an attribute variable in a vertex shader is
49770 \tnot updated while the vertex shader is executing, the vertex
49771 \tshader will repeatedly use the current value for the generic
49772 \tvertex attribute.")
49773 (para "The generic vertex attribute with index 0 is the same as
49774 \tthe vertex position attribute previously defined by OpenGL. A\t"
49782 command is completely equivalent to the corresponding\t"
49783 (code "glVertexAttrib")
49784 " command with an index
49785 \targument of 0. A vertex shader can access generic vertex
49786 \tattribute 0 by using the built-in attribute variable\t"
49788 ". There are no current values
49789 \tfor generic vertex attribute 0. This is the only generic vertex
49790 \tattribute with this property; calls to set other standard vertex
49791 \tattributes can be freely mixed with calls to set any of the
49792 \tother generic vertex attributes.")
49794 (para (code "GL_INVALID_VALUE")
49795 " is generated if\t"
49797 " is greater than or equal to\t"
49798 (code "GL_MAX_VERTEX_ATTRIBS")
49801 (define-gl-procedure
49806 (funcdef "void " (function "glVertexPointer"))
49807 (paramdef "GLint " (parameter "size"))
49808 (paramdef "GLenum " (parameter "type"))
49809 (paramdef "GLsizei " (parameter "stride"))
49812 (parameter "pointer"))))
49814 (heading "define an array of vertex data")
49815 (heading "Parameters")
49816 (table (% (formatter (asis)))
49817 (entry (% (heading (var "size")))
49819 Specifies the number of coordinates per vertex. Must be 2, 3, or
49820 4. The initial value is 4. "))
49821 (entry (% (heading (var "type")))
49823 Specifies the data type of each coordinate in the array.
49824 Symbolic constants "
49834 are accepted. The initial value is "
49837 (entry (% (heading (var "stride")))
49839 Specifies the byte offset between consecutive
49842 " is 0, the vertices are understood to be tightly packed in
49843 the array. The initial value
49845 (entry (% (heading (var "pointer")))
49847 Specifies a pointer to the first coordinate of the first vertex in the
49848 array. The initial value is 0. ")))
49849 (heading "Description")
49850 (para (code "glVertexPointer")
49851 " specifies the location and data format of an array of vertex coordinates
49852 to use when rendering. "
49854 " specifies the number of coordinates per vertex, and must be 2, 3, or 4. "
49856 " specifies the data type of each coordinate, and "
49858 " specifies the byte stride from one
49859 vertex to the next, allowing vertices and attributes
49860 to be packed into a single array or stored in separate arrays.
49861 (Single-array storage may be more efficient on some implementations;
49863 (code "glInterleavedArrays")
49866 If a non-zero named buffer object is bound to the "
49867 (code "GL_ARRAY_BUFFER")
49870 (code "glBindBuffer")
49871 ") while a vertex array is
49874 " is treated as a byte offset into the buffer object's data store.
49875 Also, the buffer object binding ("
49876 (code "GL_ARRAY_BUFFER_BINDING")
49877 ") is saved as vertex array
49878 client-side state ("
49879 (code "GL_VERTEX_ARRAY_BUFFER_BINDING")
49882 When a vertex array is specified, "
49890 " are saved as client-side
49891 state, in addition to the current vertex array buffer object binding. ")
49893 To enable and disable the vertex array, call "
49894 (code "glEnableClientState")
49896 (code "glDisableClientState")
49897 " with the argument "
49898 (code "GL_VERTEX_ARRAY")
49900 enabled, the vertex array is used when "
49901 (code "glArrayElement")
49903 (code "glDrawArrays")
49905 (code "glMultiDrawArrays")
49907 (code "glDrawElements")
49909 (code "glMultiDrawElements")
49911 (code "glDrawRangeElements")
49915 (para (code "GL_INVALID_VALUE")
49916 " is generated if "
49918 " is not 2, 3, or 4. ")
49919 (para (code "GL_INVALID_ENUM")
49920 " is generated if "
49922 " is not an accepted value. ")
49923 (para (code "GL_INVALID_VALUE")
49924 " is generated if "
49926 " is negative. ")))
49928 (define-gl-procedure
49933 (funcdef "void " (function "glVertex2s"))
49934 (paramdef "GLshort " (parameter "x"))
49935 (paramdef "GLshort " (parameter "y"))))
49937 (heading "specify a vertex")
49938 (heading "Parameters")
49939 (table (% (formatter (asis)))
49940 (entry (% (heading (var "x")))
49953 " coordinates of a vertex.
49954 Not all parameters are present in all forms of the command. ")))
49955 (heading "Description")
49956 (para (code "glVertex")
49957 " commands are used within "
49962 point, line, and polygon vertices. The current color, normal, texture
49963 coordinates, and fog coordinate are associated with the vertex when "
49977 defaults to 0 and "
49980 defaults to 1. When "
49991 defaults to 1. ")))
49993 (define-gl-procedure
49998 (funcdef "void " (function "glViewport"))
49999 (paramdef "GLint " (parameter "x"))
50000 (paramdef "GLint " (parameter "y"))
50001 (paramdef "GLsizei " (parameter "width"))
50002 (paramdef "GLsizei " (parameter "height"))))
50004 (heading "set the viewport")
50005 (heading "Parameters")
50006 (table (% (formatter (asis)))
50007 (entry (% (heading (var "x")))
50010 Specify the lower left corner of the viewport rectangle,
50011 in pixels. The initial value is (0,0). "))
50012 (entry (% (heading (var "width")))
50013 (itemx (var "height"))
50015 Specify the width and height
50017 When a GL context is first attached to a window, "
50021 " are set to the dimensions of that
50023 (heading "Description")
50024 (para (code "glViewport")
50025 " specifies the affine transformation of "
50032 normalized device coordinates to window coordinates.
50044 be normalized device coordinates.
50045 Then the window coordinates "
50056 are computed as follows: ")
50057 (para (math (var "x")
50078 (para (math (var "y")
50100 Viewport width and height are silently clamped
50101 to a range that depends on the implementation.
50102 To query this range, call "
50105 (code "GL_MAX_VIEWPORT_DIMS")
50108 (para (code "GL_INVALID_VALUE")
50109 " is generated if either "
50114 (para (code "GL_INVALID_OPERATION")
50115 " is generated if "
50116 (code "glViewport")
50118 is executed between the execution of "
50121 and the corresponding execution of "
50125 (define-gl-procedure
50130 (funcdef "void " (function "glWindowPos2s"))
50131 (paramdef "GLshort " (parameter "x"))
50132 (paramdef "GLshort " (parameter "y"))))
50135 "specify the raster position in window coordinates for pixel operations")
50136 (heading "Parameters")
50137 (table (% (formatter (asis)))
50138 (entry (% (heading (var "x")))
50149 coordinates for the raster position. ")))
50150 (heading "Description")
50152 The GL maintains a 3D position in window coordinates. This position,
50153 called the raster position, is used to position pixel and bitmap write
50154 operations. It is maintained with subpixel accuracy. See "
50157 (code "glDrawPixels")
50159 (code "glCopyPixels")
50161 (para (code "glWindowPos2")
50168 coordinates, while "
50172 implicitly set to 0. "
50173 (code "glWindowPos3")
50174 " specifies all three coordinates.
50178 coordinate of the current raster position is always set to 1.0. ")
50179 (para (code "glWindowPos")
50180 " directly updates the "
50186 coordinates of the current raster
50187 position with the values specified. That is, the values are neither
50188 transformed by the current modelview and projection matrices, nor by
50189 the viewport-to-window transform. The "
50192 coordinate of the current raster
50193 position is updated in the following manner: ")
50194 (para (math (var "z")
50246 (code "GL_DEPTH_RANGE")
50247 "'s near value, and "
50251 (code "GL_DEPTH_RANGE")
50252 "'s far value. See "
50253 (code "glDepthRange")
50256 The specified coordinates are not clip-tested, causing the raster position
50257 to always be valid. ")
50259 The current raster position also includes some associated color data and
50260 texture coordinates. If lighting is enabled, then "
50261 (code "GL_CURRENT_RASTER_COLOR")
50262 " (in RGBA mode) or "
50263 (code "GL_CURRENT_RASTER_INDEX")
50265 (in color index mode) is set to the color produced by the lighting
50269 (code "glLightModel")
50271 (code "glShadeModel")
50273 If lighting is disabled, current color (in RGBA mode, state variable "
50274 (code "GL_CURRENT_COLOR")
50275 ") or color index (in color index mode, state variable "
50276 (code "GL_CURRENT_INDEX")
50277 ") is used to update the current raster color. "
50278 (code "GL_CURRENT_RASTER_SECONDARY_COLOR")
50279 " (in RGBA mode) is likewise updated. ")
50282 (code "GL_CURRENT_RASTER_TEXTURE_COORDS")
50283 " is updated as a function of "
50284 (code "GL_CURRENT_TEXTURE_COORDS")
50285 ", based on the texture matrix and the texture
50286 generation functions (see "
50289 (code "GL_CURRENT_RASTER_DISTANCE")
50291 (code "GL_CURRENT_FOG_COORD")
50295 (para (code "GL_INVALID_OPERATION")
50296 " is generated if "
50297 (code "glWindowPos")
50299 is executed between the execution of "
50302 and the corresponding execution of "