gl

gl

gl
Erlang wrapper functions for OpenGL

Standard OpenGL API

This documents the functions as a brief version of the complete OpenGL reference pages.

The accumulation buffer is an extended-range color buffer. Images are not rendered into it. Rather, images rendered into one of the color buffers are added to the contents of the accumulation buffer after rendering. Effects such as antialiasing (of points, lines, and polygons), motion blur, and depth of field can be created by accumulating images generated with different transformation matrices.

External documentation.

gl:activeTexture/1 selects which texture unit subsequent texture state calls will affect. The number of texture units an implementation supports is implementation dependent, but must be at least 80.

External documentation.

The alpha test discards fragments depending on the outcome of a comparison between an incoming fragment's alpha value and a constant reference value. gl:alphaFunc/2 specifies the reference value and the comparison function. The comparison is performed only if alpha testing is enabled. By default, it is not enabled. (See gl:enable/1 and gl:disable/1 of ?GL_ALPHA_TEST.)

External documentation.

GL establishes a ``working set'' of textures that are resident in texture memory. These textures can be bound to a texture target much more efficiently than textures that are not resident.

External documentation.

gl:arrayElement/1 commands are used within gl:'begin'/1/gl:'end'/0 pairs to specify vertex and attribute data for point, line, and polygon primitives. If ?GL_VERTEX_ARRAY is enabled when gl:arrayElement/1 is called, a single vertex is drawn, using vertex and attribute data taken from location I of the enabled arrays. If ?GL_VERTEX_ARRAY is not enabled, no drawing occurs but the attributes corresponding to the enabled arrays are modified.

External documentation.

In order to create a complete shader program, there must be a way to specify the list of things that will be linked together. Program objects provide this mechanism. Shaders that are to be linked together in a program object must first be attached to that program object. gl:attachShader/2 attaches the shader object specified by Shader to the program object specified by Program. This indicates that Shader will be included in link operations that will be performed on Program.

External documentation.

gl:'begin'/1 and gl:'end'/0 delimit the vertices that define a primitive or a group of like primitives. gl:'begin'/1 accepts a single argument that specifies in which of ten ways the vertices are interpreted. Taking n as an integer count starting at one, and N as the total number of vertices specified, the interpretations are as follows:

External documentation.

Conditional rendering is started using gl:beginConditionalRender/2 and ended using gl:endConditionalRender/0. During conditional rendering, all vertex array commands, as well as gl:clear/1 and gl:clearBuffer() have no effect if the (?GL_SAMPLES_PASSED) result of the query object Id is zero, or if the (?GL_ANY_SAMPLES_PASSED) result is ?GL_FALSE. The results of commands setting the current vertex state, such as gl:vertexAttrib() are undefined. If the (?GL_SAMPLES_PASSED) result is non-zero or if the (?GL_ANY_SAMPLES_PASSED) result is ?GL_TRUE, such commands are not discarded. The Id parameter to gl:beginConditionalRender/2 must be the name of a query object previously returned from a call to gl:genQueries/1. Mode specifies how the results of the query object are to be interpreted. If Mode is ?GL_QUERY_WAIT, the GL waits for the results of the query to be available and then uses the results to determine if subsequent rendering commands are discarded. If Mode is ?GL_QUERY_NO_WAIT, the GL may choose to unconditionally execute the subsequent rendering commands without waiting for the query to complete.

External documentation.

gl:beginQuery/2 and gl:endQuery/1 delimit the boundaries of a query object. Query must be a name previously returned from a call to gl:genQueries/1. If a query object with name Id does not yet exist it is created with the type determined by Target. Target must be one of ?GL_SAMPLES_PASSED, ?GL_ANY_SAMPLES_PASSED, ?GL_PRIMITIVES_GENERATED, ?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, or ?GL_TIME_ELAPSED. The behavior of the query object depends on its type and is as follows.

External documentation.

gl:beginQueryIndexed/3 and gl:endQueryIndexed/2 delimit the boundaries of a query object. Query must be a name previously returned from a call to gl:genQueries/1. If a query object with name Id does not yet exist it is created with the type determined by Target. Target must be one of ?GL_SAMPLES_PASSED, ?GL_ANY_SAMPLES_PASSED, ?GL_PRIMITIVES_GENERATED, ?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, or ?GL_TIME_ELAPSED. The behavior of the query object depends on its type and is as follows.

External documentation.

Transform feedback mode captures the values of varying variables written by the vertex shader (or, if active, the geometry shader). Transform feedback is said to be active after a call to gl:beginTransformFeedback/1 until a subsequent call to gl:endTransformFeedback/0. Transform feedback commands must be paired.

External documentation.

gl:bindAttribLocation/3 is used to associate a user-defined attribute variable in the program object specified by Program with a generic vertex attribute index. The name of the user-defined attribute variable is passed as a null terminated string in Name. The generic vertex attribute index to be bound to this variable is specified by Index. When Program is made part of current state, values provided via the generic vertex attribute Index will modify the value of the user-defined attribute variable specified by Name.

External documentation.

gl:bindBuffer/2 binds a buffer object to the specified buffer binding point. Calling gl:bindBuffer/2 with Target set to one of the accepted symbolic constants and Buffer set to the name of a buffer object binds that buffer object name to the target. If no buffer object with name Buffer exists, one is created with that name. When a buffer object is bound to a target, the previous binding for that target is automatically broken.

External documentation.

gl:bindBufferBase/3 binds the buffer object Buffer to the binding point at index Index of the array of targets specified by Target. Each Target represents an indexed array of buffer binding points, as well as a single general binding point that can be used by other buffer manipulation functions such as gl:bindBuffer/2 or glMapBuffer. In addition to binding Buffer to the indexed buffer binding target, gl:bindBufferBase/3 also binds Buffer to the generic buffer binding point specified by Target.

External documentation.

gl:bindBufferRange/5 binds a range the buffer object Buffer represented by Offset and Size to the binding point at index Index of the array of targets specified by Target. Each Target represents an indexed array of buffer binding points, as well as a single general binding point that can be used by other buffer manipulation functions such as gl:bindBuffer/2 or glMapBuffer. In addition to binding a range of Buffer to the indexed buffer binding target, gl:bindBufferRange/5 also binds the range to the generic buffer binding point specified by Target.

External documentation.

gl:bindBuffersBase/3 binds a set of Count buffer objects whose names are given in the array Buffers to the Count consecutive binding points starting from index First of the array of targets specified by Target. If Buffers is ?NULL then gl:bindBuffersBase/3 unbinds any buffers that are currently bound to the referenced binding points. Assuming no errors are generated, it is equivalent to the following pseudo-code, which calls gl:bindBufferBase/3, with the exception that the non-indexed Target is not changed by gl:bindBuffersBase/3:

External documentation.

gl:bindBuffersRange/5 binds a set of Count ranges from buffer objects whose names are given in the array Buffers to the Count consecutive binding points starting from index First of the array of targets specified by Target. Offsets specifies the address of an array containing Count starting offsets within the buffers, and Sizes specifies the address of an array of Count sizes of the ranges. If Buffers is ?NULL then Offsets and Sizes are ignored and gl:bindBuffersRange/5 unbinds any buffers that are currently bound to the referenced binding points. Assuming no errors are generated, it is equivalent to the following pseudo-code, which calls gl:bindBufferRange/5, with the exception that the non-indexed Target is not changed by gl:bindBuffersRange/5:

External documentation.

gl:bindFragDataLocation/3 explicitly specifies the binding of the user-defined varying out variable Name to fragment shader color number ColorNumber for program Program. If Name was bound previously, its assigned binding is replaced with ColorNumber. Name must be a null-terminated string. ColorNumber must be less than ?GL_MAX_DRAW_BUFFERS.

External documentation.

gl:bindFragDataLocationIndexed/4 specifies that the varying out variable Name in Program should be bound to fragment color ColorNumber when the program is next linked. Index may be zero or one to specify that the color be used as either the first or second color input to the blend equation, respectively.

External documentation.

gl:bindFramebuffer/2 binds the framebuffer object with name Framebuffer to the framebuffer target specified by Target. Target must be either ?GL_DRAW_FRAMEBUFFER, ?GL_READ_FRAMEBUFFER or ?GL_FRAMEBUFFER. If a framebuffer object is bound to ?GL_DRAW_FRAMEBUFFER or ?GL_READ_FRAMEBUFFER, it becomes the target for rendering or readback operations, respectively, until it is deleted or another framebuffer is bound to the corresponding bind point. Calling gl:bindFramebuffer/2 with Target set to ?GL_FRAMEBUFFER binds Framebuffer to both the read and draw framebuffer targets. Framebuffer is the name of a framebuffer object previously returned from a call to gl:genFramebuffers/1, or zero to break the existing binding of a framebuffer object to Target.

External documentation.

Types

Unit = Texture = Level = i()
Layered = 0 | 1
Layer = i()
Access = Format = enum()

gl:bindImageTexture/7 binds a single level of a texture to an image unit for the purpose of reading and writing it from shaders. Unit specifies the zero-based index of the image unit to which to bind the texture level. Texture specifies the name of an existing texture object to bind to the image unit. If Texture is zero, then any existing binding to the image unit is broken. Level specifies the level of the texture to bind to the image unit.

External documentation.

gl:bindImageTextures/2 binds images from an array of existing texture objects to a specified number of consecutive image units. Count specifies the number of texture objects whose names are stored in the array Textures. That number of texture names are read from the array and bound to the Count consecutive texture units starting from First. If the name zero appears in the Textures array, any existing binding to the image unit is reset. Any non-zero entry in Textures must be the name of an existing texture object. When a non-zero entry in Textures is present, the image at level zero is bound, the binding is considered layered, with the first layer set to zero, and the image is bound for read-write access. The image unit format parameter is taken from the internal format of the image at level zero of the texture object. For cube map textures, the internal format of the positive X image of level zero is used. If Textures is ?NULL then it is as if an appropriately sized array containing only zeros had been specified.

External documentation.

gl:bindProgramPipeline/1 binds a program pipeline object to the current context. Pipeline must be a name previously returned from a call to gl:genProgramPipelines/1. If no program pipeline exists with name Pipeline then a new pipeline object is created with that name and initialized to the default state vector.

External documentation.

gl:bindRenderbuffer/2 binds the renderbuffer object with name Renderbuffer to the renderbuffer target specified by Target. Target must be ?GL_RENDERBUFFER. Renderbuffer is the name of a renderbuffer object previously returned from a call to gl:genRenderbuffers/1, or zero to break the existing binding of a renderbuffer object to Target.

External documentation.

gl:bindSampler/2 binds Sampler to the texture unit at index Unit. Sampler must be zero or the name of a sampler object previously returned from a call to gl:genSamplers/1. Unit must be less than the value of ?GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS.

External documentation.

gl:bindSamplers/2 binds samplers from an array of existing sampler objects to a specified number of consecutive sampler units. Count specifies the number of sampler objects whose names are stored in the array Samplers. That number of sampler names is read from the array and bound to the Count consecutive sampler units starting from First.

External documentation.

gl:bindTexture/2 lets you create or use a named texture. Calling gl:bindTexture/2 with Target set to ?GL_TEXTURE_1D, ?GL_TEXTURE_2D, ?GL_TEXTURE_3D, ?GL_TEXTURE_1D_ARRAY, ?GL_TEXTURE_2D_ARRAY, ?GL_TEXTURE_RECTANGLE, ?GL_TEXTURE_CUBE_MAP, ?GL_TEXTURE_CUBE_MAP_ARRAY, ?GL_TEXTURE_BUFFER, ?GL_TEXTURE_2D_MULTISAMPLE or ?GL_TEXTURE_2D_MULTISAMPLE_ARRAY and Texture set to the name of the new texture binds the texture name to the target. When a texture is bound to a target, the previous binding for that target is automatically broken.

External documentation.

gl:bindTextures/2 binds an array of existing texture objects to a specified number of consecutive texture units. Count specifies the number of texture objects whose names are stored in the array Textures. That number of texture names are read from the array and bound to the Count consecutive texture units starting from First. The target, or type of texture is deduced from the texture object and each texture is bound to the corresponding target of the texture unit. If the name zero appears in the Textures array, any existing binding to any target of the texture unit is reset and the default texture for that target is bound in its place. Any non-zero entry in Textures must be the name of an existing texture object. If Textures is ?NULL then it is as if an appropriately sized array containing only zeros had been specified.

External documentation.

gl:bindVertexBuffer/4 and gl:vertexArrayVertexBuffer/5 bind the buffer named Buffer to the vertex buffer binding point whose index is given by Bindingindex. gl:bindVertexBuffer/4 modifies the binding of the currently bound vertex array object, whereas gl:vertexArrayVertexBuffer/5 allows the caller to specify ID of the vertex array object with an argument named Vaobj, for which the binding should be modified. Offset and Stride specify the offset of the first element within the buffer and the distance between elements within the buffer, respectively, and are both measured in basic machine units. Bindingindex must be less than the value of ?GL_MAX_VERTEX_ATTRIB_BINDINGS. Offset and Stride must be greater than or equal to zero. If Buffer is zero, then any buffer currently bound to the specified binding point is unbound.

External documentation.

gl:bindVertexBuffers/4 and gl:vertexArrayVertexBuffers/5 bind storage from an array of existing buffer objects to a specified number of consecutive vertex buffer binding points units in a vertex array object. For gl:bindVertexBuffers/4, the vertex array object is the currently bound vertex array object. For gl:vertexArrayVertexBuffers/5, Vaobj is the name of the vertex array object.

External documentation.

Types

Width = Height = i()
Xorig = Yorig = Xmove = Ymove = f()
Bitmap = offset() | mem()

A bitmap is a binary image. When drawn, the bitmap is positioned relative to the current raster position, and frame buffer pixels corresponding to 1's in the bitmap are written using the current raster color or index. Frame buffer pixels corresponding to 0's in the bitmap are not modified.

External documentation.

The ?GL_BLEND_COLOR may be used to calculate the source and destination blending factors. The color components are clamped to the range [0 1] before being stored. See gl:blendFunc/2 for a complete description of the blending operations. Initially the ?GL_BLEND_COLOR is set to (0, 0, 0, 0).

External documentation.

The blend equations determine how a new pixel (the ''source'' color) is combined with a pixel already in the framebuffer (the ''destination'' color). This function sets both the RGB blend equation and the alpha blend equation to a single equation. gl:blendEquationi/2 specifies the blend equation for a single draw buffer whereas gl:blendEquation/1 sets the blend equation for all draw buffers.

External documentation.

The blend equations determines how a new pixel (the ''source'' color) is combined with a pixel already in the framebuffer (the ''destination'' color). These functions specify one blend equation for the RGB-color components and one blend equation for the alpha component. gl:blendEquationSeparatei/3 specifies the blend equations for a single draw buffer whereas gl:blendEquationSeparate/2 sets the blend equations for all draw buffers.

External documentation.

