News for hackers. Stuff that matters.
Re:Show HN: Ejecta, A Fast, Open Source JavaScript, Canvas I... by jaipilot747 on Tuesday September 25, 2012 @11:24AM (#4570815)
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

Re:Show HN: Ejecta, A Fast, Open Source JavaScript, Canvas I... by spot on Tuesday September 25, 2012 @11:42AM (#4570934)
webgl can be much faster because you can draw many primitives with one call. there's a lot of overhead from js down to gl.
Re:Show HN: Ejecta, A Fast, Open Source JavaScript, Canvas I... by jaipilot747 on Tuesday September 25, 2012 @12:13PM (#4571124)
Then what is stopping browser vendors from implementing canvas directly in gl directly, making canvas more or less a wrapper?
Re:Show HN: Ejecta, A Fast, Open Source JavaScript, Canvas I... by greggman on Tuesday September 25, 2012 @02:59PM (#4572037)
Canvas 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.htm...