wxErlang

Reference Manual

Version 2.0.1

Table of Contents

gl

Module

gl

Module Summary

Erlang wrapper functions for OpenGL

Description

Standard OpenGL API

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

Data Types

clamp() = float()
offset() = integer() >= 0
i() = integer()
f() = float()
enum() = integer() >= 0
m12() =
    {f(), f(), f(), f(), f(), f(), f(), f(), f(), f(), f(), f()}

m16() =
    {f(),
     f(),
     f(),
     f(),
     f(),
     f(),
     f(),
     f(),
     f(),
     f(),
     f(),
     f(),
     f(),
     f(),
     f(),
     f()}

mem() = binary() | tuple()
accum(Op :: enum(), Value :: f()) -> ok

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.

activeShaderProgram(Pipeline :: i(), Program :: i()) -> ok

gl:activeShaderProgram/2 sets the linked program named by Program to be the active program for the program pipeline object Pipeline. The active program in the active program pipeline object is the target of calls to gl:uniform() when no program has been made current through a call to gl:useProgram/1.

External documentation.

activeTexture(Texture :: enum()) -> ok

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.

alphaFunc(Func :: enum(), Ref :: clamp()) -> ok

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.

areTexturesResident(Textures :: [i()]) ->
                       {0 | 1, Residences :: [0 | 1]}

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.

arrayElement(I :: i()) -> ok

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.

attachObjectARB(ContainerObj :: i(), Obj :: i()) -> ok

No documentation available.

attachShader(Program :: i(), Shader :: i()) -> ok

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.

'begin'(Mode :: enum()) -> ok
'end'() -> ok

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.

beginConditionalRender(Id :: i(), Mode :: enum()) -> ok
endConditionalRender() -> ok

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.

endList() -> ok

No documentation available.

beginQuery(Target :: enum(), Id :: i()) -> ok
endQuery(Target :: enum()) -> ok

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.

beginQueryIndexed(Target :: enum(), Index :: i(), Id :: i()) -> ok

No documentation available.

endQueryIndexed(Target :: enum(), Index :: i()) -> ok

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.

beginTransformFeedback(PrimitiveMode :: enum()) -> ok
endTransformFeedback() -> ok

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.

bindAttribLocation(Program :: i(), Index :: i(), Name :: string()) ->
                      ok

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.

bindAttribLocationARB(ProgramObj :: i(),
                      Index :: i(),
                      Name :: string()) ->
                         ok

No documentation available.

bindBuffer(Target :: enum(), Buffer :: i()) -> ok

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.

bindBufferBase(Target :: enum(), Index :: i(), Buffer :: i()) ->
                  ok

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.

bindBufferRange(Target :: enum(),
                Index :: i(),
                Buffer :: i(),
                Offset :: i(),
                Size :: i()) ->
                   ok

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.

bindBuffersBase(Target :: enum(), First :: i(), Buffers :: [i()]) ->
                   ok

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.

bindBuffersRange(Target :: enum(),
                 First :: i(),
                 Buffers :: [i()],
                 Offsets :: [i()],
                 Sizes :: [i()]) ->
                    ok

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.

bindFragDataLocation(Program :: i(),
                     Color :: i(),
                     Name :: string()) ->
                        ok

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.

bindFragDataLocationIndexed(Program :: i(),
                            ColorNumber :: i(),
                            Index :: i(),
                            Name :: string()) ->
                               ok

No documentation available.

bindFramebuffer(Target :: enum(), Framebuffer :: i()) -> ok

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.

bindImageTexture(Unit, Texture, Level, Layered, Layer, Access,
                 Format) ->
                    ok

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.

bindImageTextures(First :: i(), Textures :: [i()]) -> ok

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.

bindProgramARB(Target :: enum(), Program :: i()) -> ok

No documentation available.

bindProgramPipeline(Pipeline :: i()) -> ok

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.

bindRenderbuffer(Target :: enum(), Renderbuffer :: i()) -> ok

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.

bindSampler(Unit :: i(), Sampler :: i()) -> ok

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.

bindSamplers(First :: i(), Samplers :: [i()]) -> ok

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.

bindTexture(Target :: enum(), Texture :: i()) -> ok

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.

bindTextureUnit(Unit :: i(), Texture :: i()) -> ok

gl:bindTextureUnit/2 binds an existing texture object to the texture unit numbered Unit.

External documentation.

bindTextures(First :: i(), Textures :: [i()]) -> ok

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.

bindTransformFeedback(Target :: enum(), Id :: i()) -> ok

gl:bindTransformFeedback/2 binds the transform feedback object with name Id to the current GL state. Id must be a name previously returned from a call to gl:genTransformFeedbacks/1. If Id has not previously been bound, a new transform feedback object with name Id and initialized with the default transform state vector is created.

External documentation.

bindVertexArray(Array :: i()) -> ok

gl:bindVertexArray/1 binds the vertex array object with name Array. Array is the name of a vertex array object previously returned from a call to gl:genVertexArrays/1, or zero to break the existing vertex array object binding.

External documentation.

bindVertexBuffer(Bindingindex :: i(),
                 Buffer :: i(),
                 Offset :: i(),
                 Stride :: i()) ->
                    ok

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.

bindVertexBuffers(First :: i(),
                  Buffers :: [i()],
                  Offsets :: [i()],
                  Strides :: [i()]) ->
                     ok

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.