Pixels can be drawn using a function that blends the incoming (source) RGBA values with the RGBA values that are already in the frame buffer (the destination values). Blending is initially disabled. Use gl:enable/1 and gl:disable/1 with argument ?GL_BLEND to enable and disable blending.

External documentation.

Pixels can be drawn using a function that blends the incoming (source) RGBA values with the RGBA values that are already in the frame buffer (the destination values). Blending is initially disabled. Use gl:enable/1 and gl:disable/1 with argument ?GL_BLEND to enable and disable blending.

External documentation.

Types

SrcX0 = SrcY0 = SrcX1 = SrcY1 = DstX0 = DstY0 = DstX1 = DstY1 = Mask = i()
Filter = enum()

gl:blitFramebuffer/10 and glBlitNamedFramebuffer transfer a rectangle of pixel values from one region of a read framebuffer to another region of a draw framebuffer.

External documentation.

gl:bufferData/4 and glNamedBufferData create a new data store for a buffer object. In case of gl:bufferData/4, the buffer object currently bound to Target is used. For glNamedBufferData, a buffer object associated with ID specified by the caller in Buffer will be used instead.

External documentation.

gl:bufferStorage/4 and glNamedBufferStorage create a new immutable data store. For gl:bufferStorage/4, the buffer object currently bound to Target will be initialized. For glNamedBufferStorage, Buffer is the name of the buffer object that will be configured. The size of the data store is specified by Size. If an initial data is available, its address may be supplied in Data. Otherwise, to create an uninitialized data store, Data should be ?NULL.

External documentation.

gl:bufferSubData/4 and glNamedBufferSubData redefine some or all of the data store for the specified buffer object. Data starting at byte offset Offset and extending for Size bytes is copied to the data store from the memory pointed to by Data. Offset and Size must define a range lying entirely within the buffer object's data store.

External documentation.

gl:callList/1 causes the named display list to be executed. The commands saved in the display list are executed in order, just as if they were called without using a display list. If List has not been defined as a display list, gl:callList/1 is ignored.

External documentation.

gl:callLists/1 causes each display list in the list of names passed as Lists to be executed. As a result, the commands saved in each display list are executed in order, just as if they were called without using a display list. Names of display lists that have not been defined are ignored.

External documentation.

gl:clampColor/2 controls color clamping that is performed during gl:readPixels/7. Target must be ?GL_CLAMP_READ_COLOR. If Clamp is ?GL_TRUE, read color clamping is enabled; if Clamp is ?GL_FALSE, read color clamping is disabled. If Clamp is ?GL_FIXED_ONLY, read color clamping is enabled only if the selected read buffer has fixed point components and disabled otherwise.

External documentation.

These commands clear a specified buffer of a framebuffer to specified value(s). For gl:clearBuffer*(), the framebuffer is the currently bound draw framebuffer object. For glClearNamedFramebuffer*, Framebuffer is zero, indicating the default draw framebuffer, or the name of a framebuffer object.

External documentation.

gl:clearIndex/1 specifies the index used by gl:clear/1 to clear the color index buffers. C is not clamped. Rather, C is converted to a fixed-point value with unspecified precision to the right of the binary point. The integer part of this value is then masked with 2 m-1, where m is the number of bits in a color index stored in the frame buffer.

External documentation.

gl:clearTexImage/5 fills all an image contained in a texture with an application supplied value. Texture must be the name of an existing texture. Further, Texture may not be the name of a buffer texture, nor may its internal format be compressed.

External documentation.

Types

Texture = Level = Xoffset = Yoffset = Zoffset = Width = Height = Depth = i()
Format = Type = enum()
Data = offset() | mem()

gl:clearTexSubImage/11 fills all or part of an image contained in a texture with an application supplied value. Texture must be the name of an existing texture. Further, Texture may not be the name of a buffer texture, nor may its internal format be compressed.

External documentation.

Geometry is always clipped against the boundaries of a six-plane frustum in x, y, and z. gl:clipPlane/2 allows the specification of additional planes, not necessarily perpendicular to the x, y, or z axis, against which all geometry is clipped. To determine the maximum number of additional clipping planes, call gl:getIntegerv/1 with argument ?GL_MAX_CLIP_PLANES. All implementations support at least six such clipping planes. Because the resulting clipping region is the intersection of the defined half-spaces, it is always convex.

External documentation.

The GL stores both a current single-valued color index and a current four-valued RGBA color. gl:color() sets a new four-valued RGBA color. gl:color() has two major variants: gl:color3() and gl:color4(). gl:color3() variants specify new red, green, and blue values explicitly and set the current alpha value to 1.0 (full intensity) implicitly. gl:color4() variants specify all four color components explicitly.

External documentation.

gl:colorMask/4 and gl:colorMaski/5 specify whether the individual color components in the frame buffer can or cannot be written. gl:colorMaski/5 sets the mask for a specific draw buffer, whereas gl:colorMask/4 sets the mask for all draw buffers. If Red is ?GL_FALSE, for example, no change is made to the red component of any pixel in any of the color buffers, regardless of the drawing operation attempted.

External documentation.

gl:colorMaterial/2 specifies which material parameters track the current color. When ?GL_COLOR_MATERIAL is enabled, the material parameter or parameters specified by Mode, of the material or materials specified by Face, track the current color at all times.

External documentation.

gl:colorPointer/4 specifies the location and data format of an array of color components to use when rendering. Size specifies the number of components per color, and must be 3 or 4. Type specifies the data type of each color component, and Stride specifies the byte stride from one color to the next, allowing vertices and attributes to be packed into a single array or stored in separate arrays. (Single-array storage may be more efficient on some implementations; see gl:interleavedArrays/3.)

External documentation.

Types

Target = enum()
Start = Count = i()
Format = Type = enum()
Data = offset() | mem()

gl:colorSubTable/6 is used to respecify a contiguous portion of a color table previously defined using gl:colorTable/6. The pixels referenced by Data replace the portion of the existing table from indices Start to start+count-1, inclusive. This region may not include any entries outside the range of the color table as it was originally specified. It is not an error to specify a subtexture with width of 0, but such a specification has no effect.

External documentation.

Types

Target = Internalformat = enum()
Width = i()
Format = Type = enum()
Table = offset() | mem()

gl:colorTable/6 may be used in two ways: to test the actual size and color resolution of a lookup table given a particular set of parameters, or to load the contents of a color lookup table. Use the targets ?GL_PROXY_* for the first case and the other targets for the second case.

External documentation.

gl:colorTableParameter() is used to specify the scale factors and bias terms applied to color components when they are loaded into a color table. Target indicates which color table the scale and bias terms apply to; it must be set to ?GL_COLOR_TABLE, ?GL_POST_CONVOLUTION_COLOR_TABLE, or ?GL_POST_COLOR_MATRIX_COLOR_TABLE.

External documentation.

Types

Target = enum()
Level = i()
Internalformat = enum()
Width = Border = ImageSize = i()
Data = offset() | mem()

Texturing allows elements of an image array to be read by shaders.

External documentation.

Types

Target = enum()
Level = i()
Internalformat = enum()
Width = Height = Border = ImageSize = i()
Data = offset() | mem()

Texturing allows elements of an image array to be read by shaders.

External documentation.

Types

Target = enum()
Level = i()
Internalformat = enum()
Width = Height = Depth = Border = ImageSize = i()
Data = offset() | mem()

Texturing allows elements of an image array to be read by shaders.

External documentation.

Types

Texture = Level = Xoffset = Width = i()
Format = enum()
ImageSize = i()
Data = offset() | mem()

Texturing allows elements of an image array to be read by shaders.

External documentation.

Types

Texture = Level = Xoffset = Yoffset = Width = Height = i()
Format = enum()
ImageSize = i()
Data = offset() | mem()

Texturing allows elements of an image array to be read by shaders.

External documentation.

Types

Texture = Level = Xoffset = Yoffset = Zoffset = Width = Height = Depth = i()
Format = enum()
ImageSize = i()
Data = offset() | mem()

Texturing allows elements of an image array to be read by shaders.

External documentation.

Types

Target = Internalformat = enum()
Width = i()
Format = Type = enum()
Image = offset() | mem()

gl:convolutionFilter1D/6 builds a one-dimensional convolution filter kernel from an array of pixels.

External documentation.

Types

Target = Internalformat = enum()
Width = Height = i()
Format = Type = enum()
Image = offset() | mem()

gl:convolutionFilter2D/7 builds a two-dimensional convolution filter kernel from an array of pixels.

External documentation.

gl:convolutionParameter() sets the value of a convolution parameter.

External documentation.

Types

ReadTarget = WriteTarget = enum()
ReadOffset = WriteOffset = Size = i()

gl:copyBufferSubData/5 and glCopyNamedBufferSubData copy part of the data store attached to a source buffer object to the data store attached to a destination buffer object. The number of basic machine units indicated by Size is copied from the source at offset ReadOffset to the destination at WriteOffset. ReadOffset, WriteOffset and Size are in terms of basic machine units.

External documentation.

gl:copyColorSubTable/5 is used to respecify a contiguous portion of a color table previously defined using gl:colorTable/6. The pixels copied from the framebuffer replace the portion of the existing table from indices Start to start+x-1, inclusive. This region may not include any entries outside the range of the color table, as was originally specified. It is not an error to specify a subtexture with width of 0, but such a specification has no effect.

External documentation.

gl:copyColorTable/5 loads a color table with pixels from the current ?GL_READ_BUFFER (rather than from main memory, as is the case for gl:colorTable/6).

External documentation.

gl:copyConvolutionFilter1D/5 defines a one-dimensional convolution filter kernel with pixels from the current ?GL_READ_BUFFER (rather than from main memory, as is the case for gl:convolutionFilter1D/6).

External documentation.

gl:copyConvolutionFilter2D/6 defines a two-dimensional convolution filter kernel with pixels from the current ?GL_READ_BUFFER (rather than from main memory, as is the case for gl:convolutionFilter2D/7).

External documentation.

Types

SrcName = i()
SrcTarget = enum()
SrcLevel = SrcX = SrcY = SrcZ = DstName = i()
DstTarget = enum()
DstLevel = DstX = DstY = DstZ = SrcWidth = SrcHeight = SrcDepth = i()

gl:copyImageSubData/15 may be used to copy data from one image (i.e. texture or renderbuffer) to another. gl:copyImageSubData/15 does not perform general-purpose conversions such as scaling, resizing, blending, color-space, or format conversions. It should be considered to operate in a manner similar to a CPU memcpy. CopyImageSubData can copy between images with different internal formats, provided the formats are compatible.

External documentation.

gl:copyPixels/5 copies a screen-aligned rectangle of pixels from the specified frame buffer location to a region relative to the current raster position. Its operation is well defined only if the entire pixel source region is within the exposed portion of the window. Results of copies from outside the window, or from regions of the window that are not exposed, are hardware dependent and undefined.

External documentation.

Types

Target = enum()
Level = i()
Internalformat = enum()
X = Y = Width = Border = i()

gl:copyTexImage1D/7 defines a one-dimensional texture image with pixels from the current ?GL_READ_BUFFER.

External documentation.

Types

Target = enum()
Level = i()
Internalformat = enum()
X = Y = Width = Height = Border = i()

gl:copyTexImage2D/8 defines a two-dimensional texture image, or cube-map texture image with pixels from the current ?GL_READ_BUFFER.

External documentation.

gl:copyTexSubImage1D/6 and glCopyTextureSubImage1D replace a portion of a one-dimensional texture image with pixels from the current ?GL_READ_BUFFER (rather than from main memory, as is the case for gl:texSubImage1D/7). For gl:copyTexSubImage1D/6, the texture object that is bound to Target will be used for the process. For glCopyTextureSubImage1D, Texture tells which texture object should be used for the purpose of the call.

External documentation.

Types

Target = enum()
Level = Xoffset = Yoffset = X = Y = Width = Height = i()

gl:copyTexSubImage2D/8 and glCopyTextureSubImage2D replace a rectangular portion of a two-dimensional texture image, cube-map texture image, rectangular image, or a linear portion of a number of slices of a one-dimensional array texture with pixels from the current ?GL_READ_BUFFER (rather than from main memory, as is the case for gl:texSubImage2D/9).

External documentation.

Types

Target = enum()
Level = Xoffset = Yoffset = Zoffset = X = Y = Width = Height = i()

gl:copyTexSubImage3D/9 and glCopyTextureSubImage3D functions replace a rectangular portion of a three-dimensional or two-dimensional array texture image with pixels from the current ?GL_READ_BUFFER (rather than from main memory, as is the case for gl:texSubImage3D/11).

External documentation.

gl:createProgram/0 creates an empty program object and returns a non-zero value by which it can be referenced. A program object is an object to which shader objects can be attached. This provides a mechanism to specify the shader objects that will be linked to create a program. It also provides a means for checking the compatibility of the shaders that will be used to create a program (for instance, checking the compatibility between a vertex shader and a fragment shader). When no longer needed as part of a program object, shader objects can be detached.

External documentation.

gl:createShader/1 creates an empty shader object and returns a non-zero value by which it can be referenced. A shader object is used to maintain the source code strings that define a shader. ShaderType indicates the type of shader to be created. Five types of shader are supported. A shader of type ?GL_COMPUTE_SHADER is a shader that is intended to run on the programmable compute processor. A shader of type ?GL_VERTEX_SHADER is a shader that is intended to run on the programmable vertex processor. A shader of type ?GL_TESS_CONTROL_SHADER is a shader that is intended to run on the programmable tessellation processor in the control stage. A shader of type ?GL_TESS_EVALUATION_SHADER is a shader that is intended to run on the programmable tessellation processor in the evaluation stage. A shader of type ?GL_GEOMETRY_SHADER is a shader that is intended to run on the programmable geometry processor. A shader of type ?GL_FRAGMENT_SHADER is a shader that is intended to run on the programmable fragment processor.

External documentation.

gl:createShaderProgram() creates a program object containing compiled and linked shaders for a single stage specified by Type. Strings refers to an array of Count strings from which to create the shader executables.

External documentation.

gl:createTextures/2 returns N previously unused texture names in Textures, each representing a new texture object of the dimensionality and type specified by Target and initialized to the default values for that texture type.

External documentation.

gl:cullFace/1 specifies whether front- or back-facing facets are culled (as specified by mode) when facet culling is enabled. Facet culling is initially disabled. To enable and disable facet culling, call the gl:enable/1 and gl:disable/1 commands with the argument ?GL_CULL_FACE. Facets include triangles, quadrilaterals, polygons, and rectangles.

External documentation.

gl:debugMessageControl/5 controls the reporting of debug messages generated by a debug context. The parameters Source, Type and Severity form a filter to select messages from the pool of potential messages generated by the GL.

External documentation.

