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 licensed
21 ;;; under the SGI Free Software B License. For details, see
22 ;;; http://oss.sgi.com/projects/FreeB/ (http://oss.sgi.com/projects/FreeB/).
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 drawn
775 if it also passes subsequent stencil and depth buffer tests. If the
776 value fails the comparison, no change is made to the frame buffer at
777 that pixel location. The comparison functions are as follows:
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 not
811 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 of
856 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 created.
971 When `glBeginQuery' is executed, the query object's samples-passed
972 counter is reset to 0. Subsequent rendering will increment the counter
973 once for every sample that passes the depth test. When `glEndQuery' is
974 executed, the samples-passed counter is assigned to the query object's
975 result value. This value can be queried by calling `glGetQueryObject'
976 with PNAME`GL_QUERY_RESULT'.
978 Querying the `GL_QUERY_RESULT' implicitly flushes the GL pipeline until
979 the rendering delimited by the query object has completed and the result
980 is available. `GL_QUERY_RESULT_AVAILABLE' can be queried to determine if
981 the result is immediately available or if the rendering is not yet
984 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SAMPLES_PASSED'.
986 `GL_INVALID_OPERATION' is generated if `glBeginQuery' is executed while
987 a query object of the same TARGET is already active.
989 `GL_INVALID_OPERATION' is generated if `glEndQuery' is executed when a
990 query object of the same TARGET is not active.
992 `GL_INVALID_OPERATION' is generated if ID is 0.
994 `GL_INVALID_OPERATION' is generated if ID is the name of an already
997 `GL_INVALID_OPERATION' is generated if `glBeginQuery' or `glEndQuery' is
998 executed between the execution of `glBegin' and the corresponding
999 execution of `glEnd'.")
1001 (define-gl-procedures
1002 ((glBegin (mode GLenum) -> void) (glEnd -> void))
1003 "Delimit the vertices of a primitive or a group of like primitives.
1006 Specifies the primitive or primitives that will be created from
1007 vertices presented between `glBegin' and the subsequent `glEnd'.
1008 Ten symbolic constants are accepted: `GL_POINTS', `GL_LINES',
1009 `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_TRIANGLES',
1010 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_QUADS',
1011 `GL_QUAD_STRIP', and `GL_POLYGON'.
1013 `glBegin' and `glEnd' delimit the vertices that define a primitive or a
1014 group of like primitives. `glBegin' accepts a single argument that
1015 specifies in which of ten ways the vertices are interpreted. Taking N as
1016 an integer count starting at one, and N as the total number of vertices
1017 specified, the interpretations are as follows:
1020 Treats each vertex as a single point. Vertex N defines point N . N
1024 Treats each pair of vertices as an independent line segment.
1025 Vertices 2\u2062N-1 and 2\u2062N define line N . N/2 lines are drawn.
1028 Draws a connected group of line segments from the first vertex to
1029 the last. Vertices N and N+1 define line N . N-1 lines are drawn.
1032 Draws a connected group of line segments from the first vertex to
1033 the last, then back to the first. Vertices N and N+1 define line N
1034 . The last line, however, is defined by vertices N and 1 . N lines
1038 Treats each triplet of vertices as an independent triangle.
1039 Vertices 3\u2062N-2 , 3\u2062N-1 , and 3\u2062N define triangle N . N/3 triangles
1043 Draws a connected group of triangles. One triangle is defined for
1044 each vertex presented after the first two vertices. For odd N ,
1045 vertices N , N+1 , and N+2 define triangle N . For even N ,
1046 vertices N+1 , N , and N+2 define triangle N . N-2 triangles are
1050 Draws a connected group of triangles. One triangle is defined for
1051 each vertex presented after the first two vertices. Vertices 1 ,
1052 N+1 , and N+2 define triangle N . N-2 triangles are drawn.
1055 Treats each group of four vertices as an independent quadrilateral.
1056 Vertices 4\u2062N-3 , 4\u2062N-2 , 4\u2062N-1 , and 4\u2062N define quadrilateral N .
1057 N/4 quadrilaterals are drawn.
1060 Draws a connected group of quadrilaterals. One quadrilateral is
1061 defined for each pair of vertices presented after the first pair.
1062 Vertices 2\u2062N-1 , 2\u2062N , 2\u2062N+2 , and 2\u2062N+1 define quadrilateral N .
1063 N/2-1 quadrilaterals are drawn. Note that the order in which
1064 vertices are used to construct a quadrilateral from strip data is
1065 different from that used with independent data.
1068 Draws a single, convex polygon. Vertices 1 through N define this
1071 Only a subset of GL commands can be used between `glBegin' and `glEnd'.
1072 The commands are `glVertex', `glColor', `glSecondaryColor', `glIndex',
1073 `glNormal', `glFogCoord', `glTexCoord', `glMultiTexCoord',
1074 `glVertexAttrib', `glEvalCoord', `glEvalPoint', `glArrayElement',
1075 `glMaterial', and `glEdgeFlag'. Also, it is acceptable to use
1076 `glCallList' or `glCallLists' to execute display lists that include only
1077 the preceding commands. If any other GL command is executed between
1078 `glBegin' and `glEnd', the error flag is set and the command is ignored.
1080 Regardless of the value chosen for MODE, there is no limit to the number
1081 of vertices that can be defined between `glBegin' and `glEnd'. Lines,
1082 triangles, quadrilaterals, and polygons that are incompletely specified
1083 are not drawn. Incomplete specification results when either too few
1084 vertices are provided to specify even a single primitive or when an
1085 incorrect multiple of vertices is specified. The incomplete primitive is
1086 ignored; the rest are drawn.
1088 The minimum specification of vertices for each primitive is as follows:
1089 1 for a point, 2 for a line, 3 for a triangle, 4 for a quadrilateral,
1090 and 3 for a polygon. Modes that require a certain multiple of vertices
1091 are `GL_LINES' (2), `GL_TRIANGLES' (3), `GL_QUADS' (4), and
1092 `GL_QUAD_STRIP' (2).
1094 `GL_INVALID_ENUM' is generated if MODE is set to an unaccepted value.
1096 `GL_INVALID_OPERATION' is generated if `glBegin' is executed between a
1097 `glBegin' and the corresponding execution of `glEnd'.
1099 `GL_INVALID_OPERATION' is generated if `glEnd' is executed without being
1100 preceded by a `glBegin'.
1102 `GL_INVALID_OPERATION' is generated if a command other than `glVertex',
1103 `glColor', `glSecondaryColor', `glIndex', `glNormal', `glFogCoord',
1104 `glTexCoord', `glMultiTexCoord', `glVertexAttrib', `glEvalCoord',
1105 `glEvalPoint', `glArrayElement', `glMaterial', `glEdgeFlag',
1106 `glCallList', or `glCallLists' is executed between the execution of
1107 `glBegin' and the corresponding execution `glEnd'.
1109 Execution of `glEnableClientState', `glDisableClientState',
1110 `glEdgeFlagPointer', `glFogCoordPointer', `glTexCoordPointer',
1111 `glColorPointer', `glSecondaryColorPointer', `glIndexPointer',
1112 `glNormalPointer', `glVertexPointer', `glVertexAttribPointer',
1113 `glInterleavedArrays', or `glPixelStore' is not allowed after a call to
1114 `glBegin' and before the corresponding call to `glEnd', but an error may
1115 or may not be generated.")
1117 (define-gl-procedures
1118 ((glBindAttribLocation
1121 (name const-GLchar-*)
1124 "Associates a generic vertex attribute index with a named attribute
1128 Specifies the handle of the program object in which the association
1132 Specifies the index of the generic vertex attribute to be bound.
1135 Specifies a null terminated string containing the name of the
1136 vertex shader attribute variable to which INDEX is to be bound.
1138 `glBindAttribLocation' is used to associate a user-defined attribute
1139 variable in the program object specified by PROGRAM with a generic
1140 vertex attribute index. The name of the user-defined attribute variable
1141 is passed as a null terminated string in NAME. The generic vertex
1142 attribute index to be bound to this variable is specified by INDEX. When
1143 PROGRAM is made part of current state, values provided via the generic
1144 vertex attribute INDEX will modify the value of the user-defined
1145 attribute variable specified by NAME.
1147 If NAME refers to a matrix attribute variable, INDEX refers to the first
1148 column of the matrix. Other matrix columns are then automatically bound
1149 to locations INDEX+1 for a matrix of type mat2; INDEX+1 and INDEX+2 for
1150 a matrix of type mat3; and INDEX+1, INDEX+2, and INDEX+3 for a matrix of
1153 This command makes it possible for vertex shaders to use descriptive
1154 names for attribute variables rather than generic variables that are
1155 numbered from 0 to `GL_MAX_VERTEX_ATTRIBS' -1. The values sent to each
1156 generic attribute index are part of current state, just like standard
1157 vertex attributes such as color, normal, and vertex position. If a
1158 different program object is made current by calling `glUseProgram', the
1159 generic vertex attributes are tracked in such a way that the same values
1160 will be observed by attributes in the new program object that are also
1163 Attribute variable name-to-generic attribute index bindings for a
1164 program object can be explicitly assigned at any time by calling
1165 `glBindAttribLocation'. Attribute bindings do not go into effect until
1166 `glLinkProgram' is called. After a program object has been linked
1167 successfully, the index values for generic attributes remain fixed (and
1168 their values can be queried) until the next link command occurs.
1170 Applications are not allowed to bind any of the standard OpenGL vertex
1171 attributes using this command, as they are bound automatically when
1172 needed. Any attribute binding that occurs after the program object has
1173 been linked will not take effect until the next time the program object
1176 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
1177 `GL_MAX_VERTEX_ATTRIBS'.
1179 `GL_INVALID_OPERATION' is generated if NAME starts with the reserved
1182 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
1185 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
1187 `GL_INVALID_OPERATION' is generated if `glBindAttribLocation' is
1188 executed between the execution of `glBegin' and the corresponding
1189 execution of `glEnd'.")
1191 (define-gl-procedures
1197 "Bind a named buffer object.
1200 Specifies the target to which the buffer object is bound. The
1201 symbolic constant must be `GL_ARRAY_BUFFER',
1202 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
1203 `GL_PIXEL_UNPACK_BUFFER'.
1206 Specifies the name of a buffer object.
1208 `glBindBuffer' lets you create or use a named buffer object. Calling
1209 `glBindBuffer' with TARGET set to `GL_ARRAY_BUFFER',
1210 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER' or
1211 `GL_PIXEL_UNPACK_BUFFER' and BUFFER set to the name of the new buffer
1212 object binds the buffer object name to the target. When a buffer object
1213 is bound to a target, the previous binding for that target is
1214 automatically broken.
1216 Buffer object names are unsigned integers. The value zero is reserved,
1217 but there is no default buffer object for each buffer object target.
1218 Instead, BUFFER set to zero effectively unbinds any buffer object
1219 previously bound, and restores client memory usage for that buffer
1220 object target. Buffer object names and the corresponding buffer object
1221 contents are local to the shared display-list space (see
1222 `glXCreateContext') of the current GL rendering context; two rendering
1223 contexts share buffer object names only if they also share display
1226 You may use `glGenBuffers' to generate a set of new buffer object names.
1228 The state of a buffer object immediately after it is first bound is an
1229 unmapped zero-sized memory buffer with `GL_READ_WRITE' access and
1230 `GL_STATIC_DRAW' usage.
1232 While a non-zero buffer object name is bound, GL operations on the
1233 target to which it is bound affect the bound buffer object, and queries
1234 of the target to which it is bound return state from the bound buffer
1235 object. While buffer object name zero is bound, as in the initial state,
1236 attempts to modify or query state on the target to which it is bound
1237 generates an `GL_INVALID_OPERATION' error.
1239 When vertex array pointer state is changed, for example by a call to
1240 `glNormalPointer', the current buffer object binding
1241 (`GL_ARRAY_BUFFER_BINDING') is copied into the corresponding client
1242 state for the vertex array type being changed, for example
1243 `GL_NORMAL_ARRAY_BUFFER_BINDING'. While a non-zero buffer object is
1244 bound to the `GL_ARRAY_BUFFER' target, the vertex array pointer
1245 parameter that is traditionally interpreted as a pointer to client-side
1246 memory is instead interpreted as an offset within the buffer object
1247 measured in basic machine units.
1249 While a non-zero buffer object is bound to the `GL_ELEMENT_ARRAY_BUFFER'
1250 target, the indices parameter of `glDrawElements',
1251 `glDrawRangeElements', or `glMultiDrawElements' that is traditionally
1252 interpreted as a pointer to client-side memory is instead interpreted as
1253 an offset within the buffer object measured in basic machine units.
1255 While a non-zero buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
1256 target, the following commands are affected: `glGetCompressedTexImage',
1257 `glGetConvolutionFilter', `glGetHistogram', `glGetMinmax',
1258 `glGetPixelMap', `glGetPolygonStipple', `glGetSeparableFilter',
1259 `glGetTexImage', and `glReadPixels'. The pointer parameter that is
1260 traditionally interpreted as a pointer to client-side memory where the
1261 pixels are to be packed is instead interpreted as an offset within the
1262 buffer object measured in basic machine units.
1264 While a non-zero buffer object is bound to the `GL_PIXEL_UNPACK_BUFFER'
1265 target, the following commands are affected: `glBitmap',
1266 `glColorSubTable', `glColorTable', `glCompressedTexImage1D',
1267 `glCompressedTexImage2D', `glCompressedTexImage3D',
1268 `glCompressedTexSubImage1D', `glCompressedTexSubImage2D',
1269 `glCompressedTexSubImage3D', `glConvolutionFilter1D',
1270 `glConvolutionFilter2D', `glDrawPixels', `glPixelMap',
1271 `glPolygonStipple', `glSeparableFilter2D', `glTexImage1D',
1272 `glTexImage2D', `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D',
1273 and `glTexSubImage3D'. The pointer parameter that is traditionally
1274 interpreted as a pointer to client-side memory from which the pixels are
1275 to be unpacked is instead interpreted as an offset within the buffer
1276 object measured in basic machine units.
1278 A buffer object binding created with `glBindBuffer' remains active until
1279 a different buffer object name is bound to the same target, or until the
1280 bound buffer object is deleted with `glDeleteBuffers'.
1282 Once created, a named buffer object may be re-bound to any target as
1283 often as needed. However, the GL implementation may make choices about
1284 how to optimize the storage of a buffer object based on its initial
1287 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
1290 `GL_INVALID_OPERATION' is generated if `glBindBuffer' is executed
1291 between the execution of `glBegin' and the corresponding execution of
1294 (define-gl-procedures
1300 "Bind a named texture to a texturing target.
1303 Specifies the target to which the texture is bound. Must be either
1304 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D', or
1305 `GL_TEXTURE_CUBE_MAP'.
1308 Specifies the name of a texture.
1310 `glBindTexture' lets you create or use a named texture. Calling
1311 `glBindTexture' with TARGET set to `GL_TEXTURE_1D', `GL_TEXTURE_2D',
1312 `GL_TEXTURE_3D' or `GL_TEXTURE_CUBE_MAP' and TEXTURE set to the name of
1313 the new texture binds the texture name to the target. When a texture is
1314 bound to a target, the previous binding for that target is automatically
1317 Texture names are unsigned integers. The value zero is reserved to
1318 represent the default texture for each texture target. Texture names and
1319 the corresponding texture contents are local to the shared display-list
1320 space (see `glXCreateContext') of the current GL rendering context; two
1321 rendering contexts share texture names only if they also share display
1324 You may use `glGenTextures' to generate a set of new texture names.
1326 When a texture is first bound, it assumes the specified target: A
1327 texture first bound to `GL_TEXTURE_1D' becomes one-dimensional texture,
1328 a texture first bound to `GL_TEXTURE_2D' becomes two-dimensional
1329 texture, a texture first bound to `GL_TEXTURE_3D' becomes
1330 three-dimensional texture, and a texture first bound to
1331 `GL_TEXTURE_CUBE_MAP' becomes a cube-mapped texture. The state of a
1332 one-dimensional texture immediately after it is first bound is
1333 equivalent to the state of the default `GL_TEXTURE_1D' at GL
1334 initialization, and similarly for two- and three-dimensional textures
1335 and cube-mapped textures.
1337 While a texture is bound, GL operations on the target to which it is
1338 bound affect the bound texture, and queries of the target to which it is
1339 bound return state from the bound texture. If texture mapping is active
1340 on the target to which a texture is bound, the bound texture is used. In
1341 effect, the texture targets become aliases for the textures currently
1342 bound to them, and the texture name zero refers to the default textures
1343 that were bound to them at initialization.
1345 A texture binding created with `glBindTexture' remains active until a
1346 different texture is bound to the same target, or until the bound
1347 texture is deleted with `glDeleteTextures'.
1349 Once created, a named texture may be re-bound to its same original
1350 target as often as needed. It is usually much faster to use
1351 `glBindTexture' to bind an existing named texture to one of the texture
1352 targets than it is to reload the texture image using `glTexImage1D',
1353 `glTexImage2D', or `glTexImage3D'. For additional control over
1354 performance, use `glPrioritizeTextures'.
1356 `glBindTexture' is included in display lists.
1358 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
1361 `GL_INVALID_OPERATION' is generated if TEXTURE was previously created
1362 with a target that doesn't match that of TARGET.
1364 `GL_INVALID_OPERATION' is generated if `glBindTexture' is executed
1365 between the execution of `glBegin' and the corresponding execution of
1368 (define-gl-procedures
1376 (bitmap const-GLubyte-*)
1384 Specify the pixel width and height of the bitmap image.
1389 Specify the location of the origin in the bitmap image. The origin
1390 is measured from the lower left corner of the bitmap, with right
1391 and up being the positive axes.
1396 Specify the X and Y offsets to be added to the current raster
1397 position after the bitmap is drawn.
1400 Specifies the address of the bitmap image.
1402 A bitmap is a binary image. When drawn, the bitmap is positioned
1403 relative to the current raster position, and frame buffer pixels
1404 corresponding to 1's in the bitmap are written using the current raster
1405 color or index. Frame buffer pixels corresponding to 0's in the bitmap
1408 `glBitmap' takes seven arguments. The first pair specifies the width and
1409 height of the bitmap image. The second pair specifies the location of
1410 the bitmap origin relative to the lower left corner of the bitmap image.
1411 The third pair of arguments specifies X and Y offsets to be added to the
1412 current raster position after the bitmap has been drawn. The final
1413 argument is a pointer to the bitmap image itself.
1415 If a non-zero named buffer object is bound to the
1416 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a bitmap
1417 image is specified, BITMAP is treated as a byte offset into the buffer
1418 object's data store.
1420 The bitmap image is interpreted like image data for the `glDrawPixels'
1421 command, with WIDTH and HEIGHT corresponding to the width and height
1422 arguments of that command, and with TYPE set to `GL_BITMAP' and FORMAT
1423 set to `GL_COLOR_INDEX'. Modes specified using `glPixelStore' affect the
1424 interpretation of bitmap image data; modes specified using
1425 `glPixelTransfer' do not.
1427 If the current raster position is invalid, `glBitmap' is ignored.
1428 Otherwise, the lower left corner of the bitmap image is positioned at
1429 the window coordinates
1435 where (X_R,Y_R) is the raster position and (X_O,Y_O) is the bitmap
1436 origin. Fragments are then generated for each pixel corresponding to a 1
1437 (one) in the bitmap image. These fragments are generated using the
1438 current raster Z coordinate, color or color index, and current raster
1439 texture coordinates. They are then treated just as if they had been
1440 generated by a point, line, or polygon, including texture mapping,
1441 fogging, and all per-fragment operations such as alpha and depth
1444 After the bitmap has been drawn, the X and Y coordinates of the current
1445 raster position are offset by XMOVE and YMOVE. No change is made to the
1446 Z coordinate of the current raster position, or to the current raster
1447 color, texture coordinates, or index.
1449 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is negative.
1451 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
1452 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
1453 data store is currently mapped.
1455 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
1456 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
1457 unpacked from the buffer object such that the memory reads required
1458 would exceed the data store size.
1460 `GL_INVALID_OPERATION' is generated if `glBitmap' is executed between
1461 the execution of `glBegin' and the corresponding execution of `glEnd'.")
1463 (define-gl-procedures
1471 "Set the blend color.
1480 specify the components of `GL_BLEND_COLOR'
1482 The `GL_BLEND_COLOR' may be used to calculate the source and destination
1483 blending factors. The color components are clamped to the range [0,1]
1484 before being stored. See `glBlendFunc' for a complete description of the
1485 blending operations. Initially the `GL_BLEND_COLOR' is set to (0, 0, 0,
1488 `GL_INVALID_OPERATION' is generated if `glBlendColor' is executed
1489 between the execution of `glBegin' and the corresponding execution of
1492 (define-gl-procedures
1493 ((glBlendEquationSeparate
1498 "Set the RGB blend equation and the alpha blend equation separately.
1501 specifies the RGB blend equation, how the red, green, and blue
1502 components of the source and destination colors are combined. It
1503 must be `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
1504 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN', `GL_MAX'.
1507 specifies the alpha blend equation, how the alpha component of the
1508 source and destination colors are combined. It must be
1509 `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1512 The blend equations determines how a new pixel (the ''source'' color) is
1513 combined with a pixel already in the framebuffer (the ''destination''
1514 color). This function specifies one blend equation for the RGB-color
1515 components and one blend equation for the alpha component.
1517 The blend equations use the source and destination blend factors
1518 specified by either `glBlendFunc' or `glBlendFuncSeparate'. See
1519 `glBlendFunc' or `glBlendFuncSeparate' for a description of the various
1522 In the equations that follow, source and destination color components
1523 are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) , respectively.
1524 The result color is referred to as (R_R,G_RB_RA_R) . The source and
1525 destination blend factors are denoted (S_R,S_GS_BS_A) and
1526 (D_R,D_GD_BD_A) , respectively. For these equations all color components
1527 are understood to have values in the range [0,1] .
1530 *RGB Components*, *Alpha Component*
1533 RR=R_S\u2062S_R+R_D\u2062D_R GR=G_S\u2062S_G+G_D\u2062D_G BR=B_S\u2062S_B+B_D\u2062D_B ,
1534 AR=A_S\u2062S_A+A_D\u2062D_A
1537 RR=R_S\u2062S_R-R_D\u2062D_R GR=G_S\u2062S_G-G_D\u2062D_G BR=B_S\u2062S_B-B_D\u2062D_B ,
1538 AR=A_S\u2062S_A-A_D\u2062D_A
1540 `GL_FUNC_REVERSE_SUBTRACT'
1541 RR=R_D\u2062D_R-R_S\u2062S_R GR=G_D\u2062D_G-G_S\u2062S_G BR=B_D\u2062D_B-B_S\u2062S_B ,
1542 AR=A_D\u2062D_A-A_S\u2062S_A
1545 RR=MIN\u2061(R_S,R_D) GR=MIN\u2061(G_S,G_D) BR=MIN\u2061(B_S,B_D) ,
1546 AR=MIN\u2061(A_S,A_D)
1549 RR=MAX\u2061(R_S,R_D) GR=MAX\u2061(G_S,G_D) BR=MAX\u2061(B_S,B_D) ,
1550 AR=MAX\u2061(A_S,A_D)
1552 The results of these equations are clamped to the range [0,1] .
1554 The `GL_MIN' and `GL_MAX' equations are useful for applications that
1555 analyze image data (image thresholding against a constant color, for
1556 example). The `GL_FUNC_ADD' equation is useful for antialiasing and
1557 transparency, among other things.
1559 Initially, both the RGB blend equation and the alpha blend equation are
1560 set to `GL_FUNC_ADD'.
1564 `GL_INVALID_ENUM' is generated if either MODERGB or MODEALPHA is not one
1565 of `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1566 `GL_MAX', or `GL_MIN'.
1568 `GL_INVALID_OPERATION' is generated if `glBlendEquationSeparate' is
1569 executed between the execution of `glBegin' and the corresponding
1570 execution of `glEnd'.")
1572 (define-gl-procedures
1573 ((glBlendEquation (mode GLenum) -> void))
1574 "Specify the equation used for both the RGB blend equation and the Alpha
1578 specifies how source and destination colors are combined. It must
1579 be `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1582 The blend equations determine how a new pixel (the ''source'' color) is
1583 combined with a pixel already in the framebuffer (the ''destination''
1584 color). This function sets both the RGB blend equation and the alpha
1585 blend equation to a single equation.
1587 These equations use the source and destination blend factors specified
1588 by either `glBlendFunc' or `glBlendFuncSeparate'. See `glBlendFunc' or
1589 `glBlendFuncSeparate' for a description of the various blend factors.
1591 In the equations that follow, source and destination color components
1592 are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) , respectively.
1593 The result color is referred to as (R_R,G_RB_RA_R) . The source and
1594 destination blend factors are denoted (S_R,S_GS_BS_A) and
1595 (D_R,D_GD_BD_A) , respectively. For these equations all color components
1596 are understood to have values in the range [0,1] .
1599 *RGB Components*, *Alpha Component*
1602 RR=R_S\u2062S_R+R_D\u2062D_R GR=G_S\u2062S_G+G_D\u2062D_G BR=B_S\u2062S_B+B_D\u2062D_B ,
1603 AR=A_S\u2062S_A+A_D\u2062D_A
1606 RR=R_S\u2062S_R-R_D\u2062D_R GR=G_S\u2062S_G-G_D\u2062D_G BR=B_S\u2062S_B-B_D\u2062D_B ,
1607 AR=A_S\u2062S_A-A_D\u2062D_A
1609 `GL_FUNC_REVERSE_SUBTRACT'
1610 RR=R_D\u2062D_R-R_S\u2062S_R GR=G_D\u2062D_G-G_S\u2062S_G BR=B_D\u2062D_B-B_S\u2062S_B ,
1611 AR=A_D\u2062D_A-A_S\u2062S_A
1614 RR=MIN\u2061(R_S,R_D) GR=MIN\u2061(G_S,G_D) BR=MIN\u2061(B_S,B_D) ,
1615 AR=MIN\u2061(A_S,A_D)
1618 RR=MAX\u2061(R_S,R_D) GR=MAX\u2061(G_S,G_D) BR=MAX\u2061(B_S,B_D) ,
1619 AR=MAX\u2061(A_S,A_D)
1621 The results of these equations are clamped to the range [0,1] .
1623 The `GL_MIN' and `GL_MAX' equations are useful for applications that
1624 analyze image data (image thresholding against a constant color, for
1625 example). The `GL_FUNC_ADD' equation is useful for antialiasing and
1626 transparency, among other things.
1628 Initially, both the RGB blend equation and the alpha blend equation are
1629 set to `GL_FUNC_ADD'.
1633 `GL_INVALID_ENUM' is generated if MODE is not one of `GL_FUNC_ADD',
1634 `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT', `GL_MAX', or `GL_MIN'.
1636 `GL_INVALID_OPERATION' is generated if `glBlendEquation' is executed
1637 between the execution of `glBegin' and the corresponding execution of
1640 (define-gl-procedures
1641 ((glBlendFuncSeparate
1648 "Specify pixel arithmetic for RGB and alpha components separately.
1651 Specifies how the red, green, and blue blending factors are
1652 computed. The following symbolic constants are accepted: `GL_ZERO',
1653 `GL_ONE', `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR',
1654 `GL_ONE_MINUS_DST_COLOR', `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA',
1655 `GL_DST_ALPHA', `GL_ONE_MINUS_DST_ALPHA', `GL_CONSTANT_COLOR',
1656 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA',
1657 `GL_ONE_MINUS_CONSTANT_ALPHA', and `GL_SRC_ALPHA_SATURATE'. The
1658 initial value is `GL_ONE'.
1661 Specifies how the red, green, and blue destination blending factors
1662 are computed. The following symbolic constants are accepted:
1663 `GL_ZERO', `GL_ONE', `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR',
1664 `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR', `GL_SRC_ALPHA',
1665 `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA', `GL_ONE_MINUS_DST_ALPHA'.
1666 `GL_CONSTANT_COLOR', `GL_ONE_MINUS_CONSTANT_COLOR',
1667 `GL_CONSTANT_ALPHA', and `GL_ONE_MINUS_CONSTANT_ALPHA'. The initial
1671 Specified how the alpha source blending factor is computed. The
1672 same symbolic constants are accepted as for SRCRGB. The initial
1676 Specified how the alpha destination blending factor is computed.
1677 The same symbolic constants are accepted as for DSTRGB. The initial
1680 In RGBA mode, pixels can be drawn using a function that blends the
1681 incoming (source) RGBA values with the RGBA values that are already in
1682 the frame buffer (the destination values). Blending is initially
1683 disabled. Use `glEnable' and `glDisable' with argument `GL_BLEND' to
1684 enable and disable blending.
1686 `glBlendFuncSeparate' defines the operation of blending when it is
1687 enabled. SRCRGB specifies which method is used to scale the source
1688 RGB-color components. DSTRGB specifies which method is used to scale the
1689 destination RGB-color components. Likewise, SRCALPHA specifies which
1690 method is used to scale the source alpha color component, and DSTALPHA
1691 specifies which method is used to scale the destination alpha component.
1692 The possible methods are described in the following table. Each method
1693 defines four scale factors, one each for red, green, blue, and alpha.
1695 In the table and in subsequent equations, source and destination color
1696 components are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) . The
1697 color specified by `glBlendColor' is referred to as (R_C,G_CB_CA_C) .
1698 They are understood to have integer values between 0 and (K_R,K_GK_BK_A)
1703 and (M_R,M_GM_BM_A) is the number of red, green, blue, and alpha
1706 Source and destination scale factors are referred to as (S_R,S_GS_BS_A)
1707 and (D_R,D_GD_BD_A) . All scale factors have range [0,1] .
1712 *RGB Factor*, *Alpha Factor*
1721 (R_S/K_R,G_S/K_GB_S/K_B) , A_S/K_A
1723 `GL_ONE_MINUS_SRC_COLOR'
1724 (1,111)-(R_S/K_R,G_S/K_GB_S/K_B) , 1-A_S/K_A
1727 (R_D/K_R,G_D/K_GB_D/K_B) , A_D/K_A
1729 `GL_ONE_MINUS_DST_COLOR'
1730 (1,11)-(R_D/K_R,G_D/K_GB_D/K_B) , 1-A_D/K_A
1733 (A_S/K_A,A_S/K_AA_S/K_A) , A_S/K_A
1735 `GL_ONE_MINUS_SRC_ALPHA'
1736 (1,11)-(A_S/K_A,A_S/K_AA_S/K_A) , 1-A_S/K_A
1739 (A_D/K_A,A_D/K_AA_D/K_A) , A_D/K_A
1741 `GL_ONE_MINUS_DST_ALPHA'
1742 (1,11)-(A_D/K_A,A_D/K_AA_D/K_A) , 1-A_D/K_A
1747 `GL_ONE_MINUS_CONSTANT_COLOR'
1748 (1,11)-(R_C,G_CB_C) , 1-A_C
1753 `GL_ONE_MINUS_CONSTANT_ALPHA'
1754 (1,11)-(A_C,A_CA_C) , 1-A_C
1756 `GL_SRC_ALPHA_SATURATE'
1761 I=MIN\u2061(A_S,1-A_D,)
1763 To determine the blended RGBA values of a pixel when drawing in RGBA
1764 mode, the system uses the following equations:
1766 R_D=MIN\u2061(K_R,R_S\u2062S_R+R_D\u2062D_R) G_D=MIN\u2061(K_G,G_S\u2062S_G+G_D\u2062D_G)
1767 B_D=MIN\u2061(K_B,B_S\u2062S_B+B_D\u2062D_B) A_D=MIN\u2061(K_A,A_S\u2062S_A+A_D\u2062D_A)
1769 Despite the apparent precision of the above equations, blending
1770 arithmetic is not exactly specified, because blending operates with
1771 imprecise integer color values. However, a blend factor that should be
1772 equal to 1 is guaranteed not to modify its multiplicand, and a blend
1773 factor equal to 0 reduces its multiplicand to 0. For example, when
1774 SRCRGB is `GL_SRC_ALPHA', DSTRGB is `GL_ONE_MINUS_SRC_ALPHA', and A_S is
1775 equal to K_A , the equations reduce to simple replacement:
1777 R_D=R_S G_D=G_S B_D=B_S A_D=A_S
1781 `GL_INVALID_ENUM' is generated if either SRCRGB or DSTRGB is not an
1784 `GL_INVALID_OPERATION' is generated if `glBlendFuncSeparate' is executed
1785 between the execution of `glBegin' and the corresponding execution of
1788 (define-gl-procedures
1794 "Specify pixel arithmetic.
1797 Specifies how the red, green, blue, and alpha source blending
1798 factors are computed. The following symbolic constants are
1799 accepted: `GL_ZERO', `GL_ONE', `GL_SRC_COLOR',
1800 `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR',
1801 `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA',
1802 `GL_ONE_MINUS_DST_ALPHA', `GL_CONSTANT_COLOR',
1803 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA',
1804 `GL_ONE_MINUS_CONSTANT_ALPHA', and `GL_SRC_ALPHA_SATURATE'. The
1805 initial value is `GL_ONE'.
1808 Specifies how the red, green, blue, and alpha destination blending
1809 factors are computed. The following symbolic constants are
1810 accepted: `GL_ZERO', `GL_ONE', `GL_SRC_COLOR',
1811 `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR',
1812 `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA',
1813 `GL_ONE_MINUS_DST_ALPHA'. `GL_CONSTANT_COLOR',
1814 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA', and
1815 `GL_ONE_MINUS_CONSTANT_ALPHA'. The initial value is `GL_ZERO'.
1817 In RGBA mode, pixels can be drawn using a function that blends the
1818 incoming (source) RGBA values with the RGBA values that are already in
1819 the frame buffer (the destination values). Blending is initially
1820 disabled. Use `glEnable' and `glDisable' with argument `GL_BLEND' to
1821 enable and disable blending.
1823 `glBlendFunc' defines the operation of blending when it is enabled.
1824 SFACTOR specifies which method is used to scale the source color
1825 components. DFACTOR specifies which method is used to scale the
1826 destination color components. The possible methods are described in the
1827 following table. Each method defines four scale factors, one each for
1828 red, green, blue, and alpha. In the table and in subsequent equations,
1829 source and destination color components are referred to as
1830 (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) . The color specified by
1831 `glBlendColor' is referred to as (R_C,G_CB_CA_C) . They are understood
1832 to have integer values between 0 and (K_R,K_GK_BK_A) , where
1836 and (M_R,M_GM_BM_A) is the number of red, green, blue, and alpha
1839 Source and destination scale factors are referred to as (S_R,S_GS_BS_A)
1840 and (D_R,D_GD_BD_A) . The scale factors described in the table, denoted
1841 (F_R,F_GF_BF_A) , represent either source or destination factors. All
1842 scale factors have range [0,1] .
1856 (R_S/K_R,G_S/K_GB_S/K_BA_S/K_A)
1858 `GL_ONE_MINUS_SRC_COLOR'
1859 (1,111)-(R_S/K_R,G_S/K_GB_S/K_BA_S/K_A)
1862 (R_D/K_R,G_D/K_GB_D/K_BA_D/K_A)
1864 `GL_ONE_MINUS_DST_COLOR'
1865 (1,111)-(R_D/K_R,G_D/K_GB_D/K_BA_D/K_A)
1868 (A_S/K_A,A_S/K_AA_S/K_AA_S/K_A)
1870 `GL_ONE_MINUS_SRC_ALPHA'
1871 (1,111)-(A_S/K_A,A_S/K_AA_S/K_AA_S/K_A)
1874 (A_D/K_A,A_D/K_AA_D/K_AA_D/K_A)
1876 `GL_ONE_MINUS_DST_ALPHA'
1877 (1,111)-(A_D/K_A,A_D/K_AA_D/K_AA_D/K_A)
1882 `GL_ONE_MINUS_CONSTANT_COLOR'
1883 (1,111)-(R_C,G_CB_CA_C)
1888 `GL_ONE_MINUS_CONSTANT_ALPHA'
1889 (1,111)-(A_C,A_CA_CA_C)
1891 `GL_SRC_ALPHA_SATURATE'
1896 I=MIN\u2061(A_S,K_A-A_D)/K_A
1898 To determine the blended RGBA values of a pixel when drawing in RGBA
1899 mode, the system uses the following equations:
1901 R_D=MIN\u2061(K_R,R_S\u2062S_R+R_D\u2062D_R) G_D=MIN\u2061(K_G,G_S\u2062S_G+G_D\u2062D_G)
1902 B_D=MIN\u2061(K_B,B_S\u2062S_B+B_D\u2062D_B) A_D=MIN\u2061(K_A,A_S\u2062S_A+A_D\u2062D_A)
1904 Despite the apparent precision of the above equations, blending
1905 arithmetic is not exactly specified, because blending operates with
1906 imprecise integer color values. However, a blend factor that should be
1907 equal to 1 is guaranteed not to modify its multiplicand, and a blend
1908 factor equal to 0 reduces its multiplicand to 0. For example, when
1909 SFACTOR is `GL_SRC_ALPHA', DFACTOR is `GL_ONE_MINUS_SRC_ALPHA', and A_S
1910 is equal to K_A , the equations reduce to simple replacement:
1912 R_D=R_S G_D=G_S B_D=B_S A_D=A_S
1916 `GL_INVALID_ENUM' is generated if either SFACTOR or DFACTOR is not an
1919 `GL_INVALID_OPERATION' is generated if `glBlendFunc' is executed between
1920 the execution of `glBegin' and the corresponding execution of `glEnd'.")
1922 (define-gl-procedures
1926 (data const-GLvoid-*)
1930 "Creates and initializes a buffer object's data store.
1933 Specifies the target buffer object. The symbolic constant must be
1934 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
1935 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
1938 Specifies the size in bytes of the buffer object's new data store.
1941 Specifies a pointer to data that will be copied into the data store
1942 for initialization, or `NULL' if no data is to be copied.
1945 Specifies the expected usage pattern of the data store. The
1946 symbolic constant must be `GL_STREAM_DRAW', `GL_STREAM_READ',
1947 `GL_STREAM_COPY', `GL_STATIC_DRAW', `GL_STATIC_READ',
1948 `GL_STATIC_COPY', `GL_DYNAMIC_DRAW', `GL_DYNAMIC_READ', or
1951 `glBufferData' creates a new data store for the buffer object currently
1952 bound to TARGET. Any pre-existing data store is deleted. The new data
1953 store is created with the specified SIZE in bytes and USAGE. If DATA is
1954 not `NULL', the data store is initialized with data from this pointer.
1955 In its initial state, the new data store is not mapped, it has a `NULL'
1956 mapped pointer, and its mapped access is `GL_READ_WRITE'.
1958 USAGE is a hint to the GL implementation as to how a buffer object's
1959 data store will be accessed. This enables the GL implementation to make
1960 more intelligent decisions that may significantly impact buffer object
1961 performance. It does not, however, constrain the actual usage of the
1962 data store. USAGE can be broken down into two parts: first, the
1963 frequency of access (modification and usage), and second, the nature of
1964 that access. The frequency of access may be one of these:
1967 The data store contents will be modified once and used at most a
1971 The data store contents will be modified once and used many times.
1974 The data store contents will be modified repeatedly and used many
1977 The nature of access may be one of these:
1980 The data store contents are modified by the application, and used
1981 as the source for GL drawing and image specification commands.
1984 The data store contents are modified by reading data from the GL,
1985 and used to return that data when queried by the application.
1988 The data store contents are modified by reading data from the GL,
1989 and used as the source for GL drawing and image specification
1992 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
1993 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
1994 `GL_PIXEL_UNPACK_BUFFER'.
1996 `GL_INVALID_ENUM' is generated if USAGE is not `GL_STREAM_DRAW',
1997 `GL_STREAM_READ', `GL_STREAM_COPY', `GL_STATIC_DRAW', `GL_STATIC_READ',
1998 `GL_STATIC_COPY', `GL_DYNAMIC_DRAW', `GL_DYNAMIC_READ', or
2001 `GL_INVALID_VALUE' is generated if SIZE is negative.
2003 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
2006 `GL_OUT_OF_MEMORY' is generated if the GL is unable to create a data
2007 store with the specified SIZE.
2009 `GL_INVALID_OPERATION' is generated if `glBufferData' is executed
2010 between the execution of `glBegin' and the corresponding execution of
2013 (define-gl-procedures
2018 (data const-GLvoid-*)
2021 "Updates a subset of a buffer object's data store.
2024 Specifies the target buffer object. The symbolic constant must be
2025 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
2026 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
2029 Specifies the offset into the buffer object's data store where data
2030 replacement will begin, measured in bytes.
2033 Specifies the size in bytes of the data store region being
2037 Specifies a pointer to the new data that will be copied into the
2040 `glBufferSubData' redefines some or all of the data store for the buffer
2041 object currently bound to TARGET. Data starting at byte offset OFFSET
2042 and extending for SIZE bytes is copied to the data store from the memory
2043 pointed to by DATA. An error is thrown if OFFSET and SIZE together
2044 define a range beyond the bounds of the buffer object's data store.
2046 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
2047 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
2048 `GL_PIXEL_UNPACK_BUFFER'.
2050 `GL_INVALID_VALUE' is generated if OFFSET or SIZE is negative, or if
2051 together they define a region of memory that extends beyond the buffer
2052 object's allocated data store.
2054 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
2057 `GL_INVALID_OPERATION' is generated if the buffer object being updated
2060 `GL_INVALID_OPERATION' is generated if `glBufferSubData' is executed
2061 between the execution of `glBegin' and the corresponding execution of
2064 (define-gl-procedures
2068 (lists const-GLvoid-*)
2071 "Execute a list of display lists.
2074 Specifies the number of display lists to be executed.
2077 Specifies the type of values in LISTS. Symbolic constants
2078 `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_UNSIGNED_SHORT',
2079 `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', `GL_2_BYTES',
2080 `GL_3_BYTES', and `GL_4_BYTES' are accepted.
2083 Specifies the address of an array of name offsets in the display
2084 list. The pointer type is void because the offsets can be bytes,
2085 shorts, ints, or floats, depending on the value of TYPE.
2087 `glCallLists' causes each display list in the list of names passed as
2088 LISTS to be executed. As a result, the commands saved in each display
2089 list are executed in order, just as if they were called without using a
2090 display list. Names of display lists that have not been defined are
2093 `glCallLists' provides an efficient means for executing more than one
2094 display list. TYPE allows lists with various name formats to be
2095 accepted. The formats are as follows:
2098 LISTS is treated as an array of signed bytes, each in the range
2102 LISTS is treated as an array of unsigned bytes, each in the range 0
2106 LISTS is treated as an array of signed two-byte integers, each in
2107 the range -32768 through 32767.
2110 LISTS is treated as an array of unsigned two-byte integers, each in
2111 the range 0 through 65535.
2114 LISTS is treated as an array of signed four-byte integers.
2117 LISTS is treated as an array of unsigned four-byte integers.
2120 LISTS is treated as an array of four-byte floating-point values.
2123 LISTS is treated as an array of unsigned bytes. Each pair of bytes
2124 specifies a single display-list name. The value of the pair is
2125 computed as 256 times the unsigned value of the first byte plus the
2126 unsigned value of the second byte.
2129 LISTS is treated as an array of unsigned bytes. Each triplet of
2130 bytes specifies a single display-list name. The value of the
2131 triplet is computed as 65536 times the unsigned value of the first
2132 byte, plus 256 times the unsigned value of the second byte, plus
2133 the unsigned value of the third byte.
2136 LISTS is treated as an array of unsigned bytes. Each quadruplet of
2137 bytes specifies a single display-list name. The value of the
2138 quadruplet is computed as 16777216 times the unsigned value of the
2139 first byte, plus 65536 times the unsigned value of the second byte,
2140 plus 256 times the unsigned value of the third byte, plus the
2141 unsigned value of the fourth byte.
2143 The list of display-list names is not null-terminated. Rather, N
2144 specifies how many names are to be taken from LISTS.
2146 An additional level of indirection is made available with the
2147 `glListBase' command, which specifies an unsigned offset that is added
2148 to each display-list name specified in LISTS before that display list is
2151 `glCallLists' can appear inside a display list. To avoid the possibility
2152 of infinite recursion resulting from display lists calling one another,
2153 a limit is placed on the nesting level of display lists during
2154 display-list execution. This limit must be at least 64, and it depends
2155 on the implementation.
2157 GL state is not saved and restored across a call to `glCallLists'. Thus,
2158 changes made to GL state during the execution of the display lists
2159 remain after execution is completed. Use `glPushAttrib', `glPopAttrib',
2160 `glPushMatrix', and `glPopMatrix' to preserve GL state across
2161 `glCallLists' calls.
2163 `GL_INVALID_VALUE' is generated if N is negative.
2165 `GL_INVALID_ENUM' is generated if TYPE is not one of `GL_BYTE',
2166 `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_UNSIGNED_SHORT', `GL_INT',
2167 `GL_UNSIGNED_INT', `GL_FLOAT', `GL_2_BYTES', `GL_3_BYTES', `GL_4_BYTES'.")
2169 (define-gl-procedures
2170 ((glCallList (list GLuint) -> void))
2171 "Execute a display list.
2174 Specifies the integer name of the display list to be executed.
2176 `glCallList' causes the named display list to be executed. The commands
2177 saved in the display list are executed in order, just as if they were
2178 called without using a display list. If LIST has not been defined as a
2179 display list, `glCallList' is ignored.
2181 `glCallList' can appear inside a display list. To avoid the possibility
2182 of infinite recursion resulting from display lists calling one another,
2183 a limit is placed on the nesting level of display lists during
2184 display-list execution. This limit is at least 64, and it depends on the
2187 GL state is not saved and restored across a call to `glCallList'. Thus,
2188 changes made to GL state during the execution of a display list remain
2189 after execution of the display list is completed. Use `glPushAttrib',
2190 `glPopAttrib', `glPushMatrix', and `glPopMatrix' to preserve GL state
2191 across `glCallList' calls.")
2193 (define-gl-procedures
2201 "Specify clear values for the accumulation buffer.
2210 Specify the red, green, blue, and alpha values used when the
2211 accumulation buffer is cleared. The initial values are all 0.
2213 `glClearAccum' specifies the red, green, blue, and alpha values used by
2214 `glClear' to clear the accumulation buffer.
2216 Values specified by `glClearAccum' are clamped to the range [-1,1] .
2218 `GL_INVALID_OPERATION' is generated if `glClearAccum' is executed
2219 between the execution of `glBegin' and the corresponding execution of
2222 (define-gl-procedures
2230 "Specify clear values for the color buffers.
2239 Specify the red, green, blue, and alpha values used when the color
2240 buffers are cleared. The initial values are all 0.
2242 `glClearColor' specifies the red, green, blue, and alpha values used by
2243 `glClear' to clear the color buffers. Values specified by `glClearColor'
2244 are clamped to the range [0,1] .
2246 `GL_INVALID_OPERATION' is generated if `glClearColor' is executed
2247 between the execution of `glBegin' and the corresponding execution of
2250 (define-gl-procedures
2251 ((glClearDepth (depth GLclampd) -> void))
2252 "Specify the clear value for the depth buffer.
2255 Specifies the depth value used when the depth buffer is cleared.
2256 The initial value is 1.
2258 `glClearDepth' specifies the depth value used by `glClear' to clear the
2259 depth buffer. Values specified by `glClearDepth' are clamped to the
2262 `GL_INVALID_OPERATION' is generated if `glClearDepth' is executed
2263 between the execution of `glBegin' and the corresponding execution of
2266 (define-gl-procedures
2267 ((glClearIndex (c GLfloat) -> void))
2268 "Specify the clear value for the color index buffers.
2271 Specifies the index used when the color index buffers are cleared.
2272 The initial value is 0.
2274 `glClearIndex' specifies the index used by `glClear' to clear the color
2275 index buffers. C is not clamped. Rather, C is converted to a fixed-point
2276 value with unspecified precision to the right of the binary point. The
2277 integer part of this value is then masked with 2^M-1 , where M is the
2278 number of bits in a color index stored in the frame buffer.
2280 `GL_INVALID_OPERATION' is generated if `glClearIndex' is executed
2281 between the execution of `glBegin' and the corresponding execution of
2284 (define-gl-procedures
2285 ((glClearStencil (s GLint) -> void))
2286 "Specify the clear value for the stencil buffer.
2289 Specifies the index used when the stencil buffer is cleared. The
2292 `glClearStencil' specifies the index used by `glClear' to clear the
2293 stencil buffer. S is masked with 2^M-1 , where M is the number of bits
2294 in the stencil buffer.
2296 `GL_INVALID_OPERATION' is generated if `glClearStencil' is executed
2297 between the execution of `glBegin' and the corresponding execution of
2300 (define-gl-procedures
2301 ((glClear (mask GLbitfield) -> void))
2302 "Clear buffers to preset values.
2305 Bitwise OR of masks that indicate the buffers to be cleared. The
2306 four masks are `GL_COLOR_BUFFER_BIT', `GL_DEPTH_BUFFER_BIT',
2307 `GL_ACCUM_BUFFER_BIT', and `GL_STENCIL_BUFFER_BIT'.
2309 `glClear' sets the bitplane area of the window to values previously
2310 selected by `glClearColor', `glClearIndex', `glClearDepth',
2311 `glClearStencil', and `glClearAccum'. Multiple color buffers can be
2312 cleared simultaneously by selecting more than one buffer at a time using
2315 The pixel ownership test, the scissor test, dithering, and the buffer
2316 writemasks affect the operation of `glClear'. The scissor box bounds the
2317 cleared region. Alpha function, blend function, logical operation,
2318 stenciling, texture mapping, and depth-buffering are ignored by
2321 `glClear' takes a single argument that is the bitwise OR of several
2322 values indicating which buffer is to be cleared.
2324 The values are as follows:
2326 `GL_COLOR_BUFFER_BIT'
2327 Indicates the buffers currently enabled for color writing.
2329 `GL_DEPTH_BUFFER_BIT'
2330 Indicates the depth buffer.
2332 `GL_ACCUM_BUFFER_BIT'
2333 Indicates the accumulation buffer.
2335 `GL_STENCIL_BUFFER_BIT'
2336 Indicates the stencil buffer.
2338 The value to which each buffer is cleared depends on the setting of the
2339 clear value for that buffer.
2341 `GL_INVALID_VALUE' is generated if any bit other than the four defined
2342 bits is set in MASK.
2344 `GL_INVALID_OPERATION' is generated if `glClear' is executed between the
2345 execution of `glBegin' and the corresponding execution of `glEnd'.")
2347 (define-gl-procedures
2348 ((glClientActiveTexture (texture GLenum) -> void))
2349 "Select active texture unit.
2352 Specifies which texture unit to make active. The number of texture
2353 units is implementation dependent, but must be at least two.
2354 TEXTURE must be one of `GL_TEXTURE' I , where i ranges from 0 to
2355 the value of `GL_MAX_TEXTURE_COORDS' - 1, which is an
2356 implementation-dependent value. The initial value is `GL_TEXTURE0'.
2358 `glClientActiveTexture' selects the vertex array client state parameters
2359 to be modified by `glTexCoordPointer', and enabled or disabled with
2360 `glEnableClientState' or `glDisableClientState', respectively, when
2361 called with a parameter of `GL_TEXTURE_COORD_ARRAY'.
2363 `GL_INVALID_ENUM' is generated if TEXTURE is not one of `GL_TEXTURE'I ,
2364 where i ranges from 0 to the value of `GL_MAX_TEXTURE_COORDS' - 1.")
2366 (define-gl-procedures
2369 (equation const-GLdouble-*)
2372 "Specify a plane against which all geometry is clipped.
2375 Specifies which clipping plane is being positioned. Symbolic names
2376 of the form `GL_CLIP_PLANE'I, where I is an integer between 0 and
2377 `GL_MAX_CLIP_PLANES' -1 , are accepted.
2380 Specifies the address of an array of four double-precision
2381 floating-point values. These values are interpreted as a plane
2384 Geometry is always clipped against the boundaries of a six-plane frustum
2385 in X, Y, and Z. `glClipPlane' allows the specification of additional
2386 planes, not necessarily perpendicular to the X, Y, or Z axis, against
2387 which all geometry is clipped. To determine the maximum number of
2388 additional clipping planes, call `glGetIntegerv' with argument
2389 `GL_MAX_CLIP_PLANES'. All implementations support at least six such
2390 clipping planes. Because the resulting clipping region is the
2391 intersection of the defined half-spaces, it is always convex.
2393 `glClipPlane' specifies a half-space using a four-component plane
2394 equation. When `glClipPlane' is called, EQUATION is transformed by the
2395 inverse of the modelview matrix and stored in the resulting eye
2396 coordinates. Subsequent changes to the modelview matrix have no effect
2397 on the stored plane-equation components. If the dot product of the eye
2398 coordinates of a vertex with the stored plane equation components is
2399 positive or zero, the vertex is IN with respect to that clipping plane.
2400 Otherwise, it is OUT.
2402 To enable and disable clipping planes, call `glEnable' and `glDisable'
2403 with the argument `GL_CLIP_PLANE'I, where I is the plane number.
2405 All clipping planes are initially defined as (0, 0, 0, 0) in eye
2406 coordinates and are disabled.
2408 `GL_INVALID_ENUM' is generated if PLANE is not an accepted value.
2410 `GL_INVALID_OPERATION' is generated if `glClipPlane' is executed between
2411 the execution of `glBegin' and the corresponding execution of `glEnd'.")
2413 (define-gl-procedures
2421 "Enable and disable writing of frame buffer color components.
2430 Specify whether red, green, blue, and alpha can or cannot be
2431 written into the frame buffer. The initial values are all
2432 `GL_TRUE', indicating that the color components can be written.
2434 `glColorMask' specifies whether the individual color components in the
2435 frame buffer can or cannot be written. If RED is `GL_FALSE', for
2436 example, no change is made to the red component of any pixel in any of
2437 the color buffers, regardless of the drawing operation attempted.
2439 Changes to individual bits of components cannot be controlled. Rather,
2440 changes are either enabled or disabled for entire color components.
2442 `GL_INVALID_OPERATION' is generated if `glColorMask' is executed between
2443 the execution of `glBegin' and the corresponding execution of `glEnd'.")
2445 (define-gl-procedures
2451 "Cause a material color to track the current color.
2454 Specifies whether front, back, or both front and back material
2455 parameters should track the current color. Accepted values are
2456 `GL_FRONT', `GL_BACK', and `GL_FRONT_AND_BACK'. The initial value
2457 is `GL_FRONT_AND_BACK'.
2460 Specifies which of several material parameters track the current
2461 color. Accepted values are `GL_EMISSION', `GL_AMBIENT',
2462 `GL_DIFFUSE', `GL_SPECULAR', and `GL_AMBIENT_AND_DIFFUSE'. The
2463 initial value is `GL_AMBIENT_AND_DIFFUSE'.
2465 `glColorMaterial' specifies which material parameters track the current
2466 color. When `GL_COLOR_MATERIAL' is enabled, the material parameter or
2467 parameters specified by MODE, of the material or materials specified by
2468 FACE, track the current color at all times.
2470 To enable and disable `GL_COLOR_MATERIAL', call `glEnable' and
2471 `glDisable' with argument `GL_COLOR_MATERIAL'. `GL_COLOR_MATERIAL' is
2474 `GL_INVALID_ENUM' is generated if FACE or MODE is not an accepted value.
2476 `GL_INVALID_OPERATION' is generated if `glColorMaterial' is executed
2477 between the execution of `glBegin' and the corresponding execution of
2480 (define-gl-procedures
2485 (pointer const-GLvoid-*)
2488 "Define an array of colors.
2491 Specifies the number of components per color. Must be 3 or 4. The
2495 Specifies the data type of each color component in the array.
2496 Symbolic constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
2497 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', and
2498 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
2501 Specifies the byte offset between consecutive colors. If STRIDE is
2502 0, the colors are understood to be tightly packed in the array. The
2506 Specifies a pointer to the first component of the first color
2507 element in the array. The initial value is 0.
2509 `glColorPointer' specifies the location and data format of an array of
2510 color components to use when rendering. SIZE specifies the number of
2511 components per color, and must be 3 or 4. TYPE specifies the data type
2512 of each color component, and STRIDE specifies the byte stride from one
2513 color to the next, allowing vertices and attributes to be packed into a
2514 single array or stored in separate arrays. (Single-array storage may be
2515 more efficient on some implementations; see `glInterleavedArrays'.)
2517 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
2518 target (see `glBindBuffer') while a color array is specified, POINTER is
2519 treated as a byte offset into the buffer object's data store. Also, the
2520 buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as color
2521 vertex array client-side state (`GL_COLOR_ARRAY_BUFFER_BINDING').
2523 When a color array is specified, SIZE, TYPE, STRIDE, and POINTER are
2524 saved as client-side state, in addition to the current vertex array
2525 buffer object binding.
2527 To enable and disable the color array, call `glEnableClientState' and
2528 `glDisableClientState' with the argument `GL_COLOR_ARRAY'. If enabled,
2529 the color array is used when `glDrawArrays', `glMultiDrawArrays',
2530 `glDrawElements', `glMultiDrawElements', `glDrawRangeElements', or
2531 `glArrayElement' is called.
2533 `GL_INVALID_VALUE' is generated if SIZE is not 3 or 4.
2535 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
2537 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
2539 (define-gl-procedures
2546 (data const-GLvoid-*)
2549 "Respecify a portion of a color table.
2552 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
2553 or `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2556 The starting index of the portion of the color table to be
2560 The number of table entries to replace.
2563 The format of the pixel data in DATA. The allowable values are
2564 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
2565 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
2568 The type of the pixel data in DATA. The allowable values are
2569 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
2570 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
2571 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
2572 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
2573 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
2574 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
2575 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
2576 `GL_UNSIGNED_INT_2_10_10_10_REV'.
2579 Pointer to a one-dimensional array of pixel data that is processed
2580 to replace the specified region of the color table.
2582 `glColorSubTable' is used to respecify a contiguous portion of a color
2583 table previously defined using `glColorTable'. The pixels referenced by
2584 DATA replace the portion of the existing table from indices START to
2585 START+COUNT-1 , inclusive. This region may not include any entries
2586 outside the range of the color table as it was originally specified. It
2587 is not an error to specify a subtexture with width of 0, but such a
2588 specification has no effect.
2590 If a non-zero named buffer object is bound to the
2591 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a portion of
2592 a color table is respecified, DATA is treated as a byte offset into the
2593 buffer object's data store.
2595 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
2598 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
2601 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
2604 `GL_INVALID_VALUE' is generated if START+COUNT>WIDTH .
2606 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2607 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
2608 data store is currently mapped.
2610 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2611 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
2612 unpacked from the buffer object such that the memory reads required
2613 would exceed the data store size.
2615 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2616 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
2617 divisible into the number of bytes needed to store in memory a datum
2620 `GL_INVALID_OPERATION' is generated if `glColorSubTable' is executed
2621 between the execution of `glBegin' and the corresponding execution of
2624 (define-gl-procedures
2625 ((glColorTableParameterfv
2628 (params const-GLfloat-*)
2631 (glColorTableParameteriv
2634 (params const-GLint-*)
2637 "Set color lookup table parameters.
2640 The target color table. Must be `GL_COLOR_TABLE',
2641 `GL_POST_CONVOLUTION_COLOR_TABLE', or
2642 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2645 The symbolic name of a texture color lookup table parameter. Must
2646 be one of `GL_COLOR_TABLE_SCALE' or `GL_COLOR_TABLE_BIAS'.
2649 A pointer to an array where the values of the parameters are
2652 `glColorTableParameter' is used to specify the scale factors and bias
2653 terms applied to color components when they are loaded into a color
2654 table. TARGET indicates which color table the scale and bias terms apply
2655 to; it must be set to `GL_COLOR_TABLE',
2656 `GL_POST_CONVOLUTION_COLOR_TABLE', or
2657 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2659 PNAME must be `GL_COLOR_TABLE_SCALE' to set the scale factors. In this
2660 case, PARAMS points to an array of four values, which are the scale
2661 factors for red, green, blue, and alpha, in that order.
2663 PNAME must be `GL_COLOR_TABLE_BIAS' to set the bias terms. In this case,
2664 PARAMS points to an array of four values, which are the bias terms for
2665 red, green, blue, and alpha, in that order.
2667 The color tables themselves are specified by calling `glColorTable'.
2669 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an acceptable
2672 `GL_INVALID_OPERATION' is generated if `glColorTableParameter' is
2673 executed between the execution of `glBegin' and the corresponding
2674 execution of `glEnd'.")
2676 (define-gl-procedures
2679 (internalformat GLenum)
2683 (data const-GLvoid-*)
2686 "Define a color lookup table.
2689 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
2690 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `GL_PROXY_COLOR_TABLE',
2691 `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
2692 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
2695 The internal format of the color table. The allowable values are
2696 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
2697 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
2698 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
2699 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
2700 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
2701 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
2702 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
2703 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
2704 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
2705 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', and `GL_RGBA16'.
2708 The number of entries in the color lookup table specified by DATA.
2711 The format of the pixel data in DATA. The allowable values are
2712 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
2713 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
2716 The type of the pixel data in DATA. The allowable values are
2717 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
2718 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
2719 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
2720 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
2721 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
2722 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
2723 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
2724 `GL_UNSIGNED_INT_2_10_10_10_REV'.
2727 Pointer to a one-dimensional array of pixel data that is processed
2728 to build the color table.
2730 `glColorTable' may be used in two ways: to test the actual size and
2731 color resolution of a lookup table given a particular set of parameters,
2732 or to load the contents of a color lookup table. Use the targets
2733 `GL_PROXY_*' for the first case and the other targets for the second
2736 If a non-zero named buffer object is bound to the
2737 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a color table
2738 is specified, DATA is treated as a byte offset into the buffer object's
2741 If TARGET is `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
2742 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `glColorTable' builds a color lookup
2743 table from an array of pixels. The pixel array specified by WIDTH,
2744 FORMAT, TYPE, and DATA is extracted from memory and processed just as if
2745 `glDrawPixels' were called, but processing stops after the final
2746 expansion to RGBA is completed.
2748 The four scale parameters and the four bias parameters that are defined
2749 for the table are then used to scale and bias the R, G, B, and A
2750 components of each pixel. (Use `glColorTableParameter' to set these
2751 scale and bias parameters.)
2753 Next, the R, G, B, and A values are clamped to the range [0,1] . Each
2754 pixel is then converted to the internal format specified by
2755 INTERNALFORMAT. This conversion simply maps the component values of the
2756 pixel (R, G, B, and A) to the values included in the internal format
2757 (red, green, blue, alpha, luminance, and intensity). The mapping is as
2763 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
2771 `GL_LUMINANCE_ALPHA'
2783 Finally, the red, green, blue, alpha, luminance, and/or intensity
2784 components of the resulting pixels are stored in the color table. They
2785 form a one-dimensional table with indices in the range [0,WIDTH-1] .
2787 If TARGET is `GL_PROXY_*', `glColorTable' recomputes and stores the
2788 values of the proxy color table's state variables
2789 `GL_COLOR_TABLE_FORMAT', `GL_COLOR_TABLE_WIDTH',
2790 `GL_COLOR_TABLE_RED_SIZE', `GL_COLOR_TABLE_GREEN_SIZE',
2791 `GL_COLOR_TABLE_BLUE_SIZE', `GL_COLOR_TABLE_ALPHA_SIZE',
2792 `GL_COLOR_TABLE_LUMINANCE_SIZE', and `GL_COLOR_TABLE_INTENSITY_SIZE'.
2793 There is no effect on the image or state of any actual color table. If
2794 the specified color table is too large to be supported, then all the
2795 proxy state variables listed above are set to zero. Otherwise, the color
2796 table could be supported by `glColorTable' using the corresponding
2797 non-proxy target, and the proxy state variables are set as if that
2798 target were being defined.
2800 The proxy state variables can be retrieved by calling
2801 `glGetColorTableParameter' with a target of `GL_PROXY_*'. This allows
2802 the application to decide if a particular `glColorTable' command would
2803 succeed, and to determine what the resulting color table attributes
2806 If a color table is enabled, and its width is non-zero, then its
2807 contents are used to replace a subset of the components of each RGBA
2808 pixel group, based on the internal format of the table.
2810 Each pixel group has color components (R, G, B, A) that are in the range
2811 [0.0,1.0] . The color components are rescaled to the size of the color
2812 lookup table to form an index. Then a subset of the components based on
2813 the internal format of the table are replaced by the table entry
2814 selected by that index. If the color components and contents of the
2815 table are represented as follows:
2823 Table index computed from `R'
2826 Table index computed from `G'
2829 Table index computed from `B'
2832 Table index computed from `A'
2835 Luminance value at table index `i'
2838 Intensity value at table index `i'
2841 Red value at table index `i'
2844 Green value at table index `i'
2847 Blue value at table index `i'
2850 Alpha value at table index `i'
2852 then the result of color table lookup is as follows:
2857 *Resulting Texture Components*
2859 *Table Internal Format*
2863 `R', `G', `B', `A[a]'
2866 `L[r]', `L[g]', `L[b]', `At'
2868 `GL_LUMINANCE_ALPHA'
2869 `L[r]', `L[g]', `L[b]', `A[a]'
2872 `I[r]', `I[g]', `I[b]', `I[a]'
2875 `R[r]', `G[g]', `B[b]', `A'
2878 `R[r]', `G[g]', `B[b]', `A[a]'
2880 When `GL_COLOR_TABLE' is enabled, the colors resulting from the pixel
2881 map operation (if it is enabled) are mapped by the color lookup table
2882 before being passed to the convolution operation. The colors resulting
2883 from the convolution operation are modified by the post convolution
2884 color lookup table when `GL_POST_CONVOLUTION_COLOR_TABLE' is enabled.
2885 These modified colors are then sent to the color matrix operation.
2886 Finally, if `GL_POST_COLOR_MATRIX_COLOR_TABLE' is enabled, the colors
2887 resulting from the color matrix operation are mapped by the post color
2888 matrix color lookup table before being used by the histogram operation.
2892 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
2895 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
2898 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
2901 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
2904 `GL_INVALID_VALUE' is generated if WIDTH is less than zero.
2906 `GL_TABLE_TOO_LARGE' is generated if the requested color table is too
2907 large to be supported by the implementation, and TARGET is not a
2908 `GL_PROXY_*' target.
2910 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2911 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
2912 data store is currently mapped.
2914 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2915 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
2916 unpacked from the buffer object such that the memory reads required
2917 would exceed the data store size.
2919 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2920 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
2921 divisible into the number of bytes needed to store in memory a datum
2924 `GL_INVALID_OPERATION' is generated if `glColorTable' is executed
2925 between the execution of `glBegin' and the corresponding execution of
2928 (define-gl-procedures
3033 (glColor3bv (v const-GLbyte-*) -> void)
3034 (glColor3sv (v const-GLshort-*) -> void)
3035 (glColor3iv (v const-GLint-*) -> void)
3036 (glColor3fv (v const-GLfloat-*) -> void)
3037 (glColor3dv (v const-GLdouble-*) -> void)
3038 (glColor3ubv (v const-GLubyte-*) -> void)
3039 (glColor3usv (v const-GLushort-*) -> void)
3040 (glColor3uiv (v const-GLuint-*) -> void)
3041 (glColor4bv (v const-GLbyte-*) -> void)
3042 (glColor4sv (v const-GLshort-*) -> void)
3043 (glColor4iv (v const-GLint-*) -> void)
3044 (glColor4fv (v const-GLfloat-*) -> void)
3045 (glColor4dv (v const-GLdouble-*) -> void)
3046 (glColor4ubv (v const-GLubyte-*) -> void)
3047 (glColor4usv (v const-GLushort-*) -> void)
3048 (glColor4uiv (v const-GLuint-*) -> void))
3049 "Set the current color.
3056 Specify new red, green, and blue values for the current color.
3059 Specifies a new alpha value for the current color. Included only in
3060 the four-argument `glColor4' commands.
3062 The GL stores both a current single-valued color index and a current
3063 four-valued RGBA color. `glColor' sets a new four-valued RGBA color.
3064 `glColor' has two major variants: `glColor3' and `glColor4'. `glColor3'
3065 variants specify new red, green, and blue values explicitly and set the
3066 current alpha value to 1.0 (full intensity) implicitly. `glColor4'
3067 variants specify all four color components explicitly.
3069 `glColor3b', `glColor4b', `glColor3s', `glColor4s', `glColor3i', and
3070 `glColor4i' take three or four signed byte, short, or long integers as
3071 arguments. When *v* is appended to the name, the color commands can take
3072 a pointer to an array of such values.
3074 Current color values are stored in floating-point format, with
3075 unspecified mantissa and exponent sizes. Unsigned integer color
3076 components, when specified, are linearly mapped to floating-point values
3077 such that the largest representable value maps to 1.0 (full intensity),
3078 and 0 maps to 0.0 (zero intensity). Signed integer color components,
3079 when specified, are linearly mapped to floating-point values such that
3080 the most positive representable value maps to 1.0, and the most negative
3081 representable value maps to -1.0 . (Note that this mapping does not
3082 convert 0 precisely to 0.0.) Floating-point values are mapped directly.
3084 Neither floating-point nor signed integer values are clamped to the
3085 range [0,1] before the current color is updated. However, color
3086 components are clamped to this range before they are interpolated or
3087 written into a color buffer.")
3089 (define-gl-procedures
3090 ((glCompileShader (shader GLuint) -> void))
3091 "Compiles a shader object.
3094 Specifies the shader object to be compiled.
3096 `glCompileShader' compiles the source code strings that have been stored
3097 in the shader object specified by SHADER.
3099 The compilation status will be stored as part of the shader object's
3100 state. This value will be set to `GL_TRUE' if the shader was compiled
3101 without errors and is ready for use, and `GL_FALSE' otherwise. It can be
3102 queried by calling `glGetShader' with arguments SHADER and
3103 `GL_COMPILE_STATUS'.
3105 Compilation of a shader can fail for a number of reasons as specified by
3106 the OpenGL Shading Language Specification. Whether or not the
3107 compilation was successful, information about the compilation can be
3108 obtained from the shader object's information log by calling
3109 `glGetShaderInfoLog'.
3111 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
3114 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
3116 `GL_INVALID_OPERATION' is generated if `glCompileShader' is executed
3117 between the execution of `glBegin' and the corresponding execution of
3120 (define-gl-procedures
3121 ((glCompressedTexImage1D
3124 (internalformat GLenum)
3128 (data const-GLvoid-*)
3131 "Specify a one-dimensional texture image in a compressed format.
3134 Specifies the target texture. Must be `GL_TEXTURE_1D' or
3135 `GL_PROXY_TEXTURE_1D'.
3138 Specifies the level-of-detail number. Level 0 is the base image
3139 level. Level N is the Nth mipmap reduction image.
3142 Specifies the format of the compressed image data stored at address
3146 Specifies the width of the texture image including the border if
3147 any. If the GL version does not support non-power-of-two sizes,
3148 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3149 implementations support texture images that are at least 64 texels
3150 wide. The height of the 1D texture image is 1.
3153 Specifies the width of the border. Must be either 0 or 1.
3156 Specifies the number of unsigned bytes of image data starting at
3157 the address specified by DATA.
3160 Specifies a pointer to the compressed image data in memory.
3162 Texturing maps a portion of a specified texture image onto each
3163 graphical primitive for which texturing is enabled. To enable and
3164 disable one-dimensional texturing, call `glEnable' and `glDisable' with
3165 argument `GL_TEXTURE_1D'.
3167 `glCompressedTexImage1D' loads a previously defined, and retrieved,
3168 compressed one-dimensional texture image if TARGET is `GL_TEXTURE_1D'
3169 (see `glTexImage1D').
3171 If TARGET is `GL_PROXY_TEXTURE_1D', no data is read from DATA, but all
3172 of the texture image state is recalculated, checked for consistency, and
3173 checked against the implementation's capabilities. If the implementation
3174 cannot handle a texture of the requested texture size, it sets all of
3175 the image state to 0, but does not generate an error (see `glGetError').
3176 To query for an entire mipmap array, use an image array level greater
3179 INTERNALFORMAT must be extension-specified compressed-texture format.
3180 When a texture is loaded with `glTexImage1D' using a generic compressed
3181 texture format (e.g., `GL_COMPRESSED_RGB') the GL selects from one of
3182 its extensions supporting compressed textures. In order to load the
3183 compressed texture image using `glCompressedTexImage1D', query the
3184 compressed texture image's size and format using
3185 `glGetTexLevelParameter'.
3187 If a non-zero named buffer object is bound to the
3188 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3189 image is specified, DATA is treated as a byte offset into the buffer
3190 object's data store.
3192 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
3193 compressed internal formats: `GL_COMPRESSED_ALPHA',
3194 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3195 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
3197 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3198 format, dimensions, and contents of the specified compressed image data.
3200 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3201 supported by the specific compressed internal format as specified in the
3202 specific texture compression extension.
3204 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3205 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3206 data store is currently mapped.
3208 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3209 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3210 unpacked from the buffer object such that the memory reads required
3211 would exceed the data store size.
3213 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage1D' is
3214 executed between the execution of `glBegin' and the corresponding
3215 execution of `glEnd'.
3217 Undefined results, including abnormal program termination, are generated
3218 if DATA is not encoded in a manner consistent with the extension
3219 specification defining the internal compression format.")
3221 (define-gl-procedures
3222 ((glCompressedTexImage2D
3225 (internalformat GLenum)
3230 (data const-GLvoid-*)
3233 "Specify a two-dimensional texture image in a compressed format.
3236 Specifies the target texture. Must be `GL_TEXTURE_2D',
3237 `GL_PROXY_TEXTURE_2D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
3238 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
3239 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
3240 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
3243 Specifies the level-of-detail number. Level 0 is the base image
3244 level. Level N is the Nth mipmap reduction image.
3247 Specifies the format of the compressed image data stored at address
3251 Specifies the width of the texture image including the border if
3252 any. If the GL version does not support non-power-of-two sizes,
3253 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3254 implementations support 2D texture images that are at least 64
3255 texels wide and cube-mapped texture images that are at least 16
3259 Specifies the height of the texture image including the border if
3260 any. If the GL version does not support non-power-of-two sizes,
3261 this value must be Must be 2^N+2\u2061(BORDER,) for some integer N . All
3262 implementations support 2D texture images that are at least 64
3263 texels high and cube-mapped texture images that are at least 16
3267 Specifies the width of the border. Must be either 0 or 1.
3270 Specifies the number of unsigned bytes of image data starting at
3271 the address specified by DATA.
3274 Specifies a pointer to the compressed image data in memory.
3276 Texturing maps a portion of a specified texture image onto each
3277 graphical primitive for which texturing is enabled. To enable and
3278 disable two-dimensional texturing, call `glEnable' and `glDisable' with
3279 argument `GL_TEXTURE_2D'. To enable and disable texturing using
3280 cube-mapped textures, call `glEnable' and `glDisable' with argument
3281 `GL_TEXTURE_CUBE_MAP'.
3283 `glCompressedTexImage2D' loads a previously defined, and retrieved,
3284 compressed two-dimensional texture image if TARGET is `GL_TEXTURE_2D'
3285 (see `glTexImage2D').
3287 If TARGET is `GL_PROXY_TEXTURE_2D', no data is read from DATA, but all
3288 of the texture image state is recalculated, checked for consistency, and
3289 checked against the implementation's capabilities. If the implementation
3290 cannot handle a texture of the requested texture size, it sets all of
3291 the image state to 0, but does not generate an error (see `glGetError').
3292 To query for an entire mipmap array, use an image array level greater
3295 INTERNALFORMAT must be an extension-specified compressed-texture format.
3296 When a texture is loaded with `glTexImage2D' using a generic compressed
3297 texture format (e.g., `GL_COMPRESSED_RGB'), the GL selects from one of
3298 its extensions supporting compressed textures. In order to load the
3299 compressed texture image using `glCompressedTexImage2D', query the
3300 compressed texture image's size and format using
3301 `glGetTexLevelParameter'.
3303 If a non-zero named buffer object is bound to the
3304 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3305 image is specified, DATA is treated as a byte offset into the buffer
3306 object's data store.
3308 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
3309 compressed internal formats: `GL_COMPRESSED_ALPHA',
3310 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3311 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
3313 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3314 format, dimensions, and contents of the specified compressed image data.
3316 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3317 supported by the specific compressed internal format as specified in the
3318 specific texture compression extension.
3320 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3321 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3322 data store is currently mapped.
3324 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3325 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3326 unpacked from the buffer object such that the memory reads required
3327 would exceed the data store size.
3329 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage2D' is
3330 executed between the execution of `glBegin' and the corresponding
3331 execution of `glEnd'.
3333 Undefined results, including abnormal program termination, are generated
3334 if DATA is not encoded in a manner consistent with the extension
3335 specification defining the internal compression format.")
3337 (define-gl-procedures
3338 ((glCompressedTexImage3D
3341 (internalformat GLenum)
3347 (data const-GLvoid-*)
3350 "Specify a three-dimensional texture image in a compressed format.
3353 Specifies the target texture. Must be `GL_TEXTURE_3D' or
3354 `GL_PROXY_TEXTURE_3D'.
3357 Specifies the level-of-detail number. Level 0 is the base image
3358 level. Level N is the Nth mipmap reduction image.
3361 Specifies the format of the compressed image data stored at address
3365 Specifies the width of the texture image including the border if
3366 any. If the GL version does not support non-power-of-two sizes,
3367 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3368 implementations support 3D texture images that are at least 16
3372 Specifies the height of the texture image including the border if
3373 any. If the GL version does not support non-power-of-two sizes,
3374 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3375 implementations support 3D texture images that are at least 16
3379 Specifies the depth of the texture image including the border if
3380 any. If the GL version does not support non-power-of-two sizes,
3381 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3382 implementations support 3D texture images that are at least 16
3386 Specifies the width of the border. Must be either 0 or 1.
3389 Specifies the number of unsigned bytes of image data starting at
3390 the address specified by DATA.
3393 Specifies a pointer to the compressed image data in memory.
3395 Texturing maps a portion of a specified texture image onto each
3396 graphical primitive for which texturing is enabled. To enable and
3397 disable three-dimensional texturing, call `glEnable' and `glDisable'
3398 with argument `GL_TEXTURE_3D'.
3400 `glCompressedTexImage3D' loads a previously defined, and retrieved,
3401 compressed three-dimensional texture image if TARGET is `GL_TEXTURE_3D'
3402 (see `glTexImage3D').
3404 If TARGET is `GL_PROXY_TEXTURE_3D', no data is read from DATA, but all
3405 of the texture image state is recalculated, checked for consistency, and
3406 checked against the implementation's capabilities. If the implementation
3407 cannot handle a texture of the requested texture size, it sets all of
3408 the image state to 0, but does not generate an error (see `glGetError').
3409 To query for an entire mipmap array, use an image array level greater
3412 INTERNALFORMAT must be an extension-specified compressed-texture format.
3413 When a texture is loaded with `glTexImage2D' using a generic compressed
3414 texture format (e.g., `GL_COMPRESSED_RGB'), the GL selects from one of
3415 its extensions supporting compressed textures. In order to load the
3416 compressed texture image using `glCompressedTexImage3D', query the
3417 compressed texture image's size and format using
3418 `glGetTexLevelParameter'.
3420 If a non-zero named buffer object is bound to the
3421 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3422 image is specified, DATA is treated as a byte offset into the buffer
3423 object's data store.
3425 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
3426 compressed internal formats: `GL_COMPRESSED_ALPHA',
3427 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3428 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
3430 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3431 format, dimensions, and contents of the specified compressed image data.
3433 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3434 supported by the specific compressed internal format as specified in the
3435 specific texture compression extension.
3437 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3438 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3439 data store is currently mapped.
3441 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3442 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3443 unpacked from the buffer object such that the memory reads required
3444 would exceed the data store size.
3446 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage3D' is
3447 executed between the execution of `glBegin' and the corresponding
3448 execution of `glEnd'.
3450 Undefined results, including abnormal program termination, are generated
3451 if DATA is not encoded in a manner consistent with the extension
3452 specification defining the internal compression format.")
3454 (define-gl-procedures
3455 ((glCompressedTexSubImage1D
3462 (data const-GLvoid-*)
3465 "Specify a one-dimensional texture subimage in a compressed format.
3468 Specifies the target texture. Must be `GL_TEXTURE_1D'.
3471 Specifies the level-of-detail number. Level 0 is the base image
3472 level. Level N is the Nth mipmap reduction image.
3475 Specifies a texel offset in the x direction within the texture
3479 Specifies the width of the texture subimage.
3482 Specifies the format of the compressed image data stored at address
3486 Specifies the number of unsigned bytes of image data starting at
3487 the address specified by DATA.
3490 Specifies a pointer to the compressed image data in memory.
3492 Texturing maps a portion of a specified texture image onto each
3493 graphical primitive for which texturing is enabled. To enable and
3494 disable one-dimensional texturing, call `glEnable' and `glDisable' with
3495 argument `GL_TEXTURE_1D'.
3497 `glCompressedTexSubImage1D' redefines a contiguous subregion of an
3498 existing one-dimensional texture image. The texels referenced by DATA
3499 replace the portion of the existing texture array with x indices XOFFSET
3500 and XOFFSET+WIDTH-1 , inclusive. This region may not include any texels
3501 outside the range of the texture array as it was originally specified.
3502 It is not an error to specify a subtexture with width of 0, but such a
3503 specification has no effect.
3505 FORMAT must be an extension-specified compressed-texture format. The
3506 FORMAT of the compressed texture image is selected by the GL
3507 implementation that compressed it (see `glTexImage1D'), and should be
3508 queried at the time the texture was compressed with
3509 `glGetTexLevelParameter'.
3511 If a non-zero named buffer object is bound to the
3512 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3513 image is specified, DATA is treated as a byte offset into the buffer
3514 object's data store.
3516 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3517 compressed internal formats: `GL_COMPRESSED_ALPHA',
3518 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3519 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3520 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3521 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3522 `GL_COMPRESSED_SRGB_ALPHA'.
3524 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3525 format, dimensions, and contents of the specified compressed image data.
3527 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3528 supported by the specific compressed internal format as specified in the
3529 specific texture compression extension.
3531 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3532 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3533 data store is currently mapped.
3535 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3536 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3537 unpacked from the buffer object such that the memory reads required
3538 would exceed the data store size.
3540 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage1D' is
3541 executed between the execution of `glBegin' and the corresponding
3542 execution of `glEnd'.
3544 Undefined results, including abnormal program termination, are generated
3545 if DATA is not encoded in a manner consistent with the extension
3546 specification defining the internal compression format.")
3548 (define-gl-procedures
3549 ((glCompressedTexSubImage2D
3558 (data const-GLvoid-*)
3561 "Specify a two-dimensional texture subimage in a compressed format.
3564 Specifies the target texture. Must be `GL_TEXTURE_2D',
3565 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
3566 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
3567 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
3568 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
3571 Specifies the level-of-detail number. Level 0 is the base image
3572 level. Level N is the Nth mipmap reduction image.
3575 Specifies a texel offset in the x direction within the texture
3579 Specifies a texel offset in the y direction within the texture
3583 Specifies the width of the texture subimage.
3586 Specifies the height of the texture subimage.
3589 Specifies the format of the compressed image data stored at address
3593 Specifies the number of unsigned bytes of image data starting at
3594 the address specified by DATA.
3597 Specifies a pointer to the compressed image data in memory.
3599 Texturing maps a portion of a specified texture image onto each
3600 graphical primitive for which texturing is enabled. To enable and
3601 disable two-dimensional texturing, call `glEnable' and `glDisable' with
3602 argument `GL_TEXTURE_2D'. To enable and disable texturing using
3603 cube-mapped texture, call `glEnable' and `glDisable' with argument
3604 `GL_TEXTURE_CUBE_MAP'.
3606 `glCompressedTexSubImage2D' redefines a contiguous subregion of an
3607 existing two-dimensional texture image. The texels referenced by DATA
3608 replace the portion of the existing texture array with x indices XOFFSET
3609 and XOFFSET+WIDTH-1 , and the y indices YOFFSET and YOFFSET+HEIGHT-1 ,
3610 inclusive. This region may not include any texels outside the range of
3611 the texture array as it was originally specified. It is not an error to
3612 specify a subtexture with width of 0, but such a specification has no
3615 FORMAT must be an extension-specified compressed-texture format. The
3616 FORMAT of the compressed texture image is selected by the GL
3617 implementation that compressed it (see `glTexImage2D') and should be
3618 queried at the time the texture was compressed with
3619 `glGetTexLevelParameter'.
3621 If a non-zero named buffer object is bound to the
3622 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3623 image is specified, DATA is treated as a byte offset into the buffer
3624 object's data store.
3626 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3627 compressed internal formats: `GL_COMPRESSED_ALPHA',
3628 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3629 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3630 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3631 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3632 `GL_COMPRESSED_SRGB_ALPHA'.
3634 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3635 format, dimensions, and contents of the specified compressed image data.
3637 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3638 supported by the specific compressed internal format as specified in the
3639 specific texture compression extension.
3641 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3642 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3643 data store is currently mapped.
3645 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3646 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3647 unpacked from the buffer object such that the memory reads required
3648 would exceed the data store size.
3650 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage2D' is
3651 executed between the execution of `glBegin' and the corresponding
3652 execution of `glEnd'.
3654 Undefined results, including abnormal program termination, are generated
3655 if DATA is not encoded in a manner consistent with the extension
3656 specification defining the internal compression format.")
3658 (define-gl-procedures
3659 ((glCompressedTexSubImage3D
3670 (data const-GLvoid-*)
3673 "Specify a three-dimensional texture subimage in a compressed format.
3676 Specifies the target texture. Must be `GL_TEXTURE_3D'.
3679 Specifies the level-of-detail number. Level 0 is the base image
3680 level. Level N is the Nth mipmap reduction image.
3683 Specifies a texel offset in the x direction within the texture
3687 Specifies a texel offset in the y direction within the texture
3691 Specifies the width of the texture subimage.
3694 Specifies the height of the texture subimage.
3697 Specifies the depth of the texture subimage.
3700 Specifies the format of the compressed image data stored at address
3704 Specifies the number of unsigned bytes of image data starting at
3705 the address specified by DATA.
3708 Specifies a pointer to the compressed image data in memory.
3710 Texturing maps a portion of a specified texture image onto each
3711 graphical primitive for which texturing is enabled. To enable and
3712 disable three-dimensional texturing, call `glEnable' and `glDisable'
3713 with argument `GL_TEXTURE_3D'.
3715 `glCompressedTexSubImage3D' redefines a contiguous subregion of an
3716 existing three-dimensional texture image. The texels referenced by DATA
3717 replace the portion of the existing texture array with x indices XOFFSET
3718 and XOFFSET+WIDTH-1 , and the y indices YOFFSET and YOFFSET+HEIGHT-1 ,
3719 and the z indices ZOFFSET and ZOFFSET+DEPTH-1 , inclusive. This region
3720 may not include any texels outside the range of the texture array as it
3721 was originally specified. It is not an error to specify a subtexture
3722 with width of 0, but such a specification has no effect.
3724 FORMAT must be an extension-specified compressed-texture format. The
3725 FORMAT of the compressed texture image is selected by the GL
3726 implementation that compressed it (see `glTexImage3D') and should be
3727 queried at the time the texture was compressed with
3728 `glGetTexLevelParameter'.
3730 If a non-zero named buffer object is bound to the
3731 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3732 image is specified, DATA is treated as a byte offset into the buffer
3733 object's data store.
3735 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3736 compressed internal formats: `GL_COMPRESSED_ALPHA',
3737 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3738 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3739 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3740 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3741 `GL_COMPRESSED_SRGB_ALPHA'.
3743 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3744 format, dimensions, and contents of the specified compressed image data.
3746 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3747 supported by the specific compressed internal format as specified in the
3748 specific texture compression extension.
3750 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3751 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3752 data store is currently mapped.
3754 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3755 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3756 unpacked from the buffer object such that the memory reads required
3757 would exceed the data store size.
3759 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage3D' is
3760 executed between the execution of `glBegin' and the corresponding
3761 execution of `glEnd'.
3763 Undefined results, including abnormal program termination, are generated
3764 if DATA is not encoded in a manner consistent with the extension
3765 specification defining the internal compression format.")
3767 (define-gl-procedures
3768 ((glConvolutionFilter1D
3770 (internalformat GLenum)
3774 (data const-GLvoid-*)
3777 "Define a one-dimensional convolution filter.
3780 Must be `GL_CONVOLUTION_1D'.
3783 The internal format of the convolution filter kernel. The allowable
3784 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
3785 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
3786 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
3787 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
3788 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
3789 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
3790 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
3791 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
3792 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
3793 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
3794 `GL_RGBA12', or `GL_RGBA16'.
3797 The width of the pixel array referenced by DATA.
3800 The format of the pixel data in DATA. The allowable values are
3801 `GL_ALPHA', `GL_LUMINANCE', `GL_LUMINANCE_ALPHA', `GL_INTENSITY',
3802 `GL_RGB', and `GL_RGBA'.
3805 The type of the pixel data in DATA. Symbolic constants
3806 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
3807 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
3808 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3809 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
3810 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3811 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3812 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3813 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
3817 Pointer to a one-dimensional array of pixel data that is processed
3818 to build the convolution filter kernel.
3820 `glConvolutionFilter1D' builds a one-dimensional convolution filter
3821 kernel from an array of pixels.
3823 The pixel array specified by WIDTH, FORMAT, TYPE, and DATA is extracted
3824 from memory and processed just as if `glDrawPixels' were called, but
3825 processing stops after the final expansion to RGBA is completed.
3827 If a non-zero named buffer object is bound to the
3828 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
3829 filter is specified, DATA is treated as a byte offset into the buffer
3830 object's data store.
3832 The R, G, B, and A components of each pixel are next scaled by the four
3833 1D `GL_CONVOLUTION_FILTER_SCALE' parameters and biased by the four 1D
3834 `GL_CONVOLUTION_FILTER_BIAS' parameters. (The scale and bias parameters
3835 are set by `glConvolutionParameter' using the `GL_CONVOLUTION_1D' target
3836 and the names `GL_CONVOLUTION_FILTER_SCALE' and
3837 `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors of
3838 four values that are applied to red, green, blue, and alpha, in that
3839 order.) The R, G, B, and A values are not clamped to [0,1] at any time
3840 during this process.
3842 Each pixel is then converted to the internal format specified by
3843 INTERNALFORMAT. This conversion simply maps the component values of the
3844 pixel (R, G, B, and A) to the values included in the internal format
3845 (red, green, blue, alpha, luminance, and intensity). The mapping is as
3851 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
3859 `GL_LUMINANCE_ALPHA'
3871 The red, green, blue, alpha, luminance, and/or intensity components of
3872 the resulting pixels are stored in floating-point rather than integer
3873 format. They form a one-dimensional filter kernel image indexed with
3874 coordinate I such that I starts at 0 and increases from left to right.
3875 Kernel location I is derived from the Ith pixel, counting from 0.
3877 Note that after a convolution is performed, the resulting color
3878 components are also scaled by their corresponding
3879 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
3880 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
3881 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
3882 set by `glPixelTransfer'.
3884 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_1D'.
3886 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
3889 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
3892 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
3895 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
3896 than the maximum supported value. This value may be queried with
3897 `glGetConvolutionParameter' using target `GL_CONVOLUTION_1D' and name
3898 `GL_MAX_CONVOLUTION_WIDTH'.
3900 `GL_INVALID_OPERATION' is generated if FORMAT is one of
3901 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3902 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and TYPE is
3905 `GL_INVALID_OPERATION' is generated if FORMAT is one of
3906 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3907 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3908 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3909 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
3910 TYPE is neither `GL_RGBA' nor `GL_BGRA'.
3912 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3913 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3914 data store is currently mapped.
3916 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3917 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3918 unpacked from the buffer object such that the memory reads required
3919 would exceed the data store size.
3921 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3922 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
3923 divisible into the number of bytes needed to store in memory a datum
3926 `GL_INVALID_OPERATION' is generated if `glConvolutionFilter1D' is
3927 executed between the execution of `glBegin' and the corresponding
3928 execution of `glEnd'.")
3930 (define-gl-procedures
3931 ((glConvolutionFilter2D
3933 (internalformat GLenum)
3938 (data const-GLvoid-*)
3941 "Define a two-dimensional convolution filter.
3944 Must be `GL_CONVOLUTION_2D'.
3947 The internal format of the convolution filter kernel. The allowable
3948 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
3949 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
3950 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
3951 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
3952 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
3953 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
3954 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
3955 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
3956 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
3957 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
3958 `GL_RGBA12', or `GL_RGBA16'.
3961 The width of the pixel array referenced by DATA.
3964 The height of the pixel array referenced by DATA.
3967 The format of the pixel data in DATA. The allowable values are
3968 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
3969 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
3972 The type of the pixel data in DATA. Symbolic constants
3973 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
3974 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
3975 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3976 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
3977 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3978 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3979 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3980 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
3984 Pointer to a two-dimensional array of pixel data that is processed
3985 to build the convolution filter kernel.
3987 `glConvolutionFilter2D' builds a two-dimensional convolution filter
3988 kernel from an array of pixels.
3990 The pixel array specified by WIDTH, HEIGHT, FORMAT, TYPE, and DATA is
3991 extracted from memory and processed just as if `glDrawPixels' were
3992 called, but processing stops after the final expansion to RGBA is
3995 If a non-zero named buffer object is bound to the
3996 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
3997 filter is specified, DATA is treated as a byte offset into the buffer
3998 object's data store.
4000 The R, G, B, and A components of each pixel are next scaled by the four
4001 2D `GL_CONVOLUTION_FILTER_SCALE' parameters and biased by the four 2D
4002 `GL_CONVOLUTION_FILTER_BIAS' parameters. (The scale and bias parameters
4003 are set by `glConvolutionParameter' using the `GL_CONVOLUTION_2D' target
4004 and the names `GL_CONVOLUTION_FILTER_SCALE' and
4005 `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors of
4006 four values that are applied to red, green, blue, and alpha, in that
4007 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4008 during this process.
4010 Each pixel is then converted to the internal format specified by
4011 INTERNALFORMAT. This conversion simply maps the component values of the
4012 pixel (R, G, B, and A) to the values included in the internal format
4013 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4019 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4027 `GL_LUMINANCE_ALPHA'
4039 The red, green, blue, alpha, luminance, and/or intensity components of
4040 the resulting pixels are stored in floating-point rather than integer
4041 format. They form a two-dimensional filter kernel image indexed with
4042 coordinates I and J such that I starts at zero and increases from left
4043 to right, and J starts at zero and increases from bottom to top. Kernel
4044 location I,J is derived from the Nth pixel, where N is I+J*WIDTH.
4046 Note that after a convolution is performed, the resulting color
4047 components are also scaled by their corresponding
4048 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4049 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4050 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4051 set by `glPixelTransfer'.
4053 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_2D'.
4055 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4058 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
4061 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
4064 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4065 than the maximum supported value. This value may be queried with
4066 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4067 `GL_MAX_CONVOLUTION_WIDTH'.
4069 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
4070 than the maximum supported value. This value may be queried with
4071 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4072 `GL_MAX_CONVOLUTION_HEIGHT'.
4074 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
4075 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
4076 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
4079 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
4080 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
4081 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
4082 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
4083 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
4084 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
4086 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
4087 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
4088 data store is currently mapped.
4090 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
4091 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
4092 unpacked from the buffer object such that the memory reads required
4093 would exceed the data store size.
4095 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
4096 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
4097 divisible into the number of bytes needed to store in memory a datum
4100 `GL_INVALID_OPERATION' is generated if `glConvolutionFilter2D' is
4101 executed between the execution of `glBegin' and the corresponding
4102 execution of `glEnd'.")
4104 (define-gl-procedures
4105 ((glConvolutionParameterf
4111 (glConvolutionParameteri
4117 (glConvolutionParameterfv
4120 (params const-GLfloat-*)
4123 (glConvolutionParameteriv
4126 (params const-GLint-*)
4129 "Set convolution parameters.
4132 The target for the convolution parameter. Must be one of
4133 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D'.
4136 The parameter to be set. Must be `GL_CONVOLUTION_BORDER_MODE'.
4139 The parameter value. Must be one of `GL_REDUCE',
4140 `GL_CONSTANT_BORDER', `GL_REPLICATE_BORDER'.
4144 `glConvolutionParameter' sets the value of a convolution parameter.
4146 TARGET selects the convolution filter to be affected:
4147 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D' for the
4148 1D, 2D, or separable 2D filter, respectively.
4150 PNAME selects the parameter to be changed. `GL_CONVOLUTION_FILTER_SCALE'
4151 and `GL_CONVOLUTION_FILTER_BIAS' affect the definition of the
4152 convolution filter kernel; see `glConvolutionFilter1D',
4153 `glConvolutionFilter2D', and `glSeparableFilter2D' for details. In these
4154 cases, PARAMSv is an array of four values to be applied to red, green,
4155 blue, and alpha values, respectively. The initial value for
4156 `GL_CONVOLUTION_FILTER_SCALE' is (1, 1, 1, 1), and the initial value for
4157 `GL_CONVOLUTION_FILTER_BIAS' is (0, 0, 0, 0).
4159 A PNAME value of `GL_CONVOLUTION_BORDER_MODE' controls the convolution
4160 border mode. The accepted modes are:
4163 The image resulting from convolution is smaller than the source
4164 image. If the filter width is WF and height is HF , and the source
4165 image width is WS and height is HS , then the convolved image width
4166 will be WS-WF+1 and height will be HS-HF+1 . (If this reduction
4167 would generate an image with zero or negative width and/or height,
4168 the output is simply null, with no error generated.) The
4169 coordinates of the image resulting from convolution are zero
4170 through WS-WF in width and zero through HS-HF in height.
4172 `GL_CONSTANT_BORDER'
4173 The image resulting from convolution is the same size as the source
4174 image, and processed as if the source image were surrounded by
4175 pixels with their color specified by the
4176 `GL_CONVOLUTION_BORDER_COLOR'.
4178 `GL_REPLICATE_BORDER'
4179 The image resulting from convolution is the same size as the source
4180 image, and processed as if the outermost pixel on the border of the
4181 source image were replicated.
4183 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
4186 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
4189 `GL_INVALID_ENUM' is generated if PNAME is `GL_CONVOLUTION_BORDER_MODE'
4190 and PARAMS is not one of `GL_REDUCE', `GL_CONSTANT_BORDER', or
4191 `GL_REPLICATE_BORDER'.
4193 `GL_INVALID_OPERATION' is generated if `glConvolutionParameter' is
4194 executed between the execution of `glBegin' and the corresponding
4195 execution of `glEnd'.")
4197 (define-gl-procedures
4198 ((glCopyColorSubTable
4206 "Respecify a portion of a color table.
4209 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
4210 or `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
4213 The starting index of the portion of the color table to be
4219 The window coordinates of the left corner of the row of pixels to
4223 The number of table entries to replace.
4225 `glCopyColorSubTable' is used to respecify a contiguous portion of a
4226 color table previously defined using `glColorTable'. The pixels copied
4227 from the framebuffer replace the portion of the existing table from
4228 indices START to START+X-1 , inclusive. This region may not include any
4229 entries outside the range of the color table, as was originally
4230 specified. It is not an error to specify a subtexture with width of 0,
4231 but such a specification has no effect.
4233 `GL_INVALID_VALUE' is generated if TARGET is not a previously defined
4236 `GL_INVALID_VALUE' is generated if TARGET is not one of the allowable
4239 `GL_INVALID_VALUE' is generated if START+X>WIDTH .
4241 `GL_INVALID_OPERATION' is generated if `glCopyColorSubTable' is executed
4242 between the execution of `glBegin' and the corresponding execution of
4245 (define-gl-procedures
4248 (internalformat GLenum)
4254 "Copy pixels into a color table.
4257 The color table target. Must be `GL_COLOR_TABLE',
4258 `GL_POST_CONVOLUTION_COLOR_TABLE', or
4259 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
4262 The internal storage format of the texture image. Must be one of
4263 the following symbolic constants: `GL_ALPHA', `GL_ALPHA4',
4264 `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE',
4265 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4266 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4267 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4268 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4269 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4270 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
4271 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
4272 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
4273 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
4276 The x coordinate of the lower-left corner of the pixel rectangle to
4277 be transferred to the color table.
4280 The y coordinate of the lower-left corner of the pixel rectangle to
4281 be transferred to the color table.
4284 The width of the pixel rectangle.
4286 `glCopyColorTable' loads a color table with pixels from the current
4287 `GL_READ_BUFFER' (rather than from main memory, as is the case for
4290 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y)
4291 having width WIDTH and height 1 is loaded into the color table. If any
4292 pixels within this region are outside the window that is associated with
4293 the GL context, the values obtained for those pixels are undefined.
4295 The pixels in the rectangle are processed just as if `glReadPixels' were
4296 called, with INTERNALFORMAT set to RGBA, but processing stops after the
4297 final conversion to RGBA.
4299 The four scale parameters and the four bias parameters that are defined
4300 for the table are then used to scale and bias the R, G, B, and A
4301 components of each pixel. The scale and bias parameters are set by
4302 calling `glColorTableParameter'.
4304 Next, the R, G, B, and A values are clamped to the range [0,1] . Each
4305 pixel is then converted to the internal format specified by
4306 INTERNALFORMAT. This conversion simply maps the component values of the
4307 pixel (R, G, B, and A) to the values included in the internal format
4308 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4314 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4322 `GL_LUMINANCE_ALPHA'
4334 Finally, the red, green, blue, alpha, luminance, and/or intensity
4335 components of the resulting pixels are stored in the color table. They
4336 form a one-dimensional table with indices in the range [0,WIDTH-1] .
4340 `GL_INVALID_ENUM' is generated when TARGET is not one of the allowable
4343 `GL_INVALID_VALUE' is generated if WIDTH is less than zero.
4345 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not one of the
4348 `GL_TABLE_TOO_LARGE' is generated if the requested color table is too
4349 large to be supported by the implementation.
4351 `GL_INVALID_OPERATION' is generated if `glCopyColorTable' is executed
4352 between the execution of `glBegin' and the corresponding execution of
4355 (define-gl-procedures
4356 ((glCopyConvolutionFilter1D
4358 (internalformat GLenum)
4364 "Copy pixels into a one-dimensional convolution filter.
4367 Must be `GL_CONVOLUTION_1D'.
4370 The internal format of the convolution filter kernel. The allowable
4371 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
4372 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
4373 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
4374 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
4375 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
4376 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
4377 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
4378 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
4379 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
4380 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
4381 `GL_RGBA12', or `GL_RGBA16'.
4386 The window space coordinates of the lower-left coordinate of the
4387 pixel array to copy.
4390 The width of the pixel array to copy.
4392 `glCopyConvolutionFilter1D' defines a one-dimensional convolution filter
4393 kernel with pixels from the current `GL_READ_BUFFER' (rather than from
4394 main memory, as is the case for `glConvolutionFilter1D').
4396 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y),
4397 width WIDTH and height 1 is used to define the convolution filter. If
4398 any pixels within this region are outside the window that is associated
4399 with the GL context, the values obtained for those pixels are undefined.
4401 The pixels in the rectangle are processed exactly as if `glReadPixels'
4402 had been called with FORMAT set to RGBA, but the process stops just
4403 before final conversion. The R, G, B, and A components of each pixel are
4404 next scaled by the four 1D `GL_CONVOLUTION_FILTER_SCALE' parameters and
4405 biased by the four 1D `GL_CONVOLUTION_FILTER_BIAS' parameters. (The
4406 scale and bias parameters are set by `glConvolutionParameter' using the
4407 `GL_CONVOLUTION_1D' target and the names `GL_CONVOLUTION_FILTER_SCALE'
4408 and `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors
4409 of four values that are applied to red, green, blue, and alpha, in that
4410 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4411 during this process.
4413 Each pixel is then converted to the internal format specified by
4414 INTERNALFORMAT. This conversion simply maps the component values of the
4415 pixel (R, G, B, and A) to the values included in the internal format
4416 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4422 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4430 `GL_LUMINANCE_ALPHA'
4442 The red, green, blue, alpha, luminance, and/or intensity components of
4443 the resulting pixels are stored in floating-point rather than integer
4446 Pixel ordering is such that lower x screen coordinates correspond to
4447 lower I filter image coordinates.
4449 Note that after a convolution is performed, the resulting color
4450 components are also scaled by their corresponding
4451 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4452 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4453 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4454 set by `glPixelTransfer'.
4456 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_1D'.
4458 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4461 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4462 than the maximum supported value. This value may be queried with
4463 `glGetConvolutionParameter' using target `GL_CONVOLUTION_1D' and name
4464 `GL_MAX_CONVOLUTION_WIDTH'.
4466 `GL_INVALID_OPERATION' is generated if `glCopyConvolutionFilter1D' is
4467 executed between the execution of `glBegin' and the corresponding
4468 execution of `glEnd'.")
4470 (define-gl-procedures
4471 ((glCopyConvolutionFilter2D
4473 (internalformat GLenum)
4480 "Copy pixels into a two-dimensional convolution filter.
4483 Must be `GL_CONVOLUTION_2D'.
4486 The internal format of the convolution filter kernel. The allowable
4487 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
4488 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
4489 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
4490 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
4491 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
4492 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
4493 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
4494 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
4495 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
4496 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
4497 `GL_RGBA12', or `GL_RGBA16'.
4502 The window space coordinates of the lower-left coordinate of the
4503 pixel array to copy.
4506 The width of the pixel array to copy.
4509 The height of the pixel array to copy.
4511 `glCopyConvolutionFilter2D' defines a two-dimensional convolution filter
4512 kernel with pixels from the current `GL_READ_BUFFER' (rather than from
4513 main memory, as is the case for `glConvolutionFilter2D').
4515 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y),
4516 width WIDTH and height HEIGHT is used to define the convolution filter.
4517 If any pixels within this region are outside the window that is
4518 associated with the GL context, the values obtained for those pixels are
4521 The pixels in the rectangle are processed exactly as if `glReadPixels'
4522 had been called with FORMAT set to RGBA, but the process stops just
4523 before final conversion. The R, G, B, and A components of each pixel are
4524 next scaled by the four 2D `GL_CONVOLUTION_FILTER_SCALE' parameters and
4525 biased by the four 2D `GL_CONVOLUTION_FILTER_BIAS' parameters. (The
4526 scale and bias parameters are set by `glConvolutionParameter' using the
4527 `GL_CONVOLUTION_2D' target and the names `GL_CONVOLUTION_FILTER_SCALE'
4528 and `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors
4529 of four values that are applied to red, green, blue, and alpha, in that
4530 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4531 during this process.
4533 Each pixel is then converted to the internal format specified by
4534 INTERNALFORMAT. This conversion simply maps the component values of the
4535 pixel (R, G, B, and A) to the values included in the internal format
4536 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4542 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4550 `GL_LUMINANCE_ALPHA'
4562 The red, green, blue, alpha, luminance, and/or intensity components of
4563 the resulting pixels are stored in floating-point rather than integer
4566 Pixel ordering is such that lower x screen coordinates correspond to
4567 lower I filter image coordinates, and lower y screen coordinates
4568 correspond to lower J filter image coordinates.
4570 Note that after a convolution is performed, the resulting color
4571 components are also scaled by their corresponding
4572 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4573 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4574 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4575 set by `glPixelTransfer'.
4577 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_2D'.
4579 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4582 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4583 than the maximum supported value. This value may be queried with
4584 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4585 `GL_MAX_CONVOLUTION_WIDTH'.
4587 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
4588 than the maximum supported value. This value may be queried with
4589 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4590 `GL_MAX_CONVOLUTION_HEIGHT'.
4592 `GL_INVALID_OPERATION' is generated if `glCopyConvolutionFilter2D' is
4593 executed between the execution of `glBegin' and the corresponding
4594 execution of `glEnd'.")
4596 (define-gl-procedures
4605 "Copy pixels in the frame buffer.
4610 Specify the window coordinates of the lower left corner of the
4611 rectangular region of pixels to be copied.
4616 Specify the dimensions of the rectangular region of pixels to be
4617 copied. Both must be nonnegative.
4620 Specifies whether color values, depth values, or stencil values are
4621 to be copied. Symbolic constants `GL_COLOR', `GL_DEPTH', and
4622 `GL_STENCIL' are accepted.
4624 `glCopyPixels' copies a screen-aligned rectangle of pixels from the
4625 specified frame buffer location to a region relative to the current
4626 raster position. Its operation is well defined only if the entire pixel
4627 source region is within the exposed portion of the window. Results of
4628 copies from outside the window, or from regions of the window that are
4629 not exposed, are hardware dependent and undefined.
4631 X and Y specify the window coordinates of the lower left corner of the
4632 rectangular region to be copied. WIDTH and HEIGHT specify the dimensions
4633 of the rectangular region to be copied. Both WIDTH and HEIGHT must not
4636 Several parameters control the processing of the pixel data while it is
4637 being copied. These parameters are set with three commands:
4638 `glPixelTransfer', `glPixelMap', and `glPixelZoom'. This reference page
4639 describes the effects on `glCopyPixels' of most, but not all, of the
4640 parameters specified by these three commands.
4642 `glCopyPixels' copies values from each pixel with the lower left-hand
4643 corner at (X+I,Y+J) for 0<=I<WIDTH and 0<=J<HEIGHT . This pixel is said
4644 to be the I th pixel in the J th row. Pixels are copied in row order
4645 from the lowest to the highest row, left to right in each row.
4647 TYPE specifies whether color, depth, or stencil data is to be copied.
4648 The details of the transfer for each data type are as follows:
4651 Indices or RGBA colors are read from the buffer currently specified
4652 as the read source buffer (see `glReadBuffer'). If the GL is in
4653 color index mode, each index that is read from this buffer is
4654 converted to a fixed-point format with an unspecified number of
4655 bits to the right of the binary point. Each index is then shifted
4656 left by `GL_INDEX_SHIFT' bits, and added to `GL_INDEX_OFFSET'. If
4657 `GL_INDEX_SHIFT' is negative, the shift is to the right. In either
4658 case, zero bits fill otherwise unspecified bit locations in the
4659 result. If `GL_MAP_COLOR' is true, the index is replaced with the
4660 value that it references in lookup table `GL_PIXEL_MAP_I_TO_I'.
4661 Whether the lookup replacement of the index is done or not, the
4662 integer part of the index is then ANDed with 2^B-1 , where B is the
4663 number of bits in a color index buffer.
4665 If the GL is in RGBA mode, the red, green, blue, and alpha
4666 components of each pixel that is read are converted to an internal
4667 floating-point format with unspecified precision. The conversion
4668 maps the largest representable component value to 1.0, and
4669 component value 0 to 0.0. The resulting floating-point color values
4670 are then multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where
4671 C is RED, GREEN, BLUE, and ALPHA for the respective color
4672 components. The results are clamped to the range [0,1]. If
4673 `GL_MAP_COLOR' is true, each color component is scaled by the size
4674 of lookup table `GL_PIXEL_MAP_c_TO_c', then replaced by the value
4675 that it references in that table. C is R, G, B, or A.
4677 If the `ARB_imaging' extension is supported, the color values may
4678 be additionally processed by color-table lookups, color-matrix
4679 transformations, and convolution filters.
4681 The GL then converts the resulting indices or RGBA colors to
4682 fragments by attaching the current raster position Z coordinate and
4683 texture coordinates to each pixel, then assigning window
4684 coordinates (X_R+I,Y_R+J) , where (X_R,Y_R) is the current raster
4685 position, and the pixel was the I th pixel in the J th row. These
4686 pixel fragments are then treated just like the fragments generated
4687 by rasterizing points, lines, or polygons. Texture mapping, fog,
4688 and all the fragment operations are applied before the fragments
4689 are written to the frame buffer.
4692 Depth values are read from the depth buffer and converted directly
4693 to an internal floating-point format with unspecified precision.
4694 The resulting floating-point depth value is then multiplied by
4695 `GL_DEPTH_SCALE' and added to `GL_DEPTH_BIAS'. The result is
4696 clamped to the range [0,1].
4698 The GL then converts the resulting depth components to fragments by
4699 attaching the current raster position color or color index and
4700 texture coordinates to each pixel, then assigning window
4701 coordinates (X_R+I,Y_R+J) , where (X_R,Y_R) is the current raster
4702 position, and the pixel was the I th pixel in the J th row. These
4703 pixel fragments are then treated just like the fragments generated
4704 by rasterizing points, lines, or polygons. Texture mapping, fog,
4705 and all the fragment operations are applied before the fragments
4706 are written to the frame buffer.
4709 Stencil indices are read from the stencil buffer and converted to
4710 an internal fixed-point format with an unspecified number of bits
4711 to the right of the binary point. Each fixed-point index is then
4712 shifted left by `GL_INDEX_SHIFT' bits, and added to
4713 `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is negative, the shift is to
4714 the right. In either case, zero bits fill otherwise unspecified bit
4715 locations in the result. If `GL_MAP_STENCIL' is true, the index is
4716 replaced with the value that it references in lookup table
4717 `GL_PIXEL_MAP_S_TO_S'. Whether the lookup replacement of the index
4718 is done or not, the integer part of the index is then ANDed with
4719 2^B-1 , where B is the number of bits in the stencil buffer. The
4720 resulting stencil indices are then written to the stencil buffer
4721 such that the index read from the I th location of the J th row is
4722 written to location (X_R+I,Y_R+J) , where (X_R,Y_R) is the current
4723 raster position. Only the pixel ownership test, the scissor test,
4724 and the stencil writemask affect these write operations.
4726 The rasterization described thus far assumes pixel zoom factors of 1.0.
4727 If `glPixelZoom' is used to change the X and Y pixel zoom factors,
4728 pixels are converted to fragments as follows. If (X_R,Y_R) is the
4729 current raster position, and a given pixel is in the I th location in
4730 the J th row of the source pixel rectangle, then fragments are generated
4731 for pixels whose centers are in the rectangle with corners at
4733 (X_R+ZOOM_X,\u2062I,Y_R+ZOOM_Y,\u2062J)
4737 (X_R+ZOOM_X,\u2061(I+1,),Y_R+ZOOM_Y,\u2061(J+1,))
4739 where ZOOM_X is the value of `GL_ZOOM_X' and ZOOM_Y is the value of
4742 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
4744 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
4746 `GL_INVALID_OPERATION' is generated if TYPE is `GL_DEPTH' and there is
4749 `GL_INVALID_OPERATION' is generated if TYPE is `GL_STENCIL' and there is
4752 `GL_INVALID_OPERATION' is generated if `glCopyPixels' is executed
4753 between the execution of `glBegin' and the corresponding execution of
4756 (define-gl-procedures
4760 (internalformat GLenum)
4767 "Copy pixels into a 1D texture image.
4770 Specifies the target texture. Must be `GL_TEXTURE_1D'.
4773 Specifies the level-of-detail number. Level 0 is the base image
4774 level. Level N is the Nth mipmap reduction image.
4777 Specifies the internal format of the texture. Must be one of the
4778 following symbolic constants: `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4779 `GL_ALPHA12', `GL_ALPHA16', `GL_COMPRESSED_ALPHA',
4780 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
4781 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB',
4782 `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
4783 `GL_DEPTH_COMPONENT24', `GL_DEPTH_COMPONENT32', `GL_LUMINANCE',
4784 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4785 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4786 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4787 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4788 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4789 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_RGB',
4790 `GL_R3_G3_B2', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10',
4791 `GL_RGB12', `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4',
4792 `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
4793 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
4794 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
4800 Specify the window coordinates of the left corner of the row of
4801 pixels to be copied.
4804 Specifies the width of the texture image. Must be 0 or
4805 2^N+2\u2061(BORDER,) for some integer N . The height of the texture
4809 Specifies the width of the border. Must be either 0 or 1.
4811 `glCopyTexImage1D' defines a one-dimensional texture image with pixels
4812 from the current `GL_READ_BUFFER'.
4814 The screen-aligned pixel row with left corner at (X,Y) and with a length
4815 of WIDTH+2\u2061(BORDER,) defines the texture array at the mipmap level
4816 specified by LEVEL. INTERNALFORMAT specifies the internal format of the
4819 The pixels in the row are processed exactly as if `glCopyPixels' had
4820 been called, but the process stops just before final conversion. At this
4821 point all pixel component values are clamped to the range [0,1] and then
4822 converted to the texture's internal format for storage in the texel
4825 Pixel ordering is such that lower X screen coordinates correspond to
4826 lower texture coordinates.
4828 If any of the pixels within the specified row of the current
4829 `GL_READ_BUFFER' are outside the window associated with the current
4830 rendering context, then the values obtained for those pixels are
4833 `glCopyTexImage1D' defines a one-dimensional texture image with pixels
4834 from the current `GL_READ_BUFFER'.
4836 When INTERNALFORMAT is one of the sRGB types, the GL does not
4837 automatically convert the source pixels to the sRGB color space. In this
4838 case, the `glPixelMap' function can be used to accomplish the
4841 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
4844 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4846 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2\u2062MAX ,
4847 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
4849 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not an allowable
4852 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
4853 2 + `GL_MAX_TEXTURE_SIZE'.
4855 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
4856 supported and the WIDTH cannot be represented as 2^N+2\u2061(BORDER,) for
4857 some integer value of N.
4859 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
4861 `GL_INVALID_OPERATION' is generated if `glCopyTexImage1D' is executed
4862 between the execution of `glBegin' and the corresponding execution of
4865 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
4866 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
4867 `GL_DEPTH_COMPONENT32' and there is no depth buffer.")
4869 (define-gl-procedures
4873 (internalformat GLenum)
4881 "Copy pixels into a 2D texture image.
4884 Specifies the target texture. Must be `GL_TEXTURE_2D',
4885 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4886 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4887 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
4888 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4891 Specifies the level-of-detail number. Level 0 is the base image
4892 level. Level N is the Nth mipmap reduction image.
4895 Specifies the internal format of the texture. Must be one of the
4896 following symbolic constants: `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4897 `GL_ALPHA12', `GL_ALPHA16', `GL_COMPRESSED_ALPHA',
4898 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
4899 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB',
4900 `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
4901 `GL_DEPTH_COMPONENT24', `GL_DEPTH_COMPONENT32', `GL_LUMINANCE',
4902 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4903 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4904 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4905 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4906 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4907 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_RGB',
4908 `GL_R3_G3_B2', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10',
4909 `GL_RGB12', `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4',
4910 `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
4911 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
4912 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
4918 Specify the window coordinates of the lower left corner of the
4919 rectangular region of pixels to be copied.
4922 Specifies the width of the texture image. Must be 0 or
4923 2^N+2\u2061(BORDER,) for some integer N .
4926 Specifies the height of the texture image. Must be 0 or
4927 2^M+2\u2061(BORDER,) for some integer M .
4930 Specifies the width of the border. Must be either 0 or 1.
4932 `glCopyTexImage2D' defines a two-dimensional texture image, or cube-map
4933 texture image with pixels from the current `GL_READ_BUFFER'.
4935 The screen-aligned pixel rectangle with lower left corner at (X, Y) and
4936 with a width of WIDTH+2\u2061(BORDER,) and a height of HEIGHT+2\u2061(BORDER,)
4937 defines the texture array at the mipmap level specified by LEVEL.
4938 INTERNALFORMAT specifies the internal format of the texture array.
4940 The pixels in the rectangle are processed exactly as if `glCopyPixels'
4941 had been called, but the process stops just before final conversion. At
4942 this point all pixel component values are clamped to the range [0,1] and
4943 then converted to the texture's internal format for storage in the texel
4946 Pixel ordering is such that lower X and Y screen coordinates correspond
4947 to lower S and T texture coordinates.
4949 If any of the pixels within the specified rectangle of the current
4950 `GL_READ_BUFFER' are outside the window associated with the current
4951 rendering context, then the values obtained for those pixels are
4954 When INTERNALFORMAT is one of the sRGB types, the GL does not
4955 automatically convert the source pixels to the sRGB color space. In this
4956 case, the `glPixelMap' function can be used to accomplish the
4959 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
4960 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4961 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4962 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4964 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4966 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2\u2062MAX ,
4967 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
4969 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
4970 2 + `GL_MAX_TEXTURE_SIZE'.
4972 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
4973 supported and the WIDTH or DEPTH cannot be represented as
4974 2^K+2\u2061(BORDER,) for some integer K .
4976 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
4978 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not an accepted
4981 `GL_INVALID_OPERATION' is generated if `glCopyTexImage2D' is executed
4982 between the execution of `glBegin' and the corresponding execution of
4985 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
4986 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
4987 `GL_DEPTH_COMPONENT32' and there is no depth buffer.")
4989 (define-gl-procedures
4990 ((glCopyTexSubImage1D
4999 "Copy a one-dimensional texture subimage.
5002 Specifies the target texture. Must be `GL_TEXTURE_1D'.
5005 Specifies the level-of-detail number. Level 0 is the base image
5006 level. Level N is the Nth mipmap reduction image.
5009 Specifies the texel offset within the texture array.
5014 Specify the window coordinates of the left corner of the row of
5015 pixels to be copied.
5018 Specifies the width of the texture subimage.
5020 `glCopyTexSubImage1D' replaces a portion of a one-dimensional texture
5021 image with pixels from the current `GL_READ_BUFFER' (rather than from
5022 main memory, as is the case for `glTexSubImage1D').
5024 The screen-aligned pixel row with left corner at (X,\\ Y), and with
5025 length WIDTH replaces the portion of the texture array with x indices
5026 XOFFSET through XOFFSET+WIDTH-1 , inclusive. The destination in the
5027 texture array may not include any texels outside the texture array as it
5028 was originally specified.
5030 The pixels in the row are processed exactly as if `glCopyPixels' had
5031 been called, but the process stops just before final conversion. At this
5032 point, all pixel component values are clamped to the range [0,1] and
5033 then converted to the texture's internal format for storage in the texel
5036 It is not an error to specify a subtexture with zero width, but such a
5037 specification has no effect. If any of the pixels within the specified
5038 row of the current `GL_READ_BUFFER' are outside the read window
5039 associated with the current rendering context, then the values obtained
5040 for those pixels are undefined.
5042 No change is made to the INTERNALFORMAT, WIDTH, or BORDER parameters of
5043 the specified texture array or to texel values outside the specified
5046 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_1D'.
5048 `GL_INVALID_OPERATION' is generated if the texture array has not been
5049 defined by a previous `glTexImage1D' or `glCopyTexImage1D' operation.
5051 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
5053 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
5054 the returned value of `GL_MAX_TEXTURE_SIZE'.
5056 `GL_INVALID_VALUE' is generated if XOFFSET<-B , or
5057 (XOFFSET+WIDTH,)>(W-B,) , where W is the `GL_TEXTURE_WIDTH' and B is the
5058 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W
5059 includes twice the border width.")
5061 (define-gl-procedures
5062 ((glCopyTexSubImage2D
5073 "Copy a two-dimensional texture subimage.
5076 Specifies the target texture. Must be `GL_TEXTURE_2D',
5077 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
5078 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
5079 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
5080 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
5083 Specifies the level-of-detail number. Level 0 is the base image
5084 level. Level N is the Nth mipmap reduction image.
5087 Specifies a texel offset in the x direction within the texture
5091 Specifies a texel offset in the y direction within the texture
5097 Specify the window coordinates of the lower left corner of the
5098 rectangular region of pixels to be copied.
5101 Specifies the width of the texture subimage.
5104 Specifies the height of the texture subimage.
5106 `glCopyTexSubImage2D' replaces a rectangular portion of a
5107 two-dimensional texture image or cube-map texture image with pixels from
5108 the current `GL_READ_BUFFER' (rather than from main memory, as is the
5109 case for `glTexSubImage2D').
5111 The screen-aligned pixel rectangle with lower left corner at (X,Y) and
5112 with width WIDTH and height HEIGHT replaces the portion of the texture
5113 array with x indices XOFFSET through XOFFSET+WIDTH-1 , inclusive, and y
5114 indices YOFFSET through YOFFSET+HEIGHT-1 , inclusive, at the mipmap
5115 level specified by LEVEL.
5117 The pixels in the rectangle are processed exactly as if `glCopyPixels'
5118 had been called, but the process stops just before final conversion. At
5119 this point, all pixel component values are clamped to the range [0,1]
5120 and then converted to the texture's internal format for storage in the
5123 The destination rectangle in the texture array may not include any
5124 texels outside the texture array as it was originally specified. It is
5125 not an error to specify a subtexture with zero width or height, but such
5126 a specification has no effect.
5128 If any of the pixels within the specified rectangle of the current
5129 `GL_READ_BUFFER' are outside the read window associated with the current
5130 rendering context, then the values obtained for those pixels are
5133 No change is made to the INTERNALFORMAT, WIDTH, HEIGHT, or BORDER
5134 parameters of the specified texture array or to texel values outside the
5135 specified subregion.
5137 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
5138 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
5139 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
5140 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
5142 `GL_INVALID_OPERATION' is generated if the texture array has not been
5143 defined by a previous `glTexImage2D' or `glCopyTexImage2D' operation.
5145 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
5147 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
5148 the returned value of `GL_MAX_TEXTURE_SIZE'.
5150 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
5151 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , where W is the
5152 `GL_TEXTURE_WIDTH', H is the `GL_TEXTURE_HEIGHT', and B is the
5153 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W and
5154 H include twice the border width.
5156 `GL_INVALID_OPERATION' is generated if `glCopyTexSubImage2D' is executed
5157 between the execution of `glBegin' and the corresponding execution of
5160 (define-gl-procedures
5161 ((glCopyTexSubImage3D
5173 "Copy a three-dimensional texture subimage.
5176 Specifies the target texture. Must be `GL_TEXTURE_3D'
5179 Specifies the level-of-detail number. Level 0 is the base image
5180 level. Level N is the Nth mipmap reduction image.
5183 Specifies a texel offset in the x direction within the texture
5187 Specifies a texel offset in the y direction within the texture
5191 Specifies a texel offset in the z direction within the texture
5197 Specify the window coordinates of the lower left corner of the
5198 rectangular region of pixels to be copied.
5201 Specifies the width of the texture subimage.
5204 Specifies the height of the texture subimage.
5206 `glCopyTexSubImage3D' replaces a rectangular portion of a
5207 three-dimensional texture image with pixels from the current
5208 `GL_READ_BUFFER' (rather than from main memory, as is the case for
5211 The screen-aligned pixel rectangle with lower left corner at (X,\\ Y) and
5212 with width WIDTH and height HEIGHT replaces the portion of the texture
5213 array with x indices XOFFSET through XOFFSET+WIDTH-1 , inclusive, and y
5214 indices YOFFSET through YOFFSET+HEIGHT-1 , inclusive, at z index ZOFFSET
5215 and at the mipmap level specified by LEVEL.
5217 The pixels in the rectangle are processed exactly as if `glCopyPixels'
5218 had been called, but the process stops just before final conversion. At
5219 this point, all pixel component values are clamped to the range [0,1]
5220 and then converted to the texture's internal format for storage in the
5223 The destination rectangle in the texture array may not include any
5224 texels outside the texture array as it was originally specified. It is
5225 not an error to specify a subtexture with zero width or height, but such
5226 a specification has no effect.
5228 If any of the pixels within the specified rectangle of the current
5229 `GL_READ_BUFFER' are outside the read window associated with the current
5230 rendering context, then the values obtained for those pixels are
5233 No change is made to the INTERNALFORMAT, WIDTH, HEIGHT, DEPTH, or BORDER
5234 parameters of the specified texture array or to texel values outside the
5235 specified subregion.
5237 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_3D'.
5239 `GL_INVALID_OPERATION' is generated if the texture array has not been
5240 defined by a previous `glTexImage3D' operation.
5242 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
5244 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
5245 the returned value of `GL_MAX_3D_TEXTURE_SIZE'.
5247 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
5248 , YOFFSET<-B , (YOFFSET+HEIGHT,)>(H-B,) , ZOFFSET<-B , or
5249 (ZOFFSET+1,)>(D-B,) , where W is the `GL_TEXTURE_WIDTH', H is the
5250 `GL_TEXTURE_HEIGHT', D is the `GL_TEXTURE_DEPTH', and B is the
5251 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W , H
5252 , and D include twice the border width.
5254 `GL_INVALID_OPERATION' is generated if `glCopyTexSubImage3D' is executed
5255 between the execution of `glBegin' and the corresponding execution of
5258 (define-gl-procedures
5259 ((glCreateProgram -> GLuint))
5260 "Creates a program object.
5262 `glCreateProgram' creates an empty program object and returns a non-zero
5263 value by which it can be referenced. A program object is an object to
5264 which shader objects can be attached. This provides a mechanism to
5265 specify the shader objects that will be linked to create a program. It
5266 also provides a means for checking the compatibility of the shaders that
5267 will be used to create a program (for instance, checking the
5268 compatibility between a vertex shader and a fragment shader). When no
5269 longer needed as part of a program object, shader objects can be
5272 One or more executables are created in a program object by successfully
5273 attaching shader objects to it with `glAttachShader', successfully
5274 compiling the shader objects with `glCompileShader', and successfully
5275 linking the program object with `glLinkProgram'. These executables are
5276 made part of current state when `glUseProgram' is called. Program
5277 objects can be deleted by calling `glDeleteProgram'. The memory
5278 associated with the program object will be deleted when it is no longer
5279 part of current rendering state for any context.
5281 This function returns 0 if an error occurs creating the program object.
5283 `GL_INVALID_OPERATION' is generated if `glCreateProgram' is executed
5284 between the execution of `glBegin' and the corresponding execution of
5287 (define-gl-procedures
5288 ((glCreateShader (shaderType GLenum) -> GLuint))
5289 "Creates a shader object.
5292 Specifies the type of shader to be created. Must be either
5293 `GL_VERTEX_SHADER' or `GL_FRAGMENT_SHADER'.
5295 `glCreateShader' creates an empty shader object and returns a non-zero
5296 value by which it can be referenced. A shader object is used to maintain
5297 the source code strings that define a shader. SHADERTYPE indicates the
5298 type of shader to be created. Two types of shaders are supported. A
5299 shader of type `GL_VERTEX_SHADER' is a shader that is intended to run on
5300 the programmable vertex processor and replace the fixed functionality
5301 vertex processing in OpenGL. A shader of type `GL_FRAGMENT_SHADER' is a
5302 shader that is intended to run on the programmable fragment processor
5303 and replace the fixed functionality fragment processing in OpenGL.
5305 When created, a shader object's `GL_SHADER_TYPE' parameter is set to
5306 either `GL_VERTEX_SHADER' or `GL_FRAGMENT_SHADER', depending on the
5307 value of SHADERTYPE.
5309 This function returns 0 if an error occurs creating the shader object.
5311 `GL_INVALID_ENUM' is generated if SHADERTYPE is not an accepted value.
5313 `GL_INVALID_OPERATION' is generated if `glCreateShader' is executed
5314 between the execution of `glBegin' and the corresponding execution of
5317 (define-gl-procedures
5318 ((glCullFace (mode GLenum) -> void))
5319 "Specify whether front- or back-facing facets can be culled.
5322 Specifies whether front- or back-facing facets are candidates for
5323 culling. Symbolic constants `GL_FRONT', `GL_BACK', and
5324 `GL_FRONT_AND_BACK' are accepted. The initial value is `GL_BACK'.
5326 `glCullFace' specifies whether front- or back-facing facets are culled
5327 (as specified by MODE) when facet culling is enabled. Facet culling is
5328 initially disabled. To enable and disable facet culling, call the
5329 `glEnable' and `glDisable' commands with the argument `GL_CULL_FACE'.
5330 Facets include triangles, quadrilaterals, polygons, and rectangles.
5332 `glFrontFace' specifies which of the clockwise and counterclockwise
5333 facets are front-facing and back-facing. See `glFrontFace'.
5335 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5337 `GL_INVALID_OPERATION' is generated if `glCullFace' is executed between
5338 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5340 (define-gl-procedures
5343 (buffers const-GLuint-*)
5346 "Delete named buffer objects.
5349 Specifies the number of buffer objects to be deleted.
5352 Specifies an array of buffer objects to be deleted.
5354 `glDeleteBuffers' deletes N buffer objects named by the elements of the
5355 array BUFFERS. After a buffer object is deleted, it has no contents, and
5356 its name is free for reuse (for example by `glGenBuffers'). If a buffer
5357 object that is currently bound is deleted, the binding reverts to 0 (the
5358 absence of any buffer object, which reverts to client memory usage).
5360 `glDeleteBuffers' silently ignores 0's and names that do not correspond
5361 to existing buffer objects.
5363 `GL_INVALID_VALUE' is generated if N is negative.
5365 `GL_INVALID_OPERATION' is generated if `glDeleteBuffers' is executed
5366 between the execution of `glBegin' and the corresponding execution of
5369 (define-gl-procedures
5375 "Delete a contiguous group of display lists.
5378 Specifies the integer name of the first display list to delete.
5381 Specifies the number of display lists to delete.
5383 `glDeleteLists' causes a contiguous group of display lists to be
5384 deleted. LIST is the name of the first display list to be deleted, and
5385 RANGE is the number of display lists to delete. All display lists D with
5386 LIST<=D<=LIST+RANGE-1 are deleted.
5388 All storage locations allocated to the specified display lists are
5389 freed, and the names are available for reuse at a later time. Names
5390 within the range that do not have an associated display list are
5391 ignored. If RANGE is 0, nothing happens.
5393 `GL_INVALID_VALUE' is generated if RANGE is negative.
5395 `GL_INVALID_OPERATION' is generated if `glDeleteLists' is executed
5396 between the execution of `glBegin' and the corresponding execution of
5399 (define-gl-procedures
5400 ((glDeleteProgram (program GLuint) -> void))
5401 "Deletes a program object.
5404 Specifies the program object to be deleted.
5406 `glDeleteProgram' frees the memory and invalidates the name associated
5407 with the program object specified by PROGRAM. This command effectively
5408 undoes the effects of a call to `glCreateProgram'.
5410 If a program object is in use as part of current rendering state, it
5411 will be flagged for deletion, but it will not be deleted until it is no
5412 longer part of current state for any rendering context. If a program
5413 object to be deleted has shader objects attached to it, those shader
5414 objects will be automatically detached but not deleted unless they have
5415 already been flagged for deletion by a previous call to
5416 `glDeleteShader'. A value of 0 for PROGRAM will be silently ignored.
5418 To determine whether a program object has been flagged for deletion,
5419 call `glGetProgram' with arguments PROGRAM and `GL_DELETE_STATUS'.
5421 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
5424 `GL_INVALID_OPERATION' is generated if `glDeleteProgram' is executed
5425 between the execution of `glBegin' and the corresponding execution of
5428 (define-gl-procedures
5431 (ids const-GLuint-*)
5434 "Delete named query objects.
5437 Specifies the number of query objects to be deleted.
5440 Specifies an array of query objects to be deleted.
5442 `glDeleteQueries' deletes N query objects named by the elements of the
5443 array IDS. After a query object is deleted, it has no contents, and its
5444 name is free for reuse (for example by `glGenQueries').
5446 `glDeleteQueries' silently ignores 0's and names that do not correspond
5447 to existing query objects.
5449 `GL_INVALID_VALUE' is generated if N is negative.
5451 `GL_INVALID_OPERATION' is generated if `glDeleteQueries' is executed
5452 between the execution of `glBegin' and the corresponding execution of
5455 (define-gl-procedures
5456 ((glDeleteShader (shader GLuint) -> void))
5457 "Deletes a shader object.
5460 Specifies the shader object to be deleted.
5462 `glDeleteShader' frees the memory and invalidates the name associated
5463 with the shader object specified by SHADER. This command effectively
5464 undoes the effects of a call to `glCreateShader'.
5466 If a shader object to be deleted is attached to a program object, it
5467 will be flagged for deletion, but it will not be deleted until it is no
5468 longer attached to any program object, for any rendering context (i.e.,
5469 it must be detached from wherever it was attached before it will be
5470 deleted). A value of 0 for SHADER will be silently ignored.
5472 To determine whether an object has been flagged for deletion, call
5473 `glGetShader' with arguments SHADER and `GL_DELETE_STATUS'.
5475 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
5478 `GL_INVALID_OPERATION' is generated if `glDeleteShader' is executed
5479 between the execution of `glBegin' and the corresponding execution of
5482 (define-gl-procedures
5485 (textures const-GLuint-*)
5488 "Delete named textures.
5491 Specifies the number of textures to be deleted.
5494 Specifies an array of textures to be deleted.
5496 `glDeleteTextures' deletes N textures named by the elements of the array
5497 TEXTURES. After a texture is deleted, it has no contents or
5498 dimensionality, and its name is free for reuse (for example by
5499 `glGenTextures'). If a texture that is currently bound is deleted, the
5500 binding reverts to 0 (the default texture).
5502 `glDeleteTextures' silently ignores 0's and names that do not correspond
5503 to existing textures.
5505 `GL_INVALID_VALUE' is generated if N is negative.
5507 `GL_INVALID_OPERATION' is generated if `glDeleteTextures' is executed
5508 between the execution of `glBegin' and the corresponding execution of
5511 (define-gl-procedures
5512 ((glDepthFunc (func GLenum) -> void))
5513 "Specify the value used for depth buffer comparisons.
5516 Specifies the depth comparison function. Symbolic constants
5517 `GL_NEVER', `GL_LESS', `GL_EQUAL', `GL_LEQUAL', `GL_GREATER',
5518 `GL_NOTEQUAL', `GL_GEQUAL', and `GL_ALWAYS' are accepted. The
5519 initial value is `GL_LESS'.
5521 `glDepthFunc' specifies the function used to compare each incoming pixel
5522 depth value with the depth value present in the depth buffer. The
5523 comparison is performed only if depth testing is enabled. (See
5524 `glEnable' and `glDisable' of `GL_DEPTH_TEST'.)
5526 FUNC specifies the conditions under which the pixel will be drawn. The
5527 comparison functions are as follows:
5533 Passes if the incoming depth value is less than the stored depth
5537 Passes if the incoming depth value is equal to the stored depth
5541 Passes if the incoming depth value is less than or equal to the
5545 Passes if the incoming depth value is greater than the stored depth
5549 Passes if the incoming depth value is not equal to the stored depth
5553 Passes if the incoming depth value is greater than or equal to the
5559 The initial value of FUNC is `GL_LESS'. Initially, depth testing is
5560 disabled. If depth testing is disabled or if no depth buffer exists, it
5561 is as if the depth test always passes.
5563 `GL_INVALID_ENUM' is generated if FUNC is not an accepted value.
5565 `GL_INVALID_OPERATION' is generated if `glDepthFunc' is executed between
5566 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5568 (define-gl-procedures
5569 ((glDepthMask (flag GLboolean) -> void))
5570 "Enable or disable writing into the depth buffer.
5573 Specifies whether the depth buffer is enabled for writing. If FLAG
5574 is `GL_FALSE', depth buffer writing is disabled. Otherwise, it is
5575 enabled. Initially, depth buffer writing is enabled.
5577 `glDepthMask' specifies whether the depth buffer is enabled for writing.
5578 If FLAG is `GL_FALSE', depth buffer writing is disabled. Otherwise, it
5579 is enabled. Initially, depth buffer writing is enabled.
5581 `GL_INVALID_OPERATION' is generated if `glDepthMask' is executed between
5582 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5584 (define-gl-procedures
5590 "Specify mapping of depth values from normalized device coordinates to
5594 Specifies the mapping of the near clipping plane to window
5595 coordinates. The initial value is 0.
5598 Specifies the mapping of the far clipping plane to window
5599 coordinates. The initial value is 1.
5601 After clipping and division by W, depth coordinates range from -1 to 1,
5602 corresponding to the near and far clipping planes. `glDepthRange'
5603 specifies a linear mapping of the normalized depth coordinates in this
5604 range to window depth coordinates. Regardless of the actual depth buffer
5605 implementation, window coordinate depth values are treated as though
5606 they range from 0 through 1 (like color components). Thus, the values
5607 accepted by `glDepthRange' are both clamped to this range before they
5610 The setting of (0,1) maps the near plane to 0 and the far plane to 1.
5611 With this mapping, the depth buffer range is fully utilized.
5613 `GL_INVALID_OPERATION' is generated if `glDepthRange' is executed
5614 between the execution of `glBegin' and the corresponding execution of
5617 (define-gl-procedures
5623 "Detaches a shader object from a program object to which it is attached.
5626 Specifies the program object from which to detach the shader
5630 Specifies the shader object to be detached.
5632 `glDetachShader' detaches the shader object specified by SHADER from the
5633 program object specified by PROGRAM. This command can be used to undo
5634 the effect of the command `glAttachShader'.
5636 If SHADER has already been flagged for deletion by a call to
5637 `glDeleteShader' and it is not attached to any other program object, it
5638 will be deleted after it has been detached.
5640 `GL_INVALID_VALUE' is generated if either PROGRAM or SHADER is a value
5641 that was not generated by OpenGL.
5643 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
5645 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
5647 `GL_INVALID_OPERATION' is generated if SHADER is not attached to
5650 `GL_INVALID_OPERATION' is generated if `glDetachShader' is executed
5651 between the execution of `glBegin' and the corresponding execution of
5654 (define-gl-procedures
5661 "Render primitives from array data.
5664 Specifies what kind of primitives to render. Symbolic constants
5665 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
5666 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
5667 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
5670 Specifies the starting index in the enabled arrays.
5673 Specifies the number of indices to be rendered.
5675 `glDrawArrays' specifies multiple geometric primitives with very few
5676 subroutine calls. Instead of calling a GL procedure to pass each
5677 individual vertex, normal, texture coordinate, edge flag, or color, you
5678 can prespecify separate arrays of vertices, normals, and colors and use
5679 them to construct a sequence of primitives with a single call to
5682 When `glDrawArrays' is called, it uses COUNT sequential elements from
5683 each enabled array to construct a sequence of geometric primitives,
5684 beginning with element FIRST. MODE specifies what kind of primitives are
5685 constructed and how the array elements construct those primitives. If
5686 `GL_VERTEX_ARRAY' is not enabled, no geometric primitives are generated.
5688 Vertex attributes that are modified by `glDrawArrays' have an
5689 unspecified value after `glDrawArrays' returns. For example, if
5690 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
5691 after `glDrawArrays' executes. Attributes that aren't modified remain
5694 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5696 `GL_INVALID_VALUE' is generated if COUNT is negative.
5698 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5699 bound to an enabled array and the buffer object's data store is
5702 `GL_INVALID_OPERATION' is generated if `glDrawArrays' is executed
5703 between the execution of `glBegin' and the corresponding `glEnd'.")
5705 (define-gl-procedures
5708 (bufs const-GLenum-*)
5711 "Specifies a list of color buffers to be drawn into.
5714 Specifies the number of buffers in BUFS.
5717 Points to an array of symbolic constants specifying the buffers
5718 into which fragment colors or data values will be written.
5720 `glDrawBuffers' defines an array of buffers into which fragment color
5721 values or fragment data will be written. If no fragment shader is
5722 active, rendering operations will generate only one fragment color per
5723 fragment and it will be written into each of the buffers specified by
5724 BUFS. If a fragment shader is active and it writes a value to the output
5725 variable `gl_FragColor', then that value will be written into each of
5726 the buffers specified by BUFS. If a fragment shader is active and it
5727 writes a value to one or more elements of the output array variable
5728 `gl_FragData[]', then the value of `gl_FragData[0] ' will be written
5729 into the first buffer specified by BUFS, the value of `gl_FragData[1] '
5730 will be written into the second buffer specified by BUFS, and so on up
5731 to `gl_FragData[n-1]'. The draw buffer used for `gl_FragData[n]' and
5732 beyond is implicitly set to be `GL_NONE'.
5734 The symbolic constants contained in BUFS may be any of the following:
5737 The fragment color/data value is not written into any color buffer.
5740 The fragment color/data value is written into the front left color
5744 The fragment color/data value is written into the front right color
5748 The fragment color/data value is written into the back left color
5752 The fragment color/data value is written into the back right color
5756 The fragment color/data value is written into auxiliary buffer `i'.
5758 Except for `GL_NONE', the preceding symbolic constants may not appear
5759 more than once in BUFS. The maximum number of draw buffers supported is
5760 implementation dependent and can be queried by calling `glGet' with the
5761 argument `GL_MAX_DRAW_BUFFERS'. The number of auxiliary buffers can be
5762 queried by calling `glGet' with the argument `GL_AUX_BUFFERS'.
5764 `GL_INVALID_ENUM' is generated if one of the values in BUFS is not an
5767 `GL_INVALID_ENUM' is generated if N is less than 0.
5769 `GL_INVALID_OPERATION' is generated if a symbolic constant other than
5770 `GL_NONE' appears more than once in BUFS.
5772 `GL_INVALID_OPERATION' is generated if any of the entries in BUFS (other
5773 than `GL_NONE' ) indicates a color buffer that does not exist in the
5776 `GL_INVALID_VALUE' is generated if N is greater than
5777 `GL_MAX_DRAW_BUFFERS'.
5779 `GL_INVALID_OPERATION' is generated if `glDrawBuffers' is executed
5780 between the execution of `glBegin' and the corresponding execution of
5783 (define-gl-procedures
5784 ((glDrawBuffer (mode GLenum) -> void))
5785 "Specify which color buffers are to be drawn into.
5788 Specifies up to four color buffers to be drawn into. Symbolic
5789 constants `GL_NONE', `GL_FRONT_LEFT', `GL_FRONT_RIGHT',
5790 `GL_BACK_LEFT', `GL_BACK_RIGHT', `GL_FRONT', `GL_BACK', `GL_LEFT',
5791 `GL_RIGHT', `GL_FRONT_AND_BACK', and `GL_AUX'I, where I is between
5792 0 and the value of `GL_AUX_BUFFERS' minus 1, are accepted.
5793 (`GL_AUX_BUFFERS' is not the upper limit; use `glGet' to query the
5794 number of available aux buffers.) The initial value is `GL_FRONT'
5795 for single-buffered contexts, and `GL_BACK' for double-buffered
5798 When colors are written to the frame buffer, they are written into the
5799 color buffers specified by `glDrawBuffer'. The specifications are as
5803 No color buffers are written.
5806 Only the front left color buffer is written.
5809 Only the front right color buffer is written.
5812 Only the back left color buffer is written.
5815 Only the back right color buffer is written.
5818 Only the front left and front right color buffers are written. If
5819 there is no front right color buffer, only the front left color
5823 Only the back left and back right color buffers are written. If
5824 there is no back right color buffer, only the back left color
5828 Only the front left and back left color buffers are written. If
5829 there is no back left color buffer, only the front left color
5833 Only the front right and back right color buffers are written. If
5834 there is no back right color buffer, only the front right color
5838 All the front and back color buffers (front left, front right, back
5839 left, back right) are written. If there are no back color buffers,
5840 only the front left and front right color buffers are written. If
5841 there are no right color buffers, only the front left and back left
5842 color buffers are written. If there are no right or back color
5843 buffers, only the front left color buffer is written.
5846 Only auxiliary color buffer I is written.
5848 If more than one color buffer is selected for drawing, then blending or
5849 logical operations are computed and applied independently for each color
5850 buffer and can produce different results in each buffer.
5852 Monoscopic contexts include only LEFT buffers, and stereoscopic contexts
5853 include both LEFT and RIGHT buffers. Likewise, single-buffered contexts
5854 include only FRONT buffers, and double-buffered contexts include both
5855 FRONT and BACK buffers. The context is selected at GL initialization.
5857 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5859 `GL_INVALID_OPERATION' is generated if none of the buffers indicated by
5862 `GL_INVALID_OPERATION' is generated if `glDrawBuffer' is executed
5863 between the execution of `glBegin' and the corresponding execution of
5866 (define-gl-procedures
5871 (indices const-GLvoid-*)
5874 "Render primitives from array data.
5877 Specifies what kind of primitives to render. Symbolic constants
5878 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
5879 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
5880 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
5883 Specifies the number of elements to be rendered.
5886 Specifies the type of the values in INDICES. Must be one of
5887 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
5890 Specifies a pointer to the location where the indices are stored.
5892 `glDrawElements' specifies multiple geometric primitives with very few
5893 subroutine calls. Instead of calling a GL function to pass each
5894 individual vertex, normal, texture coordinate, edge flag, or color, you
5895 can prespecify separate arrays of vertices, normals, and so on, and use
5896 them to construct a sequence of primitives with a single call to
5899 When `glDrawElements' is called, it uses COUNT sequential elements from
5900 an enabled array, starting at INDICES to construct a sequence of
5901 geometric primitives. MODE specifies what kind of primitives are
5902 constructed and how the array elements construct these primitives. If
5903 more than one array is enabled, each is used. If `GL_VERTEX_ARRAY' is
5904 not enabled, no geometric primitives are constructed.
5906 Vertex attributes that are modified by `glDrawElements' have an
5907 unspecified value after `glDrawElements' returns. For example, if
5908 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
5909 after `glDrawElements' executes. Attributes that aren't modified
5910 maintain their previous values.
5912 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5914 `GL_INVALID_VALUE' is generated if COUNT is negative.
5916 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5917 bound to an enabled array or the element array and the buffer object's
5918 data store is currently mapped.
5920 `GL_INVALID_OPERATION' is generated if `glDrawElements' is executed
5921 between the execution of `glBegin' and the corresponding `glEnd'.")
5923 (define-gl-procedures
5929 (data const-GLvoid-*)
5932 "Write a block of pixels to the frame buffer.
5937 Specify the dimensions of the pixel rectangle to be written into
5941 Specifies the format of the pixel data. Symbolic constants
5942 `GL_COLOR_INDEX', `GL_STENCIL_INDEX', `GL_DEPTH_COMPONENT',
5943 `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_RED', `GL_GREEN',
5944 `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA' are
5948 Specifies the data type for DATA. Symbolic constants
5949 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
5950 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
5951 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
5952 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
5953 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
5954 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
5955 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
5956 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
5960 Specifies a pointer to the pixel data.
5962 `glDrawPixels' reads pixel data from memory and writes it into the frame
5963 buffer relative to the current raster position, provided that the raster
5964 position is valid. Use `glRasterPos' or `glWindowPos' to set the current
5965 raster position; use `glGet' with argument
5966 `GL_CURRENT_RASTER_POSITION_VALID' to determine if the specified raster
5967 position is valid, and `glGet' with argument
5968 `GL_CURRENT_RASTER_POSITION' to query the raster position.
5970 Several parameters define the encoding of pixel data in memory and
5971 control the processing of the pixel data before it is placed in the
5972 frame buffer. These parameters are set with four commands:
5973 `glPixelStore', `glPixelTransfer', `glPixelMap', and `glPixelZoom'. This
5974 reference page describes the effects on `glDrawPixels' of many, but not
5975 all, of the parameters specified by these four commands.
5977 Data is read from DATA as a sequence of signed or unsigned bytes, signed
5978 or unsigned shorts, signed or unsigned integers, or single-precision
5979 floating-point values, depending on TYPE. When TYPE is one of
5980 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
5981 `GL_UNSIGNED_INT', `GL_INT', or `GL_FLOAT' each of these bytes, shorts,
5982 integers, or floating-point values is interpreted as one color or depth
5983 component, or one index, depending on FORMAT. When TYPE is one of
5984 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_SHORT_5_6_5',
5985 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_5_5_5_1',
5986 `GL_UNSIGNED_INT_8_8_8_8', or `GL_UNSIGNED_INT_10_10_10_2', each
5987 unsigned value is interpreted as containing all the components for a
5988 single pixel, with the color components arranged according to FORMAT.
5989 When TYPE is one of `GL_UNSIGNED_BYTE_2_3_3_REV',
5990 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
5991 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8_REV', or
5992 `GL_UNSIGNED_INT_2_10_10_10_REV', each unsigned value is interpreted as
5993 containing all color components, specified by FORMAT, for a single pixel
5994 in a reversed order. Indices are always treated individually. Color
5995 components are treated as groups of one, two, three, or four values,
5996 again based on FORMAT. Both individual indices and groups of components
5997 are referred to as pixels. If TYPE is `GL_BITMAP', the data must be
5998 unsigned bytes, and FORMAT must be either `GL_COLOR_INDEX' or
5999 `GL_STENCIL_INDEX'. Each unsigned byte is treated as eight 1-bit pixels,
6000 with bit ordering determined by `GL_UNPACK_LSB_FIRST' (see
6003 WIDTH×HEIGHT pixels are read from memory, starting at location DATA. By
6004 default, these pixels are taken from adjacent memory locations, except
6005 that after all WIDTH pixels are read, the read pointer is advanced to
6006 the next four-byte boundary. The four-byte row alignment is specified by
6007 `glPixelStore' with argument `GL_UNPACK_ALIGNMENT', and it can be set to
6008 one, two, four, or eight bytes. Other pixel store parameters specify
6009 different read pointer advancements, both before the first pixel is read
6010 and after all WIDTH pixels are read. See the `glPixelStore' reference
6011 page for details on these options.
6013 If a non-zero named buffer object is bound to the
6014 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a block of
6015 pixels is specified, DATA is treated as a byte offset into the buffer
6016 object's data store.
6018 The WIDTH×HEIGHT pixels that are read from memory are each operated on
6019 in the same way, based on the values of several parameters specified by
6020 `glPixelTransfer' and `glPixelMap'. The details of these operations, as
6021 well as the target buffer into which the pixels are drawn, are specific
6022 to the format of the pixels, as specified by FORMAT. FORMAT can assume
6023 one of 13 symbolic values:
6026 Each pixel is a single value, a color index. It is converted to
6027 fixed-point format, with an unspecified number of bits to the right
6028 of the binary point, regardless of the memory data type.
6029 Floating-point values convert to true fixed-point values. Signed
6030 and unsigned integer data is converted with all fraction bits set
6031 to 0. Bitmap data convert to either 0 or 1.
6033 Each fixed-point index is then shifted left by `GL_INDEX_SHIFT'
6034 bits and added to `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is
6035 negative, the shift is to the right. In either case, zero bits fill
6036 otherwise unspecified bit locations in the result.
6038 If the GL is in RGBA mode, the resulting index is converted to an
6039 RGBA pixel with the help of the `GL_PIXEL_MAP_I_TO_R',
6040 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
6041 `GL_PIXEL_MAP_I_TO_A' tables. If the GL is in color index mode, and
6042 if `GL_MAP_COLOR' is true, the index is replaced with the value
6043 that it references in lookup table `GL_PIXEL_MAP_I_TO_I'. Whether
6044 the lookup replacement of the index is done or not, the integer
6045 part of the index is then ANDed with 2^B-1 , where B is the number
6046 of bits in a color index buffer.
6048 The GL then converts the resulting indices or RGBA colors to
6049 fragments by attaching the current raster position Z coordinate and
6050 texture coordinates to each pixel, then assigning X and Y window
6051 coordinates to the N th fragment such that X_N=X_R+N%WIDTH
6054 where (X_R,Y_R) is the current raster position. These pixel
6055 fragments are then treated just like the fragments generated by
6056 rasterizing points, lines, or polygons. Texture mapping, fog, and
6057 all the fragment operations are applied before the fragments are
6058 written to the frame buffer.
6061 Each pixel is a single value, a stencil index. It is converted to
6062 fixed-point format, with an unspecified number of bits to the right
6063 of the binary point, regardless of the memory data type.
6064 Floating-point values convert to true fixed-point values. Signed
6065 and unsigned integer data is converted with all fraction bits set
6066 to 0. Bitmap data convert to either 0 or 1.
6068 Each fixed-point index is then shifted left by `GL_INDEX_SHIFT'
6069 bits, and added to `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is
6070 negative, the shift is to the right. In either case, zero bits fill
6071 otherwise unspecified bit locations in the result. If
6072 `GL_MAP_STENCIL' is true, the index is replaced with the value that
6073 it references in lookup table `GL_PIXEL_MAP_S_TO_S'. Whether the
6074 lookup replacement of the index is done or not, the integer part of
6075 the index is then ANDed with 2^B-1 , where B is the number of bits
6076 in the stencil buffer. The resulting stencil indices are then
6077 written to the stencil buffer such that the N th index is written
6080 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
6082 where (X_R,Y_R) is the current raster position. Only the pixel
6083 ownership test, the scissor test, and the stencil writemask affect
6084 these write operations.
6086 `GL_DEPTH_COMPONENT'
6087 Each pixel is a single-depth component. Floating-point data is
6088 converted directly to an internal floating-point format with
6089 unspecified precision. Signed integer data is mapped linearly to
6090 the internal floating-point format such that the most positive
6091 representable integer value maps to 1.0, and the most negative
6092 representable value maps to -1.0 . Unsigned integer data is mapped
6093 similarly: the largest integer value maps to 1.0, and 0 maps to
6094 0.0. The resulting floating-point depth value is then multiplied by
6095 `GL_DEPTH_SCALE' and added to `GL_DEPTH_BIAS'. The result is
6096 clamped to the range [0,1] .
6098 The GL then converts the resulting depth components to fragments by
6099 attaching the current raster position color or color index and
6100 texture coordinates to each pixel, then assigning X and Y window
6101 coordinates to the N th fragment such that
6103 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
6105 where (X_R,Y_R) is the current raster position. These pixel
6106 fragments are then treated just like the fragments generated by
6107 rasterizing points, lines, or polygons. Texture mapping, fog, and
6108 all the fragment operations are applied before the fragments are
6109 written to the frame buffer.
6113 Each pixel is a four-component group: For `GL_RGBA', the red
6114 component is first, followed by green, followed by blue, followed
6115 by alpha; for `GL_BGRA' the order is blue, green, red and then
6116 alpha. Floating-point values are converted directly to an internal
6117 floating-point format with unspecified precision. Signed integer
6118 values are mapped linearly to the internal floating-point format
6119 such that the most positive representable integer value maps to
6120 1.0, and the most negative representable value maps to -1.0 . (Note
6121 that this mapping does not convert 0 precisely to 0.0.) Unsigned
6122 integer data is mapped similarly: The largest integer value maps to
6123 1.0, and 0 maps to 0.0. The resulting floating-point color values
6124 are then multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where
6125 C is RED, GREEN, BLUE, and ALPHA for the respective color
6126 components. The results are clamped to the range [0,1] .
6128 If `GL_MAP_COLOR' is true, each color component is scaled by the
6129 size of lookup table `GL_PIXEL_MAP_c_TO_c', then replaced by the
6130 value that it references in that table. C is R, G, B, or A
6133 The GL then converts the resulting RGBA colors to fragments by
6134 attaching the current raster position Z coordinate and texture
6135 coordinates to each pixel, then assigning X and Y window
6136 coordinates to the N th fragment such that
6138 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
6140 where (X_R,Y_R) is the current raster position. These pixel
6141 fragments are then treated just like the fragments generated by
6142 rasterizing points, lines, or polygons. Texture mapping, fog, and
6143 all the fragment operations are applied before the fragments are
6144 written to the frame buffer.
6147 Each pixel is a single red component. This component is converted
6148 to the internal floating-point format in the same way the red
6149 component of an RGBA pixel is. It is then converted to an RGBA
6150 pixel with green and blue set to 0, and alpha set to 1. After this
6151 conversion, the pixel is treated as if it had been read as an RGBA
6155 Each pixel is a single green component. This component is converted
6156 to the internal floating-point format in the same way the green
6157 component of an RGBA pixel is. It is then converted to an RGBA
6158 pixel with red and blue set to 0, and alpha set to 1. After this
6159 conversion, the pixel is treated as if it had been read as an RGBA
6163 Each pixel is a single blue component. This component is converted
6164 to the internal floating-point format in the same way the blue
6165 component of an RGBA pixel is. It is then converted to an RGBA
6166 pixel with red and green set to 0, and alpha set to 1. After this
6167 conversion, the pixel is treated as if it had been read as an RGBA
6171 Each pixel is a single alpha component. This component is converted
6172 to the internal floating-point format in the same way the alpha
6173 component of an RGBA pixel is. It is then converted to an RGBA
6174 pixel with red, green, and blue set to 0. After this conversion,
6175 the pixel is treated as if it had been read as an RGBA pixel.
6179 Each pixel is a three-component group: red first, followed by
6180 green, followed by blue; for `GL_BGR', the first component is blue,
6181 followed by green and then red. Each component is converted to the
6182 internal floating-point format in the same way the red, green, and
6183 blue components of an RGBA pixel are. The color triple is converted
6184 to an RGBA pixel with alpha set to 1. After this conversion, the
6185 pixel is treated as if it had been read as an RGBA pixel.
6188 Each pixel is a single luminance component. This component is
6189 converted to the internal floating-point format in the same way the
6190 red component of an RGBA pixel is. It is then converted to an RGBA
6191 pixel with red, green, and blue set to the converted luminance
6192 value, and alpha set to 1. After this conversion, the pixel is
6193 treated as if it had been read as an RGBA pixel.
6195 `GL_LUMINANCE_ALPHA'
6196 Each pixel is a two-component group: luminance first, followed by
6197 alpha. The two components are converted to the internal
6198 floating-point format in the same way the red component of an RGBA
6199 pixel is. They are then converted to an RGBA pixel with red, green,
6200 and blue set to the converted luminance value, and alpha set to the
6201 converted alpha value. After this conversion, the pixel is treated
6202 as if it had been read as an RGBA pixel.
6204 The following table summarizes the meaning of the valid constants for
6210 *Corresponding Type*
6213 unsigned 8-bit integer
6216 signed 8-bit integer
6219 single bits in unsigned 8-bit integers
6222 unsigned 16-bit integer
6225 signed 16-bit integer
6228 unsigned 32-bit integer
6234 single-precision floating-point
6236 `GL_UNSIGNED_BYTE_3_3_2'
6237 unsigned 8-bit integer
6239 `GL_UNSIGNED_BYTE_2_3_3_REV'
6240 unsigned 8-bit integer with reversed component ordering
6242 `GL_UNSIGNED_SHORT_5_6_5'
6243 unsigned 16-bit integer
6245 `GL_UNSIGNED_SHORT_5_6_5_REV'
6246 unsigned 16-bit integer with reversed component ordering
6248 `GL_UNSIGNED_SHORT_4_4_4_4'
6249 unsigned 16-bit integer
6251 `GL_UNSIGNED_SHORT_4_4_4_4_REV'
6252 unsigned 16-bit integer with reversed component ordering
6254 `GL_UNSIGNED_SHORT_5_5_5_1'
6255 unsigned 16-bit integer
6257 `GL_UNSIGNED_SHORT_1_5_5_5_REV'
6258 unsigned 16-bit integer with reversed component ordering
6260 `GL_UNSIGNED_INT_8_8_8_8'
6261 unsigned 32-bit integer
6263 `GL_UNSIGNED_INT_8_8_8_8_REV'
6264 unsigned 32-bit integer with reversed component ordering
6266 `GL_UNSIGNED_INT_10_10_10_2'
6267 unsigned 32-bit integer
6269 `GL_UNSIGNED_INT_2_10_10_10_REV'
6270 unsigned 32-bit integer with reversed component ordering
6274 The rasterization described so far assumes pixel zoom factors of 1. If
6275 `glPixelZoom' is used to change the X and Y pixel zoom factors, pixels
6276 are converted to fragments as follows. If (X_R,Y_R) is the current
6277 raster position, and a given pixel is in the N th column and M th row of
6278 the pixel rectangle, then fragments are generated for pixels whose
6279 centers are in the rectangle with corners at
6281 (X_R+ZOOM_X,\u2062N,Y_R+ZOOM_Y,\u2062M) (X_R+ZOOM_X,\u2061(N+1,),Y_R+ZOOM_Y,\u2061(M+1,))
6283 where ZOOM_X is the value of `GL_ZOOM_X' and ZOOM_Y is the value of
6286 `GL_INVALID_ENUM' is generated if FORMAT or TYPE is not one of the
6289 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
6290 either `GL_COLOR_INDEX' or `GL_STENCIL_INDEX'.
6292 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
6294 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_STENCIL_INDEX' and
6295 there is no stencil buffer.
6297 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_RED', `GL_GREEN',
6298 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_RGBA', `GL_BGR', `GL_BGRA',
6299 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA', and the GL is in color index
6302 `GL_INVALID_OPERATION' is generated if FORMAT is one of
6303 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
6304 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
6307 `GL_INVALID_OPERATION' is generated if FORMAT is one of
6308 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
6309 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
6310 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
6311 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
6312 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
6314 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6315 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
6316 data store is currently mapped.
6318 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6319 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
6320 unpacked from the buffer object such that the memory reads required
6321 would exceed the data store size.
6323 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6324 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
6325 divisible into the number of bytes needed to store in memory a datum
6328 `GL_INVALID_OPERATION' is generated if `glDrawPixels' is executed
6329 between the execution of `glBegin' and the corresponding execution of
6332 (define-gl-procedures
6333 ((glDrawRangeElements
6339 (indices const-GLvoid-*)
6342 "Render primitives from array data.
6345 Specifies what kind of primitives to render. Symbolic constants
6346 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
6347 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
6348 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
6351 Specifies the minimum array index contained in INDICES.
6354 Specifies the maximum array index contained in INDICES.
6357 Specifies the number of elements to be rendered.
6360 Specifies the type of the values in INDICES. Must be one of
6361 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
6364 Specifies a pointer to the location where the indices are stored.
6366 `glDrawRangeElements' is a restricted form of `glDrawElements'. MODE,
6367 START, END, and COUNT match the corresponding arguments to
6368 `glDrawElements', with the additional constraint that all values in the
6369 arrays COUNT must lie between START and END, inclusive.
6371 Implementations denote recommended maximum amounts of vertex and index
6372 data, which may be queried by calling `glGet' with argument
6373 `GL_MAX_ELEMENTS_VERTICES' and `GL_MAX_ELEMENTS_INDICES'. If END-START+1
6374 is greater than the value of `GL_MAX_ELEMENTS_VERTICES', or if COUNT is
6375 greater than the value of `GL_MAX_ELEMENTS_INDICES', then the call may
6376 operate at reduced performance. There is no requirement that all
6377 vertices in the range [START,END] be referenced. However, the
6378 implementation may partially process unused vertices, reducing
6379 performance from what could be achieved with an optimal index set.
6381 When `glDrawRangeElements' is called, it uses COUNT sequential elements
6382 from an enabled array, starting at START to construct a sequence of
6383 geometric primitives. MODE specifies what kind of primitives are
6384 constructed, and how the array elements construct these primitives. If
6385 more than one array is enabled, each is used. If `GL_VERTEX_ARRAY' is
6386 not enabled, no geometric primitives are constructed.
6388 Vertex attributes that are modified by `glDrawRangeElements' have an
6389 unspecified value after `glDrawRangeElements' returns. For example, if
6390 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
6391 after `glDrawRangeElements' executes. Attributes that aren't modified
6392 maintain their previous values.
6394 It is an error for indices to lie outside the range [START,END] , but
6395 implementations may not check for this situation. Such indices cause
6396 implementation-dependent behavior.
6398 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
6400 `GL_INVALID_VALUE' is generated if COUNT is negative.
6402 `GL_INVALID_VALUE' is generated if END<START .
6404 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6405 bound to an enabled array or the element array and the buffer object's
6406 data store is currently mapped.
6408 `GL_INVALID_OPERATION' is generated if `glDrawRangeElements' is executed
6409 between the execution of `glBegin' and the corresponding `glEnd'.")
6411 (define-gl-procedures
6414 (pointer const-GLvoid-*)
6417 "Define an array of edge flags.
6420 Specifies the byte offset between consecutive edge flags. If STRIDE
6421 is 0, the edge flags are understood to be tightly packed in the
6422 array. The initial value is 0.
6425 Specifies a pointer to the first edge flag in the array. The
6428 `glEdgeFlagPointer' specifies the location and data format of an array
6429 of boolean edge flags to use when rendering. STRIDE specifies the byte
6430 stride from one edge flag to the next, allowing vertices and attributes
6431 to be packed into a single array or stored in separate arrays.
6433 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
6434 target (see `glBindBuffer') while an edge flag array is specified,
6435 POINTER is treated as a byte offset into the buffer object's data store.
6436 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
6437 edge flag vertex array client-side state
6438 (`GL_EDGE_FLAG_ARRAY_BUFFER_BINDING').
6440 When an edge flag array is specified, STRIDE and POINTER are saved as
6441 client-side state, in addition to the current vertex array buffer object
6444 To enable and disable the edge flag array, call `glEnableClientState'
6445 and `glDisableClientState' with the argument `GL_EDGE_FLAG_ARRAY'. If
6446 enabled, the edge flag array is used when `glDrawArrays',
6447 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements',
6448 `glDrawRangeElements', or `glArrayElement' is called.
6450 `GL_INVALID_ENUM' is generated if STRIDE is negative.")
6452 (define-gl-procedures
6453 ((glEdgeFlag (flag GLboolean) -> void)
6454 (glEdgeFlagv (flag const-GLboolean-*) -> void))
6455 "Flag edges as either boundary or nonboundary.
6458 Specifies the current edge flag value, either `GL_TRUE' or
6459 `GL_FALSE'. The initial value is `GL_TRUE'.
6461 Each vertex of a polygon, separate triangle, or separate quadrilateral
6462 specified between a `glBegin'/`glEnd' pair is marked as the start of
6463 either a boundary or nonboundary edge. If the current edge flag is true
6464 when the vertex is specified, the vertex is marked as the start of a
6465 boundary edge. Otherwise, the vertex is marked as the start of a
6466 nonboundary edge. `glEdgeFlag' sets the edge flag bit to `GL_TRUE' if
6467 FLAG is `GL_TRUE' and to `GL_FALSE' otherwise.
6469 The vertices of connected triangles and connected quadrilaterals are
6470 always marked as boundary, regardless of the value of the edge flag.
6472 Boundary and nonboundary edge flags on vertices are significant only if
6473 `GL_POLYGON_MODE' is set to `GL_POINT' or `GL_LINE'. See
6476 (define-gl-procedures
6477 ((glEnableClientState (cap GLenum) -> void)
6478 (glDisableClientState (cap GLenum) -> void))
6479 "Enable or disable client-side capability.
6482 Specifies the capability to enable. Symbolic constants
6483 `GL_COLOR_ARRAY', `GL_EDGE_FLAG_ARRAY', `GL_FOG_COORD_ARRAY',
6484 `GL_INDEX_ARRAY', `GL_NORMAL_ARRAY', `GL_SECONDARY_COLOR_ARRAY',
6485 `GL_TEXTURE_COORD_ARRAY', and `GL_VERTEX_ARRAY' are accepted.
6487 `glEnableClientState' and `glDisableClientState' enable or disable
6488 individual client-side capabilities. By default, all client-side
6489 capabilities are disabled. Both `glEnableClientState' and
6490 `glDisableClientState' take a single argument, CAP, which can assume one
6491 of the following values:
6494 If enabled, the color array is enabled for writing and used during
6495 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6496 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6497 is called. See `glColorPointer'.
6499 `GL_EDGE_FLAG_ARRAY'
6500 If enabled, the edge flag array is enabled for writing and used
6501 during rendering when `glArrayElement', `glDrawArrays',
6502 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6503 `glMultiDrawElements' is called. See `glEdgeFlagPointer'.
6505 `GL_FOG_COORD_ARRAY'
6506 If enabled, the fog coordinate array is enabled for writing and
6507 used during rendering when `glArrayElement', `glDrawArrays',
6508 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6509 `glMultiDrawElements' is called. See `glFogCoordPointer'.
6512 If enabled, the index array is enabled for writing and used during
6513 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6514 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6515 is called. See `glIndexPointer'.
6518 If enabled, the normal array is enabled for writing and used during
6519 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6520 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6521 is called. See `glNormalPointer'.
6523 `GL_SECONDARY_COLOR_ARRAY'
6524 If enabled, the secondary color array is enabled for writing and
6525 used during rendering when `glArrayElement', `glDrawArrays',
6526 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6527 `glMultiDrawElements' is called. See `glColorPointer'.
6529 `GL_TEXTURE_COORD_ARRAY'
6530 If enabled, the texture coordinate array is enabled for writing and
6531 used during rendering when `glArrayElement', `glDrawArrays',
6532 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6533 `glMultiDrawElements' is called. See `glTexCoordPointer'.
6536 If enabled, the vertex array is enabled for writing and used during
6537 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6538 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6539 is called. See `glVertexPointer'.
6541 `GL_INVALID_ENUM' is generated if CAP is not an accepted value.
6543 `glEnableClientState' is not allowed between the execution of `glBegin'
6544 and the corresponding `glEnd', but an error may or may not be generated.
6545 If no error is generated, the behavior is undefined.")
6547 (define-gl-procedures
6548 ((glEnableVertexAttribArray
6552 (glDisableVertexAttribArray
6556 "Enable or disable a generic vertex attribute array.
6559 Specifies the index of the generic vertex attribute to be enabled
6562 `glEnableVertexAttribArray' enables the generic vertex attribute array
6563 specified by INDEX. `glDisableVertexAttribArray' disables the generic
6564 vertex attribute array specified by INDEX. By default, all client-side
6565 capabilities are disabled, including all generic vertex attribute
6566 arrays. If enabled, the values in the generic vertex attribute array
6567 will be accessed and used for rendering when calls are made to vertex
6568 array commands such as `glDrawArrays', `glDrawElements',
6569 `glDrawRangeElements', `glArrayElement', `glMultiDrawElements', or
6570 `glMultiDrawArrays'.
6572 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
6573 `GL_MAX_VERTEX_ATTRIBS'.
6575 `GL_INVALID_OPERATION' is generated if either `glEnableVertexAttribArray
6576 ' or `glDisableVertexAttribArray ' is executed between the execution of
6577 `glBegin' and the corresponding execution of `glEnd'.")
6579 (define-gl-procedures
6580 ((glEnable (cap GLenum) -> void)
6581 (glDisable (cap GLenum) -> void))
6582 "Enable or disable server-side GL capabilities.
6585 Specifies a symbolic constant indicating a GL capability.
6587 `glEnable' and `glDisable' enable and disable various capabilities. Use
6588 `glIsEnabled' or `glGet' to determine the current setting of any
6589 capability. The initial value for each capability with the exception of
6590 `GL_DITHER' and `GL_MULTISAMPLE' is `GL_FALSE'. The initial value for
6591 `GL_DITHER' and `GL_MULTISAMPLE' is `GL_TRUE'.
6593 Both `glEnable' and `glDisable' take a single argument, CAP, which can
6594 assume one of the following values:
6599 If enabled, do alpha testing. See `glAlphaFunc'.
6604 If enabled, generate normal vectors when either `GL_MAP2_VERTEX_3'
6605 or `GL_MAP2_VERTEX_4' is used to generate vertices. See `glMap2'.
6610 If enabled, blend the computed fragment color values with the
6611 values in the color buffers. See `glBlendFunc'.
6616 If enabled, clip geometry against user-defined clipping plane I.
6622 If enabled, apply the currently selected logical operation to the
6623 computed fragment color and color buffer values. See `glLogicOp'.
6628 If enabled, have one or more material parameters track the current
6629 color. See `glColorMaterial'.
6634 If enabled and no fragment shader is active, add the secondary
6635 color value to the computed fragment color. See `glSecondaryColor'.
6640 If enabled, perform a color table lookup on the incoming RGBA color
6641 values. See `glColorTable'.
6646 If enabled, perform a 1D convolution operation on incoming RGBA
6647 color values. See `glConvolutionFilter1D'.
6652 If enabled, perform a 2D convolution operation on incoming RGBA
6653 color values. See `glConvolutionFilter2D'.
6658 If enabled, cull polygons based on their winding in window
6659 coordinates. See `glCullFace'.
6664 If enabled, do depth comparisons and update the depth buffer. Note
6665 that even if the depth buffer exists and the depth mask is
6666 non-zero, the depth buffer is not updated if the depth test is
6667 disabled. See `glDepthFunc' and `glDepthRange'.
6672 If enabled, dither color components or indices before they are
6673 written to the color buffer.
6678 If enabled and no fragment shader is active, blend a fog color into
6679 the post-texturing color. See `glFog'.
6684 If enabled, histogram incoming RGBA color values. See
6690 If enabled, apply the currently selected logical operation to the
6691 incoming index and color buffer indices. See `glLogicOp'.
6696 If enabled, include light I in the evaluation of the lighting
6697 equation. See `glLightModel' and `glLight'.
6702 If enabled and no vertex shader is active, use the current lighting
6703 parameters to compute the vertex color or index. Otherwise, simply
6704 associate the current color or index with each vertex. See
6705 `glMaterial', `glLightModel', and `glLight'.
6710 If enabled, draw lines with correct filtering. Otherwise, draw
6711 aliased lines. See `glLineWidth'.
6716 If enabled, use the current line stipple pattern when drawing
6717 lines. See `glLineStipple'.
6722 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6723 `glEvalPoint1' generate RGBA values. See `glMap1'.
6728 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6729 `glEvalPoint1' generate color indices. See `glMap1'.
6734 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6735 `glEvalPoint1' generate normals. See `glMap1'.
6737 `GL_MAP1_TEXTURE_COORD_1'
6740 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6741 `glEvalPoint1' generate S texture coordinates. See `glMap1'.
6743 `GL_MAP1_TEXTURE_COORD_2'
6746 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6747 `glEvalPoint1' generate S and T texture coordinates. See `glMap1'.
6749 `GL_MAP1_TEXTURE_COORD_3'
6752 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6753 `glEvalPoint1' generate S, T, and R texture coordinates. See
6756 `GL_MAP1_TEXTURE_COORD_4'
6759 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6760 `glEvalPoint1' generate S, T, R, and Q texture coordinates. See
6766 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6767 `glEvalPoint1' generate X, Y, and Z vertex coordinates. See
6773 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6774 `glEvalPoint1' generate homogeneous X, Y, Z, and W vertex
6775 coordinates. See `glMap1'.
6780 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6781 `glEvalPoint2' generate RGBA values. See `glMap2'.
6786 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6787 `glEvalPoint2' generate color indices. See `glMap2'.
6792 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6793 `glEvalPoint2' generate normals. See `glMap2'.
6795 `GL_MAP2_TEXTURE_COORD_1'
6798 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6799 `glEvalPoint2' generate S texture coordinates. See `glMap2'.
6801 `GL_MAP2_TEXTURE_COORD_2'
6804 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6805 `glEvalPoint2' generate S and T texture coordinates. See `glMap2'.
6807 `GL_MAP2_TEXTURE_COORD_3'
6810 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6811 `glEvalPoint2' generate S, T, and R texture coordinates. See
6814 `GL_MAP2_TEXTURE_COORD_4'
6817 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6818 `glEvalPoint2' generate S, T, R, and Q texture coordinates. See
6824 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6825 `glEvalPoint2' generate X, Y, and Z vertex coordinates. See
6831 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6832 `glEvalPoint2' generate homogeneous X, Y, Z, and W vertex
6833 coordinates. See `glMap2'.
6838 If enabled, compute the minimum and maximum values of incoming RGBA
6839 color values. See `glMinmax'.
6844 If enabled, use multiple fragment samples in computing the final
6845 color of a pixel. See `glSampleCoverage'.
6850 If enabled and no vertex shader is active, normal vectors are
6851 normalized to unit length after transformation and before lighting.
6852 This method is generally less efficient than `GL_RESCALE_NORMAL'.
6853 See `glNormal' and `glNormalPointer'.
6858 If enabled, draw points with proper filtering. Otherwise, draw
6859 aliased points. See `glPointSize'.
6864 If enabled, calculate texture coordinates for points based on
6865 texture environment and point parameter settings. Otherwise texture
6866 coordinates are constant across points.
6868 `GL_POLYGON_OFFSET_FILL'
6871 If enabled, and if the polygon is rendered in `GL_FILL' mode, an
6872 offset is added to depth values of a polygon's fragments before the
6873 depth comparison is performed. See `glPolygonOffset'.
6875 `GL_POLYGON_OFFSET_LINE'
6878 If enabled, and if the polygon is rendered in `GL_LINE' mode, an
6879 offset is added to depth values of a polygon's fragments before the
6880 depth comparison is performed. See `glPolygonOffset'.
6882 `GL_POLYGON_OFFSET_POINT'
6885 If enabled, an offset is added to depth values of a polygon's
6886 fragments before the depth comparison is performed, if the polygon
6887 is rendered in `GL_POINT' mode. See `glPolygonOffset'.
6892 If enabled, draw polygons with proper filtering. Otherwise, draw
6893 aliased polygons. For correct antialiased polygons, an alpha buffer
6894 is needed and the polygons must be sorted front to back.
6896 `GL_POLYGON_STIPPLE'
6899 If enabled, use the current polygon stipple pattern when rendering
6900 polygons. See `glPolygonStipple'.
6902 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
6905 If enabled, perform a color table lookup on RGBA color values after
6906 color matrix transformation. See `glColorTable'.
6908 `GL_POST_CONVOLUTION_COLOR_TABLE'
6911 If enabled, perform a color table lookup on RGBA color values after
6912 convolution. See `glColorTable'.
6917 If enabled and no vertex shader is active, normal vectors are
6918 scaled after transformation and before lighting by a factor
6919 computed from the modelview matrix. If the modelview matrix scales
6920 space uniformly, this has the effect of restoring the transformed
6921 normal to unit length. This method is generally more efficient than
6922 `GL_NORMALIZE'. See `glNormal' and `glNormalPointer'.
6924 `GL_SAMPLE_ALPHA_TO_COVERAGE'
6927 If enabled, compute a temporary coverage value where each bit is
6928 determined by the alpha value at the corresponding sample location.
6929 The temporary coverage value is then ANDed with the fragment
6932 `GL_SAMPLE_ALPHA_TO_ONE'
6935 If enabled, each sample alpha value is replaced by the maximum
6936 representable alpha value.
6938 `GL_SAMPLE_COVERAGE'
6941 If enabled, the fragment's coverage is ANDed with the temporary
6942 coverage value. If `GL_SAMPLE_COVERAGE_INVERT' is set to `GL_TRUE',
6943 invert the coverage value. See `glSampleCoverage'.
6948 If enabled, perform a two-dimensional convolution operation using a
6949 separable convolution filter on incoming RGBA color values. See
6950 `glSeparableFilter2D'.
6955 If enabled, discard fragments that are outside the scissor
6956 rectangle. See `glScissor'.
6961 If enabled, do stencil testing and update the stencil buffer. See
6962 `glStencilFunc' and `glStencilOp'.
6967 If enabled and no fragment shader is active, one-dimensional
6968 texturing is performed (unless two- or three-dimensional or
6969 cube-mapped texturing is also enabled). See `glTexImage1D'.
6974 If enabled and no fragment shader is active, two-dimensional
6975 texturing is performed (unless three-dimensional or cube-mapped
6976 texturing is also enabled). See `glTexImage2D'.
6981 If enabled and no fragment shader is active, three-dimensional
6982 texturing is performed (unless cube-mapped texturing is also
6983 enabled). See `glTexImage3D'.
6985 `GL_TEXTURE_CUBE_MAP'
6988 If enabled and no fragment shader is active, cube-mapped texturing
6989 is performed. See `glTexImage2D'.
6994 If enabled and no vertex shader is active, the Q texture coordinate
6995 is computed using the texture generation function defined with
6996 `glTexGen'. Otherwise, the current Q texture coordinate is used.
7002 If enabled and no vertex shader is active, the R texture coordinate
7003 is computed using the texture generation function defined with
7004 `glTexGen'. Otherwise, the current R texture coordinate is used.
7010 If enabled and no vertex shader is active, the S texture coordinate
7011 is computed using the texture generation function defined with
7012 `glTexGen'. Otherwise, the current S texture coordinate is used.
7018 If enabled and no vertex shader is active, the T texture coordinate
7019 is computed using the texture generation function defined with
7020 `glTexGen'. Otherwise, the current T texture coordinate is used.
7023 `GL_VERTEX_PROGRAM_POINT_SIZE'
7026 If enabled and a vertex shader is active, then the derived point
7027 size is taken from the (potentially clipped) shader builtin
7028 `gl_PointSize' and clamped to the implementation-dependent point
7031 `GL_VERTEX_PROGRAM_TWO_SIDE'
7034 If enabled and a vertex shader is active, it specifies that the GL
7035 will choose between front and back colors based on the polygon's
7036 face direction of which the vertex being shaded is a part. It has
7037 no effect on points or lines.
7039 `GL_INVALID_ENUM' is generated if CAP is not one of the values listed
7042 `GL_INVALID_OPERATION' is generated if `glEnable' or `glDisable' is
7043 executed between the execution of `glBegin' and the corresponding
7044 execution of `glEnd'.")
7046 (define-gl-procedures
7047 ((glEvalCoord1f (u GLfloat) -> void)
7048 (glEvalCoord1d (u GLdouble) -> void)
7049 (glEvalCoord2f (u GLfloat) (v GLfloat) -> void)
7050 (glEvalCoord2d (u GLdouble) (v GLdouble) -> void)
7051 (glEvalCoord1fv (u const-GLfloat-*) -> void)
7052 (glEvalCoord1dv (u const-GLdouble-*) -> void)
7053 (glEvalCoord2fv (u const-GLfloat-*) -> void)
7054 (glEvalCoord2dv (u const-GLdouble-*) -> void))
7055 "Evaluate enabled one- and two-dimensional maps.
7058 Specifies a value that is the domain coordinate U to the basis
7059 function defined in a previous `glMap1' or `glMap2' command.
7062 Specifies a value that is the domain coordinate V to the basis
7063 function defined in a previous `glMap2' command. This argument is
7064 not present in a `glEvalCoord1' command.
7066 `glEvalCoord1' evaluates enabled one-dimensional maps at argument U.
7067 `glEvalCoord2' does the same for two-dimensional maps using two domain
7068 values, U and V. To define a map, call `glMap1' and `glMap2'; to enable
7069 and disable it, call `glEnable' and `glDisable'.
7071 When one of the `glEvalCoord' commands is issued, all currently enabled
7072 maps of the indicated dimension are evaluated. Then, for each enabled
7073 map, it is as if the corresponding GL command had been issued with the
7074 computed value. That is, if `GL_MAP1_INDEX' or `GL_MAP2_INDEX' is
7075 enabled, a `glIndex' command is simulated. If `GL_MAP1_COLOR_4' or
7076 `GL_MAP2_COLOR_4' is enabled, a `glColor' command is simulated. If
7077 `GL_MAP1_NORMAL' or `GL_MAP2_NORMAL' is enabled, a normal vector is
7078 produced, and if any of `GL_MAP1_TEXTURE_COORD_1',
7079 `GL_MAP1_TEXTURE_COORD_2', `GL_MAP1_TEXTURE_COORD_3',
7080 `GL_MAP1_TEXTURE_COORD_4', `GL_MAP2_TEXTURE_COORD_1',
7081 `GL_MAP2_TEXTURE_COORD_2', `GL_MAP2_TEXTURE_COORD_3', or
7082 `GL_MAP2_TEXTURE_COORD_4' is enabled, then an appropriate `glTexCoord'
7083 command is simulated.
7085 For color, color index, normal, and texture coordinates the GL uses
7086 evaluated values instead of current values for those evaluations that
7087 are enabled, and current values otherwise, However, the evaluated values
7088 do not update the current values. Thus, if `glVertex' commands are
7089 interspersed with `glEvalCoord' commands, the color, normal, and texture
7090 coordinates associated with the `glVertex' commands are not affected by
7091 the values generated by the `glEvalCoord' commands, but only by the most
7092 recent `glColor', `glIndex', `glNormal', and `glTexCoord' commands.
7094 No commands are issued for maps that are not enabled. If more than one
7095 texture evaluation is enabled for a particular dimension (for example,
7096 `GL_MAP2_TEXTURE_COORD_1' and `GL_MAP2_TEXTURE_COORD_2'), then only the
7097 evaluation of the map that produces the larger number of coordinates (in
7098 this case, `GL_MAP2_TEXTURE_COORD_2') is carried out. `GL_MAP1_VERTEX_4'
7099 overrides `GL_MAP1_VERTEX_3', and `GL_MAP2_VERTEX_4' overrides
7100 `GL_MAP2_VERTEX_3', in the same manner. If neither a three- nor a
7101 four-component vertex map is enabled for the specified dimension, the
7102 `glEvalCoord' command is ignored.
7104 If you have enabled automatic normal generation, by calling `glEnable'
7105 with argument `GL_AUTO_NORMAL', `glEvalCoord2' generates surface normals
7106 analytically, regardless of the contents or enabling of the
7107 `GL_MAP2_NORMAL' map. Let
7109 `m'=∂`p',/∂U,,×∂`p',/∂V,,
7111 Then the generated normal `n' is `n'=`m'/∥`m',∥,
7113 If automatic normal generation is disabled, the corresponding normal map
7114 `GL_MAP2_NORMAL', if enabled, is used to produce a normal. If neither
7115 automatic normal generation nor a normal map is enabled, no normal is
7116 generated for `glEvalCoord2' commands.")
7118 (define-gl-procedures
7133 "Compute a one- or two-dimensional grid of points or lines.
7136 In `glEvalMesh1', specifies whether to compute a one-dimensional
7137 mesh of points or lines. Symbolic constants `GL_POINT' and
7138 `GL_LINE' are accepted.
7143 Specify the first and last integer values for grid domain variable
7146 `glMapGrid' and `glEvalMesh' are used in tandem to efficiently generate
7147 and evaluate a series of evenly-spaced map domain values. `glEvalMesh'
7148 steps through the integer domain of a one- or two-dimensional grid,
7149 whose range is the domain of the evaluation maps specified by `glMap1'
7150 and `glMap2'. MODE determines whether the resulting vertices are
7151 connected as points, lines, or filled polygons.
7153 In the one-dimensional case, `glEvalMesh1', the mesh is generated as if
7154 the following code fragment were executed:
7160 for ( i = I1; i <= I2; i += 1 )
7161 glEvalCoord1( i·ΔU+U_1
7168 and N , U_1 , and U_2 are the arguments to the most recent `glMapGrid1'
7169 command. TYPE is `GL_POINTS' if MODE is `GL_POINT', or `GL_LINES' if
7172 The one absolute numeric requirement is that if I=N , then the value
7173 computed from I·ΔU+U_1 is exactly U_2 .
7175 In the two-dimensional case, `glEvalMesh2', let .cp ΔU=(U_2-U_1,)/N
7179 where N , U_1 , U_2 , M , V_1 , and V_2 are the arguments to the most
7180 recent `glMapGrid2' command. Then, if MODE is `GL_FILL', the
7181 `glEvalMesh2' command is equivalent to:
7186 for ( j = J1; j < J2; j += 1 ) {
7187 glBegin( GL_QUAD_STRIP );
7188 for ( i = I1; i <= I2; i += 1 ) {
7189 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7192 glEvalCoord2( i·ΔU+U_1,(j+1,)·ΔV+V_1
7199 If MODE is `GL_LINE', then a call to `glEvalMesh2' is equivalent to:
7204 for ( j = J1; j <= J2; j += 1 ) {
7205 glBegin( GL_LINE_STRIP );
7206 for ( i = I1; i <= I2; i += 1 )
7207 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7213 for ( i = I1; i <= I2; i += 1 ) {
7214 glBegin( GL_LINE_STRIP );
7215 for ( j = J1; j <= J1; j += 1 )
7216 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7222 And finally, if MODE is `GL_POINT', then a call to `glEvalMesh2' is
7228 glBegin( GL_POINTS );
7229 for ( j = J1; j <= J2; j += 1 )
7230 for ( i = I1; i <= I2; i += 1 )
7231 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7236 In all three cases, the only absolute numeric requirements are that if
7237 I=N , then the value computed from I·ΔU+U_1 is exactly U_2 , and if J=M
7238 , then the value computed from J·ΔV+V_1 is exactly V_2 .
7240 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
7242 `GL_INVALID_OPERATION' is generated if `glEvalMesh' is executed between
7243 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7245 (define-gl-procedures
7246 ((glEvalPoint1 (i GLint) -> void)
7247 (glEvalPoint2 (i GLint) (j GLint) -> void))
7248 "Generate and evaluate a single point in a mesh.
7251 Specifies the integer value for grid domain variable I .
7254 Specifies the integer value for grid domain variable J
7255 (`glEvalPoint2' only).
7257 `glMapGrid' and `glEvalMesh' are used in tandem to efficiently generate
7258 and evaluate a series of evenly spaced map domain values. `glEvalPoint'
7259 can be used to evaluate a single grid point in the same gridspace that
7260 is traversed by `glEvalMesh'. Calling `glEvalPoint1' is equivalent to
7261 calling where ΔU=(U_2-U_1,)/N
7264 glEvalCoord1( i·ΔU+U_1
7268 and N , U_1 , and U_2 are the arguments to the most recent `glMapGrid1'
7269 command. The one absolute numeric requirement is that if I=N , then the
7270 value computed from I·ΔU+U_1 is exactly U_2 .
7272 In the two-dimensional case, `glEvalPoint2', let
7274 ΔU=(U_2-U_1,)/N ΔV=(V_2-V_1,)/M
7276 where N , U_1 , U_2 , M , V_1 , and V_2 are the arguments to the most
7277 recent `glMapGrid2' command. Then the `glEvalPoint2' command is
7278 equivalent to calling The only absolute numeric requirements are that if
7279 I=N , then the value computed from I·ΔU+U_1 is exactly U_2 , and if J=M
7280 , then the value computed from J·ΔV+V_1 is exactly V_2 .
7283 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
7287 (define-gl-procedures
7294 "Controls feedback mode.
7297 Specifies the maximum number of values that can be written into
7301 Specifies a symbolic constant that describes the information that
7302 will be returned for each vertex. `GL_2D', `GL_3D', `GL_3D_COLOR',
7303 `GL_3D_COLOR_TEXTURE', and `GL_4D_COLOR_TEXTURE' are accepted.
7306 Returns the feedback data.
7308 The `glFeedbackBuffer' function controls feedback. Feedback, like
7309 selection, is a GL mode. The mode is selected by calling `glRenderMode'
7310 with `GL_FEEDBACK'. When the GL is in feedback mode, no pixels are
7311 produced by rasterization. Instead, information about primitives that
7312 would have been rasterized is fed back to the application using the GL.
7314 `glFeedbackBuffer' has three arguments: BUFFER is a pointer to an array
7315 of floating-point values into which feedback information is placed. SIZE
7316 indicates the size of the array. TYPE is a symbolic constant describing
7317 the information that is fed back for each vertex. `glFeedbackBuffer'
7318 must be issued before feedback mode is enabled (by calling
7319 `glRenderMode' with argument `GL_FEEDBACK'). Setting `GL_FEEDBACK'
7320 without establishing the feedback buffer, or calling `glFeedbackBuffer'
7321 while the GL is in feedback mode, is an error.
7323 When `glRenderMode' is called while in feedback mode, it returns the
7324 number of entries placed in the feedback array and resets the feedback
7325 array pointer to the base of the feedback buffer. The returned value
7326 never exceeds SIZE. If the feedback data required more room than was
7327 available in BUFFER, `glRenderMode' returns a negative value. To take
7328 the GL out of feedback mode, call `glRenderMode' with a parameter value
7329 other than `GL_FEEDBACK'.
7331 While in feedback mode, each primitive, bitmap, or pixel rectangle that
7332 would be rasterized generates a block of values that are copied into the
7333 feedback array. If doing so would cause the number of entries to exceed
7334 the maximum, the block is partially written so as to fill the array (if
7335 there is any room left at all), and an overflow flag is set. Each block
7336 begins with a code indicating the primitive type, followed by values
7337 that describe the primitive's vertices and associated data. Entries are
7338 also written for bitmaps and pixel rectangles. Feedback occurs after
7339 polygon culling and `glPolygonMode' interpretation of polygons has taken
7340 place, so polygons that are culled are not returned in the feedback
7341 buffer. It can also occur after polygons with more than three edges are
7342 broken up into triangles, if the GL implementation renders polygons by
7343 performing this decomposition.
7345 The `glPassThrough' command can be used to insert a marker into the
7346 feedback buffer. See `glPassThrough'.
7348 Following is the grammar for the blocks of values written into the
7349 feedback buffer. Each primitive is indicated with a unique identifying
7350 value followed by some number of vertices. Polygon entries include an
7351 integer value indicating how many vertices follow. A vertex is fed back
7352 as some number of floating-point values, as determined by TYPE. Colors
7353 are fed back as four values in RGBA mode and one value in color index
7356 feedbackList ← feedbackItem feedbackList | feedbackItem feedbackItem ←
7357 point | lineSegment | polygon | bitmap | pixelRectangle | passThru point
7358 ← `GL_POINT_TOKEN' vertex lineSegment ← `GL_LINE_TOKEN' vertex vertex |
7359 `GL_LINE_RESET_TOKEN' vertex vertex polygon ← `GL_POLYGON_TOKEN' n
7360 polySpec polySpec ← polySpec vertex | vertex vertex vertex bitmap ←
7361 `GL_BITMAP_TOKEN' vertex pixelRectangle ← `GL_DRAW_PIXEL_TOKEN' vertex |
7362 `GL_COPY_PIXEL_TOKEN' vertex passThru ← `GL_PASS_THROUGH_TOKEN' value
7363 vertex ← 2d | 3d | 3dColor | 3dColorTexture | 4dColorTexture 2d ← value
7364 value 3d ← value value value 3dColor ← value value value color
7365 3dColorTexture ← value value value color tex 4dColorTexture ← value
7366 value value value color tex color ← rgba | index rgba ← value value
7367 value value index ← value tex ← value value value value
7369 VALUE is a floating-point number, and N is a floating-point integer
7370 giving the number of vertices in the polygon. `GL_POINT_TOKEN',
7371 `GL_LINE_TOKEN', `GL_LINE_RESET_TOKEN', `GL_POLYGON_TOKEN',
7372 `GL_BITMAP_TOKEN', `GL_DRAW_PIXEL_TOKEN', `GL_COPY_PIXEL_TOKEN' and
7373 `GL_PASS_THROUGH_TOKEN' are symbolic floating-point constants.
7374 `GL_LINE_RESET_TOKEN' is returned whenever the line stipple pattern is
7375 reset. The data returned as a vertex depends on the feedback TYPE.
7377 The following table gives the correspondence between TYPE and the number
7378 of values per vertex. K is 1 in color index mode and 4 in RGBA mode.
7383 *Coordinates*, *Color*, *Texture*, *Total Number of Values*
7394 `GL_3D_COLOR_TEXTURE'
7395 X, Y, Z, K , 4 , 7+K
7397 `GL_4D_COLOR_TEXTURE'
7398 X, Y, Z, W, K , 4 , 8+K
7400 Feedback vertex coordinates are in window coordinates, except W, which
7401 is in clip coordinates. Feedback colors are lighted, if lighting is
7402 enabled. Feedback texture coordinates are generated, if texture
7403 coordinate generation is enabled. They are always transformed by the
7406 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
7408 `GL_INVALID_VALUE' is generated if SIZE is negative.
7410 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is called
7411 while the render mode is `GL_FEEDBACK', or if `glRenderMode' is called
7412 with argument `GL_FEEDBACK' before `glFeedbackBuffer' is called at least
7415 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is executed
7416 between the execution of `glBegin' and the corresponding execution of
7419 (define-gl-procedures
7420 ((glFinish -> void))
7421 "Block until all GL execution is complete.
7423 `glFinish' does not return until the effects of all previously called GL
7424 commands are complete. Such effects include all changes to GL state, all
7425 changes to connection state, and all changes to the frame buffer
7428 `GL_INVALID_OPERATION' is generated if `glFinish' is executed between
7429 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7431 (define-gl-procedures
7433 "Force execution of GL commands in finite time.
7435 Different GL implementations buffer commands in several different
7436 locations, including network buffers and the graphics accelerator
7437 itself. `glFlush' empties all of these buffers, causing all issued
7438 commands to be executed as quickly as they are accepted by the actual
7439 rendering engine. Though this execution may not be completed in any
7440 particular time period, it does complete in finite time.
7442 Because any GL program might be executed over a network, or on an
7443 accelerator that buffers commands, all programs should call `glFlush'
7444 whenever they count on having all of their previously issued commands
7445 completed. For example, call `glFlush' before waiting for user input
7446 that depends on the generated image.
7448 `GL_INVALID_OPERATION' is generated if `glFlush' is executed between the
7449 execution of `glBegin' and the corresponding execution of `glEnd'.")
7451 (define-gl-procedures
7458 "Define an array of fog coordinates.
7461 Specifies the data type of each fog coordinate. Symbolic constants
7462 `GL_FLOAT', or `GL_DOUBLE' are accepted. The initial value is
7466 Specifies the byte offset between consecutive fog coordinates. If
7467 STRIDE is 0, the array elements are understood to be tightly
7468 packed. The initial value is 0.
7471 Specifies a pointer to the first coordinate of the first fog
7472 coordinate in the array. The initial value is 0.
7474 `glFogCoordPointer' specifies the location and data format of an array
7475 of fog coordinates to use when rendering. TYPE specifies the data type
7476 of each fog coordinate, and STRIDE specifies the byte stride from one
7477 fog coordinate to the next, allowing vertices and attributes to be
7478 packed into a single array or stored in separate arrays.
7480 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
7481 target (see `glBindBuffer') while a fog coordinate array is specified,
7482 POINTER is treated as a byte offset into the buffer object's data store.
7483 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
7484 fog coordinate vertex array client-side state
7485 (`GL_FOG_COORD_ARRAY_BUFFER_BINDING').
7487 When a fog coordinate array is specified, TYPE, STRIDE, and POINTER are
7488 saved as client-side state, in addition to the current vertex array
7489 buffer object binding.
7491 To enable and disable the fog coordinate array, call
7492 `glEnableClientState' and `glDisableClientState' with the argument
7493 `GL_FOG_COORD_ARRAY'. If enabled, the fog coordinate array is used when
7494 `glDrawArrays', `glMultiDrawArrays', `glDrawElements',
7495 `glMultiDrawElements', `glDrawRangeElements', or `glArrayElement' is
7498 `GL_INVALID_ENUM' is generated if TYPE is not either `GL_FLOAT' or
7501 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
7503 (define-gl-procedures
7504 ((glFogCoordd (coord GLdouble) -> void)
7505 (glFogCoordf (coord GLfloat) -> void)
7506 (glFogCoorddv (coord GLdouble-*) -> void)
7507 (glFogCoordfv (coord GLfloat-*) -> void))
7508 "Set the current fog coordinates.
7511 Specify the fog distance.
7513 `glFogCoord' specifies the fog coordinate that is associated with each
7514 vertex and the current raster position. The value specified is
7515 interpolated and used in computing the fog color (see `glFog').")
7517 (define-gl-procedures
7518 ((glFogf (pname GLenum) (param GLfloat) -> void)
7519 (glFogi (pname GLenum) (param GLint) -> void)
7522 (params const-GLfloat-*)
7527 (params const-GLint-*)
7530 "Specify fog parameters.
7533 Specifies a single-valued fog parameter. `GL_FOG_MODE',
7534 `GL_FOG_DENSITY', `GL_FOG_START', `GL_FOG_END', `GL_FOG_INDEX', and
7535 `GL_FOG_COORD_SRC' are accepted.
7538 Specifies the value that PNAME will be set to.
7540 Fog is initially disabled. While enabled, fog affects rasterized
7541 geometry, bitmaps, and pixel blocks, but not buffer clear operations. To
7542 enable and disable fog, call `glEnable' and `glDisable' with argument
7545 `glFog' assigns the value or values in PARAMS to the fog parameter
7546 specified by PNAME. The following values are accepted for PNAME:
7549 PARAMS is a single integer or floating-point value that specifies
7550 the equation to be used to compute the fog blend factor, F . Three
7551 symbolic constants are accepted: `GL_LINEAR', `GL_EXP', and
7552 `GL_EXP2'. The equations corresponding to these symbolic constants
7553 are defined below. The initial fog mode is `GL_EXP'.
7556 PARAMS is a single integer or floating-point value that specifies
7557 DENSITY , the fog density used in both exponential fog equations.
7558 Only nonnegative densities are accepted. The initial fog density is
7562 PARAMS is a single integer or floating-point value that specifies
7563 START , the near distance used in the linear fog equation. The
7564 initial near distance is 0.
7567 PARAMS is a single integer or floating-point value that specifies
7568 END , the far distance used in the linear fog equation. The initial
7572 PARAMS is a single integer or floating-point value that specifies
7573 I_F , the fog color index. The initial fog index is 0.
7576 PARAMS contains four integer or floating-point values that specify
7577 C_F , the fog color. Integer values are mapped linearly such that
7578 the most positive representable value maps to 1.0, and the most
7579 negative representable value maps to -1.0 . Floating-point values
7580 are mapped directly. After conversion, all color components are
7581 clamped to the range [0,1] . The initial fog color is (0, 0, 0, 0).
7584 PARAMS contains either of the following symbolic constants:
7585 `GL_FOG_COORD' or `GL_FRAGMENT_DEPTH'. `GL_FOG_COORD' specifies
7586 that the current fog coordinate should be used as distance value in
7587 the fog color computation. `GL_FRAGMENT_DEPTH' specifies that the
7588 current fragment depth should be used as distance value in the fog
7591 Fog blends a fog color with each rasterized pixel fragment's
7592 post-texturing color using a blending factor F . Factor F is computed in
7593 one of three ways, depending on the fog mode. Let C be either the
7594 distance in eye coordinate from the origin (in the case that the
7595 `GL_FOG_COORD_SRC' is `GL_FRAGMENT_DEPTH') or the current fog coordinate
7596 (in the case that `GL_FOG_COORD_SRC' is `GL_FOG_COORD'). The equation
7597 for `GL_LINEAR' fog is F=END-C,/END-START,
7599 The equation for `GL_EXP' fog is F=E^-(DENSITY·C,),
7601 The equation for `GL_EXP2' fog is F=E^-(DENSITY·C,),^2
7603 Regardless of the fog mode, F is clamped to the range [0,1] after it is
7604 computed. Then, if the GL is in RGBA color mode, the fragment's red,
7605 green, and blue colors, represented by C_R , are replaced by
7607 C_R,^″=F×C_R+(1-F,)×C_F
7609 Fog does not affect a fragment's alpha component.
7611 In color index mode, the fragment's color index I_R is replaced by
7613 I_R,^″=I_R+(1-F,)×I_F
7617 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value, or if
7618 PNAME is `GL_FOG_MODE' and PARAMS is not an accepted value.
7620 `GL_INVALID_VALUE' is generated if PNAME is `GL_FOG_DENSITY' and PARAMS
7623 `GL_INVALID_OPERATION' is generated if `glFog' is executed between the
7624 execution of `glBegin' and the corresponding execution of `glEnd'.")
7626 (define-gl-procedures
7627 ((glFrontFace (mode GLenum) -> void))
7628 "Define front- and back-facing polygons.
7631 Specifies the orientation of front-facing polygons. `GL_CW' and
7632 `GL_CCW' are accepted. The initial value is `GL_CCW'.
7634 In a scene composed entirely of opaque closed surfaces, back-facing
7635 polygons are never visible. Eliminating these invisible polygons has the
7636 obvious benefit of speeding up the rendering of the image. To enable and
7637 disable elimination of back-facing polygons, call `glEnable' and
7638 `glDisable' with argument `GL_CULL_FACE'.
7640 The projection of a polygon to window coordinates is said to have
7641 clockwise winding if an imaginary object following the path from its
7642 first vertex, its second vertex, and so on, to its last vertex, and
7643 finally back to its first vertex, moves in a clockwise direction about
7644 the interior of the polygon. The polygon's winding is said to be
7645 counterclockwise if the imaginary object following the same path moves
7646 in a counterclockwise direction about the interior of the polygon.
7647 `glFrontFace' specifies whether polygons with clockwise winding in
7648 window coordinates, or counterclockwise winding in window coordinates,
7649 are taken to be front-facing. Passing `GL_CCW' to MODE selects
7650 counterclockwise polygons as front-facing; `GL_CW' selects clockwise
7651 polygons as front-facing. By default, counterclockwise polygons are
7652 taken to be front-facing.
7654 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
7656 `GL_INVALID_OPERATION' is generated if `glFrontFace' is executed between
7657 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7659 (define-gl-procedures
7669 "Multiply the current matrix by a perspective matrix.
7674 Specify the coordinates for the left and right vertical clipping
7680 Specify the coordinates for the bottom and top horizontal clipping
7686 Specify the distances to the near and far depth clipping planes.
7687 Both distances must be positive.
7689 `glFrustum' describes a perspective matrix that produces a perspective
7690 projection. The current matrix (see `glMatrixMode') is multiplied by
7691 this matrix and the result replaces the current matrix, as if
7692 `glMultMatrix' were called with the following matrix as its argument:
7696 [(2\u2062NEARVAL,/RIGHT-LEFT,, 0 A 0), (0 2\u2062NEARVAL,/TOP-BOTTOM,, B 0), (0 0
7699 A=RIGHT+LEFT,/RIGHT-LEFT,
7701 B=TOP+BOTTOM,/TOP-BOTTOM,
7703 C=-FARVAL+NEARVAL,/FARVAL-NEARVAL,,
7705 D=-2\u2062FARVAL\u2062NEARVAL,/FARVAL-NEARVAL,,
7709 Typically, the matrix mode is `GL_PROJECTION', and (LEFT,BOTTOM-NEARVAL)
7710 and (RIGHT,TOP-NEARVAL) specify the points on the near clipping plane
7711 that are mapped to the lower left and upper right corners of the window,
7712 assuming that the eye is located at (0, 0, 0). -FARVAL specifies the
7713 location of the far clipping plane. Both NEARVAL and FARVAL must be
7716 Use `glPushMatrix' and `glPopMatrix' to save and restore the current
7719 `GL_INVALID_VALUE' is generated if NEARVAL or FARVAL is not positive, or
7720 if LEFT = RIGHT, or BOTTOM = TOP, or NEAR = FAR.
7722 `GL_INVALID_OPERATION' is generated if `glFrustum' is executed between
7723 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7725 (define-gl-procedures
7731 "Generate buffer object names.
7734 Specifies the number of buffer object names to be generated.
7737 Specifies an array in which the generated buffer object names are
7740 `glGenBuffers' returns N buffer object names in BUFFERS. There is no
7741 guarantee that the names form a contiguous set of integers; however, it
7742 is guaranteed that none of the returned names was in use immediately
7743 before the call to `glGenBuffers'.
7745 Buffer object names returned by a call to `glGenBuffers' are not
7746 returned by subsequent calls, unless they are first deleted with
7749 No buffer objects are associated with the returned buffer object names
7750 until they are first bound by calling `glBindBuffer'.
7752 `GL_INVALID_VALUE' is generated if N is negative.
7754 `GL_INVALID_OPERATION' is generated if `glGenBuffers' is executed
7755 between the execution of `glBegin' and the corresponding execution of
7758 (define-gl-procedures
7759 ((glGenLists (range GLsizei) -> GLuint))
7760 "Generate a contiguous set of empty display lists.
7763 Specifies the number of contiguous empty display lists to be
7766 `glGenLists' has one argument, RANGE. It returns an integer N such that
7767 RANGE contiguous empty display lists, named N , N+1 , ... , N+RANGE-1 ,
7768 are created. If RANGE is 0, if there is no group of RANGE contiguous
7769 names available, or if any error is generated, no display lists are
7770 generated, and 0 is returned.
7772 `GL_INVALID_VALUE' is generated if RANGE is negative.
7774 `GL_INVALID_OPERATION' is generated if `glGenLists' is executed between
7775 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7777 (define-gl-procedures
7778 ((glGenQueries (n GLsizei) (ids GLuint-*) -> void))
7779 "Generate query object names.
7782 Specifies the number of query object names to be generated.
7785 Specifies an array in which the generated query object names are
7788 `glGenQueries' returns N query object names in IDS. There is no
7789 guarantee that the names form a contiguous set of integers; however, it
7790 is guaranteed that none of the returned names was in use immediately
7791 before the call to `glGenQueries'.
7793 Query object names returned by a call to `glGenQueries' are not returned
7794 by subsequent calls, unless they are first deleted with
7797 No query objects are associated with the returned query object names
7798 until they are first used by calling `glBeginQuery'.
7800 `GL_INVALID_VALUE' is generated if N is negative.
7802 `GL_INVALID_OPERATION' is generated if `glGenQueries' is executed
7803 between the execution of `glBegin' and the corresponding execution of
7806 (define-gl-procedures
7812 "Generate texture names.
7815 Specifies the number of texture names to be generated.
7818 Specifies an array in which the generated texture names are stored.
7820 `glGenTextures' returns N texture names in TEXTURES. There is no
7821 guarantee that the names form a contiguous set of integers; however, it
7822 is guaranteed that none of the returned names was in use immediately
7823 before the call to `glGenTextures'.
7825 The generated textures have no dimensionality; they assume the
7826 dimensionality of the texture target to which they are first bound (see
7829 Texture names returned by a call to `glGenTextures' are not returned by
7830 subsequent calls, unless they are first deleted with `glDeleteTextures'.
7832 `GL_INVALID_VALUE' is generated if N is negative.
7834 `GL_INVALID_OPERATION' is generated if `glGenTextures' is executed
7835 between the execution of `glBegin' and the corresponding execution of
7838 (define-gl-procedures
7849 "Returns information about an active attribute variable for the specified
7853 Specifies the program object to be queried.
7856 Specifies the index of the attribute variable to be queried.
7859 Specifies the maximum number of characters OpenGL is allowed to
7860 write in the character buffer indicated by NAME.
7863 Returns the number of characters actually written by OpenGL in the
7864 string indicated by NAME (excluding the null terminator) if a value
7865 other than `NULL' is passed.
7868 Returns the size of the attribute variable.
7871 Returns the data type of the attribute variable.
7874 Returns a null terminated string containing the name of the
7877 `glGetActiveAttrib' returns information about an active attribute
7878 variable in the program object specified by PROGRAM. The number of
7879 active attributes can be obtained by calling `glGetProgram' with the
7880 value `GL_ACTIVE_ATTRIBUTES'. A value of 0 for INDEX selects the first
7881 active attribute variable. Permissible values for INDEX range from 0 to
7882 the number of active attribute variables minus 1.
7884 A vertex shader may use either built-in attribute variables,
7885 user-defined attribute variables, or both. Built-in attribute variables
7886 have a prefix of \"gl_\" and reference conventional OpenGL vertex
7887 attribtes (e.g., GL_VERTEX, GL_NORMAL, etc., see the OpenGL Shading
7888 Language specification for a complete list.) User-defined attribute
7889 variables have arbitrary names and obtain their values through numbered
7890 generic vertex attributes. An attribute variable (either built-in or
7891 user-defined) is considered active if it is determined during the link
7892 operation that it may be accessed during program execution. Therefore,
7893 PROGRAM should have previously been the target of a call to
7894 `glLinkProgram', but it is not necessary for it to have been linked
7897 The size of the character buffer required to store the longest attribute
7898 variable name in PROGRAM can be obtained by calling `glGetProgram' with
7899 the value `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH'. This value should be used to
7900 allocate a buffer of sufficient size to store the returned attribute
7901 name. The size of this character buffer is passed in BUFSIZE, and a
7902 pointer to this character buffer is passed in NAME.
7904 `glGetActiveAttrib' returns the name of the attribute variable indicated
7905 by INDEX, storing it in the character buffer specified by NAME. The
7906 string returned will be null terminated. The actual number of characters
7907 written into this buffer is returned in LENGTH, and this count does not
7908 include the null termination character. If the length of the returned
7909 string is not required, a value of `NULL' can be passed in the LENGTH
7912 The TYPE argument will return a pointer to the attribute variable's data
7913 type. The symbolic constants `GL_FLOAT', `GL_FLOAT_VEC2',
7914 `GL_FLOAT_VEC3', `GL_FLOAT_VEC4', `GL_FLOAT_MAT2', `GL_FLOAT_MAT3',
7915 `GL_FLOAT_MAT4', `GL_FLOAT_MAT2x3', `GL_FLOAT_MAT2x4',
7916 `GL_FLOAT_MAT3x2', `GL_FLOAT_MAT3x4', `GL_FLOAT_MAT4x2', or
7917 `GL_FLOAT_MAT4x3' may be returned. The SIZE argument will return the
7918 size of the attribute, in units of the type returned in TYPE.
7920 The list of active attribute variables may include both built-in
7921 attribute variables (which begin with the prefix \"gl_\") as well as
7922 user-defined attribute variable names.
7924 This function will return as much information as it can about the
7925 specified active attribute variable. If no information is available,
7926 LENGTH will be 0, and NAME will be an empty string. This situation could
7927 occur if this function is called after a link operation that failed. If
7928 an error occurs, the return values LENGTH, SIZE, TYPE, and NAME will be
7931 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
7934 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
7936 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to the
7937 number of active attribute variables in PROGRAM.
7939 `GL_INVALID_OPERATION' is generated if `glGetActiveAttrib' is executed
7940 between the execution of `glBegin' and the corresponding execution of
7943 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.")
7945 (define-gl-procedures
7946 ((glGetActiveUniform
7956 "Returns information about an active uniform variable for the specified
7960 Specifies the program object to be queried.
7963 Specifies the index of the uniform variable to be queried.
7966 Specifies the maximum number of characters OpenGL is allowed to
7967 write in the character buffer indicated by NAME.
7970 Returns the number of characters actually written by OpenGL in the
7971 string indicated by NAME (excluding the null terminator) if a value
7972 other than `NULL' is passed.
7975 Returns the size of the uniform variable.
7978 Returns the data type of the uniform variable.
7981 Returns a null terminated string containing the name of the uniform
7984 `glGetActiveUniform' returns information about an active uniform
7985 variable in the program object specified by PROGRAM. The number of
7986 active uniform variables can be obtained by calling `glGetProgram' with
7987 the value `GL_ACTIVE_UNIFORMS'. A value of 0 for INDEX selects the first
7988 active uniform variable. Permissible values for INDEX range from 0 to
7989 the number of active uniform variables minus 1.
7991 Shaders may use either built-in uniform variables, user-defined uniform
7992 variables, or both. Built-in uniform variables have a prefix of \"gl_\"
7993 and reference existing OpenGL state or values derived from such state
7994 (e.g., GL_FOG, GL_MODELVIEWMATRIX, etc., see the OpenGL Shading Language
7995 specification for a complete list.) User-defined uniform variables have
7996 arbitrary names and obtain their values from the application through
7997 calls to `glUniform'. A uniform variable (either built-in or
7998 user-defined) is considered active if it is determined during the link
7999 operation that it may be accessed during program execution. Therefore,
8000 PROGRAM should have previously been the target of a call to
8001 `glLinkProgram', but it is not necessary for it to have been linked
8004 The size of the character buffer required to store the longest uniform
8005 variable name in PROGRAM can be obtained by calling `glGetProgram' with
8006 the value `GL_ACTIVE_UNIFORM_MAX_LENGTH'. This value should be used to
8007 allocate a buffer of sufficient size to store the returned uniform
8008 variable name. The size of this character buffer is passed in BUFSIZE,
8009 and a pointer to this character buffer is passed in NAME.
8011 `glGetActiveUniform' returns the name of the uniform variable indicated
8012 by INDEX, storing it in the character buffer specified by NAME. The
8013 string returned will be null terminated. The actual number of characters
8014 written into this buffer is returned in LENGTH, and this count does not
8015 include the null termination character. If the length of the returned
8016 string is not required, a value of `NULL' can be passed in the LENGTH
8019 The TYPE argument will return a pointer to the uniform variable's data
8020 type. The symbolic constants `GL_FLOAT', `GL_FLOAT_VEC2',
8021 `GL_FLOAT_VEC3', `GL_FLOAT_VEC4', `GL_INT', `GL_INT_VEC2',
8022 `GL_INT_VEC3', `GL_INT_VEC4', `GL_BOOL', `GL_BOOL_VEC2', `GL_BOOL_VEC3',
8023 `GL_BOOL_VEC4', `GL_FLOAT_MAT2', `GL_FLOAT_MAT3', `GL_FLOAT_MAT4',
8024 `GL_FLOAT_MAT2x3', `GL_FLOAT_MAT2x4', `GL_FLOAT_MAT3x2',
8025 `GL_FLOAT_MAT3x4', `GL_FLOAT_MAT4x2', `GL_FLOAT_MAT4x3',
8026 `GL_SAMPLER_1D', `GL_SAMPLER_2D', `GL_SAMPLER_3D', `GL_SAMPLER_CUBE',
8027 `GL_SAMPLER_1D_SHADOW', or `GL_SAMPLER_2D_SHADOW' may be returned.
8029 If one or more elements of an array are active, the name of the array is
8030 returned in NAME, the type is returned in TYPE, and the SIZE parameter
8031 returns the highest array element index used, plus one, as determined by
8032 the compiler and/or linker. Only one active uniform variable will be
8033 reported for a uniform array.
8035 Uniform variables that are declared as structures or arrays of
8036 structures will not be returned directly by this function. Instead, each
8037 of these uniform variables will be reduced to its fundamental components
8038 containing the \".\" and \"[]\" operators such that each of the names is
8039 valid as an argument to `glGetUniformLocation'. Each of these reduced
8040 uniform variables is counted as one active uniform variable and is
8041 assigned an index. A valid name cannot be a structure, an array of
8042 structures, or a subcomponent of a vector or matrix.
8044 The size of the uniform variable will be returned in SIZE. Uniform
8045 variables other than arrays will have a size of 1. Structures and arrays
8046 of structures will be reduced as described earlier, such that each of
8047 the names returned will be a data type in the earlier list. If this
8048 reduction results in an array, the size returned will be as described
8049 for uniform arrays; otherwise, the size returned will be 1.
8051 The list of active uniform variables may include both built-in uniform
8052 variables (which begin with the prefix \"gl_\") as well as user-defined
8053 uniform variable names.
8055 This function will return as much information as it can about the
8056 specified active uniform variable. If no information is available,
8057 LENGTH will be 0, and NAME will be an empty string. This situation could
8058 occur if this function is called after a link operation that failed. If
8059 an error occurs, the return values LENGTH, SIZE, TYPE, and NAME will be
8062 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
8065 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
8067 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to the
8068 number of active uniform variables in PROGRAM.
8070 `GL_INVALID_OPERATION' is generated if `glGetActiveUniform' is executed
8071 between the execution of `glBegin' and the corresponding execution of
8074 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.")
8076 (define-gl-procedures
8077 ((glGetAttachedShaders
8084 "Returns the handles of the shader objects attached to a program object.
8087 Specifies the program object to be queried.
8090 Specifies the size of the array for storing the returned object
8094 Returns the number of names actually returned in OBJECTS.
8097 Specifies an array that is used to return the names of attached
8100 `glGetAttachedShaders' returns the names of the shader objects attached
8101 to PROGRAM. The names of shader objects that are attached to PROGRAM
8102 will be returned in SHADERS. The actual number of shader names written
8103 into SHADERS is returned in COUNT. If no shader objects are attached to
8104 PROGRAM, COUNT is set to 0. The maximum number of shader names that may
8105 be returned in SHADERS is specified by MAXCOUNT.
8107 If the number of names actually returned is not required (for instance,
8108 if it has just been obtained by calling `glGetProgram'), a value of
8109 `NULL' may be passed for count. If no shader objects are attached to
8110 PROGRAM, a value of 0 will be returned in COUNT. The actual number of
8111 attached shaders can be obtained by calling `glGetProgram' with the
8112 value `GL_ATTACHED_SHADERS'.
8114 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
8117 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
8119 `GL_INVALID_VALUE' is generated if MAXCOUNT is less than 0.
8121 `GL_INVALID_OPERATION' is generated if `glGetAttachedShaders' is
8122 executed between the execution of `glBegin' and the corresponding
8123 execution of `glEnd'.")
8125 (define-gl-procedures
8126 ((glGetAttribLocation
8128 (name const-GLchar-*)
8131 "Returns the location of an attribute variable.
8134 Specifies the program object to be queried.
8137 Points to a null terminated string containing the name of the
8138 attribute variable whose location is to be queried.
8140 `glGetAttribLocation' queries the previously linked program object
8141 specified by PROGRAM for the attribute variable specified by NAME and
8142 returns the index of the generic vertex attribute that is bound to that
8143 attribute variable. If NAME is a matrix attribute variable, the index of
8144 the first column of the matrix is returned. If the named attribute
8145 variable is not an active attribute in the specified program object or
8146 if NAME starts with the reserved prefix \"gl_\", a value of -1 is
8149 The association between an attribute variable name and a generic
8150 attribute index can be specified at any time by calling
8151 `glBindAttribLocation'. Attribute bindings do not go into effect until
8152 `glLinkProgram' is called. After a program object has been linked
8153 successfully, the index values for attribute variables remain fixed
8154 until the next link command occurs. The attribute values can only be
8155 queried after a link if the link was successful. `glGetAttribLocation'
8156 returns the binding that actually went into effect the last time
8157 `glLinkProgram' was called for the specified program object. Attribute
8158 bindings that have been specified since the last link operation are not
8159 returned by `glGetAttribLocation'.
8161 `GL_INVALID_OPERATION' is generated if PROGRAM is not a value generated
8164 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
8166 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
8169 `GL_INVALID_OPERATION' is generated if `glGetAttribLocation' is executed
8170 between the execution of `glBegin' and the corresponding execution of
8173 (define-gl-procedures
8174 ((glGetBufferParameteriv
8180 "Return parameters of a buffer object.
8183 Specifies the target buffer object. The symbolic constant must be
8184 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
8185 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
8188 Specifies the symbolic name of a buffer object parameter. Accepted
8189 values are `GL_BUFFER_ACCESS', `GL_BUFFER_MAPPED',
8190 `GL_BUFFER_SIZE', or `GL_BUFFER_USAGE'.
8193 Returns the requested parameter.
8195 `glGetBufferParameteriv' returns in DATA a selected parameter of the
8196 buffer object specified by TARGET.
8198 VALUE names a specific buffer object parameter, as follows:
8201 PARAMS returns the access policy set while mapping the buffer
8202 object. The initial value is `GL_READ_WRITE'.
8205 PARAMS returns a flag indicating whether the buffer object is
8206 currently mapped. The initial value is `GL_FALSE'.
8209 PARAMS returns the size of the buffer object, measured in bytes.
8210 The initial value is 0.
8213 PARAMS returns the buffer object's usage pattern. The initial value
8214 is `GL_STATIC_DRAW'.
8216 `GL_INVALID_ENUM' is generated if TARGET or VALUE is not an accepted
8219 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
8222 `GL_INVALID_OPERATION' is generated if `glGetBufferParameteriv' is
8223 executed between the execution of `glBegin' and the corresponding
8224 execution of `glEnd'.")
8226 (define-gl-procedures
8227 ((glGetBufferPointerv
8233 "Return the pointer to a mapped buffer object's data store.
8236 Specifies the target buffer object. The symbolic constant must be
8237 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
8238 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
8241 Specifies the pointer to be returned. The symbolic constant must be
8242 `GL_BUFFER_MAP_POINTER'.
8245 Returns the pointer value specified by PNAME.
8247 `glGetBufferPointerv' returns pointer information. PNAME is a symbolic
8248 constant indicating the pointer to be returned, which must be
8249 `GL_BUFFER_MAP_POINTER', the pointer to which the buffer object's data
8250 store is mapped. If the data store is not currently mapped, `NULL' is
8251 returned. PARAMS is a pointer to a location in which to place the
8252 returned pointer value.
8254 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
8257 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
8260 `GL_INVALID_OPERATION' is generated if `glGetBufferPointerv' is executed
8261 between the execution of `glBegin' and the corresponding execution of
8264 (define-gl-procedures
8265 ((glGetBufferSubData
8272 "Returns a subset of a buffer object's data store.
8275 Specifies the target buffer object. The symbolic constant must be
8276 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
8277 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
8280 Specifies the offset into the buffer object's data store from which
8281 data will be returned, measured in bytes.
8284 Specifies the size in bytes of the data store region being
8288 Specifies a pointer to the location where buffer object data is
8291 `glGetBufferSubData' returns some or all of the data from the buffer
8292 object currently bound to TARGET. Data starting at byte offset OFFSET
8293 and extending for SIZE bytes is copied from the data store to the memory
8294 pointed to by DATA. An error is thrown if the buffer object is currently
8295 mapped, or if OFFSET and SIZE together define a range beyond the bounds
8296 of the buffer object's data store.
8298 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
8299 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
8300 `GL_PIXEL_UNPACK_BUFFER'.
8302 `GL_INVALID_VALUE' is generated if OFFSET or SIZE is negative, or if
8303 together they define a region of memory that extends beyond the buffer
8304 object's allocated data store.
8306 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
8309 `GL_INVALID_OPERATION' is generated if the buffer object being queried
8312 `GL_INVALID_OPERATION' is generated if `glGetBufferSubData' is executed
8313 between the execution of `glBegin' and the corresponding execution of
8316 (define-gl-procedures
8319 (equation GLdouble-*)
8322 "Return the coefficients of the specified clipping plane.
8325 Specifies a clipping plane. The number of clipping planes depends
8326 on the implementation, but at least six clipping planes are
8327 supported. They are identified by symbolic names of the form
8328 `GL_CLIP_PLANE' I where i ranges from 0 to the value of
8329 `GL_MAX_CLIP_PLANES' - 1.
8332 Returns four double-precision values that are the coefficients of
8333 the plane equation of PLANE in eye coordinates. The initial value
8336 `glGetClipPlane' returns in EQUATION the four coefficients of the plane
8339 `GL_INVALID_ENUM' is generated if PLANE is not an accepted value.
8341 `GL_INVALID_OPERATION' is generated if `glGetClipPlane' is executed
8342 between the execution of `glBegin' and the corresponding execution of
8345 (define-gl-procedures
8346 ((glGetColorTableParameterfv
8352 (glGetColorTableParameteriv
8358 "Get color lookup table parameters.
8361 The target color table. Must be `GL_COLOR_TABLE',
8362 `GL_POST_CONVOLUTION_COLOR_TABLE',
8363 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `GL_PROXY_COLOR_TABLE',
8364 `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
8365 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
8368 The symbolic name of a color lookup table parameter. Must be one of
8369 `GL_COLOR_TABLE_BIAS', `GL_COLOR_TABLE_SCALE',
8370 `GL_COLOR_TABLE_FORMAT', `GL_COLOR_TABLE_WIDTH',
8371 `GL_COLOR_TABLE_RED_SIZE', `GL_COLOR_TABLE_GREEN_SIZE',
8372 `GL_COLOR_TABLE_BLUE_SIZE', `GL_COLOR_TABLE_ALPHA_SIZE',
8373 `GL_COLOR_TABLE_LUMINANCE_SIZE', or
8374 `GL_COLOR_TABLE_INTENSITY_SIZE'.
8377 A pointer to an array where the values of the parameter will be
8380 Returns parameters specific to color table TARGET.
8382 When PNAME is set to `GL_COLOR_TABLE_SCALE' or `GL_COLOR_TABLE_BIAS',
8383 `glGetColorTableParameter' returns the color table scale or bias
8384 parameters for the table specified by TARGET. For these queries, TARGET
8385 must be set to `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
8386 `GL_POST_COLOR_MATRIX_COLOR_TABLE' and PARAMS points to an array of four
8387 elements, which receive the scale or bias factors for red, green, blue,
8388 and alpha, in that order.
8390 `glGetColorTableParameter' can also be used to retrieve the format and
8391 size parameters for a color table. For these queries, set TARGET to
8392 either the color table target or the proxy color table target. The
8393 format and size parameters are set by `glColorTable'.
8395 The following table lists the format and size parameters that may be
8396 queried. For each symbolic constant listed below for PNAME, PARAMS must
8397 point to an array of the given length and receive the values indicated.
8404 `GL_COLOR_TABLE_FORMAT'
8405 1 , Internal format (e.g., `GL_RGBA')
8407 `GL_COLOR_TABLE_WIDTH'
8408 1 , Number of elements in table
8410 `GL_COLOR_TABLE_RED_SIZE'
8411 1 , Size of red component, in bits
8413 `GL_COLOR_TABLE_GREEN_SIZE'
8414 1 , Size of green component
8416 `GL_COLOR_TABLE_BLUE_SIZE'
8417 1 , Size of blue component
8419 `GL_COLOR_TABLE_ALPHA_SIZE'
8420 1 , Size of alpha component
8422 `GL_COLOR_TABLE_LUMINANCE_SIZE'
8423 1 , Size of luminance component
8425 `GL_COLOR_TABLE_INTENSITY_SIZE'
8426 1 , Size of intensity component
8430 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an acceptable
8433 `GL_INVALID_OPERATION' is generated if `glGetColorTableParameter' is
8434 executed between the execution of `glBegin' and the corresponding
8435 execution of `glEnd'.")
8437 (define-gl-procedures
8445 "Retrieve contents of a color lookup table.
8448 Must be `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
8449 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
8452 The format of the pixel data in TABLE. The possible values are
8453 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
8454 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
8457 The type of the pixel data in TABLE. Symbolic constants
8458 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8459 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
8460 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8461 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
8462 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8463 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8464 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8465 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
8469 Pointer to a one-dimensional array of pixel data containing the
8470 contents of the color table.
8472 `glGetColorTable' returns in TABLE the contents of the color table
8473 specified by TARGET. No pixel transfer operations are performed, but
8474 pixel storage modes that are applicable to `glReadPixels' are performed.
8476 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8477 target (see `glBindBuffer') while a histogram table is requested, TABLE
8478 is treated as a byte offset into the buffer object's data store.
8480 Color components that are requested in the specified FORMAT, but which
8481 are not included in the internal format of the color lookup table, are
8482 returned as zero. The assignments of internal color components to the
8483 components requested by FORMAT are
8485 *Internal Component*
8486 *Resulting Component*
8508 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8511 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
8514 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
8517 `GL_INVALID_OPERATION' is generated if TYPE is one of
8518 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8519 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
8522 `GL_INVALID_OPERATION' is generated if TYPE is one of
8523 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8524 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8525 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8526 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
8527 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
8529 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8530 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8531 store is currently mapped.
8533 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8534 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8535 to the buffer object such that the memory writes required would exceed
8536 the data store size.
8538 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8539 bound to the `GL_PIXEL_PACK_BUFFER' target and TABLE is not evenly
8540 divisible into the number of bytes needed to store in memory a datum
8543 `GL_INVALID_OPERATION' is generated if `glGetColorTable' is executed
8544 between the execution of `glBegin' and the corresponding execution of
8547 (define-gl-procedures
8548 ((glGetCompressedTexImage
8554 "Return a compressed texture image.
8557 Specifies which texture is to be obtained. `GL_TEXTURE_1D',
8558 `GL_TEXTURE_2D', and
8559 `GL_TEXTURE_3D'`GL_TEXTURE_CUBE_MAP_POSITIVE_X',
8560 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
8561 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
8562 and `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z' are accepted.
8565 Specifies the level-of-detail number of the desired image. Level 0
8566 is the base image level. Level N is the N th mipmap reduction
8570 Returns the compressed texture image.
8572 `glGetCompressedTexImage' returns the compressed texture image
8573 associated with TARGET and LOD into IMG. IMG should be an array of
8574 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' bytes. TARGET specifies whether the
8575 desired texture image was one specified by `glTexImage1D'
8576 (`GL_TEXTURE_1D'), `glTexImage2D' (`GL_TEXTURE_2D' or any of
8577 `GL_TEXTURE_CUBE_MAP_*'), or `glTexImage3D' (`GL_TEXTURE_3D'). LOD
8578 specifies the level-of-detail number of the desired image.
8580 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8581 target (see `glBindBuffer') while a texture image is requested, IMG is
8582 treated as a byte offset into the buffer object's data store.
8584 To minimize errors, first verify that the texture is compressed by
8585 calling `glGetTexLevelParameter' with argument `GL_TEXTURE_COMPRESSED'.
8586 If the texture is compressed, then determine the amount of memory
8587 required to store the compressed texture by calling
8588 `glGetTexLevelParameter' with argument
8589 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE'. Finally, retrieve the internal
8590 format of the texture by calling `glGetTexLevelParameter' with argument
8591 `GL_TEXTURE_INTERNAL_FORMAT'. To store the texture for later use,
8592 associate the internal format and size with the retrieved texture image.
8593 These data can be used by the respective texture or subtexture loading
8594 routine used for loading TARGET textures.
8596 `GL_INVALID_VALUE' is generated if LOD is less than zero or greater than
8597 the maximum number of LODs permitted by the implementation.
8599 `GL_INVALID_OPERATION' is generated if `glGetCompressedTexImage' is used
8600 to retrieve a texture that is in an uncompressed internal format.
8602 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8603 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8604 store is currently mapped.
8606 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8607 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8608 to the buffer object such that the memory writes required would exceed
8609 the data store size.
8611 `GL_INVALID_OPERATION' is generated if `glGetCompressedTexImage' is
8612 executed between the execution of `glBegin' and the corresponding
8613 execution of `glEnd'.")
8615 (define-gl-procedures
8616 ((glGetConvolutionFilter
8623 "Get current 1D or 2D convolution filter kernel.
8626 The filter to be retrieved. Must be one of `GL_CONVOLUTION_1D' or
8627 `GL_CONVOLUTION_2D'.
8630 Format of the output image. Must be one of `GL_RED', `GL_GREEN',
8631 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
8632 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
8635 Data type of components in the output image. Symbolic constants
8636 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8637 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
8638 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8639 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
8640 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8641 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8642 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8643 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
8647 Pointer to storage for the output image.
8649 `glGetConvolutionFilter' returns the current 1D or 2D convolution filter
8650 kernel as an image. The one- or two-dimensional image is placed in IMAGE
8651 according to the specifications in FORMAT and TYPE. No pixel transfer
8652 operations are performed on this image, but the relevant pixel storage
8655 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8656 target (see `glBindBuffer') while a convolution filter is requested,
8657 IMAGE is treated as a byte offset into the buffer object's data store.
8659 Color components that are present in FORMAT but not included in the
8660 internal format of the filter are returned as zero. The assignments of
8661 internal color components to the components of FORMAT are as follows.
8663 *Internal Component*
8664 *Resulting Component*
8686 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8689 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
8692 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
8695 `GL_INVALID_OPERATION' is generated if TYPE is one of
8696 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8697 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
8700 `GL_INVALID_OPERATION' is generated if TYPE is one of
8701 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8702 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8703 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8704 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
8705 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
8707 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8708 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8709 store is currently mapped.
8711 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8712 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8713 to the buffer object such that the memory writes required would exceed
8714 the data store size.
8716 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8717 bound to the `GL_PIXEL_PACK_BUFFER' target and IMAGE is not evenly
8718 divisible into the number of bytes needed to store in memory a datum
8721 `GL_INVALID_OPERATION' is generated if `glGetConvolutionFilter' is
8722 executed between the execution of `glBegin' and the corresponding
8723 execution of `glEnd'.")
8725 (define-gl-procedures
8726 ((glGetConvolutionParameterfv
8732 (glGetConvolutionParameteriv
8738 "Get convolution parameters.
8741 The filter whose parameters are to be retrieved. Must be one of
8742 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D'.
8745 The parameter to be retrieved. Must be one of
8746 `GL_CONVOLUTION_BORDER_MODE', `GL_CONVOLUTION_BORDER_COLOR',
8747 `GL_CONVOLUTION_FILTER_SCALE', `GL_CONVOLUTION_FILTER_BIAS',
8748 `GL_CONVOLUTION_FORMAT', `GL_CONVOLUTION_WIDTH',
8749 `GL_CONVOLUTION_HEIGHT', `GL_MAX_CONVOLUTION_WIDTH', or
8750 `GL_MAX_CONVOLUTION_HEIGHT'.
8753 Pointer to storage for the parameters to be retrieved.
8755 `glGetConvolutionParameter' retrieves convolution parameters. TARGET
8756 determines which convolution filter is queried. PNAME determines which
8757 parameter is returned:
8759 `GL_CONVOLUTION_BORDER_MODE'
8762 The convolution border mode. See `glConvolutionParameter' for a
8763 list of border modes.
8765 `GL_CONVOLUTION_BORDER_COLOR'
8768 The current convolution border color. PARAMS must be a pointer to
8769 an array of four elements, which will receive the red, green, blue,
8770 and alpha border colors.
8772 `GL_CONVOLUTION_FILTER_SCALE'
8775 The current filter scale factors. PARAMS must be a pointer to an
8776 array of four elements, which will receive the red, green, blue,
8777 and alpha filter scale factors in that order.
8779 `GL_CONVOLUTION_FILTER_BIAS'
8782 The current filter bias factors. PARAMS must be a pointer to an
8783 array of four elements, which will receive the red, green, blue,
8784 and alpha filter bias terms in that order.
8786 `GL_CONVOLUTION_FORMAT'
8789 The current internal format. See `glConvolutionFilter1D',
8790 `glConvolutionFilter2D', and `glSeparableFilter2D' for lists of
8793 `GL_CONVOLUTION_WIDTH'
8796 The current filter image width.
8798 `GL_CONVOLUTION_HEIGHT'
8801 The current filter image height.
8803 `GL_MAX_CONVOLUTION_WIDTH'
8806 The maximum acceptable filter image width.
8808 `GL_MAX_CONVOLUTION_HEIGHT'
8811 The maximum acceptable filter image height.
8813 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8816 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
8819 `GL_INVALID_ENUM' is generated if TARGET is `GL_CONVOLUTION_1D' and
8820 PNAME is `GL_CONVOLUTION_HEIGHT' or `GL_MAX_CONVOLUTION_HEIGHT'.
8822 `GL_INVALID_OPERATION' is generated if `glGetConvolutionParameter' is
8823 executed between the execution of `glBegin' and the corresponding
8824 execution of `glEnd'.")
8826 (define-gl-procedures
8827 ((glGetError -> GLenum))
8828 "Return error information.
8830 `glGetError' returns the value of the error flag. Each detectable error
8831 is assigned a numeric code and symbolic name. When an error occurs, the
8832 error flag is set to the appropriate error code value. No other errors
8833 are recorded until `glGetError' is called, the error code is returned,
8834 and the flag is reset to `GL_NO_ERROR'. If a call to `glGetError'
8835 returns `GL_NO_ERROR', there has been no detectable error since the last
8836 call to `glGetError', or since the GL was initialized.
8838 To allow for distributed implementations, there may be several error
8839 flags. If any single error flag has recorded an error, the value of that
8840 flag is returned and that flag is reset to `GL_NO_ERROR' when
8841 `glGetError' is called. If more than one flag has recorded an error,
8842 `glGetError' returns and clears an arbitrary error flag value. Thus,
8843 `glGetError' should always be called in a loop, until it returns
8844 `GL_NO_ERROR', if all error flags are to be reset.
8846 Initially, all error flags are set to `GL_NO_ERROR'.
8848 The following errors are currently defined:
8851 No error has been recorded. The value of this symbolic constant is
8855 An unacceptable value is specified for an enumerated argument. The
8856 offending command is ignored and has no other side effect than to
8860 A numeric argument is out of range. The offending command is
8861 ignored and has no other side effect than to set the error flag.
8863 `GL_INVALID_OPERATION'
8864 The specified operation is not allowed in the current state. The
8865 offending command is ignored and has no other side effect than to
8869 This command would cause a stack overflow. The offending command is
8870 ignored and has no other side effect than to set the error flag.
8872 `GL_STACK_UNDERFLOW'
8873 This command would cause a stack underflow. The offending command
8874 is ignored and has no other side effect than to set the error flag.
8877 There is not enough memory left to execute the command. The state
8878 of the GL is undefined, except for the state of the error flags,
8879 after this error is recorded.
8881 `GL_TABLE_TOO_LARGE'
8882 The specified table exceeds the implementation's maximum supported
8883 table size. The offending command is ignored and has no other side
8884 effect than to set the error flag.
8886 When an error flag is set, results of a GL operation are undefined only
8887 if `GL_OUT_OF_MEMORY' has occurred. In all other cases, the command
8888 generating the error is ignored and has no effect on the GL state or
8889 frame buffer contents. If the generating command returns a value, it
8890 returns 0. If `glGetError' itself generates an error, it returns 0.
8892 `GL_INVALID_OPERATION' is generated if `glGetError' is executed between
8893 the execution of `glBegin' and the corresponding execution of `glEnd'.
8894 In this case, `glGetError' returns 0.")
8896 (define-gl-procedures
8897 ((glGetHistogramParameterfv
8903 (glGetHistogramParameteriv
8909 "Get histogram parameters.
8912 Must be one of `GL_HISTOGRAM' or `GL_PROXY_HISTOGRAM'.
8915 The name of the parameter to be retrieved. Must be one of
8916 `GL_HISTOGRAM_WIDTH', `GL_HISTOGRAM_FORMAT',
8917 `GL_HISTOGRAM_RED_SIZE', `GL_HISTOGRAM_GREEN_SIZE',
8918 `GL_HISTOGRAM_BLUE_SIZE', `GL_HISTOGRAM_ALPHA_SIZE',
8919 `GL_HISTOGRAM_LUMINANCE_SIZE', or `GL_HISTOGRAM_SINK'.
8922 Pointer to storage for the returned values.
8924 `glGetHistogramParameter' is used to query parameter values for the
8925 current histogram or for a proxy. The histogram state information may be
8926 queried by calling `glGetHistogramParameter' with a TARGET of
8927 `GL_HISTOGRAM' (to obtain information for the current histogram table)
8928 or `GL_PROXY_HISTOGRAM' (to obtain information from the most recent
8929 proxy request) and one of the following values for the PNAME argument:
8936 `GL_HISTOGRAM_WIDTH'
8937 Histogram table width
8939 `GL_HISTOGRAM_FORMAT'
8942 `GL_HISTOGRAM_RED_SIZE'
8943 Red component counter size, in bits
8945 `GL_HISTOGRAM_GREEN_SIZE'
8946 Green component counter size, in bits
8948 `GL_HISTOGRAM_BLUE_SIZE'
8949 Blue component counter size, in bits
8951 `GL_HISTOGRAM_ALPHA_SIZE'
8952 Alpha component counter size, in bits
8954 `GL_HISTOGRAM_LUMINANCE_SIZE'
8955 Luminance component counter size, in bits
8958 Value of the SINK parameter
8962 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8965 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
8968 `GL_INVALID_OPERATION' is generated if `glGetHistogramParameter' is
8969 executed between the execution of `glBegin' and the corresponding
8970 execution of `glEnd'.")
8972 (define-gl-procedures
8981 "Get histogram table.
8984 Must be `GL_HISTOGRAM'.
8987 If `GL_TRUE', each component counter that is actually returned is
8988 reset to zero. (Other counters are unaffected.) If `GL_FALSE', none
8989 of the counters in the histogram table is modified.
8992 The format of values to be returned in VALUES. Must be one of
8993 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
8994 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
8997 The type of values to be returned in VALUES. Symbolic constants
8998 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8999 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9000 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9001 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9002 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9003 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9004 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9005 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9009 A pointer to storage for the returned histogram table.
9011 `glGetHistogram' returns the current histogram table as a
9012 one-dimensional image with the same width as the histogram. No pixel
9013 transfer operations are performed on this image, but pixel storage modes
9014 that are applicable to 1D images are honored.
9016 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9017 target (see `glBindBuffer') while a histogram table is requested, VALUES
9018 is treated as a byte offset into the buffer object's data store.
9020 Color components that are requested in the specified FORMAT, but which
9021 are not included in the internal format of the histogram, are returned
9022 as zero. The assignments of internal color components to the components
9023 requested by FORMAT are:
9025 *Internal Component*
9026 *Resulting Component*
9045 `GL_INVALID_ENUM' is generated if TARGET is not `GL_HISTOGRAM'.
9047 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
9050 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
9053 `GL_INVALID_OPERATION' is generated if TYPE is one of
9054 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9055 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
9058 `GL_INVALID_OPERATION' is generated if TYPE is one of
9059 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9060 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9061 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9062 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
9063 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
9065 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9066 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9067 store is currently mapped.
9069 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9070 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9071 to the buffer object such that the memory writes required would exceed
9072 the data store size.
9074 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9075 bound to the `GL_PIXEL_PACK_BUFFER' target and VALUES is not evenly
9076 divisible into the number of bytes needed to store in memory a datum
9079 `GL_INVALID_OPERATION' is generated if `glGetHistogram' is executed
9080 between the execution of `glBegin' and the corresponding execution of
9083 (define-gl-procedures
9096 "Return light source parameter values.
9099 Specifies a light source. The number of possible lights depends on
9100 the implementation, but at least eight lights are supported. They
9101 are identified by symbolic names of the form `GL_LIGHT' I where I
9102 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
9105 Specifies a light source parameter for LIGHT. Accepted symbolic
9106 names are `GL_AMBIENT', `GL_DIFFUSE', `GL_SPECULAR', `GL_POSITION',
9107 `GL_SPOT_DIRECTION', `GL_SPOT_EXPONENT', `GL_SPOT_CUTOFF',
9108 `GL_CONSTANT_ATTENUATION', `GL_LINEAR_ATTENUATION', and
9109 `GL_QUADRATIC_ATTENUATION'.
9112 Returns the requested data.
9114 `glGetLight' returns in PARAMS the value or values of a light source
9115 parameter. LIGHT names the light and is a symbolic name of the form
9116 `GL_LIGHT'I where i ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
9117 `GL_MAX_LIGHTS' is an implementation dependent constant that is greater
9118 than or equal to eight. PNAME specifies one of ten light source
9119 parameters, again by symbolic name.
9121 The following parameters are defined:
9124 PARAMS returns four integer or floating-point values representing
9125 the ambient intensity of the light source. Integer values, when
9126 requested, are linearly mapped from the internal floating-point
9127 representation such that 1.0 maps to the most positive
9128 representable integer value, and -1.0 maps to the most negative
9129 representable integer value. If the internal value is outside the
9130 range [-1,1] , the corresponding integer return value is undefined.
9131 The initial value is (0, 0, 0, 1).
9134 PARAMS returns four integer or floating-point values representing
9135 the diffuse intensity of the light source. Integer values, when
9136 requested, are linearly mapped from the internal floating-point
9137 representation such that 1.0 maps to the most positive
9138 representable integer value, and -1.0 maps to the most negative
9139 representable integer value. If the internal value is outside the
9140 range [-1,1] , the corresponding integer return value is undefined.
9141 The initial value for `GL_LIGHT0' is (1, 1, 1, 1); for other
9142 lights, the initial value is (0, 0, 0, 0).
9145 PARAMS returns four integer or floating-point values representing
9146 the specular intensity of the light source. Integer values, when
9147 requested, are linearly mapped from the internal floating-point
9148 representation such that 1.0 maps to the most positive
9149 representable integer value, and -1.0 maps to the most negative
9150 representable integer value. If the internal value is outside the
9151 range [-1,1] , the corresponding integer return value is undefined.
9152 The initial value for `GL_LIGHT0' is (1, 1, 1, 1); for other
9153 lights, the initial value is (0, 0, 0, 0).
9156 PARAMS returns four integer or floating-point values representing
9157 the position of the light source. Integer values, when requested,
9158 are computed by rounding the internal floating-point values to the
9159 nearest integer value. The returned values are those maintained in
9160 eye coordinates. They will not be equal to the values specified
9161 using `glLight', unless the modelview matrix was identity at the
9162 time `glLight' was called. The initial value is (0, 0, 1, 0).
9165 PARAMS returns three integer or floating-point values representing
9166 the direction of the light source. Integer values, when requested,
9167 are computed by rounding the internal floating-point values to the
9168 nearest integer value. The returned values are those maintained in
9169 eye coordinates. They will not be equal to the values specified
9170 using `glLight', unless the modelview matrix was identity at the
9171 time `glLight' was called. Although spot direction is normalized
9172 before being used in the lighting equation, the returned values are
9173 the transformed versions of the specified values prior to
9174 normalization. The initial value is (0,0-1) .
9177 PARAMS returns a single integer or floating-point value
9178 representing the spot exponent of the light. An integer value, when
9179 requested, is computed by rounding the internal floating-point
9180 representation to the nearest integer. The initial value is 0.
9183 PARAMS returns a single integer or floating-point value
9184 representing the spot cutoff angle of the light. An integer value,
9185 when requested, is computed by rounding the internal floating-point
9186 representation to the nearest integer. The initial value is 180.
9188 `GL_CONSTANT_ATTENUATION'
9189 PARAMS returns a single integer or floating-point value
9190 representing the constant (not distance-related) attenuation of the
9191 light. An integer value, when requested, is computed by rounding
9192 the internal floating-point representation to the nearest integer.
9193 The initial value is 1.
9195 `GL_LINEAR_ATTENUATION'
9196 PARAMS returns a single integer or floating-point value
9197 representing the linear attenuation of the light. An integer value,
9198 when requested, is computed by rounding the internal floating-point
9199 representation to the nearest integer. The initial value is 0.
9201 `GL_QUADRATIC_ATTENUATION'
9202 PARAMS returns a single integer or floating-point value
9203 representing the quadratic attenuation of the light. An integer
9204 value, when requested, is computed by rounding the internal
9205 floating-point representation to the nearest integer. The initial
9208 `GL_INVALID_ENUM' is generated if LIGHT or PNAME is not an accepted
9211 `GL_INVALID_OPERATION' is generated if `glGetLight' is executed between
9212 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9214 (define-gl-procedures
9233 "Return evaluator parameters.
9236 Specifies the symbolic name of a map. Accepted values are
9237 `GL_MAP1_COLOR_4', `GL_MAP1_INDEX', `GL_MAP1_NORMAL',
9238 `GL_MAP1_TEXTURE_COORD_1', `GL_MAP1_TEXTURE_COORD_2',
9239 `GL_MAP1_TEXTURE_COORD_3', `GL_MAP1_TEXTURE_COORD_4',
9240 `GL_MAP1_VERTEX_3', `GL_MAP1_VERTEX_4', `GL_MAP2_COLOR_4',
9241 `GL_MAP2_INDEX', `GL_MAP2_NORMAL', `GL_MAP2_TEXTURE_COORD_1',
9242 `GL_MAP2_TEXTURE_COORD_2', `GL_MAP2_TEXTURE_COORD_3',
9243 `GL_MAP2_TEXTURE_COORD_4', `GL_MAP2_VERTEX_3', and
9247 Specifies which parameter to return. Symbolic names `GL_COEFF',
9248 `GL_ORDER', and `GL_DOMAIN' are accepted.
9251 Returns the requested data.
9253 `glMap1' and `glMap2' define evaluators. `glGetMap' returns evaluator
9254 parameters. TARGET chooses a map, QUERY selects a specific parameter,
9255 and V points to storage where the values will be returned.
9257 The acceptable values for the TARGET parameter are described in the
9258 `glMap1' and `glMap2' reference pages.
9260 QUERY can assume the following values:
9263 V returns the control points for the evaluator function.
9264 One-dimensional evaluators return ORDER control points, and
9265 two-dimensional evaluators return UORDER×VORDER control points.
9266 Each control point consists of one, two, three, or four integer,
9267 single-precision floating-point, or double-precision floating-point
9268 values, depending on the type of the evaluator. The GL returns
9269 two-dimensional control points in row-major order, incrementing the
9270 UORDER index quickly and the VORDER index after each row. Integer
9271 values, when requested, are computed by rounding the internal
9272 floating-point values to the nearest integer values.
9275 V returns the order of the evaluator function. One-dimensional
9276 evaluators return a single value, ORDER . The initial value is 1.
9277 Two-dimensional evaluators return two values, UORDER and VORDER .
9278 The initial value is 1,1.
9281 V returns the linear U and V mapping parameters. One-dimensional
9282 evaluators return two values, U1 and U2 , as specified by `glMap1'.
9283 Two-dimensional evaluators return four values ( U1 , U2 , V1 , and
9284 V2 ) as specified by `glMap2'. Integer values, when requested, are
9285 computed by rounding the internal floating-point values to the
9286 nearest integer values.
9288 `GL_INVALID_ENUM' is generated if either TARGET or QUERY is not an
9291 `GL_INVALID_OPERATION' is generated if `glGetMap' is executed between
9292 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9294 (define-gl-procedures
9307 "Return material parameters.
9310 Specifies which of the two materials is being queried. `GL_FRONT'
9311 or `GL_BACK' are accepted, representing the front and back
9312 materials, respectively.
9315 Specifies the material parameter to return. `GL_AMBIENT',
9316 `GL_DIFFUSE', `GL_SPECULAR', `GL_EMISSION', `GL_SHININESS', and
9317 `GL_COLOR_INDEXES' are accepted.
9320 Returns the requested data.
9322 `glGetMaterial' returns in PARAMS the value or values of parameter PNAME
9323 of material FACE. Six parameters are defined:
9326 PARAMS returns four integer or floating-point values representing
9327 the ambient reflectance of the material. Integer values, when
9328 requested, are linearly mapped from the internal floating-point
9329 representation such that 1.0 maps to the most positive
9330 representable integer value, and -1.0 maps to the most negative
9331 representable integer value. If the internal value is outside the
9332 range [-1,1] , the corresponding integer return value is undefined.
9333 The initial value is (0.2, 0.2, 0.2, 1.0)
9336 PARAMS returns four integer or floating-point values representing
9337 the diffuse reflectance of the material. Integer values, when
9338 requested, are linearly mapped from the internal floating-point
9339 representation such that 1.0 maps to the most positive
9340 representable integer value, and -1.0 maps to the most negative
9341 representable integer value. If the internal value is outside the
9342 range [-1,1] , the corresponding integer return value is undefined.
9343 The initial value is (0.8, 0.8, 0.8, 1.0).
9346 PARAMS returns four integer or floating-point values representing
9347 the specular reflectance of the material. Integer values, when
9348 requested, are linearly mapped from the internal floating-point
9349 representation such that 1.0 maps to the most positive
9350 representable integer value, and -1.0 maps to the most negative
9351 representable integer value. If the internal value is outside the
9352 range [-1,1] , the corresponding integer return value is undefined.
9353 The initial value is (0, 0, 0, 1).
9356 PARAMS returns four integer or floating-point values representing
9357 the emitted light intensity of the material. Integer values, when
9358 requested, are linearly mapped from the internal floating-point
9359 representation such that 1.0 maps to the most positive
9360 representable integer value, and -1.0 maps to the most negative
9361 representable integer value. If the internal value is outside the
9362 range [-1,1] , the corresponding integer return value is undefined.
9363 The initial value is (0, 0, 0, 1).
9366 PARAMS returns one integer or floating-point value representing the
9367 specular exponent of the material. Integer values, when requested,
9368 are computed by rounding the internal floating-point value to the
9369 nearest integer value. The initial value is 0.
9372 PARAMS returns three integer or floating-point values representing
9373 the ambient, diffuse, and specular indices of the material. These
9374 indices are used only for color index lighting. (All the other
9375 parameters are used only for RGBA lighting.) Integer values, when
9376 requested, are computed by rounding the internal floating-point
9377 values to the nearest integer values.
9379 `GL_INVALID_ENUM' is generated if FACE or PNAME is not an accepted
9382 `GL_INVALID_OPERATION' is generated if `glGetMaterial' is executed
9383 between the execution of `glBegin' and the corresponding execution of
9386 (define-gl-procedures
9387 ((glGetMinmaxParameterfv
9393 (glGetMinmaxParameteriv
9399 "Get minmax parameters.
9402 Must be `GL_MINMAX'.
9405 The parameter to be retrieved. Must be one of `GL_MINMAX_FORMAT' or
9409 A pointer to storage for the retrieved parameters.
9411 `glGetMinmaxParameter' retrieves parameters for the current minmax table
9412 by setting PNAME to one of the following values:
9420 Internal format of minmax table
9423 Value of the SINK parameter
9427 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
9429 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
9432 `GL_INVALID_OPERATION' is generated if `glGetMinmaxParameter' is
9433 executed between the execution of `glBegin' and the corresponding
9434 execution of `glEnd'.")
9436 (define-gl-procedures
9445 "Get minimum and maximum pixel values.
9448 Must be `GL_MINMAX'.
9451 If `GL_TRUE', all entries in the minmax table that are actually
9452 returned are reset to their initial values. (Other entries are
9453 unaltered.) If `GL_FALSE', the minmax table is unaltered.
9456 The format of the data to be returned in VALUES. Must be one of
9457 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
9458 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
9461 The type of the data to be returned in VALUES. Symbolic constants
9462 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
9463 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9464 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9465 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9466 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9467 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9468 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9469 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9473 A pointer to storage for the returned values.
9475 `glGetMinmax' returns the accumulated minimum and maximum pixel values
9476 (computed on a per-component basis) in a one-dimensional image of width
9477 2. The first set of return values are the minima, and the second set of
9478 return values are the maxima. The format of the return values is
9479 determined by FORMAT, and their type is determined by TYPES.
9481 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9482 target (see `glBindBuffer') while minimum and maximum pixel values are
9483 requested, VALUES is treated as a byte offset into the buffer object's
9486 No pixel transfer operations are performed on the return values, but
9487 pixel storage modes that are applicable to one-dimensional images are
9488 performed. Color components that are requested in the specified FORMAT,
9489 but that are not included in the internal format of the minmax table,
9490 are returned as zero. The assignment of internal color components to the
9491 components requested by FORMAT are as follows:
9495 *Internal Component*
9496 *Resulting Component*
9513 If RESET is `GL_TRUE', the minmax table entries corresponding to the
9514 return values are reset to their initial values. Minimum and maximum
9515 values that are not returned are not modified, even if RESET is
9518 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
9520 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
9523 `GL_INVALID_ENUM' is generated if TYPES is not one of the allowable
9526 `GL_INVALID_OPERATION' is generated if TYPES is one of
9527 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9528 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
9531 `GL_INVALID_OPERATION' is generated if TYPES is one of
9532 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9533 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9534 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9535 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
9536 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
9538 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9539 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9540 store is currently mapped.
9542 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9543 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9544 to the buffer object such that the memory writes required would exceed
9545 the data store size.
9547 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9548 bound to the `GL_PIXEL_PACK_BUFFER' target and VALUES is not evenly
9549 divisible into the number of bytes needed to store in memory a datum
9552 `GL_INVALID_OPERATION' is generated if `glGetMinmax' is executed between
9553 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9555 (define-gl-procedures
9571 "Return the specified pixel map.
9574 Specifies the name of the pixel map to return. Accepted values are
9575 `GL_PIXEL_MAP_I_TO_I', `GL_PIXEL_MAP_S_TO_S',
9576 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
9577 `GL_PIXEL_MAP_I_TO_B', `GL_PIXEL_MAP_I_TO_A',
9578 `GL_PIXEL_MAP_R_TO_R', `GL_PIXEL_MAP_G_TO_G',
9579 `GL_PIXEL_MAP_B_TO_B', and `GL_PIXEL_MAP_A_TO_A'.
9582 Returns the pixel map contents.
9584 See the `glPixelMap' reference page for a description of the acceptable
9585 values for the MAP parameter. `glGetPixelMap' returns in DATA the
9586 contents of the pixel map specified in MAP. Pixel maps are used during
9587 the execution of `glReadPixels', `glDrawPixels', `glCopyPixels',
9588 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glTexSubImage1D',
9589 `glTexSubImage2D', `glTexSubImage3D', `glCopyTexImage1D',
9590 `glCopyTexImage2D', `glCopyTexSubImage1D', `glCopyTexSubImage2D', and
9591 `glCopyTexSubImage3D'. to map color indices, stencil indices, color
9592 components, and depth components to other values.
9594 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9595 target (see `glBindBuffer') while a pixel map is requested, DATA is
9596 treated as a byte offset into the buffer object's data store.
9598 Unsigned integer values, if requested, are linearly mapped from the
9599 internal fixed or floating-point representation such that 1.0 maps to
9600 the largest representable integer value, and 0.0 maps to 0. Return
9601 unsigned integer values are undefined if the map value was not in the
9604 To determine the required size of MAP, call `glGet' with the appropriate
9607 `GL_INVALID_ENUM' is generated if MAP is not an accepted value.
9609 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9610 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9611 store is currently mapped.
9613 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9614 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9615 to the buffer object such that the memory writes required would exceed
9616 the data store size.
9618 `GL_INVALID_OPERATION' is generated by `glGetPixelMapfv' if a non-zero
9619 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9620 DATA is not evenly divisible into the number of bytes needed to store in
9621 memory a GLfloat datum.
9623 `GL_INVALID_OPERATION' is generated by `glGetPixelMapuiv' if a non-zero
9624 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9625 DATA is not evenly divisible into the number of bytes needed to store in
9626 memory a GLuint datum.
9628 `GL_INVALID_OPERATION' is generated by `glGetPixelMapusv' if a non-zero
9629 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9630 DATA is not evenly divisible into the number of bytes needed to store in
9631 memory a GLushort datum.
9633 `GL_INVALID_OPERATION' is generated if `glGetPixelMap' is executed
9634 between the execution of `glBegin' and the corresponding execution of
9637 (define-gl-procedures
9643 "Return the address of the specified pointer.
9646 Specifies the array or buffer pointer to be returned. Symbolic
9647 constants `GL_COLOR_ARRAY_POINTER', `GL_EDGE_FLAG_ARRAY_POINTER',
9648 `GL_FOG_COORD_ARRAY_POINTER', `GL_FEEDBACK_BUFFER_POINTER',
9649 `GL_INDEX_ARRAY_POINTER', `GL_NORMAL_ARRAY_POINTER',
9650 `GL_SECONDARY_COLOR_ARRAY_POINTER', `GL_SELECTION_BUFFER_POINTER',
9651 `GL_TEXTURE_COORD_ARRAY_POINTER', or `GL_VERTEX_ARRAY_POINTER' are
9655 Returns the pointer value specified by PNAME.
9657 `glGetPointerv' returns pointer information. PNAME is a symbolic
9658 constant indicating the pointer to be returned, and PARAMS is a pointer
9659 to a location in which to place the returned data.
9661 For all PNAME arguments except `GL_FEEDBACK_BUFFER_POINTER' and
9662 `GL_SELECTION_BUFFER_POINTER', if a non-zero named buffer object was
9663 bound to the `GL_ARRAY_BUFFER' target (see `glBindBuffer') when the
9664 desired pointer was previously specified, the pointer returned is a byte
9665 offset into the buffer object's data store. Buffer objects are only
9666 available in OpenGL versions 1.5 and greater.
9668 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.")
9670 (define-gl-procedures
9671 ((glGetPolygonStipple (pattern GLubyte-*) -> void))
9672 "Return the polygon stipple pattern.
9675 Returns the stipple pattern. The initial value is all 1's.
9677 `glGetPolygonStipple' returns to PATTERN a 32×32 polygon stipple
9678 pattern. The pattern is packed into memory as if `glReadPixels' with
9679 both HEIGHT and WIDTH of 32, TYPE of `GL_BITMAP', and FORMAT of
9680 `GL_COLOR_INDEX' were called, and the stipple pattern were stored in an
9681 internal 32×32 color index buffer. Unlike `glReadPixels', however, pixel
9682 transfer operations (shift, offset, pixel map) are not applied to the
9683 returned stipple image.
9685 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9686 target (see `glBindBuffer') while a polygon stipple pattern is
9687 requested, PATTERN is treated as a byte offset into the buffer object's
9690 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9691 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9692 store is currently mapped.
9694 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9695 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9696 to the buffer object such that the memory writes required would exceed
9697 the data store size.
9699 `GL_INVALID_OPERATION' is generated if `glGetPolygonStipple' is executed
9700 between the execution of `glBegin' and the corresponding execution of
9703 (define-gl-procedures
9704 ((glGetProgramInfoLog
9711 "Returns the information log for a program object.
9714 Specifies the program object whose information log is to be
9718 Specifies the size of the character buffer for storing the returned
9722 Returns the length of the string returned in INFOLOG (excluding the
9726 Specifies an array of characters that is used to return the
9729 `glGetProgramInfoLog' returns the information log for the specified
9730 program object. The information log for a program object is modified
9731 when the program object is linked or validated. The string that is
9732 returned will be null terminated.
9734 `glGetProgramInfoLog' returns in INFOLOG as much of the information log
9735 as it can, up to a maximum of MAXLENGTH characters. The number of
9736 characters actually returned, excluding the null termination character,
9737 is specified by LENGTH. If the length of the returned string is not
9738 required, a value of `NULL' can be passed in the LENGTH argument. The
9739 size of the buffer required to store the returned information log can be
9740 obtained by calling `glGetProgram' with the value `GL_INFO_LOG_LENGTH'.
9742 The information log for a program object is either an empty string, or a
9743 string containing information about the last link operation, or a string
9744 containing information about the last validation operation. It may
9745 contain diagnostic messages, warning messages, and other information.
9746 When a program object is created, its information log will be a string
9749 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
9752 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
9754 `GL_INVALID_VALUE' is generated if MAXLENGTH is less than 0.
9756 `GL_INVALID_OPERATION' is generated if `glGetProgramInfoLog' is executed
9757 between the execution of `glBegin' and the corresponding execution of
9760 (define-gl-procedures
9767 "Returns a parameter from a program object.
9770 Specifies the program object to be queried.
9773 Specifies the object parameter. Accepted symbolic names are
9774 `GL_DELETE_STATUS', `GL_LINK_STATUS', `GL_VALIDATE_STATUS',
9775 `GL_INFO_LOG_LENGTH', `GL_ATTACHED_SHADERS',
9776 `GL_ACTIVE_ATTRIBUTES', `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH',
9777 `GL_ACTIVE_UNIFORMS', `GL_ACTIVE_UNIFORM_MAX_LENGTH'.
9780 Returns the requested object parameter.
9782 `glGetProgram' returns in PARAMS the value of a parameter for a specific
9783 program object. The following parameters are defined:
9788 PARAMS returns `GL_TRUE' if PROGRAM is currently flagged for
9789 deletion, and `GL_FALSE' otherwise.
9794 PARAMS returns `GL_TRUE' if the last link operation on PROGRAM was
9795 successful, and `GL_FALSE' otherwise.
9797 `GL_VALIDATE_STATUS'
9800 PARAMS returns `GL_TRUE' or if the last validation operation on
9801 PROGRAM was successful, and `GL_FALSE' otherwise.
9803 `GL_INFO_LOG_LENGTH'
9806 PARAMS returns the number of characters in the information log for
9807 PROGRAM including the null termination character (i.e., the size of
9808 the character buffer required to store the information log). If
9809 PROGRAM has no information log, a value of 0 is returned.
9811 `GL_ATTACHED_SHADERS'
9814 PARAMS returns the number of shader objects attached to PROGRAM.
9816 `GL_ACTIVE_ATTRIBUTES'
9819 PARAMS returns the number of active attribute variables for
9822 `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH'
9825 PARAMS returns the length of the longest active attribute name for
9826 PROGRAM, including the null termination character (i.e., the size
9827 of the character buffer required to store the longest attribute
9828 name). If no active attributes exist, 0 is returned.
9830 `GL_ACTIVE_UNIFORMS'
9833 PARAMS returns the number of active uniform variables for PROGRAM.
9835 `GL_ACTIVE_UNIFORM_MAX_LENGTH'
9838 PARAMS returns the length of the longest active uniform variable
9839 name for PROGRAM, including the null termination character (i.e.,
9840 the size of the character buffer required to store the longest
9841 uniform variable name). If no active uniform variables exist, 0 is
9844 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
9847 `GL_INVALID_OPERATION' is generated if PROGRAM does not refer to a
9850 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
9852 `GL_INVALID_OPERATION' is generated if `glGetProgram' is executed
9853 between the execution of `glBegin' and the corresponding execution of
9856 (define-gl-procedures
9863 "Return parameters of a query object target.
9866 Specifies a query object target. Must be `GL_SAMPLES_PASSED'.
9869 Specifies the symbolic name of a query object target parameter.
9870 Accepted values are `GL_CURRENT_QUERY' or `GL_QUERY_COUNTER_BITS'.
9873 Returns the requested data.
9875 `glGetQueryiv' returns in PARAMS a selected parameter of the query
9876 object target specified by TARGET.
9878 PNAME names a specific query object target parameter. When TARGET is
9879 `GL_SAMPLES_PASSED', PNAME can be as follows:
9882 PARAMS returns the name of the currently active occlusion query
9883 object. If no occlusion query is active, 0 is returned. The initial
9886 `GL_QUERY_COUNTER_BITS'
9887 PARAMS returns the number of bits in the query counter used to
9888 accumulate passing samples. If the number of bits returned is 0,
9889 the implementation does not support a query counter, and the
9890 results obtained from `glGetQueryObject' are useless.
9892 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
9895 `GL_INVALID_OPERATION' is generated if `glGetQueryiv' is executed
9896 between the execution of `glBegin' and the corresponding execution of
9899 (define-gl-procedures
9900 ((glGetQueryObjectiv
9906 (glGetQueryObjectuiv
9912 "Return parameters of a query object.
9915 Specifies the name of a query object.
9918 Specifies the symbolic name of a query object parameter. Accepted
9919 values are `GL_QUERY_RESULT' or `GL_QUERY_RESULT_AVAILABLE'.
9922 Returns the requested data.
9924 `glGetQueryObject' returns in PARAMS a selected parameter of the query
9925 object specified by ID.
9927 PNAME names a specific query object parameter. PNAME can be as follows:
9930 PARAMS returns the value of the query object's passed samples
9931 counter. The initial value is 0.
9933 `GL_QUERY_RESULT_AVAILABLE'
9934 PARAMS returns whether the passed samples counter is immediately
9935 available. If a delay would occur waiting for the query result,
9936 `GL_FALSE' is returned. Otherwise, `GL_TRUE' is returned, which
9937 also indicates that the results of all previous queries are
9940 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
9942 `GL_INVALID_OPERATION' is generated if ID is not the name of a query
9945 `GL_INVALID_OPERATION' is generated if ID is the name of a currently
9946 active query object.
9948 `GL_INVALID_OPERATION' is generated if `glGetQueryObject' is executed
9949 between the execution of `glBegin' and the corresponding execution of
9952 (define-gl-procedures
9953 ((glGetSeparableFilter
9962 "Get separable convolution filter kernel images.
9965 The separable filter to be retrieved. Must be `GL_SEPARABLE_2D'.
9968 Format of the output images. Must be one of `GL_RED', `GL_GREEN',
9969 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR'`GL_RGBA', `GL_BGRA',
9970 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
9973 Data type of components in the output images. Symbolic constants
9974 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
9975 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9976 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9977 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9978 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9979 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9980 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9981 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9985 Pointer to storage for the row filter image.
9988 Pointer to storage for the column filter image.
9991 Pointer to storage for the span filter image (currently unused).
9993 `glGetSeparableFilter' returns the two one-dimensional filter kernel
9994 images for the current separable 2D convolution filter. The row image is
9995 placed in ROW and the column image is placed in COLUMN according to the
9996 specifications in FORMAT and TYPE. (In the current implementation, SPAN
9997 is not affected in any way.) No pixel transfer operations are performed
9998 on the images, but the relevant pixel storage modes are applied.
10000 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
10001 target (see `glBindBuffer') while a separable convolution filter is
10002 requested, ROW, COLUMN, and SPAN are treated as a byte offset into the
10003 buffer object's data store.
10005 Color components that are present in FORMAT but not included in the
10006 internal format of the filters are returned as zero. The assignments of
10007 internal color components to the components of FORMAT are as follows:
10011 *Internal Component*
10012 *Resulting Component*
10034 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SEPARABLE_2D'.
10036 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
10039 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
10042 `GL_INVALID_OPERATION' is generated if TYPE is one of
10043 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
10044 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
10047 `GL_INVALID_OPERATION' is generated if TYPE is one of
10048 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
10049 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
10050 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
10051 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
10052 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
10054 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10055 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
10056 store is currently mapped.
10058 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10059 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
10060 to the buffer object such that the memory writes required would exceed
10061 the data store size.
10063 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10064 bound to the `GL_PIXEL_PACK_BUFFER' target and ROW or COLUMN is not
10065 evenly divisible into the number of bytes needed to store in memory a
10066 datum indicated by TYPE.
10068 `GL_INVALID_OPERATION' is generated if `glGetSeparableFilter' is
10069 executed between the execution of `glBegin' and the corresponding
10070 execution of `glEnd'.")
10072 (define-gl-procedures
10073 ((glGetShaderInfoLog
10075 (maxLength GLsizei)
10080 "Returns the information log for a shader object.
10083 Specifies the shader object whose information log is to be queried.
10086 Specifies the size of the character buffer for storing the returned
10090 Returns the length of the string returned in INFOLOG (excluding the
10094 Specifies an array of characters that is used to return the
10097 `glGetShaderInfoLog' returns the information log for the specified
10098 shader object. The information log for a shader object is modified when
10099 the shader is compiled. The string that is returned will be null
10102 `glGetShaderInfoLog' returns in INFOLOG as much of the information log
10103 as it can, up to a maximum of MAXLENGTH characters. The number of
10104 characters actually returned, excluding the null termination character,
10105 is specified by LENGTH. If the length of the returned string is not
10106 required, a value of `NULL' can be passed in the LENGTH argument. The
10107 size of the buffer required to store the returned information log can be
10108 obtained by calling `glGetShader' with the value `GL_INFO_LOG_LENGTH'.
10110 The information log for a shader object is a string that may contain
10111 diagnostic messages, warning messages, and other information about the
10112 last compile operation. When a shader object is created, its information
10113 log will be a string of length 0.
10115 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
10118 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
10120 `GL_INVALID_VALUE' is generated if MAXLENGTH is less than 0.
10122 `GL_INVALID_OPERATION' is generated if `glGetShaderInfoLog' is executed
10123 between the execution of `glBegin' and the corresponding execution of
10126 (define-gl-procedures
10127 ((glGetShaderSource
10134 "Returns the source code string from a shader object.
10137 Specifies the shader object to be queried.
10140 Specifies the size of the character buffer for storing the returned
10141 source code string.
10144 Returns the length of the string returned in SOURCE (excluding the
10148 Specifies an array of characters that is used to return the source
10151 `glGetShaderSource' returns the concatenation of the source code strings
10152 from the shader object specified by SHADER. The source code strings for
10153 a shader object are the result of a previous call to `glShaderSource'.
10154 The string returned by the function will be null terminated.
10156 `glGetShaderSource' returns in SOURCE as much of the source code string
10157 as it can, up to a maximum of BUFSIZE characters. The number of
10158 characters actually returned, excluding the null termination character,
10159 is specified by LENGTH. If the length of the returned string is not
10160 required, a value of `NULL' can be passed in the LENGTH argument. The
10161 size of the buffer required to store the returned source code string can
10162 be obtained by calling `glGetShader' with the value
10163 `GL_SHADER_SOURCE_LENGTH'.
10165 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
10168 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
10170 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.
10172 `GL_INVALID_OPERATION' is generated if `glGetShaderSource' is executed
10173 between the execution of `glBegin' and the corresponding execution of
10176 (define-gl-procedures
10183 "Returns a parameter from a shader object.
10186 Specifies the shader object to be queried.
10189 Specifies the object parameter. Accepted symbolic names are
10190 `GL_SHADER_TYPE', `GL_DELETE_STATUS', `GL_COMPILE_STATUS',
10191 `GL_INFO_LOG_LENGTH', `GL_SHADER_SOURCE_LENGTH'.
10194 Returns the requested object parameter.
10196 `glGetShader' returns in PARAMS the value of a parameter for a specific
10197 shader object. The following parameters are defined:
10200 PARAMS returns `GL_VERTEX_SHADER' if SHADER is a vertex shader
10201 object, and `GL_FRAGMENT_SHADER' if SHADER is a fragment shader
10205 PARAMS returns `GL_TRUE' if SHADER is currently flagged for
10206 deletion, and `GL_FALSE' otherwise.
10208 `GL_COMPILE_STATUS'
10209 PARAMS returns `GL_TRUE' if the last compile operation on SHADER
10210 was successful, and `GL_FALSE' otherwise.
10212 `GL_INFO_LOG_LENGTH'
10213 PARAMS returns the number of characters in the information log for
10214 SHADER including the null termination character (i.e., the size of
10215 the character buffer required to store the information log). If
10216 SHADER has no information log, a value of 0 is returned.
10218 `GL_SHADER_SOURCE_LENGTH'
10219 PARAMS returns the length of the concatenation of the source
10220 strings that make up the shader source for the SHADER, including
10221 the null termination character. (i.e., the size of the character
10222 buffer required to store the shader source). If no source code
10223 exists, 0 is returned.
10225 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
10228 `GL_INVALID_OPERATION' is generated if SHADER does not refer to a shader
10231 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
10233 `GL_INVALID_OPERATION' is generated if `glGetShader' is executed between
10234 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10236 (define-gl-procedures
10237 ((glGetString (name GLenum) -> const-GLubyte*))
10238 "Return a string describing the current GL connection.
10241 Specifies a symbolic constant, one of `GL_VENDOR', `GL_RENDERER',
10242 `GL_VERSION', `GL_SHADING_LANGUAGE_VERSION', or `GL_EXTENSIONS'.
10244 `glGetString' returns a pointer to a static string describing some
10245 aspect of the current GL connection. NAME can be one of the following:
10250 Returns the company responsible for this GL implementation. This
10251 name does not change from release to release.
10256 Returns the name of the renderer. This name is typically specific
10257 to a particular configuration of a hardware platform. It does not
10258 change from release to release.
10263 Returns a version or release number.
10265 `GL_SHADING_LANGUAGE_VERSION'
10268 Returns a version or release number for the shading language.
10273 Returns a space-separated list of supported extensions to GL.
10275 Because the GL does not include queries for the performance
10276 characteristics of an implementation, some applications are written to
10277 recognize known platforms and modify their GL usage based on known
10278 performance characteristics of these platforms. Strings `GL_VENDOR' and
10279 `GL_RENDERER' together uniquely specify a platform. They do not change
10280 from release to release and should be used by platform-recognition
10283 Some applications want to make use of features that are not part of the
10284 standard GL. These features may be implemented as extensions to the
10285 standard GL. The `GL_EXTENSIONS' string is a space-separated list of
10286 supported GL extensions. (Extension names never contain a space
10289 The `GL_VERSION' and `GL_SHADING_LANGUAGE_VERSION' strings begin with a
10290 version number. The version number uses one of these forms:
10292 MAJOR_NUMBER.MINOR_NUMBERMAJOR_NUMBER.MINOR_NUMBER.RELEASE_NUMBER
10294 Vendor-specific information may follow the version number. Its format
10295 depends on the implementation, but a space always separates the version
10296 number and the vendor-specific information.
10298 All strings are null-terminated.
10300 `GL_INVALID_ENUM' is generated if NAME is not an accepted value.
10302 `GL_INVALID_OPERATION' is generated if `glGetString' is executed between
10303 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10305 (define-gl-procedures
10318 "Return texture environment parameters.
10321 Specifies a texture environment. May be `GL_TEXTURE_ENV',
10322 `GL_TEXTURE_FILTER_CONTROL', or `GL_POINT_SPRITE'.
10325 Specifies the symbolic name of a texture environment parameter.
10326 Accepted values are `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR',
10327 `GL_TEXTURE_LOD_BIAS', `GL_COMBINE_RGB', `GL_COMBINE_ALPHA',
10328 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
10329 `GL_SRC1_ALPHA', `GL_SRC2_ALPHA', `GL_OPERAND0_RGB',
10330 `GL_OPERAND1_RGB', `GL_OPERAND2_RGB', `GL_OPERAND0_ALPHA',
10331 `GL_OPERAND1_ALPHA', `GL_OPERAND2_ALPHA', `GL_RGB_SCALE',
10332 `GL_ALPHA_SCALE', or `GL_COORD_REPLACE'.
10335 Returns the requested data.
10337 `glGetTexEnv' returns in PARAMS selected values of a texture environment
10338 that was specified with `glTexEnv'. TARGET specifies a texture
10341 When TARGET is `GL_TEXTURE_FILTER_CONTROL', PNAME must be
10342 `GL_TEXTURE_LOD_BIAS'. When TARGET is `GL_POINT_SPRITE', PNAME must be
10343 `GL_COORD_REPLACE'. When TARGET is `GL_TEXTURE_ENV', PNAME can be
10344 `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR', `GL_COMBINE_RGB',
10345 `GL_COMBINE_ALPHA', `GL_RGB_SCALE', `GL_ALPHA_SCALE', `GL_SRC0_RGB',
10346 `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA', `GL_SRC1_ALPHA', or
10349 PNAME names a specific texture environment parameter, as follows:
10351 `GL_TEXTURE_ENV_MODE'
10352 PARAMS returns the single-valued texture environment mode, a
10353 symbolic constant. The initial value is `GL_MODULATE'.
10355 `GL_TEXTURE_ENV_COLOR'
10356 PARAMS returns four integer or floating-point values that are the
10357 texture environment color. Integer values, when requested, are
10358 linearly mapped from the internal floating-point representation
10359 such that 1.0 maps to the most positive representable integer, and
10360 -1.0 maps to the most negative representable integer. The initial
10361 value is (0, 0, 0, 0).
10363 `GL_TEXTURE_LOD_BIAS'
10364 PARAMS returns a single floating-point value that is the texture
10365 level-of-detail bias. The initial value is 0.
10368 PARAMS returns a single symbolic constant value representing the
10369 current RGB combine mode. The initial value is `GL_MODULATE'.
10372 PARAMS returns a single symbolic constant value representing the
10373 current alpha combine mode. The initial value is `GL_MODULATE'.
10376 PARAMS returns a single symbolic constant value representing the
10377 texture combiner zero's RGB source. The initial value is
10381 PARAMS returns a single symbolic constant value representing the
10382 texture combiner one's RGB source. The initial value is
10386 PARAMS returns a single symbolic constant value representing the
10387 texture combiner two's RGB source. The initial value is
10391 PARAMS returns a single symbolic constant value representing the
10392 texture combiner zero's alpha source. The initial value is
10396 PARAMS returns a single symbolic constant value representing the
10397 texture combiner one's alpha source. The initial value is
10401 PARAMS returns a single symbolic constant value representing the
10402 texture combiner two's alpha source. The initial value is
10406 PARAMS returns a single symbolic constant value representing the
10407 texture combiner zero's RGB operand. The initial value is
10411 PARAMS returns a single symbolic constant value representing the
10412 texture combiner one's RGB operand. The initial value is
10416 PARAMS returns a single symbolic constant value representing the
10417 texture combiner two's RGB operand. The initial value is
10420 `GL_OPERAND0_ALPHA'
10421 PARAMS returns a single symbolic constant value representing the
10422 texture combiner zero's alpha operand. The initial value is
10425 `GL_OPERAND1_ALPHA'
10426 PARAMS returns a single symbolic constant value representing the
10427 texture combiner one's alpha operand. The initial value is
10430 `GL_OPERAND2_ALPHA'
10431 PARAMS returns a single symbolic constant value representing the
10432 texture combiner two's alpha operand. The initial value is
10436 PARAMS returns a single floating-point value representing the
10437 current RGB texture combiner scaling factor. The initial value is
10441 PARAMS returns a single floating-point value representing the
10442 current alpha texture combiner scaling factor. The initial value is
10446 PARAMS returns a single boolean value representing the current
10447 point sprite texture coordinate replacement enable state. The
10448 initial value is `GL_FALSE'.
10450 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10453 `GL_INVALID_OPERATION' is generated if `glGetTexEnv' is executed between
10454 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10456 (define-gl-procedures
10460 (params GLdouble-*)
10475 "Return texture coordinate generation parameters.
10478 Specifies a texture coordinate. Must be `GL_S', `GL_T', `GL_R', or
10482 Specifies the symbolic name of the value(s) to be returned. Must be
10483 either `GL_TEXTURE_GEN_MODE' or the name of one of the texture
10484 generation plane equations: `GL_OBJECT_PLANE' or `GL_EYE_PLANE'.
10487 Returns the requested data.
10489 `glGetTexGen' returns in PARAMS selected parameters of a texture
10490 coordinate generation function that was specified using `glTexGen'.
10491 COORD names one of the (S, T, R, Q) texture coordinates, using the
10492 symbolic constant `GL_S', `GL_T', `GL_R', or `GL_Q'.
10494 PNAME specifies one of three symbolic names:
10496 `GL_TEXTURE_GEN_MODE'
10497 PARAMS returns the single-valued texture generation function, a
10498 symbolic constant. The initial value is `GL_EYE_LINEAR'.
10501 PARAMS returns the four plane equation coefficients that specify
10502 object linear-coordinate generation. Integer values, when
10503 requested, are mapped directly from the internal floating-point
10507 PARAMS returns the four plane equation coefficients that specify
10508 eye linear-coordinate generation. Integer values, when requested,
10509 are mapped directly from the internal floating-point
10510 representation. The returned values are those maintained in eye
10511 coordinates. They are not equal to the values specified using
10512 `glTexGen', unless the modelview matrix was identity when
10513 `glTexGen' was called.
10515 `GL_INVALID_ENUM' is generated if COORD or PNAME is not an accepted
10518 `GL_INVALID_OPERATION' is generated if `glGetTexGen' is executed between
10519 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10521 (define-gl-procedures
10530 "Return a texture image.
10533 Specifies which texture is to be obtained. `GL_TEXTURE_1D',
10534 `GL_TEXTURE_2D', `GL_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10535 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10536 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10537 and `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z' are accepted.
10540 Specifies the level-of-detail number of the desired image. Level 0
10541 is the base image level. Level N is the N th mipmap reduction
10545 Specifies a pixel format for the returned data. The supported
10546 formats are `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
10547 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and
10548 `GL_LUMINANCE_ALPHA'.
10551 Specifies a pixel type for the returned data. The supported types
10552 are `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
10553 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
10554 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
10555 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
10556 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
10557 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
10558 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
10559 `GL_UNSIGNED_INT_2_10_10_10_REV'.
10562 Returns the texture image. Should be a pointer to an array of the
10563 type specified by TYPE.
10565 `glGetTexImage' returns a texture image into IMG. TARGET specifies
10566 whether the desired texture image is one specified by `glTexImage1D'
10567 (`GL_TEXTURE_1D'), `glTexImage2D' (`GL_TEXTURE_2D' or any of
10568 `GL_TEXTURE_CUBE_MAP_*'), or `glTexImage3D' (`GL_TEXTURE_3D'). LEVEL
10569 specifies the level-of-detail number of the desired image. FORMAT and
10570 TYPE specify the format and type of the desired image array. See the
10571 reference pages `glTexImage1D' and `glDrawPixels' for a description of
10572 the acceptable values for the FORMAT and TYPE parameters, respectively.
10574 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
10575 target (see `glBindBuffer') while a texture image is requested, IMG is
10576 treated as a byte offset into the buffer object's data store.
10578 To understand the operation of `glGetTexImage', consider the selected
10579 internal four-component texture image to be an RGBA color buffer the
10580 size of the image. The semantics of `glGetTexImage' are then identical
10581 to those of `glReadPixels', with the exception that no pixel transfer
10582 operations are performed, when called with the same FORMAT and TYPE,
10583 with X and Y set to 0, WIDTH set to the width of the texture image
10584 (including border if one was specified), and HEIGHT set to 1 for 1D
10585 images, or to the height of the texture image (including border if one
10586 was specified) for 2D images. Because the internal texture image is an
10587 RGBA image, pixel formats `GL_COLOR_INDEX', `GL_STENCIL_INDEX', and
10588 `GL_DEPTH_COMPONENT' are not accepted, and pixel type `GL_BITMAP' is not
10591 If the selected texture image does not contain four components, the
10592 following mappings are applied. Single-component textures are treated as
10593 RGBA buffers with red set to the single-component value, green set to 0,
10594 blue set to 0, and alpha set to 1. Two-component textures are treated as
10595 RGBA buffers with red set to the value of component zero, alpha set to
10596 the value of component one, and green and blue set to 0. Finally,
10597 three-component textures are treated as RGBA buffers with red set to
10598 component zero, green set to component one, blue set to component two,
10599 and alpha set to 1.
10601 To determine the required size of IMG, use `glGetTexLevelParameter' to
10602 determine the dimensions of the internal texture image, then scale the
10603 required number of pixels by the storage required for each pixel, based
10604 on FORMAT and TYPE. Be sure to take the pixel storage parameters into
10605 account, especially `GL_PACK_ALIGNMENT'.
10607 `GL_INVALID_ENUM' is generated if TARGET, FORMAT, or TYPE is not an
10610 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
10612 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
10613 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
10615 `GL_INVALID_OPERATION' is returned if TYPE is one of
10616 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
10617 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
10620 `GL_INVALID_OPERATION' is returned if TYPE is one of
10621 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
10622 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
10623 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
10624 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV', and
10625 FORMAT is neither `GL_RGBA' or `GL_BGRA'.
10627 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10628 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
10629 store is currently mapped.
10631 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10632 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
10633 to the buffer object such that the memory writes required would exceed
10634 the data store size.
10636 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10637 bound to the `GL_PIXEL_PACK_BUFFER' target and IMG is not evenly
10638 divisible into the number of bytes needed to store in memory a datum
10641 `GL_INVALID_OPERATION' is generated if `glGetTexImage' is executed
10642 between the execution of `glBegin' and the corresponding execution of
10645 (define-gl-procedures
10646 ((glGetTexLevelParameterfv
10653 (glGetTexLevelParameteriv
10660 "Return texture parameter values for a specific level of detail.
10663 Specifies the symbolic name of the target texture, either
10664 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D',
10665 `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_2D',
10666 `GL_PROXY_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10667 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10668 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10669 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
10672 Specifies the level-of-detail number of the desired image. Level 0
10673 is the base image level. Level N is the N th mipmap reduction
10677 Specifies the symbolic name of a texture parameter.
10678 `GL_TEXTURE_WIDTH', `GL_TEXTURE_HEIGHT', `GL_TEXTURE_DEPTH',
10679 `GL_TEXTURE_INTERNAL_FORMAT', `GL_TEXTURE_BORDER',
10680 `GL_TEXTURE_RED_SIZE', `GL_TEXTURE_GREEN_SIZE',
10681 `GL_TEXTURE_BLUE_SIZE', `GL_TEXTURE_ALPHA_SIZE',
10682 `GL_TEXTURE_LUMINANCE_SIZE', `GL_TEXTURE_INTENSITY_SIZE',
10683 `GL_TEXTURE_DEPTH_SIZE', `GL_TEXTURE_COMPRESSED', and
10684 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' are accepted.
10687 Returns the requested data.
10689 `glGetTexLevelParameter' returns in PARAMS texture parameter values for
10690 a specific level-of-detail value, specified as LEVEL. TARGET defines the
10691 target texture, either `GL_TEXTURE_1D', `GL_TEXTURE_2D',
10692 `GL_TEXTURE_3D', `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_2D',
10693 `GL_PROXY_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10694 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10695 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10696 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
10698 `GL_MAX_TEXTURE_SIZE', and `GL_MAX_3D_TEXTURE_SIZE' are not really
10699 descriptive enough. It has to report the largest square texture image
10700 that can be accommodated with mipmaps and borders, but a long skinny
10701 texture, or a texture without mipmaps and borders, may easily fit in
10702 texture memory. The proxy targets allow the user to more accurately
10703 query whether the GL can accommodate a texture of a given configuration.
10704 If the texture cannot be accommodated, the texture state variables,
10705 which may be queried with `glGetTexLevelParameter', are set to 0. If the
10706 texture can be accommodated, the texture state values will be set as
10707 they would be set for a non-proxy target.
10709 PNAME specifies the texture parameter whose value or values will be
10712 The accepted parameter names are as follows:
10717 PARAMS returns a single value, the width of the texture image. This
10718 value includes the border of the texture image. The initial value
10721 `GL_TEXTURE_HEIGHT'
10724 PARAMS returns a single value, the height of the texture image.
10725 This value includes the border of the texture image. The initial
10731 PARAMS returns a single value, the depth of the texture image. This
10732 value includes the border of the texture image. The initial value
10735 `GL_TEXTURE_INTERNAL_FORMAT'
10738 PARAMS returns a single value, the internal format of the texture
10741 `GL_TEXTURE_BORDER'
10744 PARAMS returns a single value, the width in pixels of the border of
10745 the texture image. The initial value is 0.
10747 `GL_TEXTURE_RED_SIZE',
10748 `GL_TEXTURE_GREEN_SIZE',
10749 `GL_TEXTURE_BLUE_SIZE',
10750 `GL_TEXTURE_ALPHA_SIZE',
10751 `GL_TEXTURE_LUMINANCE_SIZE',
10752 `GL_TEXTURE_INTENSITY_SIZE',
10753 `GL_TEXTURE_DEPTH_SIZE'
10756 The internal storage resolution of an individual component. The
10757 resolution chosen by the GL will be a close match for the
10758 resolution requested by the user with the component argument of
10759 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glCopyTexImage1D',
10760 and `glCopyTexImage2D'. The initial value is 0.
10762 `GL_TEXTURE_COMPRESSED'
10765 PARAMS returns a single boolean value indicating if the texture
10766 image is stored in a compressed internal format. The initiali value
10769 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE'
10772 PARAMS returns a single integer value, the number of unsigned bytes
10773 of the compressed texture image that would be returned from
10774 `glGetCompressedTexImage'.
10776 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10779 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
10781 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
10782 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
10784 `GL_INVALID_OPERATION' is generated if `glGetTexLevelParameter' is
10785 executed between the execution of `glBegin' and the corresponding
10786 execution of `glEnd'.
10788 `GL_INVALID_OPERATION' is generated if
10789 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' is queried on texture images with an
10790 uncompressed internal format or on proxy targets.")
10792 (define-gl-procedures
10793 ((glGetTexParameterfv
10799 (glGetTexParameteriv
10805 "Return texture parameter values.
10808 Specifies the symbolic name of the target texture. `GL_TEXTURE_1D',
10809 `GL_TEXTURE_2D', `GL_TEXTURE_3D', and `GL_TEXTURE_CUBE_MAP' are
10813 Specifies the symbolic name of a texture parameter.
10814 `GL_TEXTURE_MAG_FILTER', `GL_TEXTURE_MIN_FILTER',
10815 `GL_TEXTURE_MIN_LOD', `GL_TEXTURE_MAX_LOD',
10816 `GL_TEXTURE_BASE_LEVEL', `GL_TEXTURE_MAX_LEVEL',
10817 `GL_TEXTURE_WRAP_S', `GL_TEXTURE_WRAP_T', `GL_TEXTURE_WRAP_R',
10818 `GL_TEXTURE_BORDER_COLOR', `GL_TEXTURE_PRIORITY',
10819 `GL_TEXTURE_RESIDENT', `GL_TEXTURE_COMPARE_MODE',
10820 `GL_TEXTURE_COMPARE_FUNC', `GL_DEPTH_TEXTURE_MODE', and
10821 `GL_GENERATE_MIPMAP' are accepted.
10824 Returns the texture parameters.
10826 `glGetTexParameter' returns in PARAMS the value or values of the texture
10827 parameter specified as PNAME. TARGET defines the target texture, either
10828 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D', or
10829 `GL_TEXTURE_CUBE_MAP', to specify one-, two-, or three-dimensional or
10830 cube-mapped texturing. PNAME accepts the same symbols as
10831 `glTexParameter', with the same interpretations:
10833 `GL_TEXTURE_MAG_FILTER'
10834 Returns the single-valued texture magnification filter, a symbolic
10835 constant. The initial value is `GL_LINEAR'.
10837 `GL_TEXTURE_MIN_FILTER'
10838 Returns the single-valued texture minification filter, a symbolic
10839 constant. The initial value is `GL_NEAREST_MIPMAP_LINEAR'.
10841 `GL_TEXTURE_MIN_LOD'
10842 Returns the single-valued texture minimum level-of-detail value.
10843 The initial value is -1000 .
10845 `GL_TEXTURE_MAX_LOD'
10846 Returns the single-valued texture maximum level-of-detail value.
10847 The initial value is 1000.
10849 `GL_TEXTURE_BASE_LEVEL'
10850 Returns the single-valued base texture mipmap level. The initial
10853 `GL_TEXTURE_MAX_LEVEL'
10854 Returns the single-valued maximum texture mipmap array level. The
10855 initial value is 1000.
10857 `GL_TEXTURE_WRAP_S'
10858 Returns the single-valued wrapping function for texture coordinate
10859 S , a symbolic constant. The initial value is `GL_REPEAT'.
10861 `GL_TEXTURE_WRAP_T'
10862 Returns the single-valued wrapping function for texture coordinate
10863 T , a symbolic constant. The initial value is `GL_REPEAT'.
10865 `GL_TEXTURE_WRAP_R'
10866 Returns the single-valued wrapping function for texture coordinate
10867 R , a symbolic constant. The initial value is `GL_REPEAT'.
10869 `GL_TEXTURE_BORDER_COLOR'
10870 Returns four integer or floating-point numbers that comprise the
10871 RGBA color of the texture border. Floating-point values are
10872 returned in the range [0,1] . Integer values are returned as a
10873 linear mapping of the internal floating-point representation such
10874 that 1.0 maps to the most positive representable integer and -1.0
10875 maps to the most negative representable integer. The initial value
10878 `GL_TEXTURE_PRIORITY'
10879 Returns the residence priority of the target texture (or the named
10880 texture bound to it). The initial value is 1. See
10881 `glPrioritizeTextures'.
10883 `GL_TEXTURE_RESIDENT'
10884 Returns the residence status of the target texture. If the value
10885 returned in PARAMS is `GL_TRUE', the texture is resident in texture
10886 memory. See `glAreTexturesResident'.
10888 `GL_TEXTURE_COMPARE_MODE'
10889 Returns a single-valued texture comparison mode, a symbolic
10890 constant. The initial value is `GL_NONE'. See `glTexParameter'.
10892 `GL_TEXTURE_COMPARE_FUNC'
10893 Returns a single-valued texture comparison function, a symbolic
10894 constant. The initial value is `GL_LEQUAL'. See `glTexParameter'.
10896 `GL_DEPTH_TEXTURE_MODE'
10897 Returns a single-valued texture format indicating how the depth
10898 values should be converted into color components. The initial value
10899 is `GL_LUMINANCE'. See `glTexParameter'.
10901 `GL_GENERATE_MIPMAP'
10902 Returns a single boolean value indicating if automatic mipmap level
10903 updates are enabled. See `glTexParameter'.
10905 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10908 `GL_INVALID_OPERATION' is generated if `glGetTexParameter' is executed
10909 between the execution of `glBegin' and the corresponding execution of
10912 (define-gl-procedures
10913 ((glGetUniformLocation
10915 (name const-GLchar-*)
10918 "Returns the location of a uniform variable.
10921 Specifies the program object to be queried.
10924 Points to a null terminated string containing the name of the
10925 uniform variable whose location is to be queried.
10927 `glGetUniformLocation ' returns an integer that represents the location
10928 of a specific uniform variable within a program object. NAME must be a
10929 null terminated string that contains no white space. NAME must be an
10930 active uniform variable name in PROGRAM that is not a structure, an
10931 array of structures, or a subcomponent of a vector or a matrix. This
10932 function returns -1 if NAME does not correspond to an active uniform
10933 variable in PROGRAM or if NAME starts with the reserved prefix \"gl_\".
10935 Uniform variables that are structures or arrays of structures may be
10936 queried by calling `glGetUniformLocation' for each field within the
10937 structure. The array element operator \"[]\" and the structure field
10938 operator \".\" may be used in NAME in order to select elements within an
10939 array or fields within a structure. The result of using these operators
10940 is not allowed to be another structure, an array of structures, or a
10941 subcomponent of a vector or a matrix. Except if the last part of NAME
10942 indicates a uniform variable array, the location of the first element of
10943 an array can be retrieved by using the name of the array, or by using
10944 the name appended by \"[0]\".
10946 The actual locations assigned to uniform variables are not known until
10947 the program object is linked successfully. After linking has occurred,
10948 the command `glGetUniformLocation' can be used to obtain the location of
10949 a uniform variable. This location value can then be passed to
10950 `glUniform' to set the value of the uniform variable or to
10951 `glGetUniform' in order to query the current value of the uniform
10952 variable. After a program object has been linked successfully, the index
10953 values for uniform variables remain fixed until the next link command
10954 occurs. Uniform variable locations and values can only be queried after
10955 a link if the link was successful.
10957 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
10960 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
10962 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
10965 `GL_INVALID_OPERATION' is generated if `glGetUniformLocation' is
10966 executed between the execution of `glBegin' and the corresponding
10967 execution of `glEnd'.")
10969 (define-gl-procedures
10982 "Returns the value of a uniform variable.
10985 Specifies the program object to be queried.
10988 Specifies the location of the uniform variable to be queried.
10991 Returns the value of the specified uniform variable.
10993 `glGetUniform' returns in PARAMS the value(s) of the specified uniform
10994 variable. The type of the uniform variable specified by LOCATION
10995 determines the number of values returned. If the uniform variable is
10996 defined in the shader as a boolean, int, or float, a single value will
10997 be returned. If it is defined as a vec2, ivec2, or bvec2, two values
10998 will be returned. If it is defined as a vec3, ivec3, or bvec3, three
10999 values will be returned, and so on. To query values stored in uniform
11000 variables declared as arrays, call `glGetUniform' for each element of
11001 the array. To query values stored in uniform variables declared as
11002 structures, call `glGetUniform' for each field in the structure. The
11003 values for uniform variables declared as a matrix will be returned in
11004 column major order.
11006 The locations assigned to uniform variables are not known until the
11007 program object is linked. After linking has occurred, the command
11008 `glGetUniformLocation' can be used to obtain the location of a uniform
11009 variable. This location value can then be passed to `glGetUniform' in
11010 order to query the current value of the uniform variable. After a
11011 program object has been linked successfully, the index values for
11012 uniform variables remain fixed until the next link command occurs. The
11013 uniform variable values can only be queried after a link if the link was
11016 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
11019 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
11021 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
11024 `GL_INVALID_OPERATION' is generated if LOCATION does not correspond to a
11025 valid uniform variable location for the specified program object.
11027 `GL_INVALID_OPERATION' is generated if `glGetUniform' is executed
11028 between the execution of `glBegin' and the corresponding execution of
11031 (define-gl-procedures
11032 ((glGetVertexAttribPointerv
11035 (pointer GLvoid-**)
11038 "Return the address of the specified generic vertex attribute pointer.
11041 Specifies the generic vertex attribute parameter to be returned.
11044 Specifies the symbolic name of the generic vertex attribute
11045 parameter to be returned. Must be `GL_VERTEX_ATTRIB_ARRAY_POINTER'.
11048 Returns the pointer value.
11050 `glGetVertexAttribPointerv' returns pointer information. INDEX is the
11051 generic vertex attribute to be queried, PNAME is a symbolic constant
11052 indicating the pointer to be returned, and PARAMS is a pointer to a
11053 location in which to place the returned data.
11055 If a non-zero named buffer object was bound to the `GL_ARRAY_BUFFER'
11056 target (see `glBindBuffer') when the desired pointer was previously
11057 specified, the POINTER returned is a byte offset into the buffer
11058 object's data store.
11060 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
11061 `GL_MAX_VERTEX_ATTRIBS'.
11063 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.")
11065 (define-gl-procedures
11066 ((glGetVertexAttribdv
11069 (params GLdouble-*)
11072 (glGetVertexAttribfv
11078 (glGetVertexAttribiv
11084 "Return a generic vertex attribute parameter.
11087 Specifies the generic vertex attribute parameter to be queried.
11090 Specifies the symbolic name of the vertex attribute parameter to be
11091 queried. Accepted values are
11092 `GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING',
11093 `GL_VERTEX_ATTRIB_ARRAY_ENABLED', `GL_VERTEX_ATTRIB_ARRAY_SIZE',
11094 `GL_VERTEX_ATTRIB_ARRAY_STRIDE', `GL_VERTEX_ATTRIB_ARRAY_TYPE',
11095 `GL_VERTEX_ATTRIB_ARRAY_NORMALIZED', or `GL_CURRENT_VERTEX_ATTRIB'.
11098 Returns the requested data.
11100 `glGetVertexAttrib' returns in PARAMS the value of a generic vertex
11101 attribute parameter. The generic vertex attribute to be queried is
11102 specified by INDEX, and the parameter to be queried is specified by
11105 The accepted parameter names are as follows:
11107 `GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING'
11110 PARAMS returns a single value, the name of the buffer object
11111 currently bound to the binding point corresponding to generic
11112 vertex attribute array INDEX. If no buffer object is bound, 0 is
11113 returned. The initial value is 0.
11115 `GL_VERTEX_ATTRIB_ARRAY_ENABLED'
11118 PARAMS returns a single value that is non-zero (true) if the vertex
11119 attribute array for INDEX is enabled and 0 (false) if it is
11120 disabled. The initial value is `GL_FALSE'.
11122 `GL_VERTEX_ATTRIB_ARRAY_SIZE'
11125 PARAMS returns a single value, the size of the vertex attribute
11126 array for INDEX. The size is the number of values for each element
11127 of the vertex attribute array, and it will be 1, 2, 3, or 4. The
11128 initial value is 4.
11130 `GL_VERTEX_ATTRIB_ARRAY_STRIDE'
11133 PARAMS returns a single value, the array stride for (number of
11134 bytes between successive elements in) the vertex attribute array
11135 for INDEX. A value of 0 indicates that the array elements are
11136 stored sequentially in memory. The initial value is 0.
11138 `GL_VERTEX_ATTRIB_ARRAY_TYPE'
11141 PARAMS returns a single value, a symbolic constant indicating the
11142 array type for the vertex attribute array for INDEX. Possible
11143 values are `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
11144 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', and
11145 `GL_DOUBLE'. The initial value is `GL_FLOAT'.
11147 `GL_VERTEX_ATTRIB_ARRAY_NORMALIZED'
11150 PARAMS returns a single value that is non-zero (true) if
11151 fixed-point data types for the vertex attribute array indicated by
11152 INDEX are normalized when they are converted to floating point, and
11153 0 (false) otherwise. The initial value is `GL_FALSE'.
11155 `GL_CURRENT_VERTEX_ATTRIB'
11158 PARAMS returns four values that represent the current value for the
11159 generic vertex attribute specified by index. Generic vertex
11160 attribute 0 is unique in that it has no current state, so an error
11161 will be generated if INDEX is 0. The initial value for all other
11162 generic vertex attributes is (0,0,0,1).
11164 All of the parameters except `GL_CURRENT_VERTEX_ATTRIB' represent
11167 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
11168 `GL_MAX_VERTEX_ATTRIBS'.
11170 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
11172 `GL_INVALID_OPERATION' is generated if INDEX is 0 and PNAME is
11173 `GL_CURRENT_VERTEX_ATTRIB'.")
11175 (define-gl-procedures
11178 (params GLboolean-*)
11183 (params GLdouble-*)
11196 "Return the value or values of a selected parameter.
11199 Specifies the parameter value to be returned. The symbolic
11200 constants in the list below are accepted.
11203 Returns the value or values of the specified parameter.
11205 These four commands return values for simple state variables in GL.
11206 PNAME is a symbolic constant indicating the state variable to be
11207 returned, and PARAMS is a pointer to an array of the indicated type in
11208 which to place the returned data.
11210 Type conversion is performed if PARAMS has a different type than the
11211 state variable value being requested. If `glGetBooleanv' is called, a
11212 floating-point (or integer) value is converted to `GL_FALSE' if and only
11213 if it is 0.0 (or 0). Otherwise, it is converted to `GL_TRUE'. If
11214 `glGetIntegerv' is called, boolean values are returned as `GL_TRUE' or
11215 `GL_FALSE', and most floating-point values are rounded to the nearest
11216 integer value. Floating-point colors and normals, however, are returned
11217 with a linear mapping that maps 1.0 to the most positive representable
11218 integer value and -1.0 to the most negative representable integer value.
11219 If `glGetFloatv' or `glGetDoublev' is called, boolean values are
11220 returned as `GL_TRUE' or `GL_FALSE', and integer values are converted to
11221 floating-point values.
11223 The following symbolic constants are accepted by PNAME:
11225 `GL_ACCUM_ALPHA_BITS'
11228 PARAMS returns one value, the number of alpha bitplanes in the
11229 accumulation buffer.
11231 `GL_ACCUM_BLUE_BITS'
11234 PARAMS returns one value, the number of blue bitplanes in the
11235 accumulation buffer.
11237 `GL_ACCUM_CLEAR_VALUE'
11240 PARAMS returns four values: the red, green, blue, and alpha values
11241 used to clear the accumulation buffer. Integer values, if
11242 requested, are linearly mapped from the internal floating-point
11243 representation such that 1.0 returns the most positive
11244 representable integer value, and -1.0 returns the most negative
11245 representable integer value. The initial value is (0, 0, 0, 0). See
11248 `GL_ACCUM_GREEN_BITS'
11251 PARAMS returns one value, the number of green bitplanes in the
11252 accumulation buffer.
11254 `GL_ACCUM_RED_BITS'
11257 PARAMS returns one value, the number of red bitplanes in the
11258 accumulation buffer.
11260 `GL_ACTIVE_TEXTURE'
11263 PARAMS returns a single value indicating the active multitexture
11264 unit. The initial value is `GL_TEXTURE0'. See `glActiveTexture'.
11266 `GL_ALIASED_POINT_SIZE_RANGE'
11269 PARAMS returns two values, the smallest and largest supported sizes
11270 for aliased points.
11272 `GL_ALIASED_LINE_WIDTH_RANGE'
11275 PARAMS returns two values, the smallest and largest supported
11276 widths for aliased lines.
11281 PARAMS returns one value, the alpha bias factor used during pixel
11282 transfers. The initial value is 0. See `glPixelTransfer'.
11287 PARAMS returns one value, the number of alpha bitplanes in each
11293 PARAMS returns one value, the alpha scale factor used during pixel
11294 transfers. The initial value is 1. See `glPixelTransfer'.
11299 PARAMS returns a single boolean value indicating whether alpha
11300 testing of fragments is enabled. The initial value is `GL_FALSE'.
11303 `GL_ALPHA_TEST_FUNC'PARAMS returns one value,
11306 the symbolic name of the alpha test function. The initial value is
11307 `GL_ALWAYS'. See `glAlphaFunc'.
11309 `GL_ALPHA_TEST_REF'
11312 PARAMS returns one value, the reference value for the alpha test.
11313 The initial value is 0. See `glAlphaFunc'. An integer value, if
11314 requested, is linearly mapped from the internal floating-point
11315 representation such that 1.0 returns the most positive
11316 representable integer value, and -1.0 returns the most negative
11317 representable integer value.
11319 `GL_ARRAY_BUFFER_BINDING'
11322 PARAMS returns a single value, the name of the buffer object
11323 currently bound to the target `GL_ARRAY_BUFFER'. If no buffer
11324 object is bound to this target, 0 is returned. The initial value is
11325 0. See `glBindBuffer'.
11327 `GL_ATTRIB_STACK_DEPTH'
11330 PARAMS returns one value, the depth of the attribute stack. If the
11331 stack is empty, 0 is returned. The initial value is 0. See
11337 PARAMS returns a single boolean value indicating whether 2D map
11338 evaluation automatically generates surface normals. The initial
11339 value is `GL_FALSE'. See `glMap2'.
11344 PARAMS returns one value, the number of auxiliary color buffers
11350 PARAMS returns a single boolean value indicating whether blending
11351 is enabled. The initial value is `GL_FALSE'. See `glBlendFunc'.
11356 PARAMS returns four values, the red, green, blue, and alpha values
11357 which are the components of the blend color. See `glBlendColor'.
11359 `GL_BLEND_DST_ALPHA'
11362 PARAMS returns one value, the symbolic constant identifying the
11363 alpha destination blend function. The initial value is `GL_ZERO'.
11364 See `glBlendFunc' and `glBlendFuncSeparate'.
11369 PARAMS returns one value, the symbolic constant identifying the RGB
11370 destination blend function. The initial value is `GL_ZERO'. See
11371 `glBlendFunc' and `glBlendFuncSeparate'.
11373 `GL_BLEND_EQUATION_RGB'
11376 PARAMS returns one value, a symbolic constant indicating whether
11377 the RGB blend equation is `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
11378 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN' or `GL_MAX'. See
11379 `glBlendEquationSeparate'.
11381 `GL_BLEND_EQUATION_ALPHA'
11384 PARAMS returns one value, a symbolic constant indicating whether
11385 the Alpha blend equation is `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
11386 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN' or `GL_MAX'. See
11387 `glBlendEquationSeparate'.
11389 `GL_BLEND_SRC_ALPHA'
11392 PARAMS returns one value, the symbolic constant identifying the
11393 alpha source blend function. The initial value is `GL_ONE'. See
11394 `glBlendFunc' and `glBlendFuncSeparate'.
11399 PARAMS returns one value, the symbolic constant identifying the RGB
11400 source blend function. The initial value is `GL_ONE'. See
11401 `glBlendFunc' and `glBlendFuncSeparate'.
11406 PARAMS returns one value, the blue bias factor used during pixel
11407 transfers. The initial value is 0. See `glPixelTransfer'.
11412 PARAMS returns one value, the number of blue bitplanes in each
11418 PARAMS returns one value, the blue scale factor used during pixel
11419 transfers. The initial value is 1. See `glPixelTransfer'.
11421 `GL_CLIENT_ACTIVE_TEXTURE'
11424 PARAMS returns a single integer value indicating the current client
11425 active multitexture unit. The initial value is `GL_TEXTURE0'. See
11426 `glClientActiveTexture'.
11428 `GL_CLIENT_ATTRIB_STACK_DEPTH'
11431 PARAMS returns one value indicating the depth of the attribute
11432 stack. The initial value is 0. See `glPushClientAttrib'.
11437 PARAMS returns a single boolean value indicating whether the
11438 specified clipping plane is enabled. The initial value is
11439 `GL_FALSE'. See `glClipPlane'.
11444 PARAMS returns a single boolean value indicating whether the color
11445 array is enabled. The initial value is `GL_FALSE'. See
11448 `GL_COLOR_ARRAY_BUFFER_BINDING'
11451 PARAMS returns a single value, the name of the buffer object
11452 associated with the color array. This buffer object would have been
11453 bound to the target `GL_ARRAY_BUFFER' at the time of the most
11454 recent call to `glColorPointer'. If no buffer object was bound to
11455 this target, 0 is returned. The initial value is 0. See
11458 `GL_COLOR_ARRAY_SIZE'
11461 PARAMS returns one value, the number of components per color in the
11462 color array. The initial value is 4. See `glColorPointer'.
11464 `GL_COLOR_ARRAY_STRIDE'
11467 PARAMS returns one value, the byte offset between consecutive
11468 colors in the color array. The initial value is 0. See
11471 `GL_COLOR_ARRAY_TYPE'
11474 PARAMS returns one value, the data type of each component in the
11475 color array. The initial value is `GL_FLOAT'. See `glColorPointer'.
11477 `GL_COLOR_CLEAR_VALUE'
11480 PARAMS returns four values: the red, green, blue, and alpha values
11481 used to clear the color buffers. Integer values, if requested, are
11482 linearly mapped from the internal floating-point representation
11483 such that 1.0 returns the most positive representable integer
11484 value, and -1.0 returns the most negative representable integer
11485 value. The initial value is (0, 0, 0, 0). See `glClearColor'.
11487 `GL_COLOR_LOGIC_OP'
11490 PARAMS returns a single boolean value indicating whether a
11491 fragment's RGBA color values are merged into the framebuffer using
11492 a logical operation. The initial value is `GL_FALSE'. See
11495 `GL_COLOR_MATERIAL'
11498 PARAMS returns a single boolean value indicating whether one or
11499 more material parameters are tracking the current color. The
11500 initial value is `GL_FALSE'. See `glColorMaterial'.
11502 `GL_COLOR_MATERIAL_FACE'
11505 PARAMS returns one value, a symbolic constant indicating which
11506 materials have a parameter that is tracking the current color. The
11507 initial value is `GL_FRONT_AND_BACK'. See `glColorMaterial'.
11509 `GL_COLOR_MATERIAL_PARAMETER'
11512 PARAMS returns one value, a symbolic constant indicating which
11513 material parameters are tracking the current color. The initial
11514 value is `GL_AMBIENT_AND_DIFFUSE'. See `glColorMaterial'.
11519 PARAMS returns sixteen values: the color matrix on the top of the
11520 color matrix stack. Initially this matrix is the identity matrix.
11521 See `glPushMatrix'.
11523 `GL_COLOR_MATRIX_STACK_DEPTH'
11526 PARAMS returns one value, the maximum supported depth of the
11527 projection matrix stack. The value must be at least 2. See
11533 PARAMS returns a single boolean value indicating whether primary
11534 and secondary color sum is enabled. See `glSecondaryColor'.
11539 PARAMS returns a single boolean value indicating whether the color
11540 table lookup is enabled. See `glColorTable'.
11542 `GL_COLOR_WRITEMASK'
11545 PARAMS returns four boolean values: the red, green, blue, and alpha
11546 write enables for the color buffers. The initial value is
11547 (`GL_TRUE', `GL_TRUE', `GL_TRUE', `GL_TRUE'). See `glColorMask'.
11549 `GL_COMPRESSED_TEXTURE_FORMATS'
11552 PARAMS returns a list of symbolic constants of length
11553 `GL_NUM_COMPRESSED_TEXTURE_FORMATS' indicating which compressed
11554 texture formats are available. See `glCompressedTexImage2D'.
11556 `GL_CONVOLUTION_1D'
11559 PARAMS returns a single boolean value indicating whether 1D
11560 convolution is enabled. The initial value is `GL_FALSE'. See
11561 `glConvolutionFilter1D'.
11563 `GL_CONVOLUTION_2D'
11566 PARAMS returns a single boolean value indicating whether 2D
11567 convolution is enabled. The initial value is `GL_FALSE'. See
11568 `glConvolutionFilter2D'.
11573 PARAMS returns a single boolean value indicating whether polygon
11574 culling is enabled. The initial value is `GL_FALSE'. See
11577 `GL_CULL_FACE_MODE'
11580 PARAMS returns one value, a symbolic constant indicating which
11581 polygon faces are to be culled. The initial value is `GL_BACK'. See
11587 PARAMS returns four values: the red, green, blue, and alpha values
11588 of the current color. Integer values, if requested, are linearly
11589 mapped from the internal floating-point representation such that
11590 1.0 returns the most positive representable integer value, and -1.0
11591 returns the most negative representable integer value. The initial
11592 value is (1, 1, 1, 1). See `glColor'.
11594 `GL_CURRENT_FOG_COORD'
11597 PARAMS returns one value, the current fog coordinate. The initial
11598 value is 0. See `glFogCoord'.
11603 PARAMS returns one value, the current color index. The initial
11604 value is 1. See `glIndex'.
11606 `GL_CURRENT_NORMAL'
11609 PARAMS returns three values: the X, Y, and Z values of the current
11610 normal. Integer values, if requested, are linearly mapped from the
11611 internal floating-point representation such that 1.0 returns the
11612 most positive representable integer value, and -1.0 returns the
11613 most negative representable integer value. The initial value is (0,
11614 0, 1). See `glNormal'.
11616 `GL_CURRENT_PROGRAM'
11619 PARAMS returns one value, the name of the program object that is
11620 currently active, or 0 if no program object is active. See
11623 `GL_CURRENT_RASTER_COLOR'
11626 PARAMS returns four values: the red, green, blue, and alpha color
11627 values of the current raster position. Integer values, if
11628 requested, are linearly mapped from the internal floating-point
11629 representation such that 1.0 returns the most positive
11630 representable integer value, and -1.0 returns the most negative
11631 representable integer value. The initial value is (1, 1, 1, 1). See
11634 `GL_CURRENT_RASTER_DISTANCE'
11637 PARAMS returns one value, the distance from the eye to the current
11638 raster position. The initial value is 0. See `glRasterPos'.
11640 `GL_CURRENT_RASTER_INDEX'
11643 PARAMS returns one value, the color index of the current raster
11644 position. The initial value is 1. See `glRasterPos'.
11646 `GL_CURRENT_RASTER_POSITION'
11649 PARAMS returns four values: the X, Y, Z, and W components of the
11650 current raster position. X, Y, and Z are in window coordinates, and
11651 W is in clip coordinates. The initial value is (0, 0, 0, 1). See
11654 `GL_CURRENT_RASTER_POSITION_VALID'
11657 PARAMS returns a single boolean value indicating whether the
11658 current raster position is valid. The initial value is `GL_TRUE'.
11661 `GL_CURRENT_RASTER_SECONDARY_COLOR'
11664 PARAMS returns four values: the red, green, blue, and alpha
11665 secondary color values of the current raster position. Integer
11666 values, if requested, are linearly mapped from the internal
11667 floating-point representation such that 1.0 returns the most
11668 positive representable integer value, and -1.0 returns the most
11669 negative representable integer value. The initial value is (1, 1,
11670 1, 1). See `glRasterPos'.
11672 `GL_CURRENT_RASTER_TEXTURE_COORDS'
11675 PARAMS returns four values: the S, T, R, and Q texture coordinates
11676 of the current raster position. The initial value is (0, 0, 0, 1).
11677 See `glRasterPos' and `glMultiTexCoord'.
11679 `GL_CURRENT_SECONDARY_COLOR'
11682 PARAMS returns four values: the red, green, blue, and alpha values
11683 of the current secondary color. Integer values, if requested, are
11684 linearly mapped from the internal floating-point representation
11685 such that 1.0 returns the most positive representable integer
11686 value, and -1.0 returns the most negative representable integer
11687 value. The initial value is (0, 0, 0, 0). See `glSecondaryColor'.
11689 `GL_CURRENT_TEXTURE_COORDS'
11692 PARAMS returns four values: the S, T, R, and Q current texture
11693 coordinates. The initial value is (0, 0, 0, 1). See
11699 PARAMS returns one value, the depth bias factor used during pixel
11700 transfers. The initial value is 0. See `glPixelTransfer'.
11705 PARAMS returns one value, the number of bitplanes in the depth
11708 `GL_DEPTH_CLEAR_VALUE'
11711 PARAMS returns one value, the value that is used to clear the depth
11712 buffer. Integer values, if requested, are linearly mapped from the
11713 internal floating-point representation such that 1.0 returns the
11714 most positive representable integer value, and -1.0 returns the
11715 most negative representable integer value. The initial value is 1.
11716 See `glClearDepth'.
11721 PARAMS returns one value, the symbolic constant that indicates the
11722 depth comparison function. The initial value is `GL_LESS'. See
11728 PARAMS returns two values: the near and far mapping limits for the
11729 depth buffer. Integer values, if requested, are linearly mapped
11730 from the internal floating-point representation such that 1.0
11731 returns the most positive representable integer value, and -1.0
11732 returns the most negative representable integer value. The initial
11733 value is (0, 1). See `glDepthRange'.
11738 PARAMS returns one value, the depth scale factor used during pixel
11739 transfers. The initial value is 1. See `glPixelTransfer'.
11744 PARAMS returns a single boolean value indicating whether depth
11745 testing of fragments is enabled. The initial value is `GL_FALSE'.
11746 See `glDepthFunc' and `glDepthRange'.
11748 `GL_DEPTH_WRITEMASK'
11751 PARAMS returns a single boolean value indicating if the depth
11752 buffer is enabled for writing. The initial value is `GL_TRUE'. See
11758 PARAMS returns a single boolean value indicating whether dithering
11759 of fragment colors and indices is enabled. The initial value is
11765 PARAMS returns a single boolean value indicating whether double
11766 buffering is supported.
11771 PARAMS returns one value, a symbolic constant indicating which
11772 buffers are being drawn to. See `glDrawBuffer'. The initial value
11773 is `GL_BACK' if there are back buffers, otherwise it is `GL_FRONT'.
11778 PARAMS returns one value, a symbolic constant indicating which
11779 buffers are being drawn to by the corresponding output color. See
11780 `glDrawBuffers'. The initial value of `GL_DRAW_BUFFER0' is
11781 `GL_BACK' if there are back buffers, otherwise it is `GL_FRONT'.
11782 The initial values of draw buffers for all other output colors is
11788 PARAMS returns a single boolean value indicating whether the
11789 current edge flag is `GL_TRUE' or `GL_FALSE'. The initial value is
11790 `GL_TRUE'. See `glEdgeFlag'.
11792 `GL_EDGE_FLAG_ARRAY'
11795 PARAMS returns a single boolean value indicating whether the edge
11796 flag array is enabled. The initial value is `GL_FALSE'. See
11797 `glEdgeFlagPointer'.
11799 `GL_EDGE_FLAG_ARRAY_BUFFER_BINDING'
11802 PARAMS returns a single value, the name of the buffer object
11803 associated with the edge flag array. This buffer object would have
11804 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
11805 recent call to `glEdgeFlagPointer'. If no buffer object was bound
11806 to this target, 0 is returned. The initial value is 0. See
11809 `GL_EDGE_FLAG_ARRAY_STRIDE'
11812 PARAMS returns one value, the byte offset between consecutive edge
11813 flags in the edge flag array. The initial value is 0. See
11814 `glEdgeFlagPointer'.
11816 `GL_ELEMENT_ARRAY_BUFFER_BINDING'
11819 PARAMS returns a single value, the name of the buffer object
11820 currently bound to the target `GL_ELEMENT_ARRAY_BUFFER'. If no
11821 buffer object is bound to this target, 0 is returned. The initial
11822 value is 0. See `glBindBuffer'.
11824 `GL_FEEDBACK_BUFFER_SIZE'
11827 PARAMS returns one value, the size of the feedback buffer. See
11828 `glFeedbackBuffer'.
11830 `GL_FEEDBACK_BUFFER_TYPE'
11833 PARAMS returns one value, the type of the feedback buffer. See
11834 `glFeedbackBuffer'.
11839 PARAMS returns a single boolean value indicating whether fogging is
11840 enabled. The initial value is `GL_FALSE'. See `glFog'.
11842 `GL_FOG_COORD_ARRAY'
11845 PARAMS returns a single boolean value indicating whether the fog
11846 coordinate array is enabled. The initial value is `GL_FALSE'. See
11847 `glFogCoordPointer'.
11849 `GL_FOG_COORD_ARRAY_BUFFER_BINDING'
11852 PARAMS returns a single value, the name of the buffer object
11853 associated with the fog coordinate array. This buffer object would
11854 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
11855 most recent call to `glFogCoordPointer'. If no buffer object was
11856 bound to this target, 0 is returned. The initial value is 0. See
11859 `GL_FOG_COORD_ARRAY_STRIDE'
11862 PARAMS returns one value, the byte offset between consecutive fog
11863 coordinates in the fog coordinate array. The initial value is 0.
11864 See `glFogCoordPointer'.
11866 `GL_FOG_COORD_ARRAY_TYPE'
11869 PARAMS returns one value, the type of the fog coordinate array. The
11870 initial value is `GL_FLOAT'. See `glFogCoordPointer'.
11875 PARAMS returns one value, a symbolic constant indicating the source
11876 of the fog coordinate. The initial value is `GL_FRAGMENT_DEPTH'.
11882 PARAMS returns four values: the red, green, blue, and alpha
11883 components of the fog color. Integer values, if requested, are
11884 linearly mapped from the internal floating-point representation
11885 such that 1.0 returns the most positive representable integer
11886 value, and -1.0 returns the most negative representable integer
11887 value. The initial value is (0, 0, 0, 0). See `glFog'.
11892 PARAMS returns one value, the fog density parameter. The initial
11893 value is 1. See `glFog'.
11898 PARAMS returns one value, the end factor for the linear fog
11899 equation. The initial value is 1. See `glFog'.
11904 PARAMS returns one value, a symbolic constant indicating the mode
11905 of the fog hint. The initial value is `GL_DONT_CARE'. See `glHint'.
11910 PARAMS returns one value, the fog color index. The initial value is
11916 PARAMS returns one value, a symbolic constant indicating which fog
11917 equation is selected. The initial value is `GL_EXP'. See `glFog'.
11922 PARAMS returns one value, the start factor for the linear fog
11923 equation. The initial value is 0. See `glFog'.
11925 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT'
11928 PARAMS returns one value, a symbolic constant indicating the mode
11929 of the derivative accuracy hint for fragment shaders. The initial
11930 value is `GL_DONT_CARE'. See `glHint'.
11935 PARAMS returns one value, a symbolic constant indicating whether
11936 clockwise or counterclockwise polygon winding is treated as
11937 front-facing. The initial value is `GL_CCW'. See `glFrontFace'.
11939 `GL_GENERATE_MIPMAP_HINT'
11942 PARAMS returns one value, a symbolic constant indicating the mode
11943 of the mipmap generation filtering hint. The initial value is
11944 `GL_DONT_CARE'. See `glHint'.
11949 PARAMS returns one value, the green bias factor used during pixel
11950 transfers. The initial value is 0.
11955 PARAMS returns one value, the number of green bitplanes in each
11961 PARAMS returns one value, the green scale factor used during pixel
11962 transfers. The initial value is 1. See `glPixelTransfer'.
11967 PARAMS returns a single boolean value indicating whether histogram
11968 is enabled. The initial value is `GL_FALSE'. See `glHistogram'.
11973 PARAMS returns a single boolean value indicating whether the color
11974 index array is enabled. The initial value is `GL_FALSE'. See
11977 `GL_INDEX_ARRAY_BUFFER_BINDING'
11980 PARAMS returns a single value, the name of the buffer object
11981 associated with the color index array. This buffer object would
11982 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
11983 most recent call to `glIndexPointer'. If no buffer object was bound
11984 to this target, 0 is returned. The initial value is 0. See
11987 `GL_INDEX_ARRAY_STRIDE'
11990 PARAMS returns one value, the byte offset between consecutive color
11991 indexes in the color index array. The initial value is 0. See
11994 `GL_INDEX_ARRAY_TYPE'
11997 PARAMS returns one value, the data type of indexes in the color
11998 index array. The initial value is `GL_FLOAT'. See `glIndexPointer'.
12003 PARAMS returns one value, the number of bitplanes in each color
12006 `GL_INDEX_CLEAR_VALUE'
12009 PARAMS returns one value, the color index used to clear the color
12010 index buffers. The initial value is 0. See `glClearIndex'.
12012 `GL_INDEX_LOGIC_OP'
12015 PARAMS returns a single boolean value indicating whether a
12016 fragment's index values are merged into the framebuffer using a
12017 logical operation. The initial value is `GL_FALSE'. See
12023 PARAMS returns a single boolean value indicating whether the GL is
12024 in color index mode (`GL_TRUE') or RGBA mode (`GL_FALSE').
12029 PARAMS returns one value, the offset added to color and stencil
12030 indices during pixel transfers. The initial value is 0. See
12036 PARAMS returns one value, the amount that color and stencil indices
12037 are shifted during pixel transfers. The initial value is 0. See
12040 `GL_INDEX_WRITEMASK'
12043 PARAMS returns one value, a mask indicating which bitplanes of each
12044 color index buffer can be written. The initial value is all 1's.
12050 PARAMS returns a single boolean value indicating whether the
12051 specified light is enabled. The initial value is `GL_FALSE'. See
12052 `glLight' and `glLightModel'.
12057 PARAMS returns a single boolean value indicating whether lighting
12058 is enabled. The initial value is `GL_FALSE'. See `glLightModel'.
12060 `GL_LIGHT_MODEL_AMBIENT'
12063 PARAMS returns four values: the red, green, blue, and alpha
12064 components of the ambient intensity of the entire scene. Integer
12065 values, if requested, are linearly mapped from the internal
12066 floating-point representation such that 1.0 returns the most
12067 positive representable integer value, and -1.0 returns the most
12068 negative representable integer value. The initial value is (0.2,
12069 0.2, 0.2, 1.0). See `glLightModel'.
12071 `GL_LIGHT_MODEL_COLOR_CONTROL'
12074 PARAMS returns single enumerated value indicating whether specular
12075 reflection calculations are separated from normal lighting
12076 computations. The initial value is `GL_SINGLE_COLOR'.
12078 `GL_LIGHT_MODEL_LOCAL_VIEWER'
12081 PARAMS returns a single boolean value indicating whether specular
12082 reflection calculations treat the viewer as being local to the
12083 scene. The initial value is `GL_FALSE'. See `glLightModel'.
12085 `GL_LIGHT_MODEL_TWO_SIDE'
12088 PARAMS returns a single boolean value indicating whether separate
12089 materials are used to compute lighting for front- and back-facing
12090 polygons. The initial value is `GL_FALSE'. See `glLightModel'.
12095 PARAMS returns a single boolean value indicating whether
12096 antialiasing of lines is enabled. The initial value is `GL_FALSE'.
12099 `GL_LINE_SMOOTH_HINT'
12102 PARAMS returns one value, a symbolic constant indicating the mode
12103 of the line antialiasing hint. The initial value is `GL_DONT_CARE'.
12109 PARAMS returns a single boolean value indicating whether stippling
12110 of lines is enabled. The initial value is `GL_FALSE'. See
12113 `GL_LINE_STIPPLE_PATTERN'
12116 PARAMS returns one value, the 16-bit line stipple pattern. The
12117 initial value is all 1's. See `glLineStipple'.
12119 `GL_LINE_STIPPLE_REPEAT'
12122 PARAMS returns one value, the line stipple repeat factor. The
12123 initial value is 1. See `glLineStipple'.
12128 PARAMS returns one value, the line width as specified with
12129 `glLineWidth'. The initial value is 1.
12131 `GL_LINE_WIDTH_GRANULARITY'
12134 PARAMS returns one value, the width difference between adjacent
12135 supported widths for antialiased lines. See `glLineWidth'.
12137 `GL_LINE_WIDTH_RANGE'
12140 PARAMS returns two values: the smallest and largest supported
12141 widths for antialiased lines. See `glLineWidth'.
12146 PARAMS returns one value, the base offset added to all names in
12147 arrays presented to `glCallLists'. The initial value is 0. See
12153 PARAMS returns one value, the name of the display list currently
12154 under construction. 0 is returned if no display list is currently
12155 under construction. The initial value is 0. See `glNewList'.
12160 PARAMS returns one value, a symbolic constant indicating the
12161 construction mode of the display list currently under construction.
12162 The initial value is 0. See `glNewList'.
12167 PARAMS returns one value, a symbolic constant indicating the
12168 selected logic operation mode. The initial value is `GL_COPY'. See
12174 PARAMS returns a single boolean value indicating whether 1D
12175 evaluation generates colors. The initial value is `GL_FALSE'. See
12178 `GL_MAP1_GRID_DOMAIN'
12181 PARAMS returns two values: the endpoints of the 1D map's grid
12182 domain. The initial value is (0, 1). See `glMapGrid'.
12184 `GL_MAP1_GRID_SEGMENTS'
12187 PARAMS returns one value, the number of partitions in the 1D map's
12188 grid domain. The initial value is 1. See `glMapGrid'.
12193 PARAMS returns a single boolean value indicating whether 1D
12194 evaluation generates color indices. The initial value is
12195 `GL_FALSE'. See `glMap1'.
12200 PARAMS returns a single boolean value indicating whether 1D
12201 evaluation generates normals. The initial value is `GL_FALSE'. See
12204 `GL_MAP1_TEXTURE_COORD_1'
12207 PARAMS returns a single boolean value indicating whether 1D
12208 evaluation generates 1D texture coordinates. The initial value is
12209 `GL_FALSE'. See `glMap1'.
12211 `GL_MAP1_TEXTURE_COORD_2'
12214 PARAMS returns a single boolean value indicating whether 1D
12215 evaluation generates 2D texture coordinates. The initial value is
12216 `GL_FALSE'. See `glMap1'.
12218 `GL_MAP1_TEXTURE_COORD_3'
12221 PARAMS returns a single boolean value indicating whether 1D
12222 evaluation generates 3D texture coordinates. The initial value is
12223 `GL_FALSE'. See `glMap1'.
12225 `GL_MAP1_TEXTURE_COORD_4'
12228 PARAMS returns a single boolean value indicating whether 1D
12229 evaluation generates 4D texture coordinates. The initial value is
12230 `GL_FALSE'. See `glMap1'.
12235 PARAMS returns a single boolean value indicating whether 1D
12236 evaluation generates 3D vertex coordinates. The initial value is
12237 `GL_FALSE'. See `glMap1'.
12242 PARAMS returns a single boolean value indicating whether 1D
12243 evaluation generates 4D vertex coordinates. The initial value is
12244 `GL_FALSE'. See `glMap1'.
12249 PARAMS returns a single boolean value indicating whether 2D
12250 evaluation generates colors. The initial value is `GL_FALSE'. See
12253 `GL_MAP2_GRID_DOMAIN'
12256 PARAMS returns four values: the endpoints of the 2D map's I and J
12257 grid domains. The initial value is (0,1; 0,1). See `glMapGrid'.
12259 `GL_MAP2_GRID_SEGMENTS'
12262 PARAMS returns two values: the number of partitions in the 2D map's
12263 I and J grid domains. The initial value is (1,1). See `glMapGrid'.
12268 PARAMS returns a single boolean value indicating whether 2D
12269 evaluation generates color indices. The initial value is
12270 `GL_FALSE'. See `glMap2'.
12275 PARAMS returns a single boolean value indicating whether 2D
12276 evaluation generates normals. The initial value is `GL_FALSE'. See
12279 `GL_MAP2_TEXTURE_COORD_1'
12282 PARAMS returns a single boolean value indicating whether 2D
12283 evaluation generates 1D texture coordinates. The initial value is
12284 `GL_FALSE'. See `glMap2'.
12286 `GL_MAP2_TEXTURE_COORD_2'
12289 PARAMS returns a single boolean value indicating whether 2D
12290 evaluation generates 2D texture coordinates. The initial value is
12291 `GL_FALSE'. See `glMap2'.
12293 `GL_MAP2_TEXTURE_COORD_3'
12296 PARAMS returns a single boolean value indicating whether 2D
12297 evaluation generates 3D texture coordinates. The initial value is
12298 `GL_FALSE'. See `glMap2'.
12300 `GL_MAP2_TEXTURE_COORD_4'
12303 PARAMS returns a single boolean value indicating whether 2D
12304 evaluation generates 4D texture coordinates. The initial value is
12305 `GL_FALSE'. See `glMap2'.
12310 PARAMS returns a single boolean value indicating whether 2D
12311 evaluation generates 3D vertex coordinates. The initial value is
12312 `GL_FALSE'. See `glMap2'.
12317 PARAMS returns a single boolean value indicating whether 2D
12318 evaluation generates 4D vertex coordinates. The initial value is
12319 `GL_FALSE'. See `glMap2'.
12324 PARAMS returns a single boolean value indicating if colors and
12325 color indices are to be replaced by table lookup during pixel
12326 transfers. The initial value is `GL_FALSE'. See `glPixelTransfer'.
12331 PARAMS returns a single boolean value indicating if stencil indices
12332 are to be replaced by table lookup during pixel transfers. The
12333 initial value is `GL_FALSE'. See `glPixelTransfer'.
12338 PARAMS returns one value, a symbolic constant indicating which
12339 matrix stack is currently the target of all matrix operations. The
12340 initial value is `GL_MODELVIEW'. See `glMatrixMode'.
12342 `GL_MAX_3D_TEXTURE_SIZE'
12345 PARAMS returns one value, a rough estimate of the largest 3D
12346 texture that the GL can handle. The value must be at least 16. If
12347 the GL version is 1.2 or greater, use `GL_PROXY_TEXTURE_3D' to
12348 determine if a texture is too large. See `glTexImage3D'.
12350 `GL_MAX_CLIENT_ATTRIB_STACK_DEPTH'
12353 PARAMS returns one value indicating the maximum supported depth of
12354 the client attribute stack. See `glPushClientAttrib'.
12356 `GL_MAX_ATTRIB_STACK_DEPTH'
12359 PARAMS returns one value, the maximum supported depth of the
12360 attribute stack. The value must be at least 16. See `glPushAttrib'.
12362 `GL_MAX_CLIP_PLANES'
12365 PARAMS returns one value, the maximum number of application-defined
12366 clipping planes. The value must be at least 6. See `glClipPlane'.
12368 `GL_MAX_COLOR_MATRIX_STACK_DEPTH'
12371 PARAMS returns one value, the maximum supported depth of the color
12372 matrix stack. The value must be at least 2. See `glPushMatrix'.
12374 `GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS'
12377 PARAMS returns one value, the maximum supported texture image units
12378 that can be used to access texture maps from the vertex shader and
12379 the fragment processor combined. If both the vertex shader and the
12380 fragment processing stage access the same texture image unit, then
12381 that counts as using two texture image units against this limit.
12382 The value must be at least 2. See `glActiveTexture'.
12384 `GL_MAX_CUBE_MAP_TEXTURE_SIZE'
12387 PARAMS returns one value. The value gives a rough estimate of the
12388 largest cube-map texture that the GL can handle. The value must be
12389 at least 16. If the GL version is 1.3 or greater, use
12390 `GL_PROXY_TEXTURE_CUBE_MAP' to determine if a texture is too large.
12391 See `glTexImage2D'.
12393 `GL_MAX_DRAW_BUFFERS'
12396 PARAMS returns one value, the maximum number of simultaneous output
12397 colors allowed from a fragment shader using the `gl_FragData'
12398 built-in array. The value must be at least 1. See `glDrawBuffers'.
12400 `GL_MAX_ELEMENTS_INDICES'
12403 PARAMS returns one value, the recommended maximum number of vertex
12404 array indices. See `glDrawRangeElements'.
12406 `GL_MAX_ELEMENTS_VERTICES'
12409 PARAMS returns one value, the recommended maximum number of vertex
12410 array vertices. See `glDrawRangeElements'.
12412 `GL_MAX_EVAL_ORDER'
12415 PARAMS returns one value, the maximum equation order supported by
12416 1D and 2D evaluators. The value must be at least 8. See `glMap1'
12419 `GL_MAX_FRAGMENT_UNIFORM_COMPONENTS'
12422 PARAMS returns one value, the maximum number of individual
12423 floating-point, integer, or boolean values that can be held in
12424 uniform variable storage for a fragment shader. The value must be
12425 at least 64. See `glUniform'.
12430 PARAMS returns one value, the maximum number of lights. The value
12431 must be at least 8. See `glLight'.
12433 `GL_MAX_LIST_NESTING'
12436 PARAMS returns one value, the maximum recursion depth allowed
12437 during display-list traversal. The value must be at least 64. See
12440 `GL_MAX_MODELVIEW_STACK_DEPTH'
12443 PARAMS returns one value, the maximum supported depth of the
12444 modelview matrix stack. The value must be at least 32. See
12447 `GL_MAX_NAME_STACK_DEPTH'
12450 PARAMS returns one value, the maximum supported depth of the
12451 selection name stack. The value must be at least 64. See
12454 `GL_MAX_PIXEL_MAP_TABLE'
12457 PARAMS returns one value, the maximum supported size of a
12458 `glPixelMap' lookup table. The value must be at least 32. See
12461 `GL_MAX_PROJECTION_STACK_DEPTH'
12464 PARAMS returns one value, the maximum supported depth of the
12465 projection matrix stack. The value must be at least 2. See
12468 `GL_MAX_TEXTURE_COORDS'
12471 PARAMS returns one value, the maximum number of texture coordinate
12472 sets available to vertex and fragment shaders. The value must be at
12473 least 2. See `glActiveTexture' and `glClientActiveTexture'.
12475 `GL_MAX_TEXTURE_IMAGE_UNITS'
12478 PARAMS returns one value, the maximum supported texture image units
12479 that can be used to access texture maps from the fragment shader.
12480 The value must be at least 2. See `glActiveTexture'.
12482 `GL_MAX_TEXTURE_LOD_BIAS'
12485 PARAMS returns one value, the maximum, absolute value of the
12486 texture level-of-detail bias. The value must be at least 4.
12488 `GL_MAX_TEXTURE_SIZE'
12491 PARAMS returns one value. The value gives a rough estimate of the
12492 largest texture that the GL can handle. The value must be at least
12493 64. If the GL version is 1.1 or greater, use `GL_PROXY_TEXTURE_1D'
12494 or `GL_PROXY_TEXTURE_2D' to determine if a texture is too large.
12495 See `glTexImage1D' and `glTexImage2D'.
12497 `GL_MAX_TEXTURE_STACK_DEPTH'
12500 PARAMS returns one value, the maximum supported depth of the
12501 texture matrix stack. The value must be at least 2. See
12504 `GL_MAX_TEXTURE_UNITS'
12507 PARAMS returns a single value indicating the number of conventional
12508 texture units supported. Each conventional texture unit includes
12509 both a texture coordinate set and a texture image unit.
12510 Conventional texture units may be used for fixed-function
12511 (non-shader) rendering. The value must be at least 2. Additional
12512 texture coordinate sets and texture image units may be accessed
12513 from vertex and fragment shaders. See `glActiveTexture' and
12514 `glClientActiveTexture'.
12516 `GL_MAX_VARYING_FLOATS'
12519 PARAMS returns one value, the maximum number of interpolators
12520 available for processing varying variables used by vertex and
12521 fragment shaders. This value represents the number of individual
12522 floating-point values that can be interpolated; varying variables
12523 declared as vectors, matrices, and arrays will all consume multiple
12524 interpolators. The value must be at least 32.
12526 `GL_MAX_VERTEX_ATTRIBS'
12529 PARAMS returns one value, the maximum number of 4-component generic
12530 vertex attributes accessible to a vertex shader. The value must be
12531 at least 16. See `glVertexAttrib'.
12533 `GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS'
12536 PARAMS returns one value, the maximum supported texture image units
12537 that can be used to access texture maps from the vertex shader. The
12538 value may be 0. See `glActiveTexture'.
12540 `GL_MAX_VERTEX_UNIFORM_COMPONENTS'
12543 PARAMS returns one value, the maximum number of individual
12544 floating-point, integer, or boolean values that can be held in
12545 uniform variable storage for a vertex shader. The value must be at
12546 least 512. See `glUniform'.
12548 `GL_MAX_VIEWPORT_DIMS'
12551 PARAMS returns two values: the maximum supported width and height
12552 of the viewport. These must be at least as large as the visible
12553 dimensions of the display being rendered to. See `glViewport'.
12558 PARAMS returns a single boolean value indicating whether pixel
12559 minmax values are computed. The initial value is `GL_FALSE'. See
12562 `GL_MODELVIEW_MATRIX'
12565 PARAMS returns sixteen values: the modelview matrix on the top of
12566 the modelview matrix stack. Initially this matrix is the identity
12567 matrix. See `glPushMatrix'.
12569 `GL_MODELVIEW_STACK_DEPTH'
12572 PARAMS returns one value, the number of matrices on the modelview
12573 matrix stack. The initial value is 1. See `glPushMatrix'.
12575 `GL_NAME_STACK_DEPTH'
12578 PARAMS returns one value, the number of names on the selection name
12579 stack. The initial value is 0. See `glPushName'.
12584 PARAMS returns a single boolean value, indicating whether the
12585 normal array is enabled. The initial value is `GL_FALSE'. See
12588 `GL_NORMAL_ARRAY_BUFFER_BINDING'
12591 PARAMS returns a single value, the name of the buffer object
12592 associated with the normal array. This buffer object would have
12593 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
12594 recent call to `glNormalPointer'. If no buffer object was bound to
12595 this target, 0 is returned. The initial value is 0. See
12598 `GL_NORMAL_ARRAY_STRIDE'
12601 PARAMS returns one value, the byte offset between consecutive
12602 normals in the normal array. The initial value is 0. See
12605 `GL_NORMAL_ARRAY_TYPE'
12608 PARAMS returns one value, the data type of each coordinate in the
12609 normal array. The initial value is `GL_FLOAT'. See
12615 PARAMS returns a single boolean value indicating whether normals
12616 are automatically scaled to unit length after they have been
12617 transformed to eye coordinates. The initial value is `GL_FALSE'.
12620 `GL_NUM_COMPRESSED_TEXTURE_FORMATS'
12623 PARAMS returns a single integer value indicating the number of
12624 available compressed texture formats. The minimum value is 0. See
12625 `glCompressedTexImage2D'.
12627 `GL_PACK_ALIGNMENT'
12630 PARAMS returns one value, the byte alignment used for writing pixel
12631 data to memory. The initial value is 4. See `glPixelStore'.
12633 `GL_PACK_IMAGE_HEIGHT'
12636 PARAMS returns one value, the image height used for writing pixel
12637 data to memory. The initial value is 0. See `glPixelStore'.
12639 `GL_PACK_LSB_FIRST'
12642 PARAMS returns a single boolean value indicating whether single-bit
12643 pixels being written to memory are written first to the least
12644 significant bit of each unsigned byte. The initial value is
12645 `GL_FALSE'. See `glPixelStore'.
12647 `GL_PACK_ROW_LENGTH'
12650 PARAMS returns one value, the row length used for writing pixel
12651 data to memory. The initial value is 0. See `glPixelStore'.
12653 `GL_PACK_SKIP_IMAGES'
12656 PARAMS returns one value, the number of pixel images skipped before
12657 the first pixel is written into memory. The initial value is 0. See
12660 `GL_PACK_SKIP_PIXELS'
12663 PARAMS returns one value, the number of pixel locations skipped
12664 before the first pixel is written into memory. The initial value is
12665 0. See `glPixelStore'.
12667 `GL_PACK_SKIP_ROWS'
12670 PARAMS returns one value, the number of rows of pixel locations
12671 skipped before the first pixel is written into memory. The initial
12672 value is 0. See `glPixelStore'.
12674 `GL_PACK_SWAP_BYTES'
12677 PARAMS returns a single boolean value indicating whether the bytes
12678 of two-byte and four-byte pixel indices and components are swapped
12679 before being written to memory. The initial value is `GL_FALSE'.
12680 See `glPixelStore'.
12682 `GL_PERSPECTIVE_CORRECTION_HINT'
12685 PARAMS returns one value, a symbolic constant indicating the mode
12686 of the perspective correction hint. The initial value is
12687 `GL_DONT_CARE'. See `glHint'.
12689 `GL_PIXEL_MAP_A_TO_A_SIZE'
12692 PARAMS returns one value, the size of the alpha-to-alpha pixel
12693 translation table. The initial value is 1. See `glPixelMap'.
12695 `GL_PIXEL_MAP_B_TO_B_SIZE'
12698 PARAMS returns one value, the size of the blue-to-blue pixel
12699 translation table. The initial value is 1. See `glPixelMap'.
12701 `GL_PIXEL_MAP_G_TO_G_SIZE'
12704 PARAMS returns one value, the size of the green-to-green pixel
12705 translation table. The initial value is 1. See `glPixelMap'.
12707 `GL_PIXEL_MAP_I_TO_A_SIZE'
12710 PARAMS returns one value, the size of the index-to-alpha pixel
12711 translation table. The initial value is 1. See `glPixelMap'.
12713 `GL_PIXEL_MAP_I_TO_B_SIZE'
12716 PARAMS returns one value, the size of the index-to-blue pixel
12717 translation table. The initial value is 1. See `glPixelMap'.
12719 `GL_PIXEL_MAP_I_TO_G_SIZE'
12722 PARAMS returns one value, the size of the index-to-green pixel
12723 translation table. The initial value is 1. See `glPixelMap'.
12725 `GL_PIXEL_MAP_I_TO_I_SIZE'
12728 PARAMS returns one value, the size of the index-to-index pixel
12729 translation table. The initial value is 1. See `glPixelMap'.
12731 `GL_PIXEL_MAP_I_TO_R_SIZE'
12734 PARAMS returns one value, the size of the index-to-red pixel
12735 translation table. The initial value is 1. See `glPixelMap'.
12737 `GL_PIXEL_MAP_R_TO_R_SIZE'
12740 PARAMS returns one value, the size of the red-to-red pixel
12741 translation table. The initial value is 1. See `glPixelMap'.
12743 `GL_PIXEL_MAP_S_TO_S_SIZE'
12746 PARAMS returns one value, the size of the stencil-to-stencil pixel
12747 translation table. The initial value is 1. See `glPixelMap'.
12749 `GL_PIXEL_PACK_BUFFER_BINDING'
12752 PARAMS returns a single value, the name of the buffer object
12753 currently bound to the target `GL_PIXEL_PACK_BUFFER'. If no buffer
12754 object is bound to this target, 0 is returned. The initial value is
12755 0. See `glBindBuffer'.
12757 `GL_PIXEL_UNPACK_BUFFER_BINDING'
12760 PARAMS returns a single value, the name of the buffer object
12761 currently bound to the target `GL_PIXEL_UNPACK_BUFFER'. If no
12762 buffer object is bound to this target, 0 is returned. The initial
12763 value is 0. See `glBindBuffer'.
12765 `GL_POINT_DISTANCE_ATTENUATION'
12768 PARAMS returns three values, the coefficients for computing the
12769 attenuation value for points. See `glPointParameter'.
12771 `GL_POINT_FADE_THRESHOLD_SIZE'
12774 PARAMS returns one value, the point size threshold for determining
12775 the point size. See `glPointParameter'.
12780 PARAMS returns one value, the point size as specified by
12781 `glPointSize'. The initial value is 1.
12783 `GL_POINT_SIZE_GRANULARITY'
12786 PARAMS returns one value, the size difference between adjacent
12787 supported sizes for antialiased points. See `glPointSize'.
12789 `GL_POINT_SIZE_MAX'
12792 PARAMS returns one value, the upper bound for the attenuated point
12793 sizes. The initial value is 0.0. See `glPointParameter'.
12795 `GL_POINT_SIZE_MIN'
12798 PARAMS returns one value, the lower bound for the attenuated point
12799 sizes. The initial value is 1.0. See `glPointParameter'.
12801 `GL_POINT_SIZE_RANGE'
12804 PARAMS returns two values: the smallest and largest supported sizes
12805 for antialiased points. The smallest size must be at most 1, and
12806 the largest size must be at least 1. See `glPointSize'.
12811 PARAMS returns a single boolean value indicating whether
12812 antialiasing of points is enabled. The initial value is `GL_FALSE'.
12815 `GL_POINT_SMOOTH_HINT'
12818 PARAMS returns one value, a symbolic constant indicating the mode
12819 of the point antialiasing hint. The initial value is
12820 `GL_DONT_CARE'. See `glHint'.
12825 PARAMS returns a single boolean value indicating whether point
12826 sprite is enabled. The initial value is `GL_FALSE'.
12831 PARAMS returns two values: symbolic constants indicating whether
12832 front-facing and back-facing polygons are rasterized as points,
12833 lines, or filled polygons. The initial value is `GL_FILL'. See
12836 `GL_POLYGON_OFFSET_FACTOR'
12839 PARAMS returns one value, the scaling factor used to determine the
12840 variable offset that is added to the depth value of each fragment
12841 generated when a polygon is rasterized. The initial value is 0. See
12844 `GL_POLYGON_OFFSET_UNITS'
12847 PARAMS returns one value. This value is multiplied by an
12848 implementation-specific value and then added to the depth value of
12849 each fragment generated when a polygon is rasterized. The initial
12850 value is 0. See `glPolygonOffset'.
12852 `GL_POLYGON_OFFSET_FILL'
12855 PARAMS returns a single boolean value indicating whether polygon
12856 offset is enabled for polygons in fill mode. The initial value is
12857 `GL_FALSE'. See `glPolygonOffset'.
12859 `GL_POLYGON_OFFSET_LINE'
12862 PARAMS returns a single boolean value indicating whether polygon
12863 offset is enabled for polygons in line mode. The initial value is
12864 `GL_FALSE'. See `glPolygonOffset'.
12866 `GL_POLYGON_OFFSET_POINT'
12869 PARAMS returns a single boolean value indicating whether polygon
12870 offset is enabled for polygons in point mode. The initial value is
12871 `GL_FALSE'. See `glPolygonOffset'.
12873 `GL_POLYGON_SMOOTH'
12876 PARAMS returns a single boolean value indicating whether
12877 antialiasing of polygons is enabled. The initial value is
12878 `GL_FALSE'. See `glPolygonMode'.
12880 `GL_POLYGON_SMOOTH_HINT'
12883 PARAMS returns one value, a symbolic constant indicating the mode
12884 of the polygon antialiasing hint. The initial value is
12885 `GL_DONT_CARE'. See `glHint'.
12887 `GL_POLYGON_STIPPLE'
12890 PARAMS returns a single boolean value indicating whether polygon
12891 stippling is enabled. The initial value is `GL_FALSE'. See
12892 `glPolygonStipple'.
12894 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
12897 PARAMS returns a single boolean value indicating whether post color
12898 matrix transformation lookup is enabled. The initial value is
12899 `GL_FALSE'. See `glColorTable'.
12901 `GL_POST_COLOR_MATRIX_RED_BIAS'
12904 PARAMS returns one value, the red bias factor applied to RGBA
12905 fragments after color matrix transformations. The initial value is
12906 0. See `glPixelTransfer'.
12908 `GL_POST_COLOR_MATRIX_GREEN_BIAS'
12911 PARAMS returns one value, the green bias factor applied to RGBA
12912 fragments after color matrix transformations. The initial value is
12913 0. See `glPixelTransfer'
12915 `GL_POST_COLOR_MATRIX_BLUE_BIAS'
12918 PARAMS returns one value, the blue bias factor applied to RGBA
12919 fragments after color matrix transformations. The initial value is
12920 0. See `glPixelTransfer'.
12922 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'
12925 PARAMS returns one value, the alpha bias factor applied to RGBA
12926 fragments after color matrix transformations. The initial value is
12927 0. See `glPixelTransfer'.
12929 `GL_POST_COLOR_MATRIX_RED_SCALE'
12932 PARAMS returns one value, the red scale factor applied to RGBA
12933 fragments after color matrix transformations. The initial value is
12934 1. See `glPixelTransfer'.
12936 `GL_POST_COLOR_MATRIX_GREEN_SCALE'
12939 PARAMS returns one value, the green scale factor applied to RGBA
12940 fragments after color matrix transformations. The initial value is
12941 1. See `glPixelTransfer'.
12943 `GL_POST_COLOR_MATRIX_BLUE_SCALE'
12946 PARAMS returns one value, the blue scale factor applied to RGBA
12947 fragments after color matrix transformations. The initial value is
12948 1. See `glPixelTransfer'.
12950 `GL_POST_COLOR_MATRIX_ALPHA_SCALE'
12953 PARAMS returns one value, the alpha scale factor applied to RGBA
12954 fragments after color matrix transformations. The initial value is
12955 1. See `glPixelTransfer'.
12957 `GL_POST_CONVOLUTION_COLOR_TABLE'
12960 PARAMS returns a single boolean value indicating whether post
12961 convolution lookup is enabled. The initial value is `GL_FALSE'. See
12964 `GL_POST_CONVOLUTION_RED_BIAS'
12967 PARAMS returns one value, the red bias factor applied to RGBA
12968 fragments after convolution. The initial value is 0. See
12971 `GL_POST_CONVOLUTION_GREEN_BIAS'
12974 PARAMS returns one value, the green bias factor applied to RGBA
12975 fragments after convolution. The initial value is 0. See
12978 `GL_POST_CONVOLUTION_BLUE_BIAS'
12981 PARAMS returns one value, the blue bias factor applied to RGBA
12982 fragments after convolution. The initial value is 0. See
12985 `GL_POST_CONVOLUTION_ALPHA_BIAS'
12988 PARAMS returns one value, the alpha bias factor applied to RGBA
12989 fragments after convolution. The initial value is 0. See
12992 `GL_POST_CONVOLUTION_RED_SCALE'
12995 PARAMS returns one value, the red scale factor applied to RGBA
12996 fragments after convolution. The initial value is 1. See
12999 `GL_POST_CONVOLUTION_GREEN_SCALE'
13002 PARAMS returns one value, the green scale factor applied to RGBA
13003 fragments after convolution. The initial value is 1. See
13006 `GL_POST_CONVOLUTION_BLUE_SCALE'
13009 PARAMS returns one value, the blue scale factor applied to RGBA
13010 fragments after convolution. The initial value is 1. See
13013 `GL_POST_CONVOLUTION_ALPHA_SCALE'
13016 PARAMS returns one value, the alpha scale factor applied to RGBA
13017 fragments after convolution. The initial value is 1. See
13020 `GL_PROJECTION_MATRIX'
13023 PARAMS returns sixteen values: the projection matrix on the top of
13024 the projection matrix stack. Initially this matrix is the identity
13025 matrix. See `glPushMatrix'.
13027 `GL_PROJECTION_STACK_DEPTH'
13030 PARAMS returns one value, the number of matrices on the projection
13031 matrix stack. The initial value is 1. See `glPushMatrix'.
13036 PARAMS returns one value, a symbolic constant indicating which
13037 color buffer is selected for reading. The initial value is
13038 `GL_BACK' if there is a back buffer, otherwise it is `GL_FRONT'.
13039 See `glReadPixels' and `glAccum'.
13044 PARAMS returns one value, the red bias factor used during pixel
13045 transfers. The initial value is 0.
13050 PARAMS returns one value, the number of red bitplanes in each color
13056 PARAMS returns one value, the red scale factor used during pixel
13057 transfers. The initial value is 1. See `glPixelTransfer'.
13062 PARAMS returns one value, a symbolic constant indicating whether
13063 the GL is in render, select, or feedback mode. The initial value is
13064 `GL_RENDER'. See `glRenderMode'.
13066 `GL_RESCALE_NORMAL'
13069 PARAMS returns single boolean value indicating whether normal
13070 rescaling is enabled. See `glEnable'.
13075 PARAMS returns a single boolean value indicating whether the GL is
13076 in RGBA mode (true) or color index mode (false). See `glColor'.
13078 `GL_SAMPLE_BUFFERS'
13081 PARAMS returns a single integer value indicating the number of
13082 sample buffers associated with the framebuffer. See
13083 `glSampleCoverage'.
13085 `GL_SAMPLE_COVERAGE_VALUE'
13088 PARAMS returns a single positive floating-point value indicating
13089 the current sample coverage value. See `glSampleCoverage'.
13091 `GL_SAMPLE_COVERAGE_INVERT'
13094 PARAMS returns a single boolean value indicating if the temporary
13095 coverage value should be inverted. See `glSampleCoverage'.
13100 PARAMS returns a single integer value indicating the coverage mask
13101 size. See `glSampleCoverage'.
13106 PARAMS returns four values: the X and Y window coordinates of the
13107 scissor box, followed by its width and height. Initially the X and
13108 Y window coordinates are both 0 and the width and height are set to
13109 the size of the window. See `glScissor'.
13114 PARAMS returns a single boolean value indicating whether scissoring
13115 is enabled. The initial value is `GL_FALSE'. See `glScissor'.
13117 `GL_SECONDARY_COLOR_ARRAY'
13120 PARAMS returns a single boolean value indicating whether the
13121 secondary color array is enabled. The initial value is `GL_FALSE'.
13122 See `glSecondaryColorPointer'.
13124 `GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING'
13127 PARAMS returns a single value, the name of the buffer object
13128 associated with the secondary color array. This buffer object would
13129 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
13130 most recent call to `glSecondaryColorPointer'. If no buffer object
13131 was bound to this target, 0 is returned. The initial value is 0.
13132 See `glBindBuffer'.
13134 `GL_SECONDARY_COLOR_ARRAY_SIZE'
13137 PARAMS returns one value, the number of components per color in the
13138 secondary color array. The initial value is 3. See
13139 `glSecondaryColorPointer'.
13141 `GL_SECONDARY_COLOR_ARRAY_STRIDE'
13144 PARAMS returns one value, the byte offset between consecutive
13145 colors in the secondary color array. The initial value is 0. See
13146 `glSecondaryColorPointer'.
13148 `GL_SECONDARY_COLOR_ARRAY_TYPE'
13151 PARAMS returns one value, the data type of each component in the
13152 secondary color array. The initial value is `GL_FLOAT'. See
13153 `glSecondaryColorPointer'.
13155 `GL_SELECTION_BUFFER_SIZE'
13158 PARAMS return one value, the size of the selection buffer. See
13164 PARAMS returns a single boolean value indicating whether 2D
13165 separable convolution is enabled. The initial value is `GL_FALSE'.
13166 See `glSeparableFilter2D'.
13171 PARAMS returns one value, a symbolic constant indicating whether
13172 the shading mode is flat or smooth. The initial value is
13173 `GL_SMOOTH'. See `glShadeModel'.
13175 `GL_SMOOTH_LINE_WIDTH_RANGE'
13178 PARAMS returns two values, the smallest and largest supported
13179 widths for antialiased lines. See `glLineWidth'.
13181 `GL_SMOOTH_LINE_WIDTH_GRANULARITY'
13184 PARAMS returns one value, the granularity of widths for antialiased
13185 lines. See `glLineWidth'.
13187 `GL_SMOOTH_POINT_SIZE_RANGE'
13190 PARAMS returns two values, the smallest and largest supported
13191 widths for antialiased points. See `glPointSize'.
13193 `GL_SMOOTH_POINT_SIZE_GRANULARITY'
13196 PARAMS returns one value, the granularity of sizes for antialiased
13197 points. See `glPointSize'.
13199 `GL_STENCIL_BACK_FAIL'
13202 PARAMS returns one value, a symbolic constant indicating what
13203 action is taken for back-facing polygons when the stencil test
13204 fails. The initial value is `GL_KEEP'. See `glStencilOpSeparate'.
13206 `GL_STENCIL_BACK_FUNC'
13209 PARAMS returns one value, a symbolic constant indicating what
13210 function is used for back-facing polygons to compare the stencil
13211 reference value with the stencil buffer value. The initial value is
13212 `GL_ALWAYS'. See `glStencilFuncSeparate'.
13214 `GL_STENCIL_BACK_PASS_DEPTH_FAIL'
13217 PARAMS returns one value, a symbolic constant indicating what
13218 action is taken for back-facing polygons when the stencil test
13219 passes, but the depth test fails. The initial value is `GL_KEEP'.
13220 See `glStencilOpSeparate'.
13222 `GL_STENCIL_BACK_PASS_DEPTH_PASS'
13225 PARAMS returns one value, a symbolic constant indicating what
13226 action is taken for back-facing polygons when the stencil test
13227 passes and the depth test passes. The initial value is `GL_KEEP'.
13228 See `glStencilOpSeparate'.
13230 `GL_STENCIL_BACK_REF'
13233 PARAMS returns one value, the reference value that is compared with
13234 the contents of the stencil buffer for back-facing polygons. The
13235 initial value is 0. See `glStencilFuncSeparate'.
13237 `GL_STENCIL_BACK_VALUE_MASK'
13240 PARAMS returns one value, the mask that is used for back-facing
13241 polygons to mask both the stencil reference value and the stencil
13242 buffer value before they are compared. The initial value is all
13243 1's. See `glStencilFuncSeparate'.
13245 `GL_STENCIL_BACK_WRITEMASK'
13248 PARAMS returns one value, the mask that controls writing of the
13249 stencil bitplanes for back-facing polygons. The initial value is
13250 all 1's. See `glStencilMaskSeparate'.
13255 PARAMS returns one value, the number of bitplanes in the stencil
13258 `GL_STENCIL_CLEAR_VALUE'
13261 PARAMS returns one value, the index to which the stencil bitplanes
13262 are cleared. The initial value is 0. See `glClearStencil'.
13267 PARAMS returns one value, a symbolic constant indicating what
13268 action is taken when the stencil test fails. The initial value is
13269 `GL_KEEP'. See `glStencilOp'. If the GL version is 2.0 or greater,
13270 this stencil state only affects non-polygons and front-facing
13271 polygons. Back-facing polygons use separate stencil state. See
13272 `glStencilOpSeparate'.
13277 PARAMS returns one value, a symbolic constant indicating what
13278 function is used to compare the stencil reference value with the
13279 stencil buffer value. The initial value is `GL_ALWAYS'. See
13280 `glStencilFunc'. If the GL version is 2.0 or greater, this stencil
13281 state only affects non-polygons and front-facing polygons.
13282 Back-facing polygons use separate stencil state. See
13283 `glStencilFuncSeparate'.
13285 `GL_STENCIL_PASS_DEPTH_FAIL'
13288 PARAMS returns one value, a symbolic constant indicating what
13289 action is taken when the stencil test passes, but the depth test
13290 fails. The initial value is `GL_KEEP'. See `glStencilOp'. If the GL
13291 version is 2.0 or greater, this stencil state only affects
13292 non-polygons and front-facing polygons. Back-facing polygons use
13293 separate stencil state. See `glStencilOpSeparate'.
13295 `GL_STENCIL_PASS_DEPTH_PASS'
13298 PARAMS returns one value, a symbolic constant indicating what
13299 action is taken when the stencil test passes and the depth test
13300 passes. The initial value is `GL_KEEP'. See `glStencilOp'. If the
13301 GL version is 2.0 or greater, this stencil state only affects
13302 non-polygons and front-facing polygons. Back-facing polygons use
13303 separate stencil state. See `glStencilOpSeparate'.
13308 PARAMS returns one value, the reference value that is compared with
13309 the contents of the stencil buffer. The initial value is 0. See
13310 `glStencilFunc'. If the GL version is 2.0 or greater, this stencil
13311 state only affects non-polygons and front-facing polygons.
13312 Back-facing polygons use separate stencil state. See
13313 `glStencilFuncSeparate'.
13318 PARAMS returns a single boolean value indicating whether stencil
13319 testing of fragments is enabled. The initial value is `GL_FALSE'.
13320 See `glStencilFunc' and `glStencilOp'.
13322 `GL_STENCIL_VALUE_MASK'
13325 PARAMS returns one value, the mask that is used to mask both the
13326 stencil reference value and the stencil buffer value before they
13327 are compared. The initial value is all 1's. See `glStencilFunc'. If
13328 the GL version is 2.0 or greater, this stencil state only affects
13329 non-polygons and front-facing polygons. Back-facing polygons use
13330 separate stencil state. See `glStencilFuncSeparate'.
13332 `GL_STENCIL_WRITEMASK'
13335 PARAMS returns one value, the mask that controls writing of the
13336 stencil bitplanes. The initial value is all 1's. See
13337 `glStencilMask'. If the GL version is 2.0 or greater, this stencil
13338 state only affects non-polygons and front-facing polygons.
13339 Back-facing polygons use separate stencil state. See
13340 `glStencilMaskSeparate'.
13345 PARAMS returns a single boolean value indicating whether stereo
13346 buffers (left and right) are supported.
13351 PARAMS returns one value, an estimate of the number of bits of
13352 subpixel resolution that are used to position rasterized geometry
13353 in window coordinates. The value must be at least 4.
13358 PARAMS returns a single boolean value indicating whether 1D texture
13359 mapping is enabled. The initial value is `GL_FALSE'. See
13362 `GL_TEXTURE_BINDING_1D'
13365 PARAMS returns a single value, the name of the texture currently
13366 bound to the target `GL_TEXTURE_1D'. The initial value is 0. See
13372 PARAMS returns a single boolean value indicating whether 2D texture
13373 mapping is enabled. The initial value is `GL_FALSE'. See
13376 `GL_TEXTURE_BINDING_2D'
13379 PARAMS returns a single value, the name of the texture currently
13380 bound to the target `GL_TEXTURE_2D'. The initial value is 0. See
13386 PARAMS returns a single boolean value indicating whether 3D texture
13387 mapping is enabled. The initial value is `GL_FALSE'. See
13390 `GL_TEXTURE_BINDING_3D'
13393 PARAMS returns a single value, the name of the texture currently
13394 bound to the target `GL_TEXTURE_3D'. The initial value is 0. See
13397 `GL_TEXTURE_BINDING_CUBE_MAP'
13400 PARAMS returns a single value, the name of the texture currently
13401 bound to the target `GL_TEXTURE_CUBE_MAP'. The initial value is 0.
13402 See `glBindTexture'.
13404 `GL_TEXTURE_COMPRESSION_HINT'
13407 PARAMS returns a single value indicating the mode of the texture
13408 compression hint. The initial value is `GL_DONT_CARE'.
13410 `GL_TEXTURE_COORD_ARRAY'
13413 PARAMS returns a single boolean value indicating whether the
13414 texture coordinate array is enabled. The initial value is
13415 `GL_FALSE'. See `glTexCoordPointer'.
13417 `GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING'
13420 PARAMS returns a single value, the name of the buffer object
13421 associated with the texture coordinate array. This buffer object
13422 would have been bound to the target `GL_ARRAY_BUFFER' at the time
13423 of the most recent call to `glTexCoordPointer'. If no buffer object
13424 was bound to this target, 0 is returned. The initial value is 0.
13425 See `glBindBuffer'.
13427 `GL_TEXTURE_COORD_ARRAY_SIZE'
13430 PARAMS returns one value, the number of coordinates per element in
13431 the texture coordinate array. The initial value is 4. See
13432 `glTexCoordPointer'.
13434 `GL_TEXTURE_COORD_ARRAY_STRIDE'
13437 PARAMS returns one value, the byte offset between consecutive
13438 elements in the texture coordinate array. The initial value is 0.
13439 See `glTexCoordPointer'.
13441 `GL_TEXTURE_COORD_ARRAY_TYPE'
13444 PARAMS returns one value, the data type of the coordinates in the
13445 texture coordinate array. The initial value is `GL_FLOAT'. See
13446 `glTexCoordPointer'.
13448 `GL_TEXTURE_CUBE_MAP'
13451 PARAMS returns a single boolean value indicating whether
13452 cube-mapped texture mapping is enabled. The initial value is
13453 `GL_FALSE'. See `glTexImage2D'.
13458 PARAMS returns a single boolean value indicating whether automatic
13459 generation of the Q texture coordinate is enabled. The initial
13460 value is `GL_FALSE'. See `glTexGen'.
13465 PARAMS returns a single boolean value indicating whether automatic
13466 generation of the R texture coordinate is enabled. The initial
13467 value is `GL_FALSE'. See `glTexGen'.
13472 PARAMS returns a single boolean value indicating whether automatic
13473 generation of the S texture coordinate is enabled. The initial
13474 value is `GL_FALSE'. See `glTexGen'.
13479 PARAMS returns a single boolean value indicating whether automatic
13480 generation of the T texture coordinate is enabled. The initial
13481 value is `GL_FALSE'. See `glTexGen'.
13483 `GL_TEXTURE_MATRIX'
13486 PARAMS returns sixteen values: the texture matrix on the top of the
13487 texture matrix stack. Initially this matrix is the identity matrix.
13488 See `glPushMatrix'.
13490 `GL_TEXTURE_STACK_DEPTH'
13493 PARAMS returns one value, the number of matrices on the texture
13494 matrix stack. The initial value is 1. See `glPushMatrix'.
13496 `GL_TRANSPOSE_COLOR_MATRIX'
13499 PARAMS returns 16 values, the elements of the color matrix in
13500 row-major order. See `glLoadTransposeMatrix'.
13502 `GL_TRANSPOSE_MODELVIEW_MATRIX'
13505 PARAMS returns 16 values, the elements of the modelview matrix in
13506 row-major order. See `glLoadTransposeMatrix'.
13508 `GL_TRANSPOSE_PROJECTION_MATRIX'
13511 PARAMS returns 16 values, the elements of the projection matrix in
13512 row-major order. See `glLoadTransposeMatrix'.
13514 `GL_TRANSPOSE_TEXTURE_MATRIX'
13517 PARAMS returns 16 values, the elements of the texture matrix in
13518 row-major order. See `glLoadTransposeMatrix'.
13520 `GL_UNPACK_ALIGNMENT'
13523 PARAMS returns one value, the byte alignment used for reading pixel
13524 data from memory. The initial value is 4. See `glPixelStore'.
13526 `GL_UNPACK_IMAGE_HEIGHT'
13529 PARAMS returns one value, the image height used for reading pixel
13530 data from memory. The initial is 0. See `glPixelStore'.
13532 `GL_UNPACK_LSB_FIRST'
13535 PARAMS returns a single boolean value indicating whether single-bit
13536 pixels being read from memory are read first from the least
13537 significant bit of each unsigned byte. The initial value is
13538 `GL_FALSE'. See `glPixelStore'.
13540 `GL_UNPACK_ROW_LENGTH'
13543 PARAMS returns one value, the row length used for reading pixel
13544 data from memory. The initial value is 0. See `glPixelStore'.
13546 `GL_UNPACK_SKIP_IMAGES'
13549 PARAMS returns one value, the number of pixel images skipped before
13550 the first pixel is read from memory. The initial value is 0. See
13553 `GL_UNPACK_SKIP_PIXELS'
13556 PARAMS returns one value, the number of pixel locations skipped
13557 before the first pixel is read from memory. The initial value is 0.
13558 See `glPixelStore'.
13560 `GL_UNPACK_SKIP_ROWS'
13563 PARAMS returns one value, the number of rows of pixel locations
13564 skipped before the first pixel is read from memory. The initial
13565 value is 0. See `glPixelStore'.
13567 `GL_UNPACK_SWAP_BYTES'
13570 PARAMS returns a single boolean value indicating whether the bytes
13571 of two-byte and four-byte pixel indices and components are swapped
13572 after being read from memory. The initial value is `GL_FALSE'. See
13578 PARAMS returns a single boolean value indicating whether the vertex
13579 array is enabled. The initial value is `GL_FALSE'. See
13582 `GL_VERTEX_ARRAY_BUFFER_BINDING'
13585 PARAMS returns a single value, the name of the buffer object
13586 associated with the vertex array. This buffer object would have
13587 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
13588 recent call to `glVertexPointer'. If no buffer object was bound to
13589 this target, 0 is returned. The initial value is 0. See
13592 `GL_VERTEX_ARRAY_SIZE'
13595 PARAMS returns one value, the number of coordinates per vertex in
13596 the vertex array. The initial value is 4. See `glVertexPointer'.
13598 `GL_VERTEX_ARRAY_STRIDE'
13601 PARAMS returns one value, the byte offset between consecutive
13602 vertices in the vertex array. The initial value is 0. See
13605 `GL_VERTEX_ARRAY_TYPE'
13608 PARAMS returns one value, the data type of each coordinate in the
13609 vertex array. The initial value is `GL_FLOAT'. See
13612 `GL_VERTEX_PROGRAM_POINT_SIZE'
13615 PARAMS returns a single boolean value indicating whether vertex
13616 program point size mode is enabled. If enabled, and a vertex shader
13617 is active, then the point size is taken from the shader built-in
13618 `gl_PointSize'. If disabled, and a vertex shader is active, then
13619 the point size is taken from the point state as specified by
13620 `glPointSize'. The initial value is `GL_FALSE'.
13622 `GL_VERTEX_PROGRAM_TWO_SIDE'
13625 PARAMS returns a single boolean value indicating whether vertex
13626 program two-sided color mode is enabled. If enabled, and a vertex
13627 shader is active, then the GL chooses the back color output for
13628 back-facing polygons, and the front color output for non-polygons
13629 and front-facing polygons. If disabled, and a vertex shader is
13630 active, then the front color output is always selected. The initial
13631 value is `GL_FALSE'.
13636 PARAMS returns four values: the X and Y window coordinates of the
13637 viewport, followed by its width and height. Initially the X and Y
13638 window coordinates are both set to 0, and the width and height are
13639 set to the width and height of the window into which the GL will do
13640 its rendering. See `glViewport'.
13645 PARAMS returns one value, the X pixel zoom factor. The initial
13646 value is 1. See `glPixelZoom'.
13651 PARAMS returns one value, the Y pixel zoom factor. The initial
13652 value is 1. See `glPixelZoom'.
13654 Many of the boolean parameters can also be queried more easily using
13657 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
13659 `GL_INVALID_OPERATION' is generated if `glGet' is executed between the
13660 execution of `glBegin' and the corresponding execution of `glEnd'.")
13662 (define-gl-procedures
13663 ((glHint (target GLenum) (mode GLenum) -> void))
13664 "Specify implementation-specific hints.
13667 Specifies a symbolic constant indicating the behavior to be
13668 controlled. `GL_FOG_HINT', `GL_GENERATE_MIPMAP_HINT',
13669 `GL_LINE_SMOOTH_HINT', `GL_PERSPECTIVE_CORRECTION_HINT',
13670 `GL_POINT_SMOOTH_HINT', `GL_POLYGON_SMOOTH_HINT',
13671 `GL_TEXTURE_COMPRESSION_HINT', and
13672 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT' are accepted.
13675 Specifies a symbolic constant indicating the desired behavior.
13676 `GL_FASTEST', `GL_NICEST', and `GL_DONT_CARE' are accepted.
13678 Certain aspects of GL behavior, when there is room for interpretation,
13679 can be controlled with hints. A hint is specified with two arguments.
13680 TARGET is a symbolic constant indicating the behavior to be controlled,
13681 and MODE is another symbolic constant indicating the desired behavior.
13682 The initial value for each TARGET is `GL_DONT_CARE'. MODE can be one of
13688 The most efficient option should be chosen.
13693 The most correct, or highest quality, option should be chosen.
13700 Though the implementation aspects that can be hinted are well defined,
13701 the interpretation of the hints depends on the implementation. The hint
13702 aspects that can be specified with TARGET, along with suggested
13703 semantics, are as follows:
13708 Indicates the accuracy of fog calculation. If per-pixel fog
13709 calculation is not efficiently supported by the GL implementation,
13710 hinting `GL_DONT_CARE' or `GL_FASTEST' can result in per-vertex
13711 calculation of fog effects.
13713 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT'
13716 Indicates the accuracy of the derivative calculation for the GL
13717 shading language fragment processing built-in functions: `dFdx',
13718 `dFdy', and `fwidth'.
13720 `GL_GENERATE_MIPMAP_HINT'
13723 Indicates the quality of filtering when generating mipmap images.
13725 `GL_LINE_SMOOTH_HINT'
13728 Indicates the sampling quality of antialiased lines. If a larger
13729 filter function is applied, hinting `GL_NICEST' can result in more
13730 pixel fragments being generated during rasterization.
13732 `GL_PERSPECTIVE_CORRECTION_HINT'
13735 Indicates the quality of color, texture coordinate, and fog
13736 coordinate interpolation. If perspective-corrected parameter
13737 interpolation is not efficiently supported by the GL
13738 implementation, hinting `GL_DONT_CARE' or `GL_FASTEST' can result
13739 in simple linear interpolation of colors and/or texture
13742 `GL_POINT_SMOOTH_HINT'
13745 Indicates the sampling quality of antialiased points. If a larger
13746 filter function is applied, hinting `GL_NICEST' can result in more
13747 pixel fragments being generated during rasterization.
13749 `GL_POLYGON_SMOOTH_HINT'
13752 Indicates the sampling quality of antialiased polygons. Hinting
13753 `GL_NICEST' can result in more pixel fragments being generated
13754 during rasterization, if a larger filter function is applied.
13756 `GL_TEXTURE_COMPRESSION_HINT'
13759 Indicates the quality and performance of the compressing texture
13760 images. Hinting `GL_FASTEST' indicates that texture images should
13761 be compressed as quickly as possible, while `GL_NICEST' indicates
13762 that texture images should be compressed with as little image
13763 quality loss as possible. `GL_NICEST' should be selected if the
13764 texture is to be retrieved by `glGetCompressedTexImage' for reuse.
13766 `GL_INVALID_ENUM' is generated if either TARGET or MODE is not an
13769 `GL_INVALID_OPERATION' is generated if `glHint' is executed between the
13770 execution of `glBegin' and the corresponding execution of `glEnd'.")
13772 (define-gl-procedures
13776 (internalformat GLenum)
13780 "Define histogram table.
13783 The histogram whose parameters are to be set. Must be one of
13784 `GL_HISTOGRAM' or `GL_PROXY_HISTOGRAM'.
13787 The number of entries in the histogram table. Must be a power of 2.
13790 The format of entries in the histogram table. Must be one of
13791 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
13792 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
13793 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
13794 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
13795 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
13796 `GL_LUMINANCE16_ALPHA16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4',
13797 `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16',
13798 `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8',
13799 `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
13802 If `GL_TRUE', pixels will be consumed by the histogramming process
13803 and no drawing or texture loading will take place. If `GL_FALSE',
13804 pixels will proceed to the minmax process after histogramming.
13806 When `GL_HISTOGRAM' is enabled, RGBA color components are converted to
13807 histogram table indices by clamping to the range [0,1], multiplying by
13808 the width of the histogram table, and rounding to the nearest integer.
13809 The table entries selected by the RGBA indices are then incremented. (If
13810 the internal format of the histogram table includes luminance, then the
13811 index derived from the R color component determines the luminance table
13812 entry to be incremented.) If a histogram table entry is incremented
13813 beyond its maximum value, then its value becomes undefined. (This is not
13816 Histogramming is performed only for RGBA pixels (though these may be
13817 specified originally as color indices and converted to RGBA by index
13818 table lookup). Histogramming is enabled with `glEnable' and disabled
13821 When TARGET is `GL_HISTOGRAM', `glHistogram' redefines the current
13822 histogram table to have WIDTH entries of the format specified by
13823 INTERNALFORMAT. The entries are indexed 0 through WIDTH-1 , and all
13824 entries are initialized to zero. The values in the previous histogram
13825 table, if any, are lost. If SINK is `GL_TRUE', then pixels are discarded
13826 after histogramming; no further processing of the pixels takes place,
13827 and no drawing, texture loading, or pixel readback will result.
13829 When TARGET is `GL_PROXY_HISTOGRAM', `glHistogram' computes all state
13830 information as if the histogram table were to be redefined, but does not
13831 actually define the new table. If the requested histogram table is too
13832 large to be supported, then the state information will be set to zero.
13833 This provides a way to determine if a histogram table with the given
13834 parameters can be supported.
13838 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
13841 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or is not a
13844 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
13847 `GL_TABLE_TOO_LARGE' is generated if TARGET is `GL_HISTOGRAM' and the
13848 histogram table specified is too large for the implementation.
13850 `GL_INVALID_OPERATION' is generated if `glHistogram' is executed between
13851 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13853 (define-gl-procedures
13854 ((glIndexMask (mask GLuint) -> void))
13855 "Control the writing of individual bits in the color index buffers.
13858 Specifies a bit mask to enable and disable the writing of
13859 individual bits in the color index buffers. Initially, the mask is
13862 `glIndexMask' controls the writing of individual bits in the color index
13863 buffers. The least significant N bits of MASK, where N is the number of
13864 bits in a color index buffer, specify a mask. Where a 1 (one) appears in
13865 the mask, it's possible to write to the corresponding bit in the color
13866 index buffer (or buffers). Where a 0 (zero) appears, the corresponding
13867 bit is write-protected.
13869 This mask is used only in color index mode, and it affects only the
13870 buffers currently selected for writing (see `glDrawBuffer'). Initially,
13871 all bits are enabled for writing.
13873 `GL_INVALID_OPERATION' is generated if `glIndexMask' is executed between
13874 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13876 (define-gl-procedures
13880 (pointer const-GLvoid-*)
13883 "Define an array of color indexes.
13886 Specifies the data type of each color index in the array. Symbolic
13887 constants `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_INT', `GL_FLOAT', and
13888 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
13891 Specifies the byte offset between consecutive color indexes. If
13892 STRIDE is 0, the color indexes are understood to be tightly packed
13893 in the array. The initial value is 0.
13896 Specifies a pointer to the first index in the array. The initial
13899 `glIndexPointer' specifies the location and data format of an array of
13900 color indexes to use when rendering. TYPE specifies the data type of
13901 each color index and STRIDE specifies the byte stride from one color
13902 index to the next, allowing vertices and attributes to be packed into a
13903 single array or stored in separate arrays.
13905 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
13906 target (see `glBindBuffer') while a color index array is specified,
13907 POINTER is treated as a byte offset into the buffer object's data store.
13908 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
13909 color index vertex array client-side state
13910 (`GL_INDEX_ARRAY_BUFFER_BINDING').
13912 When a color index array is specified, TYPE, STRIDE, and POINTER are
13913 saved as client-side state, in addition to the current vertex array
13914 buffer object binding.
13916 To enable and disable the color index array, call `glEnableClientState'
13917 and `glDisableClientState' with the argument `GL_INDEX_ARRAY'. If
13918 enabled, the color index array is used when `glDrawArrays',
13919 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements',
13920 `glDrawRangeElements', or `glArrayElement' is called.
13922 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
13924 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
13926 (define-gl-procedures
13927 ((glIndexs (c GLshort) -> void)
13928 (glIndexi (c GLint) -> void)
13929 (glIndexf (c GLfloat) -> void)
13930 (glIndexd (c GLdouble) -> void)
13931 (glIndexub (c GLubyte) -> void)
13932 (glIndexsv (c const-GLshort-*) -> void)
13933 (glIndexiv (c const-GLint-*) -> void)
13934 (glIndexfv (c const-GLfloat-*) -> void)
13935 (glIndexdv (c const-GLdouble-*) -> void)
13936 (glIndexubv (c const-GLubyte-*) -> void))
13937 "Set the current color index.
13940 Specifies the new value for the current color index.
13944 `glIndex' updates the current (single-valued) color index. It takes one
13945 argument, the new value for the current color index.
13947 The current index is stored as a floating-point value. Integer values
13948 are converted directly to floating-point values, with no special
13949 mapping. The initial value is 1.
13951 Index values outside the representable range of the color index buffer
13952 are not clamped. However, before an index is dithered (if enabled) and
13953 written to the frame buffer, it is converted to fixed-point format. Any
13954 bits in the integer portion of the resulting fixed-point value that do
13955 not correspond to bits in the frame buffer are masked out.")
13957 (define-gl-procedures
13958 ((glInitNames -> void))
13959 "Initialize the name stack.
13961 The name stack is used during selection mode to allow sets of rendering
13962 commands to be uniquely identified. It consists of an ordered set of
13963 unsigned integers. `glInitNames' causes the name stack to be initialized
13964 to its default empty state.
13966 The name stack is always empty while the render mode is not `GL_SELECT'.
13967 Calls to `glInitNames' while the render mode is not `GL_SELECT' are
13970 `GL_INVALID_OPERATION' is generated if `glInitNames' is executed between
13971 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13973 (define-gl-procedures
13974 ((glInterleavedArrays
13977 (pointer const-GLvoid-*)
13980 "Simultaneously specify and enable several interleaved arrays.
13983 Specifies the type of array to enable. Symbolic constants `GL_V2F',
13984 `GL_V3F', `GL_C4UB_V2F', `GL_C4UB_V3F', `GL_C3F_V3F', `GL_N3F_V3F',
13985 `GL_C4F_N3F_V3F', `GL_T2F_V3F', `GL_T4F_V4F', `GL_T2F_C4UB_V3F',
13986 `GL_T2F_C3F_V3F', `GL_T2F_N3F_V3F', `GL_T2F_C4F_N3F_V3F', and
13987 `GL_T4F_C4F_N3F_V4F' are accepted.
13990 Specifies the offset in bytes between each aggregate array element.
13992 `glInterleavedArrays' lets you specify and enable individual color,
13993 normal, texture and vertex arrays whose elements are part of a larger
13994 aggregate array element. For some implementations, this is more
13995 efficient than specifying the arrays separately.
13997 If STRIDE is 0, the aggregate elements are stored consecutively.
13998 Otherwise, STRIDE bytes occur between the beginning of one aggregate
13999 array element and the beginning of the next aggregate array element.
14001 FORMAT serves as a ``key'' describing the extraction of individual
14002 arrays from the aggregate array. If FORMAT contains a T, then texture
14003 coordinates are extracted from the interleaved array. If C is present,
14004 color values are extracted. If N is present, normal coordinates are
14005 extracted. Vertex coordinates are always extracted.
14007 The digits 2, 3, and 4 denote how many values are extracted. F indicates
14008 that values are extracted as floating-point values. Colors may also be
14009 extracted as 4 unsigned bytes if 4UB follows the C. If a color is
14010 extracted as 4 unsigned bytes, the vertex array element which follows is
14011 located at the first possible floating-point aligned address.
14013 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted value.
14015 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
14017 (define-gl-procedures
14018 ((glIsBuffer (buffer GLuint) -> GLboolean))
14019 "Determine if a name corresponds to a buffer object.
14022 Specifies a value that may be the name of a buffer object.
14024 `glIsBuffer' returns `GL_TRUE' if BUFFER is currently the name of a
14025 buffer object. If BUFFER is zero, or is a non-zero value that is not
14026 currently the name of a buffer object, or if an error occurs,
14027 `glIsBuffer' returns `GL_FALSE'.
14029 A name returned by `glGenBuffers', but not yet associated with a buffer
14030 object by calling `glBindBuffer', is not the name of a buffer object.
14032 `GL_INVALID_OPERATION' is generated if `glIsBuffer' is executed between
14033 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14035 (define-gl-procedures
14036 ((glIsEnabled (cap GLenum) -> GLboolean))
14037 "Test whether a capability is enabled.
14040 Specifies a symbolic constant indicating a GL capability.
14042 `glIsEnabled' returns `GL_TRUE' if CAP is an enabled capability and
14043 returns `GL_FALSE' otherwise. Initially all capabilities except
14044 `GL_DITHER' are disabled; `GL_DITHER' is initially enabled.
14046 The following capabilities are accepted for CAP:
14060 `glBlendFunc', `glLogicOp'
14068 `GL_COLOR_LOGIC_OP'
14071 `GL_COLOR_MATERIAL'
14080 `GL_CONVOLUTION_1D'
14081 `glConvolutionFilter1D'
14083 `GL_CONVOLUTION_2D'
14084 `glConvolutionFilter2D'
14090 `glDepthFunc', `glDepthRange'
14095 `GL_EDGE_FLAG_ARRAY'
14096 `glEdgeFlagPointer'
14101 `GL_FOG_COORD_ARRAY'
14102 `glFogCoordPointer'
14110 `GL_INDEX_LOGIC_OP'
14114 `glLightModel', `glLight'
14117 `glMaterial', `glLightModel', `glLight'
14134 `GL_MAP1_TEXTURE_COORD_1'
14137 `GL_MAP1_TEXTURE_COORD_2'
14140 `GL_MAP1_TEXTURE_COORD_3'
14143 `GL_MAP1_TEXTURE_COORD_4'
14155 `GL_MAP2_TEXTURE_COORD_1'
14158 `GL_MAP2_TEXTURE_COORD_2'
14161 `GL_MAP2_TEXTURE_COORD_3'
14164 `GL_MAP2_TEXTURE_COORD_4'
14191 `GL_POLYGON_SMOOTH'
14194 `GL_POLYGON_OFFSET_FILL'
14197 `GL_POLYGON_OFFSET_LINE'
14200 `GL_POLYGON_OFFSET_POINT'
14203 `GL_POLYGON_STIPPLE'
14206 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
14209 `GL_POST_CONVOLUTION_COLOR_TABLE'
14212 `GL_RESCALE_NORMAL'
14215 `GL_SAMPLE_ALPHA_TO_COVERAGE'
14218 `GL_SAMPLE_ALPHA_TO_ONE'
14221 `GL_SAMPLE_COVERAGE'
14227 `GL_SECONDARY_COLOR_ARRAY'
14228 `glSecondaryColorPointer'
14231 `glSeparableFilter2D'
14234 `glStencilFunc', `glStencilOp'
14245 `GL_TEXTURE_COORD_ARRAY'
14246 `glTexCoordPointer'
14248 `GL_TEXTURE_CUBE_MAP'
14266 `GL_VERTEX_PROGRAM_POINT_SIZE'
14269 `GL_VERTEX_PROGRAM_TWO_SIDE'
14274 `GL_INVALID_ENUM' is generated if CAP is not an accepted value.
14276 `GL_INVALID_OPERATION' is generated if `glIsEnabled' is executed between
14277 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14279 (define-gl-procedures
14280 ((glIsList (list GLuint) -> GLboolean))
14281 "Determine if a name corresponds to a display list.
14284 Specifies a potential display list name.
14286 `glIsList' returns `GL_TRUE' if LIST is the name of a display list and
14287 returns `GL_FALSE' if it is not, or if an error occurs.
14289 A name returned by `glGenLists', but not yet associated with a display
14290 list by calling `glNewList', is not the name of a display list.
14292 `GL_INVALID_OPERATION' is generated if `glIsList' is executed between
14293 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14295 (define-gl-procedures
14296 ((glIsProgram (program GLuint) -> GLboolean))
14297 "Determines if a name corresponds to a program object.
14300 Specifies a potential program object.
14302 `glIsProgram' returns `GL_TRUE' if PROGRAM is the name of a program
14303 object previously created with `glCreateProgram' and not yet deleted
14304 with `glDeleteProgram'. If PROGRAM is zero or a non-zero value that is
14305 not the name of a program object, or if an error occurs, `glIsProgram'
14306 returns `GL_FALSE'.
14308 `GL_INVALID_OPERATION' is generated if `glIsProgram' is executed between
14309 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14311 (define-gl-procedures
14312 ((glIsQuery (id GLuint) -> GLboolean))
14313 "Determine if a name corresponds to a query object.
14316 Specifies a value that may be the name of a query object.
14318 `glIsQuery' returns `GL_TRUE' if ID is currently the name of a query
14319 object. If ID is zero, or is a non-zero value that is not currently the
14320 name of a query object, or if an error occurs, `glIsQuery' returns
14323 A name returned by `glGenQueries', but not yet associated with a query
14324 object by calling `glBeginQuery', is not the name of a query object.
14326 `GL_INVALID_OPERATION' is generated if `glIsQuery' is executed between
14327 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14329 (define-gl-procedures
14330 ((glIsShader (shader GLuint) -> GLboolean))
14331 "Determines if a name corresponds to a shader object.
14334 Specifies a potential shader object.
14336 `glIsShader' returns `GL_TRUE' if SHADER is the name of a shader object
14337 previously created with `glCreateShader' and not yet deleted with
14338 `glDeleteShader'. If SHADER is zero or a non-zero value that is not the
14339 name of a shader object, or if an error occurs, `glIsShader ' returns
14342 `GL_INVALID_OPERATION' is generated if `glIsShader' is executed between
14343 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14345 (define-gl-procedures
14346 ((glIsTexture (texture GLuint) -> GLboolean))
14347 "Determine if a name corresponds to a texture.
14350 Specifies a value that may be the name of a texture.
14352 `glIsTexture' returns `GL_TRUE' if TEXTURE is currently the name of a
14353 texture. If TEXTURE is zero, or is a non-zero value that is not
14354 currently the name of a texture, or if an error occurs, `glIsTexture'
14355 returns `GL_FALSE'.
14357 A name returned by `glGenTextures', but not yet associated with a
14358 texture by calling `glBindTexture', is not the name of a texture.
14360 `GL_INVALID_OPERATION' is generated if `glIsTexture' is executed between
14361 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14363 (define-gl-procedures
14376 (params const-GLfloat-*)
14381 (params const-GLint-*)
14384 "Set the lighting model parameters.
14387 Specifies a single-valued lighting model parameter.
14388 `GL_LIGHT_MODEL_LOCAL_VIEWER', `GL_LIGHT_MODEL_COLOR_CONTROL', and
14389 `GL_LIGHT_MODEL_TWO_SIDE' are accepted.
14392 Specifies the value that PARAM will be set to.
14394 `glLightModel' sets the lighting model parameter. PNAME names a
14395 parameter and PARAMS gives the new value. There are three lighting model
14398 `GL_LIGHT_MODEL_AMBIENT'
14401 PARAMS contains four integer or floating-point values that specify
14402 the ambient RGBA intensity of the entire scene. Integer values are
14403 mapped linearly such that the most positive representable value
14404 maps to 1.0, and the most negative representable value maps to -1.0
14405 . Floating-point values are mapped directly. Neither integer nor
14406 floating-point values are clamped. The initial ambient scene
14407 intensity is (0.2, 0.2, 0.2, 1.0).
14409 `GL_LIGHT_MODEL_COLOR_CONTROL'
14412 PARAMS must be either `GL_SEPARATE_SPECULAR_COLOR' or
14413 `GL_SINGLE_COLOR'. `GL_SINGLE_COLOR' specifies that a single color
14414 is generated from the lighting computation for a vertex.
14415 `GL_SEPARATE_SPECULAR_COLOR' specifies that the specular color
14416 computation of lighting be stored separately from the remainder of
14417 the lighting computation. The specular color is summed into the
14418 generated fragment's color after the application of texture mapping
14419 (if enabled). The initial value is `GL_SINGLE_COLOR'.
14421 `GL_LIGHT_MODEL_LOCAL_VIEWER'
14424 PARAMS is a single integer or floating-point value that specifies
14425 how specular reflection angles are computed. If PARAMS is 0 (or
14426 0.0), specular reflection angles take the view direction to be
14427 parallel to and in the direction of the -Z axis, regardless of the
14428 location of the vertex in eye coordinates. Otherwise, specular
14429 reflections are computed from the origin of the eye coordinate
14430 system. The initial value is 0.
14432 `GL_LIGHT_MODEL_TWO_SIDE'
14435 PARAMS is a single integer or floating-point value that specifies
14436 whether one- or two-sided lighting calculations are done for
14437 polygons. It has no effect on the lighting calculations for points,
14438 lines, or bitmaps. If PARAMS is 0 (or 0.0), one-sided lighting is
14439 specified, and only the FRONT material parameters are used in the
14440 lighting equation. Otherwise, two-sided lighting is specified. In
14441 this case, vertices of back-facing polygons are lighted using the
14442 BACK material parameters and have their normals reversed before the
14443 lighting equation is evaluated. Vertices of front-facing polygons
14444 are always lighted using the FRONT material parameters, with no
14445 change to their normals. The initial value is 0.
14447 In RGBA mode, the lighted color of a vertex is the sum of the material
14448 emission intensity, the product of the material ambient reflectance and
14449 the lighting model full-scene ambient intensity, and the contribution of
14450 each enabled light source. Each light source contributes the sum of
14451 three terms: ambient, diffuse, and specular. The ambient light source
14452 contribution is the product of the material ambient reflectance and the
14453 light's ambient intensity. The diffuse light source contribution is the
14454 product of the material diffuse reflectance, the light's diffuse
14455 intensity, and the dot product of the vertex's normal with the
14456 normalized vector from the vertex to the light source. The specular
14457 light source contribution is the product of the material specular
14458 reflectance, the light's specular intensity, and the dot product of the
14459 normalized vertex-to-eye and vertex-to-light vectors, raised to the
14460 power of the shininess of the material. All three light source
14461 contributions are attenuated equally based on the distance from the
14462 vertex to the light source and on light source direction, spread
14463 exponent, and spread cutoff angle. All dot products are replaced with 0
14464 if they evaluate to a negative value.
14466 The alpha component of the resulting lighted color is set to the alpha
14467 value of the material diffuse reflectance.
14469 In color index mode, the value of the lighted index of a vertex ranges
14470 from the ambient to the specular values passed to `glMaterial' using
14471 `GL_COLOR_INDEXES'. Diffuse and specular coefficients, computed with a
14472 (.30, .59, .11) weighting of the lights' colors, the shininess of the
14473 material, and the same reflection and attenuation equations as in the
14474 RGBA case, determine how much above ambient the resulting index is.
14476 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
14478 `GL_INVALID_ENUM' is generated if PNAME is
14479 `GL_LIGHT_MODEL_COLOR_CONTROL' and PARAMS is not one of
14480 `GL_SINGLE_COLOR' or `GL_SEPARATE_SPECULAR_COLOR'.
14482 `GL_INVALID_OPERATION' is generated if `glLightModel' is executed
14483 between the execution of `glBegin' and the corresponding execution of
14486 (define-gl-procedures
14502 (params const-GLfloat-*)
14508 (params const-GLint-*)
14511 "Set light source parameters.
14514 Specifies a light. The number of lights depends on the
14515 implementation, but at least eight lights are supported. They are
14516 identified by symbolic names of the form `GL_LIGHT' I , where i
14517 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
14520 Specifies a single-valued light source parameter for LIGHT.
14521 `GL_SPOT_EXPONENT', `GL_SPOT_CUTOFF', `GL_CONSTANT_ATTENUATION',
14522 `GL_LINEAR_ATTENUATION', and `GL_QUADRATIC_ATTENUATION' are
14526 Specifies the value that parameter PNAME of light source LIGHT will
14529 `glLight' sets the values of individual light source parameters. LIGHT
14530 names the light and is a symbolic name of the form `GL_LIGHT'I , where i
14531 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1. PNAME specifies one
14532 of ten light source parameters, again by symbolic name. PARAMS is either
14533 a single value or a pointer to an array that contains the new values.
14535 To enable and disable lighting calculation, call `glEnable' and
14536 `glDisable' with argument `GL_LIGHTING'. Lighting is initially disabled.
14537 When it is enabled, light sources that are enabled contribute to the
14538 lighting calculation. Light source I is enabled and disabled using
14539 `glEnable' and `glDisable' with argument `GL_LIGHT'I .
14541 The ten light parameters are as follows:
14544 PARAMS contains four integer or floating-point values that specify
14545 the ambient RGBA intensity of the light. Integer values are mapped
14546 linearly such that the most positive representable value maps to
14547 1.0, and the most negative representable value maps to -1.0 .
14548 Floating-point values are mapped directly. Neither integer nor
14549 floating-point values are clamped. The initial ambient light
14550 intensity is (0, 0, 0, 1).
14553 PARAMS contains four integer or floating-point values that specify
14554 the diffuse RGBA intensity of the light. Integer values are mapped
14555 linearly such that the most positive representable value maps to
14556 1.0, and the most negative representable value maps to -1.0 .
14557 Floating-point values are mapped directly. Neither integer nor
14558 floating-point values are clamped. The initial value for
14559 `GL_LIGHT0' is (1, 1, 1, 1); for other lights, the initial value is
14563 PARAMS contains four integer or floating-point values that specify
14564 the specular RGBA intensity of the light. Integer values are mapped
14565 linearly such that the most positive representable value maps to
14566 1.0, and the most negative representable value maps to -1.0 .
14567 Floating-point values are mapped directly. Neither integer nor
14568 floating-point values are clamped. The initial value for
14569 `GL_LIGHT0' is (1, 1, 1, 1); for other lights, the initial value is
14573 PARAMS contains four integer or floating-point values that specify
14574 the position of the light in homogeneous object coordinates. Both
14575 integer and floating-point values are mapped directly. Neither
14576 integer nor floating-point values are clamped.
14578 The position is transformed by the modelview matrix when `glLight'
14579 is called (just as if it were a point), and it is stored in eye
14580 coordinates. If the W component of the position is 0, the light is
14581 treated as a directional source. Diffuse and specular lighting
14582 calculations take the light's direction, but not its actual
14583 position, into account, and attenuation is disabled. Otherwise,
14584 diffuse and specular lighting calculations are based on the actual
14585 location of the light in eye coordinates, and attenuation is
14586 enabled. The initial position is (0, 0, 1, 0); thus, the initial
14587 light source is directional, parallel to, and in the direction of
14590 `GL_SPOT_DIRECTION'
14591 PARAMS contains three integer or floating-point values that specify
14592 the direction of the light in homogeneous object coordinates. Both
14593 integer and floating-point values are mapped directly. Neither
14594 integer nor floating-point values are clamped.
14596 The spot direction is transformed by the upper 3x3 of the modelview
14597 matrix when `glLight' is called, and it is stored in eye
14598 coordinates. It is significant only when `GL_SPOT_CUTOFF' is not
14599 180, which it is initially. The initial direction is (0,0-1) .
14602 PARAMS is a single integer or floating-point value that specifies
14603 the intensity distribution of the light. Integer and floating-point
14604 values are mapped directly. Only values in the range [0,128] are
14607 Effective light intensity is attenuated by the cosine of the angle
14608 between the direction of the light and the direction from the light
14609 to the vertex being lighted, raised to the power of the spot
14610 exponent. Thus, higher spot exponents result in a more focused
14611 light source, regardless of the spot cutoff angle (see
14612 `GL_SPOT_CUTOFF', next paragraph). The initial spot exponent is 0,
14613 resulting in uniform light distribution.
14616 PARAMS is a single integer or floating-point value that specifies
14617 the maximum spread angle of a light source. Integer and
14618 floating-point values are mapped directly. Only values in the range
14619 [0,90] and the special value 180 are accepted. If the angle between
14620 the direction of the light and the direction from the light to the
14621 vertex being lighted is greater than the spot cutoff angle, the
14622 light is completely masked. Otherwise, its intensity is controlled
14623 by the spot exponent and the attenuation factors. The initial spot
14624 cutoff is 180, resulting in uniform light distribution.
14626 `GL_CONSTANT_ATTENUATION'
14627 `GL_LINEAR_ATTENUATION'
14628 `GL_QUADRATIC_ATTENUATION'
14629 PARAMS is a single integer or floating-point value that specifies
14630 one of the three light attenuation factors. Integer and
14631 floating-point values are mapped directly. Only nonnegative values
14632 are accepted. If the light is positional, rather than directional,
14633 its intensity is attenuated by the reciprocal of the sum of the
14634 constant factor, the linear factor times the distance between the
14635 light and the vertex being lighted, and the quadratic factor times
14636 the square of the same distance. The initial attenuation factors
14637 are (1, 0, 0), resulting in no attenuation.
14639 `GL_INVALID_ENUM' is generated if either LIGHT or PNAME is not an
14642 `GL_INVALID_VALUE' is generated if a spot exponent value is specified
14643 outside the range [0,128] , or if spot cutoff is specified outside the
14644 range [0,90] (except for the special value 180), or if a negative
14645 attenuation factor is specified.
14647 `GL_INVALID_OPERATION' is generated if `glLight' is executed between the
14648 execution of `glBegin' and the corresponding execution of `glEnd'.")
14650 (define-gl-procedures
14656 "Specify the line stipple pattern.
14659 Specifies a multiplier for each bit in the line stipple pattern. If
14660 FACTOR is 3, for example, each bit in the pattern is used three
14661 times before the next bit in the pattern is used. FACTOR is clamped
14662 to the range [1, 256] and defaults to 1.
14665 Specifies a 16-bit integer whose bit pattern determines which
14666 fragments of a line will be drawn when the line is rasterized. Bit
14667 zero is used first; the default pattern is all 1's.
14669 Line stippling masks out certain fragments produced by rasterization;
14670 those fragments will not be drawn. The masking is achieved by using
14671 three parameters: the 16-bit line stipple pattern PATTERN, the repeat
14672 count FACTOR, and an integer stipple counter S .
14674 Counter S is reset to 0 whenever `glBegin' is called and before each
14675 line segment of a `glBegin'(`GL_LINES')/`glEnd' sequence is generated.
14676 It is incremented after each fragment of a unit width aliased line
14677 segment is generated or after each I fragments of an I width line
14678 segment are generated. The I fragments associated with count S are
14681 PATTERN bit (S/FACTOR,)%16
14683 is 0, otherwise these fragments are sent to the frame buffer. Bit zero
14684 of PATTERN is the least significant bit.
14686 Antialiased lines are treated as a sequence of 1×WIDTH rectangles for
14687 purposes of stippling. Whether rectangle S is rasterized or not depends
14688 on the fragment rule described for aliased lines, counting rectangles
14689 rather than groups of fragments.
14691 To enable and disable line stippling, call `glEnable' and `glDisable'
14692 with argument `GL_LINE_STIPPLE'. When enabled, the line stipple pattern
14693 is applied as described above. When disabled, it is as if the pattern
14694 were all 1's. Initially, line stippling is disabled.
14696 `GL_INVALID_OPERATION' is generated if `glLineStipple' is executed
14697 between the execution of `glBegin' and the corresponding execution of
14700 (define-gl-procedures
14701 ((glLineWidth (width GLfloat) -> void))
14702 "Specify the width of rasterized lines.
14705 Specifies the width of rasterized lines. The initial value is 1.
14707 `glLineWidth' specifies the rasterized width of both aliased and
14708 antialiased lines. Using a line width other than 1 has different
14709 effects, depending on whether line antialiasing is enabled. To enable
14710 and disable line antialiasing, call `glEnable' and `glDisable' with
14711 argument `GL_LINE_SMOOTH'. Line antialiasing is initially disabled.
14713 If line antialiasing is disabled, the actual width is determined by
14714 rounding the supplied width to the nearest integer. (If the rounding
14715 results in the value 0, it is as if the line width were 1.) If
14716 ∣ΔX,∣>=∣ΔY,∣ , I pixels are filled in each column that is rasterized,
14717 where I is the rounded value of WIDTH. Otherwise, I pixels are filled in
14718 each row that is rasterized.
14720 If antialiasing is enabled, line rasterization produces a fragment for
14721 each pixel square that intersects the region lying within the rectangle
14722 having width equal to the current line width, length equal to the actual
14723 length of the line, and centered on the mathematical line segment. The
14724 coverage value for each fragment is the window coordinate area of the
14725 intersection of the rectangular region with the corresponding pixel
14726 square. This value is saved and used in the final rasterization step.
14728 Not all widths can be supported when line antialiasing is enabled. If an
14729 unsupported width is requested, the nearest supported width is used.
14730 Only width 1 is guaranteed to be supported; others depend on the
14731 implementation. Likewise, there is a range for aliased line widths as
14732 well. To query the range of supported widths and the size difference
14733 between supported widths within the range, call `glGet' with arguments
14734 `GL_ALIASED_LINE_WIDTH_RANGE', `GL_SMOOTH_LINE_WIDTH_RANGE', and
14735 `GL_SMOOTH_LINE_WIDTH_GRANULARITY'.
14737 `GL_INVALID_VALUE' is generated if WIDTH is less than or equal to 0.
14739 `GL_INVALID_OPERATION' is generated if `glLineWidth' is executed between
14740 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14742 (define-gl-procedures
14743 ((glLinkProgram (program GLuint) -> void))
14744 "Links a program object.
14747 Specifies the handle of the program object to be linked.
14749 `glLinkProgram' links the program object specified by PROGRAM. If any
14750 shader objects of type `GL_VERTEX_SHADER' are attached to PROGRAM, they
14751 will be used to create an executable that will run on the programmable
14752 vertex processor. If any shader objects of type `GL_FRAGMENT_SHADER' are
14753 attached to PROGRAM, they will be used to create an executable that will
14754 run on the programmable fragment processor.
14756 The status of the link operation will be stored as part of the program
14757 object's state. This value will be set to `GL_TRUE' if the program
14758 object was linked without errors and is ready for use, and `GL_FALSE'
14759 otherwise. It can be queried by calling `glGetProgram' with arguments
14760 PROGRAM and `GL_LINK_STATUS'.
14762 As a result of a successful link operation, all active user-defined
14763 uniform variables belonging to PROGRAM will be initialized to 0, and
14764 each of the program object's active uniform variables will be assigned a
14765 location that can be queried by calling `glGetUniformLocation'. Also,
14766 any active user-defined attribute variables that have not been bound to
14767 a generic vertex attribute index will be bound to one at this time.
14769 Linking of a program object can fail for a number of reasons as
14770 specified in the OPENGL SHADING LANGUAGE SPECIFICATION. The following
14771 lists some of the conditions that will cause a link error.
14773 * The storage limit for uniform variables has been exceeded.
14775 * The number of active uniform variables supported by the
14776 implementation has been exceeded.
14778 * The `main' function is missing for the vertex shader or the
14781 * A varying variable actually used in the fragment shader is not
14782 declared in the same way (or is not declared at all) in the vertex
14785 * A reference to a function or variable name is unresolved.
14787 * A shared global is declared with two different types or two
14788 different initial values.
14790 * One or more of the attached shader objects has not been
14791 successfully compiled.
14793 * Binding a generic attribute matrix caused some rows of the matrix
14794 to fall outside the allowed maximum of `GL_MAX_VERTEX_ATTRIBS'.
14796 * Not enough contiguous vertex attribute slots could be found to bind
14797 attribute matrices.
14799 When a program object has been successfully linked, the program object
14800 can be made part of current state by calling `glUseProgram'. Whether or
14801 not the link operation was successful, the program object's information
14802 log will be overwritten. The information log can be retrieved by calling
14803 `glGetProgramInfoLog'.
14805 `glLinkProgram' will also install the generated executables as part of
14806 the current rendering state if the link operation was successful and the
14807 specified program object is already currently in use as a result of a
14808 previous call to `glUseProgram'. If the program object currently in use
14809 is relinked unsuccessfully, its link status will be set to `GL_FALSE' ,
14810 but the executables and associated state will remain part of the current
14811 state until a subsequent call to `glUseProgram' removes it from use.
14812 After it is removed from use, it cannot be made part of current state
14813 until it has been successfully relinked.
14815 If PROGRAM contains shader objects of type `GL_VERTEX_SHADER' but does
14816 not contain shader objects of type `GL_FRAGMENT_SHADER', the vertex
14817 shader will be linked against the implicit interface for fixed
14818 functionality fragment processing. Similarly, if PROGRAM contains shader
14819 objects of type `GL_FRAGMENT_SHADER' but it does not contain shader
14820 objects of type `GL_VERTEX_SHADER', the fragment shader will be linked
14821 against the implicit interface for fixed functionality vertex
14824 The program object's information log is updated and the program is
14825 generated at the time of the link operation. After the link operation,
14826 applications are free to modify attached shader objects, compile
14827 attached shader objects, detach shader objects, delete shader objects,
14828 and attach additional shader objects. None of these operations affects
14829 the information log or the program that is part of the program object.
14831 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
14834 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
14836 `GL_INVALID_OPERATION' is generated if `glLinkProgram' is executed
14837 between the execution of `glBegin' and the corresponding execution of
14840 (define-gl-procedures
14841 ((glListBase (base GLuint) -> void))
14842 "Set the display-list base for .
14845 Specifies an integer offset that will be added to `glCallLists'
14846 offsets to generate display-list names. The initial value is 0.
14848 `glCallLists' specifies an array of offsets. Display-list names are
14849 generated by adding BASE to each offset. Names that reference valid
14850 display lists are executed; the others are ignored.
14852 `GL_INVALID_OPERATION' is generated if `glListBase' is executed between
14853 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14855 (define-gl-procedures
14856 ((glLoadIdentity -> void))
14857 "Replace the current matrix with the identity matrix.
14859 `glLoadIdentity' replaces the current matrix with the identity matrix.
14860 It is semantically equivalent to calling `glLoadMatrix' with the
14865 ((1 0 0 0), (0 1 0 0), (0 0 1 0), (0 0 0 1),,)
14869 but in some cases it is more efficient.
14871 `GL_INVALID_OPERATION' is generated if `glLoadIdentity' is executed
14872 between the execution of `glBegin' and the corresponding execution of
14875 (define-gl-procedures
14876 ((glLoadMatrixd (m const-GLdouble-*) -> void)
14877 (glLoadMatrixf (m const-GLfloat-*) -> void))
14878 "Replace the current matrix with the specified matrix.
14881 Specifies a pointer to 16 consecutive values, which are used as the
14882 elements of a 4×4 column-major matrix.
14884 `glLoadMatrix' replaces the current matrix with the one whose elements
14885 are specified by M. The current matrix is the projection matrix,
14886 modelview matrix, or texture matrix, depending on the current matrix
14887 mode (see `glMatrixMode').
14889 The current matrix, M, defines a transformation of coordinates. For
14890 instance, assume M refers to the modelview matrix. If
14891 V=(V\u2061[0,],V\u2061[1,]V\u2061[2,]V\u2061[3,]) is the set of object coordinates of a
14892 vertex, and M points to an array of 16 single- or double-precision
14893 floating-point values M={M\u2061[0,],M\u2061[1,]...M\u2061[15,]} , then the modelview
14894 transformation M\u2061(V,) does the following:
14896 M\u2061(V,)=((M\u2061[0,] M\u2061[4,] M\u2061[8,] M\u2061[12,]), (M\u2061[1,] M\u2061[5,] M\u2061[9,] M\u2061[13,]),
14897 (M\u2061[2,] M\u2061[6,] M\u2061[10,] M\u2061[14,]), (M\u2061[3,] M\u2061[7,] M\u2061[11,]
14898 M\u2061[15,]),)×((V\u2061[0,]), (V\u2061[1,]), (V\u2061[2,]), (V\u2061[3,]),)
14902 Projection and texture transformations are similarly defined.
14904 `GL_INVALID_OPERATION' is generated if `glLoadMatrix' is executed
14905 between the execution of `glBegin' and the corresponding execution of
14908 (define-gl-procedures
14909 ((glLoadName (name GLuint) -> void))
14910 "Load a name onto the name stack.
14913 Specifies a name that will replace the top value on the name stack.
14915 The name stack is used during selection mode to allow sets of rendering
14916 commands to be uniquely identified. It consists of an ordered set of
14917 unsigned integers and is initially empty.
14919 `glLoadName' causes NAME to replace the value on the top of the name
14922 The name stack is always empty while the render mode is not `GL_SELECT'.
14923 Calls to `glLoadName' while the render mode is not `GL_SELECT' are
14926 `GL_INVALID_OPERATION' is generated if `glLoadName' is called while the
14927 name stack is empty.
14929 `GL_INVALID_OPERATION' is generated if `glLoadName' is executed between
14930 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14932 (define-gl-procedures
14933 ((glLoadTransposeMatrixd
14934 (m const-GLdouble-*)
14937 (glLoadTransposeMatrixf
14938 (m const-GLfloat-*)
14941 "Replace the current matrix with the specified row-major ordered matrix.
14944 Specifies a pointer to 16 consecutive values, which are used as the
14945 elements of a 4×4 row-major matrix.
14947 `glLoadTransposeMatrix' replaces the current matrix with the one whose
14948 elements are specified by M. The current matrix is the projection
14949 matrix, modelview matrix, or texture matrix, depending on the current
14950 matrix mode (see `glMatrixMode').
14952 The current matrix, M, defines a transformation of coordinates. For
14953 instance, assume M refers to the modelview matrix. If
14954 V=(V\u2061[0,],V\u2061[1,]V\u2061[2,]V\u2061[3,]) is the set of object coordinates of a
14955 vertex, and M points to an array of 16 single- or double-precision
14956 floating-point values M={M\u2061[0,],M\u2061[1,]...M\u2061[15,]} , then the modelview
14957 transformation M\u2061(V,) does the following:
14959 M\u2061(V,)=((M\u2061[0,] M\u2061[1,] M\u2061[2,] M\u2061[3,]), (M\u2061[4,] M\u2061[5,] M\u2061[6,] M\u2061[7,]),
14960 (M\u2061[8,] M\u2061[9,] M\u2061[10,] M\u2061[11,]), (M\u2061[12,] M\u2061[13,] M\u2061[14,]
14961 M\u2061[15,]),)×((V\u2061[0,]), (V\u2061[1,]), (V\u2061[2,]), (V\u2061[3,]),)
14965 Projection and texture transformations are similarly defined.
14967 Calling `glLoadTransposeMatrix' with matrix M is identical in operation
14968 to `glLoadMatrix' with M^T , where T represents the transpose.
14970 `GL_INVALID_OPERATION' is generated if `glLoadTransposeMatrix' is
14971 executed between the execution of `glBegin' and the corresponding
14972 execution of `glEnd'.")
14974 (define-gl-procedures
14975 ((glLogicOp (opcode GLenum) -> void))
14976 "Specify a logical pixel operation for color index rendering.
14979 Specifies a symbolic constant that selects a logical operation. The
14980 following symbols are accepted: `GL_CLEAR', `GL_SET', `GL_COPY',
14981 `GL_COPY_INVERTED', `GL_NOOP', `GL_INVERT', `GL_AND', `GL_NAND',
14982 `GL_OR', `GL_NOR', `GL_XOR', `GL_EQUIV', `GL_AND_REVERSE',
14983 `GL_AND_INVERTED', `GL_OR_REVERSE', and `GL_OR_INVERTED'. The
14984 initial value is `GL_COPY'.
14986 `glLogicOp' specifies a logical operation that, when enabled, is applied
14987 between the incoming color index or RGBA color and the color index or
14988 RGBA color at the corresponding location in the frame buffer. To enable
14989 or disable the logical operation, call `glEnable' and `glDisable' using
14990 the symbolic constant `GL_COLOR_LOGIC_OP' for RGBA mode or
14991 `GL_INDEX_LOGIC_OP' for color index mode. The initial value is disabled
14992 for both operations.
14997 *Resulting Operation*
15047 OPCODE is a symbolic constant chosen from the list above. In the
15048 explanation of the logical operations, S represents the incoming color
15049 index and D represents the index in the frame buffer. Standard
15050 C-language operators are used. As these bitwise operators suggest, the
15051 logical operation is applied independently to each bit pair of the
15052 source and destination indices or colors.
15054 `GL_INVALID_ENUM' is generated if OPCODE is not an accepted value.
15056 `GL_INVALID_OPERATION' is generated if `glLogicOp' is executed between
15057 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15059 (define-gl-procedures
15066 (points const-GLfloat-*)
15075 (points const-GLdouble-*)
15078 "Define a one-dimensional evaluator.
15081 Specifies the kind of values that are generated by the evaluator.
15082 Symbolic constants `GL_MAP1_VERTEX_3', `GL_MAP1_VERTEX_4',
15083 `GL_MAP1_INDEX', `GL_MAP1_COLOR_4', `GL_MAP1_NORMAL',
15084 `GL_MAP1_TEXTURE_COORD_1', `GL_MAP1_TEXTURE_COORD_2',
15085 `GL_MAP1_TEXTURE_COORD_3', and `GL_MAP1_TEXTURE_COORD_4' are
15091 Specify a linear mapping of U , as presented to `glEvalCoord1', to
15092 U^ , the variable that is evaluated by the equations specified by
15096 Specifies the number of floats or doubles between the beginning of
15097 one control point and the beginning of the next one in the data
15098 structure referenced in POINTS. This allows control points to be
15099 embedded in arbitrary data structures. The only constraint is that
15100 the values for a particular control point must occupy contiguous
15104 Specifies the number of control points. Must be positive.
15107 Specifies a pointer to the array of control points.
15109 Evaluators provide a way to use polynomial or rational polynomial
15110 mapping to produce vertices, normals, texture coordinates, and colors.
15111 The values produced by an evaluator are sent to further stages of GL
15112 processing just as if they had been presented using `glVertex',
15113 `glNormal', `glTexCoord', and `glColor' commands, except that the
15114 generated values do not update the current normal, texture coordinates,
15117 All polynomial or rational polynomial splines of any degree (up to the
15118 maximum degree supported by the GL implementation) can be described
15119 using evaluators. These include almost all splines used in computer
15120 graphics: B-splines, Bezier curves, Hermite splines, and so on.
15122 Evaluators define curves based on Bernstein polynomials. Define P\u2061(U^,)
15125 P\u2061(U^,)=ΣI=0NB_I,^N\u2061(U^,)\u2062R_I
15129 where R_I is a control point and B_I,^N\u2061(U^,) is the I th Bernstein
15130 polynomial of degree N (ORDER = N+1 ):
15132 B_I,^N\u2061(U^,)=((N), (I),,)\u2062U^,^I\u2062(1-U^,)^N-I,,
15136 0^0==1 and ((N), (0),,)==1
15138 `glMap1' is used to define the basis and to specify what kind of values
15139 are produced. Once defined, a map can be enabled and disabled by calling
15140 `glEnable' and `glDisable' with the map name, one of the nine predefined
15141 values for TARGET described below. `glEvalCoord1' evaluates the
15142 one-dimensional maps that are enabled. When `glEvalCoord1' presents a
15143 value U , the Bernstein functions are evaluated using U^ , where
15146 TARGET is a symbolic constant that indicates what kind of control points
15147 are provided in POINTS, and what output is generated when the map is
15148 evaluated. It can assume one of nine predefined values:
15151 Each control point is three floating-point values representing X ,
15152 Y , and Z . Internal `glVertex3' commands are generated when the
15156 Each control point is four floating-point values representing X , Y
15157 , Z , and W . Internal `glVertex4' commands are generated when the
15161 Each control point is a single floating-point value representing a
15162 color index. Internal `glIndex' commands are generated when the map
15163 is evaluated but the current index is not updated with the value of
15164 these `glIndex' commands.
15167 Each control point is four floating-point values representing red,
15168 green, blue, and alpha. Internal `glColor4' commands are generated
15169 when the map is evaluated but the current color is not updated with
15170 the value of these `glColor4' commands.
15173 Each control point is three floating-point values representing the
15174 X , Y , and Z components of a normal vector. Internal `glNormal'
15175 commands are generated when the map is evaluated but the current
15176 normal is not updated with the value of these `glNormal' commands.
15178 `GL_MAP1_TEXTURE_COORD_1'
15179 Each control point is a single floating-point value representing
15180 the S texture coordinate. Internal `glTexCoord1' commands are
15181 generated when the map is evaluated but the current texture
15182 coordinates are not updated with the value of these `glTexCoord'
15185 `GL_MAP1_TEXTURE_COORD_2'
15186 Each control point is two floating-point values representing the S
15187 and T texture coordinates. Internal `glTexCoord2' commands are
15188 generated when the map is evaluated but the current texture
15189 coordinates are not updated with the value of these `glTexCoord'
15192 `GL_MAP1_TEXTURE_COORD_3'
15193 Each control point is three floating-point values representing the
15194 S , T , and R texture coordinates. Internal `glTexCoord3' commands
15195 are generated when the map is evaluated but the current texture
15196 coordinates are not updated with the value of these `glTexCoord'
15199 `GL_MAP1_TEXTURE_COORD_4'
15200 Each control point is four floating-point values representing the S
15201 , T , R , and Q texture coordinates. Internal `glTexCoord4'
15202 commands are generated when the map is evaluated but the current
15203 texture coordinates are not updated with the value of these
15204 `glTexCoord' commands.
15206 STRIDE, ORDER, and POINTS define the array addressing for accessing the
15207 control points. POINTS is the location of the first control point, which
15208 occupies one, two, three, or four contiguous memory locations, depending
15209 on which map is being defined. ORDER is the number of control points in
15210 the array. STRIDE specifies how many float or double locations to
15211 advance the internal memory pointer to reach the next control point.
15213 `GL_INVALID_ENUM' is generated if TARGET is not an accepted value.
15215 `GL_INVALID_VALUE' is generated if U1 is equal to U2.
15217 `GL_INVALID_VALUE' is generated if STRIDE is less than the number of
15218 values in a control point.
15220 `GL_INVALID_VALUE' is generated if ORDER is less than 1 or greater than
15221 the return value of `GL_MAX_EVAL_ORDER'.
15223 `GL_INVALID_OPERATION' is generated if `glMap1' is executed between the
15224 execution of `glBegin' and the corresponding execution of `glEnd'.
15226 `GL_INVALID_OPERATION' is generated if `glMap1' is called and the value
15227 of `GL_ACTIVE_TEXTURE' is not `GL_TEXTURE0'.")
15229 (define-gl-procedures
15240 (points const-GLfloat-*)
15253 (points const-GLdouble-*)
15256 "Define a two-dimensional evaluator.
15259 Specifies the kind of values that are generated by the evaluator.
15260 Symbolic constants `GL_MAP2_VERTEX_3', `GL_MAP2_VERTEX_4',
15261 `GL_MAP2_INDEX', `GL_MAP2_COLOR_4', `GL_MAP2_NORMAL',
15262 `GL_MAP2_TEXTURE_COORD_1', `GL_MAP2_TEXTURE_COORD_2',
15263 `GL_MAP2_TEXTURE_COORD_3', and `GL_MAP2_TEXTURE_COORD_4' are
15269 Specify a linear mapping of U , as presented to `glEvalCoord2', to
15270 U^ , one of the two variables that are evaluated by the equations
15271 specified by this command. Initially, U1 is 0 and U2 is 1.
15274 Specifies the number of floats or doubles between the beginning of
15275 control point R_IJ and the beginning of control point R_(I+1,)\u2062J, ,
15276 where I and J are the U and V control point indices, respectively.
15277 This allows control points to be embedded in arbitrary data
15278 structures. The only constraint is that the values for a particular
15279 control point must occupy contiguous memory locations. The initial
15280 value of USTRIDE is 0.
15283 Specifies the dimension of the control point array in the U axis.
15284 Must be positive. The initial value is 1.
15289 Specify a linear mapping of V , as presented to `glEvalCoord2', to
15290 V^ , one of the two variables that are evaluated by the equations
15291 specified by this command. Initially, V1 is 0 and V2 is 1.
15294 Specifies the number of floats or doubles between the beginning of
15295 control point R_IJ and the beginning of control point R_I\u2061(J+1,), ,
15296 where I and J are the U and V control point indices, respectively.
15297 This allows control points to be embedded in arbitrary data
15298 structures. The only constraint is that the values for a particular
15299 control point must occupy contiguous memory locations. The initial
15300 value of VSTRIDE is 0.
15303 Specifies the dimension of the control point array in the V axis.
15304 Must be positive. The initial value is 1.
15307 Specifies a pointer to the array of control points.
15309 Evaluators provide a way to use polynomial or rational polynomial
15310 mapping to produce vertices, normals, texture coordinates, and colors.
15311 The values produced by an evaluator are sent on to further stages of GL
15312 processing just as if they had been presented using `glVertex',
15313 `glNormal', `glTexCoord', and `glColor' commands, except that the
15314 generated values do not update the current normal, texture coordinates,
15317 All polynomial or rational polynomial splines of any degree (up to the
15318 maximum degree supported by the GL implementation) can be described
15319 using evaluators. These include almost all surfaces used in computer
15320 graphics, including B-spline surfaces, NURBS surfaces, Bezier surfaces,
15323 Evaluators define surfaces based on bivariate Bernstein polynomials.
15324 Define P\u2061(U^,V^) as
15326 P\u2061(U^,V^)=ΣI=0NΣJ=0MB_I,^N\u2061(U^,)\u2062B_J,^M\u2061(V^,)\u2062R_IJ
15330 where R_IJ is a control point, B_I,^N\u2061(U^,) is the I th Bernstein
15331 polynomial of degree N (UORDER = N+1 )
15333 B_I,^N\u2061(U^,)=((N), (I),,)\u2062U^,^I\u2062(1-U^,)^N-I,,
15335 and B_J,^M\u2061(V^,) is the J th Bernstein polynomial of degree M (VORDER =
15338 B_J,^M\u2061(V^,)=((M), (J),,)\u2062V^,^J\u2062(1-V^,)^M-J,,
15340 Recall that 0^0==1 and ((N), (0),,)==1
15342 `glMap2' is used to define the basis and to specify what kind of values
15343 are produced. Once defined, a map can be enabled and disabled by calling
15344 `glEnable' and `glDisable' with the map name, one of the nine predefined
15345 values for TARGET, described below. When `glEvalCoord2' presents values
15346 U and V , the bivariate Bernstein polynomials are evaluated using U^ and
15353 TARGET is a symbolic constant that indicates what kind of control points
15354 are provided in POINTS, and what output is generated when the map is
15355 evaluated. It can assume one of nine predefined values:
15358 Each control point is three floating-point values representing X ,
15359 Y , and Z . Internal `glVertex3' commands are generated when the
15363 Each control point is four floating-point values representing X , Y
15364 , Z , and W . Internal `glVertex4' commands are generated when the
15368 Each control point is a single floating-point value representing a
15369 color index. Internal `glIndex' commands are generated when the map
15370 is evaluated but the current index is not updated with the value of
15371 these `glIndex' commands.
15374 Each control point is four floating-point values representing red,
15375 green, blue, and alpha. Internal `glColor4' commands are generated
15376 when the map is evaluated but the current color is not updated with
15377 the value of these `glColor4' commands.
15380 Each control point is three floating-point values representing the
15381 X , Y , and Z components of a normal vector. Internal `glNormal'
15382 commands are generated when the map is evaluated but the current
15383 normal is not updated with the value of these `glNormal' commands.
15385 `GL_MAP2_TEXTURE_COORD_1'
15386 Each control point is a single floating-point value representing
15387 the S texture coordinate. Internal `glTexCoord1' commands are
15388 generated when the map is evaluated but the current texture
15389 coordinates are not updated with the value of these `glTexCoord'
15392 `GL_MAP2_TEXTURE_COORD_2'
15393 Each control point is two floating-point values representing the S
15394 and T texture coordinates. Internal `glTexCoord2' commands are
15395 generated when the map is evaluated but the current texture
15396 coordinates are not updated with the value of these `glTexCoord'
15399 `GL_MAP2_TEXTURE_COORD_3'
15400 Each control point is three floating-point values representing the
15401 S , T , and R texture coordinates. Internal `glTexCoord3' commands
15402 are generated when the map is evaluated but the current texture
15403 coordinates are not updated with the value of these `glTexCoord'
15406 `GL_MAP2_TEXTURE_COORD_4'
15407 Each control point is four floating-point values representing the S
15408 , T , R , and Q texture coordinates. Internal `glTexCoord4'
15409 commands are generated when the map is evaluated but the current
15410 texture coordinates are not updated with the value of these
15411 `glTexCoord' commands.
15413 USTRIDE, UORDER, VSTRIDE, VORDER, and POINTS define the array addressing
15414 for accessing the control points. POINTS is the location of the first
15415 control point, which occupies one, two, three, or four contiguous memory
15416 locations, depending on which map is being defined. There are
15417 UORDER×VORDER control points in the array. USTRIDE specifies how many
15418 float or double locations are skipped to advance the internal memory
15419 pointer from control point R_I\u2062J, to control point R_(I+1,)\u2062J, . VSTRIDE
15420 specifies how many float or double locations are skipped to advance the
15421 internal memory pointer from control point R_I\u2062J, to control point
15424 `GL_INVALID_ENUM' is generated if TARGET is not an accepted value.
15426 `GL_INVALID_VALUE' is generated if U1 is equal to U2, or if V1 is equal
15429 `GL_INVALID_VALUE' is generated if either USTRIDE or VSTRIDE is less
15430 than the number of values in a control point.
15432 `GL_INVALID_VALUE' is generated if either UORDER or VORDER is less than
15433 1 or greater than the return value of `GL_MAX_EVAL_ORDER'.
15435 `GL_INVALID_OPERATION' is generated if `glMap2' is executed between the
15436 execution of `glBegin' and the corresponding execution of `glEnd'.
15438 `GL_INVALID_OPERATION' is generated if `glMap2' is called and the value
15439 of `GL_ACTIVE_TEXTURE' is not `GL_TEXTURE0'.")
15441 (define-gl-procedures
15447 (glUnmapBuffer (target GLenum) -> GLboolean))
15448 "Map a buffer object's data store.
15451 Specifies the target buffer object being mapped. The symbolic
15452 constant must be `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
15453 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
15456 Specifies the access policy, indicating whether it will be possible
15457 to read from, write to, or both read from and write to the buffer
15458 object's mapped data store. The symbolic constant must be
15459 `GL_READ_ONLY', `GL_WRITE_ONLY', or `GL_READ_WRITE'.
15461 `glMapBuffer' maps to the client's address space the entire data store
15462 of the buffer object currently bound to TARGET. The data can then be
15463 directly read and/or written relative to the returned pointer, depending
15464 on the specified ACCESS policy. If the GL is unable to map the buffer
15465 object's data store, `glMapBuffer' generates an error and returns
15466 `NULL'. This may occur for system-specific reasons, such as low virtual
15467 memory availability.
15469 If a mapped data store is accessed in a way inconsistent with the
15470 specified ACCESS policy, no error is generated, but performance may be
15471 negatively impacted and system errors, including program termination,
15472 may result. Unlike the USAGE parameter of `glBufferData', ACCESS is not
15473 a hint, and does in fact constrain the usage of the mapped data store on
15474 some GL implementations. In order to achieve the highest performance
15475 available, a buffer object's data store should be used in ways
15476 consistent with both its specified USAGE and ACCESS parameters.
15478 A mapped data store must be unmapped with `glUnmapBuffer' before its
15479 buffer object is used. Otherwise an error will be generated by any GL
15480 command that attempts to dereference the buffer object's data store.
15481 When a data store is unmapped, the pointer to its data store becomes
15482 invalid. `glUnmapBuffer' returns `GL_TRUE' unless the data store
15483 contents have become corrupt during the time the data store was mapped.
15484 This can occur for system-specific reasons that affect the availability
15485 of graphics memory, such as screen mode changes. In such situations,
15486 `GL_FALSE' is returned and the data store contents are undefined. An
15487 application must detect this rare condition and reinitialize the data
15490 A buffer object's mapped data store is automatically unmapped when the
15491 buffer object is deleted or its data store is recreated with
15494 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
15495 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
15496 `GL_PIXEL_UNPACK_BUFFER'.
15498 `GL_INVALID_ENUM' is generated if ACCESS is not `GL_READ_ONLY',
15499 `GL_WRITE_ONLY', or `GL_READ_WRITE'.
15501 `GL_OUT_OF_MEMORY' is generated when `glMapBuffer' is executed if the GL
15502 is unable to map the buffer object's data store. This may occur for a
15503 variety of system-specific reasons, such as the absence of sufficient
15504 remaining virtual memory.
15506 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
15507 is bound to TARGET.
15509 `GL_INVALID_OPERATION' is generated if `glMapBuffer' is executed for a
15510 buffer object whose data store is already mapped.
15512 `GL_INVALID_OPERATION' is generated if `glUnmapBuffer' is executed for a
15513 buffer object whose data store is not currently mapped.
15515 `GL_INVALID_OPERATION' is generated if `glMapBuffer' or `glUnmapBuffer'
15516 is executed between the execution of `glBegin' and the corresponding
15517 execution of `glEnd'.")
15519 (define-gl-procedures
15550 "Define a one- or two-dimensional mesh.
15553 Specifies the number of partitions in the grid range interval [U1,
15554 U2]. Must be positive.
15559 Specify the mappings for integer grid domain values I=0 and I=UN .
15562 Specifies the number of partitions in the grid range interval [V1,
15563 V2] (`glMapGrid2' only).
15568 Specify the mappings for integer grid domain values J=0 and J=VN
15569 (`glMapGrid2' only).
15571 `glMapGrid' and `glEvalMesh' are used together to efficiently generate
15572 and evaluate a series of evenly-spaced map domain values. `glEvalMesh'
15573 steps through the integer domain of a one- or two-dimensional grid,
15574 whose range is the domain of the evaluation maps specified by `glMap1'
15577 `glMapGrid1' and `glMapGrid2' specify the linear grid mappings between
15578 the I (or I and J ) integer grid coordinates, to the U (or U and V )
15579 floating-point evaluation map coordinates. See `glMap1' and `glMap2' for
15580 details of how U and V coordinates are evaluated.
15582 `glMapGrid1' specifies a single linear mapping such that integer grid
15583 coordinate 0 maps exactly to U1, and integer grid coordinate UN maps
15584 exactly to U2. All other integer grid coordinates I are mapped so that
15586 U=I\u2061(U2-U1,)/UN+U1
15588 `glMapGrid2' specifies two such linear mappings. One maps integer grid
15589 coordinate I=0 exactly to U1, and integer grid coordinate I=UN exactly
15590 to U2. The other maps integer grid coordinate J=0 exactly to V1, and
15591 integer grid coordinate J=VN exactly to V2. Other integer grid
15592 coordinates I and J are mapped such that
15594 U=I\u2061(U2-U1,)/UN+U1
15596 V=J\u2061(V2-V1,)/VN+V1
15598 The mappings specified by `glMapGrid' are used identically by
15599 `glEvalMesh' and `glEvalPoint'.
15601 `GL_INVALID_VALUE' is generated if either UN or VN is not positive.
15603 `GL_INVALID_OPERATION' is generated if `glMapGrid' is executed between
15604 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15606 (define-gl-procedures
15622 (params const-GLfloat-*)
15628 (params const-GLint-*)
15631 "Specify material parameters for the lighting model.
15634 Specifies which face or faces are being updated. Must be one of
15635 `GL_FRONT', `GL_BACK', or `GL_FRONT_AND_BACK'.
15638 Specifies the single-valued material parameter of the face or faces
15639 that is being updated. Must be `GL_SHININESS'.
15642 Specifies the value that parameter `GL_SHININESS' will be set to.
15644 `glMaterial' assigns values to material parameters. There are two
15645 matched sets of material parameters. One, the FRONT-FACING set, is used
15646 to shade points, lines, bitmaps, and all polygons (when two-sided
15647 lighting is disabled), or just front-facing polygons (when two-sided
15648 lighting is enabled). The other set, BACK-FACING, is used to shade
15649 back-facing polygons only when two-sided lighting is enabled. Refer to
15650 the `glLightModel' reference page for details concerning one- and
15651 two-sided lighting calculations.
15653 `glMaterial' takes three arguments. The first, FACE, specifies whether
15654 the `GL_FRONT' materials, the `GL_BACK' materials, or both
15655 `GL_FRONT_AND_BACK' materials will be modified. The second, PNAME,
15656 specifies which of several parameters in one or both sets will be
15657 modified. The third, PARAMS, specifies what value or values will be
15658 assigned to the specified parameter.
15660 Material parameters are used in the lighting equation that is optionally
15661 applied to each vertex. The equation is discussed in the `glLightModel'
15662 reference page. The parameters that can be specified using `glMaterial',
15663 and their interpretations by the lighting equation, are as follows:
15666 PARAMS contains four integer or floating-point values that specify
15667 the ambient RGBA reflectance of the material. Integer values are
15668 mapped linearly such that the most positive representable value
15669 maps to 1.0, and the most negative representable value maps to -1.0
15670 . Floating-point values are mapped directly. Neither integer nor
15671 floating-point values are clamped. The initial ambient reflectance
15672 for both front- and back-facing materials is (0.2, 0.2, 0.2, 1.0).
15675 PARAMS contains four integer or floating-point values that specify
15676 the diffuse RGBA reflectance of the material. Integer values are
15677 mapped linearly such that the most positive representable value
15678 maps to 1.0, and the most negative representable value maps to -1.0
15679 . Floating-point values are mapped directly. Neither integer nor
15680 floating-point values are clamped. The initial diffuse reflectance
15681 for both front- and back-facing materials is (0.8, 0.8, 0.8, 1.0).
15684 PARAMS contains four integer or floating-point values that specify
15685 the specular RGBA reflectance of the material. Integer values are
15686 mapped linearly such that the most positive representable value
15687 maps to 1.0, and the most negative representable value maps to -1.0
15688 . Floating-point values are mapped directly. Neither integer nor
15689 floating-point values are clamped. The initial specular reflectance
15690 for both front- and back-facing materials is (0, 0, 0, 1).
15693 PARAMS contains four integer or floating-point values that specify
15694 the RGBA emitted light intensity of the material. Integer values
15695 are mapped linearly such that the most positive representable value
15696 maps to 1.0, and the most negative representable value maps to -1.0
15697 . Floating-point values are mapped directly. Neither integer nor
15698 floating-point values are clamped. The initial emission intensity
15699 for both front- and back-facing materials is (0, 0, 0, 1).
15702 PARAMS is a single integer or floating-point value that specifies
15703 the RGBA specular exponent of the material. Integer and
15704 floating-point values are mapped directly. Only values in the range
15705 [0,128] are accepted. The initial specular exponent for both front-
15706 and back-facing materials is 0.
15708 `GL_AMBIENT_AND_DIFFUSE'
15709 Equivalent to calling `glMaterial' twice with the same parameter
15710 values, once with `GL_AMBIENT' and once with `GL_DIFFUSE'.
15713 PARAMS contains three integer or floating-point values specifying
15714 the color indices for ambient, diffuse, and specular lighting.
15715 These three values, and `GL_SHININESS', are the only material
15716 values used by the color index mode lighting equation. Refer to the
15717 `glLightModel' reference page for a discussion of color index
15720 `GL_INVALID_ENUM' is generated if either FACE or PNAME is not an
15723 `GL_INVALID_VALUE' is generated if a specular exponent outside the range
15724 [0,128] is specified.")
15726 (define-gl-procedures
15727 ((glMatrixMode (mode GLenum) -> void))
15728 "Specify which matrix is the current matrix.
15731 Specifies which matrix stack is the target for subsequent matrix
15732 operations. Three values are accepted: `GL_MODELVIEW',
15733 `GL_PROJECTION', and `GL_TEXTURE'. The initial value is
15734 `GL_MODELVIEW'. Additionally, if the `ARB_imaging' extension is
15735 supported, `GL_COLOR' is also accepted.
15737 `glMatrixMode' sets the current matrix mode. MODE can assume one of four
15741 Applies subsequent matrix operations to the modelview matrix stack.
15744 Applies subsequent matrix operations to the projection matrix
15748 Applies subsequent matrix operations to the texture matrix stack.
15751 Applies subsequent matrix operations to the color matrix stack.
15753 To find out which matrix stack is currently the target of all matrix
15754 operations, call `glGet' with argument `GL_MATRIX_MODE'. The initial
15755 value is `GL_MODELVIEW'.
15757 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15759 `GL_INVALID_OPERATION' is generated if `glMatrixMode' is executed
15760 between the execution of `glBegin' and the corresponding execution of
15763 (define-gl-procedures
15766 (internalformat GLenum)
15770 "Define minmax table.
15773 The minmax table whose parameters are to be set. Must be
15777 The format of entries in the minmax table. Must be one of
15778 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
15779 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
15780 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
15781 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
15782 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
15783 `GL_LUMINANCE16_ALPHA16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4',
15784 `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16',
15785 `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8',
15786 `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
15789 If `GL_TRUE', pixels will be consumed by the minmax process and no
15790 drawing or texture loading will take place. If `GL_FALSE', pixels
15791 will proceed to the final conversion process after minmax.
15793 When `GL_MINMAX' is enabled, the RGBA components of incoming pixels are
15794 compared to the minimum and maximum values for each component, which are
15795 stored in the two-element minmax table. (The first element stores the
15796 minima, and the second element stores the maxima.) If a pixel component
15797 is greater than the corresponding component in the maximum element, then
15798 the maximum element is updated with the pixel component value. If a
15799 pixel component is less than the corresponding component in the minimum
15800 element, then the minimum element is updated with the pixel component
15801 value. (In both cases, if the internal format of the minmax table
15802 includes luminance, then the R color component of incoming pixels is
15803 used for comparison.) The contents of the minmax table may be retrieved
15804 at a later time by calling `glGetMinmax'. The minmax operation is
15805 enabled or disabled by calling `glEnable' or `glDisable', respectively,
15806 with an argument of `GL_MINMAX'.
15808 `glMinmax' redefines the current minmax table to have entries of the
15809 format specified by INTERNALFORMAT. The maximum element is initialized
15810 with the smallest possible component values, and the minimum element is
15811 initialized with the largest possible component values. The values in
15812 the previous minmax table, if any, are lost. If SINK is `GL_TRUE', then
15813 pixels are discarded after minmax; no further processing of the pixels
15814 takes place, and no drawing, texture loading, or pixel readback will
15819 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
15822 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
15825 `GL_INVALID_OPERATION' is generated if `glMinmax' is executed between
15826 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15828 (define-gl-procedures
15829 ((glMultiDrawArrays
15833 (primcount GLsizei)
15836 "Render multiple sets of primitives from array data.
15839 Specifies what kind of primitives to render. Symbolic constants
15840 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
15841 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
15842 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
15845 Points to an array of starting indices in the enabled arrays.
15848 Points to an array of the number of indices to be rendered.
15851 Specifies the size of the first and count
15853 `glMultiDrawArrays' specifies multiple sets of geometric primitives with
15854 very few subroutine calls. Instead of calling a GL procedure to pass
15855 each individual vertex, normal, texture coordinate, edge flag, or color,
15856 you can prespecify separate arrays of vertices, normals, and colors and
15857 use them to construct a sequence of primitives with a single call to
15858 `glMultiDrawArrays'.
15860 `glMultiDrawArrays' behaves identically to `glDrawArrays' except that
15861 PRIMCOUNT separate ranges of elements are specified instead.
15863 When `glMultiDrawArrays' is called, it uses COUNT sequential elements
15864 from each enabled array to construct a sequence of geometric primitives,
15865 beginning with element FIRST. MODE specifies what kind of primitives are
15866 constructed, and how the array elements construct those primitives. If
15867 `GL_VERTEX_ARRAY' is not enabled, no geometric primitives are generated.
15869 Vertex attributes that are modified by `glMultiDrawArrays' have an
15870 unspecified value after `glMultiDrawArrays' returns. For example, if
15871 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
15872 after `glMultiDrawArrays' executes. Attributes that aren't modified
15873 remain well defined.
15875 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15877 `GL_INVALID_VALUE' is generated if PRIMCOUNT is negative.
15879 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
15880 bound to an enabled array and the buffer object's data store is
15883 `GL_INVALID_OPERATION' is generated if `glMultiDrawArrays' is executed
15884 between the execution of `glBegin' and the corresponding `glEnd'.")
15886 (define-gl-procedures
15887 ((glMultiDrawElements
15889 (count const-GLsizei-*)
15891 (indices const-GLvoid-**)
15892 (primcount GLsizei)
15895 "Render multiple sets of primitives by specifying indices of array data
15899 Specifies what kind of primitives to render. Symbolic constants
15900 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
15901 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
15902 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
15905 Points to an array of the elements counts.
15908 Specifies the type of the values in INDICES. Must be one of
15909 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
15912 Specifies a pointer to the location where the indices are stored.
15915 Specifies the size of the COUNT array.
15917 `glMultiDrawElements' specifies multiple sets of geometric primitives
15918 with very few subroutine calls. Instead of calling a GL function to pass
15919 each individual vertex, normal, texture coordinate, edge flag, or color,
15920 you can prespecify separate arrays of vertices, normals, and so on, and
15921 use them to construct a sequence of primitives with a single call to
15922 `glMultiDrawElements'.
15924 `glMultiDrawElements' is identical in operation to `glDrawElements'
15925 except that PRIMCOUNT separate lists of elements are specified.
15927 Vertex attributes that are modified by `glMultiDrawElements' have an
15928 unspecified value after `glMultiDrawElements' returns. For example, if
15929 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
15930 after `glMultiDrawElements' executes. Attributes that aren't modified
15931 maintain their previous values.
15933 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15935 `GL_INVALID_VALUE' is generated if PRIMCOUNT is negative.
15937 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
15938 bound to an enabled array or the element array and the buffer object's
15939 data store is currently mapped.
15941 `GL_INVALID_OPERATION' is generated if `glMultiDrawElements' is executed
15942 between the execution of `glBegin' and the corresponding `glEnd'.")
15944 (define-gl-procedures
15945 ((glMultiTexCoord1s
16049 (glMultiTexCoord1sv
16051 (v const-GLshort-*)
16054 (glMultiTexCoord1iv
16059 (glMultiTexCoord1fv
16061 (v const-GLfloat-*)
16064 (glMultiTexCoord1dv
16066 (v const-GLdouble-*)
16069 (glMultiTexCoord2sv
16071 (v const-GLshort-*)
16074 (glMultiTexCoord2iv
16079 (glMultiTexCoord2fv
16081 (v const-GLfloat-*)
16084 (glMultiTexCoord2dv
16086 (v const-GLdouble-*)
16089 (glMultiTexCoord3sv
16091 (v const-GLshort-*)
16094 (glMultiTexCoord3iv
16099 (glMultiTexCoord3fv
16101 (v const-GLfloat-*)
16104 (glMultiTexCoord3dv
16106 (v const-GLdouble-*)
16109 (glMultiTexCoord4sv
16111 (v const-GLshort-*)
16114 (glMultiTexCoord4iv
16119 (glMultiTexCoord4fv
16121 (v const-GLfloat-*)
16124 (glMultiTexCoord4dv
16126 (v const-GLdouble-*)
16129 "Set the current texture coordinates.
16132 Specifies the texture unit whose coordinates should be modified.
16133 The number of texture units is implementation dependent, but must
16134 be at least two. Symbolic constant must be one of `GL_TEXTURE' I ,
16135 where i ranges from 0 to `GL_MAX_TEXTURE_COORDS' - 1, which is an
16136 implementation-dependent value.
16145 Specify S, T, R, and Q texture coordinates for TARGET texture unit.
16146 Not all parameters are present in all forms of the command.
16148 `glMultiTexCoord' specifies texture coordinates in one, two, three, or
16149 four dimensions. `glMultiTexCoord1' sets the current texture coordinates
16150 to (S,001) ; a call to `glMultiTexCoord2' sets them to (S,T01) .
16151 Similarly, `glMultiTexCoord3' specifies the texture coordinates as
16152 (S,TR1) , and `glMultiTexCoord4' defines all four components explicitly
16155 The current texture coordinates are part of the data that is associated
16156 with each vertex and with the current raster position. Initially, the
16157 values for (S,TRQ) are (0,001) .")
16159 (define-gl-procedures
16160 ((glMultMatrixd (m const-GLdouble-*) -> void)
16161 (glMultMatrixf (m const-GLfloat-*) -> void))
16162 "Multiply the current matrix with the specified matrix.
16165 Points to 16 consecutive values that are used as the elements of a
16166 4×4 column-major matrix.
16168 `glMultMatrix' multiplies the current matrix with the one specified
16169 using M, and replaces the current matrix with the product.
16171 The current matrix is determined by the current matrix mode (see
16172 `glMatrixMode'). It is either the projection matrix, modelview matrix,
16173 or the texture matrix.
16175 `GL_INVALID_OPERATION' is generated if `glMultMatrix' is executed
16176 between the execution of `glBegin' and the corresponding execution of
16179 (define-gl-procedures
16180 ((glMultTransposeMatrixd
16181 (m const-GLdouble-*)
16184 (glMultTransposeMatrixf
16185 (m const-GLfloat-*)
16188 "Multiply the current matrix with the specified row-major ordered matrix.
16191 Points to 16 consecutive values that are used as the elements of a
16192 4×4 row-major matrix.
16194 `glMultTransposeMatrix' multiplies the current matrix with the one
16195 specified using M, and replaces the current matrix with the product.
16197 The current matrix is determined by the current matrix mode (see
16198 `glMatrixMode'). It is either the projection matrix, modelview matrix,
16199 or the texture matrix.
16201 `GL_INVALID_OPERATION' is generated if `glMultTransposeMatrix' is
16202 executed between the execution of `glBegin' and the corresponding
16203 execution of `glEnd'.")
16205 (define-gl-procedures
16206 ((glNewList (list GLuint) (mode GLenum) -> void)
16207 (glEndList -> void))
16208 "Create or replace a display list.
16211 Specifies the display-list name.
16214 Specifies the compilation mode, which can be `GL_COMPILE' or
16215 `GL_COMPILE_AND_EXECUTE'.
16217 Display lists are groups of GL commands that have been stored for
16218 subsequent execution. Display lists are created with `glNewList'. All
16219 subsequent commands are placed in the display list, in the order issued,
16220 until `glEndList' is called.
16222 `glNewList' has two arguments. The first argument, LIST, is a positive
16223 integer that becomes the unique name for the display list. Names can be
16224 created and reserved with `glGenLists' and tested for uniqueness with
16225 `glIsList'. The second argument, MODE, is a symbolic constant that can
16226 assume one of two values:
16229 Commands are merely compiled.
16231 `GL_COMPILE_AND_EXECUTE'
16232 Commands are executed as they are compiled into the display list.
16234 Certain commands are not compiled into the display list but are executed
16235 immediately, regardless of the display-list mode. These commands are
16236 `glAreTexturesResident', `glColorPointer', `glDeleteLists',
16237 `glDeleteTextures', `glDisableClientState', `glEdgeFlagPointer',
16238 `glEnableClientState', `glFeedbackBuffer', `glFinish', `glFlush',
16239 `glGenLists', `glGenTextures', `glIndexPointer', `glInterleavedArrays',
16240 `glIsEnabled', `glIsList', `glIsTexture', `glNormalPointer',
16241 `glPopClientAttrib', `glPixelStore', `glPushClientAttrib',
16242 `glReadPixels', `glRenderMode', `glSelectBuffer', `glTexCoordPointer',
16243 `glVertexPointer', and all of the `glGet' commands.
16245 Similarly, `glTexImage1D', `glTexImage2D', and `glTexImage3D' are
16246 executed immediately and not compiled into the display list when their
16247 first argument is `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_1D', or
16248 `GL_PROXY_TEXTURE_3D', respectively.
16250 When the `ARB_imaging' extension is supported, `glHistogram' executes
16251 immediately when its argument is `GL_PROXY_HISTOGRAM'. Similarly,
16252 `glColorTable' executes immediately when its first argument is
16253 `GL_PROXY_COLOR_TABLE', `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
16254 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
16256 For OpenGL versions 1.3 and greater, or when the `ARB_multitexture'
16257 extension is supported, `glClientActiveTexture' is not compiled into
16258 display lists, but executed immediately.
16260 When `glEndList' is encountered, the display-list definition is
16261 completed by associating the list with the unique name LIST (specified
16262 in the `glNewList' command). If a display list with name LIST already
16263 exists, it is replaced only when `glEndList' is called.
16265 `GL_INVALID_VALUE' is generated if LIST is 0.
16267 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
16269 `GL_INVALID_OPERATION' is generated if `glEndList' is called without a
16270 preceding `glNewList', or if `glNewList' is called while a display list
16273 `GL_INVALID_OPERATION' is generated if `glNewList' or `glEndList' is
16274 executed between the execution of `glBegin' and the corresponding
16275 execution of `glEnd'.
16277 `GL_OUT_OF_MEMORY' is generated if there is insufficient memory to
16278 compile the display list. If the GL version is 1.1 or greater, no change
16279 is made to the previous contents of the display list, if any, and no
16280 other change is made to the GL state. (It is as if no attempt had been
16281 made to create the new display list.)")
16283 (define-gl-procedures
16287 (pointer const-GLvoid-*)
16290 "Define an array of normals.
16293 Specifies the data type of each coordinate in the array. Symbolic
16294 constants `GL_BYTE', `GL_SHORT', `GL_INT', `GL_FLOAT', and
16295 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
16298 Specifies the byte offset between consecutive normals. If STRIDE is
16299 0, the normals are understood to be tightly packed in the array.
16300 The initial value is 0.
16303 Specifies a pointer to the first coordinate of the first normal in
16304 the array. The initial value is 0.
16306 `glNormalPointer' specifies the location and data format of an array of
16307 normals to use when rendering. TYPE specifies the data type of each
16308 normal coordinate, and STRIDE specifies the byte stride from one normal
16309 to the next, allowing vertices and attributes to be packed into a single
16310 array or stored in separate arrays. (Single-array storage may be more
16311 efficient on some implementations; see `glInterleavedArrays'.)
16313 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
16314 target (see `glBindBuffer') while a normal array is specified, POINTER
16315 is treated as a byte offset into the buffer object's data store. Also,
16316 the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as normal
16317 vertex array client-side state (`GL_NORMAL_ARRAY_BUFFER_BINDING').
16319 When a normal array is specified, TYPE, STRIDE, and POINTER are saved as
16320 client-side state, in addition to the current vertex array buffer object
16323 To enable and disable the normal array, call `glEnableClientState' and
16324 `glDisableClientState' with the argument `GL_NORMAL_ARRAY'. If enabled,
16325 the normal array is used when `glDrawArrays', `glMultiDrawArrays',
16326 `glDrawElements', `glMultiDrawElements', `glDrawRangeElements', or
16327 `glArrayElement' is called.
16329 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
16331 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
16333 (define-gl-procedures
16364 (glNormal3bv (v const-GLbyte-*) -> void)
16365 (glNormal3dv (v const-GLdouble-*) -> void)
16366 (glNormal3fv (v const-GLfloat-*) -> void)
16367 (glNormal3iv (v const-GLint-*) -> void)
16368 (glNormal3sv (v const-GLshort-*) -> void))
16369 "Set the current normal vector.
16376 Specify the X , Y , and Z coordinates of the new current normal.
16377 The initial value of the current normal is the unit vector, (0, 0,
16382 The current normal is set to the given coordinates whenever `glNormal'
16383 is issued. Byte, short, or integer arguments are converted to
16384 floating-point format with a linear mapping that maps the most positive
16385 representable integer value to 1.0 and the most negative representable
16386 integer value to -1.0 .
16388 Normals specified with `glNormal' need not have unit length. If
16389 `GL_NORMALIZE' is enabled, then normals of any length specified with
16390 `glNormal' are normalized after transformation. If `GL_RESCALE_NORMAL'
16391 is enabled, normals are scaled by a scaling factor derived from the
16392 modelview matrix. `GL_RESCALE_NORMAL' requires that the originally
16393 specified normals were of unit length, and that the modelview matrix
16394 contain only uniform scales for proper results. To enable and disable
16395 normalization, call `glEnable' and `glDisable' with either
16396 `GL_NORMALIZE' or `GL_RESCALE_NORMAL'. Normalization is initially
16399 (define-gl-procedures
16409 "Multiply the current matrix with an orthographic matrix.
16414 Specify the coordinates for the left and right vertical clipping
16420 Specify the coordinates for the bottom and top horizontal clipping
16426 Specify the distances to the nearer and farther depth clipping
16427 planes. These values are negative if the plane is to be behind the
16430 `glOrtho' describes a transformation that produces a parallel
16431 projection. The current matrix (see `glMatrixMode') is multiplied by
16432 this matrix and the result replaces the current matrix, as if
16433 `glMultMatrix' were called with the following matrix as its argument:
16435 ((2/RIGHT-LEFT,, 0 0 T_X,), (0 2/TOP-BOTTOM,, 0 T_Y,), (0 0
16436 -2/FARVAL-NEARVAL,, T_Z,), (0 0 0 1),)
16438 where T_X=-RIGHT+LEFT,/RIGHT-LEFT,, T_Y=-TOP+BOTTOM,/TOP-BOTTOM,,
16439 T_Z=-FARVAL+NEARVAL,/FARVAL-NEARVAL,,
16441 Typically, the matrix mode is `GL_PROJECTION', and (LEFT,BOTTOM-NEARVAL)
16442 and (RIGHT,TOP-NEARVAL) specify the points on the near clipping plane
16443 that are mapped to the lower left and upper right corners of the window,
16444 respectively, assuming that the eye is located at (0, 0, 0). -FARVAL
16445 specifies the location of the far clipping plane. Both NEARVAL and
16446 FARVAL can be either positive or negative.
16448 Use `glPushMatrix' and `glPopMatrix' to save and restore the current
16451 `GL_INVALID_VALUE' is generated if LEFT = RIGHT, or BOTTOM = TOP, or
16454 `GL_INVALID_OPERATION' is generated if `glOrtho' is executed between the
16455 execution of `glBegin' and the corresponding execution of `glEnd'.")
16457 (define-gl-procedures
16458 ((glPassThrough (token GLfloat) -> void))
16459 "Place a marker in the feedback buffer.
16462 Specifies a marker value to be placed in the feedback buffer
16463 following a `GL_PASS_THROUGH_TOKEN'.
16467 Feedback is a GL render mode. The mode is selected by calling
16468 `glRenderMode' with `GL_FEEDBACK'. When the GL is in feedback mode, no
16469 pixels are produced by rasterization. Instead, information about
16470 primitives that would have been rasterized is fed back to the
16471 application using the GL. See the `glFeedbackBuffer' reference page for
16472 a description of the feedback buffer and the values in it.
16474 `glPassThrough' inserts a user-defined marker in the feedback buffer
16475 when it is executed in feedback mode. TOKEN is returned as if it were a
16476 primitive; it is indicated with its own unique identifying value:
16477 `GL_PASS_THROUGH_TOKEN'. The order of `glPassThrough' commands with
16478 respect to the specification of graphics primitives is maintained.
16480 `GL_INVALID_OPERATION' is generated if `glPassThrough' is executed
16481 between the execution of `glBegin' and the corresponding execution of
16484 (define-gl-procedures
16488 (values const-GLfloat-*)
16494 (values const-GLuint-*)
16500 (values const-GLushort-*)
16503 "Set up pixel transfer maps.
16506 Specifies a symbolic map name. Must be one of the following:
16507 `GL_PIXEL_MAP_I_TO_I', `GL_PIXEL_MAP_S_TO_S',
16508 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
16509 `GL_PIXEL_MAP_I_TO_B', `GL_PIXEL_MAP_I_TO_A',
16510 `GL_PIXEL_MAP_R_TO_R', `GL_PIXEL_MAP_G_TO_G',
16511 `GL_PIXEL_MAP_B_TO_B', or `GL_PIXEL_MAP_A_TO_A'.
16514 Specifies the size of the map being defined.
16517 Specifies an array of MAPSIZE values.
16519 `glPixelMap' sets up translation tables, or MAPS, used by
16520 `glCopyPixels', `glCopyTexImage1D', `glCopyTexImage2D',
16521 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D',
16522 `glDrawPixels', `glReadPixels', `glTexImage1D', `glTexImage2D',
16523 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D', and
16524 `glTexSubImage3D'. Additionally, if the `ARB_imaging' subset is
16525 supported, the routines `glColorTable', `glColorSubTable',
16526 `glConvolutionFilter1D', `glConvolutionFilter2D', `glHistogram',
16527 `glMinmax', and `glSeparableFilter2D'. Use of these maps is described
16528 completely in the `glPixelTransfer' reference page, and partly in the
16529 reference pages for the pixel and texture image commands. Only the
16530 specification of the maps is described in this reference page.
16532 MAP is a symbolic map name, indicating one of ten maps to set. MAPSIZE
16533 specifies the number of entries in the map, and VALUES is a pointer to
16534 an array of MAPSIZE map values.
16536 If a non-zero named buffer object is bound to the
16537 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a pixel
16538 transfer map is specified, VALUES is treated as a byte offset into the
16539 buffer object's data store.
16541 The ten maps are as follows:
16543 `GL_PIXEL_MAP_I_TO_I'
16544 Maps color indices to color indices.
16546 `GL_PIXEL_MAP_S_TO_S'
16547 Maps stencil indices to stencil indices.
16549 `GL_PIXEL_MAP_I_TO_R'
16550 Maps color indices to red components.
16552 `GL_PIXEL_MAP_I_TO_G'
16553 Maps color indices to green components.
16555 `GL_PIXEL_MAP_I_TO_B'
16556 Maps color indices to blue components.
16558 `GL_PIXEL_MAP_I_TO_A'
16559 Maps color indices to alpha components.
16561 `GL_PIXEL_MAP_R_TO_R'
16562 Maps red components to red components.
16564 `GL_PIXEL_MAP_G_TO_G'
16565 Maps green components to green components.
16567 `GL_PIXEL_MAP_B_TO_B'
16568 Maps blue components to blue components.
16570 `GL_PIXEL_MAP_A_TO_A'
16571 Maps alpha components to alpha components.
16573 The entries in a map can be specified as single-precision floating-point
16574 numbers, unsigned short integers, or unsigned int integers. Maps that
16575 store color component values (all but `GL_PIXEL_MAP_I_TO_I' and
16576 `GL_PIXEL_MAP_S_TO_S') retain their values in floating-point format,
16577 with unspecified mantissa and exponent sizes. Floating-point values
16578 specified by `glPixelMapfv' are converted directly to the internal
16579 floating-point format of these maps, then clamped to the range [0,1].
16580 Unsigned integer values specified by `glPixelMapusv' and `glPixelMapuiv'
16581 are converted linearly such that the largest representable integer maps
16582 to 1.0, and 0 maps to 0.0.
16584 Maps that store indices, `GL_PIXEL_MAP_I_TO_I' and
16585 `GL_PIXEL_MAP_S_TO_S', retain their values in fixed-point format, with
16586 an unspecified number of bits to the right of the binary point.
16587 Floating-point values specified by `glPixelMapfv' are converted directly
16588 to the internal fixed-point format of these maps. Unsigned integer
16589 values specified by `glPixelMapusv' and `glPixelMapuiv' specify integer
16590 values, with all 0's to the right of the binary point.
16592 The following table shows the initial sizes and values for each of the
16593 maps. Maps that are indexed by either color or stencil indices must have
16594 MAPSIZE = 2^N for some N or the results are undefined. The maximum
16595 allowable size for each map depends on the implementation and can be
16596 determined by calling `glGet' with argument `GL_MAX_PIXEL_MAP_TABLE'.
16597 The single maximum applies to all maps; it is at least 32.
16600 *Lookup Index*, *Lookup Value*, *Initial Size*, *Initial Value*
16602 `GL_PIXEL_MAP_I_TO_I'
16603 color index , color index , 1 , 0
16605 `GL_PIXEL_MAP_S_TO_S'
16606 stencil index , stencil index , 1 , 0
16608 `GL_PIXEL_MAP_I_TO_R'
16609 color index , R , 1 , 0
16611 `GL_PIXEL_MAP_I_TO_G'
16612 color index , G , 1 , 0
16614 `GL_PIXEL_MAP_I_TO_B'
16615 color index , B , 1 , 0
16617 `GL_PIXEL_MAP_I_TO_A'
16618 color index , A , 1 , 0
16620 `GL_PIXEL_MAP_R_TO_R'
16623 `GL_PIXEL_MAP_G_TO_G'
16626 `GL_PIXEL_MAP_B_TO_B'
16629 `GL_PIXEL_MAP_A_TO_A'
16632 `GL_INVALID_ENUM' is generated if MAP is not an accepted value.
16634 `GL_INVALID_VALUE' is generated if MAPSIZE is less than one or larger
16635 than `GL_MAX_PIXEL_MAP_TABLE'.
16637 `GL_INVALID_VALUE' is generated if MAP is `GL_PIXEL_MAP_I_TO_I',
16638 `GL_PIXEL_MAP_S_TO_S', `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
16639 `GL_PIXEL_MAP_I_TO_B', or `GL_PIXEL_MAP_I_TO_A', and MAPSIZE is not a
16642 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16643 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
16644 data store is currently mapped.
16646 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16647 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
16648 unpacked from the buffer object such that the memory reads required
16649 would exceed the data store size.
16651 `GL_INVALID_OPERATION' is generated by `glPixelMapfv' if a non-zero
16652 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16653 VALUES is not evenly divisible into the number of bytes needed to store
16654 in memory a GLfloat datum.
16656 `GL_INVALID_OPERATION' is generated by `glPixelMapuiv' if a non-zero
16657 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16658 VALUES is not evenly divisible into the number of bytes needed to store
16659 in memory a GLuint datum.
16661 `GL_INVALID_OPERATION' is generated by `glPixelMapusv' if a non-zero
16662 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16663 VALUES is not evenly divisible into the number of bytes needed to store
16664 in memory a GLushort datum.
16666 `GL_INVALID_OPERATION' is generated if `glPixelMap' is executed between
16667 the execution of `glBegin' and the corresponding execution of `glEnd'.")
16669 (define-gl-procedures
16680 "Set pixel storage modes.
16683 Specifies the symbolic name of the parameter to be set. Six values
16684 affect the packing of pixel data into memory: `GL_PACK_SWAP_BYTES',
16685 `GL_PACK_LSB_FIRST', `GL_PACK_ROW_LENGTH', `GL_PACK_IMAGE_HEIGHT',
16686 `GL_PACK_SKIP_PIXELS', `GL_PACK_SKIP_ROWS', `GL_PACK_SKIP_IMAGES',
16687 and `GL_PACK_ALIGNMENT'. Six more affect the unpacking of pixel
16688 data FROM memory: `GL_UNPACK_SWAP_BYTES', `GL_UNPACK_LSB_FIRST',
16689 `GL_UNPACK_ROW_LENGTH', `GL_UNPACK_IMAGE_HEIGHT',
16690 `GL_UNPACK_SKIP_PIXELS', `GL_UNPACK_SKIP_ROWS',
16691 `GL_UNPACK_SKIP_IMAGES', and `GL_UNPACK_ALIGNMENT'.
16694 Specifies the value that PNAME is set to.
16696 `glPixelStore' sets pixel storage modes that affect the operation of
16697 subsequent `glDrawPixels' and `glReadPixels' as well as the unpacking of
16698 polygon stipple patterns (see `glPolygonStipple'), bitmaps (see
16699 `glBitmap'), texture patterns (see `glTexImage1D', `glTexImage2D',
16700 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D',
16701 `glTexSubImage3D'). Additionally, if the `ARB_imaging' extension is
16702 supported, pixel storage modes affect convolution filters (see
16703 `glConvolutionFilter1D', `glConvolutionFilter2D', and
16704 `glSeparableFilter2D', color table (see `glColorTable', and
16705 `glColorSubTable', and unpacking histogram (See `glHistogram'), and
16706 minmax (See `glMinmax') data.
16708 PNAME is a symbolic constant indicating the parameter to be set, and
16709 PARAM is the new value. Six of the twelve storage parameters affect how
16710 pixel data is returned to client memory. They are as follows:
16712 `GL_PACK_SWAP_BYTES'
16713 If true, byte ordering for multibyte color components, depth
16714 components, color indices, or stencil indices is reversed. That is,
16715 if a four-byte component consists of bytes B_0 , B_1 , B_2 , B_3 ,
16716 it is stored in memory as B_3 , B_2 , B_1 , B_0 if
16717 `GL_PACK_SWAP_BYTES' is true. `GL_PACK_SWAP_BYTES' has no effect on
16718 the memory order of components within a pixel, only on the order of
16719 bytes within components or indices. For example, the three
16720 components of a `GL_RGB' format pixel are always stored with red
16721 first, green second, and blue third, regardless of the value of
16722 `GL_PACK_SWAP_BYTES'.
16724 `GL_PACK_LSB_FIRST'
16725 If true, bits are ordered within a byte from least significant to
16726 most significant; otherwise, the first bit in each byte is the most
16727 significant one. This parameter is significant for bitmap data
16730 `GL_PACK_ROW_LENGTH'
16731 If greater than 0, `GL_PACK_ROW_LENGTH' defines the number of
16732 pixels in a row. If the first pixel of a row is placed at location
16733 P in memory, then the location of the first pixel of the next row
16734 is obtained by skipping
16736 K={(N\u2062L), (A/S,\u2062⌈S\u2062N\u2062L,/A,⌉)\u2062(S>=A), (S<A),
16738 components or indices, where N is the number of components or
16739 indices in a pixel, L is the number of pixels in a row
16740 (`GL_PACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16741 to the pixel routine otherwise), A is the value of
16742 `GL_PACK_ALIGNMENT', and S is the size, in bytes, of a single
16743 component (if A<S , then it is as if A=S ). In the case of 1-bit
16744 values, the location of the next row is obtained by skipping
16746 K=8\u2062A\u2062⌈N\u2062L,/8\u2062A,,⌉
16748 components or indices.
16750 The word COMPONENT in this description refers to the nonindex
16751 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16752 for example, has three components per pixel: first red, then green,
16755 `GL_PACK_IMAGE_HEIGHT'
16756 If greater than 0, `GL_PACK_IMAGE_HEIGHT' defines the number of
16757 pixels in an image three-dimensional texture volume, where
16758 ``image'' is defined by all pixels sharing the same third dimension
16759 index. If the first pixel of a row is placed at location P in
16760 memory, then the location of the first pixel of the next row is
16761 obtained by skipping
16763 K={(N\u2062L\u2062H), (A/S,\u2062⌈S\u2062N\u2062L\u2062H,/A,⌉)\u2062(S>=A), (S<A),
16765 components or indices, where N is the number of components or
16766 indices in a pixel, L is the number of pixels in a row
16767 (`GL_PACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16768 to `glTexImage3D' otherwise), H is the number of rows in a pixel
16769 image (`GL_PACK_IMAGE_HEIGHT' if it is greater than 0, the HEIGHT
16770 argument to the `glTexImage3D' routine otherwise), A is the value
16771 of `GL_PACK_ALIGNMENT', and S is the size, in bytes, of a single
16772 component (if A<S , then it is as if A=S ).
16774 The word COMPONENT in this description refers to the nonindex
16775 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16776 for example, has three components per pixel: first red, then green,
16779 `GL_PACK_SKIP_PIXELS', `GL_PACK_SKIP_ROWS', and `GL_PACK_SKIP_IMAGES'
16780 These values are provided as a convenience to the programmer; they
16781 provide no functionality that cannot be duplicated simply by
16782 incrementing the pointer passed to `glReadPixels'. Setting
16783 `GL_PACK_SKIP_PIXELS' to I is equivalent to incrementing the
16784 pointer by I\u2062N components or indices, where N is the number of
16785 components or indices in each pixel. Setting `GL_PACK_SKIP_ROWS' to
16786 J is equivalent to incrementing the pointer by J\u2062M components or
16787 indices, where M is the number of components or indices per row, as
16788 just computed in the `GL_PACK_ROW_LENGTH' section. Setting
16789 `GL_PACK_SKIP_IMAGES' to K is equivalent to incrementing the
16790 pointer by K\u2062P , where P is the number of components or indices per
16791 image, as computed in the `GL_PACK_IMAGE_HEIGHT' section.
16793 `GL_PACK_ALIGNMENT'
16794 Specifies the alignment requirements for the start of each pixel
16795 row in memory. The allowable values are 1 (byte-alignment), 2 (rows
16796 aligned to even-numbered bytes), 4 (word-alignment), and 8 (rows
16797 start on double-word boundaries).
16799 The other six of the twelve storage parameters affect how pixel data is
16800 read from client memory. These values are significant for
16801 `glDrawPixels', `glTexImage1D', `glTexImage2D', `glTexImage3D',
16802 `glTexSubImage1D', `glTexSubImage2D', `glTexSubImage3D', `glBitmap', and
16803 `glPolygonStipple'.
16805 Additionally, if the `ARB_imaging' extension is supported,
16806 `glColorTable', `glColorSubTable', `glConvolutionFilter1D',
16807 `glConvolutionFilter2D', and `glSeparableFilter2D'. They are as follows:
16809 `GL_UNPACK_SWAP_BYTES'
16810 If true, byte ordering for multibyte color components, depth
16811 components, color indices, or stencil indices is reversed. That is,
16812 if a four-byte component consists of bytes B_0 , B_1 , B_2 , B_3 ,
16813 it is taken from memory as B_3 , B_2 , B_1 , B_0 if
16814 `GL_UNPACK_SWAP_BYTES' is true. `GL_UNPACK_SWAP_BYTES' has no
16815 effect on the memory order of components within a pixel, only on
16816 the order of bytes within components or indices. For example, the
16817 three components of a `GL_RGB' format pixel are always stored with
16818 red first, green second, and blue third, regardless of the value of
16819 `GL_UNPACK_SWAP_BYTES'.
16821 `GL_UNPACK_LSB_FIRST'
16822 If true, bits are ordered within a byte from least significant to
16823 most significant; otherwise, the first bit in each byte is the most
16824 significant one. This is relevant only for bitmap data.
16826 `GL_UNPACK_ROW_LENGTH'
16827 If greater than 0, `GL_UNPACK_ROW_LENGTH' defines the number of
16828 pixels in a row. If the first pixel of a row is placed at location
16829 P in memory, then the location of the first pixel of the next row
16830 is obtained by skipping
16832 K={(N\u2062L), (A/S,\u2062⌈S\u2062N\u2062L,/A,⌉)\u2062(S>=A), (S<A),
16834 components or indices, where N is the number of components or
16835 indices in a pixel, L is the number of pixels in a row
16836 (`GL_UNPACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16837 to the pixel routine otherwise), A is the value of
16838 `GL_UNPACK_ALIGNMENT', and S is the size, in bytes, of a single
16839 component (if A<S , then it is as if A=S ). In the case of 1-bit
16840 values, the location of the next row is obtained by skipping
16842 K=8\u2062A\u2062⌈N\u2062L,/8\u2062A,,⌉
16844 components or indices.
16846 The word COMPONENT in this description refers to the nonindex
16847 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16848 for example, has three components per pixel: first red, then green,
16851 `GL_UNPACK_IMAGE_HEIGHT'
16852 If greater than 0, `GL_UNPACK_IMAGE_HEIGHT' defines the number of
16853 pixels in an image of a three-dimensional texture volume. Where
16854 ``image'' is defined by all pixel sharing the same third dimension
16855 index. If the first pixel of a row is placed at location P in
16856 memory, then the location of the first pixel of the next row is
16857 obtained by skipping
16859 K={(N\u2062L\u2062H), (A/S,\u2062⌈S\u2062N\u2062L\u2062H,/A,⌉)\u2062(S>=A), (S<A),
16861 components or indices, where N is the number of components or
16862 indices in a pixel, L is the number of pixels in a row
16863 (`GL_UNPACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16864 to `glTexImage3D' otherwise), H is the number of rows in an image
16865 (`GL_UNPACK_IMAGE_HEIGHT' if it is greater than 0, the HEIGHT
16866 argument to `glTexImage3D' otherwise), A is the value of
16867 `GL_UNPACK_ALIGNMENT', and S is the size, in bytes, of a single
16868 component (if A<S , then it is as if A=S ).
16870 The word COMPONENT in this description refers to the nonindex
16871 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16872 for example, has three components per pixel: first red, then green,
16875 `GL_UNPACK_SKIP_PIXELS' and `GL_UNPACK_SKIP_ROWS'
16876 These values are provided as a convenience to the programmer; they
16877 provide no functionality that cannot be duplicated by incrementing
16878 the pointer passed to `glDrawPixels', `glTexImage1D',
16879 `glTexImage2D', `glTexSubImage1D', `glTexSubImage2D', `glBitmap',
16880 or `glPolygonStipple'. Setting `GL_UNPACK_SKIP_PIXELS' to I is
16881 equivalent to incrementing the pointer by I\u2062N components or
16882 indices, where N is the number of components or indices in each
16883 pixel. Setting `GL_UNPACK_SKIP_ROWS' to J is equivalent to
16884 incrementing the pointer by J\u2062K components or indices, where K is
16885 the number of components or indices per row, as just computed in
16886 the `GL_UNPACK_ROW_LENGTH' section.
16888 `GL_UNPACK_ALIGNMENT'
16889 Specifies the alignment requirements for the start of each pixel
16890 row in memory. The allowable values are 1 (byte-alignment), 2 (rows
16891 aligned to even-numbered bytes), 4 (word-alignment), and 8 (rows
16892 start on double-word boundaries).
16894 The following table gives the type, initial value, and range of valid
16895 values for each storage parameter that can be set with `glPixelStore'.
16900 *Type*, *Initial Value*, *Valid Range*
16902 `GL_PACK_SWAP_BYTES'
16903 boolean , false , true or false
16905 `GL_PACK_LSB_FIRST'
16906 boolean , false , true or false
16908 `GL_PACK_ROW_LENGTH'
16909 integer , 0 , [0,∞)
16911 `GL_PACK_IMAGE_HEIGHT'
16912 integer , 0 , [0,∞)
16914 `GL_PACK_SKIP_ROWS'
16915 integer , 0 , [0,∞)
16917 `GL_PACK_SKIP_PIXELS'
16918 integer , 0 , [0,∞)
16920 `GL_PACK_SKIP_IMAGES'
16921 integer , 0 , [0,∞)
16923 `GL_PACK_ALIGNMENT'
16924 integer , 4 , 1, 2, 4, or 8
16926 `GL_UNPACK_SWAP_BYTES'
16927 boolean , false , true or false
16929 `GL_UNPACK_LSB_FIRST'
16930 boolean , false , true or false
16932 `GL_UNPACK_ROW_LENGTH'
16933 integer , 0 , [0,∞)
16935 `GL_UNPACK_IMAGE_HEIGHT'
16936 integer , 0 , [0,∞)
16938 `GL_UNPACK_SKIP_ROWS'
16939 integer , 0 , [0,∞)
16941 `GL_UNPACK_SKIP_PIXELS'
16942 integer , 0 , [0,∞)
16944 `GL_UNPACK_SKIP_IMAGES'
16945 integer , 0 , [0,∞)
16947 `GL_UNPACK_ALIGNMENT'
16948 integer , 4 , 1, 2, 4, or 8
16950 `glPixelStoref' can be used to set any pixel store parameter. If the
16951 parameter type is boolean, then if PARAM is 0, the parameter is false;
16952 otherwise it is set to true. If PNAME is a integer type parameter, PARAM
16953 is rounded to the nearest integer.
16955 Likewise, `glPixelStorei' can also be used to set any of the pixel store
16956 parameters. Boolean parameters are set to false if PARAM is 0 and true
16959 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
16961 `GL_INVALID_VALUE' is generated if a negative row length, pixel skip, or
16962 row skip value is specified, or if alignment is specified as other than
16965 `GL_INVALID_OPERATION' is generated if `glPixelStore' is executed
16966 between the execution of `glBegin' and the corresponding execution of
16969 (define-gl-procedures
16980 "Set pixel transfer modes.
16983 Specifies the symbolic name of the pixel transfer parameter to be
16984 set. Must be one of the following: `GL_MAP_COLOR',
16985 `GL_MAP_STENCIL', `GL_INDEX_SHIFT', `GL_INDEX_OFFSET',
16986 `GL_RED_SCALE', `GL_RED_BIAS', `GL_GREEN_SCALE', `GL_GREEN_BIAS',
16987 `GL_BLUE_SCALE', `GL_BLUE_BIAS', `GL_ALPHA_SCALE', `GL_ALPHA_BIAS',
16988 `GL_DEPTH_SCALE', or `GL_DEPTH_BIAS'.
16990 Additionally, if the `ARB_imaging' extension is supported, the
16991 following symbolic names are accepted:
16992 `GL_POST_COLOR_MATRIX_RED_SCALE',
16993 `GL_POST_COLOR_MATRIX_GREEN_SCALE',
16994 `GL_POST_COLOR_MATRIX_BLUE_SCALE',
16995 `GL_POST_COLOR_MATRIX_ALPHA_SCALE',
16996 `GL_POST_COLOR_MATRIX_RED_BIAS', `GL_POST_COLOR_MATRIX_GREEN_BIAS',
16997 `GL_POST_COLOR_MATRIX_BLUE_BIAS',
16998 `GL_POST_COLOR_MATRIX_ALPHA_BIAS', `GL_POST_CONVOLUTION_RED_SCALE',
16999 `GL_POST_CONVOLUTION_GREEN_SCALE',
17000 `GL_POST_CONVOLUTION_BLUE_SCALE',
17001 `GL_POST_CONVOLUTION_ALPHA_SCALE', `GL_POST_CONVOLUTION_RED_BIAS',
17002 `GL_POST_CONVOLUTION_GREEN_BIAS', `GL_POST_CONVOLUTION_BLUE_BIAS',
17003 and `GL_POST_CONVOLUTION_ALPHA_BIAS'.
17006 Specifies the value that PNAME is set to.
17008 `glPixelTransfer' sets pixel transfer modes that affect the operation of
17009 subsequent `glCopyPixels', `glCopyTexImage1D', `glCopyTexImage2D',
17010 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D',
17011 `glDrawPixels', `glReadPixels', `glTexImage1D', `glTexImage2D',
17012 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D', and
17013 `glTexSubImage3D' commands. Additionally, if the `ARB_imaging' subset is
17014 supported, the routines `glColorTable', `glColorSubTable',
17015 `glConvolutionFilter1D', `glConvolutionFilter2D', `glHistogram',
17016 `glMinmax', and `glSeparableFilter2D' are also affected. The algorithms
17017 that are specified by pixel transfer modes operate on pixels after they
17018 are read from the frame buffer (`glCopyPixels'`glCopyTexImage1D',
17019 `glCopyTexImage2D', `glCopyTexSubImage1D', `glCopyTexSubImage2D',
17020 `glCopyTexSubImage3D', and `glReadPixels'), or unpacked from client
17021 memory (`glDrawPixels', `glTexImage1D', `glTexImage2D', `glTexImage3D',
17022 `glTexSubImage1D', `glTexSubImage2D', and `glTexSubImage3D'). Pixel
17023 transfer operations happen in the same order, and in the same manner,
17024 regardless of the command that resulted in the pixel operation. Pixel
17025 storage modes (see `glPixelStore') control the unpacking of pixels being
17026 read from client memory and the packing of pixels being written back
17027 into client memory.
17029 Pixel transfer operations handle four fundamental pixel types: COLOR,
17030 COLOR INDEX, DEPTH, and STENCIL. COLOR pixels consist of four
17031 floating-point values with unspecified mantissa and exponent sizes,
17032 scaled such that 0 represents zero intensity and 1 represents full
17033 intensity. COLOR INDICES comprise a single fixed-point value, with
17034 unspecified precision to the right of the binary point. DEPTH pixels
17035 comprise a single floating-point value, with unspecified mantissa and
17036 exponent sizes, scaled such that 0.0 represents the minimum depth buffer
17037 value, and 1.0 represents the maximum depth buffer value. Finally,
17038 STENCIL pixels comprise a single fixed-point value, with unspecified
17039 precision to the right of the binary point.
17041 The pixel transfer operations performed on the four basic pixel types
17045 Each of the four color components is multiplied by a scale factor,
17046 then added to a bias factor. That is, the red component is
17047 multiplied by `GL_RED_SCALE', then added to `GL_RED_BIAS'; the
17048 green component is multiplied by `GL_GREEN_SCALE', then added to
17049 `GL_GREEN_BIAS'; the blue component is multiplied by
17050 `GL_BLUE_SCALE', then added to `GL_BLUE_BIAS'; and the alpha
17051 component is multiplied by `GL_ALPHA_SCALE', then added to
17052 `GL_ALPHA_BIAS'. After all four color components are scaled and
17053 biased, each is clamped to the range [0,1] . All color, scale, and
17054 bias values are specified with `glPixelTransfer'.
17056 If `GL_MAP_COLOR' is true, each color component is scaled by the
17057 size of the corresponding color-to-color map, then replaced by the
17058 contents of that map indexed by the scaled component. That is, the
17059 red component is scaled by `GL_PIXEL_MAP_R_TO_R_SIZE', then
17060 replaced by the contents of `GL_PIXEL_MAP_R_TO_R' indexed by
17061 itself. The green component is scaled by
17062 `GL_PIXEL_MAP_G_TO_G_SIZE', then replaced by the contents of
17063 `GL_PIXEL_MAP_G_TO_G' indexed by itself. The blue component is
17064 scaled by `GL_PIXEL_MAP_B_TO_B_SIZE', then replaced by the contents
17065 of `GL_PIXEL_MAP_B_TO_B' indexed by itself. And the alpha component
17066 is scaled by `GL_PIXEL_MAP_A_TO_A_SIZE', then replaced by the
17067 contents of `GL_PIXEL_MAP_A_TO_A' indexed by itself. All components
17068 taken from the maps are then clamped to the range [0,1] .
17069 `GL_MAP_COLOR' is specified with `glPixelTransfer'. The contents of
17070 the various maps are specified with `glPixelMap'.
17072 If the `ARB_imaging' extension is supported, each of the four color
17073 components may be scaled and biased after transformation by the
17074 color matrix. That is, the red component is multiplied by
17075 `GL_POST_COLOR_MATRIX_RED_SCALE', then added to
17076 `GL_POST_COLOR_MATRIX_RED_BIAS'; the green component is multiplied
17077 by `GL_POST_COLOR_MATRIX_GREEN_SCALE', then added to
17078 `GL_POST_COLOR_MATRIX_GREEN_BIAS'; the blue component is multiplied
17079 by `GL_POST_COLOR_MATRIX_BLUE_SCALE', then added to
17080 `GL_POST_COLOR_MATRIX_BLUE_BIAS'; and the alpha component is
17081 multiplied by `GL_POST_COLOR_MATRIX_ALPHA_SCALE', then added to
17082 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'. After all four color components
17083 are scaled and biased, each is clamped to the range [0,1] .
17085 Similarly, if the `ARB_imaging' extension is supported, each of the
17086 four color components may be scaled and biased after processing by
17087 the enabled convolution filter. That is, the red component is
17088 multiplied by `GL_POST_CONVOLUTION_RED_SCALE', then added to
17089 `GL_POST_CONVOLUTION_RED_BIAS'; the green component is multiplied
17090 by `GL_POST_CONVOLUTION_GREEN_SCALE', then added to
17091 `GL_POST_CONVOLUTION_GREEN_BIAS'; the blue component is multiplied
17092 by `GL_POST_CONVOLUTION_BLUE_SCALE', then added to
17093 `GL_POST_CONVOLUTION_BLUE_BIAS'; and the alpha component is
17094 multiplied by `GL_POST_CONVOLUTION_ALPHA_SCALE', then added to
17095 `GL_POST_CONVOLUTION_ALPHA_BIAS'. After all four color components
17096 are scaled and biased, each is clamped to the range [0,1] .
17099 Each color index is shifted left by `GL_INDEX_SHIFT' bits; any bits
17100 beyond the number of fraction bits carried by the fixed-point index
17101 are filled with zeros. If `GL_INDEX_SHIFT' is negative, the shift
17102 is to the right, again zero filled. Then `GL_INDEX_OFFSET' is added
17103 to the index. `GL_INDEX_SHIFT' and `GL_INDEX_OFFSET' are specified
17104 with `glPixelTransfer'.
17106 From this point, operation diverges depending on the required
17107 format of the resulting pixels. If the resulting pixels are to be
17108 written to a color index buffer, or if they are being read back to
17109 client memory in `GL_COLOR_INDEX' format, the pixels continue to be
17110 treated as indices. If `GL_MAP_COLOR' is true, each index is masked
17111 by 2^N-1 , where N is `GL_PIXEL_MAP_I_TO_I_SIZE', then replaced by
17112 the contents of `GL_PIXEL_MAP_I_TO_I' indexed by the masked value.
17113 `GL_MAP_COLOR' is specified with `glPixelTransfer'. The contents of
17114 the index map is specified with `glPixelMap'.
17116 If the resulting pixels are to be written to an RGBA color buffer,
17117 or if they are read back to client memory in a format other than
17118 `GL_COLOR_INDEX', the pixels are converted from indices to colors
17119 by referencing the four maps `GL_PIXEL_MAP_I_TO_R',
17120 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
17121 `GL_PIXEL_MAP_I_TO_A'. Before being dereferenced, the index is
17122 masked by 2^N-1 , where N is `GL_PIXEL_MAP_I_TO_R_SIZE' for the red
17123 map, `GL_PIXEL_MAP_I_TO_G_SIZE' for the green map,
17124 `GL_PIXEL_MAP_I_TO_B_SIZE' for the blue map, and
17125 `GL_PIXEL_MAP_I_TO_A_SIZE' for the alpha map. All components taken
17126 from the maps are then clamped to the range [0,1] . The contents of
17127 the four maps is specified with `glPixelMap'.
17130 Each depth value is multiplied by `GL_DEPTH_SCALE', added to
17131 `GL_DEPTH_BIAS', then clamped to the range [0,1] .
17134 Each index is shifted `GL_INDEX_SHIFT' bits just as a color index
17135 is, then added to `GL_INDEX_OFFSET'. If `GL_MAP_STENCIL' is true,
17136 each index is masked by 2^N-1 , where N is
17137 `GL_PIXEL_MAP_S_TO_S_SIZE', then replaced by the contents of
17138 `GL_PIXEL_MAP_S_TO_S' indexed by the masked value.
17140 The following table gives the type, initial value, and range of valid
17141 values for each of the pixel transfer parameters that are set with
17147 *Type*, *Initial Value*, *Valid Range*
17150 boolean , false , true/false
17153 boolean , false , true/false
17156 integer , 0 , (-∞,∞)
17159 integer , 0 , (-∞,∞)
17191 `GL_POST_COLOR_MATRIX_RED_SCALE'
17194 `GL_POST_COLOR_MATRIX_GREEN_SCALE'
17197 `GL_POST_COLOR_MATRIX_BLUE_SCALE'
17200 `GL_POST_COLOR_MATRIX_ALPHA_SCALE'
17203 `GL_POST_COLOR_MATRIX_RED_BIAS'
17206 `GL_POST_COLOR_MATRIX_GREEN_BIAS'
17209 `GL_POST_COLOR_MATRIX_BLUE_BIAS'
17212 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'
17215 `GL_POST_CONVOLUTION_RED_SCALE'
17218 `GL_POST_CONVOLUTION_GREEN_SCALE'
17221 `GL_POST_CONVOLUTION_BLUE_SCALE'
17224 `GL_POST_CONVOLUTION_ALPHA_SCALE'
17227 `GL_POST_CONVOLUTION_RED_BIAS'
17230 `GL_POST_CONVOLUTION_GREEN_BIAS'
17233 `GL_POST_CONVOLUTION_BLUE_BIAS'
17236 `GL_POST_CONVOLUTION_ALPHA_BIAS'
17239 `glPixelTransferf' can be used to set any pixel transfer parameter. If
17240 the parameter type is boolean, 0 implies false and any other value
17241 implies true. If PNAME is an integer parameter, PARAM is rounded to the
17244 Likewise, `glPixelTransferi' can be used to set any of the pixel
17245 transfer parameters. Boolean parameters are set to false if PARAM is 0
17246 and to true otherwise. PARAM is converted to floating point before being
17247 assigned to real-valued parameters.
17249 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
17251 `GL_INVALID_OPERATION' is generated if `glPixelTransfer' is executed
17252 between the execution of `glBegin' and the corresponding execution of
17255 (define-gl-procedures
17261 "Specify the pixel zoom factors.
17266 Specify the X and Y zoom factors for pixel write operations.
17268 `glPixelZoom' specifies values for the X and Y zoom factors. During the
17269 execution of `glDrawPixels' or `glCopyPixels', if (XR , YR ) is the
17270 current raster position, and a given element is in the M th row and N th
17271 column of the pixel rectangle, then pixels whose centers are in the
17272 rectangle with corners at
17274 (XR+N·XFACTOR , YR+M·YFACTOR )
17276 (XR+(N+1,)·XFACTOR , YR+(M+1,)·YFACTOR )
17278 are candidates for replacement. Any pixel whose center lies on the
17279 bottom or left edge of this rectangular region is also modified.
17281 Pixel zoom factors are not limited to positive values. Negative zoom
17282 factors reflect the resulting image about the current raster position.
17284 `GL_INVALID_OPERATION' is generated if `glPixelZoom' is executed between
17285 the execution of `glBegin' and the corresponding execution of `glEnd'.")
17287 (define-gl-procedures
17288 ((glPointParameterf
17298 (glPointParameterfv
17300 (params const-GLfloat-*)
17303 (glPointParameteriv
17305 (params const-GLint-*)
17308 "Specify point parameters.
17311 Specifies a single-valued point parameter. `GL_POINT_SIZE_MIN',
17312 `GL_POINT_SIZE_MAX', `GL_POINT_FADE_THRESHOLD_SIZE', and
17313 `GL_POINT_SPRITE_COORD_ORIGIN' are accepted.
17316 Specifies the value that PNAME will be set to.
17318 The following values are accepted for PNAME:
17320 `GL_POINT_SIZE_MIN'
17323 PARAMS is a single floating-point value that specifies the minimum
17324 point size. The default value is 0.0.
17326 `GL_POINT_SIZE_MAX'
17329 PARAMS is a single floating-point value that specifies the maximum
17330 point size. The default value is 1.0.
17332 `GL_POINT_FADE_THRESHOLD_SIZE'
17335 PARAMS is a single floating-point value that specifies the
17336 threshold value to which point sizes are clamped if they exceed the
17337 specified value. The default value is 1.0.
17339 `GL_POINT_DISTANCE_ATTENUATION'
17342 PARAMS is an array of three floating-point values that specify the
17343 coefficients used for scaling the computed point size. The default
17344 values are (1,00) .
17346 `GL_POINT_SPRITE_COORD_ORIGIN'
17349 PARAMS is a single enum specifying the point sprite texture
17350 coordinate origin, either `GL_LOWER_LEFT' or `GL_UPPER_LEFT'. The
17351 default value is `GL_UPPER_LEFT'.
17353 `GL_INVALID_VALUE' is generated If the value specified for
17354 `GL_POINT_SIZE_MIN', `GL_POINT_SIZE_MAX', or
17355 `GL_POINT_FADE_THRESHOLD_SIZE' is less than zero.
17357 `GL_INVALID_ENUM' is generated If the value specified for
17358 `GL_POINT_SPRITE_COORD_ORIGIN' is not `GL_LOWER_LEFT' or
17361 If the value for `GL_POINT_SIZE_MIN' is greater than
17362 `GL_POINT_SIZE_MAX', the point size after clamping is undefined, but no
17363 error is generated.")
17365 (define-gl-procedures
17366 ((glPointSize (size GLfloat) -> void))
17367 "Specify the diameter of rasterized points.
17370 Specifies the diameter of rasterized points. The initial value is
17373 `glPointSize' specifies the rasterized diameter of both aliased and
17374 antialiased points. Using a point size other than 1 has different
17375 effects, depending on whether point antialiasing is enabled. To enable
17376 and disable point antialiasing, call `glEnable' and `glDisable' with
17377 argument `GL_POINT_SMOOTH'. Point antialiasing is initially disabled.
17379 The specified point size is multiplied with a distance attenuation
17380 factor and clamped to the specified point size range, and further
17381 clamped to the implementation-dependent point size range to produce the
17382 derived point size using
17384 POINTSIZE=CLAMP\u2062(SIZE×√(1/A+B×D+C×D^2,,,),,)
17386 where D is the eye-coordinate distance from the eye to the vertex, and A
17387 , B , and C are the distance attenuation coefficients (see
17388 `glPointParameter').
17390 If multisampling is disabled, the computed point size is used as the
17393 If multisampling is enabled, the point may be faded by modifying the
17394 point alpha value (see `glSampleCoverage') instead of allowing the point
17395 width to go below a given threshold (see `glPointParameter'). In this
17396 case, the width is further modified in the following manner:
17398 POINTWIDTH={(POINTSIZE), (THRESHOLD)\u2062(POINTSIZE>=THRESHOLD),
17401 The point alpha value is modified by computing:
17403 POINTALPHA={(1), ((POINTSIZE/THRESHOLD,)^2)\u2062(POINTSIZE>=THRESHOLD),
17406 If point antialiasing is disabled, the actual size is determined by
17407 rounding the supplied size to the nearest integer. (If the rounding
17408 results in the value 0, it is as if the point size were 1.) If the
17409 rounded size is odd, then the center point (X , Y ) of the pixel
17410 fragment that represents the point is computed as
17412 (⌊X_W,⌋+.5,⌊Y_W,⌋+.5)
17414 where W subscripts indicate window coordinates. All pixels that lie
17415 within the square grid of the rounded size centered at (X , Y ) make up
17416 the fragment. If the size is even, the center point is
17418 (⌊X_W+.5,⌋,⌊Y_W+.5,⌋)
17420 and the rasterized fragment's centers are the half-integer window
17421 coordinates within the square of the rounded size centered at (X,Y) .
17422 All pixel fragments produced in rasterizing a nonantialiased point are
17423 assigned the same associated data, that of the vertex corresponding to
17426 If antialiasing is enabled, then point rasterization produces a fragment
17427 for each pixel square that intersects the region lying within the circle
17428 having diameter equal to the current point size and centered at the
17429 point's (X_W,Y_W) . The coverage value for each fragment is the window
17430 coordinate area of the intersection of the circular region with the
17431 corresponding pixel square. This value is saved and used in the final
17432 rasterization step. The data associated with each fragment is the data
17433 associated with the point being rasterized.
17435 Not all sizes are supported when point antialiasing is enabled. If an
17436 unsupported size is requested, the nearest supported size is used. Only
17437 size 1 is guaranteed to be supported; others depend on the
17438 implementation. To query the range of supported sizes and the size
17439 difference between supported sizes within the range, call `glGet' with
17440 arguments `GL_SMOOTH_POINT_SIZE_RANGE' and
17441 `GL_SMOOTH_POINT_SIZE_GRANULARITY'. For aliased points, query the
17442 supported ranges and granularity with `glGet' with arguments
17443 `GL_ALIASED_POINT_SIZE_RANGE'.
17445 `GL_INVALID_VALUE' is generated if SIZE is less than or equal to 0.
17447 `GL_INVALID_OPERATION' is generated if `glPointSize' is executed between
17448 the execution of `glBegin' and the corresponding execution of `glEnd'.")
17450 (define-gl-procedures
17456 "Select a polygon rasterization mode.
17459 Specifies the polygons that MODE applies to. Must be `GL_FRONT' for
17460 front-facing polygons, `GL_BACK' for back-facing polygons, or
17461 `GL_FRONT_AND_BACK' for front- and back-facing polygons.
17464 Specifies how polygons will be rasterized. Accepted values are
17465 `GL_POINT', `GL_LINE', and `GL_FILL'. The initial value is
17466 `GL_FILL' for both front- and back-facing polygons.
17468 `glPolygonMode' controls the interpretation of polygons for
17469 rasterization. FACE describes which polygons MODE applies to:
17470 front-facing polygons (`GL_FRONT'), back-facing polygons (`GL_BACK'), or
17471 both (`GL_FRONT_AND_BACK'). The polygon mode affects only the final
17472 rasterization of polygons. In particular, a polygon's vertices are lit
17473 and the polygon is clipped and possibly culled before these modes are
17476 Three modes are defined and can be specified in MODE:
17479 Polygon vertices that are marked as the start of a boundary edge
17480 are drawn as points. Point attributes such as `GL_POINT_SIZE' and
17481 `GL_POINT_SMOOTH' control the rasterization of the points. Polygon
17482 rasterization attributes other than `GL_POLYGON_MODE' have no
17486 Boundary edges of the polygon are drawn as line segments. They are
17487 treated as connected line segments for line stippling; the line
17488 stipple counter and pattern are not reset between segments (see
17489 `glLineStipple'). Line attributes such as `GL_LINE_WIDTH' and
17490 `GL_LINE_SMOOTH' control the rasterization of the lines. Polygon
17491 rasterization attributes other than `GL_POLYGON_MODE' have no
17495 The interior of the polygon is filled. Polygon attributes such as
17496 `GL_POLYGON_STIPPLE' and `GL_POLYGON_SMOOTH' control the
17497 rasterization of the polygon.
17499 `GL_INVALID_ENUM' is generated if either FACE or MODE is not an accepted
17502 `GL_INVALID_OPERATION' is generated if `glPolygonMode' is executed
17503 between the execution of `glBegin' and the corresponding execution of
17506 (define-gl-procedures
17512 "Set the scale and units used to calculate depth values.
17515 Specifies a scale factor that is used to create a variable depth
17516 offset for each polygon. The initial value is 0.
17519 Is multiplied by an implementation-specific value to create a
17520 constant depth offset. The initial value is 0.
17522 When `GL_POLYGON_OFFSET_FILL', `GL_POLYGON_OFFSET_LINE', or
17523 `GL_POLYGON_OFFSET_POINT' is enabled, each fragment's DEPTH value will
17524 be offset after it is interpolated from the DEPTH values of the
17525 appropriate vertices. The value of the offset is FACTOR×DZ+R×UNITS ,
17526 where DZ is a measurement of the change in depth relative to the screen
17527 area of the polygon, and R is the smallest value that is guaranteed to
17528 produce a resolvable offset for a given implementation. The offset is
17529 added before the depth test is performed and before the value is written
17530 into the depth buffer.
17532 `glPolygonOffset' is useful for rendering hidden-line images, for
17533 applying decals to surfaces, and for rendering solids with highlighted
17536 `GL_INVALID_OPERATION' is generated if `glPolygonOffset' is executed
17537 between the execution of `glBegin' and the corresponding execution of
17540 (define-gl-procedures
17542 (pattern const-GLubyte-*)
17545 "Set the polygon stippling pattern.
17548 Specifies a pointer to a 32×32 stipple pattern that will be
17549 unpacked from memory in the same way that `glDrawPixels' unpacks
17552 Polygon stippling, like line stippling (see `glLineStipple'), masks out
17553 certain fragments produced by rasterization, creating a pattern.
17554 Stippling is independent of polygon antialiasing.
17556 PATTERN is a pointer to a 32×32 stipple pattern that is stored in memory
17557 just like the pixel data supplied to a `glDrawPixels' call with height
17558 and WIDTH both equal to 32, a pixel format of `GL_COLOR_INDEX', and data
17559 type of `GL_BITMAP'. That is, the stipple pattern is represented as a
17560 32×32 array of 1-bit color indices packed in unsigned bytes.
17561 `glPixelStore' parameters like `GL_UNPACK_SWAP_BYTES' and
17562 `GL_UNPACK_LSB_FIRST' affect the assembling of the bits into a stipple
17563 pattern. Pixel transfer operations (shift, offset, pixel map) are not
17564 applied to the stipple image, however.
17566 If a non-zero named buffer object is bound to the
17567 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a stipple
17568 pattern is specified, PATTERN is treated as a byte offset into the
17569 buffer object's data store.
17571 To enable and disable polygon stippling, call `glEnable' and `glDisable'
17572 with argument `GL_POLYGON_STIPPLE'. Polygon stippling is initially
17573 disabled. If it's enabled, a rasterized polygon fragment with window
17574 coordinates X_W and Y_W is sent to the next stage of the GL if and only
17575 if the (X_W%32 )th bit in the (Y_W%32 )th row of the stipple pattern is
17576 1 (one). When polygon stippling is disabled, it is as if the stipple
17577 pattern consists of all 1's.
17579 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
17580 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
17581 data store is currently mapped.
17583 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
17584 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
17585 unpacked from the buffer object such that the memory reads required
17586 would exceed the data store size.
17588 `GL_INVALID_OPERATION' is generated if `glPolygonStipple' is executed
17589 between the execution of `glBegin' and the corresponding execution of
17592 (define-gl-procedures
17593 ((glPrioritizeTextures
17595 (textures const-GLuint-*)
17596 (priorities const-GLclampf-*)
17599 "Set texture residence priority.
17602 Specifies the number of textures to be prioritized.
17605 Specifies an array containing the names of the textures to be
17609 Specifies an array containing the texture priorities. A priority
17610 given in an element of PRIORITIES applies to the texture named by
17611 the corresponding element of TEXTURES.
17613 `glPrioritizeTextures' assigns the N texture priorities given in
17614 PRIORITIES to the N textures named in TEXTURES.
17616 The GL establishes a ``working set'' of textures that are resident in
17617 texture memory. These textures may be bound to a texture target much
17618 more efficiently than textures that are not resident. By specifying a
17619 priority for each texture, `glPrioritizeTextures' allows applications to
17620 guide the GL implementation in determining which textures should be
17623 The priorities given in PRIORITIES are clamped to the range [0,1] before
17624 they are assigned. 0 indicates the lowest priority; textures with
17625 priority 0 are least likely to be resident. 1 indicates the highest
17626 priority; textures with priority 1 are most likely to be resident.
17627 However, textures are not guaranteed to be resident until they are used.
17629 `glPrioritizeTextures' silently ignores attempts to prioritize texture 0
17630 or any texture name that does not correspond to an existing texture.
17632 `glPrioritizeTextures' does not require that any of the textures named
17633 by TEXTURES be bound to a texture target. `glTexParameter' may also be
17634 used to set a texture's priority, but only if the texture is currently
17635 bound. This is the only way to set the priority of a default texture.
17637 `GL_INVALID_VALUE' is generated if N is negative.
17639 `GL_INVALID_OPERATION' is generated if `glPrioritizeTextures' is
17640 executed between the execution of `glBegin' and the corresponding
17641 execution of `glEnd'.")
17643 (define-gl-procedures
17644 ((glPushAttrib (mask GLbitfield) -> void)
17645 (glPopAttrib -> void))
17646 "Push and pop the server attribute stack.
17649 Specifies a mask that indicates which attributes to save. Values
17650 for MASK are listed below.
17652 `glPushAttrib' takes one argument, a mask that indicates which groups of
17653 state variables to save on the attribute stack. Symbolic constants are
17654 used to set bits in the mask. MASK is typically constructed by
17655 specifying the bitwise-or of several of these constants together. The
17656 special mask `GL_ALL_ATTRIB_BITS' can be used to save all stackable
17659 The symbolic mask constants and their associated GL state are as follows
17660 (the second column lists which attributes are saved):
17664 `GL_ACCUM_BUFFER_BIT'
17665 Accumulation buffer clear value
17667 `GL_COLOR_BUFFER_BIT'
17668 `GL_ALPHA_TEST' enable bit
17671 Alpha test function and reference value
17674 `GL_BLEND' enable bit
17677 Blending source and destination functions
17680 Constant blend color
17686 `GL_DITHER' enable bit
17689 `GL_DRAW_BUFFER' setting
17692 `GL_COLOR_LOGIC_OP' enable bit
17695 `GL_INDEX_LOGIC_OP' enable bit
17701 Color mode and index mode clear values
17704 Color mode and index mode writemasks
17710 Current color index
17713 Current normal vector
17716 Current texture coordinates
17719 Current raster position
17722 `GL_CURRENT_RASTER_POSITION_VALID' flag
17725 RGBA color associated with current raster position
17728 Color index associated with current raster position
17731 Texture coordinates associated with current raster position
17734 `GL_EDGE_FLAG' flag
17736 `GL_DEPTH_BUFFER_BIT'
17737 `GL_DEPTH_TEST' enable bit
17740 Depth buffer test function
17743 Depth buffer clear value
17746 `GL_DEPTH_WRITEMASK' enable bit
17749 `GL_ALPHA_TEST' flag
17752 `GL_AUTO_NORMAL' flag
17758 Enable bits for the user-definable clipping planes
17761 `GL_COLOR_MATERIAL'
17764 `GL_CULL_FACE' flag
17767 `GL_DEPTH_TEST' flag
17776 `GL_LIGHT'I where `0' <= I < `GL_MAX_LIGHTS'
17782 `GL_LINE_SMOOTH' flag
17785 `GL_LINE_STIPPLE' flag
17788 `GL_COLOR_LOGIC_OP' flag
17791 `GL_INDEX_LOGIC_OP' flag
17794 `GL_MAP1_'X where X is a map type
17797 `GL_MAP2_'X where X is a map type
17800 `GL_MULTISAMPLE' flag
17803 `GL_NORMALIZE' flag
17806 `GL_POINT_SMOOTH' flag
17809 `GL_POLYGON_OFFSET_LINE' flag
17812 `GL_POLYGON_OFFSET_FILL' flag
17815 `GL_POLYGON_OFFSET_POINT' flag
17818 `GL_POLYGON_SMOOTH' flag
17821 `GL_POLYGON_STIPPLE' flag
17824 `GL_SAMPLE_ALPHA_TO_COVERAGE' flag
17827 `GL_SAMPLE_ALPHA_TO_ONE' flag
17830 `GL_SAMPLE_COVERAGE' flag
17833 `GL_SCISSOR_TEST' flag
17836 `GL_STENCIL_TEST' flag
17839 `GL_TEXTURE_1D' flag
17842 `GL_TEXTURE_2D' flag
17845 `GL_TEXTURE_3D' flag
17848 Flags `GL_TEXTURE_GEN_'X where X is S, T, R, or Q
17851 `GL_MAP1_'X enable bits, where X is a map type
17854 `GL_MAP2_'X enable bits, where X is a map type
17857 1D grid endpoints and divisions
17860 2D grid endpoints and divisions
17863 `GL_AUTO_NORMAL' enable bit
17866 `GL_FOG' enable bit
17884 `GL_FOG_MODE' value
17887 `GL_PERSPECTIVE_CORRECTION_HINT' setting
17890 `GL_POINT_SMOOTH_HINT' setting
17893 `GL_LINE_SMOOTH_HINT' setting
17896 `GL_POLYGON_SMOOTH_HINT' setting
17899 `GL_FOG_HINT' setting
17902 `GL_GENERATE_MIPMAP_HINT' setting
17905 `GL_TEXTURE_COMPRESSION_HINT' setting
17908 `GL_COLOR_MATERIAL' enable bit
17911 `GL_COLOR_MATERIAL_FACE' value
17914 Color material parameters that are tracking the current color
17917 Ambient scene color
17920 `GL_LIGHT_MODEL_LOCAL_VIEWER' value
17923 `GL_LIGHT_MODEL_TWO_SIDE' setting
17926 `GL_LIGHTING' enable bit
17929 Enable bit for each light
17932 Ambient, diffuse, and specular intensity for each light
17935 Direction, position, exponent, and cutoff angle for each light
17938 Constant, linear, and quadratic attenuation factors for each light
17941 Ambient, diffuse, specular, and emissive color for each material
17944 Ambient, diffuse, and specular color indices for each material
17947 Specular exponent for each material
17950 `GL_SHADE_MODEL' setting
17953 `GL_LINE_SMOOTH' flag
17956 `GL_LINE_STIPPLE' enable bit
17959 Line stipple pattern and repeat counter
17965 `GL_LIST_BASE' setting
17967 `GL_MULTISAMPLE_BIT'
17968 `GL_MULTISAMPLE' flag
17971 `GL_SAMPLE_ALPHA_TO_COVERAGE' flag
17974 `GL_SAMPLE_ALPHA_TO_ONE' flag
17977 `GL_SAMPLE_COVERAGE' flag
17980 `GL_SAMPLE_COVERAGE_VALUE' value
17983 `GL_SAMPLE_COVERAGE_INVERT' value
17985 `GL_PIXEL_MODE_BIT'
17986 `GL_RED_BIAS' and `GL_RED_SCALE' settings
17989 `GL_GREEN_BIAS' and `GL_GREEN_SCALE' values
17992 `GL_BLUE_BIAS' and `GL_BLUE_SCALE'
17995 `GL_ALPHA_BIAS' and `GL_ALPHA_SCALE'
17998 `GL_DEPTH_BIAS' and `GL_DEPTH_SCALE'
18001 `GL_INDEX_OFFSET' and `GL_INDEX_SHIFT' values
18004 `GL_MAP_COLOR' and `GL_MAP_STENCIL' flags
18007 `GL_ZOOM_X' and `GL_ZOOM_Y' factors
18010 `GL_READ_BUFFER' setting
18013 `GL_POINT_SMOOTH' flag
18019 `GL_CULL_FACE' enable bit
18022 `GL_CULL_FACE_MODE' value
18025 `GL_FRONT_FACE' indicator
18028 `GL_POLYGON_MODE' setting
18031 `GL_POLYGON_SMOOTH' flag
18034 `GL_POLYGON_STIPPLE' enable bit
18037 `GL_POLYGON_OFFSET_FILL' flag
18040 `GL_POLYGON_OFFSET_LINE' flag
18043 `GL_POLYGON_OFFSET_POINT' flag
18046 `GL_POLYGON_OFFSET_FACTOR'
18049 `GL_POLYGON_OFFSET_UNITS'
18051 `GL_POLYGON_STIPPLE_BIT'
18052 Polygon stipple image
18055 `GL_SCISSOR_TEST' flag
18060 `GL_STENCIL_BUFFER_BIT'
18061 `GL_STENCIL_TEST' enable bit
18064 Stencil function and reference value
18070 Stencil fail, pass, and depth buffer pass actions
18073 Stencil buffer clear value
18076 Stencil buffer writemask
18079 Enable bits for the four texture coordinates
18082 Border color for each texture image
18085 Minification function for each texture image
18088 Magnification function for each texture image
18091 Texture coordinates and wrap mode for each texture image
18094 Color and mode for each texture environment
18097 Enable bits `GL_TEXTURE_GEN_'X, X is S, T, R, and Q
18100 `GL_TEXTURE_GEN_MODE' setting for S, T, R, and Q
18103 `glTexGen' plane equations for S, T, R, and Q
18106 Current texture bindings (for example, `GL_TEXTURE_BINDING_2D')
18109 Coefficients of the six clipping planes
18112 Enable bits for the user-definable clipping planes
18115 `GL_MATRIX_MODE' value
18118 `GL_NORMALIZE' flag
18121 `GL_RESCALE_NORMAL' flag
18124 Depth range (near and far)
18127 Viewport origin and extent
18129 `glPopAttrib' restores the values of the state variables saved with the
18130 last `glPushAttrib' command. Those not saved are left unchanged.
18132 It is an error to push attributes onto a full stack or to pop attributes
18133 off an empty stack. In either case, the error flag is set and no other
18134 change is made to GL state.
18136 Initially, the attribute stack is empty.
18138 `GL_STACK_OVERFLOW' is generated if `glPushAttrib' is called while the
18139 attribute stack is full.
18141 `GL_STACK_UNDERFLOW' is generated if `glPopAttrib' is called while the
18142 attribute stack is empty.
18144 `GL_INVALID_OPERATION' is generated if `glPushAttrib' or `glPopAttrib'
18145 is executed between the execution of `glBegin' and the corresponding
18146 execution of `glEnd'.")
18148 (define-gl-procedures
18149 ((glPushClientAttrib (mask GLbitfield) -> void)
18150 (glPopClientAttrib -> void))
18151 "Push and pop the client attribute stack.
18154 Specifies a mask that indicates which attributes to save. Values
18155 for MASK are listed below.
18157 `glPushClientAttrib' takes one argument, a mask that indicates which
18158 groups of client-state variables to save on the client attribute stack.
18159 Symbolic constants are used to set bits in the mask. MASK is typically
18160 constructed by specifying the bitwise-or of several of these constants
18161 together. The special mask `GL_CLIENT_ALL_ATTRIB_BITS' can be used to
18162 save all stackable client state.
18164 The symbolic mask constants and their associated GL client state are as
18165 follows (the second column lists which attributes are saved):
18167 `GL_CLIENT_PIXEL_STORE_BIT' Pixel storage modes
18168 `GL_CLIENT_VERTEX_ARRAY_BIT' Vertex arrays (and enables)
18170 `glPopClientAttrib' restores the values of the client-state variables
18171 saved with the last `glPushClientAttrib'. Those not saved are left
18174 It is an error to push attributes onto a full client attribute stack or
18175 to pop attributes off an empty stack. In either case, the error flag is
18176 set, and no other change is made to GL state.
18178 Initially, the client attribute stack is empty.
18180 `GL_STACK_OVERFLOW' is generated if `glPushClientAttrib' is called while
18181 the attribute stack is full.
18183 `GL_STACK_UNDERFLOW' is generated if `glPopClientAttrib' is called while
18184 the attribute stack is empty.")
18186 (define-gl-procedures
18187 ((glPushMatrix -> void) (glPopMatrix -> void))
18188 "Push and pop the current matrix stack.
18190 There is a stack of matrices for each of the matrix modes. In
18191 `GL_MODELVIEW' mode, the stack depth is at least 32. In the other modes,
18192 `GL_COLOR', `GL_PROJECTION', and `GL_TEXTURE', the depth is at least 2.
18193 The current matrix in any mode is the matrix on the top of the stack for
18196 `glPushMatrix' pushes the current matrix stack down by one, duplicating
18197 the current matrix. That is, after a `glPushMatrix' call, the matrix on
18198 top of the stack is identical to the one below it.
18200 `glPopMatrix' pops the current matrix stack, replacing the current
18201 matrix with the one below it on the stack.
18203 Initially, each of the stacks contains one matrix, an identity matrix.
18205 It is an error to push a full matrix stack or to pop a matrix stack that
18206 contains only a single matrix. In either case, the error flag is set and
18207 no other change is made to GL state.
18209 `GL_STACK_OVERFLOW' is generated if `glPushMatrix' is called while the
18210 current matrix stack is full.
18212 `GL_STACK_UNDERFLOW' is generated if `glPopMatrix' is called while the
18213 current matrix stack contains only a single matrix.
18215 `GL_INVALID_OPERATION' is generated if `glPushMatrix' or `glPopMatrix'
18216 is executed between the execution of `glBegin' and the corresponding
18217 execution of `glEnd'.")
18219 (define-gl-procedures
18220 ((glPushName (name GLuint) -> void)
18221 (glPopName -> void))
18222 "Push and pop the name stack.
18225 Specifies a name that will be pushed onto the name stack.
18227 The name stack is used during selection mode to allow sets of rendering
18228 commands to be uniquely identified. It consists of an ordered set of
18229 unsigned integers and is initially empty.
18231 `glPushName' causes NAME to be pushed onto the name stack. `glPopName'
18232 pops one name off the top of the stack.
18234 The maximum name stack depth is implementation-dependent; call
18235 `GL_MAX_NAME_STACK_DEPTH' to find out the value for a particular
18236 implementation. It is an error to push a name onto a full stack or to
18237 pop a name off an empty stack. It is also an error to manipulate the
18238 name stack between the execution of `glBegin' and the corresponding
18239 execution of `glEnd'. In any of these cases, the error flag is set and
18240 no other change is made to GL state.
18242 The name stack is always empty while the render mode is not `GL_SELECT'.
18243 Calls to `glPushName' or `glPopName' while the render mode is not
18244 `GL_SELECT' are ignored.
18246 `GL_STACK_OVERFLOW' is generated if `glPushName' is called while the
18247 name stack is full.
18249 `GL_STACK_UNDERFLOW' is generated if `glPopName' is called while the
18250 name stack is empty.
18252 `GL_INVALID_OPERATION' is generated if `glPushName' or `glPopName' is
18253 executed between a call to `glBegin' and the corresponding call to
18256 (define-gl-procedures
18257 ((glRasterPos2s (x GLshort) (y GLshort) -> void)
18258 (glRasterPos2i (x GLint) (y GLint) -> void)
18259 (glRasterPos2f (x GLfloat) (y GLfloat) -> void)
18260 (glRasterPos2d (x GLdouble) (y GLdouble) -> void)
18313 (glRasterPos2sv (v const-GLshort-*) -> void)
18314 (glRasterPos2iv (v const-GLint-*) -> void)
18315 (glRasterPos2fv (v const-GLfloat-*) -> void)
18316 (glRasterPos2dv (v const-GLdouble-*) -> void)
18317 (glRasterPos3sv (v const-GLshort-*) -> void)
18318 (glRasterPos3iv (v const-GLint-*) -> void)
18319 (glRasterPos3fv (v const-GLfloat-*) -> void)
18320 (glRasterPos3dv (v const-GLdouble-*) -> void)
18321 (glRasterPos4sv (v const-GLshort-*) -> void)
18322 (glRasterPos4iv (v const-GLint-*) -> void)
18323 (glRasterPos4fv (v const-GLfloat-*) -> void)
18324 (glRasterPos4dv (v const-GLdouble-*) -> void))
18325 "Specify the raster position for pixel operations.
18334 Specify the X , Y , Z , and W object coordinates (if present) for
18335 the raster position.
18337 The GL maintains a 3D position in window coordinates. This position,
18338 called the raster position, is used to position pixel and bitmap write
18339 operations. It is maintained with subpixel accuracy. See `glBitmap',
18340 `glDrawPixels', and `glCopyPixels'.
18342 The current raster position consists of three window coordinates (X , Y
18343 , Z ), a clip coordinate value (W ), an eye coordinate distance, a valid
18344 bit, and associated color data and texture coordinates. The W coordinate
18345 is a clip coordinate, because W is not projected to window coordinates.
18346 `glRasterPos4' specifies object coordinates X , Y , Z , and W
18347 explicitly. `glRasterPos3' specifies object coordinate X , Y , and Z
18348 explicitly, while W is implicitly set to 1. `glRasterPos2' uses the
18349 argument values for X and Y while implicitly setting Z and W to 0 and 1.
18351 The object coordinates presented by `glRasterPos' are treated just like
18352 those of a `glVertex' command: They are transformed by the current
18353 modelview and projection matrices and passed to the clipping stage. If
18354 the vertex is not culled, then it is projected and scaled to window
18355 coordinates, which become the new current raster position, and the
18356 `GL_CURRENT_RASTER_POSITION_VALID' flag is set. If the vertex IS culled,
18357 then the valid bit is cleared and the current raster position and
18358 associated color and texture coordinates are undefined.
18360 The current raster position also includes some associated color data and
18361 texture coordinates. If lighting is enabled, then
18362 `GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `GL_CURRENT_RASTER_INDEX'
18363 (in color index mode) is set to the color produced by the lighting
18364 calculation (see `glLight', `glLightModel', and `glShadeModel'). If
18365 lighting is disabled, current color (in RGBA mode, state variable
18366 `GL_CURRENT_COLOR') or color index (in color index mode, state variable
18367 `GL_CURRENT_INDEX') is used to update the current raster color.
18368 `GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated.
18370 Likewise, `GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of
18371 `GL_CURRENT_TEXTURE_COORDS', based on the texture matrix and the texture
18372 generation functions (see `glTexGen'). Finally, the distance from the
18373 origin of the eye coordinate system to the vertex as transformed by only
18374 the modelview matrix replaces `GL_CURRENT_RASTER_DISTANCE'.
18376 Initially, the current raster position is (0, 0, 0, 1), the current
18377 raster distance is 0, the valid bit is set, the associated RGBA color is
18378 (1, 1, 1, 1), the associated color index is 1, and the associated
18379 texture coordinates are (0, 0, 0, 1). In RGBA mode,
18380 `GL_CURRENT_RASTER_INDEX' is always 1; in color index mode, the current
18381 raster RGBA color always maintains its initial value.
18383 `GL_INVALID_OPERATION' is generated if `glRasterPos' is executed between
18384 the execution of `glBegin' and the corresponding execution of `glEnd'.")
18386 (define-gl-procedures
18387 ((glReadBuffer (mode GLenum) -> void))
18388 "Select a color buffer source for pixels.
18391 Specifies a color buffer. Accepted values are `GL_FRONT_LEFT',
18392 `GL_FRONT_RIGHT', `GL_BACK_LEFT', `GL_BACK_RIGHT', `GL_FRONT',
18393 `GL_BACK', `GL_LEFT', `GL_RIGHT', and `GL_AUX'I, where I is between
18394 0 and the value of `GL_AUX_BUFFERS' minus 1.
18396 `glReadBuffer' specifies a color buffer as the source for subsequent
18397 `glReadPixels', `glCopyTexImage1D', `glCopyTexImage2D',
18398 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D', and
18399 `glCopyPixels' commands. MODE accepts one of twelve or more predefined
18400 values. (`GL_AUX0' through `GL_AUX3' are always defined.) In a fully
18401 configured system, `GL_FRONT', `GL_LEFT', and `GL_FRONT_LEFT' all name
18402 the front left buffer, `GL_FRONT_RIGHT' and `GL_RIGHT' name the front
18403 right buffer, and `GL_BACK_LEFT' and `GL_BACK' name the back left
18406 Nonstereo double-buffered configurations have only a front left and a
18407 back left buffer. Single-buffered configurations have a front left and a
18408 front right buffer if stereo, and only a front left buffer if nonstereo.
18409 It is an error to specify a nonexistent buffer to `glReadBuffer'.
18411 MODE is initially `GL_FRONT' in single-buffered configurations and
18412 `GL_BACK' in double-buffered configurations.
18414 `GL_INVALID_ENUM' is generated if MODE is not one of the twelve (or
18415 more) accepted values.
18417 `GL_INVALID_OPERATION' is generated if MODE specifies a buffer that does
18420 `GL_INVALID_OPERATION' is generated if `glReadBuffer' is executed
18421 between the execution of `glBegin' and the corresponding execution of
18424 (define-gl-procedures
18435 "Read a block of pixels from the frame buffer.
18440 Specify the window coordinates of the first pixel that is read from
18441 the frame buffer. This location is the lower left corner of a
18442 rectangular block of pixels.
18447 Specify the dimensions of the pixel rectangle. WIDTH and HEIGHT of
18448 one correspond to a single pixel.
18451 Specifies the format of the pixel data. The following symbolic
18452 values are accepted: `GL_COLOR_INDEX', `GL_STENCIL_INDEX',
18453 `GL_DEPTH_COMPONENT', `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA',
18454 `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and
18455 `GL_LUMINANCE_ALPHA'.
18458 Specifies the data type of the pixel data. Must be one of
18459 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
18460 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
18461 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
18462 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
18463 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
18464 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
18465 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
18466 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV'.
18469 Returns the pixel data.
18471 `glReadPixels' returns pixel data from the frame buffer, starting with
18472 the pixel whose lower left corner is at location (X, Y), into client
18473 memory starting at location DATA. Several parameters control the
18474 processing of the pixel data before it is placed into client memory.
18475 These parameters are set with three commands: `glPixelStore',
18476 `glPixelTransfer', and `glPixelMap'. This reference page describes the
18477 effects on `glReadPixels' of most, but not all of the parameters
18478 specified by these three commands.
18480 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
18481 target (see `glBindBuffer') while a block of pixels is requested, DATA
18482 is treated as a byte offset into the buffer object's data store rather
18483 than a pointer to client memory.
18485 When the `ARB_imaging' extension is supported, the pixel data may be
18486 processed by additional operations including color table lookup, color
18487 matrix transformations, convolutions, histograms, and minimum and
18488 maximum pixel value computations.
18490 `glReadPixels' returns values from each pixel with lower left corner at
18491 (X+I,Y+J) for 0<=I<WIDTH and 0<=J<HEIGHT . This pixel is said to be the
18492 I th pixel in the J th row. Pixels are returned in row order from the
18493 lowest to the highest row, left to right in each row.
18495 FORMAT specifies the format for the returned pixel values; accepted
18499 Color indices are read from the color buffer selected by
18500 `glReadBuffer'. Each index is converted to fixed point, shifted
18501 left or right depending on the value and sign of `GL_INDEX_SHIFT',
18502 and added to `GL_INDEX_OFFSET'. If `GL_MAP_COLOR' is `GL_TRUE',
18503 indices are replaced by their mappings in the table
18504 `GL_PIXEL_MAP_I_TO_I'.
18507 Stencil values are read from the stencil buffer. Each index is
18508 converted to fixed point, shifted left or right depending on the
18509 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'.
18510 If `GL_MAP_STENCIL' is `GL_TRUE', indices are replaced by their
18511 mappings in the table `GL_PIXEL_MAP_S_TO_S'.
18513 `GL_DEPTH_COMPONENT'
18514 Depth values are read from the depth buffer. Each component is
18515 converted to floating point such that the minimum depth value maps
18516 to 0 and the maximum value maps to 1. Each component is then
18517 multiplied by `GL_DEPTH_SCALE', added to `GL_DEPTH_BIAS', and
18518 finally clamped to the range [0,1] .
18529 `GL_LUMINANCE_ALPHA'
18530 Processing differs depending on whether color buffers store color
18531 indices or RGBA color components. If color indices are stored, they
18532 are read from the color buffer selected by `glReadBuffer'. Each
18533 index is converted to fixed point, shifted left or right depending
18534 on the value and sign of `GL_INDEX_SHIFT', and added to
18535 `GL_INDEX_OFFSET'. Indices are then replaced by the red, green,
18536 blue, and alpha values obtained by indexing the tables
18537 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
18538 `GL_PIXEL_MAP_I_TO_B', and `GL_PIXEL_MAP_I_TO_A'. Each table must
18539 be of size 2^N , but N may be different for different tables.
18540 Before an index is used to look up a value in a table of size 2^N ,
18541 it must be masked against 2^N-1 .
18543 If RGBA color components are stored in the color buffers, they are
18544 read from the color buffer selected by `glReadBuffer'. Each color
18545 component is converted to floating point such that zero intensity
18546 maps to 0.0 and full intensity maps to 1.0. Each component is then
18547 multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where C is
18548 RED, GREEN, BLUE, or ALPHA. Finally, if `GL_MAP_COLOR' is
18549 `GL_TRUE', each component is clamped to the range [0,1] , scaled to
18550 the size of its corresponding table, and is then replaced by its
18551 mapping in the table `GL_PIXEL_MAP_c_TO_c', where C is R, G, B, or
18554 Unneeded data is then discarded. For example, `GL_RED' discards the
18555 green, blue, and alpha components, while `GL_RGB' discards only the
18556 alpha component. `GL_LUMINANCE' computes a single-component value
18557 as the sum of the red, green, and blue components, and
18558 `GL_LUMINANCE_ALPHA' does the same, while keeping alpha as a second
18559 value. The final values are clamped to the range [0,1] .
18561 The shift, scale, bias, and lookup factors just described are all
18562 specified by `glPixelTransfer'. The lookup table contents themselves are
18563 specified by `glPixelMap'.
18565 Finally, the indices or components are converted to the proper format,
18566 as specified by TYPE. If FORMAT is `GL_COLOR_INDEX' or
18567 `GL_STENCIL_INDEX' and TYPE is not `GL_FLOAT', each index is masked with
18568 the mask value given in the following table. If TYPE is `GL_FLOAT', then
18569 each integer index is converted to single-precision floating-point
18572 If FORMAT is `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
18573 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'
18574 and TYPE is not `GL_FLOAT', each component is multiplied by the
18575 multiplier shown in the following table. If type is `GL_FLOAT', then
18576 each component is passed as is (or converted to the client's
18577 single-precision floating-point format if it is different from the one
18583 *Index Mask*, *Component Conversion*
18586 2^8-1 , (2^8-1,)\u2062C
18589 2^7-1 , (2^8-1,)\u2062C-1,/2
18594 `GL_UNSIGNED_SHORT'
18595 2^16-1 , (2^16-1,)\u2062C
18598 2^15-1 , (2^16-1,)\u2062C-1,/2
18601 2^32-1 , (2^32-1,)\u2062C
18604 2^31-1 , (2^32-1,)\u2062C-1,/2
18609 Return values are placed in memory as follows. If FORMAT is
18610 `GL_COLOR_INDEX', `GL_STENCIL_INDEX', `GL_DEPTH_COMPONENT', `GL_RED',
18611 `GL_GREEN', `GL_BLUE', `GL_ALPHA', or `GL_LUMINANCE', a single value is
18612 returned and the data for the I th pixel in the J th row is placed in
18613 location (J,)\u2062WIDTH+I . `GL_RGB' and `GL_BGR' return three values,
18614 `GL_RGBA' and `GL_BGRA' return four values, and `GL_LUMINANCE_ALPHA'
18615 returns two values for each pixel, with all values corresponding to a
18616 single pixel occupying contiguous space in DATA. Storage parameters set
18617 by `glPixelStore', such as `GL_PACK_LSB_FIRST' and `GL_PACK_SWAP_BYTES',
18618 affect the way that data is written into memory. See `glPixelStore' for
18621 `GL_INVALID_ENUM' is generated if FORMAT or TYPE is not an accepted
18624 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
18625 `GL_COLOR_INDEX' or `GL_STENCIL_INDEX'.
18627 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
18629 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_COLOR_INDEX' and
18630 the color buffers store RGBA color components.
18632 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_STENCIL_INDEX' and
18633 there is no stencil buffer.
18635 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
18636 and there is no depth buffer.
18638 `GL_INVALID_OPERATION' is generated if TYPE is one of
18639 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
18640 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
18643 `GL_INVALID_OPERATION' is generated if TYPE is one of
18644 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
18645 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
18646 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
18647 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
18648 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
18650 The formats `GL_BGR', and `GL_BGRA' and types `GL_UNSIGNED_BYTE_3_3_2',
18651 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
18652 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
18653 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
18654 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
18655 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
18656 `GL_UNSIGNED_INT_2_10_10_10_REV' are available only if the GL version is
18659 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18660 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
18661 store is currently mapped.
18663 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18664 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
18665 to the buffer object such that the memory writes required would exceed
18666 the data store size.
18668 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18669 bound to the `GL_PIXEL_PACK_BUFFER' target and DATA is not evenly
18670 divisible into the number of bytes needed to store in memory a datum
18673 `GL_INVALID_OPERATION' is generated if `glReadPixels' is executed
18674 between the execution of `glBegin' and the corresponding execution of
18677 (define-gl-procedures
18707 (v1 const-GLdouble-*)
18708 (v2 const-GLdouble-*)
18712 (v1 const-GLfloat-*)
18713 (v2 const-GLfloat-*)
18722 (v1 const-GLshort-*)
18723 (v2 const-GLshort-*)
18731 Specify one vertex of a rectangle.
18736 Specify the opposite vertex of the rectangle.
18738 `glRect' supports efficient specification of rectangles as two corner
18739 points. Each rectangle command takes four arguments, organized either as
18740 two consecutive pairs of (X,Y) coordinates or as two pointers to arrays,
18741 each containing an (X,Y) pair. The resulting rectangle is defined in the
18744 `glRect'(X1, Y1, X2, Y2) is exactly equivalent to the following
18745 sequence: Note that if the second vertex is above and to the right of
18746 the first vertex, the rectangle is constructed with a counterclockwise
18750 glBegin(`GL_POLYGON');
18757 `GL_INVALID_OPERATION' is generated if `glRect' is executed between the
18758 execution of `glBegin' and the corresponding execution of `glEnd'.")
18760 (define-gl-procedures
18761 ((glRenderMode (mode GLenum) -> GLint))
18762 "Set rasterization mode.
18765 Specifies the rasterization mode. Three values are accepted:
18766 `GL_RENDER', `GL_SELECT', and `GL_FEEDBACK'. The initial value is
18769 `glRenderMode' sets the rasterization mode. It takes one argument, MODE,
18770 which can assume one of three predefined values:
18773 Render mode. Primitives are rasterized, producing pixel fragments,
18774 which are written into the frame buffer. This is the normal mode
18775 and also the default mode.
18778 Selection mode. No pixel fragments are produced, and no change to
18779 the frame buffer contents is made. Instead, a record of the names
18780 of primitives that would have been drawn if the render mode had
18781 been `GL_RENDER' is returned in a select buffer, which must be
18782 created (see `glSelectBuffer') before selection mode is entered.
18785 Feedback mode. No pixel fragments are produced, and no change to
18786 the frame buffer contents is made. Instead, the coordinates and
18787 attributes of vertices that would have been drawn if the render
18788 mode had been `GL_RENDER' is returned in a feedback buffer, which
18789 must be created (see `glFeedbackBuffer') before feedback mode is
18792 The return value of `glRenderMode' is determined by the render mode at
18793 the time `glRenderMode' is called, rather than by MODE. The values
18794 returned for the three render modes are as follows:
18800 The number of hit records transferred to the select buffer.
18803 The number of values (not vertices) transferred to the feedback
18806 See the `glSelectBuffer' and `glFeedbackBuffer' reference pages for more
18807 details concerning selection and feedback operation.
18809 `GL_INVALID_ENUM' is generated if MODE is not one of the three accepted
18812 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is called while
18813 the render mode is `GL_SELECT', or if `glRenderMode' is called with
18814 argument `GL_SELECT' before `glSelectBuffer' is called at least once.
18816 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is called
18817 while the render mode is `GL_FEEDBACK', or if `glRenderMode' is called
18818 with argument `GL_FEEDBACK' before `glFeedbackBuffer' is called at least
18821 `GL_INVALID_OPERATION' is generated if `glRenderMode' is executed
18822 between the execution of `glBegin' and the corresponding execution of
18825 (define-gl-procedures
18826 ((glResetHistogram (target GLenum) -> void))
18827 "Reset histogram table entries to zero.
18830 Must be `GL_HISTOGRAM'.
18832 `glResetHistogram' resets all the elements of the current histogram
18835 `GL_INVALID_ENUM' is generated if TARGET is not `GL_HISTOGRAM'.
18837 `GL_INVALID_OPERATION' is generated if `glResetHistogram' is executed
18838 between the execution of `glBegin' and the corresponding execution of
18841 (define-gl-procedures
18842 ((glResetMinmax (target GLenum) -> void))
18843 "Reset minmax table entries to initial values.
18846 Must be `GL_MINMAX'.
18848 `glResetMinmax' resets the elements of the current minmax table to their
18849 initial values: the ``maximum'' element receives the minimum possible
18850 component values, and the ``minimum'' element receives the maximum
18851 possible component values.
18853 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
18855 `GL_INVALID_OPERATION' is generated if `glResetMinmax' is executed
18856 between the execution of `glBegin' and the corresponding execution of
18859 (define-gl-procedures
18874 "Multiply the current matrix by a rotation matrix.
18877 Specifies the angle of rotation, in degrees.
18884 Specify the X, Y, and Z coordinates of a vector, respectively.
18886 `glRotate' produces a rotation of ANGLE degrees around the vector (X,YZ)
18887 . The current matrix (see `glMatrixMode') is multiplied by a rotation
18888 matrix with the product replacing the current matrix, as if
18889 `glMultMatrix' were called with the following matrix as its argument:
18891 ((X^2\u2061(1-C,)+C X\u2062Y\u2061(1-C,)-Z\u2062S X\u2062Z\u2061(1-C,)+Y\u2062S 0), (Y\u2062X\u2061(1-C,)+Z\u2062S
18892 Y^2\u2061(1-C,)+C Y\u2062Z\u2061(1-C,)-X\u2062S 0), (X\u2062Z\u2061(1-C,)-Y\u2062S Y\u2062Z\u2061(1-C,)+X\u2062S
18893 Z^2\u2061(1-C,)+C 0), (0 0 0 1),)
18897 Where C=COS\u2061(ANGLE,) , S=SIN\u2061(ANGLE,) , and ∥(X,YZ),∥=1 (if not, the GL
18898 will normalize this vector).
18904 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
18905 objects drawn after `glRotate' is called are rotated. Use `glPushMatrix'
18906 and `glPopMatrix' to save and restore the unrotated coordinate system.
18908 `GL_INVALID_OPERATION' is generated if `glRotate' is executed between
18909 the execution of `glBegin' and the corresponding execution of `glEnd'.")
18911 (define-gl-procedures
18917 "Specify multisample coverage parameters.
18920 Specify a single floating-point sample coverage value. The value is
18921 clamped to the range [0,1] . The initial value is 1.0.
18924 Specify a single boolean value representing if the coverage masks
18925 should be inverted. `GL_TRUE' and `GL_FALSE' are accepted. The
18926 initial value is `GL_FALSE'.
18928 Multisampling samples a pixel multiple times at various
18929 implementation-dependent subpixel locations to generate antialiasing
18930 effects. Multisampling transparently antialiases points, lines,
18931 polygons, bitmaps, and images if it is enabled.
18933 VALUE is used in constructing a temporary mask used in determining which
18934 samples will be used in resolving the final fragment color. This mask is
18935 bitwise-anded with the coverage mask generated from the multisampling
18936 computation. If the INVERT flag is set, the temporary mask is inverted
18937 (all bits flipped) and then the bitwise-and is computed.
18939 If an implementation does not have any multisample buffers available, or
18940 multisampling is disabled, rasterization occurs with only a single
18941 sample computing a pixel's final RGB color.
18943 Provided an implementation supports multisample buffers, and
18944 multisampling is enabled, then a pixel's final color is generated by
18945 combining several samples per pixel. Each sample contains color, depth,
18946 and stencil information, allowing those operations to be performed on
18949 `GL_INVALID_OPERATION' is generated if `glSampleCoverage' is executed
18950 between the execution of `glBegin' and the corresponding execution of
18953 (define-gl-procedures
18966 "Multiply the current matrix by a general scaling matrix.
18973 Specify scale factors along the X, Y, and Z axes, respectively.
18975 `glScale' produces a nonuniform scaling along the X, Y, and Z axes. The
18976 three parameters indicate the desired scale factor along each of the
18979 The current matrix (see `glMatrixMode') is multiplied by this scale
18980 matrix, and the product replaces the current matrix as if `glMultMatrix'
18981 were called with the following matrix as its argument:
18983 ((X 0 0 0), (0 Y 0 0), (0 0 Z 0), (0 0 0 1),)
18985 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
18986 objects drawn after `glScale' is called are scaled.
18988 Use `glPushMatrix' and `glPopMatrix' to save and restore the unscaled
18991 `GL_INVALID_OPERATION' is generated if `glScale' is executed between the
18992 execution of `glBegin' and the corresponding execution of `glEnd'.")
18994 (define-gl-procedures
19002 "Define the scissor box.
19007 Specify the lower left corner of the scissor box. Initially (0, 0).
19012 Specify the width and height of the scissor box. When a GL context
19013 is first attached to a window, WIDTH and HEIGHT are set to the
19014 dimensions of that window.
19016 `glScissor' defines a rectangle, called the scissor box, in window
19017 coordinates. The first two arguments, X and Y, specify the lower left
19018 corner of the box. WIDTH and HEIGHT specify the width and height of the
19021 To enable and disable the scissor test, call `glEnable' and `glDisable'
19022 with argument `GL_SCISSOR_TEST'. The test is initially disabled. While
19023 the test is enabled, only pixels that lie within the scissor box can be
19024 modified by drawing commands. Window coordinates have integer values at
19025 the shared corners of frame buffer pixels. `glScissor(0,0,1,1)' allows
19026 modification of only the lower left pixel in the window, and
19027 `glScissor(0,0,0,0)' doesn't allow modification of any pixels in the
19030 When the scissor test is disabled, it is as though the scissor box
19031 includes the entire window.
19033 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
19035 `GL_INVALID_OPERATION' is generated if `glScissor' is executed between
19036 the execution of `glBegin' and the corresponding execution of `glEnd'.")
19038 (define-gl-procedures
19039 ((glSecondaryColorPointer
19043 (pointer const-GLvoid-*)
19046 "Define an array of secondary colors.
19049 Specifies the number of components per color. Must be 3.
19052 Specifies the data type of each color component in the array.
19053 Symbolic constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
19054 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', or
19055 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
19058 Specifies the byte offset between consecutive colors. If STRIDE is
19059 0, the colors are understood to be tightly packed in the array. The
19060 initial value is 0.
19063 Specifies a pointer to the first component of the first color
19064 element in the array. The initial value is 0.
19066 `glSecondaryColorPointer' specifies the location and data format of an
19067 array of color components to use when rendering. SIZE specifies the
19068 number of components per color, and must be 3. TYPE specifies the data
19069 type of each color component, and STRIDE specifies the byte stride from
19070 one color to the next, allowing vertices and attributes to be packed
19071 into a single array or stored in separate arrays.
19073 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
19074 target (see `glBindBuffer') while a secondary color array is specified,
19075 POINTER is treated as a byte offset into the buffer object's data store.
19076 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
19077 secondary color vertex array client-side state
19078 (`GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING').
19080 When a secondary color array is specified, SIZE, TYPE, STRIDE, and
19081 POINTER are saved as client-side state, in addition to the current
19082 vertex array buffer object binding.
19084 To enable and disable the secondary color array, call
19085 `glEnableClientState' and `glDisableClientState' with the argument
19086 `GL_SECONDARY_COLOR_ARRAY'. If enabled, the secondary color array is
19087 used when `glArrayElement', `glDrawArrays', `glMultiDrawArrays',
19088 `glDrawElements', `glMultiDrawElements', or `glDrawRangeElements' is
19091 `GL_INVALID_VALUE' is generated if SIZE is not 3.
19093 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
19095 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
19097 (define-gl-procedures
19098 ((glSecondaryColor3b
19104 (glSecondaryColor3s
19110 (glSecondaryColor3i
19116 (glSecondaryColor3f
19122 (glSecondaryColor3d
19128 (glSecondaryColor3ub
19134 (glSecondaryColor3us
19140 (glSecondaryColor3ui
19146 (glSecondaryColor3bv (v const-GLbyte-*) -> void)
19147 (glSecondaryColor3sv (v const-GLshort-*) -> void)
19148 (glSecondaryColor3iv (v const-GLint-*) -> void)
19149 (glSecondaryColor3fv (v const-GLfloat-*) -> void)
19150 (glSecondaryColor3dv
19151 (v const-GLdouble-*)
19154 (glSecondaryColor3ubv
19155 (v const-GLubyte-*)
19158 (glSecondaryColor3usv
19159 (v const-GLushort-*)
19162 (glSecondaryColor3uiv (v const-GLuint-*) -> void))
19163 "Set the current secondary color.
19170 Specify new red, green, and blue values for the current secondary
19173 The GL stores both a primary four-valued RGBA color and a secondary
19174 four-valued RGBA color (where alpha is always set to 0.0) that is
19175 associated with every vertex.
19177 The secondary color is interpolated and applied to each fragment during
19178 rasterization when `GL_COLOR_SUM' is enabled. When lighting is enabled,
19179 and `GL_SEPARATE_SPECULAR_COLOR' is specified, the value of the
19180 secondary color is assigned the value computed from the specular term of
19181 the lighting computation. Both the primary and secondary current colors
19182 are applied to each fragment, regardless of the state of `GL_COLOR_SUM',
19183 under such conditions. When `GL_SEPARATE_SPECULAR_COLOR' is specified,
19184 the value returned from querying the current secondary color is
19187 `glSecondaryColor3b', `glSecondaryColor3s', and `glSecondaryColor3i'
19188 take three signed byte, short, or long integers as arguments. When *v*
19189 is appended to the name, the color commands can take a pointer to an
19190 array of such values.
19192 Color values are stored in floating-point format, with unspecified
19193 mantissa and exponent sizes. Unsigned integer color components, when
19194 specified, are linearly mapped to floating-point values such that the
19195 largest representable value maps to 1.0 (full intensity), and 0 maps to
19196 0.0 (zero intensity). Signed integer color components, when specified,
19197 are linearly mapped to floating-point values such that the most positive
19198 representable value maps to 1.0, and the most negative representable
19199 value maps to -1.0 . (Note that this mapping does not convert 0
19200 precisely to 0.0). Floating-point values are mapped directly.
19202 Neither floating-point nor signed integer values are clamped to the
19203 range [0,1] before the current color is updated. However, color
19204 components are clamped to this range before they are interpolated or
19205 written into a color buffer.")
19207 (define-gl-procedures
19213 "Establish a buffer for selection mode values.
19216 Specifies the size of BUFFER.
19219 Returns the selection data.
19221 `glSelectBuffer' has two arguments: BUFFER is a pointer to an array of
19222 unsigned integers, and SIZE indicates the size of the array. BUFFER
19223 returns values from the name stack (see `glInitNames', `glLoadName',
19224 `glPushName') when the rendering mode is `GL_SELECT' (see
19225 `glRenderMode'). `glSelectBuffer' must be issued before selection mode
19226 is enabled, and it must not be issued while the rendering mode is
19229 A programmer can use selection to determine which primitives are drawn
19230 into some region of a window. The region is defined by the current
19231 modelview and perspective matrices.
19233 In selection mode, no pixel fragments are produced from rasterization.
19234 Instead, if a primitive or a raster position intersects the clipping
19235 volume defined by the viewing frustum and the user-defined clipping
19236 planes, this primitive causes a selection hit. (With polygons, no hit
19237 occurs if the polygon is culled.) When a change is made to the name
19238 stack, or when `glRenderMode' is called, a hit record is copied to
19239 BUFFER if any hits have occurred since the last such event (name stack
19240 change or `glRenderMode' call). The hit record consists of the number of
19241 names in the name stack at the time of the event, followed by the
19242 minimum and maximum depth values of all vertices that hit since the
19243 previous event, followed by the name stack contents, bottom name first.
19245 Depth values (which are in the range [0,1]) are multiplied by 2^32-1 ,
19246 before being placed in the hit record.
19248 An internal index into BUFFER is reset to 0 whenever selection mode is
19249 entered. Each time a hit record is copied into BUFFER, the index is
19250 incremented to point to the cell just past the end of the block of
19251 names\\(emthat is, to the next available cell If the hit record is larger
19252 than the number of remaining locations in BUFFER, as much data as can
19253 fit is copied, and the overflow flag is set. If the name stack is empty
19254 when a hit record is copied, that record consists of 0 followed by the
19255 minimum and maximum depth values.
19257 To exit selection mode, call `glRenderMode' with an argument other than
19258 `GL_SELECT'. Whenever `glRenderMode' is called while the render mode is
19259 `GL_SELECT', it returns the number of hit records copied to BUFFER,
19260 resets the overflow flag and the selection buffer pointer, and
19261 initializes the name stack to be empty. If the overflow bit was set when
19262 `glRenderMode' was called, a negative hit record count is returned.
19264 `GL_INVALID_VALUE' is generated if SIZE is negative.
19266 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is called while
19267 the render mode is `GL_SELECT', or if `glRenderMode' is called with
19268 argument `GL_SELECT' before `glSelectBuffer' is called at least once.
19270 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is executed
19271 between the execution of `glBegin' and the corresponding execution of
19274 (define-gl-procedures
19275 ((glSeparableFilter2D
19277 (internalformat GLenum)
19282 (row const-GLvoid-*)
19283 (column const-GLvoid-*)
19286 "Define a separable two-dimensional convolution filter.
19289 Must be `GL_SEPARABLE_2D'.
19292 The internal format of the convolution filter kernel. The allowable
19293 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
19294 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
19295 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
19296 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
19297 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
19298 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
19299 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
19300 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
19301 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
19302 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
19303 `GL_RGBA12', or `GL_RGBA16'.
19306 The number of elements in the pixel array referenced by ROW. (This
19307 is the width of the separable filter kernel.)
19310 The number of elements in the pixel array referenced by COLUMN.
19311 (This is the height of the separable filter kernel.)
19314 The format of the pixel data in ROW and COLUMN. The allowable
19315 values are `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
19316 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_INTENSITY', `GL_LUMINANCE', and
19317 `GL_LUMINANCE_ALPHA'.
19320 The type of the pixel data in ROW and COLUMN. Symbolic constants
19321 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
19322 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
19323 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
19324 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
19325 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
19326 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
19327 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
19328 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
19332 Pointer to a one-dimensional array of pixel data that is processed
19333 to build the row filter kernel.
19336 Pointer to a one-dimensional array of pixel data that is processed
19337 to build the column filter kernel.
19339 `glSeparableFilter2D' builds a two-dimensional separable convolution
19340 filter kernel from two arrays of pixels.
19342 The pixel arrays specified by (WIDTH, FORMAT, TYPE, ROW) and (HEIGHT,
19343 FORMAT, TYPE, COLUMN) are processed just as if they had been passed to
19344 `glDrawPixels', but processing stops after the final expansion to RGBA
19347 If a non-zero named buffer object is bound to the
19348 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
19349 filter is specified, ROW and COLUMN are treated as byte offsets into the
19350 buffer object's data store.
19352 Next, the R, G, B, and A components of all pixels in both arrays are
19353 scaled by the four separable 2D `GL_CONVOLUTION_FILTER_SCALE' parameters
19354 and biased by the four separable 2D `GL_CONVOLUTION_FILTER_BIAS'
19355 parameters. (The scale and bias parameters are set by
19356 `glConvolutionParameter' using the `GL_SEPARABLE_2D' target and the
19357 names `GL_CONVOLUTION_FILTER_SCALE' and `GL_CONVOLUTION_FILTER_BIAS'.
19358 The parameters themselves are vectors of four values that are applied to
19359 red, green, blue, and alpha, in that order.) The R, G, B, and A values
19360 are not clamped to [0,1] at any time during this process.
19362 Each pixel is then converted to the internal format specified by
19363 INTERNALFORMAT. This conversion simply maps the component values of the
19364 pixel (R, G, B, and A) to the values included in the internal format
19365 (red, green, blue, alpha, luminance, and intensity). The mapping is as
19369 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
19374 `GL_LUMINANCE_ALPHA'
19386 The red, green, blue, alpha, luminance, and/or intensity components of
19387 the resulting pixels are stored in floating-point rather than integer
19388 format. They form two one-dimensional filter kernel images. The row
19389 image is indexed by coordinate I starting at zero and increasing from
19390 left to right. Each location in the row image is derived from element I
19391 of ROW. The column image is indexed by coordinate J starting at zero and
19392 increasing from bottom to top. Each location in the column image is
19393 derived from element J of COLUMN.
19395 Note that after a convolution is performed, the resulting color
19396 components are also scaled by their corresponding
19397 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
19398 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
19399 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
19400 set by `glPixelTransfer'.
19402 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SEPARABLE_2D'.
19404 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
19407 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
19410 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
19413 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
19414 than the maximum supported value. This value may be queried with
19415 `glGetConvolutionParameter' using target `GL_SEPARABLE_2D' and name
19416 `GL_MAX_CONVOLUTION_WIDTH'.
19418 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
19419 than the maximum supported value. This value may be queried with
19420 `glGetConvolutionParameter' using target `GL_SEPARABLE_2D' and name
19421 `GL_MAX_CONVOLUTION_HEIGHT'.
19423 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
19424 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
19425 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
19428 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
19429 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
19430 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
19431 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
19432 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
19433 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
19435 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
19436 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
19437 data store is currently mapped.
19439 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
19440 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
19441 unpacked from the buffer object such that the memory reads required
19442 would exceed the data store size.
19444 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
19445 bound to the `GL_PIXEL_UNPACK_BUFFER' target and ROW or COLUMN is not
19446 evenly divisible into the number of bytes needed to store in memory a
19447 datum indicated by TYPE.
19449 `GL_INVALID_OPERATION' is generated if `glSeparableFilter2D' is executed
19450 between the execution of `glBegin' and the corresponding execution of
19453 (define-gl-procedures
19454 ((glShadeModel (mode GLenum) -> void))
19455 "Select flat or smooth shading.
19458 Specifies a symbolic value representing a shading technique.
19459 Accepted values are `GL_FLAT' and `GL_SMOOTH'. The initial value is
19462 GL primitives can have either flat or smooth shading. Smooth shading,
19463 the default, causes the computed colors of vertices to be interpolated
19464 as the primitive is rasterized, typically assigning different colors to
19465 each resulting pixel fragment. Flat shading selects the computed color
19466 of just one vertex and assigns it to all the pixel fragments generated
19467 by rasterizing a single primitive. In either case, the computed color of
19468 a vertex is the result of lighting if lighting is enabled, or it is the
19469 current color at the time the vertex was specified if lighting is
19472 Flat and smooth shading are indistinguishable for points. Starting when
19473 `glBegin' is issued and counting vertices and primitives from 1, the GL
19474 gives each flat-shaded line segment I the computed color of vertex I+1 ,
19475 its second vertex. Counting similarly from 1, the GL gives each
19476 flat-shaded polygon the computed color of the vertex listed in the
19477 following table. This is the last vertex to specify the polygon in all
19478 cases except single polygons, where the first vertex specifies the
19483 * Primitive Type of Polygon I *
19486 Single polygon (I==1 )
19495 Independent triangle
19504 Flat and smooth shading are specified by `glShadeModel' with MODE set to
19505 `GL_FLAT' and `GL_SMOOTH', respectively.
19507 `GL_INVALID_ENUM' is generated if MODE is any value other than `GL_FLAT'
19510 `GL_INVALID_OPERATION' is generated if `glShadeModel' is executed
19511 between the execution of `glBegin' and the corresponding execution of
19514 (define-gl-procedures
19518 (string const-GLchar-**)
19519 (length const-GLint-*)
19522 "Replaces the source code in a shader object.
19525 Specifies the handle of the shader object whose source code is to
19529 Specifies the number of elements in the STRING and LENGTH arrays.
19532 Specifies an array of pointers to strings containing the source
19533 code to be loaded into the shader.
19536 Specifies an array of string lengths.
19538 `glShaderSource' sets the source code in SHADER to the source code in
19539 the array of strings specified by STRING. Any source code previously
19540 stored in the shader object is completely replaced. The number of
19541 strings in the array is specified by COUNT. If LENGTH is `NULL', each
19542 string is assumed to be null terminated. If LENGTH is a value other than
19543 `NULL', it points to an array containing a string length for each of the
19544 corresponding elements of STRING. Each element in the LENGTH array may
19545 contain the length of the corresponding string (the null character is
19546 not counted as part of the string length) or a value less than 0 to
19547 indicate that the string is null terminated. The source code strings are
19548 not scanned or parsed at this time; they are simply copied into the
19549 specified shader object.
19551 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
19554 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
19556 `GL_INVALID_VALUE' is generated if COUNT is less than 0.
19558 `GL_INVALID_OPERATION' is generated if `glShaderSource' is executed
19559 between the execution of `glBegin' and the corresponding execution of
19562 (define-gl-procedures
19563 ((glStencilFuncSeparate
19570 "Set front and/or back function and reference value for stencil testing.
19573 Specifies whether front and/or back stencil state is updated. Three
19574 symbolic constants are valid: `GL_FRONT', `GL_BACK', and
19575 `GL_FRONT_AND_BACK'.
19578 Specifies the test function. Eight symbolic constants are valid:
19579 `GL_NEVER', `GL_LESS', `GL_LEQUAL', `GL_GREATER', `GL_GEQUAL',
19580 `GL_EQUAL', `GL_NOTEQUAL', and `GL_ALWAYS'. The initial value is
19584 Specifies the reference value for the stencil test. REF is clamped
19585 to the range [0,2^N-1] , where N is the number of bitplanes in the
19586 stencil buffer. The initial value is 0.
19589 Specifies a mask that is ANDed with both the reference value and
19590 the stored stencil value when the test is done. The initial value
19593 Stenciling, like depth-buffering, enables and disables drawing on a
19594 per-pixel basis. You draw into the stencil planes using GL drawing
19595 primitives, then render geometry and images, using the stencil planes to
19596 mask out portions of the screen. Stenciling is typically used in
19597 multipass rendering algorithms to achieve special effects, such as
19598 decals, outlining, and constructive solid geometry rendering.
19600 The stencil test conditionally eliminates a pixel based on the outcome
19601 of a comparison between the reference value and the value in the stencil
19602 buffer. To enable and disable the test, call `glEnable' and `glDisable'
19603 with argument `GL_STENCIL_TEST'. To specify actions based on the outcome
19604 of the stencil test, call `glStencilOp' or `glStencilOpSeparate'.
19606 There can be two separate sets of FUNC, REF, and MASK parameters; one
19607 affects back-facing polygons, and the other affects front-facing
19608 polygons as well as other non-polygon primitives. `glStencilFunc' sets
19609 both front and back stencil state to the same values, as if
19610 `glStencilFuncSeparate' were called with FACE set to
19611 `GL_FRONT_AND_BACK'.
19613 FUNC is a symbolic constant that determines the stencil comparison
19614 function. It accepts one of eight values, shown in the following list.
19615 REF is an integer reference value that is used in the stencil
19616 comparison. It is clamped to the range [0,2^N-1] , where N is the number
19617 of bitplanes in the stencil buffer. MASK is bitwise ANDed with both the
19618 reference value and the stored stencil value, with the ANDed values
19619 participating in the comparison.
19621 If STENCIL represents the value stored in the corresponding stencil
19622 buffer location, the following list shows the effect of each comparison
19623 function that can be specified by FUNC. Only if the comparison succeeds
19624 is the pixel passed through to the next stage in the rasterization
19625 process (see `glStencilOp'). All tests treat STENCIL values as unsigned
19626 integers in the range [0,2^N-1] , where N is the number of bitplanes in
19627 the stencil buffer.
19629 The following values are accepted by FUNC:
19635 Passes if ( REF & MASK ) < ( STENCIL & MASK ).
19638 Passes if ( REF & MASK ) <= ( STENCIL & MASK ).
19641 Passes if ( REF & MASK ) > ( STENCIL & MASK ).
19644 Passes if ( REF & MASK ) >= ( STENCIL & MASK ).
19647 Passes if ( REF & MASK ) = ( STENCIL & MASK ).
19650 Passes if ( REF & MASK ) != ( STENCIL & MASK ).
19655 `GL_INVALID_ENUM' is generated if FUNC is not one of the eight accepted
19658 `GL_INVALID_OPERATION' is generated if `glStencilFuncSeparate' is
19659 executed between the execution of `glBegin' and the corresponding
19660 execution of `glEnd'.")
19662 (define-gl-procedures
19669 "Set front and back function and reference value for stencil testing.
19672 Specifies the test function. Eight symbolic constants are valid:
19673 `GL_NEVER', `GL_LESS', `GL_LEQUAL', `GL_GREATER', `GL_GEQUAL',
19674 `GL_EQUAL', `GL_NOTEQUAL', and `GL_ALWAYS'. The initial value is
19678 Specifies the reference value for the stencil test. REF is clamped
19679 to the range [0,2^N-1] , where N is the number of bitplanes in the
19680 stencil buffer. The initial value is 0.
19683 Specifies a mask that is ANDed with both the reference value and
19684 the stored stencil value when the test is done. The initial value
19687 Stenciling, like depth-buffering, enables and disables drawing on a
19688 per-pixel basis. Stencil planes are first drawn into using GL drawing
19689 primitives, then geometry and images are rendered using the stencil
19690 planes to mask out portions of the screen. Stenciling is typically used
19691 in multipass rendering algorithms to achieve special effects, such as
19692 decals, outlining, and constructive solid geometry rendering.
19694 The stencil test conditionally eliminates a pixel based on the outcome
19695 of a comparison between the reference value and the value in the stencil
19696 buffer. To enable and disable the test, call `glEnable' and `glDisable'
19697 with argument `GL_STENCIL_TEST'. To specify actions based on the outcome
19698 of the stencil test, call `glStencilOp' or `glStencilOpSeparate'.
19700 There can be two separate sets of FUNC, REF, and MASK parameters; one
19701 affects back-facing polygons, and the other affects front-facing
19702 polygons as well as other non-polygon primitives. `glStencilFunc' sets
19703 both front and back stencil state to the same values. Use
19704 `glStencilFuncSeparate' to set front and back stencil state to different
19707 FUNC is a symbolic constant that determines the stencil comparison
19708 function. It accepts one of eight values, shown in the following list.
19709 REF is an integer reference value that is used in the stencil
19710 comparison. It is clamped to the range [0,2^N-1] , where N is the number
19711 of bitplanes in the stencil buffer. MASK is bitwise ANDed with both the
19712 reference value and the stored stencil value, with the ANDed values
19713 participating in the comparison.
19715 If STENCIL represents the value stored in the corresponding stencil
19716 buffer location, the following list shows the effect of each comparison
19717 function that can be specified by FUNC. Only if the comparison succeeds
19718 is the pixel passed through to the next stage in the rasterization
19719 process (see `glStencilOp'). All tests treat STENCIL values as unsigned
19720 integers in the range [0,2^N-1] , where N is the number of bitplanes in
19721 the stencil buffer.
19723 The following values are accepted by FUNC:
19729 Passes if ( REF & MASK ) < ( STENCIL & MASK ).
19732 Passes if ( REF & MASK ) <= ( STENCIL & MASK ).
19735 Passes if ( REF & MASK ) > ( STENCIL & MASK ).
19738 Passes if ( REF & MASK ) >= ( STENCIL & MASK ).
19741 Passes if ( REF & MASK ) = ( STENCIL & MASK ).
19744 Passes if ( REF & MASK ) != ( STENCIL & MASK ).
19749 `GL_INVALID_ENUM' is generated if FUNC is not one of the eight accepted
19752 `GL_INVALID_OPERATION' is generated if `glStencilFunc' is executed
19753 between the execution of `glBegin' and the corresponding execution of
19756 (define-gl-procedures
19757 ((glStencilMaskSeparate
19762 "Control the front and/or back writing of individual bits in the stencil
19766 Specifies whether the front and/or back stencil writemask is
19767 updated. Three symbolic constants are valid: `GL_FRONT', `GL_BACK',
19768 and `GL_FRONT_AND_BACK'.
19771 Specifies a bit mask to enable and disable writing of individual
19772 bits in the stencil planes. Initially, the mask is all 1's.
19774 `glStencilMaskSeparate' controls the writing of individual bits in the
19775 stencil planes. The least significant N bits of MASK, where N is the
19776 number of bits in the stencil buffer, specify a mask. Where a 1 appears
19777 in the mask, it's possible to write to the corresponding bit in the
19778 stencil buffer. Where a 0 appears, the corresponding bit is
19779 write-protected. Initially, all bits are enabled for writing.
19781 There can be two separate MASK writemasks; one affects back-facing
19782 polygons, and the other affects front-facing polygons as well as other
19783 non-polygon primitives. `glStencilMask' sets both front and back stencil
19784 writemasks to the same values, as if `glStencilMaskSeparate' were called
19785 with FACE set to `GL_FRONT_AND_BACK'.
19787 `GL_INVALID_OPERATION' is generated if `glStencilMaskSeparate' is
19788 executed between the execution of `glBegin' and the corresponding
19789 execution of `glEnd'.")
19791 (define-gl-procedures
19792 ((glStencilMask (mask GLuint) -> void))
19793 "Control the front and back writing of individual bits in the stencil
19797 Specifies a bit mask to enable and disable writing of individual
19798 bits in the stencil planes. Initially, the mask is all 1's.
19800 `glStencilMask' controls the writing of individual bits in the stencil
19801 planes. The least significant N bits of MASK, where N is the number of
19802 bits in the stencil buffer, specify a mask. Where a 1 appears in the
19803 mask, it's possible to write to the corresponding bit in the stencil
19804 buffer. Where a 0 appears, the corresponding bit is write-protected.
19805 Initially, all bits are enabled for writing.
19807 There can be two separate MASK writemasks; one affects back-facing
19808 polygons, and the other affects front-facing polygons as well as other
19809 non-polygon primitives. `glStencilMask' sets both front and back stencil
19810 writemasks to the same values. Use `glStencilMaskSeparate' to set front
19811 and back stencil writemasks to different values.
19813 `GL_INVALID_OPERATION' is generated if `glStencilMask' is executed
19814 between the execution of `glBegin' and the corresponding execution of
19817 (define-gl-procedures
19818 ((glStencilOpSeparate
19825 "Set front and/or back stencil test actions.
19828 Specifies whether front and/or back stencil state is updated. Three
19829 symbolic constants are valid: `GL_FRONT', `GL_BACK', and
19830 `GL_FRONT_AND_BACK'.
19833 Specifies the action to take when the stencil test fails. Eight
19834 symbolic constants are accepted: `GL_KEEP', `GL_ZERO',
19835 `GL_REPLACE', `GL_INCR', `GL_INCR_WRAP', `GL_DECR', `GL_DECR_WRAP',
19836 and `GL_INVERT'. The initial value is `GL_KEEP'.
19839 Specifies the stencil action when the stencil test passes, but the
19840 depth test fails. DPFAIL accepts the same symbolic constants as
19841 SFAIL. The initial value is `GL_KEEP'.
19844 Specifies the stencil action when both the stencil test and the
19845 depth test pass, or when the stencil test passes and either there
19846 is no depth buffer or depth testing is not enabled. DPPASS accepts
19847 the same symbolic constants as SFAIL. The initial value is
19850 Stenciling, like depth-buffering, enables and disables drawing on a
19851 per-pixel basis. You draw into the stencil planes using GL drawing
19852 primitives, then render geometry and images, using the stencil planes to
19853 mask out portions of the screen. Stenciling is typically used in
19854 multipass rendering algorithms to achieve special effects, such as
19855 decals, outlining, and constructive solid geometry rendering.
19857 The stencil test conditionally eliminates a pixel based on the outcome
19858 of a comparison between the value in the stencil buffer and a reference
19859 value. To enable and disable the test, call `glEnable' and `glDisable'
19860 with argument `GL_STENCIL_TEST'; to control it, call `glStencilFunc' or
19861 `glStencilFuncSeparate'.
19863 There can be two separate sets of SFAIL, DPFAIL, and DPPASS parameters;
19864 one affects back-facing polygons, and the other affects front-facing
19865 polygons as well as other non-polygon primitives. `glStencilOp' sets
19866 both front and back stencil state to the same values, as if
19867 `glStencilOpSeparate' were called with FACE set to `GL_FRONT_AND_BACK'.
19869 `glStencilOpSeparate' takes three arguments that indicate what happens
19870 to the stored stencil value while stenciling is enabled. If the stencil
19871 test fails, no change is made to the pixel's color or depth buffers, and
19872 SFAIL specifies what happens to the stencil buffer contents. The
19873 following eight actions are possible.
19876 Keeps the current value.
19879 Sets the stencil buffer value to 0.
19882 Sets the stencil buffer value to REF, as specified by
19886 Increments the current stencil buffer value. Clamps to the maximum
19887 representable unsigned value.
19890 Increments the current stencil buffer value. Wraps stencil buffer
19891 value to zero when incrementing the maximum representable unsigned
19895 Decrements the current stencil buffer value. Clamps to 0.
19898 Decrements the current stencil buffer value. Wraps stencil buffer
19899 value to the maximum representable unsigned value when decrementing
19900 a stencil buffer value of zero.
19903 Bitwise inverts the current stencil buffer value.
19905 Stencil buffer values are treated as unsigned integers. When incremented
19906 and decremented, values are clamped to 0 and 2^N-1 , where N is the
19907 value returned by querying `GL_STENCIL_BITS'.
19909 The other two arguments to `glStencilOpSeparate' specify stencil buffer
19910 actions that depend on whether subsequent depth buffer tests succeed
19911 (DPPASS) or fail (DPFAIL) (see `glDepthFunc'). The actions are specified
19912 using the same eight symbolic constants as SFAIL. Note that DPFAIL is
19913 ignored when there is no depth buffer, or when the depth buffer is not
19914 enabled. In these cases, SFAIL and DPPASS specify stencil action when
19915 the stencil test fails and passes, respectively.
19917 `GL_INVALID_ENUM' is generated if FACE is any value other than
19918 `GL_FRONT', `GL_BACK', or `GL_FRONT_AND_BACK'.
19920 `GL_INVALID_ENUM' is generated if SFAIL, DPFAIL, or DPPASS is any value
19921 other than the eight defined constant values.
19923 `GL_INVALID_OPERATION' is generated if `glStencilOpSeparate' is executed
19924 between the execution of `glBegin' and the corresponding execution of
19927 (define-gl-procedures
19934 "Set front and back stencil test actions.
19937 Specifies the action to take when the stencil test fails. Eight
19938 symbolic constants are accepted: `GL_KEEP', `GL_ZERO',
19939 `GL_REPLACE', `GL_INCR', `GL_INCR_WRAP', `GL_DECR', `GL_DECR_WRAP',
19940 and `GL_INVERT'. The initial value is `GL_KEEP'.
19943 Specifies the stencil action when the stencil test passes, but the
19944 depth test fails. DPFAIL accepts the same symbolic constants as
19945 SFAIL. The initial value is `GL_KEEP'.
19948 Specifies the stencil action when both the stencil test and the
19949 depth test pass, or when the stencil test passes and either there
19950 is no depth buffer or depth testing is not enabled. DPPASS accepts
19951 the same symbolic constants as SFAIL. The initial value is
19954 Stenciling, like depth-buffering, enables and disables drawing on a
19955 per-pixel basis. You draw into the stencil planes using GL drawing
19956 primitives, then render geometry and images, using the stencil planes to
19957 mask out portions of the screen. Stenciling is typically used in
19958 multipass rendering algorithms to achieve special effects, such as
19959 decals, outlining, and constructive solid geometry rendering.
19961 The stencil test conditionally eliminates a pixel based on the outcome
19962 of a comparison between the value in the stencil buffer and a reference
19963 value. To enable and disable the test, call `glEnable' and `glDisable'
19964 with argument `GL_STENCIL_TEST'; to control it, call `glStencilFunc' or
19965 `glStencilFuncSeparate'.
19967 There can be two separate sets of SFAIL, DPFAIL, and DPPASS parameters;
19968 one affects back-facing polygons, and the other affects front-facing
19969 polygons as well as other non-polygon primitives. `glStencilOp' sets
19970 both front and back stencil state to the same values. Use
19971 `glStencilOpSeparate' to set front and back stencil state to different
19974 `glStencilOp' takes three arguments that indicate what happens to the
19975 stored stencil value while stenciling is enabled. If the stencil test
19976 fails, no change is made to the pixel's color or depth buffers, and
19977 SFAIL specifies what happens to the stencil buffer contents. The
19978 following eight actions are possible.
19981 Keeps the current value.
19984 Sets the stencil buffer value to 0.
19987 Sets the stencil buffer value to REF, as specified by
19991 Increments the current stencil buffer value. Clamps to the maximum
19992 representable unsigned value.
19995 Increments the current stencil buffer value. Wraps stencil buffer
19996 value to zero when incrementing the maximum representable unsigned
20000 Decrements the current stencil buffer value. Clamps to 0.
20003 Decrements the current stencil buffer value. Wraps stencil buffer
20004 value to the maximum representable unsigned value when decrementing
20005 a stencil buffer value of zero.
20008 Bitwise inverts the current stencil buffer value.
20010 Stencil buffer values are treated as unsigned integers. When incremented
20011 and decremented, values are clamped to 0 and 2^N-1 , where N is the
20012 value returned by querying `GL_STENCIL_BITS'.
20014 The other two arguments to `glStencilOp' specify stencil buffer actions
20015 that depend on whether subsequent depth buffer tests succeed (DPPASS) or
20016 fail (DPFAIL) (see `glDepthFunc'). The actions are specified using the
20017 same eight symbolic constants as SFAIL. Note that DPFAIL is ignored when
20018 there is no depth buffer, or when the depth buffer is not enabled. In
20019 these cases, SFAIL and DPPASS specify stencil action when the stencil
20020 test fails and passes, respectively.
20022 `GL_INVALID_ENUM' is generated if SFAIL, DPFAIL, or DPPASS is any value
20023 other than the eight defined constant values.
20025 `GL_INVALID_OPERATION' is generated if `glStencilOp' is executed between
20026 the execution of `glBegin' and the corresponding execution of `glEnd'.")
20028 (define-gl-procedures
20029 ((glTexCoordPointer
20033 (pointer const-GLvoid-*)
20036 "Define an array of texture coordinates.
20039 Specifies the number of coordinates per array element. Must be 1,
20040 2, 3, or 4. The initial value is 4.
20043 Specifies the data type of each texture coordinate. Symbolic
20044 constants `GL_SHORT', `GL_INT', `GL_FLOAT', or `GL_DOUBLE' are
20045 accepted. The initial value is `GL_FLOAT'.
20048 Specifies the byte offset between consecutive texture coordinate
20049 sets. If STRIDE is 0, the array elements are understood to be
20050 tightly packed. The initial value is 0.
20053 Specifies a pointer to the first coordinate of the first texture
20054 coordinate set in the array. The initial value is 0.
20056 `glTexCoordPointer' specifies the location and data format of an array
20057 of texture coordinates to use when rendering. SIZE specifies the number
20058 of coordinates per texture coordinate set, and must be 1, 2, 3, or 4.
20059 TYPE specifies the data type of each texture coordinate, and STRIDE
20060 specifies the byte stride from one texture coordinate set to the next,
20061 allowing vertices and attributes to be packed into a single array or
20062 stored in separate arrays. (Single-array storage may be more efficient
20063 on some implementations; see `glInterleavedArrays'.)
20065 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
20066 target (see `glBindBuffer') while a texture coordinate array is
20067 specified, POINTER is treated as a byte offset into the buffer object's
20068 data store. Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING')
20069 is saved as texture coordinate vertex array client-side state
20070 (`GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING').
20072 When a texture coordinate array is specified, SIZE, TYPE, STRIDE, and
20073 POINTER are saved as client-side state, in addition to the current
20074 vertex array buffer object binding.
20076 To enable and disable a texture coordinate array, call
20077 `glEnableClientState' and `glDisableClientState' with the argument
20078 `GL_TEXTURE_COORD_ARRAY'. If enabled, the texture coordinate array is
20079 used when `glArrayElement', `glDrawArrays', `glMultiDrawArrays',
20080 `glDrawElements', `glMultiDrawElements', or `glDrawRangeElements' is
20083 `GL_INVALID_VALUE' is generated if SIZE is not 1, 2, 3, or 4.
20085 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
20087 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
20089 (define-gl-procedures
20090 ((glTexCoord1s (s GLshort) -> void)
20091 (glTexCoord1i (s GLint) -> void)
20092 (glTexCoord1f (s GLfloat) -> void)
20093 (glTexCoord1d (s GLdouble) -> void)
20094 (glTexCoord2s (s GLshort) (t GLshort) -> void)
20095 (glTexCoord2i (s GLint) (t GLint) -> void)
20096 (glTexCoord2f (s GLfloat) (t GLfloat) -> void)
20097 (glTexCoord2d (s GLdouble) (t GLdouble) -> void)
20150 (glTexCoord1sv (v const-GLshort-*) -> void)
20151 (glTexCoord1iv (v const-GLint-*) -> void)
20152 (glTexCoord1fv (v const-GLfloat-*) -> void)
20153 (glTexCoord1dv (v const-GLdouble-*) -> void)
20154 (glTexCoord2sv (v const-GLshort-*) -> void)
20155 (glTexCoord2iv (v const-GLint-*) -> void)
20156 (glTexCoord2fv (v const-GLfloat-*) -> void)
20157 (glTexCoord2dv (v const-GLdouble-*) -> void)
20158 (glTexCoord3sv (v const-GLshort-*) -> void)
20159 (glTexCoord3iv (v const-GLint-*) -> void)
20160 (glTexCoord3fv (v const-GLfloat-*) -> void)
20161 (glTexCoord3dv (v const-GLdouble-*) -> void)
20162 (glTexCoord4sv (v const-GLshort-*) -> void)
20163 (glTexCoord4iv (v const-GLint-*) -> void)
20164 (glTexCoord4fv (v const-GLfloat-*) -> void)
20165 (glTexCoord4dv (v const-GLdouble-*) -> void))
20166 "Set the current texture coordinates.
20175 Specify S, T, R, and Q texture coordinates. Not all parameters are
20176 present in all forms of the command.
20178 `glTexCoord' specifies texture coordinates in one, two, three, or four
20179 dimensions. `glTexCoord1' sets the current texture coordinates to
20180 (S,001) ; a call to `glTexCoord2' sets them to (S,T01) . Similarly,
20181 `glTexCoord3' specifies the texture coordinates as (S,TR1) , and
20182 `glTexCoord4' defines all four components explicitly as (S,TRQ) .
20184 The current texture coordinates are part of the data that is associated
20185 with each vertex and with the current raster position. Initially, the
20186 values for S, T, R, and Q are (0, 0, 0, 1).")
20188 (define-gl-procedures
20204 (params const-GLfloat-*)
20210 (params const-GLint-*)
20213 "Set texture environment parameters.
20216 Specifies a texture environment. May be `GL_TEXTURE_ENV',
20217 `GL_TEXTURE_FILTER_CONTROL' or `GL_POINT_SPRITE'.
20220 Specifies the symbolic name of a single-valued texture environment
20221 parameter. May be either `GL_TEXTURE_ENV_MODE',
20222 `GL_TEXTURE_LOD_BIAS', `GL_COMBINE_RGB', `GL_COMBINE_ALPHA',
20223 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
20224 `GL_SRC1_ALPHA', `GL_SRC2_ALPHA', `GL_OPERAND0_RGB',
20225 `GL_OPERAND1_RGB', `GL_OPERAND2_RGB', `GL_OPERAND0_ALPHA',
20226 `GL_OPERAND1_ALPHA', `GL_OPERAND2_ALPHA', `GL_RGB_SCALE',
20227 `GL_ALPHA_SCALE', or `GL_COORD_REPLACE'.
20230 Specifies a single symbolic constant, one of `GL_ADD',
20231 `GL_ADD_SIGNED', `GL_INTERPOLATE', `GL_MODULATE', `GL_DECAL',
20232 `GL_BLEND', `GL_REPLACE', `GL_SUBTRACT', `GL_COMBINE',
20233 `GL_TEXTURE', `GL_CONSTANT', `GL_PRIMARY_COLOR', `GL_PREVIOUS',
20234 `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR', `GL_SRC_ALPHA',
20235 `GL_ONE_MINUS_SRC_ALPHA', a single boolean value for the point
20236 sprite texture coordinate replacement, a single floating-point
20237 value for the texture level-of-detail bias, or 1.0, 2.0, or 4.0
20238 when specifying the `GL_RGB_SCALE' or `GL_ALPHA_SCALE'.
20240 A texture environment specifies how texture values are interpreted when
20241 a fragment is textured. When TARGET is `GL_TEXTURE_FILTER_CONTROL',
20242 PNAME must be `GL_TEXTURE_LOD_BIAS'. When TARGET is `GL_TEXTURE_ENV',
20243 PNAME can be `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR',
20244 `GL_COMBINE_RGB', `GL_COMBINE_ALPHA', `GL_RGB_SCALE', `GL_ALPHA_SCALE',
20245 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
20246 `GL_SRC1_ALPHA', or `GL_SRC2_ALPHA'.
20248 If PNAME is `GL_TEXTURE_ENV_MODE', then PARAMS is (or points to) the
20249 symbolic name of a texture function. Six texture functions may be
20250 specified: `GL_ADD', `GL_MODULATE', `GL_DECAL', `GL_BLEND',
20251 `GL_REPLACE', or `GL_COMBINE'.
20253 The following table shows the correspondence of filtered texture values
20254 R_T , G_T , B_T , A_T , L_T , I_T to texture source components. C_S and
20255 A_S are used by the texture functions described below.
20259 Texture Base Internal Format
20266 ( L_T , L_T , L_T ) , 1
20268 `GL_LUMINANCE_ALPHA'
20269 ( L_T , L_T , L_T ) , A_T
20272 ( I_T , I_T , I_T ) , I_T
20275 ( R_T , G_T , B_T ) , 1
20278 ( R_T , G_T , B_T ) , A_T
20280 A texture function acts on the fragment to be textured using the texture
20281 image value that applies to the fragment (see `glTexParameter') and
20282 produces an RGBA color for that fragment. The following table shows how
20283 the RGBA color is produced for each of the first five texture functions
20284 that can be chosen. C is a triple of color values (RGB) and A is the
20285 associated alpha value. RGBA values extracted from a texture image are
20286 in the range [0,1]. The subscript P refers to the color computed from
20287 the previous texture stage (or the incoming fragment if processing
20288 texture stage 0), the subscript S to the texture source color, the
20289 subscript C to the texture environment color, and the subscript V
20290 indicates a value produced by the texture function.
20294 Texture Base Internal Format
20295 `Value', `GL_REPLACE' Function , `GL_MODULATE' Function ,
20296 `GL_DECAL' Function , `GL_BLEND' Function , `GL_ADD' Function
20299 C_V= , C_P , C_P , undefined , C_P , C_P
20302 A_V= , A_S , A_P\u2062A_S , , A_V=A_P\u2062A_S , A_P\u2062A_S
20305 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20308 A_V= , A_P , A_P , , A_P , A_P
20310 `GL_LUMINANCE_ALPHA'
20311 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20314 A_V= , A_S , A_P\u2062A_S , , A_P\u2062A_S , A_P\u2062A_S
20317 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20320 A_V= , A_S , A_P\u2062A_S , , A_P\u2062(1-A_S,)+A_C\u2062A_S , A_P+A_S
20323 C_V= , C_S , C_P\u2062C_S , C_S , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
20326 A_V= , A_P , A_P , A_P , A_P , A_P
20329 C_V= , C_S , C_P\u2062C_S , C_P\u2062(1-A_S,)+C_S\u2062A_S , C_P\u2062(1-C_S,)+C_C\u2062C_S
20333 A_V= , A_S , A_P\u2062A_S , A_P , A_P\u2062A_S , A_P\u2062A_S
20335 If PNAME is `GL_TEXTURE_ENV_MODE', and PARAMS is `GL_COMBINE', the form
20336 of the texture function depends on the values of `GL_COMBINE_RGB' and
20337 `GL_COMBINE_ALPHA'.
20339 The following describes how the texture sources, as specified by
20340 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
20341 `GL_SRC1_ALPHA', and `GL_SRC2_ALPHA', are combined to produce a final
20342 texture color. In the following tables, `GL_SRC0_c' is represented by
20343 ARG0 , `GL_SRC1_c' is represented by ARG1 , and `GL_SRC2_c' is
20344 represented by ARG2 .
20346 `GL_COMBINE_RGB' accepts any of `GL_REPLACE', `GL_MODULATE', `GL_ADD',
20347 `GL_ADD_SIGNED', `GL_INTERPOLATE', `GL_SUBTRACT', `GL_DOT3_RGB', or
20368 ARG0×ARG2+ARG1×(1-ARG2,)
20373 `GL_DOT3_RGB' or `GL_DOT3_RGBA'
20374 4×(((ARG0_R,-0.5,)×(ARG1_R,-0.5,),)+((ARG0_G,-0.5,)×(ARG1_G,-0.5,),
20375 )+((ARG0_B,-0.5,)×(ARG1_B,-0.5,),),)
20377 The scalar results for `GL_DOT3_RGB' and `GL_DOT3_RGBA' are placed into
20378 each of the 3 (RGB) or 4 (RGBA) components on output.
20380 Likewise, `GL_COMBINE_ALPHA' accepts any of `GL_REPLACE', `GL_MODULATE',
20381 `GL_ADD', `GL_ADD_SIGNED', `GL_INTERPOLATE', or `GL_SUBTRACT'. The
20382 following table describes how alpha values are combined:
20386 *`GL_COMBINE_ALPHA'*
20402 ARG0×ARG2+ARG1×(1-ARG2,)
20407 In the following tables, the value C_S represents the color sampled from
20408 the currently bound texture, C_C represents the constant
20409 texture-environment color, C_F represents the primary color of the
20410 incoming fragment, and C_P represents the color computed from the
20411 previous texture stage or C_F if processing texture stage 0. Likewise,
20412 A_S , A_C , A_F , and A_P represent the respective alpha values.
20414 The following table describes the values assigned to ARG0 , ARG1 , and
20415 ARG2 based upon the RGB sources and operands:
20420 *`GL_OPERANDn_RGB'*, *Argument Value*
20423 `GL_SRC_COLOR', C_S,
20426 `GL_ONE_MINUS_SRC_COLOR', 1-C_S,
20429 `GL_SRC_ALPHA', A_S,
20432 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20435 `GL_SRC_COLOR', C_S,
20438 `GL_ONE_MINUS_SRC_COLOR', 1-C_S,
20441 `GL_SRC_ALPHA', A_S,
20444 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20447 `GL_SRC_COLOR', C_C,
20450 `GL_ONE_MINUS_SRC_COLOR', 1-C_C,
20453 `GL_SRC_ALPHA', A_C,
20456 `GL_ONE_MINUS_SRC_ALPHA', 1-A_C,
20459 `GL_SRC_COLOR', C_F,
20462 `GL_ONE_MINUS_SRC_COLOR', 1-C_F,
20465 `GL_SRC_ALPHA', A_F,
20468 `GL_ONE_MINUS_SRC_ALPHA', 1-A_F,
20471 `GL_SRC_COLOR', C_P,
20474 `GL_ONE_MINUS_SRC_COLOR', 1-C_P,
20477 `GL_SRC_ALPHA', A_P,
20480 `GL_ONE_MINUS_SRC_ALPHA', 1-A_P,
20482 For `GL_TEXTUREn' sources, C_S and A_S represent the color and alpha,
20483 respectively, produced from texture stage N .
20485 The follow table describes the values assigned to ARG0 , ARG1 , and ARG2
20486 based upon the alpha sources and operands:
20491 *`GL_OPERANDn_ALPHA'*, *Argument Value*
20494 `GL_SRC_ALPHA', A_S,
20497 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20500 `GL_SRC_ALPHA', A_S,
20503 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
20506 `GL_SRC_ALPHA', A_C,
20509 `GL_ONE_MINUS_SRC_ALPHA', 1-A_C,
20512 `GL_SRC_ALPHA', A_F,
20515 `GL_ONE_MINUS_SRC_ALPHA', 1-A_F,
20518 `GL_SRC_ALPHA', A_P,
20521 `GL_ONE_MINUS_SRC_ALPHA', 1-A_P,
20523 The RGB and alpha results of the texture function are multipled by the
20524 values of `GL_RGB_SCALE' and `GL_ALPHA_SCALE', respectively, and clamped
20525 to the range [0,1] .
20527 If PNAME is `GL_TEXTURE_ENV_COLOR', PARAMS is a pointer to an array that
20528 holds an RGBA color consisting of four values. Integer color components
20529 are interpreted linearly such that the most positive integer maps to
20530 1.0, and the most negative integer maps to -1.0. The values are clamped
20531 to the range [0,1] when they are specified. C_C takes these four values.
20533 If PNAME is `GL_TEXTURE_LOD_BIAS', the value specified is added to the
20534 texture level-of-detail parameter, that selects which mipmap, or mipmaps
20535 depending upon the selected `GL_TEXTURE_MIN_FILTER', will be sampled.
20537 `GL_TEXTURE_ENV_MODE' defaults to `GL_MODULATE' and
20538 `GL_TEXTURE_ENV_COLOR' defaults to (0, 0, 0, 0).
20540 If TARGET is `GL_POINT_SPRITE' and PNAME is `GL_COORD_REPLACE', the
20541 boolean value specified is used to either enable or disable point sprite
20542 texture coordinate replacement. The default value is `GL_FALSE'.
20544 `GL_INVALID_ENUM' is generated when TARGET or PNAME is not one of the
20545 accepted defined values, or when PARAMS should have a defined constant
20546 value (based on the value of PNAME) and does not.
20548 `GL_INVALID_VALUE' is generated if the PARAMS value for `GL_RGB_SCALE'
20549 or `GL_ALPHA_SCALE' are not one of 1.0, 2.0, or 4.0.
20551 `GL_INVALID_OPERATION' is generated if `glTexEnv' is executed between
20552 the execution of `glBegin' and the corresponding execution of `glEnd'.")
20554 (define-gl-procedures
20576 (params const-GLint-*)
20582 (params const-GLfloat-*)
20588 (params const-GLdouble-*)
20591 "Control the generation of texture coordinates.
20594 Specifies a texture coordinate. Must be one of `GL_S', `GL_T',
20598 Specifies the symbolic name of the texture-coordinate generation
20599 function. Must be `GL_TEXTURE_GEN_MODE'.
20602 Specifies a single-valued texture generation parameter, one of
20603 `GL_OBJECT_LINEAR', `GL_EYE_LINEAR', `GL_SPHERE_MAP',
20604 `GL_NORMAL_MAP', or `GL_REFLECTION_MAP'.
20606 `glTexGen' selects a texture-coordinate generation function or supplies
20607 coefficients for one of the functions. COORD names one of the (S, T, R,
20608 Q) texture coordinates; it must be one of the symbols `GL_S', `GL_T',
20609 `GL_R', or `GL_Q'. PNAME must be one of three symbolic constants:
20610 `GL_TEXTURE_GEN_MODE', `GL_OBJECT_PLANE', or `GL_EYE_PLANE'. If PNAME is
20611 `GL_TEXTURE_GEN_MODE', then PARAMS chooses a mode, one of
20612 `GL_OBJECT_LINEAR', `GL_EYE_LINEAR', `GL_SPHERE_MAP', `GL_NORMAL_MAP',
20613 or `GL_REFLECTION_MAP'. If PNAME is either `GL_OBJECT_PLANE' or
20614 `GL_EYE_PLANE', PARAMS contains coefficients for the corresponding
20615 texture generation function.
20617 If the texture generation function is `GL_OBJECT_LINEAR', the function
20619 G=P_1×X_O+P_2×Y_O+P_3×Z_O+P_4×W_O
20621 is used, where G is the value computed for the coordinate named in
20622 COORD, P_1 , P_2 , P_3 , and P_4 are the four values supplied in PARAMS,
20623 and X_O , Y_O , Z_O , and W_O are the object coordinates of the vertex.
20624 This function can be used, for example, to texture-map terrain using sea
20625 level as a reference plane (defined by P_1 , P_2 , P_3 , and P_4 ). The
20626 altitude of a terrain vertex is computed by the `GL_OBJECT_LINEAR'
20627 coordinate generation function as its distance from sea level; that
20628 altitude can then be used to index the texture image to map white snow
20629 onto peaks and green grass onto foothills.
20631 If the texture generation function is `GL_EYE_LINEAR', the function
20633 G=P_1,^″×X_E+P_2,^″×Y_E+P_3,^″×Z_E+P_4,^″×W_E
20637 (P_1,^″\u2062P_2,^″\u2062P_3,^″\u2062P_4,^″,)=(P_1\u2062P_2\u2062P_3\u2062P_4,)\u2062M^-1
20639 and X_E , Y_E , Z_E , and W_E are the eye coordinates of the vertex, P_1
20640 , P_2 , P_3 , and P_4 are the values supplied in PARAMS, and M is the
20641 modelview matrix when `glTexGen' is invoked. If M is poorly conditioned
20642 or singular, texture coordinates generated by the resulting function may
20643 be inaccurate or undefined.
20645 Note that the values in PARAMS define a reference plane in eye
20646 coordinates. The modelview matrix that is applied to them may not be the
20647 same one in effect when the polygon vertices are transformed. This
20648 function establishes a field of texture coordinates that can produce
20649 dynamic contour lines on moving objects.
20651 If the texture generation function is `GL_SPHERE_MAP' and COORD is
20652 either `GL_S' or `GL_T', S and T texture coordinates are generated as
20653 follows. Let U be the unit vector pointing from the origin to the
20654 polygon vertex (in eye coordinates). Let N sup prime be the current
20655 normal, after transformation to eye coordinates. Let
20657 F=(F_X\u2062F_Y\u2062F_Z,)^T be the reflection vector such that
20659 F=U-2\u2062N^″\u2062N^″,^T\u2062U
20661 Finally, let M=2\u2062√(F_X,^2+F_Y,^2+(F_Z+1,)^2,) . Then the values assigned
20662 to the S and T texture coordinates are
20668 To enable or disable a texture-coordinate generation function, call
20669 `glEnable' or `glDisable' with one of the symbolic texture-coordinate
20670 names (`GL_TEXTURE_GEN_S', `GL_TEXTURE_GEN_T', `GL_TEXTURE_GEN_R', or
20671 `GL_TEXTURE_GEN_Q') as the argument. When enabled, the specified texture
20672 coordinate is computed according to the generating function associated
20673 with that coordinate. When disabled, subsequent vertices take the
20674 specified texture coordinate from the current set of texture
20675 coordinates. Initially, all texture generation functions are set to
20676 `GL_EYE_LINEAR' and are disabled. Both S plane equations are (1, 0, 0,
20677 0), both T plane equations are (0, 1, 0, 0), and all R and Q plane
20678 equations are (0, 0, 0, 0).
20680 When the `ARB_multitexture' extension is supported, `glTexGen' sets the
20681 texture generation parameters for the currently active texture unit,
20682 selected with `glActiveTexture'.
20684 `GL_INVALID_ENUM' is generated when COORD or PNAME is not an accepted
20685 defined value, or when PNAME is `GL_TEXTURE_GEN_MODE' and PARAMS is not
20686 an accepted defined value.
20688 `GL_INVALID_ENUM' is generated when PNAME is `GL_TEXTURE_GEN_MODE',
20689 PARAMS is `GL_SPHERE_MAP', and COORD is either `GL_R' or `GL_Q'.
20691 `GL_INVALID_OPERATION' is generated if `glTexGen' is executed between
20692 the execution of `glBegin' and the corresponding execution of `glEnd'.")
20694 (define-gl-procedures
20698 (internalFormat GLint)
20703 (data const-GLvoid-*)
20706 "Specify a one-dimensional texture image.
20709 Specifies the target texture. Must be `GL_TEXTURE_1D' or
20710 `GL_PROXY_TEXTURE_1D'.
20713 Specifies the level-of-detail number. Level 0 is the base image
20714 level. Level N is the Nth mipmap reduction image.
20717 Specifies the number of color components in the texture. Must be 1,
20718 2, 3, or 4, or one of the following symbolic constants: `GL_ALPHA',
20719 `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
20720 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
20721 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
20722 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT',
20723 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24',
20724 `GL_DEPTH_COMPONENT32', `GL_LUMINANCE', `GL_LUMINANCE4',
20725 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
20726 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
20727 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
20728 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
20729 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
20730 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
20731 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
20732 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
20733 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
20734 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
20735 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
20739 Specifies the width of the texture image including the border if
20740 any. If the GL version does not support non-power-of-two sizes,
20741 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
20742 implementations support texture images that are at least 64 texels
20743 wide. The height of the 1D texture image is 1.
20746 Specifies the width of the border. Must be either 0 or 1.
20749 Specifies the format of the pixel data. The following symbolic
20750 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
20751 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
20752 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
20755 Specifies the data type of the pixel data. The following symbolic
20756 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
20757 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
20758 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20759 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
20760 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20761 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20762 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20763 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
20766 Specifies a pointer to the image data in memory.
20768 Texturing maps a portion of a specified texture image onto each
20769 graphical primitive for which texturing is enabled. To enable and
20770 disable one-dimensional texturing, call `glEnable' and `glDisable' with
20771 argument `GL_TEXTURE_1D'.
20773 Texture images are defined with `glTexImage1D'. The arguments describe
20774 the parameters of the texture image, such as width, width of the border,
20775 level-of-detail number (see `glTexParameter'), and the internal
20776 resolution and format used to store the image. The last three arguments
20777 describe how the image is represented in memory; they are identical to
20778 the pixel formats used for `glDrawPixels'.
20780 If TARGET is `GL_PROXY_TEXTURE_1D', no data is read from DATA, but all
20781 of the texture image state is recalculated, checked for consistency, and
20782 checked against the implementation's capabilities. If the implementation
20783 cannot handle a texture of the requested texture size, it sets all of
20784 the image state to 0, but does not generate an error (see `glGetError').
20785 To query for an entire mipmap array, use an image array level greater
20786 than or equal to 1.
20788 If TARGET is `GL_TEXTURE_1D', data is read from DATA as a sequence of
20789 signed or unsigned bytes, shorts, or longs, or single-precision
20790 floating-point values, depending on TYPE. These values are grouped into
20791 sets of one, two, three, or four values, depending on FORMAT, to form
20792 elements. If TYPE is `GL_BITMAP', the data is considered as a string of
20793 unsigned bytes (and FORMAT must be `GL_COLOR_INDEX'). Each data byte is
20794 treated as eight 1-bit elements, with bit ordering determined by
20795 `GL_UNPACK_LSB_FIRST' (see `glPixelStore').
20797 If a non-zero named buffer object is bound to the
20798 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
20799 image is specified, DATA is treated as a byte offset into the buffer
20800 object's data store.
20802 The first element corresponds to the left end of the texture array.
20803 Subsequent elements progress left-to-right through the remaining texels
20804 in the texture array. The final element corresponds to the right end of
20807 FORMAT determines the composition of each element in DATA. It can assume
20808 one of these symbolic values:
20811 Each element is a single value, a color index. The GL converts it
20812 to fixed point (with an unspecified number of zero bits to the
20813 right of the binary point), shifted left or right depending on the
20814 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
20815 (see `glPixelTransfer'). The resulting index is converted to a set
20816 of color components using the `GL_PIXEL_MAP_I_TO_R',
20817 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
20818 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
20821 Each element is a single red component. The GL converts it to
20822 floating point and assembles it into an RGBA element by attaching 0
20823 for green and blue, and 1 for alpha. Each component is then
20824 multiplied by the signed scale factor `GL_c_SCALE', added to the
20825 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20826 `glPixelTransfer').
20829 Each element is a single green component. The GL converts it to
20830 floating point and assembles it into an RGBA element by attaching 0
20831 for red and blue, and 1 for alpha. Each component is then
20832 multiplied by the signed scale factor `GL_c_SCALE', added to the
20833 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20834 `glPixelTransfer').
20837 Each element is a single blue component. The GL converts it to
20838 floating point and assembles it into an RGBA element by attaching 0
20839 for red and green, and 1 for alpha. Each component is then
20840 multiplied by the signed scale factor `GL_c_SCALE', added to the
20841 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20842 `glPixelTransfer').
20845 Each element is a single alpha component. The GL converts it to
20846 floating point and assembles it into an RGBA element by attaching 0
20847 for red, green, and blue. Each component is then multiplied by the
20848 signed scale factor `GL_c_SCALE', added to the signed bias
20849 `GL_c_BIAS', and clamped to the range [0,1] (see
20850 `glPixelTransfer').
20853 Each element is a single intensity value. The GL converts it to
20854 floating point, then assembles it into an RGBA element by
20855 replicating the intensity value three times for red, green, blue,
20856 and alpha. Each component is then multiplied by the signed scale
20857 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
20858 clamped to the range [0,1] (see `glPixelTransfer').
20862 Each element is an RGB triple. The GL converts it to floating point
20863 and assembles it into an RGBA element by attaching 1 for alpha.
20864 Each component is then multiplied by the signed scale factor
20865 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20866 the range [0,1] (see `glPixelTransfer').
20870 Each element contains all four components. Each component is
20871 multiplied by the signed scale factor `GL_c_SCALE', added to the
20872 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20873 `glPixelTransfer').
20876 Each element is a single luminance value. The GL converts it to
20877 floating point, then assembles it into an RGBA element by
20878 replicating the luminance value three times for red, green, and
20879 blue and attaching 1 for alpha. Each component is then multiplied
20880 by the signed scale factor `GL_c_SCALE', added to the signed bias
20881 `GL_c_BIAS', and clamped to the range [0,1] (see
20882 `glPixelTransfer').
20884 `GL_LUMINANCE_ALPHA'
20885 Each element is a luminance/alpha pair. The GL converts it to
20886 floating point, then assembles it into an RGBA element by
20887 replicating the luminance value three times for red, green, and
20888 blue. Each component is then multiplied by the signed scale factor
20889 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20890 the range [0,1] (see `glPixelTransfer').
20892 `GL_DEPTH_COMPONENT'
20893 Each element is a single depth value. The GL converts it to
20894 floating point, multiplies by the signed scale factor
20895 `GL_DEPTH_SCALE', adds the signed bias `GL_DEPTH_BIAS', and clamps
20896 to the range [0,1] (see `glPixelTransfer').
20898 Refer to the `glDrawPixels' reference page for a description of the
20899 acceptable values for the TYPE parameter.
20901 If an application wants to store the texture at a certain resolution or
20902 in a certain format, it can request the resolution and format with
20903 INTERNALFORMAT. The GL will choose an internal representation that
20904 closely approximates that requested by INTERNALFORMAT, but it may not
20905 match exactly. (The representations specified by `GL_LUMINANCE',
20906 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
20907 numeric values 1, 2, 3, and 4 may also be used to specify the above
20910 If the INTERNALFORMAT parameter is one of the generic compressed
20911 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
20912 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
20913 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
20914 internal format with the symbolic constant for a specific internal
20915 format and compress the texture before storage. If no corresponding
20916 internal format is available, or the GL can not compress that image for
20917 any reason, the internal format is instead replaced with a corresponding
20918 base internal format.
20920 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
20921 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
20922 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
20923 treated as if the red, green, blue, or luminance components are encoded
20924 in the sRGB color space. Any alpha component is left unchanged. The
20925 conversion from the sRGB encoded component C_S to a linear component C_L
20928 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
20931 Assume C_S is the sRGB component in the range [0,1].
20933 Use the `GL_PROXY_TEXTURE_1D' target to try out a resolution and format.
20934 The implementation will update and recompute its best match for the
20935 requested storage resolution and format. To then query this state, call
20936 `glGetTexLevelParameter'. If the texture cannot be accommodated, texture
20939 A one-component texture image uses only the red component of the RGBA
20940 color from DATA. A two-component image uses the R and A values. A
20941 three-component image uses the R, G, and B values. A four-component
20942 image uses all of the RGBA components.
20944 Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures
20945 during texture filtering and application.\xa0Image-based shadowing\xa0can\xa0be
20946 \xa0enabled\xa0by\xa0comparing texture r coordinates to depth texture values to
20947 generate a boolean result. See `glTexParameter' for details on texture
20950 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_1D' or
20951 `GL_PROXY_TEXTURE_1D'.
20953 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
20954 constant. Format constants other than `GL_STENCIL_INDEX' are accepted.
20956 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
20958 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
20961 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
20963 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
20964 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
20966 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
20967 one of the accepted resolution and format symbolic constants.
20969 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
20970 2 + `GL_MAX_TEXTURE_SIZE'.
20972 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
20973 supported and the WIDTH cannot be represented as 2^N+2\u2061(BORDER,) for
20974 some integer value of N.
20976 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
20978 `GL_INVALID_OPERATION' is generated if TYPE is one of
20979 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20980 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
20983 `GL_INVALID_OPERATION' is generated if TYPE is one of
20984 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20985 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20986 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20987 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
20988 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
20990 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
20991 and INTERNALFORMAT is not `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
20992 `GL_DEPTH_COMPONENT24', or `GL_DEPTH_COMPONENT32'.
20994 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
20995 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
20996 `GL_DEPTH_COMPONENT32', and FORMAT is not `GL_DEPTH_COMPONENT'.
20998 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20999 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21000 data store is currently mapped.
21002 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21003 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21004 unpacked from the buffer object such that the memory reads required
21005 would exceed the data store size.
21007 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21008 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21009 divisible into the number of bytes needed to store in memory a datum
21012 `GL_INVALID_OPERATION' is generated if `glTexImage1D' is executed
21013 between the execution of `glBegin' and the corresponding execution of
21016 (define-gl-procedures
21020 (internalFormat GLint)
21026 (data const-GLvoid-*)
21029 "Specify a two-dimensional texture image.
21032 Specifies the target texture. Must be `GL_TEXTURE_2D',
21033 `GL_PROXY_TEXTURE_2D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
21034 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
21035 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
21036 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
21039 Specifies the level-of-detail number. Level 0 is the base image
21040 level. Level N is the Nth mipmap reduction image.
21043 Specifies the number of color components in the texture. Must be 1,
21044 2, 3, or 4, or one of the following symbolic constants: `GL_ALPHA',
21045 `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
21046 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
21047 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
21048 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT',
21049 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24',
21050 `GL_DEPTH_COMPONENT32', `GL_LUMINANCE', `GL_LUMINANCE4',
21051 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
21052 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
21053 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
21054 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
21055 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
21056 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
21057 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
21058 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
21059 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
21060 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
21061 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
21065 Specifies the width of the texture image including the border if
21066 any. If the GL version does not support non-power-of-two sizes,
21067 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
21068 implementations support texture images that are at least 64 texels
21072 Specifies the height of the texture image including the border if
21073 any. If the GL version does not support non-power-of-two sizes,
21074 this value must be 2^M+2\u2061(BORDER,) for some integer M . All
21075 implementations support texture images that are at least 64 texels
21079 Specifies the width of the border. Must be either 0 or 1.
21082 Specifies the format of the pixel data. The following symbolic
21083 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
21084 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
21085 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
21088 Specifies the data type of the pixel data. The following symbolic
21089 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
21090 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
21091 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21092 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
21093 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21094 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21095 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21096 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
21099 Specifies a pointer to the image data in memory.
21101 Texturing maps a portion of a specified texture image onto each
21102 graphical primitive for which texturing is enabled. To enable and
21103 disable two-dimensional texturing, call `glEnable' and `glDisable' with
21104 argument `GL_TEXTURE_2D'. To enable and disable texturing using
21105 cube-mapped texture, call `glEnable' and `glDisable' with argument
21106 `GL_TEXTURE_CUBE_MAP'.
21108 To define texture images, call `glTexImage2D'. The arguments describe
21109 the parameters of the texture image, such as height, width, width of the
21110 border, level-of-detail number (see `glTexParameter'), and number of
21111 color components provided. The last three arguments describe how the
21112 image is represented in memory; they are identical to the pixel formats
21113 used for `glDrawPixels'.
21115 If TARGET is `GL_PROXY_TEXTURE_2D' or `GL_PROXY_TEXTURE_CUBE_MAP', no
21116 data is read from DATA, but all of the texture image state is
21117 recalculated, checked for consistency, and checked against the
21118 implementation's capabilities. If the implementation cannot handle a
21119 texture of the requested texture size, it sets all of the image state to
21120 0, but does not generate an error (see `glGetError'). To query for an
21121 entire mipmap array, use an image array level greater than or equal to
21124 If TARGET is `GL_TEXTURE_2D', or one of the `GL_TEXTURE_CUBE_MAP'
21125 targets, data is read from DATA as a sequence of signed or unsigned
21126 bytes, shorts, or longs, or single-precision floating-point values,
21127 depending on TYPE. These values are grouped into sets of one, two,
21128 three, or four values, depending on FORMAT, to form elements. If TYPE is
21129 `GL_BITMAP', the data is considered as a string of unsigned bytes (and
21130 FORMAT must be `GL_COLOR_INDEX'). Each data byte is treated as eight
21131 1-bit elements, with bit ordering determined by `GL_UNPACK_LSB_FIRST'
21132 (see `glPixelStore').
21134 If a non-zero named buffer object is bound to the
21135 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
21136 image is specified, DATA is treated as a byte offset into the buffer
21137 object's data store.
21139 The first element corresponds to the lower left corner of the texture
21140 image. Subsequent elements progress left-to-right through the remaining
21141 texels in the lowest row of the texture image, and then in successively
21142 higher rows of the texture image. The final element corresponds to the
21143 upper right corner of the texture image.
21145 FORMAT determines the composition of each element in DATA. It can assume
21146 one of these symbolic values:
21149 Each element is a single value, a color index. The GL converts it
21150 to fixed point (with an unspecified number of zero bits to the
21151 right of the binary point), shifted left or right depending on the
21152 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
21153 (see `glPixelTransfer'). The resulting index is converted to a set
21154 of color components using the `GL_PIXEL_MAP_I_TO_R',
21155 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
21156 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
21159 Each element is a single red component. The GL converts it to
21160 floating point and assembles it into an RGBA element by attaching 0
21161 for green and blue, and 1 for alpha. Each component is then
21162 multiplied by the signed scale factor `GL_c_SCALE', added to the
21163 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21164 `glPixelTransfer').
21167 Each element is a single green component. The GL converts it to
21168 floating point and assembles it into an RGBA element by attaching 0
21169 for red and blue, and 1 for alpha. Each component is then
21170 multiplied by the signed scale factor `GL_c_SCALE', added to the
21171 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21172 `glPixelTransfer').
21175 Each element is a single blue component. The GL converts it to
21176 floating point and assembles it into an RGBA element by attaching 0
21177 for red and green, and 1 for alpha. Each component is then
21178 multiplied by the signed scale factor `GL_c_SCALE', added to the
21179 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21180 `glPixelTransfer').
21183 Each element is a single alpha component. The GL converts it to
21184 floating point and assembles it into an RGBA element by attaching 0
21185 for red, green, and blue. Each component is then multiplied by the
21186 signed scale factor `GL_c_SCALE', added to the signed bias
21187 `GL_c_BIAS', and clamped to the range [0,1] (see
21188 `glPixelTransfer').
21191 Each element is a single intensity value. The GL converts it to
21192 floating point, then assembles it into an RGBA element by
21193 replicating the intensity value three times for red, green, blue,
21194 and alpha. Each component is then multiplied by the signed scale
21195 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
21196 clamped to the range [0,1] (see `glPixelTransfer').
21200 Each element is an RGB triple. The GL converts it to floating point
21201 and assembles it into an RGBA element by attaching 1 for alpha.
21202 Each component is then multiplied by the signed scale factor
21203 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
21204 the range [0,1] (see `glPixelTransfer').
21208 Each element contains all four components. Each component is
21209 multiplied by the signed scale factor `GL_c_SCALE', added to the
21210 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21211 `glPixelTransfer').
21214 Each element is a single luminance value. The GL converts it to
21215 floating point, then assembles it into an RGBA element by
21216 replicating the luminance value three times for red, green, and
21217 blue and attaching 1 for alpha. Each component is then multiplied
21218 by the signed scale factor `GL_c_SCALE', added to the signed bias
21219 `GL_c_BIAS', and clamped to the range [0,1] (see
21220 `glPixelTransfer').
21222 `GL_LUMINANCE_ALPHA'
21223 Each element is a luminance/alpha pair. The GL converts it to
21224 floating point, then assembles it into an RGBA element by
21225 replicating the luminance value three times for red, green, and
21226 blue. Each component is then multiplied by the signed scale factor
21227 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
21228 the range [0,1] (see `glPixelTransfer').
21230 `GL_DEPTH_COMPONENT'
21231 Each element is a single depth value. The GL converts it to
21232 floating point, multiplies by the signed scale factor
21233 `GL_DEPTH_SCALE', adds the signed bias `GL_DEPTH_BIAS', and clamps
21234 to the range [0,1] (see `glPixelTransfer').
21236 Refer to the `glDrawPixels' reference page for a description of the
21237 acceptable values for the TYPE parameter.
21239 If an application wants to store the texture at a certain resolution or
21240 in a certain format, it can request the resolution and format with
21241 INTERNALFORMAT. The GL will choose an internal representation that
21242 closely approximates that requested by INTERNALFORMAT, but it may not
21243 match exactly. (The representations specified by `GL_LUMINANCE',
21244 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
21245 numeric values 1, 2, 3, and 4 may also be used to specify the above
21248 If the INTERNALFORMAT parameter is one of the generic compressed
21249 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
21250 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
21251 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
21252 internal format with the symbolic constant for a specific internal
21253 format and compress the texture before storage. If no corresponding
21254 internal format is available, or the GL can not compress that image for
21255 any reason, the internal format is instead replaced with a corresponding
21256 base internal format.
21258 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
21259 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
21260 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
21261 treated as if the red, green, blue, or luminance components are encoded
21262 in the sRGB color space. Any alpha component is left unchanged. The
21263 conversion from the sRGB encoded component C_S to a linear component C_L
21266 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
21269 Assume C_S is the sRGB component in the range [0,1].
21271 Use the `GL_PROXY_TEXTURE_2D' or `GL_PROXY_TEXTURE_CUBE_MAP' target to
21272 try out a resolution and format. The implementation will update and
21273 recompute its best match for the requested storage resolution and
21274 format. To then query this state, call `glGetTexLevelParameter'. If the
21275 texture cannot be accommodated, texture state is set to 0.
21277 A one-component texture image uses only the red component of the RGBA
21278 color extracted from DATA. A two-component image uses the R and A
21279 values. A three-component image uses the R, G, and B values. A
21280 four-component image uses all of the RGBA components.
21282 Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures
21283 during texture filtering and application.\xa0Image-based shadowing\xa0can\xa0be
21284 \xa0enabled\xa0by\xa0comparing texture r coordinates to depth texture values to
21285 generate a boolean result. See `glTexParameter' for details on texture
21288 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
21289 `GL_PROXY_TEXTURE_2D', `GL_PROXY_TEXTURE_CUBE_MAP',
21290 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
21291 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
21292 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
21294 `GL_INVALID_ENUM' is generated if TARGET is one of the six cube map 2D
21295 image targets and the width and height parameters are not equal.
21297 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
21299 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
21302 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0 or
21303 greater than 2 + `GL_MAX_TEXTURE_SIZE'.
21305 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
21307 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
21308 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21310 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
21311 one of the accepted resolution and format symbolic constants.
21313 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0 or
21314 greater than 2 + `GL_MAX_TEXTURE_SIZE'.
21316 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
21317 supported and the WIDTH or HEIGHT cannot be represented as
21318 2^K+2\u2061(BORDER,) for some integer value of K.
21320 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
21322 `GL_INVALID_OPERATION' is generated if TYPE is one of
21323 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21324 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21327 `GL_INVALID_OPERATION' is generated if TYPE is one of
21328 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21329 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21330 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21331 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21332 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21334 `GL_INVALID_OPERATION' is generated if TARGET is not `GL_TEXTURE_2D' or
21335 `GL_PROXY_TEXTURE_2D' and INTERNALFORMAT is `GL_DEPTH_COMPONENT',
21336 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
21337 `GL_DEPTH_COMPONENT32'.
21339 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
21340 and INTERNALFORMAT is not `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
21341 `GL_DEPTH_COMPONENT24', or `GL_DEPTH_COMPONENT32'.
21343 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
21344 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
21345 `GL_DEPTH_COMPONENT32', and FORMAT is not `GL_DEPTH_COMPONENT'.
21347 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21348 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21349 data store is currently mapped.
21351 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21352 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21353 unpacked from the buffer object such that the memory reads required
21354 would exceed the data store size.
21356 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21357 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21358 divisible into the number of bytes needed to store in memory a datum
21361 `GL_INVALID_OPERATION' is generated if `glTexImage2D' is executed
21362 between the execution of `glBegin' and the corresponding execution of
21365 (define-gl-procedures
21369 (internalFormat GLint)
21376 (data const-GLvoid-*)
21379 "Specify a three-dimensional texture image.
21382 Specifies the target texture. Must be `GL_TEXTURE_3D' or
21383 `GL_PROXY_TEXTURE_3D'.
21386 Specifies the level-of-detail number. Level 0 is the base image
21387 level. Level N is the N^TH mipmap reduction image.
21390 Specifies the number of color components in the texture. Must be 1,
21391 2, 3, or 4, or one of the following symbolic constants: `GL_ALPHA',
21392 `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
21393 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
21394 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
21395 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_LUMINANCE',
21396 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
21397 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
21398 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
21399 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
21400 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
21401 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
21402 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
21403 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
21404 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
21405 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
21406 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
21410 Specifies the width of the texture image including the border if
21411 any. If the GL version does not support non-power-of-two sizes,
21412 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
21413 implementations support 3D texture images that are at least 16
21417 Specifies the height of the texture image including the border if
21418 any. If the GL version does not support non-power-of-two sizes,
21419 this value must be 2^M+2\u2061(BORDER,) for some integer M . All
21420 implementations support 3D texture images that are at least 16
21424 Specifies the depth of the texture image including the border if
21425 any. If the GL version does not support non-power-of-two sizes,
21426 this value must be 2^K+2\u2061(BORDER,) for some integer K . All
21427 implementations support 3D texture images that are at least 16
21431 Specifies the width of the border. Must be either 0 or 1.
21434 Specifies the format of the pixel data. The following symbolic
21435 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
21436 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
21437 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
21440 Specifies the data type of the pixel data. The following symbolic
21441 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
21442 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
21443 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21444 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
21445 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21446 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21447 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21448 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
21451 Specifies a pointer to the image data in memory.
21453 Texturing maps a portion of a specified texture image onto each
21454 graphical primitive for which texturing is enabled. To enable and
21455 disable three-dimensional texturing, call `glEnable' and `glDisable'
21456 with argument `GL_TEXTURE_3D'.
21458 To define texture images, call `glTexImage3D'. The arguments describe
21459 the parameters of the texture image, such as height, width, depth, width
21460 of the border, level-of-detail number (see `glTexParameter'), and number
21461 of color components provided. The last three arguments describe how the
21462 image is represented in memory; they are identical to the pixel formats
21463 used for `glDrawPixels'.
21465 If TARGET is `GL_PROXY_TEXTURE_3D', no data is read from DATA, but all
21466 of the texture image state is recalculated, checked for consistency, and
21467 checked against the implementation's capabilities. If the implementation
21468 cannot handle a texture of the requested texture size, it sets all of
21469 the image state to 0, but does not generate an error (see `glGetError').
21470 To query for an entire mipmap array, use an image array level greater
21471 than or equal to 1.
21473 If TARGET is `GL_TEXTURE_3D', data is read from DATA as a sequence of
21474 signed or unsigned bytes, shorts, or longs, or single-precision
21475 floating-point values, depending on TYPE. These values are grouped into
21476 sets of one, two, three, or four values, depending on FORMAT, to form
21477 elements. If TYPE is `GL_BITMAP', the data is considered as a string of
21478 unsigned bytes (and FORMAT must be `GL_COLOR_INDEX'). Each data byte is
21479 treated as eight 1-bit elements, with bit ordering determined by
21480 `GL_UNPACK_LSB_FIRST' (see `glPixelStore').
21482 If a non-zero named buffer object is bound to the
21483 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
21484 image is specified, DATA is treated as a byte offset into the buffer
21485 object's data store.
21487 The first element corresponds to the lower left corner of the texture
21488 image. Subsequent elements progress left-to-right through the remaining
21489 texels in the lowest row of the texture image, and then in successively
21490 higher rows of the texture image. The final element corresponds to the
21491 upper right corner of the texture image.
21493 FORMAT determines the composition of each element in DATA. It can assume
21494 one of these symbolic values:
21497 Each element is a single value, a color index. The GL converts it
21498 to fixed point (with an unspecified number of zero bits to the
21499 right of the binary point), shifted left or right depending on the
21500 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
21501 (see `glPixelTransfer'). The resulting index is converted to a set
21502 of color components using the `GL_PIXEL_MAP_I_TO_R',
21503 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
21504 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
21507 Each element is a single red component. The GL converts it to
21508 floating point and assembles it into an RGBA element by attaching 0
21509 for green and blue, and 1 for alpha. Each component is then
21510 multiplied by the signed scale factor `GL_c_SCALE', added to the
21511 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21512 `glPixelTransfer').
21515 Each element is a single green component. The GL converts it to
21516 floating point and assembles it into an RGBA element by attaching 0
21517 for red and blue, and 1 for alpha. Each component is then
21518 multiplied by the signed scale factor `GL_c_SCALE', added to the
21519 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21520 `glPixelTransfer').
21523 Each element is a single blue component. The GL converts it to
21524 floating point and assembles it into an RGBA element by attaching 0
21525 for red and green, and 1 for alpha. Each component is then
21526 multiplied by the signed scale factor `GL_c_SCALE', added to the
21527 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21528 `glPixelTransfer').
21531 Each element is a single alpha component. The GL converts it to
21532 floating point and assembles it into an RGBA element by attaching 0
21533 for red, green, and blue. Each component is then multiplied by the
21534 signed scale factor `GL_c_SCALE', added to the signed bias
21535 `GL_c_BIAS', and clamped to the range [0,1] (see
21536 `glPixelTransfer').
21539 Each element is a single intensity value. The GL converts it to
21540 floating point, then assembles it into an RGBA element by
21541 replicating the intensity value three times for red, green, blue,
21542 and alpha. Each component is then multiplied by the signed scale
21543 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
21544 clamped to the range [0,1] (see `glPixelTransfer').
21548 Each element is an RGB triple. The GL converts it to floating point
21549 and assembles it into an RGBA element by attaching 1 for alpha.
21550 Each component is then multiplied by the signed scale factor
21551 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
21552 the range [0,1] (see `glPixelTransfer').
21556 Each element contains all four components. Each component is
21557 multiplied by the signed scale factor `GL_c_SCALE', added to the
21558 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
21559 `glPixelTransfer').
21562 Each element is a single luminance value. The GL converts it to
21563 floating point, then assembles it into an RGBA element by
21564 replicating the luminance value three times for red, green, and
21565 blue and attaching 1 for alpha. Each component is then multiplied
21566 by the signed scale factor `GL_c_SCALE', added to the signed bias
21567 `GL_c_BIAS', and clamped to the range [0,1] (see
21568 `glPixelTransfer').
21570 `GL_LUMINANCE_ALPHA'
21571 Each element is a luminance/alpha pair. The GL converts it to
21572 floating point, then assembles it into an RGBA element by
21573 replicating the luminance value three times for red, green, and
21574 blue. Each component is then multiplied by the signed scale factor
21575 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
21576 the range [0,1] (see `glPixelTransfer').
21578 Refer to the `glDrawPixels' reference page for a description of the
21579 acceptable values for the TYPE parameter.
21581 If an application wants to store the texture at a certain resolution or
21582 in a certain format, it can request the resolution and format with
21583 INTERNALFORMAT. The GL will choose an internal representation that
21584 closely approximates that requested by INTERNALFORMAT, but it may not
21585 match exactly. (The representations specified by `GL_LUMINANCE',
21586 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
21587 numeric values 1, 2, 3, and 4 may also be used to specify the above
21590 If the INTERNALFORMAT parameter is one of the generic compressed
21591 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
21592 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
21593 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
21594 internal format with the symbolic constant for a specific internal
21595 format and compress the texture before storage. If no corresponding
21596 internal format is available, or the GL can not compress that image for
21597 any reason, the internal format is instead replaced with a corresponding
21598 base internal format.
21600 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
21601 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
21602 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
21603 treated as if the red, green, blue, or luminance components are encoded
21604 in the sRGB color space. Any alpha component is left unchanged. The
21605 conversion from the sRGB encoded component C_S to a linear component C_L
21608 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
21611 Assume C_S is the sRGB component in the range [0,1].
21613 Use the `GL_PROXY_TEXTURE_3D' target to try out a resolution and format.
21614 The implementation will update and recompute its best match for the
21615 requested storage resolution and format. To then query this state, call
21616 `glGetTexLevelParameter'. If the texture cannot be accommodated, texture
21619 A one-component texture image uses only the red component of the RGBA
21620 color extracted from DATA. A two-component image uses the R and A
21621 values. A three-component image uses the R, G, and B values. A
21622 four-component image uses all of the RGBA components.
21624 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_3D' or
21625 `GL_PROXY_TEXTURE_3D'.
21627 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
21628 constant. Format constants other than `GL_STENCIL_INDEX' and
21629 `GL_DEPTH_COMPONENT' are accepted.
21631 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
21633 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
21636 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
21638 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
21639 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21641 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
21642 one of the accepted resolution and format symbolic constants.
21644 `GL_INVALID_VALUE' is generated if WIDTH, HEIGHT, or DEPTH is less than
21645 0 or greater than 2 + `GL_MAX_TEXTURE_SIZE'.
21647 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
21648 supported and the WIDTH, HEIGHT, or DEPTH cannot be represented as
21649 2^K+2\u2061(BORDER,) for some integer value of K.
21651 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
21653 `GL_INVALID_OPERATION' is generated if TYPE is one of
21654 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21655 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21658 `GL_INVALID_OPERATION' is generated if TYPE is one of
21659 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21660 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21661 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21662 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21663 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21665 `GL_INVALID_OPERATION' is generated if FORMAT or INTERNALFORMAT is
21666 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
21667 `GL_DEPTH_COMPONENT32'.
21669 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21670 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21671 data store is currently mapped.
21673 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21674 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21675 unpacked from the buffer object such that the memory reads required
21676 would exceed the data store size.
21678 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21679 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21680 divisible into the number of bytes needed to store in memory a datum
21683 `GL_INVALID_OPERATION' is generated if `glTexImage3D' is executed
21684 between the execution of `glBegin' and the corresponding execution of
21687 (define-gl-procedures
21703 (params const-GLfloat-*)
21709 (params const-GLint-*)
21712 "Set texture parameters.
21715 Specifies the target texture, which must be either `GL_TEXTURE_1D',
21716 `GL_TEXTURE_2D', `GL_TEXTURE_3D', or `GL_TEXTURE_CUBE_MAP'.
21719 Specifies the symbolic name of a single-valued texture parameter.
21720 PNAME can be one of the following: `GL_TEXTURE_MIN_FILTER',
21721 `GL_TEXTURE_MAG_FILTER', `GL_TEXTURE_MIN_LOD',
21722 `GL_TEXTURE_MAX_LOD', `GL_TEXTURE_BASE_LEVEL',
21723 `GL_TEXTURE_MAX_LEVEL', `GL_TEXTURE_WRAP_S', `GL_TEXTURE_WRAP_T',
21724 `GL_TEXTURE_WRAP_R', `GL_TEXTURE_PRIORITY',
21725 `GL_TEXTURE_COMPARE_MODE', `GL_TEXTURE_COMPARE_FUNC',
21726 `GL_DEPTH_TEXTURE_MODE', or `GL_GENERATE_MIPMAP'.
21729 Specifies the value of PNAME.
21731 Texture mapping is a technique that applies an image onto an object's
21732 surface as if the image were a decal or cellophane shrink-wrap. The
21733 image is created in texture space, with an (S , T ) coordinate system. A
21734 texture is a one- or two-dimensional image and a set of parameters that
21735 determine how samples are derived from the image.
21737 `glTexParameter' assigns the value or values in PARAMS to the texture
21738 parameter specified as PNAME. TARGET defines the target texture, either
21739 `GL_TEXTURE_1D', `GL_TEXTURE_2D', or `GL_TEXTURE_3D'. The following
21740 symbols are accepted in PNAME:
21742 `GL_TEXTURE_MIN_FILTER'
21743 The texture minifying function is used whenever the pixel being
21744 textured maps to an area greater than one texture element. There
21745 are six defined minifying functions. Two of them use the nearest
21746 one or nearest four texture elements to compute the texture value.
21747 The other four use mipmaps.
21749 A mipmap is an ordered set of arrays representing the same image at
21750 progressively lower resolutions. If the texture has dimensions
21751 2^N×2^M , there are MAX\u2061(N,M)+1 mipmaps. The first mipmap is the
21752 original texture, with dimensions 2^N×2^M . Each subsequent mipmap
21753 has dimensions 2^K-1,×2^L-1, , where 2^K×2^L are the dimensions of
21754 the previous mipmap, until either K=0 or L=0 . At that point,
21755 subsequent mipmaps have dimension 1×2^L-1, or 2^K-1,×1 until the
21756 final mipmap, which has dimension 1×1 . To define the mipmaps, call
21757 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glCopyTexImage1D',
21758 or `glCopyTexImage2D' with the LEVEL argument indicating the order
21759 of the mipmaps. Level 0 is the original texture; level MAX\u2061(N,M) is
21760 the final 1×1 mipmap.
21762 PARAMS supplies a function for minifying the texture as one of the
21765 As more texture elements are sampled in the minification process,
21766 fewer aliasing artifacts will be apparent. While the `GL_NEAREST'
21767 and `GL_LINEAR' minification functions can be faster than the other
21768 four, they sample only one or four texture elements to determine
21769 the texture value of the pixel being rendered and can produce moire
21770 patterns or ragged transitions. The initial value of
21771 `GL_TEXTURE_MIN_FILTER' is `GL_NEAREST_MIPMAP_LINEAR'.
21773 `GL_TEXTURE_MAG_FILTER'
21774 The texture magnification function is used when the pixel being
21775 textured maps to an area less than or equal to one texture element.
21776 It sets the texture magnification function to either `GL_NEAREST'
21777 or `GL_LINEAR' (see below). `GL_NEAREST' is generally faster than
21778 `GL_LINEAR', but it can produce textured images with sharper edges
21779 because the transition between texture elements is not as smooth.
21780 The initial value of `GL_TEXTURE_MAG_FILTER' is `GL_LINEAR'.
21783 Returns the value of the texture element that is nearest (in
21784 Manhattan distance) to the center of the pixel being textured.
21787 Returns the weighted average of the four texture elements that are
21788 closest to the center of the pixel being textured. These can
21789 include border texture elements, depending on the values of
21790 `GL_TEXTURE_WRAP_S' and `GL_TEXTURE_WRAP_T', and on the exact
21793 `GL_NEAREST_MIPMAP_NEAREST'
21794 Chooses the mipmap that most closely matches the size of the pixel
21795 being textured and uses the `GL_NEAREST' criterion (the texture
21796 element nearest to the center of the pixel) to produce a texture
21799 `GL_LINEAR_MIPMAP_NEAREST'
21800 Chooses the mipmap that most closely matches the size of the pixel
21801 being textured and uses the `GL_LINEAR' criterion (a weighted
21802 average of the four texture elements that are closest to the center
21803 of the pixel) to produce a texture value.
21805 `GL_NEAREST_MIPMAP_LINEAR'
21806 Chooses the two mipmaps that most closely match the size of the
21807 pixel being textured and uses the `GL_NEAREST' criterion (the
21808 texture element nearest to the center of the pixel) to produce a
21809 texture value from each mipmap. The final texture value is a
21810 weighted average of those two values.
21812 `GL_LINEAR_MIPMAP_LINEAR'
21813 Chooses the two mipmaps that most closely match the size of the
21814 pixel being textured and uses the `GL_LINEAR' criterion (a weighted
21815 average of the four texture elements that are closest to the center
21816 of the pixel) to produce a texture value from each mipmap. The
21817 final texture value is a weighted average of those two values.
21820 Returns the value of the texture element that is nearest (in
21821 Manhattan distance) to the center of the pixel being textured.
21824 Returns the weighted average of the four texture elements that are
21825 closest to the center of the pixel being textured. These can
21826 include border texture elements, depending on the values of
21827 `GL_TEXTURE_WRAP_S' and `GL_TEXTURE_WRAP_T', and on the exact
21832 `GL_TEXTURE_MIN_LOD'
21833 Sets the minimum level-of-detail parameter. This floating-point
21834 value limits the selection of highest resolution mipmap (lowest
21835 mipmap level). The initial value is -1000.
21839 `GL_TEXTURE_MAX_LOD'
21840 Sets the maximum level-of-detail parameter. This floating-point
21841 value limits the selection of the lowest resolution mipmap (highest
21842 mipmap level). The initial value is 1000.
21846 `GL_TEXTURE_BASE_LEVEL'
21847 Specifies the index of the lowest defined mipmap level. This is an
21848 integer value. The initial value is 0.
21852 `GL_TEXTURE_MAX_LEVEL'
21853 Sets the index of the highest defined mipmap level. This is an
21854 integer value. The initial value is 1000.
21858 `GL_TEXTURE_WRAP_S'
21859 Sets the wrap parameter for texture coordinate S to either
21860 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21861 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. `GL_CLAMP' causes S
21862 coordinates to be clamped to the range [0,1] and is useful for
21863 preventing wrapping artifacts when mapping a single image onto an
21864 object. `GL_CLAMP_TO_BORDER' causes the S coordinate to be clamped
21865 to the range [-1/2N,,1+1/2N,] , where N is the size of the texture
21866 in the direction of clamping.`GL_CLAMP_TO_EDGE' causes S
21867 coordinates to be clamped to the range [1/2N,,1-1/2N,] , where N is
21868 the size of the texture in the direction of clamping. `GL_REPEAT'
21869 causes the integer part of the S coordinate to be ignored; the GL
21870 uses only the fractional part, thereby creating a repeating
21871 pattern. `GL_MIRRORED_REPEAT' causes the S coordinate to be set to
21872 the fractional part of the texture coordinate if the integer part
21873 of S is even; if the integer part of S is odd, then the S texture
21874 coordinate is set to 1-FRAC\u2061(S,) , where FRAC\u2061(S,) represents the
21875 fractional part of S . Border texture elements are accessed only if
21876 wrapping is set to `GL_CLAMP' or `GL_CLAMP_TO_BORDER'. Initially,
21877 `GL_TEXTURE_WRAP_S' is set to `GL_REPEAT'.
21881 `GL_TEXTURE_WRAP_T'
21882 Sets the wrap parameter for texture coordinate T to either
21883 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21884 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. See the discussion under
21885 `GL_TEXTURE_WRAP_S'. Initially, `GL_TEXTURE_WRAP_T' is set to
21888 `GL_TEXTURE_WRAP_R'
21889 Sets the wrap parameter for texture coordinate R to either
21890 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21891 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. See the discussion under
21892 `GL_TEXTURE_WRAP_S'. Initially, `GL_TEXTURE_WRAP_R' is set to
21895 `GL_TEXTURE_BORDER_COLOR'
21896 Sets a border color. PARAMS contains four values that comprise the
21897 RGBA color of the texture border. Integer color components are
21898 interpreted linearly such that the most positive integer maps to
21899 1.0, and the most negative integer maps to -1.0. The values are
21900 clamped to the range [0,1] when they are specified. Initially, the
21901 border color is (0, 0, 0, 0).
21903 `GL_TEXTURE_PRIORITY'
21904 Specifies the texture residence priority of the currently bound
21905 texture. Permissible values are in the range [0,1] . See
21906 `glPrioritizeTextures' and `glBindTexture' for more information.
21908 `GL_TEXTURE_COMPARE_MODE'
21909 Specifies the texture comparison mode for currently bound depth
21910 textures. That is, a texture whose internal format is
21911 `GL_DEPTH_COMPONENT_*'; see `glTexImage2D') Permissible values are:
21913 `GL_TEXTURE_COMPARE_FUNC'
21914 Specifies the comparison operator used when
21915 `GL_TEXTURE_COMPARE_MODE' is set to `GL_COMPARE_R_TO_TEXTURE'.
21916 Permissible values are: where R is the current interpolated texture
21917 coordinate, and D_T is the depth texture value sampled from the
21918 currently bound depth texture. RESULT is assigned to the either the
21919 luminance, intensity, or alpha (as specified by
21920 `GL_DEPTH_TEXTURE_MODE'.)
21922 `GL_DEPTH_TEXTURE_MODE'
21923 Specifies a single symbolic constant indicating how depth values
21924 should be treated during filtering and texture application.
21925 Accepted values are `GL_LUMINANCE', `GL_INTENSITY', and `GL_ALPHA'.
21926 The initial value is `GL_LUMINANCE'.
21928 `GL_GENERATE_MIPMAP'
21929 Specifies a boolean value that indicates if all levels of a mipmap
21930 array should be automatically updated when any modification to the
21931 base level mipmap is done. The initial value is `GL_FALSE'.
21933 `GL_COMPARE_R_TO_TEXTURE'
21934 Specifies that the interpolated and clamped R texture coordinate
21935 should be compared to the value in the currently bound depth
21936 texture. See the discussion of `GL_TEXTURE_COMPARE_FUNC' for
21937 details of how the comparison is evaluated. The result of the
21938 comparison is assigned to luminance, intensity, or alpha (as
21939 specified by `GL_DEPTH_TEXTURE_MODE').
21942 Specifies that the luminance, intensity, or alpha (as specified by
21943 `GL_DEPTH_TEXTURE_MODE') should be assigned the appropriate value
21944 from the currently bound depth texture.
21946 *Texture Comparison Function*
21950 RESULT={(1.0), (0.0)\u2062\xa0(R<=D_T,), (R>D_T,),
21953 RESULT={(1.0), (0.0)\u2062\xa0(R>=D_T,), (R<D_T,),
21956 RESULT={(1.0), (0.0)\u2062\xa0(R<D_T,), (R>=D_T,),
21959 RESULT={(1.0), (0.0)\u2062\xa0(R>D_T,), (R<=D_T,),
21962 RESULT={(1.0), (0.0)\u2062\xa0(R=D_T,), (R≠D_T,),
21965 RESULT={(1.0), (0.0)\u2062\xa0(R≠D_T,), (R=D_T,),
21973 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not one of the
21974 accepted defined values.
21976 `GL_INVALID_ENUM' is generated if PARAMS should have a defined constant
21977 value (based on the value of PNAME) and does not.
21979 `GL_INVALID_OPERATION' is generated if `glTexParameter' is executed
21980 between the execution of `glBegin' and the corresponding execution of
21983 (define-gl-procedures
21991 (data const-GLvoid-*)
21994 "Specify a one-dimensional texture subimage.
21997 Specifies the target texture. Must be `GL_TEXTURE_1D'.
22000 Specifies the level-of-detail number. Level 0 is the base image
22001 level. Level N is the Nth mipmap reduction image.
22004 Specifies a texel offset in the x direction within the texture
22008 Specifies the width of the texture subimage.
22011 Specifies the format of the pixel data. The following symbolic
22012 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
22013 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
22014 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
22017 Specifies the data type of the pixel data. The following symbolic
22018 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
22019 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
22020 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22021 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
22022 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22023 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22024 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22025 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
22028 Specifies a pointer to the image data in memory.
22030 Texturing maps a portion of a specified texture image onto each
22031 graphical primitive for which texturing is enabled. To enable or disable
22032 one-dimensional texturing, call `glEnable' and `glDisable' with argument
22035 `glTexSubImage1D' redefines a contiguous subregion of an existing
22036 one-dimensional texture image. The texels referenced by DATA replace the
22037 portion of the existing texture array with x indices XOFFSET and
22038 XOFFSET+WIDTH-1 , inclusive. This region may not include any texels
22039 outside the range of the texture array as it was originally specified.
22040 It is not an error to specify a subtexture with width of 0, but such a
22041 specification has no effect.
22043 If a non-zero named buffer object is bound to the
22044 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
22045 image is specified, DATA is treated as a byte offset into the buffer
22046 object's data store.
22048 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
22051 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
22054 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
22056 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
22059 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
22061 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
22062 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
22064 `GL_INVALID_VALUE' is generated if XOFFSET<-B , or if
22065 (XOFFSET+WIDTH,)>(W-B,) , where W is the `GL_TEXTURE_WIDTH', and B is
22066 the width of the `GL_TEXTURE_BORDER' of the texture image being
22067 modified. Note that W includes twice the border width.
22069 `GL_INVALID_VALUE' is generated if WIDTH is less than 0.
22071 `GL_INVALID_OPERATION' is generated if the texture array has not been
22072 defined by a previous `glTexImage1D' operation.
22074 `GL_INVALID_OPERATION' is generated if TYPE is one of
22075 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22076 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
22079 `GL_INVALID_OPERATION' is generated if TYPE is one of
22080 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22081 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22082 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22083 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
22084 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
22086 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22087 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
22088 data store is currently mapped.
22090 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22091 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
22092 unpacked from the buffer object such that the memory reads required
22093 would exceed the data store size.
22095 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22096 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
22097 divisible into the number of bytes needed to store in memory a datum
22100 `GL_INVALID_OPERATION' is generated if `glTexSubImage1D' is executed
22101 between the execution of `glBegin' and the corresponding execution of
22104 (define-gl-procedures
22114 (data const-GLvoid-*)
22117 "Specify a two-dimensional texture subimage.
22120 Specifies the target texture. Must be `GL_TEXTURE_2D',
22121 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
22122 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
22123 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
22124 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
22127 Specifies the level-of-detail number. Level 0 is the base image
22128 level. Level N is the Nth mipmap reduction image.
22131 Specifies a texel offset in the x direction within the texture
22135 Specifies a texel offset in the y direction within the texture
22139 Specifies the width of the texture subimage.
22142 Specifies the height of the texture subimage.
22145 Specifies the format of the pixel data. The following symbolic
22146 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
22147 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
22148 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
22151 Specifies the data type of the pixel data. The following symbolic
22152 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
22153 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
22154 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22155 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
22156 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22157 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22158 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22159 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
22162 Specifies a pointer to the image data in memory.
22164 Texturing maps a portion of a specified texture image onto each
22165 graphical primitive for which texturing is enabled. To enable and
22166 disable two-dimensional texturing, call `glEnable' and `glDisable' with
22167 argument `GL_TEXTURE_2D'.
22169 `glTexSubImage2D' redefines a contiguous subregion of an existing
22170 two-dimensional texture image. The texels referenced by DATA replace the
22171 portion of the existing texture array with x indices XOFFSET and
22172 XOFFSET+WIDTH-1 , inclusive, and y indices YOFFSET and YOFFSET+HEIGHT-1
22173 , inclusive. This region may not include any texels outside the range of
22174 the texture array as it was originally specified. It is not an error to
22175 specify a subtexture with zero width or height, but such a specification
22178 If a non-zero named buffer object is bound to the
22179 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
22180 image is specified, DATA is treated as a byte offset into the buffer
22181 object's data store.
22183 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
22184 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
22185 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
22186 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
22188 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
22191 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
22193 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
22196 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
22198 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
22199 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
22201 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
22202 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , where W is the
22203 `GL_TEXTURE_WIDTH', H is the `GL_TEXTURE_HEIGHT', and B is the border
22204 width of the texture image being modified. Note that W and H include
22205 twice the border width.
22207 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0.
22209 `GL_INVALID_OPERATION' is generated if the texture array has not been
22210 defined by a previous `glTexImage2D' operation.
22212 `GL_INVALID_OPERATION' is generated if TYPE is one of
22213 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22214 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
22217 `GL_INVALID_OPERATION' is generated if TYPE is one of
22218 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22219 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22220 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22221 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
22222 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
22224 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22225 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
22226 data store is currently mapped.
22228 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22229 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
22230 unpacked from the buffer object such that the memory reads required
22231 would exceed the data store size.
22233 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22234 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
22235 divisible into the number of bytes needed to store in memory a datum
22238 `GL_INVALID_OPERATION' is generated if `glTexSubImage2D' is executed
22239 between the execution of `glBegin' and the corresponding execution of
22242 (define-gl-procedures
22254 (data const-GLvoid-*)
22257 "Specify a three-dimensional texture subimage.
22260 Specifies the target texture. Must be `GL_TEXTURE_3D'.
22263 Specifies the level-of-detail number. Level 0 is the base image
22264 level. Level N is the Nth mipmap reduction image.
22267 Specifies a texel offset in the x direction within the texture
22271 Specifies a texel offset in the y direction within the texture
22275 Specifies a texel offset in the z direction within the texture
22279 Specifies the width of the texture subimage.
22282 Specifies the height of the texture subimage.
22285 Specifies the depth of the texture subimage.
22288 Specifies the format of the pixel data. The following symbolic
22289 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
22290 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
22291 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
22294 Specifies the data type of the pixel data. The following symbolic
22295 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
22296 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
22297 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22298 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
22299 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22300 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22301 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22302 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
22305 Specifies a pointer to the image data in memory.
22307 Texturing maps a portion of a specified texture image onto each
22308 graphical primitive for which texturing is enabled. To enable and
22309 disable three-dimensional texturing, call `glEnable' and `glDisable'
22310 with argument `GL_TEXTURE_3D'.
22312 `glTexSubImage3D' redefines a contiguous subregion of an existing
22313 three-dimensional texture image. The texels referenced by DATA replace
22314 the portion of the existing texture array with x indices XOFFSET and
22315 XOFFSET+WIDTH-1 , inclusive, y indices YOFFSET and YOFFSET+HEIGHT-1 ,
22316 inclusive, and z indices ZOFFSET and ZOFFSET+DEPTH-1 , inclusive. This
22317 region may not include any texels outside the range of the texture array
22318 as it was originally specified. It is not an error to specify a
22319 subtexture with zero width, height, or depth but such a specification
22322 If a non-zero named buffer object is bound to the
22323 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
22324 image is specified, DATA is treated as a byte offset into the buffer
22325 object's data store.
22327 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_3D'.
22329 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
22332 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
22334 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
22337 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
22339 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
22340 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
22342 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
22343 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , or ZOFFSET<-B , or
22344 (ZOFFSET+DEPTH,)>(D-B,) , where W is the `GL_TEXTURE_WIDTH', H is the
22345 `GL_TEXTURE_HEIGHT', D is the `GL_TEXTURE_DEPTH' and B is the border
22346 width of the texture image being modified. Note that W , H , and D
22347 include twice the border width.
22349 `GL_INVALID_VALUE' is generated if WIDTH, HEIGHT, or DEPTH is less than
22352 `GL_INVALID_OPERATION' is generated if the texture array has not been
22353 defined by a previous `glTexImage3D' operation.
22355 `GL_INVALID_OPERATION' is generated if TYPE is one of
22356 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
22357 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
22360 `GL_INVALID_OPERATION' is generated if TYPE is one of
22361 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
22362 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
22363 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
22364 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
22365 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
22367 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22368 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
22369 data store is currently mapped.
22371 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22372 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
22373 unpacked from the buffer object such that the memory reads required
22374 would exceed the data store size.
22376 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
22377 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
22378 divisible into the number of bytes needed to store in memory a datum
22381 `GL_INVALID_OPERATION' is generated if `glTexSubImage3D' is executed
22382 between the execution of `glBegin' and the corresponding execution of
22385 (define-gl-procedures
22398 "Multiply the current matrix by a translation matrix.
22405 Specify the X, Y, and Z coordinates of a translation vector.
22407 `glTranslate' produces a translation by (X,YZ) . The current matrix (see
22408 `glMatrixMode') is multiplied by this translation matrix, with the
22409 product replacing the current matrix, as if `glMultMatrix' were called
22410 with the following matrix for its argument:
22412 ((1 0 0 X), (0 1 0 Y), (0 0 1 Z), (0 0 0 1),)
22416 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
22417 objects drawn after a call to `glTranslate' are translated.
22419 Use `glPushMatrix' and `glPopMatrix' to save and restore the
22420 untranslated coordinate system.
22422 `GL_INVALID_OPERATION' is generated if `glTranslate' is executed between
22423 the execution of `glBegin' and the corresponding execution of `glEnd'.")
22425 (define-gl-procedures
22452 (glUniform1i (location GLint) (v0 GLint) -> void)
22477 (value const-GLfloat-*)
22483 (value const-GLfloat-*)
22489 (value const-GLfloat-*)
22495 (value const-GLfloat-*)
22501 (value const-GLint-*)
22507 (value const-GLint-*)
22513 (value const-GLint-*)
22519 (value const-GLint-*)
22522 (glUniformMatrix2fv
22525 (transpose GLboolean)
22526 (value const-GLfloat-*)
22529 (glUniformMatrix3fv
22532 (transpose GLboolean)
22533 (value const-GLfloat-*)
22536 (glUniformMatrix4fv
22539 (transpose GLboolean)
22540 (value const-GLfloat-*)
22543 (glUniformMatrix2x3fv
22546 (transpose GLboolean)
22547 (value const-GLfloat-*)
22550 (glUniformMatrix3x2fv
22553 (transpose GLboolean)
22554 (value const-GLfloat-*)
22557 (glUniformMatrix2x4fv
22560 (transpose GLboolean)
22561 (value const-GLfloat-*)
22564 (glUniformMatrix4x2fv
22567 (transpose GLboolean)
22568 (value const-GLfloat-*)
22571 (glUniformMatrix3x4fv
22574 (transpose GLboolean)
22575 (value const-GLfloat-*)
22578 (glUniformMatrix4x3fv
22581 (transpose GLboolean)
22582 (value const-GLfloat-*)
22585 "Specify the value of a uniform variable for the current program object.
22588 Specifies the location of the uniform variable to be modified.
22591 Specifies the new values to be used for the specified uniform
22594 `glUniform' modifies the value of a uniform variable or a uniform
22595 variable array. The location of the uniform variable to be modified is
22596 specified by LOCATION, which should be a value returned by
22597 `glGetUniformLocation'. `glUniform' operates on the program object that
22598 was made part of current state by calling `glUseProgram'.
22600 The commands `glUniform{1|2|3|4}{f|i}' are used to change the value of
22601 the uniform variable specified by LOCATION using the values passed as
22602 arguments. The number specified in the command should match the number
22603 of components in the data type of the specified uniform variable (e.g.,
22604 `1' for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The suffix
22605 `f' indicates that floating-point values are being passed; the suffix
22606 `i' indicates that integer values are being passed, and this type should
22607 also match the data type of the specified uniform variable. The `i'
22608 variants of this function should be used to provide values for uniform
22609 variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The
22610 `f' variants should be used to provide values for uniform variables of
22611 type float, vec2, vec3, vec4, or arrays of these. Either the `i' or the
22612 `f' variants may be used to provide values for uniform variables of type
22613 bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable will
22614 be set to false if the input value is 0 or 0.0f, and it will be set to
22617 All active uniform variables defined in a program object are initialized
22618 to 0 when the program object is linked successfully. They retain the
22619 values assigned to them by a call to `glUniform ' until the next
22620 successful link operation occurs on the program object, when they are
22621 once again initialized to 0.
22623 The commands `glUniform{1|2|3|4}{f|i}v' can be used to modify a single
22624 uniform variable or a uniform variable array. These commands pass a
22625 count and a pointer to the values to be loaded into a uniform variable
22626 or a uniform variable array. A count of 1 should be used if modifying
22627 the value of a single uniform variable, and a count of 1 or greater can
22628 be used to modify an entire array or part of an array. When loading N
22629 elements starting at an arbitrary position M in a uniform variable
22630 array, elements M + N - 1 in the array will be replaced with the new
22631 values. If M + N - 1 is larger than the size of the uniform variable
22632 array, values for all array elements beyond the end of the array will be
22633 ignored. The number specified in the name of the command indicates the
22634 number of components for each element in VALUE, and it should match the
22635 number of components in the data type of the specified uniform variable
22636 (e.g., `1' for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The
22637 data type specified in the name of the command must match the data type
22638 for the specified uniform variable as described previously for
22639 `glUniform{1|2|3|4}{f|i}'.
22641 For uniform variable arrays, each element of the array is considered to
22642 be of the type indicated in the name of the command (e.g., `glUniform3f'
22643 or `glUniform3fv' can be used to load a uniform variable array of type
22644 vec3). The number of elements of the uniform variable array to be
22645 modified is specified by COUNT
22647 The commands `glUniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv' are used
22648 to modify a matrix or an array of matrices. The numbers in the command
22649 name are interpreted as the dimensionality of the matrix. The number `2'
22650 indicates a 2 × 2 matrix (i.e., 4 values), the number `3' indicates a 3
22651 × 3 matrix (i.e., 9 values), and the number `4' indicates a 4 × 4 matrix
22652 (i.e., 16 values). Non-square matrix dimensionality is explicit, with
22653 the first number representing the number of columns and the second
22654 number representing the number of rows. For example, `2x4' indicates a 2
22655 × 4 matrix with 2 columns and 4 rows (i.e., 8 values). If TRANSPOSE is
22656 `GL_FALSE', each matrix is assumed to be supplied in column major order.
22657 If TRANSPOSE is `GL_TRUE', each matrix is assumed to be supplied in row
22658 major order. The COUNT argument indicates the number of matrices to be
22659 passed. A count of 1 should be used if modifying the value of a single
22660 matrix, and a count greater than 1 can be used to modify an array of
22663 `GL_INVALID_OPERATION' is generated if there is no current program
22666 `GL_INVALID_OPERATION' is generated if the size of the uniform variable
22667 declared in the shader does not match the size indicated by the
22668 `glUniform' command.
22670 `GL_INVALID_OPERATION' is generated if one of the integer variants of
22671 this function is used to load a uniform variable of type float, vec2,
22672 vec3, vec4, or an array of these, or if one of the floating-point
22673 variants of this function is used to load a uniform variable of type
22674 int, ivec2, ivec3, or ivec4, or an array of these.
22676 `GL_INVALID_OPERATION' is generated if LOCATION is an invalid uniform
22677 location for the current program object and LOCATION is not equal to -1.
22679 `GL_INVALID_VALUE' is generated if COUNT is less than 0.
22681 `GL_INVALID_OPERATION' is generated if COUNT is greater than 1 and the
22682 indicated uniform variable is not an array variable.
22684 `GL_INVALID_OPERATION' is generated if a sampler is loaded using a
22685 command other than `glUniform1i' and `glUniform1iv'.
22687 `GL_INVALID_OPERATION' is generated if `glUniform' is executed between
22688 the execution of `glBegin' and the corresponding execution of `glEnd'.")
22690 (define-gl-procedures
22691 ((glUseProgram (program GLuint) -> void))
22692 "Installs a program object as part of current rendering state.
22695 Specifies the handle of the program object whose executables are to
22696 be used as part of current rendering state.
22698 `glUseProgram' installs the program object specified by PROGRAM as part
22699 of current rendering state. One or more executables are created in a
22700 program object by successfully attaching shader objects to it with
22701 `glAttachShader', successfully compiling the shader objects with
22702 `glCompileShader', and successfully linking the program object with
22705 A program object will contain an executable that will run on the vertex
22706 processor if it contains one or more shader objects of type
22707 `GL_VERTEX_SHADER' that have been successfully compiled and linked.
22708 Similarly, a program object will contain an executable that will run on
22709 the fragment processor if it contains one or more shader objects of type
22710 `GL_FRAGMENT_SHADER' that have been successfully compiled and linked.
22712 Successfully installing an executable on a programmable processor will
22713 cause the corresponding fixed functionality of OpenGL to be disabled.
22714 Specifically, if an executable is installed on the vertex processor, the
22715 OpenGL fixed functionality will be disabled as follows.
22717 * The projection matrix is not applied to vertex coordinates.
22719 * The texture matrices are not applied to texture coordinates.
22721 * Normals are not transformed to eye coordinates.
22723 * Normals are not rescaled or normalized.
22725 * Normalization of `GL_AUTO_NORMAL' evaluated normals is not
22728 * Texture coordinates are not generated automatically.
22730 * Per-vertex lighting is not performed.
22732 * Color material computations are not performed.
22734 * Color index lighting is not performed.
22736 * This list also applies when setting the current raster position.
22738 The executable that is installed on the vertex processor is expected to
22739 implement any or all of the desired functionality from the preceding
22740 list. Similarly, if an executable is installed on the fragment
22741 processor, the OpenGL fixed functionality will be disabled as follows.
22743 * Texture application is not applied.
22745 * Color sum is not applied.
22747 * Fog is not applied.
22749 Again, the fragment shader that is installed is expected to implement
22750 any or all of the desired functionality from the preceding list.
22752 While a program object is in use, applications are free to modify
22753 attached shader objects, compile attached shader objects, attach
22754 additional shader objects, and detach or delete shader objects. None of
22755 these operations will affect the executables that are part of the
22756 current state. However, relinking the program object that is currently
22757 in use will install the program object as part of the current rendering
22758 state if the link operation was successful (see `glLinkProgram' ). If
22759 the program object currently in use is relinked unsuccessfully, its link
22760 status will be set to `GL_FALSE', but the executables and associated
22761 state will remain part of the current state until a subsequent call to
22762 `glUseProgram' removes it from use. After it is removed from use, it
22763 cannot be made part of current state until it has been successfully
22766 If PROGRAM contains shader objects of type `GL_VERTEX_SHADER' but it
22767 does not contain shader objects of type `GL_FRAGMENT_SHADER', an
22768 executable will be installed on the vertex processor, but fixed
22769 functionality will be used for fragment processing. Similarly, if
22770 PROGRAM contains shader objects of type `GL_FRAGMENT_SHADER' but it does
22771 not contain shader objects of type `GL_VERTEX_SHADER', an executable
22772 will be installed on the fragment processor, but fixed functionality
22773 will be used for vertex processing. If PROGRAM is 0, the programmable
22774 processors will be disabled, and fixed functionality will be used for
22775 both vertex and fragment processing.
22777 `GL_INVALID_VALUE' is generated if PROGRAM is neither 0 nor a value
22778 generated by OpenGL.
22780 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
22782 `GL_INVALID_OPERATION' is generated if PROGRAM could not be made part of
22785 `GL_INVALID_OPERATION' is generated if `glUseProgram' is executed
22786 between the execution of `glBegin' and the corresponding execution of
22789 (define-gl-procedures
22790 ((glValidateProgram (program GLuint) -> void))
22791 "Validates a program object.
22794 Specifies the handle of the program object to be validated.
22796 `glValidateProgram' checks to see whether the executables contained in
22797 PROGRAM can execute given the current OpenGL state. The information
22798 generated by the validation process will be stored in PROGRAM's
22799 information log. The validation information may consist of an empty
22800 string, or it may be a string containing information about how the
22801 current program object interacts with the rest of current OpenGL state.
22802 This provides a way for OpenGL implementers to convey more information
22803 about why the current program is inefficient, suboptimal, failing to
22804 execute, and so on.
22806 The status of the validation operation will be stored as part of the
22807 program object's state. This value will be set to `GL_TRUE' if the
22808 validation succeeded, and `GL_FALSE' otherwise. It can be queried by
22809 calling `glGetProgram' with arguments PROGRAM and `GL_VALIDATE_STATUS'.
22810 If validation is successful, PROGRAM is guaranteed to execute given the
22811 current state. Otherwise, PROGRAM is guaranteed to not execute.
22813 This function is typically useful only during application development.
22814 The informational string stored in the information log is completely
22815 implementation dependent; therefore, an application should not expect
22816 different OpenGL implementations to produce identical information
22819 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
22822 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
22824 `GL_INVALID_OPERATION' is generated if `glValidateProgram' is executed
22825 between the execution of `glBegin' and the corresponding execution of
22828 (define-gl-procedures
22829 ((glVertexAttribPointer
22833 (normalized GLboolean)
22835 (pointer const-GLvoid-*)
22838 "Define an array of generic vertex attribute data.
22841 Specifies the index of the generic vertex attribute to be modified.
22844 Specifies the number of components per generic vertex attribute.
22845 Must be 1, 2, 3, or 4. The initial value is 4.
22848 Specifies the data type of each component in the array. Symbolic
22849 constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
22850 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', or
22851 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
22854 Specifies whether fixed-point data values should be normalized
22855 (`GL_TRUE') or converted directly as fixed-point values
22856 (`GL_FALSE') when they are accessed.
22859 Specifies the byte offset between consecutive generic vertex
22860 attributes. If STRIDE is 0, the generic vertex attributes are
22861 understood to be tightly packed in the array. The initial value is
22865 Specifies a pointer to the first component of the first generic
22866 vertex attribute in the array. The initial value is 0.
22868 `glVertexAttribPointer' specifies the location and data format of the
22869 array of generic vertex attributes at index INDEX to use when rendering.
22870 SIZE specifies the number of components per attribute and must be 1, 2,
22871 3, or 4. TYPE specifies the data type of each component, and STRIDE
22872 specifies the byte stride from one attribute to the next, allowing
22873 vertices and attributes to be packed into a single array or stored in
22874 separate arrays. If set to `GL_TRUE', NORMALIZED indicates that values
22875 stored in an integer format are to be mapped to the range [-1,1] (for
22876 signed values) or [0,1] (for unsigned values) when they are accessed and
22877 converted to floating point. Otherwise, values will be converted to
22878 floats directly without normalization.
22880 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
22881 target (see `glBindBuffer') while a generic vertex attribute array is
22882 specified, POINTER is treated as a byte offset into the buffer object's
22883 data store. Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING')
22884 is saved as generic vertex attribute array client-side state
22885 (`GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING') for index INDEX.
22887 When a generic vertex attribute array is specified, SIZE, TYPE,
22888 NORMALIZED, STRIDE, and POINTER are saved as client-side state, in
22889 addition to the current vertex array buffer object binding.
22891 To enable and disable a generic vertex attribute array, call
22892 `glEnableVertexAttribArray' and `glDisableVertexAttribArray' with INDEX.
22893 If enabled, the generic vertex attribute array is used when
22894 `glArrayElement', `glDrawArrays', `glMultiDrawArrays', `glDrawElements',
22895 `glMultiDrawElements', or `glDrawRangeElements' is called.
22897 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
22898 `GL_MAX_VERTEX_ATTRIBS'.
22900 `GL_INVALID_VALUE' is generated if SIZE is not 1, 2, 3, or 4.
22902 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
22904 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
22906 (define-gl-procedures
22985 (glVertexAttrib4Nub
22995 (v const-GLfloat-*)
23000 (v const-GLshort-*)
23005 (v const-GLdouble-*)
23010 (v const-GLfloat-*)
23015 (v const-GLshort-*)
23020 (v const-GLdouble-*)
23025 (v const-GLfloat-*)
23030 (v const-GLshort-*)
23035 (v const-GLdouble-*)
23040 (v const-GLfloat-*)
23045 (v const-GLshort-*)
23050 (v const-GLdouble-*)
23063 (glVertexAttrib4ubv
23065 (v const-GLubyte-*)
23068 (glVertexAttrib4usv
23070 (v const-GLushort-*)
23073 (glVertexAttrib4uiv
23078 (glVertexAttrib4Nbv
23083 (glVertexAttrib4Nsv
23085 (v const-GLshort-*)
23088 (glVertexAttrib4Niv
23093 (glVertexAttrib4Nubv
23095 (v const-GLubyte-*)
23098 (glVertexAttrib4Nusv
23100 (v const-GLushort-*)
23103 (glVertexAttrib4Nuiv
23108 "Specifies the value of a generic vertex attribute.
23111 Specifies the index of the generic vertex attribute to be modified.
23114 Specifies the new values to be used for the specified vertex
23117 OpenGL defines a number of standard vertex attributes that applications
23118 can modify with standard API entry points (color, normal, texture
23119 coordinates, etc.). The `glVertexAttrib' family of entry points allows
23120 an application to pass generic vertex attributes in numbered locations.
23122 Generic attributes are defined as four-component values that are
23123 organized into an array. The first entry of this array is numbered 0,
23124 and the size of the array is specified by the implementation-dependent
23125 constant `GL_MAX_VERTEX_ATTRIBS'. Individual elements of this array can
23126 be modified with a `glVertexAttrib' call that specifies the index of the
23127 element to be modified and a value for that element.
23129 These commands can be used to specify one, two, three, or all four
23130 components of the generic vertex attribute specified by INDEX. A `1' in
23131 the name of the command indicates that only one value is passed, and it
23132 will be used to modify the first component of the generic vertex
23133 attribute. The second and third components will be set to 0, and the
23134 fourth component will be set to 1. Similarly, a `2' in the name of the
23135 command indicates that values are provided for the first two components,
23136 the third component will be set to 0, and the fourth component will be
23137 set to 1. A `3' in the name of the command indicates that values are
23138 provided for the first three components and the fourth component will be
23139 set to 1, whereas a `4' in the name indicates that values are provided
23140 for all four components.
23142 The letters `s', `f', `i', `d', `ub', `us', and `ui' indicate whether
23143 the arguments are of type short, float, int, double, unsigned byte,
23144 unsigned short, or unsigned int. When `v' is appended to the name, the
23145 commands can take a pointer to an array of such values. The commands
23146 containing `N' indicate that the arguments will be passed as fixed-point
23147 values that are scaled to a normalized range according to the component
23148 conversion rules defined by the OpenGL specification. Signed values are
23149 understood to represent fixed-point values in the range [-1,1], and
23150 unsigned values are understood to represent fixed-point values in the
23153 OpenGL Shading Language attribute variables are allowed to be of type
23154 mat2, mat3, or mat4. Attributes of these types may be loaded using the
23155 `glVertexAttrib' entry points. Matrices must be loaded into successive
23156 generic attribute slots in column major order, with one column of the
23157 matrix in each generic attribute slot.
23159 A user-defined attribute variable declared in a vertex shader can be
23160 bound to a generic attribute index by calling `glBindAttribLocation'.
23161 This allows an application to use more descriptive variable names in a
23162 vertex shader. A subsequent change to the specified generic vertex
23163 attribute will be immediately reflected as a change to the corresponding
23164 attribute variable in the vertex shader.
23166 The binding between a generic vertex attribute index and a user-defined
23167 attribute variable in a vertex shader is part of the state of a program
23168 object, but the current value of the generic vertex attribute is not.
23169 The value of each generic vertex attribute is part of current state,
23170 just like standard vertex attributes, and it is maintained even if a
23171 different program object is used.
23173 An application may freely modify generic vertex attributes that are not
23174 bound to a named vertex shader attribute variable. These values are
23175 simply maintained as part of current state and will not be accessed by
23176 the vertex shader. If a generic vertex attribute bound to an attribute
23177 variable in a vertex shader is not updated while the vertex shader is
23178 executing, the vertex shader will repeatedly use the current value for
23179 the generic vertex attribute.
23181 The generic vertex attribute with index 0 is the same as the vertex
23182 position attribute previously defined by OpenGL. A `glVertex2',
23183 `glVertex3', or `glVertex4' command is completely equivalent to the
23184 corresponding `glVertexAttrib' command with an index argument of 0. A
23185 vertex shader can access generic vertex attribute 0 by using the
23186 built-in attribute variable GL_VERTEX. There are no current values for
23187 generic vertex attribute 0. This is the only generic vertex attribute
23188 with this property; calls to set other standard vertex attributes can be
23189 freely mixed with calls to set any of the other generic vertex
23192 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
23193 `GL_MAX_VERTEX_ATTRIBS'.")
23195 (define-gl-procedures
23200 (pointer const-GLvoid-*)
23203 "Define an array of vertex data.
23206 Specifies the number of coordinates per vertex. Must be 2, 3, or 4.
23207 The initial value is 4.
23210 Specifies the data type of each coordinate in the array. Symbolic
23211 constants `GL_SHORT', `GL_INT', `GL_FLOAT', or `GL_DOUBLE' are
23212 accepted. The initial value is `GL_FLOAT'.
23215 Specifies the byte offset between consecutive vertices. If STRIDE
23216 is 0, the vertices are understood to be tightly packed in the
23217 array. The initial value is 0.
23220 Specifies a pointer to the first coordinate of the first vertex in
23221 the array. The initial value is 0.
23223 `glVertexPointer' specifies the location and data format of an array of
23224 vertex coordinates to use when rendering. SIZE specifies the number of
23225 coordinates per vertex, and must be 2, 3, or 4. TYPE specifies the data
23226 type of each coordinate, and STRIDE specifies the byte stride from one
23227 vertex to the next, allowing vertices and attributes to be packed into a
23228 single array or stored in separate arrays. (Single-array storage may be
23229 more efficient on some implementations; see `glInterleavedArrays'.)
23231 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
23232 target (see `glBindBuffer') while a vertex array is specified, POINTER
23233 is treated as a byte offset into the buffer object's data store. Also,
23234 the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as vertex
23235 array client-side state (`GL_VERTEX_ARRAY_BUFFER_BINDING').
23237 When a vertex array is specified, SIZE, TYPE, STRIDE, and POINTER are
23238 saved as client-side state, in addition to the current vertex array
23239 buffer object binding.
23241 To enable and disable the vertex array, call `glEnableClientState' and
23242 `glDisableClientState' with the argument `GL_VERTEX_ARRAY'. If enabled,
23243 the vertex array is used when `glArrayElement', `glDrawArrays',
23244 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements', or
23245 `glDrawRangeElements' is called.
23247 `GL_INVALID_VALUE' is generated if SIZE is not 2, 3, or 4.
23249 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
23251 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
23253 (define-gl-procedures
23254 ((glVertex2s (x GLshort) (y GLshort) -> void)
23255 (glVertex2i (x GLint) (y GLint) -> void)
23256 (glVertex2f (x GLfloat) (y GLfloat) -> void)
23257 (glVertex2d (x GLdouble) (y GLdouble) -> void)
23310 (glVertex2sv (v const-GLshort-*) -> void)
23311 (glVertex2iv (v const-GLint-*) -> void)
23312 (glVertex2fv (v const-GLfloat-*) -> void)
23313 (glVertex2dv (v const-GLdouble-*) -> void)
23314 (glVertex3sv (v const-GLshort-*) -> void)
23315 (glVertex3iv (v const-GLint-*) -> void)
23316 (glVertex3fv (v const-GLfloat-*) -> void)
23317 (glVertex3dv (v const-GLdouble-*) -> void)
23318 (glVertex4sv (v const-GLshort-*) -> void)
23319 (glVertex4iv (v const-GLint-*) -> void)
23320 (glVertex4fv (v const-GLfloat-*) -> void)
23321 (glVertex4dv (v const-GLdouble-*) -> void))
23331 Specify X, Y, Z, and W coordinates of a vertex. Not all parameters
23332 are present in all forms of the command.
23334 `glVertex' commands are used within `glBegin'/`glEnd' pairs to specify
23335 point, line, and polygon vertices. The current color, normal, texture
23336 coordinates, and fog coordinate are associated with the vertex when
23337 `glVertex' is called.
23339 When only X and Y are specified, Z defaults to 0 and W defaults to 1.
23340 When X , Y , and Z are specified, W defaults to 1.")
23342 (define-gl-procedures
23355 Specify the lower left corner of the viewport rectangle, in pixels.
23356 The initial value is (0,0).
23361 Specify the width and height of the viewport. When a GL context is
23362 first attached to a window, WIDTH and HEIGHT are set to the
23363 dimensions of that window.
23365 `glViewport' specifies the affine transformation of X and Y from
23366 normalized device coordinates to window coordinates. Let (X_ND,Y_ND) be
23367 normalized device coordinates. Then the window coordinates (X_W,Y_W) are
23368 computed as follows:
23370 X_W=(X_ND+1,)\u2062(WIDTH/2,)+X
23372 Y_W=(Y_ND+1,)\u2062(HEIGHT/2,)+Y
23374 Viewport width and height are silently clamped to a range that depends
23375 on the implementation. To query this range, call `glGet' with argument
23376 `GL_MAX_VIEWPORT_DIMS'.
23378 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
23380 `GL_INVALID_OPERATION' is generated if `glViewport' is executed between
23381 the execution of `glBegin' and the corresponding execution of `glEnd'.")
23383 (define-gl-procedures
23384 ((glWindowPos2s (x GLshort) (y GLshort) -> void)
23385 (glWindowPos2i (x GLint) (y GLint) -> void)
23386 (glWindowPos2f (x GLfloat) (y GLfloat) -> void)
23387 (glWindowPos2d (x GLdouble) (y GLdouble) -> void)
23412 (glWindowPos2sv (v const-GLshort-*) -> void)
23413 (glWindowPos2iv (v const-GLint-*) -> void)
23414 (glWindowPos2fv (v const-GLfloat-*) -> void)
23415 (glWindowPos2dv (v const-GLdouble-*) -> void)
23416 (glWindowPos3sv (v const-GLshort-*) -> void)
23417 (glWindowPos3iv (v const-GLint-*) -> void)
23418 (glWindowPos3fv (v const-GLfloat-*) -> void)
23419 (glWindowPos3dv (v const-GLdouble-*) -> void))
23420 "Specify the raster position in window coordinates for pixel operations.
23427 Specify the X , Y , Z coordinates for the raster position.
23429 The GL maintains a 3D position in window coordinates. This position,
23430 called the raster position, is used to position pixel and bitmap write
23431 operations. It is maintained with subpixel accuracy. See `glBitmap',
23432 `glDrawPixels', and `glCopyPixels'.
23434 `glWindowPos2' specifies the X and Y coordinates, while Z is implicitly
23435 set to 0. `glWindowPos3' specifies all three coordinates. The W
23436 coordinate of the current raster position is always set to 1.0.
23438 `glWindowPos' directly updates the X and Y coordinates of the current
23439 raster position with the values specified. That is, the values are
23440 neither transformed by the current modelview and projection matrices,
23441 nor by the viewport-to-window transform. The Z coordinate of the current
23442 raster position is updated in the following manner:
23444 Z={(N), (F), (N+Z×(F-N,),)\u2062(IF\u2062Z<=0), (IF\u2062Z>=1), (`otherwise',),
23448 where N is `GL_DEPTH_RANGE''s near value, and F is `GL_DEPTH_RANGE''s
23449 far value. See `glDepthRange'.
23451 The specified coordinates are not clip-tested, causing the raster
23452 position to always be valid.
23454 The current raster position also includes some associated color data and
23455 texture coordinates. If lighting is enabled, then
23456 `GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `GL_CURRENT_RASTER_INDEX'
23457 (in color index mode) is set to the color produced by the lighting
23458 calculation (see `glLight', `glLightModel', and `glShadeModel'). If
23459 lighting is disabled, current color (in RGBA mode, state variable
23460 `GL_CURRENT_COLOR') or color index (in color index mode, state variable
23461 `GL_CURRENT_INDEX') is used to update the current raster color.
23462 `GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated.
23464 Likewise, `GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of
23465 `GL_CURRENT_TEXTURE_COORDS', based on the texture matrix and the texture
23466 generation functions (see `glTexGen'). The `GL_CURRENT_RASTER_DISTANCE'
23467 is set to the `GL_CURRENT_FOG_COORD'.
23471 `GL_INVALID_OPERATION' is generated if `glWindowPos' is executed between
23472 the execution of `glBegin' and the corresponding execution of `glEnd'.")