wxErlang

Reference Manual

Version 1.8.5

Table of Contents

gl

Module

gl

Module Summary

Standard OpenGL api.

Description

Standard OpenGL api. See www.khronos.org

Booleans are represented by integers 0 and 1.

DATA TYPES

clamp() = float()

0.0..1.0

enum() = non_neg_integer()

See wx/include/gl.hrl

matrix() = matrix12() | matrix16()

matrix12() = {float(), float(), float(), float(), float(), float(), float(), float(), float(), float(), float(), float()}

matrix16() = {float(), float(), float(), float(), float(), float(), float(), float(), float(), float(), float(), float(), float(), float(), float(), float()}

mem() = binary() | tuple()

Memory block

offset() = non_neg_integer()

Offset in memory block

Exports

Types

C = float()

Specify the clear value for the color index buffers

gl:clearIndex 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.

See external documentation.

Types

Red = clamp()
Green = clamp()
Blue = clamp()
Alpha = clamp()

Specify clear values for the color buffers

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

See external documentation.

Types

Mask = integer()

Clear buffers to preset values

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

See external documentation.

Types

Mask = integer()

Control the writing of individual bits in the color index buffers

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

See external documentation.

Types

Red = 0 | 1
Green = 0 | 1
Blue = 0 | 1
Alpha = 0 | 1

Enable and disable writing of frame buffer color components

gl:colorMask and gl:colorMaski specify whether the individual color components in the frame buffer can or cannot be written. gl:colorMaski sets the mask for a specific draw buffer, whereas gl:colorMask 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.

See external documentation.

Types

Func = enum()
Ref = clamp()

Specify the alpha test function

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 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:enable/1 of ?GL_ALPHA_TEST.)

See external documentation.

Types

Sfactor = enum()
Dfactor = enum()

Specify pixel arithmetic

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:enable/1 with argument ?GL_BLEND to enable and disable blending.

See external documentation.

Types

Opcode = enum()

Specify a logical pixel operation for rendering

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

See external documentation.

Types

Mode = enum()

Specify whether front- or back-facing facets can be culled

gl:cullFace 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:enable/1 commands with the argument ?GL_CULL_FACE. Facets include triangles, quadrilaterals, polygons, and rectangles.

See external documentation.

Types

Mode = enum()

Define front- and back-facing polygons

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:enable/1 with argument ?GL_CULL_FACE.

See external documentation.

Types

Size = float()

Specify the diameter of rasterized points

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

See external documentation.

Types

Width = float()

Specify the width of rasterized lines

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

See external documentation.

Types

Factor = integer()
Pattern = integer()

Specify the line stipple pattern

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

See external documentation.

Types

Face = enum()
Mode = enum()

Select a polygon rasterization mode

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

See external documentation.

Types

Factor = float()
Units = float()

Set the scale and units used to calculate depth values

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

See external documentation.

Types

Mask = binary()

Set the polygon stippling pattern

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

See external documentation.

Return the polygon stipple pattern

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

See external documentation.

Types

Flag = 0 | 1

Flag edges as either boundary or nonboundary

Each vertex of a polygon, separate triangle, or separate quadrilateral specified between a gl:'begin'/1 / gl:'begin'/1 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 sets the edge flag bit to ?GL_TRUE if Flag is ?GL_TRUE and to ?GL_FALSE otherwise.

See external documentation.

Types

Flag = {Flag::0 | 1}

Equivalent to edgeFlag(Flag).

Types

X = integer()
Y = integer()
Width = integer()
Height = integer()

Define the scissor box

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

See external documentation.

Types

Plane = enum()
Equation = {float(), float(), float(), float()}

Specify a plane against which all geometry is clipped

Geometry is always clipped against the boundaries of a six-plane frustum in x, y , and z. gl:clipPlane 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:getBooleanv/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.

See external documentation.

Types

Plane = enum()

Return the coefficients of the specified clipping plane

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

See external documentation.

Types

Mode = enum()

Specify which color buffers are to be drawn into

When colors are written to the frame buffer, they are written into the color buffers specified by gl:drawBuffer. The specifications are as follows:

See external documentation.

Types

Mode = enum()

Select a color buffer source for pixels

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

See external documentation.

Types

Cap = enum()

Enable or disable server-side GL capabilities

gl:enable and gl:enable/1 enable and disable various capabilities. Use gl:isEnabled/1 or gl:getBooleanv/1 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.

See external documentation.

Types

Cap = enum()

See enable/1

Types

Cap = enum()

Test whether a capability is enabled

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

See external documentation.

Types

Cap = enum()

Enable or disable client-side capability

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

See external documentation.

Types

Cap = enum()

Types

Pname = enum()

Return the value or values of a selected parameter

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

See external documentation.

Types

Pname = enum()

Types

Pname = enum()

Types

Pname = enum()

Types

Mask = integer()

Push and pop the server attribute stack

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

See external documentation.

Types

Mask = integer()

Push and pop the client attribute stack

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

See external documentation.

Types

Mode = enum()

Set rasterization mode

gl:renderMode sets the rasterization mode. It takes one argument, Mode , which can assume one of three predefined values:

See external documentation.

Return error information

gl:getError 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 is called, the error code is returned, and the flag is reset to ?GL_NO_ERROR. If a call to gl:getError returns ?GL_NO_ERROR, there has been no detectable error since the last call to gl:getError , or since the GL was initialized.

See external documentation.

Types

Name = enum()

Return a string describing the current GL connection

gl:getString returns a pointer to a static string describing some aspect of the current GL connection. Name can be one of the following:

See external documentation.

Block until all GL execution is complete

gl:finish 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.

See external documentation.

Force execution of GL commands in finite time

Different GL implementations buffer commands in several different locations, including network buffers and the graphics accelerator itself. gl:flush 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.

See external documentation.

Types

Target = enum()
Mode = enum()

Specify implementation-specific hints

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

See external documentation.

Types

Depth = clamp()

Specify the clear value for the depth buffer

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

See external documentation.

Types

Func = enum()

Specify the value used for depth buffer comparisons

gl:depthFunc 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:enable/1 of ?GL_DEPTH_TEST .)

See external documentation.

Types

Flag = 0 | 1

Enable or disable writing into the depth buffer

gl:depthMask 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.

See external documentation.

Types

Near_val = clamp()
Far_val = clamp()

Specify mapping of depth values from normalized device coordinates to window coordinates

After clipping and division by w, depth coordinates range from -1 to 1, corresponding to the near and far clipping planes. gl:depthRange 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 are both clamped to this range before they are accepted.

See external documentation.

Types

Red = float()
Green = float()
Blue = float()
Alpha = float()