gl:debugMessageInsert/5 inserts a user-supplied message into the debug output queue. Source specifies the source that will be used to classify the message and must be ?GL_DEBUG_SOURCE_APPLICATION or ?GL_DEBUG_SOURCE_THIRD_PARTY. All other sources are reserved for use by the GL implementation. Type indicates the type of the message to be inserted and may be one of ?GL_DEBUG_TYPE_ERROR, ?GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR, ?GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR, ?GL_DEBUG_TYPE_PORTABILITY, ?GL_DEBUG_TYPE_PERFORMANCE, ?GL_DEBUG_TYPE_MARKER, ?GL_DEBUG_TYPE_PUSH_GROUP, ?GL_DEBUG_TYPE_POP_GROUP, or ?GL_DEBUG_TYPE_OTHER. Severity indicates the severity of the message and may be ?GL_DEBUG_SEVERITY_LOW, ?GL_DEBUG_SEVERITY_MEDIUM, ?GL_DEBUG_SEVERITY_HIGH or ?GL_DEBUG_SEVERITY_NOTIFICATION. Id is available for application defined use and may be any value. This value will be recorded and used to identify the message.

External documentation.

gl:deleteBuffers/1 deletes N buffer objects named by the elements of the array Buffers. After a buffer object is deleted, it has no contents, and its name is free for reuse (for example by gl:genBuffers/1). If a buffer object that is currently bound is deleted, the binding reverts to 0 (the absence of any buffer object).

External documentation.

gl:deleteFramebuffers/1 deletes the N framebuffer objects whose names are stored in the array addressed by Framebuffers. The name zero is reserved by the GL and is silently ignored, should it occur in Framebuffers, as are other unused names. Once a framebuffer object is deleted, its name is again unused and it has no attachments. If a framebuffer that is currently bound to one or more of the targets ?GL_DRAW_FRAMEBUFFER or ?GL_READ_FRAMEBUFFER is deleted, it is as though gl:bindFramebuffer/2 had been executed with the corresponding Target and Framebuffer zero.

External documentation.

gl:deleteLists/2 causes a contiguous group of display lists to be deleted. List is the name of the first display list to be deleted, and Range is the number of display lists to delete. All display lists d with list<= d<= list+range-1 are deleted.

External documentation.

gl:deleteProgramPipelines/1 deletes the N program pipeline objects whose names are stored in the array Pipelines. Unused names in Pipelines are ignored, as is the name zero. After a program pipeline object is deleted, its name is again unused and it has no contents. If program pipeline object that is currently bound is deleted, the binding for that object reverts to zero and no program pipeline object becomes current.

External documentation.

gl:deleteRenderbuffers/1 deletes the N renderbuffer objects whose names are stored in the array addressed by Renderbuffers. The name zero is reserved by the GL and is silently ignored, should it occur in Renderbuffers, as are other unused names. Once a renderbuffer object is deleted, its name is again unused and it has no contents. If a renderbuffer that is currently bound to the target ?GL_RENDERBUFFER is deleted, it is as though gl:bindRenderbuffer/2 had been executed with a Target of ?GL_RENDERBUFFER and a Name of zero.

External documentation.

gl:deleteSamplers/1 deletes N sampler objects named by the elements of the array Samplers. After a sampler object is deleted, its name is again unused. If a sampler object that is currently bound to a sampler unit is deleted, it is as though gl:bindSampler/2 is called with unit set to the unit the sampler is bound to and sampler zero. Unused names in samplers are silently ignored, as is the reserved name zero.

External documentation.

gl:deleteSync/1 deletes the sync object specified by Sync. If the fence command corresponding to the specified sync object has completed, or if no gl:waitSync/3 or gl:clientWaitSync/3 commands are blocking on Sync, the object is deleted immediately. Otherwise, Sync is flagged for deletion and will be deleted when it is no longer associated with any fence command and is no longer blocking any gl:waitSync/3 or gl:clientWaitSync/3 command. In either case, after gl:deleteSync/1 returns, the name Sync is invalid and can no longer be used to refer to the sync object.

External documentation.

gl:deleteTextures/1 deletes N textures named by the elements of the array Textures. After a texture is deleted, it has no contents or dimensionality, and its name is free for reuse (for example by gl:genTextures/1). If a texture that is currently bound is deleted, the binding reverts to 0 (the default texture).

External documentation.

gl:deleteTransformFeedbacks/1 deletes the N transform feedback objects whose names are stored in the array Ids. Unused names in Ids are ignored, as is the name zero. After a transform feedback object is deleted, its name is again unused and it has no contents. If an active transform feedback object is deleted, its name immediately becomes unused, but the underlying object is not deleted until it is no longer active.

External documentation.

gl:deleteVertexArrays/1 deletes N vertex array objects whose names are stored in the array addressed by Arrays. Once a vertex array object is deleted it has no contents and its name is again unused. If a vertex array object that is currently bound is deleted, the binding for that object reverts to zero and the default vertex array becomes current. Unused names in Arrays are silently ignored, as is the value zero.

External documentation.

gl:depthMask/1 specifies whether the depth buffer is enabled for writing. If Flag is ?GL_FALSE, depth buffer writing is disabled. Otherwise, it is enabled. Initially, depth buffer writing is enabled.

External documentation.

After clipping and division by w, depth coordinates range from -1 to 1, corresponding to the near and far clipping planes. gl:depthRange/2 specifies a linear mapping of the normalized depth coordinates in this range to window depth coordinates. Regardless of the actual depth buffer implementation, window coordinate depth values are treated as though they range from 0 through 1 (like color components). Thus, the values accepted by gl:depthRange/2 are both clamped to this range before they are accepted.

External documentation.

After clipping and division by w, depth coordinates range from -1 to 1, corresponding to the near and far clipping planes. Each viewport has an independent depth range specified as a linear mapping of the normalized depth coordinates in this range to window depth coordinates. Regardless of the actual depth buffer implementation, window coordinate depth values are treated as though they range from 0 through 1 (like color components). gl:depthRangeArray() specifies a linear mapping of the normalized depth coordinates in this range to window depth coordinates for each viewport in the range [First, First + Count). Thus, the values accepted by gl:depthRangeArray() are both clamped to this range before they are accepted.

External documentation.

After clipping and division by w, depth coordinates range from -1 to 1, corresponding to the near and far clipping planes. Each viewport has an independent depth range specified as a linear mapping of the normalized depth coordinates in this range to window depth coordinates. Regardless of the actual depth buffer implementation, window coordinate depth values are treated as though they range from 0 through 1 (like color components). gl:depthRangeIndexed/3 specifies a linear mapping of the normalized depth coordinates in this range to window depth coordinates for a specified viewport. Thus, the values accepted by gl:depthRangeIndexed/3 are both clamped to this range before they are accepted.

External documentation.

gl:dispatchCompute/3 launches one or more compute work groups. Each work group is processed by the active program object for the compute shader stage. While the individual shader invocations within a work group are executed as a unit, work groups are executed completely independently and in unspecified order. Num_groups_x, Num_groups_y and Num_groups_z specify the number of local work groups that will be dispatched in the X, Y and Z dimensions, respectively.

External documentation.

gl:dispatchComputeIndirect/1 launches one or more compute work groups using parameters stored in the buffer object currently bound to the ?GL_DISPATCH_INDIRECT_BUFFER target. Each work group is processed by the active program object for the compute shader stage. While the individual shader invocations within a work group are executed as a unit, work groups are executed completely independently and in unspecified order. Indirect contains the offset into the data store of the buffer object bound to the ?GL_DISPATCH_INDIRECT_BUFFER target at which the parameters are stored.

External documentation.

gl:drawArrays/3 specifies multiple geometric primitives with very few subroutine calls. Instead of calling a GL procedure to pass each individual vertex, normal, texture coordinate, edge flag, or color, you can prespecify separate arrays of vertices, normals, and colors and use them to construct a sequence of primitives with a single call to gl:drawArrays/3.

External documentation.

gl:drawArraysInstanced/4 behaves identically to gl:drawArrays/3 except that Instancecount instances of the range of elements are executed and the value of the internal counter InstanceID advances for each iteration. InstanceID is an internal 32-bit integer counter that may be read by a vertex shader as ?gl_InstanceID.

External documentation.

gl:drawArraysInstancedBaseInstance/5 behaves identically to gl:drawArrays/3 except that Instancecount instances of the range of elements are executed and the value of the internal counter InstanceID advances for each iteration. InstanceID is an internal 32-bit integer counter that may be read by a vertex shader as ?gl_InstanceID.

External documentation.

When colors are written to the frame buffer, they are written into the color buffers specified by gl:drawBuffer/1. One of the following values can be used for default framebuffer:

External documentation.

gl:drawBuffers/1 and glNamedFramebufferDrawBuffers define an array of buffers into which outputs from the fragment shader data will be written. If a fragment shader writes a value to one or more user defined output variables, then the value of each variable will be written into the buffer specified at a location within Bufs corresponding to the location assigned to that user defined output. The draw buffer used for user defined outputs assigned to locations greater than or equal to N is implicitly set to ?GL_NONE and any data written to such an output is discarded.

External documentation.

gl:drawElements/4 specifies multiple geometric primitives with very few subroutine calls. Instead of calling a GL function to pass each individual vertex, normal, texture coordinate, edge flag, or color, you can prespecify separate arrays of vertices, normals, and so on, and use them to construct a sequence of primitives with a single call to gl:drawElements/4.

External documentation.

Types

Mode = enum()
Count = i()
Type = enum()
Indices = offset() | mem()
Basevertex = i()

gl:drawElementsBaseVertex/5 behaves identically to gl:drawElements/4 except that the ith element transferred by the corresponding draw call will be taken from element Indices[i] + Basevertex of each enabled array. If the resulting value is larger than the maximum value representable by Type, it is as if the calculation were upconverted to 32-bit unsigned integers (with wrapping on overflow conditions). The operation is undefined if the sum would be negative.

External documentation.

gl:drawElementsIndirect/3 specifies multiple indexed geometric primitives with very few subroutine calls. gl:drawElementsIndirect/3 behaves similarly to gl:drawElementsInstancedBaseVertexBaseInstance/7, execpt that the parameters to gl:drawElementsInstancedBaseVertexBaseInstance/7 are stored in memory at the address given by Indirect.

External documentation.

Types

Mode = enum()
Count = i()
Type = enum()
Indices = offset() | mem()
Instancecount = i()

gl:drawElementsInstanced/5 behaves identically to gl:drawElements/4 except that Instancecount instances of the set of elements are executed and the value of the internal counter InstanceID advances for each iteration. InstanceID is an internal 32-bit integer counter that may be read by a vertex shader as ?gl_InstanceID.

External documentation.

Types

Mode = enum()
Count = i()
Type = enum()
Indices = offset() | mem()
Instancecount = Baseinstance = i()

gl:drawElementsInstancedBaseInstance/6 behaves identically to gl:drawElements/4 except that Instancecount instances of the set of elements are executed and the value of the internal counter InstanceID advances for each iteration. InstanceID is an internal 32-bit integer counter that may be read by a vertex shader as ?gl_InstanceID.

External documentation.

Types

Mode = enum()
Count = i()
Type = enum()
Indices = offset() | mem()
Instancecount = Basevertex = i()

gl:drawElementsInstancedBaseVertex/6 behaves identically to gl:drawElementsInstanced/5 except that the ith element transferred by the corresponding draw call will be taken from element Indices[i] + Basevertex of each enabled array. If the resulting value is larger than the maximum value representable by Type, it is as if the calculation were upconverted to 32-bit unsigned integers (with wrapping on overflow conditions). The operation is undefined if the sum would be negative.

External documentation.

Types

Mode = enum()
Count = i()
Type = enum()
Indices = offset() | mem()
Instancecount = Basevertex = Baseinstance = i()

gl:drawElementsInstancedBaseVertexBaseInstance/7 behaves identically to gl:drawElementsInstanced/5 except that the ith element transferred by the corresponding draw call will be taken from element Indices[i] + Basevertex of each enabled array. If the resulting value is larger than the maximum value representable by Type, it is as if the calculation were upconverted to 32-bit unsigned integers (with wrapping on overflow conditions). The operation is undefined if the sum would be negative.

External documentation.

gl:drawPixels/5 reads pixel data from memory and writes it into the frame buffer relative to the current raster position, provided that the raster position is valid. Use gl:rasterPos() or gl:windowPos() to set the current raster position; use gl:get() with argument ?GL_CURRENT_RASTER_POSITION_VALID to determine if the specified raster position is valid, and gl:get() with argument ?GL_CURRENT_RASTER_POSITION to query the raster position.

External documentation.

Types

Mode = enum()
Start = End = Count = i()
Type = enum()
Indices = offset() | mem()
Basevertex = i()

gl:drawRangeElementsBaseVertex/7 is a restricted form of gl:drawElementsBaseVertex/5. Mode, Count and Basevertex match the corresponding arguments to gl:drawElementsBaseVertex/5, with the additional constraint that all values in the array Indices must lie between Start and End, inclusive, prior to adding Basevertex. Index values lying outside the range [Start, End] are treated in the same way as gl:drawElementsBaseVertex/5. The ith element transferred by the corresponding draw call will be taken from element Indices[i] + Basevertex of each enabled array. If the resulting value is larger than the maximum value representable by Type, it is as if the calculation were upconverted to 32-bit unsigned integers (with wrapping on overflow conditions). The operation is undefined if the sum would be negative.

External documentation.

gl:drawTransformFeedback/2 draws primitives of a type specified by Mode using a count retrieved from the transform feedback specified by Id. Calling gl:drawTransformFeedback/2 is equivalent to calling gl:drawArrays/3 with Mode as specified, First set to zero, and Count set to the number of vertices captured on vertex stream zero the last time transform feedback was active on the transform feedback object named by Id.

External documentation.

gl:drawTransformFeedbackInstanced/3 draws multiple copies of a range of primitives of a type specified by Mode using a count retrieved from the transform feedback stream specified by Stream of the transform feedback object specified by Id. Calling gl:drawTransformFeedbackInstanced/3 is equivalent to calling gl:drawArraysInstanced/4 with Mode and Instancecount as specified, First set to zero, and Count set to the number of vertices captured on vertex stream zero the last time transform feedback was active on the transform feedback object named by Id.

External documentation.

gl:drawTransformFeedbackStream/3 draws primitives of a type specified by Mode using a count retrieved from the transform feedback stream specified by Stream of the transform feedback object specified by Id. Calling gl:drawTransformFeedbackStream/3 is equivalent to calling gl:drawArrays/3 with Mode as specified, First set to zero, and Count set to the number of vertices captured on vertex stream Stream the last time transform feedback was active on the transform feedback object named by Id.

External documentation.

gl:drawTransformFeedbackStreamInstanced/4 draws multiple copies of a range of primitives of a type specified by Mode using a count retrieved from the transform feedback stream specified by Stream of the transform feedback object specified by Id. Calling gl:drawTransformFeedbackStreamInstanced/4 is equivalent to calling gl:drawArraysInstanced/4 with Mode and Instancecount as specified, First set to zero, and Count set to the number of vertices captured on vertex stream Stream the last time transform feedback was active on the transform feedback object named by Id.

External documentation.

