W3cubDocs

/DOM

WebGLRenderingContext

Constants

See the WebGL constants page.

The WebGL context

The following properties and methods provide general information and functionality to deal with the WebGL context:

WebGLRenderingContext.canvas
A read-only back-reference to the HTMLCanvasElement. Might be null if it is not associated with a <canvas> element.
WebGLRenderingContext.commit()

Pushes frames back to the original HTMLCanvasElement, if the context is not directly fixed to a specific canvas.

WebGLRenderingContext.drawingBufferWidth
The read-only width of the current drawing buffer. Should match the width of the canvas element associated with this context.
WebGLRenderingContext.drawingBufferHeight
The read-only height of the current drawing buffer. Should match the height of the canvas element associated with this context.
WebGLRenderingContext.getContextAttributes()
Returns a WebGLContextAttributes object that contains the actual context parameters. Might return null, if the context is lost.
WebGLRenderingContext.isContextLost()
Returns true if the context is lost, otherwise returns false.

Viewing and clipping

WebGLRenderingContext.scissor()
Defines the scissor box.
WebGLRenderingContext.viewport()
Sets the viewport.

State information

WebGLRenderingContext.activeTexture()
Selects the active texture unit.
WebGLRenderingContext.blendColor()
Sets the source and destination blending factors.
WebGLRenderingContext.blendEquation()
Sets both the RGB blend equation and alpha blend equation to a single equation.
WebGLRenderingContext.blendEquationSeparate()
Sets the RGB blend equation and alpha blend equation separately.
WebGLRenderingContext.blendFunc()
Defines which function is used for blending pixel arithmetic.
WebGLRenderingContext.blendFuncSeparate()
Defines which function is used for blending pixel arithmetic for RGB and alpha components separately.
WebGLRenderingContext.clearColor()
Specifies the color values used when clearing color buffers.
WebGLRenderingContext.clearDepth()
Specifies the depth value used when clearing the depth buffer.
WebGLRenderingContext.clearStencil()
Specifies the stencil value used when clearing the stencil buffer.
WebGLRenderingContext.colorMask()
Sets which color components to enable or to disable when drawing or rendering to a WebGLFramebuffer.
WebGLRenderingContext.cullFace()
Specifies whether or not front- and/or back-facing polygons can be culled.
WebGLRenderingContext.depthFunc()
Specifies a function that compares incoming pixel depth to the current depth buffer value.
WebGLRenderingContext.depthMask()
Sets whether writing into the depth buffer is enabled or disabled.
WebGLRenderingContext.depthRange()
Specifies the depth range mapping from normalized device coordinates to window or viewport coordinates.
WebGLRenderingContext.disable()
Disables specific WebGL capabilities for this context.
WebGLRenderingContext.enable()
Enables specific WebGL capabilities for this context.
WebGLRenderingContext.frontFace()
Specifies whether polygons are front- or back-facing by setting a winding orientation.
WebGLRenderingContext.getParameter()
Returns a value for the passed parameter name.
WebGLRenderingContext.getError()
Returns error information.
WebGLRenderingContext.hint()
Specifies hints for certain behaviors. The interpretation of these hints depend on the implementation.
WebGLRenderingContext.isEnabled()
Tests whether a specific WebGL capability is enabled or not for this context.
WebGLRenderingContext.lineWidth()
Sets the line width of rasterized lines.
WebGLRenderingContext.pixelStorei()
Specifies the pixel storage modes
WebGLRenderingContext.polygonOffset()
Specifies the scale factors and units to calculate depth values.
WebGLRenderingContext.sampleCoverage()
Specifies multi-sample coverage parameters for anti-aliasing effects.
WebGLRenderingContext.stencilFunc()
Sets the both front and back function and reference value for stencil testing.
WebGLRenderingContext.stencilFuncSeparate()
Sets the front and/or back function and reference value for stencil testing.
WebGLRenderingContext.stencilMask()
Controls enabling and disabling of both the front and back writing of individual bits in the stencil planes.
WebGLRenderingContext.stencilMaskSeparate()
Controls enabling and disabling of front and/or back writing of individual bits in the stencil planes.
WebGLRenderingContext.stencilOp()
Sets both the front and back-facing stencil test actions.
WebGLRenderingContext.stencilOpSeparate()
Sets the front and/or back-facing stencil test actions.

