By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,588 Members | 1,920 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,588 IT Pros & Developers. It's quick & easy.

GDI+ performace in Drawing Applications

P: n/a
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?.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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).
On Sat, 07 May 2005 09:27:26 +0200, James dean <James <dean>> wrote:
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?.

*** Sent via Developersdex http://www.developersdex.com ***


--
Happy coding!
Morten Wennevik [C# MVP]
Nov 17 '05 #2

P: n/a
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

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #3

P: n/a
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.

Nov 17 '05 #4

P: n/a
One thing, since GDI+ sits on top of GDI, GDI+ will automatically use
GDI where it can.

Nov 17 '05 #5

P: n/a
Can you use GDI diectly from C#. So in that case GDI+ does all its
drawing using the CPU?.
*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #6

P: n/a
Yes, and yes. Take a look at DllImport.

On Sat, 07 May 2005 11:34:24 +0200, James dean <James <dean>> wrote:
Can you use GDI diectly from C#. So in that case GDI+ does all its
drawing using the CPU?.
*** Sent via Developersdex http://www.developersdex.com ***


--
Happy coding!
Morten Wennevik [C# MVP]
Nov 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.