3 ms·
That the canvas API is implemented with OpenGL is very impressive. CocoonJS [1] (a similar project for Android, as noted in the comments below) seems to have ta
by jaipilot747 14y ago
That the canvas API is implemented with OpenGL is very impressive. CocoonJS [1] (a similar project for Android, as noted in the comments below) seems to have taken the same approach.
On a completely tangential note, given that the main desktop browsers now sport hardware accelerated canvas implementations, is there a performance difference in 2D graphics rendered with canvas vs. WebGL?
[1] http://ludei.com/tech/cocoonjs http://ludei.com/tech/cocoonjs
- spot 14y agowebgl can be much faster because you can draw many primitives with one call. there's a lot of overhead from js down to gl.
- jaipilot747 14y agoThen what is stopping browser vendors from implementing canvas directly in gl directly, making canvas more or less a wrapper?
- greggman 14y agoCanvas is directly implemented in gl (or directx) in most browsers at this point. WebGL is still faster like the poster above says because you as the programmer an can make optimizations that are not possible with the canvas api like drawing many things with one call. http://blog.tojicode.com/2012/07/sprite-tile-maps-on-gpu.html http://blog.tojicode.com/2012/07/sprite-tile-maps-on-gpu.htm...