bitmap(Width, Height, Xorig, Yorig, Xmove, Ymove, Bitmap) -> ok

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.

blendBarrierKHR() -> ok

No documentation available.

blendColor(Red :: clamp(),
           Green :: clamp(),
           Blue :: clamp(),
           Alpha :: clamp()) ->
              ok

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.

blendEquation(Mode :: enum()) -> ok
blendEquationi(Buf :: i(), Mode :: enum()) -> ok

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.

blendEquationSeparate(ModeRGB :: enum(), ModeAlpha :: enum()) ->
                         ok
blendEquationSeparatei(Buf :: i(),
                       ModeRGB :: enum(),
                       ModeAlpha :: enum()) ->
                          ok

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.

blendFunc(Sfactor :: enum(), Dfactor :: enum()) -> ok

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.

blendFuncSeparate(SfactorRGB, DfactorRGB, SfactorAlpha,
                  DfactorAlpha) ->
                     ok
blendFuncSeparatei(Buf :: i(),
                   SrcRGB :: enum(),
                   DstRGB :: enum(),
                   SrcAlpha :: enum(),
                   DstAlpha :: enum()) ->
                      ok

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.

blendFunci(Buf :: i(), Src :: enum(), Dst :: enum()) -> ok

No documentation available.

blitFramebuffer(SrcX0, SrcY0, SrcX1, SrcY1, DstX0, DstY0, DstX1,
                DstY1, Mask, Filter) ->
                   ok

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.

bufferData(Target :: enum(),
           Size :: i(),
           Data :: offset() | mem(),
           Usage :: enum()) ->
              ok

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.

bufferPageCommitmentARB(Target :: enum(),
                        Offset :: i(),
                        Size :: i(),
                        Commit :: 0 | 1) ->
                           ok

No documentation available.

bufferStorage(Target :: enum(),
              Size :: i(),
              Data :: offset() | mem(),
              Flags :: i()) ->
                 ok

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.

bufferSubData(Target :: enum(),
              Offset :: i(),
              Size :: i(),
              Data :: offset() | mem()) ->
                 ok

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.

callList(List :: i()) -> ok

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.

callLists(Lists :: [i()]) -> ok

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.

checkFramebufferStatus(Target :: enum()) -> enum()

gl:checkFramebufferStatus/1 and glCheckNamedFramebufferStatus return the completeness status of a framebuffer object when treated as a read or draw framebuffer, depending on the value of Target.

External documentation.

clampColor(Target :: enum(), Clamp :: enum()) -> ok

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.

clear(Mask :: i()) -> ok

gl:clear/1 sets the bitplane area of the window to values previously selected by gl:clearColor/4, gl:clearDepth/1, and gl:clearStencil/1. Multiple color buffers can be cleared simultaneously by selecting more than one buffer at a time using gl:drawBuffer/1.

External documentation.

clearAccum(Red :: f(), Green :: f(), Blue :: f(), Alpha :: f()) ->
              ok

gl:clearAccum/4 specifies the red, green, blue, and alpha values used by gl:clear/1 to clear the accumulation buffer.

External documentation.

clearBufferfv(Buffer :: enum(),
              Drawbuffer :: i(),
              Value :: tuple()) ->
                 ok
clearBufferiv(Buffer :: enum(),
              Drawbuffer :: i(),
              Value :: tuple()) ->
                 ok
clearBufferuiv(Buffer :: enum(),
               Drawbuffer :: i(),
               Value :: tuple()) ->
                  ok

These commands clear a specified buffer of a framebuffer to specified value(s). For glClearBuffer*, 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.

clearBufferData(Target, Internalformat, Format, Type, Data) -> ok

Types

Target = Internalformat = Format = Type = enum()
Data = offset() | mem()

gl:clearBufferData/5 and glClearNamedBufferData fill the entirety of a buffer object's data store with data from client memory.

External documentation.

clearBufferSubData(Target, Internalformat, Offset, Size, Format,
                   Type, Data) ->
                      ok

Types

Target = Internalformat = enum()
Offset = Size = i()
Format = Type = enum()
Data = offset() | mem()

gl:clearBufferSubData/7 and glClearNamedBufferSubData fill a specified region of a buffer object's data store with data from client memory.

External documentation.

clearBufferfi(Buffer :: enum(),
              Drawbuffer :: i(),
              Depth :: f(),
              Stencil :: i()) ->
                 ok

No documentation available.

clearColor(Red :: clamp(),
           Green :: clamp(),
           Blue :: clamp(),
           Alpha :: clamp()) ->
              ok

gl:clearColor/4 specifies the red, green, blue, and alpha values used by gl:clear/1 to clear the color buffers. Values specified by gl:clearColor/4 are clamped to the range [0 1].

External documentation.

clearDepth(Depth :: clamp()) -> ok

gl:clearDepth/1 specifies the depth value used by gl:clear/1 to clear the depth buffer. Values specified by gl:clearDepth/1 are clamped to the range [0 1].

External documentation.

clearDepthf(D :: f()) -> ok

No documentation available.

clearIndex(C :: f()) -> ok

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.

clearStencil(S :: i()) -> ok

gl:clearStencil/1 specifies the index used by gl:clear/1 to clear the stencil buffer. S is masked with 2 m-1, where m is the number of bits in the stencil buffer.

External documentation.

clearTexImage(Texture :: i(),
              Level :: i(),
              Format :: enum(),
              Type :: enum(),
              Data :: offset() | mem()) ->
                 ok

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.

