473,404 Members | 2,195 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,404 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 4023
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.