473,287 Members | 1,659 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

GDI+ performace in Drawing Applications

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
6 4015
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
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
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
One thing, since GDI+ sits on top of GDI, GDI+ will automatically use
GDI where it can.

Nov 17 '05 #5
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: **ham | last post by:
I know that's an old dirty issue; GDI+ almost -the slowest part of the framework - has bothered many developers using it in animations. Even in managed C++ the performance is awful. Now, any dude...
15
by: Wiktor Zychla | last post by:
today we've found a critical issue regarding the ListView from Windows.Forms. it was confirmed on several machines with Win2K and XP. here's the problem: create a ListView with about 50000 rows....
5
by: anonymous | last post by:
I'm writing a program that deals extensively with the printer. For the most part my application runs fine, but occasionally I run into some Exceptions. The most common exceptions I run into are...
6
by: James dean | last post by:
I want a good site that will show clearly how much more functionality GDI+ has. I cannot seem to find anything other than sites that list "some" of the new functionality that GDI+ offers. A...
2
by: Alphonse Giambrone | last post by:
I am currently reading 'Programming The Web with Visual Basic .NET' and have so far found it to be excellent. Downloaded all the code from Apress and working in chapter 4, I get the error shown...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
7
by: Tarren | last post by:
Hi: I need to render text graphics using custome font. I am running into issues where PrivateFontCollection will hang sometimes when I instantiate it. PrivateFontCollection fc = new...
4
by: Don Curtis | last post by:
If I use GDI+ within a service, what problems can I expect? Why can't GDI+ be used within a service? http://msdn2.microsoft.com/en-us/library/system.drawing.aspx "Classes within the...
7
by: j4richard | last post by:
Help please, I am getting this "Unhandled Exception has occurred in your application" " A Generic error occurred in GDI+" See the end of this message for details on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.