WebGLRenderingContext

Draft
This page is not complete.

Summary

WebGLRenderingContext objects expose the WebGLRenderingContext interface, the principal interface in WebGL which provides special properties and methods to manipulate the 3D content rendered in an HTML canvas element.

Properties

Name Value Description
canvas HTMLCanvasElement The Canvas element associated with this context. May be null!
drawingBufferWidth int Width of the current drawing buffer. Should match the width of the canvas element associated with this context.
drawingBufferHeight int Height of the current drawing buffer. Should match the height of the canvas element associated with this context.

Constants

Todo: document the constants defined by this interface

Constant Value Description
FRAGMENT_SHADER    
VERTEX_SHADER    
COMPILE_STATUS    
DELETE_STATUS    
LINK_STATUS    
VALIDATE_STATUS    
ATTACHED_SHADERS    
ACTIVE_ATTRIBUTES    
ACTIVE_UNIFORMS    
POINTS long Passed to drawElements of drawArrays to only draw points. Point size is controlled by setting gl_PointSize in your Vertex Shader.
LINE_STRIP long Passed to drawElements of drawArrays to draw lines. Each vertex connects to the one after it.
LINE_LOOP long Passed to drawElements of drawArrays to draw lines. Each vertex connects to the one after it. Unlike LINE_STRIP, a final line segment will be drawn at the end connecting the first and last vertex.
LINES long Passed to drawElements of drawArrays to draw lines. Each set of two vertices is treated as a separate line segment.
TRIANGLE_STRIP long Passed to drawElements of drawArrays to draw triangles. Each two vertices connects to the one vertex after them.
TRIANGLE_FAN long Passed to drawElements of drawArrays to draw triangles. Each vertex connects to the previous and the first vertex in the fan.
TRIANGLES long Passed to drawElements of drawArrays to draw triangles. Each set of three vertices creates a separate triangle.
STATIC_DRAW long Passed to bufferData() as a hint about whether the contents of the buffer are likely to be used often and not change often.
STREAM_DRAW long Passed to bufferData() as a hint about whether the contents of the buffer are likely to not be used often.
DYNAMIC_DRAW long Passed to bufferData() as a hint about whether the contents of the buffer are likely to be used often and change often.
ARRAY_BUFFER long Passed to bindBuffer or bufferData to specify the type of buffer being used.
ARRAY_BUFFER_BINDING long Passed to getVertexAttrib to recall a buffer.
ELEMENT_ARRAY_BUFFER long Passed to bindBuffer or bufferData to specify the type of buffer being used.
ELEMENT_ARRAY_BUFFER_BINDING long Passed to getParameter to get the current element array buffer.
COLOR_BUFFER_BIT long Passed to clear() to clear the current color buffer
DEPTH_BUFFER_BIT long Passed to clear() to clear the current depth buffer.
STENCIL_BUFFER_BIT long Passed to clear() to clear the current stencil buffer.
NEVER long Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn.
ALWAYS long Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn.
LESS long Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value.
EQUAL long Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value.
LEQUAL long Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value.
GREATER long Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value.
GEQUAL long Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value.
NOTEQUAL long Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value.
BLEND long Passed to enable/disable to turn on/off blending. Can also be used with getParameter to find the current blending method.
ZERO long Passed to blendFunc to turn off a component.
ONE long Passed to blendFunc to turn on a component.
SRC_COLOR long Passed to blendFunc to multiply a component by the source elements color.
ONE_MINUS_SRC_COLOR long Passed to blendFunc to multiply a component by one minus the source elements color.
SRC_ALPHA long Passed to blendFunc to multiply a component by the source's alpha.
ONE_MINUS_SRC_ALPHA long Passed to blendFunc to multiply a component by one minus the source's alpha.
DST_ALPHA long Passed to blendFunc to multiply a component by the destination's alpha.
ONE_MINUS_DST_ALPHA long Passed to blendFunc to multiply a component by one minus the destination's alpha.
DST_COLOR long Passed to blendFunc to multiply a component by the destination's color.
ONE_MINUS_DST_COLOR long Passed to blendFunc to multiply a component by one minus the destination's color.
SRC_ALPHA_SATURATE long Passed to blendFunc to multiply a component by the minimum of source's alpha or one minus the destination's alpha.
FUNC_ADD long Passed to blendFuncSeparate to set the .
BLEND_EQUATION long Passed to glBlendFunctionSeparate to specify an addition blend function.
BLEND_EQUATION_RGB long Passed to getParameter to get the current rgb blend function. Same as BLEND_EQUATION
BLEND_EQUATION_ALPHA long Passed to getParameter to get the current alpha blend function. Same as BLEND_EQUATION
FUNC_SUBTRACT long Passed to glBlendFunctionSeparate to specify a subtraction blend function (source - destination).
FUNC_REVERSE_SUBTRACT long Passed to glBlendFunctionSeparate to specify a reverse subtraction blend function (destination - source).
BLEND_DST_RGB long Passed to getParameter to get the current destination rgb blend function.
BLEND_SRC_RGB long Passed to getParameter to get the current destination rgb blend function.
BLEND_DST_ALPHA long Passed to getParameter to get the current destination alpha blend function.
BLEND_SRC_ALPHA long Passed to getParameter to get the current source alpha blend function.
CONSTANT_COLOR long Passed to blendFunction to specify a constant color blend function.
ONE_MINUS_CONSTANT_COLOR long Passed to blendFunction to specify one minus a constant color blend function.
CONSTANT_ALPHA long Passed to blendFunction to specify a constant alpha blend function.
ONE_MINUS_CONSTANT_ALPHA long Passed to blendFunction to specify one minus a constant alpha blend function.
BLEND_COLOR long Passed to getParameter to return a the current blend color.
CULL_FACE long Passed to enable/disable to turn on/off culling. Can also be used with getParameter to find the current culling method.
FRONT long Passed to cullFace to specify that only front faces should be drawn.
BACK long Passed to cullFace to specify that only back faces should be drawn.
FRONT_AND_BACK long Passed to cullFace to specify that front and back faces should be drawn.
DEPTH_TEST long Passed to enable/disable to turn on/off the depth test. Can also be used with getParameter to query the depth test.
DITHER long Passed to enable/disable to turn on/off dithering. Can also be used with getParameter to find the current dithering method.
POLYGON_OFFSET_FILL long Passed to enable/disable to turn on/off the polygon offset. Useful for rendering hidden-line images, decals, and or solids with highlighted edges.
SAMPLE_ALPHA_TO_COVERAGE long Passed to enable/disable to turn on/off the alpha to coverage. Used in multi-sampling alpha channels.
SAMPLE_COVERAGE long Passed to enable/disable to turn on/off the sample coverage. Used in multi-sampling.
SCISSOR_TEST long Passed to enable/disable to turn on/off the scissor test. Can also be used with getParameter to query the scissor test.
STENCIL_TEST long Passed to enable/disable to turn on/off the stencil test. Can also be used with getParameter to query the stencil test.
BUFFER_SIZE long Passed to getBufferParameter to get a buffer's size.
BUFFER_USAGE long Passed to getBufferParameter to get the hint for the buffer passed in when it was created.
CURRENT_VERTEX_ATTRIB long Passed to getVertexAttrib to read back the current vertex attribute.
NO_ERROR long Returned from getError
INVALID_ENUM long Returned from getError
INVALID_VALUE long Returned from getError
INVALID_OPERATION long Returned from getError
OUT_OF_MEMORY long Returned from getError
CW long Passed to frontFace to specify the front face of a polygon is drawn inthe clockwise direction
CCW long Passed to frontFace to specify the front face of a polygon is drawn inthe counter clockwise direction
LINE_WIDTH long Passed to getParameter to get the current lineWidth (set by the lineWidth method).
ALIASED_POINT_SIZE_RANGE long  
ALIASED_LINE_WIDTH_RANGE long  
CULL_FACE_MODE long  
FRONT_FACE long  
DEPTH_RANGE long  
DEPTH_WRITEMASK long  
DEPTH_CLEAR_VALUE long  
DEPTH_FUNC long  
STENCIL_CLEAR_VALUE long  
STENCIL_FUNC long  
STENCIL_FAIL long  
STENCIL_PASS_DEPTH_FAIL long  
STENCIL_PASS_DEPTH_PASS long  
STENCIL_REF long  
STENCIL_VALUE_MASK long  
STENCIL_WRITEMASK long  
STENCIL_BACK_FUNC long  
STENCIL_BACK_FAIL long  
STENCIL_BACK_PASS_DEPTH_FAIL long  
STENCIL_BACK_PASS_DEPTH_PASS long  
STENCIL_BACK_REF long  
STENCIL_BACK_VALUE_MASK long  
STENCIL_BACK_WRITEMASK long  
VIEWPORT long  
SCISSOR_BOX long  
COLOR_CLEAR_VALUE long  
COLOR_WRITEMASK long  
UNPACK_ALIGNMENT long  
PACK_ALIGNMENT long  
MAX_TEXTURE_SIZE long  
MAX_VIEWPORT_DIMS long  
SUBPIXEL_BITS long  
RED_BITS long  
GREEN_BITS long  
BLUE_BITS long  
ALPHA_BITS long  
DEPTH_BITS long  
STENCIL_BITS long  
POLYGON_OFFSET_UNITS long  
POLYGON_OFFSET_FACTOR long  
TEXTURE_BINDING_2D long  
SAMPLE_BUFFERS long  
SAMPLES long  
SAMPLE_COVERAGE_VALUE long  
SAMPLE_COVERAGE_INVERT long  
TEXTURE_MAG_FILTER long  
TEXTURE_MIN_FILTER long  
TEXTURE_WRAP_S long  
TEXTURE_WRAP_T long  
COMPRESSED_TEXTURE_FORMATS long  
DONT_CARE long  
FASTEST long  
NICEST long  
GENERATE_MIPMAP_HINT long  
BYTE long  
UNSIGNED_BYTE long  
SHORT long  
UNSIGNED_SHORT long  
INT long  
UNSIGNED_INT long  
FLOAT long  
DEPTH_COMPONENT long  
ALPHA long  
RGB long  
RGBA long  
LUMINANCE long  
LUMINANCE_ALPHA long  
UNSIGNED_BYTE long  
UNSIGNED_SHORT_4_4_4_4 long  
UNSIGNED_SHORT_5_5_5_1 long  
UNSIGNED_SHORT_5_6_5 long  
MAX_VERTEX_ATTRIBS long  
MAX_VERTEX_UNIFORM_VECTORS long  
MAX_VARYING_VECTORS long  
MAX_COMBINED_TEXTURE_IMAGE_UNITS long  
MAX_VERTEX_TEXTURE_IMAGE_UNITS long  
MAX_TEXTURE_IMAGE_UNITS long  
MAX_FRAGMENT_UNIFORM_VECTORS long  
SHADER_TYPE long  
DELETE_STATUS long  
LINK_STATUS long  
VALIDATE_STATUS long  
ATTACHED_SHADERS long  
ACTIVE_UNIFORMS long  
ACTIVE_ATTRIBUTES long  
SHADING_LANGUAGE_VERSION long  
CURRENT_PROGRAM long  
KEEP long  
REPLACE long  
INCR long  
DECR long  
INVERT long  
INCR_WRAP long  
DECR_WRAP long  
VENDOR long  
RENDERER long  
VERSION long  
NEAREST long  
LINEAR long  
NEAREST long  
LINEAR long  
NEAREST_MIPMAP_NEAREST long  
LINEAR_MIPMAP_NEAREST long  
NEAREST_MIPMAP_LINEAR long  
LINEAR_MIPMAP_LINEAR long  
TEXTURE_MAG_FILTER long  
TEXTURE_MIN_FILTER long  
TEXTURE_WRAP_S long  
TEXTURE_WRAP_T long  
TEXTURE_2D long  
TEXTURE long  
TEXTURE_CUBE_MAP long  
TEXTURE_BINDING_CUBE_MAP long  
TEXTURE_CUBE_MAP_POSITIVE_X long  
TEXTURE_CUBE_MAP_NEGATIVE_X long  
TEXTURE_CUBE_MAP_POSITIVE_Y long  
TEXTURE_CUBE_MAP_NEGATIVE_Y long  
TEXTURE_CUBE_MAP_POSITIVE_Z long  
TEXTURE_CUBE_MAP_NEGATIVE_Z long  
MAX_CUBE_MAP_TEXTURE_SIZE long  
TEXTURE0 - 31 long  
ACTIVE_TEXTURE long  
REPEAT long  
CLAMP_TO_EDGE long  
MIRRORED_REPEAT long  
FLOAT_VEC2 long  
FLOAT_VEC3 long  
FLOAT_VEC4 long  
INT_VEC2 long  
INT_VEC3 long  
INT_VEC4 long  
BOOL long  
BOOL_VEC2 long  
BOOL_VEC3 long  
BOOL_VEC4 long  
FLOAT_MAT2 long  
FLOAT_MAT3 long  
FLOAT_MAT4 long  
SAMPLER_2D long  
SAMPLER_CUBE long  
VERTEX_ATTRIB_ARRAY_ENABLED long  
VERTEX_ATTRIB_ARRAY_SIZE long  
VERTEX_ATTRIB_ARRAY_STRIDE long  
VERTEX_ATTRIB_ARRAY_TYPE long  
VERTEX_ATTRIB_ARRAY_NORMALIZED long  
VERTEX_ATTRIB_ARRAY_POINTER long  
VERTEX_ATTRIB_ARRAY_BUFFER_BINDING long  
COMPILE_STATUS long  
LOW_FLOAT long  
MEDIUM_FLOAT long  
HIGH_FLOAT long  
LOW_INT long  
MEDIUM_INT long  
HIGH_INT long  
FRAMEBUFFER long  
RENDERBUFFER long  
RGBA4 long  
RGB5_A1 long  
RGB565 long  
DEPTH_COMPONENT16 long  
STENCIL_INDEX long  
STENCIL_INDEX8 long  
DEPTH_STENCIL long  
RENDERBUFFER_WIDTH long  
RENDERBUFFER_HEIGHT long  
RENDERBUFFER_INTERNAL_FORMAT long  
RENDERBUFFER_RED_SIZE long  
RENDERBUFFER_GREEN_SIZE long  
RENDERBUFFER_BLUE_SIZE long  
RENDERBUFFER_ALPHA_SIZE long  
RENDERBUFFER_DEPTH_SIZE long  
RENDERBUFFER_STENCIL_SIZE long  
FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE long  
FRAMEBUFFER_ATTACHMENT_OBJECT_NAME long  
FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL long  
FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE long  
COLOR_ATTACHMENT0 long  
DEPTH_ATTACHMENT long  
STENCIL_ATTACHMENT long  
DEPTH_STENCIL_ATTACHMENT long  
NONE long  
FRAMEBUFFER_COMPLETE long  
FRAMEBUFFER_INCOMPLETE_ATTACHMENT long  
FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT long  
FRAMEBUFFER_INCOMPLETE_DIMENSIONS long  
FRAMEBUFFER_UNSUPPORTED long  
FRAMEBUFFER_BINDING long  
RENDERBUFFER_BINDING long  
MAX_RENDERBUFFER_SIZE long  
INVALID_FRAMEBUFFER_OPERATION long  
UNPACK_FLIP_Y_WEBGL long  
UNPACK_PREMULTIPLY_ALPHA_WEBGL long  
CONTEXT_LOST_WEBGL long  
UNPACK_COLORSPACE_CONVERSION_WEBGL long  
BROWSER_DEFAULT_WEBGL long  