Specify clear values for the accumulation buffer

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

See external documentation.

Types

Op = enum()
Value = float()

Operate on the accumulation buffer

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.

See external documentation.

Types

Mode = enum()

Specify which matrix is the current matrix

gl:matrixMode sets the current matrix mode. Mode can assume one of four values:

See external documentation.

Types

Left = float()
Right = float()
Bottom = float()
Top = float()
Near_val = float()
Far_val = float()

Multiply the current matrix with an orthographic matrix

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

See external documentation.

Types

Left = float()
Right = float()
Bottom = float()
Top = float()
Near_val = float()
Far_val = float()

Multiply the current matrix by a perspective matrix

gl:frustum 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:multMatrixd/1 were called with the following matrix as its argument:

See external documentation.

Types

X = integer()
Y = integer()
Width = integer()
Height = integer()

Set the viewport

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

See external documentation.

Push and pop the current matrix stack

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

See external documentation.

Replace the current matrix with the identity matrix

gl:loadIdentity replaces the current matrix with the identity matrix. It is semantically equivalent to calling gl:loadMatrixd/1 with the identity matrix

See external documentation.

Types

M = matrix()

Replace the current matrix with the specified matrix

gl:loadMatrix replaces the current matrix with the one whose elements are specified by M . The current matrix is the projection matrix, modelview matrix, or texture matrix, depending on the current matrix mode (see gl:matrixMode/1 ).

See external documentation.

Types

M = matrix()

Types

M = matrix()

Multiply the current matrix with the specified matrix

gl:multMatrix multiplies the current matrix with the one specified using M , and replaces the current matrix with the product.

See external documentation.

Types

M = matrix()

Types

Angle = float()
X = float()
Y = float()
Z = float()

Multiply the current matrix by a rotation matrix

gl:rotate produces a rotation of Angle degrees around the vector (x y z). The current matrix (see gl:matrixMode/1 ) is multiplied by a rotation matrix with the product replacing the current matrix, as if gl:multMatrixd/1 were called with the following matrix as its argument:

See external documentation.

Types

Angle = float()
X = float()
Y = float()
Z = float()

See rotated/4

Types

X = float()
Y = float()
Z = float()

Multiply the current matrix by a general scaling matrix

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

See external documentation.

Types

X = float()
Y = float()
Z = float()

See scaled/3

Types

X = float()
Y = float()
Z = float()

Multiply the current matrix by a translation matrix

gl:translate produces a translation by (x y z). The current matrix (see gl:matrixMode/1 ) is multiplied by this translation matrix, with the product replacing the current matrix, as if gl:multMatrixd/1 were called with the following matrix for its argument:

See external documentation.

Types

X = float()
Y = float()
Z = float()

Types

List = integer()

Determine if a name corresponds to a display list

gl:isList returns ?GL_TRUE if List is the name of a display list and returns ?GL_FALSE if it is not, or if an error occurs.

See external documentation.

Types

List = integer()
Range = integer()

Delete a contiguous group of display lists

gl:deleteLists 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.

See external documentation.

Types

Range = integer()

Generate a contiguous set of empty display lists

gl:genLists 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.

See external documentation.

Types

List = integer()
Mode = enum()

Create or replace a display list

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

See external documentation.

glBeginList

See external documentation.

Types

List = integer()

Execute a display list

gl:callList 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 is ignored.

See external documentation.

Types

Lists = [integer()]

Execute a list of display lists

gl:callLists 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.

See external documentation.

Types

Base = integer()

set the display-list base for

gl:callLists/1

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

See external documentation.

Types

Mode = enum()

Delimit the vertices of a primitive or a group of like primitives

gl:'begin' and gl:'begin'/1 delimit the vertices that define a primitive or a group of like primitives. gl:'begin' 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:

See external documentation.

See 'begin'/1

Types

X = float()
Y = float()

Specify a vertex

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

See external documentation.

Types

X = float()
Y = float()

Types

X = integer()
Y = integer()

Types

X = integer()
Y = integer()

Types

X = float()
Y = float()
Z = float()

Types

X = float()
Y = float()
Z = float()

Types

X = integer()
Y = integer()
Z = integer()

Types

X = integer()
Y = integer()
Z = integer()

Types

X = float()
Y = float()
Z = float()
W = float()

Types

X = float()
Y = float()
Z = float()
W = float()

Types

X = integer()
Y = integer()
Z = integer()
W = integer()

Types

X = integer()
Y = integer()
Z = integer()
W = integer()

Types

V = {X::float(), Y::float()}

Equivalent to vertex2d(X, Y).

Types

V = {X::float(), Y::float()}

Equivalent to vertex2f(X, Y).

Types

V = {X::integer(), Y::integer()}

Equivalent to vertex2i(X, Y).

Types

V = {X::integer(), Y::integer()}

Equivalent to vertex2s(X, Y).

Types

V = {X::float(), Y::float(), Z::float()}

Equivalent to vertex3d(X, Y, Z).

Types

V = {X::float(), Y::float(), Z::float()}

Equivalent to vertex3f(X, Y, Z).

Types

V = {X::integer(), Y::integer(), Z::integer()}

Equivalent to vertex3i(X, Y, Z).

Types

V = {X::integer(), Y::integer(), Z::integer()}

Equivalent to vertex3s(X, Y, Z).

Types

V = {X::float(), Y::float(), Z::float(), W::float()}

Equivalent to vertex4d(X, Y, Z, W).

Types

V = {X::float(), Y::float(), Z::float(), W::float()}

Equivalent to vertex4f(X, Y, Z, W).

Types

V = {X::integer(), Y::integer(), Z::integer(), W::integer()}

Equivalent to vertex4i(X, Y, Z, W).

Types

V = {X::integer(), Y::integer(), Z::integer(), W::integer()}

Equivalent to vertex4s(X, Y, Z, W).

Types

Nx = integer()
Ny = integer()
Nz = integer()

Set the current normal vector

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

See external documentation.

Types

Nx = float()
Ny = float()
Nz = float()

Types

Nx = float()
Ny = float()
Nz = float()

Types

Nx = integer()
Ny = integer()
Nz = integer()

Types

Nx = integer()
Ny = integer()
Nz = integer()

Types

V = {Nx::integer(), Ny::integer(), Nz::integer()}

Equivalent to normal3b(Nx, Ny, Nz).

Types

V = {Nx::float(), Ny::float(), Nz::float()}

Equivalent to normal3d(Nx, Ny, Nz).

Types

V = {Nx::float(), Ny::float(), Nz::float()}

Equivalent to normal3f(Nx, Ny, Nz).

Types

V = {Nx::integer(), Ny::integer(), Nz::integer()}

