Archived

This topic is now archived and is closed to further replies.

lowlevel

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

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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(...);

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites