1 ;;; figl -*- mode: scheme; coding: utf-8 -*-
2 ;;; Copyright (C) 2013 Andy Wingo <wingo@pobox.com>
4 ;;; Figl is free software: you can redistribute it and/or modify it
5 ;;; under the terms of the GNU Lesser General Public License as
6 ;;; published by the Free Software Foundation, either version 3 of the
7 ;;; License, or (at your option) any later version.
9 ;;; Figl is distributed in the hope that it will be useful, but WITHOUT
10 ;;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 ;;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
12 ;;; Public License for more details.
14 ;;; You should have received a copy of the GNU Lesser General Public
15 ;;; License along with this program. If not, see
16 ;;; <http://www.gnu.org/licenses/>.
18 ;;; Derived from upstream OpenGL documentation.
20 ;;; Copyright (C) 1991-2006 Silicon Graphics, Inc. This document is
21 ;;; licensed under the SGI Free Software B License. For details, see
22 ;;; http://oss.sgi.com/projects/FreeB/ (http://oss.sgi.com/projects/FreeB/).
24 ;;; Copyright (C) 2003-2005 3Dlabs Inc. Ltd. This material may be
25 ;;; distributed subject to the terms and conditions set forth in the Open
26 ;;; Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/
27 ;;; (http://opencontent.org/openpub/).
29 ;;; Copyright (C) 2005 Addison-Wesley. This material may be distributed
30 ;;; subject to the terms and conditions set forth in the Open Publication
31 ;;; License, v 1.0, 8 June 1999. http://opencontent.org/openpub/
32 ;;; (http://opencontent.org/openpub/).
34 ;;; Copyright (C) 2006 Khronos Group. This material may be distributed
35 ;;; subject to the terms and conditions set forth in the Open Publication
36 ;;; License, v 1.0, 8 June 1999. http://opencontent.org/openpub/
37 ;;; (http://opencontent.org/openpub/).
39 ;;; Automatically generated; you probably don't want to edit this. To
40 ;;; update, run "make update" in the top-level build tree.
65 glBlendEquationSeparate
85 glColorTableParameterfv
86 glColorTableParameteriv
121 glCompressedTexImage1D
122 glCompressedTexImage2D
123 glCompressedTexImage3D
124 glCompressedTexSubImage1D
125 glCompressedTexSubImage2D
126 glCompressedTexSubImage3D
127 glConvolutionFilter1D
128 glConvolutionFilter2D
129 glConvolutionParameterf
130 glConvolutionParameteri
131 glConvolutionParameterfv
132 glConvolutionParameteriv
135 glCopyConvolutionFilter1D
136 glCopyConvolutionFilter2D
167 glEnableVertexAttribArray
168 glDisableVertexAttribArray
205 glGetBufferParameteriv
209 glGetColorTableParameterfv
210 glGetColorTableParameteriv
212 glGetCompressedTexImage
213 glGetConvolutionFilter
214 glGetConvolutionParameterfv
215 glGetConvolutionParameteriv
217 glGetHistogramParameterfv
218 glGetHistogramParameteriv
227 glGetMinmaxParameterfv
228 glGetMinmaxParameteriv
251 glGetTexLevelParameterfv
252 glGetTexLevelParameteriv
258 glGetVertexAttribPointerv
305 glLoadTransposeMatrixd
306 glLoadTransposeMatrixf
360 glMultTransposeMatrixd
361 glMultTransposeMatrixf
445 glSecondaryColorPointer
466 glStencilFuncSeparate
468 glStencilMaskSeparate
554 glVertexAttribPointer
634 (define-gl-procedures
635 ((glAccum (op GLenum) (value GLfloat) -> void))
636 "Operate on the accumulation buffer.
639 Specifies the accumulation buffer operation. Symbolic constants
640 `GL_ACCUM', `GL_LOAD', `GL_ADD', `GL_MULT', and `GL_RETURN' are
644 Specifies a floating-point value used in the accumulation buffer
645 operation. OP determines how VALUE is used.
647 The accumulation buffer is an extended-range color buffer. Images are
648 not rendered into it. Rather, images rendered into one of the color
649 buffers are added to the contents of the accumulation buffer after
650 rendering. Effects such as antialiasing (of points, lines, and
651 polygons), motion blur, and depth of field can be created by
652 accumulating images generated with different transformation matrices.
654 Each pixel in the accumulation buffer consists of red, green, blue, and
655 alpha values. The number of bits per component in the accumulation
656 buffer depends on the implementation. You can examine this number by
657 calling `glGetIntegerv' four times, with arguments `GL_ACCUM_RED_BITS',
658 `GL_ACCUM_GREEN_BITS', `GL_ACCUM_BLUE_BITS', and `GL_ACCUM_ALPHA_BITS'.
659 Regardless of the number of bits per component, the range of values
660 stored by each component is [-1,1] . The accumulation buffer pixels are
661 mapped one-to-one with frame buffer pixels.
663 `glAccum' operates on the accumulation buffer. The first argument, OP,
664 is a symbolic constant that selects an accumulation buffer operation.
665 The second argument, VALUE, is a floating-point value to be used in that
666 operation. Five operations are specified: `GL_ACCUM', `GL_LOAD',
667 `GL_ADD', `GL_MULT', and `GL_RETURN'.
669 All accumulation buffer operations are limited to the area of the
670 current scissor box and applied identically to the red, green, blue, and
671 alpha components of each pixel. If a `glAccum' operation results in a
672 value outside the range [-1,1] , the contents of an accumulation buffer
673 pixel component are undefined.
675 The operations are as follows:
678 Obtains R, G, B, and A values from the buffer currently selected
679 for reading (see `glReadBuffer'). Each component value is divided
680 by 2^N-1 , where N is the number of bits allocated to each color
681 component in the currently selected buffer. The result is a
682 floating-point value in the range [0,1] , which is multiplied by
683 VALUE and added to the corresponding pixel component in the
684 accumulation buffer, thereby updating the accumulation buffer.
687 Similar to `GL_ACCUM', except that the current value in the
688 accumulation buffer is not used in the calculation of the new
689 value. That is, the R, G, B, and A values from the currently
690 selected buffer are divided by 2^N-1 , multiplied by VALUE, and
691 then stored in the corresponding accumulation buffer cell,
692 overwriting the current value.
695 Adds VALUE to each R, G, B, and A in the accumulation buffer.
698 Multiplies each R, G, B, and A in the accumulation buffer by VALUE
699 and returns the scaled component to its corresponding accumulation
703 Transfers accumulation buffer values to the color buffer or buffers
704 currently selected for writing. Each R, G, B, and A component is
705 multiplied by VALUE, then multiplied by 2^N-1 , clamped to the
706 range [0,2^N-1] , and stored in the corresponding display buffer
707 cell. The only fragment operations that are applied to this
708 transfer are pixel ownership, scissor, dithering, and color
711 To clear the accumulation buffer, call `glClearAccum' with R, G, B, and
712 A values to set it to, then call `glClear' with the accumulation buffer
715 `GL_INVALID_ENUM' is generated if OP is not an accepted value.
717 `GL_INVALID_OPERATION' is generated if there is no accumulation buffer.
719 `GL_INVALID_OPERATION' is generated if `glAccum' is executed between the
720 execution of `glBegin' and the corresponding execution of `glEnd'.")
722 (define-gl-procedures
723 ((glActiveTexture (texture GLenum) -> void))
724 "Select active texture unit.
727 Specifies which texture unit to make active. The number of texture
728 units is implementation dependent, but must be at least two.
729 TEXTURE must be one of `GL_TEXTURE' I , where i ranges from 0 to
730 the larger of (`GL_MAX_TEXTURE_COORDS' - 1) and
731 (`GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS' - 1). The initial value is
734 `glActiveTexture' selects which texture unit subsequent texture state
735 calls will affect. The number of texture units an implementation
736 supports is implementation dependent, but must be at least 2.
738 Vertex arrays are client-side GL resources, which are selected by the
739 `glClientActiveTexture' routine.
741 `GL_INVALID_ENUM' is generated if TEXTURE is not one of `GL_TEXTURE'I ,
742 where i ranges from 0 to the larger of (`GL_MAX_TEXTURE_COORDS' - 1) and
743 (`GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS' - 1).")
745 (define-gl-procedures
751 "Specify the alpha test function.
754 Specifies the alpha comparison function. Symbolic constants
755 `GL_NEVER', `GL_LESS', `GL_EQUAL', `GL_LEQUAL', `GL_GREATER',
756 `GL_NOTEQUAL', `GL_GEQUAL', and `GL_ALWAYS' are accepted. The
757 initial value is `GL_ALWAYS'.
760 Specifies the reference value that incoming alpha values are
761 compared to. This value is clamped to the range [0,1] , where 0
762 represents the lowest possible alpha value and 1 the highest
763 possible value. The initial reference value is 0.
765 The alpha test discards fragments depending on the outcome of a
766 comparison between an incoming fragment's alpha value and a constant
767 reference value. `glAlphaFunc' specifies the reference value and the
768 comparison function. The comparison is performed only if alpha testing
769 is enabled. By default, it is not enabled. (See `glEnable' and
770 `glDisable' of `GL_ALPHA_TEST'.)
772 FUNC and REF specify the conditions under which the pixel is drawn. The
773 incoming alpha value is compared to REF using the function specified by
774 FUNC. If the value passes the comparison, the incoming fragment is
775 drawn if it also passes subsequent stencil and depth buffer tests. If
776 the value fails the comparison, no change is made to the frame buffer at
777 that pixel location. The comparison functions are as follows:
783 Passes if the incoming alpha value is less than the reference
787 Passes if the incoming alpha value is equal to the reference value.
790 Passes if the incoming alpha value is less than or equal to the
794 Passes if the incoming alpha value is greater than the reference
798 Passes if the incoming alpha value is not equal to the reference
802 Passes if the incoming alpha value is greater than or equal to the
806 Always passes (initial value).
808 `glAlphaFunc' operates on all pixel write operations, including those
809 resulting from the scan conversion of points, lines, polygons, and
810 bitmaps, and from pixel draw and copy operations. `glAlphaFunc' does
811 not affect screen clear operations.
813 `GL_INVALID_ENUM' is generated if FUNC is not an accepted value.
815 `GL_INVALID_OPERATION' is generated if `glAlphaFunc' is executed between
816 the execution of `glBegin' and the corresponding execution of `glEnd'.")
818 (define-gl-procedures
819 ((glAreTexturesResident
821 (textures const-GLuint-*)
822 (residences GLboolean-*)
825 "Determine if textures are loaded in texture memory.
828 Specifies the number of textures to be queried.
831 Specifies an array containing the names of the textures to be
835 Specifies an array in which the texture residence status is
836 returned. The residence status of a texture named by an element of
837 TEXTURES is returned in the corresponding element of RESIDENCES.
839 GL establishes a ``working set'' of textures that are resident in
840 texture memory. These textures can be bound to a texture target much
841 more efficiently than textures that are not resident.
843 `glAreTexturesResident' queries the texture residence status of the N
844 textures named by the elements of TEXTURES. If all the named textures
845 are resident, `glAreTexturesResident' returns `GL_TRUE', and the
846 contents of RESIDENCES are undisturbed. If not all the named textures
847 are resident, `glAreTexturesResident' returns `GL_FALSE', and detailed
848 status is returned in the N elements of RESIDENCES. If an element of
849 RESIDENCES is `GL_TRUE', then the texture named by the corresponding
850 element of TEXTURES is resident.
852 The residence status of a single bound texture may also be queried by
853 calling `glGetTexParameter' with the TARGET argument set to the target
854 to which the texture is bound, and the PNAME argument set to
855 `GL_TEXTURE_RESIDENT'. This is the only way that the residence status
856 of a default texture can be queried.
858 `GL_INVALID_VALUE' is generated if N is negative.
860 `GL_INVALID_VALUE' is generated if any element in TEXTURES is 0 or does
861 not name a texture. In that case, the function returns `GL_FALSE' and
862 the contents of RESIDENCES is indeterminate.
864 `GL_INVALID_OPERATION' is generated if `glAreTexturesResident' is
865 executed between the execution of `glBegin' and the corresponding
866 execution of `glEnd'.")
868 (define-gl-procedures
869 ((glArrayElement (i GLint) -> void))
870 "Render a vertex using the specified vertex array element.
873 Specifies an index into the enabled vertex data arrays.
875 `glArrayElement' commands are used within `glBegin'/`glEnd' pairs to
876 specify vertex and attribute data for point, line, and polygon
877 primitives. If `GL_VERTEX_ARRAY' is enabled when `glArrayElement' is
878 called, a single vertex is drawn, using vertex and attribute data taken
879 from location I of the enabled arrays. If `GL_VERTEX_ARRAY' is not
880 enabled, no drawing occurs but the attributes corresponding to the
881 enabled arrays are modified.
883 Use `glArrayElement' to construct primitives by indexing vertex data,
884 rather than by streaming through arrays of data in first-to-last order.
885 Because each call specifies only a single vertex, it is possible to
886 explicitly specify per-primitive attributes such as a single normal for
889 Changes made to array data between the execution of `glBegin' and the
890 corresponding execution of `glEnd' may affect calls to `glArrayElement'
891 that are made within the same `glBegin'/`glEnd' period in nonsequential
892 ways. That is, a call to `glArrayElement' that precedes a change to
893 array data may access the changed data, and a call that follows a change
894 to array data may access original data.
896 `GL_INVALID_VALUE' may be generated if I is negative.
898 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
899 bound to an enabled array and the buffer object's data store is
902 (define-gl-procedures
908 "Attaches a shader object to a program object.
911 Specifies the program object to which a shader object will be
915 Specifies the shader object that is to be attached.
917 In order to create an executable, there must be a way to specify the
918 list of things that will be linked together. Program objects provide
919 this mechanism. Shaders that are to be linked together in a program
920 object must first be attached to that program object. `glAttachShader'
921 attaches the shader object specified by SHADER to the program object
922 specified by PROGRAM. This indicates that SHADER will be included in
923 link operations that will be performed on PROGRAM.
925 All operations that can be performed on a shader object are valid
926 whether or not the shader object is attached to a program object. It is
927 permissible to attach a shader object to a program object before source
928 code has been loaded into the shader object or before the shader object
929 has been compiled. It is permissible to attach multiple shader objects
930 of the same type because each may contain a portion of the complete
931 shader. It is also permissible to attach a shader object to more than
932 one program object. If a shader object is deleted while it is attached
933 to a program object, it will be flagged for deletion, and deletion will
934 not occur until `glDetachShader' is called to detach it from all program
935 objects to which it is attached.
937 `GL_INVALID_VALUE' is generated if either PROGRAM or SHADER is not a
938 value generated by OpenGL.
940 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
942 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
944 `GL_INVALID_OPERATION' is generated if SHADER is already attached to
947 `GL_INVALID_OPERATION' is generated if `glAttachShader' is executed
948 between the execution of `glBegin' and the corresponding execution of
951 (define-gl-procedures
957 (glEndQuery (target GLenum) -> void))
958 "Delimit the boundaries of a query object.
961 Specifies the target type of query object established between
962 `glBeginQuery' and the subsequent `glEndQuery'. The symbolic
963 constant must be `GL_SAMPLES_PASSED'.
966 Specifies the name of a query object.
968 `glBeginQuery' and `glEndQuery' delimit the boundaries of a query
969 object. If a query object with name ID does not yet exist it is
972 When `glBeginQuery' is executed, the query object's samples-passed
973 counter is reset to 0. Subsequent rendering will increment the counter
974 once for every sample that passes the depth test. When `glEndQuery' is
975 executed, the samples-passed counter is assigned to the query object's
976 result value. This value can be queried by calling `glGetQueryObject'
977 with PNAME`GL_QUERY_RESULT'.
979 Querying the `GL_QUERY_RESULT' implicitly flushes the GL pipeline until
980 the rendering delimited by the query object has completed and the result
981 is available. `GL_QUERY_RESULT_AVAILABLE' can be queried to determine
982 if the result is immediately available or if the rendering is not yet
985 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SAMPLES_PASSED'.
987 `GL_INVALID_OPERATION' is generated if `glBeginQuery' is executed while
988 a query object of the same TARGET is already active.
990 `GL_INVALID_OPERATION' is generated if `glEndQuery' is executed when a
991 query object of the same TARGET is not active.
993 `GL_INVALID_OPERATION' is generated if ID is 0.
995 `GL_INVALID_OPERATION' is generated if ID is the name of an already
998 `GL_INVALID_OPERATION' is generated if `glBeginQuery' or `glEndQuery' is
999 executed between the execution of `glBegin' and the corresponding
1000 execution of `glEnd'.")
1002 (define-gl-procedures
1003 ((glBegin (mode GLenum) -> void) (glEnd -> void))
1004 "Delimit the vertices of a primitive or a group of like primitives.
1007 Specifies the primitive or primitives that will be created from
1008 vertices presented between `glBegin' and the subsequent `glEnd'.
1009 Ten symbolic constants are accepted: `GL_POINTS', `GL_LINES',
1010 `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_TRIANGLES',
1011 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_QUADS',
1012 `GL_QUAD_STRIP', and `GL_POLYGON'.
1014 `glBegin' and `glEnd' delimit the vertices that define a primitive or a
1015 group of like primitives. `glBegin' accepts a single argument that
1016 specifies in which of ten ways the vertices are interpreted. Taking N
1017 as an integer count starting at one, and N as the total number of
1018 vertices specified, the interpretations are as follows:
1021 Treats each vertex as a single point. Vertex N defines point N . N
1025 Treats each pair of vertices as an independent line segment.
1026 Vertices 2\u2062N-1 and 2\u2062N define line N . N/2 lines are drawn.
1029 Draws a connected group of line segments from the first vertex to
1030 the last. Vertices N and N+1 define line N . N-1 lines are drawn.
1033 Draws a connected group of line segments from the first vertex to
1034 the last, then back to the first. Vertices N and N+1 define line N
1035 . The last line, however, is defined by vertices N and 1 . N
1039 Treats each triplet of vertices as an independent triangle.
1040 Vertices 3\u2062N-2 , 3\u2062N-1 , and 3\u2062N define triangle N . N/3 triangles
1044 Draws a connected group of triangles. One triangle is defined for
1045 each vertex presented after the first two vertices. For odd N ,
1046 vertices N , N+1 , and N+2 define triangle N . For even N ,
1047 vertices N+1 , N , and N+2 define triangle N . N-2 triangles are
1051 Draws a connected group of triangles. One triangle is defined for
1052 each vertex presented after the first two vertices. Vertices 1 ,
1053 N+1 , and N+2 define triangle N . N-2 triangles are drawn.
1056 Treats each group of four vertices as an independent quadrilateral.
1057 Vertices 4\u2062N-3 , 4\u2062N-2 , 4\u2062N-1 , and 4\u2062N define quadrilateral N .
1058 N/4 quadrilaterals are drawn.
1061 Draws a connected group of quadrilaterals. One quadrilateral is
1062 defined for each pair of vertices presented after the first pair.
1063 Vertices 2\u2062N-1 , 2\u2062N , 2\u2062N+2 , and 2\u2062N+1 define quadrilateral N .
1064 N/2-1 quadrilaterals are drawn. Note that the order in which
1065 vertices are used to construct a quadrilateral from strip data is
1066 different from that used with independent data.
1069 Draws a single, convex polygon. Vertices 1 through N define this
1072 Only a subset of GL commands can be used between `glBegin' and `glEnd'.
1073 The commands are `glVertex', `glColor', `glSecondaryColor', `glIndex',
1074 `glNormal', `glFogCoord', `glTexCoord', `glMultiTexCoord',
1075 `glVertexAttrib', `glEvalCoord', `glEvalPoint', `glArrayElement',
1076 `glMaterial', and `glEdgeFlag'. Also, it is acceptable to use
1077 `glCallList' or `glCallLists' to execute display lists that include only
1078 the preceding commands. If any other GL command is executed between
1079 `glBegin' and `glEnd', the error flag is set and the command is ignored.
1081 Regardless of the value chosen for MODE, there is no limit to the number
1082 of vertices that can be defined between `glBegin' and `glEnd'. Lines,
1083 triangles, quadrilaterals, and polygons that are incompletely specified
1084 are not drawn. Incomplete specification results when either too few
1085 vertices are provided to specify even a single primitive or when an
1086 incorrect multiple of vertices is specified. The incomplete primitive
1087 is ignored; the rest are drawn.
1089 The minimum specification of vertices for each primitive is as follows:
1090 1 for a point, 2 for a line, 3 for a triangle, 4 for a quadrilateral,
1091 and 3 for a polygon. Modes that require a certain multiple of vertices
1092 are `GL_LINES' (2), `GL_TRIANGLES' (3), `GL_QUADS' (4), and
1093 `GL_QUAD_STRIP' (2).
1095 `GL_INVALID_ENUM' is generated if MODE is set to an unaccepted value.
1097 `GL_INVALID_OPERATION' is generated if `glBegin' is executed between a
1098 `glBegin' and the corresponding execution of `glEnd'.
1100 `GL_INVALID_OPERATION' is generated if `glEnd' is executed without being
1101 preceded by a `glBegin'.
1103 `GL_INVALID_OPERATION' is generated if a command other than `glVertex',
1104 `glColor', `glSecondaryColor', `glIndex', `glNormal', `glFogCoord',
1105 `glTexCoord', `glMultiTexCoord', `glVertexAttrib', `glEvalCoord',
1106 `glEvalPoint', `glArrayElement', `glMaterial', `glEdgeFlag',
1107 `glCallList', or `glCallLists' is executed between the execution of
1108 `glBegin' and the corresponding execution `glEnd'.
1110 Execution of `glEnableClientState', `glDisableClientState',
1111 `glEdgeFlagPointer', `glFogCoordPointer', `glTexCoordPointer',
1112 `glColorPointer', `glSecondaryColorPointer', `glIndexPointer',
1113 `glNormalPointer', `glVertexPointer', `glVertexAttribPointer',
1114 `glInterleavedArrays', or `glPixelStore' is not allowed after a call to
1115 `glBegin' and before the corresponding call to `glEnd', but an error may
1116 or may not be generated.")
1118 (define-gl-procedures
1119 ((glBindAttribLocation
1122 (name const-GLchar-*)
1125 "Associates a generic vertex attribute index with a named attribute
1129 Specifies the handle of the program object in which the association
1133 Specifies the index of the generic vertex attribute to be bound.
1136 Specifies a null terminated string containing the name of the
1137 vertex shader attribute variable to which INDEX is to be bound.
1139 `glBindAttribLocation' is used to associate a user-defined attribute
1140 variable in the program object specified by PROGRAM with a generic
1141 vertex attribute index. The name of the user-defined attribute variable
1142 is passed as a null terminated string in NAME. The generic vertex
1143 attribute index to be bound to this variable is specified by INDEX. When
1144 PROGRAM is made part of current state, values provided via the generic
1145 vertex attribute INDEX will modify the value of the user-defined
1146 attribute variable specified by NAME.
1148 If NAME refers to a matrix attribute variable, INDEX refers to the first
1149 column of the matrix. Other matrix columns are then automatically bound
1150 to locations INDEX+1 for a matrix of type mat2; INDEX+1 and INDEX+2 for
1151 a matrix of type mat3; and INDEX+1, INDEX+2, and INDEX+3 for a matrix of
1154 This command makes it possible for vertex shaders to use descriptive
1155 names for attribute variables rather than generic variables that are
1156 numbered from 0 to `GL_MAX_VERTEX_ATTRIBS' -1. The values sent to each
1157 generic attribute index are part of current state, just like standard
1158 vertex attributes such as color, normal, and vertex position. If a
1159 different program object is made current by calling `glUseProgram', the
1160 generic vertex attributes are tracked in such a way that the same values
1161 will be observed by attributes in the new program object that are also
1164 Attribute variable name-to-generic attribute index bindings for a
1165 program object can be explicitly assigned at any time by calling
1166 `glBindAttribLocation'. Attribute bindings do not go into effect until
1167 `glLinkProgram' is called. After a program object has been linked
1168 successfully, the index values for generic attributes remain fixed (and
1169 their values can be queried) until the next link command occurs.
1171 Applications are not allowed to bind any of the standard OpenGL vertex
1172 attributes using this command, as they are bound automatically when
1173 needed. Any attribute binding that occurs after the program object has
1174 been linked will not take effect until the next time the program object
1177 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
1178 `GL_MAX_VERTEX_ATTRIBS'.
1180 `GL_INVALID_OPERATION' is generated if NAME starts with the reserved
1183 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
1186 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
1188 `GL_INVALID_OPERATION' is generated if `glBindAttribLocation' is
1189 executed between the execution of `glBegin' and the corresponding
1190 execution of `glEnd'.")
1192 (define-gl-procedures
1198 "Bind a named buffer object.
1201 Specifies the target to which the buffer object is bound. The
1202 symbolic constant must be `GL_ARRAY_BUFFER',
1203 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
1204 `GL_PIXEL_UNPACK_BUFFER'.
1207 Specifies the name of a buffer object.
1209 `glBindBuffer' lets you create or use a named buffer object. Calling
1210 `glBindBuffer' with TARGET set to `GL_ARRAY_BUFFER',
1211 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER' or
1212 `GL_PIXEL_UNPACK_BUFFER' and BUFFER set to the name of the new buffer
1213 object binds the buffer object name to the target. When a buffer object
1214 is bound to a target, the previous binding for that target is
1215 automatically broken.
1217 Buffer object names are unsigned integers. The value zero is reserved,
1218 but there is no default buffer object for each buffer object target.
1219 Instead, BUFFER set to zero effectively unbinds any buffer object
1220 previously bound, and restores client memory usage for that buffer
1221 object target. Buffer object names and the corresponding buffer object
1222 contents are local to the shared display-list space (see
1223 `glXCreateContext') of the current GL rendering context; two rendering
1224 contexts share buffer object names only if they also share display
1227 You may use `glGenBuffers' to generate a set of new buffer object names.
1229 The state of a buffer object immediately after it is first bound is an
1230 unmapped zero-sized memory buffer with `GL_READ_WRITE' access and
1231 `GL_STATIC_DRAW' usage.
1233 While a non-zero buffer object name is bound, GL operations on the
1234 target to which it is bound affect the bound buffer object, and queries
1235 of the target to which it is bound return state from the bound buffer
1236 object. While buffer object name zero is bound, as in the initial
1237 state, attempts to modify or query state on the target to which it is
1238 bound generates an `GL_INVALID_OPERATION' error.
1240 When vertex array pointer state is changed, for example by a call to
1241 `glNormalPointer', the current buffer object binding
1242 (`GL_ARRAY_BUFFER_BINDING') is copied into the corresponding client
1243 state for the vertex array type being changed, for example
1244 `GL_NORMAL_ARRAY_BUFFER_BINDING'. While a non-zero buffer object is
1245 bound to the `GL_ARRAY_BUFFER' target, the vertex array pointer
1246 parameter that is traditionally interpreted as a pointer to client-side
1247 memory is instead interpreted as an offset within the buffer object
1248 measured in basic machine units.
1250 While a non-zero buffer object is bound to the `GL_ELEMENT_ARRAY_BUFFER'
1251 target, the indices parameter of `glDrawElements',
1252 `glDrawRangeElements', or `glMultiDrawElements' that is traditionally
1253 interpreted as a pointer to client-side memory is instead interpreted as
1254 an offset within the buffer object measured in basic machine units.
1256 While a non-zero buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
1257 target, the following commands are affected: `glGetCompressedTexImage',
1258 `glGetConvolutionFilter', `glGetHistogram', `glGetMinmax',
1259 `glGetPixelMap', `glGetPolygonStipple', `glGetSeparableFilter',
1260 `glGetTexImage', and `glReadPixels'. The pointer parameter that is
1261 traditionally interpreted as a pointer to client-side memory where the
1262 pixels are to be packed is instead interpreted as an offset within the
1263 buffer object measured in basic machine units.
1265 While a non-zero buffer object is bound to the `GL_PIXEL_UNPACK_BUFFER'
1266 target, the following commands are affected: `glBitmap',
1267 `glColorSubTable', `glColorTable', `glCompressedTexImage1D',
1268 `glCompressedTexImage2D', `glCompressedTexImage3D',
1269 `glCompressedTexSubImage1D', `glCompressedTexSubImage2D',
1270 `glCompressedTexSubImage3D', `glConvolutionFilter1D',
1271 `glConvolutionFilter2D', `glDrawPixels', `glPixelMap',
1272 `glPolygonStipple', `glSeparableFilter2D', `glTexImage1D',
1273 `glTexImage2D', `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D',
1274 and `glTexSubImage3D'. The pointer parameter that is traditionally
1275 interpreted as a pointer to client-side memory from which the pixels are
1276 to be unpacked is instead interpreted as an offset within the buffer
1277 object measured in basic machine units.
1279 A buffer object binding created with `glBindBuffer' remains active until
1280 a different buffer object name is bound to the same target, or until the
1281 bound buffer object is deleted with `glDeleteBuffers'.
1283 Once created, a named buffer object may be re-bound to any target as
1284 often as needed. However, the GL implementation may make choices about
1285 how to optimize the storage of a buffer object based on its initial
1288 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
1291 `GL_INVALID_OPERATION' is generated if `glBindBuffer' is executed
1292 between the execution of `glBegin' and the corresponding execution of
1295 (define-gl-procedures
1301 "Bind a named texture to a texturing target.
1304 Specifies the target to which the texture is bound. Must be either
1305 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D', or
1306 `GL_TEXTURE_CUBE_MAP'.
1309 Specifies the name of a texture.
1311 `glBindTexture' lets you create or use a named texture. Calling
1312 `glBindTexture' with TARGET set to `GL_TEXTURE_1D', `GL_TEXTURE_2D',
1313 `GL_TEXTURE_3D' or `GL_TEXTURE_CUBE_MAP' and TEXTURE set to the name of
1314 the new texture binds the texture name to the target. When a texture is
1315 bound to a target, the previous binding for that target is automatically
1318 Texture names are unsigned integers. The value zero is reserved to
1319 represent the default texture for each texture target. Texture names
1320 and the corresponding texture contents are local to the shared
1321 display-list space (see `glXCreateContext') of the current GL rendering
1322 context; two rendering contexts share texture names only if they also
1323 share display lists.
1325 You may use `glGenTextures' to generate a set of new texture names.
1327 When a texture is first bound, it assumes the specified target: A
1328 texture first bound to `GL_TEXTURE_1D' becomes one-dimensional texture,
1329 a texture first bound to `GL_TEXTURE_2D' becomes two-dimensional
1330 texture, a texture first bound to `GL_TEXTURE_3D' becomes
1331 three-dimensional texture, and a texture first bound to
1332 `GL_TEXTURE_CUBE_MAP' becomes a cube-mapped texture. The state of a
1333 one-dimensional texture immediately after it is first bound is
1334 equivalent to the state of the default `GL_TEXTURE_1D' at GL
1335 initialization, and similarly for two- and three-dimensional textures
1336 and cube-mapped textures.
1338 While a texture is bound, GL operations on the target to which it is
1339 bound affect the bound texture, and queries of the target to which it is
1340 bound return state from the bound texture. If texture mapping is active
1341 on the target to which a texture is bound, the bound texture is used. In
1342 effect, the texture targets become aliases for the textures currently
1343 bound to them, and the texture name zero refers to the default textures
1344 that were bound to them at initialization.
1346 A texture binding created with `glBindTexture' remains active until a
1347 different texture is bound to the same target, or until the bound
1348 texture is deleted with `glDeleteTextures'.
1350 Once created, a named texture may be re-bound to its same original
1351 target as often as needed. It is usually much faster to use
1352 `glBindTexture' to bind an existing named texture to one of the texture
1353 targets than it is to reload the texture image using `glTexImage1D',
1354 `glTexImage2D', or `glTexImage3D'. For additional control over
1355 performance, use `glPrioritizeTextures'.
1357 `glBindTexture' is included in display lists.
1359 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
1362 `GL_INVALID_OPERATION' is generated if TEXTURE was previously created
1363 with a target that doesn't match that of TARGET.
1365 `GL_INVALID_OPERATION' is generated if `glBindTexture' is executed
1366 between the execution of `glBegin' and the corresponding execution of
1369 (define-gl-procedures
1377 (bitmap const-GLubyte-*)
1385 Specify the pixel width and height of the bitmap image.
1390 Specify the location of the origin in the bitmap image. The origin
1391 is measured from the lower left corner of the bitmap, with right
1392 and up being the positive axes.
1397 Specify the X and Y offsets to be added to the current raster
1398 position after the bitmap is drawn.
1401 Specifies the address of the bitmap image.
1403 A bitmap is a binary image. When drawn, the bitmap is positioned
1404 relative to the current raster position, and frame buffer pixels
1405 corresponding to 1's in the bitmap are written using the current raster
1406 color or index. Frame buffer pixels corresponding to 0's in the bitmap
1409 `glBitmap' takes seven arguments. The first pair specifies the width
1410 and height of the bitmap image. The second pair specifies the location
1411 of the bitmap origin relative to the lower left corner of the bitmap
1412 image. The third pair of arguments specifies X and Y offsets to be
1413 added to the current raster position after the bitmap has been drawn.
1414 The final argument is a pointer to the bitmap image itself.
1416 If a non-zero named buffer object is bound to the
1417 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a bitmap
1418 image is specified, BITMAP is treated as a byte offset into the buffer
1419 object's data store.
1421 The bitmap image is interpreted like image data for the `glDrawPixels'
1422 command, with WIDTH and HEIGHT corresponding to the width and height
1423 arguments of that command, and with TYPE set to `GL_BITMAP' and FORMAT
1424 set to `GL_COLOR_INDEX'. Modes specified using `glPixelStore' affect
1425 the interpretation of bitmap image data; modes specified using
1426 `glPixelTransfer' do not.
1428 If the current raster position is invalid, `glBitmap' is ignored.
1429 Otherwise, the lower left corner of the bitmap image is positioned at
1430 the window coordinates
1436 where (X_R,Y_R) is the raster position and (X_O,Y_O) is the bitmap
1437 origin. Fragments are then generated for each pixel corresponding to a
1438 1 (one) in the bitmap image. These fragments are generated using the
1439 current raster Z coordinate, color or color index, and current raster
1440 texture coordinates. They are then treated just as if they had been
1441 generated by a point, line, or polygon, including texture mapping,
1442 fogging, and all per-fragment operations such as alpha and depth
1445 After the bitmap has been drawn, the X and Y coordinates of the current
1446 raster position are offset by XMOVE and YMOVE. No change is made to the
1447 Z coordinate of the current raster position, or to the current raster
1448 color, texture coordinates, or index.
1450 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is negative.
1452 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
1453 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
1454 data store is currently mapped.
1456 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
1457 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
1458 unpacked from the buffer object such that the memory reads required
1459 would exceed the data store size.
1461 `GL_INVALID_OPERATION' is generated if `glBitmap' is executed between
1462 the execution of `glBegin' and the corresponding execution of `glEnd'.")
1464 (define-gl-procedures
1472 "Set the blend color.
1481 specify the components of `GL_BLEND_COLOR'
1483 The `GL_BLEND_COLOR' may be used to calculate the source and destination
1484 blending factors. The color components are clamped to the range [0,1]
1485 before being stored. See `glBlendFunc' for a complete description of
1486 the blending operations. Initially the `GL_BLEND_COLOR' is set to (0,
1489 `GL_INVALID_OPERATION' is generated if `glBlendColor' is executed
1490 between the execution of `glBegin' and the corresponding execution of
1493 (define-gl-procedures
1494 ((glBlendEquationSeparate
1499 "Set the RGB blend equation and the alpha blend equation separately.
1502 specifies the RGB blend equation, how the red, green, and blue
1503 components of the source and destination colors are combined. It
1504 must be `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
1505 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN', `GL_MAX'.
1508 specifies the alpha blend equation, how the alpha component of the
1509 source and destination colors are combined. It must be
1510 `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1513 The blend equations determines how a new pixel (the ''source'' color) is
1514 combined with a pixel already in the framebuffer (the ''destination''
1515 color). This function specifies one blend equation for the RGB-color
1516 components and one blend equation for the alpha component.
1518 The blend equations use the source and destination blend factors
1519 specified by either `glBlendFunc' or `glBlendFuncSeparate'. See
1520 `glBlendFunc' or `glBlendFuncSeparate' for a description of the various
1523 In the equations that follow, source and destination color components
1524 are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) , respectively.
1525 The result color is referred to as (R_R,G_RB_RA_R) . The source and
1526 destination blend factors are denoted (S_R,S_GS_BS_A) and
1527 (D_R,D_GD_BD_A) , respectively. For these equations all color
1528 components are understood to have values in the range [0,1] .
1531 *RGB Components*, *Alpha Component*
1534 RR=R_S\u2062S_R+R_D\u2062D_R GR=G_S\u2062S_G+G_D\u2062D_G BR=B_S\u2062S_B+B_D\u2062D_B ,
1535 AR=A_S\u2062S_A+A_D\u2062D_A
1538 RR=R_S\u2062S_R-R_D\u2062D_R GR=G_S\u2062S_G-G_D\u2062D_G BR=B_S\u2062S_B-B_D\u2062D_B ,
1539 AR=A_S\u2062S_A-A_D\u2062D_A
1541 `GL_FUNC_REVERSE_SUBTRACT'
1542 RR=R_D\u2062D_R-R_S\u2062S_R GR=G_D\u2062D_G-G_S\u2062S_G BR=B_D\u2062D_B-B_S\u2062S_B ,
1543 AR=A_D\u2062D_A-A_S\u2062S_A
1546 RR=MIN\u2061(R_S,R_D) GR=MIN\u2061(G_S,G_D) BR=MIN\u2061(B_S,B_D) ,
1547 AR=MIN\u2061(A_S,A_D)
1550 RR=MAX\u2061(R_S,R_D) GR=MAX\u2061(G_S,G_D) BR=MAX\u2061(B_S,B_D) ,
1551 AR=MAX\u2061(A_S,A_D)
1553 The results of these equations are clamped to the range [0,1] .
1555 The `GL_MIN' and `GL_MAX' equations are useful for applications that
1556 analyze image data (image thresholding against a constant color, for
1557 example). The `GL_FUNC_ADD' equation is useful for antialiasing and
1558 transparency, among other things.
1560 Initially, both the RGB blend equation and the alpha blend equation are
1561 set to `GL_FUNC_ADD'.
1565 `GL_INVALID_ENUM' is generated if either MODERGB or MODEALPHA is not one
1566 of `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1567 `GL_MAX', or `GL_MIN'.
1569 `GL_INVALID_OPERATION' is generated if `glBlendEquationSeparate' is
1570 executed between the execution of `glBegin' and the corresponding
1571 execution of `glEnd'.")
1573 (define-gl-procedures
1574 ((glBlendEquation (mode GLenum) -> void))
1575 "Specify the equation used for both the RGB blend equation and the Alpha
1579 specifies how source and destination colors are combined. It must
1580 be `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1583 The blend equations determine how a new pixel (the ''source'' color) is
1584 combined with a pixel already in the framebuffer (the ''destination''
1585 color). This function sets both the RGB blend equation and the alpha
1586 blend equation to a single equation.
1588 These equations use the source and destination blend factors specified
1589 by either `glBlendFunc' or `glBlendFuncSeparate'. See `glBlendFunc' or
1590 `glBlendFuncSeparate' for a description of the various blend factors.
1592 In the equations that follow, source and destination color components
1593 are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) , respectively.
1594 The result color is referred to as (R_R,G_RB_RA_R) . The source and
1595 destination blend factors are denoted (S_R,S_GS_BS_A) and
1596 (D_R,D_GD_BD_A) , respectively. For these equations all color
1597 components are understood to have values in the range [0,1] .
1600 *RGB Components*, *Alpha Component*
1603 RR=R_S\u2062S_R+R_D\u2062D_R GR=G_S\u2062S_G+G_D\u2062D_G BR=B_S\u2062S_B+B_D\u2062D_B ,
1604 AR=A_S\u2062S_A+A_D\u2062D_A
1607 RR=R_S\u2062S_R-R_D\u2062D_R GR=G_S\u2062S_G-G_D\u2062D_G BR=B_S\u2062S_B-B_D\u2062D_B ,
1608 AR=A_S\u2062S_A-A_D\u2062D_A
1610 `GL_FUNC_REVERSE_SUBTRACT'
1611 RR=R_D\u2062D_R-R_S\u2062S_R GR=G_D\u2062D_G-G_S\u2062S_G BR=B_D\u2062D_B-B_S\u2062S_B ,
1612 AR=A_D\u2062D_A-A_S\u2062S_A
1615 RR=MIN\u2061(R_S,R_D) GR=MIN\u2061(G_S,G_D) BR=MIN\u2061(B_S,B_D) ,
1616 AR=MIN\u2061(A_S,A_D)
1619 RR=MAX\u2061(R_S,R_D) GR=MAX\u2061(G_S,G_D) BR=MAX\u2061(B_S,B_D) ,
1620 AR=MAX\u2061(A_S,A_D)
1622 The results of these equations are clamped to the range [0,1] .
1624 The `GL_MIN' and `GL_MAX' equations are useful for applications that
1625 analyze image data (image thresholding against a constant color, for
1626 example). The `GL_FUNC_ADD' equation is useful for antialiasing and
1627 transparency, among other things.
1629 Initially, both the RGB blend equation and the alpha blend equation are
1630 set to `GL_FUNC_ADD'.
1634 `GL_INVALID_ENUM' is generated if MODE is not one of `GL_FUNC_ADD',
1635 `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT', `GL_MAX', or `GL_MIN'.
1637 `GL_INVALID_OPERATION' is generated if `glBlendEquation' is executed
1638 between the execution of `glBegin' and the corresponding execution of
1641 (define-gl-procedures
1642 ((glBlendFuncSeparate
1649 "Specify pixel arithmetic for RGB and alpha components separately.
1652 Specifies how the red, green, and blue blending factors are
1653 computed. The following symbolic constants are accepted:
1654 `GL_ZERO', `GL_ONE', `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR',
1655 `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR', `GL_SRC_ALPHA',
1656 `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA', `GL_ONE_MINUS_DST_ALPHA',
1657 `GL_CONSTANT_COLOR', `GL_ONE_MINUS_CONSTANT_COLOR',
1658 `GL_CONSTANT_ALPHA', `GL_ONE_MINUS_CONSTANT_ALPHA', and
1659 `GL_SRC_ALPHA_SATURATE'. The initial value is `GL_ONE'.
1662 Specifies how the red, green, and blue destination blending factors
1663 are computed. The following symbolic constants are accepted:
1664 `GL_ZERO', `GL_ONE', `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR',
1665 `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR', `GL_SRC_ALPHA',
1666 `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA', `GL_ONE_MINUS_DST_ALPHA'.
1667 `GL_CONSTANT_COLOR', `GL_ONE_MINUS_CONSTANT_COLOR',
1668 `GL_CONSTANT_ALPHA', and `GL_ONE_MINUS_CONSTANT_ALPHA'. The
1669 initial value is `GL_ZERO'.
1672 Specified how the alpha source blending factor is computed. The
1673 same symbolic constants are accepted as for SRCRGB. The initial
1677 Specified how the alpha destination blending factor is computed.
1678 The same symbolic constants are accepted as for DSTRGB. The
1679 initial value is `GL_ZERO'.
1681 In RGBA mode, pixels can be drawn using a function that blends the
1682 incoming (source) RGBA values with the RGBA values that are already in
1683 the frame buffer (the destination values). Blending is initially
1684 disabled. Use `glEnable' and `glDisable' with argument `GL_BLEND' to
1685 enable and disable blending.
1687 `glBlendFuncSeparate' defines the operation of blending when it is
1688 enabled. SRCRGB specifies which method is used to scale the source
1689 RGB-color components. DSTRGB specifies which method is used to scale
1690 the destination RGB-color components. Likewise, SRCALPHA specifies
1691 which method is used to scale the source alpha color component, and
1692 DSTALPHA specifies which method is used to scale the destination alpha
1693 component. The possible methods are described in the following table.
1694 Each method defines four scale factors, one each for red, green, blue,
1697 In the table and in subsequent equations, source and destination color
1698 components are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) . The
1699 color specified by `glBlendColor' is referred to as (R_C,G_CB_CA_C) .
1700 They are understood to have integer values between 0 and (K_R,K_GK_BK_A)
1705 and (M_R,M_GM_BM_A) is the number of red, green, blue, and alpha
1708 Source and destination scale factors are referred to as (S_R,S_GS_BS_A)
1709 and (D_R,D_GD_BD_A) . All scale factors have range [0,1] .
1714 *RGB Factor*, *Alpha Factor*
1723 (R_S/K_R,G_S/K_GB_S/K_B) , A_S/K_A
1725 `GL_ONE_MINUS_SRC_COLOR'
1726 (1,111)-(R_S/K_R,G_S/K_GB_S/K_B) , 1-A_S/K_A
1729 (R_D/K_R,G_D/K_GB_D/K_B) , A_D/K_A
1731 `GL_ONE_MINUS_DST_COLOR'
1732 (1,11)-(R_D/K_R,G_D/K_GB_D/K_B) , 1-A_D/K_A
1735 (A_S/K_A,A_S/K_AA_S/K_A) , A_S/K_A
1737 `GL_ONE_MINUS_SRC_ALPHA'
1738 (1,11)-(A_S/K_A,A_S/K_AA_S/K_A) , 1-A_S/K_A
1741 (A_D/K_A,A_D/K_AA_D/K_A) , A_D/K_A
1743 `GL_ONE_MINUS_DST_ALPHA'
1744 (1,11)-(A_D/K_A,A_D/K_AA_D/K_A) , 1-A_D/K_A
1749 `GL_ONE_MINUS_CONSTANT_COLOR'
1750 (1,11)-(R_C,G_CB_C) , 1-A_C
1755 `GL_ONE_MINUS_CONSTANT_ALPHA'
1756 (1,11)-(A_C,A_CA_C) , 1-A_C
1758 `GL_SRC_ALPHA_SATURATE'
1763 I=MIN\u2061(A_S,1-A_D,)
1765 To determine the blended RGBA values of a pixel when drawing in RGBA
1766 mode, the system uses the following equations:
1768 R_D=MIN\u2061(K_R,R_S\u2062S_R+R_D\u2062D_R) G_D=MIN\u2061(K_G,G_S\u2062S_G+G_D\u2062D_G)
1769 B_D=MIN\u2061(K_B,B_S\u2062S_B+B_D\u2062D_B) A_D=MIN\u2061(K_A,A_S\u2062S_A+A_D\u2062D_A)
1771 Despite the apparent precision of the above equations, blending
1772 arithmetic is not exactly specified, because blending operates with
1773 imprecise integer color values. However, a blend factor that should be
1774 equal to 1 is guaranteed not to modify its multiplicand, and a blend
1775 factor equal to 0 reduces its multiplicand to 0. For example, when
1776 SRCRGB is `GL_SRC_ALPHA', DSTRGB is `GL_ONE_MINUS_SRC_ALPHA', and A_S is
1777 equal to K_A , the equations reduce to simple replacement:
1779 R_D=R_S G_D=G_S B_D=B_S A_D=A_S
1783 `GL_INVALID_ENUM' is generated if either SRCRGB or DSTRGB is not an
1786 `GL_INVALID_OPERATION' is generated if `glBlendFuncSeparate' is executed
1787 between the execution of `glBegin' and the corresponding execution of
1790 (define-gl-procedures
1796 "Specify pixel arithmetic.
1799 Specifies how the red, green, blue, and alpha source blending
1800 factors are computed. The following symbolic constants are
1801 accepted: `GL_ZERO', `GL_ONE', `GL_SRC_COLOR',
1802 `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR',
1803 `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA',
1804 `GL_ONE_MINUS_DST_ALPHA', `GL_CONSTANT_COLOR',
1805 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA',
1806 `GL_ONE_MINUS_CONSTANT_ALPHA', and `GL_SRC_ALPHA_SATURATE'. The
1807 initial value is `GL_ONE'.
1810 Specifies how the red, green, blue, and alpha destination blending
1811 factors are computed. The following symbolic constants are
1812 accepted: `GL_ZERO', `GL_ONE', `GL_SRC_COLOR',
1813 `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR',
1814 `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA',
1815 `GL_ONE_MINUS_DST_ALPHA'. `GL_CONSTANT_COLOR',
1816 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA', and
1817 `GL_ONE_MINUS_CONSTANT_ALPHA'. The initial value is `GL_ZERO'.
1819 In RGBA mode, pixels can be drawn using a function that blends the
1820 incoming (source) RGBA values with the RGBA values that are already in
1821 the frame buffer (the destination values). Blending is initially
1822 disabled. Use `glEnable' and `glDisable' with argument `GL_BLEND' to
1823 enable and disable blending.
1825 `glBlendFunc' defines the operation of blending when it is enabled.
1826 SFACTOR specifies which method is used to scale the source color
1827 components. DFACTOR specifies which method is used to scale the
1828 destination color components. The possible methods are described in the
1829 following table. Each method defines four scale factors, one each for
1830 red, green, blue, and alpha. In the table and in subsequent equations,
1831 source and destination color components are referred to as
1832 (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) . The color specified by
1833 `glBlendColor' is referred to as (R_C,G_CB_CA_C) . They are understood
1834 to have integer values between 0 and (K_R,K_GK_BK_A) , where
1838 and (M_R,M_GM_BM_A) is the number of red, green, blue, and alpha
1841 Source and destination scale factors are referred to as (S_R,S_GS_BS_A)
1842 and (D_R,D_GD_BD_A) . The scale factors described in the table, denoted
1843 (F_R,F_GF_BF_A) , represent either source or destination factors. All
1844 scale factors have range [0,1] .
1858 (R_S/K_R,G_S/K_GB_S/K_BA_S/K_A)
1860 `GL_ONE_MINUS_SRC_COLOR'
1861 (1,111)-(R_S/K_R,G_S/K_GB_S/K_BA_S/K_A)
1864 (R_D/K_R,G_D/K_GB_D/K_BA_D/K_A)
1866 `GL_ONE_MINUS_DST_COLOR'
1867 (1,111)-(R_D/K_R,G_D/K_GB_D/K_BA_D/K_A)
1870 (A_S/K_A,A_S/K_AA_S/K_AA_S/K_A)
1872 `GL_ONE_MINUS_SRC_ALPHA'
1873 (1,111)-(A_S/K_A,A_S/K_AA_S/K_AA_S/K_A)
1876 (A_D/K_A,A_D/K_AA_D/K_AA_D/K_A)
1878 `GL_ONE_MINUS_DST_ALPHA'
1879 (1,111)-(A_D/K_A,A_D/K_AA_D/K_AA_D/K_A)
1884 `GL_ONE_MINUS_CONSTANT_COLOR'
1885 (1,111)-(R_C,G_CB_CA_C)
1890 `GL_ONE_MINUS_CONSTANT_ALPHA'
1891 (1,111)-(A_C,A_CA_CA_C)
1893 `GL_SRC_ALPHA_SATURATE'
1898 I=MIN\u2061(A_S,K_A-A_D)/K_A
1900 To determine the blended RGBA values of a pixel when drawing in RGBA
1901 mode, the system uses the following equations:
1903 R_D=MIN\u2061(K_R,R_S\u2062S_R+R_D\u2062D_R) G_D=MIN\u2061(K_G,G_S\u2062S_G+G_D\u2062D_G)
1904 B_D=MIN\u2061(K_B,B_S\u2062S_B+B_D\u2062D_B) A_D=MIN\u2061(K_A,A_S\u2062S_A+A_D\u2062D_A)
1906 Despite the apparent precision of the above equations, blending
1907 arithmetic is not exactly specified, because blending operates with
1908 imprecise integer color values. However, a blend factor that should be
1909 equal to 1 is guaranteed not to modify its multiplicand, and a blend
1910 factor equal to 0 reduces its multiplicand to 0. For example, when
1911 SFACTOR is `GL_SRC_ALPHA', DFACTOR is `GL_ONE_MINUS_SRC_ALPHA', and A_S
1912 is equal to K_A , the equations reduce to simple replacement:
1914 R_D=R_S G_D=G_S B_D=B_S A_D=A_S
1918 `GL_INVALID_ENUM' is generated if either SFACTOR or DFACTOR is not an
1921 `GL_INVALID_OPERATION' is generated if `glBlendFunc' is executed between
1922 the execution of `glBegin' and the corresponding execution of `glEnd'.")
1924 (define-gl-procedures
1928 (data const-GLvoid-*)
1932 "Creates and initializes a buffer object's data store.
1935 Specifies the target buffer object. The symbolic constant must be
1936 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
1937 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
1940 Specifies the size in bytes of the buffer object's new data store.
1943 Specifies a pointer to data that will be copied into the data store
1944 for initialization, or `NULL' if no data is to be copied.
1947 Specifies the expected usage pattern of the data store. The
1948 symbolic constant must be `GL_STREAM_DRAW', `GL_STREAM_READ',
1949 `GL_STREAM_COPY', `GL_STATIC_DRAW', `GL_STATIC_READ',
1950 `GL_STATIC_COPY', `GL_DYNAMIC_DRAW', `GL_DYNAMIC_READ', or
1953 `glBufferData' creates a new data store for the buffer object currently
1954 bound to TARGET. Any pre-existing data store is deleted. The new data
1955 store is created with the specified SIZE in bytes and USAGE. If DATA is
1956 not `NULL', the data store is initialized with data from this pointer.
1957 In its initial state, the new data store is not mapped, it has a `NULL'
1958 mapped pointer, and its mapped access is `GL_READ_WRITE'.
1960 USAGE is a hint to the GL implementation as to how a buffer object's
1961 data store will be accessed. This enables the GL implementation to make
1962 more intelligent decisions that may significantly impact buffer object
1963 performance. It does not, however, constrain the actual usage of the
1964 data store. USAGE can be broken down into two parts: first, the
1965 frequency of access (modification and usage), and second, the nature of
1966 that access. The frequency of access may be one of these:
1969 The data store contents will be modified once and used at most a
1973 The data store contents will be modified once and used many times.
1976 The data store contents will be modified repeatedly and used many
1979 The nature of access may be one of these:
1982 The data store contents are modified by the application, and used
1983 as the source for GL drawing and image specification commands.
1986 The data store contents are modified by reading data from the GL,
1987 and used to return that data when queried by the application.
1990 The data store contents are modified by reading data from the GL,
1991 and used as the source for GL drawing and image specification
1994 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
1995 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
1996 `GL_PIXEL_UNPACK_BUFFER'.
1998 `GL_INVALID_ENUM' is generated if USAGE is not `GL_STREAM_DRAW',
1999 `GL_STREAM_READ', `GL_STREAM_COPY', `GL_STATIC_DRAW', `GL_STATIC_READ',
2000 `GL_STATIC_COPY', `GL_DYNAMIC_DRAW', `GL_DYNAMIC_READ', or
2003 `GL_INVALID_VALUE' is generated if SIZE is negative.
2005 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
2008 `GL_OUT_OF_MEMORY' is generated if the GL is unable to create a data
2009 store with the specified SIZE.
2011 `GL_INVALID_OPERATION' is generated if `glBufferData' is executed
2012 between the execution of `glBegin' and the corresponding execution of
2015 (define-gl-procedures
2020 (data const-GLvoid-*)
2023 "Updates a subset of a buffer object's data store.
2026 Specifies the target buffer object. The symbolic constant must be
2027 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
2028 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
2031 Specifies the offset into the buffer object's data store where data
2032 replacement will begin, measured in bytes.
2035 Specifies the size in bytes of the data store region being
2039 Specifies a pointer to the new data that will be copied into the
2042 `glBufferSubData' redefines some or all of the data store for the buffer
2043 object currently bound to TARGET. Data starting at byte offset OFFSET
2044 and extending for SIZE bytes is copied to the data store from the memory
2045 pointed to by DATA. An error is thrown if OFFSET and SIZE together
2046 define a range beyond the bounds of the buffer object's data store.
2048 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
2049 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
2050 `GL_PIXEL_UNPACK_BUFFER'.
2052 `GL_INVALID_VALUE' is generated if OFFSET or SIZE is negative, or if
2053 together they define a region of memory that extends beyond the buffer
2054 object's allocated data store.
2056 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
2059 `GL_INVALID_OPERATION' is generated if the buffer object being updated
2062 `GL_INVALID_OPERATION' is generated if `glBufferSubData' is executed
2063 between the execution of `glBegin' and the corresponding execution of
2066 (define-gl-procedures
2070 (lists const-GLvoid-*)
2073 "Execute a list of display lists.
2076 Specifies the number of display lists to be executed.
2079 Specifies the type of values in LISTS. Symbolic constants
2080 `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_UNSIGNED_SHORT',
2081 `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', `GL_2_BYTES',
2082 `GL_3_BYTES', and `GL_4_BYTES' are accepted.
2085 Specifies the address of an array of name offsets in the display
2086 list. The pointer type is void because the offsets can be bytes,
2087 shorts, ints, or floats, depending on the value of TYPE.
2089 `glCallLists' causes each display list in the list of names passed as
2090 LISTS to be executed. As a result, the commands saved in each display
2091 list are executed in order, just as if they were called without using a
2092 display list. Names of display lists that have not been defined are
2095 `glCallLists' provides an efficient means for executing more than one
2096 display list. TYPE allows lists with various name formats to be
2097 accepted. The formats are as follows:
2100 LISTS is treated as an array of signed bytes, each in the range
2104 LISTS is treated as an array of unsigned bytes, each in the range 0
2108 LISTS is treated as an array of signed two-byte integers, each in
2109 the range -32768 through 32767.
2112 LISTS is treated as an array of unsigned two-byte integers, each in
2113 the range 0 through 65535.
2116 LISTS is treated as an array of signed four-byte integers.
2119 LISTS is treated as an array of unsigned four-byte integers.
2122 LISTS is treated as an array of four-byte floating-point values.
2125 LISTS is treated as an array of unsigned bytes. Each pair of bytes
2126 specifies a single display-list name. The value of the pair is
2127 computed as 256 times the unsigned value of the first byte plus the
2128 unsigned value of the second byte.
2131 LISTS is treated as an array of unsigned bytes. Each triplet of
2132 bytes specifies a single display-list name. The value of the
2133 triplet is computed as 65536 times the unsigned value of the first
2134 byte, plus 256 times the unsigned value of the second byte, plus
2135 the unsigned value of the third byte.
2138 LISTS is treated as an array of unsigned bytes. Each quadruplet of
2139 bytes specifies a single display-list name. The value of the
2140 quadruplet is computed as 16777216 times the unsigned value of the
2141 first byte, plus 65536 times the unsigned value of the second byte,
2142 plus 256 times the unsigned value of the third byte, plus the
2143 unsigned value of the fourth byte.
2145 The list of display-list names is not null-terminated. Rather, N
2146 specifies how many names are to be taken from LISTS.
2148 An additional level of indirection is made available with the
2149 `glListBase' command, which specifies an unsigned offset that is added
2150 to each display-list name specified in LISTS before that display list is
2153 `glCallLists' can appear inside a display list. To avoid the
2154 possibility of infinite recursion resulting from display lists calling
2155 one another, a limit is placed on the nesting level of display lists
2156 during display-list execution. This limit must be at least 64, and it
2157 depends on the implementation.
2159 GL state is not saved and restored across a call to `glCallLists'. Thus,
2160 changes made to GL state during the execution of the display lists
2161 remain after execution is completed. Use `glPushAttrib', `glPopAttrib',
2162 `glPushMatrix', and `glPopMatrix' to preserve GL state across
2163 `glCallLists' calls.
2165 `GL_INVALID_VALUE' is generated if N is negative.
2167 `GL_INVALID_ENUM' is generated if TYPE is not one of `GL_BYTE',
2168 `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_UNSIGNED_SHORT', `GL_INT',
2169 `GL_UNSIGNED_INT', `GL_FLOAT', `GL_2_BYTES', `GL_3_BYTES', `GL_4_BYTES'.")
2171 (define-gl-procedures
2172 ((glCallList (list GLuint) -> void))
2173 "Execute a display list.
2176 Specifies the integer name of the display list to be executed.
2178 `glCallList' causes the named display list to be executed. The commands
2179 saved in the display list are executed in order, just as if they were
2180 called without using a display list. If LIST has not been defined as a
2181 display list, `glCallList' is ignored.
2183 `glCallList' can appear inside a display list. To avoid the possibility
2184 of infinite recursion resulting from display lists calling one another,
2185 a limit is placed on the nesting level of display lists during
2186 display-list execution. This limit is at least 64, and it depends on
2189 GL state is not saved and restored across a call to `glCallList'. Thus,
2190 changes made to GL state during the execution of a display list remain
2191 after execution of the display list is completed. Use `glPushAttrib',
2192 `glPopAttrib', `glPushMatrix', and `glPopMatrix' to preserve GL state
2193 across `glCallList' calls.")
2195 (define-gl-procedures
2203 "Specify clear values for the accumulation buffer.
2212 Specify the red, green, blue, and alpha values used when the
2213 accumulation buffer is cleared. The initial values are all 0.
2215 `glClearAccum' specifies the red, green, blue, and alpha values used by
2216 `glClear' to clear the accumulation buffer.
2218 Values specified by `glClearAccum' are clamped to the range [-1,1] .
2220 `GL_INVALID_OPERATION' is generated if `glClearAccum' is executed
2221 between the execution of `glBegin' and the corresponding execution of
2224 (define-gl-procedures
2232 "Specify clear values for the color buffers.
2241 Specify the red, green, blue, and alpha values used when the color
2242 buffers are cleared. The initial values are all 0.
2244 `glClearColor' specifies the red, green, blue, and alpha values used by
2245 `glClear' to clear the color buffers. Values specified by
2246 `glClearColor' are clamped to the range [0,1] .
2248 `GL_INVALID_OPERATION' is generated if `glClearColor' is executed
2249 between the execution of `glBegin' and the corresponding execution of
2252 (define-gl-procedures
2253 ((glClearDepth (depth GLclampd) -> void))
2254 "Specify the clear value for the depth buffer.
2257 Specifies the depth value used when the depth buffer is cleared.
2258 The initial value is 1.
2260 `glClearDepth' specifies the depth value used by `glClear' to clear the
2261 depth buffer. Values specified by `glClearDepth' are clamped to the
2264 `GL_INVALID_OPERATION' is generated if `glClearDepth' is executed
2265 between the execution of `glBegin' and the corresponding execution of
2268 (define-gl-procedures
2269 ((glClearIndex (c GLfloat) -> void))
2270 "Specify the clear value for the color index buffers.
2273 Specifies the index used when the color index buffers are cleared.
2274 The initial value is 0.
2276 `glClearIndex' specifies the index used by `glClear' to clear the color
2277 index buffers. C is not clamped. Rather, C is converted to a
2278 fixed-point value with unspecified precision to the right of the binary
2279 point. The integer part of this value is then masked with 2^M-1 , where
2280 M is the number of bits in a color index stored in the frame buffer.
2282 `GL_INVALID_OPERATION' is generated if `glClearIndex' is executed
2283 between the execution of `glBegin' and the corresponding execution of
2286 (define-gl-procedures
2287 ((glClearStencil (s GLint) -> void))
2288 "Specify the clear value for the stencil buffer.
2291 Specifies the index used when the stencil buffer is cleared. The
2294 `glClearStencil' specifies the index used by `glClear' to clear the
2295 stencil buffer. S is masked with 2^M-1 , where M is the number of bits
2296 in the stencil buffer.
2298 `GL_INVALID_OPERATION' is generated if `glClearStencil' is executed
2299 between the execution of `glBegin' and the corresponding execution of
2302 (define-gl-procedures
2303 ((glClear (mask GLbitfield) -> void))
2304 "Clear buffers to preset values.
2307 Bitwise OR of masks that indicate the buffers to be cleared. The
2308 four masks are `GL_COLOR_BUFFER_BIT', `GL_DEPTH_BUFFER_BIT',
2309 `GL_ACCUM_BUFFER_BIT', and `GL_STENCIL_BUFFER_BIT'.
2311 `glClear' sets the bitplane area of the window to values previously
2312 selected by `glClearColor', `glClearIndex', `glClearDepth',
2313 `glClearStencil', and `glClearAccum'. Multiple color buffers can be
2314 cleared simultaneously by selecting more than one buffer at a time using
2317 The pixel ownership test, the scissor test, dithering, and the buffer
2318 writemasks affect the operation of `glClear'. The scissor box bounds
2319 the cleared region. Alpha function, blend function, logical operation,
2320 stenciling, texture mapping, and depth-buffering are ignored by
2323 `glClear' takes a single argument that is the bitwise OR of several
2324 values indicating which buffer is to be cleared.
2326 The values are as follows:
2328 `GL_COLOR_BUFFER_BIT'
2329 Indicates the buffers currently enabled for color writing.
2331 `GL_DEPTH_BUFFER_BIT'
2332 Indicates the depth buffer.
2334 `GL_ACCUM_BUFFER_BIT'
2335 Indicates the accumulation buffer.
2337 `GL_STENCIL_BUFFER_BIT'
2338 Indicates the stencil buffer.
2340 The value to which each buffer is cleared depends on the setting of the
2341 clear value for that buffer.
2343 `GL_INVALID_VALUE' is generated if any bit other than the four defined
2344 bits is set in MASK.
2346 `GL_INVALID_OPERATION' is generated if `glClear' is executed between the
2347 execution of `glBegin' and the corresponding execution of `glEnd'.")
2349 (define-gl-procedures
2350 ((glClientActiveTexture (texture GLenum) -> void))
2351 "Select active texture unit.
2354 Specifies which texture unit to make active. The number of texture
2355 units is implementation dependent, but must be at least two.
2356 TEXTURE must be one of `GL_TEXTURE' I , where i ranges from 0 to
2357 the value of `GL_MAX_TEXTURE_COORDS' - 1, which is an
2358 implementation-dependent value. The initial value is
2361 `glClientActiveTexture' selects the vertex array client state parameters
2362 to be modified by `glTexCoordPointer', and enabled or disabled with
2363 `glEnableClientState' or `glDisableClientState', respectively, when
2364 called with a parameter of `GL_TEXTURE_COORD_ARRAY'.
2366 `GL_INVALID_ENUM' is generated if TEXTURE is not one of `GL_TEXTURE'I ,
2367 where i ranges from 0 to the value of `GL_MAX_TEXTURE_COORDS' - 1.")
2369 (define-gl-procedures
2372 (equation const-GLdouble-*)
2375 "Specify a plane against which all geometry is clipped.
2378 Specifies which clipping plane is being positioned. Symbolic names
2379 of the form `GL_CLIP_PLANE'I, where I is an integer between 0 and
2380 `GL_MAX_CLIP_PLANES' -1 , are accepted.
2383 Specifies the address of an array of four double-precision
2384 floating-point values. These values are interpreted as a plane
2387 Geometry is always clipped against the boundaries of a six-plane frustum
2388 in X, Y, and Z. `glClipPlane' allows the specification of additional
2389 planes, not necessarily perpendicular to the X, Y, or Z axis, against
2390 which all geometry is clipped. To determine the maximum number of
2391 additional clipping planes, call `glGetIntegerv' with argument
2392 `GL_MAX_CLIP_PLANES'. All implementations support at least six such
2393 clipping planes. Because the resulting clipping region is the
2394 intersection of the defined half-spaces, it is always convex.
2396 `glClipPlane' specifies a half-space using a four-component plane
2397 equation. When `glClipPlane' is called, EQUATION is transformed by the
2398 inverse of the modelview matrix and stored in the resulting eye
2399 coordinates. Subsequent changes to the modelview matrix have no effect
2400 on the stored plane-equation components. If the dot product of the eye
2401 coordinates of a vertex with the stored plane equation components is
2402 positive or zero, the vertex is IN with respect to that clipping plane.
2403 Otherwise, it is OUT.
2405 To enable and disable clipping planes, call `glEnable' and `glDisable'
2406 with the argument `GL_CLIP_PLANE'I, where I is the plane number.
2408 All clipping planes are initially defined as (0, 0, 0, 0) in eye
2409 coordinates and are disabled.
2411 `GL_INVALID_ENUM' is generated if PLANE is not an accepted value.
2413 `GL_INVALID_OPERATION' is generated if `glClipPlane' is executed between
2414 the execution of `glBegin' and the corresponding execution of `glEnd'.")
2416 (define-gl-procedures
2424 "Enable and disable writing of frame buffer color components.
2433 Specify whether red, green, blue, and alpha can or cannot be
2434 written into the frame buffer. The initial values are all
2435 `GL_TRUE', indicating that the color components can be written.
2437 `glColorMask' specifies whether the individual color components in the
2438 frame buffer can or cannot be written. If RED is `GL_FALSE', for
2439 example, no change is made to the red component of any pixel in any of
2440 the color buffers, regardless of the drawing operation attempted.
2442 Changes to individual bits of components cannot be controlled. Rather,
2443 changes are either enabled or disabled for entire color components.
2445 `GL_INVALID_OPERATION' is generated if `glColorMask' is executed between
2446 the execution of `glBegin' and the corresponding execution of `glEnd'.")
2448 (define-gl-procedures
2454 "Cause a material color to track the current color.
2457 Specifies whether front, back, or both front and back material
2458 parameters should track the current color. Accepted values are
2459 `GL_FRONT', `GL_BACK', and `GL_FRONT_AND_BACK'. The initial value
2460 is `GL_FRONT_AND_BACK'.
2463 Specifies which of several material parameters track the current
2464 color. Accepted values are `GL_EMISSION', `GL_AMBIENT',
2465 `GL_DIFFUSE', `GL_SPECULAR', and `GL_AMBIENT_AND_DIFFUSE'. The
2466 initial value is `GL_AMBIENT_AND_DIFFUSE'.
2468 `glColorMaterial' specifies which material parameters track the current
2469 color. When `GL_COLOR_MATERIAL' is enabled, the material parameter or
2470 parameters specified by MODE, of the material or materials specified by
2471 FACE, track the current color at all times.
2473 To enable and disable `GL_COLOR_MATERIAL', call `glEnable' and
2474 `glDisable' with argument `GL_COLOR_MATERIAL'. `GL_COLOR_MATERIAL' is
2477 `GL_INVALID_ENUM' is generated if FACE or MODE is not an accepted value.
2479 `GL_INVALID_OPERATION' is generated if `glColorMaterial' is executed
2480 between the execution of `glBegin' and the corresponding execution of
2483 (define-gl-procedures
2488 (pointer const-GLvoid-*)
2491 "Define an array of colors.
2494 Specifies the number of components per color. Must be 3 or 4. The
2498 Specifies the data type of each color component in the array.
2499 Symbolic constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
2500 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', and
2501 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
2504 Specifies the byte offset between consecutive colors. If STRIDE is
2505 0, the colors are understood to be tightly packed in the array. The
2509 Specifies a pointer to the first component of the first color
2510 element in the array. The initial value is 0.
2512 `glColorPointer' specifies the location and data format of an array of
2513 color components to use when rendering. SIZE specifies the number of
2514 components per color, and must be 3 or 4. TYPE specifies the data type
2515 of each color component, and STRIDE specifies the byte stride from one
2516 color to the next, allowing vertices and attributes to be packed into a
2517 single array or stored in separate arrays. (Single-array storage may be
2518 more efficient on some implementations; see `glInterleavedArrays'.)
2520 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
2521 target (see `glBindBuffer') while a color array is specified, POINTER is
2522 treated as a byte offset into the buffer object's data store. Also, the
2523 buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as color
2524 vertex array client-side state (`GL_COLOR_ARRAY_BUFFER_BINDING').
2526 When a color array is specified, SIZE, TYPE, STRIDE, and POINTER are
2527 saved as client-side state, in addition to the current vertex array
2528 buffer object binding.
2530 To enable and disable the color array, call `glEnableClientState' and
2531 `glDisableClientState' with the argument `GL_COLOR_ARRAY'. If enabled,
2532 the color array is used when `glDrawArrays', `glMultiDrawArrays',
2533 `glDrawElements', `glMultiDrawElements', `glDrawRangeElements', or
2534 `glArrayElement' is called.
2536 `GL_INVALID_VALUE' is generated if SIZE is not 3 or 4.
2538 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
2540 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
2542 (define-gl-procedures
2549 (data const-GLvoid-*)
2552 "Respecify a portion of a color table.
2555 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
2556 or `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2559 The starting index of the portion of the color table to be
2563 The number of table entries to replace.
2566 The format of the pixel data in DATA. The allowable values are
2567 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
2568 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
2571 The type of the pixel data in DATA. The allowable values are
2572 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
2573 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
2574 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
2575 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
2576 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
2577 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
2578 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
2579 `GL_UNSIGNED_INT_2_10_10_10_REV'.
2582 Pointer to a one-dimensional array of pixel data that is processed
2583 to replace the specified region of the color table.
2585 `glColorSubTable' is used to respecify a contiguous portion of a color
2586 table previously defined using `glColorTable'. The pixels referenced by
2587 DATA replace the portion of the existing table from indices START to
2588 START+COUNT-1 , inclusive. This region may not include any entries
2589 outside the range of the color table as it was originally specified. It
2590 is not an error to specify a subtexture with width of 0, but such a
2591 specification has no effect.
2593 If a non-zero named buffer object is bound to the
2594 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a portion of
2595 a color table is respecified, DATA is treated as a byte offset into the
2596 buffer object's data store.
2598 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
2601 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
2604 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
2607 `GL_INVALID_VALUE' is generated if START+COUNT>WIDTH .
2609 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2610 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
2611 data store is currently mapped.
2613 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2614 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
2615 unpacked from the buffer object such that the memory reads required
2616 would exceed the data store size.
2618 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2619 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
2620 divisible into the number of bytes needed to store in memory a datum
2623 `GL_INVALID_OPERATION' is generated if `glColorSubTable' is executed
2624 between the execution of `glBegin' and the corresponding execution of
2627 (define-gl-procedures
2628 ((glColorTableParameterfv
2631 (params const-GLfloat-*)
2634 (glColorTableParameteriv
2637 (params const-GLint-*)
2640 "Set color lookup table parameters.
2643 The target color table. Must be `GL_COLOR_TABLE',
2644 `GL_POST_CONVOLUTION_COLOR_TABLE', or
2645 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2648 The symbolic name of a texture color lookup table parameter. Must
2649 be one of `GL_COLOR_TABLE_SCALE' or `GL_COLOR_TABLE_BIAS'.
2652 A pointer to an array where the values of the parameters are
2655 `glColorTableParameter' is used to specify the scale factors and bias
2656 terms applied to color components when they are loaded into a color
2657 table. TARGET indicates which color table the scale and bias terms
2658 apply to; it must be set to `GL_COLOR_TABLE',
2659 `GL_POST_CONVOLUTION_COLOR_TABLE', or
2660 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2662 PNAME must be `GL_COLOR_TABLE_SCALE' to set the scale factors. In this
2663 case, PARAMS points to an array of four values, which are the scale
2664 factors for red, green, blue, and alpha, in that order.
2666 PNAME must be `GL_COLOR_TABLE_BIAS' to set the bias terms. In this
2667 case, PARAMS points to an array of four values, which are the bias terms
2668 for red, green, blue, and alpha, in that order.
2670 The color tables themselves are specified by calling `glColorTable'.
2672 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an acceptable
2675 `GL_INVALID_OPERATION' is generated if `glColorTableParameter' is
2676 executed between the execution of `glBegin' and the corresponding
2677 execution of `glEnd'.")
2679 (define-gl-procedures
2682 (internalformat GLenum)
2686 (data const-GLvoid-*)
2689 "Define a color lookup table.
2692 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
2693 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `GL_PROXY_COLOR_TABLE',
2694 `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
2695 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
2698 The internal format of the color table. The allowable values are
2699 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
2700 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
2701 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
2702 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
2703 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
2704 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
2705 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
2706 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
2707 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
2708 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', and `GL_RGBA16'.
2711 The number of entries in the color lookup table specified by DATA.
2714 The format of the pixel data in DATA. The allowable values are
2715 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
2716 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
2719 The type of the pixel data in DATA. The allowable values are
2720 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
2721 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
2722 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
2723 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
2724 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
2725 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
2726 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
2727 `GL_UNSIGNED_INT_2_10_10_10_REV'.
2730 Pointer to a one-dimensional array of pixel data that is processed
2731 to build the color table.
2733 `glColorTable' may be used in two ways: to test the actual size and
2734 color resolution of a lookup table given a particular set of parameters,
2735 or to load the contents of a color lookup table. Use the targets
2736 `GL_PROXY_*' for the first case and the other targets for the second
2739 If a non-zero named buffer object is bound to the
2740 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a color table
2741 is specified, DATA is treated as a byte offset into the buffer object's
2744 If TARGET is `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
2745 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `glColorTable' builds a color lookup
2746 table from an array of pixels. The pixel array specified by WIDTH,
2747 FORMAT, TYPE, and DATA is extracted from memory and processed just as if
2748 `glDrawPixels' were called, but processing stops after the final
2749 expansion to RGBA is completed.
2751 The four scale parameters and the four bias parameters that are defined
2752 for the table are then used to scale and bias the R, G, B, and A
2753 components of each pixel. (Use `glColorTableParameter' to set these
2754 scale and bias parameters.)
2756 Next, the R, G, B, and A values are clamped to the range [0,1] . Each
2757 pixel is then converted to the internal format specified by
2758 INTERNALFORMAT. This conversion simply maps the component values of the
2759 pixel (R, G, B, and A) to the values included in the internal format
2760 (red, green, blue, alpha, luminance, and intensity). The mapping is as
2766 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
2774 `GL_LUMINANCE_ALPHA'
2786 Finally, the red, green, blue, alpha, luminance, and/or intensity
2787 components of the resulting pixels are stored in the color table. They
2788 form a one-dimensional table with indices in the range [0,WIDTH-1] .
2790 If TARGET is `GL_PROXY_*', `glColorTable' recomputes and stores the
2791 values of the proxy color table's state variables
2792 `GL_COLOR_TABLE_FORMAT', `GL_COLOR_TABLE_WIDTH',
2793 `GL_COLOR_TABLE_RED_SIZE', `GL_COLOR_TABLE_GREEN_SIZE',
2794 `GL_COLOR_TABLE_BLUE_SIZE', `GL_COLOR_TABLE_ALPHA_SIZE',
2795 `GL_COLOR_TABLE_LUMINANCE_SIZE', and `GL_COLOR_TABLE_INTENSITY_SIZE'.
2796 There is no effect on the image or state of any actual color table. If
2797 the specified color table is too large to be supported, then all the
2798 proxy state variables listed above are set to zero. Otherwise, the
2799 color table could be supported by `glColorTable' using the corresponding
2800 non-proxy target, and the proxy state variables are set as if that
2801 target were being defined.
2803 The proxy state variables can be retrieved by calling
2804 `glGetColorTableParameter' with a target of `GL_PROXY_*'. This allows
2805 the application to decide if a particular `glColorTable' command would
2806 succeed, and to determine what the resulting color table attributes
2809 If a color table is enabled, and its width is non-zero, then its
2810 contents are used to replace a subset of the components of each RGBA
2811 pixel group, based on the internal format of the table.
2813 Each pixel group has color components (R, G, B, A) that are in the range
2814 [0.0,1.0] . The color components are rescaled to the size of the color
2815 lookup table to form an index. Then a subset of the components based on
2816 the internal format of the table are replaced by the table entry
2817 selected by that index. If the color components and contents of the
2818 table are represented as follows:
2826 Table index computed from `R'
2829 Table index computed from `G'
2832 Table index computed from `B'
2835 Table index computed from `A'
2838 Luminance value at table index `i'
2841 Intensity value at table index `i'
2844 Red value at table index `i'
2847 Green value at table index `i'
2850 Blue value at table index `i'
2853 Alpha value at table index `i'
2855 then the result of color table lookup is as follows:
2860 *Resulting Texture Components*
2862 *Table Internal Format*
2866 `R', `G', `B', `A[a]'
2869 `L[r]', `L[g]', `L[b]', `At'
2871 `GL_LUMINANCE_ALPHA'
2872 `L[r]', `L[g]', `L[b]', `A[a]'
2875 `I[r]', `I[g]', `I[b]', `I[a]'
2878 `R[r]', `G[g]', `B[b]', `A'
2881 `R[r]', `G[g]', `B[b]', `A[a]'
2883 When `GL_COLOR_TABLE' is enabled, the colors resulting from the pixel
2884 map operation (if it is enabled) are mapped by the color lookup table
2885 before being passed to the convolution operation. The colors resulting
2886 from the convolution operation are modified by the post convolution
2887 color lookup table when `GL_POST_CONVOLUTION_COLOR_TABLE' is enabled.
2888 These modified colors are then sent to the color matrix operation.
2889 Finally, if `GL_POST_COLOR_MATRIX_COLOR_TABLE' is enabled, the colors
2890 resulting from the color matrix operation are mapped by the post color
2891 matrix color lookup table before being used by the histogram operation.
2895 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
2898 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
2901 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
2904 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
2907 `GL_INVALID_VALUE' is generated if WIDTH is less than zero.
2909 `GL_TABLE_TOO_LARGE' is generated if the requested color table is too
2910 large to be supported by the implementation, and TARGET is not a
2911 `GL_PROXY_*' target.
2913 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2914 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
2915 data store is currently mapped.
2917 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2918 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
2919 unpacked from the buffer object such that the memory reads required
2920 would exceed the data store size.
2922 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2923 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
2924 divisible into the number of bytes needed to store in memory a datum
2927 `GL_INVALID_OPERATION' is generated if `glColorTable' is executed
2928 between the execution of `glBegin' and the corresponding execution of
2931 (define-gl-procedures
3036 (glColor3bv (v const-GLbyte-*) -> void)
3037 (glColor3sv (v const-GLshort-*) -> void)
3038 (glColor3iv (v const-GLint-*) -> void)
3039 (glColor3fv (v const-GLfloat-*) -> void)
3040 (glColor3dv (v const-GLdouble-*) -> void)
3041 (glColor3ubv (v const-GLubyte-*) -> void)
3042 (glColor3usv (v const-GLushort-*) -> void)
3043 (glColor3uiv (v const-GLuint-*) -> void)
3044 (glColor4bv (v const-GLbyte-*) -> void)
3045 (glColor4sv (v const-GLshort-*) -> void)
3046 (glColor4iv (v const-GLint-*) -> void)
3047 (glColor4fv (v const-GLfloat-*) -> void)
3048 (glColor4dv (v const-GLdouble-*) -> void)
3049 (glColor4ubv (v const-GLubyte-*) -> void)
3050 (glColor4usv (v const-GLushort-*) -> void)
3051 (glColor4uiv (v const-GLuint-*) -> void))
3052 "Set the current color.
3059 Specify new red, green, and blue values for the current color.
3062 Specifies a new alpha value for the current color. Included only
3063 in the four-argument `glColor4' commands.
3065 The GL stores both a current single-valued color index and a current
3066 four-valued RGBA color. `glColor' sets a new four-valued RGBA color.
3067 `glColor' has two major variants: `glColor3' and `glColor4'. `glColor3'
3068 variants specify new red, green, and blue values explicitly and set the
3069 current alpha value to 1.0 (full intensity) implicitly. `glColor4'
3070 variants specify all four color components explicitly.
3072 `glColor3b', `glColor4b', `glColor3s', `glColor4s', `glColor3i', and
3073 `glColor4i' take three or four signed byte, short, or long integers as
3074 arguments. When *v* is appended to the name, the color commands can
3075 take a pointer to an array of such values.
3077 Current color values are stored in floating-point format, with
3078 unspecified mantissa and exponent sizes. Unsigned integer color
3079 components, when specified, are linearly mapped to floating-point values
3080 such that the largest representable value maps to 1.0 (full intensity),
3081 and 0 maps to 0.0 (zero intensity). Signed integer color components,
3082 when specified, are linearly mapped to floating-point values such that
3083 the most positive representable value maps to 1.0, and the most negative
3084 representable value maps to -1.0 . (Note that this mapping does not
3085 convert 0 precisely to 0.0.) Floating-point values are mapped directly.
3087 Neither floating-point nor signed integer values are clamped to the
3088 range [0,1] before the current color is updated. However, color
3089 components are clamped to this range before they are interpolated or
3090 written into a color buffer.")
3092 (define-gl-procedures
3093 ((glCompileShader (shader GLuint) -> void))
3094 "Compiles a shader object.
3097 Specifies the shader object to be compiled.
3099 `glCompileShader' compiles the source code strings that have been stored
3100 in the shader object specified by SHADER.
3102 The compilation status will be stored as part of the shader object's
3103 state. This value will be set to `GL_TRUE' if the shader was compiled
3104 without errors and is ready for use, and `GL_FALSE' otherwise. It can
3105 be queried by calling `glGetShader' with arguments SHADER and
3106 `GL_COMPILE_STATUS'.
3108 Compilation of a shader can fail for a number of reasons as specified by
3109 the OpenGL Shading Language Specification. Whether or not the
3110 compilation was successful, information about the compilation can be
3111 obtained from the shader object's information log by calling
3112 `glGetShaderInfoLog'.
3114 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
3117 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
3119 `GL_INVALID_OPERATION' is generated if `glCompileShader' is executed
3120 between the execution of `glBegin' and the corresponding execution of
3123 (define-gl-procedures
3124 ((glCompressedTexImage1D
3127 (internalformat GLenum)
3131 (data const-GLvoid-*)
3134 "Specify a one-dimensional texture image in a compressed format.
3137 Specifies the target texture. Must be `GL_TEXTURE_1D' or
3138 `GL_PROXY_TEXTURE_1D'.
3141 Specifies the level-of-detail number. Level 0 is the base image
3142 level. Level N is the Nth mipmap reduction image.
3145 Specifies the format of the compressed image data stored at address
3149 Specifies the width of the texture image including the border if
3150 any. If the GL version does not support non-power-of-two sizes,
3151 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3152 implementations support texture images that are at least 64 texels
3153 wide. The height of the 1D texture image is 1.
3156 Specifies the width of the border. Must be either 0 or 1.
3159 Specifies the number of unsigned bytes of image data starting at
3160 the address specified by DATA.
3163 Specifies a pointer to the compressed image data in memory.
3165 Texturing maps a portion of a specified texture image onto each
3166 graphical primitive for which texturing is enabled. To enable and
3167 disable one-dimensional texturing, call `glEnable' and `glDisable' with
3168 argument `GL_TEXTURE_1D'.
3170 `glCompressedTexImage1D' loads a previously defined, and retrieved,
3171 compressed one-dimensional texture image if TARGET is `GL_TEXTURE_1D'
3172 (see `glTexImage1D').
3174 If TARGET is `GL_PROXY_TEXTURE_1D', no data is read from DATA, but all
3175 of the texture image state is recalculated, checked for consistency, and
3176 checked against the implementation's capabilities. If the
3177 implementation cannot handle a texture of the requested texture size, it
3178 sets all of the image state to 0, but does not generate an error (see
3179 `glGetError'). To query for an entire mipmap array, use an image array
3180 level greater than or equal to 1.
3182 INTERNALFORMAT must be extension-specified compressed-texture format.
3183 When a texture is loaded with `glTexImage1D' using a generic compressed
3184 texture format (e.g., `GL_COMPRESSED_RGB') the GL selects from one of
3185 its extensions supporting compressed textures. In order to load the
3186 compressed texture image using `glCompressedTexImage1D', query the
3187 compressed texture image's size and format using
3188 `glGetTexLevelParameter'.
3190 If a non-zero named buffer object is bound to the
3191 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3192 image is specified, DATA is treated as a byte offset into the buffer
3193 object's data store.
3195 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
3196 compressed internal formats: `GL_COMPRESSED_ALPHA',
3197 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3198 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
3200 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3201 format, dimensions, and contents of the specified compressed image data.
3203 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3204 supported by the specific compressed internal format as specified in the
3205 specific texture compression extension.
3207 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3208 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3209 data store is currently mapped.
3211 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3212 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3213 unpacked from the buffer object such that the memory reads required
3214 would exceed the data store size.
3216 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage1D' is
3217 executed between the execution of `glBegin' and the corresponding
3218 execution of `glEnd'.
3220 Undefined results, including abnormal program termination, are generated
3221 if DATA is not encoded in a manner consistent with the extension
3222 specification defining the internal compression format.")
3224 (define-gl-procedures
3225 ((glCompressedTexImage2D
3228 (internalformat GLenum)
3233 (data const-GLvoid-*)
3236 "Specify a two-dimensional texture image in a compressed format.
3239 Specifies the target texture. Must be `GL_TEXTURE_2D',
3240 `GL_PROXY_TEXTURE_2D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
3241 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
3242 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
3243 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
3246 Specifies the level-of-detail number. Level 0 is the base image
3247 level. Level N is the Nth mipmap reduction image.
3250 Specifies the format of the compressed image data stored at address
3254 Specifies the width of the texture image including the border if
3255 any. If the GL version does not support non-power-of-two sizes,
3256 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3257 implementations support 2D texture images that are at least 64
3258 texels wide and cube-mapped texture images that are at least 16
3262 Specifies the height of the texture image including the border if
3263 any. If the GL version does not support non-power-of-two sizes,
3264 this value must be Must be 2^N+2\u2061(BORDER,) for some integer N . All
3265 implementations support 2D texture images that are at least 64
3266 texels high and cube-mapped texture images that are at least 16
3270 Specifies the width of the border. Must be either 0 or 1.
3273 Specifies the number of unsigned bytes of image data starting at
3274 the address specified by DATA.
3277 Specifies a pointer to the compressed image data in memory.
3279 Texturing maps a portion of a specified texture image onto each
3280 graphical primitive for which texturing is enabled. To enable and
3281 disable two-dimensional texturing, call `glEnable' and `glDisable' with
3282 argument `GL_TEXTURE_2D'. To enable and disable texturing using
3283 cube-mapped textures, call `glEnable' and `glDisable' with argument
3284 `GL_TEXTURE_CUBE_MAP'.
3286 `glCompressedTexImage2D' loads a previously defined, and retrieved,
3287 compressed two-dimensional texture image if TARGET is `GL_TEXTURE_2D'
3288 (see `glTexImage2D').
3290 If TARGET is `GL_PROXY_TEXTURE_2D', no data is read from DATA, but all
3291 of the texture image state is recalculated, checked for consistency, and
3292 checked against the implementation's capabilities. If the
3293 implementation cannot handle a texture of the requested texture size, it
3294 sets all of the image state to 0, but does not generate an error (see
3295 `glGetError'). To query for an entire mipmap array, use an image array
3296 level greater than or equal to 1.
3298 INTERNALFORMAT must be an extension-specified compressed-texture format.
3299 When a texture is loaded with `glTexImage2D' using a generic compressed
3300 texture format (e.g., `GL_COMPRESSED_RGB'), the GL selects from one of
3301 its extensions supporting compressed textures. In order to load the
3302 compressed texture image using `glCompressedTexImage2D', query the
3303 compressed texture image's size and format using
3304 `glGetTexLevelParameter'.
3306 If a non-zero named buffer object is bound to the
3307 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3308 image is specified, DATA is treated as a byte offset into the buffer
3309 object's data store.
3311 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
3312 compressed internal formats: `GL_COMPRESSED_ALPHA',
3313 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3314 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
3316 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3317 format, dimensions, and contents of the specified compressed image data.
3319 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3320 supported by the specific compressed internal format as specified in the
3321 specific texture compression extension.
3323 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3324 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3325 data store is currently mapped.
3327 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3328 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3329 unpacked from the buffer object such that the memory reads required
3330 would exceed the data store size.
3332 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage2D' is
3333 executed between the execution of `glBegin' and the corresponding
3334 execution of `glEnd'.
3336 Undefined results, including abnormal program termination, are generated
3337 if DATA is not encoded in a manner consistent with the extension
3338 specification defining the internal compression format.")
3340 (define-gl-procedures
3341 ((glCompressedTexImage3D
3344 (internalformat GLenum)
3350 (data const-GLvoid-*)
3353 "Specify a three-dimensional texture image in a compressed format.
3356 Specifies the target texture. Must be `GL_TEXTURE_3D' or
3357 `GL_PROXY_TEXTURE_3D'.
3360 Specifies the level-of-detail number. Level 0 is the base image
3361 level. Level N is the Nth mipmap reduction image.
3364 Specifies the format of the compressed image data stored at address
3368 Specifies the width of the texture image including the border if
3369 any. If the GL version does not support non-power-of-two sizes,
3370 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3371 implementations support 3D texture images that are at least 16
3375 Specifies the height of the texture image including the border if
3376 any. If the GL version does not support non-power-of-two sizes,
3377 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3378 implementations support 3D texture images that are at least 16
3382 Specifies the depth of the texture image including the border if
3383 any. If the GL version does not support non-power-of-two sizes,
3384 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3385 implementations support 3D texture images that are at least 16
3389 Specifies the width of the border. Must be either 0 or 1.
3392 Specifies the number of unsigned bytes of image data starting at
3393 the address specified by DATA.
3396 Specifies a pointer to the compressed image data in memory.
3398 Texturing maps a portion of a specified texture image onto each
3399 graphical primitive for which texturing is enabled. To enable and
3400 disable three-dimensional texturing, call `glEnable' and `glDisable'
3401 with argument `GL_TEXTURE_3D'.
3403 `glCompressedTexImage3D' loads a previously defined, and retrieved,
3404 compressed three-dimensional texture image if TARGET is `GL_TEXTURE_3D'
3405 (see `glTexImage3D').
3407 If TARGET is `GL_PROXY_TEXTURE_3D', no data is read from DATA, but all
3408 of the texture image state is recalculated, checked for consistency, and
3409 checked against the implementation's capabilities. If the
3410 implementation cannot handle a texture of the requested texture size, it
3411 sets all of the image state to 0, but does not generate an error (see
3412 `glGetError'). To query for an entire mipmap array, use an image array
3413 level greater than or equal to 1.
3415 INTERNALFORMAT must be an extension-specified compressed-texture format.
3416 When a texture is loaded with `glTexImage2D' using a generic compressed
3417 texture format (e.g., `GL_COMPRESSED_RGB'), the GL selects from one of
3418 its extensions supporting compressed textures. In order to load the
3419 compressed texture image using `glCompressedTexImage3D', query the
3420 compressed texture image's size and format using
3421 `glGetTexLevelParameter'.
3423 If a non-zero named buffer object is bound to the
3424 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3425 image is specified, DATA is treated as a byte offset into the buffer
3426 object's data store.
3428 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
3429 compressed internal formats: `GL_COMPRESSED_ALPHA',
3430 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3431 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
3433 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3434 format, dimensions, and contents of the specified compressed image data.
3436 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3437 supported by the specific compressed internal format as specified in the
3438 specific texture compression extension.
3440 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3441 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3442 data store is currently mapped.
3444 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3445 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3446 unpacked from the buffer object such that the memory reads required
3447 would exceed the data store size.
3449 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage3D' is
3450 executed between the execution of `glBegin' and the corresponding
3451 execution of `glEnd'.
3453 Undefined results, including abnormal program termination, are generated
3454 if DATA is not encoded in a manner consistent with the extension
3455 specification defining the internal compression format.")
3457 (define-gl-procedures
3458 ((glCompressedTexSubImage1D
3465 (data const-GLvoid-*)
3468 "Specify a one-dimensional texture subimage in a compressed format.
3471 Specifies the target texture. Must be `GL_TEXTURE_1D'.
3474 Specifies the level-of-detail number. Level 0 is the base image
3475 level. Level N is the Nth mipmap reduction image.
3478 Specifies a texel offset in the x direction within the texture
3482 Specifies the width of the texture subimage.
3485 Specifies the format of the compressed image data stored at address
3489 Specifies the number of unsigned bytes of image data starting at
3490 the address specified by DATA.
3493 Specifies a pointer to the compressed image data in memory.
3495 Texturing maps a portion of a specified texture image onto each
3496 graphical primitive for which texturing is enabled. To enable and
3497 disable one-dimensional texturing, call `glEnable' and `glDisable' with
3498 argument `GL_TEXTURE_1D'.
3500 `glCompressedTexSubImage1D' redefines a contiguous subregion of an
3501 existing one-dimensional texture image. The texels referenced by DATA
3502 replace the portion of the existing texture array with x indices XOFFSET
3503 and XOFFSET+WIDTH-1 , inclusive. This region may not include any texels
3504 outside the range of the texture array as it was originally specified.
3505 It is not an error to specify a subtexture with width of 0, but such a
3506 specification has no effect.
3508 FORMAT must be an extension-specified compressed-texture format. The
3509 FORMAT of the compressed texture image is selected by the GL
3510 implementation that compressed it (see `glTexImage1D'), and should be
3511 queried at the time the texture was compressed with
3512 `glGetTexLevelParameter'.
3514 If a non-zero named buffer object is bound to the
3515 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3516 image is specified, DATA is treated as a byte offset into the buffer
3517 object's data store.
3519 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3520 compressed internal formats: `GL_COMPRESSED_ALPHA',
3521 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3522 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3523 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3524 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3525 `GL_COMPRESSED_SRGB_ALPHA'.
3527 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3528 format, dimensions, and contents of the specified compressed image data.
3530 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3531 supported by the specific compressed internal format as specified in the
3532 specific texture compression extension.
3534 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3535 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3536 data store is currently mapped.
3538 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3539 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3540 unpacked from the buffer object such that the memory reads required
3541 would exceed the data store size.
3543 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage1D' is
3544 executed between the execution of `glBegin' and the corresponding
3545 execution of `glEnd'.
3547 Undefined results, including abnormal program termination, are generated
3548 if DATA is not encoded in a manner consistent with the extension
3549 specification defining the internal compression format.")
3551 (define-gl-procedures
3552 ((glCompressedTexSubImage2D
3561 (data const-GLvoid-*)
3564 "Specify a two-dimensional texture subimage in a compressed format.
3567 Specifies the target texture. Must be `GL_TEXTURE_2D',
3568 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
3569 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
3570 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
3571 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
3574 Specifies the level-of-detail number. Level 0 is the base image
3575 level. Level N is the Nth mipmap reduction image.
3578 Specifies a texel offset in the x direction within the texture
3582 Specifies a texel offset in the y direction within the texture
3586 Specifies the width of the texture subimage.
3589 Specifies the height of the texture subimage.
3592 Specifies the format of the compressed image data stored at address
3596 Specifies the number of unsigned bytes of image data starting at
3597 the address specified by DATA.
3600 Specifies a pointer to the compressed image data in memory.
3602 Texturing maps a portion of a specified texture image onto each
3603 graphical primitive for which texturing is enabled. To enable and
3604 disable two-dimensional texturing, call `glEnable' and `glDisable' with
3605 argument `GL_TEXTURE_2D'. To enable and disable texturing using
3606 cube-mapped texture, call `glEnable' and `glDisable' with argument
3607 `GL_TEXTURE_CUBE_MAP'.
3609 `glCompressedTexSubImage2D' redefines a contiguous subregion of an
3610 existing two-dimensional texture image. The texels referenced by DATA
3611 replace the portion of the existing texture array with x indices XOFFSET
3612 and XOFFSET+WIDTH-1 , and the y indices YOFFSET and YOFFSET+HEIGHT-1 ,
3613 inclusive. This region may not include any texels outside the range of
3614 the texture array as it was originally specified. It is not an error to
3615 specify a subtexture with width of 0, but such a specification has no
3618 FORMAT must be an extension-specified compressed-texture format. The
3619 FORMAT of the compressed texture image is selected by the GL
3620 implementation that compressed it (see `glTexImage2D') and should be
3621 queried at the time the texture was compressed with
3622 `glGetTexLevelParameter'.
3624 If a non-zero named buffer object is bound to the
3625 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3626 image is specified, DATA is treated as a byte offset into the buffer
3627 object's data store.
3629 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3630 compressed internal formats: `GL_COMPRESSED_ALPHA',
3631 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3632 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3633 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3634 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3635 `GL_COMPRESSED_SRGB_ALPHA'.
3637 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3638 format, dimensions, and contents of the specified compressed image data.
3640 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3641 supported by the specific compressed internal format as specified in the
3642 specific texture compression extension.
3644 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3645 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3646 data store is currently mapped.
3648 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3649 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3650 unpacked from the buffer object such that the memory reads required
3651 would exceed the data store size.
3653 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage2D' is
3654 executed between the execution of `glBegin' and the corresponding
3655 execution of `glEnd'.
3657 Undefined results, including abnormal program termination, are generated
3658 if DATA is not encoded in a manner consistent with the extension
3659 specification defining the internal compression format.")
3661 (define-gl-procedures
3662 ((glCompressedTexSubImage3D
3673 (data const-GLvoid-*)
3676 "Specify a three-dimensional texture subimage in a compressed format.
3679 Specifies the target texture. Must be `GL_TEXTURE_3D'.
3682 Specifies the level-of-detail number. Level 0 is the base image
3683 level. Level N is the Nth mipmap reduction image.
3686 Specifies a texel offset in the x direction within the texture
3690 Specifies a texel offset in the y direction within the texture
3694 Specifies the width of the texture subimage.
3697 Specifies the height of the texture subimage.
3700 Specifies the depth of the texture subimage.
3703 Specifies the format of the compressed image data stored at address
3707 Specifies the number of unsigned bytes of image data starting at
3708 the address specified by DATA.
3711 Specifies a pointer to the compressed image data in memory.
3713 Texturing maps a portion of a specified texture image onto each
3714 graphical primitive for which texturing is enabled. To enable and
3715 disable three-dimensional texturing, call `glEnable' and `glDisable'
3716 with argument `GL_TEXTURE_3D'.
3718 `glCompressedTexSubImage3D' redefines a contiguous subregion of an
3719 existing three-dimensional texture image. The texels referenced by DATA
3720 replace the portion of the existing texture array with x indices XOFFSET
3721 and XOFFSET+WIDTH-1 , and the y indices YOFFSET and YOFFSET+HEIGHT-1 ,
3722 and the z indices ZOFFSET and ZOFFSET+DEPTH-1 , inclusive. This region
3723 may not include any texels outside the range of the texture array as it
3724 was originally specified. It is not an error to specify a subtexture
3725 with width of 0, but such a specification has no effect.
3727 FORMAT must be an extension-specified compressed-texture format. The
3728 FORMAT of the compressed texture image is selected by the GL
3729 implementation that compressed it (see `glTexImage3D') and should be
3730 queried at the time the texture was compressed with
3731 `glGetTexLevelParameter'.
3733 If a non-zero named buffer object is bound to the
3734 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3735 image is specified, DATA is treated as a byte offset into the buffer
3736 object's data store.
3738 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3739 compressed internal formats: `GL_COMPRESSED_ALPHA',
3740 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3741 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3742 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3743 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3744 `GL_COMPRESSED_SRGB_ALPHA'.
3746 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3747 format, dimensions, and contents of the specified compressed image data.
3749 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3750 supported by the specific compressed internal format as specified in the
3751 specific texture compression extension.
3753 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3754 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3755 data store is currently mapped.
3757 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3758 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3759 unpacked from the buffer object such that the memory reads required
3760 would exceed the data store size.
3762 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage3D' is
3763 executed between the execution of `glBegin' and the corresponding
3764 execution of `glEnd'.
3766 Undefined results, including abnormal program termination, are generated
3767 if DATA is not encoded in a manner consistent with the extension
3768 specification defining the internal compression format.")
3770 (define-gl-procedures
3771 ((glConvolutionFilter1D
3773 (internalformat GLenum)
3777 (data const-GLvoid-*)
3780 "Define a one-dimensional convolution filter.
3783 Must be `GL_CONVOLUTION_1D'.
3786 The internal format of the convolution filter kernel. The
3787 allowable values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
3788 `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4',
3789 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
3790 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
3791 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
3792 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
3793 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
3794 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
3795 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
3796 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
3797 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
3800 The width of the pixel array referenced by DATA.
3803 The format of the pixel data in DATA. The allowable values are
3804 `GL_ALPHA', `GL_LUMINANCE', `GL_LUMINANCE_ALPHA', `GL_INTENSITY',
3805 `GL_RGB', and `GL_RGBA'.
3808 The type of the pixel data in DATA. Symbolic constants
3809 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
3810 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
3811 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3812 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
3813 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3814 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3815 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3816 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
3820 Pointer to a one-dimensional array of pixel data that is processed
3821 to build the convolution filter kernel.
3823 `glConvolutionFilter1D' builds a one-dimensional convolution filter
3824 kernel from an array of pixels.
3826 The pixel array specified by WIDTH, FORMAT, TYPE, and DATA is extracted
3827 from memory and processed just as if `glDrawPixels' were called, but
3828 processing stops after the final expansion to RGBA is completed.
3830 If a non-zero named buffer object is bound to the
3831 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
3832 filter is specified, DATA is treated as a byte offset into the buffer
3833 object's data store.
3835 The R, G, B, and A components of each pixel are next scaled by the four
3836 1D `GL_CONVOLUTION_FILTER_SCALE' parameters and biased by the four 1D
3837 `GL_CONVOLUTION_FILTER_BIAS' parameters. (The scale and bias parameters
3838 are set by `glConvolutionParameter' using the `GL_CONVOLUTION_1D' target
3839 and the names `GL_CONVOLUTION_FILTER_SCALE' and
3840 `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors of
3841 four values that are applied to red, green, blue, and alpha, in that
3842 order.) The R, G, B, and A values are not clamped to [0,1] at any time
3843 during this process.
3845 Each pixel is then converted to the internal format specified by
3846 INTERNALFORMAT. This conversion simply maps the component values of the
3847 pixel (R, G, B, and A) to the values included in the internal format
3848 (red, green, blue, alpha, luminance, and intensity). The mapping is as
3854 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
3862 `GL_LUMINANCE_ALPHA'
3874 The red, green, blue, alpha, luminance, and/or intensity components of
3875 the resulting pixels are stored in floating-point rather than integer
3876 format. They form a one-dimensional filter kernel image indexed with
3877 coordinate I such that I starts at 0 and increases from left to right.
3878 Kernel location I is derived from the Ith pixel, counting from 0.
3880 Note that after a convolution is performed, the resulting color
3881 components are also scaled by their corresponding
3882 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
3883 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
3884 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
3885 set by `glPixelTransfer'.
3887 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_1D'.
3889 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
3892 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
3895 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
3898 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
3899 than the maximum supported value. This value may be queried with
3900 `glGetConvolutionParameter' using target `GL_CONVOLUTION_1D' and name
3901 `GL_MAX_CONVOLUTION_WIDTH'.
3903 `GL_INVALID_OPERATION' is generated if FORMAT is one of
3904 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3905 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and TYPE is
3908 `GL_INVALID_OPERATION' is generated if FORMAT is one of
3909 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3910 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3911 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3912 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
3913 TYPE is neither `GL_RGBA' nor `GL_BGRA'.
3915 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3916 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3917 data store is currently mapped.
3919 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3920 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3921 unpacked from the buffer object such that the memory reads required
3922 would exceed the data store size.
3924 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3925 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
3926 divisible into the number of bytes needed to store in memory a datum
3929 `GL_INVALID_OPERATION' is generated if `glConvolutionFilter1D' is
3930 executed between the execution of `glBegin' and the corresponding
3931 execution of `glEnd'.")
3933 (define-gl-procedures
3934 ((glConvolutionFilter2D
3936 (internalformat GLenum)
3941 (data const-GLvoid-*)
3944 "Define a two-dimensional convolution filter.
3947 Must be `GL_CONVOLUTION_2D'.
3950 The internal format of the convolution filter kernel. The
3951 allowable values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
3952 `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4',
3953 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
3954 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
3955 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
3956 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
3957 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
3958 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
3959 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
3960 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
3961 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
3964 The width of the pixel array referenced by DATA.
3967 The height of the pixel array referenced by DATA.
3970 The format of the pixel data in DATA. The allowable values are
3971 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
3972 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
3975 The type of the pixel data in DATA. Symbolic constants
3976 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
3977 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
3978 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3979 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
3980 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3981 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3982 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3983 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
3987 Pointer to a two-dimensional array of pixel data that is processed
3988 to build the convolution filter kernel.
3990 `glConvolutionFilter2D' builds a two-dimensional convolution filter
3991 kernel from an array of pixels.
3993 The pixel array specified by WIDTH, HEIGHT, FORMAT, TYPE, and DATA is
3994 extracted from memory and processed just as if `glDrawPixels' were
3995 called, but processing stops after the final expansion to RGBA is
3998 If a non-zero named buffer object is bound to the
3999 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
4000 filter is specified, DATA is treated as a byte offset into the buffer
4001 object's data store.
4003 The R, G, B, and A components of each pixel are next scaled by the four
4004 2D `GL_CONVOLUTION_FILTER_SCALE' parameters and biased by the four 2D
4005 `GL_CONVOLUTION_FILTER_BIAS' parameters. (The scale and bias parameters
4006 are set by `glConvolutionParameter' using the `GL_CONVOLUTION_2D' target
4007 and the names `GL_CONVOLUTION_FILTER_SCALE' and
4008 `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors of
4009 four values that are applied to red, green, blue, and alpha, in that
4010 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4011 during this process.
4013 Each pixel is then converted to the internal format specified by
4014 INTERNALFORMAT. This conversion simply maps the component values of the
4015 pixel (R, G, B, and A) to the values included in the internal format
4016 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4022 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4030 `GL_LUMINANCE_ALPHA'
4042 The red, green, blue, alpha, luminance, and/or intensity components of
4043 the resulting pixels are stored in floating-point rather than integer
4044 format. They form a two-dimensional filter kernel image indexed with
4045 coordinates I and J such that I starts at zero and increases from left
4046 to right, and J starts at zero and increases from bottom to top. Kernel
4047 location I,J is derived from the Nth pixel, where N is I+J*WIDTH.
4049 Note that after a convolution is performed, the resulting color
4050 components are also scaled by their corresponding
4051 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4052 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4053 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4054 set by `glPixelTransfer'.
4056 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_2D'.
4058 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4061 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
4064 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
4067 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4068 than the maximum supported value. This value may be queried with
4069 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4070 `GL_MAX_CONVOLUTION_WIDTH'.
4072 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
4073 than the maximum supported value. This value may be queried with
4074 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4075 `GL_MAX_CONVOLUTION_HEIGHT'.
4077 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
4078 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
4079 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
4082 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
4083 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
4084 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
4085 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
4086 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
4087 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
4089 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
4090 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
4091 data store is currently mapped.
4093 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
4094 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
4095 unpacked from the buffer object such that the memory reads required
4096 would exceed the data store size.
4098 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
4099 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
4100 divisible into the number of bytes needed to store in memory a datum
4103 `GL_INVALID_OPERATION' is generated if `glConvolutionFilter2D' is
4104 executed between the execution of `glBegin' and the corresponding
4105 execution of `glEnd'.")
4107 (define-gl-procedures
4108 ((glConvolutionParameterf
4114 (glConvolutionParameteri
4120 (glConvolutionParameterfv
4123 (params const-GLfloat-*)
4126 (glConvolutionParameteriv
4129 (params const-GLint-*)
4132 "Set convolution parameters.
4135 The target for the convolution parameter. Must be one of
4136 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D'.
4139 The parameter to be set. Must be `GL_CONVOLUTION_BORDER_MODE'.
4142 The parameter value. Must be one of `GL_REDUCE',
4143 `GL_CONSTANT_BORDER', `GL_REPLICATE_BORDER'.
4147 `glConvolutionParameter' sets the value of a convolution parameter.
4149 TARGET selects the convolution filter to be affected:
4150 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D' for the
4151 1D, 2D, or separable 2D filter, respectively.
4153 PNAME selects the parameter to be changed. `GL_CONVOLUTION_FILTER_SCALE'
4154 and `GL_CONVOLUTION_FILTER_BIAS' affect the definition of the
4155 convolution filter kernel; see `glConvolutionFilter1D',
4156 `glConvolutionFilter2D', and `glSeparableFilter2D' for details. In
4157 these cases, PARAMSv is an array of four values to be applied to red,
4158 green, blue, and alpha values, respectively. The initial value for
4159 `GL_CONVOLUTION_FILTER_SCALE' is (1, 1, 1, 1), and the initial value for
4160 `GL_CONVOLUTION_FILTER_BIAS' is (0, 0, 0, 0).
4162 A PNAME value of `GL_CONVOLUTION_BORDER_MODE' controls the convolution
4163 border mode. The accepted modes are:
4166 The image resulting from convolution is smaller than the source
4167 image. If the filter width is WF and height is HF , and the source
4168 image width is WS and height is HS , then the convolved image width
4169 will be WS-WF+1 and height will be HS-HF+1 . (If this reduction
4170 would generate an image with zero or negative width and/or height,
4171 the output is simply null, with no error generated.) The
4172 coordinates of the image resulting from convolution are zero
4173 through WS-WF in width and zero through HS-HF in height.
4175 `GL_CONSTANT_BORDER'
4176 The image resulting from convolution is the same size as the source
4177 image, and processed as if the source image were surrounded by
4178 pixels with their color specified by the
4179 `GL_CONVOLUTION_BORDER_COLOR'.
4181 `GL_REPLICATE_BORDER'
4182 The image resulting from convolution is the same size as the source
4183 image, and processed as if the outermost pixel on the border of the
4184 source image were replicated.
4186 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
4189 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
4192 `GL_INVALID_ENUM' is generated if PNAME is `GL_CONVOLUTION_BORDER_MODE'
4193 and PARAMS is not one of `GL_REDUCE', `GL_CONSTANT_BORDER', or
4194 `GL_REPLICATE_BORDER'.
4196 `GL_INVALID_OPERATION' is generated if `glConvolutionParameter' is
4197 executed between the execution of `glBegin' and the corresponding
4198 execution of `glEnd'.")
4200 (define-gl-procedures
4201 ((glCopyColorSubTable
4209 "Respecify a portion of a color table.
4212 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
4213 or `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
4216 The starting index of the portion of the color table to be
4222 The window coordinates of the left corner of the row of pixels to
4226 The number of table entries to replace.
4228 `glCopyColorSubTable' is used to respecify a contiguous portion of a
4229 color table previously defined using `glColorTable'. The pixels copied
4230 from the framebuffer replace the portion of the existing table from
4231 indices START to START+X-1 , inclusive. This region may not include any
4232 entries outside the range of the color table, as was originally
4233 specified. It is not an error to specify a subtexture with width of 0,
4234 but such a specification has no effect.
4236 `GL_INVALID_VALUE' is generated if TARGET is not a previously defined
4239 `GL_INVALID_VALUE' is generated if TARGET is not one of the allowable
4242 `GL_INVALID_VALUE' is generated if START+X>WIDTH .
4244 `GL_INVALID_OPERATION' is generated if `glCopyColorSubTable' is executed
4245 between the execution of `glBegin' and the corresponding execution of
4248 (define-gl-procedures
4251 (internalformat GLenum)
4257 "Copy pixels into a color table.
4260 The color table target. Must be `GL_COLOR_TABLE',
4261 `GL_POST_CONVOLUTION_COLOR_TABLE', or
4262 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
4265 The internal storage format of the texture image. Must be one of
4266 the following symbolic constants: `GL_ALPHA', `GL_ALPHA4',
4267 `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE',
4268 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4269 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4270 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4271 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4272 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4273 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
4274 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
4275 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
4276 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
4279 The x coordinate of the lower-left corner of the pixel rectangle to
4280 be transferred to the color table.
4283 The y coordinate of the lower-left corner of the pixel rectangle to
4284 be transferred to the color table.
4287 The width of the pixel rectangle.
4289 `glCopyColorTable' loads a color table with pixels from the current
4290 `GL_READ_BUFFER' (rather than from main memory, as is the case for
4293 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y)
4294 having width WIDTH and height 1 is loaded into the color table. If any
4295 pixels within this region are outside the window that is associated with
4296 the GL context, the values obtained for those pixels are undefined.
4298 The pixels in the rectangle are processed just as if `glReadPixels' were
4299 called, with INTERNALFORMAT set to RGBA, but processing stops after the
4300 final conversion to RGBA.
4302 The four scale parameters and the four bias parameters that are defined
4303 for the table are then used to scale and bias the R, G, B, and A
4304 components of each pixel. The scale and bias parameters are set by
4305 calling `glColorTableParameter'.
4307 Next, the R, G, B, and A values are clamped to the range [0,1] . Each
4308 pixel is then converted to the internal format specified by
4309 INTERNALFORMAT. This conversion simply maps the component values of the
4310 pixel (R, G, B, and A) to the values included in the internal format
4311 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4317 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4325 `GL_LUMINANCE_ALPHA'
4337 Finally, the red, green, blue, alpha, luminance, and/or intensity
4338 components of the resulting pixels are stored in the color table. They
4339 form a one-dimensional table with indices in the range [0,WIDTH-1] .
4343 `GL_INVALID_ENUM' is generated when TARGET is not one of the allowable
4346 `GL_INVALID_VALUE' is generated if WIDTH is less than zero.
4348 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not one of the
4351 `GL_TABLE_TOO_LARGE' is generated if the requested color table is too
4352 large to be supported by the implementation.
4354 `GL_INVALID_OPERATION' is generated if `glCopyColorTable' is executed
4355 between the execution of `glBegin' and the corresponding execution of
4358 (define-gl-procedures
4359 ((glCopyConvolutionFilter1D
4361 (internalformat GLenum)
4367 "Copy pixels into a one-dimensional convolution filter.
4370 Must be `GL_CONVOLUTION_1D'.
4373 The internal format of the convolution filter kernel. The
4374 allowable values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4375 `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4',
4376 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
4377 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4378 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4379 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4380 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4381 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
4382 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
4383 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
4384 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
4389 The window space coordinates of the lower-left coordinate of the
4390 pixel array to copy.
4393 The width of the pixel array to copy.
4395 `glCopyConvolutionFilter1D' defines a one-dimensional convolution filter
4396 kernel with pixels from the current `GL_READ_BUFFER' (rather than from
4397 main memory, as is the case for `glConvolutionFilter1D').
4399 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y),
4400 width WIDTH and height 1 is used to define the convolution filter. If
4401 any pixels within this region are outside the window that is associated
4402 with the GL context, the values obtained for those pixels are undefined.
4404 The pixels in the rectangle are processed exactly as if `glReadPixels'
4405 had been called with FORMAT set to RGBA, but the process stops just
4406 before final conversion. The R, G, B, and A components of each pixel
4407 are next scaled by the four 1D `GL_CONVOLUTION_FILTER_SCALE' parameters
4408 and biased by the four 1D `GL_CONVOLUTION_FILTER_BIAS' parameters. (The
4409 scale and bias parameters are set by `glConvolutionParameter' using the
4410 `GL_CONVOLUTION_1D' target and the names `GL_CONVOLUTION_FILTER_SCALE'
4411 and `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors
4412 of four values that are applied to red, green, blue, and alpha, in that
4413 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4414 during this process.
4416 Each pixel is then converted to the internal format specified by
4417 INTERNALFORMAT. This conversion simply maps the component values of the
4418 pixel (R, G, B, and A) to the values included in the internal format
4419 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4425 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4433 `GL_LUMINANCE_ALPHA'
4445 The red, green, blue, alpha, luminance, and/or intensity components of
4446 the resulting pixels are stored in floating-point rather than integer
4449 Pixel ordering is such that lower x screen coordinates correspond to
4450 lower I filter image coordinates.
4452 Note that after a convolution is performed, the resulting color
4453 components are also scaled by their corresponding
4454 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4455 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4456 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4457 set by `glPixelTransfer'.
4459 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_1D'.
4461 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4464 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4465 than the maximum supported value. This value may be queried with
4466 `glGetConvolutionParameter' using target `GL_CONVOLUTION_1D' and name
4467 `GL_MAX_CONVOLUTION_WIDTH'.
4469 `GL_INVALID_OPERATION' is generated if `glCopyConvolutionFilter1D' is
4470 executed between the execution of `glBegin' and the corresponding
4471 execution of `glEnd'.")
4473 (define-gl-procedures
4474 ((glCopyConvolutionFilter2D
4476 (internalformat GLenum)
4483 "Copy pixels into a two-dimensional convolution filter.
4486 Must be `GL_CONVOLUTION_2D'.
4489 The internal format of the convolution filter kernel. The
4490 allowable values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4491 `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4',
4492 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
4493 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4494 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4495 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4496 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4497 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
4498 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
4499 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
4500 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
4505 The window space coordinates of the lower-left coordinate of the
4506 pixel array to copy.
4509 The width of the pixel array to copy.
4512 The height of the pixel array to copy.
4514 `glCopyConvolutionFilter2D' defines a two-dimensional convolution filter
4515 kernel with pixels from the current `GL_READ_BUFFER' (rather than from
4516 main memory, as is the case for `glConvolutionFilter2D').
4518 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y),
4519 width WIDTH and height HEIGHT is used to define the convolution filter.
4520 If any pixels within this region are outside the window that is
4521 associated with the GL context, the values obtained for those pixels are
4524 The pixels in the rectangle are processed exactly as if `glReadPixels'
4525 had been called with FORMAT set to RGBA, but the process stops just
4526 before final conversion. The R, G, B, and A components of each pixel
4527 are next scaled by the four 2D `GL_CONVOLUTION_FILTER_SCALE' parameters
4528 and biased by the four 2D `GL_CONVOLUTION_FILTER_BIAS' parameters. (The
4529 scale and bias parameters are set by `glConvolutionParameter' using the
4530 `GL_CONVOLUTION_2D' target and the names `GL_CONVOLUTION_FILTER_SCALE'
4531 and `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors
4532 of four values that are applied to red, green, blue, and alpha, in that
4533 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4534 during this process.
4536 Each pixel is then converted to the internal format specified by
4537 INTERNALFORMAT. This conversion simply maps the component values of the
4538 pixel (R, G, B, and A) to the values included in the internal format
4539 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4545 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4553 `GL_LUMINANCE_ALPHA'
4565 The red, green, blue, alpha, luminance, and/or intensity components of
4566 the resulting pixels are stored in floating-point rather than integer
4569 Pixel ordering is such that lower x screen coordinates correspond to
4570 lower I filter image coordinates, and lower y screen coordinates
4571 correspond to lower J filter image coordinates.
4573 Note that after a convolution is performed, the resulting color
4574 components are also scaled by their corresponding
4575 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4576 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4577 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4578 set by `glPixelTransfer'.
4580 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_2D'.
4582 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4585 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4586 than the maximum supported value. This value may be queried with
4587 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4588 `GL_MAX_CONVOLUTION_WIDTH'.
4590 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
4591 than the maximum supported value. This value may be queried with
4592 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4593 `GL_MAX_CONVOLUTION_HEIGHT'.
4595 `GL_INVALID_OPERATION' is generated if `glCopyConvolutionFilter2D' is
4596 executed between the execution of `glBegin' and the corresponding
4597 execution of `glEnd'.")
4599 (define-gl-procedures
4608 "Copy pixels in the frame buffer.
4613 Specify the window coordinates of the lower left corner of the
4614 rectangular region of pixels to be copied.
4619 Specify the dimensions of the rectangular region of pixels to be
4620 copied. Both must be nonnegative.
4623 Specifies whether color values, depth values, or stencil values are
4624 to be copied. Symbolic constants `GL_COLOR', `GL_DEPTH', and
4625 `GL_STENCIL' are accepted.
4627 `glCopyPixels' copies a screen-aligned rectangle of pixels from the
4628 specified frame buffer location to a region relative to the current
4629 raster position. Its operation is well defined only if the entire pixel
4630 source region is within the exposed portion of the window. Results of
4631 copies from outside the window, or from regions of the window that are
4632 not exposed, are hardware dependent and undefined.
4634 X and Y specify the window coordinates of the lower left corner of the
4635 rectangular region to be copied. WIDTH and HEIGHT specify the
4636 dimensions of the rectangular region to be copied. Both WIDTH and
4637 HEIGHT must not be negative.
4639 Several parameters control the processing of the pixel data while it is
4640 being copied. These parameters are set with three commands:
4641 `glPixelTransfer', `glPixelMap', and `glPixelZoom'. This reference page
4642 describes the effects on `glCopyPixels' of most, but not all, of the
4643 parameters specified by these three commands.
4645 `glCopyPixels' copies values from each pixel with the lower left-hand
4646 corner at (X+I,Y+J) for 0<=I<WIDTH and 0<=J<HEIGHT . This pixel is said
4647 to be the I th pixel in the J th row. Pixels are copied in row order
4648 from the lowest to the highest row, left to right in each row.
4650 TYPE specifies whether color, depth, or stencil data is to be copied.
4651 The details of the transfer for each data type are as follows:
4654 Indices or RGBA colors are read from the buffer currently specified
4655 as the read source buffer (see `glReadBuffer'). If the GL is in
4656 color index mode, each index that is read from this buffer is
4657 converted to a fixed-point format with an unspecified number of
4658 bits to the right of the binary point. Each index is then shifted
4659 left by `GL_INDEX_SHIFT' bits, and added to `GL_INDEX_OFFSET'. If
4660 `GL_INDEX_SHIFT' is negative, the shift is to the right. In either
4661 case, zero bits fill otherwise unspecified bit locations in the
4662 result. If `GL_MAP_COLOR' is true, the index is replaced with the
4663 value that it references in lookup table `GL_PIXEL_MAP_I_TO_I'.
4664 Whether the lookup replacement of the index is done or not, the
4665 integer part of the index is then ANDed with 2^B-1 , where B is the
4666 number of bits in a color index buffer.
4668 If the GL is in RGBA mode, the red, green, blue, and alpha
4669 components of each pixel that is read are converted to an internal
4670 floating-point format with unspecified precision. The conversion
4671 maps the largest representable component value to 1.0, and
4672 component value 0 to 0.0. The resulting floating-point color
4673 values are then multiplied by `GL_c_SCALE' and added to
4674 `GL_c_BIAS', where C is RED, GREEN, BLUE, and ALPHA for the
4675 respective color components. The results are clamped to the range
4676 [0,1]. If `GL_MAP_COLOR' is true, each color component is scaled
4677 by the size of lookup table `GL_PIXEL_MAP_c_TO_c', then replaced by
4678 the value that it references in that table. C is R, G, B, or A.
4680 If the `ARB_imaging' extension is supported, the color values may
4681 be additionally processed by color-table lookups, color-matrix
4682 transformations, and convolution filters.
4684 The GL then converts the resulting indices or RGBA colors to
4685 fragments by attaching the current raster position Z coordinate and
4686 texture coordinates to each pixel, then assigning window
4687 coordinates (X_R+I,Y_R+J) , where (X_R,Y_R) is the current raster
4688 position, and the pixel was the I th pixel in the J th row. These
4689 pixel fragments are then treated just like the fragments generated
4690 by rasterizing points, lines, or polygons. Texture mapping, fog,
4691 and all the fragment operations are applied before the fragments
4692 are written to the frame buffer.
4695 Depth values are read from the depth buffer and converted directly
4696 to an internal floating-point format with unspecified precision.
4697 The resulting floating-point depth value is then multiplied by
4698 `GL_DEPTH_SCALE' and added to `GL_DEPTH_BIAS'. The result is
4699 clamped to the range [0,1].
4701 The GL then converts the resulting depth components to fragments by
4702 attaching the current raster position color or color index and
4703 texture coordinates to each pixel, then assigning window
4704 coordinates (X_R+I,Y_R+J) , where (X_R,Y_R) is the current raster
4705 position, and the pixel was the I th pixel in the J th row. These
4706 pixel fragments are then treated just like the fragments generated
4707 by rasterizing points, lines, or polygons. Texture mapping, fog,
4708 and all the fragment operations are applied before the fragments
4709 are written to the frame buffer.
4712 Stencil indices are read from the stencil buffer and converted to
4713 an internal fixed-point format with an unspecified number of bits
4714 to the right of the binary point. Each fixed-point index is then
4715 shifted left by `GL_INDEX_SHIFT' bits, and added to
4716 `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is negative, the shift is
4717 to the right. In either case, zero bits fill otherwise unspecified
4718 bit locations in the result. If `GL_MAP_STENCIL' is true, the
4719 index is replaced with the value that it references in lookup table
4720 `GL_PIXEL_MAP_S_TO_S'. Whether the lookup replacement of the index
4721 is done or not, the integer part of the index is then ANDed with
4722 2^B-1 , where B is the number of bits in the stencil buffer. The
4723 resulting stencil indices are then written to the stencil buffer
4724 such that the index read from the I th location of the J th row is
4725 written to location (X_R+I,Y_R+J) , where (X_R,Y_R) is the current
4726 raster position. Only the pixel ownership test, the scissor test,
4727 and the stencil writemask affect these write operations.
4729 The rasterization described thus far assumes pixel zoom factors of 1.0.
4730 If `glPixelZoom' is used to change the X and Y pixel zoom factors,
4731 pixels are converted to fragments as follows. If (X_R,Y_R) is the
4732 current raster position, and a given pixel is in the I th location in
4733 the J th row of the source pixel rectangle, then fragments are generated
4734 for pixels whose centers are in the rectangle with corners at
4736 (X_R+ZOOM_X,\u2062I,Y_R+ZOOM_Y,\u2062J)
4740 (X_R+ZOOM_X,\u2061(I+1,),Y_R+ZOOM_Y,\u2061(J+1,))
4742 where ZOOM_X is the value of `GL_ZOOM_X' and ZOOM_Y is the value of
4745 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
4747 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
4749 `GL_INVALID_OPERATION' is generated if TYPE is `GL_DEPTH' and there is
4752 `GL_INVALID_OPERATION' is generated if TYPE is `GL_STENCIL' and there is
4755 `GL_INVALID_OPERATION' is generated if `glCopyPixels' is executed
4756 between the execution of `glBegin' and the corresponding execution of
4759 (define-gl-procedures
4763 (internalformat GLenum)
4770 "Copy pixels into a 1D texture image.
4773 Specifies the target texture. Must be `GL_TEXTURE_1D'.
4776 Specifies the level-of-detail number. Level 0 is the base image
4777 level. Level N is the Nth mipmap reduction image.
4780 Specifies the internal format of the texture. Must be one of the
4781 following symbolic constants: `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4782 `GL_ALPHA12', `GL_ALPHA16', `GL_COMPRESSED_ALPHA',
4783 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
4784 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB',
4785 `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
4786 `GL_DEPTH_COMPONENT24', `GL_DEPTH_COMPONENT32', `GL_LUMINANCE',
4787 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4788 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4789 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4790 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4791 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4792 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_RGB',
4793 `GL_R3_G3_B2', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10',
4794 `GL_RGB12', `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4',
4795 `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
4796 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
4797 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
4803 Specify the window coordinates of the left corner of the row of
4804 pixels to be copied.
4807 Specifies the width of the texture image. Must be 0 or
4808 2^N+2\u2061(BORDER,) for some integer N . The height of the texture
4812 Specifies the width of the border. Must be either 0 or 1.
4814 `glCopyTexImage1D' defines a one-dimensional texture image with pixels
4815 from the current `GL_READ_BUFFER'.
4817 The screen-aligned pixel row with left corner at (X,Y) and with a length
4818 of WIDTH+2\u2061(BORDER,) defines the texture array at the mipmap level
4819 specified by LEVEL. INTERNALFORMAT specifies the internal format of the
4822 The pixels in the row are processed exactly as if `glCopyPixels' had
4823 been called, but the process stops just before final conversion. At
4824 this point all pixel component values are clamped to the range [0,1] and
4825 then converted to the texture's internal format for storage in the texel
4828 Pixel ordering is such that lower X screen coordinates correspond to
4829 lower texture coordinates.
4831 If any of the pixels within the specified row of the current
4832 `GL_READ_BUFFER' are outside the window associated with the current
4833 rendering context, then the values obtained for those pixels are
4836 `glCopyTexImage1D' defines a one-dimensional texture image with pixels
4837 from the current `GL_READ_BUFFER'.
4839 When INTERNALFORMAT is one of the sRGB types, the GL does not
4840 automatically convert the source pixels to the sRGB color space. In
4841 this case, the `glPixelMap' function can be used to accomplish the
4844 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
4847 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4849 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2\u2062MAX ,
4850 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
4852 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not an allowable
4855 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
4856 2 + `GL_MAX_TEXTURE_SIZE'.
4858 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
4859 supported and the WIDTH cannot be represented as 2^N+2\u2061(BORDER,) for
4860 some integer value of N.
4862 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
4864 `GL_INVALID_OPERATION' is generated if `glCopyTexImage1D' is executed
4865 between the execution of `glBegin' and the corresponding execution of
4868 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
4869 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
4870 `GL_DEPTH_COMPONENT32' and there is no depth buffer.")
4872 (define-gl-procedures
4876 (internalformat GLenum)
4884 "Copy pixels into a 2D texture image.
4887 Specifies the target texture. Must be `GL_TEXTURE_2D',
4888 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4889 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4890 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
4891 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4894 Specifies the level-of-detail number. Level 0 is the base image
4895 level. Level N is the Nth mipmap reduction image.
4898 Specifies the internal format of the texture. Must be one of the
4899 following symbolic constants: `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4900 `GL_ALPHA12', `GL_ALPHA16', `GL_COMPRESSED_ALPHA',
4901 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
4902 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB',
4903 `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
4904 `GL_DEPTH_COMPONENT24', `GL_DEPTH_COMPONENT32', `GL_LUMINANCE',
4905 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4906 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4907 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4908 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4909 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4910 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_RGB',
4911 `GL_R3_G3_B2', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10',
4912 `GL_RGB12', `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4',
4913 `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
4914 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
4915 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
4921 Specify the window coordinates of the lower left corner of the
4922 rectangular region of pixels to be copied.
4925 Specifies the width of the texture image. Must be 0 or
4926 2^N+2\u2061(BORDER,) for some integer N .
4929 Specifies the height of the texture image. Must be 0 or
4930 2^M+2\u2061(BORDER,) for some integer M .
4933 Specifies the width of the border. Must be either 0 or 1.
4935 `glCopyTexImage2D' defines a two-dimensional texture image, or cube-map
4936 texture image with pixels from the current `GL_READ_BUFFER'.
4938 The screen-aligned pixel rectangle with lower left corner at (X, Y) and
4939 with a width of WIDTH+2\u2061(BORDER,) and a height of HEIGHT+2\u2061(BORDER,)
4940 defines the texture array at the mipmap level specified by LEVEL.
4941 INTERNALFORMAT specifies the internal format of the texture array.
4943 The pixels in the rectangle are processed exactly as if `glCopyPixels'
4944 had been called, but the process stops just before final conversion. At
4945 this point all pixel component values are clamped to the range [0,1] and
4946 then converted to the texture's internal format for storage in the texel
4949 Pixel ordering is such that lower X and Y screen coordinates correspond
4950 to lower S and T texture coordinates.
4952 If any of the pixels within the specified rectangle of the current
4953 `GL_READ_BUFFER' are outside the window associated with the current
4954 rendering context, then the values obtained for those pixels are
4957 When INTERNALFORMAT is one of the sRGB types, the GL does not
4958 automatically convert the source pixels to the sRGB color space. In
4959 this case, the `glPixelMap' function can be used to accomplish the
4962 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
4963 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4964 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4965 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4967 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4969 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2\u2062MAX ,
4970 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
4972 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
4973 2 + `GL_MAX_TEXTURE_SIZE'.
4975 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
4976 supported and the WIDTH or DEPTH cannot be represented as
4977 2^K+2\u2061(BORDER,) for some integer K .
4979 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
4981 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not an accepted
4984 `GL_INVALID_OPERATION' is generated if `glCopyTexImage2D' is executed
4985 between the execution of `glBegin' and the corresponding execution of
4988 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
4989 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
4990 `GL_DEPTH_COMPONENT32' and there is no depth buffer.")
4992 (define-gl-procedures
4993 ((glCopyTexSubImage1D
5002 "Copy a one-dimensional texture subimage.
5005 Specifies the target texture. Must be `GL_TEXTURE_1D'.
5008 Specifies the level-of-detail number. Level 0 is the base image
5009 level. Level N is the Nth mipmap reduction image.
5012 Specifies the texel offset within the texture array.
5017 Specify the window coordinates of the left corner of the row of
5018 pixels to be copied.
5021 Specifies the width of the texture subimage.
5023 `glCopyTexSubImage1D' replaces a portion of a one-dimensional texture
5024 image with pixels from the current `GL_READ_BUFFER' (rather than from
5025 main memory, as is the case for `glTexSubImage1D').
5027 The screen-aligned pixel row with left corner at (X,\\ Y), and with
5028 length WIDTH replaces the portion of the texture array with x indices
5029 XOFFSET through XOFFSET+WIDTH-1 , inclusive. The destination in the
5030 texture array may not include any texels outside the texture array as it
5031 was originally specified.
5033 The pixels in the row are processed exactly as if `glCopyPixels' had
5034 been called, but the process stops just before final conversion. At
5035 this point, all pixel component values are clamped to the range [0,1]
5036 and then converted to the texture's internal format for storage in the
5039 It is not an error to specify a subtexture with zero width, but such a
5040 specification has no effect. If any of the pixels within the specified
5041 row of the current `GL_READ_BUFFER' are outside the read window
5042 associated with the current rendering context, then the values obtained
5043 for those pixels are undefined.
5045 No change is made to the INTERNALFORMAT, WIDTH, or BORDER parameters of
5046 the specified texture array or to texel values outside the specified
5049 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_1D'.
5051 `GL_INVALID_OPERATION' is generated if the texture array has not been
5052 defined by a previous `glTexImage1D' or `glCopyTexImage1D' operation.
5054 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
5056 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
5057 the returned value of `GL_MAX_TEXTURE_SIZE'.
5059 `GL_INVALID_VALUE' is generated if XOFFSET<-B , or
5060 (XOFFSET+WIDTH,)>(W-B,) , where W is the `GL_TEXTURE_WIDTH' and B is the
5061 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W
5062 includes twice the border width.")
5064 (define-gl-procedures
5065 ((glCopyTexSubImage2D
5076 "Copy a two-dimensional texture subimage.
5079 Specifies the target texture. Must be `GL_TEXTURE_2D',
5080 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
5081 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
5082 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
5083 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
5086 Specifies the level-of-detail number. Level 0 is the base image
5087 level. Level N is the Nth mipmap reduction image.
5090 Specifies a texel offset in the x direction within the texture
5094 Specifies a texel offset in the y direction within the texture
5100 Specify the window coordinates of the lower left corner of the
5101 rectangular region of pixels to be copied.
5104 Specifies the width of the texture subimage.
5107 Specifies the height of the texture subimage.
5109 `glCopyTexSubImage2D' replaces a rectangular portion of a
5110 two-dimensional texture image or cube-map texture image with pixels from
5111 the current `GL_READ_BUFFER' (rather than from main memory, as is the
5112 case for `glTexSubImage2D').
5114 The screen-aligned pixel rectangle with lower left corner at (X,Y) and
5115 with width WIDTH and height HEIGHT replaces the portion of the texture
5116 array with x indices XOFFSET through XOFFSET+WIDTH-1 , inclusive, and y
5117 indices YOFFSET through YOFFSET+HEIGHT-1 , inclusive, at the mipmap
5118 level specified by LEVEL.
5120 The pixels in the rectangle are processed exactly as if `glCopyPixels'
5121 had been called, but the process stops just before final conversion. At
5122 this point, all pixel component values are clamped to the range [0,1]
5123 and then converted to the texture's internal format for storage in the
5126 The destination rectangle in the texture array may not include any
5127 texels outside the texture array as it was originally specified. It is
5128 not an error to specify a subtexture with zero width or height, but such
5129 a specification has no effect.
5131 If any of the pixels within the specified rectangle of the current
5132 `GL_READ_BUFFER' are outside the read window associated with the current
5133 rendering context, then the values obtained for those pixels are
5136 No change is made to the INTERNALFORMAT, WIDTH, HEIGHT, or BORDER
5137 parameters of the specified texture array or to texel values outside the
5138 specified subregion.
5140 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
5141 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
5142 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
5143 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
5145 `GL_INVALID_OPERATION' is generated if the texture array has not been
5146 defined by a previous `glTexImage2D' or `glCopyTexImage2D' operation.
5148 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
5150 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
5151 the returned value of `GL_MAX_TEXTURE_SIZE'.
5153 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
5154 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , where W is the
5155 `GL_TEXTURE_WIDTH', H is the `GL_TEXTURE_HEIGHT', and B is the
5156 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W
5157 and H include twice the border width.
5159 `GL_INVALID_OPERATION' is generated if `glCopyTexSubImage2D' is executed
5160 between the execution of `glBegin' and the corresponding execution of
5163 (define-gl-procedures
5164 ((glCopyTexSubImage3D
5176 "Copy a three-dimensional texture subimage.
5179 Specifies the target texture. Must be `GL_TEXTURE_3D'
5182 Specifies the level-of-detail number. Level 0 is the base image
5183 level. Level N is the Nth mipmap reduction image.
5186 Specifies a texel offset in the x direction within the texture
5190 Specifies a texel offset in the y direction within the texture
5194 Specifies a texel offset in the z direction within the texture
5200 Specify the window coordinates of the lower left corner of the
5201 rectangular region of pixels to be copied.
5204 Specifies the width of the texture subimage.
5207 Specifies the height of the texture subimage.
5209 `glCopyTexSubImage3D' replaces a rectangular portion of a
5210 three-dimensional texture image with pixels from the current
5211 `GL_READ_BUFFER' (rather than from main memory, as is the case for
5214 The screen-aligned pixel rectangle with lower left corner at (X,\\ Y) and
5215 with width WIDTH and height HEIGHT replaces the portion of the texture
5216 array with x indices XOFFSET through XOFFSET+WIDTH-1 , inclusive, and y
5217 indices YOFFSET through YOFFSET+HEIGHT-1 , inclusive, at z index ZOFFSET
5218 and at the mipmap level specified by LEVEL.
5220 The pixels in the rectangle are processed exactly as if `glCopyPixels'
5221 had been called, but the process stops just before final conversion. At
5222 this point, all pixel component values are clamped to the range [0,1]
5223 and then converted to the texture's internal format for storage in the
5226 The destination rectangle in the texture array may not include any
5227 texels outside the texture array as it was originally specified. It is
5228 not an error to specify a subtexture with zero width or height, but such
5229 a specification has no effect.
5231 If any of the pixels within the specified rectangle of the current
5232 `GL_READ_BUFFER' are outside the read window associated with the current
5233 rendering context, then the values obtained for those pixels are
5236 No change is made to the INTERNALFORMAT, WIDTH, HEIGHT, DEPTH, or BORDER
5237 parameters of the specified texture array or to texel values outside the
5238 specified subregion.
5240 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_3D'.
5242 `GL_INVALID_OPERATION' is generated if the texture array has not been
5243 defined by a previous `glTexImage3D' operation.
5245 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
5247 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
5248 the returned value of `GL_MAX_3D_TEXTURE_SIZE'.
5250 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
5251 , YOFFSET<-B , (YOFFSET+HEIGHT,)>(H-B,) , ZOFFSET<-B , or
5252 (ZOFFSET+1,)>(D-B,) , where W is the `GL_TEXTURE_WIDTH', H is the
5253 `GL_TEXTURE_HEIGHT', D is the `GL_TEXTURE_DEPTH', and B is the
5254 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W ,
5255 H , and D include twice the border width.
5257 `GL_INVALID_OPERATION' is generated if `glCopyTexSubImage3D' is executed
5258 between the execution of `glBegin' and the corresponding execution of
5261 (define-gl-procedures
5262 ((glCreateProgram -> GLuint))
5263 "Creates a program object.
5265 `glCreateProgram' creates an empty program object and returns a non-zero
5266 value by which it can be referenced. A program object is an object to
5267 which shader objects can be attached. This provides a mechanism to
5268 specify the shader objects that will be linked to create a program. It
5269 also provides a means for checking the compatibility of the shaders that
5270 will be used to create a program (for instance, checking the
5271 compatibility between a vertex shader and a fragment shader). When no
5272 longer needed as part of a program object, shader objects can be
5275 One or more executables are created in a program object by successfully
5276 attaching shader objects to it with `glAttachShader', successfully
5277 compiling the shader objects with `glCompileShader', and successfully
5278 linking the program object with `glLinkProgram'. These executables are
5279 made part of current state when `glUseProgram' is called. Program
5280 objects can be deleted by calling `glDeleteProgram'. The memory
5281 associated with the program object will be deleted when it is no longer
5282 part of current rendering state for any context.
5284 This function returns 0 if an error occurs creating the program object.
5286 `GL_INVALID_OPERATION' is generated if `glCreateProgram' is executed
5287 between the execution of `glBegin' and the corresponding execution of
5290 (define-gl-procedures
5291 ((glCreateShader (shaderType GLenum) -> GLuint))
5292 "Creates a shader object.
5295 Specifies the type of shader to be created. Must be either
5296 `GL_VERTEX_SHADER' or `GL_FRAGMENT_SHADER'.
5298 `glCreateShader' creates an empty shader object and returns a non-zero
5299 value by which it can be referenced. A shader object is used to
5300 maintain the source code strings that define a shader. SHADERTYPE
5301 indicates the type of shader to be created. Two types of shaders are
5302 supported. A shader of type `GL_VERTEX_SHADER' is a shader that is
5303 intended to run on the programmable vertex processor and replace the
5304 fixed functionality vertex processing in OpenGL. A shader of type
5305 `GL_FRAGMENT_SHADER' is a shader that is intended to run on the
5306 programmable fragment processor and replace the fixed functionality
5307 fragment processing in OpenGL.
5309 When created, a shader object's `GL_SHADER_TYPE' parameter is set to
5310 either `GL_VERTEX_SHADER' or `GL_FRAGMENT_SHADER', depending on the
5311 value of SHADERTYPE.
5313 This function returns 0 if an error occurs creating the shader object.
5315 `GL_INVALID_ENUM' is generated if SHADERTYPE is not an accepted value.
5317 `GL_INVALID_OPERATION' is generated if `glCreateShader' is executed
5318 between the execution of `glBegin' and the corresponding execution of
5321 (define-gl-procedures
5322 ((glCullFace (mode GLenum) -> void))
5323 "Specify whether front- or back-facing facets can be culled.
5326 Specifies whether front- or back-facing facets are candidates for
5327 culling. Symbolic constants `GL_FRONT', `GL_BACK', and
5328 `GL_FRONT_AND_BACK' are accepted. The initial value is `GL_BACK'.
5330 `glCullFace' specifies whether front- or back-facing facets are culled
5331 (as specified by MODE) when facet culling is enabled. Facet culling is
5332 initially disabled. To enable and disable facet culling, call the
5333 `glEnable' and `glDisable' commands with the argument `GL_CULL_FACE'.
5334 Facets include triangles, quadrilaterals, polygons, and rectangles.
5336 `glFrontFace' specifies which of the clockwise and counterclockwise
5337 facets are front-facing and back-facing. See `glFrontFace'.
5339 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5341 `GL_INVALID_OPERATION' is generated if `glCullFace' is executed between
5342 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5344 (define-gl-procedures
5347 (buffers const-GLuint-*)
5350 "Delete named buffer objects.
5353 Specifies the number of buffer objects to be deleted.
5356 Specifies an array of buffer objects to be deleted.
5358 `glDeleteBuffers' deletes N buffer objects named by the elements of the
5359 array BUFFERS. After a buffer object is deleted, it has no contents,
5360 and its name is free for reuse (for example by `glGenBuffers'). If a
5361 buffer object that is currently bound is deleted, the binding reverts to
5362 0 (the absence of any buffer object, which reverts to client memory
5365 `glDeleteBuffers' silently ignores 0's and names that do not correspond
5366 to existing buffer objects.
5368 `GL_INVALID_VALUE' is generated if N is negative.
5370 `GL_INVALID_OPERATION' is generated if `glDeleteBuffers' is executed
5371 between the execution of `glBegin' and the corresponding execution of
5374 (define-gl-procedures
5380 "Delete a contiguous group of display lists.
5383 Specifies the integer name of the first display list to delete.
5386 Specifies the number of display lists to delete.
5388 `glDeleteLists' causes a contiguous group of display lists to be
5389 deleted. LIST is the name of the first display list to be deleted, and
5390 RANGE is the number of display lists to delete. All display lists D
5391 with LIST<=D<=LIST+RANGE-1 are deleted.
5393 All storage locations allocated to the specified display lists are
5394 freed, and the names are available for reuse at a later time. Names
5395 within the range that do not have an associated display list are
5396 ignored. If RANGE is 0, nothing happens.
5398 `GL_INVALID_VALUE' is generated if RANGE is negative.
5400 `GL_INVALID_OPERATION' is generated if `glDeleteLists' is executed
5401 between the execution of `glBegin' and the corresponding execution of
5404 (define-gl-procedures
5405 ((glDeleteProgram (program GLuint) -> void))
5406 "Deletes a program object.
5409 Specifies the program object to be deleted.
5411 `glDeleteProgram' frees the memory and invalidates the name associated
5412 with the program object specified by PROGRAM. This command effectively
5413 undoes the effects of a call to `glCreateProgram'.
5415 If a program object is in use as part of current rendering state, it
5416 will be flagged for deletion, but it will not be deleted until it is no
5417 longer part of current state for any rendering context. If a program
5418 object to be deleted has shader objects attached to it, those shader
5419 objects will be automatically detached but not deleted unless they have
5420 already been flagged for deletion by a previous call to
5421 `glDeleteShader'. A value of 0 for PROGRAM will be silently ignored.
5423 To determine whether a program object has been flagged for deletion,
5424 call `glGetProgram' with arguments PROGRAM and `GL_DELETE_STATUS'.
5426 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
5429 `GL_INVALID_OPERATION' is generated if `glDeleteProgram' is executed
5430 between the execution of `glBegin' and the corresponding execution of
5433 (define-gl-procedures
5436 (ids const-GLuint-*)
5439 "Delete named query objects.
5442 Specifies the number of query objects to be deleted.
5445 Specifies an array of query objects to be deleted.
5447 `glDeleteQueries' deletes N query objects named by the elements of the
5448 array IDS. After a query object is deleted, it has no contents, and its
5449 name is free for reuse (for example by `glGenQueries').
5451 `glDeleteQueries' silently ignores 0's and names that do not correspond
5452 to existing query objects.
5454 `GL_INVALID_VALUE' is generated if N is negative.
5456 `GL_INVALID_OPERATION' is generated if `glDeleteQueries' is executed
5457 between the execution of `glBegin' and the corresponding execution of
5460 (define-gl-procedures
5461 ((glDeleteShader (shader GLuint) -> void))
5462 "Deletes a shader object.
5465 Specifies the shader object to be deleted.
5467 `glDeleteShader' frees the memory and invalidates the name associated
5468 with the shader object specified by SHADER. This command effectively
5469 undoes the effects of a call to `glCreateShader'.
5471 If a shader object to be deleted is attached to a program object, it
5472 will be flagged for deletion, but it will not be deleted until it is no
5473 longer attached to any program object, for any rendering context (i.e.,
5474 it must be detached from wherever it was attached before it will be
5475 deleted). A value of 0 for SHADER will be silently ignored.
5477 To determine whether an object has been flagged for deletion, call
5478 `glGetShader' with arguments SHADER and `GL_DELETE_STATUS'.
5480 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
5483 `GL_INVALID_OPERATION' is generated if `glDeleteShader' is executed
5484 between the execution of `glBegin' and the corresponding execution of
5487 (define-gl-procedures
5490 (textures const-GLuint-*)
5493 "Delete named textures.
5496 Specifies the number of textures to be deleted.
5499 Specifies an array of textures to be deleted.
5501 `glDeleteTextures' deletes N textures named by the elements of the array
5502 TEXTURES. After a texture is deleted, it has no contents or
5503 dimensionality, and its name is free for reuse (for example by
5504 `glGenTextures'). If a texture that is currently bound is deleted, the
5505 binding reverts to 0 (the default texture).
5507 `glDeleteTextures' silently ignores 0's and names that do not correspond
5508 to existing textures.
5510 `GL_INVALID_VALUE' is generated if N is negative.
5512 `GL_INVALID_OPERATION' is generated if `glDeleteTextures' is executed
5513 between the execution of `glBegin' and the corresponding execution of
5516 (define-gl-procedures
5517 ((glDepthFunc (func GLenum) -> void))
5518 "Specify the value used for depth buffer comparisons.
5521 Specifies the depth comparison function. Symbolic constants
5522 `GL_NEVER', `GL_LESS', `GL_EQUAL', `GL_LEQUAL', `GL_GREATER',
5523 `GL_NOTEQUAL', `GL_GEQUAL', and `GL_ALWAYS' are accepted. The
5524 initial value is `GL_LESS'.
5526 `glDepthFunc' specifies the function used to compare each incoming pixel
5527 depth value with the depth value present in the depth buffer. The
5528 comparison is performed only if depth testing is enabled. (See
5529 `glEnable' and `glDisable' of `GL_DEPTH_TEST'.)
5531 FUNC specifies the conditions under which the pixel will be drawn. The
5532 comparison functions are as follows:
5538 Passes if the incoming depth value is less than the stored depth
5542 Passes if the incoming depth value is equal to the stored depth
5546 Passes if the incoming depth value is less than or equal to the
5550 Passes if the incoming depth value is greater than the stored depth
5554 Passes if the incoming depth value is not equal to the stored depth
5558 Passes if the incoming depth value is greater than or equal to the
5564 The initial value of FUNC is `GL_LESS'. Initially, depth testing is
5565 disabled. If depth testing is disabled or if no depth buffer exists, it
5566 is as if the depth test always passes.
5568 `GL_INVALID_ENUM' is generated if FUNC is not an accepted value.
5570 `GL_INVALID_OPERATION' is generated if `glDepthFunc' is executed between
5571 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5573 (define-gl-procedures
5574 ((glDepthMask (flag GLboolean) -> void))
5575 "Enable or disable writing into the depth buffer.
5578 Specifies whether the depth buffer is enabled for writing. If FLAG
5579 is `GL_FALSE', depth buffer writing is disabled. Otherwise, it is
5580 enabled. Initially, depth buffer writing is enabled.
5582 `glDepthMask' specifies whether the depth buffer is enabled for writing.
5583 If FLAG is `GL_FALSE', depth buffer writing is disabled. Otherwise, it
5584 is enabled. Initially, depth buffer writing is enabled.
5586 `GL_INVALID_OPERATION' is generated if `glDepthMask' is executed between
5587 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5589 (define-gl-procedures
5595 "Specify mapping of depth values from normalized device coordinates to
5599 Specifies the mapping of the near clipping plane to window
5600 coordinates. The initial value is 0.
5603 Specifies the mapping of the far clipping plane to window
5604 coordinates. The initial value is 1.
5606 After clipping and division by W, depth coordinates range from -1 to 1,
5607 corresponding to the near and far clipping planes. `glDepthRange'
5608 specifies a linear mapping of the normalized depth coordinates in this
5609 range to window depth coordinates. Regardless of the actual depth
5610 buffer implementation, window coordinate depth values are treated as
5611 though they range from 0 through 1 (like color components). Thus, the
5612 values accepted by `glDepthRange' are both clamped to this range before
5615 The setting of (0,1) maps the near plane to 0 and the far plane to 1.
5616 With this mapping, the depth buffer range is fully utilized.
5618 `GL_INVALID_OPERATION' is generated if `glDepthRange' is executed
5619 between the execution of `glBegin' and the corresponding execution of
5622 (define-gl-procedures
5628 "Detaches a shader object from a program object to which it is attached.
5631 Specifies the program object from which to detach the shader
5635 Specifies the shader object to be detached.
5637 `glDetachShader' detaches the shader object specified by SHADER from the
5638 program object specified by PROGRAM. This command can be used to undo
5639 the effect of the command `glAttachShader'.
5641 If SHADER has already been flagged for deletion by a call to
5642 `glDeleteShader' and it is not attached to any other program object, it
5643 will be deleted after it has been detached.
5645 `GL_INVALID_VALUE' is generated if either PROGRAM or SHADER is a value
5646 that was not generated by OpenGL.
5648 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
5650 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
5652 `GL_INVALID_OPERATION' is generated if SHADER is not attached to
5655 `GL_INVALID_OPERATION' is generated if `glDetachShader' is executed
5656 between the execution of `glBegin' and the corresponding execution of
5659 (define-gl-procedures
5666 "Render primitives from array data.
5669 Specifies what kind of primitives to render. Symbolic constants
5670 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
5671 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
5672 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
5675 Specifies the starting index in the enabled arrays.
5678 Specifies the number of indices to be rendered.
5680 `glDrawArrays' specifies multiple geometric primitives with very few
5681 subroutine calls. Instead of calling a GL procedure to pass each
5682 individual vertex, normal, texture coordinate, edge flag, or color, you
5683 can prespecify separate arrays of vertices, normals, and colors and use
5684 them to construct a sequence of primitives with a single call to
5687 When `glDrawArrays' is called, it uses COUNT sequential elements from
5688 each enabled array to construct a sequence of geometric primitives,
5689 beginning with element FIRST. MODE specifies what kind of primitives
5690 are constructed and how the array elements construct those primitives.
5691 If `GL_VERTEX_ARRAY' is not enabled, no geometric primitives are
5694 Vertex attributes that are modified by `glDrawArrays' have an
5695 unspecified value after `glDrawArrays' returns. For example, if
5696 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
5697 after `glDrawArrays' executes. Attributes that aren't modified remain
5700 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5702 `GL_INVALID_VALUE' is generated if COUNT is negative.
5704 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5705 bound to an enabled array and the buffer object's data store is
5708 `GL_INVALID_OPERATION' is generated if `glDrawArrays' is executed
5709 between the execution of `glBegin' and the corresponding `glEnd'.")
5711 (define-gl-procedures
5714 (bufs const-GLenum-*)
5717 "Specifies a list of color buffers to be drawn into.
5720 Specifies the number of buffers in BUFS.
5723 Points to an array of symbolic constants specifying the buffers
5724 into which fragment colors or data values will be written.
5726 `glDrawBuffers' defines an array of buffers into which fragment color
5727 values or fragment data will be written. If no fragment shader is
5728 active, rendering operations will generate only one fragment color per
5729 fragment and it will be written into each of the buffers specified by
5730 BUFS. If a fragment shader is active and it writes a value to the
5731 output variable `gl_FragColor', then that value will be written into
5732 each of the buffers specified by BUFS. If a fragment shader is active
5733 and it writes a value to one or more elements of the output array
5734 variable `gl_FragData[]', then the value of `gl_FragData[0] ' will be
5735 written into the first buffer specified by BUFS, the value of
5736 `gl_FragData[1] ' will be written into the second buffer specified by
5737 BUFS, and so on up to `gl_FragData[n-1]'. The draw buffer used for
5738 `gl_FragData[n]' and beyond is implicitly set to be `GL_NONE'.
5740 The symbolic constants contained in BUFS may be any of the following:
5743 The fragment color/data value is not written into any color buffer.
5746 The fragment color/data value is written into the front left color
5750 The fragment color/data value is written into the front right color
5754 The fragment color/data value is written into the back left color
5758 The fragment color/data value is written into the back right color
5762 The fragment color/data value is written into auxiliary buffer `i'.
5764 Except for `GL_NONE', the preceding symbolic constants may not appear
5765 more than once in BUFS. The maximum number of draw buffers supported is
5766 implementation dependent and can be queried by calling `glGet' with the
5767 argument `GL_MAX_DRAW_BUFFERS'. The number of auxiliary buffers can be
5768 queried by calling `glGet' with the argument `GL_AUX_BUFFERS'.
5770 `GL_INVALID_ENUM' is generated if one of the values in BUFS is not an
5773 `GL_INVALID_ENUM' is generated if N is less than 0.
5775 `GL_INVALID_OPERATION' is generated if a symbolic constant other than
5776 `GL_NONE' appears more than once in BUFS.
5778 `GL_INVALID_OPERATION' is generated if any of the entries in BUFS (other
5779 than `GL_NONE' ) indicates a color buffer that does not exist in the
5782 `GL_INVALID_VALUE' is generated if N is greater than
5783 `GL_MAX_DRAW_BUFFERS'.
5785 `GL_INVALID_OPERATION' is generated if `glDrawBuffers' is executed
5786 between the execution of `glBegin' and the corresponding execution of
5789 (define-gl-procedures
5790 ((glDrawBuffer (mode GLenum) -> void))
5791 "Specify which color buffers are to be drawn into.
5794 Specifies up to four color buffers to be drawn into. Symbolic
5795 constants `GL_NONE', `GL_FRONT_LEFT', `GL_FRONT_RIGHT',
5796 `GL_BACK_LEFT', `GL_BACK_RIGHT', `GL_FRONT', `GL_BACK', `GL_LEFT',
5797 `GL_RIGHT', `GL_FRONT_AND_BACK', and `GL_AUX'I, where I is between
5798 0 and the value of `GL_AUX_BUFFERS' minus 1, are accepted.
5799 (`GL_AUX_BUFFERS' is not the upper limit; use `glGet' to query the
5800 number of available aux buffers.) The initial value is `GL_FRONT'
5801 for single-buffered contexts, and `GL_BACK' for double-buffered
5804 When colors are written to the frame buffer, they are written into the
5805 color buffers specified by `glDrawBuffer'. The specifications are as
5809 No color buffers are written.
5812 Only the front left color buffer is written.
5815 Only the front right color buffer is written.
5818 Only the back left color buffer is written.
5821 Only the back right color buffer is written.
5824 Only the front left and front right color buffers are written. If
5825 there is no front right color buffer, only the front left color
5829 Only the back left and back right color buffers are written. If
5830 there is no back right color buffer, only the back left color
5834 Only the front left and back left color buffers are written. If
5835 there is no back left color buffer, only the front left color
5839 Only the front right and back right color buffers are written. If
5840 there is no back right color buffer, only the front right color
5844 All the front and back color buffers (front left, front right, back
5845 left, back right) are written. If there are no back color buffers,
5846 only the front left and front right color buffers are written. If
5847 there are no right color buffers, only the front left and back left
5848 color buffers are written. If there are no right or back color
5849 buffers, only the front left color buffer is written.
5852 Only auxiliary color buffer I is written.
5854 If more than one color buffer is selected for drawing, then blending or
5855 logical operations are computed and applied independently for each color
5856 buffer and can produce different results in each buffer.
5858 Monoscopic contexts include only LEFT buffers, and stereoscopic contexts
5859 include both LEFT and RIGHT buffers. Likewise, single-buffered contexts
5860 include only FRONT buffers, and double-buffered contexts include both
5861 FRONT and BACK buffers. The context is selected at GL initialization.
5863 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5865 `GL_INVALID_OPERATION' is generated if none of the buffers indicated by
5868 `GL_INVALID_OPERATION' is generated if `glDrawBuffer' is executed
5869 between the execution of `glBegin' and the corresponding execution of
5872 (define-gl-procedures
5877 (indices const-GLvoid-*)
5880 "Render primitives from array data.
5883 Specifies what kind of primitives to render. Symbolic constants
5884 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
5885 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
5886 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
5889 Specifies the number of elements to be rendered.
5892 Specifies the type of the values in INDICES. Must be one of
5893 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
5896 Specifies a pointer to the location where the indices are stored.
5898 `glDrawElements' specifies multiple geometric primitives with very few
5899 subroutine calls. Instead of calling a GL function to pass each
5900 individual vertex, normal, texture coordinate, edge flag, or color, you
5901 can prespecify separate arrays of vertices, normals, and so on, and use
5902 them to construct a sequence of primitives with a single call to
5905 When `glDrawElements' is called, it uses COUNT sequential elements from
5906 an enabled array, starting at INDICES to construct a sequence of
5907 geometric primitives. MODE specifies what kind of primitives are
5908 constructed and how the array elements construct these primitives. If
5909 more than one array is enabled, each is used. If `GL_VERTEX_ARRAY' is
5910 not enabled, no geometric primitives are constructed.
5912 Vertex attributes that are modified by `glDrawElements' have an
5913 unspecified value after `glDrawElements' returns. For example, if
5914 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
5915 after `glDrawElements' executes. Attributes that aren't modified
5916 maintain their previous values.
5918 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5920 `GL_INVALID_VALUE' is generated if COUNT is negative.
5922 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5923 bound to an enabled array or the element array and the buffer object's
5924 data store is currently mapped.
5926 `GL_INVALID_OPERATION' is generated if `glDrawElements' is executed
5927 between the execution of `glBegin' and the corresponding `glEnd'.")
5929 (define-gl-procedures
5935 (data const-GLvoid-*)
5938 "Write a block of pixels to the frame buffer.
5943 Specify the dimensions of the pixel rectangle to be written into
5947 Specifies the format of the pixel data. Symbolic constants
5948 `GL_COLOR_INDEX', `GL_STENCIL_INDEX', `GL_DEPTH_COMPONENT',
5949 `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_RED', `GL_GREEN',
5950 `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA' are
5954 Specifies the data type for DATA. Symbolic constants
5955 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
5956 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
5957 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
5958 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
5959 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
5960 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
5961 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
5962 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
5966 Specifies a pointer to the pixel data.
5968 `glDrawPixels' reads pixel data from memory and writes it into the frame
5969 buffer relative to the current raster position, provided that the raster
5970 position is valid. Use `glRasterPos' or `glWindowPos' to set the
5971 current raster position; use `glGet' with argument
5972 `GL_CURRENT_RASTER_POSITION_VALID' to determine if the specified raster
5973 position is valid, and `glGet' with argument
5974 `GL_CURRENT_RASTER_POSITION' to query the raster position.
5976 Several parameters define the encoding of pixel data in memory and
5977 control the processing of the pixel data before it is placed in the
5978 frame buffer. These parameters are set with four commands:
5979 `glPixelStore', `glPixelTransfer', `glPixelMap', and `glPixelZoom'. This
5980 reference page describes the effects on `glDrawPixels' of many, but not
5981 all, of the parameters specified by these four commands.
5983 Data is read from DATA as a sequence of signed or unsigned bytes, signed
5984 or unsigned shorts, signed or unsigned integers, or single-precision
5985 floating-point values, depending on TYPE. When TYPE is one of
5986 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
5987 `GL_UNSIGNED_INT', `GL_INT', or `GL_FLOAT' each of these bytes, shorts,
5988 integers, or floating-point values is interpreted as one color or depth
5989 component, or one index, depending on FORMAT. When TYPE is one of
5990 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_SHORT_5_6_5',
5991 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_5_5_5_1',
5992 `GL_UNSIGNED_INT_8_8_8_8', or `GL_UNSIGNED_INT_10_10_10_2', each
5993 unsigned value is interpreted as containing all the components for a
5994 single pixel, with the color components arranged according to FORMAT.
5995 When TYPE is one of `GL_UNSIGNED_BYTE_2_3_3_REV',
5996 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
5997 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8_REV', or
5998 `GL_UNSIGNED_INT_2_10_10_10_REV', each unsigned value is interpreted as
5999 containing all color components, specified by FORMAT, for a single pixel
6000 in a reversed order. Indices are always treated individually. Color
6001 components are treated as groups of one, two, three, or four values,
6002 again based on FORMAT. Both individual indices and groups of components
6003 are referred to as pixels. If TYPE is `GL_BITMAP', the data must be
6004 unsigned bytes, and FORMAT must be either `GL_COLOR_INDEX' or
6005 `GL_STENCIL_INDEX'. Each unsigned byte is treated as eight 1-bit
6006 pixels, with bit ordering determined by `GL_UNPACK_LSB_FIRST' (see
6009 WIDTH×HEIGHT pixels are read from memory, starting at location DATA. By
6010 default, these pixels are taken from adjacent memory locations, except
6011 that after all WIDTH pixels are read, the read pointer is advanced to
6012 the next four-byte boundary. The four-byte row alignment is specified
6013 by `glPixelStore' with argument `GL_UNPACK_ALIGNMENT', and it can be set
6014 to one, two, four, or eight bytes. Other pixel store parameters specify
6015 different read pointer advancements, both before the first pixel is read
6016 and after all WIDTH pixels are read. See the `glPixelStore' reference
6017 page for details on these options.
6019 If a non-zero named buffer object is bound to the
6020 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a block of
6021 pixels is specified, DATA is treated as a byte offset into the buffer
6022 object's data store.
6024 The WIDTH×HEIGHT pixels that are read from memory are each operated on
6025 in the same way, based on the values of several parameters specified by
6026 `glPixelTransfer' and `glPixelMap'. The details of these operations, as
6027 well as the target buffer into which the pixels are drawn, are specific
6028 to the format of the pixels, as specified by FORMAT. FORMAT can assume
6029 one of 13 symbolic values:
6032 Each pixel is a single value, a color index. It is converted to
6033 fixed-point format, with an unspecified number of bits to the right
6034 of the binary point, regardless of the memory data type.
6035 Floating-point values convert to true fixed-point values. Signed
6036 and unsigned integer data is converted with all fraction bits set
6037 to 0. Bitmap data convert to either 0 or 1.
6039 Each fixed-point index is then shifted left by `GL_INDEX_SHIFT'
6040 bits and added to `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is
6041 negative, the shift is to the right. In either case, zero bits
6042 fill otherwise unspecified bit locations in the result.
6044 If the GL is in RGBA mode, the resulting index is converted to an
6045 RGBA pixel with the help of the `GL_PIXEL_MAP_I_TO_R',
6046 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
6047 `GL_PIXEL_MAP_I_TO_A' tables. If the GL is in color index mode,
6048 and if `GL_MAP_COLOR' is true, the index is replaced with the value
6049 that it references in lookup table `GL_PIXEL_MAP_I_TO_I'. Whether
6050 the lookup replacement of the index is done or not, the integer
6051 part of the index is then ANDed with 2^B-1 , where B is the number
6052 of bits in a color index buffer.
6054 The GL then converts the resulting indices or RGBA colors to
6055 fragments by attaching the current raster position Z coordinate and
6056 texture coordinates to each pixel, then assigning X and Y window
6057 coordinates to the N th fragment such that X_N=X_R+N%WIDTH
6060 where (X_R,Y_R) is the current raster position. These pixel
6061 fragments are then treated just like the fragments generated by
6062 rasterizing points, lines, or polygons. Texture mapping, fog, and
6063 all the fragment operations are applied before the fragments are
6064 written to the frame buffer.
6067 Each pixel is a single value, a stencil index. It is converted to
6068 fixed-point format, with an unspecified number of bits to the right
6069 of the binary point, regardless of the memory data type.
6070 Floating-point values convert to true fixed-point values. Signed
6071 and unsigned integer data is converted with all fraction bits set
6072 to 0. Bitmap data convert to either 0 or 1.
6074 Each fixed-point index is then shifted left by `GL_INDEX_SHIFT'
6075 bits, and added to `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is
6076 negative, the shift is to the right. In either case, zero bits
6077 fill otherwise unspecified bit locations in the result. If
6078 `GL_MAP_STENCIL' is true, the index is replaced with the value that
6079 it references in lookup table `GL_PIXEL_MAP_S_TO_S'. Whether the
6080 lookup replacement of the index is done or not, the integer part of
6081 the index is then ANDed with 2^B-1 , where B is the number of bits
6082 in the stencil buffer. The resulting stencil indices are then
6083 written to the stencil buffer such that the N th index is written
6086 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
6088 where (X_R,Y_R) is the current raster position. Only the pixel
6089 ownership test, the scissor test, and the stencil writemask affect
6090 these write operations.
6092 `GL_DEPTH_COMPONENT'
6093 Each pixel is a single-depth component. Floating-point data is
6094 converted directly to an internal floating-point format with
6095 unspecified precision. Signed integer data is mapped linearly to
6096 the internal floating-point format such that the most positive
6097 representable integer value maps to 1.0, and the most negative
6098 representable value maps to -1.0 . Unsigned integer data is mapped
6099 similarly: the largest integer value maps to 1.0, and 0 maps to
6100 0.0. The resulting floating-point depth value is then multiplied
6101 by `GL_DEPTH_SCALE' and added to `GL_DEPTH_BIAS'. The result is
6102 clamped to the range [0,1] .
6104 The GL then converts the resulting depth components to fragments by
6105 attaching the current raster position color or color index and
6106 texture coordinates to each pixel, then assigning X and Y window
6107 coordinates to the N th fragment such that
6109 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
6111 where (X_R,Y_R) is the current raster position. These pixel
6112 fragments are then treated just like the fragments generated by
6113 rasterizing points, lines, or polygons. Texture mapping, fog, and
6114 all the fragment operations are applied before the fragments are
6115 written to the frame buffer.
6119 Each pixel is a four-component group: For `GL_RGBA', the red
6120 component is first, followed by green, followed by blue, followed
6121 by alpha; for `GL_BGRA' the order is blue, green, red and then
6122 alpha. Floating-point values are converted directly to an internal
6123 floating-point format with unspecified precision. Signed integer
6124 values are mapped linearly to the internal floating-point format
6125 such that the most positive representable integer value maps to
6126 1.0, and the most negative representable value maps to -1.0 . (Note
6127 that this mapping does not convert 0 precisely to 0.0.) Unsigned
6128 integer data is mapped similarly: The largest integer value maps to
6129 1.0, and 0 maps to 0.0. The resulting floating-point color values
6130 are then multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where
6131 C is RED, GREEN, BLUE, and ALPHA for the respective color
6132 components. The results are clamped to the range [0,1] .
6134 If `GL_MAP_COLOR' is true, each color component is scaled by the
6135 size of lookup table `GL_PIXEL_MAP_c_TO_c', then replaced by the
6136 value that it references in that table. C is R, G, B, or A
6139 The GL then converts the resulting RGBA colors to fragments by
6140 attaching the current raster position Z coordinate and texture
6141 coordinates to each pixel, then assigning X and Y window
6142 coordinates to the N th fragment such that
6144 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
6146 where (X_R,Y_R) is the current raster position. These pixel
6147 fragments are then treated just like the fragments generated by
6148 rasterizing points, lines, or polygons. Texture mapping, fog, and
6149 all the fragment operations are applied before the fragments are
6150 written to the frame buffer.
6153 Each pixel is a single red component. This component is converted
6154 to the internal floating-point format in the same way the red
6155 component of an RGBA pixel is. It is then converted to an RGBA
6156 pixel with green and blue set to 0, and alpha set to 1. After this
6157 conversion, the pixel is treated as if it had been read as an RGBA
6161 Each pixel is a single green component. This component is
6162 converted to the internal floating-point format in the same way the
6163 green component of an RGBA pixel is. It is then converted to an
6164 RGBA pixel with red and blue set to 0, and alpha set to 1. After
6165 this conversion, the pixel is treated as if it had been read as an
6169 Each pixel is a single blue component. This component is converted
6170 to the internal floating-point format in the same way the blue
6171 component of an RGBA pixel is. It is then converted to an RGBA
6172 pixel with red and green set to 0, and alpha set to 1. After this
6173 conversion, the pixel is treated as if it had been read as an RGBA
6177 Each pixel is a single alpha component. This component is
6178 converted to the internal floating-point format in the same way the
6179 alpha component of an RGBA pixel is. It is then converted to an
6180 RGBA pixel with red, green, and blue set to 0. After this
6181 conversion, the pixel is treated as if it had been read as an RGBA
6186 Each pixel is a three-component group: red first, followed by
6187 green, followed by blue; for `GL_BGR', the first component is blue,
6188 followed by green and then red. Each component is converted to the
6189 internal floating-point format in the same way the red, green, and
6190 blue components of an RGBA pixel are. The color triple is
6191 converted to an RGBA pixel with alpha set to 1. After this
6192 conversion, the pixel is treated as if it had been read as an RGBA
6196 Each pixel is a single luminance component. This component is
6197 converted to the internal floating-point format in the same way the
6198 red component of an RGBA pixel is. It is then converted to an RGBA
6199 pixel with red, green, and blue set to the converted luminance
6200 value, and alpha set to 1. After this conversion, the pixel is
6201 treated as if it had been read as an RGBA pixel.
6203 `GL_LUMINANCE_ALPHA'
6204 Each pixel is a two-component group: luminance first, followed by
6205 alpha. The two components are converted to the internal
6206 floating-point format in the same way the red component of an RGBA
6207 pixel is. They are then converted to an RGBA pixel with red,
6208 green, and blue set to the converted luminance value, and alpha set
6209 to the converted alpha value. After this conversion, the pixel is
6210 treated as if it had been read as an RGBA pixel.
6212 The following table summarizes the meaning of the valid constants for
6218 *Corresponding Type*
6221 unsigned 8-bit integer
6224 signed 8-bit integer
6227 single bits in unsigned 8-bit integers
6230 unsigned 16-bit integer
6233 signed 16-bit integer
6236 unsigned 32-bit integer
6242 single-precision floating-point
6244 `GL_UNSIGNED_BYTE_3_3_2'
6245 unsigned 8-bit integer
6247 `GL_UNSIGNED_BYTE_2_3_3_REV'
6248 unsigned 8-bit integer with reversed component ordering
6250 `GL_UNSIGNED_SHORT_5_6_5'
6251 unsigned 16-bit integer
6253 `GL_UNSIGNED_SHORT_5_6_5_REV'
6254 unsigned 16-bit integer with reversed component ordering
6256 `GL_UNSIGNED_SHORT_4_4_4_4'
6257 unsigned 16-bit integer
6259 `GL_UNSIGNED_SHORT_4_4_4_4_REV'
6260 unsigned 16-bit integer with reversed component ordering
6262 `GL_UNSIGNED_SHORT_5_5_5_1'
6263 unsigned 16-bit integer
6265 `GL_UNSIGNED_SHORT_1_5_5_5_REV'
6266 unsigned 16-bit integer with reversed component ordering
6268 `GL_UNSIGNED_INT_8_8_8_8'
6269 unsigned 32-bit integer
6271 `GL_UNSIGNED_INT_8_8_8_8_REV'
6272 unsigned 32-bit integer with reversed component ordering
6274 `GL_UNSIGNED_INT_10_10_10_2'
6275 unsigned 32-bit integer
6277 `GL_UNSIGNED_INT_2_10_10_10_REV'
6278 unsigned 32-bit integer with reversed component ordering
6282 The rasterization described so far assumes pixel zoom factors of 1. If
6283 `glPixelZoom' is used to change the X and Y pixel zoom factors, pixels
6284 are converted to fragments as follows. If (X_R,Y_R) is the current
6285 raster position, and a given pixel is in the N th column and M th row of
6286 the pixel rectangle, then fragments are generated for pixels whose
6287 centers are in the rectangle with corners at
6289 (X_R+ZOOM_X,\u2062N,Y_R+ZOOM_Y,\u2062M) (X_R+ZOOM_X,\u2061(N+1,),Y_R+ZOOM_Y,\u2061(M+1,))
6291 where ZOOM_X is the value of `GL_ZOOM_X' and ZOOM_Y is the value of
6294 `GL_INVALID_ENUM' is generated if FORMAT or TYPE is not one of the
6297 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
6298 either `GL_COLOR_INDEX' or `GL_STENCIL_INDEX'.
6300 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
6302 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_STENCIL_INDEX' and
6303 there is no stencil buffer.
6305 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_RED', `GL_GREEN',
6306 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_RGBA', `GL_BGR', `GL_BGRA',
6307 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA', and the GL is in color index
6310 `GL_INVALID_OPERATION' is generated if FORMAT is one of
6311 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
6312 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
6315 `GL_INVALID_OPERATION' is generated if FORMAT is one of
6316 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
6317 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
6318 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
6319 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
6320 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
6322 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6323 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
6324 data store is currently mapped.
6326 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6327 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
6328 unpacked from the buffer object such that the memory reads required
6329 would exceed the data store size.
6331 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6332 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
6333 divisible into the number of bytes needed to store in memory a datum
6336 `GL_INVALID_OPERATION' is generated if `glDrawPixels' is executed
6337 between the execution of `glBegin' and the corresponding execution of
6340 (define-gl-procedures
6341 ((glDrawRangeElements
6347 (indices const-GLvoid-*)
6350 "Render primitives from array data.
6353 Specifies what kind of primitives to render. Symbolic constants
6354 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
6355 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
6356 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
6359 Specifies the minimum array index contained in INDICES.
6362 Specifies the maximum array index contained in INDICES.
6365 Specifies the number of elements to be rendered.
6368 Specifies the type of the values in INDICES. Must be one of
6369 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
6372 Specifies a pointer to the location where the indices are stored.
6374 `glDrawRangeElements' is a restricted form of `glDrawElements'. MODE,
6375 START, END, and COUNT match the corresponding arguments to
6376 `glDrawElements', with the additional constraint that all values in the
6377 arrays COUNT must lie between START and END, inclusive.
6379 Implementations denote recommended maximum amounts of vertex and index
6380 data, which may be queried by calling `glGet' with argument
6381 `GL_MAX_ELEMENTS_VERTICES' and `GL_MAX_ELEMENTS_INDICES'. If
6382 END-START+1 is greater than the value of `GL_MAX_ELEMENTS_VERTICES', or
6383 if COUNT is greater than the value of `GL_MAX_ELEMENTS_INDICES', then
6384 the call may operate at reduced performance. There is no requirement
6385 that all vertices in the range [START,END] be referenced. However, the
6386 implementation may partially process unused vertices, reducing
6387 performance from what could be achieved with an optimal index set.
6389 When `glDrawRangeElements' is called, it uses COUNT sequential elements
6390 from an enabled array, starting at START to construct a sequence of
6391 geometric primitives. MODE specifies what kind of primitives are
6392 constructed, and how the array elements construct these primitives. If
6393 more than one array is enabled, each is used. If `GL_VERTEX_ARRAY' is
6394 not enabled, no geometric primitives are constructed.
6396 Vertex attributes that are modified by `glDrawRangeElements' have an
6397 unspecified value after `glDrawRangeElements' returns. For example, if
6398 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
6399 after `glDrawRangeElements' executes. Attributes that aren't modified
6400 maintain their previous values.
6402 It is an error for indices to lie outside the range [START,END] , but
6403 implementations may not check for this situation. Such indices cause
6404 implementation-dependent behavior.
6406 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
6408 `GL_INVALID_VALUE' is generated if COUNT is negative.
6410 `GL_INVALID_VALUE' is generated if END<START .
6412 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6413 bound to an enabled array or the element array and the buffer object's
6414 data store is currently mapped.
6416 `GL_INVALID_OPERATION' is generated if `glDrawRangeElements' is executed
6417 between the execution of `glBegin' and the corresponding `glEnd'.")
6419 (define-gl-procedures
6422 (pointer const-GLvoid-*)
6425 "Define an array of edge flags.
6428 Specifies the byte offset between consecutive edge flags. If
6429 STRIDE is 0, the edge flags are understood to be tightly packed in
6430 the array. The initial value is 0.
6433 Specifies a pointer to the first edge flag in the array. The
6436 `glEdgeFlagPointer' specifies the location and data format of an array
6437 of boolean edge flags to use when rendering. STRIDE specifies the byte
6438 stride from one edge flag to the next, allowing vertices and attributes
6439 to be packed into a single array or stored in separate arrays.
6441 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
6442 target (see `glBindBuffer') while an edge flag array is specified,
6443 POINTER is treated as a byte offset into the buffer object's data store.
6444 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
6445 edge flag vertex array client-side state
6446 (`GL_EDGE_FLAG_ARRAY_BUFFER_BINDING').
6448 When an edge flag array is specified, STRIDE and POINTER are saved as
6449 client-side state, in addition to the current vertex array buffer object
6452 To enable and disable the edge flag array, call `glEnableClientState'
6453 and `glDisableClientState' with the argument `GL_EDGE_FLAG_ARRAY'. If
6454 enabled, the edge flag array is used when `glDrawArrays',
6455 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements',
6456 `glDrawRangeElements', or `glArrayElement' is called.
6458 `GL_INVALID_ENUM' is generated if STRIDE is negative.")
6460 (define-gl-procedures
6461 ((glEdgeFlag (flag GLboolean) -> void)
6462 (glEdgeFlagv (flag const-GLboolean-*) -> void))
6463 "Flag edges as either boundary or nonboundary.
6466 Specifies the current edge flag value, either `GL_TRUE' or
6467 `GL_FALSE'. The initial value is `GL_TRUE'.
6469 Each vertex of a polygon, separate triangle, or separate quadrilateral
6470 specified between a `glBegin'/`glEnd' pair is marked as the start of
6471 either a boundary or nonboundary edge. If the current edge flag is true
6472 when the vertex is specified, the vertex is marked as the start of a
6473 boundary edge. Otherwise, the vertex is marked as the start of a
6474 nonboundary edge. `glEdgeFlag' sets the edge flag bit to `GL_TRUE' if
6475 FLAG is `GL_TRUE' and to `GL_FALSE' otherwise.
6477 The vertices of connected triangles and connected quadrilaterals are
6478 always marked as boundary, regardless of the value of the edge flag.
6480 Boundary and nonboundary edge flags on vertices are significant only if
6481 `GL_POLYGON_MODE' is set to `GL_POINT' or `GL_LINE'. See
6484 (define-gl-procedures
6485 ((glEnableClientState (cap GLenum) -> void)
6486 (glDisableClientState (cap GLenum) -> void))
6487 "Enable or disable client-side capability.
6490 Specifies the capability to enable. Symbolic constants
6491 `GL_COLOR_ARRAY', `GL_EDGE_FLAG_ARRAY', `GL_FOG_COORD_ARRAY',
6492 `GL_INDEX_ARRAY', `GL_NORMAL_ARRAY', `GL_SECONDARY_COLOR_ARRAY',
6493 `GL_TEXTURE_COORD_ARRAY', and `GL_VERTEX_ARRAY' are accepted.
6495 `glEnableClientState' and `glDisableClientState' enable or disable
6496 individual client-side capabilities. By default, all client-side
6497 capabilities are disabled. Both `glEnableClientState' and
6498 `glDisableClientState' take a single argument, CAP, which can assume one
6499 of the following values:
6502 If enabled, the color array is enabled for writing and used during
6503 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6504 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6505 is called. See `glColorPointer'.
6507 `GL_EDGE_FLAG_ARRAY'
6508 If enabled, the edge flag array is enabled for writing and used
6509 during rendering when `glArrayElement', `glDrawArrays',
6510 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6511 `glMultiDrawElements' is called. See `glEdgeFlagPointer'.
6513 `GL_FOG_COORD_ARRAY'
6514 If enabled, the fog coordinate array is enabled for writing and
6515 used during rendering when `glArrayElement', `glDrawArrays',
6516 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6517 `glMultiDrawElements' is called. See `glFogCoordPointer'.
6520 If enabled, the index array is enabled for writing and used during
6521 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6522 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6523 is called. See `glIndexPointer'.
6526 If enabled, the normal array is enabled for writing and used during
6527 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6528 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6529 is called. See `glNormalPointer'.
6531 `GL_SECONDARY_COLOR_ARRAY'
6532 If enabled, the secondary color array is enabled for writing and
6533 used during rendering when `glArrayElement', `glDrawArrays',
6534 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6535 `glMultiDrawElements' is called. See `glColorPointer'.
6537 `GL_TEXTURE_COORD_ARRAY'
6538 If enabled, the texture coordinate array is enabled for writing and
6539 used during rendering when `glArrayElement', `glDrawArrays',
6540 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6541 `glMultiDrawElements' is called. See `glTexCoordPointer'.
6544 If enabled, the vertex array is enabled for writing and used during
6545 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6546 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6547 is called. See `glVertexPointer'.
6549 `GL_INVALID_ENUM' is generated if CAP is not an accepted value.
6551 `glEnableClientState' is not allowed between the execution of `glBegin'
6552 and the corresponding `glEnd', but an error may or may not be generated.
6553 If no error is generated, the behavior is undefined.")
6555 (define-gl-procedures
6556 ((glEnableVertexAttribArray
6560 (glDisableVertexAttribArray
6564 "Enable or disable a generic vertex attribute array.
6567 Specifies the index of the generic vertex attribute to be enabled
6570 `glEnableVertexAttribArray' enables the generic vertex attribute array
6571 specified by INDEX. `glDisableVertexAttribArray' disables the generic
6572 vertex attribute array specified by INDEX. By default, all client-side
6573 capabilities are disabled, including all generic vertex attribute
6574 arrays. If enabled, the values in the generic vertex attribute array
6575 will be accessed and used for rendering when calls are made to vertex
6576 array commands such as `glDrawArrays', `glDrawElements',
6577 `glDrawRangeElements', `glArrayElement', `glMultiDrawElements', or
6578 `glMultiDrawArrays'.
6580 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
6581 `GL_MAX_VERTEX_ATTRIBS'.
6583 `GL_INVALID_OPERATION' is generated if either `glEnableVertexAttribArray
6584 ' or `glDisableVertexAttribArray ' is executed between the execution of
6585 `glBegin' and the corresponding execution of `glEnd'.")
6587 (define-gl-procedures
6588 ((glEnable (cap GLenum) -> void)
6589 (glDisable (cap GLenum) -> void))
6590 "Enable or disable server-side GL capabilities.
6593 Specifies a symbolic constant indicating a GL capability.
6595 `glEnable' and `glDisable' enable and disable various capabilities. Use
6596 `glIsEnabled' or `glGet' to determine the current setting of any
6597 capability. The initial value for each capability with the exception of
6598 `GL_DITHER' and `GL_MULTISAMPLE' is `GL_FALSE'. The initial value for
6599 `GL_DITHER' and `GL_MULTISAMPLE' is `GL_TRUE'.
6601 Both `glEnable' and `glDisable' take a single argument, CAP, which can
6602 assume one of the following values:
6607 If enabled, do alpha testing. See `glAlphaFunc'.
6612 If enabled, generate normal vectors when either `GL_MAP2_VERTEX_3'
6613 or `GL_MAP2_VERTEX_4' is used to generate vertices. See `glMap2'.
6618 If enabled, blend the computed fragment color values with the
6619 values in the color buffers. See `glBlendFunc'.
6624 If enabled, clip geometry against user-defined clipping plane I.
6630 If enabled, apply the currently selected logical operation to the
6631 computed fragment color and color buffer values. See `glLogicOp'.
6636 If enabled, have one or more material parameters track the current
6637 color. See `glColorMaterial'.
6642 If enabled and no fragment shader is active, add the secondary
6643 color value to the computed fragment color. See
6649 If enabled, perform a color table lookup on the incoming RGBA color
6650 values. See `glColorTable'.
6655 If enabled, perform a 1D convolution operation on incoming RGBA
6656 color values. See `glConvolutionFilter1D'.
6661 If enabled, perform a 2D convolution operation on incoming RGBA
6662 color values. See `glConvolutionFilter2D'.
6667 If enabled, cull polygons based on their winding in window
6668 coordinates. See `glCullFace'.
6673 If enabled, do depth comparisons and update the depth buffer. Note
6674 that even if the depth buffer exists and the depth mask is
6675 non-zero, the depth buffer is not updated if the depth test is
6676 disabled. See `glDepthFunc' and `glDepthRange'.
6681 If enabled, dither color components or indices before they are
6682 written to the color buffer.
6687 If enabled and no fragment shader is active, blend a fog color into
6688 the post-texturing color. See `glFog'.
6693 If enabled, histogram incoming RGBA color values. See
6699 If enabled, apply the currently selected logical operation to the
6700 incoming index and color buffer indices. See `glLogicOp'.
6705 If enabled, include light I in the evaluation of the lighting
6706 equation. See `glLightModel' and `glLight'.
6711 If enabled and no vertex shader is active, use the current lighting
6712 parameters to compute the vertex color or index. Otherwise, simply
6713 associate the current color or index with each vertex. See
6714 `glMaterial', `glLightModel', and `glLight'.
6719 If enabled, draw lines with correct filtering. Otherwise, draw
6720 aliased lines. See `glLineWidth'.
6725 If enabled, use the current line stipple pattern when drawing
6726 lines. See `glLineStipple'.
6731 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6732 `glEvalPoint1' generate RGBA values. See `glMap1'.
6737 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6738 `glEvalPoint1' generate color indices. See `glMap1'.
6743 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6744 `glEvalPoint1' generate normals. See `glMap1'.
6746 `GL_MAP1_TEXTURE_COORD_1'
6749 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6750 `glEvalPoint1' generate S texture coordinates. See `glMap1'.
6752 `GL_MAP1_TEXTURE_COORD_2'
6755 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6756 `glEvalPoint1' generate S and T texture coordinates. See `glMap1'.
6758 `GL_MAP1_TEXTURE_COORD_3'
6761 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6762 `glEvalPoint1' generate S, T, and R texture coordinates. See
6765 `GL_MAP1_TEXTURE_COORD_4'
6768 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6769 `glEvalPoint1' generate S, T, R, and Q texture coordinates. See
6775 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6776 `glEvalPoint1' generate X, Y, and Z vertex coordinates. See
6782 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6783 `glEvalPoint1' generate homogeneous X, Y, Z, and W vertex
6784 coordinates. See `glMap1'.
6789 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6790 `glEvalPoint2' generate RGBA values. See `glMap2'.
6795 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6796 `glEvalPoint2' generate color indices. See `glMap2'.
6801 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6802 `glEvalPoint2' generate normals. See `glMap2'.
6804 `GL_MAP2_TEXTURE_COORD_1'
6807 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6808 `glEvalPoint2' generate S texture coordinates. See `glMap2'.
6810 `GL_MAP2_TEXTURE_COORD_2'
6813 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6814 `glEvalPoint2' generate S and T texture coordinates. See `glMap2'.
6816 `GL_MAP2_TEXTURE_COORD_3'
6819 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6820 `glEvalPoint2' generate S, T, and R texture coordinates. See
6823 `GL_MAP2_TEXTURE_COORD_4'
6826 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6827 `glEvalPoint2' generate S, T, R, and Q texture coordinates. See
6833 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6834 `glEvalPoint2' generate X, Y, and Z vertex coordinates. See
6840 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6841 `glEvalPoint2' generate homogeneous X, Y, Z, and W vertex
6842 coordinates. See `glMap2'.
6847 If enabled, compute the minimum and maximum values of incoming RGBA
6848 color values. See `glMinmax'.
6853 If enabled, use multiple fragment samples in computing the final
6854 color of a pixel. See `glSampleCoverage'.
6859 If enabled and no vertex shader is active, normal vectors are
6860 normalized to unit length after transformation and before lighting.
6861 This method is generally less efficient than `GL_RESCALE_NORMAL'.
6862 See `glNormal' and `glNormalPointer'.
6867 If enabled, draw points with proper filtering. Otherwise, draw
6868 aliased points. See `glPointSize'.
6873 If enabled, calculate texture coordinates for points based on
6874 texture environment and point parameter settings. Otherwise
6875 texture coordinates are constant across points.
6877 `GL_POLYGON_OFFSET_FILL'
6880 If enabled, and if the polygon is rendered in `GL_FILL' mode, an
6881 offset is added to depth values of a polygon's fragments before the
6882 depth comparison is performed. See `glPolygonOffset'.
6884 `GL_POLYGON_OFFSET_LINE'
6887 If enabled, and if the polygon is rendered in `GL_LINE' mode, an
6888 offset is added to depth values of a polygon's fragments before the
6889 depth comparison is performed. See `glPolygonOffset'.
6891 `GL_POLYGON_OFFSET_POINT'
6894 If enabled, an offset is added to depth values of a polygon's
6895 fragments before the depth comparison is performed, if the polygon
6896 is rendered in `GL_POINT' mode. See `glPolygonOffset'.
6901 If enabled, draw polygons with proper filtering. Otherwise, draw
6902 aliased polygons. For correct antialiased polygons, an alpha
6903 buffer is needed and the polygons must be sorted front to back.
6905 `GL_POLYGON_STIPPLE'
6908 If enabled, use the current polygon stipple pattern when rendering
6909 polygons. See `glPolygonStipple'.
6911 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
6914 If enabled, perform a color table lookup on RGBA color values after
6915 color matrix transformation. See `glColorTable'.
6917 `GL_POST_CONVOLUTION_COLOR_TABLE'
6920 If enabled, perform a color table lookup on RGBA color values after
6921 convolution. See `glColorTable'.
6926 If enabled and no vertex shader is active, normal vectors are
6927 scaled after transformation and before lighting by a factor
6928 computed from the modelview matrix. If the modelview matrix scales
6929 space uniformly, this has the effect of restoring the transformed
6930 normal to unit length. This method is generally more efficient
6931 than `GL_NORMALIZE'. See `glNormal' and `glNormalPointer'.
6933 `GL_SAMPLE_ALPHA_TO_COVERAGE'
6936 If enabled, compute a temporary coverage value where each bit is
6937 determined by the alpha value at the corresponding sample location.
6938 The temporary coverage value is then ANDed with the fragment
6941 `GL_SAMPLE_ALPHA_TO_ONE'
6944 If enabled, each sample alpha value is replaced by the maximum
6945 representable alpha value.
6947 `GL_SAMPLE_COVERAGE'
6950 If enabled, the fragment's coverage is ANDed with the temporary
6951 coverage value. If `GL_SAMPLE_COVERAGE_INVERT' is set to
6952 `GL_TRUE', invert the coverage value. See `glSampleCoverage'.
6957 If enabled, perform a two-dimensional convolution operation using a
6958 separable convolution filter on incoming RGBA color values. See
6959 `glSeparableFilter2D'.
6964 If enabled, discard fragments that are outside the scissor
6965 rectangle. See `glScissor'.
6970 If enabled, do stencil testing and update the stencil buffer. See
6971 `glStencilFunc' and `glStencilOp'.
6976 If enabled and no fragment shader is active, one-dimensional
6977 texturing is performed (unless two- or three-dimensional or
6978 cube-mapped texturing is also enabled). See `glTexImage1D'.
6983 If enabled and no fragment shader is active, two-dimensional
6984 texturing is performed (unless three-dimensional or cube-mapped
6985 texturing is also enabled). See `glTexImage2D'.
6990 If enabled and no fragment shader is active, three-dimensional
6991 texturing is performed (unless cube-mapped texturing is also
6992 enabled). See `glTexImage3D'.
6994 `GL_TEXTURE_CUBE_MAP'
6997 If enabled and no fragment shader is active, cube-mapped texturing
6998 is performed. See `glTexImage2D'.
7003 If enabled and no vertex shader is active, the Q texture coordinate
7004 is computed using the texture generation function defined with
7005 `glTexGen'. Otherwise, the current Q texture coordinate is used.
7011 If enabled and no vertex shader is active, the R texture coordinate
7012 is computed using the texture generation function defined with
7013 `glTexGen'. Otherwise, the current R texture coordinate is used.
7019 If enabled and no vertex shader is active, the S texture coordinate
7020 is computed using the texture generation function defined with
7021 `glTexGen'. Otherwise, the current S texture coordinate is used.
7027 If enabled and no vertex shader is active, the T texture coordinate
7028 is computed using the texture generation function defined with
7029 `glTexGen'. Otherwise, the current T texture coordinate is used.
7032 `GL_VERTEX_PROGRAM_POINT_SIZE'
7035 If enabled and a vertex shader is active, then the derived point
7036 size is taken from the (potentially clipped) shader builtin
7037 `gl_PointSize' and clamped to the implementation-dependent point
7040 `GL_VERTEX_PROGRAM_TWO_SIDE'
7043 If enabled and a vertex shader is active, it specifies that the GL
7044 will choose between front and back colors based on the polygon's
7045 face direction of which the vertex being shaded is a part. It has
7046 no effect on points or lines.
7048 `GL_INVALID_ENUM' is generated if CAP is not one of the values listed
7051 `GL_INVALID_OPERATION' is generated if `glEnable' or `glDisable' is
7052 executed between the execution of `glBegin' and the corresponding
7053 execution of `glEnd'.")
7055 (define-gl-procedures
7056 ((glEvalCoord1f (u GLfloat) -> void)
7057 (glEvalCoord1d (u GLdouble) -> void)
7058 (glEvalCoord2f (u GLfloat) (v GLfloat) -> void)
7059 (glEvalCoord2d (u GLdouble) (v GLdouble) -> void)
7060 (glEvalCoord1fv (u const-GLfloat-*) -> void)
7061 (glEvalCoord1dv (u const-GLdouble-*) -> void)
7062 (glEvalCoord2fv (u const-GLfloat-*) -> void)
7063 (glEvalCoord2dv (u const-GLdouble-*) -> void))
7064 "Evaluate enabled one- and two-dimensional maps.
7067 Specifies a value that is the domain coordinate U to the basis
7068 function defined in a previous `glMap1' or `glMap2' command.
7071 Specifies a value that is the domain coordinate V to the basis
7072 function defined in a previous `glMap2' command. This argument is
7073 not present in a `glEvalCoord1' command.
7075 `glEvalCoord1' evaluates enabled one-dimensional maps at argument U.
7076 `glEvalCoord2' does the same for two-dimensional maps using two domain
7077 values, U and V. To define a map, call `glMap1' and `glMap2'; to enable
7078 and disable it, call `glEnable' and `glDisable'.
7080 When one of the `glEvalCoord' commands is issued, all currently enabled
7081 maps of the indicated dimension are evaluated. Then, for each enabled
7082 map, it is as if the corresponding GL command had been issued with the
7083 computed value. That is, if `GL_MAP1_INDEX' or `GL_MAP2_INDEX' is
7084 enabled, a `glIndex' command is simulated. If `GL_MAP1_COLOR_4' or
7085 `GL_MAP2_COLOR_4' is enabled, a `glColor' command is simulated. If
7086 `GL_MAP1_NORMAL' or `GL_MAP2_NORMAL' is enabled, a normal vector is
7087 produced, and if any of `GL_MAP1_TEXTURE_COORD_1',
7088 `GL_MAP1_TEXTURE_COORD_2', `GL_MAP1_TEXTURE_COORD_3',
7089 `GL_MAP1_TEXTURE_COORD_4', `GL_MAP2_TEXTURE_COORD_1',
7090 `GL_MAP2_TEXTURE_COORD_2', `GL_MAP2_TEXTURE_COORD_3', or
7091 `GL_MAP2_TEXTURE_COORD_4' is enabled, then an appropriate `glTexCoord'
7092 command is simulated.
7094 For color, color index, normal, and texture coordinates the GL uses
7095 evaluated values instead of current values for those evaluations that
7096 are enabled, and current values otherwise, However, the evaluated values
7097 do not update the current values. Thus, if `glVertex' commands are
7098 interspersed with `glEvalCoord' commands, the color, normal, and texture
7099 coordinates associated with the `glVertex' commands are not affected by
7100 the values generated by the `glEvalCoord' commands, but only by the most
7101 recent `glColor', `glIndex', `glNormal', and `glTexCoord' commands.
7103 No commands are issued for maps that are not enabled. If more than one
7104 texture evaluation is enabled for a particular dimension (for example,
7105 `GL_MAP2_TEXTURE_COORD_1' and `GL_MAP2_TEXTURE_COORD_2'), then only the
7106 evaluation of the map that produces the larger number of coordinates (in
7107 this case, `GL_MAP2_TEXTURE_COORD_2') is carried out. `GL_MAP1_VERTEX_4'
7108 overrides `GL_MAP1_VERTEX_3', and `GL_MAP2_VERTEX_4' overrides
7109 `GL_MAP2_VERTEX_3', in the same manner. If neither a three- nor a
7110 four-component vertex map is enabled for the specified dimension, the
7111 `glEvalCoord' command is ignored.
7113 If you have enabled automatic normal generation, by calling `glEnable'
7114 with argument `GL_AUTO_NORMAL', `glEvalCoord2' generates surface normals
7115 analytically, regardless of the contents or enabling of the
7116 `GL_MAP2_NORMAL' map. Let
7118 `m'=∂`p',/∂U,,×∂`p',/∂V,,
7120 Then the generated normal `n' is `n'=`m'/∥`m',∥,
7122 If automatic normal generation is disabled, the corresponding normal map
7123 `GL_MAP2_NORMAL', if enabled, is used to produce a normal. If neither
7124 automatic normal generation nor a normal map is enabled, no normal is
7125 generated for `glEvalCoord2' commands.")
7127 (define-gl-procedures
7142 "Compute a one- or two-dimensional grid of points or lines.
7145 In `glEvalMesh1', specifies whether to compute a one-dimensional
7146 mesh of points or lines. Symbolic constants `GL_POINT' and
7147 `GL_LINE' are accepted.
7152 Specify the first and last integer values for grid domain variable
7155 `glMapGrid' and `glEvalMesh' are used in tandem to efficiently generate
7156 and evaluate a series of evenly-spaced map domain values. `glEvalMesh'
7157 steps through the integer domain of a one- or two-dimensional grid,
7158 whose range is the domain of the evaluation maps specified by `glMap1'
7159 and `glMap2'. MODE determines whether the resulting vertices are
7160 connected as points, lines, or filled polygons.
7162 In the one-dimensional case, `glEvalMesh1', the mesh is generated as if
7163 the following code fragment were executed:
7169 for ( i = I1; i <= I2; i += 1 )
7170 glEvalCoord1( i·ΔU+U_1
7177 and N , U_1 , and U_2 are the arguments to the most recent `glMapGrid1'
7178 command. TYPE is `GL_POINTS' if MODE is `GL_POINT', or `GL_LINES' if
7181 The one absolute numeric requirement is that if I=N , then the value
7182 computed from I·ΔU+U_1 is exactly U_2 .
7184 In the two-dimensional case, `glEvalMesh2', let .cp ΔU=(U_2-U_1,)/N
7188 where N , U_1 , U_2 , M , V_1 , and V_2 are the arguments to the most
7189 recent `glMapGrid2' command. Then, if MODE is `GL_FILL', the
7190 `glEvalMesh2' command is equivalent to:
7195 for ( j = J1; j < J2; j += 1 ) {
7196 glBegin( GL_QUAD_STRIP );
7197 for ( i = I1; i <= I2; i += 1 ) {
7198 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7201 glEvalCoord2( i·ΔU+U_1,(j+1,)·ΔV+V_1
7208 If MODE is `GL_LINE', then a call to `glEvalMesh2' is equivalent to:
7213 for ( j = J1; j <= J2; j += 1 ) {
7214 glBegin( GL_LINE_STRIP );
7215 for ( i = I1; i <= I2; i += 1 )
7216 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7222 for ( i = I1; i <= I2; i += 1 ) {
7223 glBegin( GL_LINE_STRIP );
7224 for ( j = J1; j <= J1; j += 1 )
7225 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7231 And finally, if MODE is `GL_POINT', then a call to `glEvalMesh2' is
7237 glBegin( GL_POINTS );
7238 for ( j = J1; j <= J2; j += 1 )
7239 for ( i = I1; i <= I2; i += 1 )
7240 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7245 In all three cases, the only absolute numeric requirements are that if
7246 I=N , then the value computed from I·ΔU+U_1 is exactly U_2 , and if J=M
7247 , then the value computed from J·ΔV+V_1 is exactly V_2 .
7249 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
7251 `GL_INVALID_OPERATION' is generated if `glEvalMesh' is executed between
7252 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7254 (define-gl-procedures
7255 ((glEvalPoint1 (i GLint) -> void)
7256 (glEvalPoint2 (i GLint) (j GLint) -> void))
7257 "Generate and evaluate a single point in a mesh.
7260 Specifies the integer value for grid domain variable I .
7263 Specifies the integer value for grid domain variable J
7264 (`glEvalPoint2' only).
7266 `glMapGrid' and `glEvalMesh' are used in tandem to efficiently generate
7267 and evaluate a series of evenly spaced map domain values. `glEvalPoint'
7268 can be used to evaluate a single grid point in the same gridspace that
7269 is traversed by `glEvalMesh'. Calling `glEvalPoint1' is equivalent to
7270 calling where ΔU=(U_2-U_1,)/N
7273 glEvalCoord1( i·ΔU+U_1
7277 and N , U_1 , and U_2 are the arguments to the most recent `glMapGrid1'
7278 command. The one absolute numeric requirement is that if I=N , then the
7279 value computed from I·ΔU+U_1 is exactly U_2 .
7281 In the two-dimensional case, `glEvalPoint2', let
7283 ΔU=(U_2-U_1,)/N ΔV=(V_2-V_1,)/M
7285 where N , U_1 , U_2 , M , V_1 , and V_2 are the arguments to the most
7286 recent `glMapGrid2' command. Then the `glEvalPoint2' command is
7287 equivalent to calling The only absolute numeric requirements are that if
7288 I=N , then the value computed from I·ΔU+U_1 is exactly U_2 , and if J=M
7289 , then the value computed from J·ΔV+V_1 is exactly V_2 .
7292 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7296 (define-gl-procedures
7303 "Controls feedback mode.
7306 Specifies the maximum number of values that can be written into
7310 Specifies a symbolic constant that describes the information that
7311 will be returned for each vertex. `GL_2D', `GL_3D', `GL_3D_COLOR',
7312 `GL_3D_COLOR_TEXTURE', and `GL_4D_COLOR_TEXTURE' are accepted.
7315 Returns the feedback data.
7317 The `glFeedbackBuffer' function controls feedback. Feedback, like
7318 selection, is a GL mode. The mode is selected by calling `glRenderMode'
7319 with `GL_FEEDBACK'. When the GL is in feedback mode, no pixels are
7320 produced by rasterization. Instead, information about primitives that
7321 would have been rasterized is fed back to the application using the GL.
7323 `glFeedbackBuffer' has three arguments: BUFFER is a pointer to an array
7324 of floating-point values into which feedback information is placed. SIZE
7325 indicates the size of the array. TYPE is a symbolic constant describing
7326 the information that is fed back for each vertex. `glFeedbackBuffer'
7327 must be issued before feedback mode is enabled (by calling
7328 `glRenderMode' with argument `GL_FEEDBACK'). Setting `GL_FEEDBACK'
7329 without establishing the feedback buffer, or calling `glFeedbackBuffer'
7330 while the GL is in feedback mode, is an error.
7332 When `glRenderMode' is called while in feedback mode, it returns the
7333 number of entries placed in the feedback array and resets the feedback
7334 array pointer to the base of the feedback buffer. The returned value
7335 never exceeds SIZE. If the feedback data required more room than was
7336 available in BUFFER, `glRenderMode' returns a negative value. To take
7337 the GL out of feedback mode, call `glRenderMode' with a parameter value
7338 other than `GL_FEEDBACK'.
7340 While in feedback mode, each primitive, bitmap, or pixel rectangle that
7341 would be rasterized generates a block of values that are copied into the
7342 feedback array. If doing so would cause the number of entries to exceed
7343 the maximum, the block is partially written so as to fill the array (if
7344 there is any room left at all), and an overflow flag is set. Each block
7345 begins with a code indicating the primitive type, followed by values
7346 that describe the primitive's vertices and associated data. Entries are
7347 also written for bitmaps and pixel rectangles. Feedback occurs after
7348 polygon culling and `glPolygonMode' interpretation of polygons has taken
7349 place, so polygons that are culled are not returned in the feedback
7350 buffer. It can also occur after polygons with more than three edges are
7351 broken up into triangles, if the GL implementation renders polygons by
7352 performing this decomposition.
7354 The `glPassThrough' command can be used to insert a marker into the
7355 feedback buffer. See `glPassThrough'.
7357 Following is the grammar for the blocks of values written into the
7358 feedback buffer. Each primitive is indicated with a unique identifying
7359 value followed by some number of vertices. Polygon entries include an
7360 integer value indicating how many vertices follow. A vertex is fed back
7361 as some number of floating-point values, as determined by TYPE. Colors
7362 are fed back as four values in RGBA mode and one value in color index
7365 feedbackList ← feedbackItem feedbackList | feedbackItem feedbackItem ←
7366 point | lineSegment | polygon | bitmap | pixelRectangle | passThru point
7367 ← `GL_POINT_TOKEN' vertex lineSegment ← `GL_LINE_TOKEN' vertex vertex |
7368 `GL_LINE_RESET_TOKEN' vertex vertex polygon ← `GL_POLYGON_TOKEN' n
7369 polySpec polySpec ← polySpec vertex | vertex vertex vertex bitmap ←
7370 `GL_BITMAP_TOKEN' vertex pixelRectangle ← `GL_DRAW_PIXEL_TOKEN' vertex |
7371 `GL_COPY_PIXEL_TOKEN' vertex passThru ← `GL_PASS_THROUGH_TOKEN' value
7372 vertex ← 2d | 3d | 3dColor | 3dColorTexture | 4dColorTexture 2d ← value
7373 value 3d ← value value value 3dColor ← value value value color
7374 3dColorTexture ← value value value color tex 4dColorTexture ← value
7375 value value value color tex color ← rgba | index rgba ← value value
7376 value value index ← value tex ← value value value value
7378 VALUE is a floating-point number, and N is a floating-point integer
7379 giving the number of vertices in the polygon. `GL_POINT_TOKEN',
7380 `GL_LINE_TOKEN', `GL_LINE_RESET_TOKEN', `GL_POLYGON_TOKEN',
7381 `GL_BITMAP_TOKEN', `GL_DRAW_PIXEL_TOKEN', `GL_COPY_PIXEL_TOKEN' and
7382 `GL_PASS_THROUGH_TOKEN' are symbolic floating-point constants.
7383 `GL_LINE_RESET_TOKEN' is returned whenever the line stipple pattern is
7384 reset. The data returned as a vertex depends on the feedback TYPE.
7386 The following table gives the correspondence between TYPE and the number
7387 of values per vertex. K is 1 in color index mode and 4 in RGBA mode.
7392 *Coordinates*, *Color*, *Texture*, *Total Number of Values*
7403 `GL_3D_COLOR_TEXTURE'
7404 X, Y, Z, K , 4 , 7+K
7406 `GL_4D_COLOR_TEXTURE'
7407 X, Y, Z, W, K , 4 , 8+K
7409 Feedback vertex coordinates are in window coordinates, except W, which
7410 is in clip coordinates. Feedback colors are lighted, if lighting is
7411 enabled. Feedback texture coordinates are generated, if texture
7412 coordinate generation is enabled. They are always transformed by the
7415 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
7417 `GL_INVALID_VALUE' is generated if SIZE is negative.
7419 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is called
7420 while the render mode is `GL_FEEDBACK', or if `glRenderMode' is called
7421 with argument `GL_FEEDBACK' before `glFeedbackBuffer' is called at least
7424 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is executed
7425 between the execution of `glBegin' and the corresponding execution of
7428 (define-gl-procedures
7429 ((glFinish -> void))
7430 "Block until all GL execution is complete.
7432 `glFinish' does not return until the effects of all previously called GL
7433 commands are complete. Such effects include all changes to GL state,
7434 all changes to connection state, and all changes to the frame buffer
7437 `GL_INVALID_OPERATION' is generated if `glFinish' is executed between
7438 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7440 (define-gl-procedures
7442 "Force execution of GL commands in finite time.
7444 Different GL implementations buffer commands in several different
7445 locations, including network buffers and the graphics accelerator
7446 itself. `glFlush' empties all of these buffers, causing all issued
7447 commands to be executed as quickly as they are accepted by the actual
7448 rendering engine. Though this execution may not be completed in any
7449 particular time period, it does complete in finite time.
7451 Because any GL program might be executed over a network, or on an
7452 accelerator that buffers commands, all programs should call `glFlush'
7453 whenever they count on having all of their previously issued commands
7454 completed. For example, call `glFlush' before waiting for user input
7455 that depends on the generated image.
7457 `GL_INVALID_OPERATION' is generated if `glFlush' is executed between the
7458 execution of `glBegin' and the corresponding execution of `glEnd'.")
7460 (define-gl-procedures
7467 "Define an array of fog coordinates.
7470 Specifies the data type of each fog coordinate. Symbolic constants
7471 `GL_FLOAT', or `GL_DOUBLE' are accepted. The initial value is
7475 Specifies the byte offset between consecutive fog coordinates. If
7476 STRIDE is 0, the array elements are understood to be tightly
7477 packed. The initial value is 0.
7480 Specifies a pointer to the first coordinate of the first fog
7481 coordinate in the array. The initial value is 0.
7483 `glFogCoordPointer' specifies the location and data format of an array
7484 of fog coordinates to use when rendering. TYPE specifies the data type
7485 of each fog coordinate, and STRIDE specifies the byte stride from one
7486 fog coordinate to the next, allowing vertices and attributes to be
7487 packed into a single array or stored in separate arrays.
7489 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
7490 target (see `glBindBuffer') while a fog coordinate array is specified,
7491 POINTER is treated as a byte offset into the buffer object's data store.
7492 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
7493 fog coordinate vertex array client-side state
7494 (`GL_FOG_COORD_ARRAY_BUFFER_BINDING').
7496 When a fog coordinate array is specified, TYPE, STRIDE, and POINTER are
7497 saved as client-side state, in addition to the current vertex array
7498 buffer object binding.
7500 To enable and disable the fog coordinate array, call
7501 `glEnableClientState' and `glDisableClientState' with the argument
7502 `GL_FOG_COORD_ARRAY'. If enabled, the fog coordinate array is used when
7503 `glDrawArrays', `glMultiDrawArrays', `glDrawElements',
7504 `glMultiDrawElements', `glDrawRangeElements', or `glArrayElement' is
7507 `GL_INVALID_ENUM' is generated if TYPE is not either `GL_FLOAT' or
7510 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
7512 (define-gl-procedures
7513 ((glFogCoordd (coord GLdouble) -> void)
7514 (glFogCoordf (coord GLfloat) -> void)
7515 (glFogCoorddv (coord GLdouble-*) -> void)
7516 (glFogCoordfv (coord GLfloat-*) -> void))
7517 "Set the current fog coordinates.
7520 Specify the fog distance.
7522 `glFogCoord' specifies the fog coordinate that is associated with each
7523 vertex and the current raster position. The value specified is
7524 interpolated and used in computing the fog color (see `glFog').")
7526 (define-gl-procedures
7527 ((glFogf (pname GLenum) (param GLfloat) -> void)
7528 (glFogi (pname GLenum) (param GLint) -> void)
7531 (params const-GLfloat-*)
7536 (params const-GLint-*)
7539 "Specify fog parameters.
7542 Specifies a single-valued fog parameter. `GL_FOG_MODE',
7543 `GL_FOG_DENSITY', `GL_FOG_START', `GL_FOG_END', `GL_FOG_INDEX', and
7544 `GL_FOG_COORD_SRC' are accepted.
7547 Specifies the value that PNAME will be set to.
7549 Fog is initially disabled. While enabled, fog affects rasterized
7550 geometry, bitmaps, and pixel blocks, but not buffer clear operations. To
7551 enable and disable fog, call `glEnable' and `glDisable' with argument
7554 `glFog' assigns the value or values in PARAMS to the fog parameter
7555 specified by PNAME. The following values are accepted for PNAME:
7558 PARAMS is a single integer or floating-point value that specifies
7559 the equation to be used to compute the fog blend factor, F . Three
7560 symbolic constants are accepted: `GL_LINEAR', `GL_EXP', and
7561 `GL_EXP2'. The equations corresponding to these symbolic constants
7562 are defined below. The initial fog mode is `GL_EXP'.
7565 PARAMS is a single integer or floating-point value that specifies
7566 DENSITY , the fog density used in both exponential fog equations.
7567 Only nonnegative densities are accepted. The initial fog density
7571 PARAMS is a single integer or floating-point value that specifies
7572 START , the near distance used in the linear fog equation. The
7573 initial near distance is 0.
7576 PARAMS is a single integer or floating-point value that specifies
7577 END , the far distance used in the linear fog equation. The
7578 initial far distance is 1.
7581 PARAMS is a single integer or floating-point value that specifies
7582 I_F , the fog color index. The initial fog index is 0.
7585 PARAMS contains four integer or floating-point values that specify
7586 C_F , the fog color. Integer values are mapped linearly such that
7587 the most positive representable value maps to 1.0, and the most
7588 negative representable value maps to -1.0 . Floating-point values
7589 are mapped directly. After conversion, all color components are
7590 clamped to the range [0,1] . The initial fog color is (0, 0, 0,
7594 PARAMS contains either of the following symbolic constants:
7595 `GL_FOG_COORD' or `GL_FRAGMENT_DEPTH'. `GL_FOG_COORD' specifies
7596 that the current fog coordinate should be used as distance value in
7597 the fog color computation. `GL_FRAGMENT_DEPTH' specifies that the
7598 current fragment depth should be used as distance value in the fog
7601 Fog blends a fog color with each rasterized pixel fragment's
7602 post-texturing color using a blending factor F . Factor F is computed
7603 in one of three ways, depending on the fog mode. Let C be either the
7604 distance in eye coordinate from the origin (in the case that the
7605 `GL_FOG_COORD_SRC' is `GL_FRAGMENT_DEPTH') or the current fog coordinate
7606 (in the case that `GL_FOG_COORD_SRC' is `GL_FOG_COORD'). The equation
7607 for `GL_LINEAR' fog is F=END-C,/END-START,
7609 The equation for `GL_EXP' fog is F=E^-(DENSITY·C,),
7611 The equation for `GL_EXP2' fog is F=E^-(DENSITY·C,),^2
7613 Regardless of the fog mode, F is clamped to the range [0,1] after it is
7614 computed. Then, if the GL is in RGBA color mode, the fragment's red,
7615 green, and blue colors, represented by C_R , are replaced by
7617 C_R,^″=F×C_R+(1-F,)×C_F
7619 Fog does not affect a fragment's alpha component.
7621 In color index mode, the fragment's color index I_R is replaced by
7623 I_R,^″=I_R+(1-F,)×I_F
7627 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value, or if
7628 PNAME is `GL_FOG_MODE' and PARAMS is not an accepted value.
7630 `GL_INVALID_VALUE' is generated if PNAME is `GL_FOG_DENSITY' and PARAMS
7633 `GL_INVALID_OPERATION' is generated if `glFog' is executed between the
7634 execution of `glBegin' and the corresponding execution of `glEnd'.")
7636 (define-gl-procedures
7637 ((glFrontFace (mode GLenum) -> void))
7638 "Define front- and back-facing polygons.
7641 Specifies the orientation of front-facing polygons. `GL_CW' and
7642 `GL_CCW' are accepted. The initial value is `GL_CCW'.
7644 In a scene composed entirely of opaque closed surfaces, back-facing
7645 polygons are never visible. Eliminating these invisible polygons has
7646 the obvious benefit of speeding up the rendering of the image. To
7647 enable and disable elimination of back-facing polygons, call `glEnable'
7648 and `glDisable' with argument `GL_CULL_FACE'.
7650 The projection of a polygon to window coordinates is said to have
7651 clockwise winding if an imaginary object following the path from its
7652 first vertex, its second vertex, and so on, to its last vertex, and
7653 finally back to its first vertex, moves in a clockwise direction about
7654 the interior of the polygon. The polygon's winding is said to be
7655 counterclockwise if the imaginary object following the same path moves
7656 in a counterclockwise direction about the interior of the polygon.
7657 `glFrontFace' specifies whether polygons with clockwise winding in
7658 window coordinates, or counterclockwise winding in window coordinates,
7659 are taken to be front-facing. Passing `GL_CCW' to MODE selects
7660 counterclockwise polygons as front-facing; `GL_CW' selects clockwise
7661 polygons as front-facing. By default, counterclockwise polygons are
7662 taken to be front-facing.
7664 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
7666 `GL_INVALID_OPERATION' is generated if `glFrontFace' is executed between
7667 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7669 (define-gl-procedures
7679 "Multiply the current matrix by a perspective matrix.
7684 Specify the coordinates for the left and right vertical clipping
7690 Specify the coordinates for the bottom and top horizontal clipping
7696 Specify the distances to the near and far depth clipping planes.
7697 Both distances must be positive.
7699 `glFrustum' describes a perspective matrix that produces a perspective
7700 projection. The current matrix (see `glMatrixMode') is multiplied by
7701 this matrix and the result replaces the current matrix, as if
7702 `glMultMatrix' were called with the following matrix as its argument:
7706 [(2\u2062NEARVAL,/RIGHT-LEFT,, 0 A 0), (0 2\u2062NEARVAL,/TOP-BOTTOM,, B 0), (0 0
7709 A=RIGHT+LEFT,/RIGHT-LEFT,
7711 B=TOP+BOTTOM,/TOP-BOTTOM,
7713 C=-FARVAL+NEARVAL,/FARVAL-NEARVAL,,
7715 D=-2\u2062FARVAL\u2062NEARVAL,/FARVAL-NEARVAL,,
7719 Typically, the matrix mode is `GL_PROJECTION', and (LEFT,BOTTOM-NEARVAL)
7720 and (RIGHT,TOP-NEARVAL) specify the points on the near clipping plane
7721 that are mapped to the lower left and upper right corners of the window,
7722 assuming that the eye is located at (0, 0, 0). -FARVAL specifies the
7723 location of the far clipping plane. Both NEARVAL and FARVAL must be
7726 Use `glPushMatrix' and `glPopMatrix' to save and restore the current
7729 `GL_INVALID_VALUE' is generated if NEARVAL or FARVAL is not positive, or
7730 if LEFT = RIGHT, or BOTTOM = TOP, or NEAR = FAR.
7732 `GL_INVALID_OPERATION' is generated if `glFrustum' is executed between
7733 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7735 (define-gl-procedures
7741 "Generate buffer object names.
7744 Specifies the number of buffer object names to be generated.
7747 Specifies an array in which the generated buffer object names are
7750 `glGenBuffers' returns N buffer object names in BUFFERS. There is no
7751 guarantee that the names form a contiguous set of integers; however, it
7752 is guaranteed that none of the returned names was in use immediately
7753 before the call to `glGenBuffers'.
7755 Buffer object names returned by a call to `glGenBuffers' are not
7756 returned by subsequent calls, unless they are first deleted with
7759 No buffer objects are associated with the returned buffer object names
7760 until they are first bound by calling `glBindBuffer'.
7762 `GL_INVALID_VALUE' is generated if N is negative.
7764 `GL_INVALID_OPERATION' is generated if `glGenBuffers' is executed
7765 between the execution of `glBegin' and the corresponding execution of
7768 (define-gl-procedures
7769 ((glGenLists (range GLsizei) -> GLuint))
7770 "Generate a contiguous set of empty display lists.
7773 Specifies the number of contiguous empty display lists to be
7776 `glGenLists' has one argument, RANGE. It returns an integer N such that
7777 RANGE contiguous empty display lists, named N , N+1 , ... , N+RANGE-1 ,
7778 are created. If RANGE is 0, if there is no group of RANGE contiguous
7779 names available, or if any error is generated, no display lists are
7780 generated, and 0 is returned.
7782 `GL_INVALID_VALUE' is generated if RANGE is negative.
7784 `GL_INVALID_OPERATION' is generated if `glGenLists' is executed between
7785 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7787 (define-gl-procedures
7788 ((glGenQueries (n GLsizei) (ids GLuint-*) -> void))
7789 "Generate query object names.
7792 Specifies the number of query object names to be generated.
7795 Specifies an array in which the generated query object names are
7798 `glGenQueries' returns N query object names in IDS. There is no
7799 guarantee that the names form a contiguous set of integers; however, it
7800 is guaranteed that none of the returned names was in use immediately
7801 before the call to `glGenQueries'.
7803 Query object names returned by a call to `glGenQueries' are not returned
7804 by subsequent calls, unless they are first deleted with
7807 No query objects are associated with the returned query object names
7808 until they are first used by calling `glBeginQuery'.
7810 `GL_INVALID_VALUE' is generated if N is negative.
7812 `GL_INVALID_OPERATION' is generated if `glGenQueries' is executed
7813 between the execution of `glBegin' and the corresponding execution of
7816 (define-gl-procedures
7822 "Generate texture names.
7825 Specifies the number of texture names to be generated.
7828 Specifies an array in which the generated texture names are stored.
7830 `glGenTextures' returns N texture names in TEXTURES. There is no
7831 guarantee that the names form a contiguous set of integers; however, it
7832 is guaranteed that none of the returned names was in use immediately
7833 before the call to `glGenTextures'.
7835 The generated textures have no dimensionality; they assume the
7836 dimensionality of the texture target to which they are first bound (see
7839 Texture names returned by a call to `glGenTextures' are not returned by
7840 subsequent calls, unless they are first deleted with `glDeleteTextures'.
7842 `GL_INVALID_VALUE' is generated if N is negative.
7844 `GL_INVALID_OPERATION' is generated if `glGenTextures' is executed
7845 between the execution of `glBegin' and the corresponding execution of
7848 (define-gl-procedures
7859 "Returns information about an active attribute variable for the specified
7863 Specifies the program object to be queried.
7866 Specifies the index of the attribute variable to be queried.
7869 Specifies the maximum number of characters OpenGL is allowed to
7870 write in the character buffer indicated by NAME.
7873 Returns the number of characters actually written by OpenGL in the
7874 string indicated by NAME (excluding the null terminator) if a value
7875 other than `NULL' is passed.
7878 Returns the size of the attribute variable.
7881 Returns the data type of the attribute variable.
7884 Returns a null terminated string containing the name of the
7887 `glGetActiveAttrib' returns information about an active attribute
7888 variable in the program object specified by PROGRAM. The number of
7889 active attributes can be obtained by calling `glGetProgram' with the
7890 value `GL_ACTIVE_ATTRIBUTES'. A value of 0 for INDEX selects the first
7891 active attribute variable. Permissible values for INDEX range from 0 to
7892 the number of active attribute variables minus 1.
7894 A vertex shader may use either built-in attribute variables,
7895 user-defined attribute variables, or both. Built-in attribute variables
7896 have a prefix of \"gl_\" and reference conventional OpenGL vertex
7897 attribtes (e.g., GL_VERTEX, GL_NORMAL, etc., see the OpenGL Shading
7898 Language specification for a complete list.) User-defined attribute
7899 variables have arbitrary names and obtain their values through numbered
7900 generic vertex attributes. An attribute variable (either built-in or
7901 user-defined) is considered active if it is determined during the link
7902 operation that it may be accessed during program execution. Therefore,
7903 PROGRAM should have previously been the target of a call to
7904 `glLinkProgram', but it is not necessary for it to have been linked
7907 The size of the character buffer required to store the longest attribute
7908 variable name in PROGRAM can be obtained by calling `glGetProgram' with
7909 the value `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH'. This value should be used
7910 to allocate a buffer of sufficient size to store the returned attribute
7911 name. The size of this character buffer is passed in BUFSIZE, and a
7912 pointer to this character buffer is passed in NAME.
7914 `glGetActiveAttrib' returns the name of the attribute variable indicated
7915 by INDEX, storing it in the character buffer specified by NAME. The
7916 string returned will be null terminated. The actual number of
7917 characters written into this buffer is returned in LENGTH, and this
7918 count does not include the null termination character. If the length of
7919 the returned string is not required, a value of `NULL' can be passed in
7920 the LENGTH argument.
7922 The TYPE argument will return a pointer to the attribute variable's data
7923 type. The symbolic constants `GL_FLOAT', `GL_FLOAT_VEC2',
7924 `GL_FLOAT_VEC3', `GL_FLOAT_VEC4', `GL_FLOAT_MAT2', `GL_FLOAT_MAT3',
7925 `GL_FLOAT_MAT4', `GL_FLOAT_MAT2x3', `GL_FLOAT_MAT2x4',
7926 `GL_FLOAT_MAT3x2', `GL_FLOAT_MAT3x4', `GL_FLOAT_MAT4x2', or
7927 `GL_FLOAT_MAT4x3' may be returned. The SIZE argument will return the
7928 size of the attribute, in units of the type returned in TYPE.
7930 The list of active attribute variables may include both built-in
7931 attribute variables (which begin with the prefix \"gl_\") as well as
7932 user-defined attribute variable names.
7934 This function will return as much information as it can about the
7935 specified active attribute variable. If no information is available,
7936 LENGTH will be 0, and NAME will be an empty string. This situation
7937 could occur if this function is called after a link operation that
7938 failed. If an error occurs, the return values LENGTH, SIZE, TYPE, and
7939 NAME will be unmodified.
7941 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
7944 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
7946 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to the
7947 number of active attribute variables in PROGRAM.
7949 `GL_INVALID_OPERATION' is generated if `glGetActiveAttrib' is executed
7950 between the execution of `glBegin' and the corresponding execution of
7953 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.")
7955 (define-gl-procedures
7956 ((glGetActiveUniform
7966 "Returns information about an active uniform variable for the specified
7970 Specifies the program object to be queried.
7973 Specifies the index of the uniform variable to be queried.
7976 Specifies the maximum number of characters OpenGL is allowed to
7977 write in the character buffer indicated by NAME.
7980 Returns the number of characters actually written by OpenGL in the
7981 string indicated by NAME (excluding the null terminator) if a value
7982 other than `NULL' is passed.
7985 Returns the size of the uniform variable.
7988 Returns the data type of the uniform variable.
7991 Returns a null terminated string containing the name of the uniform
7994 `glGetActiveUniform' returns information about an active uniform
7995 variable in the program object specified by PROGRAM. The number of
7996 active uniform variables can be obtained by calling `glGetProgram' with
7997 the value `GL_ACTIVE_UNIFORMS'. A value of 0 for INDEX selects the
7998 first active uniform variable. Permissible values for INDEX range from
7999 0 to the number of active uniform variables minus 1.
8001 Shaders may use either built-in uniform variables, user-defined uniform
8002 variables, or both. Built-in uniform variables have a prefix of \"gl_\"
8003 and reference existing OpenGL state or values derived from such state
8004 (e.g., GL_FOG, GL_MODELVIEWMATRIX, etc., see the OpenGL Shading Language
8005 specification for a complete list.) User-defined uniform variables have
8006 arbitrary names and obtain their values from the application through
8007 calls to `glUniform'. A uniform variable (either built-in or
8008 user-defined) is considered active if it is determined during the link
8009 operation that it may be accessed during program execution. Therefore,
8010 PROGRAM should have previously been the target of a call to
8011 `glLinkProgram', but it is not necessary for it to have been linked
8014 The size of the character buffer required to store the longest uniform
8015 variable name in PROGRAM can be obtained by calling `glGetProgram' with
8016 the value `GL_ACTIVE_UNIFORM_MAX_LENGTH'. This value should be used to
8017 allocate a buffer of sufficient size to store the returned uniform
8018 variable name. The size of this character buffer is passed in BUFSIZE,
8019 and a pointer to this character buffer is passed in NAME.
8021 `glGetActiveUniform' returns the name of the uniform variable indicated
8022 by INDEX, storing it in the character buffer specified by NAME. The
8023 string returned will be null terminated. The actual number of
8024 characters written into this buffer is returned in LENGTH, and this
8025 count does not include the null termination character. If the length of
8026 the returned string is not required, a value of `NULL' can be passed in
8027 the LENGTH argument.
8029 The TYPE argument will return a pointer to the uniform variable's data
8030 type. The symbolic constants `GL_FLOAT', `GL_FLOAT_VEC2',
8031 `GL_FLOAT_VEC3', `GL_FLOAT_VEC4', `GL_INT', `GL_INT_VEC2',
8032 `GL_INT_VEC3', `GL_INT_VEC4', `GL_BOOL', `GL_BOOL_VEC2', `GL_BOOL_VEC3',
8033 `GL_BOOL_VEC4', `GL_FLOAT_MAT2', `GL_FLOAT_MAT3', `GL_FLOAT_MAT4',
8034 `GL_FLOAT_MAT2x3', `GL_FLOAT_MAT2x4', `GL_FLOAT_MAT3x2',
8035 `GL_FLOAT_MAT3x4', `GL_FLOAT_MAT4x2', `GL_FLOAT_MAT4x3',
8036 `GL_SAMPLER_1D', `GL_SAMPLER_2D', `GL_SAMPLER_3D', `GL_SAMPLER_CUBE',
8037 `GL_SAMPLER_1D_SHADOW', or `GL_SAMPLER_2D_SHADOW' may be returned.
8039 If one or more elements of an array are active, the name of the array is
8040 returned in NAME, the type is returned in TYPE, and the SIZE parameter
8041 returns the highest array element index used, plus one, as determined by
8042 the compiler and/or linker. Only one active uniform variable will be
8043 reported for a uniform array.
8045 Uniform variables that are declared as structures or arrays of
8046 structures will not be returned directly by this function. Instead,
8047 each of these uniform variables will be reduced to its fundamental
8048 components containing the \".\" and \"[]\" operators such that each of the
8049 names is valid as an argument to `glGetUniformLocation'. Each of these
8050 reduced uniform variables is counted as one active uniform variable and
8051 is assigned an index. A valid name cannot be a structure, an array of
8052 structures, or a subcomponent of a vector or matrix.
8054 The size of the uniform variable will be returned in SIZE. Uniform
8055 variables other than arrays will have a size of 1. Structures and
8056 arrays of structures will be reduced as described earlier, such that
8057 each of the names returned will be a data type in the earlier list. If
8058 this reduction results in an array, the size returned will be as
8059 described for uniform arrays; otherwise, the size returned will be 1.
8061 The list of active uniform variables may include both built-in uniform
8062 variables (which begin with the prefix \"gl_\") as well as user-defined
8063 uniform variable names.
8065 This function will return as much information as it can about the
8066 specified active uniform variable. If no information is available,
8067 LENGTH will be 0, and NAME will be an empty string. This situation
8068 could occur if this function is called after a link operation that
8069 failed. If an error occurs, the return values LENGTH, SIZE, TYPE, and
8070 NAME will be unmodified.
8072 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
8075 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
8077 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to the
8078 number of active uniform variables in PROGRAM.
8080 `GL_INVALID_OPERATION' is generated if `glGetActiveUniform' is executed
8081 between the execution of `glBegin' and the corresponding execution of
8084 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.")
8086 (define-gl-procedures
8087 ((glGetAttachedShaders
8094 "Returns the handles of the shader objects attached to a program object.
8097 Specifies the program object to be queried.
8100 Specifies the size of the array for storing the returned object
8104 Returns the number of names actually returned in OBJECTS.
8107 Specifies an array that is used to return the names of attached
8110 `glGetAttachedShaders' returns the names of the shader objects attached
8111 to PROGRAM. The names of shader objects that are attached to PROGRAM
8112 will be returned in SHADERS. The actual number of shader names written
8113 into SHADERS is returned in COUNT. If no shader objects are attached to
8114 PROGRAM, COUNT is set to 0. The maximum number of shader names that may
8115 be returned in SHADERS is specified by MAXCOUNT.
8117 If the number of names actually returned is not required (for instance,
8118 if it has just been obtained by calling `glGetProgram'), a value of
8119 `NULL' may be passed for count. If no shader objects are attached to
8120 PROGRAM, a value of 0 will be returned in COUNT. The actual number of
8121 attached shaders can be obtained by calling `glGetProgram' with the
8122 value `GL_ATTACHED_SHADERS'.
8124 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
8127 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
8129 `GL_INVALID_VALUE' is generated if MAXCOUNT is less than 0.
8131 `GL_INVALID_OPERATION' is generated if `glGetAttachedShaders' is
8132 executed between the execution of `glBegin' and the corresponding
8133 execution of `glEnd'.")
8135 (define-gl-procedures
8136 ((glGetAttribLocation
8138 (name const-GLchar-*)
8141 "Returns the location of an attribute variable.
8144 Specifies the program object to be queried.
8147 Points to a null terminated string containing the name of the
8148 attribute variable whose location is to be queried.
8150 `glGetAttribLocation' queries the previously linked program object
8151 specified by PROGRAM for the attribute variable specified by NAME and
8152 returns the index of the generic vertex attribute that is bound to that
8153 attribute variable. If NAME is a matrix attribute variable, the index
8154 of the first column of the matrix is returned. If the named attribute
8155 variable is not an active attribute in the specified program object or
8156 if NAME starts with the reserved prefix \"gl_\", a value of -1 is
8159 The association between an attribute variable name and a generic
8160 attribute index can be specified at any time by calling
8161 `glBindAttribLocation'. Attribute bindings do not go into effect until
8162 `glLinkProgram' is called. After a program object has been linked
8163 successfully, the index values for attribute variables remain fixed
8164 until the next link command occurs. The attribute values can only be
8165 queried after a link if the link was successful. `glGetAttribLocation'
8166 returns the binding that actually went into effect the last time
8167 `glLinkProgram' was called for the specified program object. Attribute
8168 bindings that have been specified since the last link operation are not
8169 returned by `glGetAttribLocation'.
8171 `GL_INVALID_OPERATION' is generated if PROGRAM is not a value generated
8174 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
8176 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
8179 `GL_INVALID_OPERATION' is generated if `glGetAttribLocation' is executed
8180 between the execution of `glBegin' and the corresponding execution of
8183 (define-gl-procedures
8184 ((glGetBufferParameteriv
8190 "Return parameters of a buffer object.
8193 Specifies the target buffer object. The symbolic constant must be
8194 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
8195 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
8198 Specifies the symbolic name of a buffer object parameter. Accepted
8199 values are `GL_BUFFER_ACCESS', `GL_BUFFER_MAPPED',
8200 `GL_BUFFER_SIZE', or `GL_BUFFER_USAGE'.
8203 Returns the requested parameter.
8205 `glGetBufferParameteriv' returns in DATA a selected parameter of the
8206 buffer object specified by TARGET.
8208 VALUE names a specific buffer object parameter, as follows:
8211 PARAMS returns the access policy set while mapping the buffer
8212 object. The initial value is `GL_READ_WRITE'.
8215 PARAMS returns a flag indicating whether the buffer object is
8216 currently mapped. The initial value is `GL_FALSE'.
8219 PARAMS returns the size of the buffer object, measured in bytes.
8220 The initial value is 0.
8223 PARAMS returns the buffer object's usage pattern. The initial
8224 value is `GL_STATIC_DRAW'.
8226 `GL_INVALID_ENUM' is generated if TARGET or VALUE is not an accepted
8229 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
8232 `GL_INVALID_OPERATION' is generated if `glGetBufferParameteriv' is
8233 executed between the execution of `glBegin' and the corresponding
8234 execution of `glEnd'.")
8236 (define-gl-procedures
8237 ((glGetBufferPointerv
8243 "Return the pointer to a mapped buffer object's data store.
8246 Specifies the target buffer object. The symbolic constant must be
8247 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
8248 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
8251 Specifies the pointer to be returned. The symbolic constant must
8252 be `GL_BUFFER_MAP_POINTER'.
8255 Returns the pointer value specified by PNAME.
8257 `glGetBufferPointerv' returns pointer information. PNAME is a symbolic
8258 constant indicating the pointer to be returned, which must be
8259 `GL_BUFFER_MAP_POINTER', the pointer to which the buffer object's data
8260 store is mapped. If the data store is not currently mapped, `NULL' is
8261 returned. PARAMS is a pointer to a location in which to place the
8262 returned pointer value.
8264 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
8267 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
8270 `GL_INVALID_OPERATION' is generated if `glGetBufferPointerv' is executed
8271 between the execution of `glBegin' and the corresponding execution of
8274 (define-gl-procedures
8275 ((glGetBufferSubData
8282 "Returns a subset of a buffer object's data store.
8285 Specifies the target buffer object. The symbolic constant must be
8286 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
8287 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
8290 Specifies the offset into the buffer object's data store from which
8291 data will be returned, measured in bytes.
8294 Specifies the size in bytes of the data store region being
8298 Specifies a pointer to the location where buffer object data is
8301 `glGetBufferSubData' returns some or all of the data from the buffer
8302 object currently bound to TARGET. Data starting at byte offset OFFSET
8303 and extending for SIZE bytes is copied from the data store to the memory
8304 pointed to by DATA. An error is thrown if the buffer object is
8305 currently mapped, or if OFFSET and SIZE together define a range beyond
8306 the bounds of the buffer object's data store.
8308 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
8309 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
8310 `GL_PIXEL_UNPACK_BUFFER'.
8312 `GL_INVALID_VALUE' is generated if OFFSET or SIZE is negative, or if
8313 together they define a region of memory that extends beyond the buffer
8314 object's allocated data store.
8316 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
8319 `GL_INVALID_OPERATION' is generated if the buffer object being queried
8322 `GL_INVALID_OPERATION' is generated if `glGetBufferSubData' is executed
8323 between the execution of `glBegin' and the corresponding execution of
8326 (define-gl-procedures
8329 (equation GLdouble-*)
8332 "Return the coefficients of the specified clipping plane.
8335 Specifies a clipping plane. The number of clipping planes depends
8336 on the implementation, but at least six clipping planes are
8337 supported. They are identified by symbolic names of the form
8338 `GL_CLIP_PLANE' I where i ranges from 0 to the value of
8339 `GL_MAX_CLIP_PLANES' - 1.
8342 Returns four double-precision values that are the coefficients of
8343 the plane equation of PLANE in eye coordinates. The initial value
8346 `glGetClipPlane' returns in EQUATION the four coefficients of the plane
8349 `GL_INVALID_ENUM' is generated if PLANE is not an accepted value.
8351 `GL_INVALID_OPERATION' is generated if `glGetClipPlane' is executed
8352 between the execution of `glBegin' and the corresponding execution of
8355 (define-gl-procedures
8356 ((glGetColorTableParameterfv
8362 (glGetColorTableParameteriv
8368 "Get color lookup table parameters.
8371 The target color table. Must be `GL_COLOR_TABLE',
8372 `GL_POST_CONVOLUTION_COLOR_TABLE',
8373 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `GL_PROXY_COLOR_TABLE',
8374 `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
8375 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
8378 The symbolic name of a color lookup table parameter. Must be one
8379 of `GL_COLOR_TABLE_BIAS', `GL_COLOR_TABLE_SCALE',
8380 `GL_COLOR_TABLE_FORMAT', `GL_COLOR_TABLE_WIDTH',
8381 `GL_COLOR_TABLE_RED_SIZE', `GL_COLOR_TABLE_GREEN_SIZE',
8382 `GL_COLOR_TABLE_BLUE_SIZE', `GL_COLOR_TABLE_ALPHA_SIZE',
8383 `GL_COLOR_TABLE_LUMINANCE_SIZE', or
8384 `GL_COLOR_TABLE_INTENSITY_SIZE'.
8387 A pointer to an array where the values of the parameter will be
8390 Returns parameters specific to color table TARGET.
8392 When PNAME is set to `GL_COLOR_TABLE_SCALE' or `GL_COLOR_TABLE_BIAS',
8393 `glGetColorTableParameter' returns the color table scale or bias
8394 parameters for the table specified by TARGET. For these queries, TARGET
8395 must be set to `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
8396 `GL_POST_COLOR_MATRIX_COLOR_TABLE' and PARAMS points to an array of four
8397 elements, which receive the scale or bias factors for red, green, blue,
8398 and alpha, in that order.
8400 `glGetColorTableParameter' can also be used to retrieve the format and
8401 size parameters for a color table. For these queries, set TARGET to
8402 either the color table target or the proxy color table target. The
8403 format and size parameters are set by `glColorTable'.
8405 The following table lists the format and size parameters that may be
8406 queried. For each symbolic constant listed below for PNAME, PARAMS must
8407 point to an array of the given length and receive the values indicated.
8414 `GL_COLOR_TABLE_FORMAT'
8415 1 , Internal format (e.g., `GL_RGBA')
8417 `GL_COLOR_TABLE_WIDTH'
8418 1 , Number of elements in table
8420 `GL_COLOR_TABLE_RED_SIZE'
8421 1 , Size of red component, in bits
8423 `GL_COLOR_TABLE_GREEN_SIZE'
8424 1 , Size of green component
8426 `GL_COLOR_TABLE_BLUE_SIZE'
8427 1 , Size of blue component
8429 `GL_COLOR_TABLE_ALPHA_SIZE'
8430 1 , Size of alpha component
8432 `GL_COLOR_TABLE_LUMINANCE_SIZE'
8433 1 , Size of luminance component
8435 `GL_COLOR_TABLE_INTENSITY_SIZE'
8436 1 , Size of intensity component
8440 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an acceptable
8443 `GL_INVALID_OPERATION' is generated if `glGetColorTableParameter' is
8444 executed between the execution of `glBegin' and the corresponding
8445 execution of `glEnd'.")
8447 (define-gl-procedures
8455 "Retrieve contents of a color lookup table.
8458 Must be `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
8459 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
8462 The format of the pixel data in TABLE. The possible values are
8463 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
8464 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
8467 The type of the pixel data in TABLE. Symbolic constants
8468 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8469 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
8470 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8471 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
8472 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8473 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8474 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8475 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
8479 Pointer to a one-dimensional array of pixel data containing the
8480 contents of the color table.
8482 `glGetColorTable' returns in TABLE the contents of the color table
8483 specified by TARGET. No pixel transfer operations are performed, but
8484 pixel storage modes that are applicable to `glReadPixels' are performed.
8486 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8487 target (see `glBindBuffer') while a histogram table is requested, TABLE
8488 is treated as a byte offset into the buffer object's data store.
8490 Color components that are requested in the specified FORMAT, but which
8491 are not included in the internal format of the color lookup table, are
8492 returned as zero. The assignments of internal color components to the
8493 components requested by FORMAT are
8495 *Internal Component*
8496 *Resulting Component*
8518 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8521 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
8524 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
8527 `GL_INVALID_OPERATION' is generated if TYPE is one of
8528 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8529 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
8532 `GL_INVALID_OPERATION' is generated if TYPE is one of
8533 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8534 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8535 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8536 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
8537 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
8539 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8540 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8541 store is currently mapped.
8543 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8544 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8545 to the buffer object such that the memory writes required would exceed
8546 the data store size.
8548 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8549 bound to the `GL_PIXEL_PACK_BUFFER' target and TABLE is not evenly
8550 divisible into the number of bytes needed to store in memory a datum
8553 `GL_INVALID_OPERATION' is generated if `glGetColorTable' is executed
8554 between the execution of `glBegin' and the corresponding execution of
8557 (define-gl-procedures
8558 ((glGetCompressedTexImage
8564 "Return a compressed texture image.
8567 Specifies which texture is to be obtained. `GL_TEXTURE_1D',
8568 `GL_TEXTURE_2D', and
8569 `GL_TEXTURE_3D'`GL_TEXTURE_CUBE_MAP_POSITIVE_X',
8570 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
8571 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
8572 and `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z' are accepted.
8575 Specifies the level-of-detail number of the desired image. Level 0
8576 is the base image level. Level N is the N th mipmap reduction
8580 Returns the compressed texture image.
8582 `glGetCompressedTexImage' returns the compressed texture image
8583 associated with TARGET and LOD into IMG. IMG should be an array of
8584 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' bytes. TARGET specifies whether the
8585 desired texture image was one specified by `glTexImage1D'
8586 (`GL_TEXTURE_1D'), `glTexImage2D' (`GL_TEXTURE_2D' or any of
8587 `GL_TEXTURE_CUBE_MAP_*'), or `glTexImage3D' (`GL_TEXTURE_3D'). LOD
8588 specifies the level-of-detail number of the desired image.
8590 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8591 target (see `glBindBuffer') while a texture image is requested, IMG is
8592 treated as a byte offset into the buffer object's data store.
8594 To minimize errors, first verify that the texture is compressed by
8595 calling `glGetTexLevelParameter' with argument `GL_TEXTURE_COMPRESSED'.
8596 If the texture is compressed, then determine the amount of memory
8597 required to store the compressed texture by calling
8598 `glGetTexLevelParameter' with argument
8599 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE'. Finally, retrieve the internal
8600 format of the texture by calling `glGetTexLevelParameter' with argument
8601 `GL_TEXTURE_INTERNAL_FORMAT'. To store the texture for later use,
8602 associate the internal format and size with the retrieved texture image.
8603 These data can be used by the respective texture or subtexture loading
8604 routine used for loading TARGET textures.
8606 `GL_INVALID_VALUE' is generated if LOD is less than zero or greater than
8607 the maximum number of LODs permitted by the implementation.
8609 `GL_INVALID_OPERATION' is generated if `glGetCompressedTexImage' is used
8610 to retrieve a texture that is in an uncompressed internal format.
8612 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8613 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8614 store is currently mapped.
8616 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8617 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8618 to the buffer object such that the memory writes required would exceed
8619 the data store size.
8621 `GL_INVALID_OPERATION' is generated if `glGetCompressedTexImage' is
8622 executed between the execution of `glBegin' and the corresponding
8623 execution of `glEnd'.")
8625 (define-gl-procedures
8626 ((glGetConvolutionFilter
8633 "Get current 1D or 2D convolution filter kernel.
8636 The filter to be retrieved. Must be one of `GL_CONVOLUTION_1D' or
8637 `GL_CONVOLUTION_2D'.
8640 Format of the output image. Must be one of `GL_RED', `GL_GREEN',
8641 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
8642 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
8645 Data type of components in the output image. Symbolic constants
8646 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8647 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
8648 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8649 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
8650 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8651 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8652 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8653 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
8657 Pointer to storage for the output image.
8659 `glGetConvolutionFilter' returns the current 1D or 2D convolution filter
8660 kernel as an image. The one- or two-dimensional image is placed in
8661 IMAGE according to the specifications in FORMAT and TYPE. No pixel
8662 transfer operations are performed on this image, but the relevant pixel
8663 storage modes are applied.
8665 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8666 target (see `glBindBuffer') while a convolution filter is requested,
8667 IMAGE is treated as a byte offset into the buffer object's data store.
8669 Color components that are present in FORMAT but not included in the
8670 internal format of the filter are returned as zero. The assignments of
8671 internal color components to the components of FORMAT are as follows.
8673 *Internal Component*
8674 *Resulting Component*
8696 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8699 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
8702 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
8705 `GL_INVALID_OPERATION' is generated if TYPE is one of
8706 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8707 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
8710 `GL_INVALID_OPERATION' is generated if TYPE is one of
8711 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8712 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8713 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8714 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
8715 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
8717 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8718 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8719 store is currently mapped.
8721 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8722 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8723 to the buffer object such that the memory writes required would exceed
8724 the data store size.
8726 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8727 bound to the `GL_PIXEL_PACK_BUFFER' target and IMAGE is not evenly
8728 divisible into the number of bytes needed to store in memory a datum
8731 `GL_INVALID_OPERATION' is generated if `glGetConvolutionFilter' is
8732 executed between the execution of `glBegin' and the corresponding
8733 execution of `glEnd'.")
8735 (define-gl-procedures
8736 ((glGetConvolutionParameterfv
8742 (glGetConvolutionParameteriv
8748 "Get convolution parameters.
8751 The filter whose parameters are to be retrieved. Must be one of
8752 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D'.
8755 The parameter to be retrieved. Must be one of
8756 `GL_CONVOLUTION_BORDER_MODE', `GL_CONVOLUTION_BORDER_COLOR',
8757 `GL_CONVOLUTION_FILTER_SCALE', `GL_CONVOLUTION_FILTER_BIAS',
8758 `GL_CONVOLUTION_FORMAT', `GL_CONVOLUTION_WIDTH',
8759 `GL_CONVOLUTION_HEIGHT', `GL_MAX_CONVOLUTION_WIDTH', or
8760 `GL_MAX_CONVOLUTION_HEIGHT'.
8763 Pointer to storage for the parameters to be retrieved.
8765 `glGetConvolutionParameter' retrieves convolution parameters. TARGET
8766 determines which convolution filter is queried. PNAME determines which
8767 parameter is returned:
8769 `GL_CONVOLUTION_BORDER_MODE'
8772 The convolution border mode. See `glConvolutionParameter' for a
8773 list of border modes.
8775 `GL_CONVOLUTION_BORDER_COLOR'
8778 The current convolution border color. PARAMS must be a pointer to
8779 an array of four elements, which will receive the red, green, blue,
8780 and alpha border colors.
8782 `GL_CONVOLUTION_FILTER_SCALE'
8785 The current filter scale factors. PARAMS must be a pointer to an
8786 array of four elements, which will receive the red, green, blue,
8787 and alpha filter scale factors in that order.
8789 `GL_CONVOLUTION_FILTER_BIAS'
8792 The current filter bias factors. PARAMS must be a pointer to an
8793 array of four elements, which will receive the red, green, blue,
8794 and alpha filter bias terms in that order.
8796 `GL_CONVOLUTION_FORMAT'
8799 The current internal format. See `glConvolutionFilter1D',
8800 `glConvolutionFilter2D', and `glSeparableFilter2D' for lists of
8803 `GL_CONVOLUTION_WIDTH'
8806 The current filter image width.
8808 `GL_CONVOLUTION_HEIGHT'
8811 The current filter image height.
8813 `GL_MAX_CONVOLUTION_WIDTH'
8816 The maximum acceptable filter image width.
8818 `GL_MAX_CONVOLUTION_HEIGHT'
8821 The maximum acceptable filter image height.
8823 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8826 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
8829 `GL_INVALID_ENUM' is generated if TARGET is `GL_CONVOLUTION_1D' and
8830 PNAME is `GL_CONVOLUTION_HEIGHT' or `GL_MAX_CONVOLUTION_HEIGHT'.
8832 `GL_INVALID_OPERATION' is generated if `glGetConvolutionParameter' is
8833 executed between the execution of `glBegin' and the corresponding
8834 execution of `glEnd'.")
8836 (define-gl-procedures
8837 ((glGetError -> GLenum))
8838 "Return error information.
8840 `glGetError' returns the value of the error flag. Each detectable error
8841 is assigned a numeric code and symbolic name. When an error occurs, the
8842 error flag is set to the appropriate error code value. No other errors
8843 are recorded until `glGetError' is called, the error code is returned,
8844 and the flag is reset to `GL_NO_ERROR'. If a call to `glGetError'
8845 returns `GL_NO_ERROR', there has been no detectable error since the last
8846 call to `glGetError', or since the GL was initialized.
8848 To allow for distributed implementations, there may be several error
8849 flags. If any single error flag has recorded an error, the value of
8850 that flag is returned and that flag is reset to `GL_NO_ERROR' when
8851 `glGetError' is called. If more than one flag has recorded an error,
8852 `glGetError' returns and clears an arbitrary error flag value. Thus,
8853 `glGetError' should always be called in a loop, until it returns
8854 `GL_NO_ERROR', if all error flags are to be reset.
8856 Initially, all error flags are set to `GL_NO_ERROR'.
8858 The following errors are currently defined:
8861 No error has been recorded. The value of this symbolic constant is
8865 An unacceptable value is specified for an enumerated argument. The
8866 offending command is ignored and has no other side effect than to
8870 A numeric argument is out of range. The offending command is
8871 ignored and has no other side effect than to set the error flag.
8873 `GL_INVALID_OPERATION'
8874 The specified operation is not allowed in the current state. The
8875 offending command is ignored and has no other side effect than to
8879 This command would cause a stack overflow. The offending command
8880 is ignored and has no other side effect than to set the error flag.
8882 `GL_STACK_UNDERFLOW'
8883 This command would cause a stack underflow. The offending command
8884 is ignored and has no other side effect than to set the error flag.
8887 There is not enough memory left to execute the command. The state
8888 of the GL is undefined, except for the state of the error flags,
8889 after this error is recorded.
8891 `GL_TABLE_TOO_LARGE'
8892 The specified table exceeds the implementation's maximum supported
8893 table size. The offending command is ignored and has no other side
8894 effect than to set the error flag.
8896 When an error flag is set, results of a GL operation are undefined only
8897 if `GL_OUT_OF_MEMORY' has occurred. In all other cases, the command
8898 generating the error is ignored and has no effect on the GL state or
8899 frame buffer contents. If the generating command returns a value, it
8900 returns 0. If `glGetError' itself generates an error, it returns 0.
8902 `GL_INVALID_OPERATION' is generated if `glGetError' is executed between
8903 the execution of `glBegin' and the corresponding execution of `glEnd'.
8904 In this case, `glGetError' returns 0.")
8906 (define-gl-procedures
8907 ((glGetHistogramParameterfv
8913 (glGetHistogramParameteriv
8919 "Get histogram parameters.
8922 Must be one of `GL_HISTOGRAM' or `GL_PROXY_HISTOGRAM'.
8925 The name of the parameter to be retrieved. Must be one of
8926 `GL_HISTOGRAM_WIDTH', `GL_HISTOGRAM_FORMAT',
8927 `GL_HISTOGRAM_RED_SIZE', `GL_HISTOGRAM_GREEN_SIZE',
8928 `GL_HISTOGRAM_BLUE_SIZE', `GL_HISTOGRAM_ALPHA_SIZE',
8929 `GL_HISTOGRAM_LUMINANCE_SIZE', or `GL_HISTOGRAM_SINK'.
8932 Pointer to storage for the returned values.
8934 `glGetHistogramParameter' is used to query parameter values for the
8935 current histogram or for a proxy. The histogram state information may
8936 be queried by calling `glGetHistogramParameter' with a TARGET of
8937 `GL_HISTOGRAM' (to obtain information for the current histogram table)
8938 or `GL_PROXY_HISTOGRAM' (to obtain information from the most recent
8939 proxy request) and one of the following values for the PNAME argument:
8946 `GL_HISTOGRAM_WIDTH'
8947 Histogram table width
8949 `GL_HISTOGRAM_FORMAT'
8952 `GL_HISTOGRAM_RED_SIZE'
8953 Red component counter size, in bits
8955 `GL_HISTOGRAM_GREEN_SIZE'
8956 Green component counter size, in bits
8958 `GL_HISTOGRAM_BLUE_SIZE'
8959 Blue component counter size, in bits
8961 `GL_HISTOGRAM_ALPHA_SIZE'
8962 Alpha component counter size, in bits
8964 `GL_HISTOGRAM_LUMINANCE_SIZE'
8965 Luminance component counter size, in bits
8968 Value of the SINK parameter
8972 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8975 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
8978 `GL_INVALID_OPERATION' is generated if `glGetHistogramParameter' is
8979 executed between the execution of `glBegin' and the corresponding
8980 execution of `glEnd'.")
8982 (define-gl-procedures
8991 "Get histogram table.
8994 Must be `GL_HISTOGRAM'.
8997 If `GL_TRUE', each component counter that is actually returned is
8998 reset to zero. (Other counters are unaffected.) If `GL_FALSE',
8999 none of the counters in the histogram table is modified.
9002 The format of values to be returned in VALUES. Must be one of
9003 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
9004 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
9007 The type of values to be returned in VALUES. Symbolic constants
9008 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
9009 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9010 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9011 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9012 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9013 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9014 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9015 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9019 A pointer to storage for the returned histogram table.
9021 `glGetHistogram' returns the current histogram table as a
9022 one-dimensional image with the same width as the histogram. No pixel
9023 transfer operations are performed on this image, but pixel storage modes
9024 that are applicable to 1D images are honored.
9026 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9027 target (see `glBindBuffer') while a histogram table is requested, VALUES
9028 is treated as a byte offset into the buffer object's data store.
9030 Color components that are requested in the specified FORMAT, but which
9031 are not included in the internal format of the histogram, are returned
9032 as zero. The assignments of internal color components to the components
9033 requested by FORMAT are:
9035 *Internal Component*
9036 *Resulting Component*
9055 `GL_INVALID_ENUM' is generated if TARGET is not `GL_HISTOGRAM'.
9057 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
9060 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
9063 `GL_INVALID_OPERATION' is generated if TYPE is one of
9064 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9065 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
9068 `GL_INVALID_OPERATION' is generated if TYPE is one of
9069 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9070 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9071 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9072 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
9073 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
9075 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9076 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9077 store is currently mapped.
9079 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9080 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9081 to the buffer object such that the memory writes required would exceed
9082 the data store size.
9084 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9085 bound to the `GL_PIXEL_PACK_BUFFER' target and VALUES is not evenly
9086 divisible into the number of bytes needed to store in memory a datum
9089 `GL_INVALID_OPERATION' is generated if `glGetHistogram' is executed
9090 between the execution of `glBegin' and the corresponding execution of
9093 (define-gl-procedures
9106 "Return light source parameter values.
9109 Specifies a light source. The number of possible lights depends on
9110 the implementation, but at least eight lights are supported. They
9111 are identified by symbolic names of the form `GL_LIGHT' I where I
9112 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
9115 Specifies a light source parameter for LIGHT. Accepted symbolic
9116 names are `GL_AMBIENT', `GL_DIFFUSE', `GL_SPECULAR', `GL_POSITION',
9117 `GL_SPOT_DIRECTION', `GL_SPOT_EXPONENT', `GL_SPOT_CUTOFF',
9118 `GL_CONSTANT_ATTENUATION', `GL_LINEAR_ATTENUATION', and
9119 `GL_QUADRATIC_ATTENUATION'.
9122 Returns the requested data.
9124 `glGetLight' returns in PARAMS the value or values of a light source
9125 parameter. LIGHT names the light and is a symbolic name of the form
9126 `GL_LIGHT'I where i ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
9127 `GL_MAX_LIGHTS' is an implementation dependent constant that is greater
9128 than or equal to eight. PNAME specifies one of ten light source
9129 parameters, again by symbolic name.
9131 The following parameters are defined:
9134 PARAMS returns four integer or floating-point values representing
9135 the ambient intensity of the light source. Integer values, when
9136 requested, are linearly mapped from the internal floating-point
9137 representation such that 1.0 maps to the most positive
9138 representable integer value, and -1.0 maps to the most negative
9139 representable integer value. If the internal value is outside the
9140 range [-1,1] , the corresponding integer return value is undefined.
9141 The initial value is (0, 0, 0, 1).
9144 PARAMS returns four integer or floating-point values representing
9145 the diffuse intensity of the light source. Integer values, when
9146 requested, are linearly mapped from the internal floating-point
9147 representation such that 1.0 maps to the most positive
9148 representable integer value, and -1.0 maps to the most negative
9149 representable integer value. If the internal value is outside the
9150 range [-1,1] , the corresponding integer return value is undefined.
9151 The initial value for `GL_LIGHT0' is (1, 1, 1, 1); for other
9152 lights, the initial value is (0, 0, 0, 0).
9155 PARAMS returns four integer or floating-point values representing
9156 the specular intensity of the light source. Integer values, when
9157 requested, are linearly mapped from the internal floating-point
9158 representation such that 1.0 maps to the most positive
9159 representable integer value, and -1.0 maps to the most negative
9160 representable integer value. If the internal value is outside the
9161 range [-1,1] , the corresponding integer return value is undefined.
9162 The initial value for `GL_LIGHT0' is (1, 1, 1, 1); for other
9163 lights, the initial value is (0, 0, 0, 0).
9166 PARAMS returns four integer or floating-point values representing
9167 the position of the light source. Integer values, when requested,
9168 are computed by rounding the internal floating-point values to the
9169 nearest integer value. The returned values are those maintained in
9170 eye coordinates. They will not be equal to the values specified
9171 using `glLight', unless the modelview matrix was identity at the
9172 time `glLight' was called. The initial value is (0, 0, 1, 0).
9175 PARAMS returns three integer or floating-point values representing
9176 the direction of the light source. Integer values, when requested,
9177 are computed by rounding the internal floating-point values to the
9178 nearest integer value. The returned values are those maintained in
9179 eye coordinates. They will not be equal to the values specified
9180 using `glLight', unless the modelview matrix was identity at the
9181 time `glLight' was called. Although spot direction is normalized
9182 before being used in the lighting equation, the returned values are
9183 the transformed versions of the specified values prior to
9184 normalization. The initial value is (0,0-1) .
9187 PARAMS returns a single integer or floating-point value
9188 representing the spot exponent of the light. An integer value,
9189 when requested, is computed by rounding the internal floating-point
9190 representation to the nearest integer. The initial value is 0.
9193 PARAMS returns a single integer or floating-point value
9194 representing the spot cutoff angle of the light. An integer value,
9195 when requested, is computed by rounding the internal floating-point
9196 representation to the nearest integer. The initial value is 180.
9198 `GL_CONSTANT_ATTENUATION'
9199 PARAMS returns a single integer or floating-point value
9200 representing the constant (not distance-related) attenuation of the
9201 light. An integer value, when requested, is computed by rounding
9202 the internal floating-point representation to the nearest integer.
9203 The initial value is 1.
9205 `GL_LINEAR_ATTENUATION'
9206 PARAMS returns a single integer or floating-point value
9207 representing the linear attenuation of the light. An integer
9208 value, when requested, is computed by rounding the internal
9209 floating-point representation to the nearest integer. The initial
9212 `GL_QUADRATIC_ATTENUATION'
9213 PARAMS returns a single integer or floating-point value
9214 representing the quadratic attenuation of the light. An integer
9215 value, when requested, is computed by rounding the internal
9216 floating-point representation to the nearest integer. The initial
9219 `GL_INVALID_ENUM' is generated if LIGHT or PNAME is not an accepted
9222 `GL_INVALID_OPERATION' is generated if `glGetLight' is executed between
9223 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9225 (define-gl-procedures
9244 "Return evaluator parameters.
9247 Specifies the symbolic name of a map. Accepted values are
9248 `GL_MAP1_COLOR_4', `GL_MAP1_INDEX', `GL_MAP1_NORMAL',
9249 `GL_MAP1_TEXTURE_COORD_1', `GL_MAP1_TEXTURE_COORD_2',
9250 `GL_MAP1_TEXTURE_COORD_3', `GL_MAP1_TEXTURE_COORD_4',
9251 `GL_MAP1_VERTEX_3', `GL_MAP1_VERTEX_4', `GL_MAP2_COLOR_4',
9252 `GL_MAP2_INDEX', `GL_MAP2_NORMAL', `GL_MAP2_TEXTURE_COORD_1',
9253 `GL_MAP2_TEXTURE_COORD_2', `GL_MAP2_TEXTURE_COORD_3',
9254 `GL_MAP2_TEXTURE_COORD_4', `GL_MAP2_VERTEX_3', and
9258 Specifies which parameter to return. Symbolic names `GL_COEFF',
9259 `GL_ORDER', and `GL_DOMAIN' are accepted.
9262 Returns the requested data.
9264 `glMap1' and `glMap2' define evaluators. `glGetMap' returns evaluator
9265 parameters. TARGET chooses a map, QUERY selects a specific parameter,
9266 and V points to storage where the values will be returned.
9268 The acceptable values for the TARGET parameter are described in the
9269 `glMap1' and `glMap2' reference pages.
9271 QUERY can assume the following values:
9274 V returns the control points for the evaluator function.
9275 One-dimensional evaluators return ORDER control points, and
9276 two-dimensional evaluators return UORDER×VORDER control points.
9277 Each control point consists of one, two, three, or four integer,
9278 single-precision floating-point, or double-precision floating-point
9279 values, depending on the type of the evaluator. The GL returns
9280 two-dimensional control points in row-major order, incrementing the
9281 UORDER index quickly and the VORDER index after each row. Integer
9282 values, when requested, are computed by rounding the internal
9283 floating-point values to the nearest integer values.
9286 V returns the order of the evaluator function. One-dimensional
9287 evaluators return a single value, ORDER . The initial value is 1.
9288 Two-dimensional evaluators return two values, UORDER and VORDER .
9289 The initial value is 1,1.
9292 V returns the linear U and V mapping parameters. One-dimensional
9293 evaluators return two values, U1 and U2 , as specified by `glMap1'.
9294 Two-dimensional evaluators return four values ( U1 , U2 , V1 , and
9295 V2 ) as specified by `glMap2'. Integer values, when requested, are
9296 computed by rounding the internal floating-point values to the
9297 nearest integer values.
9299 `GL_INVALID_ENUM' is generated if either TARGET or QUERY is not an
9302 `GL_INVALID_OPERATION' is generated if `glGetMap' is executed between
9303 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9305 (define-gl-procedures
9318 "Return material parameters.
9321 Specifies which of the two materials is being queried. `GL_FRONT'
9322 or `GL_BACK' are accepted, representing the front and back
9323 materials, respectively.
9326 Specifies the material parameter to return. `GL_AMBIENT',
9327 `GL_DIFFUSE', `GL_SPECULAR', `GL_EMISSION', `GL_SHININESS', and
9328 `GL_COLOR_INDEXES' are accepted.
9331 Returns the requested data.
9333 `glGetMaterial' returns in PARAMS the value or values of parameter PNAME
9334 of material FACE. Six parameters are defined:
9337 PARAMS returns four integer or floating-point values representing
9338 the ambient reflectance of the material. Integer values, when
9339 requested, are linearly mapped from the internal floating-point
9340 representation such that 1.0 maps to the most positive
9341 representable integer value, and -1.0 maps to the most negative
9342 representable integer value. If the internal value is outside the
9343 range [-1,1] , the corresponding integer return value is undefined.
9344 The initial value is (0.2, 0.2, 0.2, 1.0)
9347 PARAMS returns four integer or floating-point values representing
9348 the diffuse reflectance of the material. Integer values, when
9349 requested, are linearly mapped from the internal floating-point
9350 representation such that 1.0 maps to the most positive
9351 representable integer value, and -1.0 maps to the most negative
9352 representable integer value. If the internal value is outside the
9353 range [-1,1] , the corresponding integer return value is undefined.
9354 The initial value is (0.8, 0.8, 0.8, 1.0).
9357 PARAMS returns four integer or floating-point values representing
9358 the specular reflectance of the material. Integer values, when
9359 requested, are linearly mapped from the internal floating-point
9360 representation such that 1.0 maps to the most positive
9361 representable integer value, and -1.0 maps to the most negative
9362 representable integer value. If the internal value is outside the
9363 range [-1,1] , the corresponding integer return value is undefined.
9364 The initial value is (0, 0, 0, 1).
9367 PARAMS returns four integer or floating-point values representing
9368 the emitted light intensity of the material. Integer values, when
9369 requested, are linearly mapped from the internal floating-point
9370 representation such that 1.0 maps to the most positive
9371 representable integer value, and -1.0 maps to the most negative
9372 representable integer value. If the internal value is outside the
9373 range [-1,1] , the corresponding integer return value is undefined.
9374 The initial value is (0, 0, 0, 1).
9377 PARAMS returns one integer or floating-point value representing the
9378 specular exponent of the material. Integer values, when requested,
9379 are computed by rounding the internal floating-point value to the
9380 nearest integer value. The initial value is 0.
9383 PARAMS returns three integer or floating-point values representing
9384 the ambient, diffuse, and specular indices of the material. These
9385 indices are used only for color index lighting. (All the other
9386 parameters are used only for RGBA lighting.) Integer values, when
9387 requested, are computed by rounding the internal floating-point
9388 values to the nearest integer values.
9390 `GL_INVALID_ENUM' is generated if FACE or PNAME is not an accepted
9393 `GL_INVALID_OPERATION' is generated if `glGetMaterial' is executed
9394 between the execution of `glBegin' and the corresponding execution of
9397 (define-gl-procedures
9398 ((glGetMinmaxParameterfv
9404 (glGetMinmaxParameteriv
9410 "Get minmax parameters.
9413 Must be `GL_MINMAX'.
9416 The parameter to be retrieved. Must be one of `GL_MINMAX_FORMAT'
9417 or `GL_MINMAX_SINK'.
9420 A pointer to storage for the retrieved parameters.
9422 `glGetMinmaxParameter' retrieves parameters for the current minmax table
9423 by setting PNAME to one of the following values:
9431 Internal format of minmax table
9434 Value of the SINK parameter
9438 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
9440 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
9443 `GL_INVALID_OPERATION' is generated if `glGetMinmaxParameter' is
9444 executed between the execution of `glBegin' and the corresponding
9445 execution of `glEnd'.")
9447 (define-gl-procedures
9456 "Get minimum and maximum pixel values.
9459 Must be `GL_MINMAX'.
9462 If `GL_TRUE', all entries in the minmax table that are actually
9463 returned are reset to their initial values. (Other entries are
9464 unaltered.) If `GL_FALSE', the minmax table is unaltered.
9467 The format of the data to be returned in VALUES. Must be one of
9468 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
9469 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
9472 The type of the data to be returned in VALUES. Symbolic constants
9473 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
9474 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9475 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9476 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9477 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9478 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9479 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9480 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9484 A pointer to storage for the returned values.
9486 `glGetMinmax' returns the accumulated minimum and maximum pixel values
9487 (computed on a per-component basis) in a one-dimensional image of width
9488 2. The first set of return values are the minima, and the second set of
9489 return values are the maxima. The format of the return values is
9490 determined by FORMAT, and their type is determined by TYPES.
9492 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9493 target (see `glBindBuffer') while minimum and maximum pixel values are
9494 requested, VALUES is treated as a byte offset into the buffer object's
9497 No pixel transfer operations are performed on the return values, but
9498 pixel storage modes that are applicable to one-dimensional images are
9499 performed. Color components that are requested in the specified FORMAT,
9500 but that are not included in the internal format of the minmax table,
9501 are returned as zero. The assignment of internal color components to
9502 the components requested by FORMAT are as follows:
9506 *Internal Component*
9507 *Resulting Component*
9524 If RESET is `GL_TRUE', the minmax table entries corresponding to the
9525 return values are reset to their initial values. Minimum and maximum
9526 values that are not returned are not modified, even if RESET is
9529 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
9531 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
9534 `GL_INVALID_ENUM' is generated if TYPES is not one of the allowable
9537 `GL_INVALID_OPERATION' is generated if TYPES is one of
9538 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9539 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
9542 `GL_INVALID_OPERATION' is generated if TYPES is one of
9543 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9544 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9545 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9546 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
9547 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
9549 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9550 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9551 store is currently mapped.
9553 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9554 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9555 to the buffer object such that the memory writes required would exceed
9556 the data store size.
9558 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9559 bound to the `GL_PIXEL_PACK_BUFFER' target and VALUES is not evenly
9560 divisible into the number of bytes needed to store in memory a datum
9563 `GL_INVALID_OPERATION' is generated if `glGetMinmax' is executed between
9564 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9566 (define-gl-procedures
9582 "Return the specified pixel map.
9585 Specifies the name of the pixel map to return. Accepted values are
9586 `GL_PIXEL_MAP_I_TO_I', `GL_PIXEL_MAP_S_TO_S',
9587 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
9588 `GL_PIXEL_MAP_I_TO_B', `GL_PIXEL_MAP_I_TO_A',
9589 `GL_PIXEL_MAP_R_TO_R', `GL_PIXEL_MAP_G_TO_G',
9590 `GL_PIXEL_MAP_B_TO_B', and `GL_PIXEL_MAP_A_TO_A'.
9593 Returns the pixel map contents.
9595 See the `glPixelMap' reference page for a description of the acceptable
9596 values for the MAP parameter. `glGetPixelMap' returns in DATA the
9597 contents of the pixel map specified in MAP. Pixel maps are used during
9598 the execution of `glReadPixels', `glDrawPixels', `glCopyPixels',
9599 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glTexSubImage1D',
9600 `glTexSubImage2D', `glTexSubImage3D', `glCopyTexImage1D',
9601 `glCopyTexImage2D', `glCopyTexSubImage1D', `glCopyTexSubImage2D', and
9602 `glCopyTexSubImage3D'. to map color indices, stencil indices, color
9603 components, and depth components to other values.
9605 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9606 target (see `glBindBuffer') while a pixel map is requested, DATA is
9607 treated as a byte offset into the buffer object's data store.
9609 Unsigned integer values, if requested, are linearly mapped from the
9610 internal fixed or floating-point representation such that 1.0 maps to
9611 the largest representable integer value, and 0.0 maps to 0. Return
9612 unsigned integer values are undefined if the map value was not in the
9615 To determine the required size of MAP, call `glGet' with the appropriate
9618 `GL_INVALID_ENUM' is generated if MAP is not an accepted value.
9620 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9621 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9622 store is currently mapped.
9624 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9625 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9626 to the buffer object such that the memory writes required would exceed
9627 the data store size.
9629 `GL_INVALID_OPERATION' is generated by `glGetPixelMapfv' if a non-zero
9630 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9631 DATA is not evenly divisible into the number of bytes needed to store in
9632 memory a GLfloat datum.
9634 `GL_INVALID_OPERATION' is generated by `glGetPixelMapuiv' if a non-zero
9635 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9636 DATA is not evenly divisible into the number of bytes needed to store in
9637 memory a GLuint datum.
9639 `GL_INVALID_OPERATION' is generated by `glGetPixelMapusv' if a non-zero
9640 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9641 DATA is not evenly divisible into the number of bytes needed to store in
9642 memory a GLushort datum.
9644 `GL_INVALID_OPERATION' is generated if `glGetPixelMap' is executed
9645 between the execution of `glBegin' and the corresponding execution of
9648 (define-gl-procedures
9654 "Return the address of the specified pointer.
9657 Specifies the array or buffer pointer to be returned. Symbolic
9658 constants `GL_COLOR_ARRAY_POINTER', `GL_EDGE_FLAG_ARRAY_POINTER',
9659 `GL_FOG_COORD_ARRAY_POINTER', `GL_FEEDBACK_BUFFER_POINTER',
9660 `GL_INDEX_ARRAY_POINTER', `GL_NORMAL_ARRAY_POINTER',
9661 `GL_SECONDARY_COLOR_ARRAY_POINTER', `GL_SELECTION_BUFFER_POINTER',
9662 `GL_TEXTURE_COORD_ARRAY_POINTER', or `GL_VERTEX_ARRAY_POINTER' are
9666 Returns the pointer value specified by PNAME.
9668 `glGetPointerv' returns pointer information. PNAME is a symbolic
9669 constant indicating the pointer to be returned, and PARAMS is a pointer
9670 to a location in which to place the returned data.
9672 For all PNAME arguments except `GL_FEEDBACK_BUFFER_POINTER' and
9673 `GL_SELECTION_BUFFER_POINTER', if a non-zero named buffer object was
9674 bound to the `GL_ARRAY_BUFFER' target (see `glBindBuffer') when the
9675 desired pointer was previously specified, the pointer returned is a byte
9676 offset into the buffer object's data store. Buffer objects are only
9677 available in OpenGL versions 1.5 and greater.
9679 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.")
9681 (define-gl-procedures
9682 ((glGetPolygonStipple (pattern GLubyte-*) -> void))
9683 "Return the polygon stipple pattern.
9686 Returns the stipple pattern. The initial value is all 1's.
9688 `glGetPolygonStipple' returns to PATTERN a 32×32 polygon stipple
9689 pattern. The pattern is packed into memory as if `glReadPixels' with
9690 both HEIGHT and WIDTH of 32, TYPE of `GL_BITMAP', and FORMAT of
9691 `GL_COLOR_INDEX' were called, and the stipple pattern were stored in an
9692 internal 32×32 color index buffer. Unlike `glReadPixels', however,
9693 pixel transfer operations (shift, offset, pixel map) are not applied to
9694 the returned stipple image.
9696 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9697 target (see `glBindBuffer') while a polygon stipple pattern is
9698 requested, PATTERN is treated as a byte offset into the buffer object's
9701 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9702 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9703 store is currently mapped.
9705 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9706 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9707 to the buffer object such that the memory writes required would exceed
9708 the data store size.
9710 `GL_INVALID_OPERATION' is generated if `glGetPolygonStipple' is executed
9711 between the execution of `glBegin' and the corresponding execution of
9714 (define-gl-procedures
9715 ((glGetProgramInfoLog
9722 "Returns the information log for a program object.
9725 Specifies the program object whose information log is to be
9729 Specifies the size of the character buffer for storing the returned
9733 Returns the length of the string returned in INFOLOG (excluding the
9737 Specifies an array of characters that is used to return the
9740 `glGetProgramInfoLog' returns the information log for the specified
9741 program object. The information log for a program object is modified
9742 when the program object is linked or validated. The string that is
9743 returned will be null terminated.
9745 `glGetProgramInfoLog' returns in INFOLOG as much of the information log
9746 as it can, up to a maximum of MAXLENGTH characters. The number of
9747 characters actually returned, excluding the null termination character,
9748 is specified by LENGTH. If the length of the returned string is not
9749 required, a value of `NULL' can be passed in the LENGTH argument. The
9750 size of the buffer required to store the returned information log can be
9751 obtained by calling `glGetProgram' with the value `GL_INFO_LOG_LENGTH'.
9753 The information log for a program object is either an empty string, or a
9754 string containing information about the last link operation, or a string
9755 containing information about the last validation operation. It may
9756 contain diagnostic messages, warning messages, and other information.
9757 When a program object is created, its information log will be a string
9760 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
9763 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
9765 `GL_INVALID_VALUE' is generated if MAXLENGTH is less than 0.
9767 `GL_INVALID_OPERATION' is generated if `glGetProgramInfoLog' is executed
9768 between the execution of `glBegin' and the corresponding execution of
9771 (define-gl-procedures
9778 "Returns a parameter from a program object.
9781 Specifies the program object to be queried.
9784 Specifies the object parameter. Accepted symbolic names are
9785 `GL_DELETE_STATUS', `GL_LINK_STATUS', `GL_VALIDATE_STATUS',
9786 `GL_INFO_LOG_LENGTH', `GL_ATTACHED_SHADERS',
9787 `GL_ACTIVE_ATTRIBUTES', `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH',
9788 `GL_ACTIVE_UNIFORMS', `GL_ACTIVE_UNIFORM_MAX_LENGTH'.
9791 Returns the requested object parameter.
9793 `glGetProgram' returns in PARAMS the value of a parameter for a specific
9794 program object. The following parameters are defined:
9799 PARAMS returns `GL_TRUE' if PROGRAM is currently flagged for
9800 deletion, and `GL_FALSE' otherwise.
9805 PARAMS returns `GL_TRUE' if the last link operation on PROGRAM was
9806 successful, and `GL_FALSE' otherwise.
9808 `GL_VALIDATE_STATUS'
9811 PARAMS returns `GL_TRUE' or if the last validation operation on
9812 PROGRAM was successful, and `GL_FALSE' otherwise.
9814 `GL_INFO_LOG_LENGTH'
9817 PARAMS returns the number of characters in the information log for
9818 PROGRAM including the null termination character (i.e., the size of
9819 the character buffer required to store the information log). If
9820 PROGRAM has no information log, a value of 0 is returned.
9822 `GL_ATTACHED_SHADERS'
9825 PARAMS returns the number of shader objects attached to PROGRAM.
9827 `GL_ACTIVE_ATTRIBUTES'
9830 PARAMS returns the number of active attribute variables for
9833 `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH'
9836 PARAMS returns the length of the longest active attribute name for
9837 PROGRAM, including the null termination character (i.e., the size
9838 of the character buffer required to store the longest attribute
9839 name). If no active attributes exist, 0 is returned.
9841 `GL_ACTIVE_UNIFORMS'
9844 PARAMS returns the number of active uniform variables for PROGRAM.
9846 `GL_ACTIVE_UNIFORM_MAX_LENGTH'
9849 PARAMS returns the length of the longest active uniform variable
9850 name for PROGRAM, including the null termination character (i.e.,
9851 the size of the character buffer required to store the longest
9852 uniform variable name). If no active uniform variables exist, 0 is
9855 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
9858 `GL_INVALID_OPERATION' is generated if PROGRAM does not refer to a
9861 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
9863 `GL_INVALID_OPERATION' is generated if `glGetProgram' is executed
9864 between the execution of `glBegin' and the corresponding execution of
9867 (define-gl-procedures
9874 "Return parameters of a query object target.
9877 Specifies a query object target. Must be `GL_SAMPLES_PASSED'.
9880 Specifies the symbolic name of a query object target parameter.
9881 Accepted values are `GL_CURRENT_QUERY' or `GL_QUERY_COUNTER_BITS'.
9884 Returns the requested data.
9886 `glGetQueryiv' returns in PARAMS a selected parameter of the query
9887 object target specified by TARGET.
9889 PNAME names a specific query object target parameter. When TARGET is
9890 `GL_SAMPLES_PASSED', PNAME can be as follows:
9893 PARAMS returns the name of the currently active occlusion query
9894 object. If no occlusion query is active, 0 is returned. The
9897 `GL_QUERY_COUNTER_BITS'
9898 PARAMS returns the number of bits in the query counter used to
9899 accumulate passing samples. If the number of bits returned is 0,
9900 the implementation does not support a query counter, and the
9901 results obtained from `glGetQueryObject' are useless.
9903 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
9906 `GL_INVALID_OPERATION' is generated if `glGetQueryiv' is executed
9907 between the execution of `glBegin' and the corresponding execution of
9910 (define-gl-procedures
9911 ((glGetQueryObjectiv
9917 (glGetQueryObjectuiv
9923 "Return parameters of a query object.
9926 Specifies the name of a query object.
9929 Specifies the symbolic name of a query object parameter. Accepted
9930 values are `GL_QUERY_RESULT' or `GL_QUERY_RESULT_AVAILABLE'.
9933 Returns the requested data.
9935 `glGetQueryObject' returns in PARAMS a selected parameter of the query
9936 object specified by ID.
9938 PNAME names a specific query object parameter. PNAME can be as follows:
9941 PARAMS returns the value of the query object's passed samples
9942 counter. The initial value is 0.
9944 `GL_QUERY_RESULT_AVAILABLE'
9945 PARAMS returns whether the passed samples counter is immediately
9946 available. If a delay would occur waiting for the query result,
9947 `GL_FALSE' is returned. Otherwise, `GL_TRUE' is returned, which
9948 also indicates that the results of all previous queries are
9951 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
9953 `GL_INVALID_OPERATION' is generated if ID is not the name of a query
9956 `GL_INVALID_OPERATION' is generated if ID is the name of a currently
9957 active query object.
9959 `GL_INVALID_OPERATION' is generated if `glGetQueryObject' is executed
9960 between the execution of `glBegin' and the corresponding execution of
9963 (define-gl-procedures
9964 ((glGetSeparableFilter
9973 "Get separable convolution filter kernel images.
9976 The separable filter to be retrieved. Must be `GL_SEPARABLE_2D'.
9979 Format of the output images. Must be one of `GL_RED', `GL_GREEN',
9980 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR'`GL_RGBA', `GL_BGRA',
9981 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
9984 Data type of components in the output images. Symbolic constants
9985 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
9986 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9987 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9988 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9989 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9990 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9991 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9992 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9996 Pointer to storage for the row filter image.
9999 Pointer to storage for the column filter image.
10002 Pointer to storage for the span filter image (currently unused).
10004 `glGetSeparableFilter' returns the two one-dimensional filter kernel
10005 images for the current separable 2D convolution filter. The row image
10006 is placed in ROW and the column image is placed in COLUMN according to
10007 the specifications in FORMAT and TYPE. (In the current implementation,
10008 SPAN is not affected in any way.) No pixel transfer operations are
10009 performed on the images, but the relevant pixel storage modes are
10012 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
10013 target (see `glBindBuffer') while a separable convolution filter is
10014 requested, ROW, COLUMN, and SPAN are treated as a byte offset into the
10015 buffer object's data store.
10017 Color components that are present in FORMAT but not included in the
10018 internal format of the filters are returned as zero. The assignments of
10019 internal color components to the components of FORMAT are as follows:
10023 *Internal Component*
10024 *Resulting Component*
10046 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SEPARABLE_2D'.
10048 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
10051 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
10054 `GL_INVALID_OPERATION' is generated if TYPE is one of
10055 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
10056 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
10059 `GL_INVALID_OPERATION' is generated if TYPE is one of
10060 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
10061 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
10062 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
10063 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
10064 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
10066 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10067 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
10068 store is currently mapped.
10070 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10071 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
10072 to the buffer object such that the memory writes required would exceed
10073 the data store size.
10075 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10076 bound to the `GL_PIXEL_PACK_BUFFER' target and ROW or COLUMN is not
10077 evenly divisible into the number of bytes needed to store in memory a
10078 datum indicated by TYPE.
10080 `GL_INVALID_OPERATION' is generated if `glGetSeparableFilter' is
10081 executed between the execution of `glBegin' and the corresponding
10082 execution of `glEnd'.")
10084 (define-gl-procedures
10085 ((glGetShaderInfoLog
10087 (maxLength GLsizei)
10092 "Returns the information log for a shader object.
10095 Specifies the shader object whose information log is to be queried.
10098 Specifies the size of the character buffer for storing the returned
10102 Returns the length of the string returned in INFOLOG (excluding the
10106 Specifies an array of characters that is used to return the
10109 `glGetShaderInfoLog' returns the information log for the specified
10110 shader object. The information log for a shader object is modified when
10111 the shader is compiled. The string that is returned will be null
10114 `glGetShaderInfoLog' returns in INFOLOG as much of the information log
10115 as it can, up to a maximum of MAXLENGTH characters. The number of
10116 characters actually returned, excluding the null termination character,
10117 is specified by LENGTH. If the length of the returned string is not
10118 required, a value of `NULL' can be passed in the LENGTH argument. The
10119 size of the buffer required to store the returned information log can be
10120 obtained by calling `glGetShader' with the value `GL_INFO_LOG_LENGTH'.
10122 The information log for a shader object is a string that may contain
10123 diagnostic messages, warning messages, and other information about the
10124 last compile operation. When a shader object is created, its
10125 information log will be a string of length 0.
10127 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
10130 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
10132 `GL_INVALID_VALUE' is generated if MAXLENGTH is less than 0.
10134 `GL_INVALID_OPERATION' is generated if `glGetShaderInfoLog' is executed
10135 between the execution of `glBegin' and the corresponding execution of
10138 (define-gl-procedures
10139 ((glGetShaderSource
10146 "Returns the source code string from a shader object.
10149 Specifies the shader object to be queried.
10152 Specifies the size of the character buffer for storing the returned
10153 source code string.
10156 Returns the length of the string returned in SOURCE (excluding the
10160 Specifies an array of characters that is used to return the source
10163 `glGetShaderSource' returns the concatenation of the source code strings
10164 from the shader object specified by SHADER. The source code strings for
10165 a shader object are the result of a previous call to `glShaderSource'.
10166 The string returned by the function will be null terminated.
10168 `glGetShaderSource' returns in SOURCE as much of the source code string
10169 as it can, up to a maximum of BUFSIZE characters. The number of
10170 characters actually returned, excluding the null termination character,
10171 is specified by LENGTH. If the length of the returned string is not
10172 required, a value of `NULL' can be passed in the LENGTH argument. The
10173 size of the buffer required to store the returned source code string can
10174 be obtained by calling `glGetShader' with the value
10175 `GL_SHADER_SOURCE_LENGTH'.
10177 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
10180 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
10182 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.
10184 `GL_INVALID_OPERATION' is generated if `glGetShaderSource' is executed
10185 between the execution of `glBegin' and the corresponding execution of
10188 (define-gl-procedures
10195 "Returns a parameter from a shader object.
10198 Specifies the shader object to be queried.
10201 Specifies the object parameter. Accepted symbolic names are
10202 `GL_SHADER_TYPE', `GL_DELETE_STATUS', `GL_COMPILE_STATUS',
10203 `GL_INFO_LOG_LENGTH', `GL_SHADER_SOURCE_LENGTH'.
10206 Returns the requested object parameter.
10208 `glGetShader' returns in PARAMS the value of a parameter for a specific
10209 shader object. The following parameters are defined:
10212 PARAMS returns `GL_VERTEX_SHADER' if SHADER is a vertex shader
10213 object, and `GL_FRAGMENT_SHADER' if SHADER is a fragment shader
10217 PARAMS returns `GL_TRUE' if SHADER is currently flagged for
10218 deletion, and `GL_FALSE' otherwise.
10220 `GL_COMPILE_STATUS'
10221 PARAMS returns `GL_TRUE' if the last compile operation on SHADER
10222 was successful, and `GL_FALSE' otherwise.
10224 `GL_INFO_LOG_LENGTH'
10225 PARAMS returns the number of characters in the information log for
10226 SHADER including the null termination character (i.e., the size of
10227 the character buffer required to store the information log). If
10228 SHADER has no information log, a value of 0 is returned.
10230 `GL_SHADER_SOURCE_LENGTH'
10231 PARAMS returns the length of the concatenation of the source
10232 strings that make up the shader source for the SHADER, including
10233 the null termination character. (i.e., the size of the character
10234 buffer required to store the shader source). If no source code
10235 exists, 0 is returned.
10237 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
10240 `GL_INVALID_OPERATION' is generated if SHADER does not refer to a shader
10243 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
10245 `GL_INVALID_OPERATION' is generated if `glGetShader' is executed between
10246 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10248 (define-gl-procedures
10249 ((glGetString (name GLenum) -> const-GLubyte*))
10250 "Return a string describing the current GL connection.
10253 Specifies a symbolic constant, one of `GL_VENDOR', `GL_RENDERER',
10254 `GL_VERSION', `GL_SHADING_LANGUAGE_VERSION', or `GL_EXTENSIONS'.
10256 `glGetString' returns a pointer to a static string describing some
10257 aspect of the current GL connection. NAME can be one of the following:
10262 Returns the company responsible for this GL implementation. This
10263 name does not change from release to release.
10268 Returns the name of the renderer. This name is typically specific
10269 to a particular configuration of a hardware platform. It does not
10270 change from release to release.
10275 Returns a version or release number.
10277 `GL_SHADING_LANGUAGE_VERSION'
10280 Returns a version or release number for the shading language.
10285 Returns a space-separated list of supported extensions to GL.
10287 Because the GL does not include queries for the performance
10288 characteristics of an implementation, some applications are written to
10289 recognize known platforms and modify their GL usage based on known
10290 performance characteristics of these platforms. Strings `GL_VENDOR' and
10291 `GL_RENDERER' together uniquely specify a platform. They do not change
10292 from release to release and should be used by platform-recognition
10295 Some applications want to make use of features that are not part of the
10296 standard GL. These features may be implemented as extensions to the
10297 standard GL. The `GL_EXTENSIONS' string is a space-separated list of
10298 supported GL extensions. (Extension names never contain a space
10301 The `GL_VERSION' and `GL_SHADING_LANGUAGE_VERSION' strings begin with a
10302 version number. The version number uses one of these forms:
10304 MAJOR_NUMBER.MINOR_NUMBERMAJOR_NUMBER.MINOR_NUMBER.RELEASE_NUMBER
10306 Vendor-specific information may follow the version number. Its format
10307 depends on the implementation, but a space always separates the version
10308 number and the vendor-specific information.
10310 All strings are null-terminated.
10312 `GL_INVALID_ENUM' is generated if NAME is not an accepted value.
10314 `GL_INVALID_OPERATION' is generated if `glGetString' is executed between
10315 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10317 (define-gl-procedures
10330 "Return texture environment parameters.
10333 Specifies a texture environment. May be `GL_TEXTURE_ENV',
10334 `GL_TEXTURE_FILTER_CONTROL', or `GL_POINT_SPRITE'.
10337 Specifies the symbolic name of a texture environment parameter.
10338 Accepted values are `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR',
10339 `GL_TEXTURE_LOD_BIAS', `GL_COMBINE_RGB', `GL_COMBINE_ALPHA',
10340 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
10341 `GL_SRC1_ALPHA', `GL_SRC2_ALPHA', `GL_OPERAND0_RGB',
10342 `GL_OPERAND1_RGB', `GL_OPERAND2_RGB', `GL_OPERAND0_ALPHA',
10343 `GL_OPERAND1_ALPHA', `GL_OPERAND2_ALPHA', `GL_RGB_SCALE',
10344 `GL_ALPHA_SCALE', or `GL_COORD_REPLACE'.
10347 Returns the requested data.
10349 `glGetTexEnv' returns in PARAMS selected values of a texture environment
10350 that was specified with `glTexEnv'. TARGET specifies a texture
10353 When TARGET is `GL_TEXTURE_FILTER_CONTROL', PNAME must be
10354 `GL_TEXTURE_LOD_BIAS'. When TARGET is `GL_POINT_SPRITE', PNAME must be
10355 `GL_COORD_REPLACE'. When TARGET is `GL_TEXTURE_ENV', PNAME can be
10356 `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR', `GL_COMBINE_RGB',
10357 `GL_COMBINE_ALPHA', `GL_RGB_SCALE', `GL_ALPHA_SCALE', `GL_SRC0_RGB',
10358 `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA', `GL_SRC1_ALPHA', or
10361 PNAME names a specific texture environment parameter, as follows:
10363 `GL_TEXTURE_ENV_MODE'
10364 PARAMS returns the single-valued texture environment mode, a
10365 symbolic constant. The initial value is `GL_MODULATE'.
10367 `GL_TEXTURE_ENV_COLOR'
10368 PARAMS returns four integer or floating-point values that are the
10369 texture environment color. Integer values, when requested, are
10370 linearly mapped from the internal floating-point representation
10371 such that 1.0 maps to the most positive representable integer, and
10372 -1.0 maps to the most negative representable integer. The initial
10373 value is (0, 0, 0, 0).
10375 `GL_TEXTURE_LOD_BIAS'
10376 PARAMS returns a single floating-point value that is the texture
10377 level-of-detail bias. The initial value is 0.
10380 PARAMS returns a single symbolic constant value representing the
10381 current RGB combine mode. The initial value is `GL_MODULATE'.
10384 PARAMS returns a single symbolic constant value representing the
10385 current alpha combine mode. The initial value is `GL_MODULATE'.
10388 PARAMS returns a single symbolic constant value representing the
10389 texture combiner zero's RGB source. The initial value is
10393 PARAMS returns a single symbolic constant value representing the
10394 texture combiner one's RGB source. The initial value is
10398 PARAMS returns a single symbolic constant value representing the
10399 texture combiner two's RGB source. The initial value is
10403 PARAMS returns a single symbolic constant value representing the
10404 texture combiner zero's alpha source. The initial value is
10408 PARAMS returns a single symbolic constant value representing the
10409 texture combiner one's alpha source. The initial value is
10413 PARAMS returns a single symbolic constant value representing the
10414 texture combiner two's alpha source. The initial value is
10418 PARAMS returns a single symbolic constant value representing the
10419 texture combiner zero's RGB operand. The initial value is
10423 PARAMS returns a single symbolic constant value representing the
10424 texture combiner one's RGB operand. The initial value is
10428 PARAMS returns a single symbolic constant value representing the
10429 texture combiner two's RGB operand. The initial value is
10432 `GL_OPERAND0_ALPHA'
10433 PARAMS returns a single symbolic constant value representing the
10434 texture combiner zero's alpha operand. The initial value is
10437 `GL_OPERAND1_ALPHA'
10438 PARAMS returns a single symbolic constant value representing the
10439 texture combiner one's alpha operand. The initial value is
10442 `GL_OPERAND2_ALPHA'
10443 PARAMS returns a single symbolic constant value representing the
10444 texture combiner two's alpha operand. The initial value is
10448 PARAMS returns a single floating-point value representing the
10449 current RGB texture combiner scaling factor. The initial value is
10453 PARAMS returns a single floating-point value representing the
10454 current alpha texture combiner scaling factor. The initial value
10458 PARAMS returns a single boolean value representing the current
10459 point sprite texture coordinate replacement enable state. The
10460 initial value is `GL_FALSE'.
10462 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10465 `GL_INVALID_OPERATION' is generated if `glGetTexEnv' is executed between
10466 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10468 (define-gl-procedures
10472 (params GLdouble-*)
10487 "Return texture coordinate generation parameters.
10490 Specifies a texture coordinate. Must be `GL_S', `GL_T', `GL_R', or
10494 Specifies the symbolic name of the value(s) to be returned. Must
10495 be either `GL_TEXTURE_GEN_MODE' or the name of one of the texture
10496 generation plane equations: `GL_OBJECT_PLANE' or `GL_EYE_PLANE'.
10499 Returns the requested data.
10501 `glGetTexGen' returns in PARAMS selected parameters of a texture
10502 coordinate generation function that was specified using `glTexGen'.
10503 COORD names one of the (S, T, R, Q) texture coordinates, using the
10504 symbolic constant `GL_S', `GL_T', `GL_R', or `GL_Q'.
10506 PNAME specifies one of three symbolic names:
10508 `GL_TEXTURE_GEN_MODE'
10509 PARAMS returns the single-valued texture generation function, a
10510 symbolic constant. The initial value is `GL_EYE_LINEAR'.
10513 PARAMS returns the four plane equation coefficients that specify
10514 object linear-coordinate generation. Integer values, when
10515 requested, are mapped directly from the internal floating-point
10519 PARAMS returns the four plane equation coefficients that specify
10520 eye linear-coordinate generation. Integer values, when requested,
10521 are mapped directly from the internal floating-point
10522 representation. The returned values are those maintained in eye
10523 coordinates. They are not equal to the values specified using
10524 `glTexGen', unless the modelview matrix was identity when
10525 `glTexGen' was called.
10527 `GL_INVALID_ENUM' is generated if COORD or PNAME is not an accepted
10530 `GL_INVALID_OPERATION' is generated if `glGetTexGen' is executed between
10531 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10533 (define-gl-procedures
10542 "Return a texture image.
10545 Specifies which texture is to be obtained. `GL_TEXTURE_1D',
10546 `GL_TEXTURE_2D', `GL_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10547 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10548 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10549 and `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z' are accepted.
10552 Specifies the level-of-detail number of the desired image. Level 0
10553 is the base image level. Level N is the N th mipmap reduction
10557 Specifies a pixel format for the returned data. The supported
10558 formats are `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
10559 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and
10560 `GL_LUMINANCE_ALPHA'.
10563 Specifies a pixel type for the returned data. The supported types
10564 are `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
10565 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
10566 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
10567 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
10568 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
10569 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
10570 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
10571 `GL_UNSIGNED_INT_2_10_10_10_REV'.
10574 Returns the texture image. Should be a pointer to an array of the
10575 type specified by TYPE.
10577 `glGetTexImage' returns a texture image into IMG. TARGET specifies
10578 whether the desired texture image is one specified by `glTexImage1D'
10579 (`GL_TEXTURE_1D'), `glTexImage2D' (`GL_TEXTURE_2D' or any of
10580 `GL_TEXTURE_CUBE_MAP_*'), or `glTexImage3D' (`GL_TEXTURE_3D'). LEVEL
10581 specifies the level-of-detail number of the desired image. FORMAT and
10582 TYPE specify the format and type of the desired image array. See the
10583 reference pages `glTexImage1D' and `glDrawPixels' for a description of
10584 the acceptable values for the FORMAT and TYPE parameters, respectively.
10586 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
10587 target (see `glBindBuffer') while a texture image is requested, IMG is
10588 treated as a byte offset into the buffer object's data store.
10590 To understand the operation of `glGetTexImage', consider the selected
10591 internal four-component texture image to be an RGBA color buffer the
10592 size of the image. The semantics of `glGetTexImage' are then identical
10593 to those of `glReadPixels', with the exception that no pixel transfer
10594 operations are performed, when called with the same FORMAT and TYPE,
10595 with X and Y set to 0, WIDTH set to the width of the texture image
10596 (including border if one was specified), and HEIGHT set to 1 for 1D
10597 images, or to the height of the texture image (including border if one
10598 was specified) for 2D images. Because the internal texture image is an
10599 RGBA image, pixel formats `GL_COLOR_INDEX', `GL_STENCIL_INDEX', and
10600 `GL_DEPTH_COMPONENT' are not accepted, and pixel type `GL_BITMAP' is not
10603 If the selected texture image does not contain four components, the
10604 following mappings are applied. Single-component textures are treated
10605 as RGBA buffers with red set to the single-component value, green set to
10606 0, blue set to 0, and alpha set to 1. Two-component textures are
10607 treated as RGBA buffers with red set to the value of component zero,
10608 alpha set to the value of component one, and green and blue set to 0.
10609 Finally, three-component textures are treated as RGBA buffers with red
10610 set to component zero, green set to component one, blue set to component
10611 two, and alpha set to 1.
10613 To determine the required size of IMG, use `glGetTexLevelParameter' to
10614 determine the dimensions of the internal texture image, then scale the
10615 required number of pixels by the storage required for each pixel, based
10616 on FORMAT and TYPE. Be sure to take the pixel storage parameters into
10617 account, especially `GL_PACK_ALIGNMENT'.
10619 `GL_INVALID_ENUM' is generated if TARGET, FORMAT, or TYPE is not an
10622 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
10624 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
10625 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
10627 `GL_INVALID_OPERATION' is returned if TYPE is one of
10628 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
10629 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
10632 `GL_INVALID_OPERATION' is returned if TYPE is one of
10633 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
10634 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
10635 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
10636 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV', and
10637 FORMAT is neither `GL_RGBA' or `GL_BGRA'.
10639 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10640 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
10641 store is currently mapped.
10643 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10644 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
10645 to the buffer object such that the memory writes required would exceed
10646 the data store size.
10648 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10649 bound to the `GL_PIXEL_PACK_BUFFER' target and IMG is not evenly
10650 divisible into the number of bytes needed to store in memory a datum
10653 `GL_INVALID_OPERATION' is generated if `glGetTexImage' is executed
10654 between the execution of `glBegin' and the corresponding execution of
10657 (define-gl-procedures
10658 ((glGetTexLevelParameterfv
10665 (glGetTexLevelParameteriv
10672 "Return texture parameter values for a specific level of detail.
10675 Specifies the symbolic name of the target texture, either
10676 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D',
10677 `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_2D',
10678 `GL_PROXY_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10679 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10680 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10681 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
10684 Specifies the level-of-detail number of the desired image. Level 0
10685 is the base image level. Level N is the N th mipmap reduction
10689 Specifies the symbolic name of a texture parameter.
10690 `GL_TEXTURE_WIDTH', `GL_TEXTURE_HEIGHT', `GL_TEXTURE_DEPTH',
10691 `GL_TEXTURE_INTERNAL_FORMAT', `GL_TEXTURE_BORDER',
10692 `GL_TEXTURE_RED_SIZE', `GL_TEXTURE_GREEN_SIZE',
10693 `GL_TEXTURE_BLUE_SIZE', `GL_TEXTURE_ALPHA_SIZE',
10694 `GL_TEXTURE_LUMINANCE_SIZE', `GL_TEXTURE_INTENSITY_SIZE',
10695 `GL_TEXTURE_DEPTH_SIZE', `GL_TEXTURE_COMPRESSED', and
10696 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' are accepted.
10699 Returns the requested data.
10701 `glGetTexLevelParameter' returns in PARAMS texture parameter values for
10702 a specific level-of-detail value, specified as LEVEL. TARGET defines
10703 the target texture, either `GL_TEXTURE_1D', `GL_TEXTURE_2D',
10704 `GL_TEXTURE_3D', `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_2D',
10705 `GL_PROXY_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10706 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10707 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10708 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
10710 `GL_MAX_TEXTURE_SIZE', and `GL_MAX_3D_TEXTURE_SIZE' are not really
10711 descriptive enough. It has to report the largest square texture image
10712 that can be accommodated with mipmaps and borders, but a long skinny
10713 texture, or a texture without mipmaps and borders, may easily fit in
10714 texture memory. The proxy targets allow the user to more accurately
10715 query whether the GL can accommodate a texture of a given configuration.
10716 If the texture cannot be accommodated, the texture state variables,
10717 which may be queried with `glGetTexLevelParameter', are set to 0. If
10718 the texture can be accommodated, the texture state values will be set as
10719 they would be set for a non-proxy target.
10721 PNAME specifies the texture parameter whose value or values will be
10724 The accepted parameter names are as follows:
10729 PARAMS returns a single value, the width of the texture image. This
10730 value includes the border of the texture image. The initial value
10733 `GL_TEXTURE_HEIGHT'
10736 PARAMS returns a single value, the height of the texture image.
10737 This value includes the border of the texture image. The initial
10743 PARAMS returns a single value, the depth of the texture image. This
10744 value includes the border of the texture image. The initial value
10747 `GL_TEXTURE_INTERNAL_FORMAT'
10750 PARAMS returns a single value, the internal format of the texture
10753 `GL_TEXTURE_BORDER'
10756 PARAMS returns a single value, the width in pixels of the border of
10757 the texture image. The initial value is 0.
10759 `GL_TEXTURE_RED_SIZE',
10760 `GL_TEXTURE_GREEN_SIZE',
10761 `GL_TEXTURE_BLUE_SIZE',
10762 `GL_TEXTURE_ALPHA_SIZE',
10763 `GL_TEXTURE_LUMINANCE_SIZE',
10764 `GL_TEXTURE_INTENSITY_SIZE',
10765 `GL_TEXTURE_DEPTH_SIZE'
10768 The internal storage resolution of an individual component. The
10769 resolution chosen by the GL will be a close match for the
10770 resolution requested by the user with the component argument of
10771 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glCopyTexImage1D',
10772 and `glCopyTexImage2D'. The initial value is 0.
10774 `GL_TEXTURE_COMPRESSED'
10777 PARAMS returns a single boolean value indicating if the texture
10778 image is stored in a compressed internal format. The initiali
10779 value is `GL_FALSE'.
10781 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE'
10784 PARAMS returns a single integer value, the number of unsigned bytes
10785 of the compressed texture image that would be returned from
10786 `glGetCompressedTexImage'.
10788 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10791 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
10793 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
10794 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
10796 `GL_INVALID_OPERATION' is generated if `glGetTexLevelParameter' is
10797 executed between the execution of `glBegin' and the corresponding
10798 execution of `glEnd'.
10800 `GL_INVALID_OPERATION' is generated if
10801 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' is queried on texture images with an
10802 uncompressed internal format or on proxy targets.")
10804 (define-gl-procedures
10805 ((glGetTexParameterfv
10811 (glGetTexParameteriv
10817 "Return texture parameter values.
10820 Specifies the symbolic name of the target texture. `GL_TEXTURE_1D',
10821 `GL_TEXTURE_2D', `GL_TEXTURE_3D', and `GL_TEXTURE_CUBE_MAP' are
10825 Specifies the symbolic name of a texture parameter.
10826 `GL_TEXTURE_MAG_FILTER', `GL_TEXTURE_MIN_FILTER',
10827 `GL_TEXTURE_MIN_LOD', `GL_TEXTURE_MAX_LOD',
10828 `GL_TEXTURE_BASE_LEVEL', `GL_TEXTURE_MAX_LEVEL',
10829 `GL_TEXTURE_WRAP_S', `GL_TEXTURE_WRAP_T', `GL_TEXTURE_WRAP_R',
10830 `GL_TEXTURE_BORDER_COLOR', `GL_TEXTURE_PRIORITY',
10831 `GL_TEXTURE_RESIDENT', `GL_TEXTURE_COMPARE_MODE',
10832 `GL_TEXTURE_COMPARE_FUNC', `GL_DEPTH_TEXTURE_MODE', and
10833 `GL_GENERATE_MIPMAP' are accepted.
10836 Returns the texture parameters.
10838 `glGetTexParameter' returns in PARAMS the value or values of the texture
10839 parameter specified as PNAME. TARGET defines the target texture, either
10840 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D', or
10841 `GL_TEXTURE_CUBE_MAP', to specify one-, two-, or three-dimensional or
10842 cube-mapped texturing. PNAME accepts the same symbols as
10843 `glTexParameter', with the same interpretations:
10845 `GL_TEXTURE_MAG_FILTER'
10846 Returns the single-valued texture magnification filter, a symbolic
10847 constant. The initial value is `GL_LINEAR'.
10849 `GL_TEXTURE_MIN_FILTER'
10850 Returns the single-valued texture minification filter, a symbolic
10851 constant. The initial value is `GL_NEAREST_MIPMAP_LINEAR'.
10853 `GL_TEXTURE_MIN_LOD'
10854 Returns the single-valued texture minimum level-of-detail value.
10855 The initial value is -1000 .
10857 `GL_TEXTURE_MAX_LOD'
10858 Returns the single-valued texture maximum level-of-detail value.
10859 The initial value is 1000.
10861 `GL_TEXTURE_BASE_LEVEL'
10862 Returns the single-valued base texture mipmap level. The initial
10865 `GL_TEXTURE_MAX_LEVEL'
10866 Returns the single-valued maximum texture mipmap array level. The
10867 initial value is 1000.
10869 `GL_TEXTURE_WRAP_S'
10870 Returns the single-valued wrapping function for texture coordinate
10871 S , a symbolic constant. The initial value is `GL_REPEAT'.
10873 `GL_TEXTURE_WRAP_T'
10874 Returns the single-valued wrapping function for texture coordinate
10875 T , a symbolic constant. The initial value is `GL_REPEAT'.
10877 `GL_TEXTURE_WRAP_R'
10878 Returns the single-valued wrapping function for texture coordinate
10879 R , a symbolic constant. The initial value is `GL_REPEAT'.
10881 `GL_TEXTURE_BORDER_COLOR'
10882 Returns four integer or floating-point numbers that comprise the
10883 RGBA color of the texture border. Floating-point values are
10884 returned in the range [0,1] . Integer values are returned as a
10885 linear mapping of the internal floating-point representation such
10886 that 1.0 maps to the most positive representable integer and -1.0
10887 maps to the most negative representable integer. The initial value
10890 `GL_TEXTURE_PRIORITY'
10891 Returns the residence priority of the target texture (or the named
10892 texture bound to it). The initial value is 1. See
10893 `glPrioritizeTextures'.
10895 `GL_TEXTURE_RESIDENT'
10896 Returns the residence status of the target texture. If the value
10897 returned in PARAMS is `GL_TRUE', the texture is resident in texture
10898 memory. See `glAreTexturesResident'.
10900 `GL_TEXTURE_COMPARE_MODE'
10901 Returns a single-valued texture comparison mode, a symbolic
10902 constant. The initial value is `GL_NONE'. See `glTexParameter'.
10904 `GL_TEXTURE_COMPARE_FUNC'
10905 Returns a single-valued texture comparison function, a symbolic
10906 constant. The initial value is `GL_LEQUAL'. See `glTexParameter'.
10908 `GL_DEPTH_TEXTURE_MODE'
10909 Returns a single-valued texture format indicating how the depth
10910 values should be converted into color components. The initial
10911 value is `GL_LUMINANCE'. See `glTexParameter'.
10913 `GL_GENERATE_MIPMAP'
10914 Returns a single boolean value indicating if automatic mipmap level
10915 updates are enabled. See `glTexParameter'.
10917 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10920 `GL_INVALID_OPERATION' is generated if `glGetTexParameter' is executed
10921 between the execution of `glBegin' and the corresponding execution of
10924 (define-gl-procedures
10925 ((glGetUniformLocation
10927 (name const-GLchar-*)
10930 "Returns the location of a uniform variable.
10933 Specifies the program object to be queried.
10936 Points to a null terminated string containing the name of the
10937 uniform variable whose location is to be queried.
10939 `glGetUniformLocation ' returns an integer that represents the location
10940 of a specific uniform variable within a program object. NAME must be a
10941 null terminated string that contains no white space. NAME must be an
10942 active uniform variable name in PROGRAM that is not a structure, an
10943 array of structures, or a subcomponent of a vector or a matrix. This
10944 function returns -1 if NAME does not correspond to an active uniform
10945 variable in PROGRAM or if NAME starts with the reserved prefix \"gl_\".
10947 Uniform variables that are structures or arrays of structures may be
10948 queried by calling `glGetUniformLocation' for each field within the
10949 structure. The array element operator \"[]\" and the structure field
10950 operator \".\" may be used in NAME in order to select elements within an
10951 array or fields within a structure. The result of using these operators
10952 is not allowed to be another structure, an array of structures, or a
10953 subcomponent of a vector or a matrix. Except if the last part of NAME
10954 indicates a uniform variable array, the location of the first element of
10955 an array can be retrieved by using the name of the array, or by using
10956 the name appended by \"[0]\".
10958 The actual locations assigned to uniform variables are not known until
10959 the program object is linked successfully. After linking has occurred,
10960 the command `glGetUniformLocation' can be used to obtain the location of
10961 a uniform variable. This location value can then be passed to
10962 `glUniform' to set the value of the uniform variable or to
10963 `glGetUniform' in order to query the current value of the uniform
10964 variable. After a program object has been linked successfully, the
10965 index values for uniform variables remain fixed until the next link
10966 command occurs. Uniform variable locations and values can only be
10967 queried after a link if the link was successful.
10969 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
10972 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
10974 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
10977 `GL_INVALID_OPERATION' is generated if `glGetUniformLocation' is
10978 executed between the execution of `glBegin' and the corresponding
10979 execution of `glEnd'.")
10981 (define-gl-procedures
10994 "Returns the value of a uniform variable.
10997 Specifies the program object to be queried.
11000 Specifies the location of the uniform variable to be queried.
11003 Returns the value of the specified uniform variable.
11005 `glGetUniform' returns in PARAMS the value(s) of the specified uniform
11006 variable. The type of the uniform variable specified by LOCATION
11007 determines the number of values returned. If the uniform variable is
11008 defined in the shader as a boolean, int, or float, a single value will
11009 be returned. If it is defined as a vec2, ivec2, or bvec2, two values
11010 will be returned. If it is defined as a vec3, ivec3, or bvec3, three
11011 values will be returned, and so on. To query values stored in uniform
11012 variables declared as arrays, call `glGetUniform' for each element of
11013 the array. To query values stored in uniform variables declared as
11014 structures, call `glGetUniform' for each field in the structure. The
11015 values for uniform variables declared as a matrix will be returned in
11016 column major order.
11018 The locations assigned to uniform variables are not known until the
11019 program object is linked. After linking has occurred, the command
11020 `glGetUniformLocation' can be used to obtain the location of a uniform
11021 variable. This location value can then be passed to `glGetUniform' in
11022 order to query the current value of the uniform variable. After a
11023 program object has been linked successfully, the index values for
11024 uniform variables remain fixed until the next link command occurs. The
11025 uniform variable values can only be queried after a link if the link was
11028 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
11031 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
11033 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
11036 `GL_INVALID_OPERATION' is generated if LOCATION does not correspond to a
11037 valid uniform variable location for the specified program object.
11039 `GL_INVALID_OPERATION' is generated if `glGetUniform' is executed
11040 between the execution of `glBegin' and the corresponding execution of
11043 (define-gl-procedures
11044 ((glGetVertexAttribPointerv
11047 (pointer GLvoid-**)
11050 "Return the address of the specified generic vertex attribute pointer.
11053 Specifies the generic vertex attribute parameter to be returned.
11056 Specifies the symbolic name of the generic vertex attribute
11057 parameter to be returned. Must be
11058 `GL_VERTEX_ATTRIB_ARRAY_POINTER'.
11061 Returns the pointer value.
11063 `glGetVertexAttribPointerv' returns pointer information. INDEX is the
11064 generic vertex attribute to be queried, PNAME is a symbolic constant
11065 indicating the pointer to be returned, and PARAMS is a pointer to a
11066 location in which to place the returned data.
11068 If a non-zero named buffer object was bound to the `GL_ARRAY_BUFFER'
11069 target (see `glBindBuffer') when the desired pointer was previously
11070 specified, the POINTER returned is a byte offset into the buffer
11071 object's data store.
11073 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
11074 `GL_MAX_VERTEX_ATTRIBS'.
11076 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.")
11078 (define-gl-procedures
11079 ((glGetVertexAttribdv
11082 (params GLdouble-*)
11085 (glGetVertexAttribfv
11091 (glGetVertexAttribiv
11097 "Return a generic vertex attribute parameter.
11100 Specifies the generic vertex attribute parameter to be queried.
11103 Specifies the symbolic name of the vertex attribute parameter to be
11104 queried. Accepted values are
11105 `GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING',
11106 `GL_VERTEX_ATTRIB_ARRAY_ENABLED', `GL_VERTEX_ATTRIB_ARRAY_SIZE',
11107 `GL_VERTEX_ATTRIB_ARRAY_STRIDE', `GL_VERTEX_ATTRIB_ARRAY_TYPE',
11108 `GL_VERTEX_ATTRIB_ARRAY_NORMALIZED', or `GL_CURRENT_VERTEX_ATTRIB'.
11111 Returns the requested data.
11113 `glGetVertexAttrib' returns in PARAMS the value of a generic vertex
11114 attribute parameter. The generic vertex attribute to be queried is
11115 specified by INDEX, and the parameter to be queried is specified by
11118 The accepted parameter names are as follows:
11120 `GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING'
11123 PARAMS returns a single value, the name of the buffer object
11124 currently bound to the binding point corresponding to generic
11125 vertex attribute array INDEX. If no buffer object is bound, 0 is
11126 returned. The initial value is 0.
11128 `GL_VERTEX_ATTRIB_ARRAY_ENABLED'
11131 PARAMS returns a single value that is non-zero (true) if the vertex
11132 attribute array for INDEX is enabled and 0 (false) if it is
11133 disabled. The initial value is `GL_FALSE'.
11135 `GL_VERTEX_ATTRIB_ARRAY_SIZE'
11138 PARAMS returns a single value, the size of the vertex attribute
11139 array for INDEX. The size is the number of values for each element
11140 of the vertex attribute array, and it will be 1, 2, 3, or 4. The
11141 initial value is 4.
11143 `GL_VERTEX_ATTRIB_ARRAY_STRIDE'
11146 PARAMS returns a single value, the array stride for (number of
11147 bytes between successive elements in) the vertex attribute array
11148 for INDEX. A value of 0 indicates that the array elements are
11149 stored sequentially in memory. The initial value is 0.
11151 `GL_VERTEX_ATTRIB_ARRAY_TYPE'
11154 PARAMS returns a single value, a symbolic constant indicating the
11155 array type for the vertex attribute array for INDEX. Possible
11156 values are `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
11157 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', and
11158 `GL_DOUBLE'. The initial value is `GL_FLOAT'.
11160 `GL_VERTEX_ATTRIB_ARRAY_NORMALIZED'
11163 PARAMS returns a single value that is non-zero (true) if
11164 fixed-point data types for the vertex attribute array indicated by
11165 INDEX are normalized when they are converted to floating point, and
11166 0 (false) otherwise. The initial value is `GL_FALSE'.
11168 `GL_CURRENT_VERTEX_ATTRIB'
11171 PARAMS returns four values that represent the current value for the
11172 generic vertex attribute specified by index. Generic vertex
11173 attribute 0 is unique in that it has no current state, so an error
11174 will be generated if INDEX is 0. The initial value for all other
11175 generic vertex attributes is (0,0,0,1).
11177 All of the parameters except `GL_CURRENT_VERTEX_ATTRIB' represent
11180 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
11181 `GL_MAX_VERTEX_ATTRIBS'.
11183 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
11185 `GL_INVALID_OPERATION' is generated if INDEX is 0 and PNAME is
11186 `GL_CURRENT_VERTEX_ATTRIB'.")
11188 (define-gl-procedures
11191 (params GLboolean-*)
11196 (params GLdouble-*)
11209 "Return the value or values of a selected parameter.
11212 Specifies the parameter value to be returned. The symbolic
11213 constants in the list below are accepted.
11216 Returns the value or values of the specified parameter.
11218 These four commands return values for simple state variables in GL.
11219 PNAME is a symbolic constant indicating the state variable to be
11220 returned, and PARAMS is a pointer to an array of the indicated type in
11221 which to place the returned data.
11223 Type conversion is performed if PARAMS has a different type than the
11224 state variable value being requested. If `glGetBooleanv' is called, a
11225 floating-point (or integer) value is converted to `GL_FALSE' if and only
11226 if it is 0.0 (or 0). Otherwise, it is converted to `GL_TRUE'. If
11227 `glGetIntegerv' is called, boolean values are returned as `GL_TRUE' or
11228 `GL_FALSE', and most floating-point values are rounded to the nearest
11229 integer value. Floating-point colors and normals, however, are returned
11230 with a linear mapping that maps 1.0 to the most positive representable
11231 integer value and -1.0 to the most negative representable integer value.
11232 If `glGetFloatv' or `glGetDoublev' is called, boolean values are
11233 returned as `GL_TRUE' or `GL_FALSE', and integer values are converted to
11234 floating-point values.
11236 The following symbolic constants are accepted by PNAME:
11238 `GL_ACCUM_ALPHA_BITS'
11241 PARAMS returns one value, the number of alpha bitplanes in the
11242 accumulation buffer.
11244 `GL_ACCUM_BLUE_BITS'
11247 PARAMS returns one value, the number of blue bitplanes in the
11248 accumulation buffer.
11250 `GL_ACCUM_CLEAR_VALUE'
11253 PARAMS returns four values: the red, green, blue, and alpha values
11254 used to clear the accumulation buffer. Integer values, if
11255 requested, are linearly mapped from the internal floating-point
11256 representation such that 1.0 returns the most positive
11257 representable integer value, and -1.0 returns the most negative
11258 representable integer value. The initial value is (0, 0, 0, 0).
11259 See `glClearAccum'.
11261 `GL_ACCUM_GREEN_BITS'
11264 PARAMS returns one value, the number of green bitplanes in the
11265 accumulation buffer.
11267 `GL_ACCUM_RED_BITS'
11270 PARAMS returns one value, the number of red bitplanes in the
11271 accumulation buffer.
11273 `GL_ACTIVE_TEXTURE'
11276 PARAMS returns a single value indicating the active multitexture
11277 unit. The initial value is `GL_TEXTURE0'. See `glActiveTexture'.
11279 `GL_ALIASED_POINT_SIZE_RANGE'
11282 PARAMS returns two values, the smallest and largest supported sizes
11283 for aliased points.
11285 `GL_ALIASED_LINE_WIDTH_RANGE'
11288 PARAMS returns two values, the smallest and largest supported
11289 widths for aliased lines.
11294 PARAMS returns one value, the alpha bias factor used during pixel
11295 transfers. The initial value is 0. See `glPixelTransfer'.
11300 PARAMS returns one value, the number of alpha bitplanes in each
11306 PARAMS returns one value, the alpha scale factor used during pixel
11307 transfers. The initial value is 1. See `glPixelTransfer'.
11312 PARAMS returns a single boolean value indicating whether alpha
11313 testing of fragments is enabled. The initial value is `GL_FALSE'.
11316 `GL_ALPHA_TEST_FUNC'PARAMS returns one value,
11319 the symbolic name of the alpha test function. The initial value is
11320 `GL_ALWAYS'. See `glAlphaFunc'.
11322 `GL_ALPHA_TEST_REF'
11325 PARAMS returns one value, the reference value for the alpha test.
11326 The initial value is 0. See `glAlphaFunc'. An integer value, if
11327 requested, is linearly mapped from the internal floating-point
11328 representation such that 1.0 returns the most positive
11329 representable integer value, and -1.0 returns the most negative
11330 representable integer value.
11332 `GL_ARRAY_BUFFER_BINDING'
11335 PARAMS returns a single value, the name of the buffer object
11336 currently bound to the target `GL_ARRAY_BUFFER'. If no buffer
11337 object is bound to this target, 0 is returned. The initial value
11338 is 0. See `glBindBuffer'.
11340 `GL_ATTRIB_STACK_DEPTH'
11343 PARAMS returns one value, the depth of the attribute stack. If the
11344 stack is empty, 0 is returned. The initial value is 0. See
11350 PARAMS returns a single boolean value indicating whether 2D map
11351 evaluation automatically generates surface normals. The initial
11352 value is `GL_FALSE'. See `glMap2'.
11357 PARAMS returns one value, the number of auxiliary color buffers
11363 PARAMS returns a single boolean value indicating whether blending
11364 is enabled. The initial value is `GL_FALSE'. See `glBlendFunc'.
11369 PARAMS returns four values, the red, green, blue, and alpha values
11370 which are the components of the blend color. See `glBlendColor'.
11372 `GL_BLEND_DST_ALPHA'
11375 PARAMS returns one value, the symbolic constant identifying the
11376 alpha destination blend function. The initial value is `GL_ZERO'.
11377 See `glBlendFunc' and `glBlendFuncSeparate'.
11382 PARAMS returns one value, the symbolic constant identifying the RGB
11383 destination blend function. The initial value is `GL_ZERO'. See
11384 `glBlendFunc' and `glBlendFuncSeparate'.
11386 `GL_BLEND_EQUATION_RGB'
11389 PARAMS returns one value, a symbolic constant indicating whether
11390 the RGB blend equation is `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
11391 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN' or `GL_MAX'. See
11392 `glBlendEquationSeparate'.
11394 `GL_BLEND_EQUATION_ALPHA'
11397 PARAMS returns one value, a symbolic constant indicating whether
11398 the Alpha blend equation is `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
11399 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN' or `GL_MAX'. See
11400 `glBlendEquationSeparate'.
11402 `GL_BLEND_SRC_ALPHA'
11405 PARAMS returns one value, the symbolic constant identifying the
11406 alpha source blend function. The initial value is `GL_ONE'. See
11407 `glBlendFunc' and `glBlendFuncSeparate'.
11412 PARAMS returns one value, the symbolic constant identifying the RGB
11413 source blend function. The initial value is `GL_ONE'. See
11414 `glBlendFunc' and `glBlendFuncSeparate'.
11419 PARAMS returns one value, the blue bias factor used during pixel
11420 transfers. The initial value is 0. See `glPixelTransfer'.
11425 PARAMS returns one value, the number of blue bitplanes in each
11431 PARAMS returns one value, the blue scale factor used during pixel
11432 transfers. The initial value is 1. See `glPixelTransfer'.
11434 `GL_CLIENT_ACTIVE_TEXTURE'
11437 PARAMS returns a single integer value indicating the current client
11438 active multitexture unit. The initial value is `GL_TEXTURE0'. See
11439 `glClientActiveTexture'.
11441 `GL_CLIENT_ATTRIB_STACK_DEPTH'
11444 PARAMS returns one value indicating the depth of the attribute
11445 stack. The initial value is 0. See `glPushClientAttrib'.
11450 PARAMS returns a single boolean value indicating whether the
11451 specified clipping plane is enabled. The initial value is
11452 `GL_FALSE'. See `glClipPlane'.
11457 PARAMS returns a single boolean value indicating whether the color
11458 array is enabled. The initial value is `GL_FALSE'. See
11461 `GL_COLOR_ARRAY_BUFFER_BINDING'
11464 PARAMS returns a single value, the name of the buffer object
11465 associated with the color array. This buffer object would have
11466 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
11467 recent call to `glColorPointer'. If no buffer object was bound to
11468 this target, 0 is returned. The initial value is 0. See
11471 `GL_COLOR_ARRAY_SIZE'
11474 PARAMS returns one value, the number of components per color in the
11475 color array. The initial value is 4. See `glColorPointer'.
11477 `GL_COLOR_ARRAY_STRIDE'
11480 PARAMS returns one value, the byte offset between consecutive
11481 colors in the color array. The initial value is 0. See
11484 `GL_COLOR_ARRAY_TYPE'
11487 PARAMS returns one value, the data type of each component in the
11488 color array. The initial value is `GL_FLOAT'. See
11491 `GL_COLOR_CLEAR_VALUE'
11494 PARAMS returns four values: the red, green, blue, and alpha values
11495 used to clear the color buffers. Integer values, if requested, are
11496 linearly mapped from the internal floating-point representation
11497 such that 1.0 returns the most positive representable integer
11498 value, and -1.0 returns the most negative representable integer
11499 value. The initial value is (0, 0, 0, 0). See `glClearColor'.
11501 `GL_COLOR_LOGIC_OP'
11504 PARAMS returns a single boolean value indicating whether a
11505 fragment's RGBA color values are merged into the framebuffer using
11506 a logical operation. The initial value is `GL_FALSE'. See
11509 `GL_COLOR_MATERIAL'
11512 PARAMS returns a single boolean value indicating whether one or
11513 more material parameters are tracking the current color. The
11514 initial value is `GL_FALSE'. See `glColorMaterial'.
11516 `GL_COLOR_MATERIAL_FACE'
11519 PARAMS returns one value, a symbolic constant indicating which
11520 materials have a parameter that is tracking the current color. The
11521 initial value is `GL_FRONT_AND_BACK'. See `glColorMaterial'.
11523 `GL_COLOR_MATERIAL_PARAMETER'
11526 PARAMS returns one value, a symbolic constant indicating which
11527 material parameters are tracking the current color. The initial
11528 value is `GL_AMBIENT_AND_DIFFUSE'. See `glColorMaterial'.
11533 PARAMS returns sixteen values: the color matrix on the top of the
11534 color matrix stack. Initially this matrix is the identity matrix.
11535 See `glPushMatrix'.
11537 `GL_COLOR_MATRIX_STACK_DEPTH'
11540 PARAMS returns one value, the maximum supported depth of the
11541 projection matrix stack. The value must be at least 2. See
11547 PARAMS returns a single boolean value indicating whether primary
11548 and secondary color sum is enabled. See `glSecondaryColor'.
11553 PARAMS returns a single boolean value indicating whether the color
11554 table lookup is enabled. See `glColorTable'.
11556 `GL_COLOR_WRITEMASK'
11559 PARAMS returns four boolean values: the red, green, blue, and alpha
11560 write enables for the color buffers. The initial value is
11561 (`GL_TRUE', `GL_TRUE', `GL_TRUE', `GL_TRUE'). See `glColorMask'.
11563 `GL_COMPRESSED_TEXTURE_FORMATS'
11566 PARAMS returns a list of symbolic constants of length
11567 `GL_NUM_COMPRESSED_TEXTURE_FORMATS' indicating which compressed
11568 texture formats are available. See `glCompressedTexImage2D'.
11570 `GL_CONVOLUTION_1D'
11573 PARAMS returns a single boolean value indicating whether 1D
11574 convolution is enabled. The initial value is `GL_FALSE'. See
11575 `glConvolutionFilter1D'.
11577 `GL_CONVOLUTION_2D'
11580 PARAMS returns a single boolean value indicating whether 2D
11581 convolution is enabled. The initial value is `GL_FALSE'. See
11582 `glConvolutionFilter2D'.
11587 PARAMS returns a single boolean value indicating whether polygon
11588 culling is enabled. The initial value is `GL_FALSE'. See
11591 `GL_CULL_FACE_MODE'
11594 PARAMS returns one value, a symbolic constant indicating which
11595 polygon faces are to be culled. The initial value is `GL_BACK'.
11601 PARAMS returns four values: the red, green, blue, and alpha values
11602 of the current color. Integer values, if requested, are linearly
11603 mapped from the internal floating-point representation such that
11604 1.0 returns the most positive representable integer value, and -1.0
11605 returns the most negative representable integer value. The initial
11606 value is (1, 1, 1, 1). See `glColor'.
11608 `GL_CURRENT_FOG_COORD'
11611 PARAMS returns one value, the current fog coordinate. The initial
11612 value is 0. See `glFogCoord'.
11617 PARAMS returns one value, the current color index. The initial
11618 value is 1. See `glIndex'.
11620 `GL_CURRENT_NORMAL'
11623 PARAMS returns three values: the X, Y, and Z values of the current
11624 normal. Integer values, if requested, are linearly mapped from the
11625 internal floating-point representation such that 1.0 returns the
11626 most positive representable integer value, and -1.0 returns the
11627 most negative representable integer value. The initial value is
11628 (0, 0, 1). See `glNormal'.
11630 `GL_CURRENT_PROGRAM'
11633 PARAMS returns one value, the name of the program object that is
11634 currently active, or 0 if no program object is active. See
11637 `GL_CURRENT_RASTER_COLOR'
11640 PARAMS returns four values: the red, green, blue, and alpha color
11641 values of the current raster position. Integer values, if
11642 requested, are linearly mapped from the internal floating-point
11643 representation such that 1.0 returns the most positive
11644 representable integer value, and -1.0 returns the most negative
11645 representable integer value. The initial value is (1, 1, 1, 1).
11648 `GL_CURRENT_RASTER_DISTANCE'
11651 PARAMS returns one value, the distance from the eye to the current
11652 raster position. The initial value is 0. See `glRasterPos'.
11654 `GL_CURRENT_RASTER_INDEX'
11657 PARAMS returns one value, the color index of the current raster
11658 position. The initial value is 1. See `glRasterPos'.
11660 `GL_CURRENT_RASTER_POSITION'
11663 PARAMS returns four values: the X, Y, Z, and W components of the
11664 current raster position. X, Y, and Z are in window coordinates,
11665 and W is in clip coordinates. The initial value is (0, 0, 0, 1).
11668 `GL_CURRENT_RASTER_POSITION_VALID'
11671 PARAMS returns a single boolean value indicating whether the
11672 current raster position is valid. The initial value is `GL_TRUE'.
11675 `GL_CURRENT_RASTER_SECONDARY_COLOR'
11678 PARAMS returns four values: the red, green, blue, and alpha
11679 secondary color values of the current raster position. Integer
11680 values, if requested, are linearly mapped from the internal
11681 floating-point representation such that 1.0 returns the most
11682 positive representable integer value, and -1.0 returns the most
11683 negative representable integer value. The initial value is (1, 1,
11684 1, 1). See `glRasterPos'.
11686 `GL_CURRENT_RASTER_TEXTURE_COORDS'
11689 PARAMS returns four values: the S, T, R, and Q texture coordinates
11690 of the current raster position. The initial value is (0, 0, 0, 1).
11691 See `glRasterPos' and `glMultiTexCoord'.
11693 `GL_CURRENT_SECONDARY_COLOR'
11696 PARAMS returns four values: the red, green, blue, and alpha values
11697 of the current secondary color. Integer values, if requested, are
11698 linearly mapped from the internal floating-point representation
11699 such that 1.0 returns the most positive representable integer
11700 value, and -1.0 returns the most negative representable integer
11701 value. The initial value is (0, 0, 0, 0). See `glSecondaryColor'.
11703 `GL_CURRENT_TEXTURE_COORDS'
11706 PARAMS returns four values: the S, T, R, and Q current texture
11707 coordinates. The initial value is (0, 0, 0, 1). See
11713 PARAMS returns one value, the depth bias factor used during pixel
11714 transfers. The initial value is 0. See `glPixelTransfer'.
11719 PARAMS returns one value, the number of bitplanes in the depth
11722 `GL_DEPTH_CLEAR_VALUE'
11725 PARAMS returns one value, the value that is used to clear the depth
11726 buffer. Integer values, if requested, are linearly mapped from the
11727 internal floating-point representation such that 1.0 returns the
11728 most positive representable integer value, and -1.0 returns the
11729 most negative representable integer value. The initial value is 1.
11730 See `glClearDepth'.
11735 PARAMS returns one value, the symbolic constant that indicates the
11736 depth comparison function. The initial value is `GL_LESS'. See
11742 PARAMS returns two values: the near and far mapping limits for the
11743 depth buffer. Integer values, if requested, are linearly mapped
11744 from the internal floating-point representation such that 1.0
11745 returns the most positive representable integer value, and -1.0
11746 returns the most negative representable integer value. The initial
11747 value is (0, 1). See `glDepthRange'.
11752 PARAMS returns one value, the depth scale factor used during pixel
11753 transfers. The initial value is 1. See `glPixelTransfer'.
11758 PARAMS returns a single boolean value indicating whether depth
11759 testing of fragments is enabled. The initial value is `GL_FALSE'.
11760 See `glDepthFunc' and `glDepthRange'.
11762 `GL_DEPTH_WRITEMASK'
11765 PARAMS returns a single boolean value indicating if the depth
11766 buffer is enabled for writing. The initial value is `GL_TRUE'. See
11772 PARAMS returns a single boolean value indicating whether dithering
11773 of fragment colors and indices is enabled. The initial value is
11779 PARAMS returns a single boolean value indicating whether double
11780 buffering is supported.
11785 PARAMS returns one value, a symbolic constant indicating which
11786 buffers are being drawn to. See `glDrawBuffer'. The initial value
11787 is `GL_BACK' if there are back buffers, otherwise it is `GL_FRONT'.
11792 PARAMS returns one value, a symbolic constant indicating which
11793 buffers are being drawn to by the corresponding output color. See
11794 `glDrawBuffers'. The initial value of `GL_DRAW_BUFFER0' is
11795 `GL_BACK' if there are back buffers, otherwise it is `GL_FRONT'.
11796 The initial values of draw buffers for all other output colors is
11802 PARAMS returns a single boolean value indicating whether the
11803 current edge flag is `GL_TRUE' or `GL_FALSE'. The initial value is
11804 `GL_TRUE'. See `glEdgeFlag'.
11806 `GL_EDGE_FLAG_ARRAY'
11809 PARAMS returns a single boolean value indicating whether the edge
11810 flag array is enabled. The initial value is `GL_FALSE'. See
11811 `glEdgeFlagPointer'.
11813 `GL_EDGE_FLAG_ARRAY_BUFFER_BINDING'
11816 PARAMS returns a single value, the name of the buffer object
11817 associated with the edge flag array. This buffer object would have
11818 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
11819 recent call to `glEdgeFlagPointer'. If no buffer object was bound
11820 to this target, 0 is returned. The initial value is 0. See
11823 `GL_EDGE_FLAG_ARRAY_STRIDE'
11826 PARAMS returns one value, the byte offset between consecutive edge
11827 flags in the edge flag array. The initial value is 0. See
11828 `glEdgeFlagPointer'.
11830 `GL_ELEMENT_ARRAY_BUFFER_BINDING'
11833 PARAMS returns a single value, the name of the buffer object
11834 currently bound to the target `GL_ELEMENT_ARRAY_BUFFER'. If no
11835 buffer object is bound to this target, 0 is returned. The initial
11836 value is 0. See `glBindBuffer'.
11838 `GL_FEEDBACK_BUFFER_SIZE'
11841 PARAMS returns one value, the size of the feedback buffer. See
11842 `glFeedbackBuffer'.
11844 `GL_FEEDBACK_BUFFER_TYPE'
11847 PARAMS returns one value, the type of the feedback buffer. See
11848 `glFeedbackBuffer'.
11853 PARAMS returns a single boolean value indicating whether fogging is
11854 enabled. The initial value is `GL_FALSE'. See `glFog'.
11856 `GL_FOG_COORD_ARRAY'
11859 PARAMS returns a single boolean value indicating whether the fog
11860 coordinate array is enabled. The initial value is `GL_FALSE'. See
11861 `glFogCoordPointer'.
11863 `GL_FOG_COORD_ARRAY_BUFFER_BINDING'
11866 PARAMS returns a single value, the name of the buffer object
11867 associated with the fog coordinate array. This buffer object would
11868 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
11869 most recent call to `glFogCoordPointer'. If no buffer object was
11870 bound to this target, 0 is returned. The initial value is 0. See
11873 `GL_FOG_COORD_ARRAY_STRIDE'
11876 PARAMS returns one value, the byte offset between consecutive fog
11877 coordinates in the fog coordinate array. The initial value is 0.
11878 See `glFogCoordPointer'.
11880 `GL_FOG_COORD_ARRAY_TYPE'
11883 PARAMS returns one value, the type of the fog coordinate array. The
11884 initial value is `GL_FLOAT'. See `glFogCoordPointer'.
11889 PARAMS returns one value, a symbolic constant indicating the source
11890 of the fog coordinate. The initial value is `GL_FRAGMENT_DEPTH'.
11896 PARAMS returns four values: the red, green, blue, and alpha
11897 components of the fog color. Integer values, if requested, are
11898 linearly mapped from the internal floating-point representation
11899 such that 1.0 returns the most positive representable integer
11900 value, and -1.0 returns the most negative representable integer
11901 value. The initial value is (0, 0, 0, 0). See `glFog'.
11906 PARAMS returns one value, the fog density parameter. The initial
11907 value is 1. See `glFog'.
11912 PARAMS returns one value, the end factor for the linear fog
11913 equation. The initial value is 1. See `glFog'.
11918 PARAMS returns one value, a symbolic constant indicating the mode
11919 of the fog hint. The initial value is `GL_DONT_CARE'. See
11925 PARAMS returns one value, the fog color index. The initial value
11931 PARAMS returns one value, a symbolic constant indicating which fog
11932 equation is selected. The initial value is `GL_EXP'. See `glFog'.
11937 PARAMS returns one value, the start factor for the linear fog
11938 equation. The initial value is 0. See `glFog'.
11940 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT'
11943 PARAMS returns one value, a symbolic constant indicating the mode
11944 of the derivative accuracy hint for fragment shaders. The initial
11945 value is `GL_DONT_CARE'. See `glHint'.
11950 PARAMS returns one value, a symbolic constant indicating whether
11951 clockwise or counterclockwise polygon winding is treated as
11952 front-facing. The initial value is `GL_CCW'. See `glFrontFace'.
11954 `GL_GENERATE_MIPMAP_HINT'
11957 PARAMS returns one value, a symbolic constant indicating the mode
11958 of the mipmap generation filtering hint. The initial value is
11959 `GL_DONT_CARE'. See `glHint'.
11964 PARAMS returns one value, the green bias factor used during pixel
11965 transfers. The initial value is 0.
11970 PARAMS returns one value, the number of green bitplanes in each
11976 PARAMS returns one value, the green scale factor used during pixel
11977 transfers. The initial value is 1. See `glPixelTransfer'.
11982 PARAMS returns a single boolean value indicating whether histogram
11983 is enabled. The initial value is `GL_FALSE'. See `glHistogram'.
11988 PARAMS returns a single boolean value indicating whether the color
11989 index array is enabled. The initial value is `GL_FALSE'. See
11992 `GL_INDEX_ARRAY_BUFFER_BINDING'
11995 PARAMS returns a single value, the name of the buffer object
11996 associated with the color index array. This buffer object would
11997 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
11998 most recent call to `glIndexPointer'. If no buffer object was
11999 bound to this target, 0 is returned. The initial value is 0. See
12002 `GL_INDEX_ARRAY_STRIDE'
12005 PARAMS returns one value, the byte offset between consecutive color
12006 indexes in the color index array. The initial value is 0. See
12009 `GL_INDEX_ARRAY_TYPE'
12012 PARAMS returns one value, the data type of indexes in the color
12013 index array. The initial value is `GL_FLOAT'. See
12019 PARAMS returns one value, the number of bitplanes in each color
12022 `GL_INDEX_CLEAR_VALUE'
12025 PARAMS returns one value, the color index used to clear the color
12026 index buffers. The initial value is 0. See `glClearIndex'.
12028 `GL_INDEX_LOGIC_OP'
12031 PARAMS returns a single boolean value indicating whether a
12032 fragment's index values are merged into the framebuffer using a
12033 logical operation. The initial value is `GL_FALSE'. See
12039 PARAMS returns a single boolean value indicating whether the GL is
12040 in color index mode (`GL_TRUE') or RGBA mode (`GL_FALSE').
12045 PARAMS returns one value, the offset added to color and stencil
12046 indices during pixel transfers. The initial value is 0. See
12052 PARAMS returns one value, the amount that color and stencil indices
12053 are shifted during pixel transfers. The initial value is 0. See
12056 `GL_INDEX_WRITEMASK'
12059 PARAMS returns one value, a mask indicating which bitplanes of each
12060 color index buffer can be written. The initial value is all 1's.
12066 PARAMS returns a single boolean value indicating whether the
12067 specified light is enabled. The initial value is `GL_FALSE'. See
12068 `glLight' and `glLightModel'.
12073 PARAMS returns a single boolean value indicating whether lighting
12074 is enabled. The initial value is `GL_FALSE'. See `glLightModel'.
12076 `GL_LIGHT_MODEL_AMBIENT'
12079 PARAMS returns four values: the red, green, blue, and alpha
12080 components of the ambient intensity of the entire scene. Integer
12081 values, if requested, are linearly mapped from the internal
12082 floating-point representation such that 1.0 returns the most
12083 positive representable integer value, and -1.0 returns the most
12084 negative representable integer value. The initial value is (0.2,
12085 0.2, 0.2, 1.0). See `glLightModel'.
12087 `GL_LIGHT_MODEL_COLOR_CONTROL'
12090 PARAMS returns single enumerated value indicating whether specular
12091 reflection calculations are separated from normal lighting
12092 computations. The initial value is `GL_SINGLE_COLOR'.
12094 `GL_LIGHT_MODEL_LOCAL_VIEWER'
12097 PARAMS returns a single boolean value indicating whether specular
12098 reflection calculations treat the viewer as being local to the
12099 scene. The initial value is `GL_FALSE'. See `glLightModel'.
12101 `GL_LIGHT_MODEL_TWO_SIDE'
12104 PARAMS returns a single boolean value indicating whether separate
12105 materials are used to compute lighting for front- and back-facing
12106 polygons. The initial value is `GL_FALSE'. See `glLightModel'.
12111 PARAMS returns a single boolean value indicating whether
12112 antialiasing of lines is enabled. The initial value is `GL_FALSE'.
12115 `GL_LINE_SMOOTH_HINT'
12118 PARAMS returns one value, a symbolic constant indicating the mode
12119 of the line antialiasing hint. The initial value is
12120 `GL_DONT_CARE'. See `glHint'.
12125 PARAMS returns a single boolean value indicating whether stippling
12126 of lines is enabled. The initial value is `GL_FALSE'. See
12129 `GL_LINE_STIPPLE_PATTERN'
12132 PARAMS returns one value, the 16-bit line stipple pattern. The
12133 initial value is all 1's. See `glLineStipple'.
12135 `GL_LINE_STIPPLE_REPEAT'
12138 PARAMS returns one value, the line stipple repeat factor. The
12139 initial value is 1. See `glLineStipple'.
12144 PARAMS returns one value, the line width as specified with
12145 `glLineWidth'. The initial value is 1.
12147 `GL_LINE_WIDTH_GRANULARITY'
12150 PARAMS returns one value, the width difference between adjacent
12151 supported widths for antialiased lines. See `glLineWidth'.
12153 `GL_LINE_WIDTH_RANGE'
12156 PARAMS returns two values: the smallest and largest supported
12157 widths for antialiased lines. See `glLineWidth'.
12162 PARAMS returns one value, the base offset added to all names in
12163 arrays presented to `glCallLists'. The initial value is 0. See
12169 PARAMS returns one value, the name of the display list currently
12170 under construction. 0 is returned if no display list is currently
12171 under construction. The initial value is 0. See `glNewList'.
12176 PARAMS returns one value, a symbolic constant indicating the
12177 construction mode of the display list currently under construction.
12178 The initial value is 0. See `glNewList'.
12183 PARAMS returns one value, a symbolic constant indicating the
12184 selected logic operation mode. The initial value is `GL_COPY'. See
12190 PARAMS returns a single boolean value indicating whether 1D
12191 evaluation generates colors. The initial value is `GL_FALSE'. See
12194 `GL_MAP1_GRID_DOMAIN'
12197 PARAMS returns two values: the endpoints of the 1D map's grid
12198 domain. The initial value is (0, 1). See `glMapGrid'.
12200 `GL_MAP1_GRID_SEGMENTS'
12203 PARAMS returns one value, the number of partitions in the 1D map's
12204 grid domain. The initial value is 1. See `glMapGrid'.
12209 PARAMS returns a single boolean value indicating whether 1D
12210 evaluation generates color indices. The initial value is
12211 `GL_FALSE'. See `glMap1'.
12216 PARAMS returns a single boolean value indicating whether 1D
12217 evaluation generates normals. The initial value is `GL_FALSE'. See
12220 `GL_MAP1_TEXTURE_COORD_1'
12223 PARAMS returns a single boolean value indicating whether 1D
12224 evaluation generates 1D texture coordinates. The initial value is
12225 `GL_FALSE'. See `glMap1'.
12227 `GL_MAP1_TEXTURE_COORD_2'
12230 PARAMS returns a single boolean value indicating whether 1D
12231 evaluation generates 2D texture coordinates. The initial value is
12232 `GL_FALSE'. See `glMap1'.
12234 `GL_MAP1_TEXTURE_COORD_3'
12237 PARAMS returns a single boolean value indicating whether 1D
12238 evaluation generates 3D texture coordinates. The initial value is
12239 `GL_FALSE'. See `glMap1'.
12241 `GL_MAP1_TEXTURE_COORD_4'
12244 PARAMS returns a single boolean value indicating whether 1D
12245 evaluation generates 4D texture coordinates. The initial value is
12246 `GL_FALSE'. See `glMap1'.
12251 PARAMS returns a single boolean value indicating whether 1D
12252 evaluation generates 3D vertex coordinates. The initial value is
12253 `GL_FALSE'. See `glMap1'.
12258 PARAMS returns a single boolean value indicating whether 1D
12259 evaluation generates 4D vertex coordinates. The initial value is
12260 `GL_FALSE'. See `glMap1'.
12265 PARAMS returns a single boolean value indicating whether 2D
12266 evaluation generates colors. The initial value is `GL_FALSE'. See
12269 `GL_MAP2_GRID_DOMAIN'
12272 PARAMS returns four values: the endpoints of the 2D map's I and J
12273 grid domains. The initial value is (0,1; 0,1). See `glMapGrid'.
12275 `GL_MAP2_GRID_SEGMENTS'
12278 PARAMS returns two values: the number of partitions in the 2D map's
12279 I and J grid domains. The initial value is (1,1). See
12285 PARAMS returns a single boolean value indicating whether 2D
12286 evaluation generates color indices. The initial value is
12287 `GL_FALSE'. See `glMap2'.
12292 PARAMS returns a single boolean value indicating whether 2D
12293 evaluation generates normals. The initial value is `GL_FALSE'. See
12296 `GL_MAP2_TEXTURE_COORD_1'
12299 PARAMS returns a single boolean value indicating whether 2D
12300 evaluation generates 1D texture coordinates. The initial value is
12301 `GL_FALSE'. See `glMap2'.
12303 `GL_MAP2_TEXTURE_COORD_2'
12306 PARAMS returns a single boolean value indicating whether 2D
12307 evaluation generates 2D texture coordinates. The initial value is
12308 `GL_FALSE'. See `glMap2'.
12310 `GL_MAP2_TEXTURE_COORD_3'
12313 PARAMS returns a single boolean value indicating whether 2D
12314 evaluation generates 3D texture coordinates. The initial value is
12315 `GL_FALSE'. See `glMap2'.
12317 `GL_MAP2_TEXTURE_COORD_4'
12320 PARAMS returns a single boolean value indicating whether 2D
12321 evaluation generates 4D texture coordinates. The initial value is
12322 `GL_FALSE'. See `glMap2'.
12327 PARAMS returns a single boolean value indicating whether 2D
12328 evaluation generates 3D vertex coordinates. The initial value is
12329 `GL_FALSE'. See `glMap2'.
12334 PARAMS returns a single boolean value indicating whether 2D
12335 evaluation generates 4D vertex coordinates. The initial value is
12336 `GL_FALSE'. See `glMap2'.
12341 PARAMS returns a single boolean value indicating if colors and
12342 color indices are to be replaced by table lookup during pixel
12343 transfers. The initial value is `GL_FALSE'. See
12349 PARAMS returns a single boolean value indicating if stencil indices
12350 are to be replaced by table lookup during pixel transfers. The
12351 initial value is `GL_FALSE'. See `glPixelTransfer'.
12356 PARAMS returns one value, a symbolic constant indicating which
12357 matrix stack is currently the target of all matrix operations. The
12358 initial value is `GL_MODELVIEW'. See `glMatrixMode'.
12360 `GL_MAX_3D_TEXTURE_SIZE'
12363 PARAMS returns one value, a rough estimate of the largest 3D
12364 texture that the GL can handle. The value must be at least 16. If
12365 the GL version is 1.2 or greater, use `GL_PROXY_TEXTURE_3D' to
12366 determine if a texture is too large. See `glTexImage3D'.
12368 `GL_MAX_CLIENT_ATTRIB_STACK_DEPTH'
12371 PARAMS returns one value indicating the maximum supported depth of
12372 the client attribute stack. See `glPushClientAttrib'.
12374 `GL_MAX_ATTRIB_STACK_DEPTH'
12377 PARAMS returns one value, the maximum supported depth of the
12378 attribute stack. The value must be at least 16. See
12381 `GL_MAX_CLIP_PLANES'
12384 PARAMS returns one value, the maximum number of application-defined
12385 clipping planes. The value must be at least 6. See `glClipPlane'.
12387 `GL_MAX_COLOR_MATRIX_STACK_DEPTH'
12390 PARAMS returns one value, the maximum supported depth of the color
12391 matrix stack. The value must be at least 2. See `glPushMatrix'.
12393 `GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS'
12396 PARAMS returns one value, the maximum supported texture image units
12397 that can be used to access texture maps from the vertex shader and
12398 the fragment processor combined. If both the vertex shader and the
12399 fragment processing stage access the same texture image unit, then
12400 that counts as using two texture image units against this limit.
12401 The value must be at least 2. See `glActiveTexture'.
12403 `GL_MAX_CUBE_MAP_TEXTURE_SIZE'
12406 PARAMS returns one value. The value gives a rough estimate of the
12407 largest cube-map texture that the GL can handle. The value must be
12408 at least 16. If the GL version is 1.3 or greater, use
12409 `GL_PROXY_TEXTURE_CUBE_MAP' to determine if a texture is too large.
12410 See `glTexImage2D'.
12412 `GL_MAX_DRAW_BUFFERS'
12415 PARAMS returns one value, the maximum number of simultaneous output
12416 colors allowed from a fragment shader using the `gl_FragData'
12417 built-in array. The value must be at least 1. See
12420 `GL_MAX_ELEMENTS_INDICES'
12423 PARAMS returns one value, the recommended maximum number of vertex
12424 array indices. See `glDrawRangeElements'.
12426 `GL_MAX_ELEMENTS_VERTICES'
12429 PARAMS returns one value, the recommended maximum number of vertex
12430 array vertices. See `glDrawRangeElements'.
12432 `GL_MAX_EVAL_ORDER'
12435 PARAMS returns one value, the maximum equation order supported by
12436 1D and 2D evaluators. The value must be at least 8. See `glMap1'
12439 `GL_MAX_FRAGMENT_UNIFORM_COMPONENTS'
12442 PARAMS returns one value, the maximum number of individual
12443 floating-point, integer, or boolean values that can be held in
12444 uniform variable storage for a fragment shader. The value must be
12445 at least 64. See `glUniform'.
12450 PARAMS returns one value, the maximum number of lights. The value
12451 must be at least 8. See `glLight'.
12453 `GL_MAX_LIST_NESTING'
12456 PARAMS returns one value, the maximum recursion depth allowed
12457 during display-list traversal. The value must be at least 64. See
12460 `GL_MAX_MODELVIEW_STACK_DEPTH'
12463 PARAMS returns one value, the maximum supported depth of the
12464 modelview matrix stack. The value must be at least 32. See
12467 `GL_MAX_NAME_STACK_DEPTH'
12470 PARAMS returns one value, the maximum supported depth of the
12471 selection name stack. The value must be at least 64. See
12474 `GL_MAX_PIXEL_MAP_TABLE'
12477 PARAMS returns one value, the maximum supported size of a
12478 `glPixelMap' lookup table. The value must be at least 32. See
12481 `GL_MAX_PROJECTION_STACK_DEPTH'
12484 PARAMS returns one value, the maximum supported depth of the
12485 projection matrix stack. The value must be at least 2. See
12488 `GL_MAX_TEXTURE_COORDS'
12491 PARAMS returns one value, the maximum number of texture coordinate
12492 sets available to vertex and fragment shaders. The value must be
12493 at least 2. See `glActiveTexture' and `glClientActiveTexture'.
12495 `GL_MAX_TEXTURE_IMAGE_UNITS'
12498 PARAMS returns one value, the maximum supported texture image units
12499 that can be used to access texture maps from the fragment shader.
12500 The value must be at least 2. See `glActiveTexture'.
12502 `GL_MAX_TEXTURE_LOD_BIAS'
12505 PARAMS returns one value, the maximum, absolute value of the
12506 texture level-of-detail bias. The value must be at least 4.
12508 `GL_MAX_TEXTURE_SIZE'
12511 PARAMS returns one value. The value gives a rough estimate of the
12512 largest texture that the GL can handle. The value must be at least
12513 64. If the GL version is 1.1 or greater, use `GL_PROXY_TEXTURE_1D'
12514 or `GL_PROXY_TEXTURE_2D' to determine if a texture is too large.
12515 See `glTexImage1D' and `glTexImage2D'.
12517 `GL_MAX_TEXTURE_STACK_DEPTH'
12520 PARAMS returns one value, the maximum supported depth of the
12521 texture matrix stack. The value must be at least 2. See
12524 `GL_MAX_TEXTURE_UNITS'
12527 PARAMS returns a single value indicating the number of conventional
12528 texture units supported. Each conventional texture unit includes
12529 both a texture coordinate set and a texture image unit.
12530 Conventional texture units may be used for fixed-function
12531 (non-shader) rendering. The value must be at least 2. Additional
12532 texture coordinate sets and texture image units may be accessed
12533 from vertex and fragment shaders. See `glActiveTexture' and
12534 `glClientActiveTexture'.
12536 `GL_MAX_VARYING_FLOATS'
12539 PARAMS returns one value, the maximum number of interpolators
12540 available for processing varying variables used by vertex and
12541 fragment shaders. This value represents the number of individual
12542 floating-point values that can be interpolated; varying variables
12543 declared as vectors, matrices, and arrays will all consume multiple
12544 interpolators. The value must be at least 32.
12546 `GL_MAX_VERTEX_ATTRIBS'
12549 PARAMS returns one value, the maximum number of 4-component generic
12550 vertex attributes accessible to a vertex shader. The value must be
12551 at least 16. See `glVertexAttrib'.
12553 `GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS'
12556 PARAMS returns one value, the maximum supported texture image units
12557 that can be used to access texture maps from the vertex shader. The
12558 value may be 0. See `glActiveTexture'.
12560 `GL_MAX_VERTEX_UNIFORM_COMPONENTS'
12563 PARAMS returns one value, the maximum number of individual
12564 floating-point, integer, or boolean values that can be held in
12565 uniform variable storage for a vertex shader. The value must be at
12566 least 512. See `glUniform'.
12568 `GL_MAX_VIEWPORT_DIMS'
12571 PARAMS returns two values: the maximum supported width and height
12572 of the viewport. These must be at least as large as the visible
12573 dimensions of the display being rendered to. See `glViewport'.
12578 PARAMS returns a single boolean value indicating whether pixel
12579 minmax values are computed. The initial value is `GL_FALSE'. See
12582 `GL_MODELVIEW_MATRIX'
12585 PARAMS returns sixteen values: the modelview matrix on the top of
12586 the modelview matrix stack. Initially this matrix is the identity
12587 matrix. See `glPushMatrix'.
12589 `GL_MODELVIEW_STACK_DEPTH'
12592 PARAMS returns one value, the number of matrices on the modelview
12593 matrix stack. The initial value is 1. See `glPushMatrix'.
12595 `GL_NAME_STACK_DEPTH'
12598 PARAMS returns one value, the number of names on the selection name
12599 stack. The initial value is 0. See `glPushName'.
12604 PARAMS returns a single boolean value, indicating whether the
12605 normal array is enabled. The initial value is `GL_FALSE'. See
12608 `GL_NORMAL_ARRAY_BUFFER_BINDING'
12611 PARAMS returns a single value, the name of the buffer object
12612 associated with the normal array. This buffer object would have
12613 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
12614 recent call to `glNormalPointer'. If no buffer object was bound to
12615 this target, 0 is returned. The initial value is 0. See
12618 `GL_NORMAL_ARRAY_STRIDE'
12621 PARAMS returns one value, the byte offset between consecutive
12622 normals in the normal array. The initial value is 0. See
12625 `GL_NORMAL_ARRAY_TYPE'
12628 PARAMS returns one value, the data type of each coordinate in the
12629 normal array. The initial value is `GL_FLOAT'. See
12635 PARAMS returns a single boolean value indicating whether normals
12636 are automatically scaled to unit length after they have been
12637 transformed to eye coordinates. The initial value is `GL_FALSE'.
12640 `GL_NUM_COMPRESSED_TEXTURE_FORMATS'
12643 PARAMS returns a single integer value indicating the number of
12644 available compressed texture formats. The minimum value is 0. See
12645 `glCompressedTexImage2D'.
12647 `GL_PACK_ALIGNMENT'
12650 PARAMS returns one value, the byte alignment used for writing pixel
12651 data to memory. The initial value is 4. See `glPixelStore'.
12653 `GL_PACK_IMAGE_HEIGHT'
12656 PARAMS returns one value, the image height used for writing pixel
12657 data to memory. The initial value is 0. See `glPixelStore'.
12659 `GL_PACK_LSB_FIRST'
12662 PARAMS returns a single boolean value indicating whether single-bit
12663 pixels being written to memory are written first to the least
12664 significant bit of each unsigned byte. The initial value is
12665 `GL_FALSE'. See `glPixelStore'.
12667 `GL_PACK_ROW_LENGTH'
12670 PARAMS returns one value, the row length used for writing pixel
12671 data to memory. The initial value is 0. See `glPixelStore'.
12673 `GL_PACK_SKIP_IMAGES'
12676 PARAMS returns one value, the number of pixel images skipped before
12677 the first pixel is written into memory. The initial value is 0.
12678 See `glPixelStore'.
12680 `GL_PACK_SKIP_PIXELS'
12683 PARAMS returns one value, the number of pixel locations skipped
12684 before the first pixel is written into memory. The initial value
12685 is 0. See `glPixelStore'.
12687 `GL_PACK_SKIP_ROWS'
12690 PARAMS returns one value, the number of rows of pixel locations
12691 skipped before the first pixel is written into memory. The initial
12692 value is 0. See `glPixelStore'.
12694 `GL_PACK_SWAP_BYTES'
12697 PARAMS returns a single boolean value indicating whether the bytes
12698 of two-byte and four-byte pixel indices and components are swapped
12699 before being written to memory. The initial value is `GL_FALSE'.
12700 See `glPixelStore'.
12702 `GL_PERSPECTIVE_CORRECTION_HINT'
12705 PARAMS returns one value, a symbolic constant indicating the mode
12706 of the perspective correction hint. The initial value is
12707 `GL_DONT_CARE'. See `glHint'.
12709 `GL_PIXEL_MAP_A_TO_A_SIZE'
12712 PARAMS returns one value, the size of the alpha-to-alpha pixel
12713 translation table. The initial value is 1. See `glPixelMap'.
12715 `GL_PIXEL_MAP_B_TO_B_SIZE'
12718 PARAMS returns one value, the size of the blue-to-blue pixel
12719 translation table. The initial value is 1. See `glPixelMap'.
12721 `GL_PIXEL_MAP_G_TO_G_SIZE'
12724 PARAMS returns one value, the size of the green-to-green pixel
12725 translation table. The initial value is 1. See `glPixelMap'.
12727 `GL_PIXEL_MAP_I_TO_A_SIZE'
12730 PARAMS returns one value, the size of the index-to-alpha pixel
12731 translation table. The initial value is 1. See `glPixelMap'.
12733 `GL_PIXEL_MAP_I_TO_B_SIZE'
12736 PARAMS returns one value, the size of the index-to-blue pixel
12737 translation table. The initial value is 1. See `glPixelMap'.
12739 `GL_PIXEL_MAP_I_TO_G_SIZE'
12742 PARAMS returns one value, the size of the index-to-green pixel
12743 translation table. The initial value is 1. See `glPixelMap'.
12745 `GL_PIXEL_MAP_I_TO_I_SIZE'
12748 PARAMS returns one value, the size of the index-to-index pixel
12749 translation table. The initial value is 1. See `glPixelMap'.
12751 `GL_PIXEL_MAP_I_TO_R_SIZE'
12754 PARAMS returns one value, the size of the index-to-red pixel
12755 translation table. The initial value is 1. See `glPixelMap'.
12757 `GL_PIXEL_MAP_R_TO_R_SIZE'
12760 PARAMS returns one value, the size of the red-to-red pixel
12761 translation table. The initial value is 1. See `glPixelMap'.
12763 `GL_PIXEL_MAP_S_TO_S_SIZE'
12766 PARAMS returns one value, the size of the stencil-to-stencil pixel
12767 translation table. The initial value is 1. See `glPixelMap'.
12769 `GL_PIXEL_PACK_BUFFER_BINDING'
12772 PARAMS returns a single value, the name of the buffer object
12773 currently bound to the target `GL_PIXEL_PACK_BUFFER'. If no buffer
12774 object is bound to this target, 0 is returned. The initial value
12775 is 0. See `glBindBuffer'.
12777 `GL_PIXEL_UNPACK_BUFFER_BINDING'
12780 PARAMS returns a single value, the name of the buffer object
12781 currently bound to the target `GL_PIXEL_UNPACK_BUFFER'. If no
12782 buffer object is bound to this target, 0 is returned. The initial
12783 value is 0. See `glBindBuffer'.
12785 `GL_POINT_DISTANCE_ATTENUATION'
12788 PARAMS returns three values, the coefficients for computing the
12789 attenuation value for points. See `glPointParameter'.
12791 `GL_POINT_FADE_THRESHOLD_SIZE'
12794 PARAMS returns one value, the point size threshold for determining
12795 the point size. See `glPointParameter'.
12800 PARAMS returns one value, the point size as specified by
12801 `glPointSize'. The initial value is 1.
12803 `GL_POINT_SIZE_GRANULARITY'
12806 PARAMS returns one value, the size difference between adjacent
12807 supported sizes for antialiased points. See `glPointSize'.
12809 `GL_POINT_SIZE_MAX'
12812 PARAMS returns one value, the upper bound for the attenuated point
12813 sizes. The initial value is 0.0. See `glPointParameter'.
12815 `GL_POINT_SIZE_MIN'
12818 PARAMS returns one value, the lower bound for the attenuated point
12819 sizes. The initial value is 1.0. See `glPointParameter'.
12821 `GL_POINT_SIZE_RANGE'
12824 PARAMS returns two values: the smallest and largest supported sizes
12825 for antialiased points. The smallest size must be at most 1, and
12826 the largest size must be at least 1. See `glPointSize'.
12831 PARAMS returns a single boolean value indicating whether
12832 antialiasing of points is enabled. The initial value is
12833 `GL_FALSE'. See `glPointSize'.
12835 `GL_POINT_SMOOTH_HINT'
12838 PARAMS returns one value, a symbolic constant indicating the mode
12839 of the point antialiasing hint. The initial value is
12840 `GL_DONT_CARE'. See `glHint'.
12845 PARAMS returns a single boolean value indicating whether point
12846 sprite is enabled. The initial value is `GL_FALSE'.
12851 PARAMS returns two values: symbolic constants indicating whether
12852 front-facing and back-facing polygons are rasterized as points,
12853 lines, or filled polygons. The initial value is `GL_FILL'. See
12856 `GL_POLYGON_OFFSET_FACTOR'
12859 PARAMS returns one value, the scaling factor used to determine the
12860 variable offset that is added to the depth value of each fragment
12861 generated when a polygon is rasterized. The initial value is 0.
12862 See `glPolygonOffset'.
12864 `GL_POLYGON_OFFSET_UNITS'
12867 PARAMS returns one value. This value is multiplied by an
12868 implementation-specific value and then added to the depth value of
12869 each fragment generated when a polygon is rasterized. The initial
12870 value is 0. See `glPolygonOffset'.
12872 `GL_POLYGON_OFFSET_FILL'
12875 PARAMS returns a single boolean value indicating whether polygon
12876 offset is enabled for polygons in fill mode. The initial value is
12877 `GL_FALSE'. See `glPolygonOffset'.
12879 `GL_POLYGON_OFFSET_LINE'
12882 PARAMS returns a single boolean value indicating whether polygon
12883 offset is enabled for polygons in line mode. The initial value is
12884 `GL_FALSE'. See `glPolygonOffset'.
12886 `GL_POLYGON_OFFSET_POINT'
12889 PARAMS returns a single boolean value indicating whether polygon
12890 offset is enabled for polygons in point mode. The initial value is
12891 `GL_FALSE'. See `glPolygonOffset'.
12893 `GL_POLYGON_SMOOTH'
12896 PARAMS returns a single boolean value indicating whether
12897 antialiasing of polygons is enabled. The initial value is
12898 `GL_FALSE'. See `glPolygonMode'.
12900 `GL_POLYGON_SMOOTH_HINT'
12903 PARAMS returns one value, a symbolic constant indicating the mode
12904 of the polygon antialiasing hint. The initial value is
12905 `GL_DONT_CARE'. See `glHint'.
12907 `GL_POLYGON_STIPPLE'
12910 PARAMS returns a single boolean value indicating whether polygon
12911 stippling is enabled. The initial value is `GL_FALSE'. See
12912 `glPolygonStipple'.
12914 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
12917 PARAMS returns a single boolean value indicating whether post color
12918 matrix transformation lookup is enabled. The initial value is
12919 `GL_FALSE'. See `glColorTable'.
12921 `GL_POST_COLOR_MATRIX_RED_BIAS'
12924 PARAMS returns one value, the red bias factor applied to RGBA
12925 fragments after color matrix transformations. The initial value is
12926 0. See `glPixelTransfer'.
12928 `GL_POST_COLOR_MATRIX_GREEN_BIAS'
12931 PARAMS returns one value, the green bias factor applied to RGBA
12932 fragments after color matrix transformations. The initial value is
12933 0. See `glPixelTransfer'
12935 `GL_POST_COLOR_MATRIX_BLUE_BIAS'
12938 PARAMS returns one value, the blue bias factor applied to RGBA
12939 fragments after color matrix transformations. The initial value is
12940 0. See `glPixelTransfer'.
12942 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'
12945 PARAMS returns one value, the alpha bias factor applied to RGBA
12946 fragments after color matrix transformations. The initial value is
12947 0. See `glPixelTransfer'.
12949 `GL_POST_COLOR_MATRIX_RED_SCALE'
12952 PARAMS returns one value, the red scale factor applied to RGBA
12953 fragments after color matrix transformations. The initial value is
12954 1. See `glPixelTransfer'.
12956 `GL_POST_COLOR_MATRIX_GREEN_SCALE'
12959 PARAMS returns one value, the green scale factor applied to RGBA
12960 fragments after color matrix transformations. The initial value is
12961 1. See `glPixelTransfer'.
12963 `GL_POST_COLOR_MATRIX_BLUE_SCALE'
12966 PARAMS returns one value, the blue scale factor applied to RGBA
12967 fragments after color matrix transformations. The initial value is
12968 1. See `glPixelTransfer'.
12970 `GL_POST_COLOR_MATRIX_ALPHA_SCALE'
12973 PARAMS returns one value, the alpha scale factor applied to RGBA
12974 fragments after color matrix transformations. The initial value is
12975 1. See `glPixelTransfer'.
12977 `GL_POST_CONVOLUTION_COLOR_TABLE'
12980 PARAMS returns a single boolean value indicating whether post
12981 convolution lookup is enabled. The initial value is `GL_FALSE'.
12982 See `glColorTable'.
12984 `GL_POST_CONVOLUTION_RED_BIAS'
12987 PARAMS returns one value, the red bias factor applied to RGBA
12988 fragments after convolution. The initial value is 0. See
12991 `GL_POST_CONVOLUTION_GREEN_BIAS'
12994 PARAMS returns one value, the green bias factor applied to RGBA
12995 fragments after convolution. The initial value is 0. See
12998 `GL_POST_CONVOLUTION_BLUE_BIAS'
13001 PARAMS returns one value, the blue bias factor applied to RGBA
13002 fragments after convolution. The initial value is 0. See
13005 `GL_POST_CONVOLUTION_ALPHA_BIAS'
13008 PARAMS returns one value, the alpha bias factor applied to RGBA
13009 fragments after convolution. The initial value is 0. See
13012 `GL_POST_CONVOLUTION_RED_SCALE'
13015 PARAMS returns one value, the red scale factor applied to RGBA
13016 fragments after convolution. The initial value is 1. See
13019 `GL_POST_CONVOLUTION_GREEN_SCALE'
13022 PARAMS returns one value, the green scale factor applied to RGBA
13023 fragments after convolution. The initial value is 1. See
13026 `GL_POST_CONVOLUTION_BLUE_SCALE'
13029 PARAMS returns one value, the blue scale factor applied to RGBA
13030 fragments after convolution. The initial value is 1. See
13033 `GL_POST_CONVOLUTION_ALPHA_SCALE'
13036 PARAMS returns one value, the alpha scale factor applied to RGBA
13037 fragments after convolution. The initial value is 1. See
13040 `GL_PROJECTION_MATRIX'
13043 PARAMS returns sixteen values: the projection matrix on the top of
13044 the projection matrix stack. Initially this matrix is the identity
13045 matrix. See `glPushMatrix'.
13047 `GL_PROJECTION_STACK_DEPTH'
13050 PARAMS returns one value, the number of matrices on the projection
13051 matrix stack. The initial value is 1. See `glPushMatrix'.
13056 PARAMS returns one value, a symbolic constant indicating which
13057 color buffer is selected for reading. The initial value is
13058 `GL_BACK' if there is a back buffer, otherwise it is `GL_FRONT'.
13059 See `glReadPixels' and `glAccum'.
13064 PARAMS returns one value, the red bias factor used during pixel
13065 transfers. The initial value is 0.
13070 PARAMS returns one value, the number of red bitplanes in each color
13076 PARAMS returns one value, the red scale factor used during pixel
13077 transfers. The initial value is 1. See `glPixelTransfer'.
13082 PARAMS returns one value, a symbolic constant indicating whether
13083 the GL is in render, select, or feedback mode. The initial value
13084 is `GL_RENDER'. See `glRenderMode'.
13086 `GL_RESCALE_NORMAL'
13089 PARAMS returns single boolean value indicating whether normal
13090 rescaling is enabled. See `glEnable'.
13095 PARAMS returns a single boolean value indicating whether the GL is
13096 in RGBA mode (true) or color index mode (false). See `glColor'.
13098 `GL_SAMPLE_BUFFERS'
13101 PARAMS returns a single integer value indicating the number of
13102 sample buffers associated with the framebuffer. See
13103 `glSampleCoverage'.
13105 `GL_SAMPLE_COVERAGE_VALUE'
13108 PARAMS returns a single positive floating-point value indicating
13109 the current sample coverage value. See `glSampleCoverage'.
13111 `GL_SAMPLE_COVERAGE_INVERT'
13114 PARAMS returns a single boolean value indicating if the temporary
13115 coverage value should be inverted. See `glSampleCoverage'.
13120 PARAMS returns a single integer value indicating the coverage mask
13121 size. See `glSampleCoverage'.
13126 PARAMS returns four values: the X and Y window coordinates of the
13127 scissor box, followed by its width and height. Initially the X and
13128 Y window coordinates are both 0 and the width and height are set to
13129 the size of the window. See `glScissor'.
13134 PARAMS returns a single boolean value indicating whether scissoring
13135 is enabled. The initial value is `GL_FALSE'. See `glScissor'.
13137 `GL_SECONDARY_COLOR_ARRAY'
13140 PARAMS returns a single boolean value indicating whether the
13141 secondary color array is enabled. The initial value is `GL_FALSE'.
13142 See `glSecondaryColorPointer'.
13144 `GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING'
13147 PARAMS returns a single value, the name of the buffer object
13148 associated with the secondary color array. This buffer object
13149 would have been bound to the target `GL_ARRAY_BUFFER' at the time
13150 of the most recent call to `glSecondaryColorPointer'. If no buffer
13151 object was bound to this target, 0 is returned. The initial value
13152 is 0. See `glBindBuffer'.
13154 `GL_SECONDARY_COLOR_ARRAY_SIZE'
13157 PARAMS returns one value, the number of components per color in the
13158 secondary color array. The initial value is 3. See
13159 `glSecondaryColorPointer'.
13161 `GL_SECONDARY_COLOR_ARRAY_STRIDE'
13164 PARAMS returns one value, the byte offset between consecutive
13165 colors in the secondary color array. The initial value is 0. See
13166 `glSecondaryColorPointer'.
13168 `GL_SECONDARY_COLOR_ARRAY_TYPE'
13171 PARAMS returns one value, the data type of each component in the
13172 secondary color array. The initial value is `GL_FLOAT'. See
13173 `glSecondaryColorPointer'.
13175 `GL_SELECTION_BUFFER_SIZE'
13178 PARAMS return one value, the size of the selection buffer. See
13184 PARAMS returns a single boolean value indicating whether 2D
13185 separable convolution is enabled. The initial value is `GL_FALSE'.
13186 See `glSeparableFilter2D'.
13191 PARAMS returns one value, a symbolic constant indicating whether
13192 the shading mode is flat or smooth. The initial value is
13193 `GL_SMOOTH'. See `glShadeModel'.
13195 `GL_SMOOTH_LINE_WIDTH_RANGE'
13198 PARAMS returns two values, the smallest and largest supported
13199 widths for antialiased lines. See `glLineWidth'.
13201 `GL_SMOOTH_LINE_WIDTH_GRANULARITY'
13204 PARAMS returns one value, the granularity of widths for antialiased
13205 lines. See `glLineWidth'.
13207 `GL_SMOOTH_POINT_SIZE_RANGE'
13210 PARAMS returns two values, the smallest and largest supported
13211 widths for antialiased points. See `glPointSize'.
13213 `GL_SMOOTH_POINT_SIZE_GRANULARITY'
13216 PARAMS returns one value, the granularity of sizes for antialiased
13217 points. See `glPointSize'.
13219 `GL_STENCIL_BACK_FAIL'
13222 PARAMS returns one value, a symbolic constant indicating what
13223 action is taken for back-facing polygons when the stencil test
13224 fails. The initial value is `GL_KEEP'. See `glStencilOpSeparate'.
13226 `GL_STENCIL_BACK_FUNC'
13229 PARAMS returns one value, a symbolic constant indicating what
13230 function is used for back-facing polygons to compare the stencil
13231 reference value with the stencil buffer value. The initial value
13232 is `GL_ALWAYS'. See `glStencilFuncSeparate'.
13234 `GL_STENCIL_BACK_PASS_DEPTH_FAIL'
13237 PARAMS returns one value, a symbolic constant indicating what
13238 action is taken for back-facing polygons when the stencil test
13239 passes, but the depth test fails. The initial value is `GL_KEEP'.
13240 See `glStencilOpSeparate'.
13242 `GL_STENCIL_BACK_PASS_DEPTH_PASS'
13245 PARAMS returns one value, a symbolic constant indicating what
13246 action is taken for back-facing polygons when the stencil test
13247 passes and the depth test passes. The initial value is `GL_KEEP'.
13248 See `glStencilOpSeparate'.
13250 `GL_STENCIL_BACK_REF'
13253 PARAMS returns one value, the reference value that is compared with
13254 the contents of the stencil buffer for back-facing polygons. The
13255 initial value is 0. See `glStencilFuncSeparate'.
13257 `GL_STENCIL_BACK_VALUE_MASK'
13260 PARAMS returns one value, the mask that is used for back-facing
13261 polygons to mask both the stencil reference value and the stencil
13262 buffer value before they are compared. The initial value is all
13263 1's. See `glStencilFuncSeparate'.
13265 `GL_STENCIL_BACK_WRITEMASK'
13268 PARAMS returns one value, the mask that controls writing of the
13269 stencil bitplanes for back-facing polygons. The initial value is
13270 all 1's. See `glStencilMaskSeparate'.
13275 PARAMS returns one value, the number of bitplanes in the stencil
13278 `GL_STENCIL_CLEAR_VALUE'
13281 PARAMS returns one value, the index to which the stencil bitplanes
13282 are cleared. The initial value is 0. See `glClearStencil'.
13287 PARAMS returns one value, a symbolic constant indicating what
13288 action is taken when the stencil test fails. The initial value is
13289 `GL_KEEP'. See `glStencilOp'. If the GL version is 2.0 or
13290 greater, this stencil state only affects non-polygons and
13291 front-facing polygons. Back-facing polygons use separate stencil
13292 state. See `glStencilOpSeparate'.
13297 PARAMS returns one value, a symbolic constant indicating what
13298 function is used to compare the stencil reference value with the
13299 stencil buffer value. The initial value is `GL_ALWAYS'. See
13300 `glStencilFunc'. If the GL version is 2.0 or greater, this stencil
13301 state only affects non-polygons and front-facing polygons.
13302 Back-facing polygons use separate stencil state. See
13303 `glStencilFuncSeparate'.
13305 `GL_STENCIL_PASS_DEPTH_FAIL'
13308 PARAMS returns one value, a symbolic constant indicating what
13309 action is taken when the stencil test passes, but the depth test
13310 fails. The initial value is `GL_KEEP'. See `glStencilOp'. If the
13311 GL version is 2.0 or greater, this stencil state only affects
13312 non-polygons and front-facing polygons. Back-facing polygons use
13313 separate stencil state. See `glStencilOpSeparate'.
13315 `GL_STENCIL_PASS_DEPTH_PASS'
13318 PARAMS returns one value, a symbolic constant indicating what
13319 action is taken when the stencil test passes and the depth test
13320 passes. The initial value is `GL_KEEP'. See `glStencilOp'. If
13321 the GL version is 2.0 or greater, this stencil state only affects
13322 non-polygons and front-facing polygons. Back-facing polygons use
13323 separate stencil state. See `glStencilOpSeparate'.
13328 PARAMS returns one value, the reference value that is compared with
13329 the contents of the stencil buffer. The initial value is 0. See
13330 `glStencilFunc'. If the GL version is 2.0 or greater, this stencil
13331 state only affects non-polygons and front-facing polygons.
13332 Back-facing polygons use separate stencil state. See
13333 `glStencilFuncSeparate'.
13338 PARAMS returns a single boolean value indicating whether stencil
13339 testing of fragments is enabled. The initial value is `GL_FALSE'.
13340 See `glStencilFunc' and `glStencilOp'.
13342 `GL_STENCIL_VALUE_MASK'
13345 PARAMS returns one value, the mask that is used to mask both the
13346 stencil reference value and the stencil buffer value before they
13347 are compared. The initial value is all 1's. See `glStencilFunc'.
13348 If the GL version is 2.0 or greater, this stencil state only
13349 affects non-polygons and front-facing polygons. Back-facing
13350 polygons use separate stencil state. See `glStencilFuncSeparate'.
13352 `GL_STENCIL_WRITEMASK'
13355 PARAMS returns one value, the mask that controls writing of the
13356 stencil bitplanes. The initial value is all 1's. See
13357 `glStencilMask'. If the GL version is 2.0 or greater, this stencil
13358 state only affects non-polygons and front-facing polygons.
13359 Back-facing polygons use separate stencil state. See
13360 `glStencilMaskSeparate'.
13365 PARAMS returns a single boolean value indicating whether stereo
13366 buffers (left and right) are supported.
13371 PARAMS returns one value, an estimate of the number of bits of
13372 subpixel resolution that are used to position rasterized geometry
13373 in window coordinates. The value must be at least 4.
13378 PARAMS returns a single boolean value indicating whether 1D texture
13379 mapping is enabled. The initial value is `GL_FALSE'. See
13382 `GL_TEXTURE_BINDING_1D'
13385 PARAMS returns a single value, the name of the texture currently
13386 bound to the target `GL_TEXTURE_1D'. The initial value is 0. See
13392 PARAMS returns a single boolean value indicating whether 2D texture
13393 mapping is enabled. The initial value is `GL_FALSE'. See
13396 `GL_TEXTURE_BINDING_2D'
13399 PARAMS returns a single value, the name of the texture currently
13400 bound to the target `GL_TEXTURE_2D'. The initial value is 0. See
13406 PARAMS returns a single boolean value indicating whether 3D texture
13407 mapping is enabled. The initial value is `GL_FALSE'. See
13410 `GL_TEXTURE_BINDING_3D'
13413 PARAMS returns a single value, the name of the texture currently
13414 bound to the target `GL_TEXTURE_3D'. The initial value is 0. See
13417 `GL_TEXTURE_BINDING_CUBE_MAP'
13420 PARAMS returns a single value, the name of the texture currently
13421 bound to the target `GL_TEXTURE_CUBE_MAP'. The initial value is 0.
13422 See `glBindTexture'.
13424 `GL_TEXTURE_COMPRESSION_HINT'
13427 PARAMS returns a single value indicating the mode of the texture
13428 compression hint. The initial value is `GL_DONT_CARE'.
13430 `GL_TEXTURE_COORD_ARRAY'
13433 PARAMS returns a single boolean value indicating whether the
13434 texture coordinate array is enabled. The initial value is
13435 `GL_FALSE'. See `glTexCoordPointer'.
13437 `GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING'
13440 PARAMS returns a single value, the name of the buffer object
13441 associated with the texture coordinate array. This buffer object
13442 would have been bound to the target `GL_ARRAY_BUFFER' at the time
13443 of the most recent call to `glTexCoordPointer'. If no buffer
13444 object was bound to this target, 0 is returned. The initial value
13445 is 0. See `glBindBuffer'.
13447 `GL_TEXTURE_COORD_ARRAY_SIZE'
13450 PARAMS returns one value, the number of coordinates per element in
13451 the texture coordinate array. The initial value is 4. See
13452 `glTexCoordPointer'.
13454 `GL_TEXTURE_COORD_ARRAY_STRIDE'
13457 PARAMS returns one value, the byte offset between consecutive
13458 elements in the texture coordinate array. The initial value is 0.
13459 See `glTexCoordPointer'.
13461 `GL_TEXTURE_COORD_ARRAY_TYPE'
13464 PARAMS returns one value, the data type of the coordinates in the
13465 texture coordinate array. The initial value is `GL_FLOAT'. See
13466 `glTexCoordPointer'.
13468 `GL_TEXTURE_CUBE_MAP'
13471 PARAMS returns a single boolean value indicating whether
13472 cube-mapped texture mapping is enabled. The initial value is
13473 `GL_FALSE'. See `glTexImage2D'.
13478 PARAMS returns a single boolean value indicating whether automatic
13479 generation of the Q texture coordinate is enabled. The initial
13480 value is `GL_FALSE'. See `glTexGen'.
13485 PARAMS returns a single boolean value indicating whether automatic
13486 generation of the R texture coordinate is enabled. The initial
13487 value is `GL_FALSE'. See `glTexGen'.
13492 PARAMS returns a single boolean value indicating whether automatic
13493 generation of the S texture coordinate is enabled. The initial
13494 value is `GL_FALSE'. See `glTexGen'.
13499 PARAMS returns a single boolean value indicating whether automatic
13500 generation of the T texture coordinate is enabled. The initial
13501 value is `GL_FALSE'. See `glTexGen'.
13503 `GL_TEXTURE_MATRIX'
13506 PARAMS returns sixteen values: the texture matrix on the top of the
13507 texture matrix stack. Initially this matrix is the identity
13508 matrix. See `glPushMatrix'.
13510 `GL_TEXTURE_STACK_DEPTH'
13513 PARAMS returns one value, the number of matrices on the texture
13514 matrix stack. The initial value is 1. See `glPushMatrix'.
13516 `GL_TRANSPOSE_COLOR_MATRIX'
13519 PARAMS returns 16 values, the elements of the color matrix in
13520 row-major order. See `glLoadTransposeMatrix'.
13522 `GL_TRANSPOSE_MODELVIEW_MATRIX'
13525 PARAMS returns 16 values, the elements of the modelview matrix in
13526 row-major order. See `glLoadTransposeMatrix'.
13528 `GL_TRANSPOSE_PROJECTION_MATRIX'
13531 PARAMS returns 16 values, the elements of the projection matrix in
13532 row-major order. See `glLoadTransposeMatrix'.
13534 `GL_TRANSPOSE_TEXTURE_MATRIX'
13537 PARAMS returns 16 values, the elements of the texture matrix in
13538 row-major order. See `glLoadTransposeMatrix'.
13540 `GL_UNPACK_ALIGNMENT'
13543 PARAMS returns one value, the byte alignment used for reading pixel
13544 data from memory. The initial value is 4. See `glPixelStore'.
13546 `GL_UNPACK_IMAGE_HEIGHT'
13549 PARAMS returns one value, the image height used for reading pixel
13550 data from memory. The initial is 0. See `glPixelStore'.
13552 `GL_UNPACK_LSB_FIRST'
13555 PARAMS returns a single boolean value indicating whether single-bit
13556 pixels being read from memory are read first from the least
13557 significant bit of each unsigned byte. The initial value is
13558 `GL_FALSE'. See `glPixelStore'.
13560 `GL_UNPACK_ROW_LENGTH'
13563 PARAMS returns one value, the row length used for reading pixel
13564 data from memory. The initial value is 0. See `glPixelStore'.
13566 `GL_UNPACK_SKIP_IMAGES'
13569 PARAMS returns one value, the number of pixel images skipped before
13570 the first pixel is read from memory. The initial value is 0. See
13573 `GL_UNPACK_SKIP_PIXELS'
13576 PARAMS returns one value, the number of pixel locations skipped
13577 before the first pixel is read from memory. The initial value is
13578 0. See `glPixelStore'.
13580 `GL_UNPACK_SKIP_ROWS'
13583 PARAMS returns one value, the number of rows of pixel locations
13584 skipped before the first pixel is read from memory. The initial
13585 value is 0. See `glPixelStore'.
13587 `GL_UNPACK_SWAP_BYTES'
13590 PARAMS returns a single boolean value indicating whether the bytes
13591 of two-byte and four-byte pixel indices and components are swapped
13592 after being read from memory. The initial value is `GL_FALSE'. See
13598 PARAMS returns a single boolean value indicating whether the vertex
13599 array is enabled. The initial value is `GL_FALSE'. See
13602 `GL_VERTEX_ARRAY_BUFFER_BINDING'
13605 PARAMS returns a single value, the name of the buffer object
13606 associated with the vertex array. This buffer object would have
13607 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
13608 recent call to `glVertexPointer'. If no buffer object was bound to
13609 this target, 0 is returned. The initial value is 0. See
13612 `GL_VERTEX_ARRAY_SIZE'
13615 PARAMS returns one value, the number of coordinates per vertex in
13616 the vertex array. The initial value is 4. See `glVertexPointer'.
13618 `GL_VERTEX_ARRAY_STRIDE'
13621 PARAMS returns one value, the byte offset between consecutive
13622 vertices in the vertex array. The initial value is 0. See
13625 `GL_VERTEX_ARRAY_TYPE'
13628 PARAMS returns one value, the data type of each coordinate in the
13629 vertex array. The initial value is `GL_FLOAT'. See
13632 `GL_VERTEX_PROGRAM_POINT_SIZE'
13635 PARAMS returns a single boolean value indicating whether vertex
13636 program point size mode is enabled. If enabled, and a vertex
13637 shader is active, then the point size is taken from the shader
13638 built-in `gl_PointSize'. If disabled, and a vertex shader is
13639 active, then the point size is taken from the point state as
13640 specified by `glPointSize'. The initial value is `GL_FALSE'.
13642 `GL_VERTEX_PROGRAM_TWO_SIDE'
13645 PARAMS returns a single boolean value indicating whether vertex
13646 program two-sided color mode is enabled. If enabled, and a vertex
13647 shader is active, then the GL chooses the back color output for
13648 back-facing polygons, and the front color output for non-polygons
13649 and front-facing polygons. If disabled, and a vertex shader is
13650 active, then the front color output is always selected. The
13651 initial value is `GL_FALSE'.
13656 PARAMS returns four values: the X and Y window coordinates of the
13657 viewport, followed by its width and height. Initially the X and Y
13658 window coordinates are both set to 0, and the width and height are
13659 set to the width and height of the window into which the GL will do
13660 its rendering. See `glViewport'.
13665 PARAMS returns one value, the X pixel zoom factor. The initial
13666 value is 1. See `glPixelZoom'.
13671 PARAMS returns one value, the Y pixel zoom factor. The initial
13672 value is 1. See `glPixelZoom'.
13674 Many of the boolean parameters can also be queried more easily using
13677 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
13679 `GL_INVALID_OPERATION' is generated if `glGet' is executed between the
13680 execution of `glBegin' and the corresponding execution of `glEnd'.")
13682 (define-gl-procedures
13683 ((glHint (target GLenum) (mode GLenum) -> void))
13684 "Specify implementation-specific hints.
13687 Specifies a symbolic constant indicating the behavior to be
13688 controlled. `GL_FOG_HINT', `GL_GENERATE_MIPMAP_HINT',
13689 `GL_LINE_SMOOTH_HINT', `GL_PERSPECTIVE_CORRECTION_HINT',
13690 `GL_POINT_SMOOTH_HINT', `GL_POLYGON_SMOOTH_HINT',
13691 `GL_TEXTURE_COMPRESSION_HINT', and
13692 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT' are accepted.
13695 Specifies a symbolic constant indicating the desired behavior.
13696 `GL_FASTEST', `GL_NICEST', and `GL_DONT_CARE' are accepted.
13698 Certain aspects of GL behavior, when there is room for interpretation,
13699 can be controlled with hints. A hint is specified with two arguments.
13700 TARGET is a symbolic constant indicating the behavior to be controlled,
13701 and MODE is another symbolic constant indicating the desired behavior.
13702 The initial value for each TARGET is `GL_DONT_CARE'. MODE can be one of
13708 The most efficient option should be chosen.
13713 The most correct, or highest quality, option should be chosen.
13720 Though the implementation aspects that can be hinted are well defined,
13721 the interpretation of the hints depends on the implementation. The hint
13722 aspects that can be specified with TARGET, along with suggested
13723 semantics, are as follows:
13728 Indicates the accuracy of fog calculation. If per-pixel fog
13729 calculation is not efficiently supported by the GL implementation,
13730 hinting `GL_DONT_CARE' or `GL_FASTEST' can result in per-vertex
13731 calculation of fog effects.
13733 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT'
13736 Indicates the accuracy of the derivative calculation for the GL
13737 shading language fragment processing built-in functions: `dFdx',
13738 `dFdy', and `fwidth'.
13740 `GL_GENERATE_MIPMAP_HINT'
13743 Indicates the quality of filtering when generating mipmap images.
13745 `GL_LINE_SMOOTH_HINT'
13748 Indicates the sampling quality of antialiased lines. If a larger
13749 filter function is applied, hinting `GL_NICEST' can result in more
13750 pixel fragments being generated during rasterization.
13752 `GL_PERSPECTIVE_CORRECTION_HINT'
13755 Indicates the quality of color, texture coordinate, and fog
13756 coordinate interpolation. If perspective-corrected parameter
13757 interpolation is not efficiently supported by the GL
13758 implementation, hinting `GL_DONT_CARE' or `GL_FASTEST' can result
13759 in simple linear interpolation of colors and/or texture
13762 `GL_POINT_SMOOTH_HINT'
13765 Indicates the sampling quality of antialiased points. If a larger
13766 filter function is applied, hinting `GL_NICEST' can result in more
13767 pixel fragments being generated during rasterization.
13769 `GL_POLYGON_SMOOTH_HINT'
13772 Indicates the sampling quality of antialiased polygons. Hinting
13773 `GL_NICEST' can result in more pixel fragments being generated
13774 during rasterization, if a larger filter function is applied.
13776 `GL_TEXTURE_COMPRESSION_HINT'
13779 Indicates the quality and performance of the compressing texture
13780 images. Hinting `GL_FASTEST' indicates that texture images should
13781 be compressed as quickly as possible, while `GL_NICEST' indicates
13782 that texture images should be compressed with as little image
13783 quality loss as possible. `GL_NICEST' should be selected if the
13784 texture is to be retrieved by `glGetCompressedTexImage' for reuse.
13786 `GL_INVALID_ENUM' is generated if either TARGET or MODE is not an
13789 `GL_INVALID_OPERATION' is generated if `glHint' is executed between the
13790 execution of `glBegin' and the corresponding execution of `glEnd'.")
13792 (define-gl-procedures
13796 (internalformat GLenum)
13800 "Define histogram table.
13803 The histogram whose parameters are to be set. Must be one of
13804 `GL_HISTOGRAM' or `GL_PROXY_HISTOGRAM'.
13807 The number of entries in the histogram table. Must be a power of
13811 The format of entries in the histogram table. Must be one of
13812 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
13813 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
13814 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
13815 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
13816 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
13817 `GL_LUMINANCE16_ALPHA16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4',
13818 `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16',
13819 `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8',
13820 `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
13823 If `GL_TRUE', pixels will be consumed by the histogramming process
13824 and no drawing or texture loading will take place. If `GL_FALSE',
13825 pixels will proceed to the minmax process after histogramming.
13827 When `GL_HISTOGRAM' is enabled, RGBA color components are converted to
13828 histogram table indices by clamping to the range [0,1], multiplying by
13829 the width of the histogram table, and rounding to the nearest integer.
13830 The table entries selected by the RGBA indices are then incremented. (If
13831 the internal format of the histogram table includes luminance, then the
13832 index derived from the R color component determines the luminance table
13833 entry to be incremented.) If a histogram table entry is incremented
13834 beyond its maximum value, then its value becomes undefined. (This is
13837 Histogramming is performed only for RGBA pixels (though these may be
13838 specified originally as color indices and converted to RGBA by index
13839 table lookup). Histogramming is enabled with `glEnable' and disabled
13842 When TARGET is `GL_HISTOGRAM', `glHistogram' redefines the current
13843 histogram table to have WIDTH entries of the format specified by
13844 INTERNALFORMAT. The entries are indexed 0 through WIDTH-1 , and all
13845 entries are initialized to zero. The values in the previous histogram
13846 table, if any, are lost. If SINK is `GL_TRUE', then pixels are
13847 discarded after histogramming; no further processing of the pixels takes
13848 place, and no drawing, texture loading, or pixel readback will result.
13850 When TARGET is `GL_PROXY_HISTOGRAM', `glHistogram' computes all state
13851 information as if the histogram table were to be redefined, but does not
13852 actually define the new table. If the requested histogram table is too
13853 large to be supported, then the state information will be set to zero.
13854 This provides a way to determine if a histogram table with the given
13855 parameters can be supported.
13859 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
13862 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or is not a
13865 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
13868 `GL_TABLE_TOO_LARGE' is generated if TARGET is `GL_HISTOGRAM' and the
13869 histogram table specified is too large for the implementation.
13871 `GL_INVALID_OPERATION' is generated if `glHistogram' is executed between
13872 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13874 (define-gl-procedures
13875 ((glIndexMask (mask GLuint) -> void))
13876 "Control the writing of individual bits in the color index buffers.
13879 Specifies a bit mask to enable and disable the writing of
13880 individual bits in the color index buffers. Initially, the mask is
13883 `glIndexMask' controls the writing of individual bits in the color index
13884 buffers. The least significant N bits of MASK, where N is the number of
13885 bits in a color index buffer, specify a mask. Where a 1 (one) appears
13886 in the mask, it's possible to write to the corresponding bit in the
13887 color index buffer (or buffers). Where a 0 (zero) appears, the
13888 corresponding bit is write-protected.
13890 This mask is used only in color index mode, and it affects only the
13891 buffers currently selected for writing (see `glDrawBuffer'). Initially,
13892 all bits are enabled for writing.
13894 `GL_INVALID_OPERATION' is generated if `glIndexMask' is executed between
13895 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13897 (define-gl-procedures
13901 (pointer const-GLvoid-*)
13904 "Define an array of color indexes.
13907 Specifies the data type of each color index in the array. Symbolic
13908 constants `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_INT', `GL_FLOAT', and
13909 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
13912 Specifies the byte offset between consecutive color indexes. If
13913 STRIDE is 0, the color indexes are understood to be tightly packed
13914 in the array. The initial value is 0.
13917 Specifies a pointer to the first index in the array. The initial
13920 `glIndexPointer' specifies the location and data format of an array of
13921 color indexes to use when rendering. TYPE specifies the data type of
13922 each color index and STRIDE specifies the byte stride from one color
13923 index to the next, allowing vertices and attributes to be packed into a
13924 single array or stored in separate arrays.
13926 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
13927 target (see `glBindBuffer') while a color index array is specified,
13928 POINTER is treated as a byte offset into the buffer object's data store.
13929 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
13930 color index vertex array client-side state
13931 (`GL_INDEX_ARRAY_BUFFER_BINDING').
13933 When a color index array is specified, TYPE, STRIDE, and POINTER are
13934 saved as client-side state, in addition to the current vertex array
13935 buffer object binding.
13937 To enable and disable the color index array, call `glEnableClientState'
13938 and `glDisableClientState' with the argument `GL_INDEX_ARRAY'. If
13939 enabled, the color index array is used when `glDrawArrays',
13940 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements',
13941 `glDrawRangeElements', or `glArrayElement' is called.
13943 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
13945 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
13947 (define-gl-procedures
13948 ((glIndexs (c GLshort) -> void)
13949 (glIndexi (c GLint) -> void)
13950 (glIndexf (c GLfloat) -> void)
13951 (glIndexd (c GLdouble) -> void)
13952 (glIndexub (c GLubyte) -> void)
13953 (glIndexsv (c const-GLshort-*) -> void)
13954 (glIndexiv (c const-GLint-*) -> void)
13955 (glIndexfv (c const-GLfloat-*) -> void)
13956 (glIndexdv (c const-GLdouble-*) -> void)
13957 (glIndexubv (c const-GLubyte-*) -> void))
13958 "Set the current color index.
13961 Specifies the new value for the current color index.
13965 `glIndex' updates the current (single-valued) color index. It takes one
13966 argument, the new value for the current color index.
13968 The current index is stored as a floating-point value. Integer values
13969 are converted directly to floating-point values, with no special
13970 mapping. The initial value is 1.
13972 Index values outside the representable range of the color index buffer
13973 are not clamped. However, before an index is dithered (if enabled) and
13974 written to the frame buffer, it is converted to fixed-point format. Any
13975 bits in the integer portion of the resulting fixed-point value that do
13976 not correspond to bits in the frame buffer are masked out.")
13978 (define-gl-procedures
13979 ((glInitNames -> void))
13980 "Initialize the name stack.
13982 The name stack is used during selection mode to allow sets of rendering
13983 commands to be uniquely identified. It consists of an ordered set of
13984 unsigned integers. `glInitNames' causes the name stack to be
13985 initialized to its default empty state.
13987 The name stack is always empty while the render mode is not `GL_SELECT'.
13988 Calls to `glInitNames' while the render mode is not `GL_SELECT' are
13991 `GL_INVALID_OPERATION' is generated if `glInitNames' is executed between
13992 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13994 (define-gl-procedures
13995 ((glInterleavedArrays
13998 (pointer const-GLvoid-*)
14001 "Simultaneously specify and enable several interleaved arrays.
14004 Specifies the type of array to enable. Symbolic constants
14005 `GL_V2F', `GL_V3F', `GL_C4UB_V2F', `GL_C4UB_V3F', `GL_C3F_V3F',
14006 `GL_N3F_V3F', `GL_C4F_N3F_V3F', `GL_T2F_V3F', `GL_T4F_V4F',
14007 `GL_T2F_C4UB_V3F', `GL_T2F_C3F_V3F', `GL_T2F_N3F_V3F',
14008 `GL_T2F_C4F_N3F_V3F', and `GL_T4F_C4F_N3F_V4F' are accepted.
14011 Specifies the offset in bytes between each aggregate array element.
14013 `glInterleavedArrays' lets you specify and enable individual color,
14014 normal, texture and vertex arrays whose elements are part of a larger
14015 aggregate array element. For some implementations, this is more
14016 efficient than specifying the arrays separately.
14018 If STRIDE is 0, the aggregate elements are stored consecutively.
14019 Otherwise, STRIDE bytes occur between the beginning of one aggregate
14020 array element and the beginning of the next aggregate array element.
14022 FORMAT serves as a ``key'' describing the extraction of individual
14023 arrays from the aggregate array. If FORMAT contains a T, then texture
14024 coordinates are extracted from the interleaved array. If C is present,
14025 color values are extracted. If N is present, normal coordinates are
14026 extracted. Vertex coordinates are always extracted.
14028 The digits 2, 3, and 4 denote how many values are extracted. F
14029 indicates that values are extracted as floating-point values. Colors
14030 may also be extracted as 4 unsigned bytes if 4UB follows the C. If a
14031 color is extracted as 4 unsigned bytes, the vertex array element which
14032 follows is located at the first possible floating-point aligned address.
14034 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted value.
14036 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
14038 (define-gl-procedures
14039 ((glIsBuffer (buffer GLuint) -> GLboolean))
14040 "Determine if a name corresponds to a buffer object.
14043 Specifies a value that may be the name of a buffer object.
14045 `glIsBuffer' returns `GL_TRUE' if BUFFER is currently the name of a
14046 buffer object. If BUFFER is zero, or is a non-zero value that is not
14047 currently the name of a buffer object, or if an error occurs,
14048 `glIsBuffer' returns `GL_FALSE'.
14050 A name returned by `glGenBuffers', but not yet associated with a buffer
14051 object by calling `glBindBuffer', is not the name of a buffer object.
14053 `GL_INVALID_OPERATION' is generated if `glIsBuffer' is executed between
14054 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14056 (define-gl-procedures
14057 ((glIsEnabled (cap GLenum) -> GLboolean))
14058 "Test whether a capability is enabled.
14061 Specifies a symbolic constant indicating a GL capability.
14063 `glIsEnabled' returns `GL_TRUE' if CAP is an enabled capability and
14064 returns `GL_FALSE' otherwise. Initially all capabilities except
14065 `GL_DITHER' are disabled; `GL_DITHER' is initially enabled.
14067 The following capabilities are accepted for CAP:
14081 `glBlendFunc', `glLogicOp'
14089 `GL_COLOR_LOGIC_OP'
14092 `GL_COLOR_MATERIAL'
14101 `GL_CONVOLUTION_1D'
14102 `glConvolutionFilter1D'
14104 `GL_CONVOLUTION_2D'
14105 `glConvolutionFilter2D'
14111 `glDepthFunc', `glDepthRange'
14116 `GL_EDGE_FLAG_ARRAY'
14117 `glEdgeFlagPointer'
14122 `GL_FOG_COORD_ARRAY'
14123 `glFogCoordPointer'
14131 `GL_INDEX_LOGIC_OP'
14135 `glLightModel', `glLight'
14138 `glMaterial', `glLightModel', `glLight'
14155 `GL_MAP1_TEXTURE_COORD_1'
14158 `GL_MAP1_TEXTURE_COORD_2'
14161 `GL_MAP1_TEXTURE_COORD_3'
14164 `GL_MAP1_TEXTURE_COORD_4'
14176 `GL_MAP2_TEXTURE_COORD_1'
14179 `GL_MAP2_TEXTURE_COORD_2'
14182 `GL_MAP2_TEXTURE_COORD_3'
14185 `GL_MAP2_TEXTURE_COORD_4'
14212 `GL_POLYGON_SMOOTH'
14215 `GL_POLYGON_OFFSET_FILL'
14218 `GL_POLYGON_OFFSET_LINE'
14221 `GL_POLYGON_OFFSET_POINT'
14224 `GL_POLYGON_STIPPLE'
14227 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
14230 `GL_POST_CONVOLUTION_COLOR_TABLE'
14233 `GL_RESCALE_NORMAL'
14236 `GL_SAMPLE_ALPHA_TO_COVERAGE'
14239 `GL_SAMPLE_ALPHA_TO_ONE'
14242 `GL_SAMPLE_COVERAGE'
14248 `GL_SECONDARY_COLOR_ARRAY'
14249 `glSecondaryColorPointer'
14252 `glSeparableFilter2D'
14255 `glStencilFunc', `glStencilOp'
14266 `GL_TEXTURE_COORD_ARRAY'
14267 `glTexCoordPointer'
14269 `GL_TEXTURE_CUBE_MAP'
14287 `GL_VERTEX_PROGRAM_POINT_SIZE'
14290 `GL_VERTEX_PROGRAM_TWO_SIDE'
14295 `GL_INVALID_ENUM' is generated if CAP is not an accepted value.
14297 `GL_INVALID_OPERATION' is generated if `glIsEnabled' is executed between
14298 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14300 (define-gl-procedures
14301 ((glIsList (list GLuint) -> GLboolean))
14302 "Determine if a name corresponds to a display list.
14305 Specifies a potential display list name.
14307 `glIsList' returns `GL_TRUE' if LIST is the name of a display list and
14308 returns `GL_FALSE' if it is not, or if an error occurs.
14310 A name returned by `glGenLists', but not yet associated with a display
14311 list by calling `glNewList', is not the name of a display list.
14313 `GL_INVALID_OPERATION' is generated if `glIsList' is executed between
14314 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14316 (define-gl-procedures
14317 ((glIsProgram (program GLuint) -> GLboolean))
14318 "Determines if a name corresponds to a program object.
14321 Specifies a potential program object.
14323 `glIsProgram' returns `GL_TRUE' if PROGRAM is the name of a program
14324 object previously created with `glCreateProgram' and not yet deleted
14325 with `glDeleteProgram'. If PROGRAM is zero or a non-zero value that is
14326 not the name of a program object, or if an error occurs, `glIsProgram'
14327 returns `GL_FALSE'.
14329 `GL_INVALID_OPERATION' is generated if `glIsProgram' is executed between
14330 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14332 (define-gl-procedures
14333 ((glIsQuery (id GLuint) -> GLboolean))
14334 "Determine if a name corresponds to a query object.
14337 Specifies a value that may be the name of a query object.
14339 `glIsQuery' returns `GL_TRUE' if ID is currently the name of a query
14340 object. If ID is zero, or is a non-zero value that is not currently the
14341 name of a query object, or if an error occurs, `glIsQuery' returns
14344 A name returned by `glGenQueries', but not yet associated with a query
14345 object by calling `glBeginQuery', is not the name of a query object.
14347 `GL_INVALID_OPERATION' is generated if `glIsQuery' is executed between
14348 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14350 (define-gl-procedures
14351 ((glIsShader (shader GLuint) -> GLboolean))
14352 "Determines if a name corresponds to a shader object.
14355 Specifies a potential shader object.
14357 `glIsShader' returns `GL_TRUE' if SHADER is the name of a shader object
14358 previously created with `glCreateShader' and not yet deleted with
14359 `glDeleteShader'. If SHADER is zero or a non-zero value that is not the
14360 name of a shader object, or if an error occurs, `glIsShader ' returns
14363 `GL_INVALID_OPERATION' is generated if `glIsShader' is executed between
14364 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14366 (define-gl-procedures
14367 ((glIsTexture (texture GLuint) -> GLboolean))
14368 "Determine if a name corresponds to a texture.
14371 Specifies a value that may be the name of a texture.
14373 `glIsTexture' returns `GL_TRUE' if TEXTURE is currently the name of a
14374 texture. If TEXTURE is zero, or is a non-zero value that is not
14375 currently the name of a texture, or if an error occurs, `glIsTexture'
14376 returns `GL_FALSE'.
14378 A name returned by `glGenTextures', but not yet associated with a
14379 texture by calling `glBindTexture', is not the name of a texture.
14381 `GL_INVALID_OPERATION' is generated if `glIsTexture' is executed between
14382 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14384 (define-gl-procedures
14397 (params const-GLfloat-*)
14402 (params const-GLint-*)
14405 "Set the lighting model parameters.
14408 Specifies a single-valued lighting model parameter.
14409 `GL_LIGHT_MODEL_LOCAL_VIEWER', `GL_LIGHT_MODEL_COLOR_CONTROL', and
14410 `GL_LIGHT_MODEL_TWO_SIDE' are accepted.
14413 Specifies the value that PARAM will be set to.
14415 `glLightModel' sets the lighting model parameter. PNAME names a
14416 parameter and PARAMS gives the new value. There are three lighting
14419 `GL_LIGHT_MODEL_AMBIENT'
14422 PARAMS contains four integer or floating-point values that specify
14423 the ambient RGBA intensity of the entire scene. Integer values are
14424 mapped linearly such that the most positive representable value
14425 maps to 1.0, and the most negative representable value maps to -1.0
14426 . Floating-point values are mapped directly. Neither integer nor
14427 floating-point values are clamped. The initial ambient scene
14428 intensity is (0.2, 0.2, 0.2, 1.0).
14430 `GL_LIGHT_MODEL_COLOR_CONTROL'
14433 PARAMS must be either `GL_SEPARATE_SPECULAR_COLOR' or
14434 `GL_SINGLE_COLOR'. `GL_SINGLE_COLOR' specifies that a single color
14435 is generated from the lighting computation for a vertex.
14436 `GL_SEPARATE_SPECULAR_COLOR' specifies that the specular color
14437 computation of lighting be stored separately from the remainder of
14438 the lighting computation. The specular color is summed into the
14439 generated fragment's color after the application of texture mapping
14440 (if enabled). The initial value is `GL_SINGLE_COLOR'.
14442 `GL_LIGHT_MODEL_LOCAL_VIEWER'
14445 PARAMS is a single integer or floating-point value that specifies
14446 how specular reflection angles are computed. If PARAMS is 0 (or
14447 0.0), specular reflection angles take the view direction to be
14448 parallel to and in the direction of the -Z axis, regardless of the
14449 location of the vertex in eye coordinates. Otherwise, specular
14450 reflections are computed from the origin of the eye coordinate
14451 system. The initial value is 0.
14453 `GL_LIGHT_MODEL_TWO_SIDE'
14456 PARAMS is a single integer or floating-point value that specifies
14457 whether one- or two-sided lighting calculations are done for
14458 polygons. It has no effect on the lighting calculations for
14459 points, lines, or bitmaps. If PARAMS is 0 (or 0.0), one-sided
14460 lighting is specified, and only the FRONT material parameters are
14461 used in the lighting equation. Otherwise, two-sided lighting is
14462 specified. In this case, vertices of back-facing polygons are
14463 lighted using the BACK material parameters and have their normals
14464 reversed before the lighting equation is evaluated. Vertices of
14465 front-facing polygons are always lighted using the FRONT material
14466 parameters, with no change to their normals. The initial value is
14469 In RGBA mode, the lighted color of a vertex is the sum of the material
14470 emission intensity, the product of the material ambient reflectance and
14471 the lighting model full-scene ambient intensity, and the contribution of
14472 each enabled light source. Each light source contributes the sum of
14473 three terms: ambient, diffuse, and specular. The ambient light source
14474 contribution is the product of the material ambient reflectance and the
14475 light's ambient intensity. The diffuse light source contribution is the
14476 product of the material diffuse reflectance, the light's diffuse
14477 intensity, and the dot product of the vertex's normal with the
14478 normalized vector from the vertex to the light source. The specular
14479 light source contribution is the product of the material specular
14480 reflectance, the light's specular intensity, and the dot product of the
14481 normalized vertex-to-eye and vertex-to-light vectors, raised to the
14482 power of the shininess of the material. All three light source
14483 contributions are attenuated equally based on the distance from the
14484 vertex to the light source and on light source direction, spread
14485 exponent, and spread cutoff angle. All dot products are replaced with 0
14486 if they evaluate to a negative value.
14488 The alpha component of the resulting lighted color is set to the alpha
14489 value of the material diffuse reflectance.
14491 In color index mode, the value of the lighted index of a vertex ranges
14492 from the ambient to the specular values passed to `glMaterial' using
14493 `GL_COLOR_INDEXES'. Diffuse and specular coefficients, computed with a
14494 (.30, .59, .11) weighting of the lights' colors, the shininess of the
14495 material, and the same reflection and attenuation equations as in the
14496 RGBA case, determine how much above ambient the resulting index is.
14498 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
14500 `GL_INVALID_ENUM' is generated if PNAME is
14501 `GL_LIGHT_MODEL_COLOR_CONTROL' and PARAMS is not one of
14502 `GL_SINGLE_COLOR' or `GL_SEPARATE_SPECULAR_COLOR'.
14504 `GL_INVALID_OPERATION' is generated if `glLightModel' is executed
14505 between the execution of `glBegin' and the corresponding execution of
14508 (define-gl-procedures
14524 (params const-GLfloat-*)
14530 (params const-GLint-*)
14533 "Set light source parameters.
14536 Specifies a light. The number of lights depends on the
14537 implementation, but at least eight lights are supported. They are
14538 identified by symbolic names of the form `GL_LIGHT' I , where i
14539 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
14542 Specifies a single-valued light source parameter for LIGHT.
14543 `GL_SPOT_EXPONENT', `GL_SPOT_CUTOFF', `GL_CONSTANT_ATTENUATION',
14544 `GL_LINEAR_ATTENUATION', and `GL_QUADRATIC_ATTENUATION' are
14548 Specifies the value that parameter PNAME of light source LIGHT will
14551 `glLight' sets the values of individual light source parameters. LIGHT
14552 names the light and is a symbolic name of the form `GL_LIGHT'I , where i
14553 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1. PNAME specifies one
14554 of ten light source parameters, again by symbolic name. PARAMS is
14555 either a single value or a pointer to an array that contains the new
14558 To enable and disable lighting calculation, call `glEnable' and
14559 `glDisable' with argument `GL_LIGHTING'. Lighting is initially
14560 disabled. When it is enabled, light sources that are enabled contribute
14561 to the lighting calculation. Light source I is enabled and disabled
14562 using `glEnable' and `glDisable' with argument `GL_LIGHT'I .
14564 The ten light parameters are as follows:
14567 PARAMS contains four integer or floating-point values that specify
14568 the ambient RGBA intensity of the light. Integer values are mapped
14569 linearly such that the most positive representable value maps to
14570 1.0, and the most negative representable value maps to -1.0 .
14571 Floating-point values are mapped directly. Neither integer nor
14572 floating-point values are clamped. The initial ambient light
14573 intensity is (0, 0, 0, 1).
14576 PARAMS contains four integer or floating-point values that specify
14577 the diffuse RGBA intensity of the light. Integer values are mapped
14578 linearly such that the most positive representable value maps to
14579 1.0, and the most negative representable value maps to -1.0 .
14580 Floating-point values are mapped directly. Neither integer nor
14581 floating-point values are clamped. The initial value for
14582 `GL_LIGHT0' is (1, 1, 1, 1); for other lights, the initial value is
14586 PARAMS contains four integer or floating-point values that specify
14587 the specular RGBA intensity of the light. Integer values are
14588 mapped linearly such that the most positive representable value
14589 maps to 1.0, and the most negative representable value maps to -1.0
14590 . Floating-point values are mapped directly. Neither integer nor
14591 floating-point values are clamped. The initial value for
14592 `GL_LIGHT0' is (1, 1, 1, 1); for other lights, the initial value is
14596 PARAMS contains four integer or floating-point values that specify
14597 the position of the light in homogeneous object coordinates. Both
14598 integer and floating-point values are mapped directly. Neither
14599 integer nor floating-point values are clamped.
14601 The position is transformed by the modelview matrix when `glLight'
14602 is called (just as if it were a point), and it is stored in eye
14603 coordinates. If the W component of the position is 0, the light is
14604 treated as a directional source. Diffuse and specular lighting
14605 calculations take the light's direction, but not its actual
14606 position, into account, and attenuation is disabled. Otherwise,
14607 diffuse and specular lighting calculations are based on the actual
14608 location of the light in eye coordinates, and attenuation is
14609 enabled. The initial position is (0, 0, 1, 0); thus, the initial
14610 light source is directional, parallel to, and in the direction of
14613 `GL_SPOT_DIRECTION'
14614 PARAMS contains three integer or floating-point values that specify
14615 the direction of the light in homogeneous object coordinates. Both
14616 integer and floating-point values are mapped directly. Neither
14617 integer nor floating-point values are clamped.
14619 The spot direction is transformed by the upper 3x3 of the modelview
14620 matrix when `glLight' is called, and it is stored in eye
14621 coordinates. It is significant only when `GL_SPOT_CUTOFF' is not
14622 180, which it is initially. The initial direction is (0,0-1) .
14625 PARAMS is a single integer or floating-point value that specifies
14626 the intensity distribution of the light. Integer and
14627 floating-point values are mapped directly. Only values in the
14628 range [0,128] are accepted.
14630 Effective light intensity is attenuated by the cosine of the angle
14631 between the direction of the light and the direction from the light
14632 to the vertex being lighted, raised to the power of the spot
14633 exponent. Thus, higher spot exponents result in a more focused
14634 light source, regardless of the spot cutoff angle (see
14635 `GL_SPOT_CUTOFF', next paragraph). The initial spot exponent is 0,
14636 resulting in uniform light distribution.
14639 PARAMS is a single integer or floating-point value that specifies
14640 the maximum spread angle of a light source. Integer and
14641 floating-point values are mapped directly. Only values in the
14642 range [0,90] and the special value 180 are accepted. If the angle
14643 between the direction of the light and the direction from the light
14644 to the vertex being lighted is greater than the spot cutoff angle,
14645 the light is completely masked. Otherwise, its intensity is
14646 controlled by the spot exponent and the attenuation factors. The
14647 initial spot cutoff is 180, resulting in uniform light
14650 `GL_CONSTANT_ATTENUATION'
14651 `GL_LINEAR_ATTENUATION'
14652 `GL_QUADRATIC_ATTENUATION'
14653 PARAMS is a single integer or floating-point value that specifies
14654 one of the three light attenuation factors. Integer and
14655 floating-point values are mapped directly. Only nonnegative values
14656 are accepted. If the light is positional, rather than directional,
14657 its intensity is attenuated by the reciprocal of the sum of the
14658 constant factor, the linear factor times the distance between the
14659 light and the vertex being lighted, and the quadratic factor times
14660 the square of the same distance. The initial attenuation factors
14661 are (1, 0, 0), resulting in no attenuation.
14663 `GL_INVALID_ENUM' is generated if either LIGHT or PNAME is not an
14666 `GL_INVALID_VALUE' is generated if a spot exponent value is specified
14667 outside the range [0,128] , or if spot cutoff is specified outside the
14668 range [0,90] (except for the special value 180), or if a negative
14669 attenuation factor is specified.
14671 `GL_INVALID_OPERATION' is generated if `glLight' is executed between the
14672 execution of `glBegin' and the corresponding execution of `glEnd'.")
14674 (define-gl-procedures
14680 "Specify the line stipple pattern.
14683 Specifies a multiplier for each bit in the line stipple pattern. If
14684 FACTOR is 3, for example, each bit in the pattern is used three
14685 times before the next bit in the pattern is used. FACTOR is
14686 clamped to the range [1, 256] and defaults to 1.
14689 Specifies a 16-bit integer whose bit pattern determines which
14690 fragments of a line will be drawn when the line is rasterized. Bit
14691 zero is used first; the default pattern is all 1's.
14693 Line stippling masks out certain fragments produced by rasterization;
14694 those fragments will not be drawn. The masking is achieved by using
14695 three parameters: the 16-bit line stipple pattern PATTERN, the repeat
14696 count FACTOR, and an integer stipple counter S .
14698 Counter S is reset to 0 whenever `glBegin' is called and before each
14699 line segment of a `glBegin'(`GL_LINES')/`glEnd' sequence is generated.
14700 It is incremented after each fragment of a unit width aliased line
14701 segment is generated or after each I fragments of an I width line
14702 segment are generated. The I fragments associated with count S are
14705 PATTERN bit (S/FACTOR,)%16
14707 is 0, otherwise these fragments are sent to the frame buffer. Bit zero
14708 of PATTERN is the least significant bit.
14710 Antialiased lines are treated as a sequence of 1×WIDTH rectangles for
14711 purposes of stippling. Whether rectangle S is rasterized or not depends
14712 on the fragment rule described for aliased lines, counting rectangles
14713 rather than groups of fragments.
14715 To enable and disable line stippling, call `glEnable' and `glDisable'
14716 with argument `GL_LINE_STIPPLE'. When enabled, the line stipple pattern
14717 is applied as described above. When disabled, it is as if the pattern
14718 were all 1's. Initially, line stippling is disabled.
14720 `GL_INVALID_OPERATION' is generated if `glLineStipple' is executed
14721 between the execution of `glBegin' and the corresponding execution of
14724 (define-gl-procedures
14725 ((glLineWidth (width GLfloat) -> void))
14726 "Specify the width of rasterized lines.
14729 Specifies the width of rasterized lines. The initial value is 1.
14731 `glLineWidth' specifies the rasterized width of both aliased and
14732 antialiased lines. Using a line width other than 1 has different
14733 effects, depending on whether line antialiasing is enabled. To enable
14734 and disable line antialiasing, call `glEnable' and `glDisable' with
14735 argument `GL_LINE_SMOOTH'. Line antialiasing is initially disabled.
14737 If line antialiasing is disabled, the actual width is determined by
14738 rounding the supplied width to the nearest integer. (If the rounding
14739 results in the value 0, it is as if the line width were 1.) If
14740 ∣ΔX,∣>=∣ΔY,∣ , I pixels are filled in each column that is rasterized,
14741 where I is the rounded value of WIDTH. Otherwise, I pixels are filled
14742 in each row that is rasterized.
14744 If antialiasing is enabled, line rasterization produces a fragment for
14745 each pixel square that intersects the region lying within the rectangle
14746 having width equal to the current line width, length equal to the actual
14747 length of the line, and centered on the mathematical line segment. The
14748 coverage value for each fragment is the window coordinate area of the
14749 intersection of the rectangular region with the corresponding pixel
14750 square. This value is saved and used in the final rasterization step.
14752 Not all widths can be supported when line antialiasing is enabled. If
14753 an unsupported width is requested, the nearest supported width is used.
14754 Only width 1 is guaranteed to be supported; others depend on the
14755 implementation. Likewise, there is a range for aliased line widths as
14756 well. To query the range of supported widths and the size difference
14757 between supported widths within the range, call `glGet' with arguments
14758 `GL_ALIASED_LINE_WIDTH_RANGE', `GL_SMOOTH_LINE_WIDTH_RANGE', and
14759 `GL_SMOOTH_LINE_WIDTH_GRANULARITY'.
14761 `GL_INVALID_VALUE' is generated if WIDTH is less than or equal to 0.
14763 `GL_INVALID_OPERATION' is generated if `glLineWidth' is executed between
14764 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14766 (define-gl-procedures
14767 ((glLinkProgram (program GLuint) -> void))
14768 "Links a program object.
14771 Specifies the handle of the program object to be linked.
14773 `glLinkProgram' links the program object specified by PROGRAM. If any
14774 shader objects of type `GL_VERTEX_SHADER' are attached to PROGRAM, they
14775 will be used to create an executable that will run on the programmable
14776 vertex processor. If any shader objects of type `GL_FRAGMENT_SHADER'
14777 are attached to PROGRAM, they will be used to create an executable that
14778 will run on the programmable fragment processor.
14780 The status of the link operation will be stored as part of the program
14781 object's state. This value will be set to `GL_TRUE' if the program
14782 object was linked without errors and is ready for use, and `GL_FALSE'
14783 otherwise. It can be queried by calling `glGetProgram' with arguments
14784 PROGRAM and `GL_LINK_STATUS'.
14786 As a result of a successful link operation, all active user-defined
14787 uniform variables belonging to PROGRAM will be initialized to 0, and
14788 each of the program object's active uniform variables will be assigned a
14789 location that can be queried by calling `glGetUniformLocation'. Also,
14790 any active user-defined attribute variables that have not been bound to
14791 a generic vertex attribute index will be bound to one at this time.
14793 Linking of a program object can fail for a number of reasons as
14794 specified in the OPENGL SHADING LANGUAGE SPECIFICATION. The following
14795 lists some of the conditions that will cause a link error.
14797 * The storage limit for uniform variables has been exceeded.
14799 * The number of active uniform variables supported by the
14800 implementation has been exceeded.
14802 * The `main' function is missing for the vertex shader or the
14805 * A varying variable actually used in the fragment shader is not
14806 declared in the same way (or is not declared at all) in the vertex
14809 * A reference to a function or variable name is unresolved.
14811 * A shared global is declared with two different types or two
14812 different initial values.
14814 * One or more of the attached shader objects has not been
14815 successfully compiled.
14817 * Binding a generic attribute matrix caused some rows of the matrix
14818 to fall outside the allowed maximum of `GL_MAX_VERTEX_ATTRIBS'.
14820 * Not enough contiguous vertex attribute slots could be found to bind
14821 attribute matrices.
14823 When a program object has been successfully linked, the program object
14824 can be made part of current state by calling `glUseProgram'. Whether or
14825 not the link operation was successful, the program object's information
14826 log will be overwritten. The information log can be retrieved by
14827 calling `glGetProgramInfoLog'.
14829 `glLinkProgram' will also install the generated executables as part of
14830 the current rendering state if the link operation was successful and the
14831 specified program object is already currently in use as a result of a
14832 previous call to `glUseProgram'. If the program object currently in use
14833 is relinked unsuccessfully, its link status will be set to `GL_FALSE' ,
14834 but the executables and associated state will remain part of the current
14835 state until a subsequent call to `glUseProgram' removes it from use.
14836 After it is removed from use, it cannot be made part of current state
14837 until it has been successfully relinked.
14839 If PROGRAM contains shader objects of type `GL_VERTEX_SHADER' but does
14840 not contain shader objects of type `GL_FRAGMENT_SHADER', the vertex
14841 shader will be linked against the implicit interface for fixed
14842 functionality fragment processing. Similarly, if PROGRAM contains
14843 shader objects of type `GL_FRAGMENT_SHADER' but it does not contain
14844 shader objects of type `GL_VERTEX_SHADER', the fragment shader will be
14845 linked against the implicit interface for fixed functionality vertex
14848 The program object's information log is updated and the program is
14849 generated at the time of the link operation. After the link operation,
14850 applications are free to modify attached shader objects, compile
14851 attached shader objects, detach shader objects, delete shader objects,
14852 and attach additional shader objects. None of these operations affects
14853 the information log or the program that is part of the program object.
14855 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
14858 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
14860 `GL_INVALID_OPERATION' is generated if `glLinkProgram' is executed
14861 between the execution of `glBegin' and the corresponding execution of
14864 (define-gl-procedures
14865 ((glListBase (base GLuint) -> void))
14866 "Set the display-list base for .
14869 Specifies an integer offset that will be added to `glCallLists'
14870 offsets to generate display-list names. The initial value is 0.
14872 `glCallLists' specifies an array of offsets. Display-list names are
14873 generated by adding BASE to each offset. Names that reference valid
14874 display lists are executed; the others are ignored.
14876 `GL_INVALID_OPERATION' is generated if `glListBase' is executed between
14877 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14879 (define-gl-procedures
14880 ((glLoadIdentity -> void))
14881 "Replace the current matrix with the identity matrix.
14883 `glLoadIdentity' replaces the current matrix with the identity matrix.
14884 It is semantically equivalent to calling `glLoadMatrix' with the
14889 ((1 0 0 0), (0 1 0 0), (0 0 1 0), (0 0 0 1),,)
14893 but in some cases it is more efficient.
14895 `GL_INVALID_OPERATION' is generated if `glLoadIdentity' is executed
14896 between the execution of `glBegin' and the corresponding execution of
14899 (define-gl-procedures
14900 ((glLoadMatrixd (m const-GLdouble-*) -> void)
14901 (glLoadMatrixf (m const-GLfloat-*) -> void))
14902 "Replace the current matrix with the specified matrix.
14905 Specifies a pointer to 16 consecutive values, which are used as the
14906 elements of a 4×4 column-major matrix.
14908 `glLoadMatrix' replaces the current matrix with the one whose elements
14909 are specified by M. The current matrix is the projection matrix,
14910 modelview matrix, or texture matrix, depending on the current matrix
14911 mode (see `glMatrixMode').
14913 The current matrix, M, defines a transformation of coordinates. For
14914 instance, assume M refers to the modelview matrix. If
14915 V=(V\u2061[0,],V\u2061[1,]V\u2061[2,]V\u2061[3,]) is the set of object coordinates of a
14916 vertex, and M points to an array of 16 single- or double-precision
14917 floating-point values M={M\u2061[0,],M\u2061[1,]...M\u2061[15,]} , then the modelview
14918 transformation M\u2061(V,) does the following:
14920 M\u2061(V,)=((M\u2061[0,] M\u2061[4,] M\u2061[8,] M\u2061[12,]), (M\u2061[1,] M\u2061[5,] M\u2061[9,] M\u2061[13,]),
14921 (M\u2061[2,] M\u2061[6,] M\u2061[10,] M\u2061[14,]), (M\u2061[3,] M\u2061[7,] M\u2061[11,]
14922 M\u2061[15,]),)×((V\u2061[0,]), (V\u2061[1,]), (V\u2061[2,]), (V\u2061[3,]),)
14926 Projection and texture transformations are similarly defined.
14928 `GL_INVALID_OPERATION' is generated if `glLoadMatrix' is executed
14929 between the execution of `glBegin' and the corresponding execution of
14932 (define-gl-procedures
14933 ((glLoadName (name GLuint) -> void))
14934 "Load a name onto the name stack.
14937 Specifies a name that will replace the top value on the name stack.
14939 The name stack is used during selection mode to allow sets of rendering
14940 commands to be uniquely identified. It consists of an ordered set of
14941 unsigned integers and is initially empty.
14943 `glLoadName' causes NAME to replace the value on the top of the name
14946 The name stack is always empty while the render mode is not `GL_SELECT'.
14947 Calls to `glLoadName' while the render mode is not `GL_SELECT' are
14950 `GL_INVALID_OPERATION' is generated if `glLoadName' is called while the
14951 name stack is empty.
14953 `GL_INVALID_OPERATION' is generated if `glLoadName' is executed between
14954 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14956 (define-gl-procedures
14957 ((glLoadTransposeMatrixd
14958 (m const-GLdouble-*)
14961 (glLoadTransposeMatrixf
14962 (m const-GLfloat-*)
14965 "Replace the current matrix with the specified row-major ordered matrix.
14968 Specifies a pointer to 16 consecutive values, which are used as the
14969 elements of a 4×4 row-major matrix.
14971 `glLoadTransposeMatrix' replaces the current matrix with the one whose
14972 elements are specified by M. The current matrix is the projection
14973 matrix, modelview matrix, or texture matrix, depending on the current
14974 matrix mode (see `glMatrixMode').
14976 The current matrix, M, defines a transformation of coordinates. For
14977 instance, assume M refers to the modelview matrix. If
14978 V=(V\u2061[0,],V\u2061[1,]V\u2061[2,]V\u2061[3,]) is the set of object coordinates of a
14979 vertex, and M points to an array of 16 single- or double-precision
14980 floating-point values M={M\u2061[0,],M\u2061[1,]...M\u2061[15,]} , then the modelview
14981 transformation M\u2061(V,) does the following:
14983 M\u2061(V,)=((M\u2061[0,] M\u2061[1,] M\u2061[2,] M\u2061[3,]), (M\u2061[4,] M\u2061[5,] M\u2061[6,] M\u2061[7,]),
14984 (M\u2061[8,] M\u2061[9,] M\u2061[10,] M\u2061[11,]), (M\u2061[12,] M\u2061[13,] M\u2061[14,]
14985 M\u2061[15,]),)×((V\u2061[0,]), (V\u2061[1,]), (V\u2061[2,]), (V\u2061[3,]),)
14989 Projection and texture transformations are similarly defined.
14991 Calling `glLoadTransposeMatrix' with matrix M is identical in operation
14992 to `glLoadMatrix' with M^T , where T represents the transpose.
14994 `GL_INVALID_OPERATION' is generated if `glLoadTransposeMatrix' is
14995 executed between the execution of `glBegin' and the corresponding
14996 execution of `glEnd'.")
14998 (define-gl-procedures
14999 ((glLogicOp (opcode GLenum) -> void))
15000 "Specify a logical pixel operation for color index rendering.
15003 Specifies a symbolic constant that selects a logical operation. The
15004 following symbols are accepted: `GL_CLEAR', `GL_SET', `GL_COPY',
15005 `GL_COPY_INVERTED', `GL_NOOP', `GL_INVERT', `GL_AND', `GL_NAND',
15006 `GL_OR', `GL_NOR', `GL_XOR', `GL_EQUIV', `GL_AND_REVERSE',
15007 `GL_AND_INVERTED', `GL_OR_REVERSE', and `GL_OR_INVERTED'. The
15008 initial value is `GL_COPY'.
15010 `glLogicOp' specifies a logical operation that, when enabled, is applied
15011 between the incoming color index or RGBA color and the color index or
15012 RGBA color at the corresponding location in the frame buffer. To enable
15013 or disable the logical operation, call `glEnable' and `glDisable' using
15014 the symbolic constant `GL_COLOR_LOGIC_OP' for RGBA mode or
15015 `GL_INDEX_LOGIC_OP' for color index mode. The initial value is disabled
15016 for both operations.
15021 *Resulting Operation*
15071 OPCODE is a symbolic constant chosen from the list above. In the
15072 explanation of the logical operations, S represents the incoming color
15073 index and D represents the index in the frame buffer. Standard
15074 C-language operators are used. As these bitwise operators suggest, the
15075 logical operation is applied independently to each bit pair of the
15076 source and destination indices or colors.
15078 `GL_INVALID_ENUM' is generated if OPCODE is not an accepted value.
15080 `GL_INVALID_OPERATION' is generated if `glLogicOp' is executed between
15081 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15083 (define-gl-procedures
15090 (points const-GLfloat-*)
15099 (points const-GLdouble-*)
15102 "Define a one-dimensional evaluator.
15105 Specifies the kind of values that are generated by the evaluator.
15106 Symbolic constants `GL_MAP1_VERTEX_3', `GL_MAP1_VERTEX_4',
15107 `GL_MAP1_INDEX', `GL_MAP1_COLOR_4', `GL_MAP1_NORMAL',
15108 `GL_MAP1_TEXTURE_COORD_1', `GL_MAP1_TEXTURE_COORD_2',
15109 `GL_MAP1_TEXTURE_COORD_3', and `GL_MAP1_TEXTURE_COORD_4' are
15115 Specify a linear mapping of U , as presented to `glEvalCoord1', to
15116 U^ , the variable that is evaluated by the equations specified by
15120 Specifies the number of floats or doubles between the beginning of
15121 one control point and the beginning of the next one in the data
15122 structure referenced in POINTS. This allows control points to be
15123 embedded in arbitrary data structures. The only constraint is that
15124 the values for a particular control point must occupy contiguous
15128 Specifies the number of control points. Must be positive.
15131 Specifies a pointer to the array of control points.
15133 Evaluators provide a way to use polynomial or rational polynomial
15134 mapping to produce vertices, normals, texture coordinates, and colors.
15135 The values produced by an evaluator are sent to further stages of GL
15136 processing just as if they had been presented using `glVertex',
15137 `glNormal', `glTexCoord', and `glColor' commands, except that the
15138 generated values do not update the current normal, texture coordinates,
15141 All polynomial or rational polynomial splines of any degree (up to the
15142 maximum degree supported by the GL implementation) can be described
15143 using evaluators. These include almost all splines used in computer
15144 graphics: B-splines, Bezier curves, Hermite splines, and so on.
15146 Evaluators define curves based on Bernstein polynomials. Define P\u2061(U^,)
15149 P\u2061(U^,)=ΣI=0NB_I,^N\u2061(U^,)\u2062R_I
15153 where R_I is a control point and B_I,^N\u2061(U^,) is the I th Bernstein
15154 polynomial of degree N (ORDER = N+1 ):
15156 B_I,^N\u2061(U^,)=((N), (I),,)\u2062U^,^I\u2062(1-U^,)^N-I,,
15160 0^0==1 and ((N), (0),,)==1
15162 `glMap1' is used to define the basis and to specify what kind of values
15163 are produced. Once defined, a map can be enabled and disabled by
15164 calling `glEnable' and `glDisable' with the map name, one of the nine
15165 predefined values for TARGET described below. `glEvalCoord1' evaluates
15166 the one-dimensional maps that are enabled. When `glEvalCoord1' presents
15167 a value U , the Bernstein functions are evaluated using U^ , where
15170 TARGET is a symbolic constant that indicates what kind of control points
15171 are provided in POINTS, and what output is generated when the map is
15172 evaluated. It can assume one of nine predefined values:
15175 Each control point is three floating-point values representing X ,
15176 Y , and Z . Internal `glVertex3' commands are generated when the
15180 Each control point is four floating-point values representing X , Y
15181 , Z , and W . Internal `glVertex4' commands are generated when the
15185 Each control point is a single floating-point value representing a
15186 color index. Internal `glIndex' commands are generated when the
15187 map is evaluated but the current index is not updated with the
15188 value of these `glIndex' commands.
15191 Each control point is four floating-point values representing red,
15192 green, blue, and alpha. Internal `glColor4' commands are generated
15193 when the map is evaluated but the current color is not updated with
15194 the value of these `glColor4' commands.
15197 Each control point is three floating-point values representing the
15198 X , Y , and Z components of a normal vector. Internal `glNormal'
15199 commands are generated when the map is evaluated but the current
15200 normal is not updated with the value of these `glNormal' commands.
15202 `GL_MAP1_TEXTURE_COORD_1'
15203 Each control point is a single floating-point value representing
15204 the S texture coordinate. Internal `glTexCoord1' commands are
15205 generated when the map is evaluated but the current texture
15206 coordinates are not updated with the value of these `glTexCoord'
15209 `GL_MAP1_TEXTURE_COORD_2'
15210 Each control point is two floating-point values representing the S
15211 and T texture coordinates. Internal `glTexCoord2' commands are
15212 generated when the map is evaluated but the current texture
15213 coordinates are not updated with the value of these `glTexCoord'
15216 `GL_MAP1_TEXTURE_COORD_3'
15217 Each control point is three floating-point values representing the
15218 S , T , and R texture coordinates. Internal `glTexCoord3' commands
15219 are generated when the map is evaluated but the current texture
15220 coordinates are not updated with the value of these `glTexCoord'
15223 `GL_MAP1_TEXTURE_COORD_4'
15224 Each control point is four floating-point values representing the S
15225 , T , R , and Q texture coordinates. Internal `glTexCoord4'
15226 commands are generated when the map is evaluated but the current
15227 texture coordinates are not updated with the value of these
15228 `glTexCoord' commands.
15230 STRIDE, ORDER, and POINTS define the array addressing for accessing the
15231 control points. POINTS is the location of the first control point,
15232 which occupies one, two, three, or four contiguous memory locations,
15233 depending on which map is being defined. ORDER is the number of control
15234 points in the array. STRIDE specifies how many float or double
15235 locations to advance the internal memory pointer to reach the next
15238 `GL_INVALID_ENUM' is generated if TARGET is not an accepted value.
15240 `GL_INVALID_VALUE' is generated if U1 is equal to U2.
15242 `GL_INVALID_VALUE' is generated if STRIDE is less than the number of
15243 values in a control point.
15245 `GL_INVALID_VALUE' is generated if ORDER is less than 1 or greater than
15246 the return value of `GL_MAX_EVAL_ORDER'.
15248 `GL_INVALID_OPERATION' is generated if `glMap1' is executed between the
15249 execution of `glBegin' and the corresponding execution of `glEnd'.
15251 `GL_INVALID_OPERATION' is generated if `glMap1' is called and the value
15252 of `GL_ACTIVE_TEXTURE' is not `GL_TEXTURE0'.")
15254 (define-gl-procedures
15265 (points const-GLfloat-*)
15278 (points const-GLdouble-*)
15281 "Define a two-dimensional evaluator.
15284 Specifies the kind of values that are generated by the evaluator.
15285 Symbolic constants `GL_MAP2_VERTEX_3', `GL_MAP2_VERTEX_4',
15286 `GL_MAP2_INDEX', `GL_MAP2_COLOR_4', `GL_MAP2_NORMAL',
15287 `GL_MAP2_TEXTURE_COORD_1', `GL_MAP2_TEXTURE_COORD_2',
15288 `GL_MAP2_TEXTURE_COORD_3', and `GL_MAP2_TEXTURE_COORD_4' are
15294 Specify a linear mapping of U , as presented to `glEvalCoord2', to
15295 U^ , one of the two variables that are evaluated by the equations
15296 specified by this command. Initially, U1 is 0 and U2 is 1.
15299 Specifies the number of floats or doubles between the beginning of
15300 control point R_IJ and the beginning of control point R_(I+1,)\u2062J, ,
15301 where I and J are the U and V control point indices, respectively.
15302 This allows control points to be embedded in arbitrary data
15303 structures. The only constraint is that the values for a
15304 particular control point must occupy contiguous memory locations.
15305 The initial value of USTRIDE is 0.
15308 Specifies the dimension of the control point array in the U axis.
15309 Must be positive. The initial value is 1.
15314 Specify a linear mapping of V , as presented to `glEvalCoord2', to
15315 V^ , one of the two variables that are evaluated by the equations
15316 specified by this command. Initially, V1 is 0 and V2 is 1.
15319 Specifies the number of floats or doubles between the beginning of
15320 control point R_IJ and the beginning of control point R_I\u2061(J+1,), ,
15321 where I and J are the U and V control point indices, respectively.
15322 This allows control points to be embedded in arbitrary data
15323 structures. The only constraint is that the values for a
15324 particular control point must occupy contiguous memory locations.
15325 The initial value of VSTRIDE is 0.
15328 Specifies the dimension of the control point array in the V axis.
15329 Must be positive. The initial value is 1.
15332 Specifies a pointer to the array of control points.
15334 Evaluators provide a way to use polynomial or rational polynomial
15335 mapping to produce vertices, normals, texture coordinates, and colors.
15336 The values produced by an evaluator are sent on to further stages of GL
15337 processing just as if they had been presented using `glVertex',
15338 `glNormal', `glTexCoord', and `glColor' commands, except that the
15339 generated values do not update the current normal, texture coordinates,
15342 All polynomial or rational polynomial splines of any degree (up to the
15343 maximum degree supported by the GL implementation) can be described
15344 using evaluators. These include almost all surfaces used in computer
15345 graphics, including B-spline surfaces, NURBS surfaces, Bezier surfaces,
15348 Evaluators define surfaces based on bivariate Bernstein polynomials.
15349 Define P\u2061(U^,V^) as
15351 P\u2061(U^,V^)=ΣI=0NΣJ=0MB_I,^N\u2061(U^,)\u2062B_J,^M\u2061(V^,)\u2062R_IJ
15355 where R_IJ is a control point, B_I,^N\u2061(U^,) is the I th Bernstein
15356 polynomial of degree N (UORDER = N+1 )
15358 B_I,^N\u2061(U^,)=((N), (I),,)\u2062U^,^I\u2062(1-U^,)^N-I,,
15360 and B_J,^M\u2061(V^,) is the J th Bernstein polynomial of degree M (VORDER =
15363 B_J,^M\u2061(V^,)=((M), (J),,)\u2062V^,^J\u2062(1-V^,)^M-J,,
15365 Recall that 0^0==1 and ((N), (0),,)==1
15367 `glMap2' is used to define the basis and to specify what kind of values
15368 are produced. Once defined, a map can be enabled and disabled by
15369 calling `glEnable' and `glDisable' with the map name, one of the nine
15370 predefined values for TARGET, described below. When `glEvalCoord2'
15371 presents values U and V , the bivariate Bernstein polynomials are
15372 evaluated using U^ and V^ , where
15378 TARGET is a symbolic constant that indicates what kind of control points
15379 are provided in POINTS, and what output is generated when the map is
15380 evaluated. It can assume one of nine predefined values:
15383 Each control point is three floating-point values representing X ,
15384 Y , and Z . Internal `glVertex3' commands are generated when the
15388 Each control point is four floating-point values representing X , Y
15389 , Z , and W . Internal `glVertex4' commands are generated when the
15393 Each control point is a single floating-point value representing a
15394 color index. Internal `glIndex' commands are generated when the
15395 map is evaluated but the current index is not updated with the
15396 value of these `glIndex' commands.
15399 Each control point is four floating-point values representing red,
15400 green, blue, and alpha. Internal `glColor4' commands are generated
15401 when the map is evaluated but the current color is not updated with
15402 the value of these `glColor4' commands.
15405 Each control point is three floating-point values representing the
15406 X , Y , and Z components of a normal vector. Internal `glNormal'
15407 commands are generated when the map is evaluated but the current
15408 normal is not updated with the value of these `glNormal' commands.
15410 `GL_MAP2_TEXTURE_COORD_1'
15411 Each control point is a single floating-point value representing
15412 the S texture coordinate. Internal `glTexCoord1' commands are
15413 generated when the map is evaluated but the current texture
15414 coordinates are not updated with the value of these `glTexCoord'
15417 `GL_MAP2_TEXTURE_COORD_2'
15418 Each control point is two floating-point values representing the S
15419 and T texture coordinates. Internal `glTexCoord2' commands are
15420 generated when the map is evaluated but the current texture
15421 coordinates are not updated with the value of these `glTexCoord'
15424 `GL_MAP2_TEXTURE_COORD_3'
15425 Each control point is three floating-point values representing the
15426 S , T , and R texture coordinates. Internal `glTexCoord3' commands
15427 are generated when the map is evaluated but the current texture
15428 coordinates are not updated with the value of these `glTexCoord'
15431 `GL_MAP2_TEXTURE_COORD_4'
15432 Each control point is four floating-point values representing the S
15433 , T , R , and Q texture coordinates. Internal `glTexCoord4'
15434 commands are generated when the map is evaluated but the current
15435 texture coordinates are not updated with the value of these
15436 `glTexCoord' commands.
15438 USTRIDE, UORDER, VSTRIDE, VORDER, and POINTS define the array addressing
15439 for accessing the control points. POINTS is the location of the first
15440 control point, which occupies one, two, three, or four contiguous memory
15441 locations, depending on which map is being defined. There are
15442 UORDER×VORDER control points in the array. USTRIDE specifies how many
15443 float or double locations are skipped to advance the internal memory
15444 pointer from control point R_I\u2062J, to control point R_(I+1,)\u2062J, . VSTRIDE
15445 specifies how many float or double locations are skipped to advance the
15446 internal memory pointer from control point R_I\u2062J, to control point
15449 `GL_INVALID_ENUM' is generated if TARGET is not an accepted value.
15451 `GL_INVALID_VALUE' is generated if U1 is equal to U2, or if V1 is equal
15454 `GL_INVALID_VALUE' is generated if either USTRIDE or VSTRIDE is less
15455 than the number of values in a control point.
15457 `GL_INVALID_VALUE' is generated if either UORDER or VORDER is less than
15458 1 or greater than the return value of `GL_MAX_EVAL_ORDER'.
15460 `GL_INVALID_OPERATION' is generated if `glMap2' is executed between the
15461 execution of `glBegin' and the corresponding execution of `glEnd'.
15463 `GL_INVALID_OPERATION' is generated if `glMap2' is called and the value
15464 of `GL_ACTIVE_TEXTURE' is not `GL_TEXTURE0'.")
15466 (define-gl-procedures
15472 (glUnmapBuffer (target GLenum) -> GLboolean))
15473 "Map a buffer object's data store.
15476 Specifies the target buffer object being mapped. The symbolic
15477 constant must be `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
15478 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
15481 Specifies the access policy, indicating whether it will be possible
15482 to read from, write to, or both read from and write to the buffer
15483 object's mapped data store. The symbolic constant must be
15484 `GL_READ_ONLY', `GL_WRITE_ONLY', or `GL_READ_WRITE'.
15486 `glMapBuffer' maps to the client's address space the entire data store
15487 of the buffer object currently bound to TARGET. The data can then be
15488 directly read and/or written relative to the returned pointer, depending
15489 on the specified ACCESS policy. If the GL is unable to map the buffer
15490 object's data store, `glMapBuffer' generates an error and returns
15491 `NULL'. This may occur for system-specific reasons, such as low virtual
15492 memory availability.
15494 If a mapped data store is accessed in a way inconsistent with the
15495 specified ACCESS policy, no error is generated, but performance may be
15496 negatively impacted and system errors, including program termination,
15497 may result. Unlike the USAGE parameter of `glBufferData', ACCESS is not
15498 a hint, and does in fact constrain the usage of the mapped data store on
15499 some GL implementations. In order to achieve the highest performance
15500 available, a buffer object's data store should be used in ways
15501 consistent with both its specified USAGE and ACCESS parameters.
15503 A mapped data store must be unmapped with `glUnmapBuffer' before its
15504 buffer object is used. Otherwise an error will be generated by any GL
15505 command that attempts to dereference the buffer object's data store.
15506 When a data store is unmapped, the pointer to its data store becomes
15507 invalid. `glUnmapBuffer' returns `GL_TRUE' unless the data store
15508 contents have become corrupt during the time the data store was mapped.
15509 This can occur for system-specific reasons that affect the availability
15510 of graphics memory, such as screen mode changes. In such situations,
15511 `GL_FALSE' is returned and the data store contents are undefined. An
15512 application must detect this rare condition and reinitialize the data
15515 A buffer object's mapped data store is automatically unmapped when the
15516 buffer object is deleted or its data store is recreated with
15519 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
15520 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
15521 `GL_PIXEL_UNPACK_BUFFER'.
15523 `GL_INVALID_ENUM' is generated if ACCESS is not `GL_READ_ONLY',
15524 `GL_WRITE_ONLY', or `GL_READ_WRITE'.
15526 `GL_OUT_OF_MEMORY' is generated when `glMapBuffer' is executed if the GL
15527 is unable to map the buffer object's data store. This may occur for a
15528 variety of system-specific reasons, such as the absence of sufficient
15529 remaining virtual memory.
15531 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
15532 is bound to TARGET.
15534 `GL_INVALID_OPERATION' is generated if `glMapBuffer' is executed for a
15535 buffer object whose data store is already mapped.
15537 `GL_INVALID_OPERATION' is generated if `glUnmapBuffer' is executed for a
15538 buffer object whose data store is not currently mapped.
15540 `GL_INVALID_OPERATION' is generated if `glMapBuffer' or `glUnmapBuffer'
15541 is executed between the execution of `glBegin' and the corresponding
15542 execution of `glEnd'.")
15544 (define-gl-procedures
15575 "Define a one- or two-dimensional mesh.
15578 Specifies the number of partitions in the grid range interval [U1,
15579 U2]. Must be positive.
15584 Specify the mappings for integer grid domain values I=0 and I=UN .
15587 Specifies the number of partitions in the grid range interval [V1,
15588 V2] (`glMapGrid2' only).
15593 Specify the mappings for integer grid domain values J=0 and J=VN
15594 (`glMapGrid2' only).
15596 `glMapGrid' and `glEvalMesh' are used together to efficiently generate
15597 and evaluate a series of evenly-spaced map domain values. `glEvalMesh'
15598 steps through the integer domain of a one- or two-dimensional grid,
15599 whose range is the domain of the evaluation maps specified by `glMap1'
15602 `glMapGrid1' and `glMapGrid2' specify the linear grid mappings between
15603 the I (or I and J ) integer grid coordinates, to the U (or U and V )
15604 floating-point evaluation map coordinates. See `glMap1' and `glMap2'
15605 for details of how U and V coordinates are evaluated.
15607 `glMapGrid1' specifies a single linear mapping such that integer grid
15608 coordinate 0 maps exactly to U1, and integer grid coordinate UN maps
15609 exactly to U2. All other integer grid coordinates I are mapped so that
15611 U=I\u2061(U2-U1,)/UN+U1
15613 `glMapGrid2' specifies two such linear mappings. One maps integer grid
15614 coordinate I=0 exactly to U1, and integer grid coordinate I=UN exactly
15615 to U2. The other maps integer grid coordinate J=0 exactly to V1, and
15616 integer grid coordinate J=VN exactly to V2. Other integer grid
15617 coordinates I and J are mapped such that
15619 U=I\u2061(U2-U1,)/UN+U1
15621 V=J\u2061(V2-V1,)/VN+V1
15623 The mappings specified by `glMapGrid' are used identically by
15624 `glEvalMesh' and `glEvalPoint'.
15626 `GL_INVALID_VALUE' is generated if either UN or VN is not positive.
15628 `GL_INVALID_OPERATION' is generated if `glMapGrid' is executed between
15629 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15631 (define-gl-procedures
15647 (params const-GLfloat-*)
15653 (params const-GLint-*)
15656 "Specify material parameters for the lighting model.
15659 Specifies which face or faces are being updated. Must be one of
15660 `GL_FRONT', `GL_BACK', or `GL_FRONT_AND_BACK'.
15663 Specifies the single-valued material parameter of the face or faces
15664 that is being updated. Must be `GL_SHININESS'.
15667 Specifies the value that parameter `GL_SHININESS' will be set to.
15669 `glMaterial' assigns values to material parameters. There are two
15670 matched sets of material parameters. One, the FRONT-FACING set, is used
15671 to shade points, lines, bitmaps, and all polygons (when two-sided
15672 lighting is disabled), or just front-facing polygons (when two-sided
15673 lighting is enabled). The other set, BACK-FACING, is used to shade
15674 back-facing polygons only when two-sided lighting is enabled. Refer to
15675 the `glLightModel' reference page for details concerning one- and
15676 two-sided lighting calculations.
15678 `glMaterial' takes three arguments. The first, FACE, specifies whether
15679 the `GL_FRONT' materials, the `GL_BACK' materials, or both
15680 `GL_FRONT_AND_BACK' materials will be modified. The second, PNAME,
15681 specifies which of several parameters in one or both sets will be
15682 modified. The third, PARAMS, specifies what value or values will be
15683 assigned to the specified parameter.
15685 Material parameters are used in the lighting equation that is optionally
15686 applied to each vertex. The equation is discussed in the `glLightModel'
15687 reference page. The parameters that can be specified using
15688 `glMaterial', and their interpretations by the lighting equation, are as
15692 PARAMS contains four integer or floating-point values that specify
15693 the ambient RGBA reflectance of the material. Integer values are
15694 mapped linearly such that the most positive representable value
15695 maps to 1.0, and the most negative representable value maps to -1.0
15696 . Floating-point values are mapped directly. Neither integer nor
15697 floating-point values are clamped. The initial ambient reflectance
15698 for both front- and back-facing materials is (0.2, 0.2, 0.2, 1.0).
15701 PARAMS contains four integer or floating-point values that specify
15702 the diffuse RGBA reflectance of the material. Integer values are
15703 mapped linearly such that the most positive representable value
15704 maps to 1.0, and the most negative representable value maps to -1.0
15705 . Floating-point values are mapped directly. Neither integer nor
15706 floating-point values are clamped. The initial diffuse reflectance
15707 for both front- and back-facing materials is (0.8, 0.8, 0.8, 1.0).
15710 PARAMS contains four integer or floating-point values that specify
15711 the specular RGBA reflectance of the material. Integer values are
15712 mapped linearly such that the most positive representable value
15713 maps to 1.0, and the most negative representable value maps to -1.0
15714 . Floating-point values are mapped directly. Neither integer nor
15715 floating-point values are clamped. The initial specular
15716 reflectance for both front- and back-facing materials is (0, 0, 0,
15720 PARAMS contains four integer or floating-point values that specify
15721 the RGBA emitted light intensity of the material. Integer values
15722 are mapped linearly such that the most positive representable value
15723 maps to 1.0, and the most negative representable value maps to -1.0
15724 . Floating-point values are mapped directly. Neither integer nor
15725 floating-point values are clamped. The initial emission intensity
15726 for both front- and back-facing materials is (0, 0, 0, 1).
15729 PARAMS is a single integer or floating-point value that specifies
15730 the RGBA specular exponent of the material. Integer and
15731 floating-point values are mapped directly. Only values in the
15732 range [0,128] are accepted. The initial specular exponent for both
15733 front- and back-facing materials is 0.
15735 `GL_AMBIENT_AND_DIFFUSE'
15736 Equivalent to calling `glMaterial' twice with the same parameter
15737 values, once with `GL_AMBIENT' and once with `GL_DIFFUSE'.
15740 PARAMS contains three integer or floating-point values specifying
15741 the color indices for ambient, diffuse, and specular lighting.
15742 These three values, and `GL_SHININESS', are the only material
15743 values used by the color index mode lighting equation. Refer to
15744 the `glLightModel' reference page for a discussion of color index
15747 `GL_INVALID_ENUM' is generated if either FACE or PNAME is not an
15750 `GL_INVALID_VALUE' is generated if a specular exponent outside the range
15751 [0,128] is specified.")
15753 (define-gl-procedures
15754 ((glMatrixMode (mode GLenum) -> void))
15755 "Specify which matrix is the current matrix.
15758 Specifies which matrix stack is the target for subsequent matrix
15759 operations. Three values are accepted: `GL_MODELVIEW',
15760 `GL_PROJECTION', and `GL_TEXTURE'. The initial value is
15761 `GL_MODELVIEW'. Additionally, if the `ARB_imaging' extension is
15762 supported, `GL_COLOR' is also accepted.
15764 `glMatrixMode' sets the current matrix mode. MODE can assume one of
15768 Applies subsequent matrix operations to the modelview matrix stack.
15771 Applies subsequent matrix operations to the projection matrix
15775 Applies subsequent matrix operations to the texture matrix stack.
15778 Applies subsequent matrix operations to the color matrix stack.
15780 To find out which matrix stack is currently the target of all matrix
15781 operations, call `glGet' with argument `GL_MATRIX_MODE'. The initial
15782 value is `GL_MODELVIEW'.
15784 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15786 `GL_INVALID_OPERATION' is generated if `glMatrixMode' is executed
15787 between the execution of `glBegin' and the corresponding execution of
15790 (define-gl-procedures
15793 (internalformat GLenum)
15797 "Define minmax table.
15800 The minmax table whose parameters are to be set. Must be
15804 The format of entries in the minmax table. Must be one of
15805 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
15806 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
15807 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
15808 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
15809 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
15810 `GL_LUMINANCE16_ALPHA16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4',
15811 `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16',
15812 `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8',
15813 `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
15816 If `GL_TRUE', pixels will be consumed by the minmax process and no
15817 drawing or texture loading will take place. If `GL_FALSE', pixels
15818 will proceed to the final conversion process after minmax.
15820 When `GL_MINMAX' is enabled, the RGBA components of incoming pixels are
15821 compared to the minimum and maximum values for each component, which are
15822 stored in the two-element minmax table. (The first element stores the
15823 minima, and the second element stores the maxima.) If a pixel component
15824 is greater than the corresponding component in the maximum element, then
15825 the maximum element is updated with the pixel component value. If a
15826 pixel component is less than the corresponding component in the minimum
15827 element, then the minimum element is updated with the pixel component
15828 value. (In both cases, if the internal format of the minmax table
15829 includes luminance, then the R color component of incoming pixels is
15830 used for comparison.) The contents of the minmax table may be retrieved
15831 at a later time by calling `glGetMinmax'. The minmax operation is
15832 enabled or disabled by calling `glEnable' or `glDisable', respectively,
15833 with an argument of `GL_MINMAX'.
15835 `glMinmax' redefines the current minmax table to have entries of the
15836 format specified by INTERNALFORMAT. The maximum element is initialized
15837 with the smallest possible component values, and the minimum element is
15838 initialized with the largest possible component values. The values in
15839 the previous minmax table, if any, are lost. If SINK is `GL_TRUE', then
15840 pixels are discarded after minmax; no further processing of the pixels
15841 takes place, and no drawing, texture loading, or pixel readback will
15846 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
15849 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
15852 `GL_INVALID_OPERATION' is generated if `glMinmax' is executed between
15853 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15855 (define-gl-procedures
15856 ((glMultiDrawArrays
15860 (primcount GLsizei)
15863 "Render multiple sets of primitives from array data.
15866 Specifies what kind of primitives to render. Symbolic constants
15867 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
15868 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
15869 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
15872 Points to an array of starting indices in the enabled arrays.
15875 Points to an array of the number of indices to be rendered.
15878 Specifies the size of the first and count
15880 `glMultiDrawArrays' specifies multiple sets of geometric primitives with
15881 very few subroutine calls. Instead of calling a GL procedure to pass
15882 each individual vertex, normal, texture coordinate, edge flag, or color,
15883 you can prespecify separate arrays of vertices, normals, and colors and
15884 use them to construct a sequence of primitives with a single call to
15885 `glMultiDrawArrays'.
15887 `glMultiDrawArrays' behaves identically to `glDrawArrays' except that
15888 PRIMCOUNT separate ranges of elements are specified instead.
15890 When `glMultiDrawArrays' is called, it uses COUNT sequential elements
15891 from each enabled array to construct a sequence of geometric primitives,
15892 beginning with element FIRST. MODE specifies what kind of primitives
15893 are constructed, and how the array elements construct those primitives.
15894 If `GL_VERTEX_ARRAY' is not enabled, no geometric primitives are
15897 Vertex attributes that are modified by `glMultiDrawArrays' have an
15898 unspecified value after `glMultiDrawArrays' returns. For example, if
15899 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
15900 after `glMultiDrawArrays' executes. Attributes that aren't modified
15901 remain well defined.
15903 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15905 `GL_INVALID_VALUE' is generated if PRIMCOUNT is negative.
15907 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
15908 bound to an enabled array and the buffer object's data store is
15911 `GL_INVALID_OPERATION' is generated if `glMultiDrawArrays' is executed
15912 between the execution of `glBegin' and the corresponding `glEnd'.")
15914 (define-gl-procedures
15915 ((glMultiDrawElements
15917 (count const-GLsizei-*)
15919 (indices const-GLvoid-**)
15920 (primcount GLsizei)
15923 "Render multiple sets of primitives by specifying indices of array data
15927 Specifies what kind of primitives to render. Symbolic constants
15928 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
15929 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
15930 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
15933 Points to an array of the elements counts.
15936 Specifies the type of the values in INDICES. Must be one of
15937 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
15940 Specifies a pointer to the location where the indices are stored.
15943 Specifies the size of the COUNT array.
15945 `glMultiDrawElements' specifies multiple sets of geometric primitives
15946 with very few subroutine calls. Instead of calling a GL function to
15947 pass each individual vertex, normal, texture coordinate, edge flag, or
15948 color, you can prespecify separate arrays of vertices, normals, and so
15949 on, and use them to construct a sequence of primitives with a single
15950 call to `glMultiDrawElements'.
15952 `glMultiDrawElements' is identical in operation to `glDrawElements'
15953 except that PRIMCOUNT separate lists of elements are specified.
15955 Vertex attributes that are modified by `glMultiDrawElements' have an
15956 unspecified value after `glMultiDrawElements' returns. For example, if
15957 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
15958 after `glMultiDrawElements' executes. Attributes that aren't modified
15959 maintain their previous values.
15961 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15963 `GL_INVALID_VALUE' is generated if PRIMCOUNT is negative.
15965 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
15966 bound to an enabled array or the element array and the buffer object's
15967 data store is currently mapped.
15969 `GL_INVALID_OPERATION' is generated if `glMultiDrawElements' is executed
15970 between the execution of `glBegin' and the corresponding `glEnd'.")
15972 (define-gl-procedures
15973 ((glMultiTexCoord1s
16077 (glMultiTexCoord1sv
16079 (v const-GLshort-*)
16082 (glMultiTexCoord1iv
16087 (glMultiTexCoord1fv
16089 (v const-GLfloat-*)
16092 (glMultiTexCoord1dv
16094 (v const-GLdouble-*)
16097 (glMultiTexCoord2sv
16099 (v const-GLshort-*)
16102 (glMultiTexCoord2iv
16107 (glMultiTexCoord2fv
16109 (v const-GLfloat-*)
16112 (glMultiTexCoord2dv
16114 (v const-GLdouble-*)
16117 (glMultiTexCoord3sv
16119 (v const-GLshort-*)
16122 (glMultiTexCoord3iv
16127 (glMultiTexCoord3fv
16129 (v const-GLfloat-*)
16132 (glMultiTexCoord3dv
16134 (v const-GLdouble-*)
16137 (glMultiTexCoord4sv
16139 (v const-GLshort-*)
16142 (glMultiTexCoord4iv
16147 (glMultiTexCoord4fv
16149 (v const-GLfloat-*)
16152 (glMultiTexCoord4dv
16154 (v const-GLdouble-*)
16157 "Set the current texture coordinates.
16160 Specifies the texture unit whose coordinates should be modified.
16161 The number of texture units is implementation dependent, but must
16162 be at least two. Symbolic constant must be one of `GL_TEXTURE' I ,
16163 where i ranges from 0 to `GL_MAX_TEXTURE_COORDS' - 1, which is an
16164 implementation-dependent value.
16173 Specify S, T, R, and Q texture coordinates for TARGET texture unit.
16174 Not all parameters are present in all forms of the command.
16176 `glMultiTexCoord' specifies texture coordinates in one, two, three, or
16177 four dimensions. `glMultiTexCoord1' sets the current texture
16178 coordinates to (S,001) ; a call to `glMultiTexCoord2' sets them to
16179 (S,T01) . Similarly, `glMultiTexCoord3' specifies the texture
16180 coordinates as (S,TR1) , and `glMultiTexCoord4' defines all four
16181 components explicitly as (S,TRQ) .
16183 The current texture coordinates are part of the data that is associated
16184 with each vertex and with the current raster position. Initially, the
16185 values for (S,TRQ) are (0,001) .")
16187 (define-gl-procedures
16188 ((glMultMatrixd (m const-GLdouble-*) -> void)
16189 (glMultMatrixf (m const-GLfloat-*) -> void))
16190 "Multiply the current matrix with the specified matrix.
16193 Points to 16 consecutive values that are used as the elements of a
16194 4×4 column-major matrix.
16196 `glMultMatrix' multiplies the current matrix with the one specified
16197 using M, and replaces the current matrix with the product.
16199 The current matrix is determined by the current matrix mode (see
16200 `glMatrixMode'). It is either the projection matrix, modelview matrix,
16201 or the texture matrix.
16203 `GL_INVALID_OPERATION' is generated if `glMultMatrix' is executed
16204 between the execution of `glBegin' and the corresponding execution of
16207 (define-gl-procedures
16208 ((glMultTransposeMatrixd
16209 (m const-GLdouble-*)
16212 (glMultTransposeMatrixf
16213 (m const-GLfloat-*)
16216 "Multiply the current matrix with the specified row-major ordered matrix.
16219 Points to 16 consecutive values that are used as the elements of a
16220 4×4 row-major matrix.
16222 `glMultTransposeMatrix' multiplies the current matrix with the one
16223 specified using M, and replaces the current matrix with the product.
16225 The current matrix is determined by the current matrix mode (see
16226 `glMatrixMode'). It is either the projection matrix, modelview matrix,
16227 or the texture matrix.
16229 `GL_INVALID_OPERATION' is generated if `glMultTransposeMatrix' is
16230 executed between the execution of `glBegin' and the corresponding
16231 execution of `glEnd'.")
16233 (define-gl-procedures
16234 ((glNewList (list GLuint) (mode GLenum) -> void)
16235 (glEndList -> void))
16236 "Create or replace a display list.
16239 Specifies the display-list name.
16242 Specifies the compilation mode, which can be `GL_COMPILE' or
16243 `GL_COMPILE_AND_EXECUTE'.
16245 Display lists are groups of GL commands that have been stored for
16246 subsequent execution. Display lists are created with `glNewList'. All
16247 subsequent commands are placed in the display list, in the order issued,
16248 until `glEndList' is called.
16250 `glNewList' has two arguments. The first argument, LIST, is a positive
16251 integer that becomes the unique name for the display list. Names can be
16252 created and reserved with `glGenLists' and tested for uniqueness with
16253 `glIsList'. The second argument, MODE, is a symbolic constant that can
16254 assume one of two values:
16257 Commands are merely compiled.
16259 `GL_COMPILE_AND_EXECUTE'
16260 Commands are executed as they are compiled into the display list.
16262 Certain commands are not compiled into the display list but are executed
16263 immediately, regardless of the display-list mode. These commands are
16264 `glAreTexturesResident', `glColorPointer', `glDeleteLists',
16265 `glDeleteTextures', `glDisableClientState', `glEdgeFlagPointer',
16266 `glEnableClientState', `glFeedbackBuffer', `glFinish', `glFlush',
16267 `glGenLists', `glGenTextures', `glIndexPointer', `glInterleavedArrays',
16268 `glIsEnabled', `glIsList', `glIsTexture', `glNormalPointer',
16269 `glPopClientAttrib', `glPixelStore', `glPushClientAttrib',
16270 `glReadPixels', `glRenderMode', `glSelectBuffer', `glTexCoordPointer',
16271 `glVertexPointer', and all of the `glGet' commands.
16273 Similarly, `glTexImage1D', `glTexImage2D', and `glTexImage3D' are
16274 executed immediately and not compiled into the display list when their
16275 first argument is `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_1D', or
16276 `GL_PROXY_TEXTURE_3D', respectively.
16278 When the `ARB_imaging' extension is supported, `glHistogram' executes
16279 immediately when its argument is `GL_PROXY_HISTOGRAM'. Similarly,
16280 `glColorTable' executes immediately when its first argument is
16281 `GL_PROXY_COLOR_TABLE', `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
16282 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
16284 For OpenGL versions 1.3 and greater, or when the `ARB_multitexture'
16285 extension is supported, `glClientActiveTexture' is not compiled into
16286 display lists, but executed immediately.
16288 When `glEndList' is encountered, the display-list definition is
16289 completed by associating the list with the unique name LIST (specified
16290 in the `glNewList' command). If a display list with name LIST already
16291 exists, it is replaced only when `glEndList' is called.
16293 `GL_INVALID_VALUE' is generated if LIST is 0.
16295 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
16297 `GL_INVALID_OPERATION' is generated if `glEndList' is called without a
16298 preceding `glNewList', or if `glNewList' is called while a display list
16301 `GL_INVALID_OPERATION' is generated if `glNewList' or `glEndList' is
16302 executed between the execution of `glBegin' and the corresponding
16303 execution of `glEnd'.
16305 `GL_OUT_OF_MEMORY' is generated if there is insufficient memory to
16306 compile the display list. If the GL version is 1.1 or greater, no
16307 change is made to the previous contents of the display list, if any, and
16308 no other change is made to the GL state. (It is as if no attempt had
16309 been made to create the new display list.)")
16311 (define-gl-procedures
16315 (pointer const-GLvoid-*)
16318 "Define an array of normals.
16321 Specifies the data type of each coordinate in the array. Symbolic
16322 constants `GL_BYTE', `GL_SHORT', `GL_INT', `GL_FLOAT', and
16323 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
16326 Specifies the byte offset between consecutive normals. If STRIDE
16327 is 0, the normals are understood to be tightly packed in the array.
16328 The initial value is 0.
16331 Specifies a pointer to the first coordinate of the first normal in
16332 the array. The initial value is 0.
16334 `glNormalPointer' specifies the location and data format of an array of
16335 normals to use when rendering. TYPE specifies the data type of each
16336 normal coordinate, and STRIDE specifies the byte stride from one normal
16337 to the next, allowing vertices and attributes to be packed into a single
16338 array or stored in separate arrays. (Single-array storage may be more
16339 efficient on some implementations; see `glInterleavedArrays'.)
16341 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
16342 target (see `glBindBuffer') while a normal array is specified, POINTER
16343 is treated as a byte offset into the buffer object's data store. Also,
16344 the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as normal
16345 vertex array client-side state (`GL_NORMAL_ARRAY_BUFFER_BINDING').
16347 When a normal array is specified, TYPE, STRIDE, and POINTER are saved as
16348 client-side state, in addition to the current vertex array buffer object
16351 To enable and disable the normal array, call `glEnableClientState' and
16352 `glDisableClientState' with the argument `GL_NORMAL_ARRAY'. If enabled,
16353 the normal array is used when `glDrawArrays', `glMultiDrawArrays',
16354 `glDrawElements', `glMultiDrawElements', `glDrawRangeElements', or
16355 `glArrayElement' is called.
16357 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
16359 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
16361 (define-gl-procedures
16392 (glNormal3bv (v const-GLbyte-*) -> void)
16393 (glNormal3dv (v const-GLdouble-*) -> void)
16394 (glNormal3fv (v const-GLfloat-*) -> void)
16395 (glNormal3iv (v const-GLint-*) -> void)
16396 (glNormal3sv (v const-GLshort-*) -> void))
16397 "Set the current normal vector.
16404 Specify the X , Y , and Z coordinates of the new current normal.
16405 The initial value of the current normal is the unit vector, (0, 0,
16410 The current normal is set to the given coordinates whenever `glNormal'
16411 is issued. Byte, short, or integer arguments are converted to
16412 floating-point format with a linear mapping that maps the most positive
16413 representable integer value to 1.0 and the most negative representable
16414 integer value to -1.0 .
16416 Normals specified with `glNormal' need not have unit length. If
16417 `GL_NORMALIZE' is enabled, then normals of any length specified with
16418 `glNormal' are normalized after transformation. If `GL_RESCALE_NORMAL'
16419 is enabled, normals are scaled by a scaling factor derived from the
16420 modelview matrix. `GL_RESCALE_NORMAL' requires that the originally
16421 specified normals were of unit length, and that the modelview matrix
16422 contain only uniform scales for proper results. To enable and disable
16423 normalization, call `glEnable' and `glDisable' with either
16424 `GL_NORMALIZE' or `GL_RESCALE_NORMAL'. Normalization is initially
16427 (define-gl-procedures
16437 "Multiply the current matrix with an orthographic matrix.
16442 Specify the coordinates for the left and right vertical clipping
16448 Specify the coordinates for the bottom and top horizontal clipping
16454 Specify the distances to the nearer and farther depth clipping
16455 planes. These values are negative if the plane is to be behind the
16458 `glOrtho' describes a transformation that produces a parallel
16459 projection. The current matrix (see `glMatrixMode') is multiplied by
16460 this matrix and the result replaces the current matrix, as if
16461 `glMultMatrix' were called with the following matrix as its argument:
16463 ((2/RIGHT-LEFT,, 0 0 T_X,), (0 2/TOP-BOTTOM,, 0 T_Y,), (0 0
16464 -2/FARVAL-NEARVAL,, T_Z,), (0 0 0 1),)
16466 where T_X=-RIGHT+LEFT,/RIGHT-LEFT,, T_Y=-TOP+BOTTOM,/TOP-BOTTOM,,
16467 T_Z=-FARVAL+NEARVAL,/FARVAL-NEARVAL,,
16469 Typically, the matrix mode is `GL_PROJECTION', and (LEFT,BOTTOM-NEARVAL)
16470 and (RIGHT,TOP-NEARVAL) specify the points on the near clipping plane
16471 that are mapped to the lower left and upper right corners of the window,
16472 respectively, assuming that the eye is located at (0, 0, 0). -FARVAL
16473 specifies the location of the far clipping plane. Both NEARVAL and
16474 FARVAL can be either positive or negative.
16476 Use `glPushMatrix' and `glPopMatrix' to save and restore the current
16479 `GL_INVALID_VALUE' is generated if LEFT = RIGHT, or BOTTOM = TOP, or
16482 `GL_INVALID_OPERATION' is generated if `glOrtho' is executed between the
16483 execution of `glBegin' and the corresponding execution of `glEnd'.")
16485 (define-gl-procedures
16486 ((glPassThrough (token GLfloat) -> void))
16487 "Place a marker in the feedback buffer.
16490 Specifies a marker value to be placed in the feedback buffer
16491 following a `GL_PASS_THROUGH_TOKEN'.
16495 Feedback is a GL render mode. The mode is selected by calling
16496 `glRenderMode' with `GL_FEEDBACK'. When the GL is in feedback mode, no
16497 pixels are produced by rasterization. Instead, information about
16498 primitives that would have been rasterized is fed back to the
16499 application using the GL. See the `glFeedbackBuffer' reference page for
16500 a description of the feedback buffer and the values in it.
16502 `glPassThrough' inserts a user-defined marker in the feedback buffer
16503 when it is executed in feedback mode. TOKEN is returned as if it were a
16504 primitive; it is indicated with its own unique identifying value:
16505 `GL_PASS_THROUGH_TOKEN'. The order of `glPassThrough' commands with
16506 respect to the specification of graphics primitives is maintained.
16508 `GL_INVALID_OPERATION' is generated if `glPassThrough' is executed
16509 between the execution of `glBegin' and the corresponding execution of
16512 (define-gl-procedures
16516 (values const-GLfloat-*)
16522 (values const-GLuint-*)
16528 (values const-GLushort-*)
16531 "Set up pixel transfer maps.
16534 Specifies a symbolic map name. Must be one of the following:
16535 `GL_PIXEL_MAP_I_TO_I', `GL_PIXEL_MAP_S_TO_S',
16536 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
16537 `GL_PIXEL_MAP_I_TO_B', `GL_PIXEL_MAP_I_TO_A',
16538 `GL_PIXEL_MAP_R_TO_R', `GL_PIXEL_MAP_G_TO_G',
16539 `GL_PIXEL_MAP_B_TO_B', or `GL_PIXEL_MAP_A_TO_A'.
16542 Specifies the size of the map being defined.
16545 Specifies an array of MAPSIZE values.
16547 `glPixelMap' sets up translation tables, or MAPS, used by
16548 `glCopyPixels', `glCopyTexImage1D', `glCopyTexImage2D',
16549 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D',
16550 `glDrawPixels', `glReadPixels', `glTexImage1D', `glTexImage2D',
16551 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D', and
16552 `glTexSubImage3D'. Additionally, if the `ARB_imaging' subset is
16553 supported, the routines `glColorTable', `glColorSubTable',
16554 `glConvolutionFilter1D', `glConvolutionFilter2D', `glHistogram',
16555 `glMinmax', and `glSeparableFilter2D'. Use of these maps is described
16556 completely in the `glPixelTransfer' reference page, and partly in the
16557 reference pages for the pixel and texture image commands. Only the
16558 specification of the maps is described in this reference page.
16560 MAP is a symbolic map name, indicating one of ten maps to set. MAPSIZE
16561 specifies the number of entries in the map, and VALUES is a pointer to
16562 an array of MAPSIZE map values.
16564 If a non-zero named buffer object is bound to the
16565 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a pixel
16566 transfer map is specified, VALUES is treated as a byte offset into the
16567 buffer object's data store.
16569 The ten maps are as follows:
16571 `GL_PIXEL_MAP_I_TO_I'
16572 Maps color indices to color indices.
16574 `GL_PIXEL_MAP_S_TO_S'
16575 Maps stencil indices to stencil indices.
16577 `GL_PIXEL_MAP_I_TO_R'
16578 Maps color indices to red components.
16580 `GL_PIXEL_MAP_I_TO_G'
16581 Maps color indices to green components.
16583 `GL_PIXEL_MAP_I_TO_B'
16584 Maps color indices to blue components.
16586 `GL_PIXEL_MAP_I_TO_A'
16587 Maps color indices to alpha components.
16589 `GL_PIXEL_MAP_R_TO_R'
16590 Maps red components to red components.
16592 `GL_PIXEL_MAP_G_TO_G'
16593 Maps green components to green components.
16595 `GL_PIXEL_MAP_B_TO_B'
16596 Maps blue components to blue components.
16598 `GL_PIXEL_MAP_A_TO_A'
16599 Maps alpha components to alpha components.
16601 The entries in a map can be specified as single-precision floating-point
16602 numbers, unsigned short integers, or unsigned int integers. Maps that
16603 store color component values (all but `GL_PIXEL_MAP_I_TO_I' and
16604 `GL_PIXEL_MAP_S_TO_S') retain their values in floating-point format,
16605 with unspecified mantissa and exponent sizes. Floating-point values
16606 specified by `glPixelMapfv' are converted directly to the internal
16607 floating-point format of these maps, then clamped to the range [0,1].
16608 Unsigned integer values specified by `glPixelMapusv' and `glPixelMapuiv'
16609 are converted linearly such that the largest representable integer maps
16610 to 1.0, and 0 maps to 0.0.
16612 Maps that store indices, `GL_PIXEL_MAP_I_TO_I' and
16613 `GL_PIXEL_MAP_S_TO_S', retain their values in fixed-point format, with
16614 an unspecified number of bits to the right of the binary point.
16615 Floating-point values specified by `glPixelMapfv' are converted directly
16616 to the internal fixed-point format of these maps. Unsigned integer
16617 values specified by `glPixelMapusv' and `glPixelMapuiv' specify integer
16618 values, with all 0's to the right of the binary point.
16620 The following table shows the initial sizes and values for each of the
16621 maps. Maps that are indexed by either color or stencil indices must
16622 have MAPSIZE = 2^N for some N or the results are undefined. The maximum
16623 allowable size for each map depends on the implementation and can be
16624 determined by calling `glGet' with argument `GL_MAX_PIXEL_MAP_TABLE'.
16625 The single maximum applies to all maps; it is at least 32.
16628 *Lookup Index*, *Lookup Value*, *Initial Size*, *Initial Value*
16630 `GL_PIXEL_MAP_I_TO_I'
16631 color index , color index , 1 , 0
16633 `GL_PIXEL_MAP_S_TO_S'
16634 stencil index , stencil index , 1 , 0
16636 `GL_PIXEL_MAP_I_TO_R'
16637 color index , R , 1 , 0
16639 `GL_PIXEL_MAP_I_TO_G'
16640 color index , G , 1 , 0
16642 `GL_PIXEL_MAP_I_TO_B'
16643 color index , B , 1 , 0
16645 `GL_PIXEL_MAP_I_TO_A'
16646 color index , A , 1 , 0
16648 `GL_PIXEL_MAP_R_TO_R'
16651 `GL_PIXEL_MAP_G_TO_G'
16654 `GL_PIXEL_MAP_B_TO_B'
16657 `GL_PIXEL_MAP_A_TO_A'
16660 `GL_INVALID_ENUM' is generated if MAP is not an accepted value.
16662 `GL_INVALID_VALUE' is generated if MAPSIZE is less than one or larger
16663 than `GL_MAX_PIXEL_MAP_TABLE'.
16665 `GL_INVALID_VALUE' is generated if MAP is `GL_PIXEL_MAP_I_TO_I',
16666 `GL_PIXEL_MAP_S_TO_S', `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
16667 `GL_PIXEL_MAP_I_TO_B', or `GL_PIXEL_MAP_I_TO_A', and MAPSIZE is not a
16670 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16671 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
16672 data store is currently mapped.
16674 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16675 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
16676 unpacked from the buffer object such that the memory reads required
16677 would exceed the data store size.
16679 `GL_INVALID_OPERATION' is generated by `glPixelMapfv' if a non-zero
16680 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16681 VALUES is not evenly divisible into the number of bytes needed to store
16682 in memory a GLfloat datum.
16684 `GL_INVALID_OPERATION' is generated by `glPixelMapuiv' if a non-zero
16685 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16686 VALUES is not evenly divisible into the number of bytes needed to store
16687 in memory a GLuint datum.
16689 `GL_INVALID_OPERATION' is generated by `glPixelMapusv' if a non-zero
16690 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16691 VALUES is not evenly divisible into the number of bytes needed to store
16692 in memory a GLushort datum.
16694 `GL_INVALID_OPERATION' is generated if `glPixelMap' is executed between
16695 the execution of `glBegin' and the corresponding execution of `glEnd'.")
16697 (define-gl-procedures
16708 "Set pixel storage modes.
16711 Specifies the symbolic name of the parameter to be set. Six values
16712 affect the packing of pixel data into memory: `GL_PACK_SWAP_BYTES',
16713 `GL_PACK_LSB_FIRST', `GL_PACK_ROW_LENGTH', `GL_PACK_IMAGE_HEIGHT',
16714 `GL_PACK_SKIP_PIXELS', `GL_PACK_SKIP_ROWS', `GL_PACK_SKIP_IMAGES',
16715 and `GL_PACK_ALIGNMENT'. Six more affect the unpacking of pixel
16716 data FROM memory: `GL_UNPACK_SWAP_BYTES', `GL_UNPACK_LSB_FIRST',
16717 `GL_UNPACK_ROW_LENGTH', `GL_UNPACK_IMAGE_HEIGHT',
16718 `GL_UNPACK_SKIP_PIXELS', `GL_UNPACK_SKIP_ROWS',
16719 `GL_UNPACK_SKIP_IMAGES', and `GL_UNPACK_ALIGNMENT'.
16722 Specifies the value that PNAME is set to.
16724 `glPixelStore' sets pixel storage modes that affect the operation of
16725 subsequent `glDrawPixels' and `glReadPixels' as well as the unpacking of
16726 polygon stipple patterns (see `glPolygonStipple'), bitmaps (see
16727 `glBitmap'), texture patterns (see `glTexImage1D', `glTexImage2D',
16728 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D',
16729 `glTexSubImage3D'). Additionally, if the `ARB_imaging' extension is
16730 supported, pixel storage modes affect convolution filters (see
16731 `glConvolutionFilter1D', `glConvolutionFilter2D', and
16732 `glSeparableFilter2D', color table (see `glColorTable', and
16733 `glColorSubTable', and unpacking histogram (See `glHistogram'), and
16734 minmax (See `glMinmax') data.
16736 PNAME is a symbolic constant indicating the parameter to be set, and
16737 PARAM is the new value. Six of the twelve storage parameters affect how
16738 pixel data is returned to client memory. They are as follows:
16740 `GL_PACK_SWAP_BYTES'
16741 If true, byte ordering for multibyte color components, depth
16742 components, color indices, or stencil indices is reversed. That
16743 is, if a four-byte component consists of bytes B_0 , B_1 , B_2 ,
16744 B_3 , it is stored in memory as B_3 , B_2 , B_1 , B_0 if
16745 `GL_PACK_SWAP_BYTES' is true. `GL_PACK_SWAP_BYTES' has no effect
16746 on the memory order of components within a pixel, only on the order
16747 of bytes within components or indices. For example, the three
16748 components of a `GL_RGB' format pixel are always stored with red
16749 first, green second, and blue third, regardless of the value of
16750 `GL_PACK_SWAP_BYTES'.
16752 `GL_PACK_LSB_FIRST'
16753 If true, bits are ordered within a byte from least significant to
16754 most significant; otherwise, the first bit in each byte is the most
16755 significant one. This parameter is significant for bitmap data
16758 `GL_PACK_ROW_LENGTH'
16759 If greater than 0, `GL_PACK_ROW_LENGTH' defines the number of
16760 pixels in a row. If the first pixel of a row is placed at location
16761 P in memory, then the location of the first pixel of the next row
16762 is obtained by skipping
16764 K={(N\u2062L), (A/S,\u2062⌈S\u2062N\u2062L,/A,⌉)\u2062(S>=A), (S<A),
16766 components or indices, where N is the number of components or
16767 indices in a pixel, L is the number of pixels in a row
16768 (`GL_PACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16769 to the pixel routine otherwise), A is the value of
16770 `GL_PACK_ALIGNMENT', and S is the size, in bytes, of a single
16771 component (if A<S , then it is as if A=S ). In the case of 1-bit
16772 values, the location of the next row is obtained by skipping
16774 K=8\u2062A\u2062⌈N\u2062L,/8\u2062A,,⌉
16776 components or indices.
16778 The word COMPONENT in this description refers to the nonindex
16779 values red, green, blue, alpha, and depth. Storage format
16780 `GL_RGB', for example, has three components per pixel: first red,
16781 then green, and finally blue.
16783 `GL_PACK_IMAGE_HEIGHT'
16784 If greater than 0, `GL_PACK_IMAGE_HEIGHT' defines the number of
16785 pixels in an image three-dimensional texture volume, where
16786 ``image'' is defined by all pixels sharing the same third dimension
16787 index. If the first pixel of a row is placed at location P in
16788 memory, then the location of the first pixel of the next row is
16789 obtained by skipping
16791 K={(N\u2062L\u2062H), (A/S,\u2062⌈S\u2062N\u2062L\u2062H,/A,⌉)\u2062(S>=A), (S<A),
16793 components or indices, where N is the number of components or
16794 indices in a pixel, L is the number of pixels in a row
16795 (`GL_PACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16796 to `glTexImage3D' otherwise), H is the number of rows in a pixel
16797 image (`GL_PACK_IMAGE_HEIGHT' if it is greater than 0, the HEIGHT
16798 argument to the `glTexImage3D' routine otherwise), A is the value
16799 of `GL_PACK_ALIGNMENT', and S is the size, in bytes, of a single
16800 component (if A<S , then it is as if A=S ).
16802 The word COMPONENT in this description refers to the nonindex
16803 values red, green, blue, alpha, and depth. Storage format
16804 `GL_RGB', for example, has three components per pixel: first red,
16805 then green, and finally blue.
16807 `GL_PACK_SKIP_PIXELS', `GL_PACK_SKIP_ROWS', and `GL_PACK_SKIP_IMAGES'
16808 These values are provided as a convenience to the programmer; they
16809 provide no functionality that cannot be duplicated simply by
16810 incrementing the pointer passed to `glReadPixels'. Setting
16811 `GL_PACK_SKIP_PIXELS' to I is equivalent to incrementing the
16812 pointer by I\u2062N components or indices, where N is the number of
16813 components or indices in each pixel. Setting `GL_PACK_SKIP_ROWS'
16814 to J is equivalent to incrementing the pointer by J\u2062M components or
16815 indices, where M is the number of components or indices per row, as
16816 just computed in the `GL_PACK_ROW_LENGTH' section. Setting
16817 `GL_PACK_SKIP_IMAGES' to K is equivalent to incrementing the
16818 pointer by K\u2062P , where P is the number of components or indices per
16819 image, as computed in the `GL_PACK_IMAGE_HEIGHT' section.
16821 `GL_PACK_ALIGNMENT'
16822 Specifies the alignment requirements for the start of each pixel
16823 row in memory. The allowable values are 1 (byte-alignment), 2
16824 (rows aligned to even-numbered bytes), 4 (word-alignment), and 8
16825 (rows start on double-word boundaries).
16827 The other six of the twelve storage parameters affect how pixel data is
16828 read from client memory. These values are significant for
16829 `glDrawPixels', `glTexImage1D', `glTexImage2D', `glTexImage3D',
16830 `glTexSubImage1D', `glTexSubImage2D', `glTexSubImage3D', `glBitmap', and
16831 `glPolygonStipple'.
16833 Additionally, if the `ARB_imaging' extension is supported,
16834 `glColorTable', `glColorSubTable', `glConvolutionFilter1D',
16835 `glConvolutionFilter2D', and `glSeparableFilter2D'. They are as
16838 `GL_UNPACK_SWAP_BYTES'
16839 If true, byte ordering for multibyte color components, depth
16840 components, color indices, or stencil indices is reversed. That
16841 is, if a four-byte component consists of bytes B_0 , B_1 , B_2 ,
16842 B_3 , it is taken from memory as B_3 , B_2 , B_1 , B_0 if
16843 `GL_UNPACK_SWAP_BYTES' is true. `GL_UNPACK_SWAP_BYTES' has no
16844 effect on the memory order of components within a pixel, only on
16845 the order of bytes within components or indices. For example, the
16846 three components of a `GL_RGB' format pixel are always stored with
16847 red first, green second, and blue third, regardless of the value of
16848 `GL_UNPACK_SWAP_BYTES'.
16850 `GL_UNPACK_LSB_FIRST'
16851 If true, bits are ordered within a byte from least significant to
16852 most significant; otherwise, the first bit in each byte is the most
16853 significant one. This is relevant only for bitmap data.
16855 `GL_UNPACK_ROW_LENGTH'
16856 If greater than 0, `GL_UNPACK_ROW_LENGTH' defines the number of
16857 pixels in a row. If the first pixel of a row is placed at location
16858 P in memory, then the location of the first pixel of the next row
16859 is obtained by skipping
16861 K={(N\u2062L), (A/S,\u2062⌈S\u2062N\u2062L,/A,⌉)\u2062(S>=A), (S<A),
16863 components or indices, where N is the number of components or
16864 indices in a pixel, L is the number of pixels in a row
16865 (`GL_UNPACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16866 to the pixel routine otherwise), A is the value of
16867 `GL_UNPACK_ALIGNMENT', and S is the size, in bytes, of a single
16868 component (if A<S , then it is as if A=S ). In the case of 1-bit
16869 values, the location of the next row is obtained by skipping
16871 K=8\u2062A\u2062⌈N\u2062L,/8\u2062A,,⌉
16873 components or indices.
16875 The word COMPONENT in this description refers to the nonindex
16876 values red, green, blue, alpha, and depth. Storage format
16877 `GL_RGB', for example, has three components per pixel: first red,
16878 then green, and finally blue.
16880 `GL_UNPACK_IMAGE_HEIGHT'
16881 If greater than 0, `GL_UNPACK_IMAGE_HEIGHT' defines the number of
16882 pixels in an image of a three-dimensional texture volume. Where
16883 ``image'' is defined by all pixel sharing the same third dimension
16884 index. If the first pixel of a row is placed at location P in
16885 memory, then the location of the first pixel of the next row is
16886 obtained by skipping
16888 K={(N\u2062L\u2062H), (A/S,\u2062⌈S\u2062N\u2062L\u2062H,/A,⌉)\u2062(S>=A), (S<A),
16890 components or indices, where N is the number of components or
16891 indices in a pixel, L is the number of pixels in a row
16892 (`GL_UNPACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16893 to `glTexImage3D' otherwise), H is the number of rows in an image
16894 (`GL_UNPACK_IMAGE_HEIGHT' if it is greater than 0, the HEIGHT
16895 argument to `glTexImage3D' otherwise), A is the value of
16896 `GL_UNPACK_ALIGNMENT', and S is the size, in bytes, of a single
16897 component (if A<S , then it is as if A=S ).
16899 The word COMPONENT in this description refers to the nonindex
16900 values red, green, blue, alpha, and depth. Storage format
16901 `GL_RGB', for example, has three components per pixel: first red,
16902 then green, and finally blue.
16904 `GL_UNPACK_SKIP_PIXELS' and `GL_UNPACK_SKIP_ROWS'
16905 These values are provided as a convenience to the programmer; they
16906 provide no functionality that cannot be duplicated by incrementing
16907 the pointer passed to `glDrawPixels', `glTexImage1D',
16908 `glTexImage2D', `glTexSubImage1D', `glTexSubImage2D', `glBitmap',
16909 or `glPolygonStipple'. Setting `GL_UNPACK_SKIP_PIXELS' to I is
16910 equivalent to incrementing the pointer by I\u2062N components or
16911 indices, where N is the number of components or indices in each
16912 pixel. Setting `GL_UNPACK_SKIP_ROWS' to J is equivalent to
16913 incrementing the pointer by J\u2062K components or indices, where K is
16914 the number of components or indices per row, as just computed in
16915 the `GL_UNPACK_ROW_LENGTH' section.
16917 `GL_UNPACK_ALIGNMENT'
16918 Specifies the alignment requirements for the start of each pixel
16919 row in memory. The allowable values are 1 (byte-alignment), 2
16920 (rows aligned to even-numbered bytes), 4 (word-alignment), and 8
16921 (rows start on double-word boundaries).
16923 The following table gives the type, initial value, and range of valid
16924 values for each storage parameter that can be set with `glPixelStore'.
16929 *Type*, *Initial Value*, *Valid Range*
16931 `GL_PACK_SWAP_BYTES'
16932 boolean , false , true or false
16934 `GL_PACK_LSB_FIRST'
16935 boolean , false , true or false
16937 `GL_PACK_ROW_LENGTH'
16938 integer , 0 , [0,∞)
16940 `GL_PACK_IMAGE_HEIGHT'
16941 integer , 0 , [0,∞)
16943 `GL_PACK_SKIP_ROWS'
16944 integer , 0 , [0,∞)
16946 `GL_PACK_SKIP_PIXELS'
16947 integer , 0 , [0,∞)
16949 `GL_PACK_SKIP_IMAGES'
16950 integer , 0 , [0,∞)
16952 `GL_PACK_ALIGNMENT'
16953 integer , 4 , 1, 2, 4, or 8
16955 `GL_UNPACK_SWAP_BYTES'
16956 boolean , false , true or false
16958 `GL_UNPACK_LSB_FIRST'
16959 boolean , false , true or false
16961 `GL_UNPACK_ROW_LENGTH'
16962 integer , 0 , [0,∞)
16964 `GL_UNPACK_IMAGE_HEIGHT'
16965 integer , 0 , [0,∞)
16967 `GL_UNPACK_SKIP_ROWS'
16968 integer , 0 , [0,∞)
16970 `GL_UNPACK_SKIP_PIXELS'
16971 integer , 0 , [0,∞)
16973 `GL_UNPACK_SKIP_IMAGES'
16974 integer , 0 , [0,∞)
16976 `GL_UNPACK_ALIGNMENT'
16977 integer , 4 , 1, 2, 4, or 8
16979 `glPixelStoref' can be used to set any pixel store parameter. If the
16980 parameter type is boolean, then if PARAM is 0, the parameter is false;
16981 otherwise it is set to true. If PNAME is a integer type parameter,
16982 PARAM is rounded to the nearest integer.
16984 Likewise, `glPixelStorei' can also be used to set any of the pixel store
16985 parameters. Boolean parameters are set to false if PARAM is 0 and true
16988 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
16990 `GL_INVALID_VALUE' is generated if a negative row length, pixel skip, or
16991 row skip value is specified, or if alignment is specified as other than
16994 `GL_INVALID_OPERATION' is generated if `glPixelStore' is executed
16995 between the execution of `glBegin' and the corresponding execution of
16998 (define-gl-procedures
17009 "Set pixel transfer modes.
17012 Specifies the symbolic name of the pixel transfer parameter to be
17013 set. Must be one of the following: `GL_MAP_COLOR',
17014 `GL_MAP_STENCIL', `GL_INDEX_SHIFT', `GL_INDEX_OFFSET',
17015 `GL_RED_SCALE', `GL_RED_BIAS', `GL_GREEN_SCALE', `GL_GREEN_BIAS',
17016 `GL_BLUE_SCALE', `GL_BLUE_BIAS', `GL_ALPHA_SCALE', `GL_ALPHA_BIAS',
17017 `GL_DEPTH_SCALE', or `GL_DEPTH_BIAS'.
17019 Additionally, if the `ARB_imaging' extension is supported, the
17020 following symbolic names are accepted:
17021 `GL_POST_COLOR_MATRIX_RED_SCALE',
17022 `GL_POST_COLOR_MATRIX_GREEN_SCALE',
17023 `GL_POST_COLOR_MATRIX_BLUE_SCALE',
17024 `GL_POST_COLOR_MATRIX_ALPHA_SCALE',
17025 `GL_POST_COLOR_MATRIX_RED_BIAS', `GL_POST_COLOR_MATRIX_GREEN_BIAS',
17026 `GL_POST_COLOR_MATRIX_BLUE_BIAS',
17027 `GL_POST_COLOR_MATRIX_ALPHA_BIAS', `GL_POST_CONVOLUTION_RED_SCALE',
17028 `GL_POST_CONVOLUTION_GREEN_SCALE',
17029 `GL_POST_CONVOLUTION_BLUE_SCALE',
17030 `GL_POST_CONVOLUTION_ALPHA_SCALE', `GL_POST_CONVOLUTION_RED_BIAS',
17031 `GL_POST_CONVOLUTION_GREEN_BIAS', `GL_POST_CONVOLUTION_BLUE_BIAS',
17032 and `GL_POST_CONVOLUTION_ALPHA_BIAS'.
17035 Specifies the value that PNAME is set to.
17037 `glPixelTransfer' sets pixel transfer modes that affect the operation of
17038 subsequent `glCopyPixels', `glCopyTexImage1D', `glCopyTexImage2D',
17039 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D',
17040 `glDrawPixels', `glReadPixels', `glTexImage1D', `glTexImage2D',
17041 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D', and
17042 `glTexSubImage3D' commands. Additionally, if the `ARB_imaging' subset
17043 is supported, the routines `glColorTable', `glColorSubTable',
17044 `glConvolutionFilter1D', `glConvolutionFilter2D', `glHistogram',
17045 `glMinmax', and `glSeparableFilter2D' are also affected. The algorithms
17046 that are specified by pixel transfer modes operate on pixels after they
17047 are read from the frame buffer (`glCopyPixels'`glCopyTexImage1D',
17048 `glCopyTexImage2D', `glCopyTexSubImage1D', `glCopyTexSubImage2D',
17049 `glCopyTexSubImage3D', and `glReadPixels'), or unpacked from client
17050 memory (`glDrawPixels', `glTexImage1D', `glTexImage2D', `glTexImage3D',
17051 `glTexSubImage1D', `glTexSubImage2D', and `glTexSubImage3D'). Pixel
17052 transfer operations happen in the same order, and in the same manner,
17053 regardless of the command that resulted in the pixel operation. Pixel
17054 storage modes (see `glPixelStore') control the unpacking of pixels being
17055 read from client memory and the packing of pixels being written back
17056 into client memory.
17058 Pixel transfer operations handle four fundamental pixel types: COLOR,
17059 COLOR INDEX, DEPTH, and STENCIL. COLOR pixels consist of four
17060 floating-point values with unspecified mantissa and exponent sizes,
17061 scaled such that 0 represents zero intensity and 1 represents full
17062 intensity. COLOR INDICES comprise a single fixed-point value, with
17063 unspecified precision to the right of the binary point. DEPTH pixels
17064 comprise a single floating-point value, with unspecified mantissa and
17065 exponent sizes, scaled such that 0.0 represents the minimum depth buffer
17066 value, and 1.0 represents the maximum depth buffer value. Finally,
17067 STENCIL pixels comprise a single fixed-point value, with unspecified
17068 precision to the right of the binary point.
17070 The pixel transfer operations performed on the four basic pixel types
17074 Each of the four color components is multiplied by a scale factor,
17075 then added to a bias factor. That is, the red component is
17076 multiplied by `GL_RED_SCALE', then added to `GL_RED_BIAS'; the
17077 green component is multiplied by `GL_GREEN_SCALE', then added to
17078 `GL_GREEN_BIAS'; the blue component is multiplied by
17079 `GL_BLUE_SCALE', then added to `GL_BLUE_BIAS'; and the alpha
17080 component is multiplied by `GL_ALPHA_SCALE', then added to
17081 `GL_ALPHA_BIAS'. After all four color components are scaled and
17082 biased, each is clamped to the range [0,1] . All color, scale, and
17083 bias values are specified with `glPixelTransfer'.
17085 If `GL_MAP_COLOR' is true, each color component is scaled by the
17086 size of the corresponding color-to-color map, then replaced by the
17087 contents of that map indexed by the scaled component. That is, the
17088 red component is scaled by `GL_PIXEL_MAP_R_TO_R_SIZE', then
17089 replaced by the contents of `GL_PIXEL_MAP_R_TO_R' indexed by
17090 itself. The green component is scaled by
17091 `GL_PIXEL_MAP_G_TO_G_SIZE', then replaced by the contents of
17092 `GL_PIXEL_MAP_G_TO_G' indexed by itself. The blue component is
17093 scaled by `GL_PIXEL_MAP_B_TO_B_SIZE', then replaced by the contents
17094 of `GL_PIXEL_MAP_B_TO_B' indexed by itself. And the alpha
17095 component is scaled by `GL_PIXEL_MAP_A_TO_A_SIZE', then replaced by
17096 the contents of `GL_PIXEL_MAP_A_TO_A' indexed by itself. All
17097 components taken from the maps are then clamped to the range [0,1]
17098 . `GL_MAP_COLOR' is specified with `glPixelTransfer'. The
17099 contents of the various maps are specified with `glPixelMap'.
17101 If the `ARB_imaging' extension is supported, each of the four color
17102 components may be scaled and biased after transformation by the
17103 color matrix. That is, the red component is multiplied by
17104 `GL_POST_COLOR_MATRIX_RED_SCALE', then added to
17105 `GL_POST_COLOR_MATRIX_RED_BIAS'; the green component is multiplied
17106 by `GL_POST_COLOR_MATRIX_GREEN_SCALE', then added to
17107 `GL_POST_COLOR_MATRIX_GREEN_BIAS'; the blue component is multiplied
17108 by `GL_POST_COLOR_MATRIX_BLUE_SCALE', then added to
17109 `GL_POST_COLOR_MATRIX_BLUE_BIAS'; and the alpha component is
17110 multiplied by `GL_POST_COLOR_MATRIX_ALPHA_SCALE', then added to
17111 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'. After all four color components
17112 are scaled and biased, each is clamped to the range [0,1] .
17114 Similarly, if the `ARB_imaging' extension is supported, each of the
17115 four color components may be scaled and biased after processing by
17116 the enabled convolution filter. That is, the red component is
17117 multiplied by `GL_POST_CONVOLUTION_RED_SCALE', then added to
17118 `GL_POST_CONVOLUTION_RED_BIAS'; the green component is multiplied
17119 by `GL_POST_CONVOLUTION_GREEN_SCALE', then added to
17120 `GL_POST_CONVOLUTION_GREEN_BIAS'; the blue component is multiplied
17121 by `GL_POST_CONVOLUTION_BLUE_SCALE', then added to
17122 `GL_POST_CONVOLUTION_BLUE_BIAS'; and the alpha component is
17123 multiplied by `GL_POST_CONVOLUTION_ALPHA_SCALE', then added to
17124 `GL_POST_CONVOLUTION_ALPHA_BIAS'. After all four color components
17125 are scaled and biased, each is clamped to the range [0,1] .
17128 Each color index is shifted left by `GL_INDEX_SHIFT' bits; any bits
17129 beyond the number of fraction bits carried by the fixed-point index
17130 are filled with zeros. If `GL_INDEX_SHIFT' is negative, the shift
17131 is to the right, again zero filled. Then `GL_INDEX_OFFSET' is
17132 added to the index. `GL_INDEX_SHIFT' and `GL_INDEX_OFFSET' are
17133 specified with `glPixelTransfer'.
17135 From this point, operation diverges depending on the required
17136 format of the resulting pixels. If the resulting pixels are to be
17137 written to a color index buffer, or if they are being read back to
17138 client memory in `GL_COLOR_INDEX' format, the pixels continue to be
17139 treated as indices. If `GL_MAP_COLOR' is true, each index is
17140 masked by 2^N-1 , where N is `GL_PIXEL_MAP_I_TO_I_SIZE', then
17141 replaced by the contents of `GL_PIXEL_MAP_I_TO_I' indexed by the
17142 masked value. `GL_MAP_COLOR' is specified with `glPixelTransfer'.
17143 The contents of the index map is specified with `glPixelMap'.
17145 If the resulting pixels are to be written to an RGBA color buffer,
17146 or if they are read back to client memory in a format other than
17147 `GL_COLOR_INDEX', the pixels are converted from indices to colors
17148 by referencing the four maps `GL_PIXEL_MAP_I_TO_R',
17149 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
17150 `GL_PIXEL_MAP_I_TO_A'. Before being dereferenced, the index is
17151 masked by 2^N-1 , where N is `GL_PIXEL_MAP_I_TO_R_SIZE' for the red
17152 map, `GL_PIXEL_MAP_I_TO_G_SIZE' for the green map,
17153 `GL_PIXEL_MAP_I_TO_B_SIZE' for the blue map, and
17154 `GL_PIXEL_MAP_I_TO_A_SIZE' for the alpha map. All components taken
17155 from the maps are then clamped to the range [0,1] . The contents
17156 of the four maps is specified with `glPixelMap'.
17159 Each depth value is multiplied by `GL_DEPTH_SCALE', added to
17160 `GL_DEPTH_BIAS', then clamped to the range [0,1] .
17163 Each index is shifted `GL_INDEX_SHIFT' bits just as a color index
17164 is, then added to `GL_INDEX_OFFSET'. If `GL_MAP_STENCIL' is true,
17165 each index is masked by 2^N-1 , where N is
17166 `GL_PIXEL_MAP_S_TO_S_SIZE', then replaced by the contents of
17167 `GL_PIXEL_MAP_S_TO_S' indexed by the masked value.
17169 The following table gives the type, initial value, and range of valid
17170 values for each of the pixel transfer parameters that are set with
17176 *Type*, *Initial Value*, *Valid Range*
17179 boolean , false , true/false
17182 boolean , false , true/false
17185 integer , 0 , (-∞,∞)
17188 integer , 0 , (-∞,∞)
17220 `GL_POST_COLOR_MATRIX_RED_SCALE'
17223 `GL_POST_COLOR_MATRIX_GREEN_SCALE'
17226 `GL_POST_COLOR_MATRIX_BLUE_SCALE'
17229 `GL_POST_COLOR_MATRIX_ALPHA_SCALE'
17232 `GL_POST_COLOR_MATRIX_RED_BIAS'
17235 `GL_POST_COLOR_MATRIX_GREEN_BIAS'
17238 `GL_POST_COLOR_MATRIX_BLUE_BIAS'
17241 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'
17244 `GL_POST_CONVOLUTION_RED_SCALE'
17247 `GL_POST_CONVOLUTION_GREEN_SCALE'
17250 `GL_POST_CONVOLUTION_BLUE_SCALE'
17253 `GL_POST_CONVOLUTION_ALPHA_SCALE'
17256 `GL_POST_CONVOLUTION_RED_BIAS'
17259 `GL_POST_CONVOLUTION_GREEN_BIAS'
17262 `GL_POST_CONVOLUTION_BLUE_BIAS'
17265 `GL_POST_CONVOLUTION_ALPHA_BIAS'
17268 `glPixelTransferf' can be used to set any pixel transfer parameter. If
17269 the parameter type is boolean, 0 implies false and any other value
17270 implies true. If PNAME is an integer parameter, PARAM is rounded to the
17273 Likewise, `glPixelTransferi' can be used to set any of the pixel
17274 transfer parameters. Boolean parameters are set to false if PARAM is 0
17275 and to true otherwise. PARAM is converted to floating point before
17276 being assigned to real-valued parameters.
17278 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
17280 `GL_INVALID_OPERATION' is generated if `glPixelTransfer' is executed
17281 between the execution of `glBegin' and the corresponding execution of
17284 (define-gl-procedures
17290 "Specify the pixel zoom factors.
17295 Specify the X and Y zoom factors for pixel write operations.
17297 `glPixelZoom' specifies values for the X and Y zoom factors. During the
17298 execution of `glDrawPixels' or `glCopyPixels', if (XR , YR ) is the
17299 current raster position, and a given element is in the M th row and N th
17300 column of the pixel rectangle, then pixels whose centers are in the
17301 rectangle with corners at
17303 (XR+N·XFACTOR , YR+M·YFACTOR )
17305 (XR+(N+1,)·XFACTOR , YR+(M+1,)·YFACTOR )
17307 are candidates for replacement. Any pixel whose center lies on the
17308 bottom or left edge of this rectangular region is also modified.
17310 Pixel zoom factors are not limited to positive values. Negative zoom
17311 factors reflect the resulting image about the current raster position.
17313 `GL_INVALID_OPERATION' is generated if `glPixelZoom' is executed between
17314 the execution of `glBegin' and the corresponding execution of `glEnd'.")
17316 (define-gl-procedures
17317 ((glPointParameterf
17327 (glPointParameterfv
17329 (params const-GLfloat-*)
17332 (glPointParameteriv
17334 (params const-GLint-*)
17337 "Specify point parameters.
17340 Specifies a single-valued point parameter. `GL_POINT_SIZE_MIN',
17341 `GL_POINT_SIZE_MAX', `GL_POINT_FADE_THRESHOLD_SIZE', and
17342 `GL_POINT_SPRITE_COORD_ORIGIN' are accepted.
17345 Specifies the value that PNAME will be set to.
17347 The following values are accepted for PNAME:
17349 `GL_POINT_SIZE_MIN'
17352 PARAMS is a single floating-point value that specifies the minimum
17353 point size. The default value is 0.0.
17355 `GL_POINT_SIZE_MAX'
17358 PARAMS is a single floating-point value that specifies the maximum
17359 point size. The default value is 1.0.
17361 `GL_POINT_FADE_THRESHOLD_SIZE'
17364 PARAMS is a single floating-point value that specifies the
17365 threshold value to which point sizes are clamped if they exceed the
17366 specified value. The default value is 1.0.
17368 `GL_POINT_DISTANCE_ATTENUATION'
17371 PARAMS is an array of three floating-point values that specify the
17372 coefficients used for scaling the computed point size. The default
17373 values are (1,00) .
17375 `GL_POINT_SPRITE_COORD_ORIGIN'
17378 PARAMS is a single enum specifying the point sprite texture
17379 coordinate origin, either `GL_LOWER_LEFT' or `GL_UPPER_LEFT'. The
17380 default value is `GL_UPPER_LEFT'.
17382 `GL_INVALID_VALUE' is generated If the value specified for
17383 `GL_POINT_SIZE_MIN', `GL_POINT_SIZE_MAX', or
17384 `GL_POINT_FADE_THRESHOLD_SIZE' is less than zero.
17386 `GL_INVALID_ENUM' is generated If the value specified for
17387 `GL_POINT_SPRITE_COORD_ORIGIN' is not `GL_LOWER_LEFT' or
17390 If the value for `GL_POINT_SIZE_MIN' is greater than
17391 `GL_POINT_SIZE_MAX', the point size after clamping is undefined, but no
17392 error is generated.")
17394 (define-gl-procedures
17395 ((glPointSize (size GLfloat) -> void))
17396 "Specify the diameter of rasterized points.
17399 Specifies the diameter of rasterized points. The initial value is
17402 `glPointSize' specifies the rasterized diameter of both aliased and
17403 antialiased points. Using a point size other than 1 has different
17404 effects, depending on whether point antialiasing is enabled. To enable
17405 and disable point antialiasing, call `glEnable' and `glDisable' with
17406 argument `GL_POINT_SMOOTH'. Point antialiasing is initially disabled.
17408 The specified point size is multiplied with a distance attenuation
17409 factor and clamped to the specified point size range, and further
17410 clamped to the implementation-dependent point size range to produce the
17411 derived point size using
17413 POINTSIZE=CLAMP\u2062(SIZE×√(1/A+B×D+C×D^2,,,),,)
17415 where D is the eye-coordinate distance from the eye to the vertex, and A
17416 , B , and C are the distance attenuation coefficients (see
17417 `glPointParameter').
17419 If multisampling is disabled, the computed point size is used as the
17422 If multisampling is enabled, the point may be faded by modifying the
17423 point alpha value (see `glSampleCoverage') instead of allowing the point
17424 width to go below a given threshold (see `glPointParameter'). In this
17425 case, the width is further modified in the following manner:
17427 POINTWIDTH={(POINTSIZE), (THRESHOLD)\u2062(POINTSIZE>=THRESHOLD),
17430 The point alpha value is modified by computing:
17432 POINTALPHA={(1), ((POINTSIZE/THRESHOLD,)^2)\u2062(POINTSIZE>=THRESHOLD),
17435 If point antialiasing is disabled, the actual size is determined by
17436 rounding the supplied size to the nearest integer. (If the rounding
17437 results in the value 0, it is as if the point size were 1.) If the
17438 rounded size is odd, then the center point (X , Y ) of the pixel
17439 fragment that represents the point is computed as
17441 (⌊X_W,⌋+.5,⌊Y_W,⌋+.5)
17443 where W subscripts indicate window coordinates. All pixels that lie
17444 within the square grid of the rounded size centered at (X , Y ) make up
17445 the fragment. If the size is even, the center point is
17447 (⌊X_W+.5,⌋,⌊Y_W+.5,⌋)
17449 and the rasterized fragment's centers are the half-integer window
17450 coordinates within the square of the rounded size centered at (X,Y) .
17451 All pixel fragments produced in rasterizing a nonantialiased point are
17452 assigned the same associated data, that of the vertex corresponding to
17455 If antialiasing is enabled, then point rasterization produces a fragment
17456 for each pixel square that intersects the region lying within the circle
17457 having diameter equal to the current point size and centered at the
17458 point's (X_W,Y_W) . The coverage value for each fragment is the window
17459 coordinate area of the intersection of the circular region with the
17460 corresponding pixel square. This value is saved and used in the final
17461 rasterization step. The data associated with each fragment is the data
17462 associated with the point being rasterized.
17464 Not all sizes are supported when point antialiasing is enabled. If an
17465 unsupported size is requested, the nearest supported size is used. Only
17466 size 1 is guaranteed to be supported; others depend on the
17467 implementation. To query the range of supported sizes and the size
17468 difference between supported sizes within the range, call `glGet' with
17469 arguments `GL_SMOOTH_POINT_SIZE_RANGE' and
17470 `GL_SMOOTH_POINT_SIZE_GRANULARITY'. For aliased points, query the
17471 supported ranges and granularity with `glGet' with arguments
17472 `GL_ALIASED_POINT_SIZE_RANGE'.
17474 `GL_INVALID_VALUE' is generated if SIZE is less than or equal to 0.
17476 `GL_INVALID_OPERATION' is generated if `glPointSize' is executed between
17477 the execution of `glBegin' and the corresponding execution of `glEnd'.")
17479 (define-gl-procedures
17485 "Select a polygon rasterization mode.
17488 Specifies the polygons that MODE applies to. Must be `GL_FRONT'
17489 for front-facing polygons, `GL_BACK' for back-facing polygons, or
17490 `GL_FRONT_AND_BACK' for front- and back-facing polygons.
17493 Specifies how polygons will be rasterized. Accepted values are
17494 `GL_POINT', `GL_LINE', and `GL_FILL'. The initial value is
17495 `GL_FILL' for both front- and back-facing polygons.
17497 `glPolygonMode' controls the interpretation of polygons for
17498 rasterization. FACE describes which polygons MODE applies to:
17499 front-facing polygons (`GL_FRONT'), back-facing polygons (`GL_BACK'), or
17500 both (`GL_FRONT_AND_BACK'). The polygon mode affects only the final
17501 rasterization of polygons. In particular, a polygon's vertices are lit
17502 and the polygon is clipped and possibly culled before these modes are
17505 Three modes are defined and can be specified in MODE:
17508 Polygon vertices that are marked as the start of a boundary edge
17509 are drawn as points. Point attributes such as `GL_POINT_SIZE' and
17510 `GL_POINT_SMOOTH' control the rasterization of the points. Polygon
17511 rasterization attributes other than `GL_POLYGON_MODE' have no
17515 Boundary edges of the polygon are drawn as line segments. They are
17516 treated as connected line segments for line stippling; the line
17517 stipple counter and pattern are not reset between segments (see
17518 `glLineStipple'). Line attributes such as `GL_LINE_WIDTH' and
17519 `GL_LINE_SMOOTH' control the rasterization of the lines. Polygon
17520 rasterization attributes other than `GL_POLYGON_MODE' have no
17524 The interior of the polygon is filled. Polygon attributes such as
17525 `GL_POLYGON_STIPPLE' and `GL_POLYGON_SMOOTH' control the
17526 rasterization of the polygon.
17528 `GL_INVALID_ENUM' is generated if either FACE or MODE is not an accepted
17531 `GL_INVALID_OPERATION' is generated if `glPolygonMode' is executed
17532 between the execution of `glBegin' and the corresponding execution of
17535 (define-gl-procedures
17541 "Set the scale and units used to calculate depth values.
17544 Specifies a scale factor that is used to create a variable depth
17545 offset for each polygon. The initial value is 0.
17548 Is multiplied by an implementation-specific value to create a
17549 constant depth offset. The initial value is 0.
17551 When `GL_POLYGON_OFFSET_FILL', `GL_POLYGON_OFFSET_LINE', or
17552 `GL_POLYGON_OFFSET_POINT' is enabled, each fragment's DEPTH value will
17553 be offset after it is interpolated from the DEPTH values of the
17554 appropriate vertices. The value of the offset is FACTOR×DZ+R×UNITS ,
17555 where DZ is a measurement of the change in depth relative to the screen
17556 area of the polygon, and R is the smallest value that is guaranteed to
17557 produce a resolvable offset for a given implementation. The offset is
17558 added before the depth test is performed and before the value is written
17559 into the depth buffer.
17561 `glPolygonOffset' is useful for rendering hidden-line images, for
17562 applying decals to surfaces, and for rendering solids with highlighted
17565 `GL_INVALID_OPERATION' is generated if `glPolygonOffset' is executed
17566 between the execution of `glBegin' and the corresponding execution of
17569 (define-gl-procedures
17571 (pattern const-GLubyte-*)
17574 "Set the polygon stippling pattern.
17577 Specifies a pointer to a 32×32 stipple pattern that will be
17578 unpacked from memory in the same way that `glDrawPixels' unpacks
17581 Polygon stippling, like line stippling (see `glLineStipple'), masks out
17582 certain fragments produced by rasterization, creating a pattern.
17583 Stippling is independent of polygon antialiasing.
17585 PATTERN is a pointer to a 32×32 stipple pattern that is stored in memory
17586 just like the pixel data supplied to a `glDrawPixels' call with height
17587 and WIDTH both equal to 32, a pixel format of `GL_COLOR_INDEX', and data
17588 type of `GL_BITMAP'. That is, the stipple pattern is represented as a
17589 32×32 array of 1-bit color indices packed in unsigned bytes.
17590 `glPixelStore' parameters like `GL_UNPACK_SWAP_BYTES' and
17591 `GL_UNPACK_LSB_FIRST' affect the assembling of the bits into a stipple
17592 pattern. Pixel transfer operations (shift, offset, pixel map) are not
17593 applied to the stipple image, however.
17595 If a non-zero named buffer object is bound to the
17596 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a stipple
17597 pattern is specified, PATTERN is treated as a byte offset into the
17598 buffer object's data store.
17600 To enable and disable polygon stippling, call `glEnable' and `glDisable'
17601 with argument `GL_POLYGON_STIPPLE'. Polygon stippling is initially
17602 disabled. If it's enabled, a rasterized polygon fragment with window
17603 coordinates X_W and Y_W is sent to the next stage of the GL if and only
17604 if the (X_W%32 )th bit in the (Y_W%32 )th row of the stipple pattern is
17605 1 (one). When polygon stippling is disabled, it is as if the stipple
17606 pattern consists of all 1's.
17608 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
17609 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
17610 data store is currently mapped.
17612 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
17613 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
17614 unpacked from the buffer object such that the memory reads required
17615 would exceed the data store size.
17617 `GL_INVALID_OPERATION' is generated if `glPolygonStipple' is executed
17618 between the execution of `glBegin' and the corresponding execution of
17621 (define-gl-procedures
17622 ((glPrioritizeTextures
17624 (textures const-GLuint-*)
17625 (priorities const-GLclampf-*)
17628 "Set texture residence priority.
17631 Specifies the number of textures to be prioritized.
17634 Specifies an array containing the names of the textures to be
17638 Specifies an array containing the texture priorities. A priority
17639 given in an element of PRIORITIES applies to the texture named by
17640 the corresponding element of TEXTURES.
17642 `glPrioritizeTextures' assigns the N texture priorities given in
17643 PRIORITIES to the N textures named in TEXTURES.
17645 The GL establishes a ``working set'' of textures that are resident in
17646 texture memory. These textures may be bound to a texture target much
17647 more efficiently than textures that are not resident. By specifying a
17648 priority for each texture, `glPrioritizeTextures' allows applications to
17649 guide the GL implementation in determining which textures should be
17652 The priorities given in PRIORITIES are clamped to the range [0,1] before
17653 they are assigned. 0 indicates the lowest priority; textures with
17654 priority 0 are least likely to be resident. 1 indicates the highest
17655 priority; textures with priority 1 are most likely to be resident.
17656 However, textures are not guaranteed to be resident until they are used.
17658 `glPrioritizeTextures' silently ignores attempts to prioritize texture 0
17659 or any texture name that does not correspond to an existing texture.
17661 `glPrioritizeTextures' does not require that any of the textures named
17662 by TEXTURES be bound to a texture target. `glTexParameter' may also be
17663 used to set a texture's priority, but only if the texture is currently
17664 bound. This is the only way to set the priority of a default texture.
17666 `GL_INVALID_VALUE' is generated if N is negative.
17668 `GL_INVALID_OPERATION' is generated if `glPrioritizeTextures' is
17669 executed between the execution of `glBegin' and the corresponding
17670 execution of `glEnd'.")
17672 (define-gl-procedures
17673 ((glPushAttrib (mask GLbitfield) -> void)
17674 (glPopAttrib -> void))
17675 "Push and pop the server attribute stack.
17678 Specifies a mask that indicates which attributes to save. Values
17679 for MASK are listed below.
17681 `glPushAttrib' takes one argument, a mask that indicates which groups of
17682 state variables to save on the attribute stack. Symbolic constants are
17683 used to set bits in the mask. MASK is typically constructed by
17684 specifying the bitwise-or of several of these constants together. The
17685 special mask `GL_ALL_ATTRIB_BITS' can be used to save all stackable
17688 The symbolic mask constants and their associated GL state are as follows
17689 (the second column lists which attributes are saved):
17693 `GL_ACCUM_BUFFER_BIT'
17694 Accumulation buffer clear value
17696 `GL_COLOR_BUFFER_BIT'
17697 `GL_ALPHA_TEST' enable bit
17700 Alpha test function and reference value
17703 `GL_BLEND' enable bit
17706 Blending source and destination functions
17709 Constant blend color
17715 `GL_DITHER' enable bit
17718 `GL_DRAW_BUFFER' setting
17721 `GL_COLOR_LOGIC_OP' enable bit
17724 `GL_INDEX_LOGIC_OP' enable bit
17730 Color mode and index mode clear values
17733 Color mode and index mode writemasks
17739 Current color index
17742 Current normal vector
17745 Current texture coordinates
17748 Current raster position
17751 `GL_CURRENT_RASTER_POSITION_VALID' flag
17754 RGBA color associated with current raster position
17757 Color index associated with current raster position
17760 Texture coordinates associated with current raster position
17763 `GL_EDGE_FLAG' flag
17765 `GL_DEPTH_BUFFER_BIT'
17766 `GL_DEPTH_TEST' enable bit
17769 Depth buffer test function
17772 Depth buffer clear value
17775 `GL_DEPTH_WRITEMASK' enable bit
17778 `GL_ALPHA_TEST' flag
17781 `GL_AUTO_NORMAL' flag
17787 Enable bits for the user-definable clipping planes
17790 `GL_COLOR_MATERIAL'
17793 `GL_CULL_FACE' flag
17796 `GL_DEPTH_TEST' flag
17805 `GL_LIGHT'I where `0' <= I < `GL_MAX_LIGHTS'
17811 `GL_LINE_SMOOTH' flag
17814 `GL_LINE_STIPPLE' flag
17817 `GL_COLOR_LOGIC_OP' flag
17820 `GL_INDEX_LOGIC_OP' flag
17823 `GL_MAP1_'X where X is a map type
17826 `GL_MAP2_'X where X is a map type
17829 `GL_MULTISAMPLE' flag
17832 `GL_NORMALIZE' flag
17835 `GL_POINT_SMOOTH' flag
17838 `GL_POLYGON_OFFSET_LINE' flag
17841 `GL_POLYGON_OFFSET_FILL' flag
17844 `GL_POLYGON_OFFSET_POINT' flag
17847 `GL_POLYGON_SMOOTH' flag
17850 `GL_POLYGON_STIPPLE' flag
17853 `GL_SAMPLE_ALPHA_TO_COVERAGE' flag
17856 `GL_SAMPLE_ALPHA_TO_ONE' flag
17859 `GL_SAMPLE_COVERAGE' flag
17862 `GL_SCISSOR_TEST' flag
17865 `GL_STENCIL_TEST' flag
17868 `GL_TEXTURE_1D' flag
17871 `GL_TEXTURE_2D' flag
17874 `GL_TEXTURE_3D' flag
17877 Flags `GL_TEXTURE_GEN_'X where X is S, T, R, or Q
17880 `GL_MAP1_'X enable bits, where X is a map type
17883 `GL_MAP2_'X enable bits, where X is a map type
17886 1D grid endpoints and divisions
17889 2D grid endpoints and divisions
17892 `GL_AUTO_NORMAL' enable bit
17895 `GL_FOG' enable bit
17913 `GL_FOG_MODE' value
17916 `GL_PERSPECTIVE_CORRECTION_HINT' setting
17919 `GL_POINT_SMOOTH_HINT' setting
17922 `GL_LINE_SMOOTH_HINT' setting
17925 `GL_POLYGON_SMOOTH_HINT' setting
17928 `GL_FOG_HINT' setting
17931 `GL_GENERATE_MIPMAP_HINT' setting
17934 `GL_TEXTURE_COMPRESSION_HINT' setting
17937 `GL_COLOR_MATERIAL' enable bit
17940 `GL_COLOR_MATERIAL_FACE' value
17943 Color material parameters that are tracking the current color
17946 Ambient scene color
17949 `GL_LIGHT_MODEL_LOCAL_VIEWER' value
17952 `GL_LIGHT_MODEL_TWO_SIDE' setting
17955 `GL_LIGHTING' enable bit
17958 Enable bit for each light
17961 Ambient, diffuse, and specular intensity for each light
17964 Direction, position, exponent, and cutoff angle for each light
17967 Constant, linear, and quadratic attenuation factors for each light
17970 Ambient, diffuse, specular, and emissive color for each material
17973 Ambient, diffuse, and specular color indices for each material
17976 Specular exponent for each material
17979 `GL_SHADE_MODEL' setting
17982 `GL_LINE_SMOOTH' flag
17985 `GL_LINE_STIPPLE' enable bit
17988 Line stipple pattern and repeat counter
17994 `GL_LIST_BASE' setting
17996 `GL_MULTISAMPLE_BIT'
17997 `GL_MULTISAMPLE' flag
18000 `GL_SAMPLE_ALPHA_TO_COVERAGE' flag
18003 `GL_SAMPLE_ALPHA_TO_ONE' flag
18006 `GL_SAMPLE_COVERAGE' flag
18009 `GL_SAMPLE_COVERAGE_VALUE' value
18012 `GL_SAMPLE_COVERAGE_INVERT' value
18014 `GL_PIXEL_MODE_BIT'
18015 `GL_RED_BIAS' and `GL_RED_SCALE' settings
18018 `GL_GREEN_BIAS' and `GL_GREEN_SCALE' values
18021 `GL_BLUE_BIAS' and `GL_BLUE_SCALE'
18024 `GL_ALPHA_BIAS' and `GL_ALPHA_SCALE'
18027 `GL_DEPTH_BIAS' and `GL_DEPTH_SCALE'
18030 `GL_INDEX_OFFSET' and `GL_INDEX_SHIFT' values
18033 `GL_MAP_COLOR' and `GL_MAP_STENCIL' flags
18036 `GL_ZOOM_X' and `GL_ZOOM_Y' factors
18039 `GL_READ_BUFFER' setting
18042 `GL_POINT_SMOOTH' flag
18048 `GL_CULL_FACE' enable bit
18051 `GL_CULL_FACE_MODE' value
18054 `GL_FRONT_FACE' indicator
18057 `GL_POLYGON_MODE' setting
18060 `GL_POLYGON_SMOOTH' flag
18063 `GL_POLYGON_STIPPLE' enable bit
18066 `GL_POLYGON_OFFSET_FILL' flag
18069 `GL_POLYGON_OFFSET_LINE' flag
18072 `GL_POLYGON_OFFSET_POINT' flag
18075 `GL_POLYGON_OFFSET_FACTOR'
18078 `GL_POLYGON_OFFSET_UNITS'
18080 `GL_POLYGON_STIPPLE_BIT'
18081 Polygon stipple image
18084 `GL_SCISSOR_TEST' flag
18089 `GL_STENCIL_BUFFER_BIT'
18090 `GL_STENCIL_TEST' enable bit
18093 Stencil function and reference value
18099 Stencil fail, pass, and depth buffer pass actions
18102 Stencil buffer clear value
18105 Stencil buffer writemask
18108 Enable bits for the four texture coordinates
18111 Border color for each texture image
18114 Minification function for each texture image
18117 Magnification function for each texture image
18120 Texture coordinates and wrap mode for each texture image
18123 Color and mode for each texture environment
18126 Enable bits `GL_TEXTURE_GEN_'X, X is S, T, R, and Q
18129 `GL_TEXTURE_GEN_MODE' setting for S, T, R, and Q
18132 `glTexGen' plane equations for S, T, R, and Q
18135 Current texture bindings (for example, `GL_TEXTURE_BINDING_2D')
18138 Coefficients of the six clipping planes
18141 Enable bits for the user-definable clipping planes
18144 `GL_MATRIX_MODE' value
18147 `GL_NORMALIZE' flag
18150 `GL_RESCALE_NORMAL' flag
18153 Depth range (near and far)
18156 Viewport origin and extent
18158 `glPopAttrib' restores the values of the state variables saved with the
18159 last `glPushAttrib' command. Those not saved are left unchanged.
18161 It is an error to push attributes onto a full stack or to pop attributes
18162 off an empty stack. In either case, the error flag is set and no other
18163 change is made to GL state.
18165 Initially, the attribute stack is empty.
18167 `GL_STACK_OVERFLOW' is generated if `glPushAttrib' is called while the
18168 attribute stack is full.
18170 `GL_STACK_UNDERFLOW' is generated if `glPopAttrib' is called while the
18171 attribute stack is empty.
18173 `GL_INVALID_OPERATION' is generated if `glPushAttrib' or `glPopAttrib'
18174 is executed between the execution of `glBegin' and the corresponding
18175 execution of `glEnd'.")
18177 (define-gl-procedures
18178 ((glPushClientAttrib (mask GLbitfield) -> void)
18179 (glPopClientAttrib -> void))
18180 "Push and pop the client attribute stack.
18183 Specifies a mask that indicates which attributes to save. Values
18184 for MASK are listed below.
18186 `glPushClientAttrib' takes one argument, a mask that indicates which
18187 groups of client-state variables to save on the client attribute stack.
18188 Symbolic constants are used to set bits in the mask. MASK is typically
18189 constructed by specifying the bitwise-or of several of these constants
18190 together. The special mask `GL_CLIENT_ALL_ATTRIB_BITS' can be used to
18191 save all stackable client state.
18193 The symbolic mask constants and their associated GL client state are as
18194 follows (the second column lists which attributes are saved):
18196 `GL_CLIENT_PIXEL_STORE_BIT' Pixel storage modes
18197 `GL_CLIENT_VERTEX_ARRAY_BIT' Vertex arrays (and enables)
18199 `glPopClientAttrib' restores the values of the client-state variables
18200 saved with the last `glPushClientAttrib'. Those not saved are left
18203 It is an error to push attributes onto a full client attribute stack or
18204 to pop attributes off an empty stack. In either case, the error flag is
18205 set, and no other change is made to GL state.
18207 Initially, the client attribute stack is empty.
18209 `GL_STACK_OVERFLOW' is generated if `glPushClientAttrib' is called while
18210 the attribute stack is full.
18212 `GL_STACK_UNDERFLOW' is generated if `glPopClientAttrib' is called while
18213 the attribute stack is empty.")
18215 (define-gl-procedures
18216 ((glPushMatrix -> void) (glPopMatrix -> void))
18217 "Push and pop the current matrix stack.
18219 There is a stack of matrices for each of the matrix modes. In
18220 `GL_MODELVIEW' mode, the stack depth is at least 32. In the other
18221 modes, `GL_COLOR', `GL_PROJECTION', and `GL_TEXTURE', the depth is at
18222 least 2. The current matrix in any mode is the matrix on the top of the
18223 stack for that mode.
18225 `glPushMatrix' pushes the current matrix stack down by one, duplicating
18226 the current matrix. That is, after a `glPushMatrix' call, the matrix on
18227 top of the stack is identical to the one below it.
18229 `glPopMatrix' pops the current matrix stack, replacing the current
18230 matrix with the one below it on the stack.
18232 Initially, each of the stacks contains one matrix, an identity matrix.
18234 It is an error to push a full matrix stack or to pop a matrix stack that
18235 contains only a single matrix. In either case, the error flag is set
18236 and no other change is made to GL state.
18238 `GL_STACK_OVERFLOW' is generated if `glPushMatrix' is called while the
18239 current matrix stack is full.
18241 `GL_STACK_UNDERFLOW' is generated if `glPopMatrix' is called while the
18242 current matrix stack contains only a single matrix.
18244 `GL_INVALID_OPERATION' is generated if `glPushMatrix' or `glPopMatrix'
18245 is executed between the execution of `glBegin' and the corresponding
18246 execution of `glEnd'.")
18248 (define-gl-procedures
18249 ((glPushName (name GLuint) -> void)
18250 (glPopName -> void))
18251 "Push and pop the name stack.
18254 Specifies a name that will be pushed onto the name stack.
18256 The name stack is used during selection mode to allow sets of rendering
18257 commands to be uniquely identified. It consists of an ordered set of
18258 unsigned integers and is initially empty.
18260 `glPushName' causes NAME to be pushed onto the name stack. `glPopName'
18261 pops one name off the top of the stack.
18263 The maximum name stack depth is implementation-dependent; call
18264 `GL_MAX_NAME_STACK_DEPTH' to find out the value for a particular
18265 implementation. It is an error to push a name onto a full stack or to
18266 pop a name off an empty stack. It is also an error to manipulate the
18267 name stack between the execution of `glBegin' and the corresponding
18268 execution of `glEnd'. In any of these cases, the error flag is set and
18269 no other change is made to GL state.
18271 The name stack is always empty while the render mode is not `GL_SELECT'.
18272 Calls to `glPushName' or `glPopName' while the render mode is not
18273 `GL_SELECT' are ignored.
18275 `GL_STACK_OVERFLOW' is generated if `glPushName' is called while the
18276 name stack is full.
18278 `GL_STACK_UNDERFLOW' is generated if `glPopName' is called while the
18279 name stack is empty.
18281 `GL_INVALID_OPERATION' is generated if `glPushName' or `glPopName' is
18282 executed between a call to `glBegin' and the corresponding call to
18285 (define-gl-procedures
18286 ((glRasterPos2s (x GLshort) (y GLshort) -> void)
18287 (glRasterPos2i (x GLint) (y GLint) -> void)
18288 (glRasterPos2f (x GLfloat) (y GLfloat) -> void)
18289 (glRasterPos2d (x GLdouble) (y GLdouble) -> void)
18342 (glRasterPos2sv (v const-GLshort-*) -> void)
18343 (glRasterPos2iv (v const-GLint-*) -> void)
18344 (glRasterPos2fv (v const-GLfloat-*) -> void)
18345 (glRasterPos2dv (v const-GLdouble-*) -> void)
18346 (glRasterPos3sv (v const-GLshort-*) -> void)
18347 (glRasterPos3iv (v const-GLint-*) -> void)
18348 (glRasterPos3fv (v const-GLfloat-*) -> void)
18349 (glRasterPos3dv (v const-GLdouble-*) -> void)
18350 (glRasterPos4sv (v const-GLshort-*) -> void)
18351 (glRasterPos4iv (v const-GLint-*) -> void)
18352 (glRasterPos4fv (v const-GLfloat-*) -> void)
18353 (glRasterPos4dv (v const-GLdouble-*) -> void))
18354 "Specify the raster position for pixel operations.
18363 Specify the X , Y , Z , and W object coordinates (if present) for
18364 the raster position.
18366 The GL maintains a 3D position in window coordinates. This position,
18367 called the raster position, is used to position pixel and bitmap write
18368 operations. It is maintained with subpixel accuracy. See `glBitmap',
18369 `glDrawPixels', and `glCopyPixels'.
18371 The current raster position consists of three window coordinates (X , Y
18372 , Z ), a clip coordinate value (W ), an eye coordinate distance, a valid
18373 bit, and associated color data and texture coordinates. The W
18374 coordinate is a clip coordinate, because W is not projected to window
18375 coordinates. `glRasterPos4' specifies object coordinates X , Y , Z ,
18376 and W explicitly. `glRasterPos3' specifies object coordinate X , Y ,
18377 and Z explicitly, while W is implicitly set to 1. `glRasterPos2' uses
18378 the argument values for X and Y while implicitly setting Z and W to 0
18381 The object coordinates presented by `glRasterPos' are treated just like
18382 those of a `glVertex' command: They are transformed by the current
18383 modelview and projection matrices and passed to the clipping stage. If
18384 the vertex is not culled, then it is projected and scaled to window
18385 coordinates, which become the new current raster position, and the
18386 `GL_CURRENT_RASTER_POSITION_VALID' flag is set. If the vertex IS
18387 culled, then the valid bit is cleared and the current raster position
18388 and associated color and texture coordinates are undefined.
18390 The current raster position also includes some associated color data and
18391 texture coordinates. If lighting is enabled, then
18392 `GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `GL_CURRENT_RASTER_INDEX'
18393 (in color index mode) is set to the color produced by the lighting
18394 calculation (see `glLight', `glLightModel', and `glShadeModel'). If
18395 lighting is disabled, current color (in RGBA mode, state variable
18396 `GL_CURRENT_COLOR') or color index (in color index mode, state variable
18397 `GL_CURRENT_INDEX') is used to update the current raster color.
18398 `GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated.
18400 Likewise, `GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of
18401 `GL_CURRENT_TEXTURE_COORDS', based on the texture matrix and the texture
18402 generation functions (see `glTexGen'). Finally, the distance from the
18403 origin of the eye coordinate system to the vertex as transformed by only
18404 the modelview matrix replaces `GL_CURRENT_RASTER_DISTANCE'.
18406 Initially, the current raster position is (0, 0, 0, 1), the current
18407 raster distance is 0, the valid bit is set, the associated RGBA color is
18408 (1, 1, 1, 1), the associated color index is 1, and the associated
18409 texture coordinates are (0, 0, 0, 1). In RGBA mode,
18410 `GL_CURRENT_RASTER_INDEX' is always 1; in color index mode, the current
18411 raster RGBA color always maintains its initial value.
18413 `GL_INVALID_OPERATION' is generated if `glRasterPos' is executed between
18414 the execution of `glBegin' and the corresponding execution of `glEnd'.")
18416 (define-gl-procedures
18417 ((glReadBuffer (mode GLenum) -> void))
18418 "Select a color buffer source for pixels.
18421 Specifies a color buffer. Accepted values are `GL_FRONT_LEFT',
18422 `GL_FRONT_RIGHT', `GL_BACK_LEFT', `GL_BACK_RIGHT', `GL_FRONT',
18423 `GL_BACK', `GL_LEFT', `GL_RIGHT', and `GL_AUX'I, where I is between
18424 0 and the value of `GL_AUX_BUFFERS' minus 1.
18426 `glReadBuffer' specifies a color buffer as the source for subsequent
18427 `glReadPixels', `glCopyTexImage1D', `glCopyTexImage2D',
18428 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D', and
18429 `glCopyPixels' commands. MODE accepts one of twelve or more predefined
18430 values. (`GL_AUX0' through `GL_AUX3' are always defined.) In a fully
18431 configured system, `GL_FRONT', `GL_LEFT', and `GL_FRONT_LEFT' all name
18432 the front left buffer, `GL_FRONT_RIGHT' and `GL_RIGHT' name the front
18433 right buffer, and `GL_BACK_LEFT' and `GL_BACK' name the back left
18436 Nonstereo double-buffered configurations have only a front left and a
18437 back left buffer. Single-buffered configurations have a front left and
18438 a front right buffer if stereo, and only a front left buffer if
18439 nonstereo. It is an error to specify a nonexistent buffer to
18442 MODE is initially `GL_FRONT' in single-buffered configurations and
18443 `GL_BACK' in double-buffered configurations.
18445 `GL_INVALID_ENUM' is generated if MODE is not one of the twelve (or
18446 more) accepted values.
18448 `GL_INVALID_OPERATION' is generated if MODE specifies a buffer that does
18451 `GL_INVALID_OPERATION' is generated if `glReadBuffer' is executed
18452 between the execution of `glBegin' and the corresponding execution of
18455 (define-gl-procedures
18466 "Read a block of pixels from the frame buffer.
18471 Specify the window coordinates of the first pixel that is read from
18472 the frame buffer. This location is the lower left corner of a
18473 rectangular block of pixels.
18478 Specify the dimensions of the pixel rectangle. WIDTH and HEIGHT of
18479 one correspond to a single pixel.
18482 Specifies the format of the pixel data. The following symbolic
18483 values are accepted: `GL_COLOR_INDEX', `GL_STENCIL_INDEX',
18484 `GL_DEPTH_COMPONENT', `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA',
18485 `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and
18486 `GL_LUMINANCE_ALPHA'.
18489 Specifies the data type of the pixel data. Must be one of
18490 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
18491 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
18492 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
18493 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
18494 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
18495 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
18496 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
18497 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV'.
18500 Returns the pixel data.
18502 `glReadPixels' returns pixel data from the frame buffer, starting with
18503 the pixel whose lower left corner is at location (X, Y), into client
18504 memory starting at location DATA. Several parameters control the
18505 processing of the pixel data before it is placed into client memory.
18506 These parameters are set with three commands: `glPixelStore',
18507 `glPixelTransfer', and `glPixelMap'. This reference page describes the
18508 effects on `glReadPixels' of most, but not all of the parameters
18509 specified by these three commands.
18511 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
18512 target (see `glBindBuffer') while a block of pixels is requested, DATA
18513 is treated as a byte offset into the buffer object's data store rather
18514 than a pointer to client memory.
18516 When the `ARB_imaging' extension is supported, the pixel data may be
18517 processed by additional operations including color table lookup, color
18518 matrix transformations, convolutions, histograms, and minimum and
18519 maximum pixel value computations.
18521 `glReadPixels' returns values from each pixel with lower left corner at
18522 (X+I,Y+J) for 0<=I<WIDTH and 0<=J<HEIGHT . This pixel is said to be the
18523 I th pixel in the J th row. Pixels are returned in row order from the
18524 lowest to the highest row, left to right in each row.
18526 FORMAT specifies the format for the returned pixel values; accepted
18530 Color indices are read from the color buffer selected by
18531 `glReadBuffer'. Each index is converted to fixed point, shifted
18532 left or right depending on the value and sign of `GL_INDEX_SHIFT',
18533 and added to `GL_INDEX_OFFSET'. If `GL_MAP_COLOR' is `GL_TRUE',
18534 indices are replaced by their mappings in the table
18535 `GL_PIXEL_MAP_I_TO_I'.
18538 Stencil values are read from the stencil buffer. Each index is
18539 converted to fixed point, shifted left or right depending on the
18540 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'.
18541 If `GL_MAP_STENCIL' is `GL_TRUE', indices are replaced by their
18542 mappings in the table `GL_PIXEL_MAP_S_TO_S'.
18544 `GL_DEPTH_COMPONENT'
18545 Depth values are read from the depth buffer. Each component is
18546 converted to floating point such that the minimum depth value maps
18547 to 0 and the maximum value maps to 1. Each component is then
18548 multiplied by `GL_DEPTH_SCALE', added to `GL_DEPTH_BIAS', and
18549 finally clamped to the range [0,1] .
18560 `GL_LUMINANCE_ALPHA'
18561 Processing differs depending on whether color buffers store color
18562 indices or RGBA color components. If color indices are stored,
18563 they are read from the color buffer selected by `glReadBuffer'.
18564 Each index is converted to fixed point, shifted left or right
18565 depending on the value and sign of `GL_INDEX_SHIFT', and added to
18566 `GL_INDEX_OFFSET'. Indices are then replaced by the red, green,
18567 blue, and alpha values obtained by indexing the tables
18568 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
18569 `GL_PIXEL_MAP_I_TO_B', and `GL_PIXEL_MAP_I_TO_A'. Each table must
18570 be of size 2^N , but N may be different for different tables.
18571 Before an index is used to look up a value in a table of size 2^N ,
18572 it must be masked against 2^N-1 .
18574 If RGBA color components are stored in the color buffers, they are
18575 read from the color buffer selected by `glReadBuffer'. Each color
18576 component is converted to floating point such that zero intensity
18577 maps to 0.0 and full intensity maps to 1.0. Each component is then
18578 multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where C is
18579 RED, GREEN, BLUE, or ALPHA. Finally, if `GL_MAP_COLOR' is
18580 `GL_TRUE', each component is clamped to the range [0,1] , scaled to
18581 the size of its corresponding table, and is then replaced by its
18582 mapping in the table `GL_PIXEL_MAP_c_TO_c', where C is R, G, B, or
18585 Unneeded data is then discarded. For example, `GL_RED' discards
18586 the green, blue, and alpha components, while `GL_RGB' discards only
18587 the alpha component. `GL_LUMINANCE' computes a single-component
18588 value as the sum of the red, green, and blue components, and
18589 `GL_LUMINANCE_ALPHA' does the same, while keeping alpha as a second
18590 value. The final values are clamped to the range [0,1] .
18592 The shift, scale, bias, and lookup factors just described are all
18593 specified by `glPixelTransfer'. The lookup table contents themselves
18594 are specified by `glPixelMap'.
18596 Finally, the indices or components are converted to the proper format,
18597 as specified by TYPE. If FORMAT is `GL_COLOR_INDEX' or
18598 `GL_STENCIL_INDEX' and TYPE is not `GL_FLOAT', each index is masked with
18599 the mask value given in the following table. If TYPE is `GL_FLOAT',
18600 then each integer index is converted to single-precision floating-point
18603 If FORMAT is `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
18604 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'
18605 and TYPE is not `GL_FLOAT', each component is multiplied by the
18606 multiplier shown in the following table. If type is `GL_FLOAT', then
18607 each component is passed as is (or converted to the client's
18608 single-precision floating-point format if it is different from the one
18614 *Index Mask*, *Component Conversion*
18617 2^8-1 , (2^8-1,)\u2062C
18620 2^7-1 , (2^8-1,)\u2062C-1,/2
18625 `GL_UNSIGNED_SHORT'
18626 2^16-1 , (2^16-1,)\u2062C
18629 2^15-1 , (2^16-1,)\u2062C-1,/2
18632 2^32-1 , (2^32-1,)\u2062C
18635 2^31-1 , (2^32-1,)\u2062C-1,/2
18640 Return values are placed in memory as follows. If FORMAT is
18641 `GL_COLOR_INDEX', `GL_STENCIL_INDEX', `GL_DEPTH_COMPONENT', `GL_RED',
18642 `GL_GREEN', `GL_BLUE', `GL_ALPHA', or `GL_LUMINANCE', a single value is
18643 returned and the data for the I th pixel in the J th row is placed in
18644 location (J,)\u2062WIDTH+I . `GL_RGB' and `GL_BGR' return three values,
18645 `GL_RGBA' and `GL_BGRA' return four values, and `GL_LUMINANCE_ALPHA'
18646 returns two values for each pixel, with all values corresponding to a
18647 single pixel occupying contiguous space in DATA. Storage parameters set
18648 by `glPixelStore', such as `GL_PACK_LSB_FIRST' and `GL_PACK_SWAP_BYTES',
18649 affect the way that data is written into memory. See `glPixelStore' for
18652 `GL_INVALID_ENUM' is generated if FORMAT or TYPE is not an accepted
18655 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
18656 `GL_COLOR_INDEX' or `GL_STENCIL_INDEX'.
18658 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
18660 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_COLOR_INDEX' and
18661 the color buffers store RGBA color components.
18663 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_STENCIL_INDEX' and
18664 there is no stencil buffer.
18666 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
18667 and there is no depth buffer.
18669 `GL_INVALID_OPERATION' is generated if TYPE is one of
18670 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
18671 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
18674 `GL_INVALID_OPERATION' is generated if TYPE is one of
18675 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
18676 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
18677 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
18678 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
18679 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
18681 The formats `GL_BGR', and `GL_BGRA' and types `GL_UNSIGNED_BYTE_3_3_2',
18682 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
18683 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
18684 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
18685 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
18686 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
18687 `GL_UNSIGNED_INT_2_10_10_10_REV' are available only if the GL version is
18690 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18691 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
18692 store is currently mapped.
18694 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18695 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
18696 to the buffer object such that the memory writes required would exceed
18697 the data store size.
18699 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18700 bound to the `GL_PIXEL_PACK_BUFFER' target and DATA is not evenly
18701 divisible into the number of bytes needed to store in memory a datum
18704 `GL_INVALID_OPERATION' is generated if `glReadPixels' is executed
18705 between the execution of `glBegin' and the corresponding execution of
18708 (define-gl-procedures
18738 (v1 const-GLdouble-*)
18739 (v2 const-GLdouble-*)
18743 (v1 const-GLfloat-*)
18744 (v2 const-GLfloat-*)
18753 (v1 const-GLshort-*)
18754 (v2 const-GLshort-*)
18762 Specify one vertex of a rectangle.
18767 Specify the opposite vertex of the rectangle.
18769 `glRect' supports efficient specification of rectangles as two corner
18770 points. Each rectangle command takes four arguments, organized either
18771 as two consecutive pairs of (X,Y) coordinates or as two pointers to
18772 arrays, each containing an (X,Y) pair. The resulting rectangle is
18773 defined in the Z=0 plane.
18775 `glRect'(X1, Y1, X2, Y2) is exactly equivalent to the following
18776 sequence: Note that if the second vertex is above and to the right of
18777 the first vertex, the rectangle is constructed with a counterclockwise
18781 glBegin(`GL_POLYGON');
18788 `GL_INVALID_OPERATION' is generated if `glRect' is executed between the
18789 execution of `glBegin' and the corresponding execution of `glEnd'.")
18791 (define-gl-procedures
18792 ((glRenderMode (mode GLenum) -> GLint))
18793 "Set rasterization mode.
18796 Specifies the rasterization mode. Three values are accepted:
18797 `GL_RENDER', `GL_SELECT', and `GL_FEEDBACK'. The initial value is
18800 `glRenderMode' sets the rasterization mode. It takes one argument,
18801 MODE, which can assume one of three predefined values:
18804 Render mode. Primitives are rasterized, producing pixel fragments,
18805 which are written into the frame buffer. This is the normal mode
18806 and also the default mode.
18809 Selection mode. No pixel fragments are produced, and no change to
18810 the frame buffer contents is made. Instead, a record of the names
18811 of primitives that would have been drawn if the render mode had
18812 been `GL_RENDER' is returned in a select buffer, which must be
18813 created (see `glSelectBuffer') before selection mode is entered.
18816 Feedback mode. No pixel fragments are produced, and no change to
18817 the frame buffer contents is made. Instead, the coordinates and
18818 attributes of vertices that would have been drawn if the render
18819 mode had been `GL_RENDER' is returned in a feedback buffer, which
18820 must be created (see `glFeedbackBuffer') before feedback mode is
18823 The return value of `glRenderMode' is determined by the render mode at
18824 the time `glRenderMode' is called, rather than by MODE. The values
18825 returned for the three render modes are as follows:
18831 The number of hit records transferred to the select buffer.
18834 The number of values (not vertices) transferred to the feedback
18837 See the `glSelectBuffer' and `glFeedbackBuffer' reference pages for more
18838 details concerning selection and feedback operation.
18840 `GL_INVALID_ENUM' is generated if MODE is not one of the three accepted
18843 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is called while
18844 the render mode is `GL_SELECT', or if `glRenderMode' is called with
18845 argument `GL_SELECT' before `glSelectBuffer' is called at least once.
18847 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is called
18848 while the render mode is `GL_FEEDBACK', or if `glRenderMode' is called
18849 with argument `GL_FEEDBACK' before `glFeedbackBuffer' is called at least
18852 `GL_INVALID_OPERATION' is generated if `glRenderMode' is executed
18853 between the execution of `glBegin' and the corresponding execution of
18856 (define-gl-procedures
18857 ((glResetHistogram (target GLenum) -> void))
18858 "Reset histogram table entries to zero.
18861 Must be `GL_HISTOGRAM'.
18863 `glResetHistogram' resets all the elements of the current histogram
18866 `GL_INVALID_ENUM' is generated if TARGET is not `GL_HISTOGRAM'.
18868 `GL_INVALID_OPERATION' is generated if `glResetHistogram' is executed
18869 between the execution of `glBegin' and the corresponding execution of
18872 (define-gl-procedures
18873 ((glResetMinmax (target GLenum) -> void))
18874 "Reset minmax table entries to initial values.
18877 Must be `GL_MINMAX'.
18879 `glResetMinmax' resets the elements of the current minmax table to their
18880 initial values: the ``maximum'' element receives the minimum possible
18881 component values, and the ``minimum'' element receives the maximum
18882 possible component values.
18884 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
18886 `GL_INVALID_OPERATION' is generated if `glResetMinmax' is executed
18887 between the execution of `glBegin' and the corresponding execution of
18890 (define-gl-procedures
18905 "Multiply the current matrix by a rotation matrix.
18908 Specifies the angle of rotation, in degrees.
18915 Specify the X, Y, and Z coordinates of a vector, respectively.
18917 `glRotate' produces a rotation of ANGLE degrees around the vector (X,YZ)
18918 . The current matrix (see `glMatrixMode') is multiplied by a rotation
18919 matrix with the product replacing the current matrix, as if
18920 `glMultMatrix' were called with the following matrix as its argument:
18922 ((X^2\u2061(1-C,)+C X\u2062Y\u2061(1-C,)-Z\u2062S X\u2062Z\u2061(1-C,)+Y\u2062S 0), (Y\u2062X\u2061(1-C,)+Z\u2062S
18923 Y^2\u2061(1-C,)+C Y\u2062Z\u2061(1-C,)-X\u2062S 0), (X\u2062Z\u2061(1-C,)-Y\u2062S Y\u2062Z\u2061(1-C,)+X\u2062S
18924 Z^2\u2061(1-C,)+C 0), (0 0 0 1),)
18928 Where C=COS\u2061(ANGLE,) , S=SIN\u2061(ANGLE,) , and ∥(X,YZ),∥=1 (if not, the GL
18929 will normalize this vector).
18935 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
18936 objects drawn after `glRotate' is called are rotated. Use
18937 `glPushMatrix' and `glPopMatrix' to save and restore the unrotated
18940 `GL_INVALID_OPERATION' is generated if `glRotate' is executed between
18941 the execution of `glBegin' and the corresponding execution of `glEnd'.")
18943 (define-gl-procedures
18949 "Specify multisample coverage parameters.
18952 Specify a single floating-point sample coverage value. The value
18953 is clamped to the range [0,1] . The initial value is 1.0.
18956 Specify a single boolean value representing if the coverage masks
18957 should be inverted. `GL_TRUE' and `GL_FALSE' are accepted. The
18958 initial value is `GL_FALSE'.
18960 Multisampling samples a pixel multiple times at various
18961 implementation-dependent subpixel locations to generate antialiasing
18962 effects. Multisampling transparently antialiases points, lines,
18963 polygons, bitmaps, and images if it is enabled.
18965 VALUE is used in constructing a temporary mask used in determining which
18966 samples will be used in resolving the final fragment color. This mask
18967 is bitwise-anded with the coverage mask generated from the multisampling
18968 computation. If the INVERT flag is set, the temporary mask is inverted
18969 (all bits flipped) and then the bitwise-and is computed.
18971 If an implementation does not have any multisample buffers available, or
18972 multisampling is disabled, rasterization occurs with only a single
18973 sample computing a pixel's final RGB color.
18975 Provided an implementation supports multisample buffers, and
18976 multisampling is enabled, then a pixel's final color is generated by
18977 combining several samples per pixel. Each sample contains color, depth,
18978 and stencil information, allowing those operations to be performed on
18981 `GL_INVALID_OPERATION' is generated if `glSampleCoverage' is executed
18982 between the execution of `glBegin' and the corresponding execution of
18985 (define-gl-procedures
18998 "Multiply the current matrix by a general scaling matrix.
19005 Specify scale factors along the X, Y, and Z axes, respectively.
19007 `glScale' produces a nonuniform scaling along the X, Y, and Z axes. The
19008 three parameters indicate the desired scale factor along each of the
19011 The current matrix (see `glMatrixMode') is multiplied by this scale
19012 matrix, and the product replaces the current matrix as if `glMultMatrix'
19013 were called with the following matrix as its argument:
19015 ((X 0 0 0), (0 Y 0 0), (0 0 Z 0), (0 0 0 1),)
19017 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
19018 objects drawn after `glScale' is called are scaled.
19020 Use `glPushMatrix' and `glPopMatrix' to save and restore the unscaled
19023 `GL_INVALID_OPERATION' is generated if `glScale' is executed between the
19024 execution of `glBegin' and the corresponding execution of `glEnd'.")
19026 (define-gl-procedures
19034 "Define the scissor box.
19039 Specify the lower left corner of the scissor box. Initially (0,
19045 Specify the width and height of the scissor box. When a GL context
19046 is first attached to a window, WIDTH and HEIGHT are set to the
19047 dimensions of that window.
19049 `glScissor' defines a rectangle, called the scissor box, in window
19050 coordinates. The first two arguments, X and Y, specify the lower left
19051 corner of the box. WIDTH and HEIGHT specify the width and height of the
19054 To enable and disable the scissor test, call `glEnable' and `glDisable'
19055 with argument `GL_SCISSOR_TEST'. The test is initially disabled. While
19056 the test is enabled, only pixels that lie within the scissor box can be
19057 modified by drawing commands. Window coordinates have integer values at
19058 the shared corners of frame buffer pixels. `glScissor(0,0,1,1)' allows
19059 modification of only the lower left pixel in the window, and
19060 `glScissor(0,0,0,0)' doesn't allow modification of any pixels in the
19063 When the scissor test is disabled, it is as though the scissor box
19064 includes the entire window.
19066 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
19068 `GL_INVALID_OPERATION' is generated if `glScissor' is executed between
19069 the execution of `glBegin' and the corresponding execution of `glEnd'.")
19071 (define-gl-procedures
19072 ((glSecondaryColorPointer
19076 (pointer const-GLvoid-*)
19079 "Define an array of secondary colors.
19082 Specifies the number of components per color. Must be 3.
19085 Specifies the data type of each color component in the array.
19086 Symbolic constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
19087 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', or
19088 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
19091 Specifies the byte offset between consecutive colors. If STRIDE is
19092 0, the colors are understood to be tightly packed in the array. The
19093 initial value is 0.
19096 Specifies a pointer to the first component of the first color
19097 element in the array. The initial value is 0.
19099 `glSecondaryColorPointer' specifies the location and data format of an
19100 array of color components to use when rendering. SIZE specifies the
19101 number of components per color, and must be 3. TYPE specifies the data
19102 type of each color component, and STRIDE specifies the byte stride from
19103 one color to the next, allowing vertices and attributes to be packed
19104 into a single array or stored in separate arrays.
19106 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
19107 target (see `glBindBuffer') while a secondary color array is specified,
19108 POINTER is treated as a byte offset into the buffer object's data store.
19109 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
19110 secondary color vertex array client-side state
19111 (`GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING').
19113 When a secondary color array is specified, SIZE, TYPE, STRIDE, and
19114 POINTER are saved as client-side state, in addition to the current
19115 vertex array buffer object binding.
19117 To enable and disable the secondary color array, call
19118 `glEnableClientState' and `glDisableClientState' with the argument
19119 `GL_SECONDARY_COLOR_ARRAY'. If enabled, the secondary color array is
19120 used when `glArrayElement', `glDrawArrays', `glMultiDrawArrays',
19121 `glDrawElements', `glMultiDrawElements', or `glDrawRangeElements' is
19124 `GL_INVALID_VALUE' is generated if SIZE is not 3.
19126 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
19128 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
19130 (define-gl-procedures
19131 ((glSecondaryColor3b
19137 (glSecondaryColor3s
19143 (glSecondaryColor3i
19149 (glSecondaryColor3f
19155 (glSecondaryColor3d
19161 (glSecondaryColor3ub
19167 (glSecondaryColor3us
19173 (glSecondaryColor3ui
19179 (glSecondaryColor3bv (v const-GLbyte-*) -> void)
19180 (glSecondaryColor3sv (v const-GLshort-*) -> void)
19181 (glSecondaryColor3iv (v const-GLint-*) -> void)
19182 (glSecondaryColor3fv (v const-GLfloat-*) -> void)
19183 (glSecondaryColor3dv
19184 (v const-GLdouble-*)
19187 (glSecondaryColor3ubv
19188 (v const-GLubyte-*)
19191 (glSecondaryColor3usv
19192 (v const-GLushort-*)
19195 (glSecondaryColor3uiv (v const-GLuint-*) -> void))
19196 "Set the current secondary color.
19203 Specify new red, green, and blue values for the current secondary
19206 The GL stores both a primary four-valued RGBA color and a secondary
19207 four-valued RGBA color (where alpha is always set to 0.0) that is
19208 associated with every vertex.
19210 The secondary color is interpolated and applied to each fragment during
19211 rasterization when `GL_COLOR_SUM' is enabled. When lighting is enabled,
19212 and `GL_SEPARATE_SPECULAR_COLOR' is specified, the value of the
19213 secondary color is assigned the value computed from the specular term of
19214 the lighting computation. Both the primary and secondary current colors
19215 are applied to each fragment, regardless of the state of `GL_COLOR_SUM',
19216 under such conditions. When `GL_SEPARATE_SPECULAR_COLOR' is specified,
19217 the value returned from querying the current secondary color is
19220 `glSecondaryColor3b', `glSecondaryColor3s', and `glSecondaryColor3i'
19221 take three signed byte, short, or long integers as arguments. When *v*
19222 is appended to the name, the color commands can take a pointer to an
19223 array of such values.
19225 Color values are stored in floating-point format, with unspecified
19226 mantissa and exponent sizes. Unsigned integer color components, when
19227 specified, are linearly mapped to floating-point values such that the
19228 largest representable value maps to 1.0 (full intensity), and 0 maps to
19229 0.0 (zero intensity). Signed integer color components, when specified,
19230 are linearly mapped to floating-point values such that the most positive
19231 representable value maps to 1.0, and the most negative representable
19232 value maps to -1.0 . (Note that this mapping does not convert 0
19233 precisely to 0.0). Floating-point values are mapped directly.
19235 Neither floating-point nor signed integer values are clamped to the
19236 range [0,1] before the current color is updated. However, color
19237 components are clamped to this range before they are interpolated or
19238 written into a color buffer.")
19240 (define-gl-procedures
19246 "Establish a buffer for selection mode values.
19249 Specifies the size of BUFFER.
19252 Returns the selection data.
19254 `glSelectBuffer' has two arguments: BUFFER is a pointer to an array of
19255 unsigned integers, and SIZE indicates the size of the array. BUFFER
19256 returns values from the name stack (see `glInitNames', `glLoadName',
19257 `glPushName') when the rendering mode is `GL_SELECT' (see
19258 `glRenderMode'). `glSelectBuffer' must be issued before selection mode
19259 is enabled, and it must not be issued while the rendering mode is
19262 A programmer can use selection to determine which primitives are drawn
19263 into some region of a window. The region is defined by the current
19264 modelview and perspective matrices.
19266 In selection mode, no pixel fragments are produced from rasterization.
19267 Instead, if a primitive or a raster position intersects the clipping
19268 volume defined by the viewing frustum and the user-defined clipping
19269 planes, this primitive causes a selection hit. (With polygons, no hit
19270 occurs if the polygon is culled.) When a change is made to the name
19271 stack, or when `glRenderMode' is called, a hit record is copied to
19272 BUFFER if any hits have occurred since the last such event (name stack
19273 change or `glRenderMode' call). The hit record consists of the number
19274 of names in the name stack at the time of the event, followed by the
19275 minimum and maximum depth values of all vertices that hit since the
19276 previous event, followed by the name stack contents, bottom name first.
19278 Depth values (which are in the range [0,1]) are multiplied by 2^32-1 ,
19279 before being placed in the hit record.
19281 An internal index into BUFFER is reset to 0 whenever selection mode is
19282 entered. Each time a hit record is copied into BUFFER, the index is
19283 incremented to point to the cell just past the end of the block of
19284 names\\(emthat is, to the next available cell If the hit record is larger
19285 than the number of remaining locations in BUFFER, as much data as can
19286 fit is copied, and the overflow flag is set. If the name stack is empty
19287 when a hit record is copied, that record consists of 0 followed by the
19288 minimum and maximum depth values.
19290 To exit selection mode, call `glRenderMode' with an argument other than
19291 `GL_SELECT'. Whenever `glRenderMode' is called while the render mode is
19292 `GL_SELECT', it returns the number of hit records copied to BUFFER,
19293 resets the overflow flag and the selection buffer pointer, and
19294 initializes the name stack to be empty. If the overflow bit was set
19295 when `glRenderMode' was called, a negative hit record count is returned.
19297 `GL_INVALID_VALUE' is generated if SIZE is negative.
19299 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is called while
19300 the render mode is `GL_SELECT', or if `glRenderMode' is called with
19301 argument `GL_SELECT' before `glSelectBuffer' is called at least once.
19303 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is executed
19304 between the execution of `glBegin' and the corresponding execution of
19307 (define-gl-procedures
19308 ((glSeparableFilter2D
19310 (internalformat GLenum)
19315 (row const-GLvoid-*)
19316 (column const-GLvoid-*)
19319 "Define a separable two-dimensional convolution filter.
19322 Must be `GL_SEPARABLE_2D'.
19325 The internal format of the convolution filter kernel. The
19326 allowable values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
19327 `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4',
19328 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
19329 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
19330 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
19331 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
19332 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
19333 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
19334 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
19335 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
19336 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
19339 The number of elements in the pixel array referenced by ROW. (This
19340 is the width of the separable filter kernel.)
19343 The number of elements in the pixel array referenced by COLUMN.
19344 (This is the height of the separable filter kernel.)
19347 The format of the pixel data in ROW and COLUMN. The allowable
19348 values are `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
19349 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_INTENSITY', `GL_LUMINANCE', and
19350 `GL_LUMINANCE_ALPHA'.
19353 The type of the pixel data in ROW and COLUMN. Symbolic constants
19354 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
19355 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
19356 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
19357 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
19358 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
19359 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
19360 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
19361 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
19365 Pointer to a one-dimensional array of pixel data that is processed
19366 to build the row filter kernel.
19369 Pointer to a one-dimensional array of pixel data that is processed
19370 to build the column filter kernel.
19372 `glSeparableFilter2D' builds a two-dimensional separable convolution
19373 filter kernel from two arrays of pixels.
19375 The pixel arrays specified by (WIDTH, FORMAT, TYPE, ROW) and (HEIGHT,
19376 FORMAT, TYPE, COLUMN) are processed just as if they had been passed to
19377 `glDrawPixels', but processing stops after the final expansion to RGBA
19380 If a non-zero named buffer object is bound to the
19381 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
19382 filter is specified, ROW and COLUMN are treated as byte offsets into the
19383 buffer object's data store.
19385 Next, the R, G, B, and A components of all pixels in both arrays are
19386 scaled by the four separable 2D `GL_CONVOLUTION_FILTER_SCALE' parameters
19387 and biased by the four separable 2D `GL_CONVOLUTION_FILTER_BIAS'
19388 parameters. (The scale and bias parameters are set by
19389 `glConvolutionParameter' using the `GL_SEPARABLE_2D' target and the
19390 names `GL_CONVOLUTION_FILTER_SCALE' and `GL_CONVOLUTION_FILTER_BIAS'.
19391 The parameters themselves are vectors of four values that are applied to
19392 red, green, blue, and alpha, in that order.) The R, G, B, and A values
19393 are not clamped to [0,1] at any time during this process.
19395 Each pixel is then converted to the internal format specified by
19396 INTERNALFORMAT. This conversion simply maps the component values of the
19397 pixel (R, G, B, and A) to the values included in the internal format
19398 (red, green, blue, alpha, luminance, and intensity). The mapping is as
19402 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
19407 `GL_LUMINANCE_ALPHA'
19419 The red, green, blue, alpha, luminance, and/or intensity components of
19420 the resulting pixels are stored in floating-point rather than integer
19421 format. They form two one-dimensional filter kernel images. The row
19422 image is indexed by coordinate I starting at zero and increasing from
19423 left to right. Each location in the row image is derived from element I
19424 of ROW. The column image is indexed by coordinate J starting at zero
19425 and increasing from bottom to top. Each location in the column image is
19426 derived from element J of COLUMN.
19428 Note that after a convolution is performed, the resulting color
19429 components are also scaled by their corresponding
19430 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
19431 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
19432 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
19433 set by `glPixelTransfer'.
19435 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SEPARABLE_2D'.
19437 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
19440 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
19443 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
19446 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
19447 than the maximum supported value. This value may be queried with
19448 `glGetConvolutionParameter' using target `GL_SEPARABLE_2D' and name
19449 `GL_MAX_CONVOLUTION_WIDTH'.
19451 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
19452 than the maximum supported value. This value may be queried with
19453 `glGetConvolutionParameter' using target `GL_SEPARABLE_2D' and name
19454 `GL_MAX_CONVOLUTION_HEIGHT'.
19456 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
19457 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
19458 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
19461 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
19462 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
19463 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
19464 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
19465 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
19466 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
19468 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
19469 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
19470 data store is currently mapped.
19472 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
19473 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
19474 unpacked from the buffer object such that the memory reads required
19475 would exceed the data store size.
19477 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
19478 bound to the `GL_PIXEL_UNPACK_BUFFER' target and ROW or COLUMN is not
19479 evenly divisible into the number of bytes needed to store in memory a
19480 datum indicated by TYPE.
19482 `GL_INVALID_OPERATION' is generated if `glSeparableFilter2D' is executed
19483 between the execution of `glBegin' and the corresponding execution of
19486 (define-gl-procedures
19487 ((glShadeModel (mode GLenum) -> void))
19488 "Select flat or smooth shading.
19491 Specifies a symbolic value representing a shading technique.
19492 Accepted values are `GL_FLAT' and `GL_SMOOTH'. The initial value
19495 GL primitives can have either flat or smooth shading. Smooth shading,
19496 the default, causes the computed colors of vertices to be interpolated
19497 as the primitive is rasterized, typically assigning different colors to
19498 each resulting pixel fragment. Flat shading selects the computed color
19499 of just one vertex and assigns it to all the pixel fragments generated
19500 by rasterizing a single primitive. In either case, the computed color
19501 of a vertex is the result of lighting if lighting is enabled, or it is
19502 the current color at the time the vertex was specified if lighting is
19505 Flat and smooth shading are indistinguishable for points. Starting when
19506 `glBegin' is issued and counting vertices and primitives from 1, the GL
19507 gives each flat-shaded line segment I the computed color of vertex I+1 ,
19508 its second vertex. Counting similarly from 1, the GL gives each
19509 flat-shaded polygon the computed color of the vertex listed in the
19510 following table. This is the last vertex to specify the polygon in all
19511 cases except single polygons, where the first vertex specifies the
19516 * Primitive Type of Polygon I *
19519 Single polygon (I==1 )
19528 Independent triangle
19537 Flat and smooth shading are specified by `glShadeModel' with MODE set to
19538 `GL_FLAT' and `GL_SMOOTH', respectively.
19540 `GL_INVALID_ENUM' is generated if MODE is any value other than `GL_FLAT'
19543 `GL_INVALID_OPERATION' is generated if `glShadeModel' is executed
19544 between the execution of `glBegin' and the corresponding execution of
19547 (define-gl-procedures
19551 (string const-GLchar-**)
19552 (length const-GLint-*)
19555 "Replaces the source code in a shader object.
19558 Specifies the handle of the shader object whose source code is to
19562 Specifies the number of elements in the STRING and LENGTH arrays.
19565 Specifies an array of pointers to strings containing the source
19566 code to be loaded into the shader.
19569 Specifies an array of string lengths.
19571 `glShaderSource' sets the source code in SHADER to the source code in
19572 the array of strings specified by STRING. Any source code previously
19573 stored in the shader object is completely replaced. The number of
19574 strings in the array is specified by COUNT. If LENGTH is `NULL', each
19575 string is assumed to be null terminated. If LENGTH is a value other
19576 than `NULL', it points to an array containing a string length for each
19577 of the corresponding elements of STRING. Each element in the LENGTH
19578 array may contain the length of the corresponding string (the null
19579 character is not counted as part of the string length) or a value less
19580 than 0 to indicate that the string is null terminated. The source code
19581 strings are not scanned or parsed at this time; they are simply copied
19582 into the specified shader object.
19584 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
19587 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
19589 `GL_INVALID_VALUE' is generated if COUNT is less than 0.
19591 `GL_INVALID_OPERATION' is generated if `glShaderSource' is executed
19592 between the execution of `glBegin' and the corresponding execution of
19595 (define-gl-procedures
19596 ((glStencilFuncSeparate
19603 "Set front and/or back function and reference value for stencil testing.
19606 Specifies whether front and/or back stencil state is updated. Three
19607 symbolic constants are valid: `GL_FRONT', `GL_BACK', and
19608 `GL_FRONT_AND_BACK'.
19611 Specifies the test function. Eight symbolic constants are valid:
19612 `GL_NEVER', `GL_LESS', `GL_LEQUAL', `GL_GREATER', `GL_GEQUAL',
19613 `GL_EQUAL', `GL_NOTEQUAL', and `GL_ALWAYS'. The initial value is
19617 Specifies the reference value for the stencil test. REF is clamped
19618 to the range [0,2^N-1] , where N is the number of bitplanes in the
19619 stencil buffer. The initial value is 0.
19622 Specifies a mask that is ANDed with both the reference value and
19623 the stored stencil value when the test is done. The initial value
19626 Stenciling, like depth-buffering, enables and disables drawing on a
19627 per-pixel basis. You draw into the stencil planes using GL drawing
19628 primitives, then render geometry and images, using the stencil planes to
19629 mask out portions of the screen. Stenciling is typically used in
19630 multipass rendering algorithms to achieve special effects, such as
19631 decals, outlining, and constructive solid geometry rendering.
19633 The stencil test conditionally eliminates a pixel based on the outcome
19634 of a comparison between the reference value and the value in the stencil
19635 buffer. To enable and disable the test, call `glEnable' and `glDisable'
19636 with argument `GL_STENCIL_TEST'. To specify actions based on the
19637 outcome of the stencil test, call `glStencilOp' or
19638 `glStencilOpSeparate'.
19640 There can be two separate sets of FUNC, REF, and MASK parameters; one
19641 affects back-facing polygons, and the other affects front-facing
19642 polygons as well as other non-polygon primitives. `glStencilFunc' sets
19643 both front and back stencil state to the same values, as if
19644 `glStencilFuncSeparate' were called with FACE set to
19645 `GL_FRONT_AND_BACK'.
19647 FUNC is a symbolic constant that determines the stencil comparison
19648 function. It accepts one of eight values, shown in the following list.
19649 REF is an integer reference value that is used in the stencil
19650 comparison. It is clamped to the range [0,2^N-1] , where N is the
19651 number of bitplanes in the stencil buffer. MASK is bitwise ANDed with
19652 both the reference value and the stored stencil value, with the ANDed
19653 values participating in the comparison.
19655 If STENCIL represents the value stored in the corresponding stencil
19656 buffer location, the following list shows the effect of each comparison
19657 function that can be specified by FUNC. Only if the comparison succeeds
19658 is the pixel passed through to the next stage in the rasterization
19659 process (see `glStencilOp'). All tests treat STENCIL values as unsigned
19660 integers in the range [0,2^N-1] , where N is the number of bitplanes in
19661 the stencil buffer.
19663 The following values are accepted by FUNC:
19669 Passes if ( REF & MASK ) < ( STENCIL & MASK ).
19672 Passes if ( REF & MASK ) <= ( STENCIL & MASK ).
19675 Passes if ( REF & MASK ) > ( STENCIL & MASK ).
19678 Passes if ( REF & MASK ) >= ( STENCIL & MASK ).
19681 Passes if ( REF & MASK ) = ( STENCIL & MASK ).
19684 Passes if ( REF & MASK ) != ( STENCIL & MASK ).
19689 `GL_INVALID_ENUM' is generated if FUNC is not one of the eight accepted
19692 `GL_INVALID_OPERATION' is generated if `glStencilFuncSeparate' is
19693 executed between the execution of `glBegin' and the corresponding
19694 execution of `glEnd'.")
19696 (define-gl-procedures
19703 "Set front and back function and reference value for stencil testing.
19706 Specifies the test function. Eight symbolic constants are valid:
19707 `GL_NEVER', `GL_LESS', `GL_LEQUAL', `GL_GREATER', `GL_GEQUAL',
19708 `GL_EQUAL', `GL_NOTEQUAL', and `GL_ALWAYS'. The initial value is
19712 Specifies the reference value for the stencil test. REF is clamped
19713 to the range [0,2^N-1] , where N is the number of bitplanes in the
19714 stencil buffer. The initial value is 0.
19717 Specifies a mask that is ANDed with both the reference value and
19718 the stored stencil value when the test is done. The initial value
19721 Stenciling, like depth-buffering, enables and disables drawing on a
19722 per-pixel basis. Stencil planes are first drawn into using GL drawing
19723 primitives, then geometry and images are rendered using the stencil
19724 planes to mask out portions of the screen. Stenciling is typically used
19725 in multipass rendering algorithms to achieve special effects, such as
19726 decals, outlining, and constructive solid geometry rendering.
19728 The stencil test conditionally eliminates a pixel based on the outcome
19729 of a comparison between the reference value and the value in the stencil
19730 buffer. To enable and disable the test, call `glEnable' and `glDisable'
19731 with argument `GL_STENCIL_TEST'. To specify actions based on the
19732 outcome of the stencil test, call `glStencilOp' or
19733 `glStencilOpSeparate'.
19735 There can be two separate sets of FUNC, REF, and MASK parameters; one
19736 affects back-facing polygons, and the other affects front-facing
19737 polygons as well as other non-polygon primitives. `glStencilFunc' sets
19738 both front and back stencil state to the same values. Use
19739 `glStencilFuncSeparate' to set front and back stencil state to different
19742 FUNC is a symbolic constant that determines the stencil comparison
19743 function. It accepts one of eight values, shown in the following list.
19744 REF is an integer reference value that is used in the stencil
19745 comparison. It is clamped to the range [0,2^N-1] , where N is the
19746 number of bitplanes in the stencil buffer. MASK is bitwise ANDed with
19747 both the reference value and the stored stencil value, with the ANDed
19748 values participating in the comparison.
19750 If STENCIL represents the value stored in the corresponding stencil
19751 buffer location, the following list shows the effect of each comparison
19752 function that can be specified by FUNC. Only if the comparison succeeds
19753 is the pixel passed through to the next stage in the rasterization
19754 process (see `glStencilOp'). All tests treat STENCIL values as unsigned
19755 integers in the range [0,2^N-1] , where N is the number of bitplanes in
19756 the stencil buffer.
19758 The following values are accepted by FUNC:
19764 Passes if ( REF & MASK ) < ( STENCIL & MASK ).
19767 Passes if ( REF & MASK ) <= ( STENCIL & MASK ).
19770 Passes if ( REF & MASK ) > ( STENCIL & MASK ).
19773 Passes if ( REF & MASK ) >= ( STENCIL & MASK ).
19776 Passes if ( REF & MASK ) = ( STENCIL & MASK ).
19779 Passes if ( REF & MASK ) != ( STENCIL & MASK ).
19784 `GL_INVALID_ENUM' is generated if FUNC is not one of the eight accepted
19787 `GL_INVALID_OPERATION' is generated if `glStencilFunc' is executed
19788 between the execution of `glBegin' and the corresponding execution of
19791 (define-gl-procedures
19792 ((glStencilMaskSeparate
19797 "Control the front and/or back writing of individual bits in the stencil
19801 Specifies whether the front and/or back stencil writemask is
19802 updated. Three symbolic constants are valid: `GL_FRONT',
19803 `GL_BACK', and `GL_FRONT_AND_BACK'.
19806 Specifies a bit mask to enable and disable writing of individual
19807 bits in the stencil planes. Initially, the mask is all 1's.
19809 `glStencilMaskSeparate' controls the writing of individual bits in the
19810 stencil planes. The least significant N bits of MASK, where N is the
19811 number of bits in the stencil buffer, specify a mask. Where a 1 appears
19812 in the mask, it's possible to write to the corresponding bit in the
19813 stencil buffer. Where a 0 appears, the corresponding bit is
19814 write-protected. Initially, all bits are enabled for writing.
19816 There can be two separate MASK writemasks; one affects back-facing
19817 polygons, and the other affects front-facing polygons as well as other
19818 non-polygon primitives. `glStencilMask' sets both front and back
19819 stencil writemasks to the same values, as if `glStencilMaskSeparate'
19820 were called with FACE set to `GL_FRONT_AND_BACK'.
19822 `GL_INVALID_OPERATION' is generated if `glStencilMaskSeparate' is
19823 executed between the execution of `glBegin' and the corresponding
19824 execution of `glEnd'.")
19826 (define-gl-procedures
19827 ((glStencilMask (mask GLuint) -> void))
19828 "Control the front and back writing of individual bits in the stencil
19832 Specifies a bit mask to enable and disable writing of individual
19833 bits in the stencil planes. Initially, the mask is all 1's.
19835 `glStencilMask' controls the writing of individual bits in the stencil
19836 planes. The least significant N bits of MASK, where N is the number of
19837 bits in the stencil buffer, specify a mask. Where a 1 appears in the
19838 mask, it's possible to write to the corresponding bit in the stencil
19839 buffer. Where a 0 appears, the corresponding bit is write-protected.
19840 Initially, all bits are enabled for writing.
19842 There can be two separate MASK writemasks; one affects back-facing
19843 polygons, and the other affects front-facing polygons as well as other
19844 non-polygon primitives. `glStencilMask' sets both front and back
19845 stencil writemasks to the same values. Use `glStencilMaskSeparate' to
19846 set front and back stencil writemasks to different values.
19848 `GL_INVALID_OPERATION' is generated if `glStencilMask' is executed
19849 between the execution of `glBegin' and the corresponding execution of
19852 (define-gl-procedures
19853 ((glStencilOpSeparate
19860 "Set front and/or back stencil test actions.
19863 Specifies whether front and/or back stencil state is updated. Three
19864 symbolic constants are valid: `GL_FRONT', `GL_BACK', and
19865 `GL_FRONT_AND_BACK'.
19868 Specifies the action to take when the stencil test fails. Eight
19869 symbolic constants are accepted: `GL_KEEP', `GL_ZERO',
19870 `GL_REPLACE', `GL_INCR', `GL_INCR_WRAP', `GL_DECR', `GL_DECR_WRAP',
19871 and `GL_INVERT'. The initial value is `GL_KEEP'.
19874 Specifies the stencil action when the stencil test passes, but the
19875 depth test fails. DPFAIL accepts the same symbolic constants as
19876 SFAIL. The initial value is `GL_KEEP'.
19879 Specifies the stencil action when both the stencil test and the
19880 depth test pass, or when the stencil test passes and either there
19881 is no depth buffer or depth testing is not enabled. DPPASS accepts
19882 the same symbolic constants as SFAIL. The initial value is
19885 Stenciling, like depth-buffering, enables and disables drawing on a
19886 per-pixel basis. You draw into the stencil planes using GL drawing
19887 primitives, then render geometry and images, using the stencil planes to
19888 mask out portions of the screen. Stenciling is typically used in
19889 multipass rendering algorithms to achieve special effects, such as
19890 decals, outlining, and constructive solid geometry rendering.
19892 The stencil test conditionally eliminates a pixel based on the outcome
19893 of a comparison between the value in the stencil buffer and a reference
19894 value. To enable and disable the test, call `glEnable' and `glDisable'
19895 with argument `GL_STENCIL_TEST'; to control it, call `glStencilFunc' or
19896 `glStencilFuncSeparate'.
19898 There can be two separate sets of SFAIL, DPFAIL, and DPPASS parameters;
19899 one affects back-facing polygons, and the other affects front-facing
19900 polygons as well as other non-polygon primitives. `glStencilOp' sets
19901 both front and back stencil state to the same values, as if
19902 `glStencilOpSeparate' were called with FACE set to `GL_FRONT_AND_BACK'.
19904 `glStencilOpSeparate' takes three arguments that indicate what happens
19905 to the stored stencil value while stenciling is enabled. If the stencil
19906 test fails, no change is made to the pixel's color or depth buffers, and
19907 SFAIL specifies what happens to the stencil buffer contents. The
19908 following eight actions are possible.
19911 Keeps the current value.
19914 Sets the stencil buffer value to 0.
19917 Sets the stencil buffer value to REF, as specified by
19921 Increments the current stencil buffer value. Clamps to the maximum
19922 representable unsigned value.
19925 Increments the current stencil buffer value. Wraps stencil buffer
19926 value to zero when incrementing the maximum representable unsigned
19930 Decrements the current stencil buffer value. Clamps to 0.
19933 Decrements the current stencil buffer value. Wraps stencil buffer
19934 value to the maximum representable unsigned value when decrementing
19935 a stencil buffer value of zero.
19938 Bitwise inverts the current stencil buffer value.
19940 Stencil buffer values are treated as unsigned integers. When
19941 incremented and decremented, values are clamped to 0 and 2^N-1 , where N
19942 is the value returned by querying `GL_STENCIL_BITS'.
19944 The other two arguments to `glStencilOpSeparate' specify stencil buffer
19945 actions that depend on whether subsequent depth buffer tests succeed
19946 (DPPASS) or fail (DPFAIL) (see `glDepthFunc'). The actions are
19947 specified using the same eight symbolic constants as SFAIL. Note that
19948 DPFAIL is ignored when there is no depth buffer, or when the depth
19949 buffer is not enabled. In these cases, SFAIL and DPPASS specify stencil
19950 action when the stencil test fails and passes, respectively.
19952 `GL_INVALID_ENUM' is generated if FACE is any value other than
19953 `GL_FRONT', `GL_BACK', or `GL_FRONT_AND_BACK'.
19955 `GL_INVALID_ENUM' is generated if SFAIL, DPFAIL, or DPPASS is any value
19956 other than the eight defined constant values.
19958 `GL_INVALID_OPERATION' is generated if `glStencilOpSeparate' is executed
19959 between the execution of `glBegin' and the corresponding execution of
19962 (define-gl-procedures
19969 "Set front and back stencil test actions.
19972 Specifies the action to take when the stencil test fails. Eight
19973 symbolic constants are accepted: `GL_KEEP', `GL_ZERO',
19974 `GL_REPLACE', `GL_INCR', `GL_INCR_WRAP', `GL_DECR', `GL_DECR_WRAP',
19975 and `GL_INVERT'. The initial value is `GL_KEEP'.
19978 Specifies the stencil action when the stencil test passes, but the
19979 depth test fails. DPFAIL accepts the same symbolic constants as
19980 SFAIL. The initial value is `GL_KEEP'.
19983 Specifies the stencil action when both the stencil test and the
19984 depth test pass, or when the stencil test passes and either there
19985 is no depth buffer or depth testing is not enabled. DPPASS accepts
19986 the same symbolic constants as SFAIL. The initial value is
19989 Stenciling, like depth-buffering, enables and disables drawing on a
19990 per-pixel basis. You draw into the stencil planes using GL drawing
19991 primitives, then render geometry and images, using the stencil planes to
19992 mask out portions of the screen. Stenciling is typically used in
19993 multipass rendering algorithms to achieve special effects, such as
19994 decals, outlining, and constructive solid geometry rendering.
19996 The stencil test conditionally eliminates a pixel based on the outcome
19997 of a comparison between the value in the stencil buffer and a reference
19998 value. To enable and disable the test, call `glEnable' and `glDisable'
19999 with argument `GL_STENCIL_TEST'; to control it, call `glStencilFunc' or
20000 `glStencilFuncSeparate'.
20002 There can be two separate sets of SFAIL, DPFAIL, and DPPASS parameters;
20003 one affects back-facing polygons, and the other affects front-facing
20004 polygons as well as other non-polygon primitives. `glStencilOp' sets
20005 both front and back stencil state to the same values. Use
20006 `glStencilOpSeparate' to set front and back stencil state to different
20009 `glStencilOp' takes three arguments that indicate what happens to the
20010 stored stencil value while stenciling is enabled. If the stencil test
20011 fails, no change is made to the pixel's color or depth buffers, and
20012 SFAIL specifies what happens to the stencil buffer contents. The
20013 following eight actions are possible.
20016 Keeps the current value.
20019 Sets the stencil buffer value to 0.
20022 Sets the stencil buffer value to REF, as specified by
20026 Increments the current stencil buffer value. Clamps to the maximum
20027 representable unsigned value.
20030 Increments the current stencil buffer value. Wraps stencil buffer
20031 value to zero when incrementing the maximum representable unsigned
20035 Decrements the current stencil buffer value. Clamps to 0.
20038 Decrements the current stencil buffer value. Wraps stencil buffer
20039 value to the maximum representable unsigned value when decrementing
20040 a stencil buffer value of zero.
20043 Bitwise inverts the current stencil buffer value.
20045 Stencil buffer values are treated as unsigned integers. When
20046 incremented and decremented, values are clamped to 0 and 2^N-1 , where N
20047 is the value returned by querying `GL_STENCIL_BITS'.
20049 The other two arguments to `glStencilOp' specify stencil buffer actions
20050 that depend on whether subsequent depth buffer tests succeed (DPPASS) or
20051 fail (DPFAIL) (see `glDepthFunc'). The actions are specified using the
20052 same eight symbolic constants as SFAIL. Note that DPFAIL is ignored
20053 when there is no depth buffer, or when the depth buffer is not enabled.
20054 In these cases, SFAIL and DPPASS specify stencil action when the stencil
20055 test fails and passes, respectively.
20057 `GL_INVALID_ENUM' is generated if SFAIL, DPFAIL, or DPPASS is any value
20058 other than the eight defined constant values.
20060 `GL_INVALID_OPERATION' is generated if `glStencilOp' is executed between
20061 the execution of `glBegin' and the corresponding execution of `glEnd'.")
20063 (define-gl-procedures
20064 ((glTexCoordPointer
20068 (pointer const-GLvoid-*)
20071 "Define an array of texture coordinates.
20074 Specifies the number of coordinates per array element. Must be 1,
20075 2, 3, or 4. The initial value is 4.
20078 Specifies the data type of each texture coordinate. Symbolic
20079 constants `GL_SHORT', `GL_INT', `GL_FLOAT', or `GL_DOUBLE' are
20080 accepted. The initial value is `GL_FLOAT'.
20083 Specifies the byte offset between consecutive texture coordinate
20084 sets. If STRIDE is 0, the array elements are understood to be
20085 tightly packed. The initial value is 0.
20088 Specifies a pointer to the first coordinate of the first texture
20089 coordinate set in the array. The initial value is 0.
20091 `glTexCoordPointer' specifies the location and data format of an array
20092 of texture coordinates to use when rendering. SIZE specifies the number
20093 of coordinates per texture coordinate set, and must be 1, 2, 3, or 4.
20094 TYPE specifies the data type of each texture coordinate, and STRIDE
20095 specifies the byte stride from one texture coordinate set to the next,
20096 allowing vertices and attributes to be packed into a single array or
20097 stored in separate arrays. (Single-array storage may be more efficient
20098 on some implementations; see `glInterleavedArrays'.)
20100 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
20101 target (see `glBindBuffer') while a texture coordinate array is
20102 specified, POINTER is treated as a byte offset into the buffer object's
20103 data store. Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING')
20104 is saved as texture coordinate vertex array client-side state
20105 (`GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING').
20107 When a texture coordinate array is specified, SIZE, TYPE, STRIDE, and
20108 POINTER are saved as client-side state, in addition to the current
20109 vertex array buffer object binding.
20111 To enable and disable a texture coordinate array, call
20112 `glEnableClientState' and `glDisableClientState' with the argument
20113 `GL_TEXTURE_COORD_ARRAY'. If enabled, the texture coordinate array is
20114 used when `glArrayElement', `glDrawArrays', `glMultiDrawArrays',
20115 `glDrawElements', `glMultiDrawElements', or `glDrawRangeElements' is
20118 `GL_INVALID_VALUE' is generated if SIZE is not 1, 2, 3, or 4.
20120 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
20122 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
20124 (define-gl-procedures
20125 ((glTexCoord1s (s GLshort) -> void)
20126 (glTexCoord1i (s GLint) -> void)
20127 (glTexCoord1f (s GLfloat) -> void)
20128 (glTexCoord1d (s GLdouble) -> void)
20129 (glTexCoord2s (s GLshort) (t GLshort) -> void)
20130 (glTexCoord2i (s GLint) (t GLint) -> void)
20131 (glTexCoord2f (s GLfloat) (t GLfloat) -> void)
20132 (glTexCoord2d (s GLdouble) (t GLdouble) -> void)
20185 (glTexCoord1sv (v const-GLshort-*) -> void)
20186 (glTexCoord1iv (v const-GLint-*) -> void)
20187 (glTexCoord1fv (v const-GLfloat-*) -> void)
20188 (glTexCoord1dv (v const-GLdouble-*) -> void)
20189 (glTexCoord2sv (v const-GLshort-*) -> void)
20190 (glTexCoord2iv (v const-GLint-*) -> void)
20191 (glTexCoord2fv (v const-GLfloat-*) -> void)
20192 (glTexCoord2dv (v const-GLdouble-*) -> void)
20193 (glTexCoord3sv (v const-GLshort-*) -> void)
20194 (glTexCoord3iv (v const-GLint-*) -> void)
20195 (glTexCoord3fv (v const-GLfloat-*) -> void)
20196 (glTexCoord3dv (v const-GLdouble-*) -> void)
20197 (glTexCoord4sv (v const-GLshort-*) -> void)
20198 (glTexCoord4iv (v const-GLint-*) -> void)
20199 (glTexCoord4fv (v const-GLfloat-*) -> void)
20200 (glTexCoord4dv (v const-GLdouble-*) -> void))
20201 "Set the current texture coordinates.
20210 Specify S, T, R, and Q texture coordinates. Not all parameters are
20211 present in all forms of the command.
20213 `glTexCoord' specifies texture coordinates in one, two, three, or four
20214 dimensions. `glTexCoord1' sets the current texture coordinates to
20215 (S,001) ; a call to `glTexCoord2' sets them to (S,T01) . Similarly,
20216 `glTexCoord3' specifies the texture coordinates as (S,TR1) , and
20217 `glTexCoord4' defines all four components explicitly as (S,TRQ) .
20219 The current texture coordinates are part of the data that is associated
20220 with each vertex and with the current raster position. Initially, the
20221 values for S, T, R, and Q are (0, 0, 0, 1).")
20223 (define-gl-procedures
20239 (params const-GLfloat-*)
20245 (params const-GLint-*)
20248 "Set texture environment parameters.
20251 Specifies a texture environment. May be `GL_TEXTURE_ENV',
20252 `GL_TEXTURE_FILTER_CONTROL' or `GL_POINT_SPRITE'.
20255 Specifies the symbolic name of a single-valued texture environment
20256 parameter. May be either `GL_TEXTURE_ENV_MODE',
20257 `GL_TEXTURE_LOD_BIAS', `GL_COMBINE_RGB', `GL_COMBINE_ALPHA',
20258 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
20259 `GL_SRC1_ALPHA', `GL_SRC2_ALPHA', `GL_OPERAND0_RGB',
20260 `GL_OPERAND1_RGB', `GL_OPERAND2_RGB', `GL_OPERAND0_ALPHA',
20261 `GL_OPERAND1_ALPHA', `GL_OPERAND2_ALPHA', `GL_RGB_SCALE',
20262 `GL_ALPHA_SCALE', or `GL_COORD_REPLACE'.
20265 Specifies a single symbolic constant, one of `GL_ADD',
20266 `GL_ADD_SIGNED', `GL_INTERPOLATE', `GL_MODULATE', `GL_DECAL',
20267 `GL_BLEND', `GL_REPLACE', `GL_SUBTRACT', `GL_COMBINE',
20268 `GL_TEXTURE', `GL_CONSTANT', `GL_PRIMARY_COLOR', `GL_PREVIOUS',
20269 `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR', `GL_SRC_ALPHA',
20270 `GL_ONE_MINUS_SRC_ALPHA', a single boolean value for the point
20271 sprite texture coordinate replacement, a single floating-point
20272 value for the texture level-of-detail bias, or 1.0, 2.0, or 4.0
20273 when specifying the `GL_RGB_SCALE' or `GL_ALPHA_SCALE'.
20275 A texture environment specifies how texture values are interpreted when
20276 a fragment is textured. When TARGET is `GL_TEXTURE_FILTER_CONTROL',
20277 PNAME must be `GL_TEXTURE_LOD_BIAS'. When TARGET is `GL_TEXTURE_ENV',
20278 PNAME can be `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR',
20279 `GL_COMBINE_RGB', `GL_COMBINE_ALPHA', `GL_RGB_SCALE', `GL_ALPHA_SCALE',
20280 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
20281 `GL_SRC1_ALPHA', or `GL_SRC2_ALPHA'.
20283 If PNAME is `GL_TEXTURE_ENV_MODE', then PARAMS is (or points to) the
20284 symbolic name of a texture function. Six texture functions may be
20285 specified: `GL_ADD', `GL_MODULATE', `GL_DECAL', `GL_BLEND',
20286 `GL_REPLACE', or `GL_COMBINE'.
20288 The following table shows the correspondence of filtered texture values
20289 R_T , G_T , B_T , A_T , L_T , I_T to texture source components. C_S and
20290 A_S are used by the texture functions described below.
20294 Texture Base Internal Format
20301 ( L_T , L_T , L_T ) , 1
20303 `GL_LUMINANCE_ALPHA'
20304 ( L_T , L_T , L_T ) , A_T
20307 ( I_T , I_T , I_T ) , I_T
20310 ( R_T , G_T , B_T ) , 1
20313 ( R_T , G_T , B_T ) , A_T
20315 A texture function acts on the fragment to be textured using the texture
20316 image value that applies to the fragment (see `glTexParameter') and
20317 produces an RGBA color for that fragment. The following table shows how
20318 the RGBA color is produced for each of the first five texture functions
20319 that can be chosen. C is a triple of color values (RGB) and A is the
20320 associated alpha value. RGBA values extracted from a texture image are
20321 in the range [0,1]. The subscript P refers to the color computed from
20322 the previous texture stage (or the incoming fragment if processing
20323 texture stage 0), the subscript S to the texture source color, the
20324 subscript C to the texture environment color, and the subscript V
20325 indicates a value produced by the texture function.
20329 Texture Base Internal Format
20330 `Value', `GL_REPLACE' Function , `GL_MODULATE' Function ,
20331 `GL_DECAL' Function , `GL_BLEND' Function , `GL_ADD' Function
20334 C_V= , C_P , C_P , undefined , C_P , C_P
20337 A_V= , A_S , A_P\u2062A_S , , A_V=A_P\u2062A_S , A_P\u2062A_S
20340 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20343 A_V= , A_P , A_P , , A_P , A_P
20345 `GL_LUMINANCE_ALPHA'
20346 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20349 A_V= , A_S , A_P\u2062A_S , , A_P\u2062A_S , A_P\u2062A_S
20352 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20355 A_V= , A_S , A_P\u2062A_S , , A_P\u2062(1-A_S,)+A_C\u2062A_S , A_P+A_S
20358 C_V= , C_S , C_P\u2062C_S , C_S , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20361 A_V= , A_P , A_P , A_P , A_P , A_P
20364 C_V= , C_S , C_P\u2062C_S , C_P\u2062(1-A_S,)+C_S\u2062A_S , C_P\u2062(1-C_S,)+C_C\u2062C_S
20368 A_V= , A_S , A_P\u2062A_S , A_P , A_P\u2062A_S , A_P\u2062A_S
20370 If PNAME is `GL_TEXTURE_ENV_MODE', and PARAMS is `GL_COMBINE', the form
20371 of the texture function depends on the values of `GL_COMBINE_RGB' and
20372 `GL_COMBINE_ALPHA'.
20374 The following describes how the texture sources, as specified by
20375 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
20376 `GL_SRC1_ALPHA', and `GL_SRC2_ALPHA', are combined to produce a final
20377 texture color. In the following tables, `GL_SRC0_c' is represented by
20378 ARG0 , `GL_SRC1_c' is represented by ARG1 , and `GL_SRC2_c' is
20379 represented by ARG2 .
20381 `GL_COMBINE_RGB' accepts any of `GL_REPLACE', `GL_MODULATE', `GL_ADD',
20382 `GL_ADD_SIGNED', `GL_INTERPOLATE', `GL_SUBTRACT', `GL_DOT3_RGB', or
20403 ARG0×ARG2+ARG1×(1-ARG2,)
20408 `GL_DOT3_RGB' or `GL_DOT3_RGBA'
20409 4×(((ARG0_R,-0.5,)×(ARG1_R,-0.5,),)+((ARG0_G,-0.5,)×(ARG1_G,-0.5,),
20410 )+((ARG0_B,-0.5,)×(ARG1_B,-0.5,),),)
20412 The scalar results for `GL_DOT3_RGB' and `GL_DOT3_RGBA' are placed into
20413 each of the 3 (RGB) or 4 (RGBA) components on output.
20415 Likewise, `GL_COMBINE_ALPHA' accepts any of `GL_REPLACE', `GL_MODULATE',
20416 `GL_ADD', `GL_ADD_SIGNED', `GL_INTERPOLATE', or `GL_SUBTRACT'. The
20417 following table describes how alpha values are combined:
20421 *`GL_COMBINE_ALPHA'*
20437 ARG0×ARG2+ARG1×(1-ARG2,)
20442 In the following tables, the value C_S represents the color sampled from
20443 the currently bound texture, C_C represents the constant
20444 texture-environment color, C_F represents the primary color of the
20445 incoming fragment, and C_P represents the color computed from the
20446 previous texture stage or C_F if processing texture stage 0. Likewise,
20447 A_S , A_C , A_F , and A_P represent the respective alpha values.
20449 The following table describes the values assigned to ARG0 , ARG1 , and
20450 ARG2 based upon the RGB sources and operands:
20455 *`GL_OPERANDn_RGB'*, *Argument Value*
20458 `GL_SRC_COLOR', C_S,
20461 `GL_ONE_MINUS_SRC_COLOR', 1-C_S,
20464 `GL_SRC_ALPHA', A_S,
20467 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20470 `GL_SRC_COLOR', C_S,
20473 `GL_ONE_MINUS_SRC_COLOR', 1-C_S,
20476 `GL_SRC_ALPHA', A_S,
20479 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20482 `GL_SRC_COLOR', C_C,
20485 `GL_ONE_MINUS_SRC_COLOR', 1-C_C,
20488 `GL_SRC_ALPHA', A_C,
20491 `GL_ONE_MINUS_SRC_ALPHA', 1-A_C,
20494 `GL_SRC_COLOR', C_F,
20497 `GL_ONE_MINUS_SRC_COLOR', 1-C_F,
20500 `GL_SRC_ALPHA', A_F,
20503 `GL_ONE_MINUS_SRC_ALPHA', 1-A_F,
20506 `GL_SRC_COLOR', C_P,
20509 `GL_ONE_MINUS_SRC_COLOR', 1-C_P,
20512 `GL_SRC_ALPHA', A_P,
20515 `GL_ONE_MINUS_SRC_ALPHA', 1-A_P,
20517 For `GL_TEXTUREn' sources, C_S and A_S represent the color and alpha,
20518 respectively, produced from texture stage N .
20520 The follow table describes the values assigned to ARG0 , ARG1 , and ARG2
20521 based upon the alpha sources and operands:
20526 *`GL_OPERANDn_ALPHA'*, *Argument Value*
20529 `GL_SRC_ALPHA', A_S,
20532 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20535 `GL_SRC_ALPHA', A_S,
20538 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20541 `GL_SRC_ALPHA', A_C,
20544 `GL_ONE_MINUS_SRC_ALPHA', 1-A_C,
20547 `GL_SRC_ALPHA', A_F,
20550 `GL_ONE_MINUS_SRC_ALPHA', 1-A_F,
20553 `GL_SRC_ALPHA', A_P,
20556 `GL_ONE_MINUS_SRC_ALPHA', 1-A_P,
20558 The RGB and alpha results of the texture function are multipled by the
20559 values of `GL_RGB_SCALE' and `GL_ALPHA_SCALE', respectively, and clamped
20560 to the range [0,1] .
20562 If PNAME is `GL_TEXTURE_ENV_COLOR', PARAMS is a pointer to an array that
20563 holds an RGBA color consisting of four values. Integer color components
20564 are interpreted linearly such that the most positive integer maps to
20565 1.0, and the most negative integer maps to -1.0. The values are clamped
20566 to the range [0,1] when they are specified. C_C takes these four
20569 If PNAME is `GL_TEXTURE_LOD_BIAS', the value specified is added to the
20570 texture level-of-detail parameter, that selects which mipmap, or mipmaps
20571 depending upon the selected `GL_TEXTURE_MIN_FILTER', will be sampled.
20573 `GL_TEXTURE_ENV_MODE' defaults to `GL_MODULATE' and
20574 `GL_TEXTURE_ENV_COLOR' defaults to (0, 0, 0, 0).
20576 If TARGET is `GL_POINT_SPRITE' and PNAME is `GL_COORD_REPLACE', the
20577 boolean value specified is used to either enable or disable point sprite
20578 texture coordinate replacement. The default value is `GL_FALSE'.
20580 `GL_INVALID_ENUM' is generated when TARGET or PNAME is not one of the
20581 accepted defined values, or when PARAMS should have a defined constant
20582 value (based on the value of PNAME) and does not.
20584 `GL_INVALID_VALUE' is generated if the PARAMS value for `GL_RGB_SCALE'
20585 or `GL_ALPHA_SCALE' are not one of 1.0, 2.0, or 4.0.
20587 `GL_INVALID_OPERATION' is generated if `glTexEnv' is executed between
20588 the execution of `glBegin' and the corresponding execution of `glEnd'.")
20590 (define-gl-procedures
20612 (params const-GLint-*)
20618 (params const-GLfloat-*)
20624 (params const-GLdouble-*)
20627 "Control the generation of texture coordinates.
20630 Specifies a texture coordinate. Must be one of `GL_S', `GL_T',
20634 Specifies the symbolic name of the texture-coordinate generation
20635 function. Must be `GL_TEXTURE_GEN_MODE'.
20638 Specifies a single-valued texture generation parameter, one of
20639 `GL_OBJECT_LINEAR', `GL_EYE_LINEAR', `GL_SPHERE_MAP',
20640 `GL_NORMAL_MAP', or `GL_REFLECTION_MAP'.
20642 `glTexGen' selects a texture-coordinate generation function or supplies
20643 coefficients for one of the functions. COORD names one of the (S, T, R,
20644 Q) texture coordinates; it must be one of the symbols `GL_S', `GL_T',
20645 `GL_R', or `GL_Q'. PNAME must be one of three symbolic constants:
20646 `GL_TEXTURE_GEN_MODE', `GL_OBJECT_PLANE', or `GL_EYE_PLANE'. If PNAME
20647 is `GL_TEXTURE_GEN_MODE', then PARAMS chooses a mode, one of
20648 `GL_OBJECT_LINEAR', `GL_EYE_LINEAR', `GL_SPHERE_MAP', `GL_NORMAL_MAP',
20649 or `GL_REFLECTION_MAP'. If PNAME is either `GL_OBJECT_PLANE' or
20650 `GL_EYE_PLANE', PARAMS contains coefficients for the corresponding
20651 texture generation function.
20653 If the texture generation function is `GL_OBJECT_LINEAR', the function
20655 G=P_1×X_O+P_2×Y_O+P_3×Z_O+P_4×W_O
20657 is used, where G is the value computed for the coordinate named in
20658 COORD, P_1 , P_2 , P_3 , and P_4 are the four values supplied in PARAMS,
20659 and X_O , Y_O , Z_O , and W_O are the object coordinates of the vertex.
20660 This function can be used, for example, to texture-map terrain using sea
20661 level as a reference plane (defined by P_1 , P_2 , P_3 , and P_4 ). The
20662 altitude of a terrain vertex is computed by the `GL_OBJECT_LINEAR'
20663 coordinate generation function as its distance from sea level; that
20664 altitude can then be used to index the texture image to map white snow
20665 onto peaks and green grass onto foothills.
20667 If the texture generation function is `GL_EYE_LINEAR', the function
20669 G=P_1,^″×X_E+P_2,^″×Y_E+P_3,^″×Z_E+P_4,^″×W_E
20673 (P_1,^″\u2062P_2,^″\u2062P_3,^″\u2062P_4,^″,)=(P_1\u2062P_2\u2062P_3\u2062P_4,)\u2062M^-1
20675 and X_E , Y_E , Z_E , and W_E are the eye coordinates of the vertex, P_1
20676 , P_2 , P_3 , and P_4 are the values supplied in PARAMS, and M is the
20677 modelview matrix when `glTexGen' is invoked. If M is poorly conditioned
20678 or singular, texture coordinates generated by the resulting function may
20679 be inaccurate or undefined.
20681 Note that the values in PARAMS define a reference plane in eye
20682 coordinates. The modelview matrix that is applied to them may not be
20683 the same one in effect when the polygon vertices are transformed. This
20684 function establishes a field of texture coordinates that can produce
20685 dynamic contour lines on moving objects.
20687 If the texture generation function is `GL_SPHERE_MAP' and COORD is
20688 either `GL_S' or `GL_T', S and T texture coordinates are generated as
20689 follows. Let U be the unit vector pointing from the origin to the
20690 polygon vertex (in eye coordinates). Let N sup prime be the current
20691 normal, after transformation to eye coordinates. Let
20693 F=(F_X\u2062F_Y\u2062F_Z,)^T be the reflection vector such that
20695 F=U-2\u2062N^″\u2062N^″,^T\u2062U
20697 Finally, let M=2\u2062√(F_X,^2+F_Y,^2+(F_Z+1,)^2,) . Then the values
20698 assigned to the S and T texture coordinates are
20704 To enable or disable a texture-coordinate generation function, call
20705 `glEnable' or `glDisable' with one of the symbolic texture-coordinate
20706 names (`GL_TEXTURE_GEN_S', `GL_TEXTURE_GEN_T', `GL_TEXTURE_GEN_R', or
20707 `GL_TEXTURE_GEN_Q') as the argument. When enabled, the specified
20708 texture coordinate is computed according to the generating function
20709 associated with that coordinate. When disabled, subsequent vertices
20710 take the specified texture coordinate from the current set of texture
20711 coordinates. Initially, all texture generation functions are set to
20712 `GL_EYE_LINEAR' and are disabled. Both S plane equations are (1, 0, 0,
20713 0), both T plane equations are (0, 1, 0, 0), and all R and Q plane
20714 equations are (0, 0, 0, 0).
20716 When the `ARB_multitexture' extension is supported, `glTexGen' sets the
20717 texture generation parameters for the currently active texture unit,
20718 selected with `glActiveTexture'.
20720 `GL_INVALID_ENUM' is generated when COORD or PNAME is not an accepted
20721 defined value, or when PNAME is `GL_TEXTURE_GEN_MODE' and PARAMS is not
20722 an accepted defined value.
20724 `GL_INVALID_ENUM' is generated when PNAME is `GL_TEXTURE_GEN_MODE',
20725 PARAMS is `GL_SPHERE_MAP', and COORD is either `GL_R' or `GL_Q'.
20727 `GL_INVALID_OPERATION' is generated if `glTexGen' is executed between
20728 the execution of `glBegin' and the corresponding execution of `glEnd'.")
20730 (define-gl-procedures
20734 (internalFormat GLint)
20739 (data const-GLvoid-*)
20742 "Specify a one-dimensional texture image.
20745 Specifies the target texture. Must be `GL_TEXTURE_1D' or
20746 `GL_PROXY_TEXTURE_1D'.
20749 Specifies the level-of-detail number. Level 0 is the base image
20750 level. Level N is the Nth mipmap reduction image.
20753 Specifies the number of color components in the texture. Must be
20754 1, 2, 3, or 4, or one of the following symbolic constants:
20755 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
20756 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
20757 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
20758 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT',
20759 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24',
20760 `GL_DEPTH_COMPONENT32', `GL_LUMINANCE', `GL_LUMINANCE4',
20761 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
20762 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
20763 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
20764 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
20765 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
20766 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
20767 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
20768 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
20769 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
20770 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
20771 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
20775 Specifies the width of the texture image including the border if
20776 any. If the GL version does not support non-power-of-two sizes,
20777 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
20778 implementations support texture images that are at least 64 texels
20779 wide. The height of the 1D texture image is 1.
20782 Specifies the width of the border. Must be either 0 or 1.
20785 Specifies the format of the pixel data. The following symbolic
20786 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
20787 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
20788 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
20791 Specifies the data type of the pixel data. The following symbolic
20792 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
20793 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
20794 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20795 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
20796 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20797 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20798 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20799 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
20802 Specifies a pointer to the image data in memory.
20804 Texturing maps a portion of a specified texture image onto each
20805 graphical primitive for which texturing is enabled. To enable and
20806 disable one-dimensional texturing, call `glEnable' and `glDisable' with
20807 argument `GL_TEXTURE_1D'.
20809 Texture images are defined with `glTexImage1D'. The arguments describe
20810 the parameters of the texture image, such as width, width of the border,
20811 level-of-detail number (see `glTexParameter'), and the internal
20812 resolution and format used to store the image. The last three arguments
20813 describe how the image is represented in memory; they are identical to
20814 the pixel formats used for `glDrawPixels'.
20816 If TARGET is `GL_PROXY_TEXTURE_1D', no data is read from DATA, but all
20817 of the texture image state is recalculated, checked for consistency, and
20818 checked against the implementation's capabilities. If the
20819 implementation cannot handle a texture of the requested texture size, it
20820 sets all of the image state to 0, but does not generate an error (see
20821 `glGetError'). To query for an entire mipmap array, use an image array
20822 level greater than or equal to 1.
20824 If TARGET is `GL_TEXTURE_1D', data is read from DATA as a sequence of
20825 signed or unsigned bytes, shorts, or longs, or single-precision
20826 floating-point values, depending on TYPE. These values are grouped into
20827 sets of one, two, three, or four values, depending on FORMAT, to form
20828 elements. If TYPE is `GL_BITMAP', the data is considered as a string of
20829 unsigned bytes (and FORMAT must be `GL_COLOR_INDEX'). Each data byte is
20830 treated as eight 1-bit elements, with bit ordering determined by
20831 `GL_UNPACK_LSB_FIRST' (see `glPixelStore').
20833 If a non-zero named buffer object is bound to the
20834 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
20835 image is specified, DATA is treated as a byte offset into the buffer
20836 object's data store.
20838 The first element corresponds to the left end of the texture array.
20839 Subsequent elements progress left-to-right through the remaining texels
20840 in the texture array. The final element corresponds to the right end of
20843 FORMAT determines the composition of each element in DATA. It can
20844 assume one of these symbolic values:
20847 Each element is a single value, a color index. The GL converts it
20848 to fixed point (with an unspecified number of zero bits to the
20849 right of the binary point), shifted left or right depending on the
20850 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
20851 (see `glPixelTransfer'). The resulting index is converted to a set
20852 of color components using the `GL_PIXEL_MAP_I_TO_R',
20853 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
20854 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
20857 Each element is a single red component. The GL converts it to
20858 floating point and assembles it into an RGBA element by attaching 0
20859 for green and blue, and 1 for alpha. Each component is then
20860 multiplied by the signed scale factor `GL_c_SCALE', added to the
20861 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20862 `glPixelTransfer').
20865 Each element is a single green component. The GL converts it to
20866 floating point and assembles it into an RGBA element by attaching 0
20867 for red and blue, and 1 for alpha. Each component is then
20868 multiplied by the signed scale factor `GL_c_SCALE', added to the
20869 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20870 `glPixelTransfer').
20873 Each element is a single blue component. The GL converts it to
20874 floating point and assembles it into an RGBA element by attaching 0
20875 for red and green, and 1 for alpha. Each component is then
20876 multiplied by the signed scale factor `GL_c_SCALE', added to the
20877 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20878 `glPixelTransfer').
20881 Each element is a single alpha component. The GL converts it to
20882 floating point and assembles it into an RGBA element by attaching 0
20883 for red, green, and blue. Each component is then multiplied by the
20884 signed scale factor `GL_c_SCALE', added to the signed bias
20885 `GL_c_BIAS', and clamped to the range [0,1] (see
20886 `glPixelTransfer').
20889 Each element is a single intensity value. The GL converts it to
20890 floating point, then assembles it into an RGBA element by
20891 replicating the intensity value three times for red, green, blue,
20892 and alpha. Each component is then multiplied by the signed scale
20893 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
20894 clamped to the range [0,1] (see `glPixelTransfer').
20898 Each element is an RGB triple. The GL converts it to floating
20899 point and assembles it into an RGBA element by attaching 1 for
20900 alpha. Each component is then multiplied by the signed scale
20901 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
20902 clamped to the range [0,1] (see `glPixelTransfer').
20906 Each element contains all four components. Each component is
20907 multiplied by the signed scale factor `GL_c_SCALE', added to the
20908 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20909 `glPixelTransfer').
20912 Each element is a single luminance value. The GL converts it to
20913 floating point, then assembles it into an RGBA element by
20914 replicating the luminance value three times for red, green, and
20915 blue and attaching 1 for alpha. Each component is then multiplied
20916 by the signed scale factor `GL_c_SCALE', added to the signed bias
20917 `GL_c_BIAS', and clamped to the range [0,1] (see
20918 `glPixelTransfer').
20920 `GL_LUMINANCE_ALPHA'
20921 Each element is a luminance/alpha pair. The GL converts it to
20922 floating point, then assembles it into an RGBA element by
20923 replicating the luminance value three times for red, green, and
20924 blue. Each component is then multiplied by the signed scale factor
20925 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20926 the range [0,1] (see `glPixelTransfer').
20928 `GL_DEPTH_COMPONENT'
20929 Each element is a single depth value. The GL converts it to
20930 floating point, multiplies by the signed scale factor
20931 `GL_DEPTH_SCALE', adds the signed bias `GL_DEPTH_BIAS', and clamps
20932 to the range [0,1] (see `glPixelTransfer').
20934 Refer to the `glDrawPixels' reference page for a description of the
20935 acceptable values for the TYPE parameter.
20937 If an application wants to store the texture at a certain resolution or
20938 in a certain format, it can request the resolution and format with
20939 INTERNALFORMAT. The GL will choose an internal representation that
20940 closely approximates that requested by INTERNALFORMAT, but it may not
20941 match exactly. (The representations specified by `GL_LUMINANCE',
20942 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
20943 numeric values 1, 2, 3, and 4 may also be used to specify the above
20946 If the INTERNALFORMAT parameter is one of the generic compressed
20947 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
20948 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
20949 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
20950 internal format with the symbolic constant for a specific internal
20951 format and compress the texture before storage. If no corresponding
20952 internal format is available, or the GL can not compress that image for
20953 any reason, the internal format is instead replaced with a corresponding
20954 base internal format.
20956 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
20957 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
20958 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
20959 treated as if the red, green, blue, or luminance components are encoded
20960 in the sRGB color space. Any alpha component is left unchanged. The
20961 conversion from the sRGB encoded component C_S to a linear component C_L
20964 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
20967 Assume C_S is the sRGB component in the range [0,1].
20969 Use the `GL_PROXY_TEXTURE_1D' target to try out a resolution and format.
20970 The implementation will update and recompute its best match for the
20971 requested storage resolution and format. To then query this state, call
20972 `glGetTexLevelParameter'. If the texture cannot be accommodated,
20973 texture state is set to 0.
20975 A one-component texture image uses only the red component of the RGBA
20976 color from DATA. A two-component image uses the R and A values. A
20977 three-component image uses the R, G, and B values. A four-component
20978 image uses all of the RGBA components.
20980 Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures
20981 during texture filtering and application. \xa0Image-based shadowing\xa0can\xa0be
20982 \xa0enabled\xa0by\xa0comparing texture r coordinates to depth texture values to
20983 generate a boolean result. See `glTexParameter' for details on texture
20986 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_1D' or
20987 `GL_PROXY_TEXTURE_1D'.
20989 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
20990 constant. Format constants other than `GL_STENCIL_INDEX' are accepted.
20992 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
20994 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
20997 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
20999 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
21000 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21002 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
21003 one of the accepted resolution and format symbolic constants.
21005 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
21006 2 + `GL_MAX_TEXTURE_SIZE'.
21008 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
21009 supported and the WIDTH cannot be represented as 2^N+2\u2061(BORDER,) for
21010 some integer value of N.
21012 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
21014 `GL_INVALID_OPERATION' is generated if TYPE is one of
21015 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21016 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21019 `GL_INVALID_OPERATION' is generated if TYPE is one of
21020 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21021 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21022 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21023 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21024 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21026 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
21027 and INTERNALFORMAT is not `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
21028 `GL_DEPTH_COMPONENT24', or `GL_DEPTH_COMPONENT32'.
21030 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
21031 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
21032 `GL_DEPTH_COMPONENT32', and FORMAT is not `GL_DEPTH_COMPONENT'.
21034 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21035 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21036 data store is currently mapped.
21038 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21039 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21040 unpacked from the buffer object such that the memory reads required
21041 would exceed the data store size.
21043 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21044 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21045 divisible into the number of bytes needed to store in memory a datum
21048 `GL_INVALID_OPERATION' is generated if `glTexImage1D' is executed
21049 between the execution of `glBegin' and the corresponding execution of
21052 (define-gl-procedures
21056 (internalFormat GLint)
21062 (data const-GLvoid-*)
21065 "Specify a two-dimensional texture image.
21068 Specifies the target texture. Must be `GL_TEXTURE_2D',
21069 `GL_PROXY_TEXTURE_2D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
21070 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
21071 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
21072 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
21075 Specifies the level-of-detail number. Level 0 is the base image
21076 level. Level N is the Nth mipmap reduction image.
21079 Specifies the number of color components in the texture. Must be
21080 1, 2, 3, or 4, or one of the following symbolic constants:
21081 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
21082 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
21083 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
21084 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT',
21085 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24',
21086 `GL_DEPTH_COMPONENT32', `GL_LUMINANCE', `GL_LUMINANCE4',
21087 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
21088 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
21089 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
21090 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
21091 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
21092 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
21093 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
21094 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
21095 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
21096 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
21097 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
21101 Specifies the width of the texture image including the border if
21102 any. If the GL version does not support non-power-of-two sizes,
21103 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
21104 implementations support texture images that are at least 64 texels
21108 Specifies the height of the texture image including the border if
21109 any. If the GL version does not support non-power-of-two sizes,
21110 this value must be 2^M+2\u2061(BORDER,) for some integer M . All
21111 implementations support texture images that are at least 64 texels
21115 Specifies the width of the border. Must be either 0 or 1.
21118 Specifies the format of the pixel data. The following symbolic
21119 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
21120 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
21121 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
21124 Specifies the data type of the pixel data. The following symbolic
21125 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
21126 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
21127 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21128 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
21129 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21130 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21131 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21132 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
21135 Specifies a pointer to the image data in memory.
21137 Texturing maps a portion of a specified texture image onto each
21138 graphical primitive for which texturing is enabled. To enable and
21139 disable two-dimensional texturing, call `glEnable' and `glDisable' with
21140 argument `GL_TEXTURE_2D'. To enable and disable texturing using
21141 cube-mapped texture, call `glEnable' and `glDisable' with argument
21142 `GL_TEXTURE_CUBE_MAP'.
21144 To define texture images, call `glTexImage2D'. The arguments describe
21145 the parameters of the texture image, such as height, width, width of the
21146 border, level-of-detail number (see `glTexParameter'), and number of
21147 color components provided. The last three arguments describe how the
21148 image is represented in memory; they are identical to the pixel formats
21149 used for `glDrawPixels'.
21151 If TARGET is `GL_PROXY_TEXTURE_2D' or `GL_PROXY_TEXTURE_CUBE_MAP', no
21152 data is read from DATA, but all of the texture image state is
21153 recalculated, checked for consistency, and checked against the
21154 implementation's capabilities. If the implementation cannot handle a
21155 texture of the requested texture size, it sets all of the image state to
21156 0, but does not generate an error (see `glGetError'). To query for an
21157 entire mipmap array, use an image array level greater than or equal to
21160 If TARGET is `GL_TEXTURE_2D', or one of the `GL_TEXTURE_CUBE_MAP'
21161 targets, data is read from DATA as a sequence of signed or unsigned
21162 bytes, shorts, or longs, or single-precision floating-point values,
21163 depending on TYPE. These values are grouped into sets of one, two,
21164 three, or four values, depending on FORMAT, to form elements. If TYPE
21165 is `GL_BITMAP', the data is considered as a string of unsigned bytes
21166 (and FORMAT must be `GL_COLOR_INDEX'). Each data byte is treated as
21167 eight 1-bit elements, with bit ordering determined by
21168 `GL_UNPACK_LSB_FIRST' (see `glPixelStore').
21170 If a non-zero named buffer object is bound to the
21171 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
21172 image is specified, DATA is treated as a byte offset into the buffer
21173 object's data store.
21175 The first element corresponds to the lower left corner of the texture
21176 image. Subsequent elements progress left-to-right through the remaining
21177 texels in the lowest row of the texture image, and then in successively
21178 higher rows of the texture image. The final element corresponds to the
21179 upper right corner of the texture image.
21181 FORMAT determines the composition of each element in DATA. It can
21182 assume one of these symbolic values:
21185 Each element is a single value, a color index. The GL converts it
21186 to fixed point (with an unspecified number of zero bits to the
21187 right of the binary point), shifted left or right depending on the
21188 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
21189 (see `glPixelTransfer'). The resulting index is converted to a set
21190 of color components using the `GL_PIXEL_MAP_I_TO_R',
21191 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
21192 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
21195 Each element is a single red component. The GL converts it to
21196 floating point and assembles it into an RGBA element by attaching 0
21197 for green and blue, and 1 for alpha. Each component is then
21198 multiplied by the signed scale factor `GL_c_SCALE', added to the
21199 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21200 `glPixelTransfer').
21203 Each element is a single green component. The GL converts it to
21204 floating point and assembles it into an RGBA element by attaching 0
21205 for red and blue, and 1 for alpha. Each component is then
21206 multiplied by the signed scale factor `GL_c_SCALE', added to the
21207 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21208 `glPixelTransfer').
21211 Each element is a single blue component. The GL converts it to
21212 floating point and assembles it into an RGBA element by attaching 0
21213 for red and green, and 1 for alpha. Each component is then
21214 multiplied by the signed scale factor `GL_c_SCALE', added to the
21215 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21216 `glPixelTransfer').
21219 Each element is a single alpha component. The GL converts it to
21220 floating point and assembles it into an RGBA element by attaching 0
21221 for red, green, and blue. Each component is then multiplied by the
21222 signed scale factor `GL_c_SCALE', added to the signed bias
21223 `GL_c_BIAS', and clamped to the range [0,1] (see
21224 `glPixelTransfer').
21227 Each element is a single intensity value. The GL converts it to
21228 floating point, then assembles it into an RGBA element by
21229 replicating the intensity value three times for red, green, blue,
21230 and alpha. Each component is then multiplied by the signed scale
21231 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
21232 clamped to the range [0,1] (see `glPixelTransfer').
21236 Each element is an RGB triple. The GL converts it to floating
21237 point and assembles it into an RGBA element by attaching 1 for
21238 alpha. Each component is then multiplied by the signed scale
21239 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
21240 clamped to the range [0,1] (see `glPixelTransfer').
21244 Each element contains all four components. Each component is
21245 multiplied by the signed scale factor `GL_c_SCALE', added to the
21246 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21247 `glPixelTransfer').
21250 Each element is a single luminance value. The GL converts it to
21251 floating point, then assembles it into an RGBA element by
21252 replicating the luminance value three times for red, green, and
21253 blue and attaching 1 for alpha. Each component is then multiplied
21254 by the signed scale factor `GL_c_SCALE', added to the signed bias
21255 `GL_c_BIAS', and clamped to the range [0,1] (see
21256 `glPixelTransfer').
21258 `GL_LUMINANCE_ALPHA'
21259 Each element is a luminance/alpha pair. The GL converts it to
21260 floating point, then assembles it into an RGBA element by
21261 replicating the luminance value three times for red, green, and
21262 blue. Each component is then multiplied by the signed scale factor
21263 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
21264 the range [0,1] (see `glPixelTransfer').
21266 `GL_DEPTH_COMPONENT'
21267 Each element is a single depth value. The GL converts it to
21268 floating point, multiplies by the signed scale factor
21269 `GL_DEPTH_SCALE', adds the signed bias `GL_DEPTH_BIAS', and clamps
21270 to the range [0,1] (see `glPixelTransfer').
21272 Refer to the `glDrawPixels' reference page for a description of the
21273 acceptable values for the TYPE parameter.
21275 If an application wants to store the texture at a certain resolution or
21276 in a certain format, it can request the resolution and format with
21277 INTERNALFORMAT. The GL will choose an internal representation that
21278 closely approximates that requested by INTERNALFORMAT, but it may not
21279 match exactly. (The representations specified by `GL_LUMINANCE',
21280 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
21281 numeric values 1, 2, 3, and 4 may also be used to specify the above
21284 If the INTERNALFORMAT parameter is one of the generic compressed
21285 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
21286 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
21287 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
21288 internal format with the symbolic constant for a specific internal
21289 format and compress the texture before storage. If no corresponding
21290 internal format is available, or the GL can not compress that image for
21291 any reason, the internal format is instead replaced with a corresponding
21292 base internal format.
21294 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
21295 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
21296 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
21297 treated as if the red, green, blue, or luminance components are encoded
21298 in the sRGB color space. Any alpha component is left unchanged. The
21299 conversion from the sRGB encoded component C_S to a linear component C_L
21302 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
21305 Assume C_S is the sRGB component in the range [0,1].
21307 Use the `GL_PROXY_TEXTURE_2D' or `GL_PROXY_TEXTURE_CUBE_MAP' target to
21308 try out a resolution and format. The implementation will update and
21309 recompute its best match for the requested storage resolution and
21310 format. To then query this state, call `glGetTexLevelParameter'. If
21311 the texture cannot be accommodated, texture state is set to 0.
21313 A one-component texture image uses only the red component of the RGBA
21314 color extracted from DATA. A two-component image uses the R and A
21315 values. A three-component image uses the R, G, and B values. A
21316 four-component image uses all of the RGBA components.
21318 Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures
21319 during texture filtering and application. \xa0Image-based shadowing\xa0can\xa0be
21320 \xa0enabled\xa0by\xa0comparing texture r coordinates to depth texture values to
21321 generate a boolean result. See `glTexParameter' for details on texture
21324 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
21325 `GL_PROXY_TEXTURE_2D', `GL_PROXY_TEXTURE_CUBE_MAP',
21326 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
21327 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
21328 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
21330 `GL_INVALID_ENUM' is generated if TARGET is one of the six cube map 2D
21331 image targets and the width and height parameters are not equal.
21333 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
21335 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
21338 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0 or
21339 greater than 2 + `GL_MAX_TEXTURE_SIZE'.
21341 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
21343 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
21344 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21346 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
21347 one of the accepted resolution and format symbolic constants.
21349 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0 or
21350 greater than 2 + `GL_MAX_TEXTURE_SIZE'.
21352 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
21353 supported and the WIDTH or HEIGHT cannot be represented as
21354 2^K+2\u2061(BORDER,) for some integer value of K.
21356 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
21358 `GL_INVALID_OPERATION' is generated if TYPE is one of
21359 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21360 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21363 `GL_INVALID_OPERATION' is generated if TYPE is one of
21364 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21365 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21366 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21367 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21368 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21370 `GL_INVALID_OPERATION' is generated if TARGET is not `GL_TEXTURE_2D' or
21371 `GL_PROXY_TEXTURE_2D' and INTERNALFORMAT is `GL_DEPTH_COMPONENT',
21372 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
21373 `GL_DEPTH_COMPONENT32'.
21375 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
21376 and INTERNALFORMAT is not `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
21377 `GL_DEPTH_COMPONENT24', or `GL_DEPTH_COMPONENT32'.
21379 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
21380 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
21381 `GL_DEPTH_COMPONENT32', and FORMAT is not `GL_DEPTH_COMPONENT'.
21383 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21384 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21385 data store is currently mapped.
21387 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21388 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21389 unpacked from the buffer object such that the memory reads required
21390 would exceed the data store size.
21392 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21393 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21394 divisible into the number of bytes needed to store in memory a datum
21397 `GL_INVALID_OPERATION' is generated if `glTexImage2D' is executed
21398 between the execution of `glBegin' and the corresponding execution of
21401 (define-gl-procedures
21405 (internalFormat GLint)
21412 (data const-GLvoid-*)
21415 "Specify a three-dimensional texture image.
21418 Specifies the target texture. Must be `GL_TEXTURE_3D' or
21419 `GL_PROXY_TEXTURE_3D'.
21422 Specifies the level-of-detail number. Level 0 is the base image
21423 level. Level N is the N^TH mipmap reduction image.
21426 Specifies the number of color components in the texture. Must be
21427 1, 2, 3, or 4, or one of the following symbolic constants:
21428 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
21429 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
21430 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
21431 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_LUMINANCE',
21432 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
21433 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
21434 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
21435 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
21436 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
21437 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
21438 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
21439 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
21440 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
21441 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
21442 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
21446 Specifies the width of the texture image including the border if
21447 any. If the GL version does not support non-power-of-two sizes,
21448 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
21449 implementations support 3D texture images that are at least 16
21453 Specifies the height of the texture image including the border if
21454 any. If the GL version does not support non-power-of-two sizes,
21455 this value must be 2^M+2\u2061(BORDER,) for some integer M . All
21456 implementations support 3D texture images that are at least 16
21460 Specifies the depth of the texture image including the border if
21461 any. If the GL version does not support non-power-of-two sizes,
21462 this value must be 2^K+2\u2061(BORDER,) for some integer K . All
21463 implementations support 3D texture images that are at least 16
21467 Specifies the width of the border. Must be either 0 or 1.
21470 Specifies the format of the pixel data. The following symbolic
21471 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
21472 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
21473 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
21476 Specifies the data type of the pixel data. The following symbolic
21477 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
21478 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
21479 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21480 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
21481 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21482 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21483 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21484 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
21487 Specifies a pointer to the image data in memory.
21489 Texturing maps a portion of a specified texture image onto each
21490 graphical primitive for which texturing is enabled. To enable and
21491 disable three-dimensional texturing, call `glEnable' and `glDisable'
21492 with argument `GL_TEXTURE_3D'.
21494 To define texture images, call `glTexImage3D'. The arguments describe
21495 the parameters of the texture image, such as height, width, depth, width
21496 of the border, level-of-detail number (see `glTexParameter'), and number
21497 of color components provided. The last three arguments describe how the
21498 image is represented in memory; they are identical to the pixel formats
21499 used for `glDrawPixels'.
21501 If TARGET is `GL_PROXY_TEXTURE_3D', no data is read from DATA, but all
21502 of the texture image state is recalculated, checked for consistency, and
21503 checked against the implementation's capabilities. If the
21504 implementation cannot handle a texture of the requested texture size, it
21505 sets all of the image state to 0, but does not generate an error (see
21506 `glGetError'). To query for an entire mipmap array, use an image array
21507 level greater than or equal to 1.
21509 If TARGET is `GL_TEXTURE_3D', data is read from DATA as a sequence of
21510 signed or unsigned bytes, shorts, or longs, or single-precision
21511 floating-point values, depending on TYPE. These values are grouped into
21512 sets of one, two, three, or four values, depending on FORMAT, to form
21513 elements. If TYPE is `GL_BITMAP', the data is considered as a string of
21514 unsigned bytes (and FORMAT must be `GL_COLOR_INDEX'). Each data byte is
21515 treated as eight 1-bit elements, with bit ordering determined by
21516 `GL_UNPACK_LSB_FIRST' (see `glPixelStore').
21518 If a non-zero named buffer object is bound to the
21519 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
21520 image is specified, DATA is treated as a byte offset into the buffer
21521 object's data store.
21523 The first element corresponds to the lower left corner of the texture
21524 image. Subsequent elements progress left-to-right through the remaining
21525 texels in the lowest row of the texture image, and then in successively
21526 higher rows of the texture image. The final element corresponds to the
21527 upper right corner of the texture image.
21529 FORMAT determines the composition of each element in DATA. It can
21530 assume one of these symbolic values:
21533 Each element is a single value, a color index. The GL converts it
21534 to fixed point (with an unspecified number of zero bits to the
21535 right of the binary point), shifted left or right depending on the
21536 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
21537 (see `glPixelTransfer'). The resulting index is converted to a set
21538 of color components using the `GL_PIXEL_MAP_I_TO_R',
21539 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
21540 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
21543 Each element is a single red component. The GL converts it to
21544 floating point and assembles it into an RGBA element by attaching 0
21545 for green and blue, and 1 for alpha. Each component is then
21546 multiplied by the signed scale factor `GL_c_SCALE', added to the
21547 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21548 `glPixelTransfer').
21551 Each element is a single green component. The GL converts it to
21552 floating point and assembles it into an RGBA element by attaching 0
21553 for red and blue, and 1 for alpha. Each component is then
21554 multiplied by the signed scale factor `GL_c_SCALE', added to the
21555 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21556 `glPixelTransfer').
21559 Each element is a single blue component. The GL converts it to
21560 floating point and assembles it into an RGBA element by attaching 0
21561 for red and green, and 1 for alpha. Each component is then
21562 multiplied by the signed scale factor `GL_c_SCALE', added to the
21563 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21564 `glPixelTransfer').
21567 Each element is a single alpha component. The GL converts it to
21568 floating point and assembles it into an RGBA element by attaching 0
21569 for red, green, and blue. Each component is then multiplied by the
21570 signed scale factor `GL_c_SCALE', added to the signed bias
21571 `GL_c_BIAS', and clamped to the range [0,1] (see
21572 `glPixelTransfer').
21575 Each element is a single intensity value. The GL converts it to
21576 floating point, then assembles it into an RGBA element by
21577 replicating the intensity value three times for red, green, blue,
21578 and alpha. Each component is then multiplied by the signed scale
21579 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
21580 clamped to the range [0,1] (see `glPixelTransfer').
21584 Each element is an RGB triple. The GL converts it to floating
21585 point and assembles it into an RGBA element by attaching 1 for
21586 alpha. Each component is then multiplied by the signed scale
21587 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
21588 clamped to the range [0,1] (see `glPixelTransfer').
21592 Each element contains all four components. Each component is
21593 multiplied by the signed scale factor `GL_c_SCALE', added to the
21594 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21595 `glPixelTransfer').
21598 Each element is a single luminance value. The GL converts it to
21599 floating point, then assembles it into an RGBA element by
21600 replicating the luminance value three times for red, green, and
21601 blue and attaching 1 for alpha. Each component is then multiplied
21602 by the signed scale factor `GL_c_SCALE', added to the signed bias
21603 `GL_c_BIAS', and clamped to the range [0,1] (see
21604 `glPixelTransfer').
21606 `GL_LUMINANCE_ALPHA'
21607 Each element is a luminance/alpha pair. The GL converts it to
21608 floating point, then assembles it into an RGBA element by
21609 replicating the luminance value three times for red, green, and
21610 blue. Each component is then multiplied by the signed scale factor
21611 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
21612 the range [0,1] (see `glPixelTransfer').
21614 Refer to the `glDrawPixels' reference page for a description of the
21615 acceptable values for the TYPE parameter.
21617 If an application wants to store the texture at a certain resolution or
21618 in a certain format, it can request the resolution and format with
21619 INTERNALFORMAT. The GL will choose an internal representation that
21620 closely approximates that requested by INTERNALFORMAT, but it may not
21621 match exactly. (The representations specified by `GL_LUMINANCE',
21622 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
21623 numeric values 1, 2, 3, and 4 may also be used to specify the above
21626 If the INTERNALFORMAT parameter is one of the generic compressed
21627 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
21628 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
21629 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
21630 internal format with the symbolic constant for a specific internal
21631 format and compress the texture before storage. If no corresponding
21632 internal format is available, or the GL can not compress that image for
21633 any reason, the internal format is instead replaced with a corresponding
21634 base internal format.
21636 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
21637 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
21638 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
21639 treated as if the red, green, blue, or luminance components are encoded
21640 in the sRGB color space. Any alpha component is left unchanged. The
21641 conversion from the sRGB encoded component C_S to a linear component C_L
21644 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
21647 Assume C_S is the sRGB component in the range [0,1].
21649 Use the `GL_PROXY_TEXTURE_3D' target to try out a resolution and format.
21650 The implementation will update and recompute its best match for the
21651 requested storage resolution and format. To then query this state, call
21652 `glGetTexLevelParameter'. If the texture cannot be accommodated,
21653 texture state is set to 0.
21655 A one-component texture image uses only the red component of the RGBA
21656 color extracted from DATA. A two-component image uses the R and A
21657 values. A three-component image uses the R, G, and B values. A
21658 four-component image uses all of the RGBA components.
21660 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_3D' or
21661 `GL_PROXY_TEXTURE_3D'.
21663 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
21664 constant. Format constants other than `GL_STENCIL_INDEX' and
21665 `GL_DEPTH_COMPONENT' are accepted.
21667 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
21669 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
21672 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
21674 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
21675 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21677 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
21678 one of the accepted resolution and format symbolic constants.
21680 `GL_INVALID_VALUE' is generated if WIDTH, HEIGHT, or DEPTH is less than
21681 0 or greater than 2 + `GL_MAX_TEXTURE_SIZE'.
21683 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
21684 supported and the WIDTH, HEIGHT, or DEPTH cannot be represented as
21685 2^K+2\u2061(BORDER,) for some integer value of K.
21687 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
21689 `GL_INVALID_OPERATION' is generated if TYPE is one of
21690 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21691 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21694 `GL_INVALID_OPERATION' is generated if TYPE is one of
21695 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21696 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21697 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21698 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21699 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21701 `GL_INVALID_OPERATION' is generated if FORMAT or INTERNALFORMAT is
21702 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
21703 `GL_DEPTH_COMPONENT32'.
21705 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21706 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21707 data store is currently mapped.
21709 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21710 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21711 unpacked from the buffer object such that the memory reads required
21712 would exceed the data store size.
21714 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21715 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21716 divisible into the number of bytes needed to store in memory a datum
21719 `GL_INVALID_OPERATION' is generated if `glTexImage3D' is executed
21720 between the execution of `glBegin' and the corresponding execution of
21723 (define-gl-procedures
21739 (params const-GLfloat-*)
21745 (params const-GLint-*)
21748 "Set texture parameters.
21751 Specifies the target texture, which must be either `GL_TEXTURE_1D',
21752 `GL_TEXTURE_2D', `GL_TEXTURE_3D', or `GL_TEXTURE_CUBE_MAP'.
21755 Specifies the symbolic name of a single-valued texture parameter.
21756 PNAME can be one of the following: `GL_TEXTURE_MIN_FILTER',
21757 `GL_TEXTURE_MAG_FILTER', `GL_TEXTURE_MIN_LOD',
21758 `GL_TEXTURE_MAX_LOD', `GL_TEXTURE_BASE_LEVEL',
21759 `GL_TEXTURE_MAX_LEVEL', `GL_TEXTURE_WRAP_S', `GL_TEXTURE_WRAP_T',
21760 `GL_TEXTURE_WRAP_R', `GL_TEXTURE_PRIORITY',
21761 `GL_TEXTURE_COMPARE_MODE', `GL_TEXTURE_COMPARE_FUNC',
21762 `GL_DEPTH_TEXTURE_MODE', or `GL_GENERATE_MIPMAP'.
21765 Specifies the value of PNAME.
21767 Texture mapping is a technique that applies an image onto an object's
21768 surface as if the image were a decal or cellophane shrink-wrap. The
21769 image is created in texture space, with an (S , T ) coordinate system. A
21770 texture is a one- or two-dimensional image and a set of parameters that
21771 determine how samples are derived from the image.
21773 `glTexParameter' assigns the value or values in PARAMS to the texture
21774 parameter specified as PNAME. TARGET defines the target texture, either
21775 `GL_TEXTURE_1D', `GL_TEXTURE_2D', or `GL_TEXTURE_3D'. The following
21776 symbols are accepted in PNAME:
21778 `GL_TEXTURE_MIN_FILTER'
21779 The texture minifying function is used whenever the pixel being
21780 textured maps to an area greater than one texture element. There
21781 are six defined minifying functions. Two of them use the nearest
21782 one or nearest four texture elements to compute the texture value.
21783 The other four use mipmaps.
21785 A mipmap is an ordered set of arrays representing the same image at
21786 progressively lower resolutions. If the texture has dimensions
21787 2^N×2^M , there are MAX\u2061(N,M)+1 mipmaps. The first mipmap is the
21788 original texture, with dimensions 2^N×2^M . Each subsequent mipmap
21789 has dimensions 2^K-1,×2^L-1, , where 2^K×2^L are the dimensions of
21790 the previous mipmap, until either K=0 or L=0 . At that point,
21791 subsequent mipmaps have dimension 1×2^L-1, or 2^K-1,×1 until the
21792 final mipmap, which has dimension 1×1 . To define the mipmaps,
21793 call `glTexImage1D', `glTexImage2D', `glTexImage3D',
21794 `glCopyTexImage1D', or `glCopyTexImage2D' with the LEVEL argument
21795 indicating the order of the mipmaps. Level 0 is the original
21796 texture; level MAX\u2061(N,M) is the final 1×1 mipmap.
21798 PARAMS supplies a function for minifying the texture as one of the
21801 As more texture elements are sampled in the minification process,
21802 fewer aliasing artifacts will be apparent. While the `GL_NEAREST'
21803 and `GL_LINEAR' minification functions can be faster than the other
21804 four, they sample only one or four texture elements to determine
21805 the texture value of the pixel being rendered and can produce moire
21806 patterns or ragged transitions. The initial value of
21807 `GL_TEXTURE_MIN_FILTER' is `GL_NEAREST_MIPMAP_LINEAR'.
21809 `GL_TEXTURE_MAG_FILTER'
21810 The texture magnification function is used when the pixel being
21811 textured maps to an area less than or equal to one texture element.
21812 It sets the texture magnification function to either `GL_NEAREST'
21813 or `GL_LINEAR' (see below). `GL_NEAREST' is generally faster than
21814 `GL_LINEAR', but it can produce textured images with sharper edges
21815 because the transition between texture elements is not as smooth.
21816 The initial value of `GL_TEXTURE_MAG_FILTER' is `GL_LINEAR'.
21819 Returns the value of the texture element that is nearest (in
21820 Manhattan distance) to the center of the pixel being textured.
21823 Returns the weighted average of the four texture elements that are
21824 closest to the center of the pixel being textured. These can
21825 include border texture elements, depending on the values of
21826 `GL_TEXTURE_WRAP_S' and `GL_TEXTURE_WRAP_T', and on the exact
21829 `GL_NEAREST_MIPMAP_NEAREST'
21830 Chooses the mipmap that most closely matches the size of the pixel
21831 being textured and uses the `GL_NEAREST' criterion (the texture
21832 element nearest to the center of the pixel) to produce a texture
21835 `GL_LINEAR_MIPMAP_NEAREST'
21836 Chooses the mipmap that most closely matches the size of the pixel
21837 being textured and uses the `GL_LINEAR' criterion (a weighted
21838 average of the four texture elements that are closest to the center
21839 of the pixel) to produce a texture value.
21841 `GL_NEAREST_MIPMAP_LINEAR'
21842 Chooses the two mipmaps that most closely match the size of the
21843 pixel being textured and uses the `GL_NEAREST' criterion (the
21844 texture element nearest to the center of the pixel) to produce a
21845 texture value from each mipmap. The final texture value is a
21846 weighted average of those two values.
21848 `GL_LINEAR_MIPMAP_LINEAR'
21849 Chooses the two mipmaps that most closely match the size of the
21850 pixel being textured and uses the `GL_LINEAR' criterion (a weighted
21851 average of the four texture elements that are closest to the center
21852 of the pixel) to produce a texture value from each mipmap. The
21853 final texture value is a weighted average of those two values.
21856 Returns the value of the texture element that is nearest (in
21857 Manhattan distance) to the center of the pixel being textured.
21860 Returns the weighted average of the four texture elements that are
21861 closest to the center of the pixel being textured. These can
21862 include border texture elements, depending on the values of
21863 `GL_TEXTURE_WRAP_S' and `GL_TEXTURE_WRAP_T', and on the exact
21868 `GL_TEXTURE_MIN_LOD'
21869 Sets the minimum level-of-detail parameter. This floating-point
21870 value limits the selection of highest resolution mipmap (lowest
21871 mipmap level). The initial value is -1000.
21875 `GL_TEXTURE_MAX_LOD'
21876 Sets the maximum level-of-detail parameter. This floating-point
21877 value limits the selection of the lowest resolution mipmap (highest
21878 mipmap level). The initial value is 1000.
21882 `GL_TEXTURE_BASE_LEVEL'
21883 Specifies the index of the lowest defined mipmap level. This is an
21884 integer value. The initial value is 0.
21888 `GL_TEXTURE_MAX_LEVEL'
21889 Sets the index of the highest defined mipmap level. This is an
21890 integer value. The initial value is 1000.
21894 `GL_TEXTURE_WRAP_S'
21895 Sets the wrap parameter for texture coordinate S to either
21896 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21897 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. `GL_CLAMP' causes S
21898 coordinates to be clamped to the range [0,1] and is useful for
21899 preventing wrapping artifacts when mapping a single image onto an
21900 object. `GL_CLAMP_TO_BORDER' causes the S coordinate to be clamped
21901 to the range [-1/2N,,1+1/2N,] , where N is the size of the texture
21902 in the direction of clamping.`GL_CLAMP_TO_EDGE' causes S
21903 coordinates to be clamped to the range [1/2N,,1-1/2N,] , where N is
21904 the size of the texture in the direction of clamping. `GL_REPEAT'
21905 causes the integer part of the S coordinate to be ignored; the GL
21906 uses only the fractional part, thereby creating a repeating
21907 pattern. `GL_MIRRORED_REPEAT' causes the S coordinate to be set to
21908 the fractional part of the texture coordinate if the integer part
21909 of S is even; if the integer part of S is odd, then the S texture
21910 coordinate is set to 1-FRAC\u2061(S,) , where FRAC\u2061(S,) represents the
21911 fractional part of S . Border texture elements are accessed only
21912 if wrapping is set to `GL_CLAMP' or `GL_CLAMP_TO_BORDER'.
21913 Initially, `GL_TEXTURE_WRAP_S' is set to `GL_REPEAT'.
21917 `GL_TEXTURE_WRAP_T'
21918 Sets the wrap parameter for texture coordinate T to either
21919 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21920 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. See the discussion under
21921 `GL_TEXTURE_WRAP_S'. Initially, `GL_TEXTURE_WRAP_T' is set to
21924 `GL_TEXTURE_WRAP_R'
21925 Sets the wrap parameter for texture coordinate R to either
21926 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21927 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. See the discussion under
21928 `GL_TEXTURE_WRAP_S'. Initially, `GL_TEXTURE_WRAP_R' is set to
21931 `GL_TEXTURE_BORDER_COLOR'
21932 Sets a border color. PARAMS contains four values that comprise the
21933 RGBA color of the texture border. Integer color components are
21934 interpreted linearly such that the most positive integer maps to
21935 1.0, and the most negative integer maps to -1.0. The values are
21936 clamped to the range [0,1] when they are specified. Initially, the
21937 border color is (0, 0, 0, 0).
21939 `GL_TEXTURE_PRIORITY'
21940 Specifies the texture residence priority of the currently bound
21941 texture. Permissible values are in the range [0,1] . See
21942 `glPrioritizeTextures' and `glBindTexture' for more information.
21944 `GL_TEXTURE_COMPARE_MODE'
21945 Specifies the texture comparison mode for currently bound depth
21946 textures. That is, a texture whose internal format is
21947 `GL_DEPTH_COMPONENT_*'; see `glTexImage2D') Permissible values are:
21949 `GL_TEXTURE_COMPARE_FUNC'
21950 Specifies the comparison operator used when
21951 `GL_TEXTURE_COMPARE_MODE' is set to `GL_COMPARE_R_TO_TEXTURE'.
21952 Permissible values are: where R is the current interpolated texture
21953 coordinate, and D_T is the depth texture value sampled from the
21954 currently bound depth texture. RESULT is assigned to the either
21955 the luminance, intensity, or alpha (as specified by
21956 `GL_DEPTH_TEXTURE_MODE'.)
21958 `GL_DEPTH_TEXTURE_MODE'
21959 Specifies a single symbolic constant indicating how depth values
21960 should be treated during filtering and texture application.
21961 Accepted values are `GL_LUMINANCE', `GL_INTENSITY', and `GL_ALPHA'.
21962 The initial value is `GL_LUMINANCE'.
21964 `GL_GENERATE_MIPMAP'
21965 Specifies a boolean value that indicates if all levels of a mipmap
21966 array should be automatically updated when any modification to the
21967 base level mipmap is done. The initial value is `GL_FALSE'.
21969 `GL_COMPARE_R_TO_TEXTURE'
21970 Specifies that the interpolated and clamped R texture coordinate
21971 should be compared to the value in the currently bound depth
21972 texture. See the discussion of `GL_TEXTURE_COMPARE_FUNC' for
21973 details of how the comparison is evaluated. The result of the
21974 comparison is assigned to luminance, intensity, or alpha (as
21975 specified by `GL_DEPTH_TEXTURE_MODE').
21978 Specifies that the luminance, intensity, or alpha (as specified by
21979 `GL_DEPTH_TEXTURE_MODE') should be assigned the appropriate value
21980 from the currently bound depth texture.
21982 *Texture Comparison Function*
21986 RESULT={(1.0), (0.0)\u2062\xa0(R<=D_T,), (R>D_T,),
21989 RESULT={(1.0), (0.0)\u2062\xa0(R>=D_T,), (R<D_T,),
21992 RESULT={(1.0), (0.0)\u2062\xa0(R<D_T,), (R>=D_T,),
21995 RESULT={(1.0), (0.0)\u2062\xa0(R>D_T,), (R<=D_T,),
21998 RESULT={(1.0), (0.0)\u2062\xa0(R=D_T,), (R≠D_T,),
22001 RESULT={(1.0), (0.0)\u2062\xa0(R≠D_T,), (R=D_T,),
22009 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not one of the
22010 accepted defined values.
22012 `GL_INVALID_ENUM' is generated if PARAMS should have a defined constant
22013 value (based on the value of PNAME) and does not.
22015 `GL_INVALID_OPERATION' is generated if `glTexParameter' is executed
22016 between the execution of `glBegin' and the corresponding execution of
22019 (define-gl-procedures
22027 (data const-GLvoid-*)
22030 "Specify a one-dimensional texture subimage.
22033 Specifies the target texture. Must be `GL_TEXTURE_1D'.
22036 Specifies the level-of-detail number. Level 0 is the base image
22037 level. Level N is the Nth mipmap reduction image.
22040 Specifies a texel offset in the x direction within the texture
22044 Specifies the width of the texture subimage.
22047 Specifies the format of the pixel data. The following symbolic
22048 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
22049 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
22050 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
22053 Specifies the data type of the pixel data. The following symbolic
22054 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
22055 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
22056 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22057 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
22058 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22059 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22060 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22061 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
22064 Specifies a pointer to the image data in memory.
22066 Texturing maps a portion of a specified texture image onto each
22067 graphical primitive for which texturing is enabled. To enable or
22068 disable one-dimensional texturing, call `glEnable' and `glDisable' with
22069 argument `GL_TEXTURE_1D'.
22071 `glTexSubImage1D' redefines a contiguous subregion of an existing
22072 one-dimensional texture image. The texels referenced by DATA replace
22073 the portion of the existing texture array with x indices XOFFSET and
22074 XOFFSET+WIDTH-1 , inclusive. This region may not include any texels
22075 outside the range of the texture array as it was originally specified.
22076 It is not an error to specify a subtexture with width of 0, but such a
22077 specification has no effect.
22079 If a non-zero named buffer object is bound to the
22080 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
22081 image is specified, DATA is treated as a byte offset into the buffer
22082 object's data store.
22084 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
22087 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
22090 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
22092 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
22095 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
22097 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
22098 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
22100 `GL_INVALID_VALUE' is generated if XOFFSET<-B , or if
22101 (XOFFSET+WIDTH,)>(W-B,) , where W is the `GL_TEXTURE_WIDTH', and B is
22102 the width of the `GL_TEXTURE_BORDER' of the texture image being
22103 modified. Note that W includes twice the border width.
22105 `GL_INVALID_VALUE' is generated if WIDTH is less than 0.
22107 `GL_INVALID_OPERATION' is generated if the texture array has not been
22108 defined by a previous `glTexImage1D' operation.
22110 `GL_INVALID_OPERATION' is generated if TYPE is one of
22111 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22112 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
22115 `GL_INVALID_OPERATION' is generated if TYPE is one of
22116 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22117 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22118 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22119 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
22120 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
22122 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22123 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
22124 data store is currently mapped.
22126 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22127 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
22128 unpacked from the buffer object such that the memory reads required
22129 would exceed the data store size.
22131 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22132 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
22133 divisible into the number of bytes needed to store in memory a datum
22136 `GL_INVALID_OPERATION' is generated if `glTexSubImage1D' is executed
22137 between the execution of `glBegin' and the corresponding execution of
22140 (define-gl-procedures
22150 (data const-GLvoid-*)
22153 "Specify a two-dimensional texture subimage.
22156 Specifies the target texture. Must be `GL_TEXTURE_2D',
22157 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
22158 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
22159 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
22160 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
22163 Specifies the level-of-detail number. Level 0 is the base image
22164 level. Level N is the Nth mipmap reduction image.
22167 Specifies a texel offset in the x direction within the texture
22171 Specifies a texel offset in the y direction within the texture
22175 Specifies the width of the texture subimage.
22178 Specifies the height of the texture subimage.
22181 Specifies the format of the pixel data. The following symbolic
22182 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
22183 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
22184 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
22187 Specifies the data type of the pixel data. The following symbolic
22188 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
22189 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
22190 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22191 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
22192 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22193 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22194 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22195 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
22198 Specifies a pointer to the image data in memory.
22200 Texturing maps a portion of a specified texture image onto each
22201 graphical primitive for which texturing is enabled. To enable and
22202 disable two-dimensional texturing, call `glEnable' and `glDisable' with
22203 argument `GL_TEXTURE_2D'.
22205 `glTexSubImage2D' redefines a contiguous subregion of an existing
22206 two-dimensional texture image. The texels referenced by DATA replace
22207 the portion of the existing texture array with x indices XOFFSET and
22208 XOFFSET+WIDTH-1 , inclusive, and y indices YOFFSET and YOFFSET+HEIGHT-1
22209 , inclusive. This region may not include any texels outside the range
22210 of the texture array as it was originally specified. It is not an error
22211 to specify a subtexture with zero width or height, but such a
22212 specification has no effect.
22214 If a non-zero named buffer object is bound to the
22215 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
22216 image is specified, DATA is treated as a byte offset into the buffer
22217 object's data store.
22219 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
22220 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
22221 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
22222 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
22224 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
22227 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
22229 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
22232 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
22234 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
22235 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
22237 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
22238 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , where W is the
22239 `GL_TEXTURE_WIDTH', H is the `GL_TEXTURE_HEIGHT', and B is the border
22240 width of the texture image being modified. Note that W and H include
22241 twice the border width.
22243 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0.
22245 `GL_INVALID_OPERATION' is generated if the texture array has not been
22246 defined by a previous `glTexImage2D' operation.
22248 `GL_INVALID_OPERATION' is generated if TYPE is one of
22249 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22250 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
22253 `GL_INVALID_OPERATION' is generated if TYPE is one of
22254 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22255 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22256 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22257 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
22258 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
22260 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22261 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
22262 data store is currently mapped.
22264 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22265 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
22266 unpacked from the buffer object such that the memory reads required
22267 would exceed the data store size.
22269 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22270 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
22271 divisible into the number of bytes needed to store in memory a datum
22274 `GL_INVALID_OPERATION' is generated if `glTexSubImage2D' is executed
22275 between the execution of `glBegin' and the corresponding execution of
22278 (define-gl-procedures
22290 (data const-GLvoid-*)
22293 "Specify a three-dimensional texture subimage.
22296 Specifies the target texture. Must be `GL_TEXTURE_3D'.
22299 Specifies the level-of-detail number. Level 0 is the base image
22300 level. Level N is the Nth mipmap reduction image.
22303 Specifies a texel offset in the x direction within the texture
22307 Specifies a texel offset in the y direction within the texture
22311 Specifies a texel offset in the z direction within the texture
22315 Specifies the width of the texture subimage.
22318 Specifies the height of the texture subimage.
22321 Specifies the depth of the texture subimage.
22324 Specifies the format of the pixel data. The following symbolic
22325 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
22326 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
22327 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
22330 Specifies the data type of the pixel data. The following symbolic
22331 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
22332 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
22333 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22334 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
22335 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22336 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22337 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22338 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
22341 Specifies a pointer to the image data in memory.
22343 Texturing maps a portion of a specified texture image onto each
22344 graphical primitive for which texturing is enabled. To enable and
22345 disable three-dimensional texturing, call `glEnable' and `glDisable'
22346 with argument `GL_TEXTURE_3D'.
22348 `glTexSubImage3D' redefines a contiguous subregion of an existing
22349 three-dimensional texture image. The texels referenced by DATA replace
22350 the portion of the existing texture array with x indices XOFFSET and
22351 XOFFSET+WIDTH-1 , inclusive, y indices YOFFSET and YOFFSET+HEIGHT-1 ,
22352 inclusive, and z indices ZOFFSET and ZOFFSET+DEPTH-1 , inclusive. This
22353 region may not include any texels outside the range of the texture array
22354 as it was originally specified. It is not an error to specify a
22355 subtexture with zero width, height, or depth but such a specification
22358 If a non-zero named buffer object is bound to the
22359 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
22360 image is specified, DATA is treated as a byte offset into the buffer
22361 object's data store.
22363 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_3D'.
22365 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
22368 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
22370 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
22373 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
22375 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
22376 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
22378 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
22379 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , or ZOFFSET<-B , or
22380 (ZOFFSET+DEPTH,)>(D-B,) , where W is the `GL_TEXTURE_WIDTH', H is the
22381 `GL_TEXTURE_HEIGHT', D is the `GL_TEXTURE_DEPTH' and B is the border
22382 width of the texture image being modified. Note that W , H , and D
22383 include twice the border width.
22385 `GL_INVALID_VALUE' is generated if WIDTH, HEIGHT, or DEPTH is less than
22388 `GL_INVALID_OPERATION' is generated if the texture array has not been
22389 defined by a previous `glTexImage3D' operation.
22391 `GL_INVALID_OPERATION' is generated if TYPE is one of
22392 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22393 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
22396 `GL_INVALID_OPERATION' is generated if TYPE is one of
22397 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22398 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22399 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22400 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
22401 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
22403 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22404 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
22405 data store is currently mapped.
22407 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22408 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
22409 unpacked from the buffer object such that the memory reads required
22410 would exceed the data store size.
22412 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22413 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
22414 divisible into the number of bytes needed to store in memory a datum
22417 `GL_INVALID_OPERATION' is generated if `glTexSubImage3D' is executed
22418 between the execution of `glBegin' and the corresponding execution of
22421 (define-gl-procedures
22434 "Multiply the current matrix by a translation matrix.
22441 Specify the X, Y, and Z coordinates of a translation vector.
22443 `glTranslate' produces a translation by (X,YZ) . The current matrix
22444 (see `glMatrixMode') is multiplied by this translation matrix, with the
22445 product replacing the current matrix, as if `glMultMatrix' were called
22446 with the following matrix for its argument:
22448 ((1 0 0 X), (0 1 0 Y), (0 0 1 Z), (0 0 0 1),)
22452 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
22453 objects drawn after a call to `glTranslate' are translated.
22455 Use `glPushMatrix' and `glPopMatrix' to save and restore the
22456 untranslated coordinate system.
22458 `GL_INVALID_OPERATION' is generated if `glTranslate' is executed between
22459 the execution of `glBegin' and the corresponding execution of `glEnd'.")
22461 (define-gl-procedures
22488 (glUniform1i (location GLint) (v0 GLint) -> void)
22513 (value const-GLfloat-*)
22519 (value const-GLfloat-*)
22525 (value const-GLfloat-*)
22531 (value const-GLfloat-*)
22537 (value const-GLint-*)
22543 (value const-GLint-*)
22549 (value const-GLint-*)
22555 (value const-GLint-*)
22558 (glUniformMatrix2fv
22561 (transpose GLboolean)
22562 (value const-GLfloat-*)
22565 (glUniformMatrix3fv
22568 (transpose GLboolean)
22569 (value const-GLfloat-*)
22572 (glUniformMatrix4fv
22575 (transpose GLboolean)
22576 (value const-GLfloat-*)
22579 (glUniformMatrix2x3fv
22582 (transpose GLboolean)
22583 (value const-GLfloat-*)
22586 (glUniformMatrix3x2fv
22589 (transpose GLboolean)
22590 (value const-GLfloat-*)
22593 (glUniformMatrix2x4fv
22596 (transpose GLboolean)
22597 (value const-GLfloat-*)
22600 (glUniformMatrix4x2fv
22603 (transpose GLboolean)
22604 (value const-GLfloat-*)
22607 (glUniformMatrix3x4fv
22610 (transpose GLboolean)
22611 (value const-GLfloat-*)
22614 (glUniformMatrix4x3fv
22617 (transpose GLboolean)
22618 (value const-GLfloat-*)
22621 "Specify the value of a uniform variable for the current program object.
22624 Specifies the location of the uniform variable to be modified.
22627 Specifies the new values to be used for the specified uniform
22630 `glUniform' modifies the value of a uniform variable or a uniform
22631 variable array. The location of the uniform variable to be modified is
22632 specified by LOCATION, which should be a value returned by
22633 `glGetUniformLocation'. `glUniform' operates on the program object that
22634 was made part of current state by calling `glUseProgram'.
22636 The commands `glUniform{1|2|3|4}{f|i}' are used to change the value of
22637 the uniform variable specified by LOCATION using the values passed as
22638 arguments. The number specified in the command should match the number
22639 of components in the data type of the specified uniform variable (e.g.,
22640 `1' for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The suffix
22641 `f' indicates that floating-point values are being passed; the suffix
22642 `i' indicates that integer values are being passed, and this type should
22643 also match the data type of the specified uniform variable. The `i'
22644 variants of this function should be used to provide values for uniform
22645 variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The
22646 `f' variants should be used to provide values for uniform variables of
22647 type float, vec2, vec3, vec4, or arrays of these. Either the `i' or the
22648 `f' variants may be used to provide values for uniform variables of type
22649 bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable
22650 will be set to false if the input value is 0 or 0.0f, and it will be set
22653 All active uniform variables defined in a program object are initialized
22654 to 0 when the program object is linked successfully. They retain the
22655 values assigned to them by a call to `glUniform ' until the next
22656 successful link operation occurs on the program object, when they are
22657 once again initialized to 0.
22659 The commands `glUniform{1|2|3|4}{f|i}v' can be used to modify a single
22660 uniform variable or a uniform variable array. These commands pass a
22661 count and a pointer to the values to be loaded into a uniform variable
22662 or a uniform variable array. A count of 1 should be used if modifying
22663 the value of a single uniform variable, and a count of 1 or greater can
22664 be used to modify an entire array or part of an array. When loading N
22665 elements starting at an arbitrary position M in a uniform variable
22666 array, elements M + N - 1 in the array will be replaced with the new
22667 values. If M + N - 1 is larger than the size of the uniform variable
22668 array, values for all array elements beyond the end of the array will be
22669 ignored. The number specified in the name of the command indicates the
22670 number of components for each element in VALUE, and it should match the
22671 number of components in the data type of the specified uniform variable
22672 (e.g., `1' for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The
22673 data type specified in the name of the command must match the data type
22674 for the specified uniform variable as described previously for
22675 `glUniform{1|2|3|4}{f|i}'.
22677 For uniform variable arrays, each element of the array is considered to
22678 be of the type indicated in the name of the command (e.g., `glUniform3f'
22679 or `glUniform3fv' can be used to load a uniform variable array of type
22680 vec3). The number of elements of the uniform variable array to be
22681 modified is specified by COUNT
22683 The commands `glUniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv' are used
22684 to modify a matrix or an array of matrices. The numbers in the command
22685 name are interpreted as the dimensionality of the matrix. The number
22686 `2' indicates a 2 × 2 matrix (i.e., 4 values), the number `3' indicates
22687 a 3 × 3 matrix (i.e., 9 values), and the number `4' indicates a 4 × 4
22688 matrix (i.e., 16 values). Non-square matrix dimensionality is explicit,
22689 with the first number representing the number of columns and the second
22690 number representing the number of rows. For example, `2x4' indicates a
22691 2 × 4 matrix with 2 columns and 4 rows (i.e., 8 values). If TRANSPOSE
22692 is `GL_FALSE', each matrix is assumed to be supplied in column major
22693 order. If TRANSPOSE is `GL_TRUE', each matrix is assumed to be supplied
22694 in row major order. The COUNT argument indicates the number of matrices
22695 to be passed. A count of 1 should be used if modifying the value of a
22696 single matrix, and a count greater than 1 can be used to modify an array
22699 `GL_INVALID_OPERATION' is generated if there is no current program
22702 `GL_INVALID_OPERATION' is generated if the size of the uniform variable
22703 declared in the shader does not match the size indicated by the
22704 `glUniform' command.
22706 `GL_INVALID_OPERATION' is generated if one of the integer variants of
22707 this function is used to load a uniform variable of type float, vec2,
22708 vec3, vec4, or an array of these, or if one of the floating-point
22709 variants of this function is used to load a uniform variable of type
22710 int, ivec2, ivec3, or ivec4, or an array of these.
22712 `GL_INVALID_OPERATION' is generated if LOCATION is an invalid uniform
22713 location for the current program object and LOCATION is not equal to -1.
22715 `GL_INVALID_VALUE' is generated if COUNT is less than 0.
22717 `GL_INVALID_OPERATION' is generated if COUNT is greater than 1 and the
22718 indicated uniform variable is not an array variable.
22720 `GL_INVALID_OPERATION' is generated if a sampler is loaded using a
22721 command other than `glUniform1i' and `glUniform1iv'.
22723 `GL_INVALID_OPERATION' is generated if `glUniform' is executed between
22724 the execution of `glBegin' and the corresponding execution of `glEnd'.")
22726 (define-gl-procedures
22727 ((glUseProgram (program GLuint) -> void))
22728 "Installs a program object as part of current rendering state.
22731 Specifies the handle of the program object whose executables are to
22732 be used as part of current rendering state.
22734 `glUseProgram' installs the program object specified by PROGRAM as part
22735 of current rendering state. One or more executables are created in a
22736 program object by successfully attaching shader objects to it with
22737 `glAttachShader', successfully compiling the shader objects with
22738 `glCompileShader', and successfully linking the program object with
22741 A program object will contain an executable that will run on the vertex
22742 processor if it contains one or more shader objects of type
22743 `GL_VERTEX_SHADER' that have been successfully compiled and linked.
22744 Similarly, a program object will contain an executable that will run on
22745 the fragment processor if it contains one or more shader objects of type
22746 `GL_FRAGMENT_SHADER' that have been successfully compiled and linked.
22748 Successfully installing an executable on a programmable processor will
22749 cause the corresponding fixed functionality of OpenGL to be disabled.
22750 Specifically, if an executable is installed on the vertex processor, the
22751 OpenGL fixed functionality will be disabled as follows.
22753 * The projection matrix is not applied to vertex coordinates.
22755 * The texture matrices are not applied to texture coordinates.
22757 * Normals are not transformed to eye coordinates.
22759 * Normals are not rescaled or normalized.
22761 * Normalization of `GL_AUTO_NORMAL' evaluated normals is not
22764 * Texture coordinates are not generated automatically.
22766 * Per-vertex lighting is not performed.
22768 * Color material computations are not performed.
22770 * Color index lighting is not performed.
22772 * This list also applies when setting the current raster position.
22774 The executable that is installed on the vertex processor is expected to
22775 implement any or all of the desired functionality from the preceding
22776 list. Similarly, if an executable is installed on the fragment
22777 processor, the OpenGL fixed functionality will be disabled as follows.
22779 * Texture application is not applied.
22781 * Color sum is not applied.
22783 * Fog is not applied.
22785 Again, the fragment shader that is installed is expected to implement
22786 any or all of the desired functionality from the preceding list.
22788 While a program object is in use, applications are free to modify
22789 attached shader objects, compile attached shader objects, attach
22790 additional shader objects, and detach or delete shader objects. None of
22791 these operations will affect the executables that are part of the
22792 current state. However, relinking the program object that is currently
22793 in use will install the program object as part of the current rendering
22794 state if the link operation was successful (see `glLinkProgram' ). If
22795 the program object currently in use is relinked unsuccessfully, its link
22796 status will be set to `GL_FALSE', but the executables and associated
22797 state will remain part of the current state until a subsequent call to
22798 `glUseProgram' removes it from use. After it is removed from use, it
22799 cannot be made part of current state until it has been successfully
22802 If PROGRAM contains shader objects of type `GL_VERTEX_SHADER' but it
22803 does not contain shader objects of type `GL_FRAGMENT_SHADER', an
22804 executable will be installed on the vertex processor, but fixed
22805 functionality will be used for fragment processing. Similarly, if
22806 PROGRAM contains shader objects of type `GL_FRAGMENT_SHADER' but it does
22807 not contain shader objects of type `GL_VERTEX_SHADER', an executable
22808 will be installed on the fragment processor, but fixed functionality
22809 will be used for vertex processing. If PROGRAM is 0, the programmable
22810 processors will be disabled, and fixed functionality will be used for
22811 both vertex and fragment processing.
22813 `GL_INVALID_VALUE' is generated if PROGRAM is neither 0 nor a value
22814 generated by OpenGL.
22816 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
22818 `GL_INVALID_OPERATION' is generated if PROGRAM could not be made part of
22821 `GL_INVALID_OPERATION' is generated if `glUseProgram' is executed
22822 between the execution of `glBegin' and the corresponding execution of
22825 (define-gl-procedures
22826 ((glValidateProgram (program GLuint) -> void))
22827 "Validates a program object.
22830 Specifies the handle of the program object to be validated.
22832 `glValidateProgram' checks to see whether the executables contained in
22833 PROGRAM can execute given the current OpenGL state. The information
22834 generated by the validation process will be stored in PROGRAM's
22835 information log. The validation information may consist of an empty
22836 string, or it may be a string containing information about how the
22837 current program object interacts with the rest of current OpenGL state.
22838 This provides a way for OpenGL implementers to convey more information
22839 about why the current program is inefficient, suboptimal, failing to
22840 execute, and so on.
22842 The status of the validation operation will be stored as part of the
22843 program object's state. This value will be set to `GL_TRUE' if the
22844 validation succeeded, and `GL_FALSE' otherwise. It can be queried by
22845 calling `glGetProgram' with arguments PROGRAM and `GL_VALIDATE_STATUS'.
22846 If validation is successful, PROGRAM is guaranteed to execute given the
22847 current state. Otherwise, PROGRAM is guaranteed to not execute.
22849 This function is typically useful only during application development.
22850 The informational string stored in the information log is completely
22851 implementation dependent; therefore, an application should not expect
22852 different OpenGL implementations to produce identical information
22855 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
22858 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
22860 `GL_INVALID_OPERATION' is generated if `glValidateProgram' is executed
22861 between the execution of `glBegin' and the corresponding execution of
22864 (define-gl-procedures
22865 ((glVertexAttribPointer
22869 (normalized GLboolean)
22871 (pointer const-GLvoid-*)
22874 "Define an array of generic vertex attribute data.
22877 Specifies the index of the generic vertex attribute to be modified.
22880 Specifies the number of components per generic vertex attribute.
22881 Must be 1, 2, 3, or 4. The initial value is 4.
22884 Specifies the data type of each component in the array. Symbolic
22885 constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
22886 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', or
22887 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
22890 Specifies whether fixed-point data values should be normalized
22891 (`GL_TRUE') or converted directly as fixed-point values
22892 (`GL_FALSE') when they are accessed.
22895 Specifies the byte offset between consecutive generic vertex
22896 attributes. If STRIDE is 0, the generic vertex attributes are
22897 understood to be tightly packed in the array. The initial value is
22901 Specifies a pointer to the first component of the first generic
22902 vertex attribute in the array. The initial value is 0.
22904 `glVertexAttribPointer' specifies the location and data format of the
22905 array of generic vertex attributes at index INDEX to use when rendering.
22906 SIZE specifies the number of components per attribute and must be 1, 2,
22907 3, or 4. TYPE specifies the data type of each component, and STRIDE
22908 specifies the byte stride from one attribute to the next, allowing
22909 vertices and attributes to be packed into a single array or stored in
22910 separate arrays. If set to `GL_TRUE', NORMALIZED indicates that values
22911 stored in an integer format are to be mapped to the range [-1,1] (for
22912 signed values) or [0,1] (for unsigned values) when they are accessed and
22913 converted to floating point. Otherwise, values will be converted to
22914 floats directly without normalization.
22916 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
22917 target (see `glBindBuffer') while a generic vertex attribute array is
22918 specified, POINTER is treated as a byte offset into the buffer object's
22919 data store. Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING')
22920 is saved as generic vertex attribute array client-side state
22921 (`GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING') for index INDEX.
22923 When a generic vertex attribute array is specified, SIZE, TYPE,
22924 NORMALIZED, STRIDE, and POINTER are saved as client-side state, in
22925 addition to the current vertex array buffer object binding.
22927 To enable and disable a generic vertex attribute array, call
22928 `glEnableVertexAttribArray' and `glDisableVertexAttribArray' with INDEX.
22929 If enabled, the generic vertex attribute array is used when
22930 `glArrayElement', `glDrawArrays', `glMultiDrawArrays', `glDrawElements',
22931 `glMultiDrawElements', or `glDrawRangeElements' is called.
22933 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
22934 `GL_MAX_VERTEX_ATTRIBS'.
22936 `GL_INVALID_VALUE' is generated if SIZE is not 1, 2, 3, or 4.
22938 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
22940 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
22942 (define-gl-procedures
23021 (glVertexAttrib4Nub
23031 (v const-GLfloat-*)
23036 (v const-GLshort-*)
23041 (v const-GLdouble-*)
23046 (v const-GLfloat-*)
23051 (v const-GLshort-*)
23056 (v const-GLdouble-*)
23061 (v const-GLfloat-*)
23066 (v const-GLshort-*)
23071 (v const-GLdouble-*)
23076 (v const-GLfloat-*)
23081 (v const-GLshort-*)
23086 (v const-GLdouble-*)
23099 (glVertexAttrib4ubv
23101 (v const-GLubyte-*)
23104 (glVertexAttrib4usv
23106 (v const-GLushort-*)
23109 (glVertexAttrib4uiv
23114 (glVertexAttrib4Nbv
23119 (glVertexAttrib4Nsv
23121 (v const-GLshort-*)
23124 (glVertexAttrib4Niv
23129 (glVertexAttrib4Nubv
23131 (v const-GLubyte-*)
23134 (glVertexAttrib4Nusv
23136 (v const-GLushort-*)
23139 (glVertexAttrib4Nuiv
23144 "Specifies the value of a generic vertex attribute.
23147 Specifies the index of the generic vertex attribute to be modified.
23150 Specifies the new values to be used for the specified vertex
23153 OpenGL defines a number of standard vertex attributes that applications
23154 can modify with standard API entry points (color, normal, texture
23155 coordinates, etc.). The `glVertexAttrib' family of entry points allows
23156 an application to pass generic vertex attributes in numbered locations.
23158 Generic attributes are defined as four-component values that are
23159 organized into an array. The first entry of this array is numbered 0,
23160 and the size of the array is specified by the implementation-dependent
23161 constant `GL_MAX_VERTEX_ATTRIBS'. Individual elements of this array can
23162 be modified with a `glVertexAttrib' call that specifies the index of the
23163 element to be modified and a value for that element.
23165 These commands can be used to specify one, two, three, or all four
23166 components of the generic vertex attribute specified by INDEX. A `1' in
23167 the name of the command indicates that only one value is passed, and it
23168 will be used to modify the first component of the generic vertex
23169 attribute. The second and third components will be set to 0, and the
23170 fourth component will be set to 1. Similarly, a `2' in the name of the
23171 command indicates that values are provided for the first two components,
23172 the third component will be set to 0, and the fourth component will be
23173 set to 1. A `3' in the name of the command indicates that values are
23174 provided for the first three components and the fourth component will be
23175 set to 1, whereas a `4' in the name indicates that values are provided
23176 for all four components.
23178 The letters `s', `f', `i', `d', `ub', `us', and `ui' indicate whether
23179 the arguments are of type short, float, int, double, unsigned byte,
23180 unsigned short, or unsigned int. When `v' is appended to the name, the
23181 commands can take a pointer to an array of such values. The commands
23182 containing `N' indicate that the arguments will be passed as fixed-point
23183 values that are scaled to a normalized range according to the component
23184 conversion rules defined by the OpenGL specification. Signed values are
23185 understood to represent fixed-point values in the range [-1,1], and
23186 unsigned values are understood to represent fixed-point values in the
23189 OpenGL Shading Language attribute variables are allowed to be of type
23190 mat2, mat3, or mat4. Attributes of these types may be loaded using the
23191 `glVertexAttrib' entry points. Matrices must be loaded into successive
23192 generic attribute slots in column major order, with one column of the
23193 matrix in each generic attribute slot.
23195 A user-defined attribute variable declared in a vertex shader can be
23196 bound to a generic attribute index by calling `glBindAttribLocation'.
23197 This allows an application to use more descriptive variable names in a
23198 vertex shader. A subsequent change to the specified generic vertex
23199 attribute will be immediately reflected as a change to the corresponding
23200 attribute variable in the vertex shader.
23202 The binding between a generic vertex attribute index and a user-defined
23203 attribute variable in a vertex shader is part of the state of a program
23204 object, but the current value of the generic vertex attribute is not.
23205 The value of each generic vertex attribute is part of current state,
23206 just like standard vertex attributes, and it is maintained even if a
23207 different program object is used.
23209 An application may freely modify generic vertex attributes that are not
23210 bound to a named vertex shader attribute variable. These values are
23211 simply maintained as part of current state and will not be accessed by
23212 the vertex shader. If a generic vertex attribute bound to an attribute
23213 variable in a vertex shader is not updated while the vertex shader is
23214 executing, the vertex shader will repeatedly use the current value for
23215 the generic vertex attribute.
23217 The generic vertex attribute with index 0 is the same as the vertex
23218 position attribute previously defined by OpenGL. A `glVertex2',
23219 `glVertex3', or `glVertex4' command is completely equivalent to the
23220 corresponding `glVertexAttrib' command with an index argument of 0. A
23221 vertex shader can access generic vertex attribute 0 by using the
23222 built-in attribute variable GL_VERTEX. There are no current values for
23223 generic vertex attribute 0. This is the only generic vertex attribute
23224 with this property; calls to set other standard vertex attributes can be
23225 freely mixed with calls to set any of the other generic vertex
23228 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
23229 `GL_MAX_VERTEX_ATTRIBS'.")
23231 (define-gl-procedures
23236 (pointer const-GLvoid-*)
23239 "Define an array of vertex data.
23242 Specifies the number of coordinates per vertex. Must be 2, 3, or
23243 4. The initial value is 4.
23246 Specifies the data type of each coordinate in the array. Symbolic
23247 constants `GL_SHORT', `GL_INT', `GL_FLOAT', or `GL_DOUBLE' are
23248 accepted. The initial value is `GL_FLOAT'.
23251 Specifies the byte offset between consecutive vertices. If STRIDE
23252 is 0, the vertices are understood to be tightly packed in the
23253 array. The initial value is 0.
23256 Specifies a pointer to the first coordinate of the first vertex in
23257 the array. The initial value is 0.
23259 `glVertexPointer' specifies the location and data format of an array of
23260 vertex coordinates to use when rendering. SIZE specifies the number of
23261 coordinates per vertex, and must be 2, 3, or 4. TYPE specifies the data
23262 type of each coordinate, and STRIDE specifies the byte stride from one
23263 vertex to the next, allowing vertices and attributes to be packed into a
23264 single array or stored in separate arrays. (Single-array storage may be
23265 more efficient on some implementations; see `glInterleavedArrays'.)
23267 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
23268 target (see `glBindBuffer') while a vertex array is specified, POINTER
23269 is treated as a byte offset into the buffer object's data store. Also,
23270 the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as vertex
23271 array client-side state (`GL_VERTEX_ARRAY_BUFFER_BINDING').
23273 When a vertex array is specified, SIZE, TYPE, STRIDE, and POINTER are
23274 saved as client-side state, in addition to the current vertex array
23275 buffer object binding.
23277 To enable and disable the vertex array, call `glEnableClientState' and
23278 `glDisableClientState' with the argument `GL_VERTEX_ARRAY'. If enabled,
23279 the vertex array is used when `glArrayElement', `glDrawArrays',
23280 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements', or
23281 `glDrawRangeElements' is called.
23283 `GL_INVALID_VALUE' is generated if SIZE is not 2, 3, or 4.
23285 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
23287 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
23289 (define-gl-procedures
23290 ((glVertex2s (x GLshort) (y GLshort) -> void)
23291 (glVertex2i (x GLint) (y GLint) -> void)
23292 (glVertex2f (x GLfloat) (y GLfloat) -> void)
23293 (glVertex2d (x GLdouble) (y GLdouble) -> void)
23346 (glVertex2sv (v const-GLshort-*) -> void)
23347 (glVertex2iv (v const-GLint-*) -> void)
23348 (glVertex2fv (v const-GLfloat-*) -> void)
23349 (glVertex2dv (v const-GLdouble-*) -> void)
23350 (glVertex3sv (v const-GLshort-*) -> void)
23351 (glVertex3iv (v const-GLint-*) -> void)
23352 (glVertex3fv (v const-GLfloat-*) -> void)
23353 (glVertex3dv (v const-GLdouble-*) -> void)
23354 (glVertex4sv (v const-GLshort-*) -> void)
23355 (glVertex4iv (v const-GLint-*) -> void)
23356 (glVertex4fv (v const-GLfloat-*) -> void)
23357 (glVertex4dv (v const-GLdouble-*) -> void))
23367 Specify X, Y, Z, and W coordinates of a vertex. Not all parameters
23368 are present in all forms of the command.
23370 `glVertex' commands are used within `glBegin'/`glEnd' pairs to specify
23371 point, line, and polygon vertices. The current color, normal, texture
23372 coordinates, and fog coordinate are associated with the vertex when
23373 `glVertex' is called.
23375 When only X and Y are specified, Z defaults to 0 and W defaults to 1.
23376 When X , Y , and Z are specified, W defaults to 1.")
23378 (define-gl-procedures
23391 Specify the lower left corner of the viewport rectangle, in pixels.
23392 The initial value is (0,0).
23397 Specify the width and height of the viewport. When a GL context is
23398 first attached to a window, WIDTH and HEIGHT are set to the
23399 dimensions of that window.
23401 `glViewport' specifies the affine transformation of X and Y from
23402 normalized device coordinates to window coordinates. Let (X_ND,Y_ND) be
23403 normalized device coordinates. Then the window coordinates (X_W,Y_W)
23404 are computed as follows:
23406 X_W=(X_ND+1,)\u2062(WIDTH/2,)+X
23408 Y_W=(Y_ND+1,)\u2062(HEIGHT/2,)+Y
23410 Viewport width and height are silently clamped to a range that depends
23411 on the implementation. To query this range, call `glGet' with argument
23412 `GL_MAX_VIEWPORT_DIMS'.
23414 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
23416 `GL_INVALID_OPERATION' is generated if `glViewport' is executed between
23417 the execution of `glBegin' and the corresponding execution of `glEnd'.")
23419 (define-gl-procedures
23420 ((glWindowPos2s (x GLshort) (y GLshort) -> void)
23421 (glWindowPos2i (x GLint) (y GLint) -> void)
23422 (glWindowPos2f (x GLfloat) (y GLfloat) -> void)
23423 (glWindowPos2d (x GLdouble) (y GLdouble) -> void)
23448 (glWindowPos2sv (v const-GLshort-*) -> void)
23449 (glWindowPos2iv (v const-GLint-*) -> void)
23450 (glWindowPos2fv (v const-GLfloat-*) -> void)
23451 (glWindowPos2dv (v const-GLdouble-*) -> void)
23452 (glWindowPos3sv (v const-GLshort-*) -> void)
23453 (glWindowPos3iv (v const-GLint-*) -> void)
23454 (glWindowPos3fv (v const-GLfloat-*) -> void)
23455 (glWindowPos3dv (v const-GLdouble-*) -> void))
23456 "Specify the raster position in window coordinates for pixel operations.
23463 Specify the X , Y , Z coordinates for the raster position.
23465 The GL maintains a 3D position in window coordinates. This position,
23466 called the raster position, is used to position pixel and bitmap write
23467 operations. It is maintained with subpixel accuracy. See `glBitmap',
23468 `glDrawPixels', and `glCopyPixels'.
23470 `glWindowPos2' specifies the X and Y coordinates, while Z is implicitly
23471 set to 0. `glWindowPos3' specifies all three coordinates. The W
23472 coordinate of the current raster position is always set to 1.0.
23474 `glWindowPos' directly updates the X and Y coordinates of the current
23475 raster position with the values specified. That is, the values are
23476 neither transformed by the current modelview and projection matrices,
23477 nor by the viewport-to-window transform. The Z coordinate of the
23478 current raster position is updated in the following manner:
23480 Z={(N), (F), (N+Z×(F-N,),)\u2062(IF\u2062Z<=0), (IF\u2062Z>=1), (`otherwise',),
23484 where N is `GL_DEPTH_RANGE''s near value, and F is `GL_DEPTH_RANGE''s
23485 far value. See `glDepthRange'.
23487 The specified coordinates are not clip-tested, causing the raster
23488 position to always be valid.
23490 The current raster position also includes some associated color data and
23491 texture coordinates. If lighting is enabled, then
23492 `GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `GL_CURRENT_RASTER_INDEX'
23493 (in color index mode) is set to the color produced by the lighting
23494 calculation (see `glLight', `glLightModel', and `glShadeModel'). If
23495 lighting is disabled, current color (in RGBA mode, state variable
23496 `GL_CURRENT_COLOR') or color index (in color index mode, state variable
23497 `GL_CURRENT_INDEX') is used to update the current raster color.
23498 `GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated.
23500 Likewise, `GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of
23501 `GL_CURRENT_TEXTURE_COORDS', based on the texture matrix and the texture
23502 generation functions (see `glTexGen'). The `GL_CURRENT_RASTER_DISTANCE'
23503 is set to the `GL_CURRENT_FOG_COORD'.
23507 `GL_INVALID_OPERATION' is generated if `glWindowPos' is executed between
23508 the execution of `glBegin' and the corresponding execution of `glEnd'.")