GDI+ performace in Drawing Applications

  • Thread starter Thread starter James dean
  • Start date Start date
J

James dean

I have heard that the video drivers in GDI+ are a big performance issue.
But is this only an issue with something like Games Programming i
think...is this wrong?. What about a drawing application just drawing
simple one dimensional shapes(Polygons,beziers,polylines etc...) are
these video drivers still useful for this?. If the video drivers are not
a problem then is there any other performance problems that would be
disastrous for a drawing application?.
 
Hi James,

GDI+ isn't hardware accelerated so with heavy drawing you will notice a difference from regular GDI. However, you can still tap into GDI when needed. Besides there are steps to optimize drawing.

For Games Programming you can use Managed DirectX which is only slightly slower than Unmanaged DirectX (I seem to remember around 3% slower).
 
Morten,
Thanks for the response. You will have to excuse my lack of
understanding, but what exactly is "Hardware acceleration" and how does
it work?.
Thanks in advance,
James
 
TJB replied to:
Morten,
Thanks for the response. You will have to excuse my lack of
understanding, but what exactly is "Hardware acceleration" and how does
it work?.
Thanks in advance,
James

Graphics cards have "2D" accelerators as well. Drawing lines, blitting
bitmaps, is generally all done by the hardware of most of today's
graphics cards, not the CPU. These raw primitives match GDI on an
almost one to one basis. If you draw a GDI rectangle or a line, it is
probably hardware accelerated.

GDI+ is a software layer that sits on top of GDI. GDI+ lets you do
fancy fills, subpixel rendering and finally anti-aliased drawing, but
it too even is implemented in terms of regular GDI, where it can be.

DirectX isn't really a drawing API the way GDI+. DirectX deals with
applying sets of polygons in a three dimensional space whereas GDI+
works with pretty much any shape in a 2D space.

GDI is the fastest 2D API. GDI+ is slower than GDI. DirectX is faster
at drawing polygons than either GDI or GDI+, but DirectX can only draw
polygons. IT is even common to use GDI and GDI+ to fill a DirectX
polygon - that is how you can get text on a 3D screen.
 
One thing, since GDI+ sits on top of GDI, GDI+ will automatically use
GDI where it can.
 
Can you use GDI diectly from C#. So in that case GDI+ does all its
drawing using the CPU?.
 
Back
Top