GDI/GDI +What is
GDI is the main graphics library for Windows applications today. it provides 2D graphics and text functionality, as well as limited imaging functionality. there is some level of acceleration support in graphics cards for GDI, but it is almost negligible nowadays (especially when compared to the level of investment in direct3d acceleration ).
GDI + was introduced around 2001 and it brought anti-aliased 2D graphics, floating point coordinates, gradients, per-pixel Alpha value support, and support for multiple image formats to the Windows platform, but no hardware acceleration into action (all rendering is done in software ). windows form provides managed wrappers on top of the GDI + interfaces.
GDI/GDI +Future
If Microsoft executes the following planGDI/GDI +There will be no development in the future, and it may gradually fade out of the mainstream.
We continue to put a lot of effort in ensuring compatibility for GDI and GDI + (and windows as a whole I might add) for every Windows release, and both technologies will continue to be supported, but no functionality improvements are planned in these technologies for future Windows releases. of course, we will continue to address security and customer issues; if any arise (the GDI and GDI + development work takes place as part of the aveon organization-we invest significant time on GDI/GDI + work ).
WPFHow to Implement
WPF And GDI/GDI + Is implemented by different technologies. It is DirectX Of Managed Encapsulation , To be precise Direct3d, All 2d Is also achieved through its performance. Because Direct3d Is based on hardware Native API , And WPF Yes Managed code, Therefore WPF Exist Managed code Yu Native Resource interaction overhead. This is very similar GDI + Yes Native Of GDI Similar overhead. Therefore , High Performance Requirements 3D Games, direct use DirectX Aspect Ratio WPF Strong performance.
Windows Presentation Foundation does not depend on either GDI or GDI + for its rendering (GDI, GDI +, and WPF coexist side by side ). the mainstream scenario has Windows Presentation Foundation doing all its rendering through direct3d, for all primitives (2d, text, imaging, video, and of course 3d), through direct3d's Native Interface (the managed/native transition takes place within the Windows Presentation Foundation stack, as the bulk of WPF was written in managed code ).
because WPF dependent on direct3d, therefore, its graphics performance depends on hardware - video card. If the hardware itself does not support hard implementation of some graphic effects, is it true? WPF programming brings complexity, in the Code , do I need to determine whether the hardware is applicable?
don't worry, for direct3d is a high-level encapsulation. Developers do not have to consider hardware: hardware implementation does not support (GPU Work ) , (CPU Work )
Windows Presentation Foundation takes advantage of hardware rendering as appropriate. it uses direct3d to provide accelerated rendering on DirectX 7 or above, with further optimization for graphics cards with DirectX 9 and pixel shader 2.0 hardware. for machines without these capabilities, Windows Presentation Foundation uses software rendering, a CPU-based, SSE and sse2 optimized Rasterizer. this is also used when Windows Presentation Foundation is unable to render something using the hardware pipeline, and guarantees that rendering output is available within SS all machine hardware deployments.
As a result, Windows Presentation Foundation has both hardware and software pipelines, both with difference performance characteristics. this cocould make application performance very difficult to predict, since there are two code paths. in practice, hardware is reliably faster; for a given application, it's simply a matter of setting a minimum requirement. windows Presentation Foundation supports Simple runtime hardware detection and allows you to dynamically tailor your application for the platform it's running on using resource dictionaries.
Will Windows Presentation Foundation require a certain level of video card?
Windows Presentation Foundation will take advantage of the latest graphics cards, but it can also use software emulation if a system doesn't have a supported video card.
"Soft implementation"Is more expensiveCPUResources, so hardwareWPFPerformance has a great impact. ThenWhat are the requirements for WPF valuable hardware?
What graphics card shocould I use for Windows Presentation Foundation?
Any high performance DX9 pixel shader 2.0 card will give good results. The fastest PS 2.0 card with the most memory your bank account can afford is the ticket.
Staged several years agoWin + intelThe myth of todayWPF +The feast of video card hardware manufacturers is about to begin.
Reference:
Http://www.fernicola.org/loquitor/index.php? /Archives/4-windows-presentation-foundation-graphics-under-the-hood.html
Http://msdn2.microsoft.com/en-us/library/aa480221.aspx