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

[Public WebGL] Changing context attributes

How difficult would it be for WebGL implementations to allow changing context attributes on the fly?
There are some attributes like preserveDrawingBuffer or antialias that can be expensive on some machines.  It's hard to determine ahead of time which machines those are with the info available to _javascript_ apps.  So it would be nice to be able to turn off multisampling in mid-stream to see if that made things better for a user.

Well-written applications already have to deal with context loss, so changing the attributes could just trigger a context loss.

Without this, it seems that an app has no recourse but to tear down the whole Canvas and restart everything, which may be difficult given that many parts of the app may have access to the Canvas.  (At the very least they have access to it via the .canvas property of the webgl context).

Any thoughts?


Bill Baxter | Software Engineer | wbaxter@google.com | eat more peas!