Archived

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

Render in two Windows at the same Time - possible?

This topic is 5173 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, i want to render in two windows at the same time. I have tried it, but if i init my second window, then i cannot render in the first window. Can OGL Render in two windows with different RC, DC´s at the same time?

Share this post


Link to post
Share on other sites
You''ll need two different instances of OpenGL initialized in each window. You''ll just need to pass the display information (vertices, etc...) between the two windows.

---
K-1 Productions: Come visit us here.

Share this post


Link to post
Share on other sites
you''ll need to make the window RC current before you draw to it. e.g

wglMakeCurrent(window1->hRC);
DrawScene();
wglMakeCurrent(window2->hRC);
DrawScene();

Or something like that.

Kazade.

Hyperdev

"To err is human, to really mess up requires a computer"

Share this post


Link to post
Share on other sites
There is some info on what your trying to accomplish here.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/ntopnglr_6flf.asp

You will have to use a display lists for inter-context rendering. Also make sure that you create your OpenGL rendering contexts with the same pixel format or you might have problems.

- Cheers

Share this post


Link to post
Share on other sites
and load textures for each context or use wgl share list to share textures between both contexts .
had to learn that for my model editor. 4 contexts!!!

Bobby

Share this post


Link to post
Share on other sites