WebGLRenderingContext extension type

The WebGLRenderingContext interface provides an interface to the OpenGL ES 2.0 graphics rendering context for the drawing surface of an HTML canvas element.

To get an access to a WebGL context for 2D and/or 3D graphics rendering, call HTMLCanvasElement.getContext on a <canvas> element, supplying "webgl" as the argument:

const canvas = document.getElementById("myCanvas");
const gl = canvas.getContext("webgl");

Once you have the WebGL rendering context for a canvas, you can render within it. The WebGL tutorial has more information, examples, and resources on how to get started with WebGL.

If you require a WebGL 2.0 context, see WebGL2RenderingContext; this supplies access to an implementation of OpenGL ES 3.0 graphics.


API documentation sourced from MDN Web Docs.

on
Implemented types
Available extensions

Properties

canvas JSObject
The WebGLRenderingContext.canvas property is a read-only reference to the HTMLCanvasElement or OffscreenCanvas object that is associated with the context. It might be null if it is not associated with a canvas element or an OffscreenCanvas object.
no setter
drawingBufferColorSpace PredefinedColorSpace
The WebGLRenderingContext.drawingBufferColorSpace property specifies the color space of the WebGL drawing buffer. Along with the default (srgb), the display-p3 color space can be used.
getter/setter pair
drawingBufferHeight GLsizei
The read-only WebGLRenderingContext.drawingBufferHeight property represents the actual height of the current drawing buffer. It should match the height attribute of the canvas element associated with this context, but might differ if the implementation is not able to provide the requested height.
no setter
drawingBufferWidth GLsizei
The read-only WebGLRenderingContext.drawingBufferWidth property represents the actual width of the current drawing buffer. It should match the width attribute of the canvas element associated with this context, but might differ if the implementation is not able to provide the requested width.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

