Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
As i know the only API that windows provides to developers for working with graphics and displaying them is GDI(Graphic Device Interface) and any other library that simplifies this work is also based on GDI such as System.Drawings(in .net framework)... so What is actually DirectX?

Does it also simplifies advanced functionalities of GDI?

TIA
Posted

1 solution

DirectX is the way alternative to GDI, a faster one. Moreover, even though GDI and DirectX can be used together, they poorly live together. To see it, it's enough to put some GDI object on top of, say DirectX-based video and see what happens. For resolving such clashes, a layout manager exists, which is a part of DirectX, not a part of GDI.

GDI is very indirect, DirectX is more directly related to hardware. GDI and GDI+ are tightly related to Windows and Windows messages, but DirectX is not. It can be used on different platforms and is supported by many hardware models, which helps to accelerate graphics a lot. So, DirectX graphics tends to be fast; and GDI graphics tends to be sluggish.

DirectX is nicely encapsulated in the managed pure-OOP interface of WPF, which is almost entirely based on DirectX, and, therefore, also not tightly related to Windows. Windows API is used by WPF only at the level of primary input events and top level of a window, but the inside content of the window does not use message pumping at all, which is replaced by pure .NET event system. In this sense, WPF can be considered as the alternative to GDI, with the GDI architectural problems critically reviewed.

—SA
 
Share this answer
 
Comments
AmiR1999 25-Aug-14 13:22pm    
Does DirectX have direct calls to hardware without help of GDI?
Sergey Alexandrovich Kryukov 25-Aug-14 13:24pm    
Yes, without any help of GDI. DirectX can be used on the systems where GDI is not available.
—SA
AmiR1999 25-Aug-14 13:27pm    
Thank you!
Sergey Alexandrovich Kryukov 25-Aug-14 13:32pm    
You are very welcome.
Good luck, call again.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900