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.

How to close OpenGL render contexts?

See original GitHub issue

What is the correct approach to “stop” or delete a render context?

In my Vue application, I am opening and closing vtk render windows. They do not seem to get garbage collected, since after 16 windows are opened, I get the following message: WARNING: Too many active WebGL contexts. Oldest context will be lost. This sounds like a memory leak issue.

How do I tell a render window to shut down and close its context, so it can be garbage collected properly?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jourdaincommented, Aug 30, 2019

🎉 This issue has been resolved in version 11.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

1reaction
jourdaincommented, Jul 26, 2019

inside the genericRenderWindow definition the following might work

publicAPI.delete = macro.chain(publicAPI.setContainer, model.openGLRenderWindow.delete, publicAPI.delete);
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to close OpenGL render contexts? #1157 - Kitware/vtk-js
What is the correct approach to "stop" or delete a render context? In my Vue application, I am opening and closing vtk render...
Read more >
Deleting a Rendering Context - Win32 apps
In this article. The following code sample shows how to delete an OpenGL rendering context when an OpenGL window is closed.
Read more >
OpenGL Context - OpenGL Wiki
The current context is a thread-local variable, so a single process can have several threads, each of which has its own current context....
Read more >
GL Context destruction - c++
You should shut down your rendering context before you destroy your window. Share.
Read more >
OpenGL - Context creation
When rendering a frame, the results will be stored in an offscreen buffer known as the back buffer to make sure the user...
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