question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WEBGL_lose_context.restoreContext is used for restoring context

See original GitHub issue

https://github.com/pixijs/pixi.js/blob/78516ba04f3fb59f4de06bd0dee5a609d9f91c19/packages/core/src/context/ContextSystem.ts#L98-L102

I’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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
rj3dcommented, Feb 16, 2022

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.

2reactions
bigtimebuddycommented, Feb 8, 2021

I think our context loss/restore really needs some help.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found