Skip to main content
gamedev.net
🔒 Locked

Rendering to multiple windows

Started by amosl Dec 23, 2001 at 4:35 AM 7 replies 500+ views
Original Post
amosl
amosl
Hi, I am writing a windows application that has multiple windows rendering an OpenGL scene simultanously, were each represents a camera. The problem that I have is that the frame-rate drops dramatically for every additional window: Single window - 85 fps 2 Windows - 42 fps 4 Windows - 20 fps I think most of the extra time is spent in wglSwapBuffers into each windows'' DC. Is there a common way to handle this situation ? I don''t know about using single/multiple RC''s - can that do the trick ? A friend of mine suggested that I would use viewports instead of windows, but I don''t like the idea since it means we render to a single window and I lose all the advantages of having independent separate views. Any suggestions ? Thanks, ------------------------------ Amos Laber Lead 3D Developer ------------------------------
------------------------------ Amos Laber Lead 3D Developer------------------------------
DigitalDelusion
DigitalDelusion
Correct me if Im wrong... but 2*42 = 84... and you can render at 85 in one window... hmm... are we starting to see a pattern 4*20 = 80 ohhh... we have lost 5 fps due to switching... hmm...

really, I can''t see whats the problem here, you render 4 times as much and expect the framerate not to drop?
HardDrop - hard link shell extension."Tread softly because you tread on my dreams" - Yeats
Dredge-Master
Dredge-Master
using the viewport method, you can cut up the buffer into seperate sections (a pain in the arse in my opinion) then swap the cut up parts to the different windows.

another is to draw the first window and create a display list of all the stuff and have it all calculated there. The other three just have to use the same data (no recalculating of the positions and so on) and then swap the buffer. You seem to be redrawing it completely as the frame rates (as pointed out above) are all in the same ratio.



Beer - the love catalyst
good ol'' homepage
Beer - the love catalystgood ol' homepage
amosl
amosl
quote:
Original post by DigitalDelusion
Correct me if Im wrong... but 2*42 = 84... and you can render at 85 in one window... hmm... are we starting to see a pattern 4*20 = 80 ohhh... we have lost 5 fps due to switching... hmm...

really, I can''t see whats the problem here, you render 4 times as much and expect the framerate not to drop?


The rendering time is NOT the bottleneck here. This performance drop happens also when rendering an empty scene with nothing in it.
It looks like there is no sharing of back buffers, perhaps an OpenGL pipeline problem ... In DirectX 8.0 it works very well.
------------------------------ Amos Laber Lead 3D Developer------------------------------
Marvin
Marvin
Hi, im quite curious how u render to 2 windows in OpenGL, i know in DirectX multiple monitors is quite easy, any hints on how you do t in OpenGL?
Dredge-Master
Dredge-Master
in the above case as his fps is halved (because the reply to my post was BS - no offence or anything) he is re drawing the entire scene per window. that is why it is slow and the only thing he can do in that case is to either render it as one window, or precalculate all the data so the only performance hit is from the rendering, not the calculations.



Beer - the love catalyst
good ol'' homepage
Beer - the love catalystgood ol' homepage
aristoishere
aristoishere
Well , DigitalDelusion and the other guys , I hate to tell you this but the multiple windows stuff is not "So Clear and easy" as you think , for example ->
The nVidia quadra has an opengl option regarding a unified backBuffer mode used for multiple windows!!!!
The geForce does not have this option for openGL.

In openGL ,for an unknown Reason, rendering the same scene with shared display lists using the same render context drops the frame rate per window exactly!!! not matter what the complexity of the scene!! you could draw an empty scene and check it out.
In DX8 this thing does not happen . I myself is wondering why

:o)

D
D
The simplest answer to why directX does not drop teh frame rate is that its not really telling you the correct framerate - just like all the other things in windows

Daemin(Dominik Grabiec)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.