Buffers

WebGLRenderingContext.bindBuffer()
Binds a WebGLBuffer object to a given target.
WebGLRenderingContext.bufferData()
Updates buffer data.
WebGLRenderingContext.bufferSubData()
Updates buffer data starting at a passed offset.
WebGLRenderingContext.createBuffer()
Creates a WebGLBuffer object.
WebGLRenderingContext.deleteBuffer()
Deletes a WebGLBuffer object.
WebGLRenderingContext.getBufferParameter()
Returns information about the buffer.
WebGLRenderingContext.isBuffer()
Returns a Boolean indicating if the passed buffer is valid.

Framebuffers

WebGLRenderingContext.bindFramebuffer()
Binds a WebGLFrameBuffer object to a given target.
WebGLRenderingContext.checkFramebufferStatus()
Returns the status of the framebuffer.
WebGLRenderingContext.createFramebuffer()
Creates a WebGLFrameBuffer object.
WebGLRenderingContext.deleteFramebuffer()
Deletes a WebGLFrameBuffer object.
WebGLRenderingContext.framebufferRenderbuffer()
Attaches a WebGLRenderingBuffer object to a WebGLFrameBuffer object.
WebGLRenderingContext.framebufferTexture2D()
Attaches a textures image to a WebGLFrameBuffer object.
WebGLRenderingContext.getFramebufferAttachmentParameter()
Returns information about the framebuffer.
WebGLRenderingContext.isFramebuffer()
Returns a Boolean indicating if the passed WebGLFrameBuffer object is valid.
WebGLRenderingContext.readPixels()
Reads a block of pixels from the WebGLFrameBuffer.

Renderbuffers

WebGLRenderingContext.bindRenderbuffer()
Binds a WebGLRenderBuffer object to a given target.
WebGLRenderingContext.createRenderbuffer()
Creates a WebGLRenderBuffer object.
WebGLRenderingContext.deleteRenderbuffer()
Deletes a WebGLRenderBuffer object.
WebGLRenderingContext.getRenderbufferParameter()
Returns information about the renderbuffer.
WebGLRenderingContext.isRenderbuffer()
Returns a Boolean indicating if the passed WebGLRenderingBuffer is valid.
WebGLRenderingContext.renderbufferStorage()
Creates a renderbuffer data store.

Textures

WebGLRenderingContext.bindTexture()
Binds a WebGLTexture object to a given target.
WebGLRenderingContext.compressedTexImage2D()
Specifies a 2D texture image in a compressed format.
WebGLRenderingContext.compressedTexSubImage2D()
Specifies a 2D texture sub-image in a compressed format.
WebGLRenderingContext.copyTexImage2D()
Copies a 2D texture image.
WebGLRenderingContext.copyTexSubImage2D()
Copies a 2D texture sub-image.
WebGLRenderingContext.createTexture()
Creates a WebGLTexture object.
WebGLRenderingContext.deleteTexture()
Deletes a WebGLTexture object.
WebGLRenderingContext.generateMipmap()
Generates a set of mipmaps for a WebGLTexture object.
WebGLRenderingContext.getTexParameter()
Returns information about the texture.
WebGLRenderingContext.isTexture()
Returns a Boolean indicating if the passed WebGLTexture is valid.
WebGLRenderingContext.texImage2D()
Specifies a 2D texture image.
WebGLRenderingContext.texSubImage2D()
Updates a sub-rectangle of the current WebGLTexture.
WebGLRenderingContext.texParameterf()
Sets texture parameters.
WebGLRenderingContext.texParameteri()
Sets texture parameters.

Programs and shaders

