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

Re: [Public WebGL] using the same context with multiple canvases

On 11/10/12 3:15 PM, Ian Hickson wrote:
In the current model there is a one-to-many relationship between a
canvas and canvas contexts.  In particular, it's possible to grab both a
2d context and a webgl context for the same canvas.

Not according to the spec, not for a long time. "webgl" and "2d" are marked as incompatible, so once you get one, you can never get the other for the same canvas element.

Oh, hmm. I thought the spec said to throw away the binding to one context and return a new one with a new backing store... That's certainly what some UAs do last I tested, but maybe they've changed since.

Right now as far as I can tell you need two copies of the bitmap per
canvas: one for drawing on, and one for painting to the screen, so that
you don't get any flicker.

I don't believe this is true. For example, if your canvas is bigger than the viewport, then you only need one copy of the entire backing store; the part that you have to put on the screen can be just the smaller bit that fits inside the viewport.


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