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 WebGLPowerPreference
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 int
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 int
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
isDefinedAndNotNull bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

no setter
isNull bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

Whether this value corresponds to JavaScript null.
no setter
isTruthy JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of !!this in JavaScript.
no setter
isUndefined bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

Whether this value corresponds to JavaScript undefined.
no setter
isUndefinedOrNull bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

no setter
not JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of !this in JavaScript.
no setter
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.
add(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this + any in JavaScript.
and(JSAny? any) JSAny?

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this && any in JavaScript.
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.
callMethod<R extends JSAny?>(JSAny method, [JSAny? arg1, JSAny? arg2, JSAny? arg3, JSAny? arg4]) → R

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Calls method on this JSObject with up to four arguments.
callMethodVarArgs<R extends JSAny?>(JSAny method, [List<JSAny?>? arguments]) → R

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Calls method on this JSObject with a variable number of arguments.
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.
dartify() Object?

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Converts a JavaScript JSON-like value to the Dart equivalent if possible.
delete(JSAny property) JSBoolean

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Deletes the property with key property from this JSObject.
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.
divide(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this / any in JavaScript.
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.
equals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this == any in JavaScript.
exponentiate(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this ** any in JavaScript.
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() int
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.
getProperty<R extends JSAny?>(JSAny property) → R

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

The value of the property key property of this JSObject.
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.
greaterThan(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this > any in JavaScript.
greaterThanOrEqualTo(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this >= any in JavaScript.
has(String property) bool

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Shorthand helper for hasProperty to check whether this JSObject contains the property key property, but takes and returns a Dart value.
hasProperty(JSAny property) JSBoolean

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Whether or not this JSObject contains the property key property.
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.
instanceof(JSFunction constructor) bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this JSAny? is an instanceof constructor.
instanceOfString(String constructorName) bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this JSAny? is an instanceof the constructor that is defined by constructorName, which is looked up in the globalContext.
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.
lessThan(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this < any in JavaScript.
lessThanOrEqualTo(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this <= any in JavaScript.
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.
modulo(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this % any in JavaScript.
multiply(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this * any in JavaScript.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notEquals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this != any in JavaScript.
or(JSAny? any) JSAny?

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this || any in JavaScript.
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.
setProperty(JSAny property, JSAny? value) → void

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Write the value of property key property of this JSObject.
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.
strictEquals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this === any in JavaScript.
strictNotEquals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this !== any in JavaScript.
subtract(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this - any in JavaScript.
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() WebGLPowerPreference
A string representation of this object.
inherited
typeofEquals(String typeString) bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether the result of typeof on this JSAny? is typeString.
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
unsignedRightShift(JSAny? any) JSNumber

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this >>> any in JavaScript.
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
operator [](String property) JSAny?

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Shorthand helper for getProperty to get the value of the property key property of this JSObject, but takes a Dart value.
operator []=(String property, JSAny? value) → void

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Shorthand helper for setProperty to write the value of the property key property of this JSObject, but takes a Dart value.

Constants

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