[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] WebGL performance...seems like I have no hardware acceleration?!?

On May 26, 2010, at 7:18 PM, Steve Baker wrote:

> I've been thinking about porting some of my old OpenGL games over to
> WebGL - and sticking them on my website for free to help to promote
> WebGL (which is a noble and important cause!) and I'm seeing some weird
> performance issues.  (I've been an OpenGL programmer since it was
> pronounced "IrisGL" - and I work in the games industry as a senior
> graphics programmer - so I'm not entirely clueless).
> Now, I expect JavaScript to be slow - but we're using a real, hardware
> graphics card - right? - so my expectation would be that if I push as
> much functionality onto the GPU as possible and keep things simple on
> the CPU/JavaScript side, I should be able to get decent frame rates.
> To test, I wrote a really minimal application - it sets up matrices, it
> clears the screen and renders a few simple objects and uses
> setTimeout("draw()",1) to try to get the best framerate I can.  I'm
> getting like 10Hz. :-(
> Since I don't know whether my JavaScript is somehow doing something
> nasty, I tossed out all of the 3D rendering and did nothing but clear
> the screen.  Doing this test at a number of different canvas sizes, I get:
> 1280x1024: 15Hz.
> 800x600 : 35Hz.
> 200x200 : 90Hz.
> 100x100 : 180Hz.
>   8x8   : 180Hz.
> Commenting out the clear-screen and doing no OpenGL calls at all in my
> main loop still gets me 180Hz - so I guess I'm CPU-limited at that frame
> rate.

Can you post a sample so I can try it in Safari? Maybe we can also see where the bottlenecks are. I agree 15 Hz is shocking for a simple scene. The Many Spheres Deep demo on the site renders over 100,000 triangles per scene in 64 objects and it easily makes 60fps on my Macbook Pro.


You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: