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

Re: [Public WebGL] Shared resources between contexts

On Mon, Jan 9, 2012 at 6:52 PM, Gregg Tavares (wrk) <gman@google.com> wrote:
In fact there are a bunch of shipping WebGL games that decode jpgs and pngs in _javascript_!  

I think this is a compelling argument against exposing WebGL in workers until HTMLImageElement is available too.  That's the last thing I'd like to see WebGL encouraging.  Do you happen to know why pages are doing this, instead of reading data into a Blob and handing an object URL to HTMLImageElement?  Is it just dealing with older browsers (that may lack some of the pieces to do that), or something else?

You'd also need HTMLCanvasElement anyway, in order to create contexts in the first place, short of complicating things with a separate non-DOM interface to create contexts (better avoided).

(I don't know how much work is actually needed to expose these APIs to workers--whether it's actually a lot of work, or if it just lacks momentum.  I'd expect it to be far more practical than exposing the whole DOM, at least.)

Glenn Maynard