Each vertex of a polygon, separate triangle, or separate quadrilateral specified between a gl:'begin'/1/gl:'end'/0 pair is marked as the start of either a boundary or nonboundary edge. If the current edge flag is true when the vertex is specified, the vertex is marked as the start of a boundary edge. Otherwise, the vertex is marked as the start of a nonboundary edge. gl:edgeFlag/1 sets the edge flag bit to ?GL_TRUE if Flag is ?GL_TRUE and to ?GL_FALSE otherwise.

External documentation.

gl:edgeFlagPointer/2 specifies the location and data format of an array of boolean edge flags to use when rendering. Stride specifies the byte stride from one edge flag to the next, allowing vertices and attributes to be packed into a single array or stored in separate arrays.

External documentation.

gl:enable/1 and gl:disable/1 enable and disable various capabilities. Use gl:isEnabled/1 or gl:get() to determine the current setting of any capability. The initial value for each capability with the exception of ?GL_DITHER and ?GL_MULTISAMPLE is ?GL_FALSE. The initial value for ?GL_DITHER and ?GL_MULTISAMPLE is ?GL_TRUE.

External documentation.

gl:enableVertexAttribArray/1 and gl:enableVertexArrayAttrib/2 enable the generic vertex attribute array specified by Index. gl:enableVertexAttribArray/1 uses currently bound vertex array object for the operation, whereas gl:enableVertexArrayAttrib/2 updates state of the vertex array object with ID Vaobj.

External documentation.

gl:evalCoord1() evaluates enabled one-dimensional maps at argument U. gl:evalCoord2() does the same for two-dimensional maps using two domain values, U and V. To define a map, call glMap1 and glMap2; to enable and disable it, call gl:enable/1 and gl:disable/1.

External documentation.

gl:mapGrid() and gl:evalMesh() are used in tandem to efficiently generate and evaluate a series of evenly-spaced map domain values. gl:evalMesh() steps through the integer domain of a one- or two-dimensional grid, whose range is the domain of the evaluation maps specified by glMap1 and glMap2. Mode determines whether the resulting vertices are connected as points, lines, or filled polygons.

External documentation.

The gl:feedbackBuffer/3 function controls feedback. Feedback, like selection, is a GL mode. The mode is selected by calling gl:renderMode/1 with ?GL_FEEDBACK. When the GL is in feedback mode, no pixels are produced by rasterization. Instead, information about primitives that would have been rasterized is fed back to the application using the GL.

External documentation.

gl:fenceSync/2 creates a new fence sync object, inserts a fence command into the GL command stream and associates it with that sync object, and returns a non-zero name corresponding to the sync object.

External documentation.

gl:finish/0 does not return until the effects of all previously called GL commands are complete. Such effects include all changes to GL state, all changes to connection state, and all changes to the frame buffer contents.

External documentation.

Different GL implementations buffer commands in several different locations, including network buffers and the graphics accelerator itself. gl:flush/0 empties all of these buffers, causing all issued commands to be executed as quickly as they are accepted by the actual rendering engine. Though this execution may not be completed in any particular time period, it does complete in finite time.

External documentation.

gl:flushMappedBufferRange/3 indicates that modifications have been made to a range of a mapped buffer object. The buffer object must previously have been mapped with the ?GL_MAP_FLUSH_EXPLICIT_BIT flag.

External documentation.

gl:fogCoord() specifies the fog coordinate that is associated with each vertex and the current raster position. The value specified is interpolated and used in computing the fog color (see gl:fog()).

External documentation.

gl:fogCoordPointer/3 specifies the location and data format of an array of fog coordinates to use when rendering. Type specifies the data type of each fog coordinate, and Stride specifies the byte stride from one fog coordinate to the next, allowing vertices and attributes to be packed into a single array or stored in separate arrays.

External documentation.

gl:framebufferParameteri/3 and glNamedFramebufferParameteri modify the value of the parameter named Pname in the specified framebuffer object. There are no modifiable parameters of the default draw and read framebuffer, so they are not valid targets of these commands.

External documentation.

Types

Target = Attachment = Renderbuffertarget = enum()
Renderbuffer = i()

gl:framebufferRenderbuffer/4 and glNamedFramebufferRenderbuffer attaches a renderbuffer as one of the logical buffers of the specified framebuffer object. Renderbuffers cannot be attached to the default draw and read framebuffer, so they are not valid targets of these commands.

External documentation.

These commands attach a selected mipmap level or image of a texture object as one of the logical buffers of the specified framebuffer object. Textures cannot be attached to the default draw and read framebuffer, so they are not valid targets of these commands.

External documentation.

In a scene composed entirely of opaque closed surfaces, back-facing polygons are never visible. Eliminating these invisible polygons has the obvious benefit of speeding up the rendering of the image. To enable and disable elimination of back-facing polygons, call gl:enable/1 and gl:disable/1 with argument ?GL_CULL_FACE.

External documentation.

gl:frustum/6 describes a perspective matrix that produces a perspective projection. The current matrix (see gl:matrixMode/1) is multiplied by this matrix and the result replaces the current matrix, as if gl:multMatrix() were called with the following matrix as its argument:

External documentation.

gl:genBuffers/1 returns N buffer object names in Buffers. There is no guarantee that the names form a contiguous set of integers; however, it is guaranteed that none of the returned names was in use immediately before the call to gl:genBuffers/1.

External documentation.

gl:genLists/1 has one argument, Range. It returns an integer n such that Range contiguous empty display lists, named n, n+1, ..., n+range-1, are created. If Range is 0, if there is no group of Range contiguous names available, or if any error is generated, no display lists are generated, and 0 is returned.

External documentation.

gl:genQueries/1 returns N query object names in Ids. There is no guarantee that the names form a contiguous set of integers; however, it is guaranteed that none of the returned names was in use immediately before the call to gl:genQueries/1.

External documentation.

gl:genSamplers/1 returns N sampler object names in Samplers. There is no guarantee that the names form a contiguous set of integers; however, it is guaranteed that none of the returned names was in use immediately before the call to gl:genSamplers/1.

External documentation.

These commands return values for simple state variables in GL. Pname is a symbolic constant indicating the state variable to be returned, and Data is a pointer to an array of the indicated type in which to place the returned data.

External documentation.

gl:getActiveAttrib/3 returns information about an active attribute variable in the program object specified by Program. The number of active attributes can be obtained by calling gl:getProgram() with the value ?GL_ACTIVE_ATTRIBUTES. A value of 0 for Index selects the first active attribute variable. Permissible values for Index range from zero to the number of active attribute variables minus one.

External documentation.

gl:getActiveSubroutineName/4 queries the name of an active shader subroutine uniform from the program object given in Program. Index specifies the index of the shader subroutine uniform within the shader stage given by Stage, and must between zero and the value of ?GL_ACTIVE_SUBROUTINES minus one for the shader stage.

External documentation.

gl:getActiveSubroutineUniformName/4 retrieves the name of an active shader subroutine uniform. Program contains the name of the program containing the uniform. Shadertype specifies the stage for which the uniform location, given by Index, is valid. Index must be between zero and the value of ?GL_ACTIVE_SUBROUTINE_UNIFORMS minus one for the shader stage.

External documentation.

gl:getActiveUniform/3 returns information about an active uniform variable in the program object specified by Program. The number of active uniform variables can be obtained by calling gl:getProgram() with the value ?GL_ACTIVE_UNIFORMS. A value of 0 for Index selects the first active uniform variable. Permissible values for Index range from zero to the number of active uniform variables minus one.

External documentation.

gl:getActiveUniformBlockiv/4 retrieves information about an active uniform block within Program.

External documentation.

gl:getActiveUniformBlockName/3 retrieves the name of the active uniform block at UniformBlockIndex within Program.

External documentation.

gl:getActiveUniformName/3 returns the name of the active uniform at UniformIndex within Program. If UniformName is not NULL, up to BufSize characters (including a nul-terminator) will be written into the array whose address is specified by UniformName. If Length is not NULL, the number of characters that were (or would have been) written into UniformName (not including the nul-terminator) will be placed in the variable whose address is specified in Length. If Length is NULL, no length is returned. The length of the longest uniform name in Program is given by the value of ?GL_ACTIVE_UNIFORM_MAX_LENGTH, which can be queried with gl:getProgram().

External documentation.

gl:getActiveUniformsiv/3 queries the value of the parameter named Pname for each of the uniforms within Program whose indices are specified in the array of UniformCount unsigned integers UniformIndices. Upon success, the value of the parameter for each uniform is written into the corresponding entry in the array whose address is given in Params. If an error is generated, nothing is written into Params.

External documentation.

gl:getAttachedShaders/2 returns the names of the shader objects attached to Program. The names of shader objects that are attached to Program will be returned in Shaders. The actual number of shader names written into Shaders is returned in Count. If no shader objects are attached to Program, Count is set to 0. The maximum number of shader names that may be returned in Shaders is specified by MaxCount.

External documentation.

gl:getAttribLocation/2 queries the previously linked program object specified by Program for the attribute variable specified by Name and returns the index of the generic vertex attribute that is bound to that attribute variable. If Name is a matrix attribute variable, the index of the first column of the matrix is returned. If the named attribute variable is not an active attribute in the specified program object or if Name starts with the reserved prefix "gl_", a value of -1 is returned.

External documentation.

These functions return in Data a selected parameter of the specified buffer object.

External documentation.

gl:getBufferSubData/4 and glGetNamedBufferSubData return some or all of the data contents of the data store of the specified buffer object. Data starting at byte offset Offset and extending for Size bytes is copied from the buffer object's data store to the memory pointed to by Data. An error is thrown if the buffer object is currently mapped, or if Offset and Size together define a range beyond the bounds of the buffer object's data store.

External documentation.

gl:getColorTable/4 returns in Table the contents of the color table specified by Target. No pixel transfer operations are performed, but pixel storage modes that are applicable to gl:readPixels/7 are performed.

External documentation.

gl:getCompressedTexImage/3 and glGetnCompressedTexImage return the compressed texture image associated with Target and Lod into Pixels. glGetCompressedTextureImage serves the same purpose, but instead of taking a texture target, it takes the ID of the texture object. Pixels should be an array of BufSize bytes for glGetnCompresedTexImage and glGetCompressedTextureImage functions, and of ?GL_TEXTURE_COMPRESSED_IMAGE_SIZE bytes in case of gl:getCompressedTexImage/3. If the actual data takes less space than BufSize, the remaining bytes will not be touched. Target specifies the texture target, to which the texture the data the function should extract the data from is bound to. Lod specifies the level-of-detail number of the desired image.

External documentation.

gl:getConvolutionFilter/4 returns the current 1D or 2D convolution filter kernel as an image. The one- or two-dimensional image is placed in Image according to the specifications in Format and Type. No pixel transfer operations are performed on this image, but the relevant pixel storage modes are applied.

External documentation.

gl:getDebugMessageLog/2 retrieves messages from the debug message log. A maximum of Count messages are retrieved from the log. If Sources is not NULL then the source of each message is written into up to Count elements of the array. If Types is not NULL then the type of each message is written into up to Count elements of the array. If Id is not NULL then the identifier of each message is written into up to Count elements of the array. If Severities is not NULL then the severity of each message is written into up to Count elements of the array. If Lengths is not NULL then the length of each message is written into up to Count elements of the array.

External documentation.

gl:getError/0 returns the value of the error flag. Each detectable error is assigned a numeric code and symbolic name. When an error occurs, the error flag is set to the appropriate error code value. No other errors are recorded until gl:getError/0 is called, the error code is returned, and the flag is reset to ?GL_NO_ERROR. If a call to gl:getError/0 returns ?GL_NO_ERROR, there has been no detectable error since the last call to gl:getError/0, or since the GL was initialized.

External documentation.

gl:getFragDataIndex/2 returns the index of the fragment color to which the variable Name was bound when the program object Program was last linked. If Name is not a varying out variable of Program, or if an error occurs, -1 will be returned.

External documentation.

gl:getFragDataLocation/2 retrieves the assigned color number binding for the user-defined varying out variable Name for program Program. Program must have previously been linked. Name must be a null-terminated string. If Name is not the name of an active user-defined varying out fragment shader variable within Program, -1 will be returned.

External documentation.

gl:getFramebufferAttachmentParameteriv/3 and glGetNamedFramebufferAttachmentParameteriv return parameters of attachments of a specified framebuffer object.

External documentation.

Certain events can result in a reset of the GL context. Such a reset causes all context state to be lost and requires the application to recreate all objects in the affected context.

External documentation.

gl:getHistogram/5 returns the current histogram table as a one-dimensional image with the same width as the histogram. No pixel transfer operations are performed on this image, but pixel storage modes that are applicable to 1D images are honored.

External documentation.

gl:getHistogramParameter() is used to query parameter values for the current histogram or for a proxy. The histogram state information may be queried by calling gl:getHistogramParameter() with a Target of ?GL_HISTOGRAM (to obtain information for the current histogram table) or ?GL_PROXY_HISTOGRAM (to obtain information from the most recent proxy request) and one of the following values for the Pname argument:

External documentation.

No documentation available.

gl:getLight() returns in Params the value or values of a light source parameter. Light names the light and is a symbolic name of the form ?GL_LIGHT i where i ranges from 0 to the value of ?GL_MAX_LIGHTS - 1. ?GL_MAX_LIGHTS is an implementation dependent constant that is greater than or equal to eight. Pname specifies one of ten light source parameters, again by symbolic name.

External documentation.

gl:getMinmax/5 returns the accumulated minimum and maximum pixel values (computed on a per-component basis) in a one-dimensional image of width 2. The first set of return values are the minima, and the second set of return values are the maxima. The format of the return values is determined by Format, and their type is determined by Types.

External documentation.

gl:getMultisamplefv/2 queries the location of a given sample. Pname specifies the sample parameter to retrieve and must be ?GL_SAMPLE_POSITION. Index corresponds to the sample for which the location should be returned. The sample location is returned as two floating-point values in Val[0] and Val[1], each between 0 and 1, corresponding to the X and Y locations respectively in the GL pixel space of that sample. (0.5, 0.5) this corresponds to the pixel center. Index must be between zero and the value of ?GL_SAMPLES minus one.

External documentation.

See the gl:pixelMap() reference page for a description of the acceptable values for the Map parameter. gl:getPixelMap() returns in Data the contents of the pixel map specified in Map. Pixel maps are used during the execution of gl:readPixels/7, gl:drawPixels/5, gl:copyPixels/5, gl:texImage1D/8, gl:texImage2D/9, gl:texImage3D/10, gl:texSubImage1D/7, gl:texSubImage2D/9, gl:texSubImage3D/11, gl:copyTexImage1D/7, gl:copyTexImage2D/8, gl:copyTexSubImage1D/6, gl:copyTexSubImage2D/8, and gl:copyTexSubImage3D/9. to map color indices, stencil indices, color components, and depth components to other values.

External documentation.

