-
Notifications
You must be signed in to change notification settings - Fork 781
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
Creating multiple windows with separate contexts #379
Comments
I've done this. At first I used a separate NanoVG context and GLFW context per window. However, this leads to weird difficulties down the road. I ended up using shared context. Like so:
Then for each window:
Then to render:
This way all resources loaded using NVG are shared between all windows as well. |
Thanks a lot @itscool. It worked! |
I actually managed to make it work without sharing the context, and just like @itscool I faced strange bugs (like text not being rendered correctly in the second window). Shared context FTW! |
While a shared context is nice, I'm having troubles with retaining the transform state. Care to share how you got it to work with multiple contexts? |
Hi,
Thanks for this great library!
I'd like to have two different windows with different stuff drawn on them. I'm struggling with this. Is there a small example of how to handle multiple windows/multiple contexts?
I found this in a related project:
https://github.com/notlion/Cinder-NanoVG/blob/master/samples/MultiWindow/src/MultiWindowApp.cpp\
Here's what I'm trying to do looks like in pure OpenGL:
Thanks
The text was updated successfully, but these errors were encountered: