Take the 2-minute tour ×

If I wanted to make a simulated boids experiment in either of the technologies, what limitations would I be under.

For example I have a boids simulation working in canvas with 100,000 particles but I am unable to work with a million as the browser crashes. This may be possible in WebGL with hardware acceleration.

So what limitations do these 2 technologies have with complex scenes?

share|improve this question
Any limitations of that nature are related to processing power, memory, and the implementation details of the specific browser you are using. –  Quentin Jul 5 '11 at 12:43
so would you in essence say that there are no limitations of the technologies themselves? –  Sycren Jul 5 '11 at 12:46
Not that relate to your crash. –  Quentin Jul 5 '11 at 12:46
Ok, to be more specific to my problem, would WebGL be able to compute greater complexity than canvas? –  Sycren Jul 5 '11 at 12:52
That doesn't make any sense. WebGL is a canvas context. –  Quentin Jul 5 '11 at 12:55
show 1 more comment

1 Answer

The limitations of the graphics card apply to WebGL as well of course, there is little a browser can do to compensate those. For example, I noticed that WebGL samples with the texture size 4000x4000 don't work with my (on-board) graphics chip. Animating a large number of objects will likely overburden low-end graphics cards as well.

share|improve this answer
To add to your answer, when working with Windows remember that the underlying implementations are done with Direct3D, so you probably have to find out what limitations your direct3d drivers have. For the javascript side, there's a myriad of benchmarks on the net, just google "javascript benchmark" (SunSpider, V8 and Kraken come up as first for me) –  Chiguireitor Jul 6 '11 at 13:38
@Chiguireitor: No, WebGL implementations typically use the OpenGL API exposed by the graphics drivers, even on Windows. Which can have limitations and bugs depending on the graphics drivers of course. –  Wladimir Palant Jul 6 '11 at 13:43
Not so pal, check Chromium and Firefox code and you'll see a very different panorama. Besides, i have factual evidence of that, here on my office i have an Intel graphics machine that hasn't shader support under OpenGL, and my WebGL game runs smoothly with all the bloom and phong shaders on. edit: code.google.com/p/angleproject check it –  Chiguireitor Jul 6 '11 at 13:48
@Chiguireitor: Nope, see mxr.mozilla.org/mozilla-central/source/gfx/thebes/GLContext.cpp - that's mostly a straight-forward mapping of OpenGL functions to WebGL methods. It might be different for Chrome however (news.softpedia.com/news/…). –  Wladimir Palant Jul 6 '11 at 14:01
There's a flag for that called webgl.prefer-native-gl as i've read from that bug filing. But yes, the abstraction levels are catastrophic because of the myriad of platforms Firefox supports. Chromium is much cleaner though IMHO. –  Chiguireitor Jul 6 '11 at 14:45
show 4 more comments

Your Answer