Equivalent to normal3i(Nx, Ny, Nz).

Types

V = {Nx::integer(), Ny::integer(), Nz::integer()}

Equivalent to normal3s(Nx, Ny, Nz).

Types

C = float()

Set the current color index

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

See external documentation.

Types

C = float()

See indexd/1

Types

C = integer()

See indexd/1

Types

C = integer()

See indexd/1

Types

C = integer()

See indexd/1

Types

C = {C::float()}

Equivalent to indexd(C).

Types

C = {C::float()}

Equivalent to indexf(C).

Types

C = {C::integer()}

Equivalent to indexi(C).

Types

C = {C::integer()}

Equivalent to indexs(C).

Types

C = {C::integer()}

Equivalent to indexub(C).

Types

Red = integer()
Green = integer()
Blue = integer()

Set the current color

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.

See external documentation.

Types

Red = float()
Green = float()
Blue = float()

See color3b/3

Types

Red = float()
Green = float()
Blue = float()

See color3b/3

Types

Red = integer()
Green = integer()
Blue = integer()

See color3b/3

Types

Red = integer()
Green = integer()
Blue = integer()

See color3b/3

Types

Red = integer()
Green = integer()
Blue = integer()

See color3b/3

Types

Red = integer()
Green = integer()
Blue = integer()

See color3b/3

Types

Red = integer()
Green = integer()
Blue = integer()

See color3b/3

Types

Red = integer()
Green = integer()
Blue = integer()
Alpha = integer()

See color3b/3

Types

Red = float()
Green = float()
Blue = float()
Alpha = float()

See color3b/3

Types

Red = float()
Green = float()
Blue = float()
Alpha = float()

See color3b/3

Types

Red = integer()
Green = integer()
Blue = integer()
Alpha = integer()

See color3b/3

Types

Red = integer()
Green = integer()
Blue = integer()
Alpha = integer()

See color3b/3

Types

Red = integer()
Green = integer()
Blue = integer()
Alpha = integer()

See color3b/3

Types

Red = integer()
Green = integer()
Blue = integer()
Alpha = integer()

See color3b/3

Types

Red = integer()
Green = integer()
Blue = integer()
Alpha = integer()

See color3b/3

Types

V = {Red::integer(), Green::integer(), Blue::integer()}

Equivalent to color3b(Red, Green, Blue).

Types

V = {Red::float(), Green::float(), Blue::float()}

Equivalent to color3d(Red, Green, Blue).

Types

V = {Red::float(), Green::float(), Blue::float()}

Equivalent to color3f(Red, Green, Blue).

Types

V = {Red::integer(), Green::integer(), Blue::integer()}

Equivalent to color3i(Red, Green, Blue).

Types

V = {Red::integer(), Green::integer(), Blue::integer()}

Equivalent to color3s(Red, Green, Blue).

Types

V = {Red::integer(), Green::integer(), Blue::integer()}

Types

V = {Red::integer(), Green::integer(), Blue::integer()}

Types

V = {Red::integer(), Green::integer(), Blue::integer()}

Types

V = {Red::integer(), Green::integer(), Blue::integer(), Alpha::integer()}

Types

V = {Red::float(), Green::float(), Blue::float(), Alpha::float()}

Types

V = {Red::float(), Green::float(), Blue::float(), Alpha::float()}

Types

V = {Red::integer(), Green::integer(), Blue::integer(), Alpha::integer()}

Types

V = {Red::integer(), Green::integer(), Blue::integer(), Alpha::integer()}

Types

V = {Red::integer(), Green::integer(), Blue::integer(), Alpha::integer()}

Types

V = {Red::integer(), Green::integer(), Blue::integer(), Alpha::integer()}

Types

V = {Red::integer(), Green::integer(), Blue::integer(), Alpha::integer()}

Types

S = float()

Set the current texture coordinates

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

See external documentation.

Types

S = float()

Types

S = integer()

Types

S = integer()

Types

S = float()
T = float()

Types

S = float()
T = float()

Types

S = integer()
T = integer()

Types

S = integer()
T = integer()

Types

S = float()
T = float()
R = float()

Types

S = float()
T = float()
R = float()

Types

S = integer()
T = integer()
R = integer()

Types

S = integer()
T = integer()
R = integer()

Types

S = float()
T = float()
R = float()
Q = float()

Types

S = float()
T = float()
R = float()
Q = float()

Types

S = integer()
T = integer()
R = integer()
Q = integer()

Types

S = integer()
T = integer()
R = integer()
Q = integer()

Types

V = {S::float()}

Equivalent to texCoord1d(S).

Types

V = {S::float()}

Equivalent to texCoord1f(S).

Types

V = {S::integer()}

Equivalent to texCoord1i(S).

Types

V = {S::integer()}

Equivalent to texCoord1s(S).

Types

V = {S::float(), T::float()}

Equivalent to texCoord2d(S, T).

Types

V = {S::float(), T::float()}

Equivalent to texCoord2f(S, T).

Types

V = {S::integer(), T::integer()}

Equivalent to texCoord2i(S, T).

Types

V = {S::integer(), T::integer()}

Equivalent to texCoord2s(S, T).

Types

V = {S::float(), T::float(), R::float()}

Equivalent to texCoord3d(S, T, R).

Types

V = {S::float(), T::float(), R::float()}

Equivalent to texCoord3f(S, T, R).

Types

V = {S::integer(), T::integer(), R::integer()}

Equivalent to texCoord3i(S, T, R).

Types

V = {S::integer(), T::integer(), R::integer()}

Equivalent to texCoord3s(S, T, R).

Types

V = {S::float(), T::float(), R::float(), Q::float()}

Equivalent to texCoord4d(S, T, R, Q).

Types

V = {S::float(), T::float(), R::float(), Q::float()}

Equivalent to texCoord4f(S, T, R, Q).

Types

V = {S::integer(), T::integer(), R::integer(), Q::integer()}

Equivalent to texCoord4i(S, T, R, Q).

Types

V = {S::integer(), T::integer(), R::integer(), Q::integer()}

Equivalent to texCoord4s(S, T, R, Q).

Types

X = float()
Y = float()

Specify the raster position for pixel operations

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

See external documentation.

Types

X = float()
Y = float()

Types

X = integer()
Y = integer()

Types

X = integer()
Y = integer()

Types

X = float()
Y = float()
Z = float()

Types

X = float()
Y = float()
Z = float()

Types

X = integer()
Y = integer()
Z = integer()

Types

X = integer()
Y = integer()
Z = integer()

Types

X = float()
Y = float()
Z = float()
W = float()

Types

X = float()
Y = float()
Z = float()
W = float()

