| <!DOCTYPE html> |
| <link rel="help" href="https://html.spec.whatwg.org/#dom-offscreencanvas"> |
| <canvas id="c1" width="100" height="100"></canvas> |
| <canvas id="c2" width="100" height="100"></canvas> |
| <canvas id="c3" width="100" height="100"></canvas> |
| <canvas id="c4" width="100" height="100"></canvas> |
| <script> |
| const c1 = document.getElementById("c1"); |
| const gl1 = c1.getContext("webgl"); |
| gl1.clearColor(1, 0, 0, 1); |
| gl1.clear(gl1.COLOR_BUFFER_BIT); |
| |
| const c2 = document.getElementById("c2"); |
| const gl2 = c2.getContext("webgl"); |
| gl2.clearColor(0, 1, 0, 1); |
| gl2.clear(gl2.COLOR_BUFFER_BIT); |
| |
| const c3 = document.getElementById("c3"); |
| const gl3 = c3.getContext("webgl"); |
| gl3.clearColor(0, 0, 1, 1); |
| gl3.clear(gl3.COLOR_BUFFER_BIT); |
| </script> |