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

Re: [Public WebGL] Disable software rendering

----- Original Message -----
> Software rendering for WebGL is a difficult decision, because:
> * sometimes it's better to do slow software rendering than nothing;
> * sometimes it's worse, because if the WebGL context just failed, the
> page would default to e.g. Canvas2D rendering that would (in some
> cases) work better on non-accelerated systems. See Angry Birds,
> three.js, etc.
> Maybe we need to add a WebGL context creation attribute
> "IHaveAGoodCanvas2DFallbackSoJustFailIfWebGLIsLikelyToBeSlowerHere".
> Native English speakers please advise on the name. Note that I didn't
> suggest "requireHardwareAcceleration" because we already discussed
> that that wasn't what was actually the most useful to know.

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.

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