activeTexture(GLenum texture) → void
The WebGLRenderingContext.activeTexture() method of the WebGL API specifies which texture unit to make active.
attachShader(WebGLProgram program, WebGLShader shader) → void
The WebGLRenderingContext.attachShader() method of the WebGL API attaches either a fragment or vertex WebGLShader to a WebGLProgram.
bindAttribLocation(WebGLProgram program, GLuint index, String name) → void
The WebGLRenderingContext.bindAttribLocation() method of the WebGL API binds a generic vertex index to an attribute variable.
bindBuffer(GLenum target, WebGLBuffer? buffer) → void
The WebGLRenderingContext.bindBuffer() method of the WebGL API binds a given WebGLBuffer to a target.
bindFramebuffer(GLenum target, WebGLFramebuffer? framebuffer) → void
The WebGLRenderingContext.bindFramebuffer() method of the WebGL API binds to the specified target the provided WebGLFramebuffer, or, if the framebuffer argument is null, the default WebGLFramebuffer, which is associated with the canvas rendering context.
bindRenderbuffer(GLenum target, WebGLRenderbuffer? renderbuffer) → void
The WebGLRenderingContext.bindRenderbuffer() method of the WebGL API binds a given WebGLRenderbuffer to a target, which must be gl.RENDERBUFFER.
bindTexture(GLenum target, WebGLTexture? texture) → void
The WebGLRenderingContext.bindTexture() method of the WebGL API binds a given WebGLTexture to a target (binding point).
blendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) → void
The WebGLRenderingContext.blendColor() method of the WebGL API is used to set the source and destination blending factors.
blendEquation(GLenum mode) → void
The WebGLRenderingContext.blendEquation() method of the WebGL API is used to set both the RGB blend equation and alpha blend equation to a single equation.
blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) → void
The WebGLRenderingContext.blendEquationSeparate() method of the WebGL API is used to set the RGB blend equation and alpha blend equation separately.
blendFunc(GLenum sfactor, GLenum dfactor) → void
The WebGLRenderingContext.blendFunc() method of the WebGL API defines which function is used for blending pixel arithmetic.
blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) → void
The WebGLRenderingContext.blendFuncSeparate() method of the WebGL API defines which function is used for blending pixel arithmetic for RGB and alpha components separately.
bufferData(GLenum target, JSAny? dataOrSize, GLenum usage) → void
The WebGLRenderingContext.bufferData() method of the WebGL API initializes and creates the buffer object's data store.
bufferSubData(GLenum target, GLintptr offset, AllowSharedBufferSource data) → void
The WebGLRenderingContext.bufferSubData() method of the WebGL API updates a subset of a buffer object's data store.
checkFramebufferStatus(GLenum target) GLenum
The WebGLRenderingContext.checkFramebufferStatus() method of the WebGL API returns the completeness status of the WebGLFramebuffer object.
clear(GLbitfield mask) → void
The WebGLRenderingContext.clear() method of the WebGL API clears buffers to preset values.
clearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) → void
The WebGLRenderingContext.clearColor() method of the WebGL API specifies the color values used when clearing color buffers.
clearDepth(GLclampf depth) → void
The WebGLRenderingContext.clearDepth() method of the WebGL API specifies the clear value for the depth buffer.
clearStencil(GLint s) → void
The WebGLRenderingContext.clearStencil() method of the WebGL API specifies the clear value for the stencil buffer.
colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) → void
The WebGLRenderingContext.colorMask() method of the WebGL API sets which color components to enable or to disable when drawing or rendering to a WebGLFramebuffer.
compileShader(WebGLShader shader) → void
The WebGLRenderingContext.compileShader() method of the WebGL API compiles a GLSL shader into binary data so that it can be used by a WebGLProgram.
compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, ArrayBufferView data) → void
The WebGLRenderingContext.compressedTexImage2D() and WebGL2RenderingContext.compressedTexImage3D() methods of the WebGL API specify a two- or three-dimensional texture image in a compressed format.
compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, ArrayBufferView data) → void
The WebGLRenderingContext.compressedTexSubImage2D() method of the WebGL API specifies a two-dimensional sub-rectangle for a texture image in a compressed format.
copyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) → void
The WebGLRenderingContext.copyTexImage2D() method of the WebGL API copies pixels from the current WebGLFramebuffer into a 2D texture image.
copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) → void
The WebGLRenderingContext.copyTexSubImage2D() method of the WebGL API copies pixels from the current WebGLFramebuffer into an existing 2D texture sub-image.
createBuffer() WebGLBuffer?
The WebGLRenderingContext.createBuffer() method of the WebGL API creates and initializes a WebGLBuffer storing data such as vertices or colors.
createFramebuffer() WebGLFramebuffer?
The WebGLRenderingContext.createFramebuffer() method of the WebGL API creates and initializes a WebGLFramebuffer object.
createProgram() WebGLProgram?
The WebGLRenderingContext.createProgram() method of the WebGL API creates and initializes a WebGLProgram object.
createRenderbuffer() WebGLRenderbuffer?
The WebGLRenderingContext.createRenderbuffer() method of the WebGL API creates and initializes a WebGLRenderbuffer object.
createShader(GLenum type) WebGLShader?
The WebGLRenderingContext method createShader() of the WebGL API creates a WebGLShader that can then be configured further using WebGLRenderingContext.shaderSource and WebGLRenderingContext.compileShader.
createTexture() WebGLTexture?
The WebGLRenderingContext.createTexture() method of the WebGL API creates and initializes a WebGLTexture object.
cullFace(GLenum mode) → void
The WebGLRenderingContext.cullFace() method of the WebGL API specifies whether or not front- and/or back-facing polygons can be culled.
deleteBuffer(WebGLBuffer? buffer) → void
The WebGLRenderingContext.deleteBuffer() method of the WebGL API deletes a given WebGLBuffer. This method has no effect if the buffer has already been deleted. Normally you don't need to call this method yourself, when the buffer object is dereferenced it will be marked as free.
deleteFramebuffer(WebGLFramebuffer? framebuffer) → void
The WebGLRenderingContext.deleteFramebuffer() method of the WebGL API deletes a given WebGLFramebuffer object. This method has no effect if the frame buffer has already been deleted.
deleteProgram(WebGLProgram? program) → void
The WebGLRenderingContext.deleteProgram() method of the WebGL API deletes a given WebGLProgram object. This method has no effect if the program has already been deleted.
deleteRenderbuffer(WebGLRenderbuffer? renderbuffer) → void
The WebGLRenderingContext.deleteRenderbuffer() method of the WebGL API deletes a given WebGLRenderbuffer object. This method has no effect if the render buffer has already been deleted.
deleteShader(WebGLShader? shader) → void
The WebGLRenderingContext.deleteShader() method of the WebGL API marks a given WebGLShader object for deletion. It will then be deleted whenever the shader is no longer in use. This method has no effect if the shader has already been deleted, and the WebGLShader is automatically marked for deletion when it is destroyed by the garbage collector.
deleteTexture(WebGLTexture? texture) → void
The WebGLRenderingContext.deleteTexture() method of the WebGL API deletes a given WebGLTexture object. This method has no effect if the texture has already been deleted.
depthFunc(GLenum func) → void
The WebGLRenderingContext.depthFunc() method of the WebGL API specifies a function that compares incoming pixel depth to the current depth buffer value.
depthMask(GLboolean flag) → void
The WebGLRenderingContext.depthMask() method of the WebGL API sets whether writing into the depth buffer is enabled or disabled.
depthRange(GLclampf zNear, GLclampf zFar) → void
The WebGLRenderingContext.depthRange() method of the WebGL API specifies the depth range mapping from normalized device coordinates to window or viewport coordinates.
detachShader(WebGLProgram program, WebGLShader shader) → void
The WebGLRenderingContext.detachShader() method of the WebGL API detaches a previously attached WebGLShader from a WebGLProgram.
disable(GLenum cap) → void
The WebGLRenderingContext.disable() method of the WebGL API disables specific WebGL capabilities for this context.
disableVertexAttribArray(GLuint index) → void
The WebGLRenderingContext.disableVertexAttribArray() method of the WebGL API turns the generic vertex attribute array off at a given index position.
drawArrays(GLenum mode, GLint first, GLsizei count) → void
The WebGLRenderingContext.drawArrays() method of the WebGL API renders primitives from array data.
drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset) → void
The WebGLRenderingContext.drawElements() method of the WebGL API renders primitives from array data.
enable(GLenum cap) → void
The WebGLRenderingContext.enable() method of the WebGL API enables specific WebGL capabilities for this context.
enableVertexAttribArray(GLuint index) → void
The WebGLRenderingContext method enableVertexAttribArray(), part of the WebGL API, turns on the generic vertex attribute array at the specified index into the list of attribute arrays.
finish() → void
The WebGLRenderingContext.finish() method of the WebGL API blocks execution until all previously called commands are finished.
flush() → void
The WebGLRenderingContext.flush() method of the WebGL API empties different buffer commands, causing all commands to be executed as quickly as possible.
framebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, WebGLRenderbuffer? renderbuffer) → void
The WebGLRenderingContext.framebufferRenderbuffer() method of the WebGL API attaches a WebGLRenderbuffer object to a WebGLFramebuffer object.
framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, WebGLTexture? texture, GLint level) → void
The WebGLRenderingContext.framebufferTexture2D() method of the WebGL API attaches a texture to a WebGLFramebuffer.
frontFace(GLenum mode) → void
The WebGLRenderingContext.frontFace() method of the WebGL API specifies whether polygons are front- or back-facing by setting a winding orientation.
generateMipmap(GLenum target) → void
The WebGLRenderingContext.generateMipmap() method of the WebGL API generates a set of mipmaps for a WebGLTexture object.
getActiveAttrib(WebGLProgram program, GLuint index) WebGLActiveInfo?
The WebGLRenderingContext.getActiveAttrib() method of the WebGL API returns a WebGLActiveInfo object containing size, type, and name of a vertex attribute. It is generally used when querying unknown attributes either for debugging or generic library creation.
getActiveUniform(WebGLProgram program, GLuint index) WebGLActiveInfo?
The WebGLRenderingContext.getActiveUniform() method of the WebGL API returns a WebGLActiveInfo object containing size, type, and name of a uniform attribute. It is generally used when querying unknown uniforms either for debugging or generic library creation.
getAttachedShaders(WebGLProgram program) JSArray<WebGLShader>?
The WebGLRenderingContext.getAttachedShaders() method of the WebGL API returns a list of WebGLShader objects attached to a WebGLProgram.
getAttribLocation(WebGLProgram program, String name) GLint
The WebGLRenderingContext.getAttribLocation() method of the WebGL API returns the location of an attribute variable in a given WebGLProgram.
getBufferParameter(GLenum target, GLenum pname) JSAny?
The WebGLRenderingContext.getBufferParameter() method of the WebGL API returns information about the buffer.
getContextAttributes() WebGLContextAttributes?
The WebGLRenderingContext.getContextAttributes() method returns a WebGLContextAttributes object that contains the actual context parameters. Might return null, if the context is lost.
getError() GLenum
The WebGLRenderingContext.getError() method of the WebGL API returns error information.
getExtension(String name) JSObject?
The WebGLRenderingContext.getExtension() method enables a WebGL extension.
getFramebufferAttachmentParameter(GLenum target, GLenum attachment, GLenum pname) JSAny?
The WebGLRenderingContext.getFramebufferAttachmentParameter() method of the WebGL API returns information about a framebuffer's attachment.
getParameter(GLenum pname) JSAny?
The WebGLRenderingContext.getParameter() method of the WebGL API returns a value for the passed parameter name.
getProgramInfoLog(WebGLProgram program) String?
The WebGLRenderingContext.getProgramInfoLog returns the information log for the specified WebGLProgram object. It contains errors that occurred during failed linking or validation of WebGLProgram objects.
getProgramParameter(WebGLProgram program, GLenum pname) JSAny?
The WebGLRenderingContext.getProgramParameter() method of the WebGL API returns information about the given program.
getRenderbufferParameter(GLenum target, GLenum pname) JSAny?
The WebGLRenderingContext.getRenderbufferParameter() method of the WebGL API returns information about the renderbuffer.
getShaderInfoLog(WebGLShader shader) String?
The WebGLRenderingContext.getShaderInfoLog returns the information log for the specified WebGLShader object. It contains warnings, debugging and compile information.
getShaderParameter(WebGLShader shader, GLenum pname) JSAny?
The WebGLRenderingContext.getShaderParameter() method of the WebGL API returns information about the given shader.
getShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype) WebGLShaderPrecisionFormat?
The WebGLRenderingContext.getShaderPrecisionFormat() method of the WebGL API returns a new WebGLShaderPrecisionFormat object describing the range and precision for the specified shader numeric format.
getShaderSource(WebGLShader shader) String?
The WebGLRenderingContext.getShaderSource() method of the WebGL API returns the source code of a WebGLShader as a string.
getSupportedExtensions() JSArray<JSString>?
The WebGLRenderingContext.getSupportedExtensions() method returns a list of all the supported WebGL extensions.
getTexParameter(GLenum target, GLenum pname) JSAny?
The WebGLRenderingContext.getTexParameter() method of the WebGL API returns information about the given texture.
getUniform(WebGLProgram program, WebGLUniformLocation location) JSAny?
The WebGLRenderingContext.getUniform() method of the WebGL API returns the value of a uniform variable at a given location.
getUniformLocation(WebGLProgram program, String name) WebGLUniformLocation?
Part of the WebGL API, the WebGLRenderingContext method getUniformLocation() returns the location of a specific uniform variable which is part of a given WebGLProgram.
getVertexAttrib(GLuint index, GLenum pname) JSAny?
The WebGLRenderingContext.getVertexAttrib() method of the WebGL API returns information about a vertex attribute at a given position.
getVertexAttribOffset(GLuint index, GLenum pname) GLintptr
The WebGLRenderingContext.getVertexAttribOffset() method of the WebGL API returns the address of a specified vertex attribute.
hint(GLenum target, GLenum mode) → void
The WebGLRenderingContext.hint() method of the WebGL API specifies hints for certain behaviors. The interpretation of these hints depend on the implementation.
isBuffer(WebGLBuffer? buffer) GLboolean
The WebGLRenderingContext.isBuffer() method of the WebGL API returns true if the passed WebGLBuffer is valid and false otherwise.
isContextLost() bool
The WebGLRenderingContext.isContextLost() method returns a boolean value indicating whether or not the WebGL context has been lost and must be re-established before rendering can resume.
isEnabled(GLenum cap) GLboolean
The WebGLRenderingContext.isEnabled() method of the WebGL API tests whether a specific WebGL capability is enabled or not for this context.
isFramebuffer(WebGLFramebuffer? framebuffer) GLboolean
The WebGLRenderingContext.isFramebuffer() method of the WebGL API returns true if the passed WebGLFramebuffer is valid and false otherwise.
isProgram(WebGLProgram? program) GLboolean
The WebGLRenderingContext.isProgram() method of the WebGL API returns true if the passed WebGLProgram is valid, false otherwise.
isRenderbuffer(WebGLRenderbuffer? renderbuffer) GLboolean
The WebGLRenderingContext.isRenderbuffer() method of the WebGL API returns true if the passed WebGLRenderbuffer is valid and false otherwise.
isShader(WebGLShader? shader) GLboolean
The WebGLRenderingContext.isShader() method of the WebGL API returns true if the passed WebGLShader is valid, false otherwise.
isTexture(WebGLTexture? texture) GLboolean
The WebGLRenderingContext.isTexture() method of the WebGL API returns true if the passed WebGLTexture is valid and false otherwise.
lineWidth(GLfloat width) → void
The WebGLRenderingContext.lineWidth() method of the WebGL API sets the line width of rasterized lines.
linkProgram(WebGLProgram program) → void
The WebGLRenderingContext interface's linkProgram() method links a given WebGLProgram, completing the process of preparing the GPU code for the program's fragment and vertex shaders.
makeXRCompatible() JSPromise<JSAny?>
The WebGLRenderingContext method makeXRCompatible() ensures that the rendering context described by the WebGLRenderingContext is ready to render the scene for the immersive WebXR device on which it will be displayed. If necessary, the WebGL layer may reconfigure the context to be ready to render to a different device than it originally was.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pixelStorei(GLenum pname, GLint param) → void
The WebGLRenderingContext.pixelStorei() method of the WebGL API specifies the pixel storage modes.
polygonOffset(GLfloat factor, GLfloat units) → void
The WebGLRenderingContext.polygonOffset() method of the WebGL API specifies the scale factors and units to calculate depth values.
readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, ArrayBufferView? pixels) → void
The WebGLRenderingContext.readPixels() method of the WebGL API reads a block of pixels from a specified rectangle of the current color framebuffer into a TypedArray or a DataView object.
renderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) → void
The WebGLRenderingContext.renderbufferStorage() method of the WebGL API creates and initializes a renderbuffer object's data store.
sampleCoverage(GLclampf value, GLboolean invert) → void
The WebGLRenderingContext.sampleCoverage() method of the WebGL API specifies multi-sample coverage parameters for anti-aliasing effects.
scissor(GLint x, GLint y, GLsizei width, GLsizei height) → void
The WebGLRenderingContext.scissor() method of the WebGL API sets a scissor box, which limits the drawing to a specified rectangle.
shaderSource(WebGLShader shader, String source) → void
The WebGLRenderingContext.shaderSource() method of the WebGL API sets the source code of a WebGLShader.
stencilFunc(GLenum func, GLint ref, GLuint mask) → void
The WebGLRenderingContext.stencilFunc() method of the WebGL API sets the front and back function and reference value for stencil testing.
stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) → void
The WebGLRenderingContext.stencilFuncSeparate() method of the WebGL API sets the front and/or back function and reference value for stencil testing.
stencilMask(GLuint mask) → void
The WebGLRenderingContext.stencilMask() method of the WebGL API controls enabling and disabling of both the front and back writing of individual bits in the stencil planes.
stencilMaskSeparate(GLenum face, GLuint mask) → void
The WebGLRenderingContext.stencilMaskSeparate() method of the WebGL API controls enabling and disabling of front and/or back writing of individual bits in the stencil planes.
stencilOp(GLenum fail, GLenum zfail, GLenum zpass) → void
The WebGLRenderingContext.stencilOp() method of the WebGL API sets both the front and back-facing stencil test actions.
stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) → void
The WebGLRenderingContext.stencilOpSeparate() method of the WebGL API sets the front and/or back-facing stencil test actions.
texImage2D(GLenum target, GLint level, GLint internalformat, JSAny formatOrWidth, JSAny heightOrType, JSAny borderOrSource, [GLenum format, GLenum type, ArrayBufferView? pixels]) → void
The WebGLRenderingContext.texImage2D() method of the WebGL API specifies a two-dimensional texture image.
texParameterf(GLenum target, GLenum pname, GLfloat param) → void
texParameteri(GLenum target, GLenum pname, GLint param) → void
texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, JSAny formatOrWidth, JSAny heightOrType, JSAny formatOrSource, [GLenum type, ArrayBufferView? pixels]) → void
The WebGLRenderingContext.texSubImage2D() method of the WebGL API specifies a sub-rectangle of the current texture.
toString() String
A string representation of this object.
inherited
uniform1f(WebGLUniformLocation? location, GLfloat x) → void
uniform1fv(WebGLUniformLocation? location, Float32List v) → void
uniform1i(WebGLUniformLocation? location, GLint x) → void
uniform1iv(WebGLUniformLocation? location, Int32List v) → void
uniform2f(WebGLUniformLocation? location, GLfloat x, GLfloat y) → void
uniform2fv(WebGLUniformLocation? location, Float32List v) → void
uniform2i(WebGLUniformLocation? location, GLint x, GLint y) → void
uniform2iv(WebGLUniformLocation? location, Int32List v) → void
uniform3f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z) → void
uniform3fv(WebGLUniformLocation? location, Float32List v) → void
uniform3i(WebGLUniformLocation? location, GLint x, GLint y, GLint z) → void
uniform3iv(WebGLUniformLocation? location, Int32List v) → void
uniform4f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) → void
uniform4fv(WebGLUniformLocation? location, Float32List v) → void
uniform4i(WebGLUniformLocation? location, GLint x, GLint y, GLint z, GLint w) → void
uniform4iv(WebGLUniformLocation? location, Int32List v) → void
uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value) → void
uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value) → void
uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value) → void
useProgram(WebGLProgram? program) → void
The WebGLRenderingContext.useProgram() method of the WebGL API sets the specified WebGLProgram as part of the current rendering state.
validateProgram(WebGLProgram program) → void
The WebGLRenderingContext.validateProgram() method of the WebGL API validates a WebGLProgram. It checks if it is successfully linked and if it can be used in the current WebGL state.
vertexAttrib1f(GLuint index, GLfloat x) → void
vertexAttrib1fv(GLuint index, Float32List values) → void
vertexAttrib2f(GLuint index, GLfloat x, GLfloat y) → void
vertexAttrib2fv(GLuint index, Float32List values) → void
vertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z) → void
vertexAttrib3fv(GLuint index, Float32List values) → void
vertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) → void
vertexAttrib4fv(GLuint index, Float32List values) → void
vertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset) → void
The WebGLRenderingContext.vertexAttribPointer() method of the WebGL API binds the buffer currently bound to gl.ARRAY_BUFFER to a generic vertex attribute of the current vertex buffer object and specifies its layout.
viewport(GLint x, GLint y, GLsizei width, GLsizei height) → void
The WebGLRenderingContext.viewport() method of the WebGL API sets the viewport, which specifies the affine transformation of x and y from normalized device coordinates to window coordinates.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

