Multiple Windows - Heavy Rendering - Question

Hi,

I already found an old topic of someone trying to get two windows to work in Windows using specific platform calls (win32) (not glut)
However, my problem is different so I decided to post a new thread.

I’m running two windows on a single thread. However, the second window does not always render everything that the first window renders and sometimes nothing at all.
For example, I have one in perspective with 20000 spheres and the other one in orthographic with the same amount. so it doesn’t seem to render all.
If I change the spheres for cubes (cubes build using triangles) , the second screen does not render anything at all.
I’m using the OpenGL Bible 5th edition code to create windows (chapter 13)
I’m been debugging this for a bit now, and I’m beginning to think that it may be that is not enough time to render both screens.

Assuming that is not some stupid bug that I created, I can think of the following and If I can get feedback, would be great!

One possible solution that I have is to thread. However, threading will have to be safe, since I can only write to the video card one at time (as far as I know) with wglMakeCurrent . This means that it may not be sufficient.

Changing my computer is not an option at this time but is very fast. Intel xeon 2.8ghz quad core with 12GB ram (running win7 x64 by the way)

The other one is to add a more powerful video card. Here I have the option to get something a lot better. What I have now is ATI FIREPRO V7800 (FireGL) . I also heard that you can chain the video cards, but I think that’s for more heavy gpu work.

The third option is to optimized my code (maybe should be my first) and try to figure out what can I do in gpu

I’m free to use any openGL. I’m using OpenGL 3.3 functionalities (the stuff in the gl bible 5th edition)

I’m not an expert so any help would be greatly appreciated.

Now, what is the final objective. I want to have medical imagining or other imagining in perspective view + orthographic view in two separate windows (two monitors) the images come in 256x256 by 256 slices
I also would have some 3d stuff, but mainly what I mention already.

please help. has anyone ran into this problem when rendering too many objects?
If I had two video cards, could I write to each one at the same time in windows. is this even possible? (it is a crazy question.)

thanks,
Francisco

as I kept searching, a possible solution is to make each window in a different thread.

First of all you have to find where the bottleneck is! That can be the hardest task.

Sure, threading should be safe, but you are wrong in one thing. You are not directly talking to your graphics card. Driver does! And it will serialize the access. But that does not mean that you don’t need synchronization if your threads talk to each other. A single GL context can be current in just one thread, but that also does not mean that you must have just one context.

Once again, are you sure that the bottleneck is on the GPU itself?

That is aways the solution. :slight_smile:

Modern cards are capable to fill HD screen wit the pixel-size triangles without any problem. So, the solution is to remove any details that are not visible. Simplify objects that are far away. Don’t render something that is hidden by other objects. There is a vast amount of techniques that can be used.

Thank you.
I’m going to post a more specific question.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.