WEBGL_lose_context.restoreContext is used for restoring context
See original GitHub issueI’m fairly certain that (WEBGL_lose_context).restoreContext()
is not intended to be used to recover from a general loss of context situation, it rather seems to be intended for recovering from (WEBGL_lose_context).loseContext()
for debugging purposes.
See the specification and the following discussion on StackOverflow.
This is probably directly related to #7206, where it can be seen that the system can’t actually handle real context loss, just a simulated one.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:15 (8 by maintainers)
Top Results From Across the Web
WebGL - Restoring lost context - ProgrammingTIL
In this episode, I discuss losing context and how to properly restore it in WebGL. Concepts: Lost Context. When the GPU is using...
Read more >Handling Lost Context in WebGL - YouTube
In this episode, I discuss how to handle lost context in WebGL.Sign up for my Newsletter: https://www.programmingtil.com/Follow me on ...
Read more >215599 – [WebGL2] Pass context-lost-restored.html test
I'm not sure that's better, and I guess you'd still need a way to force it on WebGLLoseContext. Could we use a more...
Read more >webgl.lose-context-on-memory-pressure - ADMX Help
Registry Hive, HKEY_LOCAL_MACHINE ; Registry Path, Software\Policies\Mozilla\lockPref ; Value Name, webgl.lose-context-on-memory-pressure ; Value Type, REG_DWORD.
Read more >Source/modules/webgl/WebGLRenderingContextBase.cpp
Redistribution and use in source and binary forms, with or without ... If there's room in the pixel budget for this context, restore...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is still an issue in the current master branch and should not be closed.
I didn’t get around to commenting on #7206 before it was closed by stalebot, but we still have that issue in 6.2.0. Currently, we restart the application in the event of a WebGL context loss to get around the sprites not rendering.
In our testing of recovery methods, we were able to get things to recover and render properly after a WebGL context loss by listening for a context loss and then recreating all of the graphics objects and sprites. We ended up not using this recover method this as it would eventually fail if there were multiple context losses in the same session. In the event of successive context losses pretty much everything would stop rendering regardless of when or how it was created.
I think our context loss/restore really needs some help.