MDX - Direct3D and Graphics object

Started by
-1 comments, last by lightworker 18 years, 9 months ago
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?
Slaweklightworker@wp.pl

This topic is closed to new replies.

Advertisement