← Graphics & Compute
WebGL 2
Probing…WebGL 2 is a web platform capability in the Graphics & Compute category. Hardware-accelerated 3D rendering. Supported in Chromium 56+, Firefox 51+, and Safari 15+.
Try it
Loading demo…
Code
const gl = canvas.getContext('webgl2')
const vs = gl.createShader(gl.VERTEX_SHADER)
gl.shaderSource(vs, vertexSource); gl.compileShader(vs)
// ...link program, upload interleaved vertex buffer...
function frame(t) {
gl.clear(gl.COLOR_BUFFER_BIT)
gl.uniform1f(angleLoc, t / 1000)
gl.drawArrays(gl.TRIANGLES, 0, 3)
requestAnimationFrame(frame)
}
requestAnimationFrame(frame)Browser support
Chromium
56
Firefox
51
Safari
15
Frequently asked questions
Which browsers support WebGL 2?
Supported in Chromium 56+, Firefox 51+, and Safari 15+.
Does WebGL 2 require HTTPS?
No. WebGL 2 works without a secure context, though serving your site over HTTPS is always recommended.
What is WebGL 2 used for?
Hardware-accelerated 3D rendering.
Can I try WebGL 2 in my browser?
Yes. shwcs.net runs a live WebGL 2 demo that probes your current browser and lets you try the API. Everything runs locally — nothing is sent anywhere.