Advertisement

Render in two Windows at the same Time - possible?

Started by October 15, 2003 04:12 AM
4 comments, last by Jason_Frost 21 years, 4 months ago
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?
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.
---K-1 Productions: Come visit us here.
Advertisement
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"
"To err is human, to really mess up requires a computer"
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
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
Game Core
ok cool thx´s a lot ;o) now it works fine

This topic is closed to new replies.

Advertisement