Name: Anonymous 2017-06-30 4:58
It looks a bit clunky, but i guess that's par for running code on the gpu
Anyone here tamed this beast?
Anyone here tamed this beast?
<script>
var canvas;
var gl = null;
canvas = document.getElementById('glCanvas');
gl = canvas.getContext('webgl2');
if(gl) alert(gl.getParameter(gl.VERSION));
if(gl) doGL();
alert("Fin");
function doGL(){
gl.clearColor(0.0, 0.0, 0.0, 1.0);
// Enable depth testing
gl.enable(gl.DEPTH_TEST);
// Near things obscure far things
gl.depthFunc(gl.LEQUAL);
// Clear the color as well as the depth buffer.
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
}
</script>