Types

X = integer()
Y = integer()
Z = integer()
W = integer()

Types

X = integer()
Y = integer()
Z = integer()
W = integer()

Types

V = {X::float(), Y::float()}

Equivalent to rasterPos2d(X, Y).

Types

V = {X::float(), Y::float()}

Equivalent to rasterPos2f(X, Y).

Types

V = {X::integer(), Y::integer()}

Equivalent to rasterPos2i(X, Y).

Types

V = {X::integer(), Y::integer()}

Equivalent to rasterPos2s(X, Y).

Types

V = {X::float(), Y::float(), Z::float()}

Equivalent to rasterPos3d(X, Y, Z).

Types

V = {X::float(), Y::float(), Z::float()}

Equivalent to rasterPos3f(X, Y, Z).

Types

V = {X::integer(), Y::integer(), Z::integer()}

Equivalent to rasterPos3i(X, Y, Z).

Types

V = {X::integer(), Y::integer(), Z::integer()}

Equivalent to rasterPos3s(X, Y, Z).

Types

V = {X::float(), Y::float(), Z::float(), W::float()}

Equivalent to rasterPos4d(X, Y, Z, W).

Types

V = {X::float(), Y::float(), Z::float(), W::float()}

Equivalent to rasterPos4f(X, Y, Z, W).

Types

V = {X::integer(), Y::integer(), Z::integer(), W::integer()}

Equivalent to rasterPos4i(X, Y, Z, W).

Types

V = {X::integer(), Y::integer(), Z::integer(), W::integer()}

Equivalent to rasterPos4s(X, Y, Z, W).

Types

X1 = float()
Y1 = float()
X2 = float()
Y2 = float()

Draw a rectangle

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

See external documentation.

Types

X1 = float()
Y1 = float()
X2 = float()
Y2 = float()

See rectd/4

Types

X1 = integer()
Y1 = integer()
X2 = integer()
Y2 = integer()

See rectd/4

Types

X1 = integer()
Y1 = integer()
X2 = integer()
Y2 = integer()

See rectd/4

Types

V1 = {float(), float()}
V2 = {float(), float()}

See rectd/4

Types

V1 = {float(), float()}
V2 = {float(), float()}

See rectd/4

Types

V1 = {integer(), integer()}
V2 = {integer(), integer()}

See rectd/4

Types

V1 = {integer(), integer()}
V2 = {integer(), integer()}

See rectd/4

Types

Size = integer()
Type = enum()
Stride = integer()
Ptr = offset() | mem()

Define an array of vertex data

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

See external documentation.

Types

Type = enum()
Stride = integer()
Ptr = offset() | mem()

Define an array of normals

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

See external documentation.

Types

Size = integer()
Type = enum()
Stride = integer()
Ptr = offset() | mem()

Define an array of colors

gl:colorPointer 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 .)

See external documentation.

Types

Type = enum()
Stride = integer()
Ptr = offset() | mem()

Define an array of color indexes

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

See external documentation.

Types

Size = integer()
Type = enum()
Stride = integer()
Ptr = offset() | mem()

Define an array of texture coordinates

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

See external documentation.

Types

Stride = integer()
Ptr = offset() | mem()

Define an array of edge flags

gl:edgeFlagPointer 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.

See external documentation.

Types

I = integer()

Render a vertex using the specified vertex array element

gl:arrayElement commands are used within gl:'begin'/1 / gl:'begin'/1 pairs to specify vertex and attribute data for point, line, and polygon primitives. If ?GL_VERTEX_ARRAY is enabled when gl:arrayElement 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.

See external documentation.

Types

Mode = enum()
First = integer()
Count = integer()

Render primitives from array data

gl:drawArrays 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 .

See external documentation.

Types

Mode = enum()
Count = integer()
Type = enum()
Indices = offset() | mem()

Render primitives from array data

gl:drawElements 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 .

See external documentation.

Types

Format = enum()
Stride = integer()
Pointer = offset() | mem()

Simultaneously specify and enable several interleaved arrays

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

See external documentation.

Types

Mode = enum()

Select flat or smooth shading

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

See external documentation.

Types

Light = enum()
Pname = enum()
Param = float()

Set light source parameters

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

See external documentation.

Types

Light = enum()
Pname = enum()
Param = integer()

See lightf/3

Types

Light = enum()
Pname = enum()
Params = tuple()

See lightf/3

Types

Light = enum()
Pname = enum()
Params = tuple()

See lightf/3

Types

Light = enum()
Pname = enum()

Return light source parameter values

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

See external documentation.

Types

Light = enum()
Pname = enum()

Types

Pname = enum()
Param = float()

Set the lighting model parameters

gl:lightModel sets the lighting model parameter. Pname names a parameter and Params gives the new value. There are three lighting model parameters:

See external documentation.

Types

Pname = enum()
Param = integer()

Types

Pname = enum()
Params = tuple()

Types

Pname = enum()
Params = tuple()

Types

Face = enum()
Pname = enum()
Param = float()

Specify material parameters for the lighting model

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

See external documentation.

Types

Face = enum()
Pname = enum()
Param = integer()

Types

Face = enum()
Pname = enum()
Params = tuple()

Types

Face = enum()
Pname = enum()
Params = tuple()

Types

Face = enum()
Pname = enum()

Return material parameters

gl:getMaterial returns in Params the value or values of parameter Pname of material Face . Six parameters are defined:

See external documentation.

Types

Face = enum()
Pname = enum()

Types

Face = enum()
Mode = enum()

Cause a material color to track the current color

gl:colorMaterial 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.

See external documentation.

Types

Xfactor = float()
Yfactor = float()

Specify the pixel zoom factors

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

See external documentation.

Types

Pname = enum()
Param = float()

Set pixel storage modes

gl:pixelStore sets pixel storage modes that affect the operation of subsequent gl:readPixels/7 as well as the unpacking of texture patterns (see gl:texImage1D/8 , gl:texImage2D/9 , gl:texImage3D/10 , gl:texSubImage1D/7 , gl:texSubImage1D/7 , gl:texSubImage1D/7 ), gl:compressedTexImage1D/7 , gl:compressedTexImage2D/8 , gl:compressedTexImage3D/9 , gl:compressedTexSubImage1D/7 , gl:compressedTexSubImage2D/9 or gl:compressedTexSubImage1D/7 .

See external documentation.

Types

Pname = enum()
Param = integer()

Types

Pname = enum()
Param = float()

Set pixel transfer modes

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

See external documentation.

Types

Pname = enum()
Param = integer()

Types

Map = enum()
Mapsize = integer()
Values = binary()

Set up pixel transfer maps

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

See external documentation.

Types

