Reputation: 45252
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?
Upvotes: 3
Views: 1307
Reputation: 13245
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.
Upvotes: 2
Reputation: 32960
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.
Upvotes: 1
Reputation: 22492
I'm sure DirectDraw would do what you need. It's what WPF uses, as far as I know.
Upvotes: 1