Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It would be nice to be able to reacquire lost webgl contexts #1321

Open
Yomguithereal opened this issue Nov 18, 2022 · 6 comments
Open

It would be nice to be able to reacquire lost webgl contexts #1321

Yomguithereal opened this issue Nov 18, 2022 · 6 comments

Comments

@Yomguithereal
Copy link
Collaborator

No description provided.

@stale
Copy link

stale bot commented Dec 28, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 28, 2022
@stale
Copy link

stale bot commented Feb 8, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 8, 2023
@jacomyal
Copy link
Owner

jacomyal commented Feb 4, 2024

@Yomguithereal could you remind me what you meant by that please?

@Yomguithereal
Copy link
Collaborator Author

Let's say you spawn a lot of webgl contexts, even unrelated to sigma and in other tabs. At one point, your sigma contexts will be lost to be given to newer canvases elsewhere. This means that if you open, say, a gephi lite tab, you go do your thing on other tabs that may use webgl, and you come back to your gephi lite tab, the webgl context is lost and either nothing is drawn on screen, or the last buffer is still shown but nothing more can happen, or your canvas is black or glitches (depends on the GPU and the computer basically).

I think there is a way to "re-acquire" a webgl context when this is detected to happen, so we can smoothly do something for the user.

This also happens in ipysigma when the user spawn mutliple contexts and come back to a widget on top of the window for instance.

@boogheta
Copy link
Contributor

boogheta commented Feb 6, 2024

Simple way to do that is to instance a few sigmas in the same web page
I know my browser usually starts removing the first one after instantiating a 5th or 6th one

@Yomguithereal
Copy link
Collaborator Author

Another note on that: While this should be a nice feature to re-acquire lost contexts when switching tabs and all, we must avoid a re-acquiring endless loop. For instance, if you have 5 sigmas on the same page and adding a sixth cause the first one to be lost, then re-acquired, which means the second one is lost etc. etc. you get the gist of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants