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

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



On Fri, 9 Nov 2012, Rik Cabanier wrote:
>
> Is this what you're trying to do?
> 
> 1. have a web worker create a context
> 2. have the web work draw into that context
> 3. pass this context to the main thread
> 4. call canvas1.setContext
> 
> If so, I think there needs to be something special for step 3. Otherwise 
> you could still draw in the worker while it's displayed in the main 
> thread.

I'm writing up a more concrete proposal for discussion, but basically, the 
idea is that you would get a canvas proxy object, pass it to the worker, 
have the worker create a 2D Context, bind the canvas proxy object and the 
context, and then a method on the canvas proxy could be used to push the 
graphics instructions sent to the 2D context to the screen.

I hope to have a more concrete proposal ASAP.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

-----------------------------------------------------------
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
-----------------------------------------------------------