mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
This implements the `canvas`, `drawingBufferHeight` and `drawingBufferWidth` getters to `WebGLRenderingContext`, and an initial version of `getParameter`.
12 lines
447 B
HTML
12 lines
447 B
HTML
<!doctype html>
|
|
<meta charset="utf-8">
|
|
<title>WebGLRenderingContext getParameter test</title>
|
|
<script>
|
|
var gl = document.createElement("canvas").getContext("webgl");
|
|
|
|
if ( typeof gl.getParameter !== "function" )
|
|
console.error("getParameter should be a function");
|
|
|
|
if ( gl.getParameter(gl.VERSION).indexOf("WebGL 1.0") !== 0 )
|
|
console.error("getParameter(VERSION) should return a string beginning with \"WebGL 1.0\"");
|
|
</script>
|