WebGLRenderingContext.attachShader()
Attaches a WebGLShader to a WebGLProgram.
WebGLRenderingContext.bindAttribLocation()
Binds a generic vertex index to a named attribute variable.
WebGLRenderingContext.compileShader()
Compiles a WebGLShader.
WebGLRenderingContext.createProgram()
Creates a WebGLProgram.
WebGLRenderingContext.createShader()
Creates a WebGLShader.
WebGLRenderingContext.deleteProgram()
Deletes a WebGLProgram.
WebGLRenderingContext.deleteShader()
Deletes a WebGLShader.
WebGLRenderingContext.detachShader()
Detaches a WebGLShader.
WebGLRenderingContext.getAttachedShaders()
Returns a list of WebGLShader objects attached to a WebGLProgram.
WebGLRenderingContext.getProgramParameter()
Returns information about the program.
WebGLRenderingContext.getProgramInfoLog()
Returns the information log for a WebGLProgram object.
WebGLRenderingContext.getShaderParameter()
Returns information about the shader.
WebGLRenderingContext.getShaderPrecisionFormat()
Returns a WebGLShaderPrecisionFormat object describing the precision for the numeric format of the shader.
WebGLRenderingContext.getShaderInfoLog()
Returns the information log for a WebGLShader object.
WebGLRenderingContext.getShaderSource()
Returns the source code of a WebGLShader as a string.
WebGLRenderingContext.isProgram()
Returns a Boolean indicating if the passed WebGLProgram is valid.
WebGLRenderingContext.isShader()
Returns a Boolean indicating if the passed WebGLShader is valid.
WebGLRenderingContext.linkProgram()
Links the passed WebGLProgram object.
WebGLRenderingContext.shaderSource()
Sets the source code in a WebGLShader.
WebGLRenderingContext.useProgram()
Uses the specified WebGLProgram as part the current rendering state.
WebGLRenderingContext.validateProgram()
Validates a WebGLProgram.

Uniforms and attributes

WebGLRenderingContext.disableVertexAttribArray()
Disables a vertex attribute array at a given position.
WebGLRenderingContext.enableVertexAttribArray()
Enables a vertex attribute array at a given position.
WebGLRenderingContext.getActiveAttrib()
Returns information about an active attribute variable.
WebGLRenderingContext.getActiveUniform()
Returns information about an active uniform variable.
WebGLRenderingContext.getAttribLocation()
Returns the location of an attribute variable.
WebGLRenderingContext.getUniform()
Returns the value of a uniform variable at a given location.
WebGLRenderingContext.getUniformLocation()
Returns the location of a uniform variable.
WebGLRenderingContext.getVertexAttrib()
Returns information about a vertex attribute at a given position.
WebGLRenderingContext.getVertexAttribOffset()
Returns the address of a given vertex attribute.
WebGLRenderingContext.uniform[1234][fi][v]()
Specifies a value for a uniform variable.
WebGLRenderingContext.uniformMatrix[234]fv()
Specifies a matrix value for a uniform variable.
WebGLRenderingContext.vertexAttrib[1234]f[v]()
Specifies a value for a generic vertex attribute.
WebGLRenderingContext.vertexAttribPointer()
Specifies the data formats and locations of vertex attributes in a vertex attributes array.

Drawing buffers

WebGLRenderingContext.clear()
Clears specified buffers to preset values.
WebGLRenderingContext.drawArrays()
Renders primitives from array data.
WebGLRenderingContext.drawElements()
Renders primitives from element array data.
WebGLRenderingContext.finish()
Blocks execution until all previously called commands are finished.
WebGLRenderingContext.flush()
Empties different buffer commands, causing all commands to be executed as quickly as possible.

Working with extensions

These methods manage WebGL extensions:

WebGLRenderingContext.getSupportedExtensions()
Returns an Array of DOMString elements with all the supported WebGL extensions.
WebGLRenderingContext.getExtension()
Returns an extension object.

Examples

WebGL context feature detection

This example demonstrates how to detect a WebGL rendering context and reports the result to the user.

<p>[ Here would go the result of WebGL feature detection ]</p>
<button>Press here to detect WebGLRenderingContext</button>
body {
  text-align : center;
}
button {
  display : block;
  font-size : inherit;
  margin : auto;
  padding : 0.6em;
}
// Run everything inside window load event handler, to make sure
// DOM is fully loaded and styled before trying to manipulate it.
window.addEventListener("load", function() {
  var paragraph = document.querySelector("p"),
    button = document.querySelector("button");
  // Adding click event handler to button.
  button.addEventListener("click", detectWebGLContext, false);
  function detectWebGLContext () {
    // Create canvas element. The canvas is not added to the
    // document itself, so it is never displayed in the
    // browser window.
    var canvas = document.createElement("canvas");
    // Get WebGLRenderingContext from canvas element.
    var gl = canvas.getContext("webgl")
      || canvas.getContext("experimental-webgl");
    // Report the result.
    if (gl && gl instanceof WebGLRenderingContext) {
      paragraph.innerHTML =
        "Congratulations! Your browser supports WebGL.";
    } else {
      paragraph.innerHTML = "Failed to get WebGL context. "
        + "Your browser or device may not support WebGL.";
    }
  }
}, false);