Map = enum()
Mapsize = integer()
Values = binary()

Types

Map = enum()
Mapsize = integer()
Values = binary()

Types

Map = enum()
Values = mem()

Return the specified pixel map

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

See external documentation.

Types

Map = enum()
Values = mem()

Types

Map = enum()
Values = mem()

Types

Width = integer()
Height = integer()
Xorig = float()
Yorig = float()
Xmove = float()
Ymove = float()
Bitmap = offset() | mem()

Draw a bitmap

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.

See external documentation.

Types

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

Read a block of pixels from the frame buffer

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

See external documentation.

Types

Width = integer()
Height = integer()
Format = enum()
Type = enum()
Pixels = offset() | mem()

Write a block of pixels to the frame buffer

gl:drawPixels 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:rasterPos2d/2 or gl:windowPos2d/2 to set the current raster position; use gl:getBooleanv/1 with argument ?GL_CURRENT_RASTER_POSITION_VALID to determine if the specified raster position is valid, and gl:getBooleanv/1 with argument ?GL_CURRENT_RASTER_POSITION to query the raster position.

See external documentation.

Types

X = integer()
Y = integer()
Width = integer()
Height = integer()
Type = enum()

Copy pixels in the frame buffer

gl:copyPixels 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.

See external documentation.

Types

Func = enum()
Ref = integer()
Mask = integer()

Set front and back function and reference value for stencil testing

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

See external documentation.

Types

Mask = integer()

Control the front and back writing of individual bits in the stencil planes

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

See external documentation.

Types

Fail = enum()
Zfail = enum()
Zpass = enum()

Set front and back stencil test actions

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

See external documentation.

Types

S = integer()

Specify the clear value for the stencil buffer

gl:clearStencil 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.

See external documentation.

Types

Coord = enum()
Pname = enum()
Param = float()

Control the generation of texture coordinates

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

See external documentation.

Types

Coord = enum()
Pname = enum()
Param = float()

See texGend/3

Types

Coord = enum()
Pname = enum()
Param = integer()

See texGend/3

Types

Coord = enum()
Pname = enum()
Params = tuple()

See texGend/3

Types

Coord = enum()
Pname = enum()
Params = tuple()

See texGend/3

Types

Coord = enum()
Pname = enum()
Params = tuple()

See texGend/3

Types

Coord = enum()
Pname = enum()

Return texture coordinate generation parameters

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

See external documentation.

Types

Coord = enum()
Pname = enum()

Types

Coord = enum()
Pname = enum()

Types

Target = enum()
Pname = enum()
Param = float()

glTexEnvf

See external documentation.

Types

Target = enum()
Pname = enum()
Param = integer()

glTexEnvi

See external documentation.

Types

Target = enum()
Pname = enum()
Params = tuple()

Set texture environment parameters

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

See external documentation.

Types

Target = enum()
Pname = enum()
Params = tuple()

Types

Target = enum()
Pname = enum()

Return texture environment parameters

gl:getTexEnv returns in Params selected values of a texture environment that was specified with gl:texEnvfv/3 . Target specifies a texture environment.

See external documentation.

Types

Target = enum()
Pname = enum()

Types

Target = enum()
Pname = enum()
Param = float()

Set texture parameters

gl:texParameter assigns the value or values in Params to the texture parameter specified as Pname . Target defines the target texture, either ?GL_TEXTURE_1D , ?GL_TEXTURE_2D, ?GL_TEXTURE_1D_ARRAY, ?GL_TEXTURE_2D_ARRAY, ?GL_TEXTURE_RECTANGLE , or ?GL_TEXTURE_3D. The following symbols are accepted in Pname :

See external documentation.

Types

Target = enum()
Pname = enum()
Param = integer()

Types

Target = enum()
Pname = enum()
Params = tuple()

Types

Target = enum()
Pname = enum()
Params = tuple()

Types

Target = enum()
Pname = enum()

Return texture parameter values

gl:getTexParameter returns in Params the value or values of the texture parameter specified as Pname . Target defines the target texture. ?GL_TEXTURE_1D, ?GL_TEXTURE_2D, ?GL_TEXTURE_3D, ?GL_TEXTURE_1D_ARRAY, ?GL_TEXTURE_2D_ARRAY , ?GL_TEXTURE_RECTANGLE, ?GL_TEXTURE_CUBE_MAP, ?GL_TEXTURE_CUBE_MAP_ARRAY specify one-, two-, or three-dimensional, one-dimensional array, two-dimensional array, rectangle, cube-mapped or cube-mapped array texturing, respectively. Pname accepts the same symbols as gl:texParameterf/3 , with the same interpretations:

See external documentation.

Types

Target = enum()
Pname = enum()

Types

Target = enum()
Level = integer()
Pname = enum()

Return texture parameter values for a specific level of detail

gl:getTexLevelParameter returns in Params texture parameter values for a specific level-of-detail value, specified as Level . Target defines the target texture, either ?GL_TEXTURE_1D, ?GL_TEXTURE_2D, ?GL_TEXTURE_3D, ?GL_PROXY_TEXTURE_1D , ?GL_PROXY_TEXTURE_2D, ?GL_PROXY_TEXTURE_3D, ?GL_TEXTURE_CUBE_MAP_POSITIVE_X , ?GL_TEXTURE_CUBE_MAP_NEGATIVE_X, ?GL_TEXTURE_CUBE_MAP_POSITIVE_Y, ?GL_TEXTURE_CUBE_MAP_NEGATIVE_Y , ?GL_TEXTURE_CUBE_MAP_POSITIVE_Z, ?GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, or ?GL_PROXY_TEXTURE_CUBE_MAP .

See external documentation.

Types

Target = enum()
Level = integer()
Pname = enum()

Types

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

Specify a one-dimensional texture image

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

See external documentation.

Types

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

Specify a two-dimensional texture image

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

See external documentation.

Types

Target = enum()
Level = integer()
Format = enum()
Type = enum()
Pixels = mem()

Return a texture image

gl:getTexImage returns a texture image into Img . Target specifies whether the desired texture image is one specified by gl:texImage1D/8 (?GL_TEXTURE_1D ), gl:texImage2D/9 (?GL_TEXTURE_1D_ARRAY, ?GL_TEXTURE_RECTANGLE, ?GL_TEXTURE_2D or any of ?GL_TEXTURE_CUBE_MAP_*), or gl:texImage3D/10 (?GL_TEXTURE_2D_ARRAY , ?GL_TEXTURE_3D). Level specifies the level-of-detail number of the desired image. Format and Type specify the format and type of the desired image array. See the reference page for gl:texImage1D/8 for a description of the acceptable values for the Format and Type parameters, respectively.

