[Public WebGL] How to check for WebGL support

Chris Marrin [email protected]
Thu May 19 14:39:52 PDT 2011

On May 19, 2011, at 12:21 PM, Gregg Tavares (wrk) wrote:

> On Thu, May 19, 2011 at 12:04 PM, Benoit Jacob <[email protected]> wrote:
> In this respect, the only thing I'm really concerned about is the apps that want to fall back to Canvas 2D if WebGL is not available (Angry Birds, Three.js, etc).
> If doing 2D with a software OpenGL renderer is going to be slower than using Canvas2D (because, say, Canvas2D implements more stuff in C++) then it's legitimate to want to know and prefer Canvas 2D.
> And the only way to know it is to test it. Just because you are using a GPU doesn't mean WebGL will be faster than Canvas2D.

And even "am I using a GPU" isn't a question with a definitive answer. Some cards do vertex shaders in software and fragment shaders in hardware. Some "GPU hardware" can be slower than some operations done in software. Some cards use software to render to off-screen buffers and hardware when rendering to the screen. I agree with Gregg that you just have to test if you care. Fortunately it's easy to do that testing with WebGL. You can create a context and not have it displayed anywhere and throw a bunch of WebGL calls at it. I have no doubt this functionality will be in a library someday soon.

[email protected]

You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl

More information about the public_webgl mailing list