Jump to content
  • Advertisement
Sign in to follow this  
pathon

Present() = slow

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

Hi, IDirect3DDevice9::Present() - function time length: 1) Vista + Fullscreen + Aero = ~0.2ms 2) Vista + Fullscreen + No-Aero = ~0.2ms 3) Vista + Windowed + Aero = ~0.2ms 4) Vista + Windowed + No-Aero = ~20ms Something certainly seems wrong for the 4th setup. When Aero is disabled and the game window starts up, It will take up about half the screen (640x480) = this will be ~0.2ms and when I maximize, it will be ~20ms. Although if I enlarge the window to nearly the same size as maximized - it will be ~0.2ms... ...but If the bottom part of the window touches/underlaps the taskbar (even just a by a width of 1 pixel) - it will go to ~20ms just like it does in maximized mode this does NOT happen when Aero is enabled or Aero is disabled via using a classic theme. I disable Aero via DwmEnableComposition() - I get the same results if I use this API externaly and before the game has launched.

Share this post


Link to post
Share on other sites
Advertisement
I think I have read somewhere that this is because of the round start button. When it overlaps your drawing area, the button has to be redrawn every frame and that will cause a huge slowdown when Aero is disabled.

Share this post


Link to post
Share on other sites
Ha, when the window is under the round button section of the taskbar - it indeed goes to ~20ms.

Why is this happening only when Aero is disabled and how can I solve this?

Share this post


Link to post
Share on other sites
The why: When Aero is enabled, Vista can use hardware-accelerated compositing in the window manager to blend the different windows together. When Aero is disabled, Windows has to fall back to software rendering methods to blend the overlap.

How to fix it? Uh...complain to Microsoft until they're willing to sacrifice their stupid round button in the name of performance. I don't know if there's really anything you can do. Maybe someone else will have an idea.

Share this post


Link to post
Share on other sites
I found one solution - hide the start orb via ShowWindow(). This works but it doesn't look very nice :P

Share this post


Link to post
Share on other sites
Quote:
Original post by Neverender
How to fix it? Uh...complain to Microsoft until they're willing to sacrifice their stupid round button in the name of performance. I don't know if there's really anything you can do. Maybe someone else will have an idea.


It's "fixed" in Windows 7 - the taskbar is a little bit higher and the orb fits in there without sticking out.

In Vista, you can either auto-hide the taskbar, or increase the height. When it's double-height the button doesn't stick out like it does on a single-height taskbar.

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!