views:

55

answers:

2

Guys, I am trying to write a class in C# that can be used as a direct replacement for the C# Bitmap class. What I want to do instead though is perform all graphic functions done on the bitmap using the power of the video card. From what I understand, functions such as DrawLine or DrawArc or DrawText are primitive functions that use simple cpu math algorithms to perform the job. I, instead, want to use the graphics card cpu and memory to do these and other advanced functions, such as skinning a bitmap (applying a texture) and true transparancy. My problem is, in C#, how do I access direct video functions? Is there a library or something I need?

A: 

You mean like DirectX?

Ignacio Vazquez-Abrams
I would prefer not to deal with the complexity of DirectX. I want to be able to call MyNewBitmapClass.DrawLine(5,10,15,20) and have it hide all those complex details
icemanind
@icemanind that's exactly what you could do with DirectX put it as what happens inside your DrawLine method. Regardless you basically need to choose either DirectX or OpenGL there's no way a single person could ever hope to achieve the capabilities you need within any reasonable amount of time without those frameworks.
Chris Marisic
@Chris Thanks, I guess I will brush up on my DirectX skills. Such a scary world to enter! lol
icemanind
+1  A: 

DirectX or OpenGL. I prefer OpenGL, personally, especially for the level of manipulation that you're talking about.

Do you want do do this behind the scenes, or in real time (say, for a game or photo-editing program?) That may make a difference in what library you should use.

David Lively
I prefer to do this behind the scenes. Is DirectX and OpenGL the only ways to go? I was hoping for something without the complexity of these libraries.
icemanind
OpenGL and DirectX are pretty much the simplest ways to go about this. They wrap they slightly more complex video driver interface, which, if you're asking this question, you don't want to get into. OpenGL isn't complex at all, and their are many, many tutorials available online.
David Lively