gl:getPolygonStipple/0 returns to Pattern a 32×32 polygon stipple pattern. The pattern is packed into memory as if gl:readPixels/7 with both height and width of 32, type of ?GL_BITMAP, and format of ?GL_COLOR_INDEX were called, and the stipple pattern were stored in an internal 32×32 color index buffer. Unlike gl:readPixels/7, however, pixel transfer operations (shift, offset, pixel map) are not applied to the returned stipple image.

External documentation.

gl:getProgramBinary/2 returns a binary representation of the compiled and linked executable for Program into the array of bytes whose address is specified in Binary. The maximum number of bytes that may be written into Binary is specified by BufSize. If the program binary is greater in size than BufSize bytes, then an error is generated, otherwise the actual number of bytes written into Binary is returned in the variable whose address is given by Length. If Length is ?NULL, then no length is returned.

External documentation.

gl:getProgramInfoLog/2 returns the information log for the specified program object. The information log for a program object is modified when the program object is linked or validated. The string that is returned will be null terminated.

External documentation.

gl:getProgramInterfaceiv/3 queries the property of the interface identifed by ProgramInterface in Program, the property name of which is given by Pname.

External documentation.

gl:getProgramPipelineiv/2 retrieves the value of a property of the program pipeline object Pipeline. Pname specifies the name of the parameter whose value to retrieve. The value of the parameter is written to the variable whose address is given by Params.

External documentation.

gl:getProgramPipelineInfoLog/2 retrieves the info log for the program pipeline object Pipeline. The info log, including its null terminator, is written into the array of characters whose address is given by InfoLog. The maximum number of characters that may be written into InfoLog is given by BufSize, and the actual number of characters written into InfoLog is returned in the integer whose address is given by Length. If Length is ?NULL, no length is returned.

External documentation.

gl:getProgramResourceIndex/3 returns the unsigned integer index assigned to a resource named Name in the interface type ProgramInterface of program object Program.

External documentation.

gl:getProgramResourceLocation/3 returns the location assigned to the variable named Name in interface ProgramInterface of program object Program. Program must be the name of a program that has been linked successfully. ProgramInterface must be one of ?GL_UNIFORM, ?GL_PROGRAM_INPUT, ?GL_PROGRAM_OUTPUT, ?GL_VERTEX_SUBROUTINE_UNIFORM, ?GL_TESS_CONTROL_SUBROUTINE_UNIFORM, ?GL_TESS_EVALUATION_SUBROUTINE_UNIFORM, ?GL_GEOMETRY_SUBROUTINE_UNIFORM, ?GL_FRAGMENT_SUBROUTINE_UNIFORM, ?GL_COMPUTE_SUBROUTINE_UNIFORM, or ?GL_TRANSFORM_FEEDBACK_BUFFER.

External documentation.

gl:getProgramResourceLocationIndex/3 returns the fragment color index assigned to the variable named Name in interface ProgramInterface of program object Program. Program must be the name of a program that has been linked successfully. ProgramInterface must be ?GL_PROGRAM_OUTPUT.

External documentation.

gl:getProgramResourceName/4 retrieves the name string assigned to the single active resource with an index of Index in the interface ProgramInterface of program object Program. Index must be less than the number of entries in the active resource list for ProgramInterface.

External documentation.

gl:getProgramStage() queries a parameter of a shader stage attached to a program object. Program contains the name of the program to which the shader is attached. Shadertype specifies the stage from which to query the parameter. Pname specifies which parameter should be queried. The value or values of the parameter to be queried is returned in the variable whose address is given in Values.

External documentation.

gl:getQueryIndexediv/3 returns in Params a selected parameter of the indexed query object target specified by Target and Index. Index specifies the index of the query object target and must be between zero and a target-specific maxiumum.

External documentation.

These commands return a selected parameter of the query object specified by Id. gl:getQueryObject() returns in Params a selected parameter of the query object specified by Id. gl:getQueryBufferObject() returns in Buffer a selected parameter of the query object specified by Id, by writing it to Buffer's data store at the byte offset specified by Offset.

External documentation.

gl:getSamplerParameter() returns in Params the value or values of the sampler parameter specified as Pname. Sampler defines the target sampler, and must be the name of an existing sampler object, returned from a previous call to gl:genSamplers/1. Pname accepts the same symbols as gl:samplerParameter(), with the same interpretations:

External documentation.

gl:getShaderInfoLog/2 returns the information log for the specified shader object. The information log for a shader object is modified when the shader is compiled. The string that is returned will be null terminated.

External documentation.

gl:getShaderPrecisionFormat/2 retrieves the numeric range and precision for the implementation's representation of quantities in different numeric formats in specified shader type. ShaderType specifies the type of shader for which the numeric precision and range is to be retrieved and must be one of ?GL_VERTEX_SHADER or ?GL_FRAGMENT_SHADER. PrecisionType specifies the numeric format to query and must be one of ?GL_LOW_FLOAT, ?GL_MEDIUM_FLOAT?GL_HIGH_FLOAT, ?GL_LOW_INT, ?GL_MEDIUM_INT, or ?GL_HIGH_INT.

External documentation.

gl:getSubroutineIndex/3 returns the index of a subroutine uniform within a shader stage attached to a program object. Program contains the name of the program to which the shader is attached. Shadertype specifies the stage from which to query shader subroutine index. Name contains the null-terminated name of the subroutine uniform whose name to query.

External documentation.

gl:getSubroutineUniformLocation/3 returns the location of the subroutine uniform variable Name in the shader stage of type Shadertype attached to Program, with behavior otherwise identical to gl:getUniformLocation/2.

External documentation.

gl:getTexGen() returns in Params selected parameters of a texture coordinate generation function that was specified using gl:texGen(). Coord names one of the (s, t, r, q) texture coordinates, using the symbolic constant ?GL_S, ?GL_T, ?GL_R, or ?GL_Q.

External documentation.

gl:getTexImage/5, glGetnTexImage and glGetTextureImage functions return a texture image into Pixels. For gl:getTexImage/5 and glGetnTexImage, Target specifies whether the desired texture image is one specified by gl:texImage1D/8 (?GL_TEXTURE_1D), gl:texImage2D/9 (?GL_TEXTURE_1D_ARRAY, ?GL_TEXTURE_RECTANGLE, ?GL_TEXTURE_2D or any of ?GL_TEXTURE_CUBE_MAP_*), or gl:texImage3D/10 (?GL_TEXTURE_2D_ARRAY, ?GL_TEXTURE_3D, ?GL_TEXTURE_CUBE_MAP_ARRAY). For glGetTextureImage, Texture specifies the texture object name. In addition to types of textures accepted by gl:getTexImage/5 and glGetnTexImage, the function also accepts cube map texture objects (with effective target ?GL_TEXTURE_CUBE_MAP). Level specifies the level-of-detail number of the desired image. Format and Type specify the format and type of the desired image array. See the reference page for gl:texImage1D/8 for a description of the acceptable values for the Format and Type parameters, respectively. For glGetnTexImage and glGetTextureImage functions, bufSize tells the size of the buffer to receive the retrieved pixel data. glGetnTexImage and glGetTextureImage do not write more than BufSize bytes into Pixels.

External documentation.

gl:getTexLevelParameterfv/3, gl:getTexLevelParameteriv/3, glGetTextureLevelParameterfv and glGetTextureLevelParameteriv return in Params texture parameter values for a specific level-of-detail value, specified as Level. For the first two functions, Target defines the target texture, either ?GL_TEXTURE_1D, ?GL_TEXTURE_2D, ?GL_TEXTURE_3D, ?GL_PROXY_TEXTURE_1D, ?GL_PROXY_TEXTURE_2D, ?GL_PROXY_TEXTURE_3D, ?GL_TEXTURE_CUBE_MAP_POSITIVE_X, ?GL_TEXTURE_CUBE_MAP_NEGATIVE_X, ?GL_TEXTURE_CUBE_MAP_POSITIVE_Y, ?GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, ?GL_TEXTURE_CUBE_MAP_POSITIVE_Z, ?GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, or ?GL_PROXY_TEXTURE_CUBE_MAP. The remaining two take a Texture argument which specifies the name of the texture object.

External documentation.

gl:getTexParameter() and glGetTextureParameter return in Params the value or values of the texture parameter specified as Pname. Target defines the target texture. ?GL_TEXTURE_1D, ?GL_TEXTURE_2D, ?GL_TEXTURE_3D, ?GL_TEXTURE_1D_ARRAY, ?GL_TEXTURE_2D_ARRAY, ?GL_TEXTURE_RECTANGLE, ?GL_TEXTURE_CUBE_MAP, ?GL_TEXTURE_CUBE_MAP_ARRAY, ?GL_TEXTURE_2D_MULTISAMPLE, or ?GL_TEXTURE_2D_MULTISAMPLE_ARRAY specify one-, two-, or three-dimensional, one-dimensional array, two-dimensional array, rectangle, cube-mapped or cube-mapped array, two-dimensional multisample, or two-dimensional multisample array texturing, respectively. Pname accepts the same symbols as gl:texParameter(), with the same interpretations:

External documentation.

Information about the set of varying variables in a linked program that will be captured during transform feedback may be retrieved by calling gl:getTransformFeedbackVarying/3. gl:getTransformFeedbackVarying/3 provides information about the varying variable selected by Index. An Index of 0 selects the first varying variable specified in the Varyings array passed to gl:transformFeedbackVaryings/3, and an Index of the value of ?GL_TRANSFORM_FEEDBACK_VARYINGS minus one selects the last such variable.

External documentation.

gl:getUniform() and glGetnUniform return in Params the value(s) of the specified uniform variable. The type of the uniform variable specified by Location determines the number of values returned. If the uniform variable is defined in the shader as a boolean, int, or float, a single value will be returned. If it is defined as a vec2, ivec2, or bvec2, two values will be returned. If it is defined as a vec3, ivec3, or bvec3, three values will be returned, and so on. To query values stored in uniform variables declared as arrays, call gl:getUniform() for each element of the array. To query values stored in uniform variables declared as structures, call gl:getUniform() for each field in the structure. The values for uniform variables declared as a matrix will be returned in column major order.

External documentation.

glGetUniformLocation returns an integer that represents the location of a specific uniform variable within a program object. Name must be a null terminated string that contains no white space. Name must be an active uniform variable name in Program that is not a structure, an array of structures, or a subcomponent of a vector or a matrix. This function returns -1 if Name does not correspond to an active uniform variable in Program, if Name starts with the reserved prefix "gl_", or if Name is associated with an atomic counter or a named uniform block.

External documentation.

gl:getUniformSubroutine() retrieves the value of the subroutine uniform at location Location for shader stage Shadertype of the current program. Location must be less than the value of ?GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS for the shader currently in use at shader stage Shadertype. The value of the subroutine uniform is returned in Values.

External documentation.

gl:getVertexAttrib() returns in Params the value of a generic vertex attribute parameter. The generic vertex attribute to be queried is specified by Index, and the parameter to be queried is specified by Pname.

External documentation.

Certain aspects of GL behavior, when there is room for interpretation, can be controlled with hints. A hint is specified with two arguments. Target is a symbolic constant indicating the behavior to be controlled, and Mode is another symbolic constant indicating the desired behavior. The initial value for each Target is ?GL_DONT_CARE. Mode can be one of the following:

External documentation.

When ?GL_HISTOGRAM is enabled, RGBA color components are converted to histogram table indices by clamping to the range [0,1], multiplying by the width of the histogram table, and rounding to the nearest integer. The table entries selected by the RGBA indices are then incremented. (If the internal format of the histogram table includes luminance, then the index derived from the R color component determines the luminance table entry to be incremented.) If a histogram table entry is incremented beyond its maximum value, then its value becomes undefined. (This is not an error.)

External documentation.

gl:index() updates the current (single-valued) color index. It takes one argument, the new value for the current color index.

External documentation.

gl:indexMask/1 controls the writing of individual bits in the color index buffers. The least significant n bits of Mask, where n is the number of bits in a color index buffer, specify a mask. Where a 1 (one) appears in the mask, it's possible to write to the corresponding bit in the color index buffer (or buffers). Where a 0 (zero) appears, the corresponding bit is write-protected.

External documentation.

gl:indexPointer/3 specifies the location and data format of an array of color indexes to use when rendering. Type specifies the data type of each color index and Stride specifies the byte stride from one color index to the next, allowing vertices and attributes to be packed into a single array or stored in separate arrays.

External documentation.

The name stack is used during selection mode to allow sets of rendering commands to be uniquely identified. It consists of an ordered set of unsigned integers. gl:initNames/0 causes the name stack to be initialized to its default empty state.

External documentation.

gl:interleavedArrays/3 lets you specify and enable individual color, normal, texture and vertex arrays whose elements are part of a larger aggregate array element. For some implementations, this is more efficient than specifying the arrays separately.

External documentation.

gl:invalidateBufferSubData/3 invalidates all or part of the content of the data store of a buffer object. After invalidation, the content of the specified range of the buffer's data store becomes undefined. The start of the range is given by Offset and its size is given by Length, both measured in basic machine units.

External documentation.

gl:invalidateSubFramebuffer/6 and glInvalidateNamedFramebufferSubData invalidate the contents of a specified region of a specified set of attachments of a framebuffer.

External documentation.

gl:invalidateTexSubImage/8 invalidates all of a texture image. Texture and Level indicated which texture image is being invalidated. After this command, data in the texture image has undefined values.

External documentation.

Types

Texture = Level = Xoffset = Yoffset = Zoffset = Width = Height = Depth = i()

gl:invalidateTexSubImage/8 invalidates all or part of a texture image. Texture and Level indicated which texture image is being invalidated. After this command, data in that subregion have undefined values. Xoffset, Yoffset, Zoffset, Width, Height, and Depth are interpreted as they are in gl:texSubImage3D/11. For texture targets that don't have certain dimensions, this command treats those dimensions as having a size of 1. For example, to invalidate a portion of a two- dimensional texture, the application would use Zoffset equal to zero and Depth equal to one. Cube map textures are treated as an array of six slices in the z-dimension, where a value of Zoffset is interpreted as specifying face ?GL_TEXTURE_CUBE_MAP_POSITIVE_X + Zoffset.

External documentation.

gl:isBuffer/1 returns ?GL_TRUE if Buffer is currently the name of a buffer object. If Buffer is zero, or is a non-zero value that is not currently the name of a buffer object, or if an error occurs, gl:isBuffer/1 returns ?GL_FALSE.

External documentation.

gl:isEnabled/1 returns ?GL_TRUE if Cap is an enabled capability and returns ?GL_FALSE otherwise. Boolean states that are indexed may be tested with gl:isEnabledi/2. For gl:isEnabledi/2, Index specifies the index of the capability to test. Index must be between zero and the count of indexed capabilities for Cap. Initially all capabilities except ?GL_DITHER are disabled; ?GL_DITHER is initially enabled.

External documentation.

