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
95 glCompressedTexImage1D
96 glCompressedTexImage2D
97 glCompressedTexImage3D
98 glCompressedTexSubImage1D
99 glCompressedTexSubImage2D
100 glCompressedTexSubImage3D
101 glConvolutionFilter1D
102 glConvolutionFilter2D
103 glConvolutionParameterf
104 glConvolutionParameteri
107 glCopyConvolutionFilter1D
108 glCopyConvolutionFilter2D
138 glEnableVertexAttribArray
139 glDisableVertexAttribArray
165 glGetBufferParameteriv
169 glGetColorTableParameterfv
170 glGetColorTableParameteriv
172 glGetCompressedTexImage
173 glGetConvolutionFilter
174 glGetConvolutionParameterfv
175 glGetConvolutionParameteriv
177 glGetHistogramParameterfv
178 glGetHistogramParameteriv
186 glGetMinmaxParameterfv
187 glGetMinmaxParameteriv
208 glGetTexLevelParameterfv
209 glGetTexLevelParameteriv
215 glGetVertexAttribPointerv
249 glLoadTransposeMatrixf
272 glMultTransposeMatrixf
319 glSecondaryColorPointer
327 glStencilFuncSeparate
329 glStencilMaskSeparate
374 glVertexAttribPointer
401 (define-gl-procedures
402 ((glAccum (op GLenum) (value GLfloat) -> void))
403 "Operate on the accumulation buffer.
406 Specifies the accumulation buffer operation. Symbolic constants
407 `GL_ACCUM', `GL_LOAD', `GL_ADD', `GL_MULT', and `GL_RETURN' are
411 Specifies a floating-point value used in the accumulation buffer
412 operation. OP determines how VALUE is used.
414 The accumulation buffer is an extended-range color buffer. Images are
415 not rendered into it. Rather, images rendered into one of the color
416 buffers are added to the contents of the accumulation buffer after
417 rendering. Effects such as antialiasing (of points, lines, and
418 polygons), motion blur, and depth of field can be created by
419 accumulating images generated with different transformation matrices.
421 Each pixel in the accumulation buffer consists of red, green, blue, and
422 alpha values. The number of bits per component in the accumulation
423 buffer depends on the implementation. You can examine this number by
424 calling `glGetIntegerv' four times, with arguments `GL_ACCUM_RED_BITS',
425 `GL_ACCUM_GREEN_BITS', `GL_ACCUM_BLUE_BITS', and `GL_ACCUM_ALPHA_BITS'.
426 Regardless of the number of bits per component, the range of values
427 stored by each component is [-1,1] . The accumulation buffer pixels are
428 mapped one-to-one with frame buffer pixels.
430 `glAccum' operates on the accumulation buffer. The first argument, OP,
431 is a symbolic constant that selects an accumulation buffer operation.
432 The second argument, VALUE, is a floating-point value to be used in that
433 operation. Five operations are specified: `GL_ACCUM', `GL_LOAD',
434 `GL_ADD', `GL_MULT', and `GL_RETURN'.
436 All accumulation buffer operations are limited to the area of the
437 current scissor box and applied identically to the red, green, blue, and
438 alpha components of each pixel. If a `glAccum' operation results in a
439 value outside the range [-1,1] , the contents of an accumulation buffer
440 pixel component are undefined.
442 The operations are as follows:
445 Obtains R, G, B, and A values from the buffer currently selected
446 for reading (see `glReadBuffer'). Each component value is divided
447 by 2^N-1 , where N is the number of bits allocated to each color
448 component in the currently selected buffer. The result is a
449 floating-point value in the range [0,1] , which is multiplied by
450 VALUE and added to the corresponding pixel component in the
451 accumulation buffer, thereby updating the accumulation buffer.
454 Similar to `GL_ACCUM', except that the current value in the
455 accumulation buffer is not used in the calculation of the new
456 value. That is, the R, G, B, and A values from the currently
457 selected buffer are divided by 2^N-1 , multiplied by VALUE, and
458 then stored in the corresponding accumulation buffer cell,
459 overwriting the current value.
462 Adds VALUE to each R, G, B, and A in the accumulation buffer.
465 Multiplies each R, G, B, and A in the accumulation buffer by VALUE
466 and returns the scaled component to its corresponding accumulation
470 Transfers accumulation buffer values to the color buffer or buffers
471 currently selected for writing. Each R, G, B, and A component is
472 multiplied by VALUE, then multiplied by 2^N-1 , clamped to the
473 range [0,2^N-1] , and stored in the corresponding display buffer
474 cell. The only fragment operations that are applied to this
475 transfer are pixel ownership, scissor, dithering, and color
478 To clear the accumulation buffer, call `glClearAccum' with R, G, B, and
479 A values to set it to, then call `glClear' with the accumulation buffer
482 `GL_INVALID_ENUM' is generated if OP is not an accepted value.
484 `GL_INVALID_OPERATION' is generated if there is no accumulation buffer.
486 `GL_INVALID_OPERATION' is generated if `glAccum' is executed between the
487 execution of `glBegin' and the corresponding execution of `glEnd'.")
489 (define-gl-procedures
490 ((glActiveTexture (texture GLenum) -> void))
491 "Select active texture unit.
494 Specifies which texture unit to make active. The number of texture
495 units is implementation dependent, but must be at least two.
496 TEXTURE must be one of `GL_TEXTURE' I , where i ranges from 0 to
497 the larger of (`GL_MAX_TEXTURE_COORDS' - 1) and
498 (`GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS' - 1). The initial value is
501 `glActiveTexture' selects which texture unit subsequent texture state
502 calls will affect. The number of texture units an implementation
503 supports is implementation dependent, but must be at least 2.
505 Vertex arrays are client-side GL resources, which are selected by the
506 `glClientActiveTexture' routine.
508 `GL_INVALID_ENUM' is generated if TEXTURE is not one of `GL_TEXTURE'I ,
509 where i ranges from 0 to the larger of (`GL_MAX_TEXTURE_COORDS' - 1) and
510 (`GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS' - 1).")
512 (define-gl-procedures
518 "Specify the alpha test function.
521 Specifies the alpha comparison function. Symbolic constants
522 `GL_NEVER', `GL_LESS', `GL_EQUAL', `GL_LEQUAL', `GL_GREATER',
523 `GL_NOTEQUAL', `GL_GEQUAL', and `GL_ALWAYS' are accepted. The
524 initial value is `GL_ALWAYS'.
527 Specifies the reference value that incoming alpha values are
528 compared to. This value is clamped to the range [0,1] , where 0
529 represents the lowest possible alpha value and 1 the highest
530 possible value. The initial reference value is 0.
532 The alpha test discards fragments depending on the outcome of a
533 comparison between an incoming fragment's alpha value and a constant
534 reference value. `glAlphaFunc' specifies the reference value and the
535 comparison function. The comparison is performed only if alpha testing
536 is enabled. By default, it is not enabled. (See `glEnable' and
537 `glDisable' of `GL_ALPHA_TEST'.)
539 FUNC and REF specify the conditions under which the pixel is drawn. The
540 incoming alpha value is compared to REF using the function specified by
541 FUNC. If the value passes the comparison, the incoming fragment is drawn
542 if it also passes subsequent stencil and depth buffer tests. If the
543 value fails the comparison, no change is made to the frame buffer at
544 that pixel location. The comparison functions are as follows:
550 Passes if the incoming alpha value is less than the reference
554 Passes if the incoming alpha value is equal to the reference value.
557 Passes if the incoming alpha value is less than or equal to the
561 Passes if the incoming alpha value is greater than the reference
565 Passes if the incoming alpha value is not equal to the reference
569 Passes if the incoming alpha value is greater than or equal to the
573 Always passes (initial value).
575 `glAlphaFunc' operates on all pixel write operations, including those
576 resulting from the scan conversion of points, lines, polygons, and
577 bitmaps, and from pixel draw and copy operations. `glAlphaFunc' does not
578 affect screen clear operations.
580 `GL_INVALID_ENUM' is generated if FUNC is not an accepted value.
582 `GL_INVALID_OPERATION' is generated if `glAlphaFunc' is executed between
583 the execution of `glBegin' and the corresponding execution of `glEnd'.")
585 (define-gl-procedures
586 ((glAreTexturesResident
588 (textures const-GLuint-*)
589 (residences GLboolean-*)
592 "Determine if textures are loaded in texture memory.
595 Specifies the number of textures to be queried.
598 Specifies an array containing the names of the textures to be
602 Specifies an array in which the texture residence status is
603 returned. The residence status of a texture named by an element of
604 TEXTURES is returned in the corresponding element of RESIDENCES.
606 GL establishes a ``working set'' of textures that are resident in
607 texture memory. These textures can be bound to a texture target much
608 more efficiently than textures that are not resident.
610 `glAreTexturesResident' queries the texture residence status of the N
611 textures named by the elements of TEXTURES. If all the named textures
612 are resident, `glAreTexturesResident' returns `GL_TRUE', and the
613 contents of RESIDENCES are undisturbed. If not all the named textures
614 are resident, `glAreTexturesResident' returns `GL_FALSE', and detailed
615 status is returned in the N elements of RESIDENCES. If an element of
616 RESIDENCES is `GL_TRUE', then the texture named by the corresponding
617 element of TEXTURES is resident.
619 The residence status of a single bound texture may also be queried by
620 calling `glGetTexParameter' with the TARGET argument set to the target
621 to which the texture is bound, and the PNAME argument set to
622 `GL_TEXTURE_RESIDENT'. This is the only way that the residence status of
623 a default texture can be queried.
625 `GL_INVALID_VALUE' is generated if N is negative.
627 `GL_INVALID_VALUE' is generated if any element in TEXTURES is 0 or does
628 not name a texture. In that case, the function returns `GL_FALSE' and
629 the contents of RESIDENCES is indeterminate.
631 `GL_INVALID_OPERATION' is generated if `glAreTexturesResident' is
632 executed between the execution of `glBegin' and the corresponding
633 execution of `glEnd'.")
635 (define-gl-procedures
636 ((glArrayElement (i GLint) -> void))
637 "Render a vertex using the specified vertex array element.
640 Specifies an index into the enabled vertex data arrays.
642 `glArrayElement' commands are used within `glBegin'/`glEnd' pairs to
643 specify vertex and attribute data for point, line, and polygon
644 primitives. If `GL_VERTEX_ARRAY' is enabled when `glArrayElement' is
645 called, a single vertex is drawn, using vertex and attribute data taken
646 from location I of the enabled arrays. If `GL_VERTEX_ARRAY' is not
647 enabled, no drawing occurs but the attributes corresponding to the
648 enabled arrays are modified.
650 Use `glArrayElement' to construct primitives by indexing vertex data,
651 rather than by streaming through arrays of data in first-to-last order.
652 Because each call specifies only a single vertex, it is possible to
653 explicitly specify per-primitive attributes such as a single normal for
656 Changes made to array data between the execution of `glBegin' and the
657 corresponding execution of `glEnd' may affect calls to `glArrayElement'
658 that are made within the same `glBegin'/`glEnd' period in nonsequential
659 ways. That is, a call to `glArrayElement' that precedes a change to
660 array data may access the changed data, and a call that follows a change
661 to array data may access original data.
663 `GL_INVALID_VALUE' may be generated if I is negative.
665 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
666 bound to an enabled array and the buffer object's data store is
669 (define-gl-procedures
675 "Attaches a shader object to a program object.
678 Specifies the program object to which a shader object will be
682 Specifies the shader object that is to be attached.
684 In order to create an executable, there must be a way to specify the
685 list of things that will be linked together. Program objects provide
686 this mechanism. Shaders that are to be linked together in a program
687 object must first be attached to that program object. `glAttachShader'
688 attaches the shader object specified by SHADER to the program object
689 specified by PROGRAM. This indicates that SHADER will be included in
690 link operations that will be performed on PROGRAM.
692 All operations that can be performed on a shader object are valid
693 whether or not the shader object is attached to a program object. It is
694 permissible to attach a shader object to a program object before source
695 code has been loaded into the shader object or before the shader object
696 has been compiled. It is permissible to attach multiple shader objects
697 of the same type because each may contain a portion of the complete
698 shader. It is also permissible to attach a shader object to more than
699 one program object. If a shader object is deleted while it is attached
700 to a program object, it will be flagged for deletion, and deletion will
701 not occur until `glDetachShader' is called to detach it from all program
702 objects to which it is attached.
704 `GL_INVALID_VALUE' is generated if either PROGRAM or SHADER is not a
705 value generated by OpenGL.
707 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
709 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
711 `GL_INVALID_OPERATION' is generated if SHADER is already attached to
714 `GL_INVALID_OPERATION' is generated if `glAttachShader' is executed
715 between the execution of `glBegin' and the corresponding execution of
718 (define-gl-procedures
724 (glEndQuery (target GLenum) -> void))
725 "Delimit the boundaries of a query object.
728 Specifies the target type of query object established between
729 `glBeginQuery' and the subsequent `glEndQuery'. The symbolic
730 constant must be `GL_SAMPLES_PASSED'.
733 Specifies the name of a query object.
735 `glBeginQuery' and `glEndQuery' delimit the boundaries of a query
736 object. If a query object with name ID does not yet exist it is created.
738 When `glBeginQuery' is executed, the query object's samples-passed
739 counter is reset to 0. Subsequent rendering will increment the counter
740 once for every sample that passes the depth test. When `glEndQuery' is
741 executed, the samples-passed counter is assigned to the query object's
742 result value. This value can be queried by calling `glGetQueryObject'
743 with PNAME`GL_QUERY_RESULT'.
745 Querying the `GL_QUERY_RESULT' implicitly flushes the GL pipeline until
746 the rendering delimited by the query object has completed and the result
747 is available. `GL_QUERY_RESULT_AVAILABLE' can be queried to determine if
748 the result is immediately available or if the rendering is not yet
751 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SAMPLES_PASSED'.
753 `GL_INVALID_OPERATION' is generated if `glBeginQuery' is executed while
754 a query object of the same TARGET is already active.
756 `GL_INVALID_OPERATION' is generated if `glEndQuery' is executed when a
757 query object of the same TARGET is not active.
759 `GL_INVALID_OPERATION' is generated if ID is 0.
761 `GL_INVALID_OPERATION' is generated if ID is the name of an already
764 `GL_INVALID_OPERATION' is generated if `glBeginQuery' or `glEndQuery' is
765 executed between the execution of `glBegin' and the corresponding
766 execution of `glEnd'.")
768 (define-gl-procedures
769 ((glBegin (mode GLenum) -> void) (glEnd -> void))
770 "Delimit the vertices of a primitive or a group of like primitives.
773 Specifies the primitive or primitives that will be created from
774 vertices presented between `glBegin' and the subsequent `glEnd'.
775 Ten symbolic constants are accepted: `GL_POINTS', `GL_LINES',
776 `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_TRIANGLES',
777 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_QUADS',
778 `GL_QUAD_STRIP', and `GL_POLYGON'.
780 `glBegin' and `glEnd' delimit the vertices that define a primitive or a
781 group of like primitives. `glBegin' accepts a single argument that
782 specifies in which of ten ways the vertices are interpreted. Taking N as
783 an integer count starting at one, and N as the total number of vertices
784 specified, the interpretations are as follows:
787 Treats each vertex as a single point. Vertex N defines point N . N
791 Treats each pair of vertices as an independent line segment.
792 Vertices 2\u2062N-1 and 2\u2062N define line N . N/2 lines are drawn.
795 Draws a connected group of line segments from the first vertex to
796 the last. Vertices N and N+1 define line N . N-1 lines are drawn.
799 Draws a connected group of line segments from the first vertex to
800 the last, then back to the first. Vertices N and N+1 define line N
801 . The last line, however, is defined by vertices N and 1 . N lines
805 Treats each triplet of vertices as an independent triangle.
806 Vertices 3\u2062N-2 , 3\u2062N-1 , and 3\u2062N define triangle N . N/3 triangles
810 Draws a connected group of triangles. One triangle is defined for
811 each vertex presented after the first two vertices. For odd N ,
812 vertices N , N+1 , and N+2 define triangle N . For even N ,
813 vertices N+1 , N , and N+2 define triangle N . N-2 triangles are
817 Draws a connected group of triangles. One triangle is defined for
818 each vertex presented after the first two vertices. Vertices 1 ,
819 N+1 , and N+2 define triangle N . N-2 triangles are drawn.
822 Treats each group of four vertices as an independent quadrilateral.
823 Vertices 4\u2062N-3 , 4\u2062N-2 , 4\u2062N-1 , and 4\u2062N define quadrilateral N .
824 N/4 quadrilaterals are drawn.
827 Draws a connected group of quadrilaterals. One quadrilateral is
828 defined for each pair of vertices presented after the first pair.
829 Vertices 2\u2062N-1 , 2\u2062N , 2\u2062N+2 , and 2\u2062N+1 define quadrilateral N .
830 N/2-1 quadrilaterals are drawn. Note that the order in which
831 vertices are used to construct a quadrilateral from strip data is
832 different from that used with independent data.
835 Draws a single, convex polygon. Vertices 1 through N define this
838 Only a subset of GL commands can be used between `glBegin' and `glEnd'.
839 The commands are `glVertex', `glColor', `glSecondaryColor', `glIndex',
840 `glNormal', `glFogCoord', `glTexCoord', `glMultiTexCoord',
841 `glVertexAttrib', `glEvalCoord', `glEvalPoint', `glArrayElement',
842 `glMaterial', and `glEdgeFlag'. Also, it is acceptable to use
843 `glCallList' or `glCallLists' to execute display lists that include only
844 the preceding commands. If any other GL command is executed between
845 `glBegin' and `glEnd', the error flag is set and the command is ignored.
847 Regardless of the value chosen for MODE, there is no limit to the number
848 of vertices that can be defined between `glBegin' and `glEnd'. Lines,
849 triangles, quadrilaterals, and polygons that are incompletely specified
850 are not drawn. Incomplete specification results when either too few
851 vertices are provided to specify even a single primitive or when an
852 incorrect multiple of vertices is specified. The incomplete primitive is
853 ignored; the rest are drawn.
855 The minimum specification of vertices for each primitive is as follows:
856 1 for a point, 2 for a line, 3 for a triangle, 4 for a quadrilateral,
857 and 3 for a polygon. Modes that require a certain multiple of vertices
858 are `GL_LINES' (2), `GL_TRIANGLES' (3), `GL_QUADS' (4), and
861 `GL_INVALID_ENUM' is generated if MODE is set to an unaccepted value.
863 `GL_INVALID_OPERATION' is generated if `glBegin' is executed between a
864 `glBegin' and the corresponding execution of `glEnd'.
866 `GL_INVALID_OPERATION' is generated if `glEnd' is executed without being
867 preceded by a `glBegin'.
869 `GL_INVALID_OPERATION' is generated if a command other than `glVertex',
870 `glColor', `glSecondaryColor', `glIndex', `glNormal', `glFogCoord',
871 `glTexCoord', `glMultiTexCoord', `glVertexAttrib', `glEvalCoord',
872 `glEvalPoint', `glArrayElement', `glMaterial', `glEdgeFlag',
873 `glCallList', or `glCallLists' is executed between the execution of
874 `glBegin' and the corresponding execution `glEnd'.
876 Execution of `glEnableClientState', `glDisableClientState',
877 `glEdgeFlagPointer', `glFogCoordPointer', `glTexCoordPointer',
878 `glColorPointer', `glSecondaryColorPointer', `glIndexPointer',
879 `glNormalPointer', `glVertexPointer', `glVertexAttribPointer',
880 `glInterleavedArrays', or `glPixelStore' is not allowed after a call to
881 `glBegin' and before the corresponding call to `glEnd', but an error may
882 or may not be generated.")
884 (define-gl-procedures
885 ((glBindAttribLocation
888 (name const-GLchar-*)
891 "Associates a generic vertex attribute index with a named attribute
895 Specifies the handle of the program object in which the association
899 Specifies the index of the generic vertex attribute to be bound.
902 Specifies a null terminated string containing the name of the
903 vertex shader attribute variable to which INDEX is to be bound.
905 `glBindAttribLocation' is used to associate a user-defined attribute
906 variable in the program object specified by PROGRAM with a generic
907 vertex attribute index. The name of the user-defined attribute variable
908 is passed as a null terminated string in NAME. The generic vertex
909 attribute index to be bound to this variable is specified by INDEX. When
910 PROGRAM is made part of current state, values provided via the generic
911 vertex attribute INDEX will modify the value of the user-defined
912 attribute variable specified by NAME.
914 If NAME refers to a matrix attribute variable, INDEX refers to the first
915 column of the matrix. Other matrix columns are then automatically bound
916 to locations INDEX+1 for a matrix of type mat2; INDEX+1 and INDEX+2 for
917 a matrix of type mat3; and INDEX+1, INDEX+2, and INDEX+3 for a matrix of
920 This command makes it possible for vertex shaders to use descriptive
921 names for attribute variables rather than generic variables that are
922 numbered from 0 to `GL_MAX_VERTEX_ATTRIBS' -1. The values sent to each
923 generic attribute index are part of current state, just like standard
924 vertex attributes such as color, normal, and vertex position. If a
925 different program object is made current by calling `glUseProgram', the
926 generic vertex attributes are tracked in such a way that the same values
927 will be observed by attributes in the new program object that are also
930 Attribute variable name-to-generic attribute index bindings for a
931 program object can be explicitly assigned at any time by calling
932 `glBindAttribLocation'. Attribute bindings do not go into effect until
933 `glLinkProgram' is called. After a program object has been linked
934 successfully, the index values for generic attributes remain fixed (and
935 their values can be queried) until the next link command occurs.
937 Applications are not allowed to bind any of the standard OpenGL vertex
938 attributes using this command, as they are bound automatically when
939 needed. Any attribute binding that occurs after the program object has
940 been linked will not take effect until the next time the program object
943 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
944 `GL_MAX_VERTEX_ATTRIBS'.
946 `GL_INVALID_OPERATION' is generated if NAME starts with the reserved
949 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
952 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
954 `GL_INVALID_OPERATION' is generated if `glBindAttribLocation' is
955 executed between the execution of `glBegin' and the corresponding
956 execution of `glEnd'.")
958 (define-gl-procedures
964 "Bind a named buffer object.
967 Specifies the target to which the buffer object is bound. The
968 symbolic constant must be `GL_ARRAY_BUFFER',
969 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
970 `GL_PIXEL_UNPACK_BUFFER'.
973 Specifies the name of a buffer object.
975 `glBindBuffer' lets you create or use a named buffer object. Calling
976 `glBindBuffer' with TARGET set to `GL_ARRAY_BUFFER',
977 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER' or
978 `GL_PIXEL_UNPACK_BUFFER' and BUFFER set to the name of the new buffer
979 object binds the buffer object name to the target. When a buffer object
980 is bound to a target, the previous binding for that target is
981 automatically broken.
983 Buffer object names are unsigned integers. The value zero is reserved,
984 but there is no default buffer object for each buffer object target.
985 Instead, BUFFER set to zero effectively unbinds any buffer object
986 previously bound, and restores client memory usage for that buffer
987 object target. Buffer object names and the corresponding buffer object
988 contents are local to the shared display-list space (see
989 `glXCreateContext') of the current GL rendering context; two rendering
990 contexts share buffer object names only if they also share display
993 You may use `glGenBuffers' to generate a set of new buffer object names.
995 The state of a buffer object immediately after it is first bound is an
996 unmapped zero-sized memory buffer with `GL_READ_WRITE' access and
997 `GL_STATIC_DRAW' usage.
999 While a non-zero buffer object name is bound, GL operations on the
1000 target to which it is bound affect the bound buffer object, and queries
1001 of the target to which it is bound return state from the bound buffer
1002 object. While buffer object name zero is bound, as in the initial state,
1003 attempts to modify or query state on the target to which it is bound
1004 generates an `GL_INVALID_OPERATION' error.
1006 When vertex array pointer state is changed, for example by a call to
1007 `glNormalPointer', the current buffer object binding
1008 (`GL_ARRAY_BUFFER_BINDING') is copied into the corresponding client
1009 state for the vertex array type being changed, for example
1010 `GL_NORMAL_ARRAY_BUFFER_BINDING'. While a non-zero buffer object is
1011 bound to the `GL_ARRAY_BUFFER' target, the vertex array pointer
1012 parameter that is traditionally interpreted as a pointer to client-side
1013 memory is instead interpreted as an offset within the buffer object
1014 measured in basic machine units.
1016 While a non-zero buffer object is bound to the `GL_ELEMENT_ARRAY_BUFFER'
1017 target, the indices parameter of `glDrawElements',
1018 `glDrawRangeElements', or `glMultiDrawElements' that is traditionally
1019 interpreted as a pointer to client-side memory is instead interpreted as
1020 an offset within the buffer object measured in basic machine units.
1022 While a non-zero buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
1023 target, the following commands are affected: `glGetCompressedTexImage',
1024 `glGetConvolutionFilter', `glGetHistogram', `glGetMinmax',
1025 `glGetPixelMap', `glGetPolygonStipple', `glGetSeparableFilter',
1026 `glGetTexImage', and `glReadPixels'. The pointer parameter that is
1027 traditionally interpreted as a pointer to client-side memory where the
1028 pixels are to be packed is instead interpreted as an offset within the
1029 buffer object measured in basic machine units.
1031 While a non-zero buffer object is bound to the `GL_PIXEL_UNPACK_BUFFER'
1032 target, the following commands are affected: `glBitmap',
1033 `glColorSubTable', `glColorTable', `glCompressedTexImage1D',
1034 `glCompressedTexImage2D', `glCompressedTexImage3D',
1035 `glCompressedTexSubImage1D', `glCompressedTexSubImage2D',
1036 `glCompressedTexSubImage3D', `glConvolutionFilter1D',
1037 `glConvolutionFilter2D', `glDrawPixels', `glPixelMap',
1038 `glPolygonStipple', `glSeparableFilter2D', `glTexImage1D',
1039 `glTexImage2D', `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D',
1040 and `glTexSubImage3D'. The pointer parameter that is traditionally
1041 interpreted as a pointer to client-side memory from which the pixels are
1042 to be unpacked is instead interpreted as an offset within the buffer
1043 object measured in basic machine units.
1045 A buffer object binding created with `glBindBuffer' remains active until
1046 a different buffer object name is bound to the same target, or until the
1047 bound buffer object is deleted with `glDeleteBuffers'.
1049 Once created, a named buffer object may be re-bound to any target as
1050 often as needed. However, the GL implementation may make choices about
1051 how to optimize the storage of a buffer object based on its initial
1054 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
1057 `GL_INVALID_OPERATION' is generated if `glBindBuffer' is executed
1058 between the execution of `glBegin' and the corresponding execution of
1061 (define-gl-procedures
1067 "Bind a named texture to a texturing target.
1070 Specifies the target to which the texture is bound. Must be either
1071 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D', or
1072 `GL_TEXTURE_CUBE_MAP'.
1075 Specifies the name of a texture.
1077 `glBindTexture' lets you create or use a named texture. Calling
1078 `glBindTexture' with TARGET set to `GL_TEXTURE_1D', `GL_TEXTURE_2D',
1079 `GL_TEXTURE_3D' or `GL_TEXTURE_CUBE_MAP' and TEXTURE set to the name of
1080 the new texture binds the texture name to the target. When a texture is
1081 bound to a target, the previous binding for that target is automatically
1084 Texture names are unsigned integers. The value zero is reserved to
1085 represent the default texture for each texture target. Texture names and
1086 the corresponding texture contents are local to the shared display-list
1087 space (see `glXCreateContext') of the current GL rendering context; two
1088 rendering contexts share texture names only if they also share display
1091 You may use `glGenTextures' to generate a set of new texture names.
1093 When a texture is first bound, it assumes the specified target: A
1094 texture first bound to `GL_TEXTURE_1D' becomes one-dimensional texture,
1095 a texture first bound to `GL_TEXTURE_2D' becomes two-dimensional
1096 texture, a texture first bound to `GL_TEXTURE_3D' becomes
1097 three-dimensional texture, and a texture first bound to
1098 `GL_TEXTURE_CUBE_MAP' becomes a cube-mapped texture. The state of a
1099 one-dimensional texture immediately after it is first bound is
1100 equivalent to the state of the default `GL_TEXTURE_1D' at GL
1101 initialization, and similarly for two- and three-dimensional textures
1102 and cube-mapped textures.
1104 While a texture is bound, GL operations on the target to which it is
1105 bound affect the bound texture, and queries of the target to which it is
1106 bound return state from the bound texture. If texture mapping is active
1107 on the target to which a texture is bound, the bound texture is used. In
1108 effect, the texture targets become aliases for the textures currently
1109 bound to them, and the texture name zero refers to the default textures
1110 that were bound to them at initialization.
1112 A texture binding created with `glBindTexture' remains active until a
1113 different texture is bound to the same target, or until the bound
1114 texture is deleted with `glDeleteTextures'.
1116 Once created, a named texture may be re-bound to its same original
1117 target as often as needed. It is usually much faster to use
1118 `glBindTexture' to bind an existing named texture to one of the texture
1119 targets than it is to reload the texture image using `glTexImage1D',
1120 `glTexImage2D', or `glTexImage3D'. For additional control over
1121 performance, use `glPrioritizeTextures'.
1123 `glBindTexture' is included in display lists.
1125 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
1128 `GL_INVALID_OPERATION' is generated if TEXTURE was previously created
1129 with a target that doesn't match that of TARGET.
1131 `GL_INVALID_OPERATION' is generated if `glBindTexture' is executed
1132 between the execution of `glBegin' and the corresponding execution of
1135 (define-gl-procedures
1143 (bitmap const-GLubyte-*)
1151 Specify the pixel width and height of the bitmap image.
1156 Specify the location of the origin in the bitmap image. The origin
1157 is measured from the lower left corner of the bitmap, with right
1158 and up being the positive axes.
1163 Specify the X and Y offsets to be added to the current raster
1164 position after the bitmap is drawn.
1167 Specifies the address of the bitmap image.
1169 A bitmap is a binary image. When drawn, the bitmap is positioned
1170 relative to the current raster position, and frame buffer pixels
1171 corresponding to 1's in the bitmap are written using the current raster
1172 color or index. Frame buffer pixels corresponding to 0's in the bitmap
1175 `glBitmap' takes seven arguments. The first pair specifies the width and
1176 height of the bitmap image. The second pair specifies the location of
1177 the bitmap origin relative to the lower left corner of the bitmap image.
1178 The third pair of arguments specifies X and Y offsets to be added to the
1179 current raster position after the bitmap has been drawn. The final
1180 argument is a pointer to the bitmap image itself.
1182 If a non-zero named buffer object is bound to the
1183 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a bitmap
1184 image is specified, BITMAP is treated as a byte offset into the buffer
1185 object's data store.
1187 The bitmap image is interpreted like image data for the `glDrawPixels'
1188 command, with WIDTH and HEIGHT corresponding to the width and height
1189 arguments of that command, and with TYPE set to `GL_BITMAP' and FORMAT
1190 set to `GL_COLOR_INDEX'. Modes specified using `glPixelStore' affect the
1191 interpretation of bitmap image data; modes specified using
1192 `glPixelTransfer' do not.
1194 If the current raster position is invalid, `glBitmap' is ignored.
1195 Otherwise, the lower left corner of the bitmap image is positioned at
1196 the window coordinates
1202 where (X_R,Y_R) is the raster position and (X_O,Y_O) is the bitmap
1203 origin. Fragments are then generated for each pixel corresponding to a 1
1204 (one) in the bitmap image. These fragments are generated using the
1205 current raster Z coordinate, color or color index, and current raster
1206 texture coordinates. They are then treated just as if they had been
1207 generated by a point, line, or polygon, including texture mapping,
1208 fogging, and all per-fragment operations such as alpha and depth
1211 After the bitmap has been drawn, the X and Y coordinates of the current
1212 raster position are offset by XMOVE and YMOVE. No change is made to the
1213 Z coordinate of the current raster position, or to the current raster
1214 color, texture coordinates, or index.
1216 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is negative.
1218 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
1219 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
1220 data store is currently mapped.
1222 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
1223 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
1224 unpacked from the buffer object such that the memory reads required
1225 would exceed the data store size.
1227 `GL_INVALID_OPERATION' is generated if `glBitmap' is executed between
1228 the execution of `glBegin' and the corresponding execution of `glEnd'.")
1230 (define-gl-procedures
1238 "Set the blend color.
1247 specify the components of `GL_BLEND_COLOR'
1249 The `GL_BLEND_COLOR' may be used to calculate the source and destination
1250 blending factors. The color components are clamped to the range [0,1]
1251 before being stored. See `glBlendFunc' for a complete description of the
1252 blending operations. Initially the `GL_BLEND_COLOR' is set to (0, 0, 0,
1255 `GL_INVALID_OPERATION' is generated if `glBlendColor' is executed
1256 between the execution of `glBegin' and the corresponding execution of
1259 (define-gl-procedures
1260 ((glBlendEquationSeparate
1265 "Set the RGB blend equation and the alpha blend equation separately.
1268 specifies the RGB blend equation, how the red, green, and blue
1269 components of the source and destination colors are combined. It
1270 must be `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
1271 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN', `GL_MAX'.
1274 specifies the alpha blend equation, how the alpha component of the
1275 source and destination colors are combined. It must be
1276 `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1279 The blend equations determines how a new pixel (the ''source'' color) is
1280 combined with a pixel already in the framebuffer (the ''destination''
1281 color). This function specifies one blend equation for the RGB-color
1282 components and one blend equation for the alpha component.
1284 The blend equations use the source and destination blend factors
1285 specified by either `glBlendFunc' or `glBlendFuncSeparate'. See
1286 `glBlendFunc' or `glBlendFuncSeparate' for a description of the various
1289 In the equations that follow, source and destination color components
1290 are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) , respectively.
1291 The result color is referred to as (R_R,G_RB_RA_R) . The source and
1292 destination blend factors are denoted (S_R,S_GS_BS_A) and
1293 (D_R,D_GD_BD_A) , respectively. For these equations all color components
1294 are understood to have values in the range [0,1] .
1297 *RGB Components*, *Alpha Component*
1300 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 ,
1301 AR=A_S\u2062S_A+A_D\u2062D_A
1304 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 ,
1305 AR=A_S\u2062S_A-A_D\u2062D_A
1307 `GL_FUNC_REVERSE_SUBTRACT'
1308 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 ,
1309 AR=A_D\u2062D_A-A_S\u2062S_A
1312 RR=MIN\u2061(R_S,R_D) GR=MIN\u2061(G_S,G_D) BR=MIN\u2061(B_S,B_D) ,
1313 AR=MIN\u2061(A_S,A_D)
1316 RR=MAX\u2061(R_S,R_D) GR=MAX\u2061(G_S,G_D) BR=MAX\u2061(B_S,B_D) ,
1317 AR=MAX\u2061(A_S,A_D)
1319 The results of these equations are clamped to the range [0,1] .
1321 The `GL_MIN' and `GL_MAX' equations are useful for applications that
1322 analyze image data (image thresholding against a constant color, for
1323 example). The `GL_FUNC_ADD' equation is useful for antialiasing and
1324 transparency, among other things.
1326 Initially, both the RGB blend equation and the alpha blend equation are
1327 set to `GL_FUNC_ADD'.
1331 `GL_INVALID_ENUM' is generated if either MODERGB or MODEALPHA is not one
1332 of `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1333 `GL_MAX', or `GL_MIN'.
1335 `GL_INVALID_OPERATION' is generated if `glBlendEquationSeparate' is
1336 executed between the execution of `glBegin' and the corresponding
1337 execution of `glEnd'.")
1339 (define-gl-procedures
1340 ((glBlendEquation (mode GLenum) -> void))
1341 "Specify the equation used for both the RGB blend equation and the Alpha
1345 specifies how source and destination colors are combined. It must
1346 be `GL_FUNC_ADD', `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT',
1349 The blend equations determine how a new pixel (the ''source'' color) is
1350 combined with a pixel already in the framebuffer (the ''destination''
1351 color). This function sets both the RGB blend equation and the alpha
1352 blend equation to a single equation.
1354 These equations use the source and destination blend factors specified
1355 by either `glBlendFunc' or `glBlendFuncSeparate'. See `glBlendFunc' or
1356 `glBlendFuncSeparate' for a description of the various blend factors.
1358 In the equations that follow, source and destination color components
1359 are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) , respectively.
1360 The result color is referred to as (R_R,G_RB_RA_R) . The source and
1361 destination blend factors are denoted (S_R,S_GS_BS_A) and
1362 (D_R,D_GD_BD_A) , respectively. For these equations all color components
1363 are understood to have values in the range [0,1] .
1366 *RGB Components*, *Alpha Component*
1369 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 ,
1370 AR=A_S\u2062S_A+A_D\u2062D_A
1373 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 ,
1374 AR=A_S\u2062S_A-A_D\u2062D_A
1376 `GL_FUNC_REVERSE_SUBTRACT'
1377 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 ,
1378 AR=A_D\u2062D_A-A_S\u2062S_A
1381 RR=MIN\u2061(R_S,R_D) GR=MIN\u2061(G_S,G_D) BR=MIN\u2061(B_S,B_D) ,
1382 AR=MIN\u2061(A_S,A_D)
1385 RR=MAX\u2061(R_S,R_D) GR=MAX\u2061(G_S,G_D) BR=MAX\u2061(B_S,B_D) ,
1386 AR=MAX\u2061(A_S,A_D)
1388 The results of these equations are clamped to the range [0,1] .
1390 The `GL_MIN' and `GL_MAX' equations are useful for applications that
1391 analyze image data (image thresholding against a constant color, for
1392 example). The `GL_FUNC_ADD' equation is useful for antialiasing and
1393 transparency, among other things.
1395 Initially, both the RGB blend equation and the alpha blend equation are
1396 set to `GL_FUNC_ADD'.
1400 `GL_INVALID_ENUM' is generated if MODE is not one of `GL_FUNC_ADD',
1401 `GL_FUNC_SUBTRACT', `GL_FUNC_REVERSE_SUBTRACT', `GL_MAX', or `GL_MIN'.
1403 `GL_INVALID_OPERATION' is generated if `glBlendEquation' is executed
1404 between the execution of `glBegin' and the corresponding execution of
1407 (define-gl-procedures
1408 ((glBlendFuncSeparate
1415 "Specify pixel arithmetic for RGB and alpha components separately.
1418 Specifies how the red, green, and blue blending factors are
1419 computed. The following symbolic constants are accepted: `GL_ZERO',
1420 `GL_ONE', `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR',
1421 `GL_ONE_MINUS_DST_COLOR', `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA',
1422 `GL_DST_ALPHA', `GL_ONE_MINUS_DST_ALPHA', `GL_CONSTANT_COLOR',
1423 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA',
1424 `GL_ONE_MINUS_CONSTANT_ALPHA', and `GL_SRC_ALPHA_SATURATE'. The
1425 initial value is `GL_ONE'.
1428 Specifies how the red, green, and blue destination blending factors
1429 are computed. The following symbolic constants are accepted:
1430 `GL_ZERO', `GL_ONE', `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR',
1431 `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR', `GL_SRC_ALPHA',
1432 `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA', `GL_ONE_MINUS_DST_ALPHA'.
1433 `GL_CONSTANT_COLOR', `GL_ONE_MINUS_CONSTANT_COLOR',
1434 `GL_CONSTANT_ALPHA', and `GL_ONE_MINUS_CONSTANT_ALPHA'. The initial
1438 Specified how the alpha source blending factor is computed. The
1439 same symbolic constants are accepted as for SRCRGB. The initial
1443 Specified how the alpha destination blending factor is computed.
1444 The same symbolic constants are accepted as for DSTRGB. The initial
1447 In RGBA mode, pixels can be drawn using a function that blends the
1448 incoming (source) RGBA values with the RGBA values that are already in
1449 the frame buffer (the destination values). Blending is initially
1450 disabled. Use `glEnable' and `glDisable' with argument `GL_BLEND' to
1451 enable and disable blending.
1453 `glBlendFuncSeparate' defines the operation of blending when it is
1454 enabled. SRCRGB specifies which method is used to scale the source
1455 RGB-color components. DSTRGB specifies which method is used to scale the
1456 destination RGB-color components. Likewise, SRCALPHA specifies which
1457 method is used to scale the source alpha color component, and DSTALPHA
1458 specifies which method is used to scale the destination alpha component.
1459 The possible methods are described in the following table. Each method
1460 defines four scale factors, one each for red, green, blue, and alpha.
1462 In the table and in subsequent equations, source and destination color
1463 components are referred to as (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) . The
1464 color specified by `glBlendColor' is referred to as (R_C,G_CB_CA_C) .
1465 They are understood to have integer values between 0 and (K_R,K_GK_BK_A)
1470 and (M_R,M_GM_BM_A) is the number of red, green, blue, and alpha
1473 Source and destination scale factors are referred to as (S_R,S_GS_BS_A)
1474 and (D_R,D_GD_BD_A) . All scale factors have range [0,1] .
1479 *RGB Factor*, *Alpha Factor*
1488 (R_S/K_R,G_S/K_GB_S/K_B) , A_S/K_A
1490 `GL_ONE_MINUS_SRC_COLOR'
1491 (1,111)-(R_S/K_R,G_S/K_GB_S/K_B) , 1-A_S/K_A
1494 (R_D/K_R,G_D/K_GB_D/K_B) , A_D/K_A
1496 `GL_ONE_MINUS_DST_COLOR'
1497 (1,11)-(R_D/K_R,G_D/K_GB_D/K_B) , 1-A_D/K_A
1500 (A_S/K_A,A_S/K_AA_S/K_A) , A_S/K_A
1502 `GL_ONE_MINUS_SRC_ALPHA'
1503 (1,11)-(A_S/K_A,A_S/K_AA_S/K_A) , 1-A_S/K_A
1506 (A_D/K_A,A_D/K_AA_D/K_A) , A_D/K_A
1508 `GL_ONE_MINUS_DST_ALPHA'
1509 (1,11)-(A_D/K_A,A_D/K_AA_D/K_A) , 1-A_D/K_A
1514 `GL_ONE_MINUS_CONSTANT_COLOR'
1515 (1,11)-(R_C,G_CB_C) , 1-A_C
1520 `GL_ONE_MINUS_CONSTANT_ALPHA'
1521 (1,11)-(A_C,A_CA_C) , 1-A_C
1523 `GL_SRC_ALPHA_SATURATE'
1528 I=MIN\u2061(A_S,1-A_D,)
1530 To determine the blended RGBA values of a pixel when drawing in RGBA
1531 mode, the system uses the following equations:
1533 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)
1534 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)
1536 Despite the apparent precision of the above equations, blending
1537 arithmetic is not exactly specified, because blending operates with
1538 imprecise integer color values. However, a blend factor that should be
1539 equal to 1 is guaranteed not to modify its multiplicand, and a blend
1540 factor equal to 0 reduces its multiplicand to 0. For example, when
1541 SRCRGB is `GL_SRC_ALPHA', DSTRGB is `GL_ONE_MINUS_SRC_ALPHA', and A_S is
1542 equal to K_A , the equations reduce to simple replacement:
1544 R_D=R_S G_D=G_S B_D=B_S A_D=A_S
1548 `GL_INVALID_ENUM' is generated if either SRCRGB or DSTRGB is not an
1551 `GL_INVALID_OPERATION' is generated if `glBlendFuncSeparate' is executed
1552 between the execution of `glBegin' and the corresponding execution of
1555 (define-gl-procedures
1561 "Specify pixel arithmetic.
1564 Specifies how the red, green, blue, and alpha source blending
1565 factors are computed. The following symbolic constants are
1566 accepted: `GL_ZERO', `GL_ONE', `GL_SRC_COLOR',
1567 `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR',
1568 `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA',
1569 `GL_ONE_MINUS_DST_ALPHA', `GL_CONSTANT_COLOR',
1570 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA',
1571 `GL_ONE_MINUS_CONSTANT_ALPHA', and `GL_SRC_ALPHA_SATURATE'. The
1572 initial value is `GL_ONE'.
1575 Specifies how the red, green, blue, and alpha destination blending
1576 factors are computed. The following symbolic constants are
1577 accepted: `GL_ZERO', `GL_ONE', `GL_SRC_COLOR',
1578 `GL_ONE_MINUS_SRC_COLOR', `GL_DST_COLOR', `GL_ONE_MINUS_DST_COLOR',
1579 `GL_SRC_ALPHA', `GL_ONE_MINUS_SRC_ALPHA', `GL_DST_ALPHA',
1580 `GL_ONE_MINUS_DST_ALPHA'. `GL_CONSTANT_COLOR',
1581 `GL_ONE_MINUS_CONSTANT_COLOR', `GL_CONSTANT_ALPHA', and
1582 `GL_ONE_MINUS_CONSTANT_ALPHA'. The initial value is `GL_ZERO'.
1584 In RGBA mode, pixels can be drawn using a function that blends the
1585 incoming (source) RGBA values with the RGBA values that are already in
1586 the frame buffer (the destination values). Blending is initially
1587 disabled. Use `glEnable' and `glDisable' with argument `GL_BLEND' to
1588 enable and disable blending.
1590 `glBlendFunc' defines the operation of blending when it is enabled.
1591 SFACTOR specifies which method is used to scale the source color
1592 components. DFACTOR specifies which method is used to scale the
1593 destination color components. The possible methods are described in the
1594 following table. Each method defines four scale factors, one each for
1595 red, green, blue, and alpha. In the table and in subsequent equations,
1596 source and destination color components are referred to as
1597 (R_S,G_SB_SA_S) and (R_D,G_DB_DA_D) . The color specified by
1598 `glBlendColor' is referred to as (R_C,G_CB_CA_C) . They are understood
1599 to have integer values between 0 and (K_R,K_GK_BK_A) , where
1603 and (M_R,M_GM_BM_A) is the number of red, green, blue, and alpha
1606 Source and destination scale factors are referred to as (S_R,S_GS_BS_A)
1607 and (D_R,D_GD_BD_A) . The scale factors described in the table, denoted
1608 (F_R,F_GF_BF_A) , represent either source or destination factors. All
1609 scale factors have range [0,1] .
1623 (R_S/K_R,G_S/K_GB_S/K_BA_S/K_A)
1625 `GL_ONE_MINUS_SRC_COLOR'
1626 (1,111)-(R_S/K_R,G_S/K_GB_S/K_BA_S/K_A)
1629 (R_D/K_R,G_D/K_GB_D/K_BA_D/K_A)
1631 `GL_ONE_MINUS_DST_COLOR'
1632 (1,111)-(R_D/K_R,G_D/K_GB_D/K_BA_D/K_A)
1635 (A_S/K_A,A_S/K_AA_S/K_AA_S/K_A)
1637 `GL_ONE_MINUS_SRC_ALPHA'
1638 (1,111)-(A_S/K_A,A_S/K_AA_S/K_AA_S/K_A)
1641 (A_D/K_A,A_D/K_AA_D/K_AA_D/K_A)
1643 `GL_ONE_MINUS_DST_ALPHA'
1644 (1,111)-(A_D/K_A,A_D/K_AA_D/K_AA_D/K_A)
1649 `GL_ONE_MINUS_CONSTANT_COLOR'
1650 (1,111)-(R_C,G_CB_CA_C)
1655 `GL_ONE_MINUS_CONSTANT_ALPHA'
1656 (1,111)-(A_C,A_CA_CA_C)
1658 `GL_SRC_ALPHA_SATURATE'
1663 I=MIN\u2061(A_S,K_A-A_D)/K_A
1665 To determine the blended RGBA values of a pixel when drawing in RGBA
1666 mode, the system uses the following equations:
1668 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)
1669 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)
1671 Despite the apparent precision of the above equations, blending
1672 arithmetic is not exactly specified, because blending operates with
1673 imprecise integer color values. However, a blend factor that should be
1674 equal to 1 is guaranteed not to modify its multiplicand, and a blend
1675 factor equal to 0 reduces its multiplicand to 0. For example, when
1676 SFACTOR is `GL_SRC_ALPHA', DFACTOR is `GL_ONE_MINUS_SRC_ALPHA', and A_S
1677 is equal to K_A , the equations reduce to simple replacement:
1679 R_D=R_S G_D=G_S B_D=B_S A_D=A_S
1683 `GL_INVALID_ENUM' is generated if either SFACTOR or DFACTOR is not an
1686 `GL_INVALID_OPERATION' is generated if `glBlendFunc' is executed between
1687 the execution of `glBegin' and the corresponding execution of `glEnd'.")
1689 (define-gl-procedures
1693 (data const-GLvoid-*)
1697 "Creates and initializes a buffer object's data store.
1700 Specifies the target buffer object. The symbolic constant must be
1701 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
1702 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
1705 Specifies the size in bytes of the buffer object's new data store.
1708 Specifies a pointer to data that will be copied into the data store
1709 for initialization, or `NULL' if no data is to be copied.
1712 Specifies the expected usage pattern of the data store. The
1713 symbolic constant must be `GL_STREAM_DRAW', `GL_STREAM_READ',
1714 `GL_STREAM_COPY', `GL_STATIC_DRAW', `GL_STATIC_READ',
1715 `GL_STATIC_COPY', `GL_DYNAMIC_DRAW', `GL_DYNAMIC_READ', or
1718 `glBufferData' creates a new data store for the buffer object currently
1719 bound to TARGET. Any pre-existing data store is deleted. The new data
1720 store is created with the specified SIZE in bytes and USAGE. If DATA is
1721 not `NULL', the data store is initialized with data from this pointer.
1722 In its initial state, the new data store is not mapped, it has a `NULL'
1723 mapped pointer, and its mapped access is `GL_READ_WRITE'.
1725 USAGE is a hint to the GL implementation as to how a buffer object's
1726 data store will be accessed. This enables the GL implementation to make
1727 more intelligent decisions that may significantly impact buffer object
1728 performance. It does not, however, constrain the actual usage of the
1729 data store. USAGE can be broken down into two parts: first, the
1730 frequency of access (modification and usage), and second, the nature of
1731 that access. The frequency of access may be one of these:
1734 The data store contents will be modified once and used at most a
1738 The data store contents will be modified once and used many times.
1741 The data store contents will be modified repeatedly and used many
1744 The nature of access may be one of these:
1747 The data store contents are modified by the application, and used
1748 as the source for GL drawing and image specification commands.
1751 The data store contents are modified by reading data from the GL,
1752 and used to return that data when queried by the application.
1755 The data store contents are modified by reading data from the GL,
1756 and used as the source for GL drawing and image specification
1759 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
1760 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
1761 `GL_PIXEL_UNPACK_BUFFER'.
1763 `GL_INVALID_ENUM' is generated if USAGE is not `GL_STREAM_DRAW',
1764 `GL_STREAM_READ', `GL_STREAM_COPY', `GL_STATIC_DRAW', `GL_STATIC_READ',
1765 `GL_STATIC_COPY', `GL_DYNAMIC_DRAW', `GL_DYNAMIC_READ', or
1768 `GL_INVALID_VALUE' is generated if SIZE is negative.
1770 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
1773 `GL_OUT_OF_MEMORY' is generated if the GL is unable to create a data
1774 store with the specified SIZE.
1776 `GL_INVALID_OPERATION' is generated if `glBufferData' is executed
1777 between the execution of `glBegin' and the corresponding execution of
1780 (define-gl-procedures
1785 (data const-GLvoid-*)
1788 "Updates a subset of a buffer object's data store.
1791 Specifies the target buffer object. The symbolic constant must be
1792 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
1793 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
1796 Specifies the offset into the buffer object's data store where data
1797 replacement will begin, measured in bytes.
1800 Specifies the size in bytes of the data store region being
1804 Specifies a pointer to the new data that will be copied into the
1807 `glBufferSubData' redefines some or all of the data store for the buffer
1808 object currently bound to TARGET. Data starting at byte offset OFFSET
1809 and extending for SIZE bytes is copied to the data store from the memory
1810 pointed to by DATA. An error is thrown if OFFSET and SIZE together
1811 define a range beyond the bounds of the buffer object's data store.
1813 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
1814 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
1815 `GL_PIXEL_UNPACK_BUFFER'.
1817 `GL_INVALID_VALUE' is generated if OFFSET or SIZE is negative, or if
1818 together they define a region of memory that extends beyond the buffer
1819 object's allocated data store.
1821 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
1824 `GL_INVALID_OPERATION' is generated if the buffer object being updated
1827 `GL_INVALID_OPERATION' is generated if `glBufferSubData' is executed
1828 between the execution of `glBegin' and the corresponding execution of
1831 (define-gl-procedures
1835 (lists const-GLvoid-*)
1838 "Execute a list of display lists.
1841 Specifies the number of display lists to be executed.
1844 Specifies the type of values in LISTS. Symbolic constants
1845 `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_UNSIGNED_SHORT',
1846 `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', `GL_2_BYTES',
1847 `GL_3_BYTES', and `GL_4_BYTES' are accepted.
1850 Specifies the address of an array of name offsets in the display
1851 list. The pointer type is void because the offsets can be bytes,
1852 shorts, ints, or floats, depending on the value of TYPE.
1854 `glCallLists' causes each display list in the list of names passed as
1855 LISTS to be executed. As a result, the commands saved in each display
1856 list are executed in order, just as if they were called without using a
1857 display list. Names of display lists that have not been defined are
1860 `glCallLists' provides an efficient means for executing more than one
1861 display list. TYPE allows lists with various name formats to be
1862 accepted. The formats are as follows:
1865 LISTS is treated as an array of signed bytes, each in the range
1869 LISTS is treated as an array of unsigned bytes, each in the range 0
1873 LISTS is treated as an array of signed two-byte integers, each in
1874 the range -32768 through 32767.
1877 LISTS is treated as an array of unsigned two-byte integers, each in
1878 the range 0 through 65535.
1881 LISTS is treated as an array of signed four-byte integers.
1884 LISTS is treated as an array of unsigned four-byte integers.
1887 LISTS is treated as an array of four-byte floating-point values.
1890 LISTS is treated as an array of unsigned bytes. Each pair of bytes
1891 specifies a single display-list name. The value of the pair is
1892 computed as 256 times the unsigned value of the first byte plus the
1893 unsigned value of the second byte.
1896 LISTS is treated as an array of unsigned bytes. Each triplet of
1897 bytes specifies a single display-list name. The value of the
1898 triplet is computed as 65536 times the unsigned value of the first
1899 byte, plus 256 times the unsigned value of the second byte, plus
1900 the unsigned value of the third byte.
1903 LISTS is treated as an array of unsigned bytes. Each quadruplet of
1904 bytes specifies a single display-list name. The value of the
1905 quadruplet is computed as 16777216 times the unsigned value of the
1906 first byte, plus 65536 times the unsigned value of the second byte,
1907 plus 256 times the unsigned value of the third byte, plus the
1908 unsigned value of the fourth byte.
1910 The list of display-list names is not null-terminated. Rather, N
1911 specifies how many names are to be taken from LISTS.
1913 An additional level of indirection is made available with the
1914 `glListBase' command, which specifies an unsigned offset that is added
1915 to each display-list name specified in LISTS before that display list is
1918 `glCallLists' can appear inside a display list. To avoid the possibility
1919 of infinite recursion resulting from display lists calling one another,
1920 a limit is placed on the nesting level of display lists during
1921 display-list execution. This limit must be at least 64, and it depends
1922 on the implementation.
1924 GL state is not saved and restored across a call to `glCallLists'. Thus,
1925 changes made to GL state during the execution of the display lists
1926 remain after execution is completed. Use `glPushAttrib', `glPopAttrib',
1927 `glPushMatrix', and `glPopMatrix' to preserve GL state across
1928 `glCallLists' calls.
1930 `GL_INVALID_VALUE' is generated if N is negative.
1932 `GL_INVALID_ENUM' is generated if TYPE is not one of `GL_BYTE',
1933 `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_UNSIGNED_SHORT', `GL_INT',
1934 `GL_UNSIGNED_INT', `GL_FLOAT', `GL_2_BYTES', `GL_3_BYTES', `GL_4_BYTES'.")
1936 (define-gl-procedures
1937 ((glCallList (list GLuint) -> void))
1938 "Execute a display list.
1941 Specifies the integer name of the display list to be executed.
1943 `glCallList' causes the named display list to be executed. The commands
1944 saved in the display list are executed in order, just as if they were
1945 called without using a display list. If LIST has not been defined as a
1946 display list, `glCallList' is ignored.
1948 `glCallList' can appear inside a display list. To avoid the possibility
1949 of infinite recursion resulting from display lists calling one another,
1950 a limit is placed on the nesting level of display lists during
1951 display-list execution. This limit is at least 64, and it depends on the
1954 GL state is not saved and restored across a call to `glCallList'. Thus,
1955 changes made to GL state during the execution of a display list remain
1956 after execution of the display list is completed. Use `glPushAttrib',
1957 `glPopAttrib', `glPushMatrix', and `glPopMatrix' to preserve GL state
1958 across `glCallList' calls.")
1960 (define-gl-procedures
1968 "Specify clear values for the accumulation buffer.
1977 Specify the red, green, blue, and alpha values used when the
1978 accumulation buffer is cleared. The initial values are all 0.
1980 `glClearAccum' specifies the red, green, blue, and alpha values used by
1981 `glClear' to clear the accumulation buffer.
1983 Values specified by `glClearAccum' are clamped to the range [-1,1] .
1985 `GL_INVALID_OPERATION' is generated if `glClearAccum' is executed
1986 between the execution of `glBegin' and the corresponding execution of
1989 (define-gl-procedures
1997 "Specify clear values for the color buffers.
2006 Specify the red, green, blue, and alpha values used when the color
2007 buffers are cleared. The initial values are all 0.
2009 `glClearColor' specifies the red, green, blue, and alpha values used by
2010 `glClear' to clear the color buffers. Values specified by `glClearColor'
2011 are clamped to the range [0,1] .
2013 `GL_INVALID_OPERATION' is generated if `glClearColor' is executed
2014 between the execution of `glBegin' and the corresponding execution of
2017 (define-gl-procedures
2018 ((glClearDepth (depth GLclampd) -> void))
2019 "Specify the clear value for the depth buffer.
2022 Specifies the depth value used when the depth buffer is cleared.
2023 The initial value is 1.
2025 `glClearDepth' specifies the depth value used by `glClear' to clear the
2026 depth buffer. Values specified by `glClearDepth' are clamped to the
2029 `GL_INVALID_OPERATION' is generated if `glClearDepth' is executed
2030 between the execution of `glBegin' and the corresponding execution of
2033 (define-gl-procedures
2034 ((glClearIndex (c GLfloat) -> void))
2035 "Specify the clear value for the color index buffers.
2038 Specifies the index used when the color index buffers are cleared.
2039 The initial value is 0.
2041 `glClearIndex' specifies the index used by `glClear' to clear the color
2042 index buffers. C is not clamped. Rather, C is converted to a fixed-point
2043 value with unspecified precision to the right of the binary point. The
2044 integer part of this value is then masked with 2^M-1 , where M is the
2045 number of bits in a color index stored in the frame buffer.
2047 `GL_INVALID_OPERATION' is generated if `glClearIndex' is executed
2048 between the execution of `glBegin' and the corresponding execution of
2051 (define-gl-procedures
2052 ((glClearStencil (s GLint) -> void))
2053 "Specify the clear value for the stencil buffer.
2056 Specifies the index used when the stencil buffer is cleared. The
2059 `glClearStencil' specifies the index used by `glClear' to clear the
2060 stencil buffer. S is masked with 2^M-1 , where M is the number of bits
2061 in the stencil buffer.
2063 `GL_INVALID_OPERATION' is generated if `glClearStencil' is executed
2064 between the execution of `glBegin' and the corresponding execution of
2067 (define-gl-procedures
2068 ((glClear (mask GLbitfield) -> void))
2069 "Clear buffers to preset values.
2072 Bitwise OR of masks that indicate the buffers to be cleared. The
2073 four masks are `GL_COLOR_BUFFER_BIT', `GL_DEPTH_BUFFER_BIT',
2074 `GL_ACCUM_BUFFER_BIT', and `GL_STENCIL_BUFFER_BIT'.
2076 `glClear' sets the bitplane area of the window to values previously
2077 selected by `glClearColor', `glClearIndex', `glClearDepth',
2078 `glClearStencil', and `glClearAccum'. Multiple color buffers can be
2079 cleared simultaneously by selecting more than one buffer at a time using
2082 The pixel ownership test, the scissor test, dithering, and the buffer
2083 writemasks affect the operation of `glClear'. The scissor box bounds the
2084 cleared region. Alpha function, blend function, logical operation,
2085 stenciling, texture mapping, and depth-buffering are ignored by
2088 `glClear' takes a single argument that is the bitwise OR of several
2089 values indicating which buffer is to be cleared.
2091 The values are as follows:
2093 `GL_COLOR_BUFFER_BIT'
2094 Indicates the buffers currently enabled for color writing.
2096 `GL_DEPTH_BUFFER_BIT'
2097 Indicates the depth buffer.
2099 `GL_ACCUM_BUFFER_BIT'
2100 Indicates the accumulation buffer.
2102 `GL_STENCIL_BUFFER_BIT'
2103 Indicates the stencil buffer.
2105 The value to which each buffer is cleared depends on the setting of the
2106 clear value for that buffer.
2108 `GL_INVALID_VALUE' is generated if any bit other than the four defined
2109 bits is set in MASK.
2111 `GL_INVALID_OPERATION' is generated if `glClear' is executed between the
2112 execution of `glBegin' and the corresponding execution of `glEnd'.")
2114 (define-gl-procedures
2115 ((glClientActiveTexture (texture GLenum) -> void))
2116 "Select active texture unit.
2119 Specifies which texture unit to make active. The number of texture
2120 units is implementation dependent, but must be at least two.
2121 TEXTURE must be one of `GL_TEXTURE' I , where i ranges from 0 to
2122 the value of `GL_MAX_TEXTURE_COORDS' - 1, which is an
2123 implementation-dependent value. The initial value is `GL_TEXTURE0'.
2125 `glClientActiveTexture' selects the vertex array client state parameters
2126 to be modified by `glTexCoordPointer', and enabled or disabled with
2127 `glEnableClientState' or `glDisableClientState', respectively, when
2128 called with a parameter of `GL_TEXTURE_COORD_ARRAY'.
2130 `GL_INVALID_ENUM' is generated if TEXTURE is not one of `GL_TEXTURE'I ,
2131 where i ranges from 0 to the value of `GL_MAX_TEXTURE_COORDS' - 1.")
2133 (define-gl-procedures
2136 (equation const-GLdouble-*)
2139 "Specify a plane against which all geometry is clipped.
2142 Specifies which clipping plane is being positioned. Symbolic names
2143 of the form `GL_CLIP_PLANE'I, where I is an integer between 0 and
2144 `GL_MAX_CLIP_PLANES' -1 , are accepted.
2147 Specifies the address of an array of four double-precision
2148 floating-point values. These values are interpreted as a plane
2151 Geometry is always clipped against the boundaries of a six-plane frustum
2152 in X, Y, and Z. `glClipPlane' allows the specification of additional
2153 planes, not necessarily perpendicular to the X, Y, or Z axis, against
2154 which all geometry is clipped. To determine the maximum number of
2155 additional clipping planes, call `glGetIntegerv' with argument
2156 `GL_MAX_CLIP_PLANES'. All implementations support at least six such
2157 clipping planes. Because the resulting clipping region is the
2158 intersection of the defined half-spaces, it is always convex.
2160 `glClipPlane' specifies a half-space using a four-component plane
2161 equation. When `glClipPlane' is called, EQUATION is transformed by the
2162 inverse of the modelview matrix and stored in the resulting eye
2163 coordinates. Subsequent changes to the modelview matrix have no effect
2164 on the stored plane-equation components. If the dot product of the eye
2165 coordinates of a vertex with the stored plane equation components is
2166 positive or zero, the vertex is IN with respect to that clipping plane.
2167 Otherwise, it is OUT.
2169 To enable and disable clipping planes, call `glEnable' and `glDisable'
2170 with the argument `GL_CLIP_PLANE'I, where I is the plane number.
2172 All clipping planes are initially defined as (0, 0, 0, 0) in eye
2173 coordinates and are disabled.
2175 `GL_INVALID_ENUM' is generated if PLANE is not an accepted value.
2177 `GL_INVALID_OPERATION' is generated if `glClipPlane' is executed between
2178 the execution of `glBegin' and the corresponding execution of `glEnd'.")
2180 (define-gl-procedures
2188 "Enable and disable writing of frame buffer color components.
2197 Specify whether red, green, blue, and alpha can or cannot be
2198 written into the frame buffer. The initial values are all
2199 `GL_TRUE', indicating that the color components can be written.
2201 `glColorMask' specifies whether the individual color components in the
2202 frame buffer can or cannot be written. If RED is `GL_FALSE', for
2203 example, no change is made to the red component of any pixel in any of
2204 the color buffers, regardless of the drawing operation attempted.
2206 Changes to individual bits of components cannot be controlled. Rather,
2207 changes are either enabled or disabled for entire color components.
2209 `GL_INVALID_OPERATION' is generated if `glColorMask' is executed between
2210 the execution of `glBegin' and the corresponding execution of `glEnd'.")
2212 (define-gl-procedures
2218 "Cause a material color to track the current color.
2221 Specifies whether front, back, or both front and back material
2222 parameters should track the current color. Accepted values are
2223 `GL_FRONT', `GL_BACK', and `GL_FRONT_AND_BACK'. The initial value
2224 is `GL_FRONT_AND_BACK'.
2227 Specifies which of several material parameters track the current
2228 color. Accepted values are `GL_EMISSION', `GL_AMBIENT',
2229 `GL_DIFFUSE', `GL_SPECULAR', and `GL_AMBIENT_AND_DIFFUSE'. The
2230 initial value is `GL_AMBIENT_AND_DIFFUSE'.
2232 `glColorMaterial' specifies which material parameters track the current
2233 color. When `GL_COLOR_MATERIAL' is enabled, the material parameter or
2234 parameters specified by MODE, of the material or materials specified by
2235 FACE, track the current color at all times.
2237 To enable and disable `GL_COLOR_MATERIAL', call `glEnable' and
2238 `glDisable' with argument `GL_COLOR_MATERIAL'. `GL_COLOR_MATERIAL' is
2241 `GL_INVALID_ENUM' is generated if FACE or MODE is not an accepted value.
2243 `GL_INVALID_OPERATION' is generated if `glColorMaterial' is executed
2244 between the execution of `glBegin' and the corresponding execution of
2247 (define-gl-procedures
2252 (pointer const-GLvoid-*)
2255 "Define an array of colors.
2258 Specifies the number of components per color. Must be 3 or 4. The
2262 Specifies the data type of each color component in the array.
2263 Symbolic constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
2264 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', and
2265 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
2268 Specifies the byte offset between consecutive colors. If STRIDE is
2269 0, the colors are understood to be tightly packed in the array. The
2273 Specifies a pointer to the first component of the first color
2274 element in the array. The initial value is 0.
2276 `glColorPointer' specifies the location and data format of an array of
2277 color components to use when rendering. SIZE specifies the number of
2278 components per color, and must be 3 or 4. TYPE specifies the data type
2279 of each color component, and STRIDE specifies the byte stride from one
2280 color to the next, allowing vertices and attributes to be packed into a
2281 single array or stored in separate arrays. (Single-array storage may be
2282 more efficient on some implementations; see `glInterleavedArrays'.)
2284 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
2285 target (see `glBindBuffer') while a color array is specified, POINTER is
2286 treated as a byte offset into the buffer object's data store. Also, the
2287 buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as color
2288 vertex array client-side state (`GL_COLOR_ARRAY_BUFFER_BINDING').
2290 When a color array is specified, SIZE, TYPE, STRIDE, and POINTER are
2291 saved as client-side state, in addition to the current vertex array
2292 buffer object binding.
2294 To enable and disable the color array, call `glEnableClientState' and
2295 `glDisableClientState' with the argument `GL_COLOR_ARRAY'. If enabled,
2296 the color array is used when `glDrawArrays', `glMultiDrawArrays',
2297 `glDrawElements', `glMultiDrawElements', `glDrawRangeElements', or
2298 `glArrayElement' is called.
2300 `GL_INVALID_VALUE' is generated if SIZE is not 3 or 4.
2302 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
2304 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
2306 (define-gl-procedures
2313 (data const-GLvoid-*)
2316 "Respecify a portion of a color table.
2319 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
2320 or `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2323 The starting index of the portion of the color table to be
2327 The number of table entries to replace.
2330 The format of the pixel data in DATA. The allowable values are
2331 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
2332 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
2335 The type of the pixel data in DATA. The allowable values are
2336 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
2337 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
2338 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
2339 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
2340 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
2341 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
2342 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
2343 `GL_UNSIGNED_INT_2_10_10_10_REV'.
2346 Pointer to a one-dimensional array of pixel data that is processed
2347 to replace the specified region of the color table.
2349 `glColorSubTable' is used to respecify a contiguous portion of a color
2350 table previously defined using `glColorTable'. The pixels referenced by
2351 DATA replace the portion of the existing table from indices START to
2352 START+COUNT-1 , inclusive. This region may not include any entries
2353 outside the range of the color table as it was originally specified. It
2354 is not an error to specify a subtexture with width of 0, but such a
2355 specification has no effect.
2357 If a non-zero named buffer object is bound to the
2358 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a portion of
2359 a color table is respecified, DATA is treated as a byte offset into the
2360 buffer object's data store.
2362 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
2365 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
2368 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
2371 `GL_INVALID_VALUE' is generated if START+COUNT>WIDTH .
2373 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2374 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
2375 data store is currently mapped.
2377 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2378 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
2379 unpacked from the buffer object such that the memory reads required
2380 would exceed the data store size.
2382 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2383 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
2384 divisible into the number of bytes needed to store in memory a datum
2387 `GL_INVALID_OPERATION' is generated if `glColorSubTable' is executed
2388 between the execution of `glBegin' and the corresponding execution of
2391 (define-gl-procedures
2392 ((glColorTableParameterfv
2395 (params const-GLfloat-*)
2398 (glColorTableParameteriv
2401 (params const-GLint-*)
2404 "Set color lookup table parameters.
2407 The target color table. Must be `GL_COLOR_TABLE',
2408 `GL_POST_CONVOLUTION_COLOR_TABLE', or
2409 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2412 The symbolic name of a texture color lookup table parameter. Must
2413 be one of `GL_COLOR_TABLE_SCALE' or `GL_COLOR_TABLE_BIAS'.
2416 A pointer to an array where the values of the parameters are
2419 `glColorTableParameter' is used to specify the scale factors and bias
2420 terms applied to color components when they are loaded into a color
2421 table. TARGET indicates which color table the scale and bias terms apply
2422 to; it must be set to `GL_COLOR_TABLE',
2423 `GL_POST_CONVOLUTION_COLOR_TABLE', or
2424 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
2426 PNAME must be `GL_COLOR_TABLE_SCALE' to set the scale factors. In this
2427 case, PARAMS points to an array of four values, which are the scale
2428 factors for red, green, blue, and alpha, in that order.
2430 PNAME must be `GL_COLOR_TABLE_BIAS' to set the bias terms. In this case,
2431 PARAMS points to an array of four values, which are the bias terms for
2432 red, green, blue, and alpha, in that order.
2434 The color tables themselves are specified by calling `glColorTable'.
2436 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an acceptable
2439 `GL_INVALID_OPERATION' is generated if `glColorTableParameter' is
2440 executed between the execution of `glBegin' and the corresponding
2441 execution of `glEnd'.")
2443 (define-gl-procedures
2446 (internalformat GLenum)
2450 (data const-GLvoid-*)
2453 "Define a color lookup table.
2456 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
2457 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `GL_PROXY_COLOR_TABLE',
2458 `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
2459 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
2462 The internal format of the color table. The allowable values are
2463 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
2464 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
2465 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
2466 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
2467 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
2468 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
2469 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
2470 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
2471 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
2472 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', and `GL_RGBA16'.
2475 The number of entries in the color lookup table specified by DATA.
2478 The format of the pixel data in DATA. The allowable values are
2479 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
2480 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
2483 The type of the pixel data in DATA. The allowable values are
2484 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
2485 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
2486 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
2487 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
2488 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
2489 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
2490 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
2491 `GL_UNSIGNED_INT_2_10_10_10_REV'.
2494 Pointer to a one-dimensional array of pixel data that is processed
2495 to build the color table.
2497 `glColorTable' may be used in two ways: to test the actual size and
2498 color resolution of a lookup table given a particular set of parameters,
2499 or to load the contents of a color lookup table. Use the targets
2500 `GL_PROXY_*' for the first case and the other targets for the second
2503 If a non-zero named buffer object is bound to the
2504 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a color table
2505 is specified, DATA is treated as a byte offset into the buffer object's
2508 If TARGET is `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
2509 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `glColorTable' builds a color lookup
2510 table from an array of pixels. The pixel array specified by WIDTH,
2511 FORMAT, TYPE, and DATA is extracted from memory and processed just as if
2512 `glDrawPixels' were called, but processing stops after the final
2513 expansion to RGBA is completed.
2515 The four scale parameters and the four bias parameters that are defined
2516 for the table are then used to scale and bias the R, G, B, and A
2517 components of each pixel. (Use `glColorTableParameter' to set these
2518 scale and bias parameters.)
2520 Next, the R, G, B, and A values are clamped to the range [0,1] . Each
2521 pixel is then converted to the internal format specified by
2522 INTERNALFORMAT. This conversion simply maps the component values of the
2523 pixel (R, G, B, and A) to the values included in the internal format
2524 (red, green, blue, alpha, luminance, and intensity). The mapping is as
2530 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
2538 `GL_LUMINANCE_ALPHA'
2550 Finally, the red, green, blue, alpha, luminance, and/or intensity
2551 components of the resulting pixels are stored in the color table. They
2552 form a one-dimensional table with indices in the range [0,WIDTH-1] .
2554 If TARGET is `GL_PROXY_*', `glColorTable' recomputes and stores the
2555 values of the proxy color table's state variables
2556 `GL_COLOR_TABLE_FORMAT', `GL_COLOR_TABLE_WIDTH',
2557 `GL_COLOR_TABLE_RED_SIZE', `GL_COLOR_TABLE_GREEN_SIZE',
2558 `GL_COLOR_TABLE_BLUE_SIZE', `GL_COLOR_TABLE_ALPHA_SIZE',
2559 `GL_COLOR_TABLE_LUMINANCE_SIZE', and `GL_COLOR_TABLE_INTENSITY_SIZE'.
2560 There is no effect on the image or state of any actual color table. If
2561 the specified color table is too large to be supported, then all the
2562 proxy state variables listed above are set to zero. Otherwise, the color
2563 table could be supported by `glColorTable' using the corresponding
2564 non-proxy target, and the proxy state variables are set as if that
2565 target were being defined.
2567 The proxy state variables can be retrieved by calling
2568 `glGetColorTableParameter' with a target of `GL_PROXY_*'. This allows
2569 the application to decide if a particular `glColorTable' command would
2570 succeed, and to determine what the resulting color table attributes
2573 If a color table is enabled, and its width is non-zero, then its
2574 contents are used to replace a subset of the components of each RGBA
2575 pixel group, based on the internal format of the table.
2577 Each pixel group has color components (R, G, B, A) that are in the range
2578 [0.0,1.0] . The color components are rescaled to the size of the color
2579 lookup table to form an index. Then a subset of the components based on
2580 the internal format of the table are replaced by the table entry
2581 selected by that index. If the color components and contents of the
2582 table are represented as follows:
2590 Table index computed from `R'
2593 Table index computed from `G'
2596 Table index computed from `B'
2599 Table index computed from `A'
2602 Luminance value at table index `i'
2605 Intensity value at table index `i'
2608 Red value at table index `i'
2611 Green value at table index `i'
2614 Blue value at table index `i'
2617 Alpha value at table index `i'
2619 then the result of color table lookup is as follows:
2624 *Resulting Texture Components*
2626 *Table Internal Format*
2630 `R', `G', `B', `A[a]'
2633 `L[r]', `L[g]', `L[b]', `At'
2635 `GL_LUMINANCE_ALPHA'
2636 `L[r]', `L[g]', `L[b]', `A[a]'
2639 `I[r]', `I[g]', `I[b]', `I[a]'
2642 `R[r]', `G[g]', `B[b]', `A'
2645 `R[r]', `G[g]', `B[b]', `A[a]'
2647 When `GL_COLOR_TABLE' is enabled, the colors resulting from the pixel
2648 map operation (if it is enabled) are mapped by the color lookup table
2649 before being passed to the convolution operation. The colors resulting
2650 from the convolution operation are modified by the post convolution
2651 color lookup table when `GL_POST_CONVOLUTION_COLOR_TABLE' is enabled.
2652 These modified colors are then sent to the color matrix operation.
2653 Finally, if `GL_POST_COLOR_MATRIX_COLOR_TABLE' is enabled, the colors
2654 resulting from the color matrix operation are mapped by the post color
2655 matrix color lookup table before being used by the histogram operation.
2659 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
2662 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
2665 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
2668 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
2671 `GL_INVALID_VALUE' is generated if WIDTH is less than zero.
2673 `GL_TABLE_TOO_LARGE' is generated if the requested color table is too
2674 large to be supported by the implementation, and TARGET is not a
2675 `GL_PROXY_*' target.
2677 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2678 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
2679 data store is currently mapped.
2681 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2682 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
2683 unpacked from the buffer object such that the memory reads required
2684 would exceed the data store size.
2686 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2687 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
2688 divisible into the number of bytes needed to store in memory a datum
2691 `GL_INVALID_OPERATION' is generated if `glColorTable' is executed
2692 between the execution of `glBegin' and the corresponding execution of
2695 (define-gl-procedures
2735 "Set the current color.
2742 Specify new red, green, and blue values for the current color.
2745 Specifies a new alpha value for the current color. Included only in
2746 the four-argument `glColor4' commands.
2748 The GL stores both a current single-valued color index and a current
2749 four-valued RGBA color. `glColor' sets a new four-valued RGBA color.
2750 `glColor' has two major variants: `glColor3' and `glColor4'. `glColor3'
2751 variants specify new red, green, and blue values explicitly and set the
2752 current alpha value to 1.0 (full intensity) implicitly. `glColor4'
2753 variants specify all four color components explicitly.
2755 `glColor3b', `glColor4b', `glColor3s', `glColor4s', `glColor3i', and
2756 `glColor4i' take three or four signed byte, short, or long integers as
2757 arguments. When *v* is appended to the name, the color commands can take
2758 a pointer to an array of such values.
2760 Current color values are stored in floating-point format, with
2761 unspecified mantissa and exponent sizes. Unsigned integer color
2762 components, when specified, are linearly mapped to floating-point values
2763 such that the largest representable value maps to 1.0 (full intensity),
2764 and 0 maps to 0.0 (zero intensity). Signed integer color components,
2765 when specified, are linearly mapped to floating-point values such that
2766 the most positive representable value maps to 1.0, and the most negative
2767 representable value maps to -1.0 . (Note that this mapping does not
2768 convert 0 precisely to 0.0.) Floating-point values are mapped directly.
2770 Neither floating-point nor signed integer values are clamped to the
2771 range [0,1] before the current color is updated. However, color
2772 components are clamped to this range before they are interpolated or
2773 written into a color buffer.")
2775 (define-gl-procedures
2776 ((glCompileShader (shader GLuint) -> void))
2777 "Compiles a shader object.
2780 Specifies the shader object to be compiled.
2782 `glCompileShader' compiles the source code strings that have been stored
2783 in the shader object specified by SHADER.
2785 The compilation status will be stored as part of the shader object's
2786 state. This value will be set to `GL_TRUE' if the shader was compiled
2787 without errors and is ready for use, and `GL_FALSE' otherwise. It can be
2788 queried by calling `glGetShader' with arguments SHADER and
2789 `GL_COMPILE_STATUS'.
2791 Compilation of a shader can fail for a number of reasons as specified by
2792 the OpenGL Shading Language Specification. Whether or not the
2793 compilation was successful, information about the compilation can be
2794 obtained from the shader object's information log by calling
2795 `glGetShaderInfoLog'.
2797 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
2800 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
2802 `GL_INVALID_OPERATION' is generated if `glCompileShader' is executed
2803 between the execution of `glBegin' and the corresponding execution of
2806 (define-gl-procedures
2807 ((glCompressedTexImage1D
2810 (internalformat GLenum)
2814 (data const-GLvoid-*)
2817 "Specify a one-dimensional texture image in a compressed format.
2820 Specifies the target texture. Must be `GL_TEXTURE_1D' or
2821 `GL_PROXY_TEXTURE_1D'.
2824 Specifies the level-of-detail number. Level 0 is the base image
2825 level. Level N is the Nth mipmap reduction image.
2828 Specifies the format of the compressed image data stored at address
2832 Specifies the width of the texture image including the border if
2833 any. If the GL version does not support non-power-of-two sizes,
2834 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
2835 implementations support texture images that are at least 64 texels
2836 wide. The height of the 1D texture image is 1.
2839 Specifies the width of the border. Must be either 0 or 1.
2842 Specifies the number of unsigned bytes of image data starting at
2843 the address specified by DATA.
2846 Specifies a pointer to the compressed image data in memory.
2848 Texturing maps a portion of a specified texture image onto each
2849 graphical primitive for which texturing is enabled. To enable and
2850 disable one-dimensional texturing, call `glEnable' and `glDisable' with
2851 argument `GL_TEXTURE_1D'.
2853 `glCompressedTexImage1D' loads a previously defined, and retrieved,
2854 compressed one-dimensional texture image if TARGET is `GL_TEXTURE_1D'
2855 (see `glTexImage1D').
2857 If TARGET is `GL_PROXY_TEXTURE_1D', no data is read from DATA, but all
2858 of the texture image state is recalculated, checked for consistency, and
2859 checked against the implementation's capabilities. If the implementation
2860 cannot handle a texture of the requested texture size, it sets all of
2861 the image state to 0, but does not generate an error (see `glGetError').
2862 To query for an entire mipmap array, use an image array level greater
2865 INTERNALFORMAT must be extension-specified compressed-texture format.
2866 When a texture is loaded with `glTexImage1D' using a generic compressed
2867 texture format (e.g., `GL_COMPRESSED_RGB') the GL selects from one of
2868 its extensions supporting compressed textures. In order to load the
2869 compressed texture image using `glCompressedTexImage1D', query the
2870 compressed texture image's size and format using
2871 `glGetTexLevelParameter'.
2873 If a non-zero named buffer object is bound to the
2874 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
2875 image is specified, DATA is treated as a byte offset into the buffer
2876 object's data store.
2878 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
2879 compressed internal formats: `GL_COMPRESSED_ALPHA',
2880 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
2881 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
2883 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
2884 format, dimensions, and contents of the specified compressed image data.
2886 `GL_INVALID_OPERATION' is generated if parameter combinations are not
2887 supported by the specific compressed internal format as specified in the
2888 specific texture compression extension.
2890 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2891 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
2892 data store is currently mapped.
2894 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
2895 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
2896 unpacked from the buffer object such that the memory reads required
2897 would exceed the data store size.
2899 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage1D' is
2900 executed between the execution of `glBegin' and the corresponding
2901 execution of `glEnd'.
2903 Undefined results, including abnormal program termination, are generated
2904 if DATA is not encoded in a manner consistent with the extension
2905 specification defining the internal compression format.")
2907 (define-gl-procedures
2908 ((glCompressedTexImage2D
2911 (internalformat GLenum)
2916 (data const-GLvoid-*)
2919 "Specify a two-dimensional texture image in a compressed format.
2922 Specifies the target texture. Must be `GL_TEXTURE_2D',
2923 `GL_PROXY_TEXTURE_2D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
2924 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
2925 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
2926 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
2929 Specifies the level-of-detail number. Level 0 is the base image
2930 level. Level N is the Nth mipmap reduction image.
2933 Specifies the format of the compressed image data stored at address
2937 Specifies the width of the texture image including the border if
2938 any. If the GL version does not support non-power-of-two sizes,
2939 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
2940 implementations support 2D texture images that are at least 64
2941 texels wide and cube-mapped texture images that are at least 16
2945 Specifies the height of the texture image including the border if
2946 any. If the GL version does not support non-power-of-two sizes,
2947 this value must be Must be 2^N+2\u2061(BORDER,) for some integer N . All
2948 implementations support 2D texture images that are at least 64
2949 texels high and cube-mapped texture images that are at least 16
2953 Specifies the width of the border. Must be either 0 or 1.
2956 Specifies the number of unsigned bytes of image data starting at
2957 the address specified by DATA.
2960 Specifies a pointer to the compressed image data in memory.
2962 Texturing maps a portion of a specified texture image onto each
2963 graphical primitive for which texturing is enabled. To enable and
2964 disable two-dimensional texturing, call `glEnable' and `glDisable' with
2965 argument `GL_TEXTURE_2D'. To enable and disable texturing using
2966 cube-mapped textures, call `glEnable' and `glDisable' with argument
2967 `GL_TEXTURE_CUBE_MAP'.
2969 `glCompressedTexImage2D' loads a previously defined, and retrieved,
2970 compressed two-dimensional texture image if TARGET is `GL_TEXTURE_2D'
2971 (see `glTexImage2D').
2973 If TARGET is `GL_PROXY_TEXTURE_2D', no data is read from DATA, but all
2974 of the texture image state is recalculated, checked for consistency, and
2975 checked against the implementation's capabilities. If the implementation
2976 cannot handle a texture of the requested texture size, it sets all of
2977 the image state to 0, but does not generate an error (see `glGetError').
2978 To query for an entire mipmap array, use an image array level greater
2981 INTERNALFORMAT must be an extension-specified compressed-texture format.
2982 When a texture is loaded with `glTexImage2D' using a generic compressed
2983 texture format (e.g., `GL_COMPRESSED_RGB'), the GL selects from one of
2984 its extensions supporting compressed textures. In order to load the
2985 compressed texture image using `glCompressedTexImage2D', query the
2986 compressed texture image's size and format using
2987 `glGetTexLevelParameter'.
2989 If a non-zero named buffer object is bound to the
2990 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
2991 image is specified, DATA is treated as a byte offset into the buffer
2992 object's data store.
2994 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
2995 compressed internal formats: `GL_COMPRESSED_ALPHA',
2996 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
2997 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
2999 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3000 format, dimensions, and contents of the specified compressed image data.
3002 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3003 supported by the specific compressed internal format as specified in the
3004 specific texture compression extension.
3006 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3007 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3008 data store is currently mapped.
3010 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3011 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3012 unpacked from the buffer object such that the memory reads required
3013 would exceed the data store size.
3015 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage2D' is
3016 executed between the execution of `glBegin' and the corresponding
3017 execution of `glEnd'.
3019 Undefined results, including abnormal program termination, are generated
3020 if DATA is not encoded in a manner consistent with the extension
3021 specification defining the internal compression format.")
3023 (define-gl-procedures
3024 ((glCompressedTexImage3D
3027 (internalformat GLenum)
3033 (data const-GLvoid-*)
3036 "Specify a three-dimensional texture image in a compressed format.
3039 Specifies the target texture. Must be `GL_TEXTURE_3D' or
3040 `GL_PROXY_TEXTURE_3D'.
3043 Specifies the level-of-detail number. Level 0 is the base image
3044 level. Level N is the Nth mipmap reduction image.
3047 Specifies the format of the compressed image data stored at address
3051 Specifies the width of the texture image including the border if
3052 any. If the GL version does not support non-power-of-two sizes,
3053 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3054 implementations support 3D texture images that are at least 16
3058 Specifies the height of the texture image including the border if
3059 any. If the GL version does not support non-power-of-two sizes,
3060 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3061 implementations support 3D texture images that are at least 16
3065 Specifies the depth of the texture image including the border if
3066 any. If the GL version does not support non-power-of-two sizes,
3067 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
3068 implementations support 3D texture images that are at least 16
3072 Specifies the width of the border. Must be either 0 or 1.
3075 Specifies the number of unsigned bytes of image data starting at
3076 the address specified by DATA.
3079 Specifies a pointer to the compressed image data in memory.
3081 Texturing maps a portion of a specified texture image onto each
3082 graphical primitive for which texturing is enabled. To enable and
3083 disable three-dimensional texturing, call `glEnable' and `glDisable'
3084 with argument `GL_TEXTURE_3D'.
3086 `glCompressedTexImage3D' loads a previously defined, and retrieved,
3087 compressed three-dimensional texture image if TARGET is `GL_TEXTURE_3D'
3088 (see `glTexImage3D').
3090 If TARGET is `GL_PROXY_TEXTURE_3D', no data is read from DATA, but all
3091 of the texture image state is recalculated, checked for consistency, and
3092 checked against the implementation's capabilities. If the implementation
3093 cannot handle a texture of the requested texture size, it sets all of
3094 the image state to 0, but does not generate an error (see `glGetError').
3095 To query for an entire mipmap array, use an image array level greater
3098 INTERNALFORMAT must be an extension-specified compressed-texture format.
3099 When a texture is loaded with `glTexImage2D' using a generic compressed
3100 texture format (e.g., `GL_COMPRESSED_RGB'), the GL selects from one of
3101 its extensions supporting compressed textures. In order to load the
3102 compressed texture image using `glCompressedTexImage3D', query the
3103 compressed texture image's size and format using
3104 `glGetTexLevelParameter'.
3106 If a non-zero named buffer object is bound to the
3107 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3108 image is specified, DATA is treated as a byte offset into the buffer
3109 object's data store.
3111 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is one of the generic
3112 compressed internal formats: `GL_COMPRESSED_ALPHA',
3113 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3114 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA'.
3116 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3117 format, dimensions, and contents of the specified compressed image data.
3119 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3120 supported by the specific compressed internal format as specified in the
3121 specific texture compression extension.
3123 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3124 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3125 data store is currently mapped.
3127 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3128 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3129 unpacked from the buffer object such that the memory reads required
3130 would exceed the data store size.
3132 `GL_INVALID_OPERATION' is generated if `glCompressedTexImage3D' is
3133 executed between the execution of `glBegin' and the corresponding
3134 execution of `glEnd'.
3136 Undefined results, including abnormal program termination, are generated
3137 if DATA is not encoded in a manner consistent with the extension
3138 specification defining the internal compression format.")
3140 (define-gl-procedures
3141 ((glCompressedTexSubImage1D
3148 (data const-GLvoid-*)
3151 "Specify a one-dimensional texture subimage in a compressed format.
3154 Specifies the target texture. Must be `GL_TEXTURE_1D'.
3157 Specifies the level-of-detail number. Level 0 is the base image
3158 level. Level N is the Nth mipmap reduction image.
3161 Specifies a texel offset in the x direction within the texture
3165 Specifies the width of the texture subimage.
3168 Specifies the format of the compressed image data stored at address
3172 Specifies the number of unsigned bytes of image data starting at
3173 the address specified by DATA.
3176 Specifies a pointer to the compressed image data in memory.
3178 Texturing maps a portion of a specified texture image onto each
3179 graphical primitive for which texturing is enabled. To enable and
3180 disable one-dimensional texturing, call `glEnable' and `glDisable' with
3181 argument `GL_TEXTURE_1D'.
3183 `glCompressedTexSubImage1D' redefines a contiguous subregion of an
3184 existing one-dimensional texture image. The texels referenced by DATA
3185 replace the portion of the existing texture array with x indices XOFFSET
3186 and XOFFSET+WIDTH-1 , inclusive. This region may not include any texels
3187 outside the range of the texture array as it was originally specified.
3188 It is not an error to specify a subtexture with width of 0, but such a
3189 specification has no effect.
3191 FORMAT must be an extension-specified compressed-texture format. The
3192 FORMAT of the compressed texture image is selected by the GL
3193 implementation that compressed it (see `glTexImage1D'), and should be
3194 queried at the time the texture was compressed with
3195 `glGetTexLevelParameter'.
3197 If a non-zero named buffer object is bound to the
3198 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3199 image is specified, DATA is treated as a byte offset into the buffer
3200 object's data store.
3202 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3203 compressed internal formats: `GL_COMPRESSED_ALPHA',
3204 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3205 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3206 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3207 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3208 `GL_COMPRESSED_SRGB_ALPHA'.
3210 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3211 format, dimensions, and contents of the specified compressed image data.
3213 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3214 supported by the specific compressed internal format as specified in the
3215 specific texture compression extension.
3217 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3218 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3219 data store is currently mapped.
3221 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3222 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3223 unpacked from the buffer object such that the memory reads required
3224 would exceed the data store size.
3226 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage1D' is
3227 executed between the execution of `glBegin' and the corresponding
3228 execution of `glEnd'.
3230 Undefined results, including abnormal program termination, are generated
3231 if DATA is not encoded in a manner consistent with the extension
3232 specification defining the internal compression format.")
3234 (define-gl-procedures
3235 ((glCompressedTexSubImage2D
3244 (data const-GLvoid-*)
3247 "Specify a two-dimensional texture subimage in a compressed format.
3250 Specifies the target texture. Must be `GL_TEXTURE_2D',
3251 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
3252 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
3253 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
3254 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
3257 Specifies the level-of-detail number. Level 0 is the base image
3258 level. Level N is the Nth mipmap reduction image.
3261 Specifies a texel offset in the x direction within the texture
3265 Specifies a texel offset in the y direction within the texture
3269 Specifies the width of the texture subimage.
3272 Specifies the height of the texture subimage.
3275 Specifies the format of the compressed image data stored at address
3279 Specifies the number of unsigned bytes of image data starting at
3280 the address specified by DATA.
3283 Specifies a pointer to the compressed image data in memory.
3285 Texturing maps a portion of a specified texture image onto each
3286 graphical primitive for which texturing is enabled. To enable and
3287 disable two-dimensional texturing, call `glEnable' and `glDisable' with
3288 argument `GL_TEXTURE_2D'. To enable and disable texturing using
3289 cube-mapped texture, call `glEnable' and `glDisable' with argument
3290 `GL_TEXTURE_CUBE_MAP'.
3292 `glCompressedTexSubImage2D' redefines a contiguous subregion of an
3293 existing two-dimensional texture image. The texels referenced by DATA
3294 replace the portion of the existing texture array with x indices XOFFSET
3295 and XOFFSET+WIDTH-1 , and the y indices YOFFSET and YOFFSET+HEIGHT-1 ,
3296 inclusive. This region may not include any texels outside the range of
3297 the texture array as it was originally specified. It is not an error to
3298 specify a subtexture with width of 0, but such a specification has no
3301 FORMAT must be an extension-specified compressed-texture format. The
3302 FORMAT of the compressed texture image is selected by the GL
3303 implementation that compressed it (see `glTexImage2D') and should be
3304 queried at the time the texture was compressed with
3305 `glGetTexLevelParameter'.
3307 If a non-zero named buffer object is bound to the
3308 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3309 image is specified, DATA is treated as a byte offset into the buffer
3310 object's data store.
3312 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3313 compressed internal formats: `GL_COMPRESSED_ALPHA',
3314 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3315 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3316 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3317 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3318 `GL_COMPRESSED_SRGB_ALPHA'.
3320 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3321 format, dimensions, and contents of the specified compressed image data.
3323 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3324 supported by the specific compressed internal format as specified in the
3325 specific texture compression extension.
3327 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3328 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3329 data store is currently mapped.
3331 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3332 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3333 unpacked from the buffer object such that the memory reads required
3334 would exceed the data store size.
3336 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage2D' is
3337 executed between the execution of `glBegin' and the corresponding
3338 execution of `glEnd'.
3340 Undefined results, including abnormal program termination, are generated
3341 if DATA is not encoded in a manner consistent with the extension
3342 specification defining the internal compression format.")
3344 (define-gl-procedures
3345 ((glCompressedTexSubImage3D
3356 (data const-GLvoid-*)
3359 "Specify a three-dimensional texture subimage in a compressed format.
3362 Specifies the target texture. Must be `GL_TEXTURE_3D'.
3365 Specifies the level-of-detail number. Level 0 is the base image
3366 level. Level N is the Nth mipmap reduction image.
3369 Specifies a texel offset in the x direction within the texture
3373 Specifies a texel offset in the y direction within the texture
3377 Specifies the width of the texture subimage.
3380 Specifies the height of the texture subimage.
3383 Specifies the depth of the texture subimage.
3386 Specifies the format of the compressed image data stored at address
3390 Specifies the number of unsigned bytes of image data starting at
3391 the address specified by DATA.
3394 Specifies a pointer to the compressed image data in memory.
3396 Texturing maps a portion of a specified texture image onto each
3397 graphical primitive for which texturing is enabled. To enable and
3398 disable three-dimensional texturing, call `glEnable' and `glDisable'
3399 with argument `GL_TEXTURE_3D'.
3401 `glCompressedTexSubImage3D' redefines a contiguous subregion of an
3402 existing three-dimensional texture image. The texels referenced by DATA
3403 replace the portion of the existing texture array with x indices XOFFSET
3404 and XOFFSET+WIDTH-1 , and the y indices YOFFSET and YOFFSET+HEIGHT-1 ,
3405 and the z indices ZOFFSET and ZOFFSET+DEPTH-1 , inclusive. This region
3406 may not include any texels outside the range of the texture array as it
3407 was originally specified. It is not an error to specify a subtexture
3408 with width of 0, but such a specification has no effect.
3410 FORMAT must be an extension-specified compressed-texture format. The
3411 FORMAT of the compressed texture image is selected by the GL
3412 implementation that compressed it (see `glTexImage3D') and should be
3413 queried at the time the texture was compressed with
3414 `glGetTexLevelParameter'.
3416 If a non-zero named buffer object is bound to the
3417 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
3418 image is specified, DATA is treated as a byte offset into the buffer
3419 object's data store.
3421 `GL_INVALID_ENUM' is generated if FORMAT is one of these generic
3422 compressed internal formats: `GL_COMPRESSED_ALPHA',
3423 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
3424 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA',
3425 `GL_COMPRESSED_SLUMINANCE', `GL_COMPRESSED_SLUMINANCE_ALPHA',
3426 `GL_COMPRESSED_SRGB', `GL_COMPRESSED_SRGBA', or
3427 `GL_COMPRESSED_SRGB_ALPHA'.
3429 `GL_INVALID_VALUE' is generated if IMAGESIZE is not consistent with the
3430 format, dimensions, and contents of the specified compressed image data.
3432 `GL_INVALID_OPERATION' is generated if parameter combinations are not
3433 supported by the specific compressed internal format as specified in the
3434 specific texture compression extension.
3436 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3437 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3438 data store is currently mapped.
3440 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3441 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3442 unpacked from the buffer object such that the memory reads required
3443 would exceed the data store size.
3445 `GL_INVALID_OPERATION' is generated if `glCompressedTexSubImage3D' is
3446 executed between the execution of `glBegin' and the corresponding
3447 execution of `glEnd'.
3449 Undefined results, including abnormal program termination, are generated
3450 if DATA is not encoded in a manner consistent with the extension
3451 specification defining the internal compression format.")
3453 (define-gl-procedures
3454 ((glConvolutionFilter1D
3456 (internalformat GLenum)
3460 (data const-GLvoid-*)
3463 "Define a one-dimensional convolution filter.
3466 Must be `GL_CONVOLUTION_1D'.
3469 The internal format of the convolution filter kernel. The allowable
3470 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
3471 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
3472 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
3473 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
3474 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
3475 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
3476 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
3477 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
3478 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
3479 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
3480 `GL_RGBA12', or `GL_RGBA16'.
3483 The width of the pixel array referenced by DATA.
3486 The format of the pixel data in DATA. The allowable values are
3487 `GL_ALPHA', `GL_LUMINANCE', `GL_LUMINANCE_ALPHA', `GL_INTENSITY',
3488 `GL_RGB', and `GL_RGBA'.
3491 The type of the pixel data in DATA. Symbolic constants
3492 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
3493 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
3494 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3495 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
3496 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3497 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3498 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3499 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
3503 Pointer to a one-dimensional array of pixel data that is processed
3504 to build the convolution filter kernel.
3506 `glConvolutionFilter1D' builds a one-dimensional convolution filter
3507 kernel from an array of pixels.
3509 The pixel array specified by WIDTH, FORMAT, TYPE, and DATA is extracted
3510 from memory and processed just as if `glDrawPixels' were called, but
3511 processing stops after the final expansion to RGBA is completed.
3513 If a non-zero named buffer object is bound to the
3514 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
3515 filter is specified, DATA is treated as a byte offset into the buffer
3516 object's data store.
3518 The R, G, B, and A components of each pixel are next scaled by the four
3519 1D `GL_CONVOLUTION_FILTER_SCALE' parameters and biased by the four 1D
3520 `GL_CONVOLUTION_FILTER_BIAS' parameters. (The scale and bias parameters
3521 are set by `glConvolutionParameter' using the `GL_CONVOLUTION_1D' target
3522 and the names `GL_CONVOLUTION_FILTER_SCALE' and
3523 `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors of
3524 four values that are applied to red, green, blue, and alpha, in that
3525 order.) The R, G, B, and A values are not clamped to [0,1] at any time
3526 during this process.
3528 Each pixel is then converted to the internal format specified by
3529 INTERNALFORMAT. This conversion simply maps the component values of the
3530 pixel (R, G, B, and A) to the values included in the internal format
3531 (red, green, blue, alpha, luminance, and intensity). The mapping is as
3537 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
3545 `GL_LUMINANCE_ALPHA'
3557 The red, green, blue, alpha, luminance, and/or intensity components of
3558 the resulting pixels are stored in floating-point rather than integer
3559 format. They form a one-dimensional filter kernel image indexed with
3560 coordinate I such that I starts at 0 and increases from left to right.
3561 Kernel location I is derived from the Ith pixel, counting from 0.
3563 Note that after a convolution is performed, the resulting color
3564 components are also scaled by their corresponding
3565 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
3566 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
3567 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
3568 set by `glPixelTransfer'.
3570 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_1D'.
3572 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
3575 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
3578 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
3581 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
3582 than the maximum supported value. This value may be queried with
3583 `glGetConvolutionParameter' using target `GL_CONVOLUTION_1D' and name
3584 `GL_MAX_CONVOLUTION_WIDTH'.
3586 `GL_INVALID_OPERATION' is generated if FORMAT is one of
3587 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3588 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and TYPE is
3591 `GL_INVALID_OPERATION' is generated if FORMAT is one of
3592 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3593 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3594 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3595 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
3596 TYPE is neither `GL_RGBA' nor `GL_BGRA'.
3598 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3599 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3600 data store is currently mapped.
3602 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3603 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3604 unpacked from the buffer object such that the memory reads required
3605 would exceed the data store size.
3607 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3608 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
3609 divisible into the number of bytes needed to store in memory a datum
3612 `GL_INVALID_OPERATION' is generated if `glConvolutionFilter1D' is
3613 executed between the execution of `glBegin' and the corresponding
3614 execution of `glEnd'.")
3616 (define-gl-procedures
3617 ((glConvolutionFilter2D
3619 (internalformat GLenum)
3624 (data const-GLvoid-*)
3627 "Define a two-dimensional convolution filter.
3630 Must be `GL_CONVOLUTION_2D'.
3633 The internal format of the convolution filter kernel. The allowable
3634 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
3635 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
3636 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
3637 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
3638 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
3639 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
3640 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
3641 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
3642 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
3643 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
3644 `GL_RGBA12', or `GL_RGBA16'.
3647 The width of the pixel array referenced by DATA.
3650 The height of the pixel array referenced by DATA.
3653 The format of the pixel data in DATA. The allowable values are
3654 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
3655 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
3658 The type of the pixel data in DATA. Symbolic constants
3659 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
3660 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
3661 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3662 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
3663 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3664 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3665 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3666 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
3670 Pointer to a two-dimensional array of pixel data that is processed
3671 to build the convolution filter kernel.
3673 `glConvolutionFilter2D' builds a two-dimensional convolution filter
3674 kernel from an array of pixels.
3676 The pixel array specified by WIDTH, HEIGHT, FORMAT, TYPE, and DATA is
3677 extracted from memory and processed just as if `glDrawPixels' were
3678 called, but processing stops after the final expansion to RGBA is
3681 If a non-zero named buffer object is bound to the
3682 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
3683 filter is specified, DATA is treated as a byte offset into the buffer
3684 object's data store.
3686 The R, G, B, and A components of each pixel are next scaled by the four
3687 2D `GL_CONVOLUTION_FILTER_SCALE' parameters and biased by the four 2D
3688 `GL_CONVOLUTION_FILTER_BIAS' parameters. (The scale and bias parameters
3689 are set by `glConvolutionParameter' using the `GL_CONVOLUTION_2D' target
3690 and the names `GL_CONVOLUTION_FILTER_SCALE' and
3691 `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors of
3692 four values that are applied to red, green, blue, and alpha, in that
3693 order.) The R, G, B, and A values are not clamped to [0,1] at any time
3694 during this process.
3696 Each pixel is then converted to the internal format specified by
3697 INTERNALFORMAT. This conversion simply maps the component values of the
3698 pixel (R, G, B, and A) to the values included in the internal format
3699 (red, green, blue, alpha, luminance, and intensity). The mapping is as
3705 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
3713 `GL_LUMINANCE_ALPHA'
3725 The red, green, blue, alpha, luminance, and/or intensity components of
3726 the resulting pixels are stored in floating-point rather than integer
3727 format. They form a two-dimensional filter kernel image indexed with
3728 coordinates I and J such that I starts at zero and increases from left
3729 to right, and J starts at zero and increases from bottom to top. Kernel
3730 location I,J is derived from the Nth pixel, where N is I+J*WIDTH.
3732 Note that after a convolution is performed, the resulting color
3733 components are also scaled by their corresponding
3734 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
3735 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
3736 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
3737 set by `glPixelTransfer'.
3739 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_2D'.
3741 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
3744 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
3747 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
3750 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
3751 than the maximum supported value. This value may be queried with
3752 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
3753 `GL_MAX_CONVOLUTION_WIDTH'.
3755 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
3756 than the maximum supported value. This value may be queried with
3757 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
3758 `GL_MAX_CONVOLUTION_HEIGHT'.
3760 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
3761 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
3762 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
3765 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
3766 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
3767 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
3768 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
3769 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
3770 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
3772 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3773 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
3774 data store is currently mapped.
3776 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3777 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
3778 unpacked from the buffer object such that the memory reads required
3779 would exceed the data store size.
3781 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
3782 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
3783 divisible into the number of bytes needed to store in memory a datum
3786 `GL_INVALID_OPERATION' is generated if `glConvolutionFilter2D' is
3787 executed between the execution of `glBegin' and the corresponding
3788 execution of `glEnd'.")
3790 (define-gl-procedures
3791 ((glConvolutionParameterf
3797 (glConvolutionParameteri
3803 "Set convolution parameters.
3806 The target for the convolution parameter. Must be one of
3807 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D'.
3810 The parameter to be set. Must be `GL_CONVOLUTION_BORDER_MODE'.
3813 The parameter value. Must be one of `GL_REDUCE',
3814 `GL_CONSTANT_BORDER', `GL_REPLICATE_BORDER'.
3818 `glConvolutionParameter' sets the value of a convolution parameter.
3820 TARGET selects the convolution filter to be affected:
3821 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D' for the
3822 1D, 2D, or separable 2D filter, respectively.
3824 PNAME selects the parameter to be changed. `GL_CONVOLUTION_FILTER_SCALE'
3825 and `GL_CONVOLUTION_FILTER_BIAS' affect the definition of the
3826 convolution filter kernel; see `glConvolutionFilter1D',
3827 `glConvolutionFilter2D', and `glSeparableFilter2D' for details. In these
3828 cases, PARAMSv is an array of four values to be applied to red, green,
3829 blue, and alpha values, respectively. The initial value for
3830 `GL_CONVOLUTION_FILTER_SCALE' is (1, 1, 1, 1), and the initial value for
3831 `GL_CONVOLUTION_FILTER_BIAS' is (0, 0, 0, 0).
3833 A PNAME value of `GL_CONVOLUTION_BORDER_MODE' controls the convolution
3834 border mode. The accepted modes are:
3837 The image resulting from convolution is smaller than the source
3838 image. If the filter width is WF and height is HF , and the source
3839 image width is WS and height is HS , then the convolved image width
3840 will be WS-WF+1 and height will be HS-HF+1 . (If this reduction
3841 would generate an image with zero or negative width and/or height,
3842 the output is simply null, with no error generated.) The
3843 coordinates of the image resulting from convolution are zero
3844 through WS-WF in width and zero through HS-HF in height.
3846 `GL_CONSTANT_BORDER'
3847 The image resulting from convolution is the same size as the source
3848 image, and processed as if the source image were surrounded by
3849 pixels with their color specified by the
3850 `GL_CONVOLUTION_BORDER_COLOR'.
3852 `GL_REPLICATE_BORDER'
3853 The image resulting from convolution is the same size as the source
3854 image, and processed as if the outermost pixel on the border of the
3855 source image were replicated.
3857 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
3860 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
3863 `GL_INVALID_ENUM' is generated if PNAME is `GL_CONVOLUTION_BORDER_MODE'
3864 and PARAMS is not one of `GL_REDUCE', `GL_CONSTANT_BORDER', or
3865 `GL_REPLICATE_BORDER'.
3867 `GL_INVALID_OPERATION' is generated if `glConvolutionParameter' is
3868 executed between the execution of `glBegin' and the corresponding
3869 execution of `glEnd'.")
3871 (define-gl-procedures
3872 ((glCopyColorSubTable
3880 "Respecify a portion of a color table.
3883 Must be one of `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE',
3884 or `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
3887 The starting index of the portion of the color table to be
3893 The window coordinates of the left corner of the row of pixels to
3897 The number of table entries to replace.
3899 `glCopyColorSubTable' is used to respecify a contiguous portion of a
3900 color table previously defined using `glColorTable'. The pixels copied
3901 from the framebuffer replace the portion of the existing table from
3902 indices START to START+X-1 , inclusive. This region may not include any
3903 entries outside the range of the color table, as was originally
3904 specified. It is not an error to specify a subtexture with width of 0,
3905 but such a specification has no effect.
3907 `GL_INVALID_VALUE' is generated if TARGET is not a previously defined
3910 `GL_INVALID_VALUE' is generated if TARGET is not one of the allowable
3913 `GL_INVALID_VALUE' is generated if START+X>WIDTH .
3915 `GL_INVALID_OPERATION' is generated if `glCopyColorSubTable' is executed
3916 between the execution of `glBegin' and the corresponding execution of
3919 (define-gl-procedures
3922 (internalformat GLenum)
3928 "Copy pixels into a color table.
3931 The color table target. Must be `GL_COLOR_TABLE',
3932 `GL_POST_CONVOLUTION_COLOR_TABLE', or
3933 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
3936 The internal storage format of the texture image. Must be one of
3937 the following symbolic constants: `GL_ALPHA', `GL_ALPHA4',
3938 `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16', `GL_LUMINANCE',
3939 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
3940 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
3941 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
3942 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
3943 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
3944 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
3945 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
3946 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
3947 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
3950 The x coordinate of the lower-left corner of the pixel rectangle to
3951 be transferred to the color table.
3954 The y coordinate of the lower-left corner of the pixel rectangle to
3955 be transferred to the color table.
3958 The width of the pixel rectangle.
3960 `glCopyColorTable' loads a color table with pixels from the current
3961 `GL_READ_BUFFER' (rather than from main memory, as is the case for
3964 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y)
3965 having width WIDTH and height 1 is loaded into the color table. If any
3966 pixels within this region are outside the window that is associated with
3967 the GL context, the values obtained for those pixels are undefined.
3969 The pixels in the rectangle are processed just as if `glReadPixels' were
3970 called, with INTERNALFORMAT set to RGBA, but processing stops after the
3971 final conversion to RGBA.
3973 The four scale parameters and the four bias parameters that are defined
3974 for the table are then used to scale and bias the R, G, B, and A
3975 components of each pixel. The scale and bias parameters are set by
3976 calling `glColorTableParameter'.
3978 Next, the R, G, B, and A values are clamped to the range [0,1] . Each
3979 pixel is then converted to the internal format specified by
3980 INTERNALFORMAT. This conversion simply maps the component values of the
3981 pixel (R, G, B, and A) to the values included in the internal format
3982 (red, green, blue, alpha, luminance, and intensity). The mapping is as
3988 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
3996 `GL_LUMINANCE_ALPHA'
4008 Finally, the red, green, blue, alpha, luminance, and/or intensity
4009 components of the resulting pixels are stored in the color table. They
4010 form a one-dimensional table with indices in the range [0,WIDTH-1] .
4014 `GL_INVALID_ENUM' is generated when TARGET is not one of the allowable
4017 `GL_INVALID_VALUE' is generated if WIDTH is less than zero.
4019 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not one of the
4022 `GL_TABLE_TOO_LARGE' is generated if the requested color table is too
4023 large to be supported by the implementation.
4025 `GL_INVALID_OPERATION' is generated if `glCopyColorTable' is executed
4026 between the execution of `glBegin' and the corresponding execution of
4029 (define-gl-procedures
4030 ((glCopyConvolutionFilter1D
4032 (internalformat GLenum)
4038 "Copy pixels into a one-dimensional convolution filter.
4041 Must be `GL_CONVOLUTION_1D'.
4044 The internal format of the convolution filter kernel. The allowable
4045 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
4046 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
4047 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
4048 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
4049 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
4050 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
4051 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
4052 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
4053 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
4054 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
4055 `GL_RGBA12', or `GL_RGBA16'.
4060 The window space coordinates of the lower-left coordinate of the
4061 pixel array to copy.
4064 The width of the pixel array to copy.
4066 `glCopyConvolutionFilter1D' defines a one-dimensional convolution filter
4067 kernel with pixels from the current `GL_READ_BUFFER' (rather than from
4068 main memory, as is the case for `glConvolutionFilter1D').
4070 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y),
4071 width WIDTH and height 1 is used to define the convolution filter. If
4072 any pixels within this region are outside the window that is associated
4073 with the GL context, the values obtained for those pixels are undefined.
4075 The pixels in the rectangle are processed exactly as if `glReadPixels'
4076 had been called with FORMAT set to RGBA, but the process stops just
4077 before final conversion. The R, G, B, and A components of each pixel are
4078 next scaled by the four 1D `GL_CONVOLUTION_FILTER_SCALE' parameters and
4079 biased by the four 1D `GL_CONVOLUTION_FILTER_BIAS' parameters. (The
4080 scale and bias parameters are set by `glConvolutionParameter' using the
4081 `GL_CONVOLUTION_1D' target and the names `GL_CONVOLUTION_FILTER_SCALE'
4082 and `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors
4083 of four values that are applied to red, green, blue, and alpha, in that
4084 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4085 during this process.
4087 Each pixel is then converted to the internal format specified by
4088 INTERNALFORMAT. This conversion simply maps the component values of the
4089 pixel (R, G, B, and A) to the values included in the internal format
4090 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4096 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4104 `GL_LUMINANCE_ALPHA'
4116 The red, green, blue, alpha, luminance, and/or intensity components of
4117 the resulting pixels are stored in floating-point rather than integer
4120 Pixel ordering is such that lower x screen coordinates correspond to
4121 lower I filter image coordinates.
4123 Note that after a convolution is performed, the resulting color
4124 components are also scaled by their corresponding
4125 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4126 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4127 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4128 set by `glPixelTransfer'.
4130 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_1D'.
4132 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4135 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4136 than the maximum supported value. This value may be queried with
4137 `glGetConvolutionParameter' using target `GL_CONVOLUTION_1D' and name
4138 `GL_MAX_CONVOLUTION_WIDTH'.
4140 `GL_INVALID_OPERATION' is generated if `glCopyConvolutionFilter1D' is
4141 executed between the execution of `glBegin' and the corresponding
4142 execution of `glEnd'.")
4144 (define-gl-procedures
4145 ((glCopyConvolutionFilter2D
4147 (internalformat GLenum)
4154 "Copy pixels into a two-dimensional convolution filter.
4157 Must be `GL_CONVOLUTION_2D'.
4160 The internal format of the convolution filter kernel. The allowable
4161 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
4162 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
4163 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
4164 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
4165 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
4166 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
4167 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
4168 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
4169 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
4170 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
4171 `GL_RGBA12', or `GL_RGBA16'.
4176 The window space coordinates of the lower-left coordinate of the
4177 pixel array to copy.
4180 The width of the pixel array to copy.
4183 The height of the pixel array to copy.
4185 `glCopyConvolutionFilter2D' defines a two-dimensional convolution filter
4186 kernel with pixels from the current `GL_READ_BUFFER' (rather than from
4187 main memory, as is the case for `glConvolutionFilter2D').
4189 The screen-aligned pixel rectangle with lower-left corner at (X,\\ Y),
4190 width WIDTH and height HEIGHT is used to define the convolution filter.
4191 If any pixels within this region are outside the window that is
4192 associated with the GL context, the values obtained for those pixels are
4195 The pixels in the rectangle are processed exactly as if `glReadPixels'
4196 had been called with FORMAT set to RGBA, but the process stops just
4197 before final conversion. The R, G, B, and A components of each pixel are
4198 next scaled by the four 2D `GL_CONVOLUTION_FILTER_SCALE' parameters and
4199 biased by the four 2D `GL_CONVOLUTION_FILTER_BIAS' parameters. (The
4200 scale and bias parameters are set by `glConvolutionParameter' using the
4201 `GL_CONVOLUTION_2D' target and the names `GL_CONVOLUTION_FILTER_SCALE'
4202 and `GL_CONVOLUTION_FILTER_BIAS'. The parameters themselves are vectors
4203 of four values that are applied to red, green, blue, and alpha, in that
4204 order.) The R, G, B, and A values are not clamped to [0,1] at any time
4205 during this process.
4207 Each pixel is then converted to the internal format specified by
4208 INTERNALFORMAT. This conversion simply maps the component values of the
4209 pixel (R, G, B, and A) to the values included in the internal format
4210 (red, green, blue, alpha, luminance, and intensity). The mapping is as
4216 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
4224 `GL_LUMINANCE_ALPHA'
4236 The red, green, blue, alpha, luminance, and/or intensity components of
4237 the resulting pixels are stored in floating-point rather than integer
4240 Pixel ordering is such that lower x screen coordinates correspond to
4241 lower I filter image coordinates, and lower y screen coordinates
4242 correspond to lower J filter image coordinates.
4244 Note that after a convolution is performed, the resulting color
4245 components are also scaled by their corresponding
4246 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
4247 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
4248 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
4249 set by `glPixelTransfer'.
4251 `GL_INVALID_ENUM' is generated if TARGET is not `GL_CONVOLUTION_2D'.
4253 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
4256 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
4257 than the maximum supported value. This value may be queried with
4258 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4259 `GL_MAX_CONVOLUTION_WIDTH'.
4261 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
4262 than the maximum supported value. This value may be queried with
4263 `glGetConvolutionParameter' using target `GL_CONVOLUTION_2D' and name
4264 `GL_MAX_CONVOLUTION_HEIGHT'.
4266 `GL_INVALID_OPERATION' is generated if `glCopyConvolutionFilter2D' is
4267 executed between the execution of `glBegin' and the corresponding
4268 execution of `glEnd'.")
4270 (define-gl-procedures
4279 "Copy pixels in the frame buffer.
4284 Specify the window coordinates of the lower left corner of the
4285 rectangular region of pixels to be copied.
4290 Specify the dimensions of the rectangular region of pixels to be
4291 copied. Both must be nonnegative.
4294 Specifies whether color values, depth values, or stencil values are
4295 to be copied. Symbolic constants `GL_COLOR', `GL_DEPTH', and
4296 `GL_STENCIL' are accepted.
4298 `glCopyPixels' copies a screen-aligned rectangle of pixels from the
4299 specified frame buffer location to a region relative to the current
4300 raster position. Its operation is well defined only if the entire pixel
4301 source region is within the exposed portion of the window. Results of
4302 copies from outside the window, or from regions of the window that are
4303 not exposed, are hardware dependent and undefined.
4305 X and Y specify the window coordinates of the lower left corner of the
4306 rectangular region to be copied. WIDTH and HEIGHT specify the dimensions
4307 of the rectangular region to be copied. Both WIDTH and HEIGHT must not
4310 Several parameters control the processing of the pixel data while it is
4311 being copied. These parameters are set with three commands:
4312 `glPixelTransfer', `glPixelMap', and `glPixelZoom'. This reference page
4313 describes the effects on `glCopyPixels' of most, but not all, of the
4314 parameters specified by these three commands.
4316 `glCopyPixels' copies values from each pixel with the lower left-hand
4317 corner at (X+I,Y+J) for 0<=I<WIDTH and 0<=J<HEIGHT . This pixel is said
4318 to be the I th pixel in the J th row. Pixels are copied in row order
4319 from the lowest to the highest row, left to right in each row.
4321 TYPE specifies whether color, depth, or stencil data is to be copied.
4322 The details of the transfer for each data type are as follows:
4325 Indices or RGBA colors are read from the buffer currently specified
4326 as the read source buffer (see `glReadBuffer'). If the GL is in
4327 color index mode, each index that is read from this buffer is
4328 converted to a fixed-point format with an unspecified number of
4329 bits to the right of the binary point. Each index is then shifted
4330 left by `GL_INDEX_SHIFT' bits, and added to `GL_INDEX_OFFSET'. If
4331 `GL_INDEX_SHIFT' is negative, the shift is to the right. In either
4332 case, zero bits fill otherwise unspecified bit locations in the
4333 result. If `GL_MAP_COLOR' is true, the index is replaced with the
4334 value that it references in lookup table `GL_PIXEL_MAP_I_TO_I'.
4335 Whether the lookup replacement of the index is done or not, the
4336 integer part of the index is then ANDed with 2^B-1 , where B is the
4337 number of bits in a color index buffer.
4339 If the GL is in RGBA mode, the red, green, blue, and alpha
4340 components of each pixel that is read are converted to an internal
4341 floating-point format with unspecified precision. The conversion
4342 maps the largest representable component value to 1.0, and
4343 component value 0 to 0.0. The resulting floating-point color values
4344 are then multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where
4345 C is RED, GREEN, BLUE, and ALPHA for the respective color
4346 components. The results are clamped to the range [0,1]. If
4347 `GL_MAP_COLOR' is true, each color component is scaled by the size
4348 of lookup table `GL_PIXEL_MAP_c_TO_c', then replaced by the value
4349 that it references in that table. C is R, G, B, or A.
4351 If the `ARB_imaging' extension is supported, the color values may
4352 be additionally processed by color-table lookups, color-matrix
4353 transformations, and convolution filters.
4355 The GL then converts the resulting indices or RGBA colors to
4356 fragments by attaching the current raster position Z coordinate and
4357 texture coordinates to each pixel, then assigning window
4358 coordinates (X_R+I,Y_R+J) , where (X_R,Y_R) is the current raster
4359 position, and the pixel was the I th pixel in the J th row. These
4360 pixel fragments are then treated just like the fragments generated
4361 by rasterizing points, lines, or polygons. Texture mapping, fog,
4362 and all the fragment operations are applied before the fragments
4363 are written to the frame buffer.
4366 Depth values are read from the depth buffer and converted directly
4367 to an internal floating-point format with unspecified precision.
4368 The resulting floating-point depth value is then multiplied by
4369 `GL_DEPTH_SCALE' and added to `GL_DEPTH_BIAS'. The result is
4370 clamped to the range [0,1].
4372 The GL then converts the resulting depth components to fragments by
4373 attaching the current raster position color or color index and
4374 texture coordinates to each pixel, then assigning window
4375 coordinates (X_R+I,Y_R+J) , where (X_R,Y_R) is the current raster
4376 position, and the pixel was the I th pixel in the J th row. These
4377 pixel fragments are then treated just like the fragments generated
4378 by rasterizing points, lines, or polygons. Texture mapping, fog,
4379 and all the fragment operations are applied before the fragments
4380 are written to the frame buffer.
4383 Stencil indices are read from the stencil buffer and converted to
4384 an internal fixed-point format with an unspecified number of bits
4385 to the right of the binary point. Each fixed-point index is then
4386 shifted left by `GL_INDEX_SHIFT' bits, and added to
4387 `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is negative, the shift is to
4388 the right. In either case, zero bits fill otherwise unspecified bit
4389 locations in the result. If `GL_MAP_STENCIL' is true, the index is
4390 replaced with the value that it references in lookup table
4391 `GL_PIXEL_MAP_S_TO_S'. Whether the lookup replacement of the index
4392 is done or not, the integer part of the index is then ANDed with
4393 2^B-1 , where B is the number of bits in the stencil buffer. The
4394 resulting stencil indices are then written to the stencil buffer
4395 such that the index read from the I th location of the J th row is
4396 written to location (X_R+I,Y_R+J) , where (X_R,Y_R) is the current
4397 raster position. Only the pixel ownership test, the scissor test,
4398 and the stencil writemask affect these write operations.
4400 The rasterization described thus far assumes pixel zoom factors of 1.0.
4401 If `glPixelZoom' is used to change the X and Y pixel zoom factors,
4402 pixels are converted to fragments as follows. If (X_R,Y_R) is the
4403 current raster position, and a given pixel is in the I th location in
4404 the J th row of the source pixel rectangle, then fragments are generated
4405 for pixels whose centers are in the rectangle with corners at
4407 (X_R+ZOOM_X,\u2062I,Y_R+ZOOM_Y,\u2062J)
4411 (X_R+ZOOM_X,\u2061(I+1,),Y_R+ZOOM_Y,\u2061(J+1,))
4413 where ZOOM_X is the value of `GL_ZOOM_X' and ZOOM_Y is the value of
4416 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
4418 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
4420 `GL_INVALID_OPERATION' is generated if TYPE is `GL_DEPTH' and there is
4423 `GL_INVALID_OPERATION' is generated if TYPE is `GL_STENCIL' and there is
4426 `GL_INVALID_OPERATION' is generated if `glCopyPixels' is executed
4427 between the execution of `glBegin' and the corresponding execution of
4430 (define-gl-procedures
4434 (internalformat GLenum)
4441 "Copy pixels into a 1D texture image.
4444 Specifies the target texture. Must be `GL_TEXTURE_1D'.
4447 Specifies the level-of-detail number. Level 0 is the base image
4448 level. Level N is the Nth mipmap reduction image.
4451 Specifies the internal format of the texture. Must be one of the
4452 following symbolic constants: `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4453 `GL_ALPHA12', `GL_ALPHA16', `GL_COMPRESSED_ALPHA',
4454 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
4455 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB',
4456 `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
4457 `GL_DEPTH_COMPONENT24', `GL_DEPTH_COMPONENT32', `GL_LUMINANCE',
4458 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4459 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4460 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4461 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4462 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4463 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_RGB',
4464 `GL_R3_G3_B2', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10',
4465 `GL_RGB12', `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4',
4466 `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
4467 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
4468 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
4474 Specify the window coordinates of the left corner of the row of
4475 pixels to be copied.
4478 Specifies the width of the texture image. Must be 0 or
4479 2^N+2\u2061(BORDER,) for some integer N . The height of the texture
4483 Specifies the width of the border. Must be either 0 or 1.
4485 `glCopyTexImage1D' defines a one-dimensional texture image with pixels
4486 from the current `GL_READ_BUFFER'.
4488 The screen-aligned pixel row with left corner at (X,Y) and with a length
4489 of WIDTH+2\u2061(BORDER,) defines the texture array at the mipmap level
4490 specified by LEVEL. INTERNALFORMAT specifies the internal format of the
4493 The pixels in the row are processed exactly as if `glCopyPixels' had
4494 been called, but the process stops just before final conversion. At this
4495 point all pixel component values are clamped to the range [0,1] and then
4496 converted to the texture's internal format for storage in the texel
4499 Pixel ordering is such that lower X screen coordinates correspond to
4500 lower texture coordinates.
4502 If any of the pixels within the specified row of the current
4503 `GL_READ_BUFFER' are outside the window associated with the current
4504 rendering context, then the values obtained for those pixels are
4507 `glCopyTexImage1D' defines a one-dimensional texture image with pixels
4508 from the current `GL_READ_BUFFER'.
4510 When INTERNALFORMAT is one of the sRGB types, the GL does not
4511 automatically convert the source pixels to the sRGB color space. In this
4512 case, the `glPixelMap' function can be used to accomplish the
4515 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
4518 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4520 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2\u2062MAX ,
4521 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
4523 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not an allowable
4526 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
4527 2 + `GL_MAX_TEXTURE_SIZE'.
4529 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
4530 supported and the WIDTH cannot be represented as 2^N+2\u2061(BORDER,) for
4531 some integer value of N.
4533 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
4535 `GL_INVALID_OPERATION' is generated if `glCopyTexImage1D' is executed
4536 between the execution of `glBegin' and the corresponding execution of
4539 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
4540 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
4541 `GL_DEPTH_COMPONENT32' and there is no depth buffer.")
4543 (define-gl-procedures
4547 (internalformat GLenum)
4555 "Copy pixels into a 2D texture image.
4558 Specifies the target texture. Must be `GL_TEXTURE_2D',
4559 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4560 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4561 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
4562 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4565 Specifies the level-of-detail number. Level 0 is the base image
4566 level. Level N is the Nth mipmap reduction image.
4569 Specifies the internal format of the texture. Must be one of the
4570 following symbolic constants: `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8',
4571 `GL_ALPHA12', `GL_ALPHA16', `GL_COMPRESSED_ALPHA',
4572 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
4573 `GL_COMPRESSED_INTENSITY', `GL_COMPRESSED_RGB',
4574 `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
4575 `GL_DEPTH_COMPONENT24', `GL_DEPTH_COMPONENT32', `GL_LUMINANCE',
4576 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
4577 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
4578 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
4579 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
4580 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
4581 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_RGB',
4582 `GL_R3_G3_B2', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10',
4583 `GL_RGB12', `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4',
4584 `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
4585 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
4586 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
4592 Specify the window coordinates of the lower left corner of the
4593 rectangular region of pixels to be copied.
4596 Specifies the width of the texture image. Must be 0 or
4597 2^N+2\u2061(BORDER,) for some integer N .
4600 Specifies the height of the texture image. Must be 0 or
4601 2^M+2\u2061(BORDER,) for some integer M .
4604 Specifies the width of the border. Must be either 0 or 1.
4606 `glCopyTexImage2D' defines a two-dimensional texture image, or cube-map
4607 texture image with pixels from the current `GL_READ_BUFFER'.
4609 The screen-aligned pixel rectangle with lower left corner at (X, Y) and
4610 with a width of WIDTH+2\u2061(BORDER,) and a height of HEIGHT+2\u2061(BORDER,)
4611 defines the texture array at the mipmap level specified by LEVEL.
4612 INTERNALFORMAT specifies the internal format of the texture array.
4614 The pixels in the rectangle are processed exactly as if `glCopyPixels'
4615 had been called, but the process stops just before final conversion. At
4616 this point all pixel component values are clamped to the range [0,1] and
4617 then converted to the texture's internal format for storage in the texel
4620 Pixel ordering is such that lower X and Y screen coordinates correspond
4621 to lower S and T texture coordinates.
4623 If any of the pixels within the specified rectangle of the current
4624 `GL_READ_BUFFER' are outside the window associated with the current
4625 rendering context, then the values obtained for those pixels are
4628 When INTERNALFORMAT is one of the sRGB types, the GL does not
4629 automatically convert the source pixels to the sRGB color space. In this
4630 case, the `glPixelMap' function can be used to accomplish the
4633 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
4634 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4635 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4636 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4638 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4640 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2\u2062MAX ,
4641 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
4643 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
4644 2 + `GL_MAX_TEXTURE_SIZE'.
4646 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
4647 supported and the WIDTH or DEPTH cannot be represented as
4648 2^K+2\u2061(BORDER,) for some integer K .
4650 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
4652 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not an accepted
4655 `GL_INVALID_OPERATION' is generated if `glCopyTexImage2D' is executed
4656 between the execution of `glBegin' and the corresponding execution of
4659 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
4660 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
4661 `GL_DEPTH_COMPONENT32' and there is no depth buffer.")
4663 (define-gl-procedures
4664 ((glCopyTexSubImage1D
4673 "Copy a one-dimensional texture subimage.
4676 Specifies the target texture. Must be `GL_TEXTURE_1D'.
4679 Specifies the level-of-detail number. Level 0 is the base image
4680 level. Level N is the Nth mipmap reduction image.
4683 Specifies the texel offset within the texture array.
4688 Specify the window coordinates of the left corner of the row of
4689 pixels to be copied.
4692 Specifies the width of the texture subimage.
4694 `glCopyTexSubImage1D' replaces a portion of a one-dimensional texture
4695 image with pixels from the current `GL_READ_BUFFER' (rather than from
4696 main memory, as is the case for `glTexSubImage1D').
4698 The screen-aligned pixel row with left corner at (X,\\ Y), and with
4699 length WIDTH replaces the portion of the texture array with x indices
4700 XOFFSET through XOFFSET+WIDTH-1 , inclusive. The destination in the
4701 texture array may not include any texels outside the texture array as it
4702 was originally specified.
4704 The pixels in the row are processed exactly as if `glCopyPixels' had
4705 been called, but the process stops just before final conversion. At this
4706 point, all pixel component values are clamped to the range [0,1] and
4707 then converted to the texture's internal format for storage in the texel
4710 It is not an error to specify a subtexture with zero width, but such a
4711 specification has no effect. If any of the pixels within the specified
4712 row of the current `GL_READ_BUFFER' are outside the read window
4713 associated with the current rendering context, then the values obtained
4714 for those pixels are undefined.
4716 No change is made to the INTERNALFORMAT, WIDTH, or BORDER parameters of
4717 the specified texture array or to texel values outside the specified
4720 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_1D'.
4722 `GL_INVALID_OPERATION' is generated if the texture array has not been
4723 defined by a previous `glTexImage1D' or `glCopyTexImage1D' operation.
4725 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4727 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
4728 the returned value of `GL_MAX_TEXTURE_SIZE'.
4730 `GL_INVALID_VALUE' is generated if XOFFSET<-B , or
4731 (XOFFSET+WIDTH,)>(W-B,) , where W is the `GL_TEXTURE_WIDTH' and B is the
4732 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W
4733 includes twice the border width.")
4735 (define-gl-procedures
4736 ((glCopyTexSubImage2D
4747 "Copy a two-dimensional texture subimage.
4750 Specifies the target texture. Must be `GL_TEXTURE_2D',
4751 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4752 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4753 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
4754 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4757 Specifies the level-of-detail number. Level 0 is the base image
4758 level. Level N is the Nth mipmap reduction image.
4761 Specifies a texel offset in the x direction within the texture
4765 Specifies a texel offset in the y direction within the texture
4771 Specify the window coordinates of the lower left corner of the
4772 rectangular region of pixels to be copied.
4775 Specifies the width of the texture subimage.
4778 Specifies the height of the texture subimage.
4780 `glCopyTexSubImage2D' replaces a rectangular portion of a
4781 two-dimensional texture image or cube-map texture image with pixels from
4782 the current `GL_READ_BUFFER' (rather than from main memory, as is the
4783 case for `glTexSubImage2D').
4785 The screen-aligned pixel rectangle with lower left corner at (X,Y) and
4786 with width WIDTH and height HEIGHT replaces the portion of the texture
4787 array with x indices XOFFSET through XOFFSET+WIDTH-1 , inclusive, and y
4788 indices YOFFSET through YOFFSET+HEIGHT-1 , inclusive, at the mipmap
4789 level specified by LEVEL.
4791 The pixels in the rectangle are processed exactly as if `glCopyPixels'
4792 had been called, but the process stops just before final conversion. At
4793 this point, all pixel component values are clamped to the range [0,1]
4794 and then converted to the texture's internal format for storage in the
4797 The destination rectangle in the texture array may not include any
4798 texels outside the texture array as it was originally specified. It is
4799 not an error to specify a subtexture with zero width or height, but such
4800 a specification has no effect.
4802 If any of the pixels within the specified rectangle of the current
4803 `GL_READ_BUFFER' are outside the read window associated with the current
4804 rendering context, then the values obtained for those pixels are
4807 No change is made to the INTERNALFORMAT, WIDTH, HEIGHT, or BORDER
4808 parameters of the specified texture array or to texel values outside the
4809 specified subregion.
4811 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
4812 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
4813 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
4814 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
4816 `GL_INVALID_OPERATION' is generated if the texture array has not been
4817 defined by a previous `glTexImage2D' or `glCopyTexImage2D' operation.
4819 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4821 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
4822 the returned value of `GL_MAX_TEXTURE_SIZE'.
4824 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
4825 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , where W is the
4826 `GL_TEXTURE_WIDTH', H is the `GL_TEXTURE_HEIGHT', and B is the
4827 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W and
4828 H include twice the border width.
4830 `GL_INVALID_OPERATION' is generated if `glCopyTexSubImage2D' is executed
4831 between the execution of `glBegin' and the corresponding execution of
4834 (define-gl-procedures
4835 ((glCopyTexSubImage3D
4847 "Copy a three-dimensional texture subimage.
4850 Specifies the target texture. Must be `GL_TEXTURE_3D'
4853 Specifies the level-of-detail number. Level 0 is the base image
4854 level. Level N is the Nth mipmap reduction image.
4857 Specifies a texel offset in the x direction within the texture
4861 Specifies a texel offset in the y direction within the texture
4865 Specifies a texel offset in the z direction within the texture
4871 Specify the window coordinates of the lower left corner of the
4872 rectangular region of pixels to be copied.
4875 Specifies the width of the texture subimage.
4878 Specifies the height of the texture subimage.
4880 `glCopyTexSubImage3D' replaces a rectangular portion of a
4881 three-dimensional texture image with pixels from the current
4882 `GL_READ_BUFFER' (rather than from main memory, as is the case for
4885 The screen-aligned pixel rectangle with lower left corner at (X,\\ Y) and
4886 with width WIDTH and height HEIGHT replaces the portion of the texture
4887 array with x indices XOFFSET through XOFFSET+WIDTH-1 , inclusive, and y
4888 indices YOFFSET through YOFFSET+HEIGHT-1 , inclusive, at z index ZOFFSET
4889 and at the mipmap level specified by LEVEL.
4891 The pixels in the rectangle are processed exactly as if `glCopyPixels'
4892 had been called, but the process stops just before final conversion. At
4893 this point, all pixel component values are clamped to the range [0,1]
4894 and then converted to the texture's internal format for storage in the
4897 The destination rectangle in the texture array may not include any
4898 texels outside the texture array as it was originally specified. It is
4899 not an error to specify a subtexture with zero width or height, but such
4900 a specification has no effect.
4902 If any of the pixels within the specified rectangle of the current
4903 `GL_READ_BUFFER' are outside the read window associated with the current
4904 rendering context, then the values obtained for those pixels are
4907 No change is made to the INTERNALFORMAT, WIDTH, HEIGHT, DEPTH, or BORDER
4908 parameters of the specified texture array or to texel values outside the
4909 specified subregion.
4911 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_3D'.
4913 `GL_INVALID_OPERATION' is generated if the texture array has not been
4914 defined by a previous `glTexImage3D' operation.
4916 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
4918 `GL_INVALID_VALUE' may be generated if LEVEL>LOG_2\u2061(MAX,) , where MAX is
4919 the returned value of `GL_MAX_3D_TEXTURE_SIZE'.
4921 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
4922 , YOFFSET<-B , (YOFFSET+HEIGHT,)>(H-B,) , ZOFFSET<-B , or
4923 (ZOFFSET+1,)>(D-B,) , where W is the `GL_TEXTURE_WIDTH', H is the
4924 `GL_TEXTURE_HEIGHT', D is the `GL_TEXTURE_DEPTH', and B is the
4925 `GL_TEXTURE_BORDER' of the texture image being modified. Note that W , H
4926 , and D include twice the border width.
4928 `GL_INVALID_OPERATION' is generated if `glCopyTexSubImage3D' is executed
4929 between the execution of `glBegin' and the corresponding execution of
4932 (define-gl-procedures
4933 ((glCreateProgram -> GLuint))
4934 "Creates a program object.
4936 `glCreateProgram' creates an empty program object and returns a non-zero
4937 value by which it can be referenced. A program object is an object to
4938 which shader objects can be attached. This provides a mechanism to
4939 specify the shader objects that will be linked to create a program. It
4940 also provides a means for checking the compatibility of the shaders that
4941 will be used to create a program (for instance, checking the
4942 compatibility between a vertex shader and a fragment shader). When no
4943 longer needed as part of a program object, shader objects can be
4946 One or more executables are created in a program object by successfully
4947 attaching shader objects to it with `glAttachShader', successfully
4948 compiling the shader objects with `glCompileShader', and successfully
4949 linking the program object with `glLinkProgram'. These executables are
4950 made part of current state when `glUseProgram' is called. Program
4951 objects can be deleted by calling `glDeleteProgram'. The memory
4952 associated with the program object will be deleted when it is no longer
4953 part of current rendering state for any context.
4955 This function returns 0 if an error occurs creating the program object.
4957 `GL_INVALID_OPERATION' is generated if `glCreateProgram' is executed
4958 between the execution of `glBegin' and the corresponding execution of
4961 (define-gl-procedures
4962 ((glCreateShader (shaderType GLenum) -> GLuint))
4963 "Creates a shader object.
4966 Specifies the type of shader to be created. Must be either
4967 `GL_VERTEX_SHADER' or `GL_FRAGMENT_SHADER'.
4969 `glCreateShader' creates an empty shader object and returns a non-zero
4970 value by which it can be referenced. A shader object is used to maintain
4971 the source code strings that define a shader. SHADERTYPE indicates the
4972 type of shader to be created. Two types of shaders are supported. A
4973 shader of type `GL_VERTEX_SHADER' is a shader that is intended to run on
4974 the programmable vertex processor and replace the fixed functionality
4975 vertex processing in OpenGL. A shader of type `GL_FRAGMENT_SHADER' is a
4976 shader that is intended to run on the programmable fragment processor
4977 and replace the fixed functionality fragment processing in OpenGL.
4979 When created, a shader object's `GL_SHADER_TYPE' parameter is set to
4980 either `GL_VERTEX_SHADER' or `GL_FRAGMENT_SHADER', depending on the
4981 value of SHADERTYPE.
4983 This function returns 0 if an error occurs creating the shader object.
4985 `GL_INVALID_ENUM' is generated if SHADERTYPE is not an accepted value.
4987 `GL_INVALID_OPERATION' is generated if `glCreateShader' is executed
4988 between the execution of `glBegin' and the corresponding execution of
4991 (define-gl-procedures
4992 ((glCullFace (mode GLenum) -> void))
4993 "Specify whether front- or back-facing facets can be culled.
4996 Specifies whether front- or back-facing facets are candidates for
4997 culling. Symbolic constants `GL_FRONT', `GL_BACK', and
4998 `GL_FRONT_AND_BACK' are accepted. The initial value is `GL_BACK'.
5000 `glCullFace' specifies whether front- or back-facing facets are culled
5001 (as specified by MODE) when facet culling is enabled. Facet culling is
5002 initially disabled. To enable and disable facet culling, call the
5003 `glEnable' and `glDisable' commands with the argument `GL_CULL_FACE'.
5004 Facets include triangles, quadrilaterals, polygons, and rectangles.
5006 `glFrontFace' specifies which of the clockwise and counterclockwise
5007 facets are front-facing and back-facing. See `glFrontFace'.
5009 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5011 `GL_INVALID_OPERATION' is generated if `glCullFace' is executed between
5012 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5014 (define-gl-procedures
5017 (buffers const-GLuint-*)
5020 "Delete named buffer objects.
5023 Specifies the number of buffer objects to be deleted.
5026 Specifies an array of buffer objects to be deleted.
5028 `glDeleteBuffers' deletes N buffer objects named by the elements of the
5029 array BUFFERS. After a buffer object is deleted, it has no contents, and
5030 its name is free for reuse (for example by `glGenBuffers'). If a buffer
5031 object that is currently bound is deleted, the binding reverts to 0 (the
5032 absence of any buffer object, which reverts to client memory usage).
5034 `glDeleteBuffers' silently ignores 0's and names that do not correspond
5035 to existing buffer objects.
5037 `GL_INVALID_VALUE' is generated if N is negative.
5039 `GL_INVALID_OPERATION' is generated if `glDeleteBuffers' is executed
5040 between the execution of `glBegin' and the corresponding execution of
5043 (define-gl-procedures
5049 "Delete a contiguous group of display lists.
5052 Specifies the integer name of the first display list to delete.
5055 Specifies the number of display lists to delete.
5057 `glDeleteLists' causes a contiguous group of display lists to be
5058 deleted. LIST is the name of the first display list to be deleted, and
5059 RANGE is the number of display lists to delete. All display lists D with
5060 LIST<=D<=LIST+RANGE-1 are deleted.
5062 All storage locations allocated to the specified display lists are
5063 freed, and the names are available for reuse at a later time. Names
5064 within the range that do not have an associated display list are
5065 ignored. If RANGE is 0, nothing happens.
5067 `GL_INVALID_VALUE' is generated if RANGE is negative.
5069 `GL_INVALID_OPERATION' is generated if `glDeleteLists' is executed
5070 between the execution of `glBegin' and the corresponding execution of
5073 (define-gl-procedures
5074 ((glDeleteProgram (program GLuint) -> void))
5075 "Deletes a program object.
5078 Specifies the program object to be deleted.
5080 `glDeleteProgram' frees the memory and invalidates the name associated
5081 with the program object specified by PROGRAM. This command effectively
5082 undoes the effects of a call to `glCreateProgram'.
5084 If a program object is in use as part of current rendering state, it
5085 will be flagged for deletion, but it will not be deleted until it is no
5086 longer part of current state for any rendering context. If a program
5087 object to be deleted has shader objects attached to it, those shader
5088 objects will be automatically detached but not deleted unless they have
5089 already been flagged for deletion by a previous call to
5090 `glDeleteShader'. A value of 0 for PROGRAM will be silently ignored.
5092 To determine whether a program object has been flagged for deletion,
5093 call `glGetProgram' with arguments PROGRAM and `GL_DELETE_STATUS'.
5095 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
5098 `GL_INVALID_OPERATION' is generated if `glDeleteProgram' is executed
5099 between the execution of `glBegin' and the corresponding execution of
5102 (define-gl-procedures
5105 (ids const-GLuint-*)
5108 "Delete named query objects.
5111 Specifies the number of query objects to be deleted.
5114 Specifies an array of query objects to be deleted.
5116 `glDeleteQueries' deletes N query objects named by the elements of the
5117 array IDS. After a query object is deleted, it has no contents, and its
5118 name is free for reuse (for example by `glGenQueries').
5120 `glDeleteQueries' silently ignores 0's and names that do not correspond
5121 to existing query objects.
5123 `GL_INVALID_VALUE' is generated if N is negative.
5125 `GL_INVALID_OPERATION' is generated if `glDeleteQueries' is executed
5126 between the execution of `glBegin' and the corresponding execution of
5129 (define-gl-procedures
5130 ((glDeleteShader (shader GLuint) -> void))
5131 "Deletes a shader object.
5134 Specifies the shader object to be deleted.
5136 `glDeleteShader' frees the memory and invalidates the name associated
5137 with the shader object specified by SHADER. This command effectively
5138 undoes the effects of a call to `glCreateShader'.
5140 If a shader object to be deleted is attached to a program object, it
5141 will be flagged for deletion, but it will not be deleted until it is no
5142 longer attached to any program object, for any rendering context (i.e.,
5143 it must be detached from wherever it was attached before it will be
5144 deleted). A value of 0 for SHADER will be silently ignored.
5146 To determine whether an object has been flagged for deletion, call
5147 `glGetShader' with arguments SHADER and `GL_DELETE_STATUS'.
5149 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
5152 `GL_INVALID_OPERATION' is generated if `glDeleteShader' is executed
5153 between the execution of `glBegin' and the corresponding execution of
5156 (define-gl-procedures
5159 (textures const-GLuint-*)
5162 "Delete named textures.
5165 Specifies the number of textures to be deleted.
5168 Specifies an array of textures to be deleted.
5170 `glDeleteTextures' deletes N textures named by the elements of the array
5171 TEXTURES. After a texture is deleted, it has no contents or
5172 dimensionality, and its name is free for reuse (for example by
5173 `glGenTextures'). If a texture that is currently bound is deleted, the
5174 binding reverts to 0 (the default texture).
5176 `glDeleteTextures' silently ignores 0's and names that do not correspond
5177 to existing textures.
5179 `GL_INVALID_VALUE' is generated if N is negative.
5181 `GL_INVALID_OPERATION' is generated if `glDeleteTextures' is executed
5182 between the execution of `glBegin' and the corresponding execution of
5185 (define-gl-procedures
5186 ((glDepthFunc (func GLenum) -> void))
5187 "Specify the value used for depth buffer comparisons.
5190 Specifies the depth comparison function. Symbolic constants
5191 `GL_NEVER', `GL_LESS', `GL_EQUAL', `GL_LEQUAL', `GL_GREATER',
5192 `GL_NOTEQUAL', `GL_GEQUAL', and `GL_ALWAYS' are accepted. The
5193 initial value is `GL_LESS'.
5195 `glDepthFunc' specifies the function used to compare each incoming pixel
5196 depth value with the depth value present in the depth buffer. The
5197 comparison is performed only if depth testing is enabled. (See
5198 `glEnable' and `glDisable' of `GL_DEPTH_TEST'.)
5200 FUNC specifies the conditions under which the pixel will be drawn. The
5201 comparison functions are as follows:
5207 Passes if the incoming depth value is less than the stored depth
5211 Passes if the incoming depth value is equal to the stored depth
5215 Passes if the incoming depth value is less than or equal to the
5219 Passes if the incoming depth value is greater than the stored depth
5223 Passes if the incoming depth value is not equal to the stored depth
5227 Passes if the incoming depth value is greater than or equal to the
5233 The initial value of FUNC is `GL_LESS'. Initially, depth testing is
5234 disabled. If depth testing is disabled or if no depth buffer exists, it
5235 is as if the depth test always passes.
5237 `GL_INVALID_ENUM' is generated if FUNC is not an accepted value.
5239 `GL_INVALID_OPERATION' is generated if `glDepthFunc' is executed between
5240 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5242 (define-gl-procedures
5243 ((glDepthMask (flag GLboolean) -> void))
5244 "Enable or disable writing into the depth buffer.
5247 Specifies whether the depth buffer is enabled for writing. If FLAG
5248 is `GL_FALSE', depth buffer writing is disabled. Otherwise, it is
5249 enabled. Initially, depth buffer writing is enabled.
5251 `glDepthMask' specifies whether the depth buffer is enabled for writing.
5252 If FLAG is `GL_FALSE', depth buffer writing is disabled. Otherwise, it
5253 is enabled. Initially, depth buffer writing is enabled.
5255 `GL_INVALID_OPERATION' is generated if `glDepthMask' is executed between
5256 the execution of `glBegin' and the corresponding execution of `glEnd'.")
5258 (define-gl-procedures
5264 "Specify mapping of depth values from normalized device coordinates to
5268 Specifies the mapping of the near clipping plane to window
5269 coordinates. The initial value is 0.
5272 Specifies the mapping of the far clipping plane to window
5273 coordinates. The initial value is 1.
5275 After clipping and division by W, depth coordinates range from -1 to 1,
5276 corresponding to the near and far clipping planes. `glDepthRange'
5277 specifies a linear mapping of the normalized depth coordinates in this
5278 range to window depth coordinates. Regardless of the actual depth buffer
5279 implementation, window coordinate depth values are treated as though
5280 they range from 0 through 1 (like color components). Thus, the values
5281 accepted by `glDepthRange' are both clamped to this range before they
5284 The setting of (0,1) maps the near plane to 0 and the far plane to 1.
5285 With this mapping, the depth buffer range is fully utilized.
5287 `GL_INVALID_OPERATION' is generated if `glDepthRange' is executed
5288 between the execution of `glBegin' and the corresponding execution of
5291 (define-gl-procedures
5297 "Detaches a shader object from a program object to which it is attached.
5300 Specifies the program object from which to detach the shader
5304 Specifies the shader object to be detached.
5306 `glDetachShader' detaches the shader object specified by SHADER from the
5307 program object specified by PROGRAM. This command can be used to undo
5308 the effect of the command `glAttachShader'.
5310 If SHADER has already been flagged for deletion by a call to
5311 `glDeleteShader' and it is not attached to any other program object, it
5312 will be deleted after it has been detached.
5314 `GL_INVALID_VALUE' is generated if either PROGRAM or SHADER is a value
5315 that was not generated by OpenGL.
5317 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
5319 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
5321 `GL_INVALID_OPERATION' is generated if SHADER is not attached to
5324 `GL_INVALID_OPERATION' is generated if `glDetachShader' is executed
5325 between the execution of `glBegin' and the corresponding execution of
5328 (define-gl-procedures
5335 "Render primitives from array data.
5338 Specifies what kind of primitives to render. Symbolic constants
5339 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
5340 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
5341 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
5344 Specifies the starting index in the enabled arrays.
5347 Specifies the number of indices to be rendered.
5349 `glDrawArrays' specifies multiple geometric primitives with very few
5350 subroutine calls. Instead of calling a GL procedure to pass each
5351 individual vertex, normal, texture coordinate, edge flag, or color, you
5352 can prespecify separate arrays of vertices, normals, and colors and use
5353 them to construct a sequence of primitives with a single call to
5356 When `glDrawArrays' is called, it uses COUNT sequential elements from
5357 each enabled array to construct a sequence of geometric primitives,
5358 beginning with element FIRST. MODE specifies what kind of primitives are
5359 constructed and how the array elements construct those primitives. If
5360 `GL_VERTEX_ARRAY' is not enabled, no geometric primitives are generated.
5362 Vertex attributes that are modified by `glDrawArrays' have an
5363 unspecified value after `glDrawArrays' returns. For example, if
5364 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
5365 after `glDrawArrays' executes. Attributes that aren't modified remain
5368 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5370 `GL_INVALID_VALUE' is generated if COUNT is negative.
5372 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5373 bound to an enabled array and the buffer object's data store is
5376 `GL_INVALID_OPERATION' is generated if `glDrawArrays' is executed
5377 between the execution of `glBegin' and the corresponding `glEnd'.")
5379 (define-gl-procedures
5382 (bufs const-GLenum-*)
5385 "Specifies a list of color buffers to be drawn into.
5388 Specifies the number of buffers in BUFS.
5391 Points to an array of symbolic constants specifying the buffers
5392 into which fragment colors or data values will be written.
5394 `glDrawBuffers' defines an array of buffers into which fragment color
5395 values or fragment data will be written. If no fragment shader is
5396 active, rendering operations will generate only one fragment color per
5397 fragment and it will be written into each of the buffers specified by
5398 BUFS. If a fragment shader is active and it writes a value to the output
5399 variable `gl_FragColor', then that value will be written into each of
5400 the buffers specified by BUFS. If a fragment shader is active and it
5401 writes a value to one or more elements of the output array variable
5402 `gl_FragData[]', then the value of `gl_FragData[0] ' will be written
5403 into the first buffer specified by BUFS, the value of `gl_FragData[1] '
5404 will be written into the second buffer specified by BUFS, and so on up
5405 to `gl_FragData[n-1]'. The draw buffer used for `gl_FragData[n]' and
5406 beyond is implicitly set to be `GL_NONE'.
5408 The symbolic constants contained in BUFS may be any of the following:
5411 The fragment color/data value is not written into any color buffer.
5414 The fragment color/data value is written into the front left color
5418 The fragment color/data value is written into the front right color
5422 The fragment color/data value is written into the back left color
5426 The fragment color/data value is written into the back right color
5430 The fragment color/data value is written into auxiliary buffer `i'.
5432 Except for `GL_NONE', the preceding symbolic constants may not appear
5433 more than once in BUFS. The maximum number of draw buffers supported is
5434 implementation dependent and can be queried by calling `glGet' with the
5435 argument `GL_MAX_DRAW_BUFFERS'. The number of auxiliary buffers can be
5436 queried by calling `glGet' with the argument `GL_AUX_BUFFERS'.
5438 `GL_INVALID_ENUM' is generated if one of the values in BUFS is not an
5441 `GL_INVALID_ENUM' is generated if N is less than 0.
5443 `GL_INVALID_OPERATION' is generated if a symbolic constant other than
5444 `GL_NONE' appears more than once in BUFS.
5446 `GL_INVALID_OPERATION' is generated if any of the entries in BUFS (other
5447 than `GL_NONE' ) indicates a color buffer that does not exist in the
5450 `GL_INVALID_VALUE' is generated if N is greater than
5451 `GL_MAX_DRAW_BUFFERS'.
5453 `GL_INVALID_OPERATION' is generated if `glDrawBuffers' is executed
5454 between the execution of `glBegin' and the corresponding execution of
5457 (define-gl-procedures
5458 ((glDrawBuffer (mode GLenum) -> void))
5459 "Specify which color buffers are to be drawn into.
5462 Specifies up to four color buffers to be drawn into. Symbolic
5463 constants `GL_NONE', `GL_FRONT_LEFT', `GL_FRONT_RIGHT',
5464 `GL_BACK_LEFT', `GL_BACK_RIGHT', `GL_FRONT', `GL_BACK', `GL_LEFT',
5465 `GL_RIGHT', `GL_FRONT_AND_BACK', and `GL_AUX'I, where I is between
5466 0 and the value of `GL_AUX_BUFFERS' minus 1, are accepted.
5467 (`GL_AUX_BUFFERS' is not the upper limit; use `glGet' to query the
5468 number of available aux buffers.) The initial value is `GL_FRONT'
5469 for single-buffered contexts, and `GL_BACK' for double-buffered
5472 When colors are written to the frame buffer, they are written into the
5473 color buffers specified by `glDrawBuffer'. The specifications are as
5477 No color buffers are written.
5480 Only the front left color buffer is written.
5483 Only the front right color buffer is written.
5486 Only the back left color buffer is written.
5489 Only the back right color buffer is written.
5492 Only the front left and front right color buffers are written. If
5493 there is no front right color buffer, only the front left color
5497 Only the back left and back right color buffers are written. If
5498 there is no back right color buffer, only the back left color
5502 Only the front left and back left color buffers are written. If
5503 there is no back left color buffer, only the front left color
5507 Only the front right and back right color buffers are written. If
5508 there is no back right color buffer, only the front right color
5512 All the front and back color buffers (front left, front right, back
5513 left, back right) are written. If there are no back color buffers,
5514 only the front left and front right color buffers are written. If
5515 there are no right color buffers, only the front left and back left
5516 color buffers are written. If there are no right or back color
5517 buffers, only the front left color buffer is written.
5520 Only auxiliary color buffer I is written.
5522 If more than one color buffer is selected for drawing, then blending or
5523 logical operations are computed and applied independently for each color
5524 buffer and can produce different results in each buffer.
5526 Monoscopic contexts include only LEFT buffers, and stereoscopic contexts
5527 include both LEFT and RIGHT buffers. Likewise, single-buffered contexts
5528 include only FRONT buffers, and double-buffered contexts include both
5529 FRONT and BACK buffers. The context is selected at GL initialization.
5531 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5533 `GL_INVALID_OPERATION' is generated if none of the buffers indicated by
5536 `GL_INVALID_OPERATION' is generated if `glDrawBuffer' is executed
5537 between the execution of `glBegin' and the corresponding execution of
5540 (define-gl-procedures
5545 (indices const-GLvoid-*)
5548 "Render primitives from array data.
5551 Specifies what kind of primitives to render. Symbolic constants
5552 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
5553 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
5554 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
5557 Specifies the number of elements to be rendered.
5560 Specifies the type of the values in INDICES. Must be one of
5561 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
5564 Specifies a pointer to the location where the indices are stored.
5566 `glDrawElements' specifies multiple geometric primitives with very few
5567 subroutine calls. Instead of calling a GL function to pass each
5568 individual vertex, normal, texture coordinate, edge flag, or color, you
5569 can prespecify separate arrays of vertices, normals, and so on, and use
5570 them to construct a sequence of primitives with a single call to
5573 When `glDrawElements' is called, it uses COUNT sequential elements from
5574 an enabled array, starting at INDICES to construct a sequence of
5575 geometric primitives. MODE specifies what kind of primitives are
5576 constructed and how the array elements construct these primitives. If
5577 more than one array is enabled, each is used. If `GL_VERTEX_ARRAY' is
5578 not enabled, no geometric primitives are constructed.
5580 Vertex attributes that are modified by `glDrawElements' have an
5581 unspecified value after `glDrawElements' returns. For example, if
5582 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
5583 after `glDrawElements' executes. Attributes that aren't modified
5584 maintain their previous values.
5586 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
5588 `GL_INVALID_VALUE' is generated if COUNT is negative.
5590 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5591 bound to an enabled array or the element array and the buffer object's
5592 data store is currently mapped.
5594 `GL_INVALID_OPERATION' is generated if `glDrawElements' is executed
5595 between the execution of `glBegin' and the corresponding `glEnd'.")
5597 (define-gl-procedures
5603 (data const-GLvoid-*)
5606 "Write a block of pixels to the frame buffer.
5611 Specify the dimensions of the pixel rectangle to be written into
5615 Specifies the format of the pixel data. Symbolic constants
5616 `GL_COLOR_INDEX', `GL_STENCIL_INDEX', `GL_DEPTH_COMPONENT',
5617 `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_RED', `GL_GREEN',
5618 `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA' are
5622 Specifies the data type for DATA. Symbolic constants
5623 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
5624 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
5625 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
5626 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
5627 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
5628 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
5629 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
5630 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
5634 Specifies a pointer to the pixel data.
5636 `glDrawPixels' reads pixel data from memory and writes it into the frame
5637 buffer relative to the current raster position, provided that the raster
5638 position is valid. Use `glRasterPos' or `glWindowPos' to set the current
5639 raster position; use `glGet' with argument
5640 `GL_CURRENT_RASTER_POSITION_VALID' to determine if the specified raster
5641 position is valid, and `glGet' with argument
5642 `GL_CURRENT_RASTER_POSITION' to query the raster position.
5644 Several parameters define the encoding of pixel data in memory and
5645 control the processing of the pixel data before it is placed in the
5646 frame buffer. These parameters are set with four commands:
5647 `glPixelStore', `glPixelTransfer', `glPixelMap', and `glPixelZoom'. This
5648 reference page describes the effects on `glDrawPixels' of many, but not
5649 all, of the parameters specified by these four commands.
5651 Data is read from DATA as a sequence of signed or unsigned bytes, signed
5652 or unsigned shorts, signed or unsigned integers, or single-precision
5653 floating-point values, depending on TYPE. When TYPE is one of
5654 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
5655 `GL_UNSIGNED_INT', `GL_INT', or `GL_FLOAT' each of these bytes, shorts,
5656 integers, or floating-point values is interpreted as one color or depth
5657 component, or one index, depending on FORMAT. When TYPE is one of
5658 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_SHORT_5_6_5',
5659 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_5_5_5_1',
5660 `GL_UNSIGNED_INT_8_8_8_8', or `GL_UNSIGNED_INT_10_10_10_2', each
5661 unsigned value is interpreted as containing all the components for a
5662 single pixel, with the color components arranged according to FORMAT.
5663 When TYPE is one of `GL_UNSIGNED_BYTE_2_3_3_REV',
5664 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
5665 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8_REV', or
5666 `GL_UNSIGNED_INT_2_10_10_10_REV', each unsigned value is interpreted as
5667 containing all color components, specified by FORMAT, for a single pixel
5668 in a reversed order. Indices are always treated individually. Color
5669 components are treated as groups of one, two, three, or four values,
5670 again based on FORMAT. Both individual indices and groups of components
5671 are referred to as pixels. If TYPE is `GL_BITMAP', the data must be
5672 unsigned bytes, and FORMAT must be either `GL_COLOR_INDEX' or
5673 `GL_STENCIL_INDEX'. Each unsigned byte is treated as eight 1-bit pixels,
5674 with bit ordering determined by `GL_UNPACK_LSB_FIRST' (see
5677 WIDTH×HEIGHT pixels are read from memory, starting at location DATA. By
5678 default, these pixels are taken from adjacent memory locations, except
5679 that after all WIDTH pixels are read, the read pointer is advanced to
5680 the next four-byte boundary. The four-byte row alignment is specified by
5681 `glPixelStore' with argument `GL_UNPACK_ALIGNMENT', and it can be set to
5682 one, two, four, or eight bytes. Other pixel store parameters specify
5683 different read pointer advancements, both before the first pixel is read
5684 and after all WIDTH pixels are read. See the `glPixelStore' reference
5685 page for details on these options.
5687 If a non-zero named buffer object is bound to the
5688 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a block of
5689 pixels is specified, DATA is treated as a byte offset into the buffer
5690 object's data store.
5692 The WIDTH×HEIGHT pixels that are read from memory are each operated on
5693 in the same way, based on the values of several parameters specified by
5694 `glPixelTransfer' and `glPixelMap'. The details of these operations, as
5695 well as the target buffer into which the pixels are drawn, are specific
5696 to the format of the pixels, as specified by FORMAT. FORMAT can assume
5697 one of 13 symbolic values:
5700 Each pixel is a single value, a color index. It is converted to
5701 fixed-point format, with an unspecified number of bits to the right
5702 of the binary point, regardless of the memory data type.
5703 Floating-point values convert to true fixed-point values. Signed
5704 and unsigned integer data is converted with all fraction bits set
5705 to 0. Bitmap data convert to either 0 or 1.
5707 Each fixed-point index is then shifted left by `GL_INDEX_SHIFT'
5708 bits and added to `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is
5709 negative, the shift is to the right. In either case, zero bits fill
5710 otherwise unspecified bit locations in the result.
5712 If the GL is in RGBA mode, the resulting index is converted to an
5713 RGBA pixel with the help of the `GL_PIXEL_MAP_I_TO_R',
5714 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
5715 `GL_PIXEL_MAP_I_TO_A' tables. If the GL is in color index mode, and
5716 if `GL_MAP_COLOR' is true, the index is replaced with the value
5717 that it references in lookup table `GL_PIXEL_MAP_I_TO_I'. Whether
5718 the lookup replacement of the index is done or not, the integer
5719 part of the index is then ANDed with 2^B-1 , where B is the number
5720 of bits in a color index buffer.
5722 The GL then converts the resulting indices or RGBA colors to
5723 fragments by attaching the current raster position Z coordinate and
5724 texture coordinates to each pixel, then assigning X and Y window
5725 coordinates to the N th fragment such that X_N=X_R+N%WIDTH
5728 where (X_R,Y_R) is the current raster position. These pixel
5729 fragments are then treated just like the fragments generated by
5730 rasterizing points, lines, or polygons. Texture mapping, fog, and
5731 all the fragment operations are applied before the fragments are
5732 written to the frame buffer.
5735 Each pixel is a single value, a stencil index. It is converted to
5736 fixed-point format, with an unspecified number of bits to the right
5737 of the binary point, regardless of the memory data type.
5738 Floating-point values convert to true fixed-point values. Signed
5739 and unsigned integer data is converted with all fraction bits set
5740 to 0. Bitmap data convert to either 0 or 1.
5742 Each fixed-point index is then shifted left by `GL_INDEX_SHIFT'
5743 bits, and added to `GL_INDEX_OFFSET'. If `GL_INDEX_SHIFT' is
5744 negative, the shift is to the right. In either case, zero bits fill
5745 otherwise unspecified bit locations in the result. If
5746 `GL_MAP_STENCIL' is true, the index is replaced with the value that
5747 it references in lookup table `GL_PIXEL_MAP_S_TO_S'. Whether the
5748 lookup replacement of the index is done or not, the integer part of
5749 the index is then ANDed with 2^B-1 , where B is the number of bits
5750 in the stencil buffer. The resulting stencil indices are then
5751 written to the stencil buffer such that the N th index is written
5754 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
5756 where (X_R,Y_R) is the current raster position. Only the pixel
5757 ownership test, the scissor test, and the stencil writemask affect
5758 these write operations.
5760 `GL_DEPTH_COMPONENT'
5761 Each pixel is a single-depth component. Floating-point data is
5762 converted directly to an internal floating-point format with
5763 unspecified precision. Signed integer data is mapped linearly to
5764 the internal floating-point format such that the most positive
5765 representable integer value maps to 1.0, and the most negative
5766 representable value maps to -1.0 . Unsigned integer data is mapped
5767 similarly: the largest integer value maps to 1.0, and 0 maps to
5768 0.0. The resulting floating-point depth value is then multiplied by
5769 `GL_DEPTH_SCALE' and added to `GL_DEPTH_BIAS'. The result is
5770 clamped to the range [0,1] .
5772 The GL then converts the resulting depth components to fragments by
5773 attaching the current raster position color or color index and
5774 texture coordinates to each pixel, then assigning X and Y window
5775 coordinates to the N th fragment such that
5777 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
5779 where (X_R,Y_R) is the current raster position. These pixel
5780 fragments are then treated just like the fragments generated by
5781 rasterizing points, lines, or polygons. Texture mapping, fog, and
5782 all the fragment operations are applied before the fragments are
5783 written to the frame buffer.
5787 Each pixel is a four-component group: For `GL_RGBA', the red
5788 component is first, followed by green, followed by blue, followed
5789 by alpha; for `GL_BGRA' the order is blue, green, red and then
5790 alpha. Floating-point values are converted directly to an internal
5791 floating-point format with unspecified precision. Signed integer
5792 values are mapped linearly to the internal floating-point format
5793 such that the most positive representable integer value maps to
5794 1.0, and the most negative representable value maps to -1.0 . (Note
5795 that this mapping does not convert 0 precisely to 0.0.) Unsigned
5796 integer data is mapped similarly: The largest integer value maps to
5797 1.0, and 0 maps to 0.0. The resulting floating-point color values
5798 are then multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where
5799 C is RED, GREEN, BLUE, and ALPHA for the respective color
5800 components. The results are clamped to the range [0,1] .
5802 If `GL_MAP_COLOR' is true, each color component is scaled by the
5803 size of lookup table `GL_PIXEL_MAP_c_TO_c', then replaced by the
5804 value that it references in that table. C is R, G, B, or A
5807 The GL then converts the resulting RGBA colors to fragments by
5808 attaching the current raster position Z coordinate and texture
5809 coordinates to each pixel, then assigning X and Y window
5810 coordinates to the N th fragment such that
5812 X_N=X_R+N%WIDTH Y_N=Y_R+⌊N/WIDTH,⌋
5814 where (X_R,Y_R) is the current raster position. These pixel
5815 fragments are then treated just like the fragments generated by
5816 rasterizing points, lines, or polygons. Texture mapping, fog, and
5817 all the fragment operations are applied before the fragments are
5818 written to the frame buffer.
5821 Each pixel is a single red component. This component is converted
5822 to the internal floating-point format in the same way the red
5823 component of an RGBA pixel is. It is then converted to an RGBA
5824 pixel with green and blue set to 0, and alpha set to 1. After this
5825 conversion, the pixel is treated as if it had been read as an RGBA
5829 Each pixel is a single green component. This component is converted
5830 to the internal floating-point format in the same way the green
5831 component of an RGBA pixel is. It is then converted to an RGBA
5832 pixel with red and blue set to 0, and alpha set to 1. After this
5833 conversion, the pixel is treated as if it had been read as an RGBA
5837 Each pixel is a single blue component. This component is converted
5838 to the internal floating-point format in the same way the blue
5839 component of an RGBA pixel is. It is then converted to an RGBA
5840 pixel with red and green set to 0, and alpha set to 1. After this
5841 conversion, the pixel is treated as if it had been read as an RGBA
5845 Each pixel is a single alpha component. This component is converted
5846 to the internal floating-point format in the same way the alpha
5847 component of an RGBA pixel is. It is then converted to an RGBA
5848 pixel with red, green, and blue set to 0. After this conversion,
5849 the pixel is treated as if it had been read as an RGBA pixel.
5853 Each pixel is a three-component group: red first, followed by
5854 green, followed by blue; for `GL_BGR', the first component is blue,
5855 followed by green and then red. Each component is converted to the
5856 internal floating-point format in the same way the red, green, and
5857 blue components of an RGBA pixel are. The color triple is converted
5858 to an RGBA pixel with alpha set to 1. After this conversion, the
5859 pixel is treated as if it had been read as an RGBA pixel.
5862 Each pixel is a single luminance component. This component is
5863 converted to the internal floating-point format in the same way the
5864 red component of an RGBA pixel is. It is then converted to an RGBA
5865 pixel with red, green, and blue set to the converted luminance
5866 value, and alpha set to 1. After this conversion, the pixel is
5867 treated as if it had been read as an RGBA pixel.
5869 `GL_LUMINANCE_ALPHA'
5870 Each pixel is a two-component group: luminance first, followed by
5871 alpha. The two components are converted to the internal
5872 floating-point format in the same way the red component of an RGBA
5873 pixel is. They are then converted to an RGBA pixel with red, green,
5874 and blue set to the converted luminance value, and alpha set to the
5875 converted alpha value. After this conversion, the pixel is treated
5876 as if it had been read as an RGBA pixel.
5878 The following table summarizes the meaning of the valid constants for
5884 *Corresponding Type*
5887 unsigned 8-bit integer
5890 signed 8-bit integer
5893 single bits in unsigned 8-bit integers
5896 unsigned 16-bit integer
5899 signed 16-bit integer
5902 unsigned 32-bit integer
5908 single-precision floating-point
5910 `GL_UNSIGNED_BYTE_3_3_2'
5911 unsigned 8-bit integer
5913 `GL_UNSIGNED_BYTE_2_3_3_REV'
5914 unsigned 8-bit integer with reversed component ordering
5916 `GL_UNSIGNED_SHORT_5_6_5'
5917 unsigned 16-bit integer
5919 `GL_UNSIGNED_SHORT_5_6_5_REV'
5920 unsigned 16-bit integer with reversed component ordering
5922 `GL_UNSIGNED_SHORT_4_4_4_4'
5923 unsigned 16-bit integer
5925 `GL_UNSIGNED_SHORT_4_4_4_4_REV'
5926 unsigned 16-bit integer with reversed component ordering
5928 `GL_UNSIGNED_SHORT_5_5_5_1'
5929 unsigned 16-bit integer
5931 `GL_UNSIGNED_SHORT_1_5_5_5_REV'
5932 unsigned 16-bit integer with reversed component ordering
5934 `GL_UNSIGNED_INT_8_8_8_8'
5935 unsigned 32-bit integer
5937 `GL_UNSIGNED_INT_8_8_8_8_REV'
5938 unsigned 32-bit integer with reversed component ordering
5940 `GL_UNSIGNED_INT_10_10_10_2'
5941 unsigned 32-bit integer
5943 `GL_UNSIGNED_INT_2_10_10_10_REV'
5944 unsigned 32-bit integer with reversed component ordering
5948 The rasterization described so far assumes pixel zoom factors of 1. If
5949 `glPixelZoom' is used to change the X and Y pixel zoom factors, pixels
5950 are converted to fragments as follows. If (X_R,Y_R) is the current
5951 raster position, and a given pixel is in the N th column and M th row of
5952 the pixel rectangle, then fragments are generated for pixels whose
5953 centers are in the rectangle with corners at
5955 (X_R+ZOOM_X,\u2062N,Y_R+ZOOM_Y,\u2062M) (X_R+ZOOM_X,\u2061(N+1,),Y_R+ZOOM_Y,\u2061(M+1,))
5957 where ZOOM_X is the value of `GL_ZOOM_X' and ZOOM_Y is the value of
5960 `GL_INVALID_ENUM' is generated if FORMAT or TYPE is not one of the
5963 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
5964 either `GL_COLOR_INDEX' or `GL_STENCIL_INDEX'.
5966 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
5968 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_STENCIL_INDEX' and
5969 there is no stencil buffer.
5971 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_RED', `GL_GREEN',
5972 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_RGBA', `GL_BGR', `GL_BGRA',
5973 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA', and the GL is in color index
5976 `GL_INVALID_OPERATION' is generated if FORMAT is one of
5977 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
5978 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
5981 `GL_INVALID_OPERATION' is generated if FORMAT is one of
5982 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
5983 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
5984 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
5985 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
5986 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
5988 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5989 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
5990 data store is currently mapped.
5992 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5993 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
5994 unpacked from the buffer object such that the memory reads required
5995 would exceed the data store size.
5997 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
5998 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
5999 divisible into the number of bytes needed to store in memory a datum
6002 `GL_INVALID_OPERATION' is generated if `glDrawPixels' is executed
6003 between the execution of `glBegin' and the corresponding execution of
6006 (define-gl-procedures
6007 ((glDrawRangeElements
6013 (indices const-GLvoid-*)
6016 "Render primitives from array data.
6019 Specifies what kind of primitives to render. Symbolic constants
6020 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
6021 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
6022 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
6025 Specifies the minimum array index contained in INDICES.
6028 Specifies the maximum array index contained in INDICES.
6031 Specifies the number of elements to be rendered.
6034 Specifies the type of the values in INDICES. Must be one of
6035 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
6038 Specifies a pointer to the location where the indices are stored.
6040 `glDrawRangeElements' is a restricted form of `glDrawElements'. MODE,
6041 START, END, and COUNT match the corresponding arguments to
6042 `glDrawElements', with the additional constraint that all values in the
6043 arrays COUNT must lie between START and END, inclusive.
6045 Implementations denote recommended maximum amounts of vertex and index
6046 data, which may be queried by calling `glGet' with argument
6047 `GL_MAX_ELEMENTS_VERTICES' and `GL_MAX_ELEMENTS_INDICES'. If END-START+1
6048 is greater than the value of `GL_MAX_ELEMENTS_VERTICES', or if COUNT is
6049 greater than the value of `GL_MAX_ELEMENTS_INDICES', then the call may
6050 operate at reduced performance. There is no requirement that all
6051 vertices in the range [START,END] be referenced. However, the
6052 implementation may partially process unused vertices, reducing
6053 performance from what could be achieved with an optimal index set.
6055 When `glDrawRangeElements' is called, it uses COUNT sequential elements
6056 from an enabled array, starting at START to construct a sequence of
6057 geometric primitives. MODE specifies what kind of primitives are
6058 constructed, and how the array elements construct these primitives. If
6059 more than one array is enabled, each is used. If `GL_VERTEX_ARRAY' is
6060 not enabled, no geometric primitives are constructed.
6062 Vertex attributes that are modified by `glDrawRangeElements' have an
6063 unspecified value after `glDrawRangeElements' returns. For example, if
6064 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
6065 after `glDrawRangeElements' executes. Attributes that aren't modified
6066 maintain their previous values.
6068 It is an error for indices to lie outside the range [START,END] , but
6069 implementations may not check for this situation. Such indices cause
6070 implementation-dependent behavior.
6072 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
6074 `GL_INVALID_VALUE' is generated if COUNT is negative.
6076 `GL_INVALID_VALUE' is generated if END<START .
6078 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
6079 bound to an enabled array or the element array and the buffer object's
6080 data store is currently mapped.
6082 `GL_INVALID_OPERATION' is generated if `glDrawRangeElements' is executed
6083 between the execution of `glBegin' and the corresponding `glEnd'.")
6085 (define-gl-procedures
6088 (pointer const-GLvoid-*)
6091 "Define an array of edge flags.
6094 Specifies the byte offset between consecutive edge flags. If STRIDE
6095 is 0, the edge flags are understood to be tightly packed in the
6096 array. The initial value is 0.
6099 Specifies a pointer to the first edge flag in the array. The
6102 `glEdgeFlagPointer' specifies the location and data format of an array
6103 of boolean edge flags to use when rendering. STRIDE specifies the byte
6104 stride from one edge flag to the next, allowing vertices and attributes
6105 to be packed into a single array or stored in separate arrays.
6107 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
6108 target (see `glBindBuffer') while an edge flag array is specified,
6109 POINTER is treated as a byte offset into the buffer object's data store.
6110 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
6111 edge flag vertex array client-side state
6112 (`GL_EDGE_FLAG_ARRAY_BUFFER_BINDING').
6114 When an edge flag array is specified, STRIDE and POINTER are saved as
6115 client-side state, in addition to the current vertex array buffer object
6118 To enable and disable the edge flag array, call `glEnableClientState'
6119 and `glDisableClientState' with the argument `GL_EDGE_FLAG_ARRAY'. If
6120 enabled, the edge flag array is used when `glDrawArrays',
6121 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements',
6122 `glDrawRangeElements', or `glArrayElement' is called.
6124 `GL_INVALID_ENUM' is generated if STRIDE is negative.")
6126 (define-gl-procedures
6127 ((glEdgeFlag (flag GLboolean) -> void))
6128 "Flag edges as either boundary or nonboundary.
6131 Specifies the current edge flag value, either `GL_TRUE' or
6132 `GL_FALSE'. The initial value is `GL_TRUE'.
6134 Each vertex of a polygon, separate triangle, or separate quadrilateral
6135 specified between a `glBegin'/`glEnd' pair is marked as the start of
6136 either a boundary or nonboundary edge. If the current edge flag is true
6137 when the vertex is specified, the vertex is marked as the start of a
6138 boundary edge. Otherwise, the vertex is marked as the start of a
6139 nonboundary edge. `glEdgeFlag' sets the edge flag bit to `GL_TRUE' if
6140 FLAG is `GL_TRUE' and to `GL_FALSE' otherwise.
6142 The vertices of connected triangles and connected quadrilaterals are
6143 always marked as boundary, regardless of the value of the edge flag.
6145 Boundary and nonboundary edge flags on vertices are significant only if
6146 `GL_POLYGON_MODE' is set to `GL_POINT' or `GL_LINE'. See
6149 (define-gl-procedures
6150 ((glEnableClientState (cap GLenum) -> void)
6151 (glDisableClientState (cap GLenum) -> void))
6152 "Enable or disable client-side capability.
6155 Specifies the capability to enable. Symbolic constants
6156 `GL_COLOR_ARRAY', `GL_EDGE_FLAG_ARRAY', `GL_FOG_COORD_ARRAY',
6157 `GL_INDEX_ARRAY', `GL_NORMAL_ARRAY', `GL_SECONDARY_COLOR_ARRAY',
6158 `GL_TEXTURE_COORD_ARRAY', and `GL_VERTEX_ARRAY' are accepted.
6160 `glEnableClientState' and `glDisableClientState' enable or disable
6161 individual client-side capabilities. By default, all client-side
6162 capabilities are disabled. Both `glEnableClientState' and
6163 `glDisableClientState' take a single argument, CAP, which can assume one
6164 of the following values:
6167 If enabled, the color array is enabled for writing and used during
6168 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6169 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6170 is called. See `glColorPointer'.
6172 `GL_EDGE_FLAG_ARRAY'
6173 If enabled, the edge flag array is enabled for writing and used
6174 during rendering when `glArrayElement', `glDrawArrays',
6175 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6176 `glMultiDrawElements' is called. See `glEdgeFlagPointer'.
6178 `GL_FOG_COORD_ARRAY'
6179 If enabled, the fog coordinate array is enabled for writing and
6180 used during rendering when `glArrayElement', `glDrawArrays',
6181 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6182 `glMultiDrawElements' is called. See `glFogCoordPointer'.
6185 If enabled, the index array is enabled for writing and used during
6186 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6187 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6188 is called. See `glIndexPointer'.
6191 If enabled, the normal array is enabled for writing and used during
6192 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6193 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6194 is called. See `glNormalPointer'.
6196 `GL_SECONDARY_COLOR_ARRAY'
6197 If enabled, the secondary color array is enabled for writing and
6198 used during rendering when `glArrayElement', `glDrawArrays',
6199 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6200 `glMultiDrawElements' is called. See `glColorPointer'.
6202 `GL_TEXTURE_COORD_ARRAY'
6203 If enabled, the texture coordinate array is enabled for writing and
6204 used during rendering when `glArrayElement', `glDrawArrays',
6205 `glDrawElements', `glDrawRangeElements'`glMultiDrawArrays', or
6206 `glMultiDrawElements' is called. See `glTexCoordPointer'.
6209 If enabled, the vertex array is enabled for writing and used during
6210 rendering when `glArrayElement', `glDrawArrays', `glDrawElements',
6211 `glDrawRangeElements'`glMultiDrawArrays', or `glMultiDrawElements'
6212 is called. See `glVertexPointer'.
6214 `GL_INVALID_ENUM' is generated if CAP is not an accepted value.
6216 `glEnableClientState' is not allowed between the execution of `glBegin'
6217 and the corresponding `glEnd', but an error may or may not be generated.
6218 If no error is generated, the behavior is undefined.")
6220 (define-gl-procedures
6221 ((glEnableVertexAttribArray
6225 (glDisableVertexAttribArray
6229 "Enable or disable a generic vertex attribute array.
6232 Specifies the index of the generic vertex attribute to be enabled
6235 `glEnableVertexAttribArray' enables the generic vertex attribute array
6236 specified by INDEX. `glDisableVertexAttribArray' disables the generic
6237 vertex attribute array specified by INDEX. By default, all client-side
6238 capabilities are disabled, including all generic vertex attribute
6239 arrays. If enabled, the values in the generic vertex attribute array
6240 will be accessed and used for rendering when calls are made to vertex
6241 array commands such as `glDrawArrays', `glDrawElements',
6242 `glDrawRangeElements', `glArrayElement', `glMultiDrawElements', or
6243 `glMultiDrawArrays'.
6245 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
6246 `GL_MAX_VERTEX_ATTRIBS'.
6248 `GL_INVALID_OPERATION' is generated if either `glEnableVertexAttribArray
6249 ' or `glDisableVertexAttribArray ' is executed between the execution of
6250 `glBegin' and the corresponding execution of `glEnd'.")
6252 (define-gl-procedures
6253 ((glEnable (cap GLenum) -> void)
6254 (glDisable (cap GLenum) -> void))
6255 "Enable or disable server-side GL capabilities.
6258 Specifies a symbolic constant indicating a GL capability.
6260 `glEnable' and `glDisable' enable and disable various capabilities. Use
6261 `glIsEnabled' or `glGet' to determine the current setting of any
6262 capability. The initial value for each capability with the exception of
6263 `GL_DITHER' and `GL_MULTISAMPLE' is `GL_FALSE'. The initial value for
6264 `GL_DITHER' and `GL_MULTISAMPLE' is `GL_TRUE'.
6266 Both `glEnable' and `glDisable' take a single argument, CAP, which can
6267 assume one of the following values:
6272 If enabled, do alpha testing. See `glAlphaFunc'.
6277 If enabled, generate normal vectors when either `GL_MAP2_VERTEX_3'
6278 or `GL_MAP2_VERTEX_4' is used to generate vertices. See `glMap2'.
6283 If enabled, blend the computed fragment color values with the
6284 values in the color buffers. See `glBlendFunc'.
6289 If enabled, clip geometry against user-defined clipping plane I.
6295 If enabled, apply the currently selected logical operation to the
6296 computed fragment color and color buffer values. See `glLogicOp'.
6301 If enabled, have one or more material parameters track the current
6302 color. See `glColorMaterial'.
6307 If enabled and no fragment shader is active, add the secondary
6308 color value to the computed fragment color. See `glSecondaryColor'.
6313 If enabled, perform a color table lookup on the incoming RGBA color
6314 values. See `glColorTable'.
6319 If enabled, perform a 1D convolution operation on incoming RGBA
6320 color values. See `glConvolutionFilter1D'.
6325 If enabled, perform a 2D convolution operation on incoming RGBA
6326 color values. See `glConvolutionFilter2D'.
6331 If enabled, cull polygons based on their winding in window
6332 coordinates. See `glCullFace'.
6337 If enabled, do depth comparisons and update the depth buffer. Note
6338 that even if the depth buffer exists and the depth mask is
6339 non-zero, the depth buffer is not updated if the depth test is
6340 disabled. See `glDepthFunc' and `glDepthRange'.
6345 If enabled, dither color components or indices before they are
6346 written to the color buffer.
6351 If enabled and no fragment shader is active, blend a fog color into
6352 the post-texturing color. See `glFog'.
6357 If enabled, histogram incoming RGBA color values. See
6363 If enabled, apply the currently selected logical operation to the
6364 incoming index and color buffer indices. See `glLogicOp'.
6369 If enabled, include light I in the evaluation of the lighting
6370 equation. See `glLightModel' and `glLight'.
6375 If enabled and no vertex shader is active, use the current lighting
6376 parameters to compute the vertex color or index. Otherwise, simply
6377 associate the current color or index with each vertex. See
6378 `glMaterial', `glLightModel', and `glLight'.
6383 If enabled, draw lines with correct filtering. Otherwise, draw
6384 aliased lines. See `glLineWidth'.
6389 If enabled, use the current line stipple pattern when drawing
6390 lines. See `glLineStipple'.
6395 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6396 `glEvalPoint1' generate RGBA values. See `glMap1'.
6401 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6402 `glEvalPoint1' generate color indices. See `glMap1'.
6407 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6408 `glEvalPoint1' generate normals. See `glMap1'.
6410 `GL_MAP1_TEXTURE_COORD_1'
6413 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6414 `glEvalPoint1' generate S texture coordinates. See `glMap1'.
6416 `GL_MAP1_TEXTURE_COORD_2'
6419 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6420 `glEvalPoint1' generate S and T texture coordinates. See `glMap1'.
6422 `GL_MAP1_TEXTURE_COORD_3'
6425 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6426 `glEvalPoint1' generate S, T, and R texture coordinates. See
6429 `GL_MAP1_TEXTURE_COORD_4'
6432 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6433 `glEvalPoint1' generate S, T, R, and Q texture coordinates. See
6439 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6440 `glEvalPoint1' generate X, Y, and Z vertex coordinates. See
6446 If enabled, calls to `glEvalCoord1', `glEvalMesh1', and
6447 `glEvalPoint1' generate homogeneous X, Y, Z, and W vertex
6448 coordinates. See `glMap1'.
6453 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6454 `glEvalPoint2' generate RGBA values. See `glMap2'.
6459 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6460 `glEvalPoint2' generate color indices. See `glMap2'.
6465 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6466 `glEvalPoint2' generate normals. See `glMap2'.
6468 `GL_MAP2_TEXTURE_COORD_1'
6471 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6472 `glEvalPoint2' generate S texture coordinates. See `glMap2'.
6474 `GL_MAP2_TEXTURE_COORD_2'
6477 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6478 `glEvalPoint2' generate S and T texture coordinates. See `glMap2'.
6480 `GL_MAP2_TEXTURE_COORD_3'
6483 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6484 `glEvalPoint2' generate S, T, and R texture coordinates. See
6487 `GL_MAP2_TEXTURE_COORD_4'
6490 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6491 `glEvalPoint2' generate S, T, R, and Q texture coordinates. See
6497 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6498 `glEvalPoint2' generate X, Y, and Z vertex coordinates. See
6504 If enabled, calls to `glEvalCoord2', `glEvalMesh2', and
6505 `glEvalPoint2' generate homogeneous X, Y, Z, and W vertex
6506 coordinates. See `glMap2'.
6511 If enabled, compute the minimum and maximum values of incoming RGBA
6512 color values. See `glMinmax'.
6517 If enabled, use multiple fragment samples in computing the final
6518 color of a pixel. See `glSampleCoverage'.
6523 If enabled and no vertex shader is active, normal vectors are
6524 normalized to unit length after transformation and before lighting.
6525 This method is generally less efficient than `GL_RESCALE_NORMAL'.
6526 See `glNormal' and `glNormalPointer'.
6531 If enabled, draw points with proper filtering. Otherwise, draw
6532 aliased points. See `glPointSize'.
6537 If enabled, calculate texture coordinates for points based on
6538 texture environment and point parameter settings. Otherwise texture
6539 coordinates are constant across points.
6541 `GL_POLYGON_OFFSET_FILL'
6544 If enabled, and if the polygon is rendered in `GL_FILL' mode, an
6545 offset is added to depth values of a polygon's fragments before the
6546 depth comparison is performed. See `glPolygonOffset'.
6548 `GL_POLYGON_OFFSET_LINE'
6551 If enabled, and if the polygon is rendered in `GL_LINE' mode, an
6552 offset is added to depth values of a polygon's fragments before the
6553 depth comparison is performed. See `glPolygonOffset'.
6555 `GL_POLYGON_OFFSET_POINT'
6558 If enabled, an offset is added to depth values of a polygon's
6559 fragments before the depth comparison is performed, if the polygon
6560 is rendered in `GL_POINT' mode. See `glPolygonOffset'.
6565 If enabled, draw polygons with proper filtering. Otherwise, draw
6566 aliased polygons. For correct antialiased polygons, an alpha buffer
6567 is needed and the polygons must be sorted front to back.
6569 `GL_POLYGON_STIPPLE'
6572 If enabled, use the current polygon stipple pattern when rendering
6573 polygons. See `glPolygonStipple'.
6575 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
6578 If enabled, perform a color table lookup on RGBA color values after
6579 color matrix transformation. See `glColorTable'.
6581 `GL_POST_CONVOLUTION_COLOR_TABLE'
6584 If enabled, perform a color table lookup on RGBA color values after
6585 convolution. See `glColorTable'.
6590 If enabled and no vertex shader is active, normal vectors are
6591 scaled after transformation and before lighting by a factor
6592 computed from the modelview matrix. If the modelview matrix scales
6593 space uniformly, this has the effect of restoring the transformed
6594 normal to unit length. This method is generally more efficient than
6595 `GL_NORMALIZE'. See `glNormal' and `glNormalPointer'.
6597 `GL_SAMPLE_ALPHA_TO_COVERAGE'
6600 If enabled, compute a temporary coverage value where each bit is
6601 determined by the alpha value at the corresponding sample location.
6602 The temporary coverage value is then ANDed with the fragment
6605 `GL_SAMPLE_ALPHA_TO_ONE'
6608 If enabled, each sample alpha value is replaced by the maximum
6609 representable alpha value.
6611 `GL_SAMPLE_COVERAGE'
6614 If enabled, the fragment's coverage is ANDed with the temporary
6615 coverage value. If `GL_SAMPLE_COVERAGE_INVERT' is set to `GL_TRUE',
6616 invert the coverage value. See `glSampleCoverage'.
6621 If enabled, perform a two-dimensional convolution operation using a
6622 separable convolution filter on incoming RGBA color values. See
6623 `glSeparableFilter2D'.
6628 If enabled, discard fragments that are outside the scissor
6629 rectangle. See `glScissor'.
6634 If enabled, do stencil testing and update the stencil buffer. See
6635 `glStencilFunc' and `glStencilOp'.
6640 If enabled and no fragment shader is active, one-dimensional
6641 texturing is performed (unless two- or three-dimensional or
6642 cube-mapped texturing is also enabled). See `glTexImage1D'.
6647 If enabled and no fragment shader is active, two-dimensional
6648 texturing is performed (unless three-dimensional or cube-mapped
6649 texturing is also enabled). See `glTexImage2D'.
6654 If enabled and no fragment shader is active, three-dimensional
6655 texturing is performed (unless cube-mapped texturing is also
6656 enabled). See `glTexImage3D'.
6658 `GL_TEXTURE_CUBE_MAP'
6661 If enabled and no fragment shader is active, cube-mapped texturing
6662 is performed. See `glTexImage2D'.
6667 If enabled and no vertex shader is active, the Q texture coordinate
6668 is computed using the texture generation function defined with
6669 `glTexGen'. Otherwise, the current Q texture coordinate is used.
6675 If enabled and no vertex shader is active, the R texture coordinate
6676 is computed using the texture generation function defined with
6677 `glTexGen'. Otherwise, the current R texture coordinate is used.
6683 If enabled and no vertex shader is active, the S texture coordinate
6684 is computed using the texture generation function defined with
6685 `glTexGen'. Otherwise, the current S texture coordinate is used.
6691 If enabled and no vertex shader is active, the T texture coordinate
6692 is computed using the texture generation function defined with
6693 `glTexGen'. Otherwise, the current T texture coordinate is used.
6696 `GL_VERTEX_PROGRAM_POINT_SIZE'
6699 If enabled and a vertex shader is active, then the derived point
6700 size is taken from the (potentially clipped) shader builtin
6701 `gl_PointSize' and clamped to the implementation-dependent point
6704 `GL_VERTEX_PROGRAM_TWO_SIDE'
6707 If enabled and a vertex shader is active, it specifies that the GL
6708 will choose between front and back colors based on the polygon's
6709 face direction of which the vertex being shaded is a part. It has
6710 no effect on points or lines.
6712 `GL_INVALID_ENUM' is generated if CAP is not one of the values listed
6715 `GL_INVALID_OPERATION' is generated if `glEnable' or `glDisable' is
6716 executed between the execution of `glBegin' and the corresponding
6717 execution of `glEnd'.")
6719 (define-gl-procedures
6720 ((glEvalCoord1f (u GLfloat) -> void)
6721 (glEvalCoord2f (u GLfloat) (v GLfloat) -> void))
6722 "Evaluate enabled one- and two-dimensional maps.
6725 Specifies a value that is the domain coordinate U to the basis
6726 function defined in a previous `glMap1' or `glMap2' command.
6729 Specifies a value that is the domain coordinate V to the basis
6730 function defined in a previous `glMap2' command. This argument is
6731 not present in a `glEvalCoord1' command.
6733 `glEvalCoord1' evaluates enabled one-dimensional maps at argument U.
6734 `glEvalCoord2' does the same for two-dimensional maps using two domain
6735 values, U and V. To define a map, call `glMap1' and `glMap2'; to enable
6736 and disable it, call `glEnable' and `glDisable'.
6738 When one of the `glEvalCoord' commands is issued, all currently enabled
6739 maps of the indicated dimension are evaluated. Then, for each enabled
6740 map, it is as if the corresponding GL command had been issued with the
6741 computed value. That is, if `GL_MAP1_INDEX' or `GL_MAP2_INDEX' is
6742 enabled, a `glIndex' command is simulated. If `GL_MAP1_COLOR_4' or
6743 `GL_MAP2_COLOR_4' is enabled, a `glColor' command is simulated. If
6744 `GL_MAP1_NORMAL' or `GL_MAP2_NORMAL' is enabled, a normal vector is
6745 produced, and if any of `GL_MAP1_TEXTURE_COORD_1',
6746 `GL_MAP1_TEXTURE_COORD_2', `GL_MAP1_TEXTURE_COORD_3',
6747 `GL_MAP1_TEXTURE_COORD_4', `GL_MAP2_TEXTURE_COORD_1',
6748 `GL_MAP2_TEXTURE_COORD_2', `GL_MAP2_TEXTURE_COORD_3', or
6749 `GL_MAP2_TEXTURE_COORD_4' is enabled, then an appropriate `glTexCoord'
6750 command is simulated.
6752 For color, color index, normal, and texture coordinates the GL uses
6753 evaluated values instead of current values for those evaluations that
6754 are enabled, and current values otherwise, However, the evaluated values
6755 do not update the current values. Thus, if `glVertex' commands are
6756 interspersed with `glEvalCoord' commands, the color, normal, and texture
6757 coordinates associated with the `glVertex' commands are not affected by
6758 the values generated by the `glEvalCoord' commands, but only by the most
6759 recent `glColor', `glIndex', `glNormal', and `glTexCoord' commands.
6761 No commands are issued for maps that are not enabled. If more than one
6762 texture evaluation is enabled for a particular dimension (for example,
6763 `GL_MAP2_TEXTURE_COORD_1' and `GL_MAP2_TEXTURE_COORD_2'), then only the
6764 evaluation of the map that produces the larger number of coordinates (in
6765 this case, `GL_MAP2_TEXTURE_COORD_2') is carried out. `GL_MAP1_VERTEX_4'
6766 overrides `GL_MAP1_VERTEX_3', and `GL_MAP2_VERTEX_4' overrides
6767 `GL_MAP2_VERTEX_3', in the same manner. If neither a three- nor a
6768 four-component vertex map is enabled for the specified dimension, the
6769 `glEvalCoord' command is ignored.
6771 If you have enabled automatic normal generation, by calling `glEnable'
6772 with argument `GL_AUTO_NORMAL', `glEvalCoord2' generates surface normals
6773 analytically, regardless of the contents or enabling of the
6774 `GL_MAP2_NORMAL' map. Let
6776 `m'=∂`p',/∂U,,×∂`p',/∂V,,
6778 Then the generated normal `n' is `n'=`m'/∥`m',∥,
6780 If automatic normal generation is disabled, the corresponding normal map
6781 `GL_MAP2_NORMAL', if enabled, is used to produce a normal. If neither
6782 automatic normal generation nor a normal map is enabled, no normal is
6783 generated for `glEvalCoord2' commands.")
6785 (define-gl-procedures
6800 "Compute a one- or two-dimensional grid of points or lines.
6803 In `glEvalMesh1', specifies whether to compute a one-dimensional
6804 mesh of points or lines. Symbolic constants `GL_POINT' and
6805 `GL_LINE' are accepted.
6810 Specify the first and last integer values for grid domain variable
6813 `glMapGrid' and `glEvalMesh' are used in tandem to efficiently generate
6814 and evaluate a series of evenly-spaced map domain values. `glEvalMesh'
6815 steps through the integer domain of a one- or two-dimensional grid,
6816 whose range is the domain of the evaluation maps specified by `glMap1'
6817 and `glMap2'. MODE determines whether the resulting vertices are
6818 connected as points, lines, or filled polygons.
6820 In the one-dimensional case, `glEvalMesh1', the mesh is generated as if
6821 the following code fragment were executed:
6827 for ( i = I1; i <= I2; i += 1 )
6828 glEvalCoord1( i·ΔU+U_1
6835 and N , U_1 , and U_2 are the arguments to the most recent `glMapGrid1'
6836 command. TYPE is `GL_POINTS' if MODE is `GL_POINT', or `GL_LINES' if
6839 The one absolute numeric requirement is that if I=N , then the value
6840 computed from I·ΔU+U_1 is exactly U_2 .
6842 In the two-dimensional case, `glEvalMesh2', let .cp ΔU=(U_2-U_1,)/N
6846 where N , U_1 , U_2 , M , V_1 , and V_2 are the arguments to the most
6847 recent `glMapGrid2' command. Then, if MODE is `GL_FILL', the
6848 `glEvalMesh2' command is equivalent to:
6853 for ( j = J1; j < J2; j += 1 ) {
6854 glBegin( GL_QUAD_STRIP );
6855 for ( i = I1; i <= I2; i += 1 ) {
6856 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
6859 glEvalCoord2( i·ΔU+U_1,(j+1,)·ΔV+V_1
6866 If MODE is `GL_LINE', then a call to `glEvalMesh2' is equivalent to:
6871 for ( j = J1; j <= J2; j += 1 ) {
6872 glBegin( GL_LINE_STRIP );
6873 for ( i = I1; i <= I2; i += 1 )
6874 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
6880 for ( i = I1; i <= I2; i += 1 ) {
6881 glBegin( GL_LINE_STRIP );
6882 for ( j = J1; j <= J1; j += 1 )
6883 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
6889 And finally, if MODE is `GL_POINT', then a call to `glEvalMesh2' is
6895 glBegin( GL_POINTS );
6896 for ( j = J1; j <= J2; j += 1 )
6897 for ( i = I1; i <= I2; i += 1 )
6898 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
6903 In all three cases, the only absolute numeric requirements are that if
6904 I=N , then the value computed from I·ΔU+U_1 is exactly U_2 , and if J=M
6905 , then the value computed from J·ΔV+V_1 is exactly V_2 .
6907 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
6909 `GL_INVALID_OPERATION' is generated if `glEvalMesh' is executed between
6910 the execution of `glBegin' and the corresponding execution of `glEnd'.")
6912 (define-gl-procedures
6913 ((glEvalPoint1 (i GLint) -> void)
6914 (glEvalPoint2 (i GLint) (j GLint) -> void))
6915 "Generate and evaluate a single point in a mesh.
6918 Specifies the integer value for grid domain variable I .
6921 Specifies the integer value for grid domain variable J
6922 (`glEvalPoint2' only).
6924 `glMapGrid' and `glEvalMesh' are used in tandem to efficiently generate
6925 and evaluate a series of evenly spaced map domain values. `glEvalPoint'
6926 can be used to evaluate a single grid point in the same gridspace that
6927 is traversed by `glEvalMesh'. Calling `glEvalPoint1' is equivalent to
6928 calling where ΔU=(U_2-U_1,)/N
6931 glEvalCoord1( i·ΔU+U_1
6935 and N , U_1 , and U_2 are the arguments to the most recent `glMapGrid1'
6936 command. The one absolute numeric requirement is that if I=N , then the
6937 value computed from I·ΔU+U_1 is exactly U_2 .
6939 In the two-dimensional case, `glEvalPoint2', let
6941 ΔU=(U_2-U_1,)/N ΔV=(V_2-V_1,)/M
6943 where N , U_1 , U_2 , M , V_1 , and V_2 are the arguments to the most
6944 recent `glMapGrid2' command. Then the `glEvalPoint2' command is
6945 equivalent to calling The only absolute numeric requirements are that if
6946 I=N , then the value computed from I·ΔU+U_1 is exactly U_2 , and if J=M
6947 , then the value computed from J·ΔV+V_1 is exactly V_2 .
6950 glEvalCoord2( i·ΔU+U_1,j·ΔV+V_1
6954 (define-gl-procedures
6961 "Controls feedback mode.
6964 Specifies the maximum number of values that can be written into
6968 Specifies a symbolic constant that describes the information that
6969 will be returned for each vertex. `GL_2D', `GL_3D', `GL_3D_COLOR',
6970 `GL_3D_COLOR_TEXTURE', and `GL_4D_COLOR_TEXTURE' are accepted.
6973 Returns the feedback data.
6975 The `glFeedbackBuffer' function controls feedback. Feedback, like
6976 selection, is a GL mode. The mode is selected by calling `glRenderMode'
6977 with `GL_FEEDBACK'. When the GL is in feedback mode, no pixels are
6978 produced by rasterization. Instead, information about primitives that
6979 would have been rasterized is fed back to the application using the GL.
6981 `glFeedbackBuffer' has three arguments: BUFFER is a pointer to an array
6982 of floating-point values into which feedback information is placed. SIZE
6983 indicates the size of the array. TYPE is a symbolic constant describing
6984 the information that is fed back for each vertex. `glFeedbackBuffer'
6985 must be issued before feedback mode is enabled (by calling
6986 `glRenderMode' with argument `GL_FEEDBACK'). Setting `GL_FEEDBACK'
6987 without establishing the feedback buffer, or calling `glFeedbackBuffer'
6988 while the GL is in feedback mode, is an error.
6990 When `glRenderMode' is called while in feedback mode, it returns the
6991 number of entries placed in the feedback array and resets the feedback
6992 array pointer to the base of the feedback buffer. The returned value
6993 never exceeds SIZE. If the feedback data required more room than was
6994 available in BUFFER, `glRenderMode' returns a negative value. To take
6995 the GL out of feedback mode, call `glRenderMode' with a parameter value
6996 other than `GL_FEEDBACK'.
6998 While in feedback mode, each primitive, bitmap, or pixel rectangle that
6999 would be rasterized generates a block of values that are copied into the
7000 feedback array. If doing so would cause the number of entries to exceed
7001 the maximum, the block is partially written so as to fill the array (if
7002 there is any room left at all), and an overflow flag is set. Each block
7003 begins with a code indicating the primitive type, followed by values
7004 that describe the primitive's vertices and associated data. Entries are
7005 also written for bitmaps and pixel rectangles. Feedback occurs after
7006 polygon culling and `glPolygonMode' interpretation of polygons has taken
7007 place, so polygons that are culled are not returned in the feedback
7008 buffer. It can also occur after polygons with more than three edges are
7009 broken up into triangles, if the GL implementation renders polygons by
7010 performing this decomposition.
7012 The `glPassThrough' command can be used to insert a marker into the
7013 feedback buffer. See `glPassThrough'.
7015 Following is the grammar for the blocks of values written into the
7016 feedback buffer. Each primitive is indicated with a unique identifying
7017 value followed by some number of vertices. Polygon entries include an
7018 integer value indicating how many vertices follow. A vertex is fed back
7019 as some number of floating-point values, as determined by TYPE. Colors
7020 are fed back as four values in RGBA mode and one value in color index
7023 feedbackList ← feedbackItem feedbackList | feedbackItem feedbackItem ←
7024 point | lineSegment | polygon | bitmap | pixelRectangle | passThru point
7025 ← `GL_POINT_TOKEN' vertex lineSegment ← `GL_LINE_TOKEN' vertex vertex |
7026 `GL_LINE_RESET_TOKEN' vertex vertex polygon ← `GL_POLYGON_TOKEN' n
7027 polySpec polySpec ← polySpec vertex | vertex vertex vertex bitmap ←
7028 `GL_BITMAP_TOKEN' vertex pixelRectangle ← `GL_DRAW_PIXEL_TOKEN' vertex |
7029 `GL_COPY_PIXEL_TOKEN' vertex passThru ← `GL_PASS_THROUGH_TOKEN' value
7030 vertex ← 2d | 3d | 3dColor | 3dColorTexture | 4dColorTexture 2d ← value
7031 value 3d ← value value value 3dColor ← value value value color
7032 3dColorTexture ← value value value color tex 4dColorTexture ← value
7033 value value value color tex color ← rgba | index rgba ← value value
7034 value value index ← value tex ← value value value value
7036 VALUE is a floating-point number, and N is a floating-point integer
7037 giving the number of vertices in the polygon. `GL_POINT_TOKEN',
7038 `GL_LINE_TOKEN', `GL_LINE_RESET_TOKEN', `GL_POLYGON_TOKEN',
7039 `GL_BITMAP_TOKEN', `GL_DRAW_PIXEL_TOKEN', `GL_COPY_PIXEL_TOKEN' and
7040 `GL_PASS_THROUGH_TOKEN' are symbolic floating-point constants.
7041 `GL_LINE_RESET_TOKEN' is returned whenever the line stipple pattern is
7042 reset. The data returned as a vertex depends on the feedback TYPE.
7044 The following table gives the correspondence between TYPE and the number
7045 of values per vertex. K is 1 in color index mode and 4 in RGBA mode.
7050 *Coordinates*, *Color*, *Texture*, *Total Number of Values*
7061 `GL_3D_COLOR_TEXTURE'
7062 X, Y, Z, K , 4 , 7+K
7064 `GL_4D_COLOR_TEXTURE'
7065 X, Y, Z, W, K , 4 , 8+K
7067 Feedback vertex coordinates are in window coordinates, except W, which
7068 is in clip coordinates. Feedback colors are lighted, if lighting is
7069 enabled. Feedback texture coordinates are generated, if texture
7070 coordinate generation is enabled. They are always transformed by the
7073 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
7075 `GL_INVALID_VALUE' is generated if SIZE is negative.
7077 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is called
7078 while the render mode is `GL_FEEDBACK', or if `glRenderMode' is called
7079 with argument `GL_FEEDBACK' before `glFeedbackBuffer' is called at least
7082 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is executed
7083 between the execution of `glBegin' and the corresponding execution of
7086 (define-gl-procedures
7087 ((glFinish -> void))
7088 "Block until all GL execution is complete.
7090 `glFinish' does not return until the effects of all previously called GL
7091 commands are complete. Such effects include all changes to GL state, all
7092 changes to connection state, and all changes to the frame buffer
7095 `GL_INVALID_OPERATION' is generated if `glFinish' is executed between
7096 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7098 (define-gl-procedures
7100 "Force execution of GL commands in finite time.
7102 Different GL implementations buffer commands in several different
7103 locations, including network buffers and the graphics accelerator
7104 itself. `glFlush' empties all of these buffers, causing all issued
7105 commands to be executed as quickly as they are accepted by the actual
7106 rendering engine. Though this execution may not be completed in any
7107 particular time period, it does complete in finite time.
7109 Because any GL program might be executed over a network, or on an
7110 accelerator that buffers commands, all programs should call `glFlush'
7111 whenever they count on having all of their previously issued commands
7112 completed. For example, call `glFlush' before waiting for user input
7113 that depends on the generated image.
7115 `GL_INVALID_OPERATION' is generated if `glFlush' is executed between the
7116 execution of `glBegin' and the corresponding execution of `glEnd'.")
7118 (define-gl-procedures
7125 "Define an array of fog coordinates.
7128 Specifies the data type of each fog coordinate. Symbolic constants
7129 `GL_FLOAT', or `GL_DOUBLE' are accepted. The initial value is
7133 Specifies the byte offset between consecutive fog coordinates. If
7134 STRIDE is 0, the array elements are understood to be tightly
7135 packed. The initial value is 0.
7138 Specifies a pointer to the first coordinate of the first fog
7139 coordinate in the array. The initial value is 0.
7141 `glFogCoordPointer' specifies the location and data format of an array
7142 of fog coordinates to use when rendering. TYPE specifies the data type
7143 of each fog coordinate, and STRIDE specifies the byte stride from one
7144 fog coordinate to the next, allowing vertices and attributes to be
7145 packed into a single array or stored in separate arrays.
7147 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
7148 target (see `glBindBuffer') while a fog coordinate array is specified,
7149 POINTER is treated as a byte offset into the buffer object's data store.
7150 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
7151 fog coordinate vertex array client-side state
7152 (`GL_FOG_COORD_ARRAY_BUFFER_BINDING').
7154 When a fog coordinate array is specified, TYPE, STRIDE, and POINTER are
7155 saved as client-side state, in addition to the current vertex array
7156 buffer object binding.
7158 To enable and disable the fog coordinate array, call
7159 `glEnableClientState' and `glDisableClientState' with the argument
7160 `GL_FOG_COORD_ARRAY'. If enabled, the fog coordinate array is used when
7161 `glDrawArrays', `glMultiDrawArrays', `glDrawElements',
7162 `glMultiDrawElements', `glDrawRangeElements', or `glArrayElement' is
7165 `GL_INVALID_ENUM' is generated if TYPE is not either `GL_FLOAT' or
7168 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
7170 (define-gl-procedures
7171 ((glFogCoordf (coord GLfloat) -> void))
7172 "Set the current fog coordinates.
7175 Specify the fog distance.
7177 `glFogCoord' specifies the fog coordinate that is associated with each
7178 vertex and the current raster position. The value specified is
7179 interpolated and used in computing the fog color (see `glFog').")
7181 (define-gl-procedures
7182 ((glFogf (pname GLenum) (param GLfloat) -> void)
7183 (glFogi (pname GLenum) (param GLint) -> void))
7184 "Specify fog parameters.
7187 Specifies a single-valued fog parameter. `GL_FOG_MODE',
7188 `GL_FOG_DENSITY', `GL_FOG_START', `GL_FOG_END', `GL_FOG_INDEX', and
7189 `GL_FOG_COORD_SRC' are accepted.
7192 Specifies the value that PNAME will be set to.
7194 Fog is initially disabled. While enabled, fog affects rasterized
7195 geometry, bitmaps, and pixel blocks, but not buffer clear operations. To
7196 enable and disable fog, call `glEnable' and `glDisable' with argument
7199 `glFog' assigns the value or values in PARAMS to the fog parameter
7200 specified by PNAME. The following values are accepted for PNAME:
7203 PARAMS is a single integer or floating-point value that specifies
7204 the equation to be used to compute the fog blend factor, F . Three
7205 symbolic constants are accepted: `GL_LINEAR', `GL_EXP', and
7206 `GL_EXP2'. The equations corresponding to these symbolic constants
7207 are defined below. The initial fog mode is `GL_EXP'.
7210 PARAMS is a single integer or floating-point value that specifies
7211 DENSITY , the fog density used in both exponential fog equations.
7212 Only nonnegative densities are accepted. The initial fog density is
7216 PARAMS is a single integer or floating-point value that specifies
7217 START , the near distance used in the linear fog equation. The
7218 initial near distance is 0.
7221 PARAMS is a single integer or floating-point value that specifies
7222 END , the far distance used in the linear fog equation. The initial
7226 PARAMS is a single integer or floating-point value that specifies
7227 I_F , the fog color index. The initial fog index is 0.
7230 PARAMS contains four integer or floating-point values that specify
7231 C_F , the fog color. Integer values are mapped linearly such that
7232 the most positive representable value maps to 1.0, and the most
7233 negative representable value maps to -1.0 . Floating-point values
7234 are mapped directly. After conversion, all color components are
7235 clamped to the range [0,1] . The initial fog color is (0, 0, 0, 0).
7238 PARAMS contains either of the following symbolic constants:
7239 `GL_FOG_COORD' or `GL_FRAGMENT_DEPTH'. `GL_FOG_COORD' specifies
7240 that the current fog coordinate should be used as distance value in
7241 the fog color computation. `GL_FRAGMENT_DEPTH' specifies that the
7242 current fragment depth should be used as distance value in the fog
7245 Fog blends a fog color with each rasterized pixel fragment's
7246 post-texturing color using a blending factor F . Factor F is computed in
7247 one of three ways, depending on the fog mode. Let C be either the
7248 distance in eye coordinate from the origin (in the case that the
7249 `GL_FOG_COORD_SRC' is `GL_FRAGMENT_DEPTH') or the current fog coordinate
7250 (in the case that `GL_FOG_COORD_SRC' is `GL_FOG_COORD'). The equation
7251 for `GL_LINEAR' fog is F=END-C,/END-START,
7253 The equation for `GL_EXP' fog is F=E^-(DENSITY·C,),
7255 The equation for `GL_EXP2' fog is F=E^-(DENSITY·C,),^2
7257 Regardless of the fog mode, F is clamped to the range [0,1] after it is
7258 computed. Then, if the GL is in RGBA color mode, the fragment's red,
7259 green, and blue colors, represented by C_R , are replaced by
7261 C_R,^″=F×C_R+(1-F,)×C_F
7263 Fog does not affect a fragment's alpha component.
7265 In color index mode, the fragment's color index I_R is replaced by
7267 I_R,^″=I_R+(1-F,)×I_F
7271 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value, or if
7272 PNAME is `GL_FOG_MODE' and PARAMS is not an accepted value.
7274 `GL_INVALID_VALUE' is generated if PNAME is `GL_FOG_DENSITY' and PARAMS
7277 `GL_INVALID_OPERATION' is generated if `glFog' is executed between the
7278 execution of `glBegin' and the corresponding execution of `glEnd'.")
7280 (define-gl-procedures
7281 ((glFrontFace (mode GLenum) -> void))
7282 "Define front- and back-facing polygons.
7285 Specifies the orientation of front-facing polygons. `GL_CW' and
7286 `GL_CCW' are accepted. The initial value is `GL_CCW'.
7288 In a scene composed entirely of opaque closed surfaces, back-facing
7289 polygons are never visible. Eliminating these invisible polygons has the
7290 obvious benefit of speeding up the rendering of the image. To enable and
7291 disable elimination of back-facing polygons, call `glEnable' and
7292 `glDisable' with argument `GL_CULL_FACE'.
7294 The projection of a polygon to window coordinates is said to have
7295 clockwise winding if an imaginary object following the path from its
7296 first vertex, its second vertex, and so on, to its last vertex, and
7297 finally back to its first vertex, moves in a clockwise direction about
7298 the interior of the polygon. The polygon's winding is said to be
7299 counterclockwise if the imaginary object following the same path moves
7300 in a counterclockwise direction about the interior of the polygon.
7301 `glFrontFace' specifies whether polygons with clockwise winding in
7302 window coordinates, or counterclockwise winding in window coordinates,
7303 are taken to be front-facing. Passing `GL_CCW' to MODE selects
7304 counterclockwise polygons as front-facing; `GL_CW' selects clockwise
7305 polygons as front-facing. By default, counterclockwise polygons are
7306 taken to be front-facing.
7308 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
7310 `GL_INVALID_OPERATION' is generated if `glFrontFace' is executed between
7311 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7313 (define-gl-procedures
7323 "Multiply the current matrix by a perspective matrix.
7328 Specify the coordinates for the left and right vertical clipping
7334 Specify the coordinates for the bottom and top horizontal clipping
7340 Specify the distances to the near and far depth clipping planes.
7341 Both distances must be positive.
7343 `glFrustum' describes a perspective matrix that produces a perspective
7344 projection. The current matrix (see `glMatrixMode') is multiplied by
7345 this matrix and the result replaces the current matrix, as if
7346 `glMultMatrix' were called with the following matrix as its argument:
7350 [(2\u2062NEARVAL,/RIGHT-LEFT,, 0 A 0), (0 2\u2062NEARVAL,/TOP-BOTTOM,, B 0), (0 0
7353 A=RIGHT+LEFT,/RIGHT-LEFT,
7355 B=TOP+BOTTOM,/TOP-BOTTOM,
7357 C=-FARVAL+NEARVAL,/FARVAL-NEARVAL,,
7359 D=-2\u2062FARVAL\u2062NEARVAL,/FARVAL-NEARVAL,,
7363 Typically, the matrix mode is `GL_PROJECTION', and (LEFT,BOTTOM-NEARVAL)
7364 and (RIGHT,TOP-NEARVAL) specify the points on the near clipping plane
7365 that are mapped to the lower left and upper right corners of the window,
7366 assuming that the eye is located at (0, 0, 0). -FARVAL specifies the
7367 location of the far clipping plane. Both NEARVAL and FARVAL must be
7370 Use `glPushMatrix' and `glPopMatrix' to save and restore the current
7373 `GL_INVALID_VALUE' is generated if NEARVAL or FARVAL is not positive, or
7374 if LEFT = RIGHT, or BOTTOM = TOP, or NEAR = FAR.
7376 `GL_INVALID_OPERATION' is generated if `glFrustum' is executed between
7377 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7379 (define-gl-procedures
7385 "Generate buffer object names.
7388 Specifies the number of buffer object names to be generated.
7391 Specifies an array in which the generated buffer object names are
7394 `glGenBuffers' returns N buffer object names in BUFFERS. There is no
7395 guarantee that the names form a contiguous set of integers; however, it
7396 is guaranteed that none of the returned names was in use immediately
7397 before the call to `glGenBuffers'.
7399 Buffer object names returned by a call to `glGenBuffers' are not
7400 returned by subsequent calls, unless they are first deleted with
7403 No buffer objects are associated with the returned buffer object names
7404 until they are first bound by calling `glBindBuffer'.
7406 `GL_INVALID_VALUE' is generated if N is negative.
7408 `GL_INVALID_OPERATION' is generated if `glGenBuffers' is executed
7409 between the execution of `glBegin' and the corresponding execution of
7412 (define-gl-procedures
7413 ((glGenLists (range GLsizei) -> GLuint))
7414 "Generate a contiguous set of empty display lists.
7417 Specifies the number of contiguous empty display lists to be
7420 `glGenLists' has one argument, RANGE. It returns an integer N such that
7421 RANGE contiguous empty display lists, named N , N+1 , ... , N+RANGE-1 ,
7422 are created. If RANGE is 0, if there is no group of RANGE contiguous
7423 names available, or if any error is generated, no display lists are
7424 generated, and 0 is returned.
7426 `GL_INVALID_VALUE' is generated if RANGE is negative.
7428 `GL_INVALID_OPERATION' is generated if `glGenLists' is executed between
7429 the execution of `glBegin' and the corresponding execution of `glEnd'.")
7431 (define-gl-procedures
7432 ((glGenQueries (n GLsizei) (ids GLuint-*) -> void))
7433 "Generate query object names.
7436 Specifies the number of query object names to be generated.
7439 Specifies an array in which the generated query object names are
7442 `glGenQueries' returns N query object names in IDS. There is no
7443 guarantee that the names form a contiguous set of integers; however, it
7444 is guaranteed that none of the returned names was in use immediately
7445 before the call to `glGenQueries'.
7447 Query object names returned by a call to `glGenQueries' are not returned
7448 by subsequent calls, unless they are first deleted with
7451 No query objects are associated with the returned query object names
7452 until they are first used by calling `glBeginQuery'.
7454 `GL_INVALID_VALUE' is generated if N is negative.
7456 `GL_INVALID_OPERATION' is generated if `glGenQueries' is executed
7457 between the execution of `glBegin' and the corresponding execution of
7460 (define-gl-procedures
7466 "Generate texture names.
7469 Specifies the number of texture names to be generated.
7472 Specifies an array in which the generated texture names are stored.
7474 `glGenTextures' returns N texture names in TEXTURES. There is no
7475 guarantee that the names form a contiguous set of integers; however, it
7476 is guaranteed that none of the returned names was in use immediately
7477 before the call to `glGenTextures'.
7479 The generated textures have no dimensionality; they assume the
7480 dimensionality of the texture target to which they are first bound (see
7483 Texture names returned by a call to `glGenTextures' are not returned by
7484 subsequent calls, unless they are first deleted with `glDeleteTextures'.
7486 `GL_INVALID_VALUE' is generated if N is negative.
7488 `GL_INVALID_OPERATION' is generated if `glGenTextures' is executed
7489 between the execution of `glBegin' and the corresponding execution of
7492 (define-gl-procedures
7503 "Returns information about an active attribute variable for the specified
7507 Specifies the program object to be queried.
7510 Specifies the index of the attribute variable to be queried.
7513 Specifies the maximum number of characters OpenGL is allowed to
7514 write in the character buffer indicated by NAME.
7517 Returns the number of characters actually written by OpenGL in the
7518 string indicated by NAME (excluding the null terminator) if a value
7519 other than `NULL' is passed.
7522 Returns the size of the attribute variable.
7525 Returns the data type of the attribute variable.
7528 Returns a null terminated string containing the name of the
7531 `glGetActiveAttrib' returns information about an active attribute
7532 variable in the program object specified by PROGRAM. The number of
7533 active attributes can be obtained by calling `glGetProgram' with the
7534 value `GL_ACTIVE_ATTRIBUTES'. A value of 0 for INDEX selects the first
7535 active attribute variable. Permissible values for INDEX range from 0 to
7536 the number of active attribute variables minus 1.
7538 A vertex shader may use either built-in attribute variables,
7539 user-defined attribute variables, or both. Built-in attribute variables
7540 have a prefix of \"gl_\" and reference conventional OpenGL vertex
7541 attribtes (e.g., GL_VERTEX, GL_NORMAL, etc., see the OpenGL Shading
7542 Language specification for a complete list.) User-defined attribute
7543 variables have arbitrary names and obtain their values through numbered
7544 generic vertex attributes. An attribute variable (either built-in or
7545 user-defined) is considered active if it is determined during the link
7546 operation that it may be accessed during program execution. Therefore,
7547 PROGRAM should have previously been the target of a call to
7548 `glLinkProgram', but it is not necessary for it to have been linked
7551 The size of the character buffer required to store the longest attribute
7552 variable name in PROGRAM can be obtained by calling `glGetProgram' with
7553 the value `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH'. This value should be used to
7554 allocate a buffer of sufficient size to store the returned attribute
7555 name. The size of this character buffer is passed in BUFSIZE, and a
7556 pointer to this character buffer is passed in NAME.
7558 `glGetActiveAttrib' returns the name of the attribute variable indicated
7559 by INDEX, storing it in the character buffer specified by NAME. The
7560 string returned will be null terminated. The actual number of characters
7561 written into this buffer is returned in LENGTH, and this count does not
7562 include the null termination character. If the length of the returned
7563 string is not required, a value of `NULL' can be passed in the LENGTH
7566 The TYPE argument will return a pointer to the attribute variable's data
7567 type. The symbolic constants `GL_FLOAT', `GL_FLOAT_VEC2',
7568 `GL_FLOAT_VEC3', `GL_FLOAT_VEC4', `GL_FLOAT_MAT2', `GL_FLOAT_MAT3',
7569 `GL_FLOAT_MAT4', `GL_FLOAT_MAT2x3', `GL_FLOAT_MAT2x4',
7570 `GL_FLOAT_MAT3x2', `GL_FLOAT_MAT3x4', `GL_FLOAT_MAT4x2', or
7571 `GL_FLOAT_MAT4x3' may be returned. The SIZE argument will return the
7572 size of the attribute, in units of the type returned in TYPE.
7574 The list of active attribute variables may include both built-in
7575 attribute variables (which begin with the prefix \"gl_\") as well as
7576 user-defined attribute variable names.
7578 This function will return as much information as it can about the
7579 specified active attribute variable. If no information is available,
7580 LENGTH will be 0, and NAME will be an empty string. This situation could
7581 occur if this function is called after a link operation that failed. If
7582 an error occurs, the return values LENGTH, SIZE, TYPE, and NAME will be
7585 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
7588 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
7590 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to the
7591 number of active attribute variables in PROGRAM.
7593 `GL_INVALID_OPERATION' is generated if `glGetActiveAttrib' is executed
7594 between the execution of `glBegin' and the corresponding execution of
7597 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.")
7599 (define-gl-procedures
7600 ((glGetActiveUniform
7610 "Returns information about an active uniform variable for the specified
7614 Specifies the program object to be queried.
7617 Specifies the index of the uniform variable to be queried.
7620 Specifies the maximum number of characters OpenGL is allowed to
7621 write in the character buffer indicated by NAME.
7624 Returns the number of characters actually written by OpenGL in the
7625 string indicated by NAME (excluding the null terminator) if a value
7626 other than `NULL' is passed.
7629 Returns the size of the uniform variable.
7632 Returns the data type of the uniform variable.
7635 Returns a null terminated string containing the name of the uniform
7638 `glGetActiveUniform' returns information about an active uniform
7639 variable in the program object specified by PROGRAM. The number of
7640 active uniform variables can be obtained by calling `glGetProgram' with
7641 the value `GL_ACTIVE_UNIFORMS'. A value of 0 for INDEX selects the first
7642 active uniform variable. Permissible values for INDEX range from 0 to
7643 the number of active uniform variables minus 1.
7645 Shaders may use either built-in uniform variables, user-defined uniform
7646 variables, or both. Built-in uniform variables have a prefix of \"gl_\"
7647 and reference existing OpenGL state or values derived from such state
7648 (e.g., GL_FOG, GL_MODELVIEWMATRIX, etc., see the OpenGL Shading Language
7649 specification for a complete list.) User-defined uniform variables have
7650 arbitrary names and obtain their values from the application through
7651 calls to `glUniform'. A uniform variable (either built-in or
7652 user-defined) is considered active if it is determined during the link
7653 operation that it may be accessed during program execution. Therefore,
7654 PROGRAM should have previously been the target of a call to
7655 `glLinkProgram', but it is not necessary for it to have been linked
7658 The size of the character buffer required to store the longest uniform
7659 variable name in PROGRAM can be obtained by calling `glGetProgram' with
7660 the value `GL_ACTIVE_UNIFORM_MAX_LENGTH'. This value should be used to
7661 allocate a buffer of sufficient size to store the returned uniform
7662 variable name. The size of this character buffer is passed in BUFSIZE,
7663 and a pointer to this character buffer is passed in NAME.
7665 `glGetActiveUniform' returns the name of the uniform variable indicated
7666 by INDEX, storing it in the character buffer specified by NAME. The
7667 string returned will be null terminated. The actual number of characters
7668 written into this buffer is returned in LENGTH, and this count does not
7669 include the null termination character. If the length of the returned
7670 string is not required, a value of `NULL' can be passed in the LENGTH
7673 The TYPE argument will return a pointer to the uniform variable's data
7674 type. The symbolic constants `GL_FLOAT', `GL_FLOAT_VEC2',
7675 `GL_FLOAT_VEC3', `GL_FLOAT_VEC4', `GL_INT', `GL_INT_VEC2',
7676 `GL_INT_VEC3', `GL_INT_VEC4', `GL_BOOL', `GL_BOOL_VEC2', `GL_BOOL_VEC3',
7677 `GL_BOOL_VEC4', `GL_FLOAT_MAT2', `GL_FLOAT_MAT3', `GL_FLOAT_MAT4',
7678 `GL_FLOAT_MAT2x3', `GL_FLOAT_MAT2x4', `GL_FLOAT_MAT3x2',
7679 `GL_FLOAT_MAT3x4', `GL_FLOAT_MAT4x2', `GL_FLOAT_MAT4x3',
7680 `GL_SAMPLER_1D', `GL_SAMPLER_2D', `GL_SAMPLER_3D', `GL_SAMPLER_CUBE',
7681 `GL_SAMPLER_1D_SHADOW', or `GL_SAMPLER_2D_SHADOW' may be returned.
7683 If one or more elements of an array are active, the name of the array is
7684 returned in NAME, the type is returned in TYPE, and the SIZE parameter
7685 returns the highest array element index used, plus one, as determined by
7686 the compiler and/or linker. Only one active uniform variable will be
7687 reported for a uniform array.
7689 Uniform variables that are declared as structures or arrays of
7690 structures will not be returned directly by this function. Instead, each
7691 of these uniform variables will be reduced to its fundamental components
7692 containing the \".\" and \"[]\" operators such that each of the names is
7693 valid as an argument to `glGetUniformLocation'. Each of these reduced
7694 uniform variables is counted as one active uniform variable and is
7695 assigned an index. A valid name cannot be a structure, an array of
7696 structures, or a subcomponent of a vector or matrix.
7698 The size of the uniform variable will be returned in SIZE. Uniform
7699 variables other than arrays will have a size of 1. Structures and arrays
7700 of structures will be reduced as described earlier, such that each of
7701 the names returned will be a data type in the earlier list. If this
7702 reduction results in an array, the size returned will be as described
7703 for uniform arrays; otherwise, the size returned will be 1.
7705 The list of active uniform variables may include both built-in uniform
7706 variables (which begin with the prefix \"gl_\") as well as user-defined
7707 uniform variable names.
7709 This function will return as much information as it can about the
7710 specified active uniform variable. If no information is available,
7711 LENGTH will be 0, and NAME will be an empty string. This situation could
7712 occur if this function is called after a link operation that failed. If
7713 an error occurs, the return values LENGTH, SIZE, TYPE, and NAME will be
7716 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
7719 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
7721 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to the
7722 number of active uniform variables in PROGRAM.
7724 `GL_INVALID_OPERATION' is generated if `glGetActiveUniform' is executed
7725 between the execution of `glBegin' and the corresponding execution of
7728 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.")
7730 (define-gl-procedures
7731 ((glGetAttachedShaders
7738 "Returns the handles of the shader objects attached to a program object.
7741 Specifies the program object to be queried.
7744 Specifies the size of the array for storing the returned object
7748 Returns the number of names actually returned in OBJECTS.
7751 Specifies an array that is used to return the names of attached
7754 `glGetAttachedShaders' returns the names of the shader objects attached
7755 to PROGRAM. The names of shader objects that are attached to PROGRAM
7756 will be returned in SHADERS. The actual number of shader names written
7757 into SHADERS is returned in COUNT. If no shader objects are attached to
7758 PROGRAM, COUNT is set to 0. The maximum number of shader names that may
7759 be returned in SHADERS is specified by MAXCOUNT.
7761 If the number of names actually returned is not required (for instance,
7762 if it has just been obtained by calling `glGetProgram'), a value of
7763 `NULL' may be passed for count. If no shader objects are attached to
7764 PROGRAM, a value of 0 will be returned in COUNT. The actual number of
7765 attached shaders can be obtained by calling `glGetProgram' with the
7766 value `GL_ATTACHED_SHADERS'.
7768 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
7771 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
7773 `GL_INVALID_VALUE' is generated if MAXCOUNT is less than 0.
7775 `GL_INVALID_OPERATION' is generated if `glGetAttachedShaders' is
7776 executed between the execution of `glBegin' and the corresponding
7777 execution of `glEnd'.")
7779 (define-gl-procedures
7780 ((glGetAttribLocation
7782 (name const-GLchar-*)
7785 "Returns the location of an attribute variable.
7788 Specifies the program object to be queried.
7791 Points to a null terminated string containing the name of the
7792 attribute variable whose location is to be queried.
7794 `glGetAttribLocation' queries the previously linked program object
7795 specified by PROGRAM for the attribute variable specified by NAME and
7796 returns the index of the generic vertex attribute that is bound to that
7797 attribute variable. If NAME is a matrix attribute variable, the index of
7798 the first column of the matrix is returned. If the named attribute
7799 variable is not an active attribute in the specified program object or
7800 if NAME starts with the reserved prefix \"gl_\", a value of -1 is
7803 The association between an attribute variable name and a generic
7804 attribute index can be specified at any time by calling
7805 `glBindAttribLocation'. Attribute bindings do not go into effect until
7806 `glLinkProgram' is called. After a program object has been linked
7807 successfully, the index values for attribute variables remain fixed
7808 until the next link command occurs. The attribute values can only be
7809 queried after a link if the link was successful. `glGetAttribLocation'
7810 returns the binding that actually went into effect the last time
7811 `glLinkProgram' was called for the specified program object. Attribute
7812 bindings that have been specified since the last link operation are not
7813 returned by `glGetAttribLocation'.
7815 `GL_INVALID_OPERATION' is generated if PROGRAM is not a value generated
7818 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
7820 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
7823 `GL_INVALID_OPERATION' is generated if `glGetAttribLocation' is executed
7824 between the execution of `glBegin' and the corresponding execution of
7827 (define-gl-procedures
7828 ((glGetBufferParameteriv
7834 "Return parameters of a buffer object.
7837 Specifies the target buffer object. The symbolic constant must be
7838 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
7839 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
7842 Specifies the symbolic name of a buffer object parameter. Accepted
7843 values are `GL_BUFFER_ACCESS', `GL_BUFFER_MAPPED',
7844 `GL_BUFFER_SIZE', or `GL_BUFFER_USAGE'.
7847 Returns the requested parameter.
7849 `glGetBufferParameteriv' returns in DATA a selected parameter of the
7850 buffer object specified by TARGET.
7852 VALUE names a specific buffer object parameter, as follows:
7855 PARAMS returns the access policy set while mapping the buffer
7856 object. The initial value is `GL_READ_WRITE'.
7859 PARAMS returns a flag indicating whether the buffer object is
7860 currently mapped. The initial value is `GL_FALSE'.
7863 PARAMS returns the size of the buffer object, measured in bytes.
7864 The initial value is 0.
7867 PARAMS returns the buffer object's usage pattern. The initial value
7868 is `GL_STATIC_DRAW'.
7870 `GL_INVALID_ENUM' is generated if TARGET or VALUE is not an accepted
7873 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
7876 `GL_INVALID_OPERATION' is generated if `glGetBufferParameteriv' is
7877 executed between the execution of `glBegin' and the corresponding
7878 execution of `glEnd'.")
7880 (define-gl-procedures
7881 ((glGetBufferPointerv
7887 "Return the pointer to a mapped buffer object's data store.
7890 Specifies the target buffer object. The symbolic constant must be
7891 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
7892 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
7895 Specifies the pointer to be returned. The symbolic constant must be
7896 `GL_BUFFER_MAP_POINTER'.
7899 Returns the pointer value specified by PNAME.
7901 `glGetBufferPointerv' returns pointer information. PNAME is a symbolic
7902 constant indicating the pointer to be returned, which must be
7903 `GL_BUFFER_MAP_POINTER', the pointer to which the buffer object's data
7904 store is mapped. If the data store is not currently mapped, `NULL' is
7905 returned. PARAMS is a pointer to a location in which to place the
7906 returned pointer value.
7908 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
7911 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
7914 `GL_INVALID_OPERATION' is generated if `glGetBufferPointerv' is executed
7915 between the execution of `glBegin' and the corresponding execution of
7918 (define-gl-procedures
7919 ((glGetBufferSubData
7926 "Returns a subset of a buffer object's data store.
7929 Specifies the target buffer object. The symbolic constant must be
7930 `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
7931 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
7934 Specifies the offset into the buffer object's data store from which
7935 data will be returned, measured in bytes.
7938 Specifies the size in bytes of the data store region being
7942 Specifies a pointer to the location where buffer object data is
7945 `glGetBufferSubData' returns some or all of the data from the buffer
7946 object currently bound to TARGET. Data starting at byte offset OFFSET
7947 and extending for SIZE bytes is copied from the data store to the memory
7948 pointed to by DATA. An error is thrown if the buffer object is currently
7949 mapped, or if OFFSET and SIZE together define a range beyond the bounds
7950 of the buffer object's data store.
7952 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
7953 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
7954 `GL_PIXEL_UNPACK_BUFFER'.
7956 `GL_INVALID_VALUE' is generated if OFFSET or SIZE is negative, or if
7957 together they define a region of memory that extends beyond the buffer
7958 object's allocated data store.
7960 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
7963 `GL_INVALID_OPERATION' is generated if the buffer object being queried
7966 `GL_INVALID_OPERATION' is generated if `glGetBufferSubData' is executed
7967 between the execution of `glBegin' and the corresponding execution of
7970 (define-gl-procedures
7973 (equation GLdouble-*)
7976 "Return the coefficients of the specified clipping plane.
7979 Specifies a clipping plane. The number of clipping planes depends
7980 on the implementation, but at least six clipping planes are
7981 supported. They are identified by symbolic names of the form
7982 `GL_CLIP_PLANE' I where i ranges from 0 to the value of
7983 `GL_MAX_CLIP_PLANES' - 1.
7986 Returns four double-precision values that are the coefficients of
7987 the plane equation of PLANE in eye coordinates. The initial value
7990 `glGetClipPlane' returns in EQUATION the four coefficients of the plane
7993 `GL_INVALID_ENUM' is generated if PLANE is not an accepted value.
7995 `GL_INVALID_OPERATION' is generated if `glGetClipPlane' is executed
7996 between the execution of `glBegin' and the corresponding execution of
7999 (define-gl-procedures
8000 ((glGetColorTableParameterfv
8006 (glGetColorTableParameteriv
8012 "Get color lookup table parameters.
8015 The target color table. Must be `GL_COLOR_TABLE',
8016 `GL_POST_CONVOLUTION_COLOR_TABLE',
8017 `GL_POST_COLOR_MATRIX_COLOR_TABLE', `GL_PROXY_COLOR_TABLE',
8018 `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
8019 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
8022 The symbolic name of a color lookup table parameter. Must be one of
8023 `GL_COLOR_TABLE_BIAS', `GL_COLOR_TABLE_SCALE',
8024 `GL_COLOR_TABLE_FORMAT', `GL_COLOR_TABLE_WIDTH',
8025 `GL_COLOR_TABLE_RED_SIZE', `GL_COLOR_TABLE_GREEN_SIZE',
8026 `GL_COLOR_TABLE_BLUE_SIZE', `GL_COLOR_TABLE_ALPHA_SIZE',
8027 `GL_COLOR_TABLE_LUMINANCE_SIZE', or
8028 `GL_COLOR_TABLE_INTENSITY_SIZE'.
8031 A pointer to an array where the values of the parameter will be
8034 Returns parameters specific to color table TARGET.
8036 When PNAME is set to `GL_COLOR_TABLE_SCALE' or `GL_COLOR_TABLE_BIAS',
8037 `glGetColorTableParameter' returns the color table scale or bias
8038 parameters for the table specified by TARGET. For these queries, TARGET
8039 must be set to `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
8040 `GL_POST_COLOR_MATRIX_COLOR_TABLE' and PARAMS points to an array of four
8041 elements, which receive the scale or bias factors for red, green, blue,
8042 and alpha, in that order.
8044 `glGetColorTableParameter' can also be used to retrieve the format and
8045 size parameters for a color table. For these queries, set TARGET to
8046 either the color table target or the proxy color table target. The
8047 format and size parameters are set by `glColorTable'.
8049 The following table lists the format and size parameters that may be
8050 queried. For each symbolic constant listed below for PNAME, PARAMS must
8051 point to an array of the given length and receive the values indicated.
8058 `GL_COLOR_TABLE_FORMAT'
8059 1 , Internal format (e.g., `GL_RGBA')
8061 `GL_COLOR_TABLE_WIDTH'
8062 1 , Number of elements in table
8064 `GL_COLOR_TABLE_RED_SIZE'
8065 1 , Size of red component, in bits
8067 `GL_COLOR_TABLE_GREEN_SIZE'
8068 1 , Size of green component
8070 `GL_COLOR_TABLE_BLUE_SIZE'
8071 1 , Size of blue component
8073 `GL_COLOR_TABLE_ALPHA_SIZE'
8074 1 , Size of alpha component
8076 `GL_COLOR_TABLE_LUMINANCE_SIZE'
8077 1 , Size of luminance component
8079 `GL_COLOR_TABLE_INTENSITY_SIZE'
8080 1 , Size of intensity component
8084 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an acceptable
8087 `GL_INVALID_OPERATION' is generated if `glGetColorTableParameter' is
8088 executed between the execution of `glBegin' and the corresponding
8089 execution of `glEnd'.")
8091 (define-gl-procedures
8099 "Retrieve contents of a color lookup table.
8102 Must be `GL_COLOR_TABLE', `GL_POST_CONVOLUTION_COLOR_TABLE', or
8103 `GL_POST_COLOR_MATRIX_COLOR_TABLE'.
8106 The format of the pixel data in TABLE. The possible values are
8107 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_LUMINANCE',
8108 `GL_LUMINANCE_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', and `GL_BGRA'.
8111 The type of the pixel data in TABLE. Symbolic constants
8112 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8113 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
8114 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8115 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
8116 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8117 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8118 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8119 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
8123 Pointer to a one-dimensional array of pixel data containing the
8124 contents of the color table.
8126 `glGetColorTable' returns in TABLE the contents of the color table
8127 specified by TARGET. No pixel transfer operations are performed, but
8128 pixel storage modes that are applicable to `glReadPixels' are performed.
8130 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8131 target (see `glBindBuffer') while a histogram table is requested, TABLE
8132 is treated as a byte offset into the buffer object's data store.
8134 Color components that are requested in the specified FORMAT, but which
8135 are not included in the internal format of the color lookup table, are
8136 returned as zero. The assignments of internal color components to the
8137 components requested by FORMAT are
8139 *Internal Component*
8140 *Resulting Component*
8162 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8165 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
8168 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
8171 `GL_INVALID_OPERATION' is generated if TYPE is one of
8172 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8173 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
8176 `GL_INVALID_OPERATION' is generated if TYPE is one of
8177 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8178 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8179 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8180 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
8181 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
8183 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8184 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8185 store is currently mapped.
8187 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8188 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8189 to the buffer object such that the memory writes required would exceed
8190 the data store size.
8192 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8193 bound to the `GL_PIXEL_PACK_BUFFER' target and TABLE is not evenly
8194 divisible into the number of bytes needed to store in memory a datum
8197 `GL_INVALID_OPERATION' is generated if `glGetColorTable' is executed
8198 between the execution of `glBegin' and the corresponding execution of
8201 (define-gl-procedures
8202 ((glGetCompressedTexImage
8208 "Return a compressed texture image.
8211 Specifies which texture is to be obtained. `GL_TEXTURE_1D',
8212 `GL_TEXTURE_2D', and
8213 `GL_TEXTURE_3D'`GL_TEXTURE_CUBE_MAP_POSITIVE_X',
8214 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
8215 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
8216 and `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z' are accepted.
8219 Specifies the level-of-detail number of the desired image. Level 0
8220 is the base image level. Level N is the N th mipmap reduction
8224 Returns the compressed texture image.
8226 `glGetCompressedTexImage' returns the compressed texture image
8227 associated with TARGET and LOD into IMG. IMG should be an array of
8228 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' bytes. TARGET specifies whether the
8229 desired texture image was one specified by `glTexImage1D'
8230 (`GL_TEXTURE_1D'), `glTexImage2D' (`GL_TEXTURE_2D' or any of
8231 `GL_TEXTURE_CUBE_MAP_*'), or `glTexImage3D' (`GL_TEXTURE_3D'). LOD
8232 specifies the level-of-detail number of the desired image.
8234 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8235 target (see `glBindBuffer') while a texture image is requested, IMG is
8236 treated as a byte offset into the buffer object's data store.
8238 To minimize errors, first verify that the texture is compressed by
8239 calling `glGetTexLevelParameter' with argument `GL_TEXTURE_COMPRESSED'.
8240 If the texture is compressed, then determine the amount of memory
8241 required to store the compressed texture by calling
8242 `glGetTexLevelParameter' with argument
8243 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE'. Finally, retrieve the internal
8244 format of the texture by calling `glGetTexLevelParameter' with argument
8245 `GL_TEXTURE_INTERNAL_FORMAT'. To store the texture for later use,
8246 associate the internal format and size with the retrieved texture image.
8247 These data can be used by the respective texture or subtexture loading
8248 routine used for loading TARGET textures.
8250 `GL_INVALID_VALUE' is generated if LOD is less than zero or greater than
8251 the maximum number of LODs permitted by the implementation.
8253 `GL_INVALID_OPERATION' is generated if `glGetCompressedTexImage' is used
8254 to retrieve a texture that is in an uncompressed internal format.
8256 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8257 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8258 store is currently mapped.
8260 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8261 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8262 to the buffer object such that the memory writes required would exceed
8263 the data store size.
8265 `GL_INVALID_OPERATION' is generated if `glGetCompressedTexImage' is
8266 executed between the execution of `glBegin' and the corresponding
8267 execution of `glEnd'.")
8269 (define-gl-procedures
8270 ((glGetConvolutionFilter
8277 "Get current 1D or 2D convolution filter kernel.
8280 The filter to be retrieved. Must be one of `GL_CONVOLUTION_1D' or
8281 `GL_CONVOLUTION_2D'.
8284 Format of the output image. Must be one of `GL_RED', `GL_GREEN',
8285 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
8286 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
8289 Data type of components in the output image. Symbolic constants
8290 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8291 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
8292 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8293 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
8294 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8295 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8296 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8297 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
8301 Pointer to storage for the output image.
8303 `glGetConvolutionFilter' returns the current 1D or 2D convolution filter
8304 kernel as an image. The one- or two-dimensional image is placed in IMAGE
8305 according to the specifications in FORMAT and TYPE. No pixel transfer
8306 operations are performed on this image, but the relevant pixel storage
8309 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8310 target (see `glBindBuffer') while a convolution filter is requested,
8311 IMAGE is treated as a byte offset into the buffer object's data store.
8313 Color components that are present in FORMAT but not included in the
8314 internal format of the filter are returned as zero. The assignments of
8315 internal color components to the components of FORMAT are as follows.
8317 *Internal Component*
8318 *Resulting Component*
8340 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8343 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
8346 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
8349 `GL_INVALID_OPERATION' is generated if TYPE is one of
8350 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8351 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
8354 `GL_INVALID_OPERATION' is generated if TYPE is one of
8355 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8356 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8357 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8358 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
8359 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
8361 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8362 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8363 store is currently mapped.
8365 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8366 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8367 to the buffer object such that the memory writes required would exceed
8368 the data store size.
8370 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8371 bound to the `GL_PIXEL_PACK_BUFFER' target and IMAGE is not evenly
8372 divisible into the number of bytes needed to store in memory a datum
8375 `GL_INVALID_OPERATION' is generated if `glGetConvolutionFilter' is
8376 executed between the execution of `glBegin' and the corresponding
8377 execution of `glEnd'.")
8379 (define-gl-procedures
8380 ((glGetConvolutionParameterfv
8386 (glGetConvolutionParameteriv
8392 "Get convolution parameters.
8395 The filter whose parameters are to be retrieved. Must be one of
8396 `GL_CONVOLUTION_1D', `GL_CONVOLUTION_2D', or `GL_SEPARABLE_2D'.
8399 The parameter to be retrieved. Must be one of
8400 `GL_CONVOLUTION_BORDER_MODE', `GL_CONVOLUTION_BORDER_COLOR',
8401 `GL_CONVOLUTION_FILTER_SCALE', `GL_CONVOLUTION_FILTER_BIAS',
8402 `GL_CONVOLUTION_FORMAT', `GL_CONVOLUTION_WIDTH',
8403 `GL_CONVOLUTION_HEIGHT', `GL_MAX_CONVOLUTION_WIDTH', or
8404 `GL_MAX_CONVOLUTION_HEIGHT'.
8407 Pointer to storage for the parameters to be retrieved.
8409 `glGetConvolutionParameter' retrieves convolution parameters. TARGET
8410 determines which convolution filter is queried. PNAME determines which
8411 parameter is returned:
8413 `GL_CONVOLUTION_BORDER_MODE'
8416 The convolution border mode. See `glConvolutionParameter' for a
8417 list of border modes.
8419 `GL_CONVOLUTION_BORDER_COLOR'
8422 The current convolution border color. PARAMS must be a pointer to
8423 an array of four elements, which will receive the red, green, blue,
8424 and alpha border colors.
8426 `GL_CONVOLUTION_FILTER_SCALE'
8429 The current filter scale factors. PARAMS must be a pointer to an
8430 array of four elements, which will receive the red, green, blue,
8431 and alpha filter scale factors in that order.
8433 `GL_CONVOLUTION_FILTER_BIAS'
8436 The current filter bias factors. PARAMS must be a pointer to an
8437 array of four elements, which will receive the red, green, blue,
8438 and alpha filter bias terms in that order.
8440 `GL_CONVOLUTION_FORMAT'
8443 The current internal format. See `glConvolutionFilter1D',
8444 `glConvolutionFilter2D', and `glSeparableFilter2D' for lists of
8447 `GL_CONVOLUTION_WIDTH'
8450 The current filter image width.
8452 `GL_CONVOLUTION_HEIGHT'
8455 The current filter image height.
8457 `GL_MAX_CONVOLUTION_WIDTH'
8460 The maximum acceptable filter image width.
8462 `GL_MAX_CONVOLUTION_HEIGHT'
8465 The maximum acceptable filter image height.
8467 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8470 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
8473 `GL_INVALID_ENUM' is generated if TARGET is `GL_CONVOLUTION_1D' and
8474 PNAME is `GL_CONVOLUTION_HEIGHT' or `GL_MAX_CONVOLUTION_HEIGHT'.
8476 `GL_INVALID_OPERATION' is generated if `glGetConvolutionParameter' is
8477 executed between the execution of `glBegin' and the corresponding
8478 execution of `glEnd'.")
8480 (define-gl-procedures
8481 ((glGetError -> GLenum))
8482 "Return error information.
8484 `glGetError' returns the value of the error flag. Each detectable error
8485 is assigned a numeric code and symbolic name. When an error occurs, the
8486 error flag is set to the appropriate error code value. No other errors
8487 are recorded until `glGetError' is called, the error code is returned,
8488 and the flag is reset to `GL_NO_ERROR'. If a call to `glGetError'
8489 returns `GL_NO_ERROR', there has been no detectable error since the last
8490 call to `glGetError', or since the GL was initialized.
8492 To allow for distributed implementations, there may be several error
8493 flags. If any single error flag has recorded an error, the value of that
8494 flag is returned and that flag is reset to `GL_NO_ERROR' when
8495 `glGetError' is called. If more than one flag has recorded an error,
8496 `glGetError' returns and clears an arbitrary error flag value. Thus,
8497 `glGetError' should always be called in a loop, until it returns
8498 `GL_NO_ERROR', if all error flags are to be reset.
8500 Initially, all error flags are set to `GL_NO_ERROR'.
8502 The following errors are currently defined:
8505 No error has been recorded. The value of this symbolic constant is
8509 An unacceptable value is specified for an enumerated argument. The
8510 offending command is ignored and has no other side effect than to
8514 A numeric argument is out of range. The offending command is
8515 ignored and has no other side effect than to set the error flag.
8517 `GL_INVALID_OPERATION'
8518 The specified operation is not allowed in the current state. The
8519 offending command is ignored and has no other side effect than to
8523 This command would cause a stack overflow. The offending command is
8524 ignored and has no other side effect than to set the error flag.
8526 `GL_STACK_UNDERFLOW'
8527 This command would cause a stack underflow. The offending command
8528 is ignored and has no other side effect than to set the error flag.
8531 There is not enough memory left to execute the command. The state
8532 of the GL is undefined, except for the state of the error flags,
8533 after this error is recorded.
8535 `GL_TABLE_TOO_LARGE'
8536 The specified table exceeds the implementation's maximum supported
8537 table size. The offending command is ignored and has no other side
8538 effect than to set the error flag.
8540 When an error flag is set, results of a GL operation are undefined only
8541 if `GL_OUT_OF_MEMORY' has occurred. In all other cases, the command
8542 generating the error is ignored and has no effect on the GL state or
8543 frame buffer contents. If the generating command returns a value, it
8544 returns 0. If `glGetError' itself generates an error, it returns 0.
8546 `GL_INVALID_OPERATION' is generated if `glGetError' is executed between
8547 the execution of `glBegin' and the corresponding execution of `glEnd'.
8548 In this case, `glGetError' returns 0.")
8550 (define-gl-procedures
8551 ((glGetHistogramParameterfv
8557 (glGetHistogramParameteriv
8563 "Get histogram parameters.
8566 Must be one of `GL_HISTOGRAM' or `GL_PROXY_HISTOGRAM'.
8569 The name of the parameter to be retrieved. Must be one of
8570 `GL_HISTOGRAM_WIDTH', `GL_HISTOGRAM_FORMAT',
8571 `GL_HISTOGRAM_RED_SIZE', `GL_HISTOGRAM_GREEN_SIZE',
8572 `GL_HISTOGRAM_BLUE_SIZE', `GL_HISTOGRAM_ALPHA_SIZE',
8573 `GL_HISTOGRAM_LUMINANCE_SIZE', or `GL_HISTOGRAM_SINK'.
8576 Pointer to storage for the returned values.
8578 `glGetHistogramParameter' is used to query parameter values for the
8579 current histogram or for a proxy. The histogram state information may be
8580 queried by calling `glGetHistogramParameter' with a TARGET of
8581 `GL_HISTOGRAM' (to obtain information for the current histogram table)
8582 or `GL_PROXY_HISTOGRAM' (to obtain information from the most recent
8583 proxy request) and one of the following values for the PNAME argument:
8590 `GL_HISTOGRAM_WIDTH'
8591 Histogram table width
8593 `GL_HISTOGRAM_FORMAT'
8596 `GL_HISTOGRAM_RED_SIZE'
8597 Red component counter size, in bits
8599 `GL_HISTOGRAM_GREEN_SIZE'
8600 Green component counter size, in bits
8602 `GL_HISTOGRAM_BLUE_SIZE'
8603 Blue component counter size, in bits
8605 `GL_HISTOGRAM_ALPHA_SIZE'
8606 Alpha component counter size, in bits
8608 `GL_HISTOGRAM_LUMINANCE_SIZE'
8609 Luminance component counter size, in bits
8612 Value of the SINK parameter
8616 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
8619 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
8622 `GL_INVALID_OPERATION' is generated if `glGetHistogramParameter' is
8623 executed between the execution of `glBegin' and the corresponding
8624 execution of `glEnd'.")
8626 (define-gl-procedures
8635 "Get histogram table.
8638 Must be `GL_HISTOGRAM'.
8641 If `GL_TRUE', each component counter that is actually returned is
8642 reset to zero. (Other counters are unaffected.) If `GL_FALSE', none
8643 of the counters in the histogram table is modified.
8646 The format of values to be returned in VALUES. Must be one of
8647 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
8648 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
8651 The type of values to be returned in VALUES. Symbolic constants
8652 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
8653 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
8654 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8655 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
8656 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8657 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8658 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8659 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
8663 A pointer to storage for the returned histogram table.
8665 `glGetHistogram' returns the current histogram table as a
8666 one-dimensional image with the same width as the histogram. No pixel
8667 transfer operations are performed on this image, but pixel storage modes
8668 that are applicable to 1D images are honored.
8670 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
8671 target (see `glBindBuffer') while a histogram table is requested, VALUES
8672 is treated as a byte offset into the buffer object's data store.
8674 Color components that are requested in the specified FORMAT, but which
8675 are not included in the internal format of the histogram, are returned
8676 as zero. The assignments of internal color components to the components
8677 requested by FORMAT are:
8679 *Internal Component*
8680 *Resulting Component*
8699 `GL_INVALID_ENUM' is generated if TARGET is not `GL_HISTOGRAM'.
8701 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
8704 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
8707 `GL_INVALID_OPERATION' is generated if TYPE is one of
8708 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
8709 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
8712 `GL_INVALID_OPERATION' is generated if TYPE is one of
8713 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
8714 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
8715 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
8716 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
8717 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
8719 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8720 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
8721 store is currently mapped.
8723 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8724 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
8725 to the buffer object such that the memory writes required would exceed
8726 the data store size.
8728 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
8729 bound to the `GL_PIXEL_PACK_BUFFER' target and VALUES is not evenly
8730 divisible into the number of bytes needed to store in memory a datum
8733 `GL_INVALID_OPERATION' is generated if `glGetHistogram' is executed
8734 between the execution of `glBegin' and the corresponding execution of
8737 (define-gl-procedures
8750 "Return light source parameter values.
8753 Specifies a light source. The number of possible lights depends on
8754 the implementation, but at least eight lights are supported. They
8755 are identified by symbolic names of the form `GL_LIGHT' I where I
8756 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
8759 Specifies a light source parameter for LIGHT. Accepted symbolic
8760 names are `GL_AMBIENT', `GL_DIFFUSE', `GL_SPECULAR', `GL_POSITION',
8761 `GL_SPOT_DIRECTION', `GL_SPOT_EXPONENT', `GL_SPOT_CUTOFF',
8762 `GL_CONSTANT_ATTENUATION', `GL_LINEAR_ATTENUATION', and
8763 `GL_QUADRATIC_ATTENUATION'.
8766 Returns the requested data.
8768 `glGetLight' returns in PARAMS the value or values of a light source
8769 parameter. LIGHT names the light and is a symbolic name of the form
8770 `GL_LIGHT'I where i ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
8771 `GL_MAX_LIGHTS' is an implementation dependent constant that is greater
8772 than or equal to eight. PNAME specifies one of ten light source
8773 parameters, again by symbolic name.
8775 The following parameters are defined:
8778 PARAMS returns four integer or floating-point values representing
8779 the ambient intensity of the light source. Integer values, when
8780 requested, are linearly mapped from the internal floating-point
8781 representation such that 1.0 maps to the most positive
8782 representable integer value, and -1.0 maps to the most negative
8783 representable integer value. If the internal value is outside the
8784 range [-1,1] , the corresponding integer return value is undefined.
8785 The initial value is (0, 0, 0, 1).
8788 PARAMS returns four integer or floating-point values representing
8789 the diffuse intensity of the light source. Integer values, when
8790 requested, are linearly mapped from the internal floating-point
8791 representation such that 1.0 maps to the most positive
8792 representable integer value, and -1.0 maps to the most negative
8793 representable integer value. If the internal value is outside the
8794 range [-1,1] , the corresponding integer return value is undefined.
8795 The initial value for `GL_LIGHT0' is (1, 1, 1, 1); for other
8796 lights, the initial value is (0, 0, 0, 0).
8799 PARAMS returns four integer or floating-point values representing
8800 the specular intensity of the light source. Integer values, when
8801 requested, are linearly mapped from the internal floating-point
8802 representation such that 1.0 maps to the most positive
8803 representable integer value, and -1.0 maps to the most negative
8804 representable integer value. If the internal value is outside the
8805 range [-1,1] , the corresponding integer return value is undefined.
8806 The initial value for `GL_LIGHT0' is (1, 1, 1, 1); for other
8807 lights, the initial value is (0, 0, 0, 0).
8810 PARAMS returns four integer or floating-point values representing
8811 the position of the light source. Integer values, when requested,
8812 are computed by rounding the internal floating-point values to the
8813 nearest integer value. The returned values are those maintained in
8814 eye coordinates. They will not be equal to the values specified
8815 using `glLight', unless the modelview matrix was identity at the
8816 time `glLight' was called. The initial value is (0, 0, 1, 0).
8819 PARAMS returns three integer or floating-point values representing
8820 the direction of the light source. Integer values, when requested,
8821 are computed by rounding the internal floating-point values to the
8822 nearest integer value. The returned values are those maintained in
8823 eye coordinates. They will not be equal to the values specified
8824 using `glLight', unless the modelview matrix was identity at the
8825 time `glLight' was called. Although spot direction is normalized
8826 before being used in the lighting equation, the returned values are
8827 the transformed versions of the specified values prior to
8828 normalization. The initial value is (0,0-1) .
8831 PARAMS returns a single integer or floating-point value
8832 representing the spot exponent of the light. An integer value, when
8833 requested, is computed by rounding the internal floating-point
8834 representation to the nearest integer. The initial value is 0.
8837 PARAMS returns a single integer or floating-point value
8838 representing the spot cutoff angle of the light. An integer value,
8839 when requested, is computed by rounding the internal floating-point
8840 representation to the nearest integer. The initial value is 180.
8842 `GL_CONSTANT_ATTENUATION'
8843 PARAMS returns a single integer or floating-point value
8844 representing the constant (not distance-related) attenuation of the
8845 light. An integer value, when requested, is computed by rounding
8846 the internal floating-point representation to the nearest integer.
8847 The initial value is 1.
8849 `GL_LINEAR_ATTENUATION'
8850 PARAMS returns a single integer or floating-point value
8851 representing the linear attenuation of the light. An integer value,
8852 when requested, is computed by rounding the internal floating-point
8853 representation to the nearest integer. The initial value is 0.
8855 `GL_QUADRATIC_ATTENUATION'
8856 PARAMS returns a single integer or floating-point value
8857 representing the quadratic attenuation of the light. An integer
8858 value, when requested, is computed by rounding the internal
8859 floating-point representation to the nearest integer. The initial
8862 `GL_INVALID_ENUM' is generated if LIGHT or PNAME is not an accepted
8865 `GL_INVALID_OPERATION' is generated if `glGetLight' is executed between
8866 the execution of `glBegin' and the corresponding execution of `glEnd'.")
8868 (define-gl-procedures
8881 "Return evaluator parameters.
8884 Specifies the symbolic name of a map. Accepted values are
8885 `GL_MAP1_COLOR_4', `GL_MAP1_INDEX', `GL_MAP1_NORMAL',
8886 `GL_MAP1_TEXTURE_COORD_1', `GL_MAP1_TEXTURE_COORD_2',
8887 `GL_MAP1_TEXTURE_COORD_3', `GL_MAP1_TEXTURE_COORD_4',
8888 `GL_MAP1_VERTEX_3', `GL_MAP1_VERTEX_4', `GL_MAP2_COLOR_4',
8889 `GL_MAP2_INDEX', `GL_MAP2_NORMAL', `GL_MAP2_TEXTURE_COORD_1',
8890 `GL_MAP2_TEXTURE_COORD_2', `GL_MAP2_TEXTURE_COORD_3',
8891 `GL_MAP2_TEXTURE_COORD_4', `GL_MAP2_VERTEX_3', and
8895 Specifies which parameter to return. Symbolic names `GL_COEFF',
8896 `GL_ORDER', and `GL_DOMAIN' are accepted.
8899 Returns the requested data.
8901 `glMap1' and `glMap2' define evaluators. `glGetMap' returns evaluator
8902 parameters. TARGET chooses a map, QUERY selects a specific parameter,
8903 and V points to storage where the values will be returned.
8905 The acceptable values for the TARGET parameter are described in the
8906 `glMap1' and `glMap2' reference pages.
8908 QUERY can assume the following values:
8911 V returns the control points for the evaluator function.
8912 One-dimensional evaluators return ORDER control points, and
8913 two-dimensional evaluators return UORDER×VORDER control points.
8914 Each control point consists of one, two, three, or four integer,
8915 single-precision floating-point, or double-precision floating-point
8916 values, depending on the type of the evaluator. The GL returns
8917 two-dimensional control points in row-major order, incrementing the
8918 UORDER index quickly and the VORDER index after each row. Integer
8919 values, when requested, are computed by rounding the internal
8920 floating-point values to the nearest integer values.
8923 V returns the order of the evaluator function. One-dimensional
8924 evaluators return a single value, ORDER . The initial value is 1.
8925 Two-dimensional evaluators return two values, UORDER and VORDER .
8926 The initial value is 1,1.
8929 V returns the linear U and V mapping parameters. One-dimensional
8930 evaluators return two values, U1 and U2 , as specified by `glMap1'.
8931 Two-dimensional evaluators return four values ( U1 , U2 , V1 , and
8932 V2 ) as specified by `glMap2'. Integer values, when requested, are
8933 computed by rounding the internal floating-point values to the
8934 nearest integer values.
8936 `GL_INVALID_ENUM' is generated if either TARGET or QUERY is not an
8939 `GL_INVALID_OPERATION' is generated if `glGetMap' is executed between
8940 the execution of `glBegin' and the corresponding execution of `glEnd'.")
8942 (define-gl-procedures
8955 "Return material parameters.
8958 Specifies which of the two materials is being queried. `GL_FRONT'
8959 or `GL_BACK' are accepted, representing the front and back
8960 materials, respectively.
8963 Specifies the material parameter to return. `GL_AMBIENT',
8964 `GL_DIFFUSE', `GL_SPECULAR', `GL_EMISSION', `GL_SHININESS', and
8965 `GL_COLOR_INDEXES' are accepted.
8968 Returns the requested data.
8970 `glGetMaterial' returns in PARAMS the value or values of parameter PNAME
8971 of material FACE. Six parameters are defined:
8974 PARAMS returns four integer or floating-point values representing
8975 the ambient reflectance of the material. Integer values, when
8976 requested, are linearly mapped from the internal floating-point
8977 representation such that 1.0 maps to the most positive
8978 representable integer value, and -1.0 maps to the most negative
8979 representable integer value. If the internal value is outside the
8980 range [-1,1] , the corresponding integer return value is undefined.
8981 The initial value is (0.2, 0.2, 0.2, 1.0)
8984 PARAMS returns four integer or floating-point values representing
8985 the diffuse reflectance of the material. Integer values, when
8986 requested, are linearly mapped from the internal floating-point
8987 representation such that 1.0 maps to the most positive
8988 representable integer value, and -1.0 maps to the most negative
8989 representable integer value. If the internal value is outside the
8990 range [-1,1] , the corresponding integer return value is undefined.
8991 The initial value is (0.8, 0.8, 0.8, 1.0).
8994 PARAMS returns four integer or floating-point values representing
8995 the specular reflectance of the material. Integer values, when
8996 requested, are linearly mapped from the internal floating-point
8997 representation such that 1.0 maps to the most positive
8998 representable integer value, and -1.0 maps to the most negative
8999 representable integer value. If the internal value is outside the
9000 range [-1,1] , the corresponding integer return value is undefined.
9001 The initial value is (0, 0, 0, 1).
9004 PARAMS returns four integer or floating-point values representing
9005 the emitted light intensity of the material. Integer values, when
9006 requested, are linearly mapped from the internal floating-point
9007 representation such that 1.0 maps to the most positive
9008 representable integer value, and -1.0 maps to the most negative
9009 representable integer value. If the internal value is outside the
9010 range [-1,1] , the corresponding integer return value is undefined.
9011 The initial value is (0, 0, 0, 1).
9014 PARAMS returns one integer or floating-point value representing the
9015 specular exponent of the material. Integer values, when requested,
9016 are computed by rounding the internal floating-point value to the
9017 nearest integer value. The initial value is 0.
9020 PARAMS returns three integer or floating-point values representing
9021 the ambient, diffuse, and specular indices of the material. These
9022 indices are used only for color index lighting. (All the other
9023 parameters are used only for RGBA lighting.) Integer values, when
9024 requested, are computed by rounding the internal floating-point
9025 values to the nearest integer values.
9027 `GL_INVALID_ENUM' is generated if FACE or PNAME is not an accepted
9030 `GL_INVALID_OPERATION' is generated if `glGetMaterial' is executed
9031 between the execution of `glBegin' and the corresponding execution of
9034 (define-gl-procedures
9035 ((glGetMinmaxParameterfv
9041 (glGetMinmaxParameteriv
9047 "Get minmax parameters.
9050 Must be `GL_MINMAX'.
9053 The parameter to be retrieved. Must be one of `GL_MINMAX_FORMAT' or
9057 A pointer to storage for the retrieved parameters.
9059 `glGetMinmaxParameter' retrieves parameters for the current minmax table
9060 by setting PNAME to one of the following values:
9068 Internal format of minmax table
9071 Value of the SINK parameter
9075 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
9077 `GL_INVALID_ENUM' is generated if PNAME is not one of the allowable
9080 `GL_INVALID_OPERATION' is generated if `glGetMinmaxParameter' is
9081 executed between the execution of `glBegin' and the corresponding
9082 execution of `glEnd'.")
9084 (define-gl-procedures
9093 "Get minimum and maximum pixel values.
9096 Must be `GL_MINMAX'.
9099 If `GL_TRUE', all entries in the minmax table that are actually
9100 returned are reset to their initial values. (Other entries are
9101 unaltered.) If `GL_FALSE', the minmax table is unaltered.
9104 The format of the data to be returned in VALUES. Must be one of
9105 `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR',
9106 `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
9109 The type of the data to be returned in VALUES. Symbolic constants
9110 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
9111 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9112 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9113 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9114 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9115 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9116 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9117 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9121 A pointer to storage for the returned values.
9123 `glGetMinmax' returns the accumulated minimum and maximum pixel values
9124 (computed on a per-component basis) in a one-dimensional image of width
9125 2. The first set of return values are the minima, and the second set of
9126 return values are the maxima. The format of the return values is
9127 determined by FORMAT, and their type is determined by TYPES.
9129 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9130 target (see `glBindBuffer') while minimum and maximum pixel values are
9131 requested, VALUES is treated as a byte offset into the buffer object's
9134 No pixel transfer operations are performed on the return values, but
9135 pixel storage modes that are applicable to one-dimensional images are
9136 performed. Color components that are requested in the specified FORMAT,
9137 but that are not included in the internal format of the minmax table,
9138 are returned as zero. The assignment of internal color components to the
9139 components requested by FORMAT are as follows:
9143 *Internal Component*
9144 *Resulting Component*
9161 If RESET is `GL_TRUE', the minmax table entries corresponding to the
9162 return values are reset to their initial values. Minimum and maximum
9163 values that are not returned are not modified, even if RESET is
9166 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
9168 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
9171 `GL_INVALID_ENUM' is generated if TYPES is not one of the allowable
9174 `GL_INVALID_OPERATION' is generated if TYPES is one of
9175 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9176 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
9179 `GL_INVALID_OPERATION' is generated if TYPES is one of
9180 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9181 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9182 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9183 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
9184 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
9186 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9187 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9188 store is currently mapped.
9190 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9191 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9192 to the buffer object such that the memory writes required would exceed
9193 the data store size.
9195 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9196 bound to the `GL_PIXEL_PACK_BUFFER' target and VALUES is not evenly
9197 divisible into the number of bytes needed to store in memory a datum
9200 `GL_INVALID_OPERATION' is generated if `glGetMinmax' is executed between
9201 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9203 (define-gl-procedures
9214 "Return the specified pixel map.
9217 Specifies the name of the pixel map to return. Accepted values are
9218 `GL_PIXEL_MAP_I_TO_I', `GL_PIXEL_MAP_S_TO_S',
9219 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
9220 `GL_PIXEL_MAP_I_TO_B', `GL_PIXEL_MAP_I_TO_A',
9221 `GL_PIXEL_MAP_R_TO_R', `GL_PIXEL_MAP_G_TO_G',
9222 `GL_PIXEL_MAP_B_TO_B', and `GL_PIXEL_MAP_A_TO_A'.
9225 Returns the pixel map contents.
9227 See the `glPixelMap' reference page for a description of the acceptable
9228 values for the MAP parameter. `glGetPixelMap' returns in DATA the
9229 contents of the pixel map specified in MAP. Pixel maps are used during
9230 the execution of `glReadPixels', `glDrawPixels', `glCopyPixels',
9231 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glTexSubImage1D',
9232 `glTexSubImage2D', `glTexSubImage3D', `glCopyTexImage1D',
9233 `glCopyTexImage2D', `glCopyTexSubImage1D', `glCopyTexSubImage2D', and
9234 `glCopyTexSubImage3D'. to map color indices, stencil indices, color
9235 components, and depth components to other values.
9237 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9238 target (see `glBindBuffer') while a pixel map is requested, DATA is
9239 treated as a byte offset into the buffer object's data store.
9241 Unsigned integer values, if requested, are linearly mapped from the
9242 internal fixed or floating-point representation such that 1.0 maps to
9243 the largest representable integer value, and 0.0 maps to 0. Return
9244 unsigned integer values are undefined if the map value was not in the
9247 To determine the required size of MAP, call `glGet' with the appropriate
9250 `GL_INVALID_ENUM' is generated if MAP is not an accepted value.
9252 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9253 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9254 store is currently mapped.
9256 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9257 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9258 to the buffer object such that the memory writes required would exceed
9259 the data store size.
9261 `GL_INVALID_OPERATION' is generated by `glGetPixelMapfv' if a non-zero
9262 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9263 DATA is not evenly divisible into the number of bytes needed to store in
9264 memory a GLfloat datum.
9266 `GL_INVALID_OPERATION' is generated by `glGetPixelMapuiv' if a non-zero
9267 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9268 DATA is not evenly divisible into the number of bytes needed to store in
9269 memory a GLuint datum.
9271 `GL_INVALID_OPERATION' is generated by `glGetPixelMapusv' if a non-zero
9272 buffer object name is bound to the `GL_PIXEL_PACK_BUFFER' target and
9273 DATA is not evenly divisible into the number of bytes needed to store in
9274 memory a GLushort datum.
9276 `GL_INVALID_OPERATION' is generated if `glGetPixelMap' is executed
9277 between the execution of `glBegin' and the corresponding execution of
9280 (define-gl-procedures
9286 "Return the address of the specified pointer.
9289 Specifies the array or buffer pointer to be returned. Symbolic
9290 constants `GL_COLOR_ARRAY_POINTER', `GL_EDGE_FLAG_ARRAY_POINTER',
9291 `GL_FOG_COORD_ARRAY_POINTER', `GL_FEEDBACK_BUFFER_POINTER',
9292 `GL_INDEX_ARRAY_POINTER', `GL_NORMAL_ARRAY_POINTER',
9293 `GL_SECONDARY_COLOR_ARRAY_POINTER', `GL_SELECTION_BUFFER_POINTER',
9294 `GL_TEXTURE_COORD_ARRAY_POINTER', or `GL_VERTEX_ARRAY_POINTER' are
9298 Returns the pointer value specified by PNAME.
9300 `glGetPointerv' returns pointer information. PNAME is a symbolic
9301 constant indicating the pointer to be returned, and PARAMS is a pointer
9302 to a location in which to place the returned data.
9304 For all PNAME arguments except `GL_FEEDBACK_BUFFER_POINTER' and
9305 `GL_SELECTION_BUFFER_POINTER', if a non-zero named buffer object was
9306 bound to the `GL_ARRAY_BUFFER' target (see `glBindBuffer') when the
9307 desired pointer was previously specified, the pointer returned is a byte
9308 offset into the buffer object's data store. Buffer objects are only
9309 available in OpenGL versions 1.5 and greater.
9311 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.")
9313 (define-gl-procedures
9314 ((glGetPolygonStipple (pattern GLubyte-*) -> void))
9315 "Return the polygon stipple pattern.
9318 Returns the stipple pattern. The initial value is all 1's.
9320 `glGetPolygonStipple' returns to PATTERN a 32×32 polygon stipple
9321 pattern. The pattern is packed into memory as if `glReadPixels' with
9322 both HEIGHT and WIDTH of 32, TYPE of `GL_BITMAP', and FORMAT of
9323 `GL_COLOR_INDEX' were called, and the stipple pattern were stored in an
9324 internal 32×32 color index buffer. Unlike `glReadPixels', however, pixel
9325 transfer operations (shift, offset, pixel map) are not applied to the
9326 returned stipple image.
9328 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9329 target (see `glBindBuffer') while a polygon stipple pattern is
9330 requested, PATTERN is treated as a byte offset into the buffer object's
9333 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9334 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9335 store is currently mapped.
9337 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9338 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9339 to the buffer object such that the memory writes required would exceed
9340 the data store size.
9342 `GL_INVALID_OPERATION' is generated if `glGetPolygonStipple' is executed
9343 between the execution of `glBegin' and the corresponding execution of
9346 (define-gl-procedures
9347 ((glGetProgramInfoLog
9354 "Returns the information log for a program object.
9357 Specifies the program object whose information log is to be
9361 Specifies the size of the character buffer for storing the returned
9365 Returns the length of the string returned in INFOLOG (excluding the
9369 Specifies an array of characters that is used to return the
9372 `glGetProgramInfoLog' returns the information log for the specified
9373 program object. The information log for a program object is modified
9374 when the program object is linked or validated. The string that is
9375 returned will be null terminated.
9377 `glGetProgramInfoLog' returns in INFOLOG as much of the information log
9378 as it can, up to a maximum of MAXLENGTH characters. The number of
9379 characters actually returned, excluding the null termination character,
9380 is specified by LENGTH. If the length of the returned string is not
9381 required, a value of `NULL' can be passed in the LENGTH argument. The
9382 size of the buffer required to store the returned information log can be
9383 obtained by calling `glGetProgram' with the value `GL_INFO_LOG_LENGTH'.
9385 The information log for a program object is either an empty string, or a
9386 string containing information about the last link operation, or a string
9387 containing information about the last validation operation. It may
9388 contain diagnostic messages, warning messages, and other information.
9389 When a program object is created, its information log will be a string
9392 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
9395 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
9397 `GL_INVALID_VALUE' is generated if MAXLENGTH is less than 0.
9399 `GL_INVALID_OPERATION' is generated if `glGetProgramInfoLog' is executed
9400 between the execution of `glBegin' and the corresponding execution of
9403 (define-gl-procedures
9410 "Returns a parameter from a program object.
9413 Specifies the program object to be queried.
9416 Specifies the object parameter. Accepted symbolic names are
9417 `GL_DELETE_STATUS', `GL_LINK_STATUS', `GL_VALIDATE_STATUS',
9418 `GL_INFO_LOG_LENGTH', `GL_ATTACHED_SHADERS',
9419 `GL_ACTIVE_ATTRIBUTES', `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH',
9420 `GL_ACTIVE_UNIFORMS', `GL_ACTIVE_UNIFORM_MAX_LENGTH'.
9423 Returns the requested object parameter.
9425 `glGetProgram' returns in PARAMS the value of a parameter for a specific
9426 program object. The following parameters are defined:
9431 PARAMS returns `GL_TRUE' if PROGRAM is currently flagged for
9432 deletion, and `GL_FALSE' otherwise.
9437 PARAMS returns `GL_TRUE' if the last link operation on PROGRAM was
9438 successful, and `GL_FALSE' otherwise.
9440 `GL_VALIDATE_STATUS'
9443 PARAMS returns `GL_TRUE' or if the last validation operation on
9444 PROGRAM was successful, and `GL_FALSE' otherwise.
9446 `GL_INFO_LOG_LENGTH'
9449 PARAMS returns the number of characters in the information log for
9450 PROGRAM including the null termination character (i.e., the size of
9451 the character buffer required to store the information log). If
9452 PROGRAM has no information log, a value of 0 is returned.
9454 `GL_ATTACHED_SHADERS'
9457 PARAMS returns the number of shader objects attached to PROGRAM.
9459 `GL_ACTIVE_ATTRIBUTES'
9462 PARAMS returns the number of active attribute variables for
9465 `GL_ACTIVE_ATTRIBUTE_MAX_LENGTH'
9468 PARAMS returns the length of the longest active attribute name for
9469 PROGRAM, including the null termination character (i.e., the size
9470 of the character buffer required to store the longest attribute
9471 name). If no active attributes exist, 0 is returned.
9473 `GL_ACTIVE_UNIFORMS'
9476 PARAMS returns the number of active uniform variables for PROGRAM.
9478 `GL_ACTIVE_UNIFORM_MAX_LENGTH'
9481 PARAMS returns the length of the longest active uniform variable
9482 name for PROGRAM, including the null termination character (i.e.,
9483 the size of the character buffer required to store the longest
9484 uniform variable name). If no active uniform variables exist, 0 is
9487 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
9490 `GL_INVALID_OPERATION' is generated if PROGRAM does not refer to a
9493 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
9495 `GL_INVALID_OPERATION' is generated if `glGetProgram' is executed
9496 between the execution of `glBegin' and the corresponding execution of
9499 (define-gl-procedures
9506 "Return parameters of a query object target.
9509 Specifies a query object target. Must be `GL_SAMPLES_PASSED'.
9512 Specifies the symbolic name of a query object target parameter.
9513 Accepted values are `GL_CURRENT_QUERY' or `GL_QUERY_COUNTER_BITS'.
9516 Returns the requested data.
9518 `glGetQueryiv' returns in PARAMS a selected parameter of the query
9519 object target specified by TARGET.
9521 PNAME names a specific query object target parameter. When TARGET is
9522 `GL_SAMPLES_PASSED', PNAME can be as follows:
9525 PARAMS returns the name of the currently active occlusion query
9526 object. If no occlusion query is active, 0 is returned. The initial
9529 `GL_QUERY_COUNTER_BITS'
9530 PARAMS returns the number of bits in the query counter used to
9531 accumulate passing samples. If the number of bits returned is 0,
9532 the implementation does not support a query counter, and the
9533 results obtained from `glGetQueryObject' are useless.
9535 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
9538 `GL_INVALID_OPERATION' is generated if `glGetQueryiv' is executed
9539 between the execution of `glBegin' and the corresponding execution of
9542 (define-gl-procedures
9543 ((glGetQueryObjectiv
9549 (glGetQueryObjectuiv
9555 "Return parameters of a query object.
9558 Specifies the name of a query object.
9561 Specifies the symbolic name of a query object parameter. Accepted
9562 values are `GL_QUERY_RESULT' or `GL_QUERY_RESULT_AVAILABLE'.
9565 Returns the requested data.
9567 `glGetQueryObject' returns in PARAMS a selected parameter of the query
9568 object specified by ID.
9570 PNAME names a specific query object parameter. PNAME can be as follows:
9573 PARAMS returns the value of the query object's passed samples
9574 counter. The initial value is 0.
9576 `GL_QUERY_RESULT_AVAILABLE'
9577 PARAMS returns whether the passed samples counter is immediately
9578 available. If a delay would occur waiting for the query result,
9579 `GL_FALSE' is returned. Otherwise, `GL_TRUE' is returned, which
9580 also indicates that the results of all previous queries are
9583 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
9585 `GL_INVALID_OPERATION' is generated if ID is not the name of a query
9588 `GL_INVALID_OPERATION' is generated if ID is the name of a currently
9589 active query object.
9591 `GL_INVALID_OPERATION' is generated if `glGetQueryObject' is executed
9592 between the execution of `glBegin' and the corresponding execution of
9595 (define-gl-procedures
9596 ((glGetSeparableFilter
9605 "Get separable convolution filter kernel images.
9608 The separable filter to be retrieved. Must be `GL_SEPARABLE_2D'.
9611 Format of the output images. Must be one of `GL_RED', `GL_GREEN',
9612 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR'`GL_RGBA', `GL_BGRA',
9613 `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'.
9616 Data type of components in the output images. Symbolic constants
9617 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
9618 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
9619 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9620 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
9621 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9622 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9623 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9624 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
9628 Pointer to storage for the row filter image.
9631 Pointer to storage for the column filter image.
9634 Pointer to storage for the span filter image (currently unused).
9636 `glGetSeparableFilter' returns the two one-dimensional filter kernel
9637 images for the current separable 2D convolution filter. The row image is
9638 placed in ROW and the column image is placed in COLUMN according to the
9639 specifications in FORMAT and TYPE. (In the current implementation, SPAN
9640 is not affected in any way.) No pixel transfer operations are performed
9641 on the images, but the relevant pixel storage modes are applied.
9643 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
9644 target (see `glBindBuffer') while a separable convolution filter is
9645 requested, ROW, COLUMN, and SPAN are treated as a byte offset into the
9646 buffer object's data store.
9648 Color components that are present in FORMAT but not included in the
9649 internal format of the filters are returned as zero. The assignments of
9650 internal color components to the components of FORMAT are as follows:
9654 *Internal Component*
9655 *Resulting Component*
9677 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SEPARABLE_2D'.
9679 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
9682 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
9685 `GL_INVALID_OPERATION' is generated if TYPE is one of
9686 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
9687 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
9690 `GL_INVALID_OPERATION' is generated if TYPE is one of
9691 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
9692 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
9693 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
9694 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
9695 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
9697 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9698 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
9699 store is currently mapped.
9701 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9702 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
9703 to the buffer object such that the memory writes required would exceed
9704 the data store size.
9706 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
9707 bound to the `GL_PIXEL_PACK_BUFFER' target and ROW or COLUMN is not
9708 evenly divisible into the number of bytes needed to store in memory a
9709 datum indicated by TYPE.
9711 `GL_INVALID_OPERATION' is generated if `glGetSeparableFilter' is
9712 executed between the execution of `glBegin' and the corresponding
9713 execution of `glEnd'.")
9715 (define-gl-procedures
9716 ((glGetShaderInfoLog
9723 "Returns the information log for a shader object.
9726 Specifies the shader object whose information log is to be queried.
9729 Specifies the size of the character buffer for storing the returned
9733 Returns the length of the string returned in INFOLOG (excluding the
9737 Specifies an array of characters that is used to return the
9740 `glGetShaderInfoLog' returns the information log for the specified
9741 shader object. The information log for a shader object is modified when
9742 the shader is compiled. The string that is returned will be null
9745 `glGetShaderInfoLog' returns in INFOLOG as much of the information log
9746 as it can, up to a maximum of MAXLENGTH characters. The number of
9747 characters actually returned, excluding the null termination character,
9748 is specified by LENGTH. If the length of the returned string is not
9749 required, a value of `NULL' can be passed in the LENGTH argument. The
9750 size of the buffer required to store the returned information log can be
9751 obtained by calling `glGetShader' with the value `GL_INFO_LOG_LENGTH'.
9753 The information log for a shader object is a string that may contain
9754 diagnostic messages, warning messages, and other information about the
9755 last compile operation. When a shader object is created, its information
9756 log will be a string of length 0.
9758 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
9761 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
9763 `GL_INVALID_VALUE' is generated if MAXLENGTH is less than 0.
9765 `GL_INVALID_OPERATION' is generated if `glGetShaderInfoLog' is executed
9766 between the execution of `glBegin' and the corresponding execution of
9769 (define-gl-procedures
9777 "Returns the source code string from a shader object.
9780 Specifies the shader object to be queried.
9783 Specifies the size of the character buffer for storing the returned
9787 Returns the length of the string returned in SOURCE (excluding the
9791 Specifies an array of characters that is used to return the source
9794 `glGetShaderSource' returns the concatenation of the source code strings
9795 from the shader object specified by SHADER. The source code strings for
9796 a shader object are the result of a previous call to `glShaderSource'.
9797 The string returned by the function will be null terminated.
9799 `glGetShaderSource' returns in SOURCE as much of the source code string
9800 as it can, up to a maximum of BUFSIZE characters. The number of
9801 characters actually returned, excluding the null termination character,
9802 is specified by LENGTH. If the length of the returned string is not
9803 required, a value of `NULL' can be passed in the LENGTH argument. The
9804 size of the buffer required to store the returned source code string can
9805 be obtained by calling `glGetShader' with the value
9806 `GL_SHADER_SOURCE_LENGTH'.
9808 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
9811 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
9813 `GL_INVALID_VALUE' is generated if BUFSIZE is less than 0.
9815 `GL_INVALID_OPERATION' is generated if `glGetShaderSource' is executed
9816 between the execution of `glBegin' and the corresponding execution of
9819 (define-gl-procedures
9826 "Returns a parameter from a shader object.
9829 Specifies the shader object to be queried.
9832 Specifies the object parameter. Accepted symbolic names are
9833 `GL_SHADER_TYPE', `GL_DELETE_STATUS', `GL_COMPILE_STATUS',
9834 `GL_INFO_LOG_LENGTH', `GL_SHADER_SOURCE_LENGTH'.
9837 Returns the requested object parameter.
9839 `glGetShader' returns in PARAMS the value of a parameter for a specific
9840 shader object. The following parameters are defined:
9843 PARAMS returns `GL_VERTEX_SHADER' if SHADER is a vertex shader
9844 object, and `GL_FRAGMENT_SHADER' if SHADER is a fragment shader
9848 PARAMS returns `GL_TRUE' if SHADER is currently flagged for
9849 deletion, and `GL_FALSE' otherwise.
9852 PARAMS returns `GL_TRUE' if the last compile operation on SHADER
9853 was successful, and `GL_FALSE' otherwise.
9855 `GL_INFO_LOG_LENGTH'
9856 PARAMS returns the number of characters in the information log for
9857 SHADER including the null termination character (i.e., the size of
9858 the character buffer required to store the information log). If
9859 SHADER has no information log, a value of 0 is returned.
9861 `GL_SHADER_SOURCE_LENGTH'
9862 PARAMS returns the length of the concatenation of the source
9863 strings that make up the shader source for the SHADER, including
9864 the null termination character. (i.e., the size of the character
9865 buffer required to store the shader source). If no source code
9866 exists, 0 is returned.
9868 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
9871 `GL_INVALID_OPERATION' is generated if SHADER does not refer to a shader
9874 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
9876 `GL_INVALID_OPERATION' is generated if `glGetShader' is executed between
9877 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9879 (define-gl-procedures
9880 ((glGetString (name GLenum) -> const-GLubyte*))
9881 "Return a string describing the current GL connection.
9884 Specifies a symbolic constant, one of `GL_VENDOR', `GL_RENDERER',
9885 `GL_VERSION', `GL_SHADING_LANGUAGE_VERSION', or `GL_EXTENSIONS'.
9887 `glGetString' returns a pointer to a static string describing some
9888 aspect of the current GL connection. NAME can be one of the following:
9893 Returns the company responsible for this GL implementation. This
9894 name does not change from release to release.
9899 Returns the name of the renderer. This name is typically specific
9900 to a particular configuration of a hardware platform. It does not
9901 change from release to release.
9906 Returns a version or release number.
9908 `GL_SHADING_LANGUAGE_VERSION'
9911 Returns a version or release number for the shading language.
9916 Returns a space-separated list of supported extensions to GL.
9918 Because the GL does not include queries for the performance
9919 characteristics of an implementation, some applications are written to
9920 recognize known platforms and modify their GL usage based on known
9921 performance characteristics of these platforms. Strings `GL_VENDOR' and
9922 `GL_RENDERER' together uniquely specify a platform. They do not change
9923 from release to release and should be used by platform-recognition
9926 Some applications want to make use of features that are not part of the
9927 standard GL. These features may be implemented as extensions to the
9928 standard GL. The `GL_EXTENSIONS' string is a space-separated list of
9929 supported GL extensions. (Extension names never contain a space
9932 The `GL_VERSION' and `GL_SHADING_LANGUAGE_VERSION' strings begin with a
9933 version number. The version number uses one of these forms:
9935 MAJOR_NUMBER.MINOR_NUMBERMAJOR_NUMBER.MINOR_NUMBER.RELEASE_NUMBER
9937 Vendor-specific information may follow the version number. Its format
9938 depends on the implementation, but a space always separates the version
9939 number and the vendor-specific information.
9941 All strings are null-terminated.
9943 `GL_INVALID_ENUM' is generated if NAME is not an accepted value.
9945 `GL_INVALID_OPERATION' is generated if `glGetString' is executed between
9946 the execution of `glBegin' and the corresponding execution of `glEnd'.")
9948 (define-gl-procedures
9961 "Return texture environment parameters.
9964 Specifies a texture environment. May be `GL_TEXTURE_ENV',
9965 `GL_TEXTURE_FILTER_CONTROL', or `GL_POINT_SPRITE'.
9968 Specifies the symbolic name of a texture environment parameter.
9969 Accepted values are `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR',
9970 `GL_TEXTURE_LOD_BIAS', `GL_COMBINE_RGB', `GL_COMBINE_ALPHA',
9971 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
9972 `GL_SRC1_ALPHA', `GL_SRC2_ALPHA', `GL_OPERAND0_RGB',
9973 `GL_OPERAND1_RGB', `GL_OPERAND2_RGB', `GL_OPERAND0_ALPHA',
9974 `GL_OPERAND1_ALPHA', `GL_OPERAND2_ALPHA', `GL_RGB_SCALE',
9975 `GL_ALPHA_SCALE', or `GL_COORD_REPLACE'.
9978 Returns the requested data.
9980 `glGetTexEnv' returns in PARAMS selected values of a texture environment
9981 that was specified with `glTexEnv'. TARGET specifies a texture
9984 When TARGET is `GL_TEXTURE_FILTER_CONTROL', PNAME must be
9985 `GL_TEXTURE_LOD_BIAS'. When TARGET is `GL_POINT_SPRITE', PNAME must be
9986 `GL_COORD_REPLACE'. When TARGET is `GL_TEXTURE_ENV', PNAME can be
9987 `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR', `GL_COMBINE_RGB',
9988 `GL_COMBINE_ALPHA', `GL_RGB_SCALE', `GL_ALPHA_SCALE', `GL_SRC0_RGB',
9989 `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA', `GL_SRC1_ALPHA', or
9992 PNAME names a specific texture environment parameter, as follows:
9994 `GL_TEXTURE_ENV_MODE'
9995 PARAMS returns the single-valued texture environment mode, a
9996 symbolic constant. The initial value is `GL_MODULATE'.
9998 `GL_TEXTURE_ENV_COLOR'
9999 PARAMS returns four integer or floating-point values that are the
10000 texture environment color. Integer values, when requested, are
10001 linearly mapped from the internal floating-point representation
10002 such that 1.0 maps to the most positive representable integer, and
10003 -1.0 maps to the most negative representable integer. The initial
10004 value is (0, 0, 0, 0).
10006 `GL_TEXTURE_LOD_BIAS'
10007 PARAMS returns a single floating-point value that is the texture
10008 level-of-detail bias. The initial value is 0.
10011 PARAMS returns a single symbolic constant value representing the
10012 current RGB combine mode. The initial value is `GL_MODULATE'.
10015 PARAMS returns a single symbolic constant value representing the
10016 current alpha combine mode. The initial value is `GL_MODULATE'.
10019 PARAMS returns a single symbolic constant value representing the
10020 texture combiner zero's RGB source. The initial value is
10024 PARAMS returns a single symbolic constant value representing the
10025 texture combiner one's RGB source. The initial value is
10029 PARAMS returns a single symbolic constant value representing the
10030 texture combiner two's RGB source. The initial value is
10034 PARAMS returns a single symbolic constant value representing the
10035 texture combiner zero's alpha source. The initial value is
10039 PARAMS returns a single symbolic constant value representing the
10040 texture combiner one's alpha source. The initial value is
10044 PARAMS returns a single symbolic constant value representing the
10045 texture combiner two's alpha source. The initial value is
10049 PARAMS returns a single symbolic constant value representing the
10050 texture combiner zero's RGB operand. The initial value is
10054 PARAMS returns a single symbolic constant value representing the
10055 texture combiner one's RGB operand. The initial value is
10059 PARAMS returns a single symbolic constant value representing the
10060 texture combiner two's RGB operand. The initial value is
10063 `GL_OPERAND0_ALPHA'
10064 PARAMS returns a single symbolic constant value representing the
10065 texture combiner zero's alpha operand. The initial value is
10068 `GL_OPERAND1_ALPHA'
10069 PARAMS returns a single symbolic constant value representing the
10070 texture combiner one's alpha operand. The initial value is
10073 `GL_OPERAND2_ALPHA'
10074 PARAMS returns a single symbolic constant value representing the
10075 texture combiner two's alpha operand. The initial value is
10079 PARAMS returns a single floating-point value representing the
10080 current RGB texture combiner scaling factor. The initial value is
10084 PARAMS returns a single floating-point value representing the
10085 current alpha texture combiner scaling factor. The initial value is
10089 PARAMS returns a single boolean value representing the current
10090 point sprite texture coordinate replacement enable state. The
10091 initial value is `GL_FALSE'.
10093 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10096 `GL_INVALID_OPERATION' is generated if `glGetTexEnv' is executed between
10097 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10099 (define-gl-procedures
10112 "Return texture coordinate generation parameters.
10115 Specifies a texture coordinate. Must be `GL_S', `GL_T', `GL_R', or
10119 Specifies the symbolic name of the value(s) to be returned. Must be
10120 either `GL_TEXTURE_GEN_MODE' or the name of one of the texture
10121 generation plane equations: `GL_OBJECT_PLANE' or `GL_EYE_PLANE'.
10124 Returns the requested data.
10126 `glGetTexGen' returns in PARAMS selected parameters of a texture
10127 coordinate generation function that was specified using `glTexGen'.
10128 COORD names one of the (S, T, R, Q) texture coordinates, using the
10129 symbolic constant `GL_S', `GL_T', `GL_R', or `GL_Q'.
10131 PNAME specifies one of three symbolic names:
10133 `GL_TEXTURE_GEN_MODE'
10134 PARAMS returns the single-valued texture generation function, a
10135 symbolic constant. The initial value is `GL_EYE_LINEAR'.
10138 PARAMS returns the four plane equation coefficients that specify
10139 object linear-coordinate generation. Integer values, when
10140 requested, are mapped directly from the internal floating-point
10144 PARAMS returns the four plane equation coefficients that specify
10145 eye linear-coordinate generation. Integer values, when requested,
10146 are mapped directly from the internal floating-point
10147 representation. The returned values are those maintained in eye
10148 coordinates. They are not equal to the values specified using
10149 `glTexGen', unless the modelview matrix was identity when
10150 `glTexGen' was called.
10152 `GL_INVALID_ENUM' is generated if COORD or PNAME is not an accepted
10155 `GL_INVALID_OPERATION' is generated if `glGetTexGen' is executed between
10156 the execution of `glBegin' and the corresponding execution of `glEnd'.")
10158 (define-gl-procedures
10167 "Return a texture image.
10170 Specifies which texture is to be obtained. `GL_TEXTURE_1D',
10171 `GL_TEXTURE_2D', `GL_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10172 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10173 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10174 and `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z' are accepted.
10177 Specifies the level-of-detail number of the desired image. Level 0
10178 is the base image level. Level N is the N th mipmap reduction
10182 Specifies a pixel format for the returned data. The supported
10183 formats are `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
10184 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and
10185 `GL_LUMINANCE_ALPHA'.
10188 Specifies a pixel type for the returned data. The supported types
10189 are `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_UNSIGNED_SHORT', `GL_SHORT',
10190 `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2',
10191 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
10192 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
10193 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
10194 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
10195 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
10196 `GL_UNSIGNED_INT_2_10_10_10_REV'.
10199 Returns the texture image. Should be a pointer to an array of the
10200 type specified by TYPE.
10202 `glGetTexImage' returns a texture image into IMG. TARGET specifies
10203 whether the desired texture image is one specified by `glTexImage1D'
10204 (`GL_TEXTURE_1D'), `glTexImage2D' (`GL_TEXTURE_2D' or any of
10205 `GL_TEXTURE_CUBE_MAP_*'), or `glTexImage3D' (`GL_TEXTURE_3D'). LEVEL
10206 specifies the level-of-detail number of the desired image. FORMAT and
10207 TYPE specify the format and type of the desired image array. See the
10208 reference pages `glTexImage1D' and `glDrawPixels' for a description of
10209 the acceptable values for the FORMAT and TYPE parameters, respectively.
10211 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
10212 target (see `glBindBuffer') while a texture image is requested, IMG is
10213 treated as a byte offset into the buffer object's data store.
10215 To understand the operation of `glGetTexImage', consider the selected
10216 internal four-component texture image to be an RGBA color buffer the
10217 size of the image. The semantics of `glGetTexImage' are then identical
10218 to those of `glReadPixels', with the exception that no pixel transfer
10219 operations are performed, when called with the same FORMAT and TYPE,
10220 with X and Y set to 0, WIDTH set to the width of the texture image
10221 (including border if one was specified), and HEIGHT set to 1 for 1D
10222 images, or to the height of the texture image (including border if one
10223 was specified) for 2D images. Because the internal texture image is an
10224 RGBA image, pixel formats `GL_COLOR_INDEX', `GL_STENCIL_INDEX', and
10225 `GL_DEPTH_COMPONENT' are not accepted, and pixel type `GL_BITMAP' is not
10228 If the selected texture image does not contain four components, the
10229 following mappings are applied. Single-component textures are treated as
10230 RGBA buffers with red set to the single-component value, green set to 0,
10231 blue set to 0, and alpha set to 1. Two-component textures are treated as
10232 RGBA buffers with red set to the value of component zero, alpha set to
10233 the value of component one, and green and blue set to 0. Finally,
10234 three-component textures are treated as RGBA buffers with red set to
10235 component zero, green set to component one, blue set to component two,
10236 and alpha set to 1.
10238 To determine the required size of IMG, use `glGetTexLevelParameter' to
10239 determine the dimensions of the internal texture image, then scale the
10240 required number of pixels by the storage required for each pixel, based
10241 on FORMAT and TYPE. Be sure to take the pixel storage parameters into
10242 account, especially `GL_PACK_ALIGNMENT'.
10244 `GL_INVALID_ENUM' is generated if TARGET, FORMAT, or TYPE is not an
10247 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
10249 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
10250 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
10252 `GL_INVALID_OPERATION' is returned if TYPE is one of
10253 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
10254 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
10257 `GL_INVALID_OPERATION' is returned if TYPE is one of
10258 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
10259 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
10260 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
10261 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV', and
10262 FORMAT is neither `GL_RGBA' or `GL_BGRA'.
10264 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10265 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
10266 store is currently mapped.
10268 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10269 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
10270 to the buffer object such that the memory writes required would exceed
10271 the data store size.
10273 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
10274 bound to the `GL_PIXEL_PACK_BUFFER' target and IMG is not evenly
10275 divisible into the number of bytes needed to store in memory a datum
10278 `GL_INVALID_OPERATION' is generated if `glGetTexImage' is executed
10279 between the execution of `glBegin' and the corresponding execution of
10282 (define-gl-procedures
10283 ((glGetTexLevelParameterfv
10290 (glGetTexLevelParameteriv
10297 "Return texture parameter values for a specific level of detail.
10300 Specifies the symbolic name of the target texture, either
10301 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D',
10302 `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_2D',
10303 `GL_PROXY_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10304 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10305 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10306 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
10309 Specifies the level-of-detail number of the desired image. Level 0
10310 is the base image level. Level N is the N th mipmap reduction
10314 Specifies the symbolic name of a texture parameter.
10315 `GL_TEXTURE_WIDTH', `GL_TEXTURE_HEIGHT', `GL_TEXTURE_DEPTH',
10316 `GL_TEXTURE_INTERNAL_FORMAT', `GL_TEXTURE_BORDER',
10317 `GL_TEXTURE_RED_SIZE', `GL_TEXTURE_GREEN_SIZE',
10318 `GL_TEXTURE_BLUE_SIZE', `GL_TEXTURE_ALPHA_SIZE',
10319 `GL_TEXTURE_LUMINANCE_SIZE', `GL_TEXTURE_INTENSITY_SIZE',
10320 `GL_TEXTURE_DEPTH_SIZE', `GL_TEXTURE_COMPRESSED', and
10321 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' are accepted.
10324 Returns the requested data.
10326 `glGetTexLevelParameter' returns in PARAMS texture parameter values for
10327 a specific level-of-detail value, specified as LEVEL. TARGET defines the
10328 target texture, either `GL_TEXTURE_1D', `GL_TEXTURE_2D',
10329 `GL_TEXTURE_3D', `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_2D',
10330 `GL_PROXY_TEXTURE_3D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
10331 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
10332 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
10333 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
10335 `GL_MAX_TEXTURE_SIZE', and `GL_MAX_3D_TEXTURE_SIZE' are not really
10336 descriptive enough. It has to report the largest square texture image
10337 that can be accommodated with mipmaps and borders, but a long skinny
10338 texture, or a texture without mipmaps and borders, may easily fit in
10339 texture memory. The proxy targets allow the user to more accurately
10340 query whether the GL can accommodate a texture of a given configuration.
10341 If the texture cannot be accommodated, the texture state variables,
10342 which may be queried with `glGetTexLevelParameter', are set to 0. If the
10343 texture can be accommodated, the texture state values will be set as
10344 they would be set for a non-proxy target.
10346 PNAME specifies the texture parameter whose value or values will be
10349 The accepted parameter names are as follows:
10354 PARAMS returns a single value, the width of the texture image. This
10355 value includes the border of the texture image. The initial value
10358 `GL_TEXTURE_HEIGHT'
10361 PARAMS returns a single value, the height of the texture image.
10362 This value includes the border of the texture image. The initial
10368 PARAMS returns a single value, the depth of the texture image. This
10369 value includes the border of the texture image. The initial value
10372 `GL_TEXTURE_INTERNAL_FORMAT'
10375 PARAMS returns a single value, the internal format of the texture
10378 `GL_TEXTURE_BORDER'
10381 PARAMS returns a single value, the width in pixels of the border of
10382 the texture image. The initial value is 0.
10384 `GL_TEXTURE_RED_SIZE',
10385 `GL_TEXTURE_GREEN_SIZE',
10386 `GL_TEXTURE_BLUE_SIZE',
10387 `GL_TEXTURE_ALPHA_SIZE',
10388 `GL_TEXTURE_LUMINANCE_SIZE',
10389 `GL_TEXTURE_INTENSITY_SIZE',
10390 `GL_TEXTURE_DEPTH_SIZE'
10393 The internal storage resolution of an individual component. The
10394 resolution chosen by the GL will be a close match for the
10395 resolution requested by the user with the component argument of
10396 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glCopyTexImage1D',
10397 and `glCopyTexImage2D'. The initial value is 0.
10399 `GL_TEXTURE_COMPRESSED'
10402 PARAMS returns a single boolean value indicating if the texture
10403 image is stored in a compressed internal format. The initiali value
10406 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE'
10409 PARAMS returns a single integer value, the number of unsigned bytes
10410 of the compressed texture image that would be returned from
10411 `glGetCompressedTexImage'.
10413 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10416 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
10418 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
10419 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
10421 `GL_INVALID_OPERATION' is generated if `glGetTexLevelParameter' is
10422 executed between the execution of `glBegin' and the corresponding
10423 execution of `glEnd'.
10425 `GL_INVALID_OPERATION' is generated if
10426 `GL_TEXTURE_COMPRESSED_IMAGE_SIZE' is queried on texture images with an
10427 uncompressed internal format or on proxy targets.")
10429 (define-gl-procedures
10430 ((glGetTexParameterfv
10436 (glGetTexParameteriv
10442 "Return texture parameter values.
10445 Specifies the symbolic name of the target texture. `GL_TEXTURE_1D',
10446 `GL_TEXTURE_2D', `GL_TEXTURE_3D', and `GL_TEXTURE_CUBE_MAP' are
10450 Specifies the symbolic name of a texture parameter.
10451 `GL_TEXTURE_MAG_FILTER', `GL_TEXTURE_MIN_FILTER',
10452 `GL_TEXTURE_MIN_LOD', `GL_TEXTURE_MAX_LOD',
10453 `GL_TEXTURE_BASE_LEVEL', `GL_TEXTURE_MAX_LEVEL',
10454 `GL_TEXTURE_WRAP_S', `GL_TEXTURE_WRAP_T', `GL_TEXTURE_WRAP_R',
10455 `GL_TEXTURE_BORDER_COLOR', `GL_TEXTURE_PRIORITY',
10456 `GL_TEXTURE_RESIDENT', `GL_TEXTURE_COMPARE_MODE',
10457 `GL_TEXTURE_COMPARE_FUNC', `GL_DEPTH_TEXTURE_MODE', and
10458 `GL_GENERATE_MIPMAP' are accepted.
10461 Returns the texture parameters.
10463 `glGetTexParameter' returns in PARAMS the value or values of the texture
10464 parameter specified as PNAME. TARGET defines the target texture, either
10465 `GL_TEXTURE_1D', `GL_TEXTURE_2D', `GL_TEXTURE_3D', or
10466 `GL_TEXTURE_CUBE_MAP', to specify one-, two-, or three-dimensional or
10467 cube-mapped texturing. PNAME accepts the same symbols as
10468 `glTexParameter', with the same interpretations:
10470 `GL_TEXTURE_MAG_FILTER'
10471 Returns the single-valued texture magnification filter, a symbolic
10472 constant. The initial value is `GL_LINEAR'.
10474 `GL_TEXTURE_MIN_FILTER'
10475 Returns the single-valued texture minification filter, a symbolic
10476 constant. The initial value is `GL_NEAREST_MIPMAP_LINEAR'.
10478 `GL_TEXTURE_MIN_LOD'
10479 Returns the single-valued texture minimum level-of-detail value.
10480 The initial value is -1000 .
10482 `GL_TEXTURE_MAX_LOD'
10483 Returns the single-valued texture maximum level-of-detail value.
10484 The initial value is 1000.
10486 `GL_TEXTURE_BASE_LEVEL'
10487 Returns the single-valued base texture mipmap level. The initial
10490 `GL_TEXTURE_MAX_LEVEL'
10491 Returns the single-valued maximum texture mipmap array level. The
10492 initial value is 1000.
10494 `GL_TEXTURE_WRAP_S'
10495 Returns the single-valued wrapping function for texture coordinate
10496 S , a symbolic constant. The initial value is `GL_REPEAT'.
10498 `GL_TEXTURE_WRAP_T'
10499 Returns the single-valued wrapping function for texture coordinate
10500 T , a symbolic constant. The initial value is `GL_REPEAT'.
10502 `GL_TEXTURE_WRAP_R'
10503 Returns the single-valued wrapping function for texture coordinate
10504 R , a symbolic constant. The initial value is `GL_REPEAT'.
10506 `GL_TEXTURE_BORDER_COLOR'
10507 Returns four integer or floating-point numbers that comprise the
10508 RGBA color of the texture border. Floating-point values are
10509 returned in the range [0,1] . Integer values are returned as a
10510 linear mapping of the internal floating-point representation such
10511 that 1.0 maps to the most positive representable integer and -1.0
10512 maps to the most negative representable integer. The initial value
10515 `GL_TEXTURE_PRIORITY'
10516 Returns the residence priority of the target texture (or the named
10517 texture bound to it). The initial value is 1. See
10518 `glPrioritizeTextures'.
10520 `GL_TEXTURE_RESIDENT'
10521 Returns the residence status of the target texture. If the value
10522 returned in PARAMS is `GL_TRUE', the texture is resident in texture
10523 memory. See `glAreTexturesResident'.
10525 `GL_TEXTURE_COMPARE_MODE'
10526 Returns a single-valued texture comparison mode, a symbolic
10527 constant. The initial value is `GL_NONE'. See `glTexParameter'.
10529 `GL_TEXTURE_COMPARE_FUNC'
10530 Returns a single-valued texture comparison function, a symbolic
10531 constant. The initial value is `GL_LEQUAL'. See `glTexParameter'.
10533 `GL_DEPTH_TEXTURE_MODE'
10534 Returns a single-valued texture format indicating how the depth
10535 values should be converted into color components. The initial value
10536 is `GL_LUMINANCE'. See `glTexParameter'.
10538 `GL_GENERATE_MIPMAP'
10539 Returns a single boolean value indicating if automatic mipmap level
10540 updates are enabled. See `glTexParameter'.
10542 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not an accepted
10545 `GL_INVALID_OPERATION' is generated if `glGetTexParameter' is executed
10546 between the execution of `glBegin' and the corresponding execution of
10549 (define-gl-procedures
10550 ((glGetUniformLocation
10552 (name const-GLchar-*)
10555 "Returns the location of a uniform variable.
10558 Specifies the program object to be queried.
10561 Points to a null terminated string containing the name of the
10562 uniform variable whose location is to be queried.
10564 `glGetUniformLocation ' returns an integer that represents the location
10565 of a specific uniform variable within a program object. NAME must be a
10566 null terminated string that contains no white space. NAME must be an
10567 active uniform variable name in PROGRAM that is not a structure, an
10568 array of structures, or a subcomponent of a vector or a matrix. This
10569 function returns -1 if NAME does not correspond to an active uniform
10570 variable in PROGRAM or if NAME starts with the reserved prefix \"gl_\".
10572 Uniform variables that are structures or arrays of structures may be
10573 queried by calling `glGetUniformLocation' for each field within the
10574 structure. The array element operator \"[]\" and the structure field
10575 operator \".\" may be used in NAME in order to select elements within an
10576 array or fields within a structure. The result of using these operators
10577 is not allowed to be another structure, an array of structures, or a
10578 subcomponent of a vector or a matrix. Except if the last part of NAME
10579 indicates a uniform variable array, the location of the first element of
10580 an array can be retrieved by using the name of the array, or by using
10581 the name appended by \"[0]\".
10583 The actual locations assigned to uniform variables are not known until
10584 the program object is linked successfully. After linking has occurred,
10585 the command `glGetUniformLocation' can be used to obtain the location of
10586 a uniform variable. This location value can then be passed to
10587 `glUniform' to set the value of the uniform variable or to
10588 `glGetUniform' in order to query the current value of the uniform
10589 variable. After a program object has been linked successfully, the index
10590 values for uniform variables remain fixed until the next link command
10591 occurs. Uniform variable locations and values can only be queried after
10592 a link if the link was successful.
10594 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
10597 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
10599 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
10602 `GL_INVALID_OPERATION' is generated if `glGetUniformLocation' is
10603 executed between the execution of `glBegin' and the corresponding
10604 execution of `glEnd'.")
10606 (define-gl-procedures
10619 "Returns the value of a uniform variable.
10622 Specifies the program object to be queried.
10625 Specifies the location of the uniform variable to be queried.
10628 Returns the value of the specified uniform variable.
10630 `glGetUniform' returns in PARAMS the value(s) of the specified uniform
10631 variable. The type of the uniform variable specified by LOCATION
10632 determines the number of values returned. If the uniform variable is
10633 defined in the shader as a boolean, int, or float, a single value will
10634 be returned. If it is defined as a vec2, ivec2, or bvec2, two values
10635 will be returned. If it is defined as a vec3, ivec3, or bvec3, three
10636 values will be returned, and so on. To query values stored in uniform
10637 variables declared as arrays, call `glGetUniform' for each element of
10638 the array. To query values stored in uniform variables declared as
10639 structures, call `glGetUniform' for each field in the structure. The
10640 values for uniform variables declared as a matrix will be returned in
10641 column major order.
10643 The locations assigned to uniform variables are not known until the
10644 program object is linked. After linking has occurred, the command
10645 `glGetUniformLocation' can be used to obtain the location of a uniform
10646 variable. This location value can then be passed to `glGetUniform' in
10647 order to query the current value of the uniform variable. After a
10648 program object has been linked successfully, the index values for
10649 uniform variables remain fixed until the next link command occurs. The
10650 uniform variable values can only be queried after a link if the link was
10653 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
10656 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
10658 `GL_INVALID_OPERATION' is generated if PROGRAM has not been successfully
10661 `GL_INVALID_OPERATION' is generated if LOCATION does not correspond to a
10662 valid uniform variable location for the specified program object.
10664 `GL_INVALID_OPERATION' is generated if `glGetUniform' is executed
10665 between the execution of `glBegin' and the corresponding execution of
10668 (define-gl-procedures
10669 ((glGetVertexAttribPointerv
10672 (pointer GLvoid-**)
10675 "Return the address of the specified generic vertex attribute pointer.
10678 Specifies the generic vertex attribute parameter to be returned.
10681 Specifies the symbolic name of the generic vertex attribute
10682 parameter to be returned. Must be `GL_VERTEX_ATTRIB_ARRAY_POINTER'.
10685 Returns the pointer value.
10687 `glGetVertexAttribPointerv' returns pointer information. INDEX is the
10688 generic vertex attribute to be queried, PNAME is a symbolic constant
10689 indicating the pointer to be returned, and PARAMS is a pointer to a
10690 location in which to place the returned data.
10692 If a non-zero named buffer object was bound to the `GL_ARRAY_BUFFER'
10693 target (see `glBindBuffer') when the desired pointer was previously
10694 specified, the POINTER returned is a byte offset into the buffer
10695 object's data store.
10697 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
10698 `GL_MAX_VERTEX_ATTRIBS'.
10700 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.")
10702 (define-gl-procedures
10703 ((glGetVertexAttribfv
10709 (glGetVertexAttribiv
10715 "Return a generic vertex attribute parameter.
10718 Specifies the generic vertex attribute parameter to be queried.
10721 Specifies the symbolic name of the vertex attribute parameter to be
10722 queried. Accepted values are
10723 `GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING',
10724 `GL_VERTEX_ATTRIB_ARRAY_ENABLED', `GL_VERTEX_ATTRIB_ARRAY_SIZE',
10725 `GL_VERTEX_ATTRIB_ARRAY_STRIDE', `GL_VERTEX_ATTRIB_ARRAY_TYPE',
10726 `GL_VERTEX_ATTRIB_ARRAY_NORMALIZED', or `GL_CURRENT_VERTEX_ATTRIB'.
10729 Returns the requested data.
10731 `glGetVertexAttrib' returns in PARAMS the value of a generic vertex
10732 attribute parameter. The generic vertex attribute to be queried is
10733 specified by INDEX, and the parameter to be queried is specified by
10736 The accepted parameter names are as follows:
10738 `GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING'
10741 PARAMS returns a single value, the name of the buffer object
10742 currently bound to the binding point corresponding to generic
10743 vertex attribute array INDEX. If no buffer object is bound, 0 is
10744 returned. The initial value is 0.
10746 `GL_VERTEX_ATTRIB_ARRAY_ENABLED'
10749 PARAMS returns a single value that is non-zero (true) if the vertex
10750 attribute array for INDEX is enabled and 0 (false) if it is
10751 disabled. The initial value is `GL_FALSE'.
10753 `GL_VERTEX_ATTRIB_ARRAY_SIZE'
10756 PARAMS returns a single value, the size of the vertex attribute
10757 array for INDEX. The size is the number of values for each element
10758 of the vertex attribute array, and it will be 1, 2, 3, or 4. The
10759 initial value is 4.
10761 `GL_VERTEX_ATTRIB_ARRAY_STRIDE'
10764 PARAMS returns a single value, the array stride for (number of
10765 bytes between successive elements in) the vertex attribute array
10766 for INDEX. A value of 0 indicates that the array elements are
10767 stored sequentially in memory. The initial value is 0.
10769 `GL_VERTEX_ATTRIB_ARRAY_TYPE'
10772 PARAMS returns a single value, a symbolic constant indicating the
10773 array type for the vertex attribute array for INDEX. Possible
10774 values are `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
10775 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', and
10776 `GL_DOUBLE'. The initial value is `GL_FLOAT'.
10778 `GL_VERTEX_ATTRIB_ARRAY_NORMALIZED'
10781 PARAMS returns a single value that is non-zero (true) if
10782 fixed-point data types for the vertex attribute array indicated by
10783 INDEX are normalized when they are converted to floating point, and
10784 0 (false) otherwise. The initial value is `GL_FALSE'.
10786 `GL_CURRENT_VERTEX_ATTRIB'
10789 PARAMS returns four values that represent the current value for the
10790 generic vertex attribute specified by index. Generic vertex
10791 attribute 0 is unique in that it has no current state, so an error
10792 will be generated if INDEX is 0. The initial value for all other
10793 generic vertex attributes is (0,0,0,1).
10795 All of the parameters except `GL_CURRENT_VERTEX_ATTRIB' represent
10798 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
10799 `GL_MAX_VERTEX_ATTRIBS'.
10801 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
10803 `GL_INVALID_OPERATION' is generated if INDEX is 0 and PNAME is
10804 `GL_CURRENT_VERTEX_ATTRIB'.")
10806 (define-gl-procedures
10809 (params GLboolean-*)
10814 (params GLdouble-*)
10827 "Return the value or values of a selected parameter.
10830 Specifies the parameter value to be returned. The symbolic
10831 constants in the list below are accepted.
10834 Returns the value or values of the specified parameter.
10836 These four commands return values for simple state variables in GL.
10837 PNAME is a symbolic constant indicating the state variable to be
10838 returned, and PARAMS is a pointer to an array of the indicated type in
10839 which to place the returned data.
10841 Type conversion is performed if PARAMS has a different type than the
10842 state variable value being requested. If `glGetBooleanv' is called, a
10843 floating-point (or integer) value is converted to `GL_FALSE' if and only
10844 if it is 0.0 (or 0). Otherwise, it is converted to `GL_TRUE'. If
10845 `glGetIntegerv' is called, boolean values are returned as `GL_TRUE' or
10846 `GL_FALSE', and most floating-point values are rounded to the nearest
10847 integer value. Floating-point colors and normals, however, are returned
10848 with a linear mapping that maps 1.0 to the most positive representable
10849 integer value and -1.0 to the most negative representable integer value.
10850 If `glGetFloatv' or `glGetDoublev' is called, boolean values are
10851 returned as `GL_TRUE' or `GL_FALSE', and integer values are converted to
10852 floating-point values.
10854 The following symbolic constants are accepted by PNAME:
10856 `GL_ACCUM_ALPHA_BITS'
10859 PARAMS returns one value, the number of alpha bitplanes in the
10860 accumulation buffer.
10862 `GL_ACCUM_BLUE_BITS'
10865 PARAMS returns one value, the number of blue bitplanes in the
10866 accumulation buffer.
10868 `GL_ACCUM_CLEAR_VALUE'
10871 PARAMS returns four values: the red, green, blue, and alpha values
10872 used to clear the accumulation buffer. Integer values, if
10873 requested, are linearly mapped from the internal floating-point
10874 representation such that 1.0 returns the most positive
10875 representable integer value, and -1.0 returns the most negative
10876 representable integer value. The initial value is (0, 0, 0, 0). See
10879 `GL_ACCUM_GREEN_BITS'
10882 PARAMS returns one value, the number of green bitplanes in the
10883 accumulation buffer.
10885 `GL_ACCUM_RED_BITS'
10888 PARAMS returns one value, the number of red bitplanes in the
10889 accumulation buffer.
10891 `GL_ACTIVE_TEXTURE'
10894 PARAMS returns a single value indicating the active multitexture
10895 unit. The initial value is `GL_TEXTURE0'. See `glActiveTexture'.
10897 `GL_ALIASED_POINT_SIZE_RANGE'
10900 PARAMS returns two values, the smallest and largest supported sizes
10901 for aliased points.
10903 `GL_ALIASED_LINE_WIDTH_RANGE'
10906 PARAMS returns two values, the smallest and largest supported
10907 widths for aliased lines.
10912 PARAMS returns one value, the alpha bias factor used during pixel
10913 transfers. The initial value is 0. See `glPixelTransfer'.
10918 PARAMS returns one value, the number of alpha bitplanes in each
10924 PARAMS returns one value, the alpha scale factor used during pixel
10925 transfers. The initial value is 1. See `glPixelTransfer'.
10930 PARAMS returns a single boolean value indicating whether alpha
10931 testing of fragments is enabled. The initial value is `GL_FALSE'.
10934 `GL_ALPHA_TEST_FUNC'PARAMS returns one value,
10937 the symbolic name of the alpha test function. The initial value is
10938 `GL_ALWAYS'. See `glAlphaFunc'.
10940 `GL_ALPHA_TEST_REF'
10943 PARAMS returns one value, the reference value for the alpha test.
10944 The initial value is 0. See `glAlphaFunc'. An integer value, if
10945 requested, is linearly mapped from the internal floating-point
10946 representation such that 1.0 returns the most positive
10947 representable integer value, and -1.0 returns the most negative
10948 representable integer value.
10950 `GL_ARRAY_BUFFER_BINDING'
10953 PARAMS returns a single value, the name of the buffer object
10954 currently bound to the target `GL_ARRAY_BUFFER'. If no buffer
10955 object is bound to this target, 0 is returned. The initial value is
10956 0. See `glBindBuffer'.
10958 `GL_ATTRIB_STACK_DEPTH'
10961 PARAMS returns one value, the depth of the attribute stack. If the
10962 stack is empty, 0 is returned. The initial value is 0. See
10968 PARAMS returns a single boolean value indicating whether 2D map
10969 evaluation automatically generates surface normals. The initial
10970 value is `GL_FALSE'. See `glMap2'.
10975 PARAMS returns one value, the number of auxiliary color buffers
10981 PARAMS returns a single boolean value indicating whether blending
10982 is enabled. The initial value is `GL_FALSE'. See `glBlendFunc'.
10987 PARAMS returns four values, the red, green, blue, and alpha values
10988 which are the components of the blend color. See `glBlendColor'.
10990 `GL_BLEND_DST_ALPHA'
10993 PARAMS returns one value, the symbolic constant identifying the
10994 alpha destination blend function. The initial value is `GL_ZERO'.
10995 See `glBlendFunc' and `glBlendFuncSeparate'.
11000 PARAMS returns one value, the symbolic constant identifying the RGB
11001 destination blend function. The initial value is `GL_ZERO'. See
11002 `glBlendFunc' and `glBlendFuncSeparate'.
11004 `GL_BLEND_EQUATION_RGB'
11007 PARAMS returns one value, a symbolic constant indicating whether
11008 the RGB blend equation is `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
11009 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN' or `GL_MAX'. See
11010 `glBlendEquationSeparate'.
11012 `GL_BLEND_EQUATION_ALPHA'
11015 PARAMS returns one value, a symbolic constant indicating whether
11016 the Alpha blend equation is `GL_FUNC_ADD', `GL_FUNC_SUBTRACT',
11017 `GL_FUNC_REVERSE_SUBTRACT', `GL_MIN' or `GL_MAX'. See
11018 `glBlendEquationSeparate'.
11020 `GL_BLEND_SRC_ALPHA'
11023 PARAMS returns one value, the symbolic constant identifying the
11024 alpha source blend function. The initial value is `GL_ONE'. See
11025 `glBlendFunc' and `glBlendFuncSeparate'.
11030 PARAMS returns one value, the symbolic constant identifying the RGB
11031 source blend function. The initial value is `GL_ONE'. See
11032 `glBlendFunc' and `glBlendFuncSeparate'.
11037 PARAMS returns one value, the blue bias factor used during pixel
11038 transfers. The initial value is 0. See `glPixelTransfer'.
11043 PARAMS returns one value, the number of blue bitplanes in each
11049 PARAMS returns one value, the blue scale factor used during pixel
11050 transfers. The initial value is 1. See `glPixelTransfer'.
11052 `GL_CLIENT_ACTIVE_TEXTURE'
11055 PARAMS returns a single integer value indicating the current client
11056 active multitexture unit. The initial value is `GL_TEXTURE0'. See
11057 `glClientActiveTexture'.
11059 `GL_CLIENT_ATTRIB_STACK_DEPTH'
11062 PARAMS returns one value indicating the depth of the attribute
11063 stack. The initial value is 0. See `glPushClientAttrib'.
11068 PARAMS returns a single boolean value indicating whether the
11069 specified clipping plane is enabled. The initial value is
11070 `GL_FALSE'. See `glClipPlane'.
11075 PARAMS returns a single boolean value indicating whether the color
11076 array is enabled. The initial value is `GL_FALSE'. See
11079 `GL_COLOR_ARRAY_BUFFER_BINDING'
11082 PARAMS returns a single value, the name of the buffer object
11083 associated with the color array. This buffer object would have been
11084 bound to the target `GL_ARRAY_BUFFER' at the time of the most
11085 recent call to `glColorPointer'. If no buffer object was bound to
11086 this target, 0 is returned. The initial value is 0. See
11089 `GL_COLOR_ARRAY_SIZE'
11092 PARAMS returns one value, the number of components per color in the
11093 color array. The initial value is 4. See `glColorPointer'.
11095 `GL_COLOR_ARRAY_STRIDE'
11098 PARAMS returns one value, the byte offset between consecutive
11099 colors in the color array. The initial value is 0. See
11102 `GL_COLOR_ARRAY_TYPE'
11105 PARAMS returns one value, the data type of each component in the
11106 color array. The initial value is `GL_FLOAT'. See `glColorPointer'.
11108 `GL_COLOR_CLEAR_VALUE'
11111 PARAMS returns four values: the red, green, blue, and alpha values
11112 used to clear the color buffers. Integer values, if requested, are
11113 linearly mapped from the internal floating-point representation
11114 such that 1.0 returns the most positive representable integer
11115 value, and -1.0 returns the most negative representable integer
11116 value. The initial value is (0, 0, 0, 0). See `glClearColor'.
11118 `GL_COLOR_LOGIC_OP'
11121 PARAMS returns a single boolean value indicating whether a
11122 fragment's RGBA color values are merged into the framebuffer using
11123 a logical operation. The initial value is `GL_FALSE'. See
11126 `GL_COLOR_MATERIAL'
11129 PARAMS returns a single boolean value indicating whether one or
11130 more material parameters are tracking the current color. The
11131 initial value is `GL_FALSE'. See `glColorMaterial'.
11133 `GL_COLOR_MATERIAL_FACE'
11136 PARAMS returns one value, a symbolic constant indicating which
11137 materials have a parameter that is tracking the current color. The
11138 initial value is `GL_FRONT_AND_BACK'. See `glColorMaterial'.
11140 `GL_COLOR_MATERIAL_PARAMETER'
11143 PARAMS returns one value, a symbolic constant indicating which
11144 material parameters are tracking the current color. The initial
11145 value is `GL_AMBIENT_AND_DIFFUSE'. See `glColorMaterial'.
11150 PARAMS returns sixteen values: the color matrix on the top of the
11151 color matrix stack. Initially this matrix is the identity matrix.
11152 See `glPushMatrix'.
11154 `GL_COLOR_MATRIX_STACK_DEPTH'
11157 PARAMS returns one value, the maximum supported depth of the
11158 projection matrix stack. The value must be at least 2. See
11164 PARAMS returns a single boolean value indicating whether primary
11165 and secondary color sum is enabled. See `glSecondaryColor'.
11170 PARAMS returns a single boolean value indicating whether the color
11171 table lookup is enabled. See `glColorTable'.
11173 `GL_COLOR_WRITEMASK'
11176 PARAMS returns four boolean values: the red, green, blue, and alpha
11177 write enables for the color buffers. The initial value is
11178 (`GL_TRUE', `GL_TRUE', `GL_TRUE', `GL_TRUE'). See `glColorMask'.
11180 `GL_COMPRESSED_TEXTURE_FORMATS'
11183 PARAMS returns a list of symbolic constants of length
11184 `GL_NUM_COMPRESSED_TEXTURE_FORMATS' indicating which compressed
11185 texture formats are available. See `glCompressedTexImage2D'.
11187 `GL_CONVOLUTION_1D'
11190 PARAMS returns a single boolean value indicating whether 1D
11191 convolution is enabled. The initial value is `GL_FALSE'. See
11192 `glConvolutionFilter1D'.
11194 `GL_CONVOLUTION_2D'
11197 PARAMS returns a single boolean value indicating whether 2D
11198 convolution is enabled. The initial value is `GL_FALSE'. See
11199 `glConvolutionFilter2D'.
11204 PARAMS returns a single boolean value indicating whether polygon
11205 culling is enabled. The initial value is `GL_FALSE'. See
11208 `GL_CULL_FACE_MODE'
11211 PARAMS returns one value, a symbolic constant indicating which
11212 polygon faces are to be culled. The initial value is `GL_BACK'. See
11218 PARAMS returns four values: the red, green, blue, and alpha values
11219 of the current color. Integer values, if requested, are linearly
11220 mapped from the internal floating-point representation such that
11221 1.0 returns the most positive representable integer value, and -1.0
11222 returns the most negative representable integer value. The initial
11223 value is (1, 1, 1, 1). See `glColor'.
11225 `GL_CURRENT_FOG_COORD'
11228 PARAMS returns one value, the current fog coordinate. The initial
11229 value is 0. See `glFogCoord'.
11234 PARAMS returns one value, the current color index. The initial
11235 value is 1. See `glIndex'.
11237 `GL_CURRENT_NORMAL'
11240 PARAMS returns three values: the X, Y, and Z values of the current
11241 normal. Integer values, if requested, are linearly mapped from the
11242 internal floating-point representation such that 1.0 returns the
11243 most positive representable integer value, and -1.0 returns the
11244 most negative representable integer value. The initial value is (0,
11245 0, 1). See `glNormal'.
11247 `GL_CURRENT_PROGRAM'
11250 PARAMS returns one value, the name of the program object that is
11251 currently active, or 0 if no program object is active. See
11254 `GL_CURRENT_RASTER_COLOR'
11257 PARAMS returns four values: the red, green, blue, and alpha color
11258 values of the current raster position. Integer values, if
11259 requested, are linearly mapped from the internal floating-point
11260 representation such that 1.0 returns the most positive
11261 representable integer value, and -1.0 returns the most negative
11262 representable integer value. The initial value is (1, 1, 1, 1). See
11265 `GL_CURRENT_RASTER_DISTANCE'
11268 PARAMS returns one value, the distance from the eye to the current
11269 raster position. The initial value is 0. See `glRasterPos'.
11271 `GL_CURRENT_RASTER_INDEX'
11274 PARAMS returns one value, the color index of the current raster
11275 position. The initial value is 1. See `glRasterPos'.
11277 `GL_CURRENT_RASTER_POSITION'
11280 PARAMS returns four values: the X, Y, Z, and W components of the
11281 current raster position. X, Y, and Z are in window coordinates, and
11282 W is in clip coordinates. The initial value is (0, 0, 0, 1). See
11285 `GL_CURRENT_RASTER_POSITION_VALID'
11288 PARAMS returns a single boolean value indicating whether the
11289 current raster position is valid. The initial value is `GL_TRUE'.
11292 `GL_CURRENT_RASTER_SECONDARY_COLOR'
11295 PARAMS returns four values: the red, green, blue, and alpha
11296 secondary color values of the current raster position. Integer
11297 values, if requested, are linearly mapped from the internal
11298 floating-point representation such that 1.0 returns the most
11299 positive representable integer value, and -1.0 returns the most
11300 negative representable integer value. The initial value is (1, 1,
11301 1, 1). See `glRasterPos'.
11303 `GL_CURRENT_RASTER_TEXTURE_COORDS'
11306 PARAMS returns four values: the S, T, R, and Q texture coordinates
11307 of the current raster position. The initial value is (0, 0, 0, 1).
11308 See `glRasterPos' and `glMultiTexCoord'.
11310 `GL_CURRENT_SECONDARY_COLOR'
11313 PARAMS returns four values: the red, green, blue, and alpha values
11314 of the current secondary color. Integer values, if requested, are
11315 linearly mapped from the internal floating-point representation
11316 such that 1.0 returns the most positive representable integer
11317 value, and -1.0 returns the most negative representable integer
11318 value. The initial value is (0, 0, 0, 0). See `glSecondaryColor'.
11320 `GL_CURRENT_TEXTURE_COORDS'
11323 PARAMS returns four values: the S, T, R, and Q current texture
11324 coordinates. The initial value is (0, 0, 0, 1). See
11330 PARAMS returns one value, the depth bias factor used during pixel
11331 transfers. The initial value is 0. See `glPixelTransfer'.
11336 PARAMS returns one value, the number of bitplanes in the depth
11339 `GL_DEPTH_CLEAR_VALUE'
11342 PARAMS returns one value, the value that is used to clear the depth
11343 buffer. Integer values, if requested, are linearly mapped from the
11344 internal floating-point representation such that 1.0 returns the
11345 most positive representable integer value, and -1.0 returns the
11346 most negative representable integer value. The initial value is 1.
11347 See `glClearDepth'.
11352 PARAMS returns one value, the symbolic constant that indicates the
11353 depth comparison function. The initial value is `GL_LESS'. See
11359 PARAMS returns two values: the near and far mapping limits for the
11360 depth buffer. Integer values, if requested, are linearly mapped
11361 from the internal floating-point representation such that 1.0
11362 returns the most positive representable integer value, and -1.0
11363 returns the most negative representable integer value. The initial
11364 value is (0, 1). See `glDepthRange'.
11369 PARAMS returns one value, the depth scale factor used during pixel
11370 transfers. The initial value is 1. See `glPixelTransfer'.
11375 PARAMS returns a single boolean value indicating whether depth
11376 testing of fragments is enabled. The initial value is `GL_FALSE'.
11377 See `glDepthFunc' and `glDepthRange'.
11379 `GL_DEPTH_WRITEMASK'
11382 PARAMS returns a single boolean value indicating if the depth
11383 buffer is enabled for writing. The initial value is `GL_TRUE'. See
11389 PARAMS returns a single boolean value indicating whether dithering
11390 of fragment colors and indices is enabled. The initial value is
11396 PARAMS returns a single boolean value indicating whether double
11397 buffering is supported.
11402 PARAMS returns one value, a symbolic constant indicating which
11403 buffers are being drawn to. See `glDrawBuffer'. The initial value
11404 is `GL_BACK' if there are back buffers, otherwise it is `GL_FRONT'.
11409 PARAMS returns one value, a symbolic constant indicating which
11410 buffers are being drawn to by the corresponding output color. See
11411 `glDrawBuffers'. The initial value of `GL_DRAW_BUFFER0' is
11412 `GL_BACK' if there are back buffers, otherwise it is `GL_FRONT'.
11413 The initial values of draw buffers for all other output colors is
11419 PARAMS returns a single boolean value indicating whether the
11420 current edge flag is `GL_TRUE' or `GL_FALSE'. The initial value is
11421 `GL_TRUE'. See `glEdgeFlag'.
11423 `GL_EDGE_FLAG_ARRAY'
11426 PARAMS returns a single boolean value indicating whether the edge
11427 flag array is enabled. The initial value is `GL_FALSE'. See
11428 `glEdgeFlagPointer'.
11430 `GL_EDGE_FLAG_ARRAY_BUFFER_BINDING'
11433 PARAMS returns a single value, the name of the buffer object
11434 associated with the edge flag array. This buffer object would have
11435 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
11436 recent call to `glEdgeFlagPointer'. If no buffer object was bound
11437 to this target, 0 is returned. The initial value is 0. See
11440 `GL_EDGE_FLAG_ARRAY_STRIDE'
11443 PARAMS returns one value, the byte offset between consecutive edge
11444 flags in the edge flag array. The initial value is 0. See
11445 `glEdgeFlagPointer'.
11447 `GL_ELEMENT_ARRAY_BUFFER_BINDING'
11450 PARAMS returns a single value, the name of the buffer object
11451 currently bound to the target `GL_ELEMENT_ARRAY_BUFFER'. If no
11452 buffer object is bound to this target, 0 is returned. The initial
11453 value is 0. See `glBindBuffer'.
11455 `GL_FEEDBACK_BUFFER_SIZE'
11458 PARAMS returns one value, the size of the feedback buffer. See
11459 `glFeedbackBuffer'.
11461 `GL_FEEDBACK_BUFFER_TYPE'
11464 PARAMS returns one value, the type of the feedback buffer. See
11465 `glFeedbackBuffer'.
11470 PARAMS returns a single boolean value indicating whether fogging is
11471 enabled. The initial value is `GL_FALSE'. See `glFog'.
11473 `GL_FOG_COORD_ARRAY'
11476 PARAMS returns a single boolean value indicating whether the fog
11477 coordinate array is enabled. The initial value is `GL_FALSE'. See
11478 `glFogCoordPointer'.
11480 `GL_FOG_COORD_ARRAY_BUFFER_BINDING'
11483 PARAMS returns a single value, the name of the buffer object
11484 associated with the fog coordinate array. This buffer object would
11485 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
11486 most recent call to `glFogCoordPointer'. If no buffer object was
11487 bound to this target, 0 is returned. The initial value is 0. See
11490 `GL_FOG_COORD_ARRAY_STRIDE'
11493 PARAMS returns one value, the byte offset between consecutive fog
11494 coordinates in the fog coordinate array. The initial value is 0.
11495 See `glFogCoordPointer'.
11497 `GL_FOG_COORD_ARRAY_TYPE'
11500 PARAMS returns one value, the type of the fog coordinate array. The
11501 initial value is `GL_FLOAT'. See `glFogCoordPointer'.
11506 PARAMS returns one value, a symbolic constant indicating the source
11507 of the fog coordinate. The initial value is `GL_FRAGMENT_DEPTH'.
11513 PARAMS returns four values: the red, green, blue, and alpha
11514 components of the fog color. Integer values, if requested, are
11515 linearly mapped from the internal floating-point representation
11516 such that 1.0 returns the most positive representable integer
11517 value, and -1.0 returns the most negative representable integer
11518 value. The initial value is (0, 0, 0, 0). See `glFog'.
11523 PARAMS returns one value, the fog density parameter. The initial
11524 value is 1. See `glFog'.
11529 PARAMS returns one value, the end factor for the linear fog
11530 equation. The initial value is 1. See `glFog'.
11535 PARAMS returns one value, a symbolic constant indicating the mode
11536 of the fog hint. The initial value is `GL_DONT_CARE'. See `glHint'.
11541 PARAMS returns one value, the fog color index. The initial value is
11547 PARAMS returns one value, a symbolic constant indicating which fog
11548 equation is selected. The initial value is `GL_EXP'. See `glFog'.
11553 PARAMS returns one value, the start factor for the linear fog
11554 equation. The initial value is 0. See `glFog'.
11556 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT'
11559 PARAMS returns one value, a symbolic constant indicating the mode
11560 of the derivative accuracy hint for fragment shaders. The initial
11561 value is `GL_DONT_CARE'. See `glHint'.
11566 PARAMS returns one value, a symbolic constant indicating whether
11567 clockwise or counterclockwise polygon winding is treated as
11568 front-facing. The initial value is `GL_CCW'. See `glFrontFace'.
11570 `GL_GENERATE_MIPMAP_HINT'
11573 PARAMS returns one value, a symbolic constant indicating the mode
11574 of the mipmap generation filtering hint. The initial value is
11575 `GL_DONT_CARE'. See `glHint'.
11580 PARAMS returns one value, the green bias factor used during pixel
11581 transfers. The initial value is 0.
11586 PARAMS returns one value, the number of green bitplanes in each
11592 PARAMS returns one value, the green scale factor used during pixel
11593 transfers. The initial value is 1. See `glPixelTransfer'.
11598 PARAMS returns a single boolean value indicating whether histogram
11599 is enabled. The initial value is `GL_FALSE'. See `glHistogram'.
11604 PARAMS returns a single boolean value indicating whether the color
11605 index array is enabled. The initial value is `GL_FALSE'. See
11608 `GL_INDEX_ARRAY_BUFFER_BINDING'
11611 PARAMS returns a single value, the name of the buffer object
11612 associated with the color index array. This buffer object would
11613 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
11614 most recent call to `glIndexPointer'. If no buffer object was bound
11615 to this target, 0 is returned. The initial value is 0. See
11618 `GL_INDEX_ARRAY_STRIDE'
11621 PARAMS returns one value, the byte offset between consecutive color
11622 indexes in the color index array. The initial value is 0. See
11625 `GL_INDEX_ARRAY_TYPE'
11628 PARAMS returns one value, the data type of indexes in the color
11629 index array. The initial value is `GL_FLOAT'. See `glIndexPointer'.
11634 PARAMS returns one value, the number of bitplanes in each color
11637 `GL_INDEX_CLEAR_VALUE'
11640 PARAMS returns one value, the color index used to clear the color
11641 index buffers. The initial value is 0. See `glClearIndex'.
11643 `GL_INDEX_LOGIC_OP'
11646 PARAMS returns a single boolean value indicating whether a
11647 fragment's index values are merged into the framebuffer using a
11648 logical operation. The initial value is `GL_FALSE'. See
11654 PARAMS returns a single boolean value indicating whether the GL is
11655 in color index mode (`GL_TRUE') or RGBA mode (`GL_FALSE').
11660 PARAMS returns one value, the offset added to color and stencil
11661 indices during pixel transfers. The initial value is 0. See
11667 PARAMS returns one value, the amount that color and stencil indices
11668 are shifted during pixel transfers. The initial value is 0. See
11671 `GL_INDEX_WRITEMASK'
11674 PARAMS returns one value, a mask indicating which bitplanes of each
11675 color index buffer can be written. The initial value is all 1's.
11681 PARAMS returns a single boolean value indicating whether the
11682 specified light is enabled. The initial value is `GL_FALSE'. See
11683 `glLight' and `glLightModel'.
11688 PARAMS returns a single boolean value indicating whether lighting
11689 is enabled. The initial value is `GL_FALSE'. See `glLightModel'.
11691 `GL_LIGHT_MODEL_AMBIENT'
11694 PARAMS returns four values: the red, green, blue, and alpha
11695 components of the ambient intensity of the entire scene. Integer
11696 values, if requested, are linearly mapped from the internal
11697 floating-point representation such that 1.0 returns the most
11698 positive representable integer value, and -1.0 returns the most
11699 negative representable integer value. The initial value is (0.2,
11700 0.2, 0.2, 1.0). See `glLightModel'.
11702 `GL_LIGHT_MODEL_COLOR_CONTROL'
11705 PARAMS returns single enumerated value indicating whether specular
11706 reflection calculations are separated from normal lighting
11707 computations. The initial value is `GL_SINGLE_COLOR'.
11709 `GL_LIGHT_MODEL_LOCAL_VIEWER'
11712 PARAMS returns a single boolean value indicating whether specular
11713 reflection calculations treat the viewer as being local to the
11714 scene. The initial value is `GL_FALSE'. See `glLightModel'.
11716 `GL_LIGHT_MODEL_TWO_SIDE'
11719 PARAMS returns a single boolean value indicating whether separate
11720 materials are used to compute lighting for front- and back-facing
11721 polygons. The initial value is `GL_FALSE'. See `glLightModel'.
11726 PARAMS returns a single boolean value indicating whether
11727 antialiasing of lines is enabled. The initial value is `GL_FALSE'.
11730 `GL_LINE_SMOOTH_HINT'
11733 PARAMS returns one value, a symbolic constant indicating the mode
11734 of the line antialiasing hint. The initial value is `GL_DONT_CARE'.
11740 PARAMS returns a single boolean value indicating whether stippling
11741 of lines is enabled. The initial value is `GL_FALSE'. See
11744 `GL_LINE_STIPPLE_PATTERN'
11747 PARAMS returns one value, the 16-bit line stipple pattern. The
11748 initial value is all 1's. See `glLineStipple'.
11750 `GL_LINE_STIPPLE_REPEAT'
11753 PARAMS returns one value, the line stipple repeat factor. The
11754 initial value is 1. See `glLineStipple'.
11759 PARAMS returns one value, the line width as specified with
11760 `glLineWidth'. The initial value is 1.
11762 `GL_LINE_WIDTH_GRANULARITY'
11765 PARAMS returns one value, the width difference between adjacent
11766 supported widths for antialiased lines. See `glLineWidth'.
11768 `GL_LINE_WIDTH_RANGE'
11771 PARAMS returns two values: the smallest and largest supported
11772 widths for antialiased lines. See `glLineWidth'.
11777 PARAMS returns one value, the base offset added to all names in
11778 arrays presented to `glCallLists'. The initial value is 0. See
11784 PARAMS returns one value, the name of the display list currently
11785 under construction. 0 is returned if no display list is currently
11786 under construction. The initial value is 0. See `glNewList'.
11791 PARAMS returns one value, a symbolic constant indicating the
11792 construction mode of the display list currently under construction.
11793 The initial value is 0. See `glNewList'.
11798 PARAMS returns one value, a symbolic constant indicating the
11799 selected logic operation mode. The initial value is `GL_COPY'. See
11805 PARAMS returns a single boolean value indicating whether 1D
11806 evaluation generates colors. The initial value is `GL_FALSE'. See
11809 `GL_MAP1_GRID_DOMAIN'
11812 PARAMS returns two values: the endpoints of the 1D map's grid
11813 domain. The initial value is (0, 1). See `glMapGrid'.
11815 `GL_MAP1_GRID_SEGMENTS'
11818 PARAMS returns one value, the number of partitions in the 1D map's
11819 grid domain. The initial value is 1. See `glMapGrid'.
11824 PARAMS returns a single boolean value indicating whether 1D
11825 evaluation generates color indices. The initial value is
11826 `GL_FALSE'. See `glMap1'.
11831 PARAMS returns a single boolean value indicating whether 1D
11832 evaluation generates normals. The initial value is `GL_FALSE'. See
11835 `GL_MAP1_TEXTURE_COORD_1'
11838 PARAMS returns a single boolean value indicating whether 1D
11839 evaluation generates 1D texture coordinates. The initial value is
11840 `GL_FALSE'. See `glMap1'.
11842 `GL_MAP1_TEXTURE_COORD_2'
11845 PARAMS returns a single boolean value indicating whether 1D
11846 evaluation generates 2D texture coordinates. The initial value is
11847 `GL_FALSE'. See `glMap1'.
11849 `GL_MAP1_TEXTURE_COORD_3'
11852 PARAMS returns a single boolean value indicating whether 1D
11853 evaluation generates 3D texture coordinates. The initial value is
11854 `GL_FALSE'. See `glMap1'.
11856 `GL_MAP1_TEXTURE_COORD_4'
11859 PARAMS returns a single boolean value indicating whether 1D
11860 evaluation generates 4D texture coordinates. The initial value is
11861 `GL_FALSE'. See `glMap1'.
11866 PARAMS returns a single boolean value indicating whether 1D
11867 evaluation generates 3D vertex coordinates. The initial value is
11868 `GL_FALSE'. See `glMap1'.
11873 PARAMS returns a single boolean value indicating whether 1D
11874 evaluation generates 4D vertex coordinates. The initial value is
11875 `GL_FALSE'. See `glMap1'.
11880 PARAMS returns a single boolean value indicating whether 2D
11881 evaluation generates colors. The initial value is `GL_FALSE'. See
11884 `GL_MAP2_GRID_DOMAIN'
11887 PARAMS returns four values: the endpoints of the 2D map's I and J
11888 grid domains. The initial value is (0,1; 0,1). See `glMapGrid'.
11890 `GL_MAP2_GRID_SEGMENTS'
11893 PARAMS returns two values: the number of partitions in the 2D map's
11894 I and J grid domains. The initial value is (1,1). See `glMapGrid'.
11899 PARAMS returns a single boolean value indicating whether 2D
11900 evaluation generates color indices. The initial value is
11901 `GL_FALSE'. See `glMap2'.
11906 PARAMS returns a single boolean value indicating whether 2D
11907 evaluation generates normals. The initial value is `GL_FALSE'. See
11910 `GL_MAP2_TEXTURE_COORD_1'
11913 PARAMS returns a single boolean value indicating whether 2D
11914 evaluation generates 1D texture coordinates. The initial value is
11915 `GL_FALSE'. See `glMap2'.
11917 `GL_MAP2_TEXTURE_COORD_2'
11920 PARAMS returns a single boolean value indicating whether 2D
11921 evaluation generates 2D texture coordinates. The initial value is
11922 `GL_FALSE'. See `glMap2'.
11924 `GL_MAP2_TEXTURE_COORD_3'
11927 PARAMS returns a single boolean value indicating whether 2D
11928 evaluation generates 3D texture coordinates. The initial value is
11929 `GL_FALSE'. See `glMap2'.
11931 `GL_MAP2_TEXTURE_COORD_4'
11934 PARAMS returns a single boolean value indicating whether 2D
11935 evaluation generates 4D texture coordinates. The initial value is
11936 `GL_FALSE'. See `glMap2'.
11941 PARAMS returns a single boolean value indicating whether 2D
11942 evaluation generates 3D vertex coordinates. The initial value is
11943 `GL_FALSE'. See `glMap2'.
11948 PARAMS returns a single boolean value indicating whether 2D
11949 evaluation generates 4D vertex coordinates. The initial value is
11950 `GL_FALSE'. See `glMap2'.
11955 PARAMS returns a single boolean value indicating if colors and
11956 color indices are to be replaced by table lookup during pixel
11957 transfers. The initial value is `GL_FALSE'. See `glPixelTransfer'.
11962 PARAMS returns a single boolean value indicating if stencil indices
11963 are to be replaced by table lookup during pixel transfers. The
11964 initial value is `GL_FALSE'. See `glPixelTransfer'.
11969 PARAMS returns one value, a symbolic constant indicating which
11970 matrix stack is currently the target of all matrix operations. The
11971 initial value is `GL_MODELVIEW'. See `glMatrixMode'.
11973 `GL_MAX_3D_TEXTURE_SIZE'
11976 PARAMS returns one value, a rough estimate of the largest 3D
11977 texture that the GL can handle. The value must be at least 16. If
11978 the GL version is 1.2 or greater, use `GL_PROXY_TEXTURE_3D' to
11979 determine if a texture is too large. See `glTexImage3D'.
11981 `GL_MAX_CLIENT_ATTRIB_STACK_DEPTH'
11984 PARAMS returns one value indicating the maximum supported depth of
11985 the client attribute stack. See `glPushClientAttrib'.
11987 `GL_MAX_ATTRIB_STACK_DEPTH'
11990 PARAMS returns one value, the maximum supported depth of the
11991 attribute stack. The value must be at least 16. See `glPushAttrib'.
11993 `GL_MAX_CLIP_PLANES'
11996 PARAMS returns one value, the maximum number of application-defined
11997 clipping planes. The value must be at least 6. See `glClipPlane'.
11999 `GL_MAX_COLOR_MATRIX_STACK_DEPTH'
12002 PARAMS returns one value, the maximum supported depth of the color
12003 matrix stack. The value must be at least 2. See `glPushMatrix'.
12005 `GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS'
12008 PARAMS returns one value, the maximum supported texture image units
12009 that can be used to access texture maps from the vertex shader and
12010 the fragment processor combined. If both the vertex shader and the
12011 fragment processing stage access the same texture image unit, then
12012 that counts as using two texture image units against this limit.
12013 The value must be at least 2. See `glActiveTexture'.
12015 `GL_MAX_CUBE_MAP_TEXTURE_SIZE'
12018 PARAMS returns one value. The value gives a rough estimate of the
12019 largest cube-map texture that the GL can handle. The value must be
12020 at least 16. If the GL version is 1.3 or greater, use
12021 `GL_PROXY_TEXTURE_CUBE_MAP' to determine if a texture is too large.
12022 See `glTexImage2D'.
12024 `GL_MAX_DRAW_BUFFERS'
12027 PARAMS returns one value, the maximum number of simultaneous output
12028 colors allowed from a fragment shader using the `gl_FragData'
12029 built-in array. The value must be at least 1. See `glDrawBuffers'.
12031 `GL_MAX_ELEMENTS_INDICES'
12034 PARAMS returns one value, the recommended maximum number of vertex
12035 array indices. See `glDrawRangeElements'.
12037 `GL_MAX_ELEMENTS_VERTICES'
12040 PARAMS returns one value, the recommended maximum number of vertex
12041 array vertices. See `glDrawRangeElements'.
12043 `GL_MAX_EVAL_ORDER'
12046 PARAMS returns one value, the maximum equation order supported by
12047 1D and 2D evaluators. The value must be at least 8. See `glMap1'
12050 `GL_MAX_FRAGMENT_UNIFORM_COMPONENTS'
12053 PARAMS returns one value, the maximum number of individual
12054 floating-point, integer, or boolean values that can be held in
12055 uniform variable storage for a fragment shader. The value must be
12056 at least 64. See `glUniform'.
12061 PARAMS returns one value, the maximum number of lights. The value
12062 must be at least 8. See `glLight'.
12064 `GL_MAX_LIST_NESTING'
12067 PARAMS returns one value, the maximum recursion depth allowed
12068 during display-list traversal. The value must be at least 64. See
12071 `GL_MAX_MODELVIEW_STACK_DEPTH'
12074 PARAMS returns one value, the maximum supported depth of the
12075 modelview matrix stack. The value must be at least 32. See
12078 `GL_MAX_NAME_STACK_DEPTH'
12081 PARAMS returns one value, the maximum supported depth of the
12082 selection name stack. The value must be at least 64. See
12085 `GL_MAX_PIXEL_MAP_TABLE'
12088 PARAMS returns one value, the maximum supported size of a
12089 `glPixelMap' lookup table. The value must be at least 32. See
12092 `GL_MAX_PROJECTION_STACK_DEPTH'
12095 PARAMS returns one value, the maximum supported depth of the
12096 projection matrix stack. The value must be at least 2. See
12099 `GL_MAX_TEXTURE_COORDS'
12102 PARAMS returns one value, the maximum number of texture coordinate
12103 sets available to vertex and fragment shaders. The value must be at
12104 least 2. See `glActiveTexture' and `glClientActiveTexture'.
12106 `GL_MAX_TEXTURE_IMAGE_UNITS'
12109 PARAMS returns one value, the maximum supported texture image units
12110 that can be used to access texture maps from the fragment shader.
12111 The value must be at least 2. See `glActiveTexture'.
12113 `GL_MAX_TEXTURE_LOD_BIAS'
12116 PARAMS returns one value, the maximum, absolute value of the
12117 texture level-of-detail bias. The value must be at least 4.
12119 `GL_MAX_TEXTURE_SIZE'
12122 PARAMS returns one value. The value gives a rough estimate of the
12123 largest texture that the GL can handle. The value must be at least
12124 64. If the GL version is 1.1 or greater, use `GL_PROXY_TEXTURE_1D'
12125 or `GL_PROXY_TEXTURE_2D' to determine if a texture is too large.
12126 See `glTexImage1D' and `glTexImage2D'.
12128 `GL_MAX_TEXTURE_STACK_DEPTH'
12131 PARAMS returns one value, the maximum supported depth of the
12132 texture matrix stack. The value must be at least 2. See
12135 `GL_MAX_TEXTURE_UNITS'
12138 PARAMS returns a single value indicating the number of conventional
12139 texture units supported. Each conventional texture unit includes
12140 both a texture coordinate set and a texture image unit.
12141 Conventional texture units may be used for fixed-function
12142 (non-shader) rendering. The value must be at least 2. Additional
12143 texture coordinate sets and texture image units may be accessed
12144 from vertex and fragment shaders. See `glActiveTexture' and
12145 `glClientActiveTexture'.
12147 `GL_MAX_VARYING_FLOATS'
12150 PARAMS returns one value, the maximum number of interpolators
12151 available for processing varying variables used by vertex and
12152 fragment shaders. This value represents the number of individual
12153 floating-point values that can be interpolated; varying variables
12154 declared as vectors, matrices, and arrays will all consume multiple
12155 interpolators. The value must be at least 32.
12157 `GL_MAX_VERTEX_ATTRIBS'
12160 PARAMS returns one value, the maximum number of 4-component generic
12161 vertex attributes accessible to a vertex shader. The value must be
12162 at least 16. See `glVertexAttrib'.
12164 `GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS'
12167 PARAMS returns one value, the maximum supported texture image units
12168 that can be used to access texture maps from the vertex shader. The
12169 value may be 0. See `glActiveTexture'.
12171 `GL_MAX_VERTEX_UNIFORM_COMPONENTS'
12174 PARAMS returns one value, the maximum number of individual
12175 floating-point, integer, or boolean values that can be held in
12176 uniform variable storage for a vertex shader. The value must be at
12177 least 512. See `glUniform'.
12179 `GL_MAX_VIEWPORT_DIMS'
12182 PARAMS returns two values: the maximum supported width and height
12183 of the viewport. These must be at least as large as the visible
12184 dimensions of the display being rendered to. See `glViewport'.
12189 PARAMS returns a single boolean value indicating whether pixel
12190 minmax values are computed. The initial value is `GL_FALSE'. See
12193 `GL_MODELVIEW_MATRIX'
12196 PARAMS returns sixteen values: the modelview matrix on the top of
12197 the modelview matrix stack. Initially this matrix is the identity
12198 matrix. See `glPushMatrix'.
12200 `GL_MODELVIEW_STACK_DEPTH'
12203 PARAMS returns one value, the number of matrices on the modelview
12204 matrix stack. The initial value is 1. See `glPushMatrix'.
12206 `GL_NAME_STACK_DEPTH'
12209 PARAMS returns one value, the number of names on the selection name
12210 stack. The initial value is 0. See `glPushName'.
12215 PARAMS returns a single boolean value, indicating whether the
12216 normal array is enabled. The initial value is `GL_FALSE'. See
12219 `GL_NORMAL_ARRAY_BUFFER_BINDING'
12222 PARAMS returns a single value, the name of the buffer object
12223 associated with the normal array. This buffer object would have
12224 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
12225 recent call to `glNormalPointer'. If no buffer object was bound to
12226 this target, 0 is returned. The initial value is 0. See
12229 `GL_NORMAL_ARRAY_STRIDE'
12232 PARAMS returns one value, the byte offset between consecutive
12233 normals in the normal array. The initial value is 0. See
12236 `GL_NORMAL_ARRAY_TYPE'
12239 PARAMS returns one value, the data type of each coordinate in the
12240 normal array. The initial value is `GL_FLOAT'. See
12246 PARAMS returns a single boolean value indicating whether normals
12247 are automatically scaled to unit length after they have been
12248 transformed to eye coordinates. The initial value is `GL_FALSE'.
12251 `GL_NUM_COMPRESSED_TEXTURE_FORMATS'
12254 PARAMS returns a single integer value indicating the number of
12255 available compressed texture formats. The minimum value is 0. See
12256 `glCompressedTexImage2D'.
12258 `GL_PACK_ALIGNMENT'
12261 PARAMS returns one value, the byte alignment used for writing pixel
12262 data to memory. The initial value is 4. See `glPixelStore'.
12264 `GL_PACK_IMAGE_HEIGHT'
12267 PARAMS returns one value, the image height used for writing pixel
12268 data to memory. The initial value is 0. See `glPixelStore'.
12270 `GL_PACK_LSB_FIRST'
12273 PARAMS returns a single boolean value indicating whether single-bit
12274 pixels being written to memory are written first to the least
12275 significant bit of each unsigned byte. The initial value is
12276 `GL_FALSE'. See `glPixelStore'.
12278 `GL_PACK_ROW_LENGTH'
12281 PARAMS returns one value, the row length used for writing pixel
12282 data to memory. The initial value is 0. See `glPixelStore'.
12284 `GL_PACK_SKIP_IMAGES'
12287 PARAMS returns one value, the number of pixel images skipped before
12288 the first pixel is written into memory. The initial value is 0. See
12291 `GL_PACK_SKIP_PIXELS'
12294 PARAMS returns one value, the number of pixel locations skipped
12295 before the first pixel is written into memory. The initial value is
12296 0. See `glPixelStore'.
12298 `GL_PACK_SKIP_ROWS'
12301 PARAMS returns one value, the number of rows of pixel locations
12302 skipped before the first pixel is written into memory. The initial
12303 value is 0. See `glPixelStore'.
12305 `GL_PACK_SWAP_BYTES'
12308 PARAMS returns a single boolean value indicating whether the bytes
12309 of two-byte and four-byte pixel indices and components are swapped
12310 before being written to memory. The initial value is `GL_FALSE'.
12311 See `glPixelStore'.
12313 `GL_PERSPECTIVE_CORRECTION_HINT'
12316 PARAMS returns one value, a symbolic constant indicating the mode
12317 of the perspective correction hint. The initial value is
12318 `GL_DONT_CARE'. See `glHint'.
12320 `GL_PIXEL_MAP_A_TO_A_SIZE'
12323 PARAMS returns one value, the size of the alpha-to-alpha pixel
12324 translation table. The initial value is 1. See `glPixelMap'.
12326 `GL_PIXEL_MAP_B_TO_B_SIZE'
12329 PARAMS returns one value, the size of the blue-to-blue pixel
12330 translation table. The initial value is 1. See `glPixelMap'.
12332 `GL_PIXEL_MAP_G_TO_G_SIZE'
12335 PARAMS returns one value, the size of the green-to-green pixel
12336 translation table. The initial value is 1. See `glPixelMap'.
12338 `GL_PIXEL_MAP_I_TO_A_SIZE'
12341 PARAMS returns one value, the size of the index-to-alpha pixel
12342 translation table. The initial value is 1. See `glPixelMap'.
12344 `GL_PIXEL_MAP_I_TO_B_SIZE'
12347 PARAMS returns one value, the size of the index-to-blue pixel
12348 translation table. The initial value is 1. See `glPixelMap'.
12350 `GL_PIXEL_MAP_I_TO_G_SIZE'
12353 PARAMS returns one value, the size of the index-to-green pixel
12354 translation table. The initial value is 1. See `glPixelMap'.
12356 `GL_PIXEL_MAP_I_TO_I_SIZE'
12359 PARAMS returns one value, the size of the index-to-index pixel
12360 translation table. The initial value is 1. See `glPixelMap'.
12362 `GL_PIXEL_MAP_I_TO_R_SIZE'
12365 PARAMS returns one value, the size of the index-to-red pixel
12366 translation table. The initial value is 1. See `glPixelMap'.
12368 `GL_PIXEL_MAP_R_TO_R_SIZE'
12371 PARAMS returns one value, the size of the red-to-red pixel
12372 translation table. The initial value is 1. See `glPixelMap'.
12374 `GL_PIXEL_MAP_S_TO_S_SIZE'
12377 PARAMS returns one value, the size of the stencil-to-stencil pixel
12378 translation table. The initial value is 1. See `glPixelMap'.
12380 `GL_PIXEL_PACK_BUFFER_BINDING'
12383 PARAMS returns a single value, the name of the buffer object
12384 currently bound to the target `GL_PIXEL_PACK_BUFFER'. If no buffer
12385 object is bound to this target, 0 is returned. The initial value is
12386 0. See `glBindBuffer'.
12388 `GL_PIXEL_UNPACK_BUFFER_BINDING'
12391 PARAMS returns a single value, the name of the buffer object
12392 currently bound to the target `GL_PIXEL_UNPACK_BUFFER'. If no
12393 buffer object is bound to this target, 0 is returned. The initial
12394 value is 0. See `glBindBuffer'.
12396 `GL_POINT_DISTANCE_ATTENUATION'
12399 PARAMS returns three values, the coefficients for computing the
12400 attenuation value for points. See `glPointParameter'.
12402 `GL_POINT_FADE_THRESHOLD_SIZE'
12405 PARAMS returns one value, the point size threshold for determining
12406 the point size. See `glPointParameter'.
12411 PARAMS returns one value, the point size as specified by
12412 `glPointSize'. The initial value is 1.
12414 `GL_POINT_SIZE_GRANULARITY'
12417 PARAMS returns one value, the size difference between adjacent
12418 supported sizes for antialiased points. See `glPointSize'.
12420 `GL_POINT_SIZE_MAX'
12423 PARAMS returns one value, the upper bound for the attenuated point
12424 sizes. The initial value is 0.0. See `glPointParameter'.
12426 `GL_POINT_SIZE_MIN'
12429 PARAMS returns one value, the lower bound for the attenuated point
12430 sizes. The initial value is 1.0. See `glPointParameter'.
12432 `GL_POINT_SIZE_RANGE'
12435 PARAMS returns two values: the smallest and largest supported sizes
12436 for antialiased points. The smallest size must be at most 1, and
12437 the largest size must be at least 1. See `glPointSize'.
12442 PARAMS returns a single boolean value indicating whether
12443 antialiasing of points is enabled. The initial value is `GL_FALSE'.
12446 `GL_POINT_SMOOTH_HINT'
12449 PARAMS returns one value, a symbolic constant indicating the mode
12450 of the point antialiasing hint. The initial value is
12451 `GL_DONT_CARE'. See `glHint'.
12456 PARAMS returns a single boolean value indicating whether point
12457 sprite is enabled. The initial value is `GL_FALSE'.
12462 PARAMS returns two values: symbolic constants indicating whether
12463 front-facing and back-facing polygons are rasterized as points,
12464 lines, or filled polygons. The initial value is `GL_FILL'. See
12467 `GL_POLYGON_OFFSET_FACTOR'
12470 PARAMS returns one value, the scaling factor used to determine the
12471 variable offset that is added to the depth value of each fragment
12472 generated when a polygon is rasterized. The initial value is 0. See
12475 `GL_POLYGON_OFFSET_UNITS'
12478 PARAMS returns one value. This value is multiplied by an
12479 implementation-specific value and then added to the depth value of
12480 each fragment generated when a polygon is rasterized. The initial
12481 value is 0. See `glPolygonOffset'.
12483 `GL_POLYGON_OFFSET_FILL'
12486 PARAMS returns a single boolean value indicating whether polygon
12487 offset is enabled for polygons in fill mode. The initial value is
12488 `GL_FALSE'. See `glPolygonOffset'.
12490 `GL_POLYGON_OFFSET_LINE'
12493 PARAMS returns a single boolean value indicating whether polygon
12494 offset is enabled for polygons in line mode. The initial value is
12495 `GL_FALSE'. See `glPolygonOffset'.
12497 `GL_POLYGON_OFFSET_POINT'
12500 PARAMS returns a single boolean value indicating whether polygon
12501 offset is enabled for polygons in point mode. The initial value is
12502 `GL_FALSE'. See `glPolygonOffset'.
12504 `GL_POLYGON_SMOOTH'
12507 PARAMS returns a single boolean value indicating whether
12508 antialiasing of polygons is enabled. The initial value is
12509 `GL_FALSE'. See `glPolygonMode'.
12511 `GL_POLYGON_SMOOTH_HINT'
12514 PARAMS returns one value, a symbolic constant indicating the mode
12515 of the polygon antialiasing hint. The initial value is
12516 `GL_DONT_CARE'. See `glHint'.
12518 `GL_POLYGON_STIPPLE'
12521 PARAMS returns a single boolean value indicating whether polygon
12522 stippling is enabled. The initial value is `GL_FALSE'. See
12523 `glPolygonStipple'.
12525 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
12528 PARAMS returns a single boolean value indicating whether post color
12529 matrix transformation lookup is enabled. The initial value is
12530 `GL_FALSE'. See `glColorTable'.
12532 `GL_POST_COLOR_MATRIX_RED_BIAS'
12535 PARAMS returns one value, the red bias factor applied to RGBA
12536 fragments after color matrix transformations. The initial value is
12537 0. See `glPixelTransfer'.
12539 `GL_POST_COLOR_MATRIX_GREEN_BIAS'
12542 PARAMS returns one value, the green bias factor applied to RGBA
12543 fragments after color matrix transformations. The initial value is
12544 0. See `glPixelTransfer'
12546 `GL_POST_COLOR_MATRIX_BLUE_BIAS'
12549 PARAMS returns one value, the blue bias factor applied to RGBA
12550 fragments after color matrix transformations. The initial value is
12551 0. See `glPixelTransfer'.
12553 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'
12556 PARAMS returns one value, the alpha bias factor applied to RGBA
12557 fragments after color matrix transformations. The initial value is
12558 0. See `glPixelTransfer'.
12560 `GL_POST_COLOR_MATRIX_RED_SCALE'
12563 PARAMS returns one value, the red scale factor applied to RGBA
12564 fragments after color matrix transformations. The initial value is
12565 1. See `glPixelTransfer'.
12567 `GL_POST_COLOR_MATRIX_GREEN_SCALE'
12570 PARAMS returns one value, the green scale factor applied to RGBA
12571 fragments after color matrix transformations. The initial value is
12572 1. See `glPixelTransfer'.
12574 `GL_POST_COLOR_MATRIX_BLUE_SCALE'
12577 PARAMS returns one value, the blue scale factor applied to RGBA
12578 fragments after color matrix transformations. The initial value is
12579 1. See `glPixelTransfer'.
12581 `GL_POST_COLOR_MATRIX_ALPHA_SCALE'
12584 PARAMS returns one value, the alpha scale factor applied to RGBA
12585 fragments after color matrix transformations. The initial value is
12586 1. See `glPixelTransfer'.
12588 `GL_POST_CONVOLUTION_COLOR_TABLE'
12591 PARAMS returns a single boolean value indicating whether post
12592 convolution lookup is enabled. The initial value is `GL_FALSE'. See
12595 `GL_POST_CONVOLUTION_RED_BIAS'
12598 PARAMS returns one value, the red bias factor applied to RGBA
12599 fragments after convolution. The initial value is 0. See
12602 `GL_POST_CONVOLUTION_GREEN_BIAS'
12605 PARAMS returns one value, the green bias factor applied to RGBA
12606 fragments after convolution. The initial value is 0. See
12609 `GL_POST_CONVOLUTION_BLUE_BIAS'
12612 PARAMS returns one value, the blue bias factor applied to RGBA
12613 fragments after convolution. The initial value is 0. See
12616 `GL_POST_CONVOLUTION_ALPHA_BIAS'
12619 PARAMS returns one value, the alpha bias factor applied to RGBA
12620 fragments after convolution. The initial value is 0. See
12623 `GL_POST_CONVOLUTION_RED_SCALE'
12626 PARAMS returns one value, the red scale factor applied to RGBA
12627 fragments after convolution. The initial value is 1. See
12630 `GL_POST_CONVOLUTION_GREEN_SCALE'
12633 PARAMS returns one value, the green scale factor applied to RGBA
12634 fragments after convolution. The initial value is 1. See
12637 `GL_POST_CONVOLUTION_BLUE_SCALE'
12640 PARAMS returns one value, the blue scale factor applied to RGBA
12641 fragments after convolution. The initial value is 1. See
12644 `GL_POST_CONVOLUTION_ALPHA_SCALE'
12647 PARAMS returns one value, the alpha scale factor applied to RGBA
12648 fragments after convolution. The initial value is 1. See
12651 `GL_PROJECTION_MATRIX'
12654 PARAMS returns sixteen values: the projection matrix on the top of
12655 the projection matrix stack. Initially this matrix is the identity
12656 matrix. See `glPushMatrix'.
12658 `GL_PROJECTION_STACK_DEPTH'
12661 PARAMS returns one value, the number of matrices on the projection
12662 matrix stack. The initial value is 1. See `glPushMatrix'.
12667 PARAMS returns one value, a symbolic constant indicating which
12668 color buffer is selected for reading. The initial value is
12669 `GL_BACK' if there is a back buffer, otherwise it is `GL_FRONT'.
12670 See `glReadPixels' and `glAccum'.
12675 PARAMS returns one value, the red bias factor used during pixel
12676 transfers. The initial value is 0.
12681 PARAMS returns one value, the number of red bitplanes in each color
12687 PARAMS returns one value, the red scale factor used during pixel
12688 transfers. The initial value is 1. See `glPixelTransfer'.
12693 PARAMS returns one value, a symbolic constant indicating whether
12694 the GL is in render, select, or feedback mode. The initial value is
12695 `GL_RENDER'. See `glRenderMode'.
12697 `GL_RESCALE_NORMAL'
12700 PARAMS returns single boolean value indicating whether normal
12701 rescaling is enabled. See `glEnable'.
12706 PARAMS returns a single boolean value indicating whether the GL is
12707 in RGBA mode (true) or color index mode (false). See `glColor'.
12709 `GL_SAMPLE_BUFFERS'
12712 PARAMS returns a single integer value indicating the number of
12713 sample buffers associated with the framebuffer. See
12714 `glSampleCoverage'.
12716 `GL_SAMPLE_COVERAGE_VALUE'
12719 PARAMS returns a single positive floating-point value indicating
12720 the current sample coverage value. See `glSampleCoverage'.
12722 `GL_SAMPLE_COVERAGE_INVERT'
12725 PARAMS returns a single boolean value indicating if the temporary
12726 coverage value should be inverted. See `glSampleCoverage'.
12731 PARAMS returns a single integer value indicating the coverage mask
12732 size. See `glSampleCoverage'.
12737 PARAMS returns four values: the X and Y window coordinates of the
12738 scissor box, followed by its width and height. Initially the X and
12739 Y window coordinates are both 0 and the width and height are set to
12740 the size of the window. See `glScissor'.
12745 PARAMS returns a single boolean value indicating whether scissoring
12746 is enabled. The initial value is `GL_FALSE'. See `glScissor'.
12748 `GL_SECONDARY_COLOR_ARRAY'
12751 PARAMS returns a single boolean value indicating whether the
12752 secondary color array is enabled. The initial value is `GL_FALSE'.
12753 See `glSecondaryColorPointer'.
12755 `GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING'
12758 PARAMS returns a single value, the name of the buffer object
12759 associated with the secondary color array. This buffer object would
12760 have been bound to the target `GL_ARRAY_BUFFER' at the time of the
12761 most recent call to `glSecondaryColorPointer'. If no buffer object
12762 was bound to this target, 0 is returned. The initial value is 0.
12763 See `glBindBuffer'.
12765 `GL_SECONDARY_COLOR_ARRAY_SIZE'
12768 PARAMS returns one value, the number of components per color in the
12769 secondary color array. The initial value is 3. See
12770 `glSecondaryColorPointer'.
12772 `GL_SECONDARY_COLOR_ARRAY_STRIDE'
12775 PARAMS returns one value, the byte offset between consecutive
12776 colors in the secondary color array. The initial value is 0. See
12777 `glSecondaryColorPointer'.
12779 `GL_SECONDARY_COLOR_ARRAY_TYPE'
12782 PARAMS returns one value, the data type of each component in the
12783 secondary color array. The initial value is `GL_FLOAT'. See
12784 `glSecondaryColorPointer'.
12786 `GL_SELECTION_BUFFER_SIZE'
12789 PARAMS return one value, the size of the selection buffer. See
12795 PARAMS returns a single boolean value indicating whether 2D
12796 separable convolution is enabled. The initial value is `GL_FALSE'.
12797 See `glSeparableFilter2D'.
12802 PARAMS returns one value, a symbolic constant indicating whether
12803 the shading mode is flat or smooth. The initial value is
12804 `GL_SMOOTH'. See `glShadeModel'.
12806 `GL_SMOOTH_LINE_WIDTH_RANGE'
12809 PARAMS returns two values, the smallest and largest supported
12810 widths for antialiased lines. See `glLineWidth'.
12812 `GL_SMOOTH_LINE_WIDTH_GRANULARITY'
12815 PARAMS returns one value, the granularity of widths for antialiased
12816 lines. See `glLineWidth'.
12818 `GL_SMOOTH_POINT_SIZE_RANGE'
12821 PARAMS returns two values, the smallest and largest supported
12822 widths for antialiased points. See `glPointSize'.
12824 `GL_SMOOTH_POINT_SIZE_GRANULARITY'
12827 PARAMS returns one value, the granularity of sizes for antialiased
12828 points. See `glPointSize'.
12830 `GL_STENCIL_BACK_FAIL'
12833 PARAMS returns one value, a symbolic constant indicating what
12834 action is taken for back-facing polygons when the stencil test
12835 fails. The initial value is `GL_KEEP'. See `glStencilOpSeparate'.
12837 `GL_STENCIL_BACK_FUNC'
12840 PARAMS returns one value, a symbolic constant indicating what
12841 function is used for back-facing polygons to compare the stencil
12842 reference value with the stencil buffer value. The initial value is
12843 `GL_ALWAYS'. See `glStencilFuncSeparate'.
12845 `GL_STENCIL_BACK_PASS_DEPTH_FAIL'
12848 PARAMS returns one value, a symbolic constant indicating what
12849 action is taken for back-facing polygons when the stencil test
12850 passes, but the depth test fails. The initial value is `GL_KEEP'.
12851 See `glStencilOpSeparate'.
12853 `GL_STENCIL_BACK_PASS_DEPTH_PASS'
12856 PARAMS returns one value, a symbolic constant indicating what
12857 action is taken for back-facing polygons when the stencil test
12858 passes and the depth test passes. The initial value is `GL_KEEP'.
12859 See `glStencilOpSeparate'.
12861 `GL_STENCIL_BACK_REF'
12864 PARAMS returns one value, the reference value that is compared with
12865 the contents of the stencil buffer for back-facing polygons. The
12866 initial value is 0. See `glStencilFuncSeparate'.
12868 `GL_STENCIL_BACK_VALUE_MASK'
12871 PARAMS returns one value, the mask that is used for back-facing
12872 polygons to mask both the stencil reference value and the stencil
12873 buffer value before they are compared. The initial value is all
12874 1's. See `glStencilFuncSeparate'.
12876 `GL_STENCIL_BACK_WRITEMASK'
12879 PARAMS returns one value, the mask that controls writing of the
12880 stencil bitplanes for back-facing polygons. The initial value is
12881 all 1's. See `glStencilMaskSeparate'.
12886 PARAMS returns one value, the number of bitplanes in the stencil
12889 `GL_STENCIL_CLEAR_VALUE'
12892 PARAMS returns one value, the index to which the stencil bitplanes
12893 are cleared. The initial value is 0. See `glClearStencil'.
12898 PARAMS returns one value, a symbolic constant indicating what
12899 action is taken when the stencil test fails. The initial value is
12900 `GL_KEEP'. See `glStencilOp'. If the GL version is 2.0 or greater,
12901 this stencil state only affects non-polygons and front-facing
12902 polygons. Back-facing polygons use separate stencil state. See
12903 `glStencilOpSeparate'.
12908 PARAMS returns one value, a symbolic constant indicating what
12909 function is used to compare the stencil reference value with the
12910 stencil buffer value. The initial value is `GL_ALWAYS'. See
12911 `glStencilFunc'. If the GL version is 2.0 or greater, this stencil
12912 state only affects non-polygons and front-facing polygons.
12913 Back-facing polygons use separate stencil state. See
12914 `glStencilFuncSeparate'.
12916 `GL_STENCIL_PASS_DEPTH_FAIL'
12919 PARAMS returns one value, a symbolic constant indicating what
12920 action is taken when the stencil test passes, but the depth test
12921 fails. The initial value is `GL_KEEP'. See `glStencilOp'. If the GL
12922 version is 2.0 or greater, this stencil state only affects
12923 non-polygons and front-facing polygons. Back-facing polygons use
12924 separate stencil state. See `glStencilOpSeparate'.
12926 `GL_STENCIL_PASS_DEPTH_PASS'
12929 PARAMS returns one value, a symbolic constant indicating what
12930 action is taken when the stencil test passes and the depth test
12931 passes. The initial value is `GL_KEEP'. See `glStencilOp'. If the
12932 GL version is 2.0 or greater, this stencil state only affects
12933 non-polygons and front-facing polygons. Back-facing polygons use
12934 separate stencil state. See `glStencilOpSeparate'.
12939 PARAMS returns one value, the reference value that is compared with
12940 the contents of the stencil buffer. The initial value is 0. See
12941 `glStencilFunc'. If the GL version is 2.0 or greater, this stencil
12942 state only affects non-polygons and front-facing polygons.
12943 Back-facing polygons use separate stencil state. See
12944 `glStencilFuncSeparate'.
12949 PARAMS returns a single boolean value indicating whether stencil
12950 testing of fragments is enabled. The initial value is `GL_FALSE'.
12951 See `glStencilFunc' and `glStencilOp'.
12953 `GL_STENCIL_VALUE_MASK'
12956 PARAMS returns one value, the mask that is used to mask both the
12957 stencil reference value and the stencil buffer value before they
12958 are compared. The initial value is all 1's. See `glStencilFunc'. If
12959 the GL version is 2.0 or greater, this stencil state only affects
12960 non-polygons and front-facing polygons. Back-facing polygons use
12961 separate stencil state. See `glStencilFuncSeparate'.
12963 `GL_STENCIL_WRITEMASK'
12966 PARAMS returns one value, the mask that controls writing of the
12967 stencil bitplanes. The initial value is all 1's. See
12968 `glStencilMask'. If the GL version is 2.0 or greater, this stencil
12969 state only affects non-polygons and front-facing polygons.
12970 Back-facing polygons use separate stencil state. See
12971 `glStencilMaskSeparate'.
12976 PARAMS returns a single boolean value indicating whether stereo
12977 buffers (left and right) are supported.
12982 PARAMS returns one value, an estimate of the number of bits of
12983 subpixel resolution that are used to position rasterized geometry
12984 in window coordinates. The value must be at least 4.
12989 PARAMS returns a single boolean value indicating whether 1D texture
12990 mapping is enabled. The initial value is `GL_FALSE'. See
12993 `GL_TEXTURE_BINDING_1D'
12996 PARAMS returns a single value, the name of the texture currently
12997 bound to the target `GL_TEXTURE_1D'. The initial value is 0. See
13003 PARAMS returns a single boolean value indicating whether 2D texture
13004 mapping is enabled. The initial value is `GL_FALSE'. See
13007 `GL_TEXTURE_BINDING_2D'
13010 PARAMS returns a single value, the name of the texture currently
13011 bound to the target `GL_TEXTURE_2D'. The initial value is 0. See
13017 PARAMS returns a single boolean value indicating whether 3D texture
13018 mapping is enabled. The initial value is `GL_FALSE'. See
13021 `GL_TEXTURE_BINDING_3D'
13024 PARAMS returns a single value, the name of the texture currently
13025 bound to the target `GL_TEXTURE_3D'. The initial value is 0. See
13028 `GL_TEXTURE_BINDING_CUBE_MAP'
13031 PARAMS returns a single value, the name of the texture currently
13032 bound to the target `GL_TEXTURE_CUBE_MAP'. The initial value is 0.
13033 See `glBindTexture'.
13035 `GL_TEXTURE_COMPRESSION_HINT'
13038 PARAMS returns a single value indicating the mode of the texture
13039 compression hint. The initial value is `GL_DONT_CARE'.
13041 `GL_TEXTURE_COORD_ARRAY'
13044 PARAMS returns a single boolean value indicating whether the
13045 texture coordinate array is enabled. The initial value is
13046 `GL_FALSE'. See `glTexCoordPointer'.
13048 `GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING'
13051 PARAMS returns a single value, the name of the buffer object
13052 associated with the texture coordinate array. This buffer object
13053 would have been bound to the target `GL_ARRAY_BUFFER' at the time
13054 of the most recent call to `glTexCoordPointer'. If no buffer object
13055 was bound to this target, 0 is returned. The initial value is 0.
13056 See `glBindBuffer'.
13058 `GL_TEXTURE_COORD_ARRAY_SIZE'
13061 PARAMS returns one value, the number of coordinates per element in
13062 the texture coordinate array. The initial value is 4. See
13063 `glTexCoordPointer'.
13065 `GL_TEXTURE_COORD_ARRAY_STRIDE'
13068 PARAMS returns one value, the byte offset between consecutive
13069 elements in the texture coordinate array. The initial value is 0.
13070 See `glTexCoordPointer'.
13072 `GL_TEXTURE_COORD_ARRAY_TYPE'
13075 PARAMS returns one value, the data type of the coordinates in the
13076 texture coordinate array. The initial value is `GL_FLOAT'. See
13077 `glTexCoordPointer'.
13079 `GL_TEXTURE_CUBE_MAP'
13082 PARAMS returns a single boolean value indicating whether
13083 cube-mapped texture mapping is enabled. The initial value is
13084 `GL_FALSE'. See `glTexImage2D'.
13089 PARAMS returns a single boolean value indicating whether automatic
13090 generation of the Q texture coordinate is enabled. The initial
13091 value is `GL_FALSE'. See `glTexGen'.
13096 PARAMS returns a single boolean value indicating whether automatic
13097 generation of the R texture coordinate is enabled. The initial
13098 value is `GL_FALSE'. See `glTexGen'.
13103 PARAMS returns a single boolean value indicating whether automatic
13104 generation of the S texture coordinate is enabled. The initial
13105 value is `GL_FALSE'. See `glTexGen'.
13110 PARAMS returns a single boolean value indicating whether automatic
13111 generation of the T texture coordinate is enabled. The initial
13112 value is `GL_FALSE'. See `glTexGen'.
13114 `GL_TEXTURE_MATRIX'
13117 PARAMS returns sixteen values: the texture matrix on the top of the
13118 texture matrix stack. Initially this matrix is the identity matrix.
13119 See `glPushMatrix'.
13121 `GL_TEXTURE_STACK_DEPTH'
13124 PARAMS returns one value, the number of matrices on the texture
13125 matrix stack. The initial value is 1. See `glPushMatrix'.
13127 `GL_TRANSPOSE_COLOR_MATRIX'
13130 PARAMS returns 16 values, the elements of the color matrix in
13131 row-major order. See `glLoadTransposeMatrix'.
13133 `GL_TRANSPOSE_MODELVIEW_MATRIX'
13136 PARAMS returns 16 values, the elements of the modelview matrix in
13137 row-major order. See `glLoadTransposeMatrix'.
13139 `GL_TRANSPOSE_PROJECTION_MATRIX'
13142 PARAMS returns 16 values, the elements of the projection matrix in
13143 row-major order. See `glLoadTransposeMatrix'.
13145 `GL_TRANSPOSE_TEXTURE_MATRIX'
13148 PARAMS returns 16 values, the elements of the texture matrix in
13149 row-major order. See `glLoadTransposeMatrix'.
13151 `GL_UNPACK_ALIGNMENT'
13154 PARAMS returns one value, the byte alignment used for reading pixel
13155 data from memory. The initial value is 4. See `glPixelStore'.
13157 `GL_UNPACK_IMAGE_HEIGHT'
13160 PARAMS returns one value, the image height used for reading pixel
13161 data from memory. The initial is 0. See `glPixelStore'.
13163 `GL_UNPACK_LSB_FIRST'
13166 PARAMS returns a single boolean value indicating whether single-bit
13167 pixels being read from memory are read first from the least
13168 significant bit of each unsigned byte. The initial value is
13169 `GL_FALSE'. See `glPixelStore'.
13171 `GL_UNPACK_ROW_LENGTH'
13174 PARAMS returns one value, the row length used for reading pixel
13175 data from memory. The initial value is 0. See `glPixelStore'.
13177 `GL_UNPACK_SKIP_IMAGES'
13180 PARAMS returns one value, the number of pixel images skipped before
13181 the first pixel is read from memory. The initial value is 0. See
13184 `GL_UNPACK_SKIP_PIXELS'
13187 PARAMS returns one value, the number of pixel locations skipped
13188 before the first pixel is read from memory. The initial value is 0.
13189 See `glPixelStore'.
13191 `GL_UNPACK_SKIP_ROWS'
13194 PARAMS returns one value, the number of rows of pixel locations
13195 skipped before the first pixel is read from memory. The initial
13196 value is 0. See `glPixelStore'.
13198 `GL_UNPACK_SWAP_BYTES'
13201 PARAMS returns a single boolean value indicating whether the bytes
13202 of two-byte and four-byte pixel indices and components are swapped
13203 after being read from memory. The initial value is `GL_FALSE'. See
13209 PARAMS returns a single boolean value indicating whether the vertex
13210 array is enabled. The initial value is `GL_FALSE'. See
13213 `GL_VERTEX_ARRAY_BUFFER_BINDING'
13216 PARAMS returns a single value, the name of the buffer object
13217 associated with the vertex array. This buffer object would have
13218 been bound to the target `GL_ARRAY_BUFFER' at the time of the most
13219 recent call to `glVertexPointer'. If no buffer object was bound to
13220 this target, 0 is returned. The initial value is 0. See
13223 `GL_VERTEX_ARRAY_SIZE'
13226 PARAMS returns one value, the number of coordinates per vertex in
13227 the vertex array. The initial value is 4. See `glVertexPointer'.
13229 `GL_VERTEX_ARRAY_STRIDE'
13232 PARAMS returns one value, the byte offset between consecutive
13233 vertices in the vertex array. The initial value is 0. See
13236 `GL_VERTEX_ARRAY_TYPE'
13239 PARAMS returns one value, the data type of each coordinate in the
13240 vertex array. The initial value is `GL_FLOAT'. See
13243 `GL_VERTEX_PROGRAM_POINT_SIZE'
13246 PARAMS returns a single boolean value indicating whether vertex
13247 program point size mode is enabled. If enabled, and a vertex shader
13248 is active, then the point size is taken from the shader built-in
13249 `gl_PointSize'. If disabled, and a vertex shader is active, then
13250 the point size is taken from the point state as specified by
13251 `glPointSize'. The initial value is `GL_FALSE'.
13253 `GL_VERTEX_PROGRAM_TWO_SIDE'
13256 PARAMS returns a single boolean value indicating whether vertex
13257 program two-sided color mode is enabled. If enabled, and a vertex
13258 shader is active, then the GL chooses the back color output for
13259 back-facing polygons, and the front color output for non-polygons
13260 and front-facing polygons. If disabled, and a vertex shader is
13261 active, then the front color output is always selected. The initial
13262 value is `GL_FALSE'.
13267 PARAMS returns four values: the X and Y window coordinates of the
13268 viewport, followed by its width and height. Initially the X and Y
13269 window coordinates are both set to 0, and the width and height are
13270 set to the width and height of the window into which the GL will do
13271 its rendering. See `glViewport'.
13276 PARAMS returns one value, the X pixel zoom factor. The initial
13277 value is 1. See `glPixelZoom'.
13282 PARAMS returns one value, the Y pixel zoom factor. The initial
13283 value is 1. See `glPixelZoom'.
13285 Many of the boolean parameters can also be queried more easily using
13288 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
13290 `GL_INVALID_OPERATION' is generated if `glGet' is executed between the
13291 execution of `glBegin' and the corresponding execution of `glEnd'.")
13293 (define-gl-procedures
13294 ((glHint (target GLenum) (mode GLenum) -> void))
13295 "Specify implementation-specific hints.
13298 Specifies a symbolic constant indicating the behavior to be
13299 controlled. `GL_FOG_HINT', `GL_GENERATE_MIPMAP_HINT',
13300 `GL_LINE_SMOOTH_HINT', `GL_PERSPECTIVE_CORRECTION_HINT',
13301 `GL_POINT_SMOOTH_HINT', `GL_POLYGON_SMOOTH_HINT',
13302 `GL_TEXTURE_COMPRESSION_HINT', and
13303 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT' are accepted.
13306 Specifies a symbolic constant indicating the desired behavior.
13307 `GL_FASTEST', `GL_NICEST', and `GL_DONT_CARE' are accepted.
13309 Certain aspects of GL behavior, when there is room for interpretation,
13310 can be controlled with hints. A hint is specified with two arguments.
13311 TARGET is a symbolic constant indicating the behavior to be controlled,
13312 and MODE is another symbolic constant indicating the desired behavior.
13313 The initial value for each TARGET is `GL_DONT_CARE'. MODE can be one of
13319 The most efficient option should be chosen.
13324 The most correct, or highest quality, option should be chosen.
13331 Though the implementation aspects that can be hinted are well defined,
13332 the interpretation of the hints depends on the implementation. The hint
13333 aspects that can be specified with TARGET, along with suggested
13334 semantics, are as follows:
13339 Indicates the accuracy of fog calculation. If per-pixel fog
13340 calculation is not efficiently supported by the GL implementation,
13341 hinting `GL_DONT_CARE' or `GL_FASTEST' can result in per-vertex
13342 calculation of fog effects.
13344 `GL_FRAGMENT_SHADER_DERIVATIVE_HINT'
13347 Indicates the accuracy of the derivative calculation for the GL
13348 shading language fragment processing built-in functions: `dFdx',
13349 `dFdy', and `fwidth'.
13351 `GL_GENERATE_MIPMAP_HINT'
13354 Indicates the quality of filtering when generating mipmap images.
13356 `GL_LINE_SMOOTH_HINT'
13359 Indicates the sampling quality of antialiased lines. If a larger
13360 filter function is applied, hinting `GL_NICEST' can result in more
13361 pixel fragments being generated during rasterization.
13363 `GL_PERSPECTIVE_CORRECTION_HINT'
13366 Indicates the quality of color, texture coordinate, and fog
13367 coordinate interpolation. If perspective-corrected parameter
13368 interpolation is not efficiently supported by the GL
13369 implementation, hinting `GL_DONT_CARE' or `GL_FASTEST' can result
13370 in simple linear interpolation of colors and/or texture
13373 `GL_POINT_SMOOTH_HINT'
13376 Indicates the sampling quality of antialiased points. If a larger
13377 filter function is applied, hinting `GL_NICEST' can result in more
13378 pixel fragments being generated during rasterization.
13380 `GL_POLYGON_SMOOTH_HINT'
13383 Indicates the sampling quality of antialiased polygons. Hinting
13384 `GL_NICEST' can result in more pixel fragments being generated
13385 during rasterization, if a larger filter function is applied.
13387 `GL_TEXTURE_COMPRESSION_HINT'
13390 Indicates the quality and performance of the compressing texture
13391 images. Hinting `GL_FASTEST' indicates that texture images should
13392 be compressed as quickly as possible, while `GL_NICEST' indicates
13393 that texture images should be compressed with as little image
13394 quality loss as possible. `GL_NICEST' should be selected if the
13395 texture is to be retrieved by `glGetCompressedTexImage' for reuse.
13397 `GL_INVALID_ENUM' is generated if either TARGET or MODE is not an
13400 `GL_INVALID_OPERATION' is generated if `glHint' is executed between the
13401 execution of `glBegin' and the corresponding execution of `glEnd'.")
13403 (define-gl-procedures
13407 (internalformat GLenum)
13411 "Define histogram table.
13414 The histogram whose parameters are to be set. Must be one of
13415 `GL_HISTOGRAM' or `GL_PROXY_HISTOGRAM'.
13418 The number of entries in the histogram table. Must be a power of 2.
13421 The format of entries in the histogram table. Must be one of
13422 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
13423 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
13424 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
13425 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
13426 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
13427 `GL_LUMINANCE16_ALPHA16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4',
13428 `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16',
13429 `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8',
13430 `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
13433 If `GL_TRUE', pixels will be consumed by the histogramming process
13434 and no drawing or texture loading will take place. If `GL_FALSE',
13435 pixels will proceed to the minmax process after histogramming.
13437 When `GL_HISTOGRAM' is enabled, RGBA color components are converted to
13438 histogram table indices by clamping to the range [0,1], multiplying by
13439 the width of the histogram table, and rounding to the nearest integer.
13440 The table entries selected by the RGBA indices are then incremented. (If
13441 the internal format of the histogram table includes luminance, then the
13442 index derived from the R color component determines the luminance table
13443 entry to be incremented.) If a histogram table entry is incremented
13444 beyond its maximum value, then its value becomes undefined. (This is not
13447 Histogramming is performed only for RGBA pixels (though these may be
13448 specified originally as color indices and converted to RGBA by index
13449 table lookup). Histogramming is enabled with `glEnable' and disabled
13452 When TARGET is `GL_HISTOGRAM', `glHistogram' redefines the current
13453 histogram table to have WIDTH entries of the format specified by
13454 INTERNALFORMAT. The entries are indexed 0 through WIDTH-1 , and all
13455 entries are initialized to zero. The values in the previous histogram
13456 table, if any, are lost. If SINK is `GL_TRUE', then pixels are discarded
13457 after histogramming; no further processing of the pixels takes place,
13458 and no drawing, texture loading, or pixel readback will result.
13460 When TARGET is `GL_PROXY_HISTOGRAM', `glHistogram' computes all state
13461 information as if the histogram table were to be redefined, but does not
13462 actually define the new table. If the requested histogram table is too
13463 large to be supported, then the state information will be set to zero.
13464 This provides a way to determine if a histogram table with the given
13465 parameters can be supported.
13469 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
13472 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or is not a
13475 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
13478 `GL_TABLE_TOO_LARGE' is generated if TARGET is `GL_HISTOGRAM' and the
13479 histogram table specified is too large for the implementation.
13481 `GL_INVALID_OPERATION' is generated if `glHistogram' is executed between
13482 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13484 (define-gl-procedures
13485 ((glIndexMask (mask GLuint) -> void))
13486 "Control the writing of individual bits in the color index buffers.
13489 Specifies a bit mask to enable and disable the writing of
13490 individual bits in the color index buffers. Initially, the mask is
13493 `glIndexMask' controls the writing of individual bits in the color index
13494 buffers. The least significant N bits of MASK, where N is the number of
13495 bits in a color index buffer, specify a mask. Where a 1 (one) appears in
13496 the mask, it's possible to write to the corresponding bit in the color
13497 index buffer (or buffers). Where a 0 (zero) appears, the corresponding
13498 bit is write-protected.
13500 This mask is used only in color index mode, and it affects only the
13501 buffers currently selected for writing (see `glDrawBuffer'). Initially,
13502 all bits are enabled for writing.
13504 `GL_INVALID_OPERATION' is generated if `glIndexMask' is executed between
13505 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13507 (define-gl-procedures
13511 (pointer const-GLvoid-*)
13514 "Define an array of color indexes.
13517 Specifies the data type of each color index in the array. Symbolic
13518 constants `GL_UNSIGNED_BYTE', `GL_SHORT', `GL_INT', `GL_FLOAT', and
13519 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
13522 Specifies the byte offset between consecutive color indexes. If
13523 STRIDE is 0, the color indexes are understood to be tightly packed
13524 in the array. The initial value is 0.
13527 Specifies a pointer to the first index in the array. The initial
13530 `glIndexPointer' specifies the location and data format of an array of
13531 color indexes to use when rendering. TYPE specifies the data type of
13532 each color index and STRIDE specifies the byte stride from one color
13533 index to the next, allowing vertices and attributes to be packed into a
13534 single array or stored in separate arrays.
13536 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
13537 target (see `glBindBuffer') while a color index array is specified,
13538 POINTER is treated as a byte offset into the buffer object's data store.
13539 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
13540 color index vertex array client-side state
13541 (`GL_INDEX_ARRAY_BUFFER_BINDING').
13543 When a color index array is specified, TYPE, STRIDE, and POINTER are
13544 saved as client-side state, in addition to the current vertex array
13545 buffer object binding.
13547 To enable and disable the color index array, call `glEnableClientState'
13548 and `glDisableClientState' with the argument `GL_INDEX_ARRAY'. If
13549 enabled, the color index array is used when `glDrawArrays',
13550 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements',
13551 `glDrawRangeElements', or `glArrayElement' is called.
13553 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
13555 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
13557 (define-gl-procedures
13558 ((glIndexi (c GLint) -> void)
13559 (glIndexf (c GLfloat) -> void)
13560 (glIndexub (c GLubyte) -> void))
13561 "Set the current color index.
13564 Specifies the new value for the current color index.
13568 `glIndex' updates the current (single-valued) color index. It takes one
13569 argument, the new value for the current color index.
13571 The current index is stored as a floating-point value. Integer values
13572 are converted directly to floating-point values, with no special
13573 mapping. The initial value is 1.
13575 Index values outside the representable range of the color index buffer
13576 are not clamped. However, before an index is dithered (if enabled) and
13577 written to the frame buffer, it is converted to fixed-point format. Any
13578 bits in the integer portion of the resulting fixed-point value that do
13579 not correspond to bits in the frame buffer are masked out.")
13581 (define-gl-procedures
13582 ((glInitNames -> void))
13583 "Initialize the name stack.
13585 The name stack is used during selection mode to allow sets of rendering
13586 commands to be uniquely identified. It consists of an ordered set of
13587 unsigned integers. `glInitNames' causes the name stack to be initialized
13588 to its default empty state.
13590 The name stack is always empty while the render mode is not `GL_SELECT'.
13591 Calls to `glInitNames' while the render mode is not `GL_SELECT' are
13594 `GL_INVALID_OPERATION' is generated if `glInitNames' is executed between
13595 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13597 (define-gl-procedures
13598 ((glInterleavedArrays
13601 (pointer const-GLvoid-*)
13604 "Simultaneously specify and enable several interleaved arrays.
13607 Specifies the type of array to enable. Symbolic constants `GL_V2F',
13608 `GL_V3F', `GL_C4UB_V2F', `GL_C4UB_V3F', `GL_C3F_V3F', `GL_N3F_V3F',
13609 `GL_C4F_N3F_V3F', `GL_T2F_V3F', `GL_T4F_V4F', `GL_T2F_C4UB_V3F',
13610 `GL_T2F_C3F_V3F', `GL_T2F_N3F_V3F', `GL_T2F_C4F_N3F_V3F', and
13611 `GL_T4F_C4F_N3F_V4F' are accepted.
13614 Specifies the offset in bytes between each aggregate array element.
13616 `glInterleavedArrays' lets you specify and enable individual color,
13617 normal, texture and vertex arrays whose elements are part of a larger
13618 aggregate array element. For some implementations, this is more
13619 efficient than specifying the arrays separately.
13621 If STRIDE is 0, the aggregate elements are stored consecutively.
13622 Otherwise, STRIDE bytes occur between the beginning of one aggregate
13623 array element and the beginning of the next aggregate array element.
13625 FORMAT serves as a ``key'' describing the extraction of individual
13626 arrays from the aggregate array. If FORMAT contains a T, then texture
13627 coordinates are extracted from the interleaved array. If C is present,
13628 color values are extracted. If N is present, normal coordinates are
13629 extracted. Vertex coordinates are always extracted.
13631 The digits 2, 3, and 4 denote how many values are extracted. F indicates
13632 that values are extracted as floating-point values. Colors may also be
13633 extracted as 4 unsigned bytes if 4UB follows the C. If a color is
13634 extracted as 4 unsigned bytes, the vertex array element which follows is
13635 located at the first possible floating-point aligned address.
13637 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted value.
13639 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
13641 (define-gl-procedures
13642 ((glIsBuffer (buffer GLuint) -> GLboolean))
13643 "Determine if a name corresponds to a buffer object.
13646 Specifies a value that may be the name of a buffer object.
13648 `glIsBuffer' returns `GL_TRUE' if BUFFER is currently the name of a
13649 buffer object. If BUFFER is zero, or is a non-zero value that is not
13650 currently the name of a buffer object, or if an error occurs,
13651 `glIsBuffer' returns `GL_FALSE'.
13653 A name returned by `glGenBuffers', but not yet associated with a buffer
13654 object by calling `glBindBuffer', is not the name of a buffer object.
13656 `GL_INVALID_OPERATION' is generated if `glIsBuffer' is executed between
13657 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13659 (define-gl-procedures
13660 ((glIsEnabled (cap GLenum) -> GLboolean))
13661 "Test whether a capability is enabled.
13664 Specifies a symbolic constant indicating a GL capability.
13666 `glIsEnabled' returns `GL_TRUE' if CAP is an enabled capability and
13667 returns `GL_FALSE' otherwise. Initially all capabilities except
13668 `GL_DITHER' are disabled; `GL_DITHER' is initially enabled.
13670 The following capabilities are accepted for CAP:
13684 `glBlendFunc', `glLogicOp'
13692 `GL_COLOR_LOGIC_OP'
13695 `GL_COLOR_MATERIAL'
13704 `GL_CONVOLUTION_1D'
13705 `glConvolutionFilter1D'
13707 `GL_CONVOLUTION_2D'
13708 `glConvolutionFilter2D'
13714 `glDepthFunc', `glDepthRange'
13719 `GL_EDGE_FLAG_ARRAY'
13720 `glEdgeFlagPointer'
13725 `GL_FOG_COORD_ARRAY'
13726 `glFogCoordPointer'
13734 `GL_INDEX_LOGIC_OP'
13738 `glLightModel', `glLight'
13741 `glMaterial', `glLightModel', `glLight'
13758 `GL_MAP1_TEXTURE_COORD_1'
13761 `GL_MAP1_TEXTURE_COORD_2'
13764 `GL_MAP1_TEXTURE_COORD_3'
13767 `GL_MAP1_TEXTURE_COORD_4'
13779 `GL_MAP2_TEXTURE_COORD_1'
13782 `GL_MAP2_TEXTURE_COORD_2'
13785 `GL_MAP2_TEXTURE_COORD_3'
13788 `GL_MAP2_TEXTURE_COORD_4'
13815 `GL_POLYGON_SMOOTH'
13818 `GL_POLYGON_OFFSET_FILL'
13821 `GL_POLYGON_OFFSET_LINE'
13824 `GL_POLYGON_OFFSET_POINT'
13827 `GL_POLYGON_STIPPLE'
13830 `GL_POST_COLOR_MATRIX_COLOR_TABLE'
13833 `GL_POST_CONVOLUTION_COLOR_TABLE'
13836 `GL_RESCALE_NORMAL'
13839 `GL_SAMPLE_ALPHA_TO_COVERAGE'
13842 `GL_SAMPLE_ALPHA_TO_ONE'
13845 `GL_SAMPLE_COVERAGE'
13851 `GL_SECONDARY_COLOR_ARRAY'
13852 `glSecondaryColorPointer'
13855 `glSeparableFilter2D'
13858 `glStencilFunc', `glStencilOp'
13869 `GL_TEXTURE_COORD_ARRAY'
13870 `glTexCoordPointer'
13872 `GL_TEXTURE_CUBE_MAP'
13890 `GL_VERTEX_PROGRAM_POINT_SIZE'
13893 `GL_VERTEX_PROGRAM_TWO_SIDE'
13898 `GL_INVALID_ENUM' is generated if CAP is not an accepted value.
13900 `GL_INVALID_OPERATION' is generated if `glIsEnabled' is executed between
13901 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13903 (define-gl-procedures
13904 ((glIsList (list GLuint) -> GLboolean))
13905 "Determine if a name corresponds to a display list.
13908 Specifies a potential display list name.
13910 `glIsList' returns `GL_TRUE' if LIST is the name of a display list and
13911 returns `GL_FALSE' if it is not, or if an error occurs.
13913 A name returned by `glGenLists', but not yet associated with a display
13914 list by calling `glNewList', is not the name of a display list.
13916 `GL_INVALID_OPERATION' is generated if `glIsList' is executed between
13917 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13919 (define-gl-procedures
13920 ((glIsProgram (program GLuint) -> GLboolean))
13921 "Determines if a name corresponds to a program object.
13924 Specifies a potential program object.
13926 `glIsProgram' returns `GL_TRUE' if PROGRAM is the name of a program
13927 object previously created with `glCreateProgram' and not yet deleted
13928 with `glDeleteProgram'. If PROGRAM is zero or a non-zero value that is
13929 not the name of a program object, or if an error occurs, `glIsProgram'
13930 returns `GL_FALSE'.
13932 `GL_INVALID_OPERATION' is generated if `glIsProgram' is executed between
13933 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13935 (define-gl-procedures
13936 ((glIsQuery (id GLuint) -> GLboolean))
13937 "Determine if a name corresponds to a query object.
13940 Specifies a value that may be the name of a query object.
13942 `glIsQuery' returns `GL_TRUE' if ID is currently the name of a query
13943 object. If ID is zero, or is a non-zero value that is not currently the
13944 name of a query object, or if an error occurs, `glIsQuery' returns
13947 A name returned by `glGenQueries', but not yet associated with a query
13948 object by calling `glBeginQuery', is not the name of a query object.
13950 `GL_INVALID_OPERATION' is generated if `glIsQuery' is executed between
13951 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13953 (define-gl-procedures
13954 ((glIsShader (shader GLuint) -> GLboolean))
13955 "Determines if a name corresponds to a shader object.
13958 Specifies a potential shader object.
13960 `glIsShader' returns `GL_TRUE' if SHADER is the name of a shader object
13961 previously created with `glCreateShader' and not yet deleted with
13962 `glDeleteShader'. If SHADER is zero or a non-zero value that is not the
13963 name of a shader object, or if an error occurs, `glIsShader ' returns
13966 `GL_INVALID_OPERATION' is generated if `glIsShader' is executed between
13967 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13969 (define-gl-procedures
13970 ((glIsTexture (texture GLuint) -> GLboolean))
13971 "Determine if a name corresponds to a texture.
13974 Specifies a value that may be the name of a texture.
13976 `glIsTexture' returns `GL_TRUE' if TEXTURE is currently the name of a
13977 texture. If TEXTURE is zero, or is a non-zero value that is not
13978 currently the name of a texture, or if an error occurs, `glIsTexture'
13979 returns `GL_FALSE'.
13981 A name returned by `glGenTextures', but not yet associated with a
13982 texture by calling `glBindTexture', is not the name of a texture.
13984 `GL_INVALID_OPERATION' is generated if `glIsTexture' is executed between
13985 the execution of `glBegin' and the corresponding execution of `glEnd'.")
13987 (define-gl-procedures
13998 "Set the lighting model parameters.
14001 Specifies a single-valued lighting model parameter.
14002 `GL_LIGHT_MODEL_LOCAL_VIEWER', `GL_LIGHT_MODEL_COLOR_CONTROL', and
14003 `GL_LIGHT_MODEL_TWO_SIDE' are accepted.
14006 Specifies the value that PARAM will be set to.
14008 `glLightModel' sets the lighting model parameter. PNAME names a
14009 parameter and PARAMS gives the new value. There are three lighting model
14012 `GL_LIGHT_MODEL_AMBIENT'
14015 PARAMS contains four integer or floating-point values that specify
14016 the ambient RGBA intensity of the entire scene. Integer values are
14017 mapped linearly such that the most positive representable value
14018 maps to 1.0, and the most negative representable value maps to -1.0
14019 . Floating-point values are mapped directly. Neither integer nor
14020 floating-point values are clamped. The initial ambient scene
14021 intensity is (0.2, 0.2, 0.2, 1.0).
14023 `GL_LIGHT_MODEL_COLOR_CONTROL'
14026 PARAMS must be either `GL_SEPARATE_SPECULAR_COLOR' or
14027 `GL_SINGLE_COLOR'. `GL_SINGLE_COLOR' specifies that a single color
14028 is generated from the lighting computation for a vertex.
14029 `GL_SEPARATE_SPECULAR_COLOR' specifies that the specular color
14030 computation of lighting be stored separately from the remainder of
14031 the lighting computation. The specular color is summed into the
14032 generated fragment's color after the application of texture mapping
14033 (if enabled). The initial value is `GL_SINGLE_COLOR'.
14035 `GL_LIGHT_MODEL_LOCAL_VIEWER'
14038 PARAMS is a single integer or floating-point value that specifies
14039 how specular reflection angles are computed. If PARAMS is 0 (or
14040 0.0), specular reflection angles take the view direction to be
14041 parallel to and in the direction of the -Z axis, regardless of the
14042 location of the vertex in eye coordinates. Otherwise, specular
14043 reflections are computed from the origin of the eye coordinate
14044 system. The initial value is 0.
14046 `GL_LIGHT_MODEL_TWO_SIDE'
14049 PARAMS is a single integer or floating-point value that specifies
14050 whether one- or two-sided lighting calculations are done for
14051 polygons. It has no effect on the lighting calculations for points,
14052 lines, or bitmaps. If PARAMS is 0 (or 0.0), one-sided lighting is
14053 specified, and only the FRONT material parameters are used in the
14054 lighting equation. Otherwise, two-sided lighting is specified. In
14055 this case, vertices of back-facing polygons are lighted using the
14056 BACK material parameters and have their normals reversed before the
14057 lighting equation is evaluated. Vertices of front-facing polygons
14058 are always lighted using the FRONT material parameters, with no
14059 change to their normals. The initial value is 0.
14061 In RGBA mode, the lighted color of a vertex is the sum of the material
14062 emission intensity, the product of the material ambient reflectance and
14063 the lighting model full-scene ambient intensity, and the contribution of
14064 each enabled light source. Each light source contributes the sum of
14065 three terms: ambient, diffuse, and specular. The ambient light source
14066 contribution is the product of the material ambient reflectance and the
14067 light's ambient intensity. The diffuse light source contribution is the
14068 product of the material diffuse reflectance, the light's diffuse
14069 intensity, and the dot product of the vertex's normal with the
14070 normalized vector from the vertex to the light source. The specular
14071 light source contribution is the product of the material specular
14072 reflectance, the light's specular intensity, and the dot product of the
14073 normalized vertex-to-eye and vertex-to-light vectors, raised to the
14074 power of the shininess of the material. All three light source
14075 contributions are attenuated equally based on the distance from the
14076 vertex to the light source and on light source direction, spread
14077 exponent, and spread cutoff angle. All dot products are replaced with 0
14078 if they evaluate to a negative value.
14080 The alpha component of the resulting lighted color is set to the alpha
14081 value of the material diffuse reflectance.
14083 In color index mode, the value of the lighted index of a vertex ranges
14084 from the ambient to the specular values passed to `glMaterial' using
14085 `GL_COLOR_INDEXES'. Diffuse and specular coefficients, computed with a
14086 (.30, .59, .11) weighting of the lights' colors, the shininess of the
14087 material, and the same reflection and attenuation equations as in the
14088 RGBA case, determine how much above ambient the resulting index is.
14090 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
14092 `GL_INVALID_ENUM' is generated if PNAME is
14093 `GL_LIGHT_MODEL_COLOR_CONTROL' and PARAMS is not one of
14094 `GL_SINGLE_COLOR' or `GL_SEPARATE_SPECULAR_COLOR'.
14096 `GL_INVALID_OPERATION' is generated if `glLightModel' is executed
14097 between the execution of `glBegin' and the corresponding execution of
14100 (define-gl-procedures
14113 "Set light source parameters.
14116 Specifies a light. The number of lights depends on the
14117 implementation, but at least eight lights are supported. They are
14118 identified by symbolic names of the form `GL_LIGHT' I , where i
14119 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1.
14122 Specifies a single-valued light source parameter for LIGHT.
14123 `GL_SPOT_EXPONENT', `GL_SPOT_CUTOFF', `GL_CONSTANT_ATTENUATION',
14124 `GL_LINEAR_ATTENUATION', and `GL_QUADRATIC_ATTENUATION' are
14128 Specifies the value that parameter PNAME of light source LIGHT will
14131 `glLight' sets the values of individual light source parameters. LIGHT
14132 names the light and is a symbolic name of the form `GL_LIGHT'I , where i
14133 ranges from 0 to the value of `GL_MAX_LIGHTS' - 1. PNAME specifies one
14134 of ten light source parameters, again by symbolic name. PARAMS is either
14135 a single value or a pointer to an array that contains the new values.
14137 To enable and disable lighting calculation, call `glEnable' and
14138 `glDisable' with argument `GL_LIGHTING'. Lighting is initially disabled.
14139 When it is enabled, light sources that are enabled contribute to the
14140 lighting calculation. Light source I is enabled and disabled using
14141 `glEnable' and `glDisable' with argument `GL_LIGHT'I .
14143 The ten light parameters are as follows:
14146 PARAMS contains four integer or floating-point values that specify
14147 the ambient RGBA intensity of the light. Integer values are mapped
14148 linearly such that the most positive representable value maps to
14149 1.0, and the most negative representable value maps to -1.0 .
14150 Floating-point values are mapped directly. Neither integer nor
14151 floating-point values are clamped. The initial ambient light
14152 intensity is (0, 0, 0, 1).
14155 PARAMS contains four integer or floating-point values that specify
14156 the diffuse RGBA intensity of the light. Integer values are mapped
14157 linearly such that the most positive representable value maps to
14158 1.0, and the most negative representable value maps to -1.0 .
14159 Floating-point values are mapped directly. Neither integer nor
14160 floating-point values are clamped. The initial value for
14161 `GL_LIGHT0' is (1, 1, 1, 1); for other lights, the initial value is
14165 PARAMS contains four integer or floating-point values that specify
14166 the specular RGBA intensity of the light. Integer values are mapped
14167 linearly such that the most positive representable value maps to
14168 1.0, and the most negative representable value maps to -1.0 .
14169 Floating-point values are mapped directly. Neither integer nor
14170 floating-point values are clamped. The initial value for
14171 `GL_LIGHT0' is (1, 1, 1, 1); for other lights, the initial value is
14175 PARAMS contains four integer or floating-point values that specify
14176 the position of the light in homogeneous object coordinates. Both
14177 integer and floating-point values are mapped directly. Neither
14178 integer nor floating-point values are clamped.
14180 The position is transformed by the modelview matrix when `glLight'
14181 is called (just as if it were a point), and it is stored in eye
14182 coordinates. If the W component of the position is 0, the light is
14183 treated as a directional source. Diffuse and specular lighting
14184 calculations take the light's direction, but not its actual
14185 position, into account, and attenuation is disabled. Otherwise,
14186 diffuse and specular lighting calculations are based on the actual
14187 location of the light in eye coordinates, and attenuation is
14188 enabled. The initial position is (0, 0, 1, 0); thus, the initial
14189 light source is directional, parallel to, and in the direction of
14192 `GL_SPOT_DIRECTION'
14193 PARAMS contains three integer or floating-point values that specify
14194 the direction of the light in homogeneous object coordinates. Both
14195 integer and floating-point values are mapped directly. Neither
14196 integer nor floating-point values are clamped.
14198 The spot direction is transformed by the upper 3x3 of the modelview
14199 matrix when `glLight' is called, and it is stored in eye
14200 coordinates. It is significant only when `GL_SPOT_CUTOFF' is not
14201 180, which it is initially. The initial direction is (0,0-1) .
14204 PARAMS is a single integer or floating-point value that specifies
14205 the intensity distribution of the light. Integer and floating-point
14206 values are mapped directly. Only values in the range [0,128] are
14209 Effective light intensity is attenuated by the cosine of the angle
14210 between the direction of the light and the direction from the light
14211 to the vertex being lighted, raised to the power of the spot
14212 exponent. Thus, higher spot exponents result in a more focused
14213 light source, regardless of the spot cutoff angle (see
14214 `GL_SPOT_CUTOFF', next paragraph). The initial spot exponent is 0,
14215 resulting in uniform light distribution.
14218 PARAMS is a single integer or floating-point value that specifies
14219 the maximum spread angle of a light source. Integer and
14220 floating-point values are mapped directly. Only values in the range
14221 [0,90] and the special value 180 are accepted. If the angle between
14222 the direction of the light and the direction from the light to the
14223 vertex being lighted is greater than the spot cutoff angle, the
14224 light is completely masked. Otherwise, its intensity is controlled
14225 by the spot exponent and the attenuation factors. The initial spot
14226 cutoff is 180, resulting in uniform light distribution.
14228 `GL_CONSTANT_ATTENUATION'
14229 `GL_LINEAR_ATTENUATION'
14230 `GL_QUADRATIC_ATTENUATION'
14231 PARAMS is a single integer or floating-point value that specifies
14232 one of the three light attenuation factors. Integer and
14233 floating-point values are mapped directly. Only nonnegative values
14234 are accepted. If the light is positional, rather than directional,
14235 its intensity is attenuated by the reciprocal of the sum of the
14236 constant factor, the linear factor times the distance between the
14237 light and the vertex being lighted, and the quadratic factor times
14238 the square of the same distance. The initial attenuation factors
14239 are (1, 0, 0), resulting in no attenuation.
14241 `GL_INVALID_ENUM' is generated if either LIGHT or PNAME is not an
14244 `GL_INVALID_VALUE' is generated if a spot exponent value is specified
14245 outside the range [0,128] , or if spot cutoff is specified outside the
14246 range [0,90] (except for the special value 180), or if a negative
14247 attenuation factor is specified.
14249 `GL_INVALID_OPERATION' is generated if `glLight' is executed between the
14250 execution of `glBegin' and the corresponding execution of `glEnd'.")
14252 (define-gl-procedures
14258 "Specify the line stipple pattern.
14261 Specifies a multiplier for each bit in the line stipple pattern. If
14262 FACTOR is 3, for example, each bit in the pattern is used three
14263 times before the next bit in the pattern is used. FACTOR is clamped
14264 to the range [1, 256] and defaults to 1.
14267 Specifies a 16-bit integer whose bit pattern determines which
14268 fragments of a line will be drawn when the line is rasterized. Bit
14269 zero is used first; the default pattern is all 1's.
14271 Line stippling masks out certain fragments produced by rasterization;
14272 those fragments will not be drawn. The masking is achieved by using
14273 three parameters: the 16-bit line stipple pattern PATTERN, the repeat
14274 count FACTOR, and an integer stipple counter S .
14276 Counter S is reset to 0 whenever `glBegin' is called and before each
14277 line segment of a `glBegin'(`GL_LINES')/`glEnd' sequence is generated.
14278 It is incremented after each fragment of a unit width aliased line
14279 segment is generated or after each I fragments of an I width line
14280 segment are generated. The I fragments associated with count S are
14283 PATTERN bit (S/FACTOR,)%16
14285 is 0, otherwise these fragments are sent to the frame buffer. Bit zero
14286 of PATTERN is the least significant bit.
14288 Antialiased lines are treated as a sequence of 1×WIDTH rectangles for
14289 purposes of stippling. Whether rectangle S is rasterized or not depends
14290 on the fragment rule described for aliased lines, counting rectangles
14291 rather than groups of fragments.
14293 To enable and disable line stippling, call `glEnable' and `glDisable'
14294 with argument `GL_LINE_STIPPLE'. When enabled, the line stipple pattern
14295 is applied as described above. When disabled, it is as if the pattern
14296 were all 1's. Initially, line stippling is disabled.
14298 `GL_INVALID_OPERATION' is generated if `glLineStipple' is executed
14299 between the execution of `glBegin' and the corresponding execution of
14302 (define-gl-procedures
14303 ((glLineWidth (width GLfloat) -> void))
14304 "Specify the width of rasterized lines.
14307 Specifies the width of rasterized lines. The initial value is 1.
14309 `glLineWidth' specifies the rasterized width of both aliased and
14310 antialiased lines. Using a line width other than 1 has different
14311 effects, depending on whether line antialiasing is enabled. To enable
14312 and disable line antialiasing, call `glEnable' and `glDisable' with
14313 argument `GL_LINE_SMOOTH'. Line antialiasing is initially disabled.
14315 If line antialiasing is disabled, the actual width is determined by
14316 rounding the supplied width to the nearest integer. (If the rounding
14317 results in the value 0, it is as if the line width were 1.) If
14318 ∣ΔX,∣>=∣ΔY,∣ , I pixels are filled in each column that is rasterized,
14319 where I is the rounded value of WIDTH. Otherwise, I pixels are filled in
14320 each row that is rasterized.
14322 If antialiasing is enabled, line rasterization produces a fragment for
14323 each pixel square that intersects the region lying within the rectangle
14324 having width equal to the current line width, length equal to the actual
14325 length of the line, and centered on the mathematical line segment. The
14326 coverage value for each fragment is the window coordinate area of the
14327 intersection of the rectangular region with the corresponding pixel
14328 square. This value is saved and used in the final rasterization step.
14330 Not all widths can be supported when line antialiasing is enabled. If an
14331 unsupported width is requested, the nearest supported width is used.
14332 Only width 1 is guaranteed to be supported; others depend on the
14333 implementation. Likewise, there is a range for aliased line widths as
14334 well. To query the range of supported widths and the size difference
14335 between supported widths within the range, call `glGet' with arguments
14336 `GL_ALIASED_LINE_WIDTH_RANGE', `GL_SMOOTH_LINE_WIDTH_RANGE', and
14337 `GL_SMOOTH_LINE_WIDTH_GRANULARITY'.
14339 `GL_INVALID_VALUE' is generated if WIDTH is less than or equal to 0.
14341 `GL_INVALID_OPERATION' is generated if `glLineWidth' is executed between
14342 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14344 (define-gl-procedures
14345 ((glLinkProgram (program GLuint) -> void))
14346 "Links a program object.
14349 Specifies the handle of the program object to be linked.
14351 `glLinkProgram' links the program object specified by PROGRAM. If any
14352 shader objects of type `GL_VERTEX_SHADER' are attached to PROGRAM, they
14353 will be used to create an executable that will run on the programmable
14354 vertex processor. If any shader objects of type `GL_FRAGMENT_SHADER' are
14355 attached to PROGRAM, they will be used to create an executable that will
14356 run on the programmable fragment processor.
14358 The status of the link operation will be stored as part of the program
14359 object's state. This value will be set to `GL_TRUE' if the program
14360 object was linked without errors and is ready for use, and `GL_FALSE'
14361 otherwise. It can be queried by calling `glGetProgram' with arguments
14362 PROGRAM and `GL_LINK_STATUS'.
14364 As a result of a successful link operation, all active user-defined
14365 uniform variables belonging to PROGRAM will be initialized to 0, and
14366 each of the program object's active uniform variables will be assigned a
14367 location that can be queried by calling `glGetUniformLocation'. Also,
14368 any active user-defined attribute variables that have not been bound to
14369 a generic vertex attribute index will be bound to one at this time.
14371 Linking of a program object can fail for a number of reasons as
14372 specified in the OPENGL SHADING LANGUAGE SPECIFICATION. The following
14373 lists some of the conditions that will cause a link error.
14375 * The storage limit for uniform variables has been exceeded.
14377 * The number of active uniform variables supported by the
14378 implementation has been exceeded.
14380 * The `main' function is missing for the vertex shader or the
14383 * A varying variable actually used in the fragment shader is not
14384 declared in the same way (or is not declared at all) in the vertex
14387 * A reference to a function or variable name is unresolved.
14389 * A shared global is declared with two different types or two
14390 different initial values.
14392 * One or more of the attached shader objects has not been
14393 successfully compiled.
14395 * Binding a generic attribute matrix caused some rows of the matrix
14396 to fall outside the allowed maximum of `GL_MAX_VERTEX_ATTRIBS'.
14398 * Not enough contiguous vertex attribute slots could be found to bind
14399 attribute matrices.
14401 When a program object has been successfully linked, the program object
14402 can be made part of current state by calling `glUseProgram'. Whether or
14403 not the link operation was successful, the program object's information
14404 log will be overwritten. The information log can be retrieved by calling
14405 `glGetProgramInfoLog'.
14407 `glLinkProgram' will also install the generated executables as part of
14408 the current rendering state if the link operation was successful and the
14409 specified program object is already currently in use as a result of a
14410 previous call to `glUseProgram'. If the program object currently in use
14411 is relinked unsuccessfully, its link status will be set to `GL_FALSE' ,
14412 but the executables and associated state will remain part of the current
14413 state until a subsequent call to `glUseProgram' removes it from use.
14414 After it is removed from use, it cannot be made part of current state
14415 until it has been successfully relinked.
14417 If PROGRAM contains shader objects of type `GL_VERTEX_SHADER' but does
14418 not contain shader objects of type `GL_FRAGMENT_SHADER', the vertex
14419 shader will be linked against the implicit interface for fixed
14420 functionality fragment processing. Similarly, if PROGRAM contains shader
14421 objects of type `GL_FRAGMENT_SHADER' but it does not contain shader
14422 objects of type `GL_VERTEX_SHADER', the fragment shader will be linked
14423 against the implicit interface for fixed functionality vertex
14426 The program object's information log is updated and the program is
14427 generated at the time of the link operation. After the link operation,
14428 applications are free to modify attached shader objects, compile
14429 attached shader objects, detach shader objects, delete shader objects,
14430 and attach additional shader objects. None of these operations affects
14431 the information log or the program that is part of the program object.
14433 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
14436 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
14438 `GL_INVALID_OPERATION' is generated if `glLinkProgram' is executed
14439 between the execution of `glBegin' and the corresponding execution of
14442 (define-gl-procedures
14443 ((glListBase (base GLuint) -> void))
14444 "Set the display-list base for .
14447 Specifies an integer offset that will be added to `glCallLists'
14448 offsets to generate display-list names. The initial value is 0.
14450 `glCallLists' specifies an array of offsets. Display-list names are
14451 generated by adding BASE to each offset. Names that reference valid
14452 display lists are executed; the others are ignored.
14454 `GL_INVALID_OPERATION' is generated if `glListBase' is executed between
14455 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14457 (define-gl-procedures
14458 ((glLoadIdentity -> void))
14459 "Replace the current matrix with the identity matrix.
14461 `glLoadIdentity' replaces the current matrix with the identity matrix.
14462 It is semantically equivalent to calling `glLoadMatrix' with the
14467 ((1 0 0 0), (0 1 0 0), (0 0 1 0), (0 0 0 1),,)
14471 but in some cases it is more efficient.
14473 `GL_INVALID_OPERATION' is generated if `glLoadIdentity' is executed
14474 between the execution of `glBegin' and the corresponding execution of
14477 (define-gl-procedures
14478 ((glLoadMatrixf (m const-GLfloat-*) -> void))
14479 "Replace the current matrix with the specified matrix.
14482 Specifies a pointer to 16 consecutive values, which are used as the
14483 elements of a 4×4 column-major matrix.
14485 `glLoadMatrix' replaces the current matrix with the one whose elements
14486 are specified by M. The current matrix is the projection matrix,
14487 modelview matrix, or texture matrix, depending on the current matrix
14488 mode (see `glMatrixMode').
14490 The current matrix, M, defines a transformation of coordinates. For
14491 instance, assume M refers to the modelview matrix. If
14492 V=(V\u2061[0,],V\u2061[1,]V\u2061[2,]V\u2061[3,]) is the set of object coordinates of a
14493 vertex, and M points to an array of 16 single- or double-precision
14494 floating-point values M={M\u2061[0,],M\u2061[1,]...M\u2061[15,]} , then the modelview
14495 transformation M\u2061(V,) does the following:
14497 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,]),
14498 (M\u2061[2,] M\u2061[6,] M\u2061[10,] M\u2061[14,]), (M\u2061[3,] M\u2061[7,] M\u2061[11,]
14499 M\u2061[15,]),)×((V\u2061[0,]), (V\u2061[1,]), (V\u2061[2,]), (V\u2061[3,]),)
14503 Projection and texture transformations are similarly defined.
14505 `GL_INVALID_OPERATION' is generated if `glLoadMatrix' is executed
14506 between the execution of `glBegin' and the corresponding execution of
14509 (define-gl-procedures
14510 ((glLoadName (name GLuint) -> void))
14511 "Load a name onto the name stack.
14514 Specifies a name that will replace the top value on the name stack.
14516 The name stack is used during selection mode to allow sets of rendering
14517 commands to be uniquely identified. It consists of an ordered set of
14518 unsigned integers and is initially empty.
14520 `glLoadName' causes NAME to replace the value on the top of the name
14523 The name stack is always empty while the render mode is not `GL_SELECT'.
14524 Calls to `glLoadName' while the render mode is not `GL_SELECT' are
14527 `GL_INVALID_OPERATION' is generated if `glLoadName' is called while the
14528 name stack is empty.
14530 `GL_INVALID_OPERATION' is generated if `glLoadName' is executed between
14531 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14533 (define-gl-procedures
14534 ((glLoadTransposeMatrixf
14535 (m const-GLfloat-*)
14538 "Replace the current matrix with the specified row-major ordered matrix.
14541 Specifies a pointer to 16 consecutive values, which are used as the
14542 elements of a 4×4 row-major matrix.
14544 `glLoadTransposeMatrix' replaces the current matrix with the one whose
14545 elements are specified by M. The current matrix is the projection
14546 matrix, modelview matrix, or texture matrix, depending on the current
14547 matrix mode (see `glMatrixMode').
14549 The current matrix, M, defines a transformation of coordinates. For
14550 instance, assume M refers to the modelview matrix. If
14551 V=(V\u2061[0,],V\u2061[1,]V\u2061[2,]V\u2061[3,]) is the set of object coordinates of a
14552 vertex, and M points to an array of 16 single- or double-precision
14553 floating-point values M={M\u2061[0,],M\u2061[1,]...M\u2061[15,]} , then the modelview
14554 transformation M\u2061(V,) does the following:
14556 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,]),
14557 (M\u2061[8,] M\u2061[9,] M\u2061[10,] M\u2061[11,]), (M\u2061[12,] M\u2061[13,] M\u2061[14,]
14558 M\u2061[15,]),)×((V\u2061[0,]), (V\u2061[1,]), (V\u2061[2,]), (V\u2061[3,]),)
14562 Projection and texture transformations are similarly defined.
14564 Calling `glLoadTransposeMatrix' with matrix M is identical in operation
14565 to `glLoadMatrix' with M^T , where T represents the transpose.
14567 `GL_INVALID_OPERATION' is generated if `glLoadTransposeMatrix' is
14568 executed between the execution of `glBegin' and the corresponding
14569 execution of `glEnd'.")
14571 (define-gl-procedures
14572 ((glLogicOp (opcode GLenum) -> void))
14573 "Specify a logical pixel operation for color index rendering.
14576 Specifies a symbolic constant that selects a logical operation. The
14577 following symbols are accepted: `GL_CLEAR', `GL_SET', `GL_COPY',
14578 `GL_COPY_INVERTED', `GL_NOOP', `GL_INVERT', `GL_AND', `GL_NAND',
14579 `GL_OR', `GL_NOR', `GL_XOR', `GL_EQUIV', `GL_AND_REVERSE',
14580 `GL_AND_INVERTED', `GL_OR_REVERSE', and `GL_OR_INVERTED'. The
14581 initial value is `GL_COPY'.
14583 `glLogicOp' specifies a logical operation that, when enabled, is applied
14584 between the incoming color index or RGBA color and the color index or
14585 RGBA color at the corresponding location in the frame buffer. To enable
14586 or disable the logical operation, call `glEnable' and `glDisable' using
14587 the symbolic constant `GL_COLOR_LOGIC_OP' for RGBA mode or
14588 `GL_INDEX_LOGIC_OP' for color index mode. The initial value is disabled
14589 for both operations.
14594 *Resulting Operation*
14644 OPCODE is a symbolic constant chosen from the list above. In the
14645 explanation of the logical operations, S represents the incoming color
14646 index and D represents the index in the frame buffer. Standard
14647 C-language operators are used. As these bitwise operators suggest, the
14648 logical operation is applied independently to each bit pair of the
14649 source and destination indices or colors.
14651 `GL_INVALID_ENUM' is generated if OPCODE is not an accepted value.
14653 `GL_INVALID_OPERATION' is generated if `glLogicOp' is executed between
14654 the execution of `glBegin' and the corresponding execution of `glEnd'.")
14656 (define-gl-procedures
14663 (points const-GLfloat-*)
14666 "Define a one-dimensional evaluator.
14669 Specifies the kind of values that are generated by the evaluator.
14670 Symbolic constants `GL_MAP1_VERTEX_3', `GL_MAP1_VERTEX_4',
14671 `GL_MAP1_INDEX', `GL_MAP1_COLOR_4', `GL_MAP1_NORMAL',
14672 `GL_MAP1_TEXTURE_COORD_1', `GL_MAP1_TEXTURE_COORD_2',
14673 `GL_MAP1_TEXTURE_COORD_3', and `GL_MAP1_TEXTURE_COORD_4' are
14679 Specify a linear mapping of U , as presented to `glEvalCoord1', to
14680 U^ , the variable that is evaluated by the equations specified by
14684 Specifies the number of floats or doubles between the beginning of
14685 one control point and the beginning of the next one in the data
14686 structure referenced in POINTS. This allows control points to be
14687 embedded in arbitrary data structures. The only constraint is that
14688 the values for a particular control point must occupy contiguous
14692 Specifies the number of control points. Must be positive.
14695 Specifies a pointer to the array of control points.
14697 Evaluators provide a way to use polynomial or rational polynomial
14698 mapping to produce vertices, normals, texture coordinates, and colors.
14699 The values produced by an evaluator are sent to further stages of GL
14700 processing just as if they had been presented using `glVertex',
14701 `glNormal', `glTexCoord', and `glColor' commands, except that the
14702 generated values do not update the current normal, texture coordinates,
14705 All polynomial or rational polynomial splines of any degree (up to the
14706 maximum degree supported by the GL implementation) can be described
14707 using evaluators. These include almost all splines used in computer
14708 graphics: B-splines, Bezier curves, Hermite splines, and so on.
14710 Evaluators define curves based on Bernstein polynomials. Define P\u2061(U^,)
14713 P\u2061(U^,)=ΣI=0NB_I,^N\u2061(U^,)\u2062R_I
14717 where R_I is a control point and B_I,^N\u2061(U^,) is the I th Bernstein
14718 polynomial of degree N (ORDER = N+1 ):
14720 B_I,^N\u2061(U^,)=((N), (I),,)\u2062U^,^I\u2062(1-U^,)^N-I,,
14724 0^0==1 and ((N), (0),,)==1
14726 `glMap1' is used to define the basis and to specify what kind of values
14727 are produced. Once defined, a map can be enabled and disabled by calling
14728 `glEnable' and `glDisable' with the map name, one of the nine predefined
14729 values for TARGET described below. `glEvalCoord1' evaluates the
14730 one-dimensional maps that are enabled. When `glEvalCoord1' presents a
14731 value U , the Bernstein functions are evaluated using U^ , where
14734 TARGET is a symbolic constant that indicates what kind of control points
14735 are provided in POINTS, and what output is generated when the map is
14736 evaluated. It can assume one of nine predefined values:
14739 Each control point is three floating-point values representing X ,
14740 Y , and Z . Internal `glVertex3' commands are generated when the
14744 Each control point is four floating-point values representing X , Y
14745 , Z , and W . Internal `glVertex4' commands are generated when the
14749 Each control point is a single floating-point value representing a
14750 color index. Internal `glIndex' commands are generated when the map
14751 is evaluated but the current index is not updated with the value of
14752 these `glIndex' commands.
14755 Each control point is four floating-point values representing red,
14756 green, blue, and alpha. Internal `glColor4' commands are generated
14757 when the map is evaluated but the current color is not updated with
14758 the value of these `glColor4' commands.
14761 Each control point is three floating-point values representing the
14762 X , Y , and Z components of a normal vector. Internal `glNormal'
14763 commands are generated when the map is evaluated but the current
14764 normal is not updated with the value of these `glNormal' commands.
14766 `GL_MAP1_TEXTURE_COORD_1'
14767 Each control point is a single floating-point value representing
14768 the S texture coordinate. Internal `glTexCoord1' commands are
14769 generated when the map is evaluated but the current texture
14770 coordinates are not updated with the value of these `glTexCoord'
14773 `GL_MAP1_TEXTURE_COORD_2'
14774 Each control point is two floating-point values representing the S
14775 and T texture coordinates. Internal `glTexCoord2' commands are
14776 generated when the map is evaluated but the current texture
14777 coordinates are not updated with the value of these `glTexCoord'
14780 `GL_MAP1_TEXTURE_COORD_3'
14781 Each control point is three floating-point values representing the
14782 S , T , and R texture coordinates. Internal `glTexCoord3' commands
14783 are generated when the map is evaluated but the current texture
14784 coordinates are not updated with the value of these `glTexCoord'
14787 `GL_MAP1_TEXTURE_COORD_4'
14788 Each control point is four floating-point values representing the S
14789 , T , R , and Q texture coordinates. Internal `glTexCoord4'
14790 commands are generated when the map is evaluated but the current
14791 texture coordinates are not updated with the value of these
14792 `glTexCoord' commands.
14794 STRIDE, ORDER, and POINTS define the array addressing for accessing the
14795 control points. POINTS is the location of the first control point, which
14796 occupies one, two, three, or four contiguous memory locations, depending
14797 on which map is being defined. ORDER is the number of control points in
14798 the array. STRIDE specifies how many float or double locations to
14799 advance the internal memory pointer to reach the next control point.
14801 `GL_INVALID_ENUM' is generated if TARGET is not an accepted value.
14803 `GL_INVALID_VALUE' is generated if U1 is equal to U2.
14805 `GL_INVALID_VALUE' is generated if STRIDE is less than the number of
14806 values in a control point.
14808 `GL_INVALID_VALUE' is generated if ORDER is less than 1 or greater than
14809 the return value of `GL_MAX_EVAL_ORDER'.
14811 `GL_INVALID_OPERATION' is generated if `glMap1' is executed between the
14812 execution of `glBegin' and the corresponding execution of `glEnd'.
14814 `GL_INVALID_OPERATION' is generated if `glMap1' is called and the value
14815 of `GL_ACTIVE_TEXTURE' is not `GL_TEXTURE0'.")
14817 (define-gl-procedures
14828 (points const-GLfloat-*)
14831 "Define a two-dimensional evaluator.
14834 Specifies the kind of values that are generated by the evaluator.
14835 Symbolic constants `GL_MAP2_VERTEX_3', `GL_MAP2_VERTEX_4',
14836 `GL_MAP2_INDEX', `GL_MAP2_COLOR_4', `GL_MAP2_NORMAL',
14837 `GL_MAP2_TEXTURE_COORD_1', `GL_MAP2_TEXTURE_COORD_2',
14838 `GL_MAP2_TEXTURE_COORD_3', and `GL_MAP2_TEXTURE_COORD_4' are
14844 Specify a linear mapping of U , as presented to `glEvalCoord2', to
14845 U^ , one of the two variables that are evaluated by the equations
14846 specified by this command. Initially, U1 is 0 and U2 is 1.
14849 Specifies the number of floats or doubles between the beginning of
14850 control point R_IJ and the beginning of control point R_(I+1,)\u2062J, ,
14851 where I and J are the U and V control point indices, respectively.
14852 This allows control points to be embedded in arbitrary data
14853 structures. The only constraint is that the values for a particular
14854 control point must occupy contiguous memory locations. The initial
14855 value of USTRIDE is 0.
14858 Specifies the dimension of the control point array in the U axis.
14859 Must be positive. The initial value is 1.
14864 Specify a linear mapping of V , as presented to `glEvalCoord2', to
14865 V^ , one of the two variables that are evaluated by the equations
14866 specified by this command. Initially, V1 is 0 and V2 is 1.
14869 Specifies the number of floats or doubles between the beginning of
14870 control point R_IJ and the beginning of control point R_I\u2061(J+1,), ,
14871 where I and J are the U and V control point indices, respectively.
14872 This allows control points to be embedded in arbitrary data
14873 structures. The only constraint is that the values for a particular
14874 control point must occupy contiguous memory locations. The initial
14875 value of VSTRIDE is 0.
14878 Specifies the dimension of the control point array in the V axis.
14879 Must be positive. The initial value is 1.
14882 Specifies a pointer to the array of control points.
14884 Evaluators provide a way to use polynomial or rational polynomial
14885 mapping to produce vertices, normals, texture coordinates, and colors.
14886 The values produced by an evaluator are sent on to further stages of GL
14887 processing just as if they had been presented using `glVertex',
14888 `glNormal', `glTexCoord', and `glColor' commands, except that the
14889 generated values do not update the current normal, texture coordinates,
14892 All polynomial or rational polynomial splines of any degree (up to the
14893 maximum degree supported by the GL implementation) can be described
14894 using evaluators. These include almost all surfaces used in computer
14895 graphics, including B-spline surfaces, NURBS surfaces, Bezier surfaces,
14898 Evaluators define surfaces based on bivariate Bernstein polynomials.
14899 Define P\u2061(U^,V^) as
14901 P\u2061(U^,V^)=ΣI=0NΣJ=0MB_I,^N\u2061(U^,)\u2062B_J,^M\u2061(V^,)\u2062R_IJ
14905 where R_IJ is a control point, B_I,^N\u2061(U^,) is the I th Bernstein
14906 polynomial of degree N (UORDER = N+1 )
14908 B_I,^N\u2061(U^,)=((N), (I),,)\u2062U^,^I\u2062(1-U^,)^N-I,,
14910 and B_J,^M\u2061(V^,) is the J th Bernstein polynomial of degree M (VORDER =
14913 B_J,^M\u2061(V^,)=((M), (J),,)\u2062V^,^J\u2062(1-V^,)^M-J,,
14915 Recall that 0^0==1 and ((N), (0),,)==1
14917 `glMap2' is used to define the basis and to specify what kind of values
14918 are produced. Once defined, a map can be enabled and disabled by calling
14919 `glEnable' and `glDisable' with the map name, one of the nine predefined
14920 values for TARGET, described below. When `glEvalCoord2' presents values
14921 U and V , the bivariate Bernstein polynomials are evaluated using U^ and
14928 TARGET is a symbolic constant that indicates what kind of control points
14929 are provided in POINTS, and what output is generated when the map is
14930 evaluated. It can assume one of nine predefined values:
14933 Each control point is three floating-point values representing X ,
14934 Y , and Z . Internal `glVertex3' commands are generated when the
14938 Each control point is four floating-point values representing X , Y
14939 , Z , and W . Internal `glVertex4' commands are generated when the
14943 Each control point is a single floating-point value representing a
14944 color index. Internal `glIndex' commands are generated when the map
14945 is evaluated but the current index is not updated with the value of
14946 these `glIndex' commands.
14949 Each control point is four floating-point values representing red,
14950 green, blue, and alpha. Internal `glColor4' commands are generated
14951 when the map is evaluated but the current color is not updated with
14952 the value of these `glColor4' commands.
14955 Each control point is three floating-point values representing the
14956 X , Y , and Z components of a normal vector. Internal `glNormal'
14957 commands are generated when the map is evaluated but the current
14958 normal is not updated with the value of these `glNormal' commands.
14960 `GL_MAP2_TEXTURE_COORD_1'
14961 Each control point is a single floating-point value representing
14962 the S texture coordinate. Internal `glTexCoord1' commands are
14963 generated when the map is evaluated but the current texture
14964 coordinates are not updated with the value of these `glTexCoord'
14967 `GL_MAP2_TEXTURE_COORD_2'
14968 Each control point is two floating-point values representing the S
14969 and T texture coordinates. Internal `glTexCoord2' commands are
14970 generated when the map is evaluated but the current texture
14971 coordinates are not updated with the value of these `glTexCoord'
14974 `GL_MAP2_TEXTURE_COORD_3'
14975 Each control point is three floating-point values representing the
14976 S , T , and R texture coordinates. Internal `glTexCoord3' commands
14977 are generated when the map is evaluated but the current texture
14978 coordinates are not updated with the value of these `glTexCoord'
14981 `GL_MAP2_TEXTURE_COORD_4'
14982 Each control point is four floating-point values representing the S
14983 , T , R , and Q texture coordinates. Internal `glTexCoord4'
14984 commands are generated when the map is evaluated but the current
14985 texture coordinates are not updated with the value of these
14986 `glTexCoord' commands.
14988 USTRIDE, UORDER, VSTRIDE, VORDER, and POINTS define the array addressing
14989 for accessing the control points. POINTS is the location of the first
14990 control point, which occupies one, two, three, or four contiguous memory
14991 locations, depending on which map is being defined. There are
14992 UORDER×VORDER control points in the array. USTRIDE specifies how many
14993 float or double locations are skipped to advance the internal memory
14994 pointer from control point R_I\u2062J, to control point R_(I+1,)\u2062J, . VSTRIDE
14995 specifies how many float or double locations are skipped to advance the
14996 internal memory pointer from control point R_I\u2062J, to control point
14999 `GL_INVALID_ENUM' is generated if TARGET is not an accepted value.
15001 `GL_INVALID_VALUE' is generated if U1 is equal to U2, or if V1 is equal
15004 `GL_INVALID_VALUE' is generated if either USTRIDE or VSTRIDE is less
15005 than the number of values in a control point.
15007 `GL_INVALID_VALUE' is generated if either UORDER or VORDER is less than
15008 1 or greater than the return value of `GL_MAX_EVAL_ORDER'.
15010 `GL_INVALID_OPERATION' is generated if `glMap2' is executed between the
15011 execution of `glBegin' and the corresponding execution of `glEnd'.
15013 `GL_INVALID_OPERATION' is generated if `glMap2' is called and the value
15014 of `GL_ACTIVE_TEXTURE' is not `GL_TEXTURE0'.")
15016 (define-gl-procedures
15022 (glUnmapBuffer (target GLenum) -> GLboolean))
15023 "Map a buffer object's data store.
15026 Specifies the target buffer object being mapped. The symbolic
15027 constant must be `GL_ARRAY_BUFFER', `GL_ELEMENT_ARRAY_BUFFER',
15028 `GL_PIXEL_PACK_BUFFER', or `GL_PIXEL_UNPACK_BUFFER'.
15031 Specifies the access policy, indicating whether it will be possible
15032 to read from, write to, or both read from and write to the buffer
15033 object's mapped data store. The symbolic constant must be
15034 `GL_READ_ONLY', `GL_WRITE_ONLY', or `GL_READ_WRITE'.
15036 `glMapBuffer' maps to the client's address space the entire data store
15037 of the buffer object currently bound to TARGET. The data can then be
15038 directly read and/or written relative to the returned pointer, depending
15039 on the specified ACCESS policy. If the GL is unable to map the buffer
15040 object's data store, `glMapBuffer' generates an error and returns
15041 `NULL'. This may occur for system-specific reasons, such as low virtual
15042 memory availability.
15044 If a mapped data store is accessed in a way inconsistent with the
15045 specified ACCESS policy, no error is generated, but performance may be
15046 negatively impacted and system errors, including program termination,
15047 may result. Unlike the USAGE parameter of `glBufferData', ACCESS is not
15048 a hint, and does in fact constrain the usage of the mapped data store on
15049 some GL implementations. In order to achieve the highest performance
15050 available, a buffer object's data store should be used in ways
15051 consistent with both its specified USAGE and ACCESS parameters.
15053 A mapped data store must be unmapped with `glUnmapBuffer' before its
15054 buffer object is used. Otherwise an error will be generated by any GL
15055 command that attempts to dereference the buffer object's data store.
15056 When a data store is unmapped, the pointer to its data store becomes
15057 invalid. `glUnmapBuffer' returns `GL_TRUE' unless the data store
15058 contents have become corrupt during the time the data store was mapped.
15059 This can occur for system-specific reasons that affect the availability
15060 of graphics memory, such as screen mode changes. In such situations,
15061 `GL_FALSE' is returned and the data store contents are undefined. An
15062 application must detect this rare condition and reinitialize the data
15065 A buffer object's mapped data store is automatically unmapped when the
15066 buffer object is deleted or its data store is recreated with
15069 `GL_INVALID_ENUM' is generated if TARGET is not `GL_ARRAY_BUFFER',
15070 `GL_ELEMENT_ARRAY_BUFFER', `GL_PIXEL_PACK_BUFFER', or
15071 `GL_PIXEL_UNPACK_BUFFER'.
15073 `GL_INVALID_ENUM' is generated if ACCESS is not `GL_READ_ONLY',
15074 `GL_WRITE_ONLY', or `GL_READ_WRITE'.
15076 `GL_OUT_OF_MEMORY' is generated when `glMapBuffer' is executed if the GL
15077 is unable to map the buffer object's data store. This may occur for a
15078 variety of system-specific reasons, such as the absence of sufficient
15079 remaining virtual memory.
15081 `GL_INVALID_OPERATION' is generated if the reserved buffer object name 0
15082 is bound to TARGET.
15084 `GL_INVALID_OPERATION' is generated if `glMapBuffer' is executed for a
15085 buffer object whose data store is already mapped.
15087 `GL_INVALID_OPERATION' is generated if `glUnmapBuffer' is executed for a
15088 buffer object whose data store is not currently mapped.
15090 `GL_INVALID_OPERATION' is generated if `glMapBuffer' or `glUnmapBuffer'
15091 is executed between the execution of `glBegin' and the corresponding
15092 execution of `glEnd'.")
15094 (define-gl-procedures
15110 "Define a one- or two-dimensional mesh.
15113 Specifies the number of partitions in the grid range interval [U1,
15114 U2]. Must be positive.
15119 Specify the mappings for integer grid domain values I=0 and I=UN .
15122 Specifies the number of partitions in the grid range interval [V1,
15123 V2] (`glMapGrid2' only).
15128 Specify the mappings for integer grid domain values J=0 and J=VN
15129 (`glMapGrid2' only).
15131 `glMapGrid' and `glEvalMesh' are used together to efficiently generate
15132 and evaluate a series of evenly-spaced map domain values. `glEvalMesh'
15133 steps through the integer domain of a one- or two-dimensional grid,
15134 whose range is the domain of the evaluation maps specified by `glMap1'
15137 `glMapGrid1' and `glMapGrid2' specify the linear grid mappings between
15138 the I (or I and J ) integer grid coordinates, to the U (or U and V )
15139 floating-point evaluation map coordinates. See `glMap1' and `glMap2' for
15140 details of how U and V coordinates are evaluated.
15142 `glMapGrid1' specifies a single linear mapping such that integer grid
15143 coordinate 0 maps exactly to U1, and integer grid coordinate UN maps
15144 exactly to U2. All other integer grid coordinates I are mapped so that
15146 U=I\u2061(U2-U1,)/UN+U1
15148 `glMapGrid2' specifies two such linear mappings. One maps integer grid
15149 coordinate I=0 exactly to U1, and integer grid coordinate I=UN exactly
15150 to U2. The other maps integer grid coordinate J=0 exactly to V1, and
15151 integer grid coordinate J=VN exactly to V2. Other integer grid
15152 coordinates I and J are mapped such that
15154 U=I\u2061(U2-U1,)/UN+U1
15156 V=J\u2061(V2-V1,)/VN+V1
15158 The mappings specified by `glMapGrid' are used identically by
15159 `glEvalMesh' and `glEvalPoint'.
15161 `GL_INVALID_VALUE' is generated if either UN or VN is not positive.
15163 `GL_INVALID_OPERATION' is generated if `glMapGrid' is executed between
15164 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15166 (define-gl-procedures
15179 "Specify material parameters for the lighting model.
15182 Specifies which face or faces are being updated. Must be one of
15183 `GL_FRONT', `GL_BACK', or `GL_FRONT_AND_BACK'.
15186 Specifies the single-valued material parameter of the face or faces
15187 that is being updated. Must be `GL_SHININESS'.
15190 Specifies the value that parameter `GL_SHININESS' will be set to.
15192 `glMaterial' assigns values to material parameters. There are two
15193 matched sets of material parameters. One, the FRONT-FACING set, is used
15194 to shade points, lines, bitmaps, and all polygons (when two-sided
15195 lighting is disabled), or just front-facing polygons (when two-sided
15196 lighting is enabled). The other set, BACK-FACING, is used to shade
15197 back-facing polygons only when two-sided lighting is enabled. Refer to
15198 the `glLightModel' reference page for details concerning one- and
15199 two-sided lighting calculations.
15201 `glMaterial' takes three arguments. The first, FACE, specifies whether
15202 the `GL_FRONT' materials, the `GL_BACK' materials, or both
15203 `GL_FRONT_AND_BACK' materials will be modified. The second, PNAME,
15204 specifies which of several parameters in one or both sets will be
15205 modified. The third, PARAMS, specifies what value or values will be
15206 assigned to the specified parameter.
15208 Material parameters are used in the lighting equation that is optionally
15209 applied to each vertex. The equation is discussed in the `glLightModel'
15210 reference page. The parameters that can be specified using `glMaterial',
15211 and their interpretations by the lighting equation, are as follows:
15214 PARAMS contains four integer or floating-point values that specify
15215 the ambient RGBA reflectance of the material. Integer values are
15216 mapped linearly such that the most positive representable value
15217 maps to 1.0, and the most negative representable value maps to -1.0
15218 . Floating-point values are mapped directly. Neither integer nor
15219 floating-point values are clamped. The initial ambient reflectance
15220 for both front- and back-facing materials is (0.2, 0.2, 0.2, 1.0).
15223 PARAMS contains four integer or floating-point values that specify
15224 the diffuse RGBA reflectance of the material. Integer values are
15225 mapped linearly such that the most positive representable value
15226 maps to 1.0, and the most negative representable value maps to -1.0
15227 . Floating-point values are mapped directly. Neither integer nor
15228 floating-point values are clamped. The initial diffuse reflectance
15229 for both front- and back-facing materials is (0.8, 0.8, 0.8, 1.0).
15232 PARAMS contains four integer or floating-point values that specify
15233 the specular RGBA reflectance of the material. Integer values are
15234 mapped linearly such that the most positive representable value
15235 maps to 1.0, and the most negative representable value maps to -1.0
15236 . Floating-point values are mapped directly. Neither integer nor
15237 floating-point values are clamped. The initial specular reflectance
15238 for both front- and back-facing materials is (0, 0, 0, 1).
15241 PARAMS contains four integer or floating-point values that specify
15242 the RGBA emitted light intensity of the material. Integer values
15243 are mapped linearly such that the most positive representable value
15244 maps to 1.0, and the most negative representable value maps to -1.0
15245 . Floating-point values are mapped directly. Neither integer nor
15246 floating-point values are clamped. The initial emission intensity
15247 for both front- and back-facing materials is (0, 0, 0, 1).
15250 PARAMS is a single integer or floating-point value that specifies
15251 the RGBA specular exponent of the material. Integer and
15252 floating-point values are mapped directly. Only values in the range
15253 [0,128] are accepted. The initial specular exponent for both front-
15254 and back-facing materials is 0.
15256 `GL_AMBIENT_AND_DIFFUSE'
15257 Equivalent to calling `glMaterial' twice with the same parameter
15258 values, once with `GL_AMBIENT' and once with `GL_DIFFUSE'.
15261 PARAMS contains three integer or floating-point values specifying
15262 the color indices for ambient, diffuse, and specular lighting.
15263 These three values, and `GL_SHININESS', are the only material
15264 values used by the color index mode lighting equation. Refer to the
15265 `glLightModel' reference page for a discussion of color index
15268 `GL_INVALID_ENUM' is generated if either FACE or PNAME is not an
15271 `GL_INVALID_VALUE' is generated if a specular exponent outside the range
15272 [0,128] is specified.")
15274 (define-gl-procedures
15275 ((glMatrixMode (mode GLenum) -> void))
15276 "Specify which matrix is the current matrix.
15279 Specifies which matrix stack is the target for subsequent matrix
15280 operations. Three values are accepted: `GL_MODELVIEW',
15281 `GL_PROJECTION', and `GL_TEXTURE'. The initial value is
15282 `GL_MODELVIEW'. Additionally, if the `ARB_imaging' extension is
15283 supported, `GL_COLOR' is also accepted.
15285 `glMatrixMode' sets the current matrix mode. MODE can assume one of four
15289 Applies subsequent matrix operations to the modelview matrix stack.
15292 Applies subsequent matrix operations to the projection matrix
15296 Applies subsequent matrix operations to the texture matrix stack.
15299 Applies subsequent matrix operations to the color matrix stack.
15301 To find out which matrix stack is currently the target of all matrix
15302 operations, call `glGet' with argument `GL_MATRIX_MODE'. The initial
15303 value is `GL_MODELVIEW'.
15305 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15307 `GL_INVALID_OPERATION' is generated if `glMatrixMode' is executed
15308 between the execution of `glBegin' and the corresponding execution of
15311 (define-gl-procedures
15314 (internalformat GLenum)
15318 "Define minmax table.
15321 The minmax table whose parameters are to be set. Must be
15325 The format of entries in the minmax table. Must be one of
15326 `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
15327 `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
15328 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
15329 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
15330 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
15331 `GL_LUMINANCE16_ALPHA16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4',
15332 `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16',
15333 `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8',
15334 `GL_RGB10_A2', `GL_RGBA12', or `GL_RGBA16'.
15337 If `GL_TRUE', pixels will be consumed by the minmax process and no
15338 drawing or texture loading will take place. If `GL_FALSE', pixels
15339 will proceed to the final conversion process after minmax.
15341 When `GL_MINMAX' is enabled, the RGBA components of incoming pixels are
15342 compared to the minimum and maximum values for each component, which are
15343 stored in the two-element minmax table. (The first element stores the
15344 minima, and the second element stores the maxima.) If a pixel component
15345 is greater than the corresponding component in the maximum element, then
15346 the maximum element is updated with the pixel component value. If a
15347 pixel component is less than the corresponding component in the minimum
15348 element, then the minimum element is updated with the pixel component
15349 value. (In both cases, if the internal format of the minmax table
15350 includes luminance, then the R color component of incoming pixels is
15351 used for comparison.) The contents of the minmax table may be retrieved
15352 at a later time by calling `glGetMinmax'. The minmax operation is
15353 enabled or disabled by calling `glEnable' or `glDisable', respectively,
15354 with an argument of `GL_MINMAX'.
15356 `glMinmax' redefines the current minmax table to have entries of the
15357 format specified by INTERNALFORMAT. The maximum element is initialized
15358 with the smallest possible component values, and the minimum element is
15359 initialized with the largest possible component values. The values in
15360 the previous minmax table, if any, are lost. If SINK is `GL_TRUE', then
15361 pixels are discarded after minmax; no further processing of the pixels
15362 takes place, and no drawing, texture loading, or pixel readback will
15367 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
15370 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
15373 `GL_INVALID_OPERATION' is generated if `glMinmax' is executed between
15374 the execution of `glBegin' and the corresponding execution of `glEnd'.")
15376 (define-gl-procedures
15377 ((glMultiDrawArrays
15381 (primcount GLsizei)
15384 "Render multiple sets of primitives from array data.
15387 Specifies what kind of primitives to render. Symbolic constants
15388 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
15389 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
15390 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
15393 Points to an array of starting indices in the enabled arrays.
15396 Points to an array of the number of indices to be rendered.
15399 Specifies the size of the first and count
15401 `glMultiDrawArrays' specifies multiple sets of geometric primitives with
15402 very few subroutine calls. Instead of calling a GL procedure to pass
15403 each individual vertex, normal, texture coordinate, edge flag, or color,
15404 you can prespecify separate arrays of vertices, normals, and colors and
15405 use them to construct a sequence of primitives with a single call to
15406 `glMultiDrawArrays'.
15408 `glMultiDrawArrays' behaves identically to `glDrawArrays' except that
15409 PRIMCOUNT separate ranges of elements are specified instead.
15411 When `glMultiDrawArrays' is called, it uses COUNT sequential elements
15412 from each enabled array to construct a sequence of geometric primitives,
15413 beginning with element FIRST. MODE specifies what kind of primitives are
15414 constructed, and how the array elements construct those primitives. If
15415 `GL_VERTEX_ARRAY' is not enabled, no geometric primitives are generated.
15417 Vertex attributes that are modified by `glMultiDrawArrays' have an
15418 unspecified value after `glMultiDrawArrays' returns. For example, if
15419 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
15420 after `glMultiDrawArrays' executes. Attributes that aren't modified
15421 remain well defined.
15423 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15425 `GL_INVALID_VALUE' is generated if PRIMCOUNT is negative.
15427 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
15428 bound to an enabled array and the buffer object's data store is
15431 `GL_INVALID_OPERATION' is generated if `glMultiDrawArrays' is executed
15432 between the execution of `glBegin' and the corresponding `glEnd'.")
15434 (define-gl-procedures
15435 ((glMultiDrawElements
15437 (count const-GLsizei-*)
15439 (indices const-GLvoid-**)
15440 (primcount GLsizei)
15443 "Render multiple sets of primitives by specifying indices of array data
15447 Specifies what kind of primitives to render. Symbolic constants
15448 `GL_POINTS', `GL_LINE_STRIP', `GL_LINE_LOOP', `GL_LINES',
15449 `GL_TRIANGLE_STRIP', `GL_TRIANGLE_FAN', `GL_TRIANGLES',
15450 `GL_QUAD_STRIP', `GL_QUADS', and `GL_POLYGON' are accepted.
15453 Points to an array of the elements counts.
15456 Specifies the type of the values in INDICES. Must be one of
15457 `GL_UNSIGNED_BYTE', `GL_UNSIGNED_SHORT', or `GL_UNSIGNED_INT'.
15460 Specifies a pointer to the location where the indices are stored.
15463 Specifies the size of the COUNT array.
15465 `glMultiDrawElements' specifies multiple sets of geometric primitives
15466 with very few subroutine calls. Instead of calling a GL function to pass
15467 each individual vertex, normal, texture coordinate, edge flag, or color,
15468 you can prespecify separate arrays of vertices, normals, and so on, and
15469 use them to construct a sequence of primitives with a single call to
15470 `glMultiDrawElements'.
15472 `glMultiDrawElements' is identical in operation to `glDrawElements'
15473 except that PRIMCOUNT separate lists of elements are specified.
15475 Vertex attributes that are modified by `glMultiDrawElements' have an
15476 unspecified value after `glMultiDrawElements' returns. For example, if
15477 `GL_COLOR_ARRAY' is enabled, the value of the current color is undefined
15478 after `glMultiDrawElements' executes. Attributes that aren't modified
15479 maintain their previous values.
15481 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15483 `GL_INVALID_VALUE' is generated if PRIMCOUNT is negative.
15485 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
15486 bound to an enabled array or the element array and the buffer object's
15487 data store is currently mapped.
15489 `GL_INVALID_OPERATION' is generated if `glMultiDrawElements' is executed
15490 between the execution of `glBegin' and the corresponding `glEnd'.")
15492 (define-gl-procedures
15493 ((glMultiTexCoord1i
15545 "Set the current texture coordinates.
15548 Specifies the texture unit whose coordinates should be modified.
15549 The number of texture units is implementation dependent, but must
15550 be at least two. Symbolic constant must be one of `GL_TEXTURE' I ,
15551 where i ranges from 0 to `GL_MAX_TEXTURE_COORDS' - 1, which is an
15552 implementation-dependent value.
15561 Specify S, T, R, and Q texture coordinates for TARGET texture unit.
15562 Not all parameters are present in all forms of the command.
15564 `glMultiTexCoord' specifies texture coordinates in one, two, three, or
15565 four dimensions. `glMultiTexCoord1' sets the current texture coordinates
15566 to (S,001) ; a call to `glMultiTexCoord2' sets them to (S,T01) .
15567 Similarly, `glMultiTexCoord3' specifies the texture coordinates as
15568 (S,TR1) , and `glMultiTexCoord4' defines all four components explicitly
15571 The current texture coordinates are part of the data that is associated
15572 with each vertex and with the current raster position. Initially, the
15573 values for (S,TRQ) are (0,001) .")
15575 (define-gl-procedures
15576 ((glMultMatrixf (m const-GLfloat-*) -> void))
15577 "Multiply the current matrix with the specified matrix.
15580 Points to 16 consecutive values that are used as the elements of a
15581 4×4 column-major matrix.
15583 `glMultMatrix' multiplies the current matrix with the one specified
15584 using M, and replaces the current matrix with the product.
15586 The current matrix is determined by the current matrix mode (see
15587 `glMatrixMode'). It is either the projection matrix, modelview matrix,
15588 or the texture matrix.
15590 `GL_INVALID_OPERATION' is generated if `glMultMatrix' is executed
15591 between the execution of `glBegin' and the corresponding execution of
15594 (define-gl-procedures
15595 ((glMultTransposeMatrixf
15596 (m const-GLfloat-*)
15599 "Multiply the current matrix with the specified row-major ordered matrix.
15602 Points to 16 consecutive values that are used as the elements of a
15603 4×4 row-major matrix.
15605 `glMultTransposeMatrix' multiplies the current matrix with the one
15606 specified using M, and replaces the current matrix with the product.
15608 The current matrix is determined by the current matrix mode (see
15609 `glMatrixMode'). It is either the projection matrix, modelview matrix,
15610 or the texture matrix.
15612 `GL_INVALID_OPERATION' is generated if `glMultTransposeMatrix' is
15613 executed between the execution of `glBegin' and the corresponding
15614 execution of `glEnd'.")
15616 (define-gl-procedures
15617 ((glNewList (list GLuint) (mode GLenum) -> void)
15618 (glEndList -> void))
15619 "Create or replace a display list.
15622 Specifies the display-list name.
15625 Specifies the compilation mode, which can be `GL_COMPILE' or
15626 `GL_COMPILE_AND_EXECUTE'.
15628 Display lists are groups of GL commands that have been stored for
15629 subsequent execution. Display lists are created with `glNewList'. All
15630 subsequent commands are placed in the display list, in the order issued,
15631 until `glEndList' is called.
15633 `glNewList' has two arguments. The first argument, LIST, is a positive
15634 integer that becomes the unique name for the display list. Names can be
15635 created and reserved with `glGenLists' and tested for uniqueness with
15636 `glIsList'. The second argument, MODE, is a symbolic constant that can
15637 assume one of two values:
15640 Commands are merely compiled.
15642 `GL_COMPILE_AND_EXECUTE'
15643 Commands are executed as they are compiled into the display list.
15645 Certain commands are not compiled into the display list but are executed
15646 immediately, regardless of the display-list mode. These commands are
15647 `glAreTexturesResident', `glColorPointer', `glDeleteLists',
15648 `glDeleteTextures', `glDisableClientState', `glEdgeFlagPointer',
15649 `glEnableClientState', `glFeedbackBuffer', `glFinish', `glFlush',
15650 `glGenLists', `glGenTextures', `glIndexPointer', `glInterleavedArrays',
15651 `glIsEnabled', `glIsList', `glIsTexture', `glNormalPointer',
15652 `glPopClientAttrib', `glPixelStore', `glPushClientAttrib',
15653 `glReadPixels', `glRenderMode', `glSelectBuffer', `glTexCoordPointer',
15654 `glVertexPointer', and all of the `glGet' commands.
15656 Similarly, `glTexImage1D', `glTexImage2D', and `glTexImage3D' are
15657 executed immediately and not compiled into the display list when their
15658 first argument is `GL_PROXY_TEXTURE_1D', `GL_PROXY_TEXTURE_1D', or
15659 `GL_PROXY_TEXTURE_3D', respectively.
15661 When the `ARB_imaging' extension is supported, `glHistogram' executes
15662 immediately when its argument is `GL_PROXY_HISTOGRAM'. Similarly,
15663 `glColorTable' executes immediately when its first argument is
15664 `GL_PROXY_COLOR_TABLE', `GL_PROXY_POST_CONVOLUTION_COLOR_TABLE', or
15665 `GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'.
15667 For OpenGL versions 1.3 and greater, or when the `ARB_multitexture'
15668 extension is supported, `glClientActiveTexture' is not compiled into
15669 display lists, but executed immediately.
15671 When `glEndList' is encountered, the display-list definition is
15672 completed by associating the list with the unique name LIST (specified
15673 in the `glNewList' command). If a display list with name LIST already
15674 exists, it is replaced only when `glEndList' is called.
15676 `GL_INVALID_VALUE' is generated if LIST is 0.
15678 `GL_INVALID_ENUM' is generated if MODE is not an accepted value.
15680 `GL_INVALID_OPERATION' is generated if `glEndList' is called without a
15681 preceding `glNewList', or if `glNewList' is called while a display list
15684 `GL_INVALID_OPERATION' is generated if `glNewList' or `glEndList' is
15685 executed between the execution of `glBegin' and the corresponding
15686 execution of `glEnd'.
15688 `GL_OUT_OF_MEMORY' is generated if there is insufficient memory to
15689 compile the display list. If the GL version is 1.1 or greater, no change
15690 is made to the previous contents of the display list, if any, and no
15691 other change is made to the GL state. (It is as if no attempt had been
15692 made to create the new display list.)")
15694 (define-gl-procedures
15698 (pointer const-GLvoid-*)
15701 "Define an array of normals.
15704 Specifies the data type of each coordinate in the array. Symbolic
15705 constants `GL_BYTE', `GL_SHORT', `GL_INT', `GL_FLOAT', and
15706 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
15709 Specifies the byte offset between consecutive normals. If STRIDE is
15710 0, the normals are understood to be tightly packed in the array.
15711 The initial value is 0.
15714 Specifies a pointer to the first coordinate of the first normal in
15715 the array. The initial value is 0.
15717 `glNormalPointer' specifies the location and data format of an array of
15718 normals to use when rendering. TYPE specifies the data type of each
15719 normal coordinate, and STRIDE specifies the byte stride from one normal
15720 to the next, allowing vertices and attributes to be packed into a single
15721 array or stored in separate arrays. (Single-array storage may be more
15722 efficient on some implementations; see `glInterleavedArrays'.)
15724 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
15725 target (see `glBindBuffer') while a normal array is specified, POINTER
15726 is treated as a byte offset into the buffer object's data store. Also,
15727 the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as normal
15728 vertex array client-side state (`GL_NORMAL_ARRAY_BUFFER_BINDING').
15730 When a normal array is specified, TYPE, STRIDE, and POINTER are saved as
15731 client-side state, in addition to the current vertex array buffer object
15734 To enable and disable the normal array, call `glEnableClientState' and
15735 `glDisableClientState' with the argument `GL_NORMAL_ARRAY'. If enabled,
15736 the normal array is used when `glDrawArrays', `glMultiDrawArrays',
15737 `glDrawElements', `glMultiDrawElements', `glDrawRangeElements', or
15738 `glArrayElement' is called.
15740 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
15742 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
15744 (define-gl-procedures
15757 "Set the current normal vector.
15764 Specify the X , Y , and Z coordinates of the new current normal.
15765 The initial value of the current normal is the unit vector, (0, 0,
15770 The current normal is set to the given coordinates whenever `glNormal'
15771 is issued. Byte, short, or integer arguments are converted to
15772 floating-point format with a linear mapping that maps the most positive
15773 representable integer value to 1.0 and the most negative representable
15774 integer value to -1.0 .
15776 Normals specified with `glNormal' need not have unit length. If
15777 `GL_NORMALIZE' is enabled, then normals of any length specified with
15778 `glNormal' are normalized after transformation. If `GL_RESCALE_NORMAL'
15779 is enabled, normals are scaled by a scaling factor derived from the
15780 modelview matrix. `GL_RESCALE_NORMAL' requires that the originally
15781 specified normals were of unit length, and that the modelview matrix
15782 contain only uniform scales for proper results. To enable and disable
15783 normalization, call `glEnable' and `glDisable' with either
15784 `GL_NORMALIZE' or `GL_RESCALE_NORMAL'. Normalization is initially
15787 (define-gl-procedures
15797 "Multiply the current matrix with an orthographic matrix.
15802 Specify the coordinates for the left and right vertical clipping
15808 Specify the coordinates for the bottom and top horizontal clipping
15814 Specify the distances to the nearer and farther depth clipping
15815 planes. These values are negative if the plane is to be behind the
15818 `glOrtho' describes a transformation that produces a parallel
15819 projection. The current matrix (see `glMatrixMode') is multiplied by
15820 this matrix and the result replaces the current matrix, as if
15821 `glMultMatrix' were called with the following matrix as its argument:
15823 ((2/RIGHT-LEFT,, 0 0 T_X,), (0 2/TOP-BOTTOM,, 0 T_Y,), (0 0
15824 -2/FARVAL-NEARVAL,, T_Z,), (0 0 0 1),)
15826 where T_X=-RIGHT+LEFT,/RIGHT-LEFT,, T_Y=-TOP+BOTTOM,/TOP-BOTTOM,,
15827 T_Z=-FARVAL+NEARVAL,/FARVAL-NEARVAL,,
15829 Typically, the matrix mode is `GL_PROJECTION', and (LEFT,BOTTOM-NEARVAL)
15830 and (RIGHT,TOP-NEARVAL) specify the points on the near clipping plane
15831 that are mapped to the lower left and upper right corners of the window,
15832 respectively, assuming that the eye is located at (0, 0, 0). -FARVAL
15833 specifies the location of the far clipping plane. Both NEARVAL and
15834 FARVAL can be either positive or negative.
15836 Use `glPushMatrix' and `glPopMatrix' to save and restore the current
15839 `GL_INVALID_VALUE' is generated if LEFT = RIGHT, or BOTTOM = TOP, or
15842 `GL_INVALID_OPERATION' is generated if `glOrtho' is executed between the
15843 execution of `glBegin' and the corresponding execution of `glEnd'.")
15845 (define-gl-procedures
15846 ((glPassThrough (token GLfloat) -> void))
15847 "Place a marker in the feedback buffer.
15850 Specifies a marker value to be placed in the feedback buffer
15851 following a `GL_PASS_THROUGH_TOKEN'.
15855 Feedback is a GL render mode. The mode is selected by calling
15856 `glRenderMode' with `GL_FEEDBACK'. When the GL is in feedback mode, no
15857 pixels are produced by rasterization. Instead, information about
15858 primitives that would have been rasterized is fed back to the
15859 application using the GL. See the `glFeedbackBuffer' reference page for
15860 a description of the feedback buffer and the values in it.
15862 `glPassThrough' inserts a user-defined marker in the feedback buffer
15863 when it is executed in feedback mode. TOKEN is returned as if it were a
15864 primitive; it is indicated with its own unique identifying value:
15865 `GL_PASS_THROUGH_TOKEN'. The order of `glPassThrough' commands with
15866 respect to the specification of graphics primitives is maintained.
15868 `GL_INVALID_OPERATION' is generated if `glPassThrough' is executed
15869 between the execution of `glBegin' and the corresponding execution of
15872 (define-gl-procedures
15876 (values const-GLfloat-*)
15882 (values const-GLuint-*)
15885 "Set up pixel transfer maps.
15888 Specifies a symbolic map name. Must be one of the following:
15889 `GL_PIXEL_MAP_I_TO_I', `GL_PIXEL_MAP_S_TO_S',
15890 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
15891 `GL_PIXEL_MAP_I_TO_B', `GL_PIXEL_MAP_I_TO_A',
15892 `GL_PIXEL_MAP_R_TO_R', `GL_PIXEL_MAP_G_TO_G',
15893 `GL_PIXEL_MAP_B_TO_B', or `GL_PIXEL_MAP_A_TO_A'.
15896 Specifies the size of the map being defined.
15899 Specifies an array of MAPSIZE values.
15901 `glPixelMap' sets up translation tables, or MAPS, used by
15902 `glCopyPixels', `glCopyTexImage1D', `glCopyTexImage2D',
15903 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D',
15904 `glDrawPixels', `glReadPixels', `glTexImage1D', `glTexImage2D',
15905 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D', and
15906 `glTexSubImage3D'. Additionally, if the `ARB_imaging' subset is
15907 supported, the routines `glColorTable', `glColorSubTable',
15908 `glConvolutionFilter1D', `glConvolutionFilter2D', `glHistogram',
15909 `glMinmax', and `glSeparableFilter2D'. Use of these maps is described
15910 completely in the `glPixelTransfer' reference page, and partly in the
15911 reference pages for the pixel and texture image commands. Only the
15912 specification of the maps is described in this reference page.
15914 MAP is a symbolic map name, indicating one of ten maps to set. MAPSIZE
15915 specifies the number of entries in the map, and VALUES is a pointer to
15916 an array of MAPSIZE map values.
15918 If a non-zero named buffer object is bound to the
15919 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a pixel
15920 transfer map is specified, VALUES is treated as a byte offset into the
15921 buffer object's data store.
15923 The ten maps are as follows:
15925 `GL_PIXEL_MAP_I_TO_I'
15926 Maps color indices to color indices.
15928 `GL_PIXEL_MAP_S_TO_S'
15929 Maps stencil indices to stencil indices.
15931 `GL_PIXEL_MAP_I_TO_R'
15932 Maps color indices to red components.
15934 `GL_PIXEL_MAP_I_TO_G'
15935 Maps color indices to green components.
15937 `GL_PIXEL_MAP_I_TO_B'
15938 Maps color indices to blue components.
15940 `GL_PIXEL_MAP_I_TO_A'
15941 Maps color indices to alpha components.
15943 `GL_PIXEL_MAP_R_TO_R'
15944 Maps red components to red components.
15946 `GL_PIXEL_MAP_G_TO_G'
15947 Maps green components to green components.
15949 `GL_PIXEL_MAP_B_TO_B'
15950 Maps blue components to blue components.
15952 `GL_PIXEL_MAP_A_TO_A'
15953 Maps alpha components to alpha components.
15955 The entries in a map can be specified as single-precision floating-point
15956 numbers, unsigned short integers, or unsigned int integers. Maps that
15957 store color component values (all but `GL_PIXEL_MAP_I_TO_I' and
15958 `GL_PIXEL_MAP_S_TO_S') retain their values in floating-point format,
15959 with unspecified mantissa and exponent sizes. Floating-point values
15960 specified by `glPixelMapfv' are converted directly to the internal
15961 floating-point format of these maps, then clamped to the range [0,1].
15962 Unsigned integer values specified by `glPixelMapusv' and `glPixelMapuiv'
15963 are converted linearly such that the largest representable integer maps
15964 to 1.0, and 0 maps to 0.0.
15966 Maps that store indices, `GL_PIXEL_MAP_I_TO_I' and
15967 `GL_PIXEL_MAP_S_TO_S', retain their values in fixed-point format, with
15968 an unspecified number of bits to the right of the binary point.
15969 Floating-point values specified by `glPixelMapfv' are converted directly
15970 to the internal fixed-point format of these maps. Unsigned integer
15971 values specified by `glPixelMapusv' and `glPixelMapuiv' specify integer
15972 values, with all 0's to the right of the binary point.
15974 The following table shows the initial sizes and values for each of the
15975 maps. Maps that are indexed by either color or stencil indices must have
15976 MAPSIZE = 2^N for some N or the results are undefined. The maximum
15977 allowable size for each map depends on the implementation and can be
15978 determined by calling `glGet' with argument `GL_MAX_PIXEL_MAP_TABLE'.
15979 The single maximum applies to all maps; it is at least 32.
15982 *Lookup Index*, *Lookup Value*, *Initial Size*, *Initial Value*
15984 `GL_PIXEL_MAP_I_TO_I'
15985 color index , color index , 1 , 0
15987 `GL_PIXEL_MAP_S_TO_S'
15988 stencil index , stencil index , 1 , 0
15990 `GL_PIXEL_MAP_I_TO_R'
15991 color index , R , 1 , 0
15993 `GL_PIXEL_MAP_I_TO_G'
15994 color index , G , 1 , 0
15996 `GL_PIXEL_MAP_I_TO_B'
15997 color index , B , 1 , 0
15999 `GL_PIXEL_MAP_I_TO_A'
16000 color index , A , 1 , 0
16002 `GL_PIXEL_MAP_R_TO_R'
16005 `GL_PIXEL_MAP_G_TO_G'
16008 `GL_PIXEL_MAP_B_TO_B'
16011 `GL_PIXEL_MAP_A_TO_A'
16014 `GL_INVALID_ENUM' is generated if MAP is not an accepted value.
16016 `GL_INVALID_VALUE' is generated if MAPSIZE is less than one or larger
16017 than `GL_MAX_PIXEL_MAP_TABLE'.
16019 `GL_INVALID_VALUE' is generated if MAP is `GL_PIXEL_MAP_I_TO_I',
16020 `GL_PIXEL_MAP_S_TO_S', `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
16021 `GL_PIXEL_MAP_I_TO_B', or `GL_PIXEL_MAP_I_TO_A', and MAPSIZE is not a
16024 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16025 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
16026 data store is currently mapped.
16028 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16029 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
16030 unpacked from the buffer object such that the memory reads required
16031 would exceed the data store size.
16033 `GL_INVALID_OPERATION' is generated by `glPixelMapfv' if a non-zero
16034 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16035 VALUES is not evenly divisible into the number of bytes needed to store
16036 in memory a GLfloat datum.
16038 `GL_INVALID_OPERATION' is generated by `glPixelMapuiv' if a non-zero
16039 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16040 VALUES is not evenly divisible into the number of bytes needed to store
16041 in memory a GLuint datum.
16043 `GL_INVALID_OPERATION' is generated by `glPixelMapusv' if a non-zero
16044 buffer object name is bound to the `GL_PIXEL_UNPACK_BUFFER' target and
16045 VALUES is not evenly divisible into the number of bytes needed to store
16046 in memory a GLushort datum.
16048 `GL_INVALID_OPERATION' is generated if `glPixelMap' is executed between
16049 the execution of `glBegin' and the corresponding execution of `glEnd'.")
16051 (define-gl-procedures
16062 "Set pixel storage modes.
16065 Specifies the symbolic name of the parameter to be set. Six values
16066 affect the packing of pixel data into memory: `GL_PACK_SWAP_BYTES',
16067 `GL_PACK_LSB_FIRST', `GL_PACK_ROW_LENGTH', `GL_PACK_IMAGE_HEIGHT',
16068 `GL_PACK_SKIP_PIXELS', `GL_PACK_SKIP_ROWS', `GL_PACK_SKIP_IMAGES',
16069 and `GL_PACK_ALIGNMENT'. Six more affect the unpacking of pixel
16070 data FROM memory: `GL_UNPACK_SWAP_BYTES', `GL_UNPACK_LSB_FIRST',
16071 `GL_UNPACK_ROW_LENGTH', `GL_UNPACK_IMAGE_HEIGHT',
16072 `GL_UNPACK_SKIP_PIXELS', `GL_UNPACK_SKIP_ROWS',
16073 `GL_UNPACK_SKIP_IMAGES', and `GL_UNPACK_ALIGNMENT'.
16076 Specifies the value that PNAME is set to.
16078 `glPixelStore' sets pixel storage modes that affect the operation of
16079 subsequent `glDrawPixels' and `glReadPixels' as well as the unpacking of
16080 polygon stipple patterns (see `glPolygonStipple'), bitmaps (see
16081 `glBitmap'), texture patterns (see `glTexImage1D', `glTexImage2D',
16082 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D',
16083 `glTexSubImage3D'). Additionally, if the `ARB_imaging' extension is
16084 supported, pixel storage modes affect convolution filters (see
16085 `glConvolutionFilter1D', `glConvolutionFilter2D', and
16086 `glSeparableFilter2D', color table (see `glColorTable', and
16087 `glColorSubTable', and unpacking histogram (See `glHistogram'), and
16088 minmax (See `glMinmax') data.
16090 PNAME is a symbolic constant indicating the parameter to be set, and
16091 PARAM is the new value. Six of the twelve storage parameters affect how
16092 pixel data is returned to client memory. They are as follows:
16094 `GL_PACK_SWAP_BYTES'
16095 If true, byte ordering for multibyte color components, depth
16096 components, color indices, or stencil indices is reversed. That is,
16097 if a four-byte component consists of bytes B_0 , B_1 , B_2 , B_3 ,
16098 it is stored in memory as B_3 , B_2 , B_1 , B_0 if
16099 `GL_PACK_SWAP_BYTES' is true. `GL_PACK_SWAP_BYTES' has no effect on
16100 the memory order of components within a pixel, only on the order of
16101 bytes within components or indices. For example, the three
16102 components of a `GL_RGB' format pixel are always stored with red
16103 first, green second, and blue third, regardless of the value of
16104 `GL_PACK_SWAP_BYTES'.
16106 `GL_PACK_LSB_FIRST'
16107 If true, bits are ordered within a byte from least significant to
16108 most significant; otherwise, the first bit in each byte is the most
16109 significant one. This parameter is significant for bitmap data
16112 `GL_PACK_ROW_LENGTH'
16113 If greater than 0, `GL_PACK_ROW_LENGTH' defines the number of
16114 pixels in a row. If the first pixel of a row is placed at location
16115 P in memory, then the location of the first pixel of the next row
16116 is obtained by skipping
16118 K={(N\u2062L), (A/S,\u2062⌈S\u2062N\u2062L,/A,⌉)\u2062(S>=A), (S<A),
16120 components or indices, where N is the number of components or
16121 indices in a pixel, L is the number of pixels in a row
16122 (`GL_PACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16123 to the pixel routine otherwise), A is the value of
16124 `GL_PACK_ALIGNMENT', and S is the size, in bytes, of a single
16125 component (if A<S , then it is as if A=S ). In the case of 1-bit
16126 values, the location of the next row is obtained by skipping
16128 K=8\u2062A\u2062⌈N\u2062L,/8\u2062A,,⌉
16130 components or indices.
16132 The word COMPONENT in this description refers to the nonindex
16133 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16134 for example, has three components per pixel: first red, then green,
16137 `GL_PACK_IMAGE_HEIGHT'
16138 If greater than 0, `GL_PACK_IMAGE_HEIGHT' defines the number of
16139 pixels in an image three-dimensional texture volume, where
16140 ``image'' is defined by all pixels sharing the same third dimension
16141 index. If the first pixel of a row is placed at location P in
16142 memory, then the location of the first pixel of the next row is
16143 obtained by skipping
16145 K={(N\u2062L\u2062H), (A/S,\u2062⌈S\u2062N\u2062L\u2062H,/A,⌉)\u2062(S>=A), (S<A),
16147 components or indices, where N is the number of components or
16148 indices in a pixel, L is the number of pixels in a row
16149 (`GL_PACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16150 to `glTexImage3D' otherwise), H is the number of rows in a pixel
16151 image (`GL_PACK_IMAGE_HEIGHT' if it is greater than 0, the HEIGHT
16152 argument to the `glTexImage3D' routine otherwise), A is the value
16153 of `GL_PACK_ALIGNMENT', and S is the size, in bytes, of a single
16154 component (if A<S , then it is as if A=S ).
16156 The word COMPONENT in this description refers to the nonindex
16157 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16158 for example, has three components per pixel: first red, then green,
16161 `GL_PACK_SKIP_PIXELS', `GL_PACK_SKIP_ROWS', and `GL_PACK_SKIP_IMAGES'
16162 These values are provided as a convenience to the programmer; they
16163 provide no functionality that cannot be duplicated simply by
16164 incrementing the pointer passed to `glReadPixels'. Setting
16165 `GL_PACK_SKIP_PIXELS' to I is equivalent to incrementing the
16166 pointer by I\u2062N components or indices, where N is the number of
16167 components or indices in each pixel. Setting `GL_PACK_SKIP_ROWS' to
16168 J is equivalent to incrementing the pointer by J\u2062M components or
16169 indices, where M is the number of components or indices per row, as
16170 just computed in the `GL_PACK_ROW_LENGTH' section. Setting
16171 `GL_PACK_SKIP_IMAGES' to K is equivalent to incrementing the
16172 pointer by K\u2062P , where P is the number of components or indices per
16173 image, as computed in the `GL_PACK_IMAGE_HEIGHT' section.
16175 `GL_PACK_ALIGNMENT'
16176 Specifies the alignment requirements for the start of each pixel
16177 row in memory. The allowable values are 1 (byte-alignment), 2 (rows
16178 aligned to even-numbered bytes), 4 (word-alignment), and 8 (rows
16179 start on double-word boundaries).
16181 The other six of the twelve storage parameters affect how pixel data is
16182 read from client memory. These values are significant for
16183 `glDrawPixels', `glTexImage1D', `glTexImage2D', `glTexImage3D',
16184 `glTexSubImage1D', `glTexSubImage2D', `glTexSubImage3D', `glBitmap', and
16185 `glPolygonStipple'.
16187 Additionally, if the `ARB_imaging' extension is supported,
16188 `glColorTable', `glColorSubTable', `glConvolutionFilter1D',
16189 `glConvolutionFilter2D', and `glSeparableFilter2D'. They are as follows:
16191 `GL_UNPACK_SWAP_BYTES'
16192 If true, byte ordering for multibyte color components, depth
16193 components, color indices, or stencil indices is reversed. That is,
16194 if a four-byte component consists of bytes B_0 , B_1 , B_2 , B_3 ,
16195 it is taken from memory as B_3 , B_2 , B_1 , B_0 if
16196 `GL_UNPACK_SWAP_BYTES' is true. `GL_UNPACK_SWAP_BYTES' has no
16197 effect on the memory order of components within a pixel, only on
16198 the order of bytes within components or indices. For example, the
16199 three components of a `GL_RGB' format pixel are always stored with
16200 red first, green second, and blue third, regardless of the value of
16201 `GL_UNPACK_SWAP_BYTES'.
16203 `GL_UNPACK_LSB_FIRST'
16204 If true, bits are ordered within a byte from least significant to
16205 most significant; otherwise, the first bit in each byte is the most
16206 significant one. This is relevant only for bitmap data.
16208 `GL_UNPACK_ROW_LENGTH'
16209 If greater than 0, `GL_UNPACK_ROW_LENGTH' defines the number of
16210 pixels in a row. If the first pixel of a row is placed at location
16211 P in memory, then the location of the first pixel of the next row
16212 is obtained by skipping
16214 K={(N\u2062L), (A/S,\u2062⌈S\u2062N\u2062L,/A,⌉)\u2062(S>=A), (S<A),
16216 components or indices, where N is the number of components or
16217 indices in a pixel, L is the number of pixels in a row
16218 (`GL_UNPACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16219 to the pixel routine otherwise), A is the value of
16220 `GL_UNPACK_ALIGNMENT', and S is the size, in bytes, of a single
16221 component (if A<S , then it is as if A=S ). In the case of 1-bit
16222 values, the location of the next row is obtained by skipping
16224 K=8\u2062A\u2062⌈N\u2062L,/8\u2062A,,⌉
16226 components or indices.
16228 The word COMPONENT in this description refers to the nonindex
16229 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16230 for example, has three components per pixel: first red, then green,
16233 `GL_UNPACK_IMAGE_HEIGHT'
16234 If greater than 0, `GL_UNPACK_IMAGE_HEIGHT' defines the number of
16235 pixels in an image of a three-dimensional texture volume. Where
16236 ``image'' is defined by all pixel sharing the same third dimension
16237 index. If the first pixel of a row is placed at location P in
16238 memory, then the location of the first pixel of the next row is
16239 obtained by skipping
16241 K={(N\u2062L\u2062H), (A/S,\u2062⌈S\u2062N\u2062L\u2062H,/A,⌉)\u2062(S>=A), (S<A),
16243 components or indices, where N is the number of components or
16244 indices in a pixel, L is the number of pixels in a row
16245 (`GL_UNPACK_ROW_LENGTH' if it is greater than 0, the WIDTH argument
16246 to `glTexImage3D' otherwise), H is the number of rows in an image
16247 (`GL_UNPACK_IMAGE_HEIGHT' if it is greater than 0, the HEIGHT
16248 argument to `glTexImage3D' otherwise), A is the value of
16249 `GL_UNPACK_ALIGNMENT', and S is the size, in bytes, of a single
16250 component (if A<S , then it is as if A=S ).
16252 The word COMPONENT in this description refers to the nonindex
16253 values red, green, blue, alpha, and depth. Storage format `GL_RGB',
16254 for example, has three components per pixel: first red, then green,
16257 `GL_UNPACK_SKIP_PIXELS' and `GL_UNPACK_SKIP_ROWS'
16258 These values are provided as a convenience to the programmer; they
16259 provide no functionality that cannot be duplicated by incrementing
16260 the pointer passed to `glDrawPixels', `glTexImage1D',
16261 `glTexImage2D', `glTexSubImage1D', `glTexSubImage2D', `glBitmap',
16262 or `glPolygonStipple'. Setting `GL_UNPACK_SKIP_PIXELS' to I is
16263 equivalent to incrementing the pointer by I\u2062N components or
16264 indices, where N is the number of components or indices in each
16265 pixel. Setting `GL_UNPACK_SKIP_ROWS' to J is equivalent to
16266 incrementing the pointer by J\u2062K components or indices, where K is
16267 the number of components or indices per row, as just computed in
16268 the `GL_UNPACK_ROW_LENGTH' section.
16270 `GL_UNPACK_ALIGNMENT'
16271 Specifies the alignment requirements for the start of each pixel
16272 row in memory. The allowable values are 1 (byte-alignment), 2 (rows
16273 aligned to even-numbered bytes), 4 (word-alignment), and 8 (rows
16274 start on double-word boundaries).
16276 The following table gives the type, initial value, and range of valid
16277 values for each storage parameter that can be set with `glPixelStore'.
16282 *Type*, *Initial Value*, *Valid Range*
16284 `GL_PACK_SWAP_BYTES'
16285 boolean , false , true or false
16287 `GL_PACK_LSB_FIRST'
16288 boolean , false , true or false
16290 `GL_PACK_ROW_LENGTH'
16291 integer , 0 , [0,∞)
16293 `GL_PACK_IMAGE_HEIGHT'
16294 integer , 0 , [0,∞)
16296 `GL_PACK_SKIP_ROWS'
16297 integer , 0 , [0,∞)
16299 `GL_PACK_SKIP_PIXELS'
16300 integer , 0 , [0,∞)
16302 `GL_PACK_SKIP_IMAGES'
16303 integer , 0 , [0,∞)
16305 `GL_PACK_ALIGNMENT'
16306 integer , 4 , 1, 2, 4, or 8
16308 `GL_UNPACK_SWAP_BYTES'
16309 boolean , false , true or false
16311 `GL_UNPACK_LSB_FIRST'
16312 boolean , false , true or false
16314 `GL_UNPACK_ROW_LENGTH'
16315 integer , 0 , [0,∞)
16317 `GL_UNPACK_IMAGE_HEIGHT'
16318 integer , 0 , [0,∞)
16320 `GL_UNPACK_SKIP_ROWS'
16321 integer , 0 , [0,∞)
16323 `GL_UNPACK_SKIP_PIXELS'
16324 integer , 0 , [0,∞)
16326 `GL_UNPACK_SKIP_IMAGES'
16327 integer , 0 , [0,∞)
16329 `GL_UNPACK_ALIGNMENT'
16330 integer , 4 , 1, 2, 4, or 8
16332 `glPixelStoref' can be used to set any pixel store parameter. If the
16333 parameter type is boolean, then if PARAM is 0, the parameter is false;
16334 otherwise it is set to true. If PNAME is a integer type parameter, PARAM
16335 is rounded to the nearest integer.
16337 Likewise, `glPixelStorei' can also be used to set any of the pixel store
16338 parameters. Boolean parameters are set to false if PARAM is 0 and true
16341 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
16343 `GL_INVALID_VALUE' is generated if a negative row length, pixel skip, or
16344 row skip value is specified, or if alignment is specified as other than
16347 `GL_INVALID_OPERATION' is generated if `glPixelStore' is executed
16348 between the execution of `glBegin' and the corresponding execution of
16351 (define-gl-procedures
16362 "Set pixel transfer modes.
16365 Specifies the symbolic name of the pixel transfer parameter to be
16366 set. Must be one of the following: `GL_MAP_COLOR',
16367 `GL_MAP_STENCIL', `GL_INDEX_SHIFT', `GL_INDEX_OFFSET',
16368 `GL_RED_SCALE', `GL_RED_BIAS', `GL_GREEN_SCALE', `GL_GREEN_BIAS',
16369 `GL_BLUE_SCALE', `GL_BLUE_BIAS', `GL_ALPHA_SCALE', `GL_ALPHA_BIAS',
16370 `GL_DEPTH_SCALE', or `GL_DEPTH_BIAS'.
16372 Additionally, if the `ARB_imaging' extension is supported, the
16373 following symbolic names are accepted:
16374 `GL_POST_COLOR_MATRIX_RED_SCALE',
16375 `GL_POST_COLOR_MATRIX_GREEN_SCALE',
16376 `GL_POST_COLOR_MATRIX_BLUE_SCALE',
16377 `GL_POST_COLOR_MATRIX_ALPHA_SCALE',
16378 `GL_POST_COLOR_MATRIX_RED_BIAS', `GL_POST_COLOR_MATRIX_GREEN_BIAS',
16379 `GL_POST_COLOR_MATRIX_BLUE_BIAS',
16380 `GL_POST_COLOR_MATRIX_ALPHA_BIAS', `GL_POST_CONVOLUTION_RED_SCALE',
16381 `GL_POST_CONVOLUTION_GREEN_SCALE',
16382 `GL_POST_CONVOLUTION_BLUE_SCALE',
16383 `GL_POST_CONVOLUTION_ALPHA_SCALE', `GL_POST_CONVOLUTION_RED_BIAS',
16384 `GL_POST_CONVOLUTION_GREEN_BIAS', `GL_POST_CONVOLUTION_BLUE_BIAS',
16385 and `GL_POST_CONVOLUTION_ALPHA_BIAS'.
16388 Specifies the value that PNAME is set to.
16390 `glPixelTransfer' sets pixel transfer modes that affect the operation of
16391 subsequent `glCopyPixels', `glCopyTexImage1D', `glCopyTexImage2D',
16392 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D',
16393 `glDrawPixels', `glReadPixels', `glTexImage1D', `glTexImage2D',
16394 `glTexImage3D', `glTexSubImage1D', `glTexSubImage2D', and
16395 `glTexSubImage3D' commands. Additionally, if the `ARB_imaging' subset is
16396 supported, the routines `glColorTable', `glColorSubTable',
16397 `glConvolutionFilter1D', `glConvolutionFilter2D', `glHistogram',
16398 `glMinmax', and `glSeparableFilter2D' are also affected. The algorithms
16399 that are specified by pixel transfer modes operate on pixels after they
16400 are read from the frame buffer (`glCopyPixels'`glCopyTexImage1D',
16401 `glCopyTexImage2D', `glCopyTexSubImage1D', `glCopyTexSubImage2D',
16402 `glCopyTexSubImage3D', and `glReadPixels'), or unpacked from client
16403 memory (`glDrawPixels', `glTexImage1D', `glTexImage2D', `glTexImage3D',
16404 `glTexSubImage1D', `glTexSubImage2D', and `glTexSubImage3D'). Pixel
16405 transfer operations happen in the same order, and in the same manner,
16406 regardless of the command that resulted in the pixel operation. Pixel
16407 storage modes (see `glPixelStore') control the unpacking of pixels being
16408 read from client memory and the packing of pixels being written back
16409 into client memory.
16411 Pixel transfer operations handle four fundamental pixel types: COLOR,
16412 COLOR INDEX, DEPTH, and STENCIL. COLOR pixels consist of four
16413 floating-point values with unspecified mantissa and exponent sizes,
16414 scaled such that 0 represents zero intensity and 1 represents full
16415 intensity. COLOR INDICES comprise a single fixed-point value, with
16416 unspecified precision to the right of the binary point. DEPTH pixels
16417 comprise a single floating-point value, with unspecified mantissa and
16418 exponent sizes, scaled such that 0.0 represents the minimum depth buffer
16419 value, and 1.0 represents the maximum depth buffer value. Finally,
16420 STENCIL pixels comprise a single fixed-point value, with unspecified
16421 precision to the right of the binary point.
16423 The pixel transfer operations performed on the four basic pixel types
16427 Each of the four color components is multiplied by a scale factor,
16428 then added to a bias factor. That is, the red component is
16429 multiplied by `GL_RED_SCALE', then added to `GL_RED_BIAS'; the
16430 green component is multiplied by `GL_GREEN_SCALE', then added to
16431 `GL_GREEN_BIAS'; the blue component is multiplied by
16432 `GL_BLUE_SCALE', then added to `GL_BLUE_BIAS'; and the alpha
16433 component is multiplied by `GL_ALPHA_SCALE', then added to
16434 `GL_ALPHA_BIAS'. After all four color components are scaled and
16435 biased, each is clamped to the range [0,1] . All color, scale, and
16436 bias values are specified with `glPixelTransfer'.
16438 If `GL_MAP_COLOR' is true, each color component is scaled by the
16439 size of the corresponding color-to-color map, then replaced by the
16440 contents of that map indexed by the scaled component. That is, the
16441 red component is scaled by `GL_PIXEL_MAP_R_TO_R_SIZE', then
16442 replaced by the contents of `GL_PIXEL_MAP_R_TO_R' indexed by
16443 itself. The green component is scaled by
16444 `GL_PIXEL_MAP_G_TO_G_SIZE', then replaced by the contents of
16445 `GL_PIXEL_MAP_G_TO_G' indexed by itself. The blue component is
16446 scaled by `GL_PIXEL_MAP_B_TO_B_SIZE', then replaced by the contents
16447 of `GL_PIXEL_MAP_B_TO_B' indexed by itself. And the alpha component
16448 is scaled by `GL_PIXEL_MAP_A_TO_A_SIZE', then replaced by the
16449 contents of `GL_PIXEL_MAP_A_TO_A' indexed by itself. All components
16450 taken from the maps are then clamped to the range [0,1] .
16451 `GL_MAP_COLOR' is specified with `glPixelTransfer'. The contents of
16452 the various maps are specified with `glPixelMap'.
16454 If the `ARB_imaging' extension is supported, each of the four color
16455 components may be scaled and biased after transformation by the
16456 color matrix. That is, the red component is multiplied by
16457 `GL_POST_COLOR_MATRIX_RED_SCALE', then added to
16458 `GL_POST_COLOR_MATRIX_RED_BIAS'; the green component is multiplied
16459 by `GL_POST_COLOR_MATRIX_GREEN_SCALE', then added to
16460 `GL_POST_COLOR_MATRIX_GREEN_BIAS'; the blue component is multiplied
16461 by `GL_POST_COLOR_MATRIX_BLUE_SCALE', then added to
16462 `GL_POST_COLOR_MATRIX_BLUE_BIAS'; and the alpha component is
16463 multiplied by `GL_POST_COLOR_MATRIX_ALPHA_SCALE', then added to
16464 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'. After all four color components
16465 are scaled and biased, each is clamped to the range [0,1] .
16467 Similarly, if the `ARB_imaging' extension is supported, each of the
16468 four color components may be scaled and biased after processing by
16469 the enabled convolution filter. That is, the red component is
16470 multiplied by `GL_POST_CONVOLUTION_RED_SCALE', then added to
16471 `GL_POST_CONVOLUTION_RED_BIAS'; the green component is multiplied
16472 by `GL_POST_CONVOLUTION_GREEN_SCALE', then added to
16473 `GL_POST_CONVOLUTION_GREEN_BIAS'; the blue component is multiplied
16474 by `GL_POST_CONVOLUTION_BLUE_SCALE', then added to
16475 `GL_POST_CONVOLUTION_BLUE_BIAS'; and the alpha component is
16476 multiplied by `GL_POST_CONVOLUTION_ALPHA_SCALE', then added to
16477 `GL_POST_CONVOLUTION_ALPHA_BIAS'. After all four color components
16478 are scaled and biased, each is clamped to the range [0,1] .
16481 Each color index is shifted left by `GL_INDEX_SHIFT' bits; any bits
16482 beyond the number of fraction bits carried by the fixed-point index
16483 are filled with zeros. If `GL_INDEX_SHIFT' is negative, the shift
16484 is to the right, again zero filled. Then `GL_INDEX_OFFSET' is added
16485 to the index. `GL_INDEX_SHIFT' and `GL_INDEX_OFFSET' are specified
16486 with `glPixelTransfer'.
16488 From this point, operation diverges depending on the required
16489 format of the resulting pixels. If the resulting pixels are to be
16490 written to a color index buffer, or if they are being read back to
16491 client memory in `GL_COLOR_INDEX' format, the pixels continue to be
16492 treated as indices. If `GL_MAP_COLOR' is true, each index is masked
16493 by 2^N-1 , where N is `GL_PIXEL_MAP_I_TO_I_SIZE', then replaced by
16494 the contents of `GL_PIXEL_MAP_I_TO_I' indexed by the masked value.
16495 `GL_MAP_COLOR' is specified with `glPixelTransfer'. The contents of
16496 the index map is specified with `glPixelMap'.
16498 If the resulting pixels are to be written to an RGBA color buffer,
16499 or if they are read back to client memory in a format other than
16500 `GL_COLOR_INDEX', the pixels are converted from indices to colors
16501 by referencing the four maps `GL_PIXEL_MAP_I_TO_R',
16502 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
16503 `GL_PIXEL_MAP_I_TO_A'. Before being dereferenced, the index is
16504 masked by 2^N-1 , where N is `GL_PIXEL_MAP_I_TO_R_SIZE' for the red
16505 map, `GL_PIXEL_MAP_I_TO_G_SIZE' for the green map,
16506 `GL_PIXEL_MAP_I_TO_B_SIZE' for the blue map, and
16507 `GL_PIXEL_MAP_I_TO_A_SIZE' for the alpha map. All components taken
16508 from the maps are then clamped to the range [0,1] . The contents of
16509 the four maps is specified with `glPixelMap'.
16512 Each depth value is multiplied by `GL_DEPTH_SCALE', added to
16513 `GL_DEPTH_BIAS', then clamped to the range [0,1] .
16516 Each index is shifted `GL_INDEX_SHIFT' bits just as a color index
16517 is, then added to `GL_INDEX_OFFSET'. If `GL_MAP_STENCIL' is true,
16518 each index is masked by 2^N-1 , where N is
16519 `GL_PIXEL_MAP_S_TO_S_SIZE', then replaced by the contents of
16520 `GL_PIXEL_MAP_S_TO_S' indexed by the masked value.
16522 The following table gives the type, initial value, and range of valid
16523 values for each of the pixel transfer parameters that are set with
16529 *Type*, *Initial Value*, *Valid Range*
16532 boolean , false , true/false
16535 boolean , false , true/false
16538 integer , 0 , (-∞,∞)
16541 integer , 0 , (-∞,∞)
16573 `GL_POST_COLOR_MATRIX_RED_SCALE'
16576 `GL_POST_COLOR_MATRIX_GREEN_SCALE'
16579 `GL_POST_COLOR_MATRIX_BLUE_SCALE'
16582 `GL_POST_COLOR_MATRIX_ALPHA_SCALE'
16585 `GL_POST_COLOR_MATRIX_RED_BIAS'
16588 `GL_POST_COLOR_MATRIX_GREEN_BIAS'
16591 `GL_POST_COLOR_MATRIX_BLUE_BIAS'
16594 `GL_POST_COLOR_MATRIX_ALPHA_BIAS'
16597 `GL_POST_CONVOLUTION_RED_SCALE'
16600 `GL_POST_CONVOLUTION_GREEN_SCALE'
16603 `GL_POST_CONVOLUTION_BLUE_SCALE'
16606 `GL_POST_CONVOLUTION_ALPHA_SCALE'
16609 `GL_POST_CONVOLUTION_RED_BIAS'
16612 `GL_POST_CONVOLUTION_GREEN_BIAS'
16615 `GL_POST_CONVOLUTION_BLUE_BIAS'
16618 `GL_POST_CONVOLUTION_ALPHA_BIAS'
16621 `glPixelTransferf' can be used to set any pixel transfer parameter. If
16622 the parameter type is boolean, 0 implies false and any other value
16623 implies true. If PNAME is an integer parameter, PARAM is rounded to the
16626 Likewise, `glPixelTransferi' can be used to set any of the pixel
16627 transfer parameters. Boolean parameters are set to false if PARAM is 0
16628 and to true otherwise. PARAM is converted to floating point before being
16629 assigned to real-valued parameters.
16631 `GL_INVALID_ENUM' is generated if PNAME is not an accepted value.
16633 `GL_INVALID_OPERATION' is generated if `glPixelTransfer' is executed
16634 between the execution of `glBegin' and the corresponding execution of
16637 (define-gl-procedures
16643 "Specify the pixel zoom factors.
16648 Specify the X and Y zoom factors for pixel write operations.
16650 `glPixelZoom' specifies values for the X and Y zoom factors. During the
16651 execution of `glDrawPixels' or `glCopyPixels', if (XR , YR ) is the
16652 current raster position, and a given element is in the M th row and N th
16653 column of the pixel rectangle, then pixels whose centers are in the
16654 rectangle with corners at
16656 (XR+N·XFACTOR , YR+M·YFACTOR )
16658 (XR+(N+1,)·XFACTOR , YR+(M+1,)·YFACTOR )
16660 are candidates for replacement. Any pixel whose center lies on the
16661 bottom or left edge of this rectangular region is also modified.
16663 Pixel zoom factors are not limited to positive values. Negative zoom
16664 factors reflect the resulting image about the current raster position.
16666 `GL_INVALID_OPERATION' is generated if `glPixelZoom' is executed between
16667 the execution of `glBegin' and the corresponding execution of `glEnd'.")
16669 (define-gl-procedures
16670 ((glPointParameterf
16680 "Specify point parameters.
16683 Specifies a single-valued point parameter. `GL_POINT_SIZE_MIN',
16684 `GL_POINT_SIZE_MAX', `GL_POINT_FADE_THRESHOLD_SIZE', and
16685 `GL_POINT_SPRITE_COORD_ORIGIN' are accepted.
16688 Specifies the value that PNAME will be set to.
16690 The following values are accepted for PNAME:
16692 `GL_POINT_SIZE_MIN'
16695 PARAMS is a single floating-point value that specifies the minimum
16696 point size. The default value is 0.0.
16698 `GL_POINT_SIZE_MAX'
16701 PARAMS is a single floating-point value that specifies the maximum
16702 point size. The default value is 1.0.
16704 `GL_POINT_FADE_THRESHOLD_SIZE'
16707 PARAMS is a single floating-point value that specifies the
16708 threshold value to which point sizes are clamped if they exceed the
16709 specified value. The default value is 1.0.
16711 `GL_POINT_DISTANCE_ATTENUATION'
16714 PARAMS is an array of three floating-point values that specify the
16715 coefficients used for scaling the computed point size. The default
16716 values are (1,00) .
16718 `GL_POINT_SPRITE_COORD_ORIGIN'
16721 PARAMS is a single enum specifying the point sprite texture
16722 coordinate origin, either `GL_LOWER_LEFT' or `GL_UPPER_LEFT'. The
16723 default value is `GL_UPPER_LEFT'.
16725 `GL_INVALID_VALUE' is generated If the value specified for
16726 `GL_POINT_SIZE_MIN', `GL_POINT_SIZE_MAX', or
16727 `GL_POINT_FADE_THRESHOLD_SIZE' is less than zero.
16729 `GL_INVALID_ENUM' is generated If the value specified for
16730 `GL_POINT_SPRITE_COORD_ORIGIN' is not `GL_LOWER_LEFT' or
16733 If the value for `GL_POINT_SIZE_MIN' is greater than
16734 `GL_POINT_SIZE_MAX', the point size after clamping is undefined, but no
16735 error is generated.")
16737 (define-gl-procedures
16738 ((glPointSize (size GLfloat) -> void))
16739 "Specify the diameter of rasterized points.
16742 Specifies the diameter of rasterized points. The initial value is
16745 `glPointSize' specifies the rasterized diameter of both aliased and
16746 antialiased points. Using a point size other than 1 has different
16747 effects, depending on whether point antialiasing is enabled. To enable
16748 and disable point antialiasing, call `glEnable' and `glDisable' with
16749 argument `GL_POINT_SMOOTH'. Point antialiasing is initially disabled.
16751 The specified point size is multiplied with a distance attenuation
16752 factor and clamped to the specified point size range, and further
16753 clamped to the implementation-dependent point size range to produce the
16754 derived point size using
16756 POINTSIZE=CLAMP\u2062(SIZE×√(1/A+B×D+C×D^2,,,),,)
16758 where D is the eye-coordinate distance from the eye to the vertex, and A
16759 , B , and C are the distance attenuation coefficients (see
16760 `glPointParameter').
16762 If multisampling is disabled, the computed point size is used as the
16765 If multisampling is enabled, the point may be faded by modifying the
16766 point alpha value (see `glSampleCoverage') instead of allowing the point
16767 width to go below a given threshold (see `glPointParameter'). In this
16768 case, the width is further modified in the following manner:
16770 POINTWIDTH={(POINTSIZE), (THRESHOLD)\u2062(POINTSIZE>=THRESHOLD),
16773 The point alpha value is modified by computing:
16775 POINTALPHA={(1), ((POINTSIZE/THRESHOLD,)^2)\u2062(POINTSIZE>=THRESHOLD),
16778 If point antialiasing is disabled, the actual size is determined by
16779 rounding the supplied size to the nearest integer. (If the rounding
16780 results in the value 0, it is as if the point size were 1.) If the
16781 rounded size is odd, then the center point (X , Y ) of the pixel
16782 fragment that represents the point is computed as
16784 (⌊X_W,⌋+.5,⌊Y_W,⌋+.5)
16786 where W subscripts indicate window coordinates. All pixels that lie
16787 within the square grid of the rounded size centered at (X , Y ) make up
16788 the fragment. If the size is even, the center point is
16790 (⌊X_W+.5,⌋,⌊Y_W+.5,⌋)
16792 and the rasterized fragment's centers are the half-integer window
16793 coordinates within the square of the rounded size centered at (X,Y) .
16794 All pixel fragments produced in rasterizing a nonantialiased point are
16795 assigned the same associated data, that of the vertex corresponding to
16798 If antialiasing is enabled, then point rasterization produces a fragment
16799 for each pixel square that intersects the region lying within the circle
16800 having diameter equal to the current point size and centered at the
16801 point's (X_W,Y_W) . The coverage value for each fragment is the window
16802 coordinate area of the intersection of the circular region with the
16803 corresponding pixel square. This value is saved and used in the final
16804 rasterization step. The data associated with each fragment is the data
16805 associated with the point being rasterized.
16807 Not all sizes are supported when point antialiasing is enabled. If an
16808 unsupported size is requested, the nearest supported size is used. Only
16809 size 1 is guaranteed to be supported; others depend on the
16810 implementation. To query the range of supported sizes and the size
16811 difference between supported sizes within the range, call `glGet' with
16812 arguments `GL_SMOOTH_POINT_SIZE_RANGE' and
16813 `GL_SMOOTH_POINT_SIZE_GRANULARITY'. For aliased points, query the
16814 supported ranges and granularity with `glGet' with arguments
16815 `GL_ALIASED_POINT_SIZE_RANGE'.
16817 `GL_INVALID_VALUE' is generated if SIZE is less than or equal to 0.
16819 `GL_INVALID_OPERATION' is generated if `glPointSize' is executed between
16820 the execution of `glBegin' and the corresponding execution of `glEnd'.")
16822 (define-gl-procedures
16828 "Select a polygon rasterization mode.
16831 Specifies the polygons that MODE applies to. Must be `GL_FRONT' for
16832 front-facing polygons, `GL_BACK' for back-facing polygons, or
16833 `GL_FRONT_AND_BACK' for front- and back-facing polygons.
16836 Specifies how polygons will be rasterized. Accepted values are
16837 `GL_POINT', `GL_LINE', and `GL_FILL'. The initial value is
16838 `GL_FILL' for both front- and back-facing polygons.
16840 `glPolygonMode' controls the interpretation of polygons for
16841 rasterization. FACE describes which polygons MODE applies to:
16842 front-facing polygons (`GL_FRONT'), back-facing polygons (`GL_BACK'), or
16843 both (`GL_FRONT_AND_BACK'). The polygon mode affects only the final
16844 rasterization of polygons. In particular, a polygon's vertices are lit
16845 and the polygon is clipped and possibly culled before these modes are
16848 Three modes are defined and can be specified in MODE:
16851 Polygon vertices that are marked as the start of a boundary edge
16852 are drawn as points. Point attributes such as `GL_POINT_SIZE' and
16853 `GL_POINT_SMOOTH' control the rasterization of the points. Polygon
16854 rasterization attributes other than `GL_POLYGON_MODE' have no
16858 Boundary edges of the polygon are drawn as line segments. They are
16859 treated as connected line segments for line stippling; the line
16860 stipple counter and pattern are not reset between segments (see
16861 `glLineStipple'). Line attributes such as `GL_LINE_WIDTH' and
16862 `GL_LINE_SMOOTH' control the rasterization of the lines. Polygon
16863 rasterization attributes other than `GL_POLYGON_MODE' have no
16867 The interior of the polygon is filled. Polygon attributes such as
16868 `GL_POLYGON_STIPPLE' and `GL_POLYGON_SMOOTH' control the
16869 rasterization of the polygon.
16871 `GL_INVALID_ENUM' is generated if either FACE or MODE is not an accepted
16874 `GL_INVALID_OPERATION' is generated if `glPolygonMode' is executed
16875 between the execution of `glBegin' and the corresponding execution of
16878 (define-gl-procedures
16884 "Set the scale and units used to calculate depth values.
16887 Specifies a scale factor that is used to create a variable depth
16888 offset for each polygon. The initial value is 0.
16891 Is multiplied by an implementation-specific value to create a
16892 constant depth offset. The initial value is 0.
16894 When `GL_POLYGON_OFFSET_FILL', `GL_POLYGON_OFFSET_LINE', or
16895 `GL_POLYGON_OFFSET_POINT' is enabled, each fragment's DEPTH value will
16896 be offset after it is interpolated from the DEPTH values of the
16897 appropriate vertices. The value of the offset is FACTOR×DZ+R×UNITS ,
16898 where DZ is a measurement of the change in depth relative to the screen
16899 area of the polygon, and R is the smallest value that is guaranteed to
16900 produce a resolvable offset for a given implementation. The offset is
16901 added before the depth test is performed and before the value is written
16902 into the depth buffer.
16904 `glPolygonOffset' is useful for rendering hidden-line images, for
16905 applying decals to surfaces, and for rendering solids with highlighted
16908 `GL_INVALID_OPERATION' is generated if `glPolygonOffset' is executed
16909 between the execution of `glBegin' and the corresponding execution of
16912 (define-gl-procedures
16914 (pattern const-GLubyte-*)
16917 "Set the polygon stippling pattern.
16920 Specifies a pointer to a 32×32 stipple pattern that will be
16921 unpacked from memory in the same way that `glDrawPixels' unpacks
16924 Polygon stippling, like line stippling (see `glLineStipple'), masks out
16925 certain fragments produced by rasterization, creating a pattern.
16926 Stippling is independent of polygon antialiasing.
16928 PATTERN is a pointer to a 32×32 stipple pattern that is stored in memory
16929 just like the pixel data supplied to a `glDrawPixels' call with height
16930 and WIDTH both equal to 32, a pixel format of `GL_COLOR_INDEX', and data
16931 type of `GL_BITMAP'. That is, the stipple pattern is represented as a
16932 32×32 array of 1-bit color indices packed in unsigned bytes.
16933 `glPixelStore' parameters like `GL_UNPACK_SWAP_BYTES' and
16934 `GL_UNPACK_LSB_FIRST' affect the assembling of the bits into a stipple
16935 pattern. Pixel transfer operations (shift, offset, pixel map) are not
16936 applied to the stipple image, however.
16938 If a non-zero named buffer object is bound to the
16939 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a stipple
16940 pattern is specified, PATTERN is treated as a byte offset into the
16941 buffer object's data store.
16943 To enable and disable polygon stippling, call `glEnable' and `glDisable'
16944 with argument `GL_POLYGON_STIPPLE'. Polygon stippling is initially
16945 disabled. If it's enabled, a rasterized polygon fragment with window
16946 coordinates X_W and Y_W is sent to the next stage of the GL if and only
16947 if the (X_W%32 )th bit in the (Y_W%32 )th row of the stipple pattern is
16948 1 (one). When polygon stippling is disabled, it is as if the stipple
16949 pattern consists of all 1's.
16951 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16952 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
16953 data store is currently mapped.
16955 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
16956 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
16957 unpacked from the buffer object such that the memory reads required
16958 would exceed the data store size.
16960 `GL_INVALID_OPERATION' is generated if `glPolygonStipple' is executed
16961 between the execution of `glBegin' and the corresponding execution of
16964 (define-gl-procedures
16965 ((glPrioritizeTextures
16967 (textures const-GLuint-*)
16968 (priorities const-GLclampf-*)
16971 "Set texture residence priority.
16974 Specifies the number of textures to be prioritized.
16977 Specifies an array containing the names of the textures to be
16981 Specifies an array containing the texture priorities. A priority
16982 given in an element of PRIORITIES applies to the texture named by
16983 the corresponding element of TEXTURES.
16985 `glPrioritizeTextures' assigns the N texture priorities given in
16986 PRIORITIES to the N textures named in TEXTURES.
16988 The GL establishes a ``working set'' of textures that are resident in
16989 texture memory. These textures may be bound to a texture target much
16990 more efficiently than textures that are not resident. By specifying a
16991 priority for each texture, `glPrioritizeTextures' allows applications to
16992 guide the GL implementation in determining which textures should be
16995 The priorities given in PRIORITIES are clamped to the range [0,1] before
16996 they are assigned. 0 indicates the lowest priority; textures with
16997 priority 0 are least likely to be resident. 1 indicates the highest
16998 priority; textures with priority 1 are most likely to be resident.
16999 However, textures are not guaranteed to be resident until they are used.
17001 `glPrioritizeTextures' silently ignores attempts to prioritize texture 0
17002 or any texture name that does not correspond to an existing texture.
17004 `glPrioritizeTextures' does not require that any of the textures named
17005 by TEXTURES be bound to a texture target. `glTexParameter' may also be
17006 used to set a texture's priority, but only if the texture is currently
17007 bound. This is the only way to set the priority of a default texture.
17009 `GL_INVALID_VALUE' is generated if N is negative.
17011 `GL_INVALID_OPERATION' is generated if `glPrioritizeTextures' is
17012 executed between the execution of `glBegin' and the corresponding
17013 execution of `glEnd'.")
17015 (define-gl-procedures
17016 ((glPushAttrib (mask GLbitfield) -> void)
17017 (glPopAttrib -> void))
17018 "Push and pop the server attribute stack.
17021 Specifies a mask that indicates which attributes to save. Values
17022 for MASK are listed below.
17024 `glPushAttrib' takes one argument, a mask that indicates which groups of
17025 state variables to save on the attribute stack. Symbolic constants are
17026 used to set bits in the mask. MASK is typically constructed by
17027 specifying the bitwise-or of several of these constants together. The
17028 special mask `GL_ALL_ATTRIB_BITS' can be used to save all stackable
17031 The symbolic mask constants and their associated GL state are as follows
17032 (the second column lists which attributes are saved):
17036 `GL_ACCUM_BUFFER_BIT'
17037 Accumulation buffer clear value
17039 `GL_COLOR_BUFFER_BIT'
17040 `GL_ALPHA_TEST' enable bit
17043 Alpha test function and reference value
17046 `GL_BLEND' enable bit
17049 Blending source and destination functions
17052 Constant blend color
17058 `GL_DITHER' enable bit
17061 `GL_DRAW_BUFFER' setting
17064 `GL_COLOR_LOGIC_OP' enable bit
17067 `GL_INDEX_LOGIC_OP' enable bit
17073 Color mode and index mode clear values
17076 Color mode and index mode writemasks
17082 Current color index
17085 Current normal vector
17088 Current texture coordinates
17091 Current raster position
17094 `GL_CURRENT_RASTER_POSITION_VALID' flag
17097 RGBA color associated with current raster position
17100 Color index associated with current raster position
17103 Texture coordinates associated with current raster position
17106 `GL_EDGE_FLAG' flag
17108 `GL_DEPTH_BUFFER_BIT'
17109 `GL_DEPTH_TEST' enable bit
17112 Depth buffer test function
17115 Depth buffer clear value
17118 `GL_DEPTH_WRITEMASK' enable bit
17121 `GL_ALPHA_TEST' flag
17124 `GL_AUTO_NORMAL' flag
17130 Enable bits for the user-definable clipping planes
17133 `GL_COLOR_MATERIAL'
17136 `GL_CULL_FACE' flag
17139 `GL_DEPTH_TEST' flag
17148 `GL_LIGHT'I where `0' <= I < `GL_MAX_LIGHTS'
17154 `GL_LINE_SMOOTH' flag
17157 `GL_LINE_STIPPLE' flag
17160 `GL_COLOR_LOGIC_OP' flag
17163 `GL_INDEX_LOGIC_OP' flag
17166 `GL_MAP1_'X where X is a map type
17169 `GL_MAP2_'X where X is a map type
17172 `GL_MULTISAMPLE' flag
17175 `GL_NORMALIZE' flag
17178 `GL_POINT_SMOOTH' flag
17181 `GL_POLYGON_OFFSET_LINE' flag
17184 `GL_POLYGON_OFFSET_FILL' flag
17187 `GL_POLYGON_OFFSET_POINT' flag
17190 `GL_POLYGON_SMOOTH' flag
17193 `GL_POLYGON_STIPPLE' flag
17196 `GL_SAMPLE_ALPHA_TO_COVERAGE' flag
17199 `GL_SAMPLE_ALPHA_TO_ONE' flag
17202 `GL_SAMPLE_COVERAGE' flag
17205 `GL_SCISSOR_TEST' flag
17208 `GL_STENCIL_TEST' flag
17211 `GL_TEXTURE_1D' flag
17214 `GL_TEXTURE_2D' flag
17217 `GL_TEXTURE_3D' flag
17220 Flags `GL_TEXTURE_GEN_'X where X is S, T, R, or Q
17223 `GL_MAP1_'X enable bits, where X is a map type
17226 `GL_MAP2_'X enable bits, where X is a map type
17229 1D grid endpoints and divisions
17232 2D grid endpoints and divisions
17235 `GL_AUTO_NORMAL' enable bit
17238 `GL_FOG' enable bit
17256 `GL_FOG_MODE' value
17259 `GL_PERSPECTIVE_CORRECTION_HINT' setting
17262 `GL_POINT_SMOOTH_HINT' setting
17265 `GL_LINE_SMOOTH_HINT' setting
17268 `GL_POLYGON_SMOOTH_HINT' setting
17271 `GL_FOG_HINT' setting
17274 `GL_GENERATE_MIPMAP_HINT' setting
17277 `GL_TEXTURE_COMPRESSION_HINT' setting
17280 `GL_COLOR_MATERIAL' enable bit
17283 `GL_COLOR_MATERIAL_FACE' value
17286 Color material parameters that are tracking the current color
17289 Ambient scene color
17292 `GL_LIGHT_MODEL_LOCAL_VIEWER' value
17295 `GL_LIGHT_MODEL_TWO_SIDE' setting
17298 `GL_LIGHTING' enable bit
17301 Enable bit for each light
17304 Ambient, diffuse, and specular intensity for each light
17307 Direction, position, exponent, and cutoff angle for each light
17310 Constant, linear, and quadratic attenuation factors for each light
17313 Ambient, diffuse, specular, and emissive color for each material
17316 Ambient, diffuse, and specular color indices for each material
17319 Specular exponent for each material
17322 `GL_SHADE_MODEL' setting
17325 `GL_LINE_SMOOTH' flag
17328 `GL_LINE_STIPPLE' enable bit
17331 Line stipple pattern and repeat counter
17337 `GL_LIST_BASE' setting
17339 `GL_MULTISAMPLE_BIT'
17340 `GL_MULTISAMPLE' flag
17343 `GL_SAMPLE_ALPHA_TO_COVERAGE' flag
17346 `GL_SAMPLE_ALPHA_TO_ONE' flag
17349 `GL_SAMPLE_COVERAGE' flag
17352 `GL_SAMPLE_COVERAGE_VALUE' value
17355 `GL_SAMPLE_COVERAGE_INVERT' value
17357 `GL_PIXEL_MODE_BIT'
17358 `GL_RED_BIAS' and `GL_RED_SCALE' settings
17361 `GL_GREEN_BIAS' and `GL_GREEN_SCALE' values
17364 `GL_BLUE_BIAS' and `GL_BLUE_SCALE'
17367 `GL_ALPHA_BIAS' and `GL_ALPHA_SCALE'
17370 `GL_DEPTH_BIAS' and `GL_DEPTH_SCALE'
17373 `GL_INDEX_OFFSET' and `GL_INDEX_SHIFT' values
17376 `GL_MAP_COLOR' and `GL_MAP_STENCIL' flags
17379 `GL_ZOOM_X' and `GL_ZOOM_Y' factors
17382 `GL_READ_BUFFER' setting
17385 `GL_POINT_SMOOTH' flag
17391 `GL_CULL_FACE' enable bit
17394 `GL_CULL_FACE_MODE' value
17397 `GL_FRONT_FACE' indicator
17400 `GL_POLYGON_MODE' setting
17403 `GL_POLYGON_SMOOTH' flag
17406 `GL_POLYGON_STIPPLE' enable bit
17409 `GL_POLYGON_OFFSET_FILL' flag
17412 `GL_POLYGON_OFFSET_LINE' flag
17415 `GL_POLYGON_OFFSET_POINT' flag
17418 `GL_POLYGON_OFFSET_FACTOR'
17421 `GL_POLYGON_OFFSET_UNITS'
17423 `GL_POLYGON_STIPPLE_BIT'
17424 Polygon stipple image
17427 `GL_SCISSOR_TEST' flag
17432 `GL_STENCIL_BUFFER_BIT'
17433 `GL_STENCIL_TEST' enable bit
17436 Stencil function and reference value
17442 Stencil fail, pass, and depth buffer pass actions
17445 Stencil buffer clear value
17448 Stencil buffer writemask
17451 Enable bits for the four texture coordinates
17454 Border color for each texture image
17457 Minification function for each texture image
17460 Magnification function for each texture image
17463 Texture coordinates and wrap mode for each texture image
17466 Color and mode for each texture environment
17469 Enable bits `GL_TEXTURE_GEN_'X, X is S, T, R, and Q
17472 `GL_TEXTURE_GEN_MODE' setting for S, T, R, and Q
17475 `glTexGen' plane equations for S, T, R, and Q
17478 Current texture bindings (for example, `GL_TEXTURE_BINDING_2D')
17481 Coefficients of the six clipping planes
17484 Enable bits for the user-definable clipping planes
17487 `GL_MATRIX_MODE' value
17490 `GL_NORMALIZE' flag
17493 `GL_RESCALE_NORMAL' flag
17496 Depth range (near and far)
17499 Viewport origin and extent
17501 `glPopAttrib' restores the values of the state variables saved with the
17502 last `glPushAttrib' command. Those not saved are left unchanged.
17504 It is an error to push attributes onto a full stack or to pop attributes
17505 off an empty stack. In either case, the error flag is set and no other
17506 change is made to GL state.
17508 Initially, the attribute stack is empty.
17510 `GL_STACK_OVERFLOW' is generated if `glPushAttrib' is called while the
17511 attribute stack is full.
17513 `GL_STACK_UNDERFLOW' is generated if `glPopAttrib' is called while the
17514 attribute stack is empty.
17516 `GL_INVALID_OPERATION' is generated if `glPushAttrib' or `glPopAttrib'
17517 is executed between the execution of `glBegin' and the corresponding
17518 execution of `glEnd'.")
17520 (define-gl-procedures
17521 ((glPushClientAttrib (mask GLbitfield) -> void)
17522 (glPopClientAttrib -> void))
17523 "Push and pop the client attribute stack.
17526 Specifies a mask that indicates which attributes to save. Values
17527 for MASK are listed below.
17529 `glPushClientAttrib' takes one argument, a mask that indicates which
17530 groups of client-state variables to save on the client attribute stack.
17531 Symbolic constants are used to set bits in the mask. MASK is typically
17532 constructed by specifying the bitwise-or of several of these constants
17533 together. The special mask `GL_CLIENT_ALL_ATTRIB_BITS' can be used to
17534 save all stackable client state.
17536 The symbolic mask constants and their associated GL client state are as
17537 follows (the second column lists which attributes are saved):
17539 `GL_CLIENT_PIXEL_STORE_BIT' Pixel storage modes
17540 `GL_CLIENT_VERTEX_ARRAY_BIT' Vertex arrays (and enables)
17542 `glPopClientAttrib' restores the values of the client-state variables
17543 saved with the last `glPushClientAttrib'. Those not saved are left
17546 It is an error to push attributes onto a full client attribute stack or
17547 to pop attributes off an empty stack. In either case, the error flag is
17548 set, and no other change is made to GL state.
17550 Initially, the client attribute stack is empty.
17552 `GL_STACK_OVERFLOW' is generated if `glPushClientAttrib' is called while
17553 the attribute stack is full.
17555 `GL_STACK_UNDERFLOW' is generated if `glPopClientAttrib' is called while
17556 the attribute stack is empty.")
17558 (define-gl-procedures
17559 ((glPushMatrix -> void) (glPopMatrix -> void))
17560 "Push and pop the current matrix stack.
17562 There is a stack of matrices for each of the matrix modes. In
17563 `GL_MODELVIEW' mode, the stack depth is at least 32. In the other modes,
17564 `GL_COLOR', `GL_PROJECTION', and `GL_TEXTURE', the depth is at least 2.
17565 The current matrix in any mode is the matrix on the top of the stack for
17568 `glPushMatrix' pushes the current matrix stack down by one, duplicating
17569 the current matrix. That is, after a `glPushMatrix' call, the matrix on
17570 top of the stack is identical to the one below it.
17572 `glPopMatrix' pops the current matrix stack, replacing the current
17573 matrix with the one below it on the stack.
17575 Initially, each of the stacks contains one matrix, an identity matrix.
17577 It is an error to push a full matrix stack or to pop a matrix stack that
17578 contains only a single matrix. In either case, the error flag is set and
17579 no other change is made to GL state.
17581 `GL_STACK_OVERFLOW' is generated if `glPushMatrix' is called while the
17582 current matrix stack is full.
17584 `GL_STACK_UNDERFLOW' is generated if `glPopMatrix' is called while the
17585 current matrix stack contains only a single matrix.
17587 `GL_INVALID_OPERATION' is generated if `glPushMatrix' or `glPopMatrix'
17588 is executed between the execution of `glBegin' and the corresponding
17589 execution of `glEnd'.")
17591 (define-gl-procedures
17592 ((glPushName (name GLuint) -> void)
17593 (glPopName -> void))
17594 "Push and pop the name stack.
17597 Specifies a name that will be pushed onto the name stack.
17599 The name stack is used during selection mode to allow sets of rendering
17600 commands to be uniquely identified. It consists of an ordered set of
17601 unsigned integers and is initially empty.
17603 `glPushName' causes NAME to be pushed onto the name stack. `glPopName'
17604 pops one name off the top of the stack.
17606 The maximum name stack depth is implementation-dependent; call
17607 `GL_MAX_NAME_STACK_DEPTH' to find out the value for a particular
17608 implementation. It is an error to push a name onto a full stack or to
17609 pop a name off an empty stack. It is also an error to manipulate the
17610 name stack between the execution of `glBegin' and the corresponding
17611 execution of `glEnd'. In any of these cases, the error flag is set and
17612 no other change is made to GL state.
17614 The name stack is always empty while the render mode is not `GL_SELECT'.
17615 Calls to `glPushName' or `glPopName' while the render mode is not
17616 `GL_SELECT' are ignored.
17618 `GL_STACK_OVERFLOW' is generated if `glPushName' is called while the
17619 name stack is full.
17621 `GL_STACK_UNDERFLOW' is generated if `glPopName' is called while the
17622 name stack is empty.
17624 `GL_INVALID_OPERATION' is generated if `glPushName' or `glPopName' is
17625 executed between a call to `glBegin' and the corresponding call to
17628 (define-gl-procedures
17629 ((glRasterPos2i (x GLint) (y GLint) -> void)
17630 (glRasterPos2f (x GLfloat) (y GLfloat) -> void)
17657 "Specify the raster position for pixel operations.
17666 Specify the X , Y , Z , and W object coordinates (if present) for
17667 the raster position.
17669 The GL maintains a 3D position in window coordinates. This position,
17670 called the raster position, is used to position pixel and bitmap write
17671 operations. It is maintained with subpixel accuracy. See `glBitmap',
17672 `glDrawPixels', and `glCopyPixels'.
17674 The current raster position consists of three window coordinates (X , Y
17675 , Z ), a clip coordinate value (W ), an eye coordinate distance, a valid
17676 bit, and associated color data and texture coordinates. The W coordinate
17677 is a clip coordinate, because W is not projected to window coordinates.
17678 `glRasterPos4' specifies object coordinates X , Y , Z , and W
17679 explicitly. `glRasterPos3' specifies object coordinate X , Y , and Z
17680 explicitly, while W is implicitly set to 1. `glRasterPos2' uses the
17681 argument values for X and Y while implicitly setting Z and W to 0 and 1.
17683 The object coordinates presented by `glRasterPos' are treated just like
17684 those of a `glVertex' command: They are transformed by the current
17685 modelview and projection matrices and passed to the clipping stage. If
17686 the vertex is not culled, then it is projected and scaled to window
17687 coordinates, which become the new current raster position, and the
17688 `GL_CURRENT_RASTER_POSITION_VALID' flag is set. If the vertex IS culled,
17689 then the valid bit is cleared and the current raster position and
17690 associated color and texture coordinates are undefined.
17692 The current raster position also includes some associated color data and
17693 texture coordinates. If lighting is enabled, then
17694 `GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `GL_CURRENT_RASTER_INDEX'
17695 (in color index mode) is set to the color produced by the lighting
17696 calculation (see `glLight', `glLightModel', and `glShadeModel'). If
17697 lighting is disabled, current color (in RGBA mode, state variable
17698 `GL_CURRENT_COLOR') or color index (in color index mode, state variable
17699 `GL_CURRENT_INDEX') is used to update the current raster color.
17700 `GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated.
17702 Likewise, `GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of
17703 `GL_CURRENT_TEXTURE_COORDS', based on the texture matrix and the texture
17704 generation functions (see `glTexGen'). Finally, the distance from the
17705 origin of the eye coordinate system to the vertex as transformed by only
17706 the modelview matrix replaces `GL_CURRENT_RASTER_DISTANCE'.
17708 Initially, the current raster position is (0, 0, 0, 1), the current
17709 raster distance is 0, the valid bit is set, the associated RGBA color is
17710 (1, 1, 1, 1), the associated color index is 1, and the associated
17711 texture coordinates are (0, 0, 0, 1). In RGBA mode,
17712 `GL_CURRENT_RASTER_INDEX' is always 1; in color index mode, the current
17713 raster RGBA color always maintains its initial value.
17715 `GL_INVALID_OPERATION' is generated if `glRasterPos' is executed between
17716 the execution of `glBegin' and the corresponding execution of `glEnd'.")
17718 (define-gl-procedures
17719 ((glReadBuffer (mode GLenum) -> void))
17720 "Select a color buffer source for pixels.
17723 Specifies a color buffer. Accepted values are `GL_FRONT_LEFT',
17724 `GL_FRONT_RIGHT', `GL_BACK_LEFT', `GL_BACK_RIGHT', `GL_FRONT',
17725 `GL_BACK', `GL_LEFT', `GL_RIGHT', and `GL_AUX'I, where I is between
17726 0 and the value of `GL_AUX_BUFFERS' minus 1.
17728 `glReadBuffer' specifies a color buffer as the source for subsequent
17729 `glReadPixels', `glCopyTexImage1D', `glCopyTexImage2D',
17730 `glCopyTexSubImage1D', `glCopyTexSubImage2D', `glCopyTexSubImage3D', and
17731 `glCopyPixels' commands. MODE accepts one of twelve or more predefined
17732 values. (`GL_AUX0' through `GL_AUX3' are always defined.) In a fully
17733 configured system, `GL_FRONT', `GL_LEFT', and `GL_FRONT_LEFT' all name
17734 the front left buffer, `GL_FRONT_RIGHT' and `GL_RIGHT' name the front
17735 right buffer, and `GL_BACK_LEFT' and `GL_BACK' name the back left
17738 Nonstereo double-buffered configurations have only a front left and a
17739 back left buffer. Single-buffered configurations have a front left and a
17740 front right buffer if stereo, and only a front left buffer if nonstereo.
17741 It is an error to specify a nonexistent buffer to `glReadBuffer'.
17743 MODE is initially `GL_FRONT' in single-buffered configurations and
17744 `GL_BACK' in double-buffered configurations.
17746 `GL_INVALID_ENUM' is generated if MODE is not one of the twelve (or
17747 more) accepted values.
17749 `GL_INVALID_OPERATION' is generated if MODE specifies a buffer that does
17752 `GL_INVALID_OPERATION' is generated if `glReadBuffer' is executed
17753 between the execution of `glBegin' and the corresponding execution of
17756 (define-gl-procedures
17767 "Read a block of pixels from the frame buffer.
17772 Specify the window coordinates of the first pixel that is read from
17773 the frame buffer. This location is the lower left corner of a
17774 rectangular block of pixels.
17779 Specify the dimensions of the pixel rectangle. WIDTH and HEIGHT of
17780 one correspond to a single pixel.
17783 Specifies the format of the pixel data. The following symbolic
17784 values are accepted: `GL_COLOR_INDEX', `GL_STENCIL_INDEX',
17785 `GL_DEPTH_COMPONENT', `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA',
17786 `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', and
17787 `GL_LUMINANCE_ALPHA'.
17790 Specifies the data type of the pixel data. Must be one of
17791 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
17792 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
17793 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
17794 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
17795 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
17796 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
17797 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
17798 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV'.
17801 Returns the pixel data.
17803 `glReadPixels' returns pixel data from the frame buffer, starting with
17804 the pixel whose lower left corner is at location (X, Y), into client
17805 memory starting at location DATA. Several parameters control the
17806 processing of the pixel data before it is placed into client memory.
17807 These parameters are set with three commands: `glPixelStore',
17808 `glPixelTransfer', and `glPixelMap'. This reference page describes the
17809 effects on `glReadPixels' of most, but not all of the parameters
17810 specified by these three commands.
17812 If a non-zero named buffer object is bound to the `GL_PIXEL_PACK_BUFFER'
17813 target (see `glBindBuffer') while a block of pixels is requested, DATA
17814 is treated as a byte offset into the buffer object's data store rather
17815 than a pointer to client memory.
17817 When the `ARB_imaging' extension is supported, the pixel data may be
17818 processed by additional operations including color table lookup, color
17819 matrix transformations, convolutions, histograms, and minimum and
17820 maximum pixel value computations.
17822 `glReadPixels' returns values from each pixel with lower left corner at
17823 (X+I,Y+J) for 0<=I<WIDTH and 0<=J<HEIGHT . This pixel is said to be the
17824 I th pixel in the J th row. Pixels are returned in row order from the
17825 lowest to the highest row, left to right in each row.
17827 FORMAT specifies the format for the returned pixel values; accepted
17831 Color indices are read from the color buffer selected by
17832 `glReadBuffer'. Each index is converted to fixed point, shifted
17833 left or right depending on the value and sign of `GL_INDEX_SHIFT',
17834 and added to `GL_INDEX_OFFSET'. If `GL_MAP_COLOR' is `GL_TRUE',
17835 indices are replaced by their mappings in the table
17836 `GL_PIXEL_MAP_I_TO_I'.
17839 Stencil values are read from the stencil buffer. Each index is
17840 converted to fixed point, shifted left or right depending on the
17841 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'.
17842 If `GL_MAP_STENCIL' is `GL_TRUE', indices are replaced by their
17843 mappings in the table `GL_PIXEL_MAP_S_TO_S'.
17845 `GL_DEPTH_COMPONENT'
17846 Depth values are read from the depth buffer. Each component is
17847 converted to floating point such that the minimum depth value maps
17848 to 0 and the maximum value maps to 1. Each component is then
17849 multiplied by `GL_DEPTH_SCALE', added to `GL_DEPTH_BIAS', and
17850 finally clamped to the range [0,1] .
17861 `GL_LUMINANCE_ALPHA'
17862 Processing differs depending on whether color buffers store color
17863 indices or RGBA color components. If color indices are stored, they
17864 are read from the color buffer selected by `glReadBuffer'. Each
17865 index is converted to fixed point, shifted left or right depending
17866 on the value and sign of `GL_INDEX_SHIFT', and added to
17867 `GL_INDEX_OFFSET'. Indices are then replaced by the red, green,
17868 blue, and alpha values obtained by indexing the tables
17869 `GL_PIXEL_MAP_I_TO_R', `GL_PIXEL_MAP_I_TO_G',
17870 `GL_PIXEL_MAP_I_TO_B', and `GL_PIXEL_MAP_I_TO_A'. Each table must
17871 be of size 2^N , but N may be different for different tables.
17872 Before an index is used to look up a value in a table of size 2^N ,
17873 it must be masked against 2^N-1 .
17875 If RGBA color components are stored in the color buffers, they are
17876 read from the color buffer selected by `glReadBuffer'. Each color
17877 component is converted to floating point such that zero intensity
17878 maps to 0.0 and full intensity maps to 1.0. Each component is then
17879 multiplied by `GL_c_SCALE' and added to `GL_c_BIAS', where C is
17880 RED, GREEN, BLUE, or ALPHA. Finally, if `GL_MAP_COLOR' is
17881 `GL_TRUE', each component is clamped to the range [0,1] , scaled to
17882 the size of its corresponding table, and is then replaced by its
17883 mapping in the table `GL_PIXEL_MAP_c_TO_c', where C is R, G, B, or
17886 Unneeded data is then discarded. For example, `GL_RED' discards the
17887 green, blue, and alpha components, while `GL_RGB' discards only the
17888 alpha component. `GL_LUMINANCE' computes a single-component value
17889 as the sum of the red, green, and blue components, and
17890 `GL_LUMINANCE_ALPHA' does the same, while keeping alpha as a second
17891 value. The final values are clamped to the range [0,1] .
17893 The shift, scale, bias, and lookup factors just described are all
17894 specified by `glPixelTransfer'. The lookup table contents themselves are
17895 specified by `glPixelMap'.
17897 Finally, the indices or components are converted to the proper format,
17898 as specified by TYPE. If FORMAT is `GL_COLOR_INDEX' or
17899 `GL_STENCIL_INDEX' and TYPE is not `GL_FLOAT', each index is masked with
17900 the mask value given in the following table. If TYPE is `GL_FLOAT', then
17901 each integer index is converted to single-precision floating-point
17904 If FORMAT is `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
17905 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_LUMINANCE', or `GL_LUMINANCE_ALPHA'
17906 and TYPE is not `GL_FLOAT', each component is multiplied by the
17907 multiplier shown in the following table. If type is `GL_FLOAT', then
17908 each component is passed as is (or converted to the client's
17909 single-precision floating-point format if it is different from the one
17915 *Index Mask*, *Component Conversion*
17918 2^8-1 , (2^8-1,)\u2062C
17921 2^7-1 , (2^8-1,)\u2062C-1,/2
17926 `GL_UNSIGNED_SHORT'
17927 2^16-1 , (2^16-1,)\u2062C
17930 2^15-1 , (2^16-1,)\u2062C-1,/2
17933 2^32-1 , (2^32-1,)\u2062C
17936 2^31-1 , (2^32-1,)\u2062C-1,/2
17941 Return values are placed in memory as follows. If FORMAT is
17942 `GL_COLOR_INDEX', `GL_STENCIL_INDEX', `GL_DEPTH_COMPONENT', `GL_RED',
17943 `GL_GREEN', `GL_BLUE', `GL_ALPHA', or `GL_LUMINANCE', a single value is
17944 returned and the data for the I th pixel in the J th row is placed in
17945 location (J,)\u2062WIDTH+I . `GL_RGB' and `GL_BGR' return three values,
17946 `GL_RGBA' and `GL_BGRA' return four values, and `GL_LUMINANCE_ALPHA'
17947 returns two values for each pixel, with all values corresponding to a
17948 single pixel occupying contiguous space in DATA. Storage parameters set
17949 by `glPixelStore', such as `GL_PACK_LSB_FIRST' and `GL_PACK_SWAP_BYTES',
17950 affect the way that data is written into memory. See `glPixelStore' for
17953 `GL_INVALID_ENUM' is generated if FORMAT or TYPE is not an accepted
17956 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
17957 `GL_COLOR_INDEX' or `GL_STENCIL_INDEX'.
17959 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
17961 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_COLOR_INDEX' and
17962 the color buffers store RGBA color components.
17964 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_STENCIL_INDEX' and
17965 there is no stencil buffer.
17967 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
17968 and there is no depth buffer.
17970 `GL_INVALID_OPERATION' is generated if TYPE is one of
17971 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
17972 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
17975 `GL_INVALID_OPERATION' is generated if TYPE is one of
17976 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
17977 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
17978 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
17979 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
17980 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
17982 The formats `GL_BGR', and `GL_BGRA' and types `GL_UNSIGNED_BYTE_3_3_2',
17983 `GL_UNSIGNED_BYTE_2_3_3_REV', `GL_UNSIGNED_SHORT_5_6_5',
17984 `GL_UNSIGNED_SHORT_5_6_5_REV', `GL_UNSIGNED_SHORT_4_4_4_4',
17985 `GL_UNSIGNED_SHORT_4_4_4_4_REV', `GL_UNSIGNED_SHORT_5_5_5_1',
17986 `GL_UNSIGNED_SHORT_1_5_5_5_REV', `GL_UNSIGNED_INT_8_8_8_8',
17987 `GL_UNSIGNED_INT_8_8_8_8_REV', `GL_UNSIGNED_INT_10_10_10_2', and
17988 `GL_UNSIGNED_INT_2_10_10_10_REV' are available only if the GL version is
17991 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
17992 bound to the `GL_PIXEL_PACK_BUFFER' target and the buffer object's data
17993 store is currently mapped.
17995 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
17996 bound to the `GL_PIXEL_PACK_BUFFER' target and the data would be packed
17997 to the buffer object such that the memory writes required would exceed
17998 the data store size.
18000 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18001 bound to the `GL_PIXEL_PACK_BUFFER' target and DATA is not evenly
18002 divisible into the number of bytes needed to store in memory a datum
18005 `GL_INVALID_OPERATION' is generated if `glReadPixels' is executed
18006 between the execution of `glBegin' and the corresponding execution of
18009 (define-gl-procedures
18029 Specify one vertex of a rectangle.
18034 Specify the opposite vertex of the rectangle.
18036 `glRect' supports efficient specification of rectangles as two corner
18037 points. Each rectangle command takes four arguments, organized either as
18038 two consecutive pairs of (X,Y) coordinates or as two pointers to arrays,
18039 each containing an (X,Y) pair. The resulting rectangle is defined in the
18042 `glRect'(X1, Y1, X2, Y2) is exactly equivalent to the following
18043 sequence: Note that if the second vertex is above and to the right of
18044 the first vertex, the rectangle is constructed with a counterclockwise
18048 glBegin(`GL_POLYGON');
18055 `GL_INVALID_OPERATION' is generated if `glRect' is executed between the
18056 execution of `glBegin' and the corresponding execution of `glEnd'.")
18058 (define-gl-procedures
18059 ((glRenderMode (mode GLenum) -> GLint))
18060 "Set rasterization mode.
18063 Specifies the rasterization mode. Three values are accepted:
18064 `GL_RENDER', `GL_SELECT', and `GL_FEEDBACK'. The initial value is
18067 `glRenderMode' sets the rasterization mode. It takes one argument, MODE,
18068 which can assume one of three predefined values:
18071 Render mode. Primitives are rasterized, producing pixel fragments,
18072 which are written into the frame buffer. This is the normal mode
18073 and also the default mode.
18076 Selection mode. No pixel fragments are produced, and no change to
18077 the frame buffer contents is made. Instead, a record of the names
18078 of primitives that would have been drawn if the render mode had
18079 been `GL_RENDER' is returned in a select buffer, which must be
18080 created (see `glSelectBuffer') before selection mode is entered.
18083 Feedback mode. No pixel fragments are produced, and no change to
18084 the frame buffer contents is made. Instead, the coordinates and
18085 attributes of vertices that would have been drawn if the render
18086 mode had been `GL_RENDER' is returned in a feedback buffer, which
18087 must be created (see `glFeedbackBuffer') before feedback mode is
18090 The return value of `glRenderMode' is determined by the render mode at
18091 the time `glRenderMode' is called, rather than by MODE. The values
18092 returned for the three render modes are as follows:
18098 The number of hit records transferred to the select buffer.
18101 The number of values (not vertices) transferred to the feedback
18104 See the `glSelectBuffer' and `glFeedbackBuffer' reference pages for more
18105 details concerning selection and feedback operation.
18107 `GL_INVALID_ENUM' is generated if MODE is not one of the three accepted
18110 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is called while
18111 the render mode is `GL_SELECT', or if `glRenderMode' is called with
18112 argument `GL_SELECT' before `glSelectBuffer' is called at least once.
18114 `GL_INVALID_OPERATION' is generated if `glFeedbackBuffer' is called
18115 while the render mode is `GL_FEEDBACK', or if `glRenderMode' is called
18116 with argument `GL_FEEDBACK' before `glFeedbackBuffer' is called at least
18119 `GL_INVALID_OPERATION' is generated if `glRenderMode' is executed
18120 between the execution of `glBegin' and the corresponding execution of
18123 (define-gl-procedures
18124 ((glResetHistogram (target GLenum) -> void))
18125 "Reset histogram table entries to zero.
18128 Must be `GL_HISTOGRAM'.
18130 `glResetHistogram' resets all the elements of the current histogram
18133 `GL_INVALID_ENUM' is generated if TARGET is not `GL_HISTOGRAM'.
18135 `GL_INVALID_OPERATION' is generated if `glResetHistogram' is executed
18136 between the execution of `glBegin' and the corresponding execution of
18139 (define-gl-procedures
18140 ((glResetMinmax (target GLenum) -> void))
18141 "Reset minmax table entries to initial values.
18144 Must be `GL_MINMAX'.
18146 `glResetMinmax' resets the elements of the current minmax table to their
18147 initial values: the ``maximum'' element receives the minimum possible
18148 component values, and the ``minimum'' element receives the maximum
18149 possible component values.
18151 `GL_INVALID_ENUM' is generated if TARGET is not `GL_MINMAX'.
18153 `GL_INVALID_OPERATION' is generated if `glResetMinmax' is executed
18154 between the execution of `glBegin' and the corresponding execution of
18157 (define-gl-procedures
18165 "Multiply the current matrix by a rotation matrix.
18168 Specifies the angle of rotation, in degrees.
18175 Specify the X, Y, and Z coordinates of a vector, respectively.
18177 `glRotate' produces a rotation of ANGLE degrees around the vector (X,YZ)
18178 . The current matrix (see `glMatrixMode') is multiplied by a rotation
18179 matrix with the product replacing the current matrix, as if
18180 `glMultMatrix' were called with the following matrix as its argument:
18182 ((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
18183 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
18184 Z^2\u2061(1-C,)+C 0), (0 0 0 1),)
18188 Where C=COS\u2061(ANGLE,) , S=SIN\u2061(ANGLE,) , and ∥(X,YZ),∥=1 (if not, the GL
18189 will normalize this vector).
18195 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
18196 objects drawn after `glRotate' is called are rotated. Use `glPushMatrix'
18197 and `glPopMatrix' to save and restore the unrotated coordinate system.
18199 `GL_INVALID_OPERATION' is generated if `glRotate' is executed between
18200 the execution of `glBegin' and the corresponding execution of `glEnd'.")
18202 (define-gl-procedures
18208 "Specify multisample coverage parameters.
18211 Specify a single floating-point sample coverage value. The value is
18212 clamped to the range [0,1] . The initial value is 1.0.
18215 Specify a single boolean value representing if the coverage masks
18216 should be inverted. `GL_TRUE' and `GL_FALSE' are accepted. The
18217 initial value is `GL_FALSE'.
18219 Multisampling samples a pixel multiple times at various
18220 implementation-dependent subpixel locations to generate antialiasing
18221 effects. Multisampling transparently antialiases points, lines,
18222 polygons, bitmaps, and images if it is enabled.
18224 VALUE is used in constructing a temporary mask used in determining which
18225 samples will be used in resolving the final fragment color. This mask is
18226 bitwise-anded with the coverage mask generated from the multisampling
18227 computation. If the INVERT flag is set, the temporary mask is inverted
18228 (all bits flipped) and then the bitwise-and is computed.
18230 If an implementation does not have any multisample buffers available, or
18231 multisampling is disabled, rasterization occurs with only a single
18232 sample computing a pixel's final RGB color.
18234 Provided an implementation supports multisample buffers, and
18235 multisampling is enabled, then a pixel's final color is generated by
18236 combining several samples per pixel. Each sample contains color, depth,
18237 and stencil information, allowing those operations to be performed on
18240 `GL_INVALID_OPERATION' is generated if `glSampleCoverage' is executed
18241 between the execution of `glBegin' and the corresponding execution of
18244 (define-gl-procedures
18251 "Multiply the current matrix by a general scaling matrix.
18258 Specify scale factors along the X, Y, and Z axes, respectively.
18260 `glScale' produces a nonuniform scaling along the X, Y, and Z axes. The
18261 three parameters indicate the desired scale factor along each of the
18264 The current matrix (see `glMatrixMode') is multiplied by this scale
18265 matrix, and the product replaces the current matrix as if `glMultMatrix'
18266 were called with the following matrix as its argument:
18268 ((X 0 0 0), (0 Y 0 0), (0 0 Z 0), (0 0 0 1),)
18270 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
18271 objects drawn after `glScale' is called are scaled.
18273 Use `glPushMatrix' and `glPopMatrix' to save and restore the unscaled
18276 `GL_INVALID_OPERATION' is generated if `glScale' is executed between the
18277 execution of `glBegin' and the corresponding execution of `glEnd'.")
18279 (define-gl-procedures
18287 "Define the scissor box.
18292 Specify the lower left corner of the scissor box. Initially (0, 0).
18297 Specify the width and height of the scissor box. When a GL context
18298 is first attached to a window, WIDTH and HEIGHT are set to the
18299 dimensions of that window.
18301 `glScissor' defines a rectangle, called the scissor box, in window
18302 coordinates. The first two arguments, X and Y, specify the lower left
18303 corner of the box. WIDTH and HEIGHT specify the width and height of the
18306 To enable and disable the scissor test, call `glEnable' and `glDisable'
18307 with argument `GL_SCISSOR_TEST'. The test is initially disabled. While
18308 the test is enabled, only pixels that lie within the scissor box can be
18309 modified by drawing commands. Window coordinates have integer values at
18310 the shared corners of frame buffer pixels. `glScissor(0,0,1,1)' allows
18311 modification of only the lower left pixel in the window, and
18312 `glScissor(0,0,0,0)' doesn't allow modification of any pixels in the
18315 When the scissor test is disabled, it is as though the scissor box
18316 includes the entire window.
18318 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
18320 `GL_INVALID_OPERATION' is generated if `glScissor' is executed between
18321 the execution of `glBegin' and the corresponding execution of `glEnd'.")
18323 (define-gl-procedures
18324 ((glSecondaryColorPointer
18328 (pointer const-GLvoid-*)
18331 "Define an array of secondary colors.
18334 Specifies the number of components per color. Must be 3.
18337 Specifies the data type of each color component in the array.
18338 Symbolic constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
18339 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', or
18340 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
18343 Specifies the byte offset between consecutive colors. If STRIDE is
18344 0, the colors are understood to be tightly packed in the array. The
18345 initial value is 0.
18348 Specifies a pointer to the first component of the first color
18349 element in the array. The initial value is 0.
18351 `glSecondaryColorPointer' specifies the location and data format of an
18352 array of color components to use when rendering. SIZE specifies the
18353 number of components per color, and must be 3. TYPE specifies the data
18354 type of each color component, and STRIDE specifies the byte stride from
18355 one color to the next, allowing vertices and attributes to be packed
18356 into a single array or stored in separate arrays.
18358 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
18359 target (see `glBindBuffer') while a secondary color array is specified,
18360 POINTER is treated as a byte offset into the buffer object's data store.
18361 Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as
18362 secondary color vertex array client-side state
18363 (`GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING').
18365 When a secondary color array is specified, SIZE, TYPE, STRIDE, and
18366 POINTER are saved as client-side state, in addition to the current
18367 vertex array buffer object binding.
18369 To enable and disable the secondary color array, call
18370 `glEnableClientState' and `glDisableClientState' with the argument
18371 `GL_SECONDARY_COLOR_ARRAY'. If enabled, the secondary color array is
18372 used when `glArrayElement', `glDrawArrays', `glMultiDrawArrays',
18373 `glDrawElements', `glMultiDrawElements', or `glDrawRangeElements' is
18376 `GL_INVALID_VALUE' is generated if SIZE is not 3.
18378 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
18380 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
18382 (define-gl-procedures
18383 ((glSecondaryColor3i
18389 (glSecondaryColor3f
18395 (glSecondaryColor3ui
18401 "Set the current secondary color.
18408 Specify new red, green, and blue values for the current secondary
18411 The GL stores both a primary four-valued RGBA color and a secondary
18412 four-valued RGBA color (where alpha is always set to 0.0) that is
18413 associated with every vertex.
18415 The secondary color is interpolated and applied to each fragment during
18416 rasterization when `GL_COLOR_SUM' is enabled. When lighting is enabled,
18417 and `GL_SEPARATE_SPECULAR_COLOR' is specified, the value of the
18418 secondary color is assigned the value computed from the specular term of
18419 the lighting computation. Both the primary and secondary current colors
18420 are applied to each fragment, regardless of the state of `GL_COLOR_SUM',
18421 under such conditions. When `GL_SEPARATE_SPECULAR_COLOR' is specified,
18422 the value returned from querying the current secondary color is
18425 `glSecondaryColor3b', `glSecondaryColor3s', and `glSecondaryColor3i'
18426 take three signed byte, short, or long integers as arguments. When *v*
18427 is appended to the name, the color commands can take a pointer to an
18428 array of such values.
18430 Color values are stored in floating-point format, with unspecified
18431 mantissa and exponent sizes. Unsigned integer color components, when
18432 specified, are linearly mapped to floating-point values such that the
18433 largest representable value maps to 1.0 (full intensity), and 0 maps to
18434 0.0 (zero intensity). Signed integer color components, when specified,
18435 are linearly mapped to floating-point values such that the most positive
18436 representable value maps to 1.0, and the most negative representable
18437 value maps to -1.0 . (Note that this mapping does not convert 0
18438 precisely to 0.0). Floating-point values are mapped directly.
18440 Neither floating-point nor signed integer values are clamped to the
18441 range [0,1] before the current color is updated. However, color
18442 components are clamped to this range before they are interpolated or
18443 written into a color buffer.")
18445 (define-gl-procedures
18451 "Establish a buffer for selection mode values.
18454 Specifies the size of BUFFER.
18457 Returns the selection data.
18459 `glSelectBuffer' has two arguments: BUFFER is a pointer to an array of
18460 unsigned integers, and SIZE indicates the size of the array. BUFFER
18461 returns values from the name stack (see `glInitNames', `glLoadName',
18462 `glPushName') when the rendering mode is `GL_SELECT' (see
18463 `glRenderMode'). `glSelectBuffer' must be issued before selection mode
18464 is enabled, and it must not be issued while the rendering mode is
18467 A programmer can use selection to determine which primitives are drawn
18468 into some region of a window. The region is defined by the current
18469 modelview and perspective matrices.
18471 In selection mode, no pixel fragments are produced from rasterization.
18472 Instead, if a primitive or a raster position intersects the clipping
18473 volume defined by the viewing frustum and the user-defined clipping
18474 planes, this primitive causes a selection hit. (With polygons, no hit
18475 occurs if the polygon is culled.) When a change is made to the name
18476 stack, or when `glRenderMode' is called, a hit record is copied to
18477 BUFFER if any hits have occurred since the last such event (name stack
18478 change or `glRenderMode' call). The hit record consists of the number of
18479 names in the name stack at the time of the event, followed by the
18480 minimum and maximum depth values of all vertices that hit since the
18481 previous event, followed by the name stack contents, bottom name first.
18483 Depth values (which are in the range [0,1]) are multiplied by 2^32-1 ,
18484 before being placed in the hit record.
18486 An internal index into BUFFER is reset to 0 whenever selection mode is
18487 entered. Each time a hit record is copied into BUFFER, the index is
18488 incremented to point to the cell just past the end of the block of
18489 names\\(emthat is, to the next available cell If the hit record is larger
18490 than the number of remaining locations in BUFFER, as much data as can
18491 fit is copied, and the overflow flag is set. If the name stack is empty
18492 when a hit record is copied, that record consists of 0 followed by the
18493 minimum and maximum depth values.
18495 To exit selection mode, call `glRenderMode' with an argument other than
18496 `GL_SELECT'. Whenever `glRenderMode' is called while the render mode is
18497 `GL_SELECT', it returns the number of hit records copied to BUFFER,
18498 resets the overflow flag and the selection buffer pointer, and
18499 initializes the name stack to be empty. If the overflow bit was set when
18500 `glRenderMode' was called, a negative hit record count is returned.
18502 `GL_INVALID_VALUE' is generated if SIZE is negative.
18504 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is called while
18505 the render mode is `GL_SELECT', or if `glRenderMode' is called with
18506 argument `GL_SELECT' before `glSelectBuffer' is called at least once.
18508 `GL_INVALID_OPERATION' is generated if `glSelectBuffer' is executed
18509 between the execution of `glBegin' and the corresponding execution of
18512 (define-gl-procedures
18513 ((glSeparableFilter2D
18515 (internalformat GLenum)
18520 (row const-GLvoid-*)
18521 (column const-GLvoid-*)
18524 "Define a separable two-dimensional convolution filter.
18527 Must be `GL_SEPARABLE_2D'.
18530 The internal format of the convolution filter kernel. The allowable
18531 values are `GL_ALPHA', `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12',
18532 `GL_ALPHA16', `GL_LUMINANCE', `GL_LUMINANCE4', `GL_LUMINANCE8',
18533 `GL_LUMINANCE12', `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA',
18534 `GL_LUMINANCE4_ALPHA4', `GL_LUMINANCE6_ALPHA2',
18535 `GL_LUMINANCE8_ALPHA8', `GL_LUMINANCE12_ALPHA4',
18536 `GL_LUMINANCE12_ALPHA12', `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY',
18537 `GL_INTENSITY4', `GL_INTENSITY8', `GL_INTENSITY12',
18538 `GL_INTENSITY16', `GL_R3_G3_B2', `GL_RGB', `GL_RGB4', `GL_RGB5',
18539 `GL_RGB8', `GL_RGB10', `GL_RGB12', `GL_RGB16', `GL_RGBA',
18540 `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1', `GL_RGBA8', `GL_RGB10_A2',
18541 `GL_RGBA12', or `GL_RGBA16'.
18544 The number of elements in the pixel array referenced by ROW. (This
18545 is the width of the separable filter kernel.)
18548 The number of elements in the pixel array referenced by COLUMN.
18549 (This is the height of the separable filter kernel.)
18552 The format of the pixel data in ROW and COLUMN. The allowable
18553 values are `GL_RED', `GL_GREEN', `GL_BLUE', `GL_ALPHA', `GL_RGB',
18554 `GL_BGR', `GL_RGBA', `GL_BGRA', `GL_INTENSITY', `GL_LUMINANCE', and
18555 `GL_LUMINANCE_ALPHA'.
18558 The type of the pixel data in ROW and COLUMN. Symbolic constants
18559 `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP', `GL_UNSIGNED_SHORT',
18560 `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT', `GL_FLOAT',
18561 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
18562 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
18563 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
18564 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
18565 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
18566 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'
18570 Pointer to a one-dimensional array of pixel data that is processed
18571 to build the row filter kernel.
18574 Pointer to a one-dimensional array of pixel data that is processed
18575 to build the column filter kernel.
18577 `glSeparableFilter2D' builds a two-dimensional separable convolution
18578 filter kernel from two arrays of pixels.
18580 The pixel arrays specified by (WIDTH, FORMAT, TYPE, ROW) and (HEIGHT,
18581 FORMAT, TYPE, COLUMN) are processed just as if they had been passed to
18582 `glDrawPixels', but processing stops after the final expansion to RGBA
18585 If a non-zero named buffer object is bound to the
18586 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a convolution
18587 filter is specified, ROW and COLUMN are treated as byte offsets into the
18588 buffer object's data store.
18590 Next, the R, G, B, and A components of all pixels in both arrays are
18591 scaled by the four separable 2D `GL_CONVOLUTION_FILTER_SCALE' parameters
18592 and biased by the four separable 2D `GL_CONVOLUTION_FILTER_BIAS'
18593 parameters. (The scale and bias parameters are set by
18594 `glConvolutionParameter' using the `GL_SEPARABLE_2D' target and the
18595 names `GL_CONVOLUTION_FILTER_SCALE' and `GL_CONVOLUTION_FILTER_BIAS'.
18596 The parameters themselves are vectors of four values that are applied to
18597 red, green, blue, and alpha, in that order.) The R, G, B, and A values
18598 are not clamped to [0,1] at any time during this process.
18600 Each pixel is then converted to the internal format specified by
18601 INTERNALFORMAT. This conversion simply maps the component values of the
18602 pixel (R, G, B, and A) to the values included in the internal format
18603 (red, green, blue, alpha, luminance, and intensity). The mapping is as
18607 *Red*, *Green*, *Blue*, *Alpha*, *Luminance*, *Intensity*
18612 `GL_LUMINANCE_ALPHA'
18624 The red, green, blue, alpha, luminance, and/or intensity components of
18625 the resulting pixels are stored in floating-point rather than integer
18626 format. They form two one-dimensional filter kernel images. The row
18627 image is indexed by coordinate I starting at zero and increasing from
18628 left to right. Each location in the row image is derived from element I
18629 of ROW. The column image is indexed by coordinate J starting at zero and
18630 increasing from bottom to top. Each location in the column image is
18631 derived from element J of COLUMN.
18633 Note that after a convolution is performed, the resulting color
18634 components are also scaled by their corresponding
18635 `GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their
18636 corresponding `GL_POST_CONVOLUTION_c_BIAS' parameters (where C takes on
18637 the values *RED*, *GREEN*, *BLUE*, and *ALPHA*). These parameters are
18638 set by `glPixelTransfer'.
18640 `GL_INVALID_ENUM' is generated if TARGET is not `GL_SEPARABLE_2D'.
18642 `GL_INVALID_ENUM' is generated if INTERNALFORMAT is not one of the
18645 `GL_INVALID_ENUM' is generated if FORMAT is not one of the allowable
18648 `GL_INVALID_ENUM' is generated if TYPE is not one of the allowable
18651 `GL_INVALID_VALUE' is generated if WIDTH is less than zero or greater
18652 than the maximum supported value. This value may be queried with
18653 `glGetConvolutionParameter' using target `GL_SEPARABLE_2D' and name
18654 `GL_MAX_CONVOLUTION_WIDTH'.
18656 `GL_INVALID_VALUE' is generated if HEIGHT is less than zero or greater
18657 than the maximum supported value. This value may be queried with
18658 `glGetConvolutionParameter' using target `GL_SEPARABLE_2D' and name
18659 `GL_MAX_CONVOLUTION_HEIGHT'.
18661 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
18662 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
18663 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
18666 `GL_INVALID_OPERATION' is generated if HEIGHT is one of
18667 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
18668 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
18669 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
18670 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
18671 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
18673 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18674 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
18675 data store is currently mapped.
18677 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18678 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
18679 unpacked from the buffer object such that the memory reads required
18680 would exceed the data store size.
18682 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
18683 bound to the `GL_PIXEL_UNPACK_BUFFER' target and ROW or COLUMN is not
18684 evenly divisible into the number of bytes needed to store in memory a
18685 datum indicated by TYPE.
18687 `GL_INVALID_OPERATION' is generated if `glSeparableFilter2D' is executed
18688 between the execution of `glBegin' and the corresponding execution of
18691 (define-gl-procedures
18692 ((glShadeModel (mode GLenum) -> void))
18693 "Select flat or smooth shading.
18696 Specifies a symbolic value representing a shading technique.
18697 Accepted values are `GL_FLAT' and `GL_SMOOTH'. The initial value is
18700 GL primitives can have either flat or smooth shading. Smooth shading,
18701 the default, causes the computed colors of vertices to be interpolated
18702 as the primitive is rasterized, typically assigning different colors to
18703 each resulting pixel fragment. Flat shading selects the computed color
18704 of just one vertex and assigns it to all the pixel fragments generated
18705 by rasterizing a single primitive. In either case, the computed color of
18706 a vertex is the result of lighting if lighting is enabled, or it is the
18707 current color at the time the vertex was specified if lighting is
18710 Flat and smooth shading are indistinguishable for points. Starting when
18711 `glBegin' is issued and counting vertices and primitives from 1, the GL
18712 gives each flat-shaded line segment I the computed color of vertex I+1 ,
18713 its second vertex. Counting similarly from 1, the GL gives each
18714 flat-shaded polygon the computed color of the vertex listed in the
18715 following table. This is the last vertex to specify the polygon in all
18716 cases except single polygons, where the first vertex specifies the
18721 * Primitive Type of Polygon I *
18724 Single polygon (I==1 )
18733 Independent triangle
18742 Flat and smooth shading are specified by `glShadeModel' with MODE set to
18743 `GL_FLAT' and `GL_SMOOTH', respectively.
18745 `GL_INVALID_ENUM' is generated if MODE is any value other than `GL_FLAT'
18748 `GL_INVALID_OPERATION' is generated if `glShadeModel' is executed
18749 between the execution of `glBegin' and the corresponding execution of
18752 (define-gl-procedures
18756 (string const-GLchar-**)
18757 (length const-GLint-*)
18760 "Replaces the source code in a shader object.
18763 Specifies the handle of the shader object whose source code is to
18767 Specifies the number of elements in the STRING and LENGTH arrays.
18770 Specifies an array of pointers to strings containing the source
18771 code to be loaded into the shader.
18774 Specifies an array of string lengths.
18776 `glShaderSource' sets the source code in SHADER to the source code in
18777 the array of strings specified by STRING. Any source code previously
18778 stored in the shader object is completely replaced. The number of
18779 strings in the array is specified by COUNT. If LENGTH is `NULL', each
18780 string is assumed to be null terminated. If LENGTH is a value other than
18781 `NULL', it points to an array containing a string length for each of the
18782 corresponding elements of STRING. Each element in the LENGTH array may
18783 contain the length of the corresponding string (the null character is
18784 not counted as part of the string length) or a value less than 0 to
18785 indicate that the string is null terminated. The source code strings are
18786 not scanned or parsed at this time; they are simply copied into the
18787 specified shader object.
18789 `GL_INVALID_VALUE' is generated if SHADER is not a value generated by
18792 `GL_INVALID_OPERATION' is generated if SHADER is not a shader object.
18794 `GL_INVALID_VALUE' is generated if COUNT is less than 0.
18796 `GL_INVALID_OPERATION' is generated if `glShaderSource' is executed
18797 between the execution of `glBegin' and the corresponding execution of
18800 (define-gl-procedures
18801 ((glStencilFuncSeparate
18808 "Set front and/or back function and reference value for stencil testing.
18811 Specifies whether front and/or back stencil state is updated. Three
18812 symbolic constants are valid: `GL_FRONT', `GL_BACK', and
18813 `GL_FRONT_AND_BACK'.
18816 Specifies the test function. Eight symbolic constants are valid:
18817 `GL_NEVER', `GL_LESS', `GL_LEQUAL', `GL_GREATER', `GL_GEQUAL',
18818 `GL_EQUAL', `GL_NOTEQUAL', and `GL_ALWAYS'. The initial value is
18822 Specifies the reference value for the stencil test. REF is clamped
18823 to the range [0,2^N-1] , where N is the number of bitplanes in the
18824 stencil buffer. The initial value is 0.
18827 Specifies a mask that is ANDed with both the reference value and
18828 the stored stencil value when the test is done. The initial value
18831 Stenciling, like depth-buffering, enables and disables drawing on a
18832 per-pixel basis. You draw into the stencil planes using GL drawing
18833 primitives, then render geometry and images, using the stencil planes to
18834 mask out portions of the screen. Stenciling is typically used in
18835 multipass rendering algorithms to achieve special effects, such as
18836 decals, outlining, and constructive solid geometry rendering.
18838 The stencil test conditionally eliminates a pixel based on the outcome
18839 of a comparison between the reference value and the value in the stencil
18840 buffer. To enable and disable the test, call `glEnable' and `glDisable'
18841 with argument `GL_STENCIL_TEST'. To specify actions based on the outcome
18842 of the stencil test, call `glStencilOp' or `glStencilOpSeparate'.
18844 There can be two separate sets of FUNC, REF, and MASK parameters; one
18845 affects back-facing polygons, and the other affects front-facing
18846 polygons as well as other non-polygon primitives. `glStencilFunc' sets
18847 both front and back stencil state to the same values, as if
18848 `glStencilFuncSeparate' were called with FACE set to
18849 `GL_FRONT_AND_BACK'.
18851 FUNC is a symbolic constant that determines the stencil comparison
18852 function. It accepts one of eight values, shown in the following list.
18853 REF is an integer reference value that is used in the stencil
18854 comparison. It is clamped to the range [0,2^N-1] , where N is the number
18855 of bitplanes in the stencil buffer. MASK is bitwise ANDed with both the
18856 reference value and the stored stencil value, with the ANDed values
18857 participating in the comparison.
18859 If STENCIL represents the value stored in the corresponding stencil
18860 buffer location, the following list shows the effect of each comparison
18861 function that can be specified by FUNC. Only if the comparison succeeds
18862 is the pixel passed through to the next stage in the rasterization
18863 process (see `glStencilOp'). All tests treat STENCIL values as unsigned
18864 integers in the range [0,2^N-1] , where N is the number of bitplanes in
18865 the stencil buffer.
18867 The following values are accepted by FUNC:
18873 Passes if ( REF & MASK ) < ( STENCIL & MASK ).
18876 Passes if ( REF & MASK ) <= ( STENCIL & MASK ).
18879 Passes if ( REF & MASK ) > ( STENCIL & MASK ).
18882 Passes if ( REF & MASK ) >= ( STENCIL & MASK ).
18885 Passes if ( REF & MASK ) = ( STENCIL & MASK ).
18888 Passes if ( REF & MASK ) != ( STENCIL & MASK ).
18893 `GL_INVALID_ENUM' is generated if FUNC is not one of the eight accepted
18896 `GL_INVALID_OPERATION' is generated if `glStencilFuncSeparate' is
18897 executed between the execution of `glBegin' and the corresponding
18898 execution of `glEnd'.")
18900 (define-gl-procedures
18907 "Set front and back function and reference value for stencil testing.
18910 Specifies the test function. Eight symbolic constants are valid:
18911 `GL_NEVER', `GL_LESS', `GL_LEQUAL', `GL_GREATER', `GL_GEQUAL',
18912 `GL_EQUAL', `GL_NOTEQUAL', and `GL_ALWAYS'. The initial value is
18916 Specifies the reference value for the stencil test. REF is clamped
18917 to the range [0,2^N-1] , where N is the number of bitplanes in the
18918 stencil buffer. The initial value is 0.
18921 Specifies a mask that is ANDed with both the reference value and
18922 the stored stencil value when the test is done. The initial value
18925 Stenciling, like depth-buffering, enables and disables drawing on a
18926 per-pixel basis. Stencil planes are first drawn into using GL drawing
18927 primitives, then geometry and images are rendered using the stencil
18928 planes to mask out portions of the screen. Stenciling is typically used
18929 in multipass rendering algorithms to achieve special effects, such as
18930 decals, outlining, and constructive solid geometry rendering.
18932 The stencil test conditionally eliminates a pixel based on the outcome
18933 of a comparison between the reference value and the value in the stencil
18934 buffer. To enable and disable the test, call `glEnable' and `glDisable'
18935 with argument `GL_STENCIL_TEST'. To specify actions based on the outcome
18936 of the stencil test, call `glStencilOp' or `glStencilOpSeparate'.
18938 There can be two separate sets of FUNC, REF, and MASK parameters; one
18939 affects back-facing polygons, and the other affects front-facing
18940 polygons as well as other non-polygon primitives. `glStencilFunc' sets
18941 both front and back stencil state to the same values. Use
18942 `glStencilFuncSeparate' to set front and back stencil state to different
18945 FUNC is a symbolic constant that determines the stencil comparison
18946 function. It accepts one of eight values, shown in the following list.
18947 REF is an integer reference value that is used in the stencil
18948 comparison. It is clamped to the range [0,2^N-1] , where N is the number
18949 of bitplanes in the stencil buffer. MASK is bitwise ANDed with both the
18950 reference value and the stored stencil value, with the ANDed values
18951 participating in the comparison.
18953 If STENCIL represents the value stored in the corresponding stencil
18954 buffer location, the following list shows the effect of each comparison
18955 function that can be specified by FUNC. Only if the comparison succeeds
18956 is the pixel passed through to the next stage in the rasterization
18957 process (see `glStencilOp'). All tests treat STENCIL values as unsigned
18958 integers in the range [0,2^N-1] , where N is the number of bitplanes in
18959 the stencil buffer.
18961 The following values are accepted by FUNC:
18967 Passes if ( REF & MASK ) < ( STENCIL & MASK ).
18970 Passes if ( REF & MASK ) <= ( STENCIL & MASK ).
18973 Passes if ( REF & MASK ) > ( STENCIL & MASK ).
18976 Passes if ( REF & MASK ) >= ( STENCIL & MASK ).
18979 Passes if ( REF & MASK ) = ( STENCIL & MASK ).
18982 Passes if ( REF & MASK ) != ( STENCIL & MASK ).
18987 `GL_INVALID_ENUM' is generated if FUNC is not one of the eight accepted
18990 `GL_INVALID_OPERATION' is generated if `glStencilFunc' is executed
18991 between the execution of `glBegin' and the corresponding execution of
18994 (define-gl-procedures
18995 ((glStencilMaskSeparate
19000 "Control the front and/or back writing of individual bits in the stencil
19004 Specifies whether the front and/or back stencil writemask is
19005 updated. Three symbolic constants are valid: `GL_FRONT', `GL_BACK',
19006 and `GL_FRONT_AND_BACK'.
19009 Specifies a bit mask to enable and disable writing of individual
19010 bits in the stencil planes. Initially, the mask is all 1's.
19012 `glStencilMaskSeparate' controls the writing of individual bits in the
19013 stencil planes. The least significant N bits of MASK, where N is the
19014 number of bits in the stencil buffer, specify a mask. Where a 1 appears
19015 in the mask, it's possible to write to the corresponding bit in the
19016 stencil buffer. Where a 0 appears, the corresponding bit is
19017 write-protected. Initially, all bits are enabled for writing.
19019 There can be two separate MASK writemasks; one affects back-facing
19020 polygons, and the other affects front-facing polygons as well as other
19021 non-polygon primitives. `glStencilMask' sets both front and back stencil
19022 writemasks to the same values, as if `glStencilMaskSeparate' were called
19023 with FACE set to `GL_FRONT_AND_BACK'.
19025 `GL_INVALID_OPERATION' is generated if `glStencilMaskSeparate' is
19026 executed between the execution of `glBegin' and the corresponding
19027 execution of `glEnd'.")
19029 (define-gl-procedures
19030 ((glStencilMask (mask GLuint) -> void))
19031 "Control the front and back writing of individual bits in the stencil
19035 Specifies a bit mask to enable and disable writing of individual
19036 bits in the stencil planes. Initially, the mask is all 1's.
19038 `glStencilMask' controls the writing of individual bits in the stencil
19039 planes. The least significant N bits of MASK, where N is the number of
19040 bits in the stencil buffer, specify a mask. Where a 1 appears in the
19041 mask, it's possible to write to the corresponding bit in the stencil
19042 buffer. Where a 0 appears, the corresponding bit is write-protected.
19043 Initially, all bits are enabled for writing.
19045 There can be two separate MASK writemasks; one affects back-facing
19046 polygons, and the other affects front-facing polygons as well as other
19047 non-polygon primitives. `glStencilMask' sets both front and back stencil
19048 writemasks to the same values. Use `glStencilMaskSeparate' to set front
19049 and back stencil writemasks to different values.
19051 `GL_INVALID_OPERATION' is generated if `glStencilMask' is executed
19052 between the execution of `glBegin' and the corresponding execution of
19055 (define-gl-procedures
19056 ((glStencilOpSeparate
19063 "Set front and/or back stencil test actions.
19066 Specifies whether front and/or back stencil state is updated. Three
19067 symbolic constants are valid: `GL_FRONT', `GL_BACK', and
19068 `GL_FRONT_AND_BACK'.
19071 Specifies the action to take when the stencil test fails. Eight
19072 symbolic constants are accepted: `GL_KEEP', `GL_ZERO',
19073 `GL_REPLACE', `GL_INCR', `GL_INCR_WRAP', `GL_DECR', `GL_DECR_WRAP',
19074 and `GL_INVERT'. The initial value is `GL_KEEP'.
19077 Specifies the stencil action when the stencil test passes, but the
19078 depth test fails. DPFAIL accepts the same symbolic constants as
19079 SFAIL. The initial value is `GL_KEEP'.
19082 Specifies the stencil action when both the stencil test and the
19083 depth test pass, or when the stencil test passes and either there
19084 is no depth buffer or depth testing is not enabled. DPPASS accepts
19085 the same symbolic constants as SFAIL. The initial value is
19088 Stenciling, like depth-buffering, enables and disables drawing on a
19089 per-pixel basis. You draw into the stencil planes using GL drawing
19090 primitives, then render geometry and images, using the stencil planes to
19091 mask out portions of the screen. Stenciling is typically used in
19092 multipass rendering algorithms to achieve special effects, such as
19093 decals, outlining, and constructive solid geometry rendering.
19095 The stencil test conditionally eliminates a pixel based on the outcome
19096 of a comparison between the value in the stencil buffer and a reference
19097 value. To enable and disable the test, call `glEnable' and `glDisable'
19098 with argument `GL_STENCIL_TEST'; to control it, call `glStencilFunc' or
19099 `glStencilFuncSeparate'.
19101 There can be two separate sets of SFAIL, DPFAIL, and DPPASS parameters;
19102 one affects back-facing polygons, and the other affects front-facing
19103 polygons as well as other non-polygon primitives. `glStencilOp' sets
19104 both front and back stencil state to the same values, as if
19105 `glStencilOpSeparate' were called with FACE set to `GL_FRONT_AND_BACK'.
19107 `glStencilOpSeparate' takes three arguments that indicate what happens
19108 to the stored stencil value while stenciling is enabled. If the stencil
19109 test fails, no change is made to the pixel's color or depth buffers, and
19110 SFAIL specifies what happens to the stencil buffer contents. The
19111 following eight actions are possible.
19114 Keeps the current value.
19117 Sets the stencil buffer value to 0.
19120 Sets the stencil buffer value to REF, as specified by
19124 Increments the current stencil buffer value. Clamps to the maximum
19125 representable unsigned value.
19128 Increments the current stencil buffer value. Wraps stencil buffer
19129 value to zero when incrementing the maximum representable unsigned
19133 Decrements the current stencil buffer value. Clamps to 0.
19136 Decrements the current stencil buffer value. Wraps stencil buffer
19137 value to the maximum representable unsigned value when decrementing
19138 a stencil buffer value of zero.
19141 Bitwise inverts the current stencil buffer value.
19143 Stencil buffer values are treated as unsigned integers. When incremented
19144 and decremented, values are clamped to 0 and 2^N-1 , where N is the
19145 value returned by querying `GL_STENCIL_BITS'.
19147 The other two arguments to `glStencilOpSeparate' specify stencil buffer
19148 actions that depend on whether subsequent depth buffer tests succeed
19149 (DPPASS) or fail (DPFAIL) (see `glDepthFunc'). The actions are specified
19150 using the same eight symbolic constants as SFAIL. Note that DPFAIL is
19151 ignored when there is no depth buffer, or when the depth buffer is not
19152 enabled. In these cases, SFAIL and DPPASS specify stencil action when
19153 the stencil test fails and passes, respectively.
19155 `GL_INVALID_ENUM' is generated if FACE is any value other than
19156 `GL_FRONT', `GL_BACK', or `GL_FRONT_AND_BACK'.
19158 `GL_INVALID_ENUM' is generated if SFAIL, DPFAIL, or DPPASS is any value
19159 other than the eight defined constant values.
19161 `GL_INVALID_OPERATION' is generated if `glStencilOpSeparate' is executed
19162 between the execution of `glBegin' and the corresponding execution of
19165 (define-gl-procedures
19172 "Set front and back stencil test actions.
19175 Specifies the action to take when the stencil test fails. Eight
19176 symbolic constants are accepted: `GL_KEEP', `GL_ZERO',
19177 `GL_REPLACE', `GL_INCR', `GL_INCR_WRAP', `GL_DECR', `GL_DECR_WRAP',
19178 and `GL_INVERT'. The initial value is `GL_KEEP'.
19181 Specifies the stencil action when the stencil test passes, but the
19182 depth test fails. DPFAIL accepts the same symbolic constants as
19183 SFAIL. The initial value is `GL_KEEP'.
19186 Specifies the stencil action when both the stencil test and the
19187 depth test pass, or when the stencil test passes and either there
19188 is no depth buffer or depth testing is not enabled. DPPASS accepts
19189 the same symbolic constants as SFAIL. The initial value is
19192 Stenciling, like depth-buffering, enables and disables drawing on a
19193 per-pixel basis. You draw into the stencil planes using GL drawing
19194 primitives, then render geometry and images, using the stencil planes to
19195 mask out portions of the screen. Stenciling is typically used in
19196 multipass rendering algorithms to achieve special effects, such as
19197 decals, outlining, and constructive solid geometry rendering.
19199 The stencil test conditionally eliminates a pixel based on the outcome
19200 of a comparison between the value in the stencil buffer and a reference
19201 value. To enable and disable the test, call `glEnable' and `glDisable'
19202 with argument `GL_STENCIL_TEST'; to control it, call `glStencilFunc' or
19203 `glStencilFuncSeparate'.
19205 There can be two separate sets of SFAIL, DPFAIL, and DPPASS parameters;
19206 one affects back-facing polygons, and the other affects front-facing
19207 polygons as well as other non-polygon primitives. `glStencilOp' sets
19208 both front and back stencil state to the same values. Use
19209 `glStencilOpSeparate' to set front and back stencil state to different
19212 `glStencilOp' takes three arguments that indicate what happens to the
19213 stored stencil value while stenciling is enabled. If the stencil test
19214 fails, no change is made to the pixel's color or depth buffers, and
19215 SFAIL specifies what happens to the stencil buffer contents. The
19216 following eight actions are possible.
19219 Keeps the current value.
19222 Sets the stencil buffer value to 0.
19225 Sets the stencil buffer value to REF, as specified by
19229 Increments the current stencil buffer value. Clamps to the maximum
19230 representable unsigned value.
19233 Increments the current stencil buffer value. Wraps stencil buffer
19234 value to zero when incrementing the maximum representable unsigned
19238 Decrements the current stencil buffer value. Clamps to 0.
19241 Decrements the current stencil buffer value. Wraps stencil buffer
19242 value to the maximum representable unsigned value when decrementing
19243 a stencil buffer value of zero.
19246 Bitwise inverts the current stencil buffer value.
19248 Stencil buffer values are treated as unsigned integers. When incremented
19249 and decremented, values are clamped to 0 and 2^N-1 , where N is the
19250 value returned by querying `GL_STENCIL_BITS'.
19252 The other two arguments to `glStencilOp' specify stencil buffer actions
19253 that depend on whether subsequent depth buffer tests succeed (DPPASS) or
19254 fail (DPFAIL) (see `glDepthFunc'). The actions are specified using the
19255 same eight symbolic constants as SFAIL. Note that DPFAIL is ignored when
19256 there is no depth buffer, or when the depth buffer is not enabled. In
19257 these cases, SFAIL and DPPASS specify stencil action when the stencil
19258 test fails and passes, respectively.
19260 `GL_INVALID_ENUM' is generated if SFAIL, DPFAIL, or DPPASS is any value
19261 other than the eight defined constant values.
19263 `GL_INVALID_OPERATION' is generated if `glStencilOp' is executed between
19264 the execution of `glBegin' and the corresponding execution of `glEnd'.")
19266 (define-gl-procedures
19267 ((glTexCoordPointer
19271 (pointer const-GLvoid-*)
19274 "Define an array of texture coordinates.
19277 Specifies the number of coordinates per array element. Must be 1,
19278 2, 3, or 4. The initial value is 4.
19281 Specifies the data type of each texture coordinate. Symbolic
19282 constants `GL_SHORT', `GL_INT', `GL_FLOAT', or `GL_DOUBLE' are
19283 accepted. The initial value is `GL_FLOAT'.
19286 Specifies the byte offset between consecutive texture coordinate
19287 sets. If STRIDE is 0, the array elements are understood to be
19288 tightly packed. The initial value is 0.
19291 Specifies a pointer to the first coordinate of the first texture
19292 coordinate set in the array. The initial value is 0.
19294 `glTexCoordPointer' specifies the location and data format of an array
19295 of texture coordinates to use when rendering. SIZE specifies the number
19296 of coordinates per texture coordinate set, and must be 1, 2, 3, or 4.
19297 TYPE specifies the data type of each texture coordinate, and STRIDE
19298 specifies the byte stride from one texture coordinate set to the next,
19299 allowing vertices and attributes to be packed into a single array or
19300 stored in separate arrays. (Single-array storage may be more efficient
19301 on some implementations; see `glInterleavedArrays'.)
19303 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
19304 target (see `glBindBuffer') while a texture coordinate array is
19305 specified, POINTER is treated as a byte offset into the buffer object's
19306 data store. Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING')
19307 is saved as texture coordinate vertex array client-side state
19308 (`GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING').
19310 When a texture coordinate array is specified, SIZE, TYPE, STRIDE, and
19311 POINTER are saved as client-side state, in addition to the current
19312 vertex array buffer object binding.
19314 To enable and disable a texture coordinate array, call
19315 `glEnableClientState' and `glDisableClientState' with the argument
19316 `GL_TEXTURE_COORD_ARRAY'. If enabled, the texture coordinate array is
19317 used when `glArrayElement', `glDrawArrays', `glMultiDrawArrays',
19318 `glDrawElements', `glMultiDrawElements', or `glDrawRangeElements' is
19321 `GL_INVALID_VALUE' is generated if SIZE is not 1, 2, 3, or 4.
19323 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
19325 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
19327 (define-gl-procedures
19328 ((glTexCoord1i (s GLint) -> void)
19329 (glTexCoord1f (s GLfloat) -> void)
19330 (glTexCoord2i (s GLint) (t GLint) -> void)
19331 (glTexCoord2f (s GLfloat) (t GLfloat) -> void)
19358 "Set the current texture coordinates.
19367 Specify S, T, R, and Q texture coordinates. Not all parameters are
19368 present in all forms of the command.
19370 `glTexCoord' specifies texture coordinates in one, two, three, or four
19371 dimensions. `glTexCoord1' sets the current texture coordinates to
19372 (S,001) ; a call to `glTexCoord2' sets them to (S,T01) . Similarly,
19373 `glTexCoord3' specifies the texture coordinates as (S,TR1) , and
19374 `glTexCoord4' defines all four components explicitly as (S,TRQ) .
19376 The current texture coordinates are part of the data that is associated
19377 with each vertex and with the current raster position. Initially, the
19378 values for S, T, R, and Q are (0, 0, 0, 1).")
19380 (define-gl-procedures
19393 "Set texture environment parameters.
19396 Specifies a texture environment. May be `GL_TEXTURE_ENV',
19397 `GL_TEXTURE_FILTER_CONTROL' or `GL_POINT_SPRITE'.
19400 Specifies the symbolic name of a single-valued texture environment
19401 parameter. May be either `GL_TEXTURE_ENV_MODE',
19402 `GL_TEXTURE_LOD_BIAS', `GL_COMBINE_RGB', `GL_COMBINE_ALPHA',
19403 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
19404 `GL_SRC1_ALPHA', `GL_SRC2_ALPHA', `GL_OPERAND0_RGB',
19405 `GL_OPERAND1_RGB', `GL_OPERAND2_RGB', `GL_OPERAND0_ALPHA',
19406 `GL_OPERAND1_ALPHA', `GL_OPERAND2_ALPHA', `GL_RGB_SCALE',
19407 `GL_ALPHA_SCALE', or `GL_COORD_REPLACE'.
19410 Specifies a single symbolic constant, one of `GL_ADD',
19411 `GL_ADD_SIGNED', `GL_INTERPOLATE', `GL_MODULATE', `GL_DECAL',
19412 `GL_BLEND', `GL_REPLACE', `GL_SUBTRACT', `GL_COMBINE',
19413 `GL_TEXTURE', `GL_CONSTANT', `GL_PRIMARY_COLOR', `GL_PREVIOUS',
19414 `GL_SRC_COLOR', `GL_ONE_MINUS_SRC_COLOR', `GL_SRC_ALPHA',
19415 `GL_ONE_MINUS_SRC_ALPHA', a single boolean value for the point
19416 sprite texture coordinate replacement, a single floating-point
19417 value for the texture level-of-detail bias, or 1.0, 2.0, or 4.0
19418 when specifying the `GL_RGB_SCALE' or `GL_ALPHA_SCALE'.
19420 A texture environment specifies how texture values are interpreted when
19421 a fragment is textured. When TARGET is `GL_TEXTURE_FILTER_CONTROL',
19422 PNAME must be `GL_TEXTURE_LOD_BIAS'. When TARGET is `GL_TEXTURE_ENV',
19423 PNAME can be `GL_TEXTURE_ENV_MODE', `GL_TEXTURE_ENV_COLOR',
19424 `GL_COMBINE_RGB', `GL_COMBINE_ALPHA', `GL_RGB_SCALE', `GL_ALPHA_SCALE',
19425 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
19426 `GL_SRC1_ALPHA', or `GL_SRC2_ALPHA'.
19428 If PNAME is `GL_TEXTURE_ENV_MODE', then PARAMS is (or points to) the
19429 symbolic name of a texture function. Six texture functions may be
19430 specified: `GL_ADD', `GL_MODULATE', `GL_DECAL', `GL_BLEND',
19431 `GL_REPLACE', or `GL_COMBINE'.
19433 The following table shows the correspondence of filtered texture values
19434 R_T , G_T , B_T , A_T , L_T , I_T to texture source components. C_S and
19435 A_S are used by the texture functions described below.
19439 Texture Base Internal Format
19446 ( L_T , L_T , L_T ) , 1
19448 `GL_LUMINANCE_ALPHA'
19449 ( L_T , L_T , L_T ) , A_T
19452 ( I_T , I_T , I_T ) , I_T
19455 ( R_T , G_T , B_T ) , 1
19458 ( R_T , G_T , B_T ) , A_T
19460 A texture function acts on the fragment to be textured using the texture
19461 image value that applies to the fragment (see `glTexParameter') and
19462 produces an RGBA color for that fragment. The following table shows how
19463 the RGBA color is produced for each of the first five texture functions
19464 that can be chosen. C is a triple of color values (RGB) and A is the
19465 associated alpha value. RGBA values extracted from a texture image are
19466 in the range [0,1]. The subscript P refers to the color computed from
19467 the previous texture stage (or the incoming fragment if processing
19468 texture stage 0), the subscript S to the texture source color, the
19469 subscript C to the texture environment color, and the subscript V
19470 indicates a value produced by the texture function.
19474 Texture Base Internal Format
19475 `Value', `GL_REPLACE' Function , `GL_MODULATE' Function ,
19476 `GL_DECAL' Function , `GL_BLEND' Function , `GL_ADD' Function
19479 C_V= , C_P , C_P , undefined , C_P , C_P
19482 A_V= , A_S , A_P\u2062A_S , , A_V=A_P\u2062A_S , A_P\u2062A_S
19485 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
19488 A_V= , A_P , A_P , , A_P , A_P
19490 `GL_LUMINANCE_ALPHA'
19491 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
19494 A_V= , A_S , A_P\u2062A_S , , A_P\u2062A_S , A_P\u2062A_S
19497 C_V= , C_S , C_P\u2062C_S , undefined , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
19500 A_V= , A_S , A_P\u2062A_S , , A_P\u2062(1-A_S,)+A_C\u2062A_S , A_P+A_S
19503 C_V= , C_S , C_P\u2062C_S , C_S , C_P\u2062(1-C_S,)+C_C\u2062C_S , C_P+C_S
19506 A_V= , A_P , A_P , A_P , A_P , A_P
19509 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
19513 A_V= , A_S , A_P\u2062A_S , A_P , A_P\u2062A_S , A_P\u2062A_S
19515 If PNAME is `GL_TEXTURE_ENV_MODE', and PARAMS is `GL_COMBINE', the form
19516 of the texture function depends on the values of `GL_COMBINE_RGB' and
19517 `GL_COMBINE_ALPHA'.
19519 The following describes how the texture sources, as specified by
19520 `GL_SRC0_RGB', `GL_SRC1_RGB', `GL_SRC2_RGB', `GL_SRC0_ALPHA',
19521 `GL_SRC1_ALPHA', and `GL_SRC2_ALPHA', are combined to produce a final
19522 texture color. In the following tables, `GL_SRC0_c' is represented by
19523 ARG0 , `GL_SRC1_c' is represented by ARG1 , and `GL_SRC2_c' is
19524 represented by ARG2 .
19526 `GL_COMBINE_RGB' accepts any of `GL_REPLACE', `GL_MODULATE', `GL_ADD',
19527 `GL_ADD_SIGNED', `GL_INTERPOLATE', `GL_SUBTRACT', `GL_DOT3_RGB', or
19548 ARG0×ARG2+ARG1×(1-ARG2,)
19553 `GL_DOT3_RGB' or `GL_DOT3_RGBA'
19554 4×(((ARG0_R,-0.5,)×(ARG1_R,-0.5,),)+((ARG0_G,-0.5,)×(ARG1_G,-0.5,),
19555 )+((ARG0_B,-0.5,)×(ARG1_B,-0.5,),),)
19557 The scalar results for `GL_DOT3_RGB' and `GL_DOT3_RGBA' are placed into
19558 each of the 3 (RGB) or 4 (RGBA) components on output.
19560 Likewise, `GL_COMBINE_ALPHA' accepts any of `GL_REPLACE', `GL_MODULATE',
19561 `GL_ADD', `GL_ADD_SIGNED', `GL_INTERPOLATE', or `GL_SUBTRACT'. The
19562 following table describes how alpha values are combined:
19566 *`GL_COMBINE_ALPHA'*
19582 ARG0×ARG2+ARG1×(1-ARG2,)
19587 In the following tables, the value C_S represents the color sampled from
19588 the currently bound texture, C_C represents the constant
19589 texture-environment color, C_F represents the primary color of the
19590 incoming fragment, and C_P represents the color computed from the
19591 previous texture stage or C_F if processing texture stage 0. Likewise,
19592 A_S , A_C , A_F , and A_P represent the respective alpha values.
19594 The following table describes the values assigned to ARG0 , ARG1 , and
19595 ARG2 based upon the RGB sources and operands:
19600 *`GL_OPERANDn_RGB'*, *Argument Value*
19603 `GL_SRC_COLOR', C_S,
19606 `GL_ONE_MINUS_SRC_COLOR', 1-C_S,
19609 `GL_SRC_ALPHA', A_S,
19612 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
19615 `GL_SRC_COLOR', C_S,
19618 `GL_ONE_MINUS_SRC_COLOR', 1-C_S,
19621 `GL_SRC_ALPHA', A_S,
19624 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
19627 `GL_SRC_COLOR', C_C,
19630 `GL_ONE_MINUS_SRC_COLOR', 1-C_C,
19633 `GL_SRC_ALPHA', A_C,
19636 `GL_ONE_MINUS_SRC_ALPHA', 1-A_C,
19639 `GL_SRC_COLOR', C_F,
19642 `GL_ONE_MINUS_SRC_COLOR', 1-C_F,
19645 `GL_SRC_ALPHA', A_F,
19648 `GL_ONE_MINUS_SRC_ALPHA', 1-A_F,
19651 `GL_SRC_COLOR', C_P,
19654 `GL_ONE_MINUS_SRC_COLOR', 1-C_P,
19657 `GL_SRC_ALPHA', A_P,
19660 `GL_ONE_MINUS_SRC_ALPHA', 1-A_P,
19662 For `GL_TEXTUREn' sources, C_S and A_S represent the color and alpha,
19663 respectively, produced from texture stage N .
19665 The follow table describes the values assigned to ARG0 , ARG1 , and ARG2
19666 based upon the alpha sources and operands:
19671 *`GL_OPERANDn_ALPHA'*, *Argument Value*
19674 `GL_SRC_ALPHA', A_S,
19677 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
19680 `GL_SRC_ALPHA', A_S,
19683 `GL_ONE_MINUS_SRC_ALPHA', 1-A_S,
19686 `GL_SRC_ALPHA', A_C,
19689 `GL_ONE_MINUS_SRC_ALPHA', 1-A_C,
19692 `GL_SRC_ALPHA', A_F,
19695 `GL_ONE_MINUS_SRC_ALPHA', 1-A_F,
19698 `GL_SRC_ALPHA', A_P,
19701 `GL_ONE_MINUS_SRC_ALPHA', 1-A_P,
19703 The RGB and alpha results of the texture function are multipled by the
19704 values of `GL_RGB_SCALE' and `GL_ALPHA_SCALE', respectively, and clamped
19705 to the range [0,1] .
19707 If PNAME is `GL_TEXTURE_ENV_COLOR', PARAMS is a pointer to an array that
19708 holds an RGBA color consisting of four values. Integer color components
19709 are interpreted linearly such that the most positive integer maps to
19710 1.0, and the most negative integer maps to -1.0. The values are clamped
19711 to the range [0,1] when they are specified. C_C takes these four values.
19713 If PNAME is `GL_TEXTURE_LOD_BIAS', the value specified is added to the
19714 texture level-of-detail parameter, that selects which mipmap, or mipmaps
19715 depending upon the selected `GL_TEXTURE_MIN_FILTER', will be sampled.
19717 `GL_TEXTURE_ENV_MODE' defaults to `GL_MODULATE' and
19718 `GL_TEXTURE_ENV_COLOR' defaults to (0, 0, 0, 0).
19720 If TARGET is `GL_POINT_SPRITE' and PNAME is `GL_COORD_REPLACE', the
19721 boolean value specified is used to either enable or disable point sprite
19722 texture coordinate replacement. The default value is `GL_FALSE'.
19724 `GL_INVALID_ENUM' is generated when TARGET or PNAME is not one of the
19725 accepted defined values, or when PARAMS should have a defined constant
19726 value (based on the value of PNAME) and does not.
19728 `GL_INVALID_VALUE' is generated if the PARAMS value for `GL_RGB_SCALE'
19729 or `GL_ALPHA_SCALE' are not one of 1.0, 2.0, or 4.0.
19731 `GL_INVALID_OPERATION' is generated if `glTexEnv' is executed between
19732 the execution of `glBegin' and the corresponding execution of `glEnd'.")
19734 (define-gl-procedures
19747 "Control the generation of texture coordinates.
19750 Specifies a texture coordinate. Must be one of `GL_S', `GL_T',
19754 Specifies the symbolic name of the texture-coordinate generation
19755 function. Must be `GL_TEXTURE_GEN_MODE'.
19758 Specifies a single-valued texture generation parameter, one of
19759 `GL_OBJECT_LINEAR', `GL_EYE_LINEAR', `GL_SPHERE_MAP',
19760 `GL_NORMAL_MAP', or `GL_REFLECTION_MAP'.
19762 `glTexGen' selects a texture-coordinate generation function or supplies
19763 coefficients for one of the functions. COORD names one of the (S, T, R,
19764 Q) texture coordinates; it must be one of the symbols `GL_S', `GL_T',
19765 `GL_R', or `GL_Q'. PNAME must be one of three symbolic constants:
19766 `GL_TEXTURE_GEN_MODE', `GL_OBJECT_PLANE', or `GL_EYE_PLANE'. If PNAME is
19767 `GL_TEXTURE_GEN_MODE', then PARAMS chooses a mode, one of
19768 `GL_OBJECT_LINEAR', `GL_EYE_LINEAR', `GL_SPHERE_MAP', `GL_NORMAL_MAP',
19769 or `GL_REFLECTION_MAP'. If PNAME is either `GL_OBJECT_PLANE' or
19770 `GL_EYE_PLANE', PARAMS contains coefficients for the corresponding
19771 texture generation function.
19773 If the texture generation function is `GL_OBJECT_LINEAR', the function
19775 G=P_1×X_O+P_2×Y_O+P_3×Z_O+P_4×W_O
19777 is used, where G is the value computed for the coordinate named in
19778 COORD, P_1 , P_2 , P_3 , and P_4 are the four values supplied in PARAMS,
19779 and X_O , Y_O , Z_O , and W_O are the object coordinates of the vertex.
19780 This function can be used, for example, to texture-map terrain using sea
19781 level as a reference plane (defined by P_1 , P_2 , P_3 , and P_4 ). The
19782 altitude of a terrain vertex is computed by the `GL_OBJECT_LINEAR'
19783 coordinate generation function as its distance from sea level; that
19784 altitude can then be used to index the texture image to map white snow
19785 onto peaks and green grass onto foothills.
19787 If the texture generation function is `GL_EYE_LINEAR', the function
19789 G=P_1,^″×X_E+P_2,^″×Y_E+P_3,^″×Z_E+P_4,^″×W_E
19793 (P_1,^″\u2062P_2,^″\u2062P_3,^″\u2062P_4,^″,)=(P_1\u2062P_2\u2062P_3\u2062P_4,)\u2062M^-1
19795 and X_E , Y_E , Z_E , and W_E are the eye coordinates of the vertex, P_1
19796 , P_2 , P_3 , and P_4 are the values supplied in PARAMS, and M is the
19797 modelview matrix when `glTexGen' is invoked. If M is poorly conditioned
19798 or singular, texture coordinates generated by the resulting function may
19799 be inaccurate or undefined.
19801 Note that the values in PARAMS define a reference plane in eye
19802 coordinates. The modelview matrix that is applied to them may not be the
19803 same one in effect when the polygon vertices are transformed. This
19804 function establishes a field of texture coordinates that can produce
19805 dynamic contour lines on moving objects.
19807 If the texture generation function is `GL_SPHERE_MAP' and COORD is
19808 either `GL_S' or `GL_T', S and T texture coordinates are generated as
19809 follows. Let U be the unit vector pointing from the origin to the
19810 polygon vertex (in eye coordinates). Let N sup prime be the current
19811 normal, after transformation to eye coordinates. Let
19813 F=(F_X\u2062F_Y\u2062F_Z,)^T be the reflection vector such that
19815 F=U-2\u2062N^″\u2062N^″,^T\u2062U
19817 Finally, let M=2\u2062√(F_X,^2+F_Y,^2+(F_Z+1,)^2,) . Then the values assigned
19818 to the S and T texture coordinates are
19824 To enable or disable a texture-coordinate generation function, call
19825 `glEnable' or `glDisable' with one of the symbolic texture-coordinate
19826 names (`GL_TEXTURE_GEN_S', `GL_TEXTURE_GEN_T', `GL_TEXTURE_GEN_R', or
19827 `GL_TEXTURE_GEN_Q') as the argument. When enabled, the specified texture
19828 coordinate is computed according to the generating function associated
19829 with that coordinate. When disabled, subsequent vertices take the
19830 specified texture coordinate from the current set of texture
19831 coordinates. Initially, all texture generation functions are set to
19832 `GL_EYE_LINEAR' and are disabled. Both S plane equations are (1, 0, 0,
19833 0), both T plane equations are (0, 1, 0, 0), and all R and Q plane
19834 equations are (0, 0, 0, 0).
19836 When the `ARB_multitexture' extension is supported, `glTexGen' sets the
19837 texture generation parameters for the currently active texture unit,
19838 selected with `glActiveTexture'.
19840 `GL_INVALID_ENUM' is generated when COORD or PNAME is not an accepted
19841 defined value, or when PNAME is `GL_TEXTURE_GEN_MODE' and PARAMS is not
19842 an accepted defined value.
19844 `GL_INVALID_ENUM' is generated when PNAME is `GL_TEXTURE_GEN_MODE',
19845 PARAMS is `GL_SPHERE_MAP', and COORD is either `GL_R' or `GL_Q'.
19847 `GL_INVALID_OPERATION' is generated if `glTexGen' is executed between
19848 the execution of `glBegin' and the corresponding execution of `glEnd'.")
19850 (define-gl-procedures
19854 (internalFormat GLint)
19859 (data const-GLvoid-*)
19862 "Specify a one-dimensional texture image.
19865 Specifies the target texture. Must be `GL_TEXTURE_1D' or
19866 `GL_PROXY_TEXTURE_1D'.
19869 Specifies the level-of-detail number. Level 0 is the base image
19870 level. Level N is the Nth mipmap reduction image.
19873 Specifies the number of color components in the texture. Must be 1,
19874 2, 3, or 4, or one of the following symbolic constants: `GL_ALPHA',
19875 `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
19876 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
19877 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
19878 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT',
19879 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24',
19880 `GL_DEPTH_COMPONENT32', `GL_LUMINANCE', `GL_LUMINANCE4',
19881 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
19882 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
19883 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
19884 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
19885 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
19886 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
19887 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
19888 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
19889 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
19890 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
19891 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
19895 Specifies the width of the texture image including the border if
19896 any. If the GL version does not support non-power-of-two sizes,
19897 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
19898 implementations support texture images that are at least 64 texels
19899 wide. The height of the 1D texture image is 1.
19902 Specifies the width of the border. Must be either 0 or 1.
19905 Specifies the format of the pixel data. The following symbolic
19906 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
19907 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
19908 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
19911 Specifies the data type of the pixel data. The following symbolic
19912 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
19913 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
19914 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
19915 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
19916 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
19917 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
19918 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
19919 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
19922 Specifies a pointer to the image data in memory.
19924 Texturing maps a portion of a specified texture image onto each
19925 graphical primitive for which texturing is enabled. To enable and
19926 disable one-dimensional texturing, call `glEnable' and `glDisable' with
19927 argument `GL_TEXTURE_1D'.
19929 Texture images are defined with `glTexImage1D'. The arguments describe
19930 the parameters of the texture image, such as width, width of the border,
19931 level-of-detail number (see `glTexParameter'), and the internal
19932 resolution and format used to store the image. The last three arguments
19933 describe how the image is represented in memory; they are identical to
19934 the pixel formats used for `glDrawPixels'.
19936 If TARGET is `GL_PROXY_TEXTURE_1D', no data is read from DATA, but all
19937 of the texture image state is recalculated, checked for consistency, and
19938 checked against the implementation's capabilities. If the implementation
19939 cannot handle a texture of the requested texture size, it sets all of
19940 the image state to 0, but does not generate an error (see `glGetError').
19941 To query for an entire mipmap array, use an image array level greater
19942 than or equal to 1.
19944 If TARGET is `GL_TEXTURE_1D', data is read from DATA as a sequence of
19945 signed or unsigned bytes, shorts, or longs, or single-precision
19946 floating-point values, depending on TYPE. These values are grouped into
19947 sets of one, two, three, or four values, depending on FORMAT, to form
19948 elements. If TYPE is `GL_BITMAP', the data is considered as a string of
19949 unsigned bytes (and FORMAT must be `GL_COLOR_INDEX'). Each data byte is
19950 treated as eight 1-bit elements, with bit ordering determined by
19951 `GL_UNPACK_LSB_FIRST' (see `glPixelStore').
19953 If a non-zero named buffer object is bound to the
19954 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
19955 image is specified, DATA is treated as a byte offset into the buffer
19956 object's data store.
19958 The first element corresponds to the left end of the texture array.
19959 Subsequent elements progress left-to-right through the remaining texels
19960 in the texture array. The final element corresponds to the right end of
19963 FORMAT determines the composition of each element in DATA. It can assume
19964 one of these symbolic values:
19967 Each element is a single value, a color index. The GL converts it
19968 to fixed point (with an unspecified number of zero bits to the
19969 right of the binary point), shifted left or right depending on the
19970 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
19971 (see `glPixelTransfer'). The resulting index is converted to a set
19972 of color components using the `GL_PIXEL_MAP_I_TO_R',
19973 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
19974 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
19977 Each element is a single red component. The GL converts it to
19978 floating point and assembles it into an RGBA element by attaching 0
19979 for green and blue, and 1 for alpha. Each component is then
19980 multiplied by the signed scale factor `GL_c_SCALE', added to the
19981 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
19982 `glPixelTransfer').
19985 Each element is a single green component. The GL converts it to
19986 floating point and assembles it into an RGBA element by attaching 0
19987 for red and blue, and 1 for alpha. Each component is then
19988 multiplied by the signed scale factor `GL_c_SCALE', added to the
19989 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
19990 `glPixelTransfer').
19993 Each element is a single blue component. The GL converts it to
19994 floating point and assembles it into an RGBA element by attaching 0
19995 for red and green, and 1 for alpha. Each component is then
19996 multiplied by the signed scale factor `GL_c_SCALE', added to the
19997 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
19998 `glPixelTransfer').
20001 Each element is a single alpha component. The GL converts it to
20002 floating point and assembles it into an RGBA element by attaching 0
20003 for red, green, and blue. Each component is then multiplied by the
20004 signed scale factor `GL_c_SCALE', added to the signed bias
20005 `GL_c_BIAS', and clamped to the range [0,1] (see
20006 `glPixelTransfer').
20009 Each element is a single intensity value. The GL converts it to
20010 floating point, then assembles it into an RGBA element by
20011 replicating the intensity value three times for red, green, blue,
20012 and alpha. Each component is then multiplied by the signed scale
20013 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
20014 clamped to the range [0,1] (see `glPixelTransfer').
20018 Each element is an RGB triple. The GL converts it to floating point
20019 and assembles it into an RGBA element by attaching 1 for alpha.
20020 Each component is then multiplied by the signed scale factor
20021 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20022 the range [0,1] (see `glPixelTransfer').
20026 Each element contains all four components. Each component is
20027 multiplied by the signed scale factor `GL_c_SCALE', added to the
20028 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20029 `glPixelTransfer').
20032 Each element is a single luminance value. The GL converts it to
20033 floating point, then assembles it into an RGBA element by
20034 replicating the luminance value three times for red, green, and
20035 blue and attaching 1 for alpha. Each component is then multiplied
20036 by the signed scale factor `GL_c_SCALE', added to the signed bias
20037 `GL_c_BIAS', and clamped to the range [0,1] (see
20038 `glPixelTransfer').
20040 `GL_LUMINANCE_ALPHA'
20041 Each element is a luminance/alpha pair. The GL converts it to
20042 floating point, then assembles it into an RGBA element by
20043 replicating the luminance value three times for red, green, and
20044 blue. Each component is then multiplied by the signed scale factor
20045 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20046 the range [0,1] (see `glPixelTransfer').
20048 `GL_DEPTH_COMPONENT'
20049 Each element is a single depth value. The GL converts it to
20050 floating point, multiplies by the signed scale factor
20051 `GL_DEPTH_SCALE', adds the signed bias `GL_DEPTH_BIAS', and clamps
20052 to the range [0,1] (see `glPixelTransfer').
20054 Refer to the `glDrawPixels' reference page for a description of the
20055 acceptable values for the TYPE parameter.
20057 If an application wants to store the texture at a certain resolution or
20058 in a certain format, it can request the resolution and format with
20059 INTERNALFORMAT. The GL will choose an internal representation that
20060 closely approximates that requested by INTERNALFORMAT, but it may not
20061 match exactly. (The representations specified by `GL_LUMINANCE',
20062 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
20063 numeric values 1, 2, 3, and 4 may also be used to specify the above
20066 If the INTERNALFORMAT parameter is one of the generic compressed
20067 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
20068 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
20069 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
20070 internal format with the symbolic constant for a specific internal
20071 format and compress the texture before storage. If no corresponding
20072 internal format is available, or the GL can not compress that image for
20073 any reason, the internal format is instead replaced with a corresponding
20074 base internal format.
20076 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
20077 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
20078 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
20079 treated as if the red, green, blue, or luminance components are encoded
20080 in the sRGB color space. Any alpha component is left unchanged. The
20081 conversion from the sRGB encoded component C_S to a linear component C_L
20084 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
20087 Assume C_S is the sRGB component in the range [0,1].
20089 Use the `GL_PROXY_TEXTURE_1D' target to try out a resolution and format.
20090 The implementation will update and recompute its best match for the
20091 requested storage resolution and format. To then query this state, call
20092 `glGetTexLevelParameter'. If the texture cannot be accommodated, texture
20095 A one-component texture image uses only the red component of the RGBA
20096 color from DATA. A two-component image uses the R and A values. A
20097 three-component image uses the R, G, and B values. A four-component
20098 image uses all of the RGBA components.
20100 Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures
20101 during texture filtering and application.\xa0Image-based shadowing\xa0can\xa0be
20102 \xa0enabled\xa0by\xa0comparing texture r coordinates to depth texture values to
20103 generate a boolean result. See `glTexParameter' for details on texture
20106 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_1D' or
20107 `GL_PROXY_TEXTURE_1D'.
20109 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
20110 constant. Format constants other than `GL_STENCIL_INDEX' are accepted.
20112 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
20114 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
20117 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
20119 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
20120 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
20122 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
20123 one of the accepted resolution and format symbolic constants.
20125 `GL_INVALID_VALUE' is generated if WIDTH is less than 0 or greater than
20126 2 + `GL_MAX_TEXTURE_SIZE'.
20128 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
20129 supported and the WIDTH cannot be represented as 2^N+2\u2061(BORDER,) for
20130 some integer value of N.
20132 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
20134 `GL_INVALID_OPERATION' is generated if TYPE is one of
20135 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20136 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
20139 `GL_INVALID_OPERATION' is generated if TYPE is one of
20140 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20141 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20142 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20143 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
20144 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
20146 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
20147 and INTERNALFORMAT is not `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
20148 `GL_DEPTH_COMPONENT24', or `GL_DEPTH_COMPONENT32'.
20150 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
20151 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
20152 `GL_DEPTH_COMPONENT32', and FORMAT is not `GL_DEPTH_COMPONENT'.
20154 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20155 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
20156 data store is currently mapped.
20158 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20159 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
20160 unpacked from the buffer object such that the memory reads required
20161 would exceed the data store size.
20163 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20164 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
20165 divisible into the number of bytes needed to store in memory a datum
20168 `GL_INVALID_OPERATION' is generated if `glTexImage1D' is executed
20169 between the execution of `glBegin' and the corresponding execution of
20172 (define-gl-procedures
20176 (internalFormat GLint)
20182 (data const-GLvoid-*)
20185 "Specify a two-dimensional texture image.
20188 Specifies the target texture. Must be `GL_TEXTURE_2D',
20189 `GL_PROXY_TEXTURE_2D', `GL_TEXTURE_CUBE_MAP_POSITIVE_X',
20190 `GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `GL_TEXTURE_CUBE_MAP_POSITIVE_Y',
20191 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `GL_TEXTURE_CUBE_MAP_POSITIVE_Z',
20192 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `GL_PROXY_TEXTURE_CUBE_MAP'.
20195 Specifies the level-of-detail number. Level 0 is the base image
20196 level. Level N is the Nth mipmap reduction image.
20199 Specifies the number of color components in the texture. Must be 1,
20200 2, 3, or 4, or one of the following symbolic constants: `GL_ALPHA',
20201 `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
20202 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
20203 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
20204 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_DEPTH_COMPONENT',
20205 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24',
20206 `GL_DEPTH_COMPONENT32', `GL_LUMINANCE', `GL_LUMINANCE4',
20207 `GL_LUMINANCE8', `GL_LUMINANCE12', `GL_LUMINANCE16',
20208 `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
20209 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
20210 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
20211 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
20212 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
20213 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
20214 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
20215 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
20216 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
20217 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
20221 Specifies the width of the texture image including the border if
20222 any. If the GL version does not support non-power-of-two sizes,
20223 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
20224 implementations support texture images that are at least 64 texels
20228 Specifies the height of the texture image including the border if
20229 any. If the GL version does not support non-power-of-two sizes,
20230 this value must be 2^M+2\u2061(BORDER,) for some integer M . All
20231 implementations support texture images that are at least 64 texels
20235 Specifies the width of the border. Must be either 0 or 1.
20238 Specifies the format of the pixel data. The following symbolic
20239 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
20240 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
20241 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
20244 Specifies the data type of the pixel data. The following symbolic
20245 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
20246 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
20247 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20248 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
20249 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20250 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20251 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20252 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
20255 Specifies a pointer to the image data in memory.
20257 Texturing maps a portion of a specified texture image onto each
20258 graphical primitive for which texturing is enabled. To enable and
20259 disable two-dimensional texturing, call `glEnable' and `glDisable' with
20260 argument `GL_TEXTURE_2D'. To enable and disable texturing using
20261 cube-mapped texture, call `glEnable' and `glDisable' with argument
20262 `GL_TEXTURE_CUBE_MAP'.
20264 To define texture images, call `glTexImage2D'. The arguments describe
20265 the parameters of the texture image, such as height, width, width of the
20266 border, level-of-detail number (see `glTexParameter'), and number of
20267 color components provided. The last three arguments describe how the
20268 image is represented in memory; they are identical to the pixel formats
20269 used for `glDrawPixels'.
20271 If TARGET is `GL_PROXY_TEXTURE_2D' or `GL_PROXY_TEXTURE_CUBE_MAP', no
20272 data is read from DATA, but all of the texture image state is
20273 recalculated, checked for consistency, and checked against the
20274 implementation's capabilities. If the implementation cannot handle a
20275 texture of the requested texture size, it sets all of the image state to
20276 0, but does not generate an error (see `glGetError'). To query for an
20277 entire mipmap array, use an image array level greater than or equal to
20280 If TARGET is `GL_TEXTURE_2D', or one of the `GL_TEXTURE_CUBE_MAP'
20281 targets, data is read from DATA as a sequence of signed or unsigned
20282 bytes, shorts, or longs, or single-precision floating-point values,
20283 depending on TYPE. These values are grouped into sets of one, two,
20284 three, or four values, depending on FORMAT, to form elements. If TYPE is
20285 `GL_BITMAP', the data is considered as a string of unsigned bytes (and
20286 FORMAT must be `GL_COLOR_INDEX'). Each data byte is treated as eight
20287 1-bit elements, with bit ordering determined by `GL_UNPACK_LSB_FIRST'
20288 (see `glPixelStore').
20290 If a non-zero named buffer object is bound to the
20291 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
20292 image is specified, DATA is treated as a byte offset into the buffer
20293 object's data store.
20295 The first element corresponds to the lower left corner of the texture
20296 image. Subsequent elements progress left-to-right through the remaining
20297 texels in the lowest row of the texture image, and then in successively
20298 higher rows of the texture image. The final element corresponds to the
20299 upper right corner of the texture image.
20301 FORMAT determines the composition of each element in DATA. It can assume
20302 one of these symbolic values:
20305 Each element is a single value, a color index. The GL converts it
20306 to fixed point (with an unspecified number of zero bits to the
20307 right of the binary point), shifted left or right depending on the
20308 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
20309 (see `glPixelTransfer'). The resulting index is converted to a set
20310 of color components using the `GL_PIXEL_MAP_I_TO_R',
20311 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
20312 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
20315 Each element is a single red component. The GL converts it to
20316 floating point and assembles it into an RGBA element by attaching 0
20317 for green and blue, and 1 for alpha. Each component is then
20318 multiplied by the signed scale factor `GL_c_SCALE', added to the
20319 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20320 `glPixelTransfer').
20323 Each element is a single green component. The GL converts it to
20324 floating point and assembles it into an RGBA element by attaching 0
20325 for red and blue, and 1 for alpha. Each component is then
20326 multiplied by the signed scale factor `GL_c_SCALE', added to the
20327 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20328 `glPixelTransfer').
20331 Each element is a single blue component. The GL converts it to
20332 floating point and assembles it into an RGBA element by attaching 0
20333 for red and green, and 1 for alpha. Each component is then
20334 multiplied by the signed scale factor `GL_c_SCALE', added to the
20335 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20336 `glPixelTransfer').
20339 Each element is a single alpha component. The GL converts it to
20340 floating point and assembles it into an RGBA element by attaching 0
20341 for red, green, and blue. Each component is then multiplied by the
20342 signed scale factor `GL_c_SCALE', added to the signed bias
20343 `GL_c_BIAS', and clamped to the range [0,1] (see
20344 `glPixelTransfer').
20347 Each element is a single intensity value. The GL converts it to
20348 floating point, then assembles it into an RGBA element by
20349 replicating the intensity value three times for red, green, blue,
20350 and alpha. Each component is then multiplied by the signed scale
20351 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
20352 clamped to the range [0,1] (see `glPixelTransfer').
20356 Each element is an RGB triple. The GL converts it to floating point
20357 and assembles it into an RGBA element by attaching 1 for alpha.
20358 Each component is then multiplied by the signed scale factor
20359 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20360 the range [0,1] (see `glPixelTransfer').
20364 Each element contains all four components. Each component is
20365 multiplied by the signed scale factor `GL_c_SCALE', added to the
20366 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20367 `glPixelTransfer').
20370 Each element is a single luminance value. The GL converts it to
20371 floating point, then assembles it into an RGBA element by
20372 replicating the luminance value three times for red, green, and
20373 blue and attaching 1 for alpha. Each component is then multiplied
20374 by the signed scale factor `GL_c_SCALE', added to the signed bias
20375 `GL_c_BIAS', and clamped to the range [0,1] (see
20376 `glPixelTransfer').
20378 `GL_LUMINANCE_ALPHA'
20379 Each element is a luminance/alpha pair. The GL converts it to
20380 floating point, then assembles it into an RGBA element by
20381 replicating the luminance value three times for red, green, and
20382 blue. Each component is then multiplied by the signed scale factor
20383 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20384 the range [0,1] (see `glPixelTransfer').
20386 `GL_DEPTH_COMPONENT'
20387 Each element is a single depth value. The GL converts it to
20388 floating point, multiplies by the signed scale factor
20389 `GL_DEPTH_SCALE', adds the signed bias `GL_DEPTH_BIAS', and clamps
20390 to the range [0,1] (see `glPixelTransfer').
20392 Refer to the `glDrawPixels' reference page for a description of the
20393 acceptable values for the TYPE parameter.
20395 If an application wants to store the texture at a certain resolution or
20396 in a certain format, it can request the resolution and format with
20397 INTERNALFORMAT. The GL will choose an internal representation that
20398 closely approximates that requested by INTERNALFORMAT, but it may not
20399 match exactly. (The representations specified by `GL_LUMINANCE',
20400 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
20401 numeric values 1, 2, 3, and 4 may also be used to specify the above
20404 If the INTERNALFORMAT parameter is one of the generic compressed
20405 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
20406 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
20407 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
20408 internal format with the symbolic constant for a specific internal
20409 format and compress the texture before storage. If no corresponding
20410 internal format is available, or the GL can not compress that image for
20411 any reason, the internal format is instead replaced with a corresponding
20412 base internal format.
20414 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
20415 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
20416 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
20417 treated as if the red, green, blue, or luminance components are encoded
20418 in the sRGB color space. Any alpha component is left unchanged. The
20419 conversion from the sRGB encoded component C_S to a linear component C_L
20422 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
20425 Assume C_S is the sRGB component in the range [0,1].
20427 Use the `GL_PROXY_TEXTURE_2D' or `GL_PROXY_TEXTURE_CUBE_MAP' target to
20428 try out a resolution and format. The implementation will update and
20429 recompute its best match for the requested storage resolution and
20430 format. To then query this state, call `glGetTexLevelParameter'. If the
20431 texture cannot be accommodated, texture state is set to 0.
20433 A one-component texture image uses only the red component of the RGBA
20434 color extracted from DATA. A two-component image uses the R and A
20435 values. A three-component image uses the R, G, and B values. A
20436 four-component image uses all of the RGBA components.
20438 Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures
20439 during texture filtering and application.\xa0Image-based shadowing\xa0can\xa0be
20440 \xa0enabled\xa0by\xa0comparing texture r coordinates to depth texture values to
20441 generate a boolean result. See `glTexParameter' for details on texture
20444 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
20445 `GL_PROXY_TEXTURE_2D', `GL_PROXY_TEXTURE_CUBE_MAP',
20446 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
20447 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
20448 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
20450 `GL_INVALID_ENUM' is generated if TARGET is one of the six cube map 2D
20451 image targets and the width and height parameters are not equal.
20453 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
20455 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
20458 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0 or
20459 greater than 2 + `GL_MAX_TEXTURE_SIZE'.
20461 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
20463 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
20464 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
20466 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
20467 one of the accepted resolution and format symbolic constants.
20469 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0 or
20470 greater than 2 + `GL_MAX_TEXTURE_SIZE'.
20472 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
20473 supported and the WIDTH or HEIGHT cannot be represented as
20474 2^K+2\u2061(BORDER,) for some integer value of K.
20476 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
20478 `GL_INVALID_OPERATION' is generated if TYPE is one of
20479 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20480 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
20483 `GL_INVALID_OPERATION' is generated if TYPE is one of
20484 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20485 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20486 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20487 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
20488 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
20490 `GL_INVALID_OPERATION' is generated if TARGET is not `GL_TEXTURE_2D' or
20491 `GL_PROXY_TEXTURE_2D' and INTERNALFORMAT is `GL_DEPTH_COMPONENT',
20492 `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
20493 `GL_DEPTH_COMPONENT32'.
20495 `GL_INVALID_OPERATION' is generated if FORMAT is `GL_DEPTH_COMPONENT'
20496 and INTERNALFORMAT is not `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16',
20497 `GL_DEPTH_COMPONENT24', or `GL_DEPTH_COMPONENT32'.
20499 `GL_INVALID_OPERATION' is generated if INTERNALFORMAT is
20500 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
20501 `GL_DEPTH_COMPONENT32', and FORMAT is not `GL_DEPTH_COMPONENT'.
20503 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20504 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
20505 data store is currently mapped.
20507 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20508 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
20509 unpacked from the buffer object such that the memory reads required
20510 would exceed the data store size.
20512 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20513 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
20514 divisible into the number of bytes needed to store in memory a datum
20517 `GL_INVALID_OPERATION' is generated if `glTexImage2D' is executed
20518 between the execution of `glBegin' and the corresponding execution of
20521 (define-gl-procedures
20525 (internalFormat GLint)
20532 (data const-GLvoid-*)
20535 "Specify a three-dimensional texture image.
20538 Specifies the target texture. Must be `GL_TEXTURE_3D' or
20539 `GL_PROXY_TEXTURE_3D'.
20542 Specifies the level-of-detail number. Level 0 is the base image
20543 level. Level N is the N^TH mipmap reduction image.
20546 Specifies the number of color components in the texture. Must be 1,
20547 2, 3, or 4, or one of the following symbolic constants: `GL_ALPHA',
20548 `GL_ALPHA4', `GL_ALPHA8', `GL_ALPHA12', `GL_ALPHA16',
20549 `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_LUMINANCE',
20550 `GL_COMPRESSED_LUMINANCE_ALPHA', `GL_COMPRESSED_INTENSITY',
20551 `GL_COMPRESSED_RGB', `GL_COMPRESSED_RGBA', `GL_LUMINANCE',
20552 `GL_LUMINANCE4', `GL_LUMINANCE8', `GL_LUMINANCE12',
20553 `GL_LUMINANCE16', `GL_LUMINANCE_ALPHA', `GL_LUMINANCE4_ALPHA4',
20554 `GL_LUMINANCE6_ALPHA2', `GL_LUMINANCE8_ALPHA8',
20555 `GL_LUMINANCE12_ALPHA4', `GL_LUMINANCE12_ALPHA12',
20556 `GL_LUMINANCE16_ALPHA16', `GL_INTENSITY', `GL_INTENSITY4',
20557 `GL_INTENSITY8', `GL_INTENSITY12', `GL_INTENSITY16', `GL_R3_G3_B2',
20558 `GL_RGB', `GL_RGB4', `GL_RGB5', `GL_RGB8', `GL_RGB10', `GL_RGB12',
20559 `GL_RGB16', `GL_RGBA', `GL_RGBA2', `GL_RGBA4', `GL_RGB5_A1',
20560 `GL_RGBA8', `GL_RGB10_A2', `GL_RGBA12', `GL_RGBA16',
20561 `GL_SLUMINANCE', `GL_SLUMINANCE8', `GL_SLUMINANCE_ALPHA',
20562 `GL_SLUMINANCE8_ALPHA8', `GL_SRGB', `GL_SRGB8', `GL_SRGB_ALPHA', or
20566 Specifies the width of the texture image including the border if
20567 any. If the GL version does not support non-power-of-two sizes,
20568 this value must be 2^N+2\u2061(BORDER,) for some integer N . All
20569 implementations support 3D texture images that are at least 16
20573 Specifies the height of the texture image including the border if
20574 any. If the GL version does not support non-power-of-two sizes,
20575 this value must be 2^M+2\u2061(BORDER,) for some integer M . All
20576 implementations support 3D texture images that are at least 16
20580 Specifies the depth of the texture image including the border if
20581 any. If the GL version does not support non-power-of-two sizes,
20582 this value must be 2^K+2\u2061(BORDER,) for some integer K . All
20583 implementations support 3D texture images that are at least 16
20587 Specifies the width of the border. Must be either 0 or 1.
20590 Specifies the format of the pixel data. The following symbolic
20591 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
20592 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
20593 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
20596 Specifies the data type of the pixel data. The following symbolic
20597 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
20598 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
20599 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20600 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
20601 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20602 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20603 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20604 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
20607 Specifies a pointer to the image data in memory.
20609 Texturing maps a portion of a specified texture image onto each
20610 graphical primitive for which texturing is enabled. To enable and
20611 disable three-dimensional texturing, call `glEnable' and `glDisable'
20612 with argument `GL_TEXTURE_3D'.
20614 To define texture images, call `glTexImage3D'. The arguments describe
20615 the parameters of the texture image, such as height, width, depth, width
20616 of the border, level-of-detail number (see `glTexParameter'), and number
20617 of color components provided. The last three arguments describe how the
20618 image is represented in memory; they are identical to the pixel formats
20619 used for `glDrawPixels'.
20621 If TARGET is `GL_PROXY_TEXTURE_3D', no data is read from DATA, but all
20622 of the texture image state is recalculated, checked for consistency, and
20623 checked against the implementation's capabilities. If the implementation
20624 cannot handle a texture of the requested texture size, it sets all of
20625 the image state to 0, but does not generate an error (see `glGetError').
20626 To query for an entire mipmap array, use an image array level greater
20627 than or equal to 1.
20629 If TARGET is `GL_TEXTURE_3D', data is read from DATA as a sequence of
20630 signed or unsigned bytes, shorts, or longs, or single-precision
20631 floating-point values, depending on TYPE. These values are grouped into
20632 sets of one, two, three, or four values, depending on FORMAT, to form
20633 elements. If TYPE is `GL_BITMAP', the data is considered as a string of
20634 unsigned bytes (and FORMAT must be `GL_COLOR_INDEX'). Each data byte is
20635 treated as eight 1-bit elements, with bit ordering determined by
20636 `GL_UNPACK_LSB_FIRST' (see `glPixelStore').
20638 If a non-zero named buffer object is bound to the
20639 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
20640 image is specified, DATA is treated as a byte offset into the buffer
20641 object's data store.
20643 The first element corresponds to the lower left corner of the texture
20644 image. Subsequent elements progress left-to-right through the remaining
20645 texels in the lowest row of the texture image, and then in successively
20646 higher rows of the texture image. The final element corresponds to the
20647 upper right corner of the texture image.
20649 FORMAT determines the composition of each element in DATA. It can assume
20650 one of these symbolic values:
20653 Each element is a single value, a color index. The GL converts it
20654 to fixed point (with an unspecified number of zero bits to the
20655 right of the binary point), shifted left or right depending on the
20656 value and sign of `GL_INDEX_SHIFT', and added to `GL_INDEX_OFFSET'
20657 (see `glPixelTransfer'). The resulting index is converted to a set
20658 of color components using the `GL_PIXEL_MAP_I_TO_R',
20659 `GL_PIXEL_MAP_I_TO_G', `GL_PIXEL_MAP_I_TO_B', and
20660 `GL_PIXEL_MAP_I_TO_A' tables, and clamped to the range [0,1].
20663 Each element is a single red component. The GL converts it to
20664 floating point and assembles it into an RGBA element by attaching 0
20665 for green and blue, and 1 for alpha. Each component is then
20666 multiplied by the signed scale factor `GL_c_SCALE', added to the
20667 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20668 `glPixelTransfer').
20671 Each element is a single green component. The GL converts it to
20672 floating point and assembles it into an RGBA element by attaching 0
20673 for red and blue, and 1 for alpha. Each component is then
20674 multiplied by the signed scale factor `GL_c_SCALE', added to the
20675 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20676 `glPixelTransfer').
20679 Each element is a single blue component. The GL converts it to
20680 floating point and assembles it into an RGBA element by attaching 0
20681 for red and green, and 1 for alpha. Each component is then
20682 multiplied by the signed scale factor `GL_c_SCALE', added to the
20683 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20684 `glPixelTransfer').
20687 Each element is a single alpha component. The GL converts it to
20688 floating point and assembles it into an RGBA element by attaching 0
20689 for red, green, and blue. Each component is then multiplied by the
20690 signed scale factor `GL_c_SCALE', added to the signed bias
20691 `GL_c_BIAS', and clamped to the range [0,1] (see
20692 `glPixelTransfer').
20695 Each element is a single intensity value. The GL converts it to
20696 floating point, then assembles it into an RGBA element by
20697 replicating the intensity value three times for red, green, blue,
20698 and alpha. Each component is then multiplied by the signed scale
20699 factor `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and
20700 clamped to the range [0,1] (see `glPixelTransfer').
20704 Each element is an RGB triple. The GL converts it to floating point
20705 and assembles it into an RGBA element by attaching 1 for alpha.
20706 Each component is then multiplied by the signed scale factor
20707 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20708 the range [0,1] (see `glPixelTransfer').
20712 Each element contains all four components. Each component is
20713 multiplied by the signed scale factor `GL_c_SCALE', added to the
20714 signed bias `GL_c_BIAS', and clamped to the range [0,1] (see
20715 `glPixelTransfer').
20718 Each element is a single luminance value. The GL converts it to
20719 floating point, then assembles it into an RGBA element by
20720 replicating the luminance value three times for red, green, and
20721 blue and attaching 1 for alpha. Each component is then multiplied
20722 by the signed scale factor `GL_c_SCALE', added to the signed bias
20723 `GL_c_BIAS', and clamped to the range [0,1] (see
20724 `glPixelTransfer').
20726 `GL_LUMINANCE_ALPHA'
20727 Each element is a luminance/alpha pair. The GL converts it to
20728 floating point, then assembles it into an RGBA element by
20729 replicating the luminance value three times for red, green, and
20730 blue. Each component is then multiplied by the signed scale factor
20731 `GL_c_SCALE', added to the signed bias `GL_c_BIAS', and clamped to
20732 the range [0,1] (see `glPixelTransfer').
20734 Refer to the `glDrawPixels' reference page for a description of the
20735 acceptable values for the TYPE parameter.
20737 If an application wants to store the texture at a certain resolution or
20738 in a certain format, it can request the resolution and format with
20739 INTERNALFORMAT. The GL will choose an internal representation that
20740 closely approximates that requested by INTERNALFORMAT, but it may not
20741 match exactly. (The representations specified by `GL_LUMINANCE',
20742 `GL_LUMINANCE_ALPHA', `GL_RGB', and `GL_RGBA' must match exactly. The
20743 numeric values 1, 2, 3, and 4 may also be used to specify the above
20746 If the INTERNALFORMAT parameter is one of the generic compressed
20747 formats, `GL_COMPRESSED_ALPHA', `GL_COMPRESSED_INTENSITY',
20748 `GL_COMPRESSED_LUMINANCE', `GL_COMPRESSED_LUMINANCE_ALPHA',
20749 `GL_COMPRESSED_RGB', or `GL_COMPRESSED_RGBA', the GL will replace the
20750 internal format with the symbolic constant for a specific internal
20751 format and compress the texture before storage. If no corresponding
20752 internal format is available, or the GL can not compress that image for
20753 any reason, the internal format is instead replaced with a corresponding
20754 base internal format.
20756 If the INTERNALFORMAT parameter is `GL_SRGB', `GL_SRGB8',
20757 `GL_SRGB_ALPHA', `GL_SRGB8_ALPHA8', `GL_SLUMINANCE', `GL_SLUMINANCE8',
20758 `GL_SLUMINANCE_ALPHA', or `GL_SLUMINANCE8_ALPHA8', the texture is
20759 treated as if the red, green, blue, or luminance components are encoded
20760 in the sRGB color space. Any alpha component is left unchanged. The
20761 conversion from the sRGB encoded component C_S to a linear component C_L
20764 C_L={(C_S/12.92 if C_S≤0.04045), ((`c'_`s'+0.055/1.055)^2.4 if
20767 Assume C_S is the sRGB component in the range [0,1].
20769 Use the `GL_PROXY_TEXTURE_3D' target to try out a resolution and format.
20770 The implementation will update and recompute its best match for the
20771 requested storage resolution and format. To then query this state, call
20772 `glGetTexLevelParameter'. If the texture cannot be accommodated, texture
20775 A one-component texture image uses only the red component of the RGBA
20776 color extracted from DATA. A two-component image uses the R and A
20777 values. A three-component image uses the R, G, and B values. A
20778 four-component image uses all of the RGBA components.
20780 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_3D' or
20781 `GL_PROXY_TEXTURE_3D'.
20783 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
20784 constant. Format constants other than `GL_STENCIL_INDEX' and
20785 `GL_DEPTH_COMPONENT' are accepted.
20787 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
20789 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
20792 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
20794 `GL_INVALID_VALUE' may be generated if LEVEL is greater than
20795 LOG_2\u2061(MAX,) , where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
20797 `GL_INVALID_VALUE' is generated if INTERNALFORMAT is not 1, 2, 3, 4, or
20798 one of the accepted resolution and format symbolic constants.
20800 `GL_INVALID_VALUE' is generated if WIDTH, HEIGHT, or DEPTH is less than
20801 0 or greater than 2 + `GL_MAX_TEXTURE_SIZE'.
20803 `GL_INVALID_VALUE' is generated if non-power-of-two textures are not
20804 supported and the WIDTH, HEIGHT, or DEPTH cannot be represented as
20805 2^K+2\u2061(BORDER,) for some integer value of K.
20807 `GL_INVALID_VALUE' is generated if BORDER is not 0 or 1.
20809 `GL_INVALID_OPERATION' is generated if TYPE is one of
20810 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
20811 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
20814 `GL_INVALID_OPERATION' is generated if TYPE is one of
20815 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
20816 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
20817 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
20818 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
20819 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
20821 `GL_INVALID_OPERATION' is generated if FORMAT or INTERNALFORMAT is
20822 `GL_DEPTH_COMPONENT', `GL_DEPTH_COMPONENT16', `GL_DEPTH_COMPONENT24', or
20823 `GL_DEPTH_COMPONENT32'.
20825 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20826 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
20827 data store is currently mapped.
20829 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20830 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
20831 unpacked from the buffer object such that the memory reads required
20832 would exceed the data store size.
20834 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
20835 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
20836 divisible into the number of bytes needed to store in memory a datum
20839 `GL_INVALID_OPERATION' is generated if `glTexImage3D' is executed
20840 between the execution of `glBegin' and the corresponding execution of
20843 (define-gl-procedures
20856 "Set texture parameters.
20859 Specifies the target texture, which must be either `GL_TEXTURE_1D',
20860 `GL_TEXTURE_2D', `GL_TEXTURE_3D', or `GL_TEXTURE_CUBE_MAP'.
20863 Specifies the symbolic name of a single-valued texture parameter.
20864 PNAME can be one of the following: `GL_TEXTURE_MIN_FILTER',
20865 `GL_TEXTURE_MAG_FILTER', `GL_TEXTURE_MIN_LOD',
20866 `GL_TEXTURE_MAX_LOD', `GL_TEXTURE_BASE_LEVEL',
20867 `GL_TEXTURE_MAX_LEVEL', `GL_TEXTURE_WRAP_S', `GL_TEXTURE_WRAP_T',
20868 `GL_TEXTURE_WRAP_R', `GL_TEXTURE_PRIORITY',
20869 `GL_TEXTURE_COMPARE_MODE', `GL_TEXTURE_COMPARE_FUNC',
20870 `GL_DEPTH_TEXTURE_MODE', or `GL_GENERATE_MIPMAP'.
20873 Specifies the value of PNAME.
20875 Texture mapping is a technique that applies an image onto an object's
20876 surface as if the image were a decal or cellophane shrink-wrap. The
20877 image is created in texture space, with an (S , T ) coordinate system. A
20878 texture is a one- or two-dimensional image and a set of parameters that
20879 determine how samples are derived from the image.
20881 `glTexParameter' assigns the value or values in PARAMS to the texture
20882 parameter specified as PNAME. TARGET defines the target texture, either
20883 `GL_TEXTURE_1D', `GL_TEXTURE_2D', or `GL_TEXTURE_3D'. The following
20884 symbols are accepted in PNAME:
20886 `GL_TEXTURE_MIN_FILTER'
20887 The texture minifying function is used whenever the pixel being
20888 textured maps to an area greater than one texture element. There
20889 are six defined minifying functions. Two of them use the nearest
20890 one or nearest four texture elements to compute the texture value.
20891 The other four use mipmaps.
20893 A mipmap is an ordered set of arrays representing the same image at
20894 progressively lower resolutions. If the texture has dimensions
20895 2^N×2^M , there are MAX\u2061(N,M)+1 mipmaps. The first mipmap is the
20896 original texture, with dimensions 2^N×2^M . Each subsequent mipmap
20897 has dimensions 2^K-1,×2^L-1, , where 2^K×2^L are the dimensions of
20898 the previous mipmap, until either K=0 or L=0 . At that point,
20899 subsequent mipmaps have dimension 1×2^L-1, or 2^K-1,×1 until the
20900 final mipmap, which has dimension 1×1 . To define the mipmaps, call
20901 `glTexImage1D', `glTexImage2D', `glTexImage3D', `glCopyTexImage1D',
20902 or `glCopyTexImage2D' with the LEVEL argument indicating the order
20903 of the mipmaps. Level 0 is the original texture; level MAX\u2061(N,M) is
20904 the final 1×1 mipmap.
20906 PARAMS supplies a function for minifying the texture as one of the
20909 As more texture elements are sampled in the minification process,
20910 fewer aliasing artifacts will be apparent. While the `GL_NEAREST'
20911 and `GL_LINEAR' minification functions can be faster than the other
20912 four, they sample only one or four texture elements to determine
20913 the texture value of the pixel being rendered and can produce moire
20914 patterns or ragged transitions. The initial value of
20915 `GL_TEXTURE_MIN_FILTER' is `GL_NEAREST_MIPMAP_LINEAR'.
20917 `GL_TEXTURE_MAG_FILTER'
20918 The texture magnification function is used when the pixel being
20919 textured maps to an area less than or equal to one texture element.
20920 It sets the texture magnification function to either `GL_NEAREST'
20921 or `GL_LINEAR' (see below). `GL_NEAREST' is generally faster than
20922 `GL_LINEAR', but it can produce textured images with sharper edges
20923 because the transition between texture elements is not as smooth.
20924 The initial value of `GL_TEXTURE_MAG_FILTER' is `GL_LINEAR'.
20927 Returns the value of the texture element that is nearest (in
20928 Manhattan distance) to the center of the pixel being textured.
20931 Returns the weighted average of the four texture elements that are
20932 closest to the center of the pixel being textured. These can
20933 include border texture elements, depending on the values of
20934 `GL_TEXTURE_WRAP_S' and `GL_TEXTURE_WRAP_T', and on the exact
20937 `GL_NEAREST_MIPMAP_NEAREST'
20938 Chooses the mipmap that most closely matches the size of the pixel
20939 being textured and uses the `GL_NEAREST' criterion (the texture
20940 element nearest to the center of the pixel) to produce a texture
20943 `GL_LINEAR_MIPMAP_NEAREST'
20944 Chooses the mipmap that most closely matches the size of the pixel
20945 being textured and uses the `GL_LINEAR' criterion (a weighted
20946 average of the four texture elements that are closest to the center
20947 of the pixel) to produce a texture value.
20949 `GL_NEAREST_MIPMAP_LINEAR'
20950 Chooses the two mipmaps that most closely match the size of the
20951 pixel being textured and uses the `GL_NEAREST' criterion (the
20952 texture element nearest to the center of the pixel) to produce a
20953 texture value from each mipmap. The final texture value is a
20954 weighted average of those two values.
20956 `GL_LINEAR_MIPMAP_LINEAR'
20957 Chooses the two mipmaps that most closely match the size of the
20958 pixel being textured and uses the `GL_LINEAR' criterion (a weighted
20959 average of the four texture elements that are closest to the center
20960 of the pixel) to produce a texture value from each mipmap. The
20961 final texture value is a weighted average of those two values.
20964 Returns the value of the texture element that is nearest (in
20965 Manhattan distance) to the center of the pixel being textured.
20968 Returns the weighted average of the four texture elements that are
20969 closest to the center of the pixel being textured. These can
20970 include border texture elements, depending on the values of
20971 `GL_TEXTURE_WRAP_S' and `GL_TEXTURE_WRAP_T', and on the exact
20976 `GL_TEXTURE_MIN_LOD'
20977 Sets the minimum level-of-detail parameter. This floating-point
20978 value limits the selection of highest resolution mipmap (lowest
20979 mipmap level). The initial value is -1000.
20983 `GL_TEXTURE_MAX_LOD'
20984 Sets the maximum level-of-detail parameter. This floating-point
20985 value limits the selection of the lowest resolution mipmap (highest
20986 mipmap level). The initial value is 1000.
20990 `GL_TEXTURE_BASE_LEVEL'
20991 Specifies the index of the lowest defined mipmap level. This is an
20992 integer value. The initial value is 0.
20996 `GL_TEXTURE_MAX_LEVEL'
20997 Sets the index of the highest defined mipmap level. This is an
20998 integer value. The initial value is 1000.
21002 `GL_TEXTURE_WRAP_S'
21003 Sets the wrap parameter for texture coordinate S to either
21004 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21005 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. `GL_CLAMP' causes S
21006 coordinates to be clamped to the range [0,1] and is useful for
21007 preventing wrapping artifacts when mapping a single image onto an
21008 object. `GL_CLAMP_TO_BORDER' causes the S coordinate to be clamped
21009 to the range [-1/2N,,1+1/2N,] , where N is the size of the texture
21010 in the direction of clamping.`GL_CLAMP_TO_EDGE' causes S
21011 coordinates to be clamped to the range [1/2N,,1-1/2N,] , where N is
21012 the size of the texture in the direction of clamping. `GL_REPEAT'
21013 causes the integer part of the S coordinate to be ignored; the GL
21014 uses only the fractional part, thereby creating a repeating
21015 pattern. `GL_MIRRORED_REPEAT' causes the S coordinate to be set to
21016 the fractional part of the texture coordinate if the integer part
21017 of S is even; if the integer part of S is odd, then the S texture
21018 coordinate is set to 1-FRAC\u2061(S,) , where FRAC\u2061(S,) represents the
21019 fractional part of S . Border texture elements are accessed only if
21020 wrapping is set to `GL_CLAMP' or `GL_CLAMP_TO_BORDER'. Initially,
21021 `GL_TEXTURE_WRAP_S' is set to `GL_REPEAT'.
21025 `GL_TEXTURE_WRAP_T'
21026 Sets the wrap parameter for texture coordinate T to either
21027 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21028 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. See the discussion under
21029 `GL_TEXTURE_WRAP_S'. Initially, `GL_TEXTURE_WRAP_T' is set to
21032 `GL_TEXTURE_WRAP_R'
21033 Sets the wrap parameter for texture coordinate R to either
21034 `GL_CLAMP', `GL_CLAMP_TO_BORDER', `GL_CLAMP_TO_EDGE',
21035 `GL_MIRRORED_REPEAT', or `GL_REPEAT'. See the discussion under
21036 `GL_TEXTURE_WRAP_S'. Initially, `GL_TEXTURE_WRAP_R' is set to
21039 `GL_TEXTURE_BORDER_COLOR'
21040 Sets a border color. PARAMS contains four values that comprise the
21041 RGBA color of the texture border. Integer color components are
21042 interpreted linearly such that the most positive integer maps to
21043 1.0, and the most negative integer maps to -1.0. The values are
21044 clamped to the range [0,1] when they are specified. Initially, the
21045 border color is (0, 0, 0, 0).
21047 `GL_TEXTURE_PRIORITY'
21048 Specifies the texture residence priority of the currently bound
21049 texture. Permissible values are in the range [0,1] . See
21050 `glPrioritizeTextures' and `glBindTexture' for more information.
21052 `GL_TEXTURE_COMPARE_MODE'
21053 Specifies the texture comparison mode for currently bound depth
21054 textures. That is, a texture whose internal format is
21055 `GL_DEPTH_COMPONENT_*'; see `glTexImage2D') Permissible values are:
21057 `GL_TEXTURE_COMPARE_FUNC'
21058 Specifies the comparison operator used when
21059 `GL_TEXTURE_COMPARE_MODE' is set to `GL_COMPARE_R_TO_TEXTURE'.
21060 Permissible values are: where R is the current interpolated texture
21061 coordinate, and D_T is the depth texture value sampled from the
21062 currently bound depth texture. RESULT is assigned to the either the
21063 luminance, intensity, or alpha (as specified by
21064 `GL_DEPTH_TEXTURE_MODE'.)
21066 `GL_DEPTH_TEXTURE_MODE'
21067 Specifies a single symbolic constant indicating how depth values
21068 should be treated during filtering and texture application.
21069 Accepted values are `GL_LUMINANCE', `GL_INTENSITY', and `GL_ALPHA'.
21070 The initial value is `GL_LUMINANCE'.
21072 `GL_GENERATE_MIPMAP'
21073 Specifies a boolean value that indicates if all levels of a mipmap
21074 array should be automatically updated when any modification to the
21075 base level mipmap is done. The initial value is `GL_FALSE'.
21077 `GL_COMPARE_R_TO_TEXTURE'
21078 Specifies that the interpolated and clamped R texture coordinate
21079 should be compared to the value in the currently bound depth
21080 texture. See the discussion of `GL_TEXTURE_COMPARE_FUNC' for
21081 details of how the comparison is evaluated. The result of the
21082 comparison is assigned to luminance, intensity, or alpha (as
21083 specified by `GL_DEPTH_TEXTURE_MODE').
21086 Specifies that the luminance, intensity, or alpha (as specified by
21087 `GL_DEPTH_TEXTURE_MODE') should be assigned the appropriate value
21088 from the currently bound depth texture.
21090 *Texture Comparison Function*
21094 RESULT={(1.0), (0.0)\u2062\xa0(R<=D_T,), (R>D_T,),
21097 RESULT={(1.0), (0.0)\u2062\xa0(R>=D_T,), (R<D_T,),
21100 RESULT={(1.0), (0.0)\u2062\xa0(R<D_T,), (R>=D_T,),
21103 RESULT={(1.0), (0.0)\u2062\xa0(R>D_T,), (R<=D_T,),
21106 RESULT={(1.0), (0.0)\u2062\xa0(R=D_T,), (R≠D_T,),
21109 RESULT={(1.0), (0.0)\u2062\xa0(R≠D_T,), (R=D_T,),
21117 `GL_INVALID_ENUM' is generated if TARGET or PNAME is not one of the
21118 accepted defined values.
21120 `GL_INVALID_ENUM' is generated if PARAMS should have a defined constant
21121 value (based on the value of PNAME) and does not.
21123 `GL_INVALID_OPERATION' is generated if `glTexParameter' is executed
21124 between the execution of `glBegin' and the corresponding execution of
21127 (define-gl-procedures
21135 (data const-GLvoid-*)
21138 "Specify a one-dimensional texture subimage.
21141 Specifies the target texture. Must be `GL_TEXTURE_1D'.
21144 Specifies the level-of-detail number. Level 0 is the base image
21145 level. Level N is the Nth mipmap reduction image.
21148 Specifies a texel offset in the x direction within the texture
21152 Specifies the width of the texture subimage.
21155 Specifies the format of the pixel data. The following symbolic
21156 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
21157 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
21158 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
21161 Specifies the data type of the pixel data. The following symbolic
21162 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
21163 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
21164 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21165 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
21166 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21167 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21168 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21169 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
21172 Specifies a pointer to the image data in memory.
21174 Texturing maps a portion of a specified texture image onto each
21175 graphical primitive for which texturing is enabled. To enable or disable
21176 one-dimensional texturing, call `glEnable' and `glDisable' with argument
21179 `glTexSubImage1D' redefines a contiguous subregion of an existing
21180 one-dimensional texture image. The texels referenced by DATA replace the
21181 portion of the existing texture array with x indices XOFFSET and
21182 XOFFSET+WIDTH-1 , inclusive. This region may not include any texels
21183 outside the range of the texture array as it was originally specified.
21184 It is not an error to specify a subtexture with width of 0, but such a
21185 specification has no effect.
21187 If a non-zero named buffer object is bound to the
21188 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
21189 image is specified, DATA is treated as a byte offset into the buffer
21190 object's data store.
21192 `GL_INVALID_ENUM' is generated if TARGET is not one of the allowable
21195 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
21198 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
21200 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
21203 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
21205 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
21206 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21208 `GL_INVALID_VALUE' is generated if XOFFSET<-B , or if
21209 (XOFFSET+WIDTH,)>(W-B,) , where W is the `GL_TEXTURE_WIDTH', and B is
21210 the width of the `GL_TEXTURE_BORDER' of the texture image being
21211 modified. Note that W includes twice the border width.
21213 `GL_INVALID_VALUE' is generated if WIDTH is less than 0.
21215 `GL_INVALID_OPERATION' is generated if the texture array has not been
21216 defined by a previous `glTexImage1D' operation.
21218 `GL_INVALID_OPERATION' is generated if TYPE is one of
21219 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21220 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21223 `GL_INVALID_OPERATION' is generated if TYPE is one of
21224 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21225 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21226 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21227 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21228 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21230 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21231 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21232 data store is currently mapped.
21234 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21235 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21236 unpacked from the buffer object such that the memory reads required
21237 would exceed the data store size.
21239 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21240 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21241 divisible into the number of bytes needed to store in memory a datum
21244 `GL_INVALID_OPERATION' is generated if `glTexSubImage1D' is executed
21245 between the execution of `glBegin' and the corresponding execution of
21248 (define-gl-procedures
21258 (data const-GLvoid-*)
21261 "Specify a two-dimensional texture subimage.
21264 Specifies the target texture. Must be `GL_TEXTURE_2D',
21265 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
21266 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
21267 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or
21268 `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
21271 Specifies the level-of-detail number. Level 0 is the base image
21272 level. Level N is the Nth mipmap reduction image.
21275 Specifies a texel offset in the x direction within the texture
21279 Specifies a texel offset in the y direction within the texture
21283 Specifies the width of the texture subimage.
21286 Specifies the height of the texture subimage.
21289 Specifies the format of the pixel data. The following symbolic
21290 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
21291 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
21292 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
21295 Specifies the data type of the pixel data. The following symbolic
21296 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
21297 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
21298 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21299 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
21300 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21301 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21302 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21303 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
21306 Specifies a pointer to the image data in memory.
21308 Texturing maps a portion of a specified texture image onto each
21309 graphical primitive for which texturing is enabled. To enable and
21310 disable two-dimensional texturing, call `glEnable' and `glDisable' with
21311 argument `GL_TEXTURE_2D'.
21313 `glTexSubImage2D' redefines a contiguous subregion of an existing
21314 two-dimensional texture image. The texels referenced by DATA replace the
21315 portion of the existing texture array with x indices XOFFSET and
21316 XOFFSET+WIDTH-1 , inclusive, and y indices YOFFSET and YOFFSET+HEIGHT-1
21317 , inclusive. This region may not include any texels outside the range of
21318 the texture array as it was originally specified. It is not an error to
21319 specify a subtexture with zero width or height, but such a specification
21322 If a non-zero named buffer object is bound to the
21323 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
21324 image is specified, DATA is treated as a byte offset into the buffer
21325 object's data store.
21327 `GL_INVALID_ENUM' is generated if TARGET is not `GL_TEXTURE_2D',
21328 `GL_TEXTURE_CUBE_MAP_POSITIVE_X', `GL_TEXTURE_CUBE_MAP_NEGATIVE_X',
21329 `GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `GL_TEXTURE_CUBE_MAP_NEGATIVE_Y',
21330 `GL_TEXTURE_CUBE_MAP_POSITIVE_Z', or `GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'.
21332 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
21335 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
21337 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
21340 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
21342 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
21343 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21345 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
21346 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , where W is the
21347 `GL_TEXTURE_WIDTH', H is the `GL_TEXTURE_HEIGHT', and B is the border
21348 width of the texture image being modified. Note that W and H include
21349 twice the border width.
21351 `GL_INVALID_VALUE' is generated if WIDTH or HEIGHT is less than 0.
21353 `GL_INVALID_OPERATION' is generated if the texture array has not been
21354 defined by a previous `glTexImage2D' operation.
21356 `GL_INVALID_OPERATION' is generated if TYPE is one of
21357 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21358 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21361 `GL_INVALID_OPERATION' is generated if TYPE is one of
21362 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21363 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21364 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21365 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21366 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21368 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21369 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21370 data store is currently mapped.
21372 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21373 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21374 unpacked from the buffer object such that the memory reads required
21375 would exceed the data store size.
21377 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21378 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21379 divisible into the number of bytes needed to store in memory a datum
21382 `GL_INVALID_OPERATION' is generated if `glTexSubImage2D' is executed
21383 between the execution of `glBegin' and the corresponding execution of
21386 (define-gl-procedures
21398 (data const-GLvoid-*)
21401 "Specify a three-dimensional texture subimage.
21404 Specifies the target texture. Must be `GL_TEXTURE_3D'.
21407 Specifies the level-of-detail number. Level 0 is the base image
21408 level. Level N is the Nth mipmap reduction image.
21411 Specifies a texel offset in the x direction within the texture
21415 Specifies a texel offset in the y direction within the texture
21419 Specifies a texel offset in the z direction within the texture
21423 Specifies the width of the texture subimage.
21426 Specifies the height of the texture subimage.
21429 Specifies the depth of the texture subimage.
21432 Specifies the format of the pixel data. The following symbolic
21433 values are accepted: `GL_COLOR_INDEX', `GL_RED', `GL_GREEN',
21434 `GL_BLUE', `GL_ALPHA', `GL_RGB', `GL_BGR', `GL_RGBA', `GL_BGRA',
21435 `GL_LUMINANCE', and `GL_LUMINANCE_ALPHA'.
21438 Specifies the data type of the pixel data. The following symbolic
21439 values are accepted: `GL_UNSIGNED_BYTE', `GL_BYTE', `GL_BITMAP',
21440 `GL_UNSIGNED_SHORT', `GL_SHORT', `GL_UNSIGNED_INT', `GL_INT',
21441 `GL_FLOAT', `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21442 `GL_UNSIGNED_SHORT_5_6_5', `GL_UNSIGNED_SHORT_5_6_5_REV',
21443 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21444 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21445 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21446 `GL_UNSIGNED_INT_10_10_10_2', and `GL_UNSIGNED_INT_2_10_10_10_REV'.
21449 Specifies a pointer to the image data in memory.
21451 Texturing maps a portion of a specified texture image onto each
21452 graphical primitive for which texturing is enabled. To enable and
21453 disable three-dimensional texturing, call `glEnable' and `glDisable'
21454 with argument `GL_TEXTURE_3D'.
21456 `glTexSubImage3D' redefines a contiguous subregion of an existing
21457 three-dimensional texture image. The texels referenced by DATA replace
21458 the portion of the existing texture array with x indices XOFFSET and
21459 XOFFSET+WIDTH-1 , inclusive, y indices YOFFSET and YOFFSET+HEIGHT-1 ,
21460 inclusive, and z indices ZOFFSET and ZOFFSET+DEPTH-1 , inclusive. This
21461 region may not include any texels outside the range of the texture array
21462 as it was originally specified. It is not an error to specify a
21463 subtexture with zero width, height, or depth but such a specification
21466 If a non-zero named buffer object is bound to the
21467 `GL_PIXEL_UNPACK_BUFFER' target (see `glBindBuffer') while a texture
21468 image is specified, DATA is treated as a byte offset into the buffer
21469 object's data store.
21471 `GL_INVALID_ENUM' is generated if /TARGET is not `GL_TEXTURE_3D'.
21473 `GL_INVALID_ENUM' is generated if FORMAT is not an accepted format
21476 `GL_INVALID_ENUM' is generated if TYPE is not a type constant.
21478 `GL_INVALID_ENUM' is generated if TYPE is `GL_BITMAP' and FORMAT is not
21481 `GL_INVALID_VALUE' is generated if LEVEL is less than 0.
21483 `GL_INVALID_VALUE' may be generated if LEVEL is greater than LOG_2 MAX,
21484 where MAX is the returned value of `GL_MAX_TEXTURE_SIZE'.
21486 `GL_INVALID_VALUE' is generated if XOFFSET<-B , (XOFFSET+WIDTH,)>(W-B,)
21487 , YOFFSET<-B , or (YOFFSET+HEIGHT,)>(H-B,) , or ZOFFSET<-B , or
21488 (ZOFFSET+DEPTH,)>(D-B,) , where W is the `GL_TEXTURE_WIDTH', H is the
21489 `GL_TEXTURE_HEIGHT', D is the `GL_TEXTURE_DEPTH' and B is the border
21490 width of the texture image being modified. Note that W , H , and D
21491 include twice the border width.
21493 `GL_INVALID_VALUE' is generated if WIDTH, HEIGHT, or DEPTH is less than
21496 `GL_INVALID_OPERATION' is generated if the texture array has not been
21497 defined by a previous `glTexImage3D' operation.
21499 `GL_INVALID_OPERATION' is generated if TYPE is one of
21500 `GL_UNSIGNED_BYTE_3_3_2', `GL_UNSIGNED_BYTE_2_3_3_REV',
21501 `GL_UNSIGNED_SHORT_5_6_5', or `GL_UNSIGNED_SHORT_5_6_5_REV' and FORMAT
21504 `GL_INVALID_OPERATION' is generated if TYPE is one of
21505 `GL_UNSIGNED_SHORT_4_4_4_4', `GL_UNSIGNED_SHORT_4_4_4_4_REV',
21506 `GL_UNSIGNED_SHORT_5_5_5_1', `GL_UNSIGNED_SHORT_1_5_5_5_REV',
21507 `GL_UNSIGNED_INT_8_8_8_8', `GL_UNSIGNED_INT_8_8_8_8_REV',
21508 `GL_UNSIGNED_INT_10_10_10_2', or `GL_UNSIGNED_INT_2_10_10_10_REV' and
21509 FORMAT is neither `GL_RGBA' nor `GL_BGRA'.
21511 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21512 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the buffer object's
21513 data store is currently mapped.
21515 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21516 bound to the `GL_PIXEL_UNPACK_BUFFER' target and the data would be
21517 unpacked from the buffer object such that the memory reads required
21518 would exceed the data store size.
21520 `GL_INVALID_OPERATION' is generated if a non-zero buffer object name is
21521 bound to the `GL_PIXEL_UNPACK_BUFFER' target and DATA is not evenly
21522 divisible into the number of bytes needed to store in memory a datum
21525 `GL_INVALID_OPERATION' is generated if `glTexSubImage3D' is executed
21526 between the execution of `glBegin' and the corresponding execution of
21529 (define-gl-procedures
21536 "Multiply the current matrix by a translation matrix.
21543 Specify the X, Y, and Z coordinates of a translation vector.
21545 `glTranslate' produces a translation by (X,YZ) . The current matrix (see
21546 `glMatrixMode') is multiplied by this translation matrix, with the
21547 product replacing the current matrix, as if `glMultMatrix' were called
21548 with the following matrix for its argument:
21550 ((1 0 0 X), (0 1 0 Y), (0 0 1 Z), (0 0 0 1),)
21554 If the matrix mode is either `GL_MODELVIEW' or `GL_PROJECTION', all
21555 objects drawn after a call to `glTranslate' are translated.
21557 Use `glPushMatrix' and `glPopMatrix' to save and restore the
21558 untranslated coordinate system.
21560 `GL_INVALID_OPERATION' is generated if `glTranslate' is executed between
21561 the execution of `glBegin' and the corresponding execution of `glEnd'.")
21563 (define-gl-procedures
21590 (glUniform1i (location GLint) (v0 GLint) -> void)
21612 (glUniformMatrix2fv
21615 (transpose GLboolean)
21616 (value const-GLfloat-*)
21619 (glUniformMatrix3fv
21622 (transpose GLboolean)
21623 (value const-GLfloat-*)
21626 (glUniformMatrix4fv
21629 (transpose GLboolean)
21630 (value const-GLfloat-*)
21633 (glUniformMatrix2x3fv
21636 (transpose GLboolean)
21637 (value const-GLfloat-*)
21640 (glUniformMatrix3x2fv
21643 (transpose GLboolean)
21644 (value const-GLfloat-*)
21647 (glUniformMatrix2x4fv
21650 (transpose GLboolean)
21651 (value const-GLfloat-*)
21654 (glUniformMatrix4x2fv
21657 (transpose GLboolean)
21658 (value const-GLfloat-*)
21661 (glUniformMatrix3x4fv
21664 (transpose GLboolean)
21665 (value const-GLfloat-*)
21668 (glUniformMatrix4x3fv
21671 (transpose GLboolean)
21672 (value const-GLfloat-*)
21675 "Specify the value of a uniform variable for the current program object.
21678 Specifies the location of the uniform variable to be modified.
21681 Specifies the new values to be used for the specified uniform
21684 `glUniform' modifies the value of a uniform variable or a uniform
21685 variable array. The location of the uniform variable to be modified is
21686 specified by LOCATION, which should be a value returned by
21687 `glGetUniformLocation'. `glUniform' operates on the program object that
21688 was made part of current state by calling `glUseProgram'.
21690 The commands `glUniform{1|2|3|4}{f|i}' are used to change the value of
21691 the uniform variable specified by LOCATION using the values passed as
21692 arguments. The number specified in the command should match the number
21693 of components in the data type of the specified uniform variable (e.g.,
21694 `1' for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The suffix
21695 `f' indicates that floating-point values are being passed; the suffix
21696 `i' indicates that integer values are being passed, and this type should
21697 also match the data type of the specified uniform variable. The `i'
21698 variants of this function should be used to provide values for uniform
21699 variables defined as int, ivec2, ivec3, ivec4, or arrays of these. The
21700 `f' variants should be used to provide values for uniform variables of
21701 type float, vec2, vec3, vec4, or arrays of these. Either the `i' or the
21702 `f' variants may be used to provide values for uniform variables of type
21703 bool, bvec2, bvec3, bvec4, or arrays of these. The uniform variable will
21704 be set to false if the input value is 0 or 0.0f, and it will be set to
21707 All active uniform variables defined in a program object are initialized
21708 to 0 when the program object is linked successfully. They retain the
21709 values assigned to them by a call to `glUniform ' until the next
21710 successful link operation occurs on the program object, when they are
21711 once again initialized to 0.
21713 The commands `glUniform{1|2|3|4}{f|i}v' can be used to modify a single
21714 uniform variable or a uniform variable array. These commands pass a
21715 count and a pointer to the values to be loaded into a uniform variable
21716 or a uniform variable array. A count of 1 should be used if modifying
21717 the value of a single uniform variable, and a count of 1 or greater can
21718 be used to modify an entire array or part of an array. When loading N
21719 elements starting at an arbitrary position M in a uniform variable
21720 array, elements M + N - 1 in the array will be replaced with the new
21721 values. If M + N - 1 is larger than the size of the uniform variable
21722 array, values for all array elements beyond the end of the array will be
21723 ignored. The number specified in the name of the command indicates the
21724 number of components for each element in VALUE, and it should match the
21725 number of components in the data type of the specified uniform variable
21726 (e.g., `1' for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The
21727 data type specified in the name of the command must match the data type
21728 for the specified uniform variable as described previously for
21729 `glUniform{1|2|3|4}{f|i}'.
21731 For uniform variable arrays, each element of the array is considered to
21732 be of the type indicated in the name of the command (e.g., `glUniform3f'
21733 or `glUniform3fv' can be used to load a uniform variable array of type
21734 vec3). The number of elements of the uniform variable array to be
21735 modified is specified by COUNT
21737 The commands `glUniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv' are used
21738 to modify a matrix or an array of matrices. The numbers in the command
21739 name are interpreted as the dimensionality of the matrix. The number `2'
21740 indicates a 2 × 2 matrix (i.e., 4 values), the number `3' indicates a 3
21741 × 3 matrix (i.e., 9 values), and the number `4' indicates a 4 × 4 matrix
21742 (i.e., 16 values). Non-square matrix dimensionality is explicit, with
21743 the first number representing the number of columns and the second
21744 number representing the number of rows. For example, `2x4' indicates a 2
21745 × 4 matrix with 2 columns and 4 rows (i.e., 8 values). If TRANSPOSE is
21746 `GL_FALSE', each matrix is assumed to be supplied in column major order.
21747 If TRANSPOSE is `GL_TRUE', each matrix is assumed to be supplied in row
21748 major order. The COUNT argument indicates the number of matrices to be
21749 passed. A count of 1 should be used if modifying the value of a single
21750 matrix, and a count greater than 1 can be used to modify an array of
21753 `GL_INVALID_OPERATION' is generated if there is no current program
21756 `GL_INVALID_OPERATION' is generated if the size of the uniform variable
21757 declared in the shader does not match the size indicated by the
21758 `glUniform' command.
21760 `GL_INVALID_OPERATION' is generated if one of the integer variants of
21761 this function is used to load a uniform variable of type float, vec2,
21762 vec3, vec4, or an array of these, or if one of the floating-point
21763 variants of this function is used to load a uniform variable of type
21764 int, ivec2, ivec3, or ivec4, or an array of these.
21766 `GL_INVALID_OPERATION' is generated if LOCATION is an invalid uniform
21767 location for the current program object and LOCATION is not equal to -1.
21769 `GL_INVALID_VALUE' is generated if COUNT is less than 0.
21771 `GL_INVALID_OPERATION' is generated if COUNT is greater than 1 and the
21772 indicated uniform variable is not an array variable.
21774 `GL_INVALID_OPERATION' is generated if a sampler is loaded using a
21775 command other than `glUniform1i' and `glUniform1iv'.
21777 `GL_INVALID_OPERATION' is generated if `glUniform' is executed between
21778 the execution of `glBegin' and the corresponding execution of `glEnd'.")
21780 (define-gl-procedures
21781 ((glUseProgram (program GLuint) -> void))
21782 "Installs a program object as part of current rendering state.
21785 Specifies the handle of the program object whose executables are to
21786 be used as part of current rendering state.
21788 `glUseProgram' installs the program object specified by PROGRAM as part
21789 of current rendering state. One or more executables are created in a
21790 program object by successfully attaching shader objects to it with
21791 `glAttachShader', successfully compiling the shader objects with
21792 `glCompileShader', and successfully linking the program object with
21795 A program object will contain an executable that will run on the vertex
21796 processor if it contains one or more shader objects of type
21797 `GL_VERTEX_SHADER' that have been successfully compiled and linked.
21798 Similarly, a program object will contain an executable that will run on
21799 the fragment processor if it contains one or more shader objects of type
21800 `GL_FRAGMENT_SHADER' that have been successfully compiled and linked.
21802 Successfully installing an executable on a programmable processor will
21803 cause the corresponding fixed functionality of OpenGL to be disabled.
21804 Specifically, if an executable is installed on the vertex processor, the
21805 OpenGL fixed functionality will be disabled as follows.
21807 * The projection matrix is not applied to vertex coordinates.
21809 * The texture matrices are not applied to texture coordinates.
21811 * Normals are not transformed to eye coordinates.
21813 * Normals are not rescaled or normalized.
21815 * Normalization of `GL_AUTO_NORMAL' evaluated normals is not
21818 * Texture coordinates are not generated automatically.
21820 * Per-vertex lighting is not performed.
21822 * Color material computations are not performed.
21824 * Color index lighting is not performed.
21826 * This list also applies when setting the current raster position.
21828 The executable that is installed on the vertex processor is expected to
21829 implement any or all of the desired functionality from the preceding
21830 list. Similarly, if an executable is installed on the fragment
21831 processor, the OpenGL fixed functionality will be disabled as follows.
21833 * Texture application is not applied.
21835 * Color sum is not applied.
21837 * Fog is not applied.
21839 Again, the fragment shader that is installed is expected to implement
21840 any or all of the desired functionality from the preceding list.
21842 While a program object is in use, applications are free to modify
21843 attached shader objects, compile attached shader objects, attach
21844 additional shader objects, and detach or delete shader objects. None of
21845 these operations will affect the executables that are part of the
21846 current state. However, relinking the program object that is currently
21847 in use will install the program object as part of the current rendering
21848 state if the link operation was successful (see `glLinkProgram' ). If
21849 the program object currently in use is relinked unsuccessfully, its link
21850 status will be set to `GL_FALSE', but the executables and associated
21851 state will remain part of the current state until a subsequent call to
21852 `glUseProgram' removes it from use. After it is removed from use, it
21853 cannot be made part of current state until it has been successfully
21856 If PROGRAM contains shader objects of type `GL_VERTEX_SHADER' but it
21857 does not contain shader objects of type `GL_FRAGMENT_SHADER', an
21858 executable will be installed on the vertex processor, but fixed
21859 functionality will be used for fragment processing. Similarly, if
21860 PROGRAM contains shader objects of type `GL_FRAGMENT_SHADER' but it does
21861 not contain shader objects of type `GL_VERTEX_SHADER', an executable
21862 will be installed on the fragment processor, but fixed functionality
21863 will be used for vertex processing. If PROGRAM is 0, the programmable
21864 processors will be disabled, and fixed functionality will be used for
21865 both vertex and fragment processing.
21867 `GL_INVALID_VALUE' is generated if PROGRAM is neither 0 nor a value
21868 generated by OpenGL.
21870 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
21872 `GL_INVALID_OPERATION' is generated if PROGRAM could not be made part of
21875 `GL_INVALID_OPERATION' is generated if `glUseProgram' is executed
21876 between the execution of `glBegin' and the corresponding execution of
21879 (define-gl-procedures
21880 ((glValidateProgram (program GLuint) -> void))
21881 "Validates a program object.
21884 Specifies the handle of the program object to be validated.
21886 `glValidateProgram' checks to see whether the executables contained in
21887 PROGRAM can execute given the current OpenGL state. The information
21888 generated by the validation process will be stored in PROGRAM's
21889 information log. The validation information may consist of an empty
21890 string, or it may be a string containing information about how the
21891 current program object interacts with the rest of current OpenGL state.
21892 This provides a way for OpenGL implementers to convey more information
21893 about why the current program is inefficient, suboptimal, failing to
21894 execute, and so on.
21896 The status of the validation operation will be stored as part of the
21897 program object's state. This value will be set to `GL_TRUE' if the
21898 validation succeeded, and `GL_FALSE' otherwise. It can be queried by
21899 calling `glGetProgram' with arguments PROGRAM and `GL_VALIDATE_STATUS'.
21900 If validation is successful, PROGRAM is guaranteed to execute given the
21901 current state. Otherwise, PROGRAM is guaranteed to not execute.
21903 This function is typically useful only during application development.
21904 The informational string stored in the information log is completely
21905 implementation dependent; therefore, an application should not expect
21906 different OpenGL implementations to produce identical information
21909 `GL_INVALID_VALUE' is generated if PROGRAM is not a value generated by
21912 `GL_INVALID_OPERATION' is generated if PROGRAM is not a program object.
21914 `GL_INVALID_OPERATION' is generated if `glValidateProgram' is executed
21915 between the execution of `glBegin' and the corresponding execution of
21918 (define-gl-procedures
21919 ((glVertexAttribPointer
21923 (normalized GLboolean)
21925 (pointer const-GLvoid-*)
21928 "Define an array of generic vertex attribute data.
21931 Specifies the index of the generic vertex attribute to be modified.
21934 Specifies the number of components per generic vertex attribute.
21935 Must be 1, 2, 3, or 4. The initial value is 4.
21938 Specifies the data type of each component in the array. Symbolic
21939 constants `GL_BYTE', `GL_UNSIGNED_BYTE', `GL_SHORT',
21940 `GL_UNSIGNED_SHORT', `GL_INT', `GL_UNSIGNED_INT', `GL_FLOAT', or
21941 `GL_DOUBLE' are accepted. The initial value is `GL_FLOAT'.
21944 Specifies whether fixed-point data values should be normalized
21945 (`GL_TRUE') or converted directly as fixed-point values
21946 (`GL_FALSE') when they are accessed.
21949 Specifies the byte offset between consecutive generic vertex
21950 attributes. If STRIDE is 0, the generic vertex attributes are
21951 understood to be tightly packed in the array. The initial value is
21955 Specifies a pointer to the first component of the first generic
21956 vertex attribute in the array. The initial value is 0.
21958 `glVertexAttribPointer' specifies the location and data format of the
21959 array of generic vertex attributes at index INDEX to use when rendering.
21960 SIZE specifies the number of components per attribute and must be 1, 2,
21961 3, or 4. TYPE specifies the data type of each component, and STRIDE
21962 specifies the byte stride from one attribute to the next, allowing
21963 vertices and attributes to be packed into a single array or stored in
21964 separate arrays. If set to `GL_TRUE', NORMALIZED indicates that values
21965 stored in an integer format are to be mapped to the range [-1,1] (for
21966 signed values) or [0,1] (for unsigned values) when they are accessed and
21967 converted to floating point. Otherwise, values will be converted to
21968 floats directly without normalization.
21970 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
21971 target (see `glBindBuffer') while a generic vertex attribute array is
21972 specified, POINTER is treated as a byte offset into the buffer object's
21973 data store. Also, the buffer object binding (`GL_ARRAY_BUFFER_BINDING')
21974 is saved as generic vertex attribute array client-side state
21975 (`GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING') for index INDEX.
21977 When a generic vertex attribute array is specified, SIZE, TYPE,
21978 NORMALIZED, STRIDE, and POINTER are saved as client-side state, in
21979 addition to the current vertex array buffer object binding.
21981 To enable and disable a generic vertex attribute array, call
21982 `glEnableVertexAttribArray' and `glDisableVertexAttribArray' with INDEX.
21983 If enabled, the generic vertex attribute array is used when
21984 `glArrayElement', `glDrawArrays', `glMultiDrawArrays', `glDrawElements',
21985 `glMultiDrawElements', or `glDrawRangeElements' is called.
21987 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
21988 `GL_MAX_VERTEX_ATTRIBS'.
21990 `GL_INVALID_VALUE' is generated if SIZE is not 1, 2, 3, or 4.
21992 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
21994 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
21996 (define-gl-procedures
22049 (glVertexAttrib4Nub
22062 (glVertexAttrib4uiv
22067 (glVertexAttrib4Niv
22072 (glVertexAttrib4Nuiv
22077 "Specifies the value of a generic vertex attribute.
22080 Specifies the index of the generic vertex attribute to be modified.
22083 Specifies the new values to be used for the specified vertex
22086 OpenGL defines a number of standard vertex attributes that applications
22087 can modify with standard API entry points (color, normal, texture
22088 coordinates, etc.). The `glVertexAttrib' family of entry points allows
22089 an application to pass generic vertex attributes in numbered locations.
22091 Generic attributes are defined as four-component values that are
22092 organized into an array. The first entry of this array is numbered 0,
22093 and the size of the array is specified by the implementation-dependent
22094 constant `GL_MAX_VERTEX_ATTRIBS'. Individual elements of this array can
22095 be modified with a `glVertexAttrib' call that specifies the index of the
22096 element to be modified and a value for that element.
22098 These commands can be used to specify one, two, three, or all four
22099 components of the generic vertex attribute specified by INDEX. A `1' in
22100 the name of the command indicates that only one value is passed, and it
22101 will be used to modify the first component of the generic vertex
22102 attribute. The second and third components will be set to 0, and the
22103 fourth component will be set to 1. Similarly, a `2' in the name of the
22104 command indicates that values are provided for the first two components,
22105 the third component will be set to 0, and the fourth component will be
22106 set to 1. A `3' in the name of the command indicates that values are
22107 provided for the first three components and the fourth component will be
22108 set to 1, whereas a `4' in the name indicates that values are provided
22109 for all four components.
22111 The letters `s', `f', `i', `d', `ub', `us', and `ui' indicate whether
22112 the arguments are of type short, float, int, double, unsigned byte,
22113 unsigned short, or unsigned int. When `v' is appended to the name, the
22114 commands can take a pointer to an array of such values. The commands
22115 containing `N' indicate that the arguments will be passed as fixed-point
22116 values that are scaled to a normalized range according to the component
22117 conversion rules defined by the OpenGL specification. Signed values are
22118 understood to represent fixed-point values in the range [-1,1], and
22119 unsigned values are understood to represent fixed-point values in the
22122 OpenGL Shading Language attribute variables are allowed to be of type
22123 mat2, mat3, or mat4. Attributes of these types may be loaded using the
22124 `glVertexAttrib' entry points. Matrices must be loaded into successive
22125 generic attribute slots in column major order, with one column of the
22126 matrix in each generic attribute slot.
22128 A user-defined attribute variable declared in a vertex shader can be
22129 bound to a generic attribute index by calling `glBindAttribLocation'.
22130 This allows an application to use more descriptive variable names in a
22131 vertex shader. A subsequent change to the specified generic vertex
22132 attribute will be immediately reflected as a change to the corresponding
22133 attribute variable in the vertex shader.
22135 The binding between a generic vertex attribute index and a user-defined
22136 attribute variable in a vertex shader is part of the state of a program
22137 object, but the current value of the generic vertex attribute is not.
22138 The value of each generic vertex attribute is part of current state,
22139 just like standard vertex attributes, and it is maintained even if a
22140 different program object is used.
22142 An application may freely modify generic vertex attributes that are not
22143 bound to a named vertex shader attribute variable. These values are
22144 simply maintained as part of current state and will not be accessed by
22145 the vertex shader. If a generic vertex attribute bound to an attribute
22146 variable in a vertex shader is not updated while the vertex shader is
22147 executing, the vertex shader will repeatedly use the current value for
22148 the generic vertex attribute.
22150 The generic vertex attribute with index 0 is the same as the vertex
22151 position attribute previously defined by OpenGL. A `glVertex2',
22152 `glVertex3', or `glVertex4' command is completely equivalent to the
22153 corresponding `glVertexAttrib' command with an index argument of 0. A
22154 vertex shader can access generic vertex attribute 0 by using the
22155 built-in attribute variable GL_VERTEX. There are no current values for
22156 generic vertex attribute 0. This is the only generic vertex attribute
22157 with this property; calls to set other standard vertex attributes can be
22158 freely mixed with calls to set any of the other generic vertex
22161 `GL_INVALID_VALUE' is generated if INDEX is greater than or equal to
22162 `GL_MAX_VERTEX_ATTRIBS'.")
22164 (define-gl-procedures
22169 (pointer const-GLvoid-*)
22172 "Define an array of vertex data.
22175 Specifies the number of coordinates per vertex. Must be 2, 3, or 4.
22176 The initial value is 4.
22179 Specifies the data type of each coordinate in the array. Symbolic
22180 constants `GL_SHORT', `GL_INT', `GL_FLOAT', or `GL_DOUBLE' are
22181 accepted. The initial value is `GL_FLOAT'.
22184 Specifies the byte offset between consecutive vertices. If STRIDE
22185 is 0, the vertices are understood to be tightly packed in the
22186 array. The initial value is 0.
22189 Specifies a pointer to the first coordinate of the first vertex in
22190 the array. The initial value is 0.
22192 `glVertexPointer' specifies the location and data format of an array of
22193 vertex coordinates to use when rendering. SIZE specifies the number of
22194 coordinates per vertex, and must be 2, 3, or 4. TYPE specifies the data
22195 type of each coordinate, and STRIDE specifies the byte stride from one
22196 vertex to the next, allowing vertices and attributes to be packed into a
22197 single array or stored in separate arrays. (Single-array storage may be
22198 more efficient on some implementations; see `glInterleavedArrays'.)
22200 If a non-zero named buffer object is bound to the `GL_ARRAY_BUFFER'
22201 target (see `glBindBuffer') while a vertex array is specified, POINTER
22202 is treated as a byte offset into the buffer object's data store. Also,
22203 the buffer object binding (`GL_ARRAY_BUFFER_BINDING') is saved as vertex
22204 array client-side state (`GL_VERTEX_ARRAY_BUFFER_BINDING').
22206 When a vertex array is specified, SIZE, TYPE, STRIDE, and POINTER are
22207 saved as client-side state, in addition to the current vertex array
22208 buffer object binding.
22210 To enable and disable the vertex array, call `glEnableClientState' and
22211 `glDisableClientState' with the argument `GL_VERTEX_ARRAY'. If enabled,
22212 the vertex array is used when `glArrayElement', `glDrawArrays',
22213 `glMultiDrawArrays', `glDrawElements', `glMultiDrawElements', or
22214 `glDrawRangeElements' is called.
22216 `GL_INVALID_VALUE' is generated if SIZE is not 2, 3, or 4.
22218 `GL_INVALID_ENUM' is generated if TYPE is not an accepted value.
22220 `GL_INVALID_VALUE' is generated if STRIDE is negative.")
22222 (define-gl-procedures
22223 ((glVertex2i (x GLint) (y GLint) -> void)
22224 (glVertex2f (x GLfloat) (y GLfloat) -> void)
22260 Specify X, Y, Z, and W coordinates of a vertex. Not all parameters
22261 are present in all forms of the command.
22263 `glVertex' commands are used within `glBegin'/`glEnd' pairs to specify
22264 point, line, and polygon vertices. The current color, normal, texture
22265 coordinates, and fog coordinate are associated with the vertex when
22266 `glVertex' is called.
22268 When only X and Y are specified, Z defaults to 0 and W defaults to 1.
22269 When X , Y , and Z are specified, W defaults to 1.")
22271 (define-gl-procedures
22284 Specify the lower left corner of the viewport rectangle, in pixels.
22285 The initial value is (0,0).
22290 Specify the width and height of the viewport. When a GL context is
22291 first attached to a window, WIDTH and HEIGHT are set to the
22292 dimensions of that window.
22294 `glViewport' specifies the affine transformation of X and Y from
22295 normalized device coordinates to window coordinates. Let (X_ND,Y_ND) be
22296 normalized device coordinates. Then the window coordinates (X_W,Y_W) are
22297 computed as follows:
22299 X_W=(X_ND+1,)\u2062(WIDTH/2,)+X
22301 Y_W=(Y_ND+1,)\u2062(HEIGHT/2,)+Y
22303 Viewport width and height are silently clamped to a range that depends
22304 on the implementation. To query this range, call `glGet' with argument
22305 `GL_MAX_VIEWPORT_DIMS'.
22307 `GL_INVALID_VALUE' is generated if either WIDTH or HEIGHT is negative.
22309 `GL_INVALID_OPERATION' is generated if `glViewport' is executed between
22310 the execution of `glBegin' and the corresponding execution of `glEnd'.")
22312 (define-gl-procedures
22313 ((glWindowPos2i (x GLint) (y GLint) -> void)
22314 (glWindowPos2f (x GLfloat) (y GLfloat) -> void)
22327 "Specify the raster position in window coordinates for pixel operations.
22334 Specify the X , Y , Z coordinates for the raster position.
22336 The GL maintains a 3D position in window coordinates. This position,
22337 called the raster position, is used to position pixel and bitmap write
22338 operations. It is maintained with subpixel accuracy. See `glBitmap',
22339 `glDrawPixels', and `glCopyPixels'.
22341 `glWindowPos2' specifies the X and Y coordinates, while Z is implicitly
22342 set to 0. `glWindowPos3' specifies all three coordinates. The W
22343 coordinate of the current raster position is always set to 1.0.
22345 `glWindowPos' directly updates the X and Y coordinates of the current
22346 raster position with the values specified. That is, the values are
22347 neither transformed by the current modelview and projection matrices,
22348 nor by the viewport-to-window transform. The Z coordinate of the current
22349 raster position is updated in the following manner:
22351 Z={(N), (F), (N+Z×(F-N,),)\u2062(IF\u2062Z<=0), (IF\u2062Z>=1), (`otherwise',),
22355 where N is `GL_DEPTH_RANGE''s near value, and F is `GL_DEPTH_RANGE''s
22356 far value. See `glDepthRange'.
22358 The specified coordinates are not clip-tested, causing the raster
22359 position to always be valid.
22361 The current raster position also includes some associated color data and
22362 texture coordinates. If lighting is enabled, then
22363 `GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `GL_CURRENT_RASTER_INDEX'
22364 (in color index mode) is set to the color produced by the lighting
22365 calculation (see `glLight', `glLightModel', and `glShadeModel'). If
22366 lighting is disabled, current color (in RGBA mode, state variable
22367 `GL_CURRENT_COLOR') or color index (in color index mode, state variable
22368 `GL_CURRENT_INDEX') is used to update the current raster color.
22369 `GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated.
22371 Likewise, `GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of
22372 `GL_CURRENT_TEXTURE_COORDS', based on the texture matrix and the texture
22373 generation functions (see `glTexGen'). The `GL_CURRENT_RASTER_DISTANCE'
22374 is set to the `GL_CURRENT_FOG_COORD'.
22378 `GL_INVALID_OPERATION' is generated if `glWindowPos' is executed between
22379 the execution of `glBegin' and the corresponding execution of `glEnd'.")