Methods

WebGLContextAttributes getContextAttributes();
boolean isContextLost();
int[] getSupportedExtensions();
object getExtension(DOMString name);
void activeTexture(long texture);
void attachShader(WebGLProgram program, WebGLShader shader);
void bindAttribLocation(WebGLProgram program, uint index, DOMString name);
void bindBuffer(long target, WebGLBuffer buffer);
void bindFramebuffer(long target, WebGLFramebuffer framebuffer);
void bindRenderbuffer(long target, WebGLRenderbuffer renderbuffer);
void bindTexture(long target, WebGLTexture texture);
void blendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
void blendEquation(long mode);
void blendEquationSeparate(long modeRGB, long modeAlpha);
void blendFunc(long sfactor, long dfactor);
void blendFuncSeparate(long srcRGB, long dstRGB, long srcAlpha, long dstAlpha);
void bufferData(long target, intptr size, long usage);
void bufferData(long target, ArrayBufferView data, long usage);
void bufferData(long target, ArrayBuffer data, long usage);
void bufferSubData(long target, intptr offset, ArrayBufferView data);
void bufferSubData(long target, intptr offset, ArrayBuffer data);
long checkFramebufferStatus(long target);
void clear(GLbitfield mask);
void clearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
void clearDepth(GLclampf depth);
void clearStencil(int s);
void colorMask(boolean red, boolean green, boolean blue, boolean alpha);
void compileShader(WebGLShader shader);
void compressedTexImage2D(long target, int level, long internalformat, int width, int height, int border, ArrayBufferView data);
void compressedTexSubImage2D(long target, int level, int xoffset, int yoffset, int width, int height, long format, ArrayBufferView data);
void copyTexImage2D(long target, int level, long internalformat,int x, int y, int width, int height, int border);
void copyTexSubImage2D(long target, int level, int xoffset, int yoffset, int x, int y, int width, int height);
WebGLBuffer createBuffer();
WebGLFramebuffer createFramebuffer();
WebGLProgram createProgram();
WebGLRenderbuffer createRenderbuffer();
WebGLShader createShader(long type);
WebGLTexture createTexture();
void cullFace(long mode);
void deleteBuffer(WebGLBuffer buffer);
void deleteFramebuffer(WebGLFramebuffer framebuffer);
void deleteProgram(WebGLProgram program);
void deleteRenderbuffer(WebGLRenderbuffer renderbuffer);
void deleteShader(WebGLShader shader);
void deleteTexture(WebGLTexture texture);
void depthFunc(long func);
void depthMask(boolean flag);
void depthRange(GLclampf zNear, GLclampf zFar);
void detachShader(WebGLProgram program, WebGLShader shader);
void disable(long cap);
void disableVertexAttribArray(uint index);
void drawArrays(long mode, int first, int count);
void drawElements(long mode, int count, long type, intptr offset);
void enable(long cap);
void enableVertexAttribArray(uint index);
void finish();
void flush();
void framebufferRenderbuffer(long target, long attachment, long renderbuffertarget, WebGLRenderbuffer renderbuffer);
void framebufferTexture2D(long target, long attachment, long textarget, WebGLTexture texture, int level);
void frontFace(long mode);
void generateMipmap(long target);
WebGLActiveInfo getActiveAttrib(WebGLProgram program, uint index);
WebGLActiveInfo getActiveUniform(WebGLProgram program, uint index);
sequence<webglshader> getAttachedShaders(WebGLProgram program);</webglshader>
int getAttribLocation(WebGLProgram program, DOMString name);
any getBufferParameter(long target, long pname);
any getParameter(long pname);
long getError();
int getFramebufferAttachmentParameter(long target, long attachment, long pname);
int getProgramParameter(WebGLProgram program, long pname);
DOMString getProgramInfoLog(WebGLProgram program);
int getRenderbufferParameter(long target, long pname);
int getShaderParameter(WebGLShader shader, long pname);
WebGLShaderPrecisionFormat getShaderPrecisionFormat(long shadertype, long precisiontype);
DOMString getShaderInfoLog(WebGLShader shader);
DOMString getShaderSource(WebGLShader shader);
int getTexParameter(long target, long pname);
int getUniform(WebGLProgram program, WebGLUniformLocation location);
WebGLUniformLocation getUniformLocation(WebGLProgram program, DOMString name);
int getVertexAttrib(uint index, long pname);
intptr getVertexAttribOffset(uint index, long pname);
int hint(long target, long mode);
boolean isBuffer(WebGLBuffer buffer);
boolean isEnabled(long cap);
boolean isFramebuffer(WebGLFramebuffer framebuffer);
boolean isProgram(WebGLProgram program);
boolean isRenderbuffer(WebGLRenderbuffer renderbuffer);
boolean isShader(WebGLShader shader);
boolean isTexture(WebGLTexture texture);
void lineWidth(float width);
void linkProgram(WebGLProgram program);
void pixelStorei(long pname, int param);
void polygonOffset(float factor, float units);
void readPixels(int x, int y, int width, int height, long format, long type, ArrayBufferView pixels);
void renderbufferStorage(long target, long internalformat, int width, int height);
void sampleCoverage(GLclampf value, boolean invert);
void scissor(int x, int y, int width, int height);
void shaderSource(WebGLShader shader, DOMString source);
void stencilFunc(long func, int ref, uint mask);
void stencilFuncSeparate(long face, long func, int ref, uint mask);
void stencilMask(uint mask);
void stencilMaskSeparate(long face, uint mask);
void stencilOp(long fail, long zfail, long zpass);
void stencilOpSeparate(long face, long fail, long zfail, long zpass);
void texImage2D(long target, int level, long internalformat, int width, int height, int border, long format, long type, ArrayBufferView pixels);
void texImage2D(long target, int level, long internalformat, long format, long type, ImageData pixels);
void texImage2D(long target, int level, long internalformat, long format, long type, HTMLImageElement image);
void texImage2D(long target, int level, long internalformat, long format, long type, HTMLCanvasElement canvas);
void texImage2D(long target, int level, long internalformat, long format, long type, HTMLVideoElement video);
void texParameterf(long target, long pname, float param);
void texParameteri(long target, long pname, int param);
void texSubImage2D(long target, int level, int xoffset, int yoffset, int width, int height, long format, long type, ArrayBufferView pixels);
void texSubImage2D(long target, int level, int xoffset, int yoffset, long format, long type, ImageData pixels);
void texSubImage2D(long target, int level, int xoffset, int yoffset, long format, long type, HTMLImageElement image);
void texSubImage2D(long target, int level, int xoffset, int yoffset, long format, long type, HTMLCanvasElement canvas);
void texSubImage2D(long target, int level, int xoffset, int yoffset, long format, long type, HTMLVideoElement video);
void uniform1f(WebGLUniformLocation location, float x);
void uniform1fv(WebGLUniformLocation location, Float32Array v);
void uniform1fv(WebGLUniformLocation location, sequence<float> v);</float>
void uniform1i(WebGLUniformLocation location, int x);
void uniform1iv(WebGLUniformLocation location, Int32Array v);
void uniform1iv(WebGLUniformLocation location, sequence<long> v);</long>
void uniform2f(WebGLUniformLocation location, float x, float y);
void uniform2fv(WebGLUniformLocation location, Float32Array v);
void uniform2fv(WebGLUniformLocation location, sequence<float> v);</float>
void uniform2i(WebGLUniformLocation location, int x, int y);
void uniform2iv(WebGLUniformLocation location, Int32Array v);
void uniform2iv(WebGLUniformLocation location, sequence<long> v);</long>
void uniform3f(WebGLUniformLocation location, float x, float y, float z);
void uniform3fv(WebGLUniformLocation location, Float32Array v);
void uniform3fv(WebGLUniformLocation location, sequence<float> v);</float>
void uniform3i(WebGLUniformLocation location, int x, int y, int z);
void uniform3iv(WebGLUniformLocation location, Int32Array v);
void uniform3iv(WebGLUniformLocation location, sequence<long> v);</long>
void uniform4f(WebGLUniformLocation location, float x, float y, float z, float w);
void uniform4fv(WebGLUniformLocation location, Float32Array v);
void uniform4fv(WebGLUniformLocation location, sequence<float> v);</float>
void uniform4i(WebGLUniformLocation location, int x, int y, int z, int w);
void uniform4iv(WebGLUniformLocation location, Int32Array v);
void uniform4iv(WebGLUniformLocation location, sequence<long> v);</long>
void uniformMatrix2fv(WebGLUniformLocation location, boolean transpose, Float32Array value);
void uniformMatrix2fv(WebGLUniformLocation location, boolean transpose, sequence<float> value);</float>
void uniformMatrix3fv(WebGLUniformLocation location, boolean transpose, Float32Array value);
void uniformMatrix3fv(WebGLUniformLocation location, boolean transpose, sequence<float> value);</float>
void uniformMatrix4fv(WebGLUniformLocation location, boolean transpose, Float32Array value);
void uniformMatrix4fv(WebGLUniformLocation location, boolean transpose, sequence<float> value);</float>
void useProgram(WebGLProgram program);
void validateProgram(WebGLProgram program);
void vertexAttrib1f(uint indx, float x);
void vertexAttrib1fv(uint indx, Float32Array values);
void vertexAttrib1fv(uint indx, sequence<float> values);</float>
void vertexAttrib2f(uint indx, float x, float y);
void vertexAttrib2fv(uint indx, Float32Array values);
void vertexAttrib2fv(uint indx, sequence<float> values);</float>
void vertexAttrib3f(uint indx, float x, float y, float z);
void vertexAttrib3fv(uint indx, Float32Array values);
void vertexAttrib3fv(uint indx, sequence<float> values);</float>
void vertexAttrib4f(uint indx, float x, float y, float z, float w);
void vertexAttrib4fv(uint indx, Float32Array values);
void vertexAttrib4fv(uint indx, sequence<float> values);</float>
void vertexAttribPointer(uint indx, int size, long type, boolean normalized, int stride, intptr offset);
void viewport(int x, int y, int width, int height);

Todo: document the methods defined by this interface

Browser support

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) 4.0 (2.0) (Yes) (Yes) (Yes)
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? ? ? ? ? ?

See also

Document Tags and Contributors

Contributors to this page: Sheppy, alex35, ziyunfei, DigiTec, kscarfone, teoli, wesj, Reachmeatshivam
Last updated by: wesj,