gl:isFramebuffer/1 returns ?GL_TRUE if Framebuffer is currently the name of a framebuffer object. If Framebuffer is zero, or if ?framebuffer is not the name of a framebuffer object, or if an error occurs, gl:isFramebuffer/1 returns ?GL_FALSE. If Framebuffer is a name returned by gl:genFramebuffers/1, by that has not yet been bound through a call to gl:bindFramebuffer/2, then the name is not a framebuffer object and gl:isFramebuffer/1 returns ?GL_FALSE.

External documentation.

gl:isProgramPipeline/1 returns ?GL_TRUE if Pipeline is currently the name of a program pipeline object. If Pipeline is zero, or if ?pipeline is not the name of a program pipeline object, or if an error occurs, gl:isProgramPipeline/1 returns ?GL_FALSE. If Pipeline is a name returned by gl:genProgramPipelines/1, but that has not yet been bound through a call to gl:bindProgramPipeline/1, then the name is not a program pipeline object and gl:isProgramPipeline/1 returns ?GL_FALSE.

External documentation.

gl:isQuery/1 returns ?GL_TRUE if Id is currently the name of a query object. If Id is zero, or is a non-zero value that is not currently the name of a query object, or if an error occurs, gl:isQuery/1 returns ?GL_FALSE.

External documentation.

gl:isRenderbuffer/1 returns ?GL_TRUE if Renderbuffer is currently the name of a renderbuffer object. If Renderbuffer is zero, or if Renderbuffer is not the name of a renderbuffer object, or if an error occurs, gl:isRenderbuffer/1 returns ?GL_FALSE. If Renderbuffer is a name returned by gl:genRenderbuffers/1, by that has not yet been bound through a call to gl:bindRenderbuffer/2 or gl:framebufferRenderbuffer/4, then the name is not a renderbuffer object and gl:isRenderbuffer/1 returns ?GL_FALSE.

External documentation.

gl:isSampler/1 returns ?GL_TRUE if Id is currently the name of a sampler object. If Id is zero, or is a non-zero value that is not currently the name of a sampler object, or if an error occurs, gl:isSampler/1 returns ?GL_FALSE.

External documentation.

gl:isSync/1 returns ?GL_TRUE if Sync is currently the name of a sync object. If Sync is not the name of a sync object, or if an error occurs, gl:isSync/1 returns ?GL_FALSE. Note that zero is not the name of a sync object.

External documentation.

gl:isTexture/1 returns ?GL_TRUE if Texture is currently the name of a texture. If Texture is zero, or is a non-zero value that is not currently the name of a texture, or if an error occurs, gl:isTexture/1 returns ?GL_FALSE.

External documentation.

gl:isTransformFeedback/1 returns ?GL_TRUE if Id is currently the name of a transform feedback object. If Id is zero, or if ?id is not the name of a transform feedback object, or if an error occurs, gl:isTransformFeedback/1 returns ?GL_FALSE. If Id is a name returned by gl:genTransformFeedbacks/1, but that has not yet been bound through a call to gl:bindTransformFeedback/2, then the name is not a transform feedback object and gl:isTransformFeedback/1 returns ?GL_FALSE.

External documentation.

gl:light() sets the values of individual light source parameters. Light names the light and is a symbolic name of the form ?GL_LIGHT i, where i ranges from 0 to the value of ?GL_MAX_LIGHTS - 1. Pname specifies one of ten light source parameters, again by symbolic name. Params is either a single value or a pointer to an array that contains the new values.

External documentation.

Line stippling masks out certain fragments produced by rasterization; those fragments will not be drawn. The masking is achieved by using three parameters: the 16-bit line stipple pattern Pattern, the repeat count Factor, and an integer stipple counter s.

External documentation.

gl:lineWidth/1 specifies the rasterized width of both aliased and antialiased lines. Using a line width other than 1 has different effects, depending on whether line antialiasing is enabled. To enable and disable line antialiasing, call gl:enable/1 and gl:disable/1 with argument ?GL_LINE_SMOOTH. Line antialiasing is initially disabled.

External documentation.

gl:linkProgram/1 links the program object specified by Program. If any shader objects of type ?GL_VERTEX_SHADER are attached to Program, they will be used to create an executable that will run on the programmable vertex processor. If any shader objects of type ?GL_GEOMETRY_SHADER are attached to Program, they will be used to create an executable that will run on the programmable geometry processor. If any shader objects of type ?GL_FRAGMENT_SHADER are attached to Program, they will be used to create an executable that will run on the programmable fragment processor.

External documentation.

gl:callLists/1 specifies an array of offsets. Display-list names are generated by adding Base to each offset. Names that reference valid display lists are executed; the others are ignored.

External documentation.

The name stack is used during selection mode to allow sets of rendering commands to be uniquely identified. It consists of an ordered set of unsigned integers and is initially empty.

External documentation.

gl:logicOp/1 specifies a logical operation that, when enabled, is applied between the incoming RGBA color and the RGBA color at the corresponding location in the frame buffer. To enable or disable the logical operation, call gl:enable/1 and gl:disable/1 using the symbolic constant ?GL_COLOR_LOGIC_OP. The initial value is disabled.

External documentation.

Evaluators provide a way to use polynomial or rational polynomial mapping to produce vertices, normals, texture coordinates, and colors. The values produced by an evaluator are sent to further stages of GL processing just as if they had been presented using gl:vertex(), gl:normal(), gl:texCoord(), and gl:color() commands, except that the generated values do not update the current normal, texture coordinates, or color.

External documentation.

Types

Target = enum()
U1 = U2 = f()
Ustride = Uorder = i()
V1 = V2 = f()
Vstride = Vorder = i()
Points = binary()

Evaluators provide a way to use polynomial or rational polynomial mapping to produce vertices, normals, texture coordinates, and colors. The values produced by an evaluator are sent on to further stages of GL processing just as if they had been presented using gl:vertex(), gl:normal(), gl:texCoord(), and gl:color() commands, except that the generated values do not update the current normal, texture coordinates, or color.

External documentation.

gl:mapGrid() and gl:evalMesh() are used together to efficiently generate and evaluate a series of evenly-spaced map domain values. gl:evalMesh() steps through the integer domain of a one- or two-dimensional grid, whose range is the domain of the evaluation maps specified by glMap1 and glMap2.

External documentation.

gl:material() assigns values to material parameters. There are two matched sets of material parameters. One, the front-facing set, is used to shade points, lines, bitmaps, and all polygons (when two-sided lighting is disabled), or just front-facing polygons (when two-sided lighting is enabled). The other set, back-facing, is used to shade back-facing polygons only when two-sided lighting is enabled. Refer to the gl:lightModel() reference page for details concerning one- and two-sided lighting calculations.

External documentation.

gl:memoryBarrier/1 defines a barrier ordering the memory transactions issued prior to the command relative to those issued after the barrier. For the purposes of this ordering, memory transactions performed by shaders are considered to be issued by the rendering command that triggered the execution of the shader. Barriers is a bitfield indicating the set of operations that are synchronized with shader stores; the bits used in Barriers are as follows:

External documentation.

gl:minSampleShading/1 specifies the rate at which samples are shaded within a covered pixel. Sample-rate shading is enabled by calling gl:enable/1 with the parameter ?GL_SAMPLE_SHADING. If ?GL_MULTISAMPLE or ?GL_SAMPLE_SHADING is disabled, sample shading has no effect. Otherwise, an implementation must provide at least as many unique color values for each covered fragment as specified by Value times Samples where Samples is the value of ?GL_SAMPLES for the current framebuffer. At least 1 sample for each covered fragment is generated.

External documentation.

When ?GL_MINMAX is enabled, the RGBA components of incoming pixels are compared to the minimum and maximum values for each component, which are stored in the two-element minmax table. (The first element stores the minima, and the second element stores the maxima.) If a pixel component is greater than the corresponding component in the maximum element, then the maximum element is updated with the pixel component value. If a pixel component is less than the corresponding component in the minimum element, then the minimum element is updated with the pixel component value. (In both cases, if the internal format of the minmax table includes luminance, then the R color component of incoming pixels is used for comparison.) The contents of the minmax table may be retrieved at a later time by calling gl:getMinmax/5. The minmax operation is enabled or disabled by calling gl:enable/1 or gl:disable/1, respectively, with an argument of ?GL_MINMAX.

External documentation.

gl:multiDrawArrays/3 specifies multiple sets of geometric primitives with very few subroutine calls. Instead of calling a GL procedure to pass each individual vertex, normal, texture coordinate, edge flag, or color, you can prespecify separate arrays of vertices, normals, and colors and use them to construct a sequence of primitives with a single call to gl:multiDrawArrays/3.

External documentation.

gl:multiDrawArraysIndirect/4 specifies multiple geometric primitives with very few subroutine calls. gl:multiDrawArraysIndirect/4 behaves similarly to a multitude of calls to gl:drawArraysInstancedBaseInstance/5, execept that the parameters to each call to gl:drawArraysInstancedBaseInstance/5 are stored in an array in memory at the address given by Indirect, separated by the stride, in basic machine units, specified by Stride. If Stride is zero, then the array is assumed to be tightly packed in memory.

External documentation.

Types

Mode = enum()
Indirect = offset() | mem()
Drawcount = Maxdrawcount = Stride = i()

No documentation available.

gl:multiTexCoord() specifies texture coordinates in one, two, three, or four dimensions. gl:multiTexCoord1() sets the current texture coordinates to (s 0 0 1); a call to gl:multiTexCoord2() sets them to (s t 0 1). Similarly, gl:multiTexCoord3() specifies the texture coordinates as (s t r 1), and gl:multiTexCoord4() defines all four components explicitly as (s t r q).

External documentation.

Display lists are groups of GL commands that have been stored for subsequent execution. Display lists are created with gl:newList/2. All subsequent commands are placed in the display list, in the order issued, until gl:endList/0 is called.

External documentation.

The current normal is set to the given coordinates whenever gl:normal() is issued. Byte, short, or integer arguments are converted to floating-point format with a linear mapping that maps the most positive representable integer value to 1.0 and the most negative representable integer value to -1.0.

External documentation.

gl:normalPointer/3 specifies the location and data format of an array of normals to use when rendering. Type specifies the data type of each normal coordinate, and Stride specifies the byte stride from one normal to the next, allowing vertices and attributes to be packed into a single array or stored in separate arrays. (Single-array storage may be more efficient on some implementations; see gl:interleavedArrays/3.)

External documentation.

gl:ortho/6 describes a transformation that produces a parallel projection. The current matrix (see gl:matrixMode/1) is multiplied by this matrix and the result replaces the current matrix, as if gl:multMatrix() were called with the following matrix as its argument:

External documentation.

gl:patchParameter() specifies the parameters that will be used for patch primitives. Pname specifies the parameter to modify and must be either ?GL_PATCH_VERTICES, ?GL_PATCH_DEFAULT_OUTER_LEVEL or ?GL_PATCH_DEFAULT_INNER_LEVEL. For gl:patchParameteri/2, Value specifies the new value for the parameter specified by Pname. For gl:patchParameterfv/2, Values specifies the address of an array containing the new values for the parameter specified by Pname.

External documentation.

gl:pauseTransformFeedback/0 pauses transform feedback operations on the currently active transform feedback object. When transform feedback operations are paused, transform feedback is still considered active and changing most transform feedback state related to the object results in an error. However, a new transform feedback object may be bound while transform feedback is paused.

External documentation.

gl:pixelMap() sets up translation tables, or maps, used by gl:copyPixels/5, gl:copyTexImage1D/7, gl:copyTexImage2D/8, gl:copyTexSubImage1D/6, gl:copyTexSubImage2D/8, gl:copyTexSubImage3D/9, gl:drawPixels/5, gl:readPixels/7, gl:texImage1D/8, gl:texImage2D/9, gl:texImage3D/10, gl:texSubImage1D/7, gl:texSubImage2D/9, and gl:texSubImage3D/11. Additionally, if the ARB_imaging subset is supported, the routines gl:colorTable/6, gl:colorSubTable/6, gl:convolutionFilter1D/6, gl:convolutionFilter2D/7, gl:histogram/4, gl:minmax/3, and gl:separableFilter2D/8. Use of these maps is described completely in the gl:pixelTransfer() reference page, and partly in the reference pages for the pixel and texture image commands. Only the specification of the maps is described in this reference page.

External documentation.

gl:pixelTransfer() sets pixel transfer modes that affect the operation of subsequent gl:copyPixels/5, gl:copyTexImage1D/7, gl:copyTexImage2D/8, gl:copyTexSubImage1D/6, gl:copyTexSubImage2D/8, gl:copyTexSubImage3D/9, gl:drawPixels/5, gl:readPixels/7, gl:texImage1D/8, gl:texImage2D/9, gl:texImage3D/10, gl:texSubImage1D/7, gl:texSubImage2D/9, and gl:texSubImage3D/11 commands. Additionally, if the ARB_imaging subset is supported, the routines gl:colorTable/6, gl:colorSubTable/6, gl:convolutionFilter1D/6, gl:convolutionFilter2D/7, gl:histogram/4, gl:minmax/3, and gl:separableFilter2D/8 are also affected. The algorithms that are specified by pixel transfer modes operate on pixels after they are read from the frame buffer (gl:copyPixels/5gl:copyTexImage1D/7, gl:copyTexImage2D/8, gl:copyTexSubImage1D/6, gl:copyTexSubImage2D/8, gl:copyTexSubImage3D/9, and gl:readPixels/7), or unpacked from client memory (gl:drawPixels/5, gl:texImage1D/8, gl:texImage2D/9, gl:texImage3D/10, gl:texSubImage1D/7, gl:texSubImage2D/9, and gl:texSubImage3D/11). Pixel transfer operations happen in the same order, and in the same manner, regardless of the command that resulted in the pixel operation. Pixel storage modes (see gl:pixelStore()) control the unpacking of pixels being read from client memory and the packing of pixels being written back into client memory.

External documentation.

gl:pixelZoom/2 specifies values for the x and y zoom factors. During the execution of gl:drawPixels/5 or gl:copyPixels/5, if ( xr, yr) is the current raster position, and a given element is in the mth row and nth column of the pixel rectangle, then pixels whose centers are in the rectangle with corners at

External documentation.

gl:pointSize/1 specifies the rasterized diameter of points. If point size mode is disabled (see gl:enable/1 with parameter ?GL_PROGRAM_POINT_SIZE), this value will be used to rasterize points. Otherwise, the value written to the shading language built-in variable gl_PointSize will be used.

External documentation.

gl:polygonMode/2 controls the interpretation of polygons for rasterization. Face describes which polygons Mode applies to: both front and back-facing polygons (?GL_FRONT_AND_BACK). The polygon mode affects only the final rasterization of polygons. In particular, a polygon's vertices are lit and the polygon is clipped and possibly culled before these modes are applied.

External documentation.

When ?GL_POLYGON_OFFSET_FILL, ?GL_POLYGON_OFFSET_LINE, or ?GL_POLYGON_OFFSET_POINT is enabled, each fragment's depth value will be offset after it is interpolated from the depth values of the appropriate vertices. The value of the offset is factor×DZ+r×units, where DZ is a measurement of the change in depth relative to the screen area of the polygon, and r is the smallest value that is guaranteed to produce a resolvable offset for a given implementation. The offset is added before the depth test is performed and before the value is written into the depth buffer.

