Jump to content
  • Advertisement
Sign in to follow this  
dimensionX

OpenGL Simultaneous Multiple SwapBuffers()

This topic is 4838 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

System Config:- ------------- Processors: 2 AMD Opteron 64-bit Video Card: 2 Gefore 7800 GTX RAM: 2GB Monitors: 4 Monitors (2 connected to each GPU in Horizontal span mode. i.e I have 2 Horizontal spans (2048 * 768), one on each GPU) 1) I had created 2 Win32 windows each of size 2048 * 768 and each one spans one GPU. 2) I also have an OpenGL DC & RC for each one of the above windows. I can draw to them individually. Problem:- ------- 1) Can I use wglShareLists(RC1, RC2) to share the texture objects ? Bare in mind the two RC's have different DC's and the two DC's are on physically different devices (GPUs). 2) How can I render to both windows simultaneously (i.e in Sync) with or without multithreading ? 3) Is it possible to issue SwapBuffers() for two Win32 OpenGL application windows simultaneously (No multi-threading or with multithreading) ?

Share this post


Link to post
Share on other sites
Advertisement
Phantom,

I was hoping an answer or atleast some comment from you. You are the expert around here and I have faith in you :-)

Thanks

Share this post


Link to post
Share on other sites
*chuckles* Thanks for the faith, I did infact mean to reply to this but something came up and I forgot [smile]

1) I've taken a look at the MSDN docs on wglShareLists(), it doesnt say the RCs need to be on the same device, however if it works or not probably depends on the drivers more than anything, my advice, try it and see [smile]

2) For syncing, abusing v-sync might well do it. either just issuing a swapbuffers() call in each thread or by setting swapinterval to 0, calling swapbuffers in the first thread, yeilding, setting swapinterval to 1 and calling swapbuffers in the 2nd thread. However I dont know how perfect this will be. Experimenting seems to be the order of the day [smile]. Without MT its much the same way, just miss out the yeilding steps.

3) not really, SwapBuffers blocks, i'd have thought it would yeild the thread however my own experiments have show that, on single CPU systems with one gfx card and multiple threads, this isnt the case. However it might well act differently on a true SMP and mutliple video card system, I dont have one to hand to test, so if you do experiment I'd appricate it if you'd post the results.

Sorry I cant be much more help than that.

Share this post


Link to post
Share on other sites
If you have two graphics card, will they necessarily be vsyncing at the same time?

But damn, thats a nice computer

Share this post


Link to post
Share on other sites
Phantom,

I created only one window (2048 * 768) that covers one Horizontal span.

1) With only one Horizontal span active (2nd Horizontal span "Extended Desktop mode" is disabled). FPS = 35

2) 2nd Horizontal span enabled (still only one window as above). FPS = 29

There is a 15-17% performance loss by using the extended desktop mode even though no OpenGL window is created on the 2nd Horizontal span. I guess this is expected.

That is so far I had gotten. I shall post somemore results later.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!