clearTexSubImage(Texture, Level, Xoffset, Yoffset, Zoffset, Width,
                 Height, Depth, Format, Type, Data) ->
                    ok

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.

clientActiveTexture(Texture :: enum()) -> ok

gl:clientActiveTexture/1 selects the vertex array client state parameters to be modified by gl:texCoordPointer/4, and enabled or disabled with gl:enableClientState/1 or gl:disableClientState/1, respectively, when called with a parameter of ?GL_TEXTURE_COORD_ARRAY.

External documentation.

clientWaitSync(Sync :: i(), Flags :: i(), Timeout :: i()) ->
                  enum()

gl:clientWaitSync/3 causes the client to block and wait for the sync object specified by Sync to become signaled. If Sync is signaled when gl:clientWaitSync/3 is called, gl:clientWaitSync/3 returns immediately, otherwise it will block and wait for up to Timeout nanoseconds for Sync to become signaled.

External documentation.

clipControl(Origin :: enum(), Depth :: enum()) -> ok

gl:clipControl/2 controls the clipping volume behavior and the clip coordinate to window coordinate transformation behavior.

External documentation.

clipPlane(Plane :: enum(), Equation :: {f(), f(), f(), f()}) -> ok

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.

color3b(Red :: i(), Green :: i(), Blue :: i()) -> ok
color3bv(X1 :: {Red :: i(), Green :: i(), Blue :: i()}) -> ok
color3d(Red :: f(), Green :: f(), Blue :: f()) -> ok
color3dv(X1 :: {Red :: f(), Green :: f(), Blue :: f()}) -> ok
color3f(Red :: f(), Green :: f(), Blue :: f()) -> ok
color3fv(X1 :: {Red :: f(), Green :: f(), Blue :: f()}) -> ok
color3i(Red :: i(), Green :: i(), Blue :: i()) -> ok
color3iv(X1 :: {Red :: i(), Green :: i(), Blue :: i()}) -> ok
color3s(Red :: i(), Green :: i(), Blue :: i()) -> ok
color3sv(X1 :: {Red :: i(), Green :: i(), Blue :: i()}) -> ok
color3ub(Red :: i(), Green :: i(), Blue :: i()) -> ok
color3ubv(X1 :: {Red :: i(), Green :: i(), Blue :: i()}) -> ok
color3ui(Red :: i(), Green :: i(), Blue :: i()) -> ok
color3uiv(X1 :: {Red :: i(), Green :: i(), Blue :: i()}) -> ok
color3us(Red :: i(), Green :: i(), Blue :: i()) -> ok
color3usv(X1 :: {Red :: i(), Green :: i(), Blue :: i()}) -> ok
color4b(Red :: i(), Green :: i(), Blue :: i(), Alpha :: i()) -> ok
color4bv(X1 ::
             {Red :: i(), Green :: i(), Blue :: i(), Alpha :: i()}) ->
            ok
color4d(Red :: f(), Green :: f(), Blue :: f(), Alpha :: f()) -> ok
color4dv(X1 ::
             {Red :: f(), Green :: f(), Blue :: f(), Alpha :: f()}) ->
            ok
color4f(Red :: f(), Green :: f(), Blue :: f(), Alpha :: f()) -> ok
color4fv(X1 ::
             {Red :: f(), Green :: f(), Blue :: f(), Alpha :: f()}) ->
            ok
color4i(Red :: i(), Green :: i(), Blue :: i(), Alpha :: i()) -> ok
color4iv(X1 ::
             {Red :: i(), Green :: i(), Blue :: i(), Alpha :: i()}) ->
            ok
color4s(Red :: i(), Green :: i(), Blue :: i(), Alpha :: i()) -> ok
color4sv(X1 ::
             {Red :: i(), Green :: i(), Blue :: i(), Alpha :: i()}) ->
            ok
color4ub(Red :: i(), Green :: i(), Blue :: i(), Alpha :: i()) ->
            ok
color4ubv(X1 ::
              {Red :: i(),
               Green :: i(),
               Blue :: i(),
               Alpha :: i()}) ->
             ok
color4ui(Red :: i(), Green :: i(), Blue :: i(), Alpha :: i()) ->
            ok
color4uiv(X1 ::
              {Red :: i(),
               Green :: i(),
               Blue :: i(),
               Alpha :: i()}) ->
             ok
color4us(Red :: i(), Green :: i(), Blue :: i(), Alpha :: i()) ->
            ok
color4usv(X1 ::
              {Red :: i(),
               Green :: i(),
               Blue :: i(),
               Alpha :: i()}) ->
             ok

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.

colorMask(Red :: 0 | 1,
          Green :: 0 | 1,
          Blue :: 0 | 1,
          Alpha :: 0 | 1) ->
             ok

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.

colorMaski(Index :: i(),
           R :: 0 | 1,
           G :: 0 | 1,
           B :: 0 | 1,
           A :: 0 | 1) ->
              ok

No documentation available.

colorMaterial(Face :: enum(), Mode :: enum()) -> ok

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.

colorPointer(Size :: i(),
             Type :: enum(),
             Stride :: i(),
             Ptr :: offset() | mem()) ->
                ok

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.

colorSubTable(Target, Start, Count, Format, Type, Data) -> ok

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.

colorTable(Target, Internalformat, Width, Format, Type, Table) ->
              ok

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.

