[Public WebGL] OT: exception handling

Florian Bösch [email protected]
Fri Apr 6 15:13:21 PDT 2012

On Fri, Apr 6, 2012 at 11:31 PM, Gregg Tavares (勤) <[email protected]> wrote:

> I did document it in the WebGL wiki
> http://www.khronos.org/webgl/wiki/HandlingContextLost
> Also many of the samples at
> http://code.google.com/p/webglsamples/
> including
> http://webglsamples.googlecode.com/hg/aquarium/aquarium.html
> http://webglsamples.googlecode.com/hg/blob/blob.html
> http://webglsamples.googlecode.com/hg/dynamic-cubemap/dynamic-cubemap.html
> http://webglsamples.googlecode.com/hg/electricflower/electricflower.html
> http://webglsamples.googlecode.com/hg/field/field.html
> http://webglsamples.googlecode.com/hg/imagesphere/imagesphere.html
> http://webglsamples.googlecode.com/hg/spacerocks/spacerocks.html
All of these implement what I'd term the "reset pattern". Basically:
contextLost -> restart everything. That's one of the easier things to do
and it works really great for things that do virtually nothing in terms of
state and interactivity.

Notably, the one example where this would've been interesting to see:
http://webglsamples.googlecode.com/hg/collectibles/index.html doesn't
actually handle context-lost. It's commented out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20120407/02633694/attachment.html>

More information about the public_webgl mailing list