[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] double-buffering and back buffer preservation
On Mon, Nov 15, 2010 at 2:22 PM, Vladimir Vukicevic <firstname.lastname@example.org>
Well, no, it wouldn't -- there's no way to create a WebGL context in a worker (or any other DOM object), and there's no way to pass a WebGL context to a worker.
----- Original Message -----
> Another use case to consider: Option #2 would allow applications to
> use WebWorkers for mutitheaded work that is used in rendering. Say I
> want to:
That's why I explicitly said no rendering in the worker, just computation. Computation used for rendering could be done in a worker, result sent back as a stringified object like normal, and then rendered on the main thread based on the result of the computation (in the message received event handler for receiving a message from the worker).
In the future, assuming a way was added to create a WebGL context on a worker, the way you'd want to do this is with two contexts that share resources, one being a purely offscreen worker context and one being an on-screen main thread context.