Enable the OpenGL2 backend to be used with multiple contexts #4141
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This work enables the OpenGL2 backend to be used with multiple contexts.
This tries to solve a common problem with happens with music plugins (VST).
One may want to load more that one of a particular instrument in a music session.
If creating 2 instruments, the first UI opens with its context, the second UI conflicts and crashes.
The problem is resolved by associating the OpenGL data with the ImGui context, instead of it being global.
Among many others, the Carla software permits to experience this problem.
This is the original issue about the music plugin where the problem is present.