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

Re: [Public WebGL] Lost Context

On Feb 13, 2010, at 3:57 PM, Vladimir Vukicevic wrote:

>> ...I'll bring up another issue which I'm sure no one wants to discuss but, passing all this lost context stuff down to JavaScript sure seems far removed from anything else in HTML. Imagine if <img>, <video>, <audio>, <canvas2d> etc all needed JavaScript to manually deal with lost-context.
> Yep, it's not that we don't want to discuss it, it's more that there's really no sane way around it -- the only alternative is to keep a copy of every user resource.  It would be better if the underlying GL/D3D impl would take care of all of that, and I'd guess that we'll get there eventually..

Let's not get too hasty here, saying that there is no way to automatically recover from a context loss. First of all, what does context loss mean? Does it mean that some or all of the resources (textures, VBOs, etc.) are lost, or is the GL state lost as well? If it's the former then it's just a matter of keeping a shadow copy of all the buffer data. Often the source data is from an HTML image, which is cached anyway. 

I know it would incur extra work and storage overhead to do automatic recovery. But let's not discard the notion before analyzing it some more. This is the web and web authors expect that lots of the background work will be done for them.


You are currently subscribe to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: