Web Gl Cheat Sheet Page 4

ADVERTISEMENT

Uniform variables
Multisampling
getUniformLocation(
enable|disable(
Object program, string name )
SAMPLE_COVERAGE )
ulong
void
Return the location of a uniform variable.
If enabled, the fragment's coverage is ANDed with the
getActiveUniform(
temporary coverage value.
Object
Object program, ulong idx )
enable|disable(
SAMPLE_ALPHA_TO_COVERAGE )
Return information about an active uniform variable.
void
Returns an object: { size: ..., type: ..., name: ... }.
If enabled, use the alpha value at the corresponding
getUniform(
sample location to determine each bit.
any
Object program, ulong location )
sampleCoverage(
float value, bool invert )
Return the value of a uniform variable
void
uniform[1234][if](
Specify multisample coverage parameters.
ulong location, ... )
void
getParameter(
ulong pname )
Specify 1-4 float or int values of a uniform variable.
any
uniform[1234][if]v(
ulong location, Array v )
Relevant parameters:
void
Specify the value of a uniform variable as an array of
SAMPLE_COVERAGE_VALUE
1-4 float or int values.
SAMPLE_COVERAGE_INVERT
uniformMatrix[234]fv(
ulong location,
void
SAMPLE_BUFFERS
bool transpose, Object value )
SAMPLES
Specify the value of a matrix uniform variable using
Misc.
arrays of float values.
getParameter(
any
ulong pname )
viewport(
void
long x, long y, ulong w, ulong h )
Relevant parameters:
Set the viewport.
MAX_VERTEX_UNIFORM_VECTORS
lineWidth(
float width )
void
MAX_FRAGMENT_UNIFORM_VECTORS
Specify the width of rasterized lines.
flush(
void
void )
Attribute variables
Force execution of GL commands in finite time.
getAttribLocation(
finish(
Object program, string name )
void )
ulong
void
Return the location of an attribute variable.
Block until all GL execution is complete.
getActiveAttrib(
clear(
Object program, ulong idx )
ulong mask )
Object
void
Return information about an active attribute variable.
Clear buffers to preset values, mask is the bitwise OR
Returns an object: { size: ..., type: ..., name: ... }.
of one or more of
getVertexAttrib(
Object idx, ulong pname )
any
COLOR_BUFFER_BIT
DEPTH_BUFFER_BIT
Return a generic vertex attribute parameter. Accepted
STENCIL_BUFFER_BIT
pname values are:
enable|disable(
DITHER )
void
VERTEX_ATTRIB_ARRAY_ENABLED
Enable/disable dithering of color comps or indices.
VERTEX_ATTRIB_ARRAY_SIZE
colorMask(
bool red, bool green,
void
VERTEX_ATTRIB_ARRAY_STRIDE
bool blue, bool alpha )
VERTEX_ATTRIB_ARRAY_TYPE
Enable and disable writing of frame buffer color
VERTEX_ATTRIB_ARRAY_NORMALIZED
components.
VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
clearColor(
void
float red, float green,
CURRENT_VERTEX_ATTRIB
float blue, float alpha )
vertexAttribPointer(
ulong idx, long size,
void
Specify clear values for the color buffers.
ulong type, bool norm, long stride, ulong offset )
scissor(
long x, long y, ulong width, ulong height )
void
Define an array of generic vertex attribute data.
Define the scissor box.
Accepted type values are:
getError(
ulong
void )
FIXED
BYTE
UNSIGNED_BYTE
Return error information. Error values are:
FLOAT
SHORT
UNSIGNED_SHORT
OUT_OF_MEMORY
INVALID_ENUM
vertexAttrib[1234]f(
ulong idx, ... )
void
INVALID_VALUE
INVALID_OPERATION
INVALID_FRAMEBUFFER_OPERATION
Specify 1-4 float values of a generic vertex attribute.
vertexAttrib[1234]fv(
NO_ERROR
void
ulong idx, Array v )
Specify the value of a generic vertex attribute as an
getParameter(
ulong pname )
any
array of 1-4 float values.
Parameters values:
bindAttribLocation(
void
Object program, ulong idx,
VIEWPORT
string name )
MAX_VIEWPORT_DIMS
Associate a generic vertex attribute index with a
COLOR_CLEAR_VALUE
named attribute variable.
SCISSOR_BOX
enableVertexAttribArray(
ulong idx )
void
LINE_WIDTH
disableVertexAttribArray(
ulong idx )
void
ALIASED_POINT_SIZE_RANGE
Enable or disable a generic vertex attribute array
ALIASED_LINE_WIDTH_RANGE
getParameter(
ulong pname )
any
COLOR_WRITEMASK
Relevant parameters:
SUBPIXEL_BITS
MAX_VERTEX_ATTRIBS
Notes: [1] Not implemented in one or more browsers.
Sources: (2010-02-16)
(2009-10-23)
(2010-02-16)
(2010-02-16)

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go
Page of 4