The source code of this example is also available on GitHub.

Effect of canvas size on rendering with WebGL

With scissor() and clear() we can demonstrate how the WebGL drawing buffer is affected by the size of the canvas.

The size of the first canvas is set to the styled Element size, determined by CSS. This is done by assigning the width and height properties of the canvas to the values of the clientWidth and clientHeight properties, respectively.

In contrast, no such assignment is done for the second canvas. The internal width and height properties of the canvas remain at default values, which are different than the actual size of the canvas Element in the browser window.

The effect is clearly visible when using scissor() and clear() to draw a square in the center of the canvas, by specifying its position and size in pixels. In the first canvas, we get the desired result. In the second, the square has the wrong shape, size, and position.

<p>Compare the two canvases.</p>
<canvas>Your browser does not seem to support 
    HTML5 canvas.</canvas>
<canvas>Your browser does not seem to support 
    HTML5 canvas.</canvas>
body {
  text-align : center;
}
canvas {
  display : inline-block;
  width : 120px;
  height : 80px;
  margin : auto;
  padding : 0;
  border : none;
  background-color : black;
}
window.addEventListener("load", function() {
  "use strict"
  var firstCanvas = document.getElementsByTagName("canvas")[0],
    secondCanvas = document.getElementsByTagName("canvas")[1];
  firstCanvas.width = firstCanvas.clientWidth;
  firstCanvas.height = firstCanvas.clientHeight;
  [firstCanvas, secondCanvas].forEach(function(canvas) {
    var gl = canvas.getContext("webgl")
      || canvas.getContext("experimental-webgl");
    if (!gl) {
      document.querySelector("p").innerHTML =
        "Failed to get WebGL context. "
        + "Your browser or device may not support WebGL.";
      return;
    }
    gl.viewport(0, 0,
      gl.drawingBufferWidth, gl.drawingBufferHeight);
    gl.enable(gl.SCISSOR_TEST);
    gl.scissor(30, 10, 60, 60);
    gl.clearColor(1.0, 1.0, 0.0, 1.0);
    gl.clear(gl.COLOR_BUFFER_BIT);
  });
}, false);

The source code of this example is also available on GitHub.

Specifications

Specification Status Comment
WebGL 1.0
The definition of 'WebGLRenderingContext' in that specification.
Recommendation Initial definition

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support 9 12
12
To access the WebGL context, use experimental-webgl rather than the standard webgl identifier.
4 11
11
To access the WebGL context, use experimental-webgl rather than the standard webgl identifier.
12 5.1
Available in workers No No 44
Disabled
44
Disabled
Disabled From version 44: this feature is behind the gfx.offscreencanvas.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No No
activeTexture 9 12 4 11 12 5.1
attachShader 9 12 4 11 12 5.1
bindAttribLocation 9 12 4 11 12 5.1
bindBuffer 9 12 4 11 12 5.1
bindFramebuffer 9 12 4 11 12 5.1
bindRenderbuffer 9 12 4 11 12 5.1
bindTexture 9 12 4 11 12 5.1
blendColor 9 12 4 11 12 5.1
blendEquation 9 12 4 11 12 5.1
blendEquationSeparate 9 12 4 11 12 5.1
blendFunc 9 12 4 11 12 5.1
blendFuncSeparate 9 12 4 11 12 5.1
bufferData 9 12 4 11 12 5.1
bufferSubData 9 12 4 11 12 5.1
canvas 9 12 4 11 12 5.1
checkFramebufferStatus 9 12 4 11 12 5.1
clear 9 12 4 11 12 5.1
clearColor 9 12 4 11 12 5.1
clearDepth 9 12 4 11 12 5.1
clearStencil 9 12 4 11 12 5.1
colorMask 9 12 4 11 12 5.1
commit No No 44
Disabled
44
Disabled
Disabled From version 44: this feature is behind the gfx.offscreencanvas.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No No
compileShader 9 12 4 11 12 5.1
compressedTexImage2D 9 12 4 11 12 5.1
compressedTexSubImage2D 9 12 4 11 12 5.1
copyTexImage2D 9 12 4 11 12 5.1
copyTexSubImage2D 9 12 4 11 12 5.1
createBuffer 9 12 4 11 12 5.1
createFramebuffer 9 12 4 11 12 5.1
createProgram 9 12 4 11 12 5.1
createRenderbuffer 9 12 4 11 12 5.1
createShader 9 12 4 11 12 5.1
createTexture 9 12 4 11 12 5.1
cullFace 9 12 4 11 12 5.1
deleteBuffer 9 12 4 11 12 5.1
deleteFramebuffer 9 12 4 11 12 5.1
deleteProgram 9 12 4 11 12 5.1
deleteRenderbuffer 9 12 4 11 12 5.1
deleteShader 9 12 4 11 12 5.1
deleteTexture 9 12 4 11 12 5.1
depthFunc 9 12 4 11 12 5.1
depthMask 9 12 4 11 12 5.1
depthRange 9 12 4 11 12 5.1
detachShader 9 12 4 11 12 5.1
disable 9 12 4 11 12 5.1
disableVertexAttribArray 9 12 4 11 12 5.1
drawArrays 9 12 4 11 12 5.1
drawElements 9 12 4 11 12 5.1
drawingBufferHeight 9 12 4 11 12 5.1
drawingBufferWidth 9 12 4 11 12 5.1
enable 9 12 4 11 12 5.1
enableVertexAttribArray 9 12 4 11 12 5.1
finish 9 12 4 11 12 5.1
flush 9 12 4 11 12 5.1
framebufferRenderbuffer 9 12 4 11 12 5.1
framebufferTexture2D 9 12 4 11 12 5.1
frontFace 9 12 4 11 12 5.1
generateMipmap 9 12 4 11 12 5.1
getActiveAttrib 9 12 4 11 12 5.1
getActiveUniform 9 12 4 11 12 5.1
getAttachedShaders 9 12 4 11 12 5.1
getAttribLocation 9 12 4 11 12 5.1
getBufferParameter 9 12 4 11 12 5.1
getContextAttributes 9 12 4 11 12 5.1
getError 9 12 4 11 12 5.1
getExtension 9 12 4 11 12 5.1
getFramebufferAttachmentParameter 9 12 4 11 12 5.1
getParameter 9 12 4 11 12 5.1
getProgramInfoLog 9 12 4 11 12 5.1
getProgramParameter 9 12 4 11 12 5.1
getRenderbufferParameter 9 12 4 11 12 5.1
getShaderInfoLog 9 12 4 11 12 5.1
getShaderParameter 9 12 4 11 12 5.1
getShaderPrecisionFormat 9 12 4 11 12 5.1
getShaderSource 9 12 4 11 12 5.1
getSupportedExtensions 9 12 4 11 12 5.1
getTexParameter 9 12 4 11 12 5.1
getUniform 9 12 4 11 12 5.1
getUniformLocation 9 12 4 11 12 5.1
getVertexAttrib 9 12 4 11 12 5.1
getVertexAttribOffset 9 12 4 11 12 5.1
hint 9 12 4 11 12 5.1
isBuffer 9 12 4 11 12 5.1
isContextLost 9 12 4 11 12 5.1
isEnabled 9 12 4 11 12 5.1
isFramebuffer 9 12 4 11 12 5.1
isProgram 9 12 4 11 12 5.1
isRenderbuffer 9 12 4 11 12 5.1
isShader 9 12 4 11 12 5.1
isTexture 9 12 4 11 12 5.1
lineWidth No 12 No No No No
linkProgram 9 12 4 11 12 5.1
pixelStorei 9 12 4 11 12 5.1
polygonOffset 9 12 4 11 12 5.1
readPixels 9 12 4 11 12 5.1
renderbufferStorage 9 12 4 11 12 5.1
sampleCoverage 9 12 4 11 12 5.1
scissor 9 12 4 11 12 5.1
shaderSource 9 12 4 11 12 5.1
stencilFunc 9 12 4 11 12 5.1
stencilFuncSeparate 9 12 4 11 12 5.1
stencilMask 9 12 4 11 12 5.1
stencilMaskSeparate 9 12 4 11 12 5.1
stencilOp 9 12 4 11 12 5.1
stencilOpSeparate 9 12 4 11 12 5.1
texImage2D 9 12 4 11 12 5.1
texParameterf 9 12 4 11 12 5.1
texParameteri 9 12 4 11 12 5.1
texSubImage2D 9 12 4 11 12 5.1
uniform1f 9 12 4 11 12 5.1
uniform1fv 9 12 4 11 12 5.1
uniform1i 9 12 4 11 12 5.1
uniform1iv 9 12 4 11 12 5.1
uniform2f 9 12 4 11 12 5.1
uniform2fv 9 12 4 11 12 5.1
uniform2i 9 12 4 11 12 5.1
uniform2iv 9 12 4 11 12 5.1
uniform3f 9 12 4 11 12 5.1
uniform3fv 9 12 4 11 12 5.1
uniform3i 9 12 4 11 12 5.1
uniform3iv 9 12 4 11 12 5.1
uniform4f 9 12 4 11 12 5.1
uniform4fv 9 12 4 11 12 5.1
uniform4i 9 12 4 11 12 5.1
uniform4iv 9 12 4 11 12 5.1
uniformMatrix2fv 9 12 4 11 12 5.1
uniformMatrix3fv 9 12 4 11 12 5.1
uniformMatrix4fv 9 12 4 11 12 5.1
useProgram 9 12 4 11 12 5.1
validateProgram 9 12 4 11 12 5.1
vertexAttrib1f 9 12 4 11 12 5.1
vertexAttrib1fv 9 12 4 11 12 5.1
vertexAttrib2f 9 12 4 11 12 5.1
vertexAttrib2fv 9 12 4 11 12 5.1
vertexAttrib3f 9 12 4 11 12 5.1
vertexAttrib3fv 9 12 4 11 12 5.1
vertexAttrib4f 9 12 4 11 12 5.1
vertexAttrib4fv 9 12 4 11 12 5.1
vertexAttribPointer 9 12 4 11 12 5.1
viewport 9 12 4 11 12 5.1
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support Yes 25 Yes
Yes
To access the WebGL context, use experimental-webgl rather than the standard webgl identifier.
Yes 12 8.1 Yes
Available in workers No No No No No No No
activeTexture Yes 25 Yes Yes 12 8.1 Yes
attachShader Yes 25 Yes Yes 12 8.1 Yes
bindAttribLocation Yes 25 Yes Yes 12 8.1 Yes
bindBuffer Yes 25 Yes Yes 12 8.1 Yes
bindFramebuffer Yes 25 Yes Yes 12 8.1 Yes
bindRenderbuffer Yes 25 Yes Yes 12 8.1 Yes
bindTexture Yes 25 Yes Yes 12 8.1 Yes
blendColor Yes 25 Yes Yes 12 8.1 Yes
blendEquation Yes 25 Yes Yes 12 8.1 Yes
blendEquationSeparate Yes 25 Yes Yes 12 8.1 Yes
blendFunc Yes 25 Yes Yes 12 8.1 Yes
blendFuncSeparate Yes 25 Yes Yes 12 8.1 Yes
bufferData Yes 25 Yes Yes 12 8.1 Yes
bufferSubData Yes 25 Yes Yes 12 8.1 Yes
canvas Yes 25 Yes Yes 12 8.1 Yes
checkFramebufferStatus Yes 25 Yes Yes 12 8.1 Yes
clear Yes 25 Yes Yes 12 8.1 Yes
clearColor Yes 25 Yes Yes 12 8.1 Yes
clearDepth Yes 25 Yes Yes 12 8.1 Yes
clearStencil Yes 25 Yes Yes 12 8.1 Yes
colorMask Yes 25 Yes Yes 12 8.1 Yes
commit No No No No No No No
compileShader Yes 25 Yes Yes 12 8.1 Yes
compressedTexImage2D Yes 25 Yes Yes 12 8.1 Yes
compressedTexSubImage2D Yes 25 Yes Yes 12 8.1 Yes
copyTexImage2D Yes 25 Yes Yes 12 8.1 Yes
copyTexSubImage2D Yes 25 Yes Yes 12 8.1 Yes
createBuffer Yes 25 Yes Yes 12 8.1 Yes
createFramebuffer Yes 25 Yes Yes 12 8.1 Yes
createProgram Yes 25 Yes Yes 12 8.1 Yes
createRenderbuffer Yes 25 Yes Yes 12 8.1 Yes
createShader Yes 25 Yes Yes 12 8.1 Yes
createTexture Yes 25 Yes Yes 12 8.1 Yes
cullFace Yes 25 Yes Yes 12 8.1 Yes
deleteBuffer Yes 25 Yes Yes 12 8.1 Yes
deleteFramebuffer Yes 25 Yes Yes 12 8.1 Yes
deleteProgram Yes 25 Yes Yes 12 8.1 Yes
deleteRenderbuffer Yes 25 Yes Yes 12 8.1 Yes
deleteShader Yes 25 Yes Yes 12 8.1 Yes
deleteTexture Yes 25 Yes Yes 12 8.1 Yes
depthFunc Yes 25 Yes Yes 12 8.1 Yes
depthMask Yes 25 Yes Yes 12 8.1 Yes
depthRange Yes 25 Yes Yes 12 8.1 Yes
detachShader Yes 25 Yes Yes 12 8.1 Yes
disable Yes 25 Yes Yes 12 8.1 Yes
disableVertexAttribArray Yes 25 Yes Yes 12 8.1 Yes
drawArrays Yes 25 Yes Yes 12 8.1 Yes
drawElements Yes 25 Yes Yes 12 8.1 Yes
drawingBufferHeight Yes 25 Yes Yes 12 8.1 Yes
drawingBufferWidth Yes 25 Yes Yes 12 8.1 Yes
enable Yes 25 Yes Yes 12 8.1 Yes
enableVertexAttribArray Yes 25 Yes Yes 12 8.1 Yes
finish Yes 25 Yes Yes 12 8.1 Yes
flush Yes 25 Yes Yes 12 8.1 Yes
framebufferRenderbuffer Yes 25 Yes Yes 12 8.1 Yes
framebufferTexture2D Yes 25 Yes Yes 12 8.1 Yes
frontFace Yes 25 Yes Yes 12 8.1 Yes
generateMipmap Yes 25 Yes Yes 12 8.1 Yes
getActiveAttrib Yes 25 Yes Yes 12 8.1 Yes
getActiveUniform Yes 25 Yes Yes 12 8.1 Yes
getAttachedShaders Yes 25 Yes Yes 12 8.1 Yes
getAttribLocation Yes 25 Yes Yes 12 8.1 Yes
getBufferParameter Yes 25 Yes Yes 12 8.1 Yes
getContextAttributes Yes 25 Yes Yes 12 8.1 Yes
getError Yes 25 Yes Yes 12 8.1 Yes
getExtension Yes 25 Yes Yes 12 8.1 Yes
getFramebufferAttachmentParameter Yes 25 Yes Yes 12 8.1 Yes
getParameter Yes 25 Yes Yes 12 8.1 Yes
getProgramInfoLog Yes 25 Yes Yes 12 8.1 Yes
getProgramParameter Yes 25 Yes Yes 12 8.1 Yes
getRenderbufferParameter Yes 25 Yes Yes 12 8.1 Yes
getShaderInfoLog Yes 25 Yes Yes 12 8.1 Yes
getShaderParameter Yes 25 Yes Yes 12 8.1 Yes
getShaderPrecisionFormat Yes 25 Yes Yes 12 8.1 Yes
getShaderSource Yes 25 Yes Yes 12 8.1 Yes
getSupportedExtensions Yes 25 Yes Yes 12 8.1 Yes
getTexParameter Yes 25 Yes Yes 12 8.1 Yes
getUniform Yes 25 Yes Yes 12 8.1 Yes
getUniformLocation Yes 25 Yes Yes 12 8.1 Yes
getVertexAttrib Yes 25 Yes Yes 12 8.1 Yes
getVertexAttribOffset Yes 25 Yes Yes 12 8.1 Yes
hint Yes 25 Yes Yes 12 8.1 Yes
isBuffer Yes 25 Yes Yes 12 8.1 Yes
isContextLost Yes 25 Yes Yes 12 8.1 Yes
isEnabled Yes 25 Yes Yes 12 8.1 Yes
isFramebuffer Yes 25 Yes Yes 12 8.1 Yes
isProgram Yes 25 Yes Yes 12 8.1 Yes
isRenderbuffer Yes 25 Yes Yes 12 8.1 Yes
isShader Yes 25 Yes Yes 12 8.1 Yes
isTexture Yes 25 Yes Yes 12 8.1 Yes
lineWidth No No No No No No No
linkProgram Yes 25 Yes Yes 12 8.1 Yes
pixelStorei Yes 25 Yes Yes 12 8.1 Yes
polygonOffset Yes 25 Yes Yes 12 8.1 Yes
readPixels Yes 25 Yes Yes 12 8.1 Yes
renderbufferStorage Yes 25 Yes Yes 12 8.1 Yes
sampleCoverage Yes 25 Yes Yes 12 8.1 Yes
scissor Yes 25 Yes Yes 12 8.1 Yes
shaderSource Yes 25 Yes Yes 12 8.1 Yes
stencilFunc Yes 25 Yes Yes 12 8.1 Yes
stencilFuncSeparate Yes 25 Yes Yes 12 8.1 Yes
stencilMask Yes 25 Yes Yes 12 8.1 Yes
stencilMaskSeparate Yes 25 Yes Yes 12 8.1 Yes
stencilOp Yes 25 Yes Yes 12 8.1 Yes
stencilOpSeparate Yes 25 Yes Yes 12 8.1 Yes
texImage2D Yes 25 Yes Yes 12 8.1 Yes
texParameterf Yes 25 Yes Yes 12 8.1 Yes
texParameteri Yes 25 Yes Yes 12 8.1 Yes
texSubImage2D Yes 25 Yes Yes 12 8.1 Yes
uniform1f Yes 25 Yes Yes 12 8.1 Yes
uniform1fv Yes 25 Yes Yes 12 8.1 Yes
uniform1i Yes 25 Yes Yes 12 8.1 Yes
uniform1iv Yes 25 Yes Yes 12 8.1 Yes
uniform2f Yes 25 Yes Yes 12 8.1 Yes
uniform2fv Yes 25 Yes Yes 12 8.1 Yes
uniform2i Yes 25 Yes Yes 12 8.1 Yes
uniform2iv Yes 25 Yes Yes 12 8.1 Yes
uniform3f Yes 25 Yes Yes 12 8.1 Yes
uniform3fv Yes 25 Yes Yes 12 8.1 Yes
uniform3i Yes 25 Yes Yes 12 8.1 Yes
uniform3iv Yes 25 Yes Yes 12 8.1 Yes
uniform4f Yes 25 Yes Yes 12 8.1 Yes
uniform4fv Yes 25 Yes Yes 12 8.1 Yes
uniform4i Yes 25 Yes Yes 12 8.1 Yes
uniform4iv Yes 25 Yes Yes 12 8.1 Yes
uniformMatrix2fv Yes 25 Yes Yes 12 8.1 Yes
uniformMatrix3fv Yes 25 Yes Yes 12 8.1 Yes
uniformMatrix4fv Yes 25 Yes Yes 12 8.1 Yes
useProgram Yes 25 Yes Yes 12 8.1 Yes
validateProgram Yes 25 Yes Yes 12 8.1 Yes
vertexAttrib1f Yes 25 Yes Yes 12 8.1 Yes
vertexAttrib1fv Yes 25 Yes Yes 12 8.1 Yes
vertexAttrib2f Yes 25 Yes Yes 12 8.1 Yes
vertexAttrib2fv Yes 25 Yes Yes 12 8.1 Yes
vertexAttrib3f Yes 25 Yes Yes 12 8.1 Yes
vertexAttrib3fv Yes 25 Yes Yes 12 8.1 Yes
vertexAttrib4f Yes 25 Yes Yes 12 8.1 Yes
vertexAttrib4fv Yes 25 Yes Yes 12 8.1 Yes
vertexAttribPointer Yes 25 Yes Yes 12 8.1 Yes
viewport Yes 25 Yes Yes 12 8.1 Yes

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext