Having multiple OGL-windows in one app NOT sharing rendering context?

Started by
1 comment, last by lowlevel 22 years ago
Hello. Here''s the deal: I have two OGL-windows in the same app, and they both create their own rendering context. I have to call wglMakeCurrent every frame of both windows so they won''t disturb eachother. So far this seems to be enough, but I''m not sure, since my knowlage of rendering contexts and such stuff is very limited. Could anyone tell me if there is anything else I should do also? BTW I don''t want to change them to share rendering context. The two windows is never visible at the same time. Also, I don''t have time to make any big changes since I''m only working as a consultant and my time here is out in a week.
Advertisement
Well, you don''t have to call wglMakeCurrent every frame!
You have got two rendering contexts so you only have too choose which context to use with SwapBuffers(...);
If only one of your windows is visible at any given time, call wglMakeCurrent just before or after you make a window visible with the appropriate DC.
---visit #directxdev on afternet <- not just for directx, despite the name

This topic is closed to new replies.

Advertisement