views:

153

answers:

3

After reading this blog, I want to try writing a similar program myself.

One of the subtasks is to have a source set of polygons, and use these polygons to generate the bitmap that is going to be compared with the target image.

In .NET 2005 the obvious method is to use GDI+. Simply create a bitmap, get a Graphics object that interfaces to the bitmap, and call a number of the Graphics objects rendering functions.

Apparently, this doesn't utilise hardware accelaration. This is why WPF doesn't use GDI+.

Is there an API in .NET to generate a bitmap utilising more advanced rendering technologies?

+1  A: 

I'm sure DirectDraw would do what you need. It's what WPF uses, as far as I know.

Ben M
Direct3D actually.
Simon Buchan
+1  A: 

I would look into Managed DirectX (or the more recent XNA). This would allow you to make use of the accelerated Direct3D or DirectDraw libraries, and get fully accelerated performance for your application.

jrista
+2  A: 

Since you've tagged this as WPF, you could try RenderTargetBitmap.Render. Depending on what you're rendering, WPF will use your video card to accelerate rendering.

There is also Managed DirectX, but that is obsolete (MS does not maintain it anymore). I believe XNA is recommended instead now.

Simon Buchan