WebGL API Calls (v3)

Revision 3 of this benchmark created on


Preparation HTML

<canvas id="canvas" width="640" height="480" />

Setup

var gl = document.getElementById("canvas").getContext("webgl"); 
    
    var enabled = false;
    function enable() { enabled = true; }
    function disable() { enabled = false; }
    
    var value = 0;
    function uniform1f(_value) { value = _value; }

Test runner

Ready to run.

Testing in
TestOps/sec
Redundant Enable Calls
gl.enable(gl.DEPTH_TEST);
gl.enable(gl.DEPTH_TEST);
 
ready
Non-Redundant Enable Calls
gl.enable(gl.DEPTH_TEST);
gl.disable(gl.DEPTH_TEST);
ready
Baseline Enable Calls
enable(gl.DEPTH_TEST);
disable(gl.DEPTH_TEST);
ready
Redundant Uniform Calls
gl.uniform1f(0, 0);
gl.uniform1f(0, 0);
ready
Non-Redundant Uniform Calls
gl.uniform1f(0, 1);
gl.uniform1f(0, 0);
ready
Baseline Uniform Calls
uniform1f(0, 1);
uniform1f(0, 0);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.