See external documentation.

Types

N = integer()

Generate texture names

gl:genTextures 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.

See external documentation.

Types

Textures = [integer()]

Delete named textures

gl:deleteTextures 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).

See external documentation.

Types

Target = enum()
Texture = integer()

Bind a named texture to a texturing target

gl:bindTexture lets you create or use a named texture. Calling gl:bindTexture with Target set to ?GL_TEXTURE_1D, ?GL_TEXTURE_2D, ?GL_TEXTURE_3D , or ?GL_TEXTURE_1D_ARRAY, ?GL_TEXTURE_2D_ARRAY, ?GL_TEXTURE_RECTANGLE , ?GL_TEXTURE_CUBE_MAP, ?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.

See external documentation.

Types

Textures = [integer()]
Priorities = [clamp()]

Set texture residence priority

gl:prioritizeTextures assigns the N texture priorities given in Priorities to the N textures named in Textures .

See external documentation.

Types

Textures = [integer()]

Determine if textures are loaded in texture memory

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.

See external documentation.

Types

Texture = integer()

Determine if a name corresponds to a texture

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

See external documentation.

Types

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

glTexSubImage

See external documentation.

Types

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

glTexSubImage

See external documentation.

Types

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

Copy pixels into a 1D texture image

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

See external documentation.

Types

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

Copy pixels into a 2D texture image

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

See external documentation.

Types

Target = enum()
Level = integer()
Xoffset = integer()
X = integer()
Y = integer()
Width = integer()

Copy a one-dimensional texture subimage

gl:copyTexSubImage1D replaces 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 ).

See external documentation.

Types

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

Copy a two-dimensional texture subimage

gl:copyTexSubImage2D replaces a rectangular portion of a two-dimensional texture image or cube-map texture image with pixels from the current ?GL_READ_BUFFER (rather than from main memory, as is the case for gl:texSubImage1D/7 ).

See external documentation.

Types

Target = enum()
U1 = float()
U2 = float()
Stride = integer()
Order = integer()
Points = binary()

glMap

See external documentation.

Types

Target = enum()
U1 = float()
U2 = float()
Stride = integer()
Order = integer()
Points = binary()

glMap

See external documentation.

Types

Target = enum()
U1 = float()
U2 = float()
Ustride = integer()
Uorder = integer()
V1 = float()
V2 = float()
Vstride = integer()
Vorder = integer()
Points = binary()

glMap

See external documentation.

Types

Target = enum()
U1 = float()
U2 = float()
Ustride = integer()
Uorder = integer()
V1 = float()
V2 = float()
Vstride = integer()
Vorder = integer()
Points = binary()

glMap

See external documentation.

Types

Target = enum()
Query = enum()
V = mem()

Return evaluator parameters

gl:map1d/6 and gl:map1d/6 define evaluators. gl:getMap returns evaluator parameters. Target chooses a map, Query selects a specific parameter, and V points to storage where the values will be returned.

See external documentation.

Types

Target = enum()
Query = enum()
V = mem()

Types

Target = enum()
Query = enum()
V = mem()

Types

U = float()

Evaluate enabled one- and two-dimensional maps

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:map1d/6 and gl:map1d/6 ; to enable and disable it, call gl:enable/1 and gl:enable/1 .

See external documentation.

Types

U = float()

Types

U = {U::float()}

Equivalent to evalCoord1d(U).

Types

U = {U::float()}

Equivalent to evalCoord1f(U).

Types

U = float()
V = float()

Types

U = float()
V = float()

Types

U = {U::float(), V::float()}

Equivalent to evalCoord2d(U, V).

Types

U = {U::float(), V::float()}

Equivalent to evalCoord2f(U, V).

Types

Un = integer()
U1 = float()
U2 = float()

Define a one- or two-dimensional mesh

gl:mapGrid and gl:evalMesh1/3 are used together to efficiently generate and evaluate a series of evenly-spaced map domain values. gl:evalMesh1/3 steps through the integer domain of a one- or two-dimensional grid, whose range is the domain of the evaluation maps specified by gl:map1d/6 and gl:map1d/6 .

See external documentation.

Types

Un = integer()
U1 = float()
U2 = float()

Types

Un = integer()
U1 = float()
U2 = float()
Vn = integer()
V1 = float()
V2 = float()

Types

Un = integer()
U1 = float()
U2 = float()
Vn = integer()
V1 = float()
V2 = float()

Types

I = integer()

Generate and evaluate a single point in a mesh

gl:mapGrid1d/3 and gl:evalMesh1/3 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:evalMesh1/3 . Calling gl:evalPoint1 is equivalent to calling glEvalCoord1( i.&Delta; u+u 1 ); where &Delta; u=(u 2-u 1)/n

See external documentation.

Types

I = integer()
J = integer()

Types

Mode = enum()
I1 = integer()
I2 = integer()

Compute a one- or two-dimensional grid of points or lines

gl:mapGrid1d/3 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:map1d/6 and gl:map1d/6 . Mode determines whether the resulting vertices are connected as points, lines, or filled polygons.

See external documentation.

Types

Mode = enum()
I1 = integer()
I2 = integer()
J1 = integer()
J2 = integer()

Types

Pname = enum()
Param = float()

Specify fog parameters

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:enable/1 with argument ?GL_FOG.

See external documentation.

Types

Pname = enum()
Param = integer()

See fogf/2

Types

Pname = enum()
Params = tuple()

See fogf/2

Types

Pname = enum()
Params = tuple()

See fogf/2

Types

Size = integer()
Type = enum()
Buffer = mem()

Controls feedback mode

The gl:feedbackBuffer 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.

See external documentation.

Types

Token = float()

Place a marker in the feedback buffer

See external documentation.

Types

Size = integer()
Buffer = mem()

Establish a buffer for selection mode values

gl:selectBuffer has two arguments: Buffer is a pointer to an array of unsigned integers, and Size indicates the size of the array. Buffer returns values from the name stack (see gl:initNames/0 , gl:loadName/1 , gl:pushName/1 ) when the rendering mode is ?GL_SELECT (see gl:renderMode/1 ). gl:selectBuffer must be issued before selection mode is enabled, and it must not be issued while the rendering mode is ?GL_SELECT.

See external documentation.

Initialize the name stack

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

See external documentation.

Types

Name = integer()

Load a name onto the name stack

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

See external documentation.

Types

Name = integer()

Push and pop the name stack

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

See external documentation.

Types

Red = clamp()
Green = clamp()
Blue = clamp()
Alpha = clamp()

Set the blend color

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).

See external documentation.

Types

Mode = enum()