ACTIVE_ATTRIBUTES → const GLenum
ACTIVE_TEXTURE → const GLenum
ACTIVE_UNIFORMS → const GLenum
ALIASED_LINE_WIDTH_RANGE → const GLenum
ALIASED_POINT_SIZE_RANGE → const GLenum
ALPHA → const GLenum
ALPHA_BITS → const GLenum
ALWAYS → const GLenum
ARRAY_BUFFER → const GLenum
ARRAY_BUFFER_BINDING → const GLenum
ATTACHED_SHADERS → const GLenum
BACK → const GLenum
BLEND → const GLenum
BLEND_COLOR → const GLenum
BLEND_DST_ALPHA → const GLenum
BLEND_DST_RGB → const GLenum
BLEND_EQUATION → const GLenum
BLEND_EQUATION_ALPHA → const GLenum
BLEND_EQUATION_RGB → const GLenum
BLEND_SRC_ALPHA → const GLenum
BLEND_SRC_RGB → const GLenum
BLUE_BITS → const GLenum
BOOL → const GLenum
BOOL_VEC2 → const GLenum
BOOL_VEC3 → const GLenum
BOOL_VEC4 → const GLenum
BROWSER_DEFAULT_WEBGL → const GLenum
BUFFER_SIZE → const GLenum
BUFFER_USAGE → const GLenum
BYTE → const GLenum
CCW → const GLenum
CLAMP_TO_EDGE → const GLenum
COLOR_ATTACHMENT0 → const GLenum
COLOR_BUFFER_BIT → const GLenum
COLOR_CLEAR_VALUE → const GLenum
COLOR_WRITEMASK → const GLenum
COMPILE_STATUS → const GLenum
COMPRESSED_TEXTURE_FORMATS → const GLenum
CONSTANT_ALPHA → const GLenum
CONSTANT_COLOR → const GLenum
CONTEXT_LOST_WEBGL → const GLenum
CULL_FACE → const GLenum
CULL_FACE_MODE → const GLenum
CURRENT_PROGRAM → const GLenum
CURRENT_VERTEX_ATTRIB → const GLenum
CW → const GLenum
DECR → const GLenum
DECR_WRAP → const GLenum
DELETE_STATUS → const GLenum
DEPTH_ATTACHMENT → const GLenum
DEPTH_BITS → const GLenum
DEPTH_BUFFER_BIT → const GLenum
DEPTH_CLEAR_VALUE → const GLenum
DEPTH_COMPONENT → const GLenum
DEPTH_COMPONENT16 → const GLenum
DEPTH_FUNC → const GLenum
DEPTH_RANGE → const GLenum
DEPTH_STENCIL → const GLenum
DEPTH_STENCIL_ATTACHMENT → const GLenum
DEPTH_TEST → const GLenum
DEPTH_WRITEMASK → const GLenum
DITHER → const GLenum
DONT_CARE → const GLenum
DST_ALPHA → const GLenum
DST_COLOR → const GLenum
DYNAMIC_DRAW → const GLenum
ELEMENT_ARRAY_BUFFER → const GLenum
ELEMENT_ARRAY_BUFFER_BINDING → const GLenum
EQUAL → const GLenum
FASTEST → const GLenum
FLOAT → const GLenum
FLOAT_MAT2 → const GLenum
FLOAT_MAT3 → const GLenum
FLOAT_MAT4 → const GLenum
FLOAT_VEC2 → const GLenum
FLOAT_VEC3 → const GLenum
FLOAT_VEC4 → const GLenum
FRAGMENT_SHADER → const GLenum
FRAMEBUFFER → const GLenum
FRAMEBUFFER_ATTACHMENT_OBJECT_NAME → const GLenum
FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE → const GLenum
FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE → const GLenum
FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL → const GLenum
FRAMEBUFFER_BINDING → const GLenum
FRAMEBUFFER_COMPLETE → const GLenum
FRAMEBUFFER_INCOMPLETE_ATTACHMENT → const GLenum
FRAMEBUFFER_INCOMPLETE_DIMENSIONS → const GLenum
FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT → const GLenum
FRAMEBUFFER_UNSUPPORTED → const GLenum
FRONT → const GLenum
FRONT_AND_BACK → const GLenum
FRONT_FACE → const GLenum
FUNC_ADD → const GLenum
FUNC_REVERSE_SUBTRACT → const GLenum
FUNC_SUBTRACT → const GLenum
GENERATE_MIPMAP_HINT → const GLenum
GEQUAL → const GLenum
GREATER → const GLenum
GREEN_BITS → const GLenum
HIGH_FLOAT → const GLenum
HIGH_INT → const GLenum
IMPLEMENTATION_COLOR_READ_FORMAT → const GLenum
IMPLEMENTATION_COLOR_READ_TYPE → const GLenum
INCR → const GLenum
INCR_WRAP → const GLenum
INT → const GLenum
INT_VEC2 → const GLenum
INT_VEC3 → const GLenum
INT_VEC4 → const GLenum
INVALID_ENUM → const GLenum
INVALID_FRAMEBUFFER_OPERATION → const GLenum
INVALID_OPERATION → const GLenum
INVALID_VALUE → const GLenum
INVERT → const GLenum
KEEP → const GLenum
LEQUAL → const GLenum
LESS → const GLenum
LINE_LOOP → const GLenum
LINE_STRIP → const GLenum
LINE_WIDTH → const GLenum
LINEAR → const GLenum
LINEAR_MIPMAP_LINEAR → const GLenum
LINEAR_MIPMAP_NEAREST → const GLenum
LINES → const GLenum
LOW_FLOAT → const GLenum
LOW_INT → const GLenum
LUMINANCE → const GLenum
LUMINANCE_ALPHA → const GLenum
MAX_COMBINED_TEXTURE_IMAGE_UNITS → const GLenum
MAX_CUBE_MAP_TEXTURE_SIZE → const GLenum
MAX_FRAGMENT_UNIFORM_VECTORS → const GLenum
MAX_RENDERBUFFER_SIZE → const GLenum
MAX_TEXTURE_IMAGE_UNITS → const GLenum
MAX_TEXTURE_SIZE → const GLenum
MAX_VARYING_VECTORS → const GLenum
MAX_VERTEX_ATTRIBS → const GLenum
MAX_VERTEX_TEXTURE_IMAGE_UNITS → const GLenum
MAX_VERTEX_UNIFORM_VECTORS → const GLenum
MAX_VIEWPORT_DIMS → const GLenum
MEDIUM_FLOAT → const GLenum
MEDIUM_INT → const GLenum
MIRRORED_REPEAT → const GLenum
NEAREST → const GLenum
NEAREST_MIPMAP_LINEAR → const GLenum
NEAREST_MIPMAP_NEAREST → const GLenum
NEVER → const GLenum
NICEST → const GLenum
NO_ERROR → const GLenum
NONE → const GLenum
NOTEQUAL → const GLenum
ONE → const GLenum
ONE_MINUS_CONSTANT_ALPHA → const GLenum
ONE_MINUS_CONSTANT_COLOR → const GLenum
ONE_MINUS_DST_ALPHA → const GLenum
ONE_MINUS_DST_COLOR → const GLenum
ONE_MINUS_SRC_ALPHA → const GLenum
ONE_MINUS_SRC_COLOR → const GLenum
OUT_OF_MEMORY → const GLenum
PACK_ALIGNMENT → const GLenum
POINTS → const GLenum
POLYGON_OFFSET_FACTOR → const GLenum
POLYGON_OFFSET_FILL → const GLenum
POLYGON_OFFSET_UNITS → const GLenum
RED_BITS → const GLenum
RENDERBUFFER → const GLenum
RENDERBUFFER_ALPHA_SIZE → const GLenum
RENDERBUFFER_BINDING → const GLenum
RENDERBUFFER_BLUE_SIZE → const GLenum
RENDERBUFFER_DEPTH_SIZE → const GLenum
RENDERBUFFER_GREEN_SIZE → const GLenum
RENDERBUFFER_HEIGHT → const GLenum
RENDERBUFFER_INTERNAL_FORMAT → const GLenum
RENDERBUFFER_RED_SIZE → const GLenum
RENDERBUFFER_STENCIL_SIZE → const GLenum
RENDERBUFFER_WIDTH → const GLenum
RENDERER → const GLenum
REPEAT → const GLenum
REPLACE → const GLenum
RGB → const GLenum
RGB5_A1 → const GLenum
RGB565 → const GLenum
RGBA → const GLenum
RGBA4 → const GLenum
RGBA8 → const GLenum
SAMPLE_ALPHA_TO_COVERAGE → const GLenum
SAMPLE_BUFFERS → const GLenum
SAMPLE_COVERAGE → const GLenum
SAMPLE_COVERAGE_INVERT → const GLenum
SAMPLE_COVERAGE_VALUE → const GLenum
SAMPLER_2D → const GLenum
SAMPLER_CUBE → const GLenum
SAMPLES → const GLenum
SCISSOR_BOX → const GLenum
SCISSOR_TEST → const GLenum
SHADER_TYPE → const GLenum
SHADING_LANGUAGE_VERSION → const GLenum
SHORT → const GLenum
SRC_ALPHA → const GLenum
SRC_ALPHA_SATURATE → const GLenum
SRC_COLOR → const GLenum
STATIC_DRAW → const GLenum
STENCIL_ATTACHMENT → const GLenum
STENCIL_BACK_FAIL → const GLenum
STENCIL_BACK_FUNC → const GLenum
STENCIL_BACK_PASS_DEPTH_FAIL → const GLenum
STENCIL_BACK_PASS_DEPTH_PASS → const GLenum
STENCIL_BACK_REF → const GLenum
STENCIL_BACK_VALUE_MASK → const GLenum
STENCIL_BACK_WRITEMASK → const GLenum
STENCIL_BITS → const GLenum
STENCIL_BUFFER_BIT → const GLenum
STENCIL_CLEAR_VALUE → const GLenum
STENCIL_FAIL → const GLenum
STENCIL_FUNC → const GLenum
STENCIL_INDEX8 → const GLenum
STENCIL_PASS_DEPTH_FAIL → const GLenum
STENCIL_PASS_DEPTH_PASS → const GLenum
STENCIL_REF → const GLenum
STENCIL_TEST → const GLenum
STENCIL_VALUE_MASK → const GLenum
STENCIL_WRITEMASK → const GLenum
STREAM_DRAW → const GLenum
SUBPIXEL_BITS → const GLenum
TEXTURE → const GLenum
TEXTURE0 → const GLenum
TEXTURE1 → const GLenum
TEXTURE2 → const GLenum
TEXTURE3 → const GLenum
TEXTURE4 → const GLenum
TEXTURE5 → const GLenum
TEXTURE6 → const GLenum
TEXTURE7 → const GLenum
TEXTURE8 → const GLenum
TEXTURE9 → const GLenum
TEXTURE10 → const GLenum
TEXTURE11 → const GLenum
TEXTURE12 → const GLenum
TEXTURE13 → const GLenum
TEXTURE14 → const GLenum
TEXTURE15 → const GLenum
TEXTURE16 → const GLenum
TEXTURE17 → const GLenum
TEXTURE18 → const GLenum
TEXTURE19 → const GLenum
TEXTURE20 → const GLenum
TEXTURE21 → const GLenum
TEXTURE22 → const GLenum
TEXTURE23 → const GLenum
TEXTURE24 → const GLenum
TEXTURE25 → const GLenum
TEXTURE26 → const GLenum
TEXTURE27 → const GLenum
TEXTURE28 → const GLenum
TEXTURE29 → const GLenum
TEXTURE30 → const GLenum
TEXTURE31 → const GLenum
TEXTURE_2D → const GLenum
TEXTURE_BINDING_2D → const GLenum
TEXTURE_BINDING_CUBE_MAP → const GLenum
TEXTURE_CUBE_MAP → const GLenum
TEXTURE_CUBE_MAP_NEGATIVE_X → const GLenum
TEXTURE_CUBE_MAP_NEGATIVE_Y → const GLenum
TEXTURE_CUBE_MAP_NEGATIVE_Z → const GLenum
TEXTURE_CUBE_MAP_POSITIVE_X → const GLenum
TEXTURE_CUBE_MAP_POSITIVE_Y → const GLenum
TEXTURE_CUBE_MAP_POSITIVE_Z → const GLenum
TEXTURE_MAG_FILTER → const GLenum
TEXTURE_MIN_FILTER → const GLenum
TEXTURE_WRAP_S → const GLenum
TEXTURE_WRAP_T → const GLenum
TRIANGLE_FAN → const GLenum
TRIANGLE_STRIP → const GLenum
TRIANGLES → const GLenum
UNPACK_ALIGNMENT → const GLenum
UNPACK_COLORSPACE_CONVERSION_WEBGL → const GLenum
UNPACK_FLIP_Y_WEBGL → const GLenum
UNPACK_PREMULTIPLY_ALPHA_WEBGL → const GLenum
UNSIGNED_BYTE → const GLenum
UNSIGNED_INT → const GLenum
UNSIGNED_SHORT → const GLenum
UNSIGNED_SHORT_4_4_4_4 → const GLenum
UNSIGNED_SHORT_5_5_5_1 → const GLenum
UNSIGNED_SHORT_5_6_5 → const GLenum
VALIDATE_STATUS → const GLenum
VENDOR → const GLenum
VERSION → const GLenum
VERTEX_ATTRIB_ARRAY_BUFFER_BINDING → const GLenum
VERTEX_ATTRIB_ARRAY_ENABLED → const GLenum
VERTEX_ATTRIB_ARRAY_NORMALIZED → const GLenum
VERTEX_ATTRIB_ARRAY_POINTER → const GLenum
VERTEX_ATTRIB_ARRAY_SIZE → const GLenum
VERTEX_ATTRIB_ARRAY_STRIDE → const GLenum
VERTEX_ATTRIB_ARRAY_TYPE → const GLenum
VERTEX_SHADER → const GLenum
VIEWPORT → const GLenum
ZERO → const GLenum