colorTableParameterfv(Target :: enum(),
                      Pname :: enum(),
                      Params :: {f(), f(), f(), f()}) ->
                         ok
colorTableParameteriv(Target :: enum(),
                      Pname :: enum(),
                      Params :: {i(), i(), i(), i()}) ->
                         ok

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.

compileShader(Shader :: i()) -> ok

gl:compileShader/1 compiles the source code strings that have been stored in the shader object specified by Shader.

External documentation.

compileShaderARB(ShaderObj :: i()) -> ok

No documentation available.

compileShaderIncludeARB(Shader :: i(),
                        Path :: [unicode:chardata()]) ->
                           ok

No documentation available.

compressedTexImage1D(Target, Level, Internalformat, Width, Border,
                     ImageSize, Data) ->
                        ok

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.

compressedTexImage2D(Target, Level, Internalformat, Width, Height,
                     Border, ImageSize, Data) ->
                        ok

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.

compressedTexImage3D(Target, Level, Internalformat, Width, Height,
                     Depth, Border, ImageSize, Data) ->
                        ok

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.

compressedTexSubImage1D(Target, Level, Xoffset, Width, Format,
                        ImageSize, Data) ->
                           ok

Types

Target = enum()
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.

compressedTexSubImage2D(Target, Level, Xoffset, Yoffset, Width,
                        Height, Format, ImageSize, Data) ->
                           ok

Types

Target = enum()
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.

compressedTexSubImage3D(Target, Level, Xoffset, Yoffset, Zoffset,
                        Width, Height, Depth, Format, ImageSize,
                        Data) ->
                           ok

Types

Target = enum()
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.

compressedTextureSubImage1D(Texture, Level, Xoffset, Width,
                            Format, ImageSize, Data) ->
                               ok

Types

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

No documentation available.

compressedTextureSubImage2D(Texture, Level, Xoffset, Yoffset,
                            Width, Height, Format, ImageSize,
                            Data) ->
                               ok

Types

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

No documentation available.

compressedTextureSubImage3D(Texture, Level, Xoffset, Yoffset,
                            Zoffset, Width, Height, Depth, Format,
                            ImageSize, Data) ->
                               ok

Types

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

No documentation available.

convolutionFilter1D(Target, Internalformat, Width, Format, Type,
                    Image) ->
                       ok

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.

convolutionFilter2D(Target, Internalformat, Width, Height, Format,
                    Type, Image) ->
                       ok

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.

convolutionParameterf(Target :: enum(),
                      Pname :: enum(),
                      Params :: tuple()) ->
                         ok
convolutionParameterfv(Target :: enum(),
                       Pname :: enum(),
                       Params :: tuple()) ->
                          ok
convolutionParameteri(Target :: enum(),
                      Pname :: enum(),
                      Params :: tuple()) ->
                         ok
convolutionParameteriv(Target :: enum(),
                       Pname :: enum(),
                       Params :: tuple()) ->
                          ok

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

External documentation.

copyBufferSubData(ReadTarget, WriteTarget, ReadOffset,
                  WriteOffset, Size) ->
                     ok

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.

copyColorSubTable(Target :: enum(),
                  Start :: i(),
                  X :: i(),
                  Y :: i(),
                  Width :: i()) ->
                     ok

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.

copyColorTable(Target :: enum(),
               Internalformat :: enum(),
               X :: i(),
               Y :: i(),
               Width :: i()) ->
                  ok

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.

copyConvolutionFilter1D(Target :: enum(),
                        Internalformat :: enum(),
                        X :: i(),
                        Y :: i(),
                        Width :: i()) ->
                           ok

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.

copyConvolutionFilter2D(Target :: enum(),
                        Internalformat :: enum(),
                        X :: i(),
                        Y :: i(),
                        Width :: i(),
                        Height :: i()) ->
                           ok

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.

copyImageSubData(SrcName, SrcTarget, SrcLevel, SrcX, SrcY, SrcZ,
                 DstName, DstTarget, DstLevel, DstX, DstY, DstZ,
                 SrcWidth, SrcHeight, SrcDepth) ->
                    ok

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.

copyPixels(X :: i(),
           Y :: i(),
           Width :: i(),
           Height :: i(),
           Type :: enum()) ->
              ok

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.

copyTexImage1D(Target, Level, Internalformat, X, Y, Width, Border) ->
                  ok

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.

copyTexImage2D(Target, Level, Internalformat, X, Y, Width, Height,
               Border) ->
                  ok

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.

copyTexSubImage1D(Target :: enum(),
                  Level :: i(),
                  Xoffset :: i(),
                  X :: i(),
                  Y :: i(),
                  Width :: i()) ->
                     ok

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.

copyTexSubImage2D(Target, Level, Xoffset, Yoffset, X, Y, Width,
                  Height) ->
                     ok

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.

copyTexSubImage3D(Target, Level, Xoffset, Yoffset, Zoffset, X, Y,
                  Width, Height) ->
                     ok

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.

createBuffers(N :: i()) -> [i()]

gl:createBuffers/1 returns N previously unused buffer names in Buffers, each representing a new buffer object initialized as if it had been bound to an unspecified target.

External documentation.

createFramebuffers(N :: i()) -> [i()]

gl:createFramebuffers/1 returns N previously unused framebuffer names in Framebuffers, each representing a new framebuffer object initialized to the default state.

External documentation.

createProgram() -> i()

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.

