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

Re: [Public WebGL] Disable software rendering



> 
> Or here's a different approach: add a new method on the Canvas element (so, alongside getContext) that would take two context ids and return a recommendation of which is likely to be faster for typical tasks that could be done with either.
> 
> User code would look like:
> 
> var contexttype = canvas.whichIsLikelyFaster("experimental-webgl", "2d");
> var context = canvas.getContext(contexttype);
> 
> In this example, since the two strings are "experimental-webgl" and "2d", the question is which one is faster for things that can typically be done with either, which in this case means basic 2d graphics with sprites a la Angry Birds. Typically here one would return webgl if it's accelerated, 2d otherwise. My assumption here is that software WebGL renderers would have a hard time matching a good software canvas2d implementation, I could be wrong.

I don't really like this idea as it is basically assuming that the 2d context must be slower than the webgl context for some 2d scenarios.  I would argue that if there is a 2d use case where webgl is faster than the 2d context by a significant magnitude then that's an implementation problem in the UA, especially given all the reasons that can lead to a user being unable to use webgl (security black lists, etc)

--Oliver

> 
> Benoit
> -----------------------------------------------------------
> 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:
> unsubscribe public_webgl
> -----------------------------------------------------------
> 

-----------------------------------------------------------
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:
unsubscribe public_webgl
-----------------------------------------------------------