WebGL
Widely available
The WebGLRenderingContext
API is the "webgl"
rendering context for the <canvas>
element. It represents a space for drawing two- and three-dimensional graphics and animations.
Compatibility (view on caniuse.com)
- Chrome 9 Released on 2011-02-03
- Chrome Android 25 Released on 2013-02-27
- Edge 12 Released on 2015-07-29
- Firefox 4 Released on 2011-03-22
- Firefox for Android 4 Released on 2011-03-29
- Safari 5.1 Released on 2011-07-20
- Safari on iOS 8 Released on 2014-09-17
MDN docs
- HTMLCanvasElement.webglcontextcreationerror_event
- HTMLCanvasElement.webglcontextlost_event
- HTMLCanvasElement.webglcontextrestored_event
- WEBGL_color_buffer_float
- WEBGL_compressed_texture_astc
- WEBGL_compressed_texture_astc.getSupportedProfiles
- WEBGL_compressed_texture_etc
- WEBGL_compressed_texture_etc1
- WEBGL_compressed_texture_s3tc
- WEBGL_compressed_texture_s3tc_srgb
- WEBGL_debug_renderer_info
- WEBGL_debug_shaders
- WEBGL_debug_shaders.getTranslatedShaderSource
- WEBGL_depth_texture
- WEBGL_draw_buffers
- WEBGL_draw_buffers.drawBuffersWEBGL
- WEBGL_lose_context
- WEBGL_lose_context.loseContext
- WEBGL_lose_context.restoreContext
- WEBGL_multi_draw
- WEBGL_multi_draw.multiDrawArraysInstancedWEBGL
- WEBGL_multi_draw.multiDrawArraysWEBGL
- WEBGL_multi_draw.multiDrawElementsInstancedWEBGL
- WEBGL_multi_draw.multiDrawElementsWEBGL
- WebGLActiveInfo
- WebGLActiveInfo.name
- WebGLActiveInfo.size
- WebGLActiveInfo.type
- WebGLBuffer
- WebGLContextEvent
- WebGLContextEvent.WebGLContextEvent
- WebGLContextEvent.statusMessage
- WebGLFramebuffer
- WebGLObject
- WebGLProgram
- WebGLRenderbuffer
- WebGLRenderingContext
- WebGLRenderingContext.activeTexture
- WebGLRenderingContext.attachShader
- WebGLRenderingContext.bindAttribLocation
- WebGLRenderingContext.bindBuffer
- WebGLRenderingContext.bindFramebuffer
- WebGLRenderingContext.bindRenderbuffer
- WebGLRenderingContext.bindTexture
- WebGLRenderingContext.blendColor
- WebGLRenderingContext.blendEquation
- WebGLRenderingContext.blendEquationSeparate
- WebGLRenderingContext.blendFunc
- WebGLRenderingContext.blendFuncSeparate
- WebGLRenderingContext.bufferData
- WebGLRenderingContext.bufferSubData
- WebGLRenderingContext.canvas
- WebGLRenderingContext.checkFramebufferStatus
- WebGLRenderingContext.clear
- WebGLRenderingContext.clearColor
- WebGLRenderingContext.clearDepth
- WebGLRenderingContext.clearStencil
- WebGLRenderingContext.colorMask
- WebGLRenderingContext.compileShader
- WebGLRenderingContext.compressedTexImage2D
- WebGLRenderingContext.compressedTexSubImage2D
- WebGLRenderingContext.copyTexImage2D
- WebGLRenderingContext.copyTexSubImage2D
- WebGLRenderingContext.createBuffer
- WebGLRenderingContext.createFramebuffer
- WebGLRenderingContext.createProgram
- WebGLRenderingContext.createRenderbuffer
- WebGLRenderingContext.createShader
- WebGLRenderingContext.createTexture
- WebGLRenderingContext.cullFace
- WebGLRenderingContext.deleteBuffer
- WebGLRenderingContext.deleteFramebuffer
- WebGLRenderingContext.deleteProgram
- WebGLRenderingContext.deleteRenderbuffer
- WebGLRenderingContext.deleteShader
- WebGLRenderingContext.deleteTexture
- WebGLRenderingContext.depthFunc
- WebGLRenderingContext.depthMask
- WebGLRenderingContext.depthRange
- WebGLRenderingContext.detachShader
- WebGLRenderingContext.disable
- WebGLRenderingContext.disableVertexAttribArray
- WebGLRenderingContext.drawArrays
- WebGLRenderingContext.drawElements
- WebGLRenderingContext.drawingBufferHeight
- WebGLRenderingContext.drawingBufferWidth
- WebGLRenderingContext.enable
- WebGLRenderingContext.enableVertexAttribArray
- WebGLRenderingContext.finish
- WebGLRenderingContext.flush
- WebGLRenderingContext.framebufferRenderbuffer
- WebGLRenderingContext.framebufferTexture2D
- WebGLRenderingContext.frontFace
- WebGLRenderingContext.generateMipmap
- WebGLRenderingContext.getActiveAttrib
- WebGLRenderingContext.getActiveUniform
- WebGLRenderingContext.getAttachedShaders
- WebGLRenderingContext.getAttribLocation
- WebGLRenderingContext.getBufferParameter
- WebGLRenderingContext.getContextAttributes
- WebGLRenderingContext.getError
- WebGLRenderingContext.getExtension
- WebGLRenderingContext.getFramebufferAttachmentParameter
- WebGLRenderingContext.getParameter
- WebGLRenderingContext.getProgramInfoLog
- WebGLRenderingContext.getProgramParameter
- WebGLRenderingContext.getRenderbufferParameter
- WebGLRenderingContext.getShaderInfoLog
- WebGLRenderingContext.getShaderParameter
- WebGLRenderingContext.getShaderPrecisionFormat
- WebGLRenderingContext.getShaderSource
- WebGLRenderingContext.getSupportedExtensions
- WebGLRenderingContext.getTexParameter
- WebGLRenderingContext.getUniform
- WebGLRenderingContext.getUniformLocation
- WebGLRenderingContext.getVertexAttrib
- WebGLRenderingContext.getVertexAttribOffset
- WebGLRenderingContext.hint
- WebGLRenderingContext.isBuffer
- WebGLRenderingContext.isContextLost
- WebGLRenderingContext.isEnabled
- WebGLRenderingContext.isFramebuffer
- WebGLRenderingContext.isProgram
- WebGLRenderingContext.isRenderbuffer
- WebGLRenderingContext.isShader
- WebGLRenderingContext.isTexture
- WebGLRenderingContext.lineWidth
- WebGLRenderingContext.linkProgram
- WebGLRenderingContext.pixelStorei
- WebGLRenderingContext.polygonOffset
- WebGLRenderingContext.readPixels
- WebGLRenderingContext.renderbufferStorage
- WebGLRenderingContext.sampleCoverage
- WebGLRenderingContext.scissor
- WebGLRenderingContext.shaderSource
- WebGLRenderingContext.stencilFunc
- WebGLRenderingContext.stencilFuncSeparate
- WebGLRenderingContext.stencilMask
- WebGLRenderingContext.stencilMaskSeparate
- WebGLRenderingContext.stencilOp
- WebGLRenderingContext.stencilOpSeparate
- WebGLRenderingContext.texImage2D
- WebGLRenderingContext.texParameter
- WebGLRenderingContext.texParameter
- WebGLRenderingContext.texSubImage2D
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniform
- WebGLRenderingContext.uniformMatrix
- WebGLRenderingContext.uniformMatrix
- WebGLRenderingContext.uniformMatrix
- WebGLRenderingContext.useProgram
- WebGLRenderingContext.validateProgram
- WebGLRenderingContext.vertexAttrib
- WebGLRenderingContext.vertexAttrib
- WebGLRenderingContext.vertexAttrib
- WebGLRenderingContext.vertexAttrib
- WebGLRenderingContext.vertexAttrib
- WebGLRenderingContext.vertexAttrib
- WebGLRenderingContext.vertexAttrib
- WebGLRenderingContext.vertexAttrib
- WebGLRenderingContext.vertexAttribPointer
- WebGLRenderingContext.viewport
- WebGLShader
- WebGLShaderPrecisionFormat
- WebGLShaderPrecisionFormat.precision
- WebGLShaderPrecisionFormat.rangeMax
- WebGLShaderPrecisionFormat.rangeMin
- WebGLTexture
- WebGLUniformLocation
Specifications
- WebGL Specification, from WebGL Working Group (Khronos Group).
BCD data
- api.HTMLCanvasElement.getContext.webgl_context.options_alpha_parameter
- api.HTMLCanvasElement.getContext.webgl_context.options_failIfMajorPerformanceCaveat_parameter
- api.HTMLCanvasElement.getContext.webgl_context.options_powerPreference_parameter
- api.HTMLCanvasElement.webglcontextcreationerror_event
- api.HTMLCanvasElement.webglcontextlost_event
- api.HTMLCanvasElement.webglcontextrestored_event
- api.WEBGL_color_buffer_float
- api.WEBGL_compressed_texture_astc
- api.WEBGL_compressed_texture_astc.getSupportedProfiles
- api.WEBGL_compressed_texture_etc
- api.WEBGL_compressed_texture_etc1
- api.WEBGL_compressed_texture_s3tc
- api.WEBGL_compressed_texture_s3tc_srgb
- api.WEBGL_debug_renderer_info
- api.WEBGL_debug_shaders
- api.WEBGL_debug_shaders.getTranslatedShaderSource
- api.WEBGL_depth_texture
- api.WEBGL_draw_buffers
- api.WEBGL_draw_buffers.drawBuffersWEBGL
- api.WEBGL_lose_context
- api.WEBGL_lose_context.loseContext
- api.WEBGL_lose_context.restoreContext
- api.WEBGL_multi_draw
- api.WEBGL_multi_draw.multiDrawArraysInstancedWEBGL
- api.WEBGL_multi_draw.multiDrawArraysWEBGL
- api.WEBGL_multi_draw.multiDrawElementsInstancedWEBGL
- api.WEBGL_multi_draw.multiDrawElementsWEBGL
- api.WebGLActiveInfo
- api.WebGLActiveInfo.name
- api.WebGLActiveInfo.size
- api.WebGLActiveInfo.type
- api.WebGLBuffer
- api.WebGLContextEvent
- api.WebGLContextEvent.WebGLContextEvent
- api.WebGLContextEvent.statusMessage
- api.WebGLFramebuffer
- api.WebGLObject
- api.WebGLProgram
- api.WebGLRenderbuffer
- api.WebGLRenderingContext
- api.WebGLRenderingContext.activeTexture
- api.WebGLRenderingContext.attachShader
- api.WebGLRenderingContext.bindAttribLocation
- api.WebGLRenderingContext.bindBuffer
- api.WebGLRenderingContext.bindFramebuffer
- api.WebGLRenderingContext.bindRenderbuffer
- api.WebGLRenderingContext.bindTexture
- api.WebGLRenderingContext.blendColor
- api.WebGLRenderingContext.blendEquation
- api.WebGLRenderingContext.blendEquationSeparate
- api.WebGLRenderingContext.blendFunc
- api.WebGLRenderingContext.blendFuncSeparate
- api.WebGLRenderingContext.bufferData
- api.WebGLRenderingContext.bufferSubData
- api.WebGLRenderingContext.canvas
- api.WebGLRenderingContext.checkFramebufferStatus
- api.WebGLRenderingContext.clear
- api.WebGLRenderingContext.clearColor
- api.WebGLRenderingContext.clearDepth
- api.WebGLRenderingContext.clearStencil
- api.WebGLRenderingContext.colorMask
- api.WebGLRenderingContext.compileShader
- api.WebGLRenderingContext.compressedTexImage2D
- api.WebGLRenderingContext.compressedTexSubImage2D
- api.WebGLRenderingContext.copyTexImage2D
- api.WebGLRenderingContext.copyTexSubImage2D
- api.WebGLRenderingContext.createBuffer
- api.WebGLRenderingContext.createFramebuffer
- api.WebGLRenderingContext.createProgram
- api.WebGLRenderingContext.createRenderbuffer
- api.WebGLRenderingContext.createShader
- api.WebGLRenderingContext.createTexture
- api.WebGLRenderingContext.cullFace
- api.WebGLRenderingContext.deleteBuffer
- api.WebGLRenderingContext.deleteFramebuffer
- api.WebGLRenderingContext.deleteProgram
- api.WebGLRenderingContext.deleteRenderbuffer
- api.WebGLRenderingContext.deleteShader
- api.WebGLRenderingContext.deleteTexture
- api.WebGLRenderingContext.depthFunc
- api.WebGLRenderingContext.depthMask
- api.WebGLRenderingContext.depthRange
- api.WebGLRenderingContext.detachShader
- api.WebGLRenderingContext.disable
- api.WebGLRenderingContext.disableVertexAttribArray
- api.WebGLRenderingContext.drawArrays
- api.WebGLRenderingContext.drawElements
- api.WebGLRenderingContext.drawingBufferFormat
- api.WebGLRenderingContext.drawingBufferHeight
- api.WebGLRenderingContext.drawingBufferStorage
- api.WebGLRenderingContext.drawingBufferWidth
- api.WebGLRenderingContext.enable
- api.WebGLRenderingContext.enableVertexAttribArray
- api.WebGLRenderingContext.finish
- api.WebGLRenderingContext.flush
- api.WebGLRenderingContext.framebufferRenderbuffer
- api.WebGLRenderingContext.framebufferTexture2D
- api.WebGLRenderingContext.frontFace
- api.WebGLRenderingContext.generateMipmap
- api.WebGLRenderingContext.getActiveAttrib
- api.WebGLRenderingContext.getActiveUniform
- api.WebGLRenderingContext.getAttachedShaders
- api.WebGLRenderingContext.getAttribLocation
- api.WebGLRenderingContext.getBufferParameter
- api.WebGLRenderingContext.getContextAttributes
- api.WebGLRenderingContext.getError
- api.WebGLRenderingContext.getExtension
- api.WebGLRenderingContext.getFramebufferAttachmentParameter
- api.WebGLRenderingContext.getParameter
- api.WebGLRenderingContext.getProgramInfoLog
- api.WebGLRenderingContext.getProgramParameter
- api.WebGLRenderingContext.getRenderbufferParameter
- api.WebGLRenderingContext.getShaderInfoLog
- api.WebGLRenderingContext.getShaderParameter
- api.WebGLRenderingContext.getShaderPrecisionFormat
- api.WebGLRenderingContext.getShaderSource
- api.WebGLRenderingContext.getSupportedExtensions
- api.WebGLRenderingContext.getTexParameter
- api.WebGLRenderingContext.getUniform
- api.WebGLRenderingContext.getUniformLocation
- api.WebGLRenderingContext.getVertexAttrib
- api.WebGLRenderingContext.getVertexAttribOffset
- api.WebGLRenderingContext.hint
- api.WebGLRenderingContext.isBuffer
- api.WebGLRenderingContext.isContextLost
- api.WebGLRenderingContext.isEnabled
- api.WebGLRenderingContext.isFramebuffer
- api.WebGLRenderingContext.isProgram
- api.WebGLRenderingContext.isRenderbuffer
- api.WebGLRenderingContext.isShader
- api.WebGLRenderingContext.isTexture
- api.WebGLRenderingContext.lineWidth
- api.WebGLRenderingContext.linkProgram
- api.WebGLRenderingContext.pixelStorei
- api.WebGLRenderingContext.polygonOffset
- api.WebGLRenderingContext.readPixels
- api.WebGLRenderingContext.renderbufferStorage
- api.WebGLRenderingContext.sampleCoverage
- api.WebGLRenderingContext.scissor
- api.WebGLRenderingContext.shaderSource
- api.WebGLRenderingContext.stencilFunc
- api.WebGLRenderingContext.stencilFuncSeparate
- api.WebGLRenderingContext.stencilMask
- api.WebGLRenderingContext.stencilMaskSeparate
- api.WebGLRenderingContext.stencilOp
- api.WebGLRenderingContext.stencilOpSeparate
- api.WebGLRenderingContext.texImage2D
- api.WebGLRenderingContext.texParameterf
- api.WebGLRenderingContext.texParameteri
- api.WebGLRenderingContext.texSubImage2D
- api.WebGLRenderingContext.uniform1f
- api.WebGLRenderingContext.uniform1fv
- api.WebGLRenderingContext.uniform1i
- api.WebGLRenderingContext.uniform1iv
- api.WebGLRenderingContext.uniform2f
- api.WebGLRenderingContext.uniform2fv
- api.WebGLRenderingContext.uniform2i
- api.WebGLRenderingContext.uniform2iv
- api.WebGLRenderingContext.uniform3f
- api.WebGLRenderingContext.uniform3fv
- api.WebGLRenderingContext.uniform3i
- api.WebGLRenderingContext.uniform3iv
- api.WebGLRenderingContext.uniform4f
- api.WebGLRenderingContext.uniform4fv
- api.WebGLRenderingContext.uniform4i
- api.WebGLRenderingContext.uniform4iv
- api.WebGLRenderingContext.uniformMatrix2fv
- api.WebGLRenderingContext.uniformMatrix3fv
- api.WebGLRenderingContext.uniformMatrix4fv
- api.WebGLRenderingContext.useProgram
- api.WebGLRenderingContext.validateProgram
- api.WebGLRenderingContext.vertexAttrib1f
- api.WebGLRenderingContext.vertexAttrib1fv
- api.WebGLRenderingContext.vertexAttrib2f
- api.WebGLRenderingContext.vertexAttrib2fv
- api.WebGLRenderingContext.vertexAttrib3f
- api.WebGLRenderingContext.vertexAttrib3fv
- api.WebGLRenderingContext.vertexAttrib4f
- api.WebGLRenderingContext.vertexAttrib4fv
- api.WebGLRenderingContext.vertexAttribPointer
- api.WebGLRenderingContext.viewport
- api.WebGLShader
- api.WebGLShaderPrecisionFormat
- api.WebGLShaderPrecisionFormat.precision
- api.WebGLShaderPrecisionFormat.rangeMax
- api.WebGLShaderPrecisionFormat.rangeMin
- api.WebGLTexture
- api.WebGLUniformLocation