createProgramObjectARB() -> i()

No documentation available.

createProgramPipelines(N :: i()) -> [i()]

gl:createProgramPipelines/1 returns N previously unused program pipeline names in Pipelines, each representing a new program pipeline object initialized to the default state.

External documentation.

createQueries(Target :: enum(), N :: i()) -> [i()]

gl:createQueries/2 returns N previously unused query object names in Ids, each representing a new query object with the specified Target.

External documentation.

createRenderbuffers(N :: i()) -> [i()]

gl:createRenderbuffers/1 returns N previously unused renderbuffer object names in Renderbuffers, each representing a new renderbuffer object initialized to the default state.

External documentation.

createSamplers(N :: i()) -> [i()]

gl:createSamplers/1 returns N previously unused sampler names in Samplers, each representing a new sampler object initialized to the default state.

External documentation.

createShader(Type :: enum()) -> i()

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.

createShaderObjectARB(ShaderType :: enum()) -> i()

No documentation available.

createShaderProgramv(Type :: enum(),
                     Strings :: [unicode:chardata()]) ->
                        i()

No documentation available.

createTextures(Target :: enum(), N :: i()) -> [i()]

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.

createTransformFeedbacks(N :: i()) -> [i()]

gl:createTransformFeedbacks/1 returns N previously unused transform feedback object names in Ids, each representing a new transform feedback object initialized to the default state.

External documentation.

createVertexArrays(N :: i()) -> [i()]

gl:createVertexArrays/1 returns N previously unused vertex array object names in Arrays, each representing a new vertex array object initialized to the default state.

External documentation.

cullFace(Mode :: enum()) -> ok

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.

currentPaletteMatrixARB(Index :: i()) -> ok

No documentation available.

debugMessageControl(Source :: enum(),
                    Type :: enum(),
                    Severity :: enum(),
                    Ids :: [i()],
                    Enabled :: 0 | 1) ->
                       ok

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.

debugMessageInsert(Source, Type, Id, Severity, Length, Buf) -> ok

Types

Source = Type = enum()
Id = i()
Severity = enum()
Length = i()
Buf = string()

gl:debugMessageInsert/6 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.

deleteBuffers(Buffers :: [i()]) -> ok

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.

deleteFramebuffers(Framebuffers :: [i()]) -> ok

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.

deleteLists(List :: i(), Range :: i()) -> ok

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.

deleteNamedStringARB(Name :: string()) -> ok

No documentation available.

deleteObjectARB(Obj :: i()) -> ok

No documentation available.

deleteProgram(Program :: i()) -> ok

gl:deleteProgram/1 frees the memory and invalidates the name associated with the program object specified by Program. This command effectively undoes the effects of a call to gl:createProgram/0.

External documentation.

deleteProgramPipelines(Pipelines :: [i()]) -> ok

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.

deleteProgramsARB(Programs :: [i()]) -> ok

No documentation available.

deleteQueries(Ids :: [i()]) -> ok

gl:deleteQueries/1 deletes N query objects named by the elements of the array Ids. After a query object is deleted, it has no contents, and its name is free for reuse (for example by gl:genQueries/1).

External documentation.

deleteRenderbuffers(Renderbuffers :: [i()]) -> ok

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.

deleteSamplers(Samplers :: [i()]) -> ok

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.

deleteShader(Shader :: i()) -> ok

gl:deleteShader/1 frees the memory and invalidates the name associated with the shader object specified by Shader. This command effectively undoes the effects of a call to gl:createShader/1.

External documentation.

deleteSync(Sync :: i()) -> ok

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.

deleteTextures(Textures :: [i()]) -> ok

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.

deleteTransformFeedbacks(Ids :: [i()]) -> ok

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.

deleteVertexArrays(Arrays :: [i()]) -> ok

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.

depthBoundsEXT(Zmin :: clamp(), Zmax :: clamp()) -> ok

No documentation available.

depthFunc(Func :: enum()) -> ok

gl:depthFunc/1 specifies the function used to compare each incoming pixel depth value with the depth value present in the depth buffer. The comparison is performed only if depth testing is enabled. (See gl:enable/1 and gl:disable/1 of ?GL_DEPTH_TEST.)

External documentation.

depthMask(Flag :: 0 | 1) -> ok

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.

depthRange(Near_val :: clamp(), Far_val :: clamp()) -> ok
depthRangef(N :: f(), F :: f()) -> ok

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.

depthRangeArrayv(First :: i(), V :: [{f(), f()}]) -> ok

No documentation available.

depthRangeIndexed(Index :: i(), N :: f(), F :: f()) -> ok

No documentation available.

detachObjectARB(ContainerObj :: i(), AttachedObj :: i()) -> ok

No documentation available.

detachShader(Program :: i(), Shader :: i()) -> ok

gl:detachShader/2 detaches the shader object specified by Shader from the program object specified by Program. This command can be used to undo the effect of the command gl:attachShader/2.

External documentation.

dispatchCompute(Num_groups_x :: i(),
                Num_groups_y :: i(),
                Num_groups_z :: i()) ->
                   ok

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.

dispatchComputeGroupSizeARB(Num_groups_x, Num_groups_y,
                            Num_groups_z, Group_size_x,
                            Group_size_y, Group_size_z) ->
                               ok

Types

Num_groups_x = Num_groups_y = Num_groups_z = Group_size_x = Group_size_y = Group_size_z = i()

No documentation available.

dispatchComputeIndirect(Indirect :: i()) -> ok

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.

drawArrays(Mode :: enum(), First :: i(), Count :: i()) -> ok

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.

drawArraysIndirect(Mode :: enum(), Indirect :: offset() | mem()) ->
                      ok

gl:drawArraysIndirect/2 specifies multiple geometric primitives with very few subroutine calls. gl:drawArraysIndirect/2 behaves similarly to gl:drawArraysInstancedBaseInstance/5, execept that the parameters to gl:drawArraysInstancedBaseInstance/5 are stored in memory at the address given by Indirect.

External documentation.

drawArraysInstanced(Mode :: enum(),
                    First :: i(),
                    Count :: i(),
                    Instancecount :: i()) ->
                       ok

No documentation available.

drawArraysInstancedBaseInstance(Mode :: enum(),
                                First :: i(),
                                Count :: i(),
                                Instancecount :: i(),
                                Baseinstance :: i()) ->
                                   ok

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.

drawBuffer(Mode :: enum()) -> ok

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.

drawBuffers(Bufs :: [enum()]) -> ok

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.

drawElements(Mode :: enum(),
             Count :: i(),
             Type :: enum(),
             Indices :: offset() | mem()) ->
                ok

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.

drawElementsBaseVertex(Mode, Count, Type, Indices, Basevertex) ->
                          ok

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.

drawElementsIndirect(Mode :: enum(),
                     Type :: enum(),
                     Indirect :: offset() | mem()) ->
                        ok

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.

drawElementsInstanced(Mode, Count, Type, Indices, Instancecount) ->
                         ok

Types

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

No documentation available.

drawElementsInstancedBaseInstance(Mode, Count, Type, Indices,
                                  Instancecount, Baseinstance) ->
                                     ok

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.

drawElementsInstancedBaseVertex(Mode, Count, Type, Indices,
                                Instancecount, Basevertex) ->
                                   ok

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.

drawElementsInstancedBaseVertexBaseInstance(Mode, Count, Type,
                                            Indices,
                                            Instancecount,
                                            Basevertex,
                                            Baseinstance) ->
                                               ok

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.

drawPixels(Width :: i(),
           Height :: i(),
           Format :: enum(),
           Type :: enum(),
           Pixels :: offset() | mem()) ->
              ok

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.

drawRangeElements(Mode, Start, End, Count, Type, Indices) -> ok

Types

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

gl:drawRangeElements/6 is a restricted form of gl:drawElements/4. Mode, and Count match the corresponding arguments to gl:drawElements/4, with the additional constraint that all values in the arrays Count must lie between Start and End, inclusive.

External documentation.

drawRangeElementsBaseVertex(Mode, Start, End, Count, Type,
                            Indices, Basevertex) ->
                               ok

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.

drawTransformFeedback(Mode :: enum(), Id :: i()) -> ok

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.

drawTransformFeedbackInstanced(Mode :: enum(),
                               Id :: i(),
                               Instancecount :: i()) ->
                                  ok

No documentation available.

drawTransformFeedbackStream(Mode :: enum(),
                            Id :: i(),
                            Stream :: i()) ->
                               ok

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.

drawTransformFeedbackStreamInstanced(Mode :: enum(),
                                     Id :: i(),
                                     Stream :: i(),
                                     Instancecount :: i()) ->
                                        ok

No documentation available.

edgeFlag(Flag :: 0 | 1) -> ok

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.

edgeFlagPointer(Stride :: i(), Ptr :: offset() | mem()) -> ok

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.

edgeFlagv(X1 :: {Flag :: 0 | 1}) -> ok

No documentation available.

disable(Cap :: enum()) -> ok
enable(Cap :: enum()) -> ok
enablei(Target :: enum(), Index :: i()) -> ok

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.

disableClientState(Cap :: enum()) -> ok
enableClientState(Cap :: enum()) -> ok

gl:enableClientState/1 and gl:disableClientState/1 enable or disable individual client-side capabilities. By default, all client-side capabilities are disabled. Both gl:enableClientState/1 and gl:disableClientState/1 take a single argument, Cap, which can assume one of the following values:

External documentation.

disableVertexArrayAttrib(Vaobj :: i(), Index :: i()) -> ok
enableVertexArrayAttrib(Vaobj :: i(), Index :: i()) -> ok

No documentation available.

disableVertexAttribArray(Index :: i()) -> ok
enableVertexAttribArray(Index :: i()) -> ok

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.

disablei(Target :: enum(), Index :: i()) -> ok

No documentation available.

evalCoord1d(U :: f()) -> ok
evalCoord1dv(X1 :: {U :: f()}) -> ok
evalCoord1f(U :: f()) -> ok
evalCoord1fv(X1 :: {U :: f()}) -> ok
evalCoord2d(U :: f(), V :: f()) -> ok
evalCoord2dv(X1 :: {U :: f(), V :: f()}) -> ok
evalCoord2f(U :: f(), V :: f()) -> ok
evalCoord2fv(X1 :: {U :: f(), V :: f()}) -> ok

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 gl:map1() and gl:map2(); to enable and disable it, call gl:enable/1 and gl:disable/1.

External documentation.

evalMesh1(Mode :: enum(), I1 :: i(), I2 :: i()) -> ok
evalMesh2(Mode :: enum(),
          I1 :: i(),
          I2 :: i(),
          J1 :: i(),
          J2 :: i()) ->
             ok

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 gl:map1() and gl:map2(). Mode determines whether the resulting vertices are connected as points, lines, or filled polygons.