External documentation.

No documentation available.

Polygon stippling, like line stippling (see gl:lineStipple/2), masks out certain fragments produced by rasterization, creating a pattern. Stippling is independent of polygon antialiasing.

External documentation.

gl:programBinary/3 loads a program object with a program binary previously returned from gl:getProgramBinary/2. BinaryFormat and Binary must be those returned by a previous call to gl:getProgramBinary/2, and Length must be the length returned by gl:getProgramBinary/2, or by gl:getProgram() when called with Pname set to ?GL_PROGRAM_BINARY_LENGTH. If these conditions are not met, loading the program binary will fail and Program's ?GL_LINK_STATUS will be set to ?GL_FALSE.

External documentation.

Types

Program = Location = i()
Transpose = 0 | 1
Value =
    [{f(), f(), f(), f(), f(), f(), f(), f(), f(), f(), f(), f()}]

gl:programUniform() modifies the value of a uniform variable or a uniform variable array. The location of the uniform variable to be modified is specified by Location, which should be a value returned by gl:getUniformLocation/2. gl:programUniform() operates on the program object specified by Program.

External documentation.

Flatshading a vertex shader varying output means to assign all vetices of the primitive the same value for that output. The vertex from which these values is derived is known as the provoking vertex and gl:provokingVertex/1 specifies which vertex is to be used as the source of data for flat shaded varyings.

External documentation.

gl:pushAttrib/1 takes one argument, a mask that indicates which groups of state variables to save on the attribute stack. Symbolic constants are used to set bits in the mask. Mask is typically constructed by specifying the bitwise-or of several of these constants together. The special mask ?GL_ALL_ATTRIB_BITS can be used to save all stackable states.

External documentation.

gl:pushClientAttrib/1 takes one argument, a mask that indicates which groups of client-state variables to save on the client attribute stack. Symbolic constants are used to set bits in the mask. Mask is typically constructed by specifying the bitwise-or of several of these constants together. The special mask ?GL_CLIENT_ALL_ATTRIB_BITS can be used to save all stackable client state.

External documentation.

gl:pushDebugGroup/4 pushes a debug group described by the string Message into the command stream. The value of Id specifies the ID of messages generated. The parameter Length contains the number of characters in Message. If Length is negative, it is implied that Message contains a null terminated string. The message has the specified Source and Id, the Type?GL_DEBUG_TYPE_PUSH_GROUP, and Severity?GL_DEBUG_SEVERITY_NOTIFICATION. The GL will put a new debug group on top of the debug group stack which inherits the control of the volume of debug output of the debug group previously residing on the top of the debug group stack. Because debug groups are strictly hierarchical, any additional control of the debug output volume will only apply within the active debug group and the debug groups pushed on top of the active debug group.

External documentation.

There is a stack of matrices for each of the matrix modes. In ?GL_MODELVIEW mode, the stack depth is at least 32. In the other modes, ?GL_COLOR, ?GL_PROJECTION, and ?GL_TEXTURE, the depth is at least 2. The current matrix in any mode is the matrix on the top of the stack for that mode.

External documentation.

The name stack is used during selection mode to allow sets of rendering commands to be uniquely identified. It consists of an ordered set of unsigned integers and is initially empty.

External documentation.

gl:queryCounter/2 causes the GL to record the current time into the query object named Id. Target must be ?GL_TIMESTAMP. The time is recorded after all previous commands on the GL client and server state and the framebuffer have been fully realized. When the time is recorded, the query result for that object is marked available. gl:queryCounter/2 timer queries can be used within a gl:beginQuery/2 / gl:endQuery/1 block where the target is ?GL_TIME_ELAPSED and it does not affect the result of that query object.

External documentation.

The GL maintains a 3D position in window coordinates. This position, called the raster position, is used to position pixel and bitmap write operations. It is maintained with subpixel accuracy. See gl:bitmap/7, gl:drawPixels/5, and gl:copyPixels/5.

External documentation.

gl:readBuffer/1 specifies a color buffer as the source for subsequent gl:readPixels/7, gl:copyTexImage1D/7, gl:copyTexImage2D/8, gl:copyTexSubImage1D/6, gl:copyTexSubImage2D/8, and gl:copyTexSubImage3D/9 commands. Mode accepts one of twelve or more predefined values. In a fully configured system, ?GL_FRONT, ?GL_LEFT, and ?GL_FRONT_LEFT all name the front left buffer, ?GL_FRONT_RIGHT and ?GL_RIGHT name the front right buffer, and ?GL_BACK_LEFT and ?GL_BACK name the back left buffer. Further more, the constants ?GL_COLOR_ATTACHMENTi may be used to indicate the ith color attachment where i ranges from zero to the value of ?GL_MAX_COLOR_ATTACHMENTS minus one.

External documentation.

Types

X = Y = Width = Height = i()
Format = Type = enum()
Pixels = mem()

gl:readPixels/7 and glReadnPixels return pixel data from the frame buffer, starting with the pixel whose lower left corner is at location (X, Y), into client memory starting at location Data. Several parameters control the processing of the pixel data before it is placed into client memory. These parameters are set with gl:pixelStore(). This reference page describes the effects on gl:readPixels/7 and glReadnPixels of most, but not all of the parameters specified by these three commands.

External documentation.

gl:rect() supports efficient specification of rectangles as two corner points. Each rectangle command takes four arguments, organized either as two consecutive pairs of (x y) coordinates or as two pointers to arrays, each containing an (x y) pair. The resulting rectangle is defined in the z=0 plane.

External documentation.

gl:renderbufferStorage/4 is equivalent to calling gl:renderbufferStorageMultisample/5 with the Samples set to zero, and glNamedRenderbufferStorage is equivalent to calling glNamedRenderbufferStorageMultisample with the samples set to zero.

External documentation.

gl:renderbufferStorageMultisample/5 and glNamedRenderbufferStorageMultisample establish the data storage, format, dimensions and number of samples of a renderbuffer object's image.

External documentation.

gl:resetMinmax/1 resets the elements of the current minmax table to their initial values: the ``maximum'' element receives the minimum possible component values, and the ``minimum'' element receives the maximum possible component values.

External documentation.

gl:resumeTransformFeedback/0 resumes transform feedback operations on the currently active transform feedback object. When transform feedback operations are paused, transform feedback is still considered active and changing most transform feedback state related to the object results in an error. However, a new transform feedback object may be bound while transform feedback is paused.

External documentation.

Multisampling samples a pixel multiple times at various implementation-dependent subpixel locations to generate antialiasing effects. Multisampling transparently antialiases points, lines, polygons, and images if it is enabled.

External documentation.

gl:samplerParameter() assigns the value or values in Params to the sampler parameter specified as Pname. Sampler specifies the sampler object to be modified, and must be the name of a sampler object previously returned from a call to gl:genSamplers/1. The following symbols are accepted in Pname:

External documentation.

gl:scale() produces a nonuniform scaling along the x, y, and z axes. The three parameters indicate the desired scale factor along each of the three axes.

External documentation.

gl:scissor/4 defines a rectangle, called the scissor box, in window coordinates. The first two arguments, X and Y, specify the lower left corner of the box. Width and Height specify the width and height of the box.

External documentation.

gl:scissorArrayv/2 defines rectangles, called scissor boxes, in window coordinates for each viewport. First specifies the index of the first scissor box to modify and Count specifies the number of scissor boxes to modify. First must be less than the value of ?GL_MAX_VIEWPORTS, and First + Count must be less than or equal to the value of ?GL_MAX_VIEWPORTS. V specifies the address of an array containing integers specifying the lower left corner of the scissor boxes, and the width and height of the scissor boxes, in that order.

External documentation.

gl:scissorIndexed/5 defines the scissor box for a specified viewport. Index specifies the index of scissor box to modify. Index must be less than the value of ?GL_MAX_VIEWPORTS. For gl:scissorIndexed/5, Left, Bottom, Width and Height specify the left, bottom, width and height of the scissor box, in pixels, respectively. For gl:scissorIndexedv/2, V specifies the address of an array containing integers specifying the lower left corner of the scissor box, and the width and height of the scissor box, in that order.

External documentation.

The GL stores both a primary four-valued RGBA color and a secondary four-valued RGBA color (where alpha is always set to 0.0) that is associated with every vertex.

External documentation.

gl:secondaryColorPointer/4 specifies the location and data format of an array of color components to use when rendering. Size specifies the number of components per color, and must be 3. Type specifies the data type of each color component, and Stride specifies the byte stride from one color to the next, allowing vertices and attributes to be packed into a single array or stored in separate arrays.

External documentation.

Types

Target = Internalformat = enum()
Width = Height = i()
Format = Type = enum()
Row = Column = offset() | mem()

gl:separableFilter2D/8 builds a two-dimensional separable convolution filter kernel from two arrays of pixels.

External documentation.

GL primitives can have either flat or smooth shading. Smooth shading, the default, causes the computed colors of vertices to be interpolated as the primitive is rasterized, typically assigning different colors to each resulting pixel fragment. Flat shading selects the computed color of just one vertex and assigns it to all the pixel fragments generated by rasterizing a single primitive. In either case, the computed color of a vertex is the result of lighting if lighting is enabled, or it is the current color at the time the vertex was specified if lighting is disabled.

External documentation.

gl:shaderBinary/3 loads pre-compiled shader binary code into the Count shader objects whose handles are given in Shaders. Binary points to Length bytes of binary shader code stored in client memory. BinaryFormat specifies the format of the pre-compiled code.

External documentation.

gl:shaderSource/2 sets the source code in Shader to the source code in the array of strings specified by String. Any source code previously stored in the shader object is completely replaced. The number of strings in the array is specified by Count. If Length is ?NULL, each string is assumed to be null terminated. If Length is a value other than ?NULL, it points to an array containing a string length for each of the corresponding elements of String. Each element in the Length array may contain the length of the corresponding string (the null character is not counted as part of the string length) or a value less than 0 to indicate that the string is null terminated. The source code strings are not scanned or parsed at this time; they are simply copied into the specified shader object.

External documentation.

gl:shaderStorageBlockBinding/3, changes the active shader storage block with an assigned index of StorageBlockIndex in program object Program. StorageBlockIndex must be an active shader storage block index in Program. StorageBlockBinding must be less than the value of ?GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS. If successful, gl:shaderStorageBlockBinding/3 specifies that Program will use the data store of the buffer object bound to the binding point StorageBlockBinding to read and write the values of the buffer variables in the shader storage block identified by StorageBlockIndex.

External documentation.

Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis. Stencil planes are first drawn into using GL drawing primitives, then geometry and images are rendered using the stencil planes to mask out portions of the screen. Stenciling is typically used in multipass rendering algorithms to achieve special effects, such as decals, outlining, and constructive solid geometry rendering.

External documentation.

Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis. You draw into the stencil planes using GL drawing primitives, then render geometry and images, using the stencil planes to mask out portions of the screen. Stenciling is typically used in multipass rendering algorithms to achieve special effects, such as decals, outlining, and constructive solid geometry rendering.

External documentation.

gl:stencilMask/1 controls the writing of individual bits in the stencil planes. The least significant n bits of Mask, where n is the number of bits in the stencil buffer, specify a mask. Where a 1 appears in the mask, it's possible to write to the corresponding bit in the stencil buffer. Where a 0 appears, the corresponding bit is write-protected. Initially, all bits are enabled for writing.

External documentation.

gl:stencilMaskSeparate/2 controls the writing of individual bits in the stencil planes. The least significant n bits of Mask, where n is the number of bits in the stencil buffer, specify a mask. Where a 1 appears in the mask, it's possible to write to the corresponding bit in the stencil buffer. Where a 0 appears, the corresponding bit is write-protected. Initially, all bits are enabled for writing.

External documentation.

Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis. You draw into the stencil planes using GL drawing primitives, then render geometry and images, using the stencil planes to mask out portions of the screen. Stenciling is typically used in multipass rendering algorithms to achieve special effects, such as decals, outlining, and constructive solid geometry rendering.

External documentation.

Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis. You draw into the stencil planes using GL drawing primitives, then render geometry and images, using the stencil planes to mask out portions of the screen. Stenciling is typically used in multipass rendering algorithms to achieve special effects, such as decals, outlining, and constructive solid geometry rendering.

External documentation.

gl:texBuffer/3 and gl:textureBuffer/3 attaches the data store of a specified buffer object to a specified texture object, and specify the storage format for the texture image found in the buffer object. The texture object must be a buffer texture.

External documentation.

gl:texBufferRange/5 and gl:textureBufferRange/5 attach a range of the data store of a specified buffer object to a specified texture object, and specify the storage format for the texture image found in the buffer object. The texture object must be a buffer texture.

External documentation.

gl:texCoord() specifies texture coordinates in one, two, three, or four dimensions. gl:texCoord1() sets the current texture coordinates to (s 0 0 1); a call to gl:texCoord2() sets them to (s t 0 1). Similarly, gl:texCoord3() specifies the texture coordinates as (s t r 1), and gl:texCoord4() defines all four components explicitly as (s t r q).

External documentation.

gl:texCoordPointer/4 specifies the location and data format of an array of texture coordinates to use when rendering. Size specifies the number of coordinates per texture coordinate set, and must be 1, 2, 3, or 4. Type specifies the data type of each texture coordinate, and Stride specifies the byte stride from one texture coordinate set to the next, allowing vertices and attributes to be packed into a single array or stored in separate arrays. (Single-array storage may be more efficient on some implementations; see gl:interleavedArrays/3.)

External documentation.

A texture environment specifies how texture values are interpreted when a fragment is textured. When Target is ?GL_TEXTURE_FILTER_CONTROL, Pname must be ?GL_TEXTURE_LOD_BIAS. When Target is ?GL_TEXTURE_ENV, Pname can be ?GL_TEXTURE_ENV_MODE, ?GL_TEXTURE_ENV_COLOR, ?GL_COMBINE_RGB, ?GL_COMBINE_ALPHA, ?GL_RGB_SCALE, ?GL_ALPHA_SCALE, ?GL_SRC0_RGB, ?GL_SRC1_RGB, ?GL_SRC2_RGB, ?GL_SRC0_ALPHA, ?GL_SRC1_ALPHA, or ?GL_SRC2_ALPHA.

External documentation.

gl:texGen() selects a texture-coordinate generation function or supplies coefficients for one of the functions. Coord names one of the (s, t, r, q) texture coordinates; it must be one of the symbols ?GL_S, ?GL_T, ?GL_R, or ?GL_Q. Pname must be one of three symbolic constants: ?GL_TEXTURE_GEN_MODE, ?GL_OBJECT_PLANE, or ?GL_EYE_PLANE. If Pname is ?GL_TEXTURE_GEN_MODE, then Params chooses a mode, one of ?GL_OBJECT_LINEAR, ?GL_EYE_LINEAR, ?GL_SPHERE_MAP, ?GL_NORMAL_MAP, or ?GL_REFLECTION_MAP. If Pname is either ?GL_OBJECT_PLANE or ?GL_EYE_PLANE, Params contains coefficients for the corresponding texture generation function.

