Jump to content
  • Advertisement
Sign in to follow this  
ozfred

OpenGL OpenGL and 2D app conflict? (Synch. issue)

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

We run simultaneously 3 or 4 applications: one 3D OpenGL and 3 standard Windows apps. All of them in 800x600 by default, but can be resized by the user. The VSYNC is ON, the target fps of the 3D is reached without any issue (even with 1600x1200) when no 2D app is running. We simply use SwapBuffers for synchro in the 3D app. The 2D app is using StretchBlt to resize the content of its window, after having updated the objects in default size. Refresh rate is 2 Hz. If we run 2 or more instances of the 2D app, we miss some frames on the 3D and the fps is then 58 or 59 something for a target of 60. I assume that the StretchBlt is done by the hardware and requires some time (for processing or exchanging the data) and when this occurs just before the VSynch, the 3D app misses a SwapBuffer call. We have tried to play with the driver settings (SLI or not, triple buffer and so on) and with tasks priorities and CPU affinities. We have also tried to do several smaller StretchBlt operations (half the window). All the same... Any clue ? The PC is: Athlon X2 4400+, 2 GB, 2 x 7800GTX in SLI, mobo=Asus A8N-SLI Premium

Share this post


Link to post
Share on other sites
Advertisement
im not 100% sure what u mean
StretchBlt is a windows command thus youre not using it in the opengl window but with the other 2d windows?
the problem is when u call StretchBlt in another 2d window your 3d opengl window starts missing the 60hz refresh?
is this correct?

Share this post


Link to post
Share on other sites
Hi zedseek,
Yes your assumptions are right. Sorry if I'm not very clear!
The screen is divided by default in 4 800x600 areas, one for the 3D and the others for standard Windows applications.
The user can then enlarge or reduce some of them and that's why we use the StretchBlt in the 2D programs.
We have even tried to do the stretching ourselves by program but we still have to get the bitmap from Windows, do the transformation and send it back to WIndows. That works too but with the same issue on the 3D side (missing 60 Hz refresh).
Hope this is a bit clearer...

Seeing the PC config, it's not a CPU issue (load about 20-30% for the dual core), probably not a GPU issue either (similar problem with or without SLI).
There should be a bottleneck somewhere... Where and which workaround ?!

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!