Jump to content
  • Advertisement
Sign in to follow this  

MDX - Direct3D and Graphics object

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

I am working on maps visualisation software - I have decided to draw outlines and vertex rectangles using simple GDI+ and map content using Direct3D (for Performance issues). Effect is quite impressive but I have no Idea how to avoid flickering of GdI+ drawing. I am callin GDI+ render right after device.Present() method so first direct3d content shows up and then Gdi+ . I have did some improvments to avoid unnececery renderings but application must render during map operations like zoom-in zoom-out, translation and many others. So - my question is - How to avoid flickering when usinhg mixed Direct3D and GDI+ on windows forms. One solution is to get back buffer surface and draw on it Microsoft.DirectX.Direct3D.Surface backbuffer; backbuffer = device.GetBackBuffer( 0, 0, BackBufferType.Mono); (Solution from Microsoft Forums) but when I am trying to do: Graphics graphics = backbuffer.GetGraphics(); App crashes with "Error in application" message I have found solution where author said to use 2 Back Buffers- I did that - still does not work - still same problem. Changing back buffer format from A8R8G8B8 to X8R8G8B8 (to avoid lack of alpha spport for GDI problem ) allso does not help Any more Ideas?

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!