Specify the equation used for both the RGB blend equation and the Alpha blend equation

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 specifies the blend equation for a single draw buffer whereas gl:blendEquation sets the blend equation for all draw buffers.

See external documentation.

Types

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

Render primitives from array data

gl:drawRangeElements is a restricted form of gl:drawElements/4 . Mode , Start , End , 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.

See external documentation.

Types

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

Specify a three-dimensional texture image

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

See external documentation.

Types

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

glTexSubImage

See external documentation.

Types

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

Copy a three-dimensional texture subimage

gl:copyTexSubImage3D replaces a rectangular portion of a three-dimensional texture image with pixels from the current ?GL_READ_BUFFER (rather than from main memory, as is the case for gl:texSubImage1D/7 ).

See external documentation.

Types

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

Define a color lookup table

gl:colorTable 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.

See external documentation.

Types

Target = enum()
Pname = enum()
Params = {float(), float(), float(), float()}

Set color lookup table parameters

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.

See external documentation.

Types

Target = enum()
Pname = enum()
Params = {integer(), integer(), integer(), integer()}

Types

Target = enum()
Internalformat = enum()
X = integer()
Y = integer()
Width = integer()

Copy pixels into a color table

gl:copyColorTable 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 ).

See external documentation.

Types

Target = enum()
Format = enum()
Type = enum()
Table = mem()

Retrieve contents of a color lookup table

gl:getColorTable 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.

See external documentation.

Types

Target = enum()
Pname = enum()

Get color lookup table parameters

Returns parameters specific to color table Target .

See external documentation.

Types

Target = enum()
Pname = enum()

Types

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

Respecify a portion of a color table

gl:colorSubTable 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.

See external documentation.

Types

Target = enum()
Start = integer()
X = integer()
Y = integer()
Width = integer()

Respecify a portion of a color table

gl:copyColorSubTable 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.

See external documentation.

Types

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

Define a one-dimensional convolution filter

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

See external documentation.

Types

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

Define a two-dimensional convolution filter

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

See external documentation.

Types

Target = enum()
Pname = enum()
Params = tuple()

Set convolution parameters

gl:convolutionParameter sets the value of a convolution parameter.

See external documentation.

Types

Params = {Params::tuple()}

Types

Target = enum()
Pname = enum()
Params = tuple()

Types

Params = {Params::tuple()}

Types

Target = enum()
Internalformat = enum()
X = integer()
Y = integer()
Width = integer()

Copy pixels into a one-dimensional convolution filter

gl:copyConvolutionFilter1D 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 ).

See external documentation.

Types

Target = enum()
Internalformat = enum()
X = integer()
Y = integer()
Width = integer()
Height = integer()

Copy pixels into a two-dimensional convolution filter

gl:copyConvolutionFilter2D 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 ).

See external documentation.

Types

Target = enum()
Format = enum()
Type = enum()
Image = mem()

Get current 1D or 2D convolution filter kernel

gl:getConvolutionFilter 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.

See external documentation.

Types

Target = enum()
Pname = enum()

Get convolution parameters

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

See external documentation.

Types

Target = enum()
Pname = enum()

Types

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

Define a separable two-dimensional convolution filter

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

See external documentation.

Types

Target = enum()
Reset = 0 | 1
Format = enum()
Type = enum()
Values = mem()

Get histogram table

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

See external documentation.

Types

Target = enum()
Pname = enum()

Get histogram parameters

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

See external documentation.

Types

Target = enum()
Pname = enum()

Types

Target = enum()
Reset = 0 | 1
Format = enum()
Types = enum()
Values = mem()

Get minimum and maximum pixel values

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

See external documentation.

Types

Target = enum()
Pname = enum()

Get minmax parameters

gl:getMinmaxParameter retrieves parameters for the current minmax table by setting Pname to one of the following values:

See external documentation.

Types

Target = enum()
Pname = enum()

Types

Target = enum()
Width = integer()
Internalformat = enum()
Sink = 0 | 1

Define histogram table

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

See external documentation.

Types

Target = enum()
Internalformat = enum()
Sink = 0 | 1

Define minmax table

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

See external documentation.

Types

Target = enum()

Reset histogram table entries to zero

gl:resetHistogram resets all the elements of the current histogram table to zero.

See external documentation.

Types

Target = enum()

Reset minmax table entries to initial values

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

See external documentation.

Types

Texture = enum()

Select active texture unit

gl:activeTexture 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.

See external documentation.

Types

Value = clamp()
Invert = 0 | 1

Specify multisample coverage parameters

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

See external documentation.

Types

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

Specify a three-dimensional texture image in a compressed format

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

See external documentation.

Types

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

Specify a two-dimensional texture image in a compressed format

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

See external documentation.

Types

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

Specify a one-dimensional texture image in a compressed format

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

See external documentation.

Types

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

Specify a three-dimensional texture subimage in a compressed format

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

See external documentation.

Types

Target = enum()
Level = integer()
Xoffset = integer()
Yoffset = integer()
Width = integer()
Height = integer()
Format = enum()
ImageSize = integer()
Data = offset() | mem()

Specify a two-dimensional texture subimage in a compressed format

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

See external documentation.

Types

Target = enum()
Level = integer()
Xoffset = integer()
Width = integer()
Format = enum()
ImageSize = integer()
Data = offset() | mem()

Specify a one-dimensional texture subimage in a compressed format

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

See external documentation.

Types

Target = enum()
Lod = integer()
Img = mem()

Return a compressed texture image

gl:getCompressedTexImage returns the compressed texture image associated with Target and Lod into Img . Img should be an array of ?GL_TEXTURE_COMPRESSED_IMAGE_SIZE bytes. Target specifies whether the desired texture image was one specified by gl:texImage1D/8 (?GL_TEXTURE_1D), gl:texImage2D/9 (?GL_TEXTURE_2D or any of ?GL_TEXTURE_CUBE_MAP_* ), or gl:texImage3D/10 (?GL_TEXTURE_3D). Lod specifies the level-of-detail number of the desired image.

See external documentation.

Types

Texture = enum()

Select active texture unit

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

See external documentation.

Types

Target = enum()
S = float()

Set the current texture coordinates

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

See external documentation.

Types

V = {S::float()}

Types

Target = enum()
S = float()

Types

V = {S::float()}

Types

Target = enum()
S = integer()

Types

V = {S::integer()}

Types

Target = enum()
S = integer()

Types

V = {S::integer()}

Types

Target = enum()
S = float()
T = float()

Types

V = {S::float(), T::float()}

Types

Target = enum()
S = float()
T = float()

Types

V = {S::float(), T::float()}

Types

Target = enum()
S = integer()
T = integer()

Types

V = {S::integer(), T::integer()}

