[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Some WebGL draft feedback
On Sun, Dec 20, 2009 at 8:50 PM, Mark Callow <email@example.com>
We should not do anything to encourage the mixing of 2D & 3D
rendering via different APIs. The required synchronization between the
APIs will kill performance. People should be encouraged to draw
everything in their canvas with WebGL.
I think the issue is rather that IF canvas is supposed to allow multiple contexts, then IF WebGL cares about performance it will need its own tag. It's certainly arguable that if the intent of <canvas> is a "rectangle of pixels with multiple contexts to effect those pixels" then if WebGL doesn't want to follow those rules it does not belong in the canvas tag.
Multiple contexts seems like a reasonable design on the canvas tag because it allows the tag to be expanded by new types of contexts. A context for image manipulation, a context for fancier curves, a context for fancier text support, etc...
I agree. It's not at all clear from the HTML5 spec if you are supposed
to be allowed to get multiple different contexts to the same canvas
(or else I missed that part of the spec that makes that clear)
This seems like a valid thing to want to do.
var c3d = canvas.getContext("webgl");
var c2d = canvas.getContext("2d");
var csvg = canvas.getContext("svg");
I know that so far WebGL has assumed only 1 context is allowed but
maybe we should get a definitive answer.