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

Re: [Public WebGL] Issues with sharing resources across contexts

On Fri, Aug 24, 2012 at 3:18 AM, Gregg Tavares (社用) <gman@google.com> wrote:
Actually, hmmm, I take this back.

It sounds like workers require a different solution than 2+ contexts in the same page. Ideally, if you have 2 contexts in the same page you shouldn't have to call acquire/release at all. Otherwise, the simple case of a 3D editor with multiple views, each view having a different canvas, would really suck as you'd have to acquire/release hundreds of resources.

Well, more food for thought.
The worker<->mainthread interaction is an interesting usecase. But I agree that a complicated synchronization pattern would make multi-view coding very hard. I think that maybe we should come up with two separate solutions to do each:
- worker<->mainthread API/interaction
- multi-view compositing where a "canvas" is just a proxy stand in for an RTT target that the compositor picks up to paste into the page and the user is responsible for filling the attached/associated texture upon animation frame callback. That could be solved elegantly by specifying that you can pass a canvas as color attachment.