Types

Target = enum()
S = integer()
T = integer()

Types

V = {S::integer(), T::integer()}

Types

Target = enum()
S = float()
T = float()
R = float()

Types

V = {S::float(), T::float(), R::float()}

Types

Target = enum()
S = float()
T = float()
R = float()

Types

V = {S::float(), T::float(), R::float()}

Types

Target = enum()
S = integer()
T = integer()
R = integer()

Types

V = {S::integer(), T::integer(), R::integer()}

Types

Target = enum()
S = integer()
T = integer()
R = integer()

Types

V = {S::integer(), T::integer(), R::integer()}

Types

Target = enum()
S = float()
T = float()
R = float()
Q = float()

Types

V = {S::float(), T::float(), R::float(), Q::float()}

Types

Target = enum()
S = float()
T = float()
R = float()
Q = float()

Types

V = {S::float(), T::float(), R::float(), Q::float()}

Types

Target = enum()
S = integer()
T = integer()
R = integer()
Q = integer()

Types

V = {S::integer(), T::integer(), R::integer(), Q::integer()}

Types

Target = enum()
S = integer()
T = integer()
R = integer()
Q = integer()

Types

V = {S::integer(), T::integer(), R::integer(), Q::integer()}

Types

M = matrix()

Replace the current matrix with the specified row-major ordered matrix

gl:loadTransposeMatrix replaces the current matrix with the one whose elements are specified by M . The current matrix is the projection matrix, modelview matrix, or texture matrix, depending on the current matrix mode (see gl:matrixMode/1 ).

See external documentation.

Types

M = matrix()

Types

M = matrix()

Multiply the current matrix with the specified row-major ordered matrix

gl:multTransposeMatrix multiplies the current matrix with the one specified using M , and replaces the current matrix with the product.

See external documentation.

Types

M = matrix()

Types

SfactorRGB = enum()
DfactorRGB = enum()
SfactorAlpha = enum()
DfactorAlpha = enum()

Specify pixel arithmetic for RGB and alpha components separately

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:enable/1 with argument ?GL_BLEND to enable and disable blending.

See external documentation.

Types

Mode = enum()
First = [integer()] | mem()
Count = [integer()] | mem()

Render multiple sets of primitives from array data

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

See external documentation.

Types

Pname = enum()
Param = float()

Specify point parameters

The following values are accepted for Pname :

See external documentation.

Types

Pname = enum()
Params = tuple()

Types

Pname = enum()
Param = integer()

Types

Pname = enum()
Params = tuple()

Types

Coord = float()

Set the current fog coordinates

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:fogf/2 ).

See external documentation.

Types

Coord = {Coord::float()}

Equivalent to fogCoordf(Coord).

Types

Coord = float()

Types

Coord = {Coord::float()}

Equivalent to fogCoordd(Coord).

Types

Type = enum()
Stride = integer()
Pointer = offset() | mem()

Define an array of fog coordinates

gl:fogCoordPointer 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.

See external documentation.

Types

Red = integer()
Green = integer()
Blue = integer()

Set the current secondary color

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

See external documentation.

Types

V = {Red::integer(), Green::integer(), Blue::integer()}

Types

Red = float()
Green = float()
Blue = float()

Types

V = {Red::float(), Green::float(), Blue::float()}

Types

Red = float()
Green = float()
Blue = float()

Types

V = {Red::float(), Green::float(), Blue::float()}

Types

Red = integer()
Green = integer()
Blue = integer()

Types

V = {Red::integer(), Green::integer(), Blue::integer()}

Types

Red = integer()
Green = integer()
Blue = integer()

Types

V = {Red::integer(), Green::integer(), Blue::integer()}

Types

Red = integer()
Green = integer()
Blue = integer()

Types

V = {Red::integer(), Green::integer(), Blue::integer()}

Types

Red = integer()
Green = integer()
Blue = integer()

Types

V = {Red::integer(), Green::integer(), Blue::integer()}

Types

Red = integer()
Green = integer()
Blue = integer()

Types

V = {Red::integer(), Green::integer(), Blue::integer()}

Types

Size = integer()
Type = enum()
Stride = integer()
Pointer = offset() | mem()

Define an array of secondary colors

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

See external documentation.

Types

X = float()
Y = float()

Specify the raster position in window coordinates for pixel operations

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

See external documentation.

Types

V = {X::float(), Y::float()}

Equivalent to windowPos2d(X, Y).

Types

X = float()
Y = float()

Types

V = {X::float(), Y::float()}

Equivalent to windowPos2f(X, Y).

Types

X = integer()
Y = integer()

Types

V = {X::integer(), Y::integer()}

Equivalent to windowPos2i(X, Y).

Types

X = integer()
Y = integer()

Types

V = {X::integer(), Y::integer()}

Equivalent to windowPos2s(X, Y).

Types

X = float()
Y = float()
Z = float()

Types

V = {X::float(), Y::float(), Z::float()}

Equivalent to windowPos3d(X, Y, Z).

Types

X = float()
Y = float()
Z = float()

Types

V = {X::float(), Y::float(), Z::float()}

Equivalent to windowPos3f(X, Y, Z).

Types

X = integer()
Y = integer()
Z = integer()

Types

V = {X::integer(), Y::integer(), Z::integer()}

Equivalent to windowPos3i(X, Y, Z).

Types

X = integer()
Y = integer()
Z = integer()

Types

V = {X::integer(), Y::integer(), Z::integer()}

Equivalent to windowPos3s(X, Y, Z).

Types

N = integer()

Generate query object names

gl:genQueries 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.

See external documentation.

Types

Ids = [integer()]

Delete named query objects

gl:deleteQueries 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 ).

See external documentation.

Types

Id = integer()

Determine if a name corresponds to a query object

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

See external documentation.

Types

Target = enum()
Id = integer()

Delimit the boundaries of a query object

gl:beginQuery and gl:beginQuery/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.

See external documentation.

Types

Target = enum()

Types

Target = enum()
Pname = enum()

glGetQuery

See external documentation.

Types

Id = integer()
Pname = enum()

Return parameters of a query object

gl:getQueryObject returns in Params a selected parameter of the query object specified by Id .

See external documentation.

Types

Id = integer()
Pname = enum()

Types

Target = enum()
Buffer = integer()

Bind a named buffer object

gl:bindBuffer binds a buffer object to the specified buffer binding point. Calling gl:bindBuffer 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.

See external documentation.

Types

Buffers = [integer()]

Delete named buffer objects

gl:deleteBuffers 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).

See external documentation.

Types

N = integer()

Generate buffer object names

gl:genBuffers returns N buffer object names in Buffers . There is no