Jump to content
  • Advertisement
Sign in to follow this  
flat2

Context menu decreases performance

This topic is 3546 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. I'm building an editor for my 2d game in C# and wish to switch to DirectX (using SlimDX) for rendering from GDI/BufferedGraphics. Performance is great, but when I cause a context menu to appear, or any other Windows element (such as clicking the Start button) performance massively slows down until the menu/element disappears. I've noticed a similiar problem with other DirectX games in windowed mode. Is there a solution other than stopping rendering when a context menu appears, and restarting when the menu disappears? Many thanks.

Share this post


Link to post
Share on other sites
Advertisement
Is this Vista perchance? I seem to recall hearing that it's a known issue with Vista - although I don't know if there's any work around.

Share this post


Link to post
Share on other sites
XP64, but the same thing happens on XP32. Or at least I am assuming it does, as the same issue occurs with the same Direct3D games on that platform.

Share this post


Link to post
Share on other sites
Perhaps your app is running at lower priority due to being forced into the background because of the menus? Direct3D apps don't usually run very well as background apps, especially if they are embedded in WinForms controls.

Share this post


Link to post
Share on other sites
I've found the solution.

You need to set the Multisample type to NonMaskable in the PresentParameters structure.

Thanks for the replies.

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!