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

How does GDI use the graphics card for performance

P: n/a
Could someone explain how this works. I think the graphics card is used
to do blitting and drawing shapes like rectangles. How does it draw
using the Graphics card on the PC and why is this feature left out of
GDI+?.
*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Each card has a driver and each driver provides methods to draw lines, blit
images, fill polygons etc. Where the hardware of the card supports the
feature, the driver instructs the card to do the work which relieves the
strain on the CPU. Hardware blitting and line-drawing is a lot faster with
dedicated hardware and dual ported video memory. Where a feature is not
supported in hardware the driver does the rendering in software.

GDI+ was designed to do a lot of things that GDI can't do such as be
completely resolution independent, provide alpha-blending and shading
algorithms and have a proper graphics processing pipeline for
transformations and so-on. GDI+ *could* be hardware accellerated but
manufacturers haven't adopted it. I think that even after five years only
Matrox have a GDI+ accellerated card. I wish they'd send me one so I could
fiddle with it (big hint there Matrox...)

The reasons that MS went for a software approach for GDI+ was that they
considered hat CPU speeds and AGP / PC bus speeds were such that the more
flexible software rendering could be used and performance would be
acceptable. They always envisioned GDI+ to be for non graphic intensive
programs because DirectX fills that niche nicely. People can and do use GDI+
for reasonably graphic intensive programs but there are always a few that
expect 60frames-per-second rendering of 280*1024 images and are often
disappointed.

The GDI+ FAQ has an animation example that does a pretty reasonable job of
illustrating the capabilities of GDI+ when used in graphics. The code can
render hundreds of semi-transparent, rotating and moving objects.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

<James dean> wrote in message
news:e1****************@TK2MSFTNGP15.phx.gbl...
Could someone explain how this works. I think the graphics card is used
to do blitting and drawing shapes like rectangles. How does it draw
using the Graphics card on the PC and why is this feature left out of
GDI+?.
*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.