External documentation.

Types

Target = enum()
Level = InternalFormat = Width = Border = i()
Format = Type = enum()
Pixels = offset() | mem()

Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled. To enable and disable one-dimensional texturing, call gl:enable/1 and gl:disable/1 with argument ?GL_TEXTURE_1D.

External documentation.

Types

Target = enum()
Level = InternalFormat = Width = Height = Border = i()
Format = Type = enum()
Pixels = offset() | mem()

Texturing allows elements of an image array to be read by shaders.

External documentation.

Types

Target = enum()
Samples = i()
Internalformat = enum()
Width = Height = i()
Fixedsamplelocations = 0 | 1

gl:texImage2DMultisample/6 establishes the data storage, format, dimensions and number of samples of a multisample texture's image.

External documentation.

Types

Target = enum()
Level = InternalFormat = Width = Height = Depth = Border = i()
Format = Type = enum()
Pixels = offset() | mem()

Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled. To enable and disable three-dimensional texturing, call gl:enable/1 and gl:disable/1 with argument ?GL_TEXTURE_3D.

External documentation.

Types

Target = enum()
Samples = i()
Internalformat = enum()
Width = Height = Depth = i()
Fixedsamplelocations = 0 | 1

gl:texImage3DMultisample/7 establishes the data storage, format, dimensions and number of samples of a multisample texture's image.

External documentation.

gl:texParameter() and gl:textureParameter() assign the value or values in Params to the texture parameter specified as Pname. For gl:texParameter(), Target defines the target texture, either ?GL_TEXTURE_1D, ?GL_TEXTURE_1D_ARRAY, ?GL_TEXTURE_2D, ?GL_TEXTURE_2D_ARRAY, ?GL_TEXTURE_2D_MULTISAMPLE, ?GL_TEXTURE_2D_MULTISAMPLE_ARRAY, ?GL_TEXTURE_3D, ?GL_TEXTURE_CUBE_MAP, ?GL_TEXTURE_CUBE_MAP_ARRAY, or ?GL_TEXTURE_RECTANGLE. The following symbols are accepted in Pname:

External documentation.

gl:texStorage1D/4 and gl:textureStorage1D() specify the storage requirements for all levels of a one-dimensional texture simultaneously. Once a texture is specified with this command, the format and dimensions of all levels become immutable unless it is a proxy texture. The contents of the image may still be modified, however, its storage requirements may not change. Such a texture is referred to as an immutable-format texture.

External documentation.

gl:texStorage2D/5 and gl:textureStorage2D() specify the storage requirements for all levels of a two-dimensional texture or one-dimensional texture array simultaneously. Once a texture is specified with this command, the format and dimensions of all levels become immutable unless it is a proxy texture. The contents of the image may still be modified, however, its storage requirements may not change. Such a texture is referred to as an immutable-format texture.

External documentation.

Types

Target = enum()
Samples = i()
Internalformat = enum()
Width = Height = i()
Fixedsamplelocations = 0 | 1

gl:texStorage2DMultisample/6 and gl:textureStorage2DMultisample() specify the storage requirements for a two-dimensional multisample texture. Once a texture is specified with this command, its format and dimensions become immutable unless it is a proxy texture. The contents of the image may still be modified, however, its storage requirements may not change. Such a texture is referred to as an immutable-format texture.

External documentation.

Types

Target = enum()
Levels = i()
Internalformat = enum()
Width = Height = Depth = i()

gl:texStorage3D/6 and gl:textureStorage3D() specify the storage requirements for all levels of a three-dimensional, two-dimensional array or cube-map array texture simultaneously. Once a texture is specified with this command, the format and dimensions of all levels become immutable unless it is a proxy texture. The contents of the image may still be modified, however, its storage requirements may not change. Such a texture is referred to as an immutable-format texture.

External documentation.

Types

Target = enum()
Samples = i()
Internalformat = enum()
Width = Height = Depth = i()
Fixedsamplelocations = 0 | 1

gl:texStorage3DMultisample/7 and gl:textureStorage3DMultisample() specify the storage requirements for a two-dimensional multisample array texture. Once a texture is specified with this command, its format and dimensions become immutable unless it is a proxy texture. The contents of the image may still be modified, however, its storage requirements may not change. Such a texture is referred to as an immutable-format texture.

External documentation.

Types

Target = enum()
Level = Xoffset = Width = i()
Format = Type = enum()
Pixels = offset() | mem()

Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled. To enable or disable one-dimensional texturing, call gl:enable/1 and gl:disable/1 with argument ?GL_TEXTURE_1D.

External documentation.

Types

Target = enum()
Level = Xoffset = Yoffset = Width = Height = i()
Format = Type = enum()
Pixels = offset() | mem()

Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled.

External documentation.

Types

Target = enum()
Level = Xoffset = Yoffset = Zoffset = Width = Height = Depth = i()
Format = Type = enum()
Pixels = offset() | mem()

Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled.

External documentation.

The values of rendered fragments are undefined when a shader stage fetches texels and the same texels are written via fragment shader outputs, even if the reads and writes are not in the same drawing command. To safely read the result of a written texel via a texel fetch in a subsequent drawing command, call gl:textureBarrier/0 between the two drawing commands to guarantee that writes have completed and caches have been invalidated before subsequent drawing commands are executed.

External documentation.

Types

Texture = i()
Target = enum()
Origtexture = i()
Internalformat = enum()
Minlevel = Numlevels = Minlayer = Numlayers = i()

gl:textureView/8 initializes a texture object as an alias, or view of another texture object, sharing some or all of the parent texture's data store with the initialized texture. Texture specifies a name previously reserved by a successful call to gl:genTextures/1 but that has not yet been bound or given a target. Target specifies the target for the newly initialized texture and must be compatible with the target of the parent texture, given in Origtexture as specified in the following table:

External documentation.

gl:transformFeedbackBufferBase/3 binds the buffer object Buffer to the binding point at index Index of the transform feedback object Xfb.

External documentation.

gl:transformFeedbackBufferRange/5 binds a range of the buffer object Buffer represented by Offset and Size to the binding point at index Index of the transform feedback object Xfb.

External documentation.

The names of the vertex or geometry shader outputs to be recorded in transform feedback mode are specified using gl:transformFeedbackVaryings/3. When a geometry shader is active, transform feedback records the values of selected geometry shader output variables from the emitted vertices. Otherwise, the values of the selected vertex shader outputs are recorded.

External documentation.

Types

Location = i()
Transpose = 0 | 1
Value =
    [{f(), f(), f(), f(), f(), f(), f(), f(), f(), f(), f(), f()}]

gl:uniform() modifies the value of a uniform variable or a uniform variable array. The location of the uniform variable to be modified is specified by Location, which should be a value returned by gl:getUniformLocation/2. gl:uniform() operates on the program object that was made part of current state by calling gl:useProgram/1.

External documentation.

Binding points for active uniform blocks are assigned using gl:uniformBlockBinding/3. Each of a program's active uniform blocks has a corresponding uniform buffer binding point. Program is the name of a program object for which the command gl:linkProgram/1 has been issued in the past.

External documentation.

gl:uniformSubroutines() loads all active subroutine uniforms for shader stage Shadertype of the current program with subroutine indices from Indices, storing Indices[i] into the uniform at location I. Count must be equal to the value of ?GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS for the program currently in use at shader stage Shadertype. Furthermore, all values in Indices must be less than the value of ?GL_ACTIVE_SUBROUTINES for the shader stage.

External documentation.

gl:useProgramStages/3 binds executables from a program object associated with a specified set of shader stages to the program pipeline object given by Pipeline. Pipeline specifies the program pipeline object to which to bind the executables. Stages contains a logical combination of bits indicating the shader stages to use within Program with the program pipeline object Pipeline. Stages must be a logical combination of ?GL_VERTEX_SHADER_BIT, ?GL_TESS_CONTROL_SHADER_BIT, ?GL_TESS_EVALUATION_SHADER_BIT, ?GL_GEOMETRY_SHADER_BIT, ?GL_FRAGMENT_SHADER_BIT and ?GL_COMPUTE_SHADER_BIT. Additionally, the special value ?GL_ALL_SHADER_BITS may be specified to indicate that all executables contained in Program should be installed in Pipeline.

External documentation.

gl:validateProgram/1 checks to see whether the executables contained in Program can execute given the current OpenGL state. The information generated by the validation process will be stored in Program's information log. The validation information may consist of an empty string, or it may be a string containing information about how the current program object interacts with the rest of current OpenGL state. This provides a way for OpenGL implementers to convey more information about why the current program is inefficient, suboptimal, failing to execute, and so on.

External documentation.

gl:validateProgramPipeline/1 instructs the implementation to validate the shader executables contained in Pipeline against the current GL state. The implementation may use this as an opportunity to perform any internal shader modifications that may be required to ensure correct operation of the installed shaders given the current GL state.

External documentation.

gl:vertex() commands are used within gl:'begin'/1/gl:'end'/0 pairs to specify point, line, and polygon vertices. The current color, normal, texture coordinates, and fog coordinate are associated with the vertex when gl:vertex() is called.

External documentation.

gl:vertexArrayElementBuffer/2 binds a buffer object with id Buffer to the element array buffer bind point of a vertex array object with id Vaobj. If Buffer is zero, any existing element array buffer binding to Vaobj is removed.

External documentation.

The gl:vertexAttrib() family of entry points allows an application to pass generic vertex attributes in numbered locations.

External documentation.

gl:vertexAttribBinding/2 and gl:vertexArrayAttribBinding/3 establishes an association between the generic vertex attribute of a vertex array object whose index is given by Attribindex, and a vertex buffer binding whose index is given by Bindingindex. For gl:vertexAttribBinding/2, the vertex array object affected is that currently bound. For gl:vertexArrayAttribBinding/3, Vaobj is the name of the vertex array object.

External documentation.

gl:vertexAttribDivisor/2 modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives in a single draw call. If Divisor is zero, the attribute at slot Index advances once per vertex. If Divisor is non-zero, the attribute advances once per Divisor instances of the set(s) of vertices being rendered. An attribute is referred to as instanced if its ?GL_VERTEX_ATTRIB_ARRAY_DIVISOR value is non-zero.

External documentation.

gl:vertexAttribFormat/5, gl:vertexAttribIFormat/4 and gl:vertexAttribLFormat/4, as well as gl:vertexArrayAttribFormat/6, gl:vertexArrayAttribIFormat/5 and gl:vertexArrayAttribLFormat/5 specify the organization of data in vertex arrays. The first three calls operate on the bound vertex array object, whereas the last three ones modify the state of a vertex array object with ID Vaobj. Attribindex specifies the index of the generic vertex attribute array whose data layout is being described, and must be less than the value of ?GL_MAX_VERTEX_ATTRIBS.

External documentation.

Types

Index = Size = i()
Type = enum()
Normalized = 0 | 1
Stride = i()
Pointer = offset() | mem()

gl:vertexAttribPointer/6, gl:vertexAttribIPointer/5 and gl:vertexAttribLPointer/5 specify the location and data format of the array of generic vertex attributes at index Index to use when rendering. Size specifies the number of components per attribute and must be 1, 2, 3, 4, or ?GL_BGRA. Type specifies the data type of each component, and Stride specifies the byte stride from one attribute to the next, allowing vertices and attributes to be packed into a single array or stored in separate arrays.

External documentation.

gl:vertexBindingDivisor/2 and gl:vertexArrayBindingDivisor/3 modify the rate at which generic vertex attributes advance when rendering multiple instances of primitives in a single draw command. If Divisor is zero, the attributes using the buffer bound to Bindingindex advance once per vertex. If Divisor is non-zero, the attributes advance once per Divisor instances of the set(s) of vertices being rendered. An attribute is referred to as instanced if the corresponding Divisor value is non-zero.

External documentation.

gl:vertexPointer/4 specifies the location and data format of an array of vertex coordinates to use when rendering. Size specifies the number of coordinates per vertex, and must be 2, 3, or 4. Type specifies the data type of each coordinate, and Stride specifies the byte stride from one vertex to the next, allowing vertices and attributes to be packed into a single array or stored in separate arrays. (Single-array storage may be more efficient on some implementations; see gl:interleavedArrays/3.)

External documentation.

gl:viewport/4 specifies the affine transformation of x and y from normalized device coordinates to window coordinates. Let (x nd y nd) be normalized device coordinates. Then the window coordinates (x w y w) are computed as follows:

External documentation.

gl:viewportArrayv/2 specifies the parameters for multiple viewports simulataneously. First specifies the index of the first viewport to modify and Count specifies the number of viewports to modify. First must be less than the value of ?GL_MAX_VIEWPORTS, and First + Count must be less than or equal to the value of ?GL_MAX_VIEWPORTS. Viewports whose indices lie outside the range [First, First + Count) are not modified. V contains the address of an array of floating point values specifying the left ( x), bottom ( y), width ( w), and height ( h) of each viewport, in that order. x and y give the location of the viewport's lower left corner, and w and h give the width and height of the viewport, respectively. The viewport specifies the affine transformation of x and y from normalized device coordinates to window coordinates. Let (x nd y nd) be normalized device coordinates. Then the window coordinates (x w y w) are computed as follows:

External documentation.

gl:viewportIndexedf/5 and gl:viewportIndexedfv/2 specify the parameters for a single viewport. Index specifies the index of the viewport to modify. Index must be less than the value of ?GL_MAX_VIEWPORTS. For gl:viewportIndexedf/5, X, Y, W, and H specify the left, bottom, width and height of the viewport in pixels, respectively. For gl:viewportIndexedfv/2, V contains the address of an array of floating point values specifying the left ( x), bottom ( y), width ( w), and height ( h) of each viewport, in that order. x and y give the location of the viewport's lower left corner, and w and h give the width and height of the viewport, respectively. The viewport specifies the affine transformation of x and y from normalized device coordinates to window coordinates. Let (x nd y nd) be normalized device coordinates. Then the window coordinates (x w y w) are computed as follows:

External documentation.

gl:waitSync/3 causes the GL server to block and wait until Sync becomes signaled. Sync is the name of an existing sync object upon which to wait. Flags and Timeout are currently not used and must be set to zero and the special value ?GL_TIMEOUT_IGNORED, respectively

Flags and Timeout are placeholders for anticipated future extensions of sync object capabilities. They must have these reserved values in order that existing code calling gl:waitSync/3 operate properly in the presence of such extensions.

External documentation.

The GL maintains a 3D position in window coordinates. This position, called the raster position, is used to position pixel and bitmap write operations. It is maintained with subpixel accuracy. See gl:bitmap/7, gl:drawPixels/5, and gl:copyPixels/5.

External documentation.