[Grace-core] Grace Graphics API?

Timothy Jones Timothy.Jones at ecs.vuw.ac.nz
Wed May 22 23:53:52 PDT 2013


On 05/23, Michael Homer wrote:
> On Thu, May 23, 2013 at 6:23 PM, James Noble <kjx at ecs.vuw.ac.nz> wrote:
> > Then there is the treading model, JavaScript is unlikely to have Java-style
> > threads any time soon - unless I'm mistaken (Michael? Tim?) it's mostly
> > a single thread with callbacks model, with "webworker" threads that
> > can't handle graphics (or even share state directly?)
> You can pass structured messages in and out with postMessage, which
> appear as events on the receiver. They can't share mutable state. You
> can have parallel processing that has input events passed into it and
> that sends graphic or other instructions to a proxy on the outside,
> which is basically the same as direct access.

Yeah, Web Workers are basically giant actors with no synchronous messages.  You
can do the actual graphics processing in the main thread and communicate what to
draw from other ones, which is what basically happens with every C graphics
system anyway.

But only if you have the right browser.

-- 
Tim


More information about the Grace-core mailing list