Chapter 3
DirectDraw is a Microsoft DirectX API that lets you directly control display-device features such as the following:
Overall, DirectDraw provides a device-independent approach for accessing display devices and is the DirectX API used for all 2D drawing operations. It is also the foundation for Direct3D, so even "3D-only" programs need to use DirectDraw.
DirectDraw manages all the objects it creates and tracks the resources that have (or haven't) been allocated. It also handles the following features:
DirectDraw allows you to enumerate the capabilities of the underlying hardware and use the supported hardware-accelerated features.
DirectDraw works with many types of display hardware, including standard SVGA monitors; head-mounted displays; and new, more advanced systems capable of handling clipping, color formats other than RGB, and stretching. Like the other DirectX APIs, DirectDraw is designed to emulate any feature the host system's hardware doesn't provide, when possible.
DirectDraw and Direct3D enumerate the hardware capabilities of any target platform to determine which support hardware acceleration of various features. You should write your software to require only those abilities necessary for the program to execute efficiently but to check for and use any other capabilities if they are available. For example, only newer hardware supports single-pass multitexturing, so requiring this feature in your application would lock out users who have older systems; on the other hand, users who have the latest and greatest hardware will expect the games they buy to include support for such advanced features.