External documentation.

evalPoint1(I :: i()) -> ok
evalPoint2(I :: i(), J :: i()) -> ok

gl:mapGrid() and gl:evalMesh() are used in tandem to efficiently generate and evaluate a series of evenly spaced map domain values. gl:evalPoint() can be used to evaluate a single grid point in the same gridspace that is traversed by gl:evalMesh(). Calling gl:evalPoint1/1 is equivalent to calling glEvalCoord1( i.ð u+u 1 ); where ð u=(u 2-u 1)/n

External documentation.

evaluateDepthValuesARB() -> ok

No documentation available.

feedbackBuffer(Size :: i(), Type :: enum(), Buffer :: mem()) -> ok

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.

fenceSync(Condition :: enum(), Flags :: i()) -> i()

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.

finish() -> ok

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.

flush() -> ok

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.

flushMappedBufferRange(Target :: enum(),
                       Offset :: i(),
                       Length :: i()) ->
                          ok

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.

flushMappedNamedBufferRange(Buffer :: i(),
                            Offset :: i(),
                            Length :: i()) ->
                               ok

No documentation available.

fogf(Pname :: enum(), Param :: f()) -> ok
fogfv(Pname :: enum(), Params :: tuple()) -> ok
fogi(Pname :: enum(), Param :: i()) -> ok
fogiv(Pname :: enum(), Params :: tuple()) -> ok

Fog is initially disabled. While enabled, fog affects rasterized geometry, bitmaps, and pixel blocks, but not buffer clear operations. To enable and disable fog, call gl:enable/1 and gl:disable/1 with argument ?GL_FOG.

External documentation.

fogCoordd(Coord :: f()) -> ok
fogCoorddv(X1 :: {Coord :: f()}) -> ok
fogCoordf(Coord :: f()) -> ok
fogCoordfv(X1 :: {Coord :: f()}) -> ok

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.

fogCoordPointer(Type :: enum(),
                Stride :: i(),
                Pointer :: offset() | mem()) ->
                   ok

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.

framebufferParameteri(Target :: enum(),
                      Pname :: enum(),
                      Param :: i()) ->
                         ok

No documentation available.

framebufferRenderbuffer(Target, Attachment, Renderbuffertarget,
                        Renderbuffer) ->
                           ok

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.

framebufferTexture(Target :: enum(),
                   Attachment :: enum(),
                   Texture :: i(),
                   Level :: i()) ->
                      ok
framebufferTexture1D(Target :: enum(),
                     Attachment :: enum(),
                     Textarget :: enum(),
                     Texture :: i(),
                     Level :: i()) ->
                        ok
framebufferTexture2D(Target :: enum(),
                     Attachment :: enum(),
                     Textarget :: enum(),
                     Texture :: i(),
                     Level :: i()) ->
                        ok
framebufferTexture3D(Target, Attachment, Textarget, Texture,
                     Level, Zoffset) ->
                        ok
framebufferTextureFaceARB(Target :: enum(),
                          Attachment :: enum(),
                          Texture :: i(),
                          Level :: i(),
                          Face :: enum()) ->
                             ok
framebufferTextureLayer(Target :: enum(),
                        Attachment :: enum(),
                        Texture :: i(),
                        Level :: i(),
                        Layer :: i()) ->
                           ok

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.

frontFace(Mode :: enum()) -> ok

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.

frustum(Left :: f(),
        Right :: f(),
        Bottom :: f(),
        Top :: f(),
        Near_val :: f(),
        Far_val :: f()) ->
           ok

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.

genBuffers(N :: i()) -> [i()]

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.

genFramebuffers(N :: i()) -> [i()]

gl:genFramebuffers/1 returns N framebuffer 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:genFramebuffers/1.

External documentation.

genLists(Range :: i()) -> i()

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.

genProgramPipelines(N :: i()) -> [i()]

gl:genProgramPipelines/1 returns N previously unused program pipeline object names in Pipelines. These names are marked as used, for the purposes of gl:genProgramPipelines/1 only, but they acquire program pipeline state only when they are first bound.

External documentation.

genProgramsARB(N :: i()) -> [i()]

No documentation available.

genQueries(N :: i()) -> [i()]

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.

genRenderbuffers(N :: i()) -> [i()]

gl:genRenderbuffers/1 returns N renderbuffer object names in Renderbuffers. 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:genRenderbuffers/1.

External documentation.

genSamplers(Count :: i()) -> [i()]

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.

genTextures(N :: i()) -> [i()]

gl:genTextures/1 returns N texture names in Textures. 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:genTextures/1.

External documentation.

genTransformFeedbacks(N :: i()) -> [i()]

gl:genTransformFeedbacks/1 returns N previously unused transform feedback object names in Ids. These names are marked as used, for the purposes of gl:genTransformFeedbacks/1 only, but they acquire transform feedback state only when they are first bound.

External documentation.

genVertexArrays(N :: i()) -> [i()]

gl:genVertexArrays/1 returns N vertex array object names in Arrays. 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:genVertexArrays/1.

External documentation.

generateMipmap(Target :: enum()) -> ok

gl:generateMipmap/1 and gl:generateTextureMipmap/1 generates mipmaps for the specified texture object. For gl:generateMipmap/1, the texture object that is bound to Target. For gl:generateTextureMipmap/1, Texture is the name of the texture object.

