Skip to content

Instantly share code, notes, and snippets.

@kig
Created May 15, 2009 14:51
Show Gist options
  • Select an option

  • Save kig/112239 to your computer and use it in GitHub Desktop.

Select an option

Save kig/112239 to your computer and use it in GitHub Desktop.
C3DL Canvas3D call counts for a frame with 100x rotating duck models and two positional diffuse lights.
Total 2347 moz-glweb20 calls of which at least 1424 can't be cached.
308 calls require JS->C++ array conversion.
100 calls require buffer validation (cached for VBOs though.)
520 getUniformLocation -- cacheable
300 enableVertexAttribArray
300 getAttribLocation -- cacheable
300 uniformMatrix4fv -- Array arg has potential conversion overhead
300 vertexAttribPointer -- use VBO
204 uniform1i
103 useProgram
100 bindTexture
100 activeTexture
100 drawArrays -- some validation overhead [cached for VBOs]
8 uniform1f
7 uniform4fv -- Array arg (negligible call count)
1 enable
1 swapBuffers
1 clear
1 frontFace
1 uniform4iv -- Array arg (negligible call count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment