-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Description
So I've been playing with the WEBGL_lose_context extension today. It appears that when THREE.js loses context, it just stops and there is no attempt to automatically recover.
In my past life doing DirectX, usually one responds to lost context event by trying to recover the context in response to a "show"-type event. I would suspect that because THREE.js has a mirror of the scene in primary memory, it should be possible in most cases to recover the scene completely by reloading it from primary memory to GPU memory?
Should we make an attempt to recover the lost context automatically? Is there any theoretical or practical reasons why we shouldn't attempt to automatically recover from a lost context in WebGL? Why hasn't this been attempted previously?
I've modified two examples in my branch here so that you can trigger the loss of context:
/examples/#webgl_materials_bumpmap_skin
/examples/#webgl_morphtargets_human
PS. The reason I bring this up as that we know that on Clara.io, we are getting automatic reports of multiple context losses per day. It isn't that frequent give the number of daily users, but it is still something we need to address.