External documentation.

generateTextureMipmap(Texture :: i()) -> ok

No documentation available.

getBooleani_v(Target :: enum(), Index :: i()) -> [0 | 1]
getBooleanv(Pname :: enum()) -> [0 | 1]
getDoublei_v(Target :: enum(), Index :: i()) -> [f()]
getDoublev(Pname :: enum()) -> [f()]
getFloati_v(Target :: enum(), Index :: i()) -> [f()]
getFloatv(Pname :: enum()) -> [f()]
getInteger64i_v(Target :: enum(), Index :: i()) -> [i()]
getInteger64v(Pname :: enum()) -> [i()]
getIntegeri_v(Target :: enum(), Index :: i()) -> [i()]
getIntegerv(Pname :: enum()) -> [i()]

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.

getActiveAttrib(Program :: i(), Index :: i(), BufSize :: i()) ->
                   {Size :: i(), Type :: enum(), Name :: string()}

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.

getActiveAttribARB(ProgramObj :: i(),
                   Index :: i(),
                   MaxLength :: i()) ->
                      {Size :: i(),
                       Type :: enum(),
                       Name :: string()}

No documentation available.

getActiveSubroutineName(Program :: i(),
                        Shadertype :: enum(),
                        Index :: i(),
                        Bufsize :: i()) ->
                           string()

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.

getActiveSubroutineUniformName(Program :: i(),
                               Shadertype :: enum(),
                               Index :: i(),
                               Bufsize :: i()) ->
                                  string()

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.

getActiveUniform(Program :: i(), Index :: i(), BufSize :: i()) ->
                    {Size :: i(),
                     Type :: enum(),
                     Name :: string()}

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.

getActiveUniformARB(ProgramObj :: i(),
                    Index :: i(),
                    MaxLength :: i()) ->
                       {Size :: i(),
                        Type :: enum(),
                        Name :: string()}

No documentation available.

getActiveUniformBlockiv(Program :: i(),
                        UniformBlockIndex :: i(),
                        Pname :: enum(),
                        Params :: mem()) ->
                           ok

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

External documentation.

getActiveUniformBlockName(Program :: i(),
                          UniformBlockIndex :: i(),
                          BufSize :: i()) ->
                             string()

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

External documentation.

getActiveUniformName(Program :: i(),
                     UniformIndex :: i(),
                     BufSize :: i()) ->
                        string()

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.

getActiveUniformsiv(Program :: i(),
                    UniformIndices :: [i()],
                    Pname :: enum()) ->
                       [i()]

No documentation available.

getAttachedObjectsARB(ContainerObj :: i(), MaxCount :: i()) ->
                         [i()]

No documentation available.

getAttachedShaders(Program :: i(), MaxCount :: i()) -> [i()]

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.

getAttribLocation(Program :: i(), Name :: string()) -> i()

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.

getAttribLocationARB(ProgramObj :: i(), Name :: string()) -> i()

No documentation available.

getBufferParameterivARB(Target :: enum(), Pname :: enum()) ->
                           [i()]

No documentation available.

getBufferParameteri64v(Target :: enum(), Pname :: enum()) -> [i()]

No documentation available.

getBufferParameteriv(Target :: enum(), Pname :: enum()) -> i()

gl:getBufferParameteriv/2 returns in Data a selected parameter of the buffer object specified by Target.

External documentation.

getBufferSubData(Target :: enum(),
                 Offset :: i(),
                 Size :: i(),
                 Data :: mem()) ->
                    ok

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.

getClipPlane(Plane :: enum()) -> {f(), f(), f(), f()}

gl:getClipPlane/1 returns in Equation the four coefficients of the plane equation for Plane.

External documentation.

getColorTable(Target :: enum(),
              Format :: enum(),
              Type :: enum(),
              Table :: mem()) ->
                 ok

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.

getColorTableParameterfv(Target :: enum(), Pname :: enum()) ->
                            {f(), f(), f(), f()}
getColorTableParameteriv(Target :: enum(), Pname :: enum()) ->
                            {i(), i(), i(), i()}

Returns parameters specific to color table Target.

External documentation.

getCompressedTexImage(Target :: enum(), Lod :: i(), Img :: mem()) ->
                         ok

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.

getCompressedTexImageARB(Target :: enum(),
                         Level :: i(),
                         Img :: mem()) ->
                            ok

No documentation available.

getConvolutionFilter(Target :: enum(),
                     Format :: enum(),
                     Type :: enum(),
                     Image :: mem()) ->
                        ok

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.

getConvolutionParameterfv(Target :: enum(), Pname :: enum()) ->
                             {f(), f(), f(), f()}
getConvolutionParameteriv(Target :: enum(), Pname :: enum()) ->
                             {i(), i(), i(), i()}

gl:getConvolutionParameter() retrieves convolution parameters. Target determines which convolution filter is queried. Pname determines which parameter is returned:

External documentation.

getDebugMessageLog(Count :: i(), BufSize :: i()) ->
                      {i(),
                       Sources :: [enum()],
                       Types :: [enum()],
                       Ids :: [i()],
                       Severities :: [enum()],
                       MessageLog :: string()}

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.

getError() -> enum()

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.

getFragDataIndex(Program :: i(), Name :: string()) -> i()

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.

getFragDataLocation(Program :: i(), Name :: string()) -> i()

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