WebGL2
WebGL2 extends the browser's GPU rendering capabilities with a more capable API based on OpenGL ES 3.0 concepts. It supports more advanced graphics techniques than WebGL 1.
Overview
WebGL2 extends the browser's GPU rendering capabilities with a more capable API based on OpenGL ES 3.0 concepts. It supports more advanced graphics techniques than WebGL 1.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 56 | 79 | 51 | 15 | 58 | 15 | |
getContext (webgl2 context) WebGL2 context | 56 | 79 | 51 | 15 | 56 | 15 |
getContext (webgl2 context options alpha parameter) `options.alpha` parameter | 56 | 79 | 30 | 15 | 56 | 15 |
getContext (webgl2 context options failIfMajorPerformanceCaveat parameter) `options.failIfMajorPerformanceCaveat` parameter | 56 | 79 | 41 | 15 | 56 | 15 |
getContext (webgl2 context options powerPreference parameter) `options.powerPreference` parameter | 75 | 79 | 63 | 15 | 75 | 15 |
| The WebGLRenderingContext.activeTexture() method of the WebGL API specifies which texture unit to make active. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.attachShader() method of the WebGL API attaches either a fragment or vertex WebGLShader to a WebGLProgram. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.beginQuery() method of the WebGL 2 API starts an asynchronous query. The target parameter indicates which kind of query to begin. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.beginTransformFeedback() method of the WebGL 2 API starts a transform feedback operation. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.bindAttribLocation() method of the WebGL API binds a generic vertex index to an attribute variable. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.bindBuffer() method of the WebGL API binds a given WebGLBuffer to a target. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.bindBufferBase() method of the WebGL 2 API binds a given WebGLBuffer to a given binding point (target) at a given index. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.bindBufferRange() method of the WebGL 2 API binds a range of a given WebGLBuffer to a given binding point (target) at a given index. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.bindRenderbuffer() method of the WebGL API binds a given WebGLRenderbuffer to a target, which must be gl.RENDERBUFFER. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.bindSampler() method of the WebGL 2 API binds a passed WebGLSampler object to the texture unit at the passed index. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.bindTexture() method of the WebGL API binds a given WebGLTexture to a target (binding point). | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.bindTransformFeedback() method of the WebGL 2 API binds a passed WebGLTransformFeedback object to the current GL state. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.bindVertexArray() method of the WebGL 2 API binds a passed WebGLVertexArrayObject object to the buffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.blendColor() method of the WebGL API is used to set the source and destination blending factors. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.blendEquationSeparate() method of the WebGL API is used to set the RGB blend equation and alpha blend equation separately. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.blendFunc() method of the WebGL API defines which function is used for blending pixel arithmetic. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.blendFuncSeparate() method of the WebGL API defines which function is used for blending pixel arithmetic for RGB and alpha components separately. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.blitFramebuffer() method of the WebGL 2 API transfers a block of pixels from the read framebuffer to the draw framebuffer. Read and draw framebuffers are bound using WebGLRenderingContext.bindFramebuffer(). | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.bufferData() method of the WebGL API creates and initializes the buffer object's data store. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.bufferSubData() method of the WebGL API updates a subset of a buffer object's data store. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.checkFramebufferStatus() method of the WebGL API returns the completeness status of the WebGLFramebuffer object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.clear() method of the WebGL API clears buffers to preset values. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.clearBuffer[fiuv]() methods of the WebGL 2 API clear buffers from the currently bound framebuffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.clearBuffer[fiuv]() methods of the WebGL 2 API clear buffers from the currently bound framebuffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.clearBuffer[fiuv]() methods of the WebGL 2 API clear buffers from the currently bound framebuffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.clearBuffer[fiuv]() methods of the WebGL 2 API clear buffers from the currently bound framebuffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.clearColor() method of the WebGL API specifies the color values used when clearing color buffers. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.clearDepth() method of the WebGL API specifies the clear value for the depth buffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.clearStencil() method of the WebGL API specifies the clear value for the stencil buffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.clientWaitSync() method of the WebGL 2 API blocks and waits for a WebGLSync object to become signaled or a given timeout to be passed. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.colorMask() method of the WebGL API sets which color components to enable or to disable when drawing or rendering to a WebGLFramebuffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.compileShader() method of the WebGL API compiles a GLSL shader into binary data so that it can be used by a WebGLProgram. | 56 | 79 | 51 | 15 | 58 | 15 |
| The compressedTexImage2D() method of the WebGLRenderingContext interface of the WebGL API specifies a two-dimensional texture image in a compressed format. | 56 | 79 | 51 | 15 | 58 | 15 |
| The compressedTexImage3D() method of the WebGL2RenderingContext interface of the WebGL API specifies a three-dimensional texture image in a compressed format. | 56 | 79 | 51 | 15 | 58 | 15 |
| The compressedTexSubImage2D() method of the WebGLRenderingContext interface of the WebGL API specifies a two-dimensional sub-rectangle for a texture image in a compressed format. | 56 | 79 | 51 | 15 | 58 | 15 |
| The compressedTexSubImage3D() method of the WebGL2RenderingContext interface of the WebGL API specifies a three-dimensional sub-rectangle for a texture image in a compressed format. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.copyBufferSubData() method of the WebGL 2 API copies part of the data of a buffer to another buffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The copyTexImage2D() method of the WebGLRenderingContext interface of the WebGL API copies pixels from the current WebGLFramebuffer into a 2D texture image. | 56 | 79 | 51 | 15 | 58 | 15 |
| The copyTexSubImage2D() method of the WebGLRenderingContext interface of the WebGL API copies pixels from the current WebGLFramebuffer into a 2D texture sub-image. | 56 | 79 | 51 | 15 | 58 | 15 |
| The copyTexSubImage3D() method of the WebGL2RenderingContext interface of the WebGL API copies pixels from the current WebGLFramebuffer into a 3D texture sub-image. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.createBuffer() method of the WebGL API creates and initializes a WebGLBuffer storing data such as vertices or colors. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.createFramebuffer() method of the WebGL API creates and initializes a WebGLFramebuffer object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.createProgram() method of the WebGL API creates and initializes a WebGLProgram object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.createQuery() method of the WebGL 2 API creates and initializes WebGLQuery objects, which provide ways to asynchronously query for information. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.createRenderbuffer() method of the WebGL API creates and initializes a WebGLRenderbuffer object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.createSampler() method of the WebGL 2 API creates and initializes WebGLSampler objects. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext method createShader() of the WebGL API creates a WebGLShader that can then be configured further using WebGLRenderingContext.shaderSource() and WebGLRenderingContext.compileShader(). | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.createTexture() method of the WebGL API creates and initializes a WebGLTexture object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.createTransformFeedback() method of the WebGL 2 API creates and initializes WebGLTransformFeedback objects. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.createVertexArray() method of the WebGL 2 API creates and initializes a WebGLVertexArrayObject object that represents a vertex array object (VAO) pointing to vertex array data and which provides names for different sets of vertex data. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.cullFace() method of the WebGL API specifies whether or not front- and/or back-facing polygons can be culled. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.deleteQuery() method of the WebGL 2 API deletes a given WebGLQuery object. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.deleteSampler() method of the WebGL 2 API deletes a given WebGLSampler object. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.deleteSync() method of the WebGL 2 API deletes a given WebGLSync object. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.deleteTransformFeedback() method of the WebGL 2 API deletes a given WebGLTransformFeedback object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.deleteVertexArray() method of the WebGL 2 API deletes a given WebGLVertexArrayObject object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.depthFunc() method of the WebGL API specifies a function that compares incoming pixel depth to the current depth buffer value. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.depthMask() method of the WebGL API sets whether writing into the depth buffer is enabled or disabled. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.depthRange() method of the WebGL API specifies the depth range mapping from normalized device coordinates to window or viewport coordinates. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.detachShader() method of the WebGL API detaches a previously attached WebGLShader from a WebGLProgram. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.disable() method of the WebGL API disables specific WebGL capabilities for this context. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.disableVertexAttribArray() method of the WebGL API turns the generic vertex attribute array off at a given index position. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.drawArrays() method of the WebGL API renders primitives from array data. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.drawArraysInstanced() method of the WebGL 2 API renders primitives from array data like the WebGLRenderingContext.drawArrays() method. In addition, it can execute multiple instances of the range of elements. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.drawBuffers() method of the WebGL 2 API defines draw buffers to which fragment colors are written into. The draw buffer settings are part of the state of the currently bound framebuffer or the drawing buffer if no framebuffer is bound. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.drawElements() method of the WebGL API renders primitives from array data. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.drawElementsInstanced() method of the WebGL 2 API renders primitives from array data like the WebGLRenderingContext.drawElements() method. In addition, it can execute multiple instances of a set of elements. | 56 | 79 | 51 | 15 | 58 | 15 |
drawingBufferFormat Experimental | 122 | 122 | | | 122 | |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
drawingBufferStorage Experimental | 122 | 122 | | | 122 | |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.drawRangeElements() method of the WebGL API renders primitives from array data in a given range. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.enable() method of the WebGL API enables specific WebGL capabilities for this context. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.endQuery() method of the WebGL 2 API marks the end of a given query target. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.endTransformFeedback() method of the WebGL 2 API ends a transform feedback operation. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.fenceSync() method of the WebGL 2 API creates a new WebGLSync object and inserts it into the GL command stream. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.finish() method of the WebGL API blocks execution until all previously called commands are finished. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.flush() method of the WebGL API empties different buffer commands, causing all commands to be executed as quickly as possible. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.framebufferRenderbuffer() method of the WebGL API attaches a WebGLRenderbuffer object to a WebGLFramebuffer object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.framebufferTexture2D() method of the WebGL API attaches a texture to a WebGLFramebuffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.framebufferTextureLayer() method of the WebGL 2 API attaches a single layer of a texture to a framebuffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.frontFace() method of the WebGL API specifies whether polygons are front- or back-facing by setting a winding orientation. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.generateMipmap() method of the WebGL API generates a set of mipmaps for a WebGLTexture object. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.getActiveUniformBlockName() method of the WebGL 2 API retrieves the name of the active uniform block at a given index within a WebGLProgram. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.getActiveUniformBlockParameter() method of the WebGL 2 API retrieves information about an active uniform block within a WebGLProgram. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.getActiveUniforms() method of the WebGL 2 API retrieves information about active uniforms within a WebGLProgram. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getAttachedShaders() method of the WebGL API returns a list of WebGLShader objects attached to a WebGLProgram. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getAttribLocation() method of the WebGL API returns the location of an attribute variable in a given WebGLProgram. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getBufferParameter() method of the WebGL API returns information about the buffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.getBufferSubData() method of the WebGL 2 API reads data from a buffer binding point and writes them to an ArrayBuffer or SharedArrayBuffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getContextAttributes() method returns a WebGLContextAttributes object that contains the actual context parameters. Might return null, if the context is lost. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getError() method of the WebGL API returns error information. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getExtension() method enables a WebGL extension. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.getFragDataLocation() method of the WebGL 2 API returns the binding of color numbers to user-defined varying out variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getFramebufferAttachmentParameter() method of the WebGL API returns information about a framebuffer's attachment. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.getIndexedParameter() method of the WebGL 2 API returns indexed information about a given target. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.getInternalformatParameter() method of the WebGL 2 API returns information about implementation-dependent support for internal formats. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getParameter() method of the WebGL API returns a value for the passed parameter name. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getProgramParameter() method of the WebGL API returns information about the given program. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.getQuery() method of the WebGL 2 API returns the currently active WebGLQuery for the target, or null. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.getQueryParameter() method of the WebGL 2 API returns parameter information of a WebGLQuery object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getRenderbufferParameter() method of the WebGL API returns information about the renderbuffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.getSamplerParameter() method of the WebGL 2 API returns parameter information of a WebGLSampler object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getShaderInfoLog returns the information log for the specified WebGLShader object. It contains warnings, debugging and compile information. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getShaderParameter() method of the WebGL API returns information about the given shader. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getShaderPrecisionFormat() method of the WebGL API returns a new WebGLShaderPrecisionFormat object describing the range and precision for the specified shader numeric format. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getShaderSource() method of the WebGL API returns the source code of a WebGLShader as a string. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getSupportedExtensions() method returns a list of all the supported WebGL extensions. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.getSyncParameter() method of the WebGL 2 API returns parameter information of a WebGLSync object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getTexParameter() method of the WebGL API returns information about the given texture. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.getTransformFeedbackVarying() method of the WebGL 2 API returns information about varying variables from WebGLTransformFeedback buffers. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getUniform() method of the WebGL API returns the value of a uniform variable at a given location. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.getUniformBlockIndex() method of the WebGL 2 API retrieves the index of a uniform block within a WebGLProgram. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.getUniformIndices() method of the WebGL 2 API retrieves the indices of a number of uniforms within a WebGLProgram. | 56 | 79 | 51 | 15 | 58 | 15 |
| Part of the WebGL API, the WebGLRenderingContext method getUniformLocation() returns the location of a specific uniform variable which is part of a given WebGLProgram. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getVertexAttrib() method of the WebGL API returns information about a vertex attribute at a given position. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.getVertexAttribOffset() method of the WebGL API returns the address of a specified vertex attribute. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.hint() method of the WebGL API specifies hints for certain behaviors. The interpretation of these hints depend on the implementation. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.invalidateFramebuffer() method of the WebGL 2 API invalidates the contents of attachments in a framebuffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.invalidateSubFramebuffer() method of the WebGL 2 API invalidates portions of the contents of attachments in a framebuffer. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.isBuffer() method of the WebGL API returns true if the passed WebGLBuffer is valid and false otherwise. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.isEnabled() method of the WebGL API tests whether a specific WebGL capability is enabled or not for this context. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.isFramebuffer() method of the WebGL API returns true if the passed WebGLFramebuffer is valid and false otherwise. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.isProgram() method of the WebGL API returns true if the passed WebGLProgram is valid, false otherwise. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.isQuery() method of the WebGL 2 API returns true if the passed object is a valid WebGLQuery object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.isRenderbuffer() method of the WebGL API returns true if the passed WebGLRenderbuffer is valid and false otherwise. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.isSampler() method of the WebGL 2 API returns true if the passed object is a valid WebGLSampler object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.isShader() method of the WebGL API returns true if the passed WebGLShader is valid, false otherwise. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.isSync() method of the WebGL 2 API returns true if the passed object is a valid WebGLSync object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.isTexture() method of the WebGL API returns true if the passed WebGLTexture is valid and false otherwise. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.isTransformFeedback() method of the WebGL 2 API returns true if the passed object is a valid WebGLTransformFeedback object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.isVertexArray() method of the WebGL API returns true if the passed object is a valid WebGLVertexArrayObject object. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.lineWidth() method of the WebGL API sets the line width of rasterized lines. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.pauseTransformFeedback() method of the WebGL 2 API pauses a transform feedback operation. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.pixelStorei() method of the WebGL API specifies the pixel storage modes. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.polygonOffset() method of the WebGL API specifies the scale factors and units to calculate depth values. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.readBuffer() method of the WebGL 2 API selects a color buffer as the source for pixels for subsequent calls to WebGLRenderingContext.copyTexImage2D, WebGLRenderingContext.copyTexSubImage2D, WebGL2RenderingContext.copyTexSubImage3D or WebGLRenderingContext.readPixels. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.renderbufferStorage() method of the WebGL API creates and initializes a renderbuffer object's data store. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.renderbufferStorageMultisample() method of the WebGL 2 API returns creates and initializes a renderbuffer object's data store and allows specifying a number of samples to be used. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.resumeTransformFeedback() method of the WebGL 2 API resumes a transform feedback operation. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.sampleCoverage() method of the WebGL API specifies multi-sample coverage parameters for anti-aliasing effects. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.samplerParameter[if]() methods of the WebGL 2 API set WebGLSampler parameters. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.samplerParameter[if]() methods of the WebGL 2 API set WebGLSampler parameters. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.scissor() method of the WebGL API sets a scissor box, which limits the drawing to a specified rectangle. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.shaderSource() method of the WebGL API sets the source code of a WebGLShader. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.stencilFunc() method of the WebGL API sets the front and back function and reference value for stencil testing. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.stencilFuncSeparate() method of the WebGL API sets the front and/or back function and reference value for stencil testing. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.stencilOp() method of the WebGL API sets both the front and back-facing stencil test actions. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.stencilOpSeparate() method of the WebGL API sets the front and/or back-facing stencil test actions. | 56 | 79 | 51 | 15 | 58 | 15 |
| The texImage2D() method of the WebGLRenderingContext interface of the WebGL API specifies a two-dimensional texture image. | 56 | 79 | 51 | 15 | 58 | 15 |
| The texImage3D() method of the WebGL2RenderingContext interface of the WebGL API specifies a three-dimensional texture image. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.texParameter[fi]() methods of the WebGL API set texture parameters. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.texParameter[fi]() methods of the WebGL API set texture parameters. | 56 | 79 | 51 | 15 | 58 | 15 |
| The texStorage2D() method of the WebGL2RenderingContext of the WebGL API specifies all levels of two-dimensional texture storage. | 56 | 79 | 51 | 15 | 58 | 15 |
| The texStorage3D() method of the WebGL2RenderingContext of the WebGL API specifies all levels of three-dimensional texture storage. | 56 | 79 | 51 | 15 | 58 | 15 |
| The texSubImage2D() method of the WebGLRenderingContext interface of the WebGL API specifies a two-dimensional sub-rectangle for a texture image. | 56 | 79 | 51 | 15 | 58 | 15 |
| The texSubImage3D() method of the WebGL2RenderingContext interface of the WebGL API specifies a three-dimensional sub-rectangle for a texture image. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.transformFeedbackVaryings() method of the WebGL 2 API specifies values to record in WebGLTransformFeedback buffers. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniform[1234][uif][v]() methods of the WebGL API specify values of uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniform[1234][uif][v]() methods of the WebGL API specify values of uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniform[1234][uif][v]() methods of the WebGL API specify values of uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniform[1234][uif][v]() methods of the WebGL API specify values of uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniform[1234][uif][v]() methods of the WebGL API specify values of uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniform[1234][uif][v]() methods of the WebGL API specify values of uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniform[1234][fi][v]() methods of the WebGL API specify values of uniform variables. All active uniform variables defined in a program object are initialized to 0 when the program object is linked successfully. They retain the values assigned to them by a call to this method until the next successful link operation occurs on the… | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniform[1234][uif][v]() methods of the WebGL API specify values of uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniform[1234][uif][v]() methods of the WebGL API specify values of uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniformBlockBinding() method of the WebGL 2 API assigns binding points for active uniform blocks. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniformMatrix[234]x[234]fv() methods of the WebGL 2 API specify matrix values for uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniformMatrix[234]x[234]fv() methods of the WebGL 2 API specify matrix values for uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniformMatrix[234]x[234]fv() methods of the WebGL 2 API specify matrix values for uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniformMatrix[234]fv() methods of the WebGL API specify matrix values for uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniformMatrix[234]x[234]fv() methods of the WebGL 2 API specify matrix values for uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniformMatrix[234]x[234]fv() methods of the WebGL 2 API specify matrix values for uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.uniformMatrix[234]fv() methods of the WebGL API specify matrix values for uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniformMatrix[234]x[234]fv() methods of the WebGL 2 API specify matrix values for uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.uniformMatrix[234]x[234]fv() methods of the WebGL 2 API specify matrix values for uniform variables. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.useProgram() method of the WebGL API sets the specified WebGLProgram as part of the current rendering state. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.vertexAttrib[1234]f[v]() methods of the WebGL API specify constant values for generic vertex attributes. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.vertexAttrib[1234]f[v]() methods of the WebGL API specify constant values for generic vertex attributes. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.vertexAttrib[1234]f[v]() methods of the WebGL API specify constant values for generic vertex attributes. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.vertexAttrib[1234]f[v]() methods of the WebGL API specify constant values for generic vertex attributes. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.vertexAttrib[1234]f[v]() methods of the WebGL API specify constant values for generic vertex attributes. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.vertexAttrib[1234]f[v]() methods of the WebGL API specify constant values for generic vertex attributes. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.vertexAttrib[1234]f[v]() methods of the WebGL API specify constant values for generic vertex attributes. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLRenderingContext.vertexAttrib[1234]f[v]() methods of the WebGL API specify constant values for generic vertex attributes. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.vertexAttribDivisor() method of the WebGL 2 API modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with WebGL2RenderingContext.drawArraysInstanced() and WebGL2RenderingContext.drawElementsInstanced(). | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.vertexAttribI4[u]i[v]() methods of the WebGL 2 API specify integer values for generic vertex attributes. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.vertexAttribI4[u]i[v]() methods of the WebGL 2 API specify integer values for generic vertex attributes. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.vertexAttribI4[u]i[v]() methods of the WebGL 2 API specify integer values for generic vertex attributes. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.vertexAttribI4[u]i[v]() methods of the WebGL 2 API specify integer values for generic vertex attributes. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.vertexAttribIPointer() method of the WebGL 2 API specifies integer data formats and locations of vertex attributes in a vertex attributes array. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| 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. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGL2RenderingContext.waitSync() method of the WebGL 2 API returns immediately, but waits on the GL server until the given WebGLSync object is signaled. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLQuery interface is part of the WebGL 2 API and provides ways to asynchronously query for information. By default, occlusion queries and primitive queries are available. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLSampler interface is part of the WebGL 2 API and stores sampling parameters for WebGLTexture access inside of a shader. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLSync interface is part of the WebGL 2 API and is used to synchronize activities between the GPU and the application. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLTransformFeedback interface is part of the WebGL 2 API and enables transform feedback, which is the process of capturing primitives generated by vertex processing. It allows to preserve the post-transform rendering state of an object and resubmit this data multiple times. | 56 | 79 | 51 | 15 | 58 | 15 |
| The WebGLVertexArrayObject interface is part of the WebGL 2 API, represents vertex array objects (VAOs) pointing to vertex array data, and provides names for different sets of vertex data. | 56 | 79 | 51 | 15 | 58 | 15 |
- Previously available under a different name: experimental-webgl2 (25)
- This browser only partially implements this feature
- Chrome respects the GPU hint on macOS only.
- This browser only partially implements this feature
- Edge respects the GPU hint on macOS only.
- This browser only partially implements this feature
- Firefox respects the GPU hint on macOS only.
- This browser only partially implements this feature
- Chrome Android respects the GPU hint on macOS only.
Syntax
<canvas id="gl2" width="400" height="300"></canvas>
<script>
const gl = document.getElementById('gl2').getContext('webgl2');
gl.clearColor(0.1, 0.1, 0.1, 1.0);
gl.clear(gl.COLOR_BUFFER_BIT);
</script> Live demo
Viewport resize
Use WebGL2 commands after resizing the viewport to match the canvas dimensions.
Use cases
Advanced 3D rendering
Use newer texture, buffer, and shader capabilities for scenes that need more control than WebGL 1 provides.
Visualization engines
Scientific, mapping, and simulation tools can benefit from the broader rendering feature set.
Cautions
- The added capability also brings more complexity, so avoid it if the simpler rendering stack is already enough.
- Test fallback behavior carefully because some environments still expose only WebGL 1.
Accessibility
- As with other graphics APIs, preserve equivalent information outside the rendered scene whenever possible.
- Users should not need precise pointer gestures or motion-heavy interaction just to reach essential functionality.
Related links
Powered by web-features