Architectural Overview for DirectDraw (Windows Embedded CE 6.0)
1/6/2010
Multimedia software requires high-performance graphics. Through DirectDraw, Microsoft enables a much higher level of efficiency and speed in graphics-intensive applications for Windows than is possible with GDI, while maintaining device independence. DirectDraw provides tools to perform such key tasks as:
- Accessing the video memory directly.
- Page flipping.
- Back buffering.
- Clipping.
Additionally, DirectDraw enables you to query the display hardware's capabilities at run time, then provide the best performance possible given the host computer's hardware capabilities.
As with other DirectX APIs, DirectDraw uses the hardware to its greatest possible advantage, and provides software emulation for most functionality when hardware support is unavailable.
Device independence is possible through use of the hardware abstraction layer, or HAL. For more information about the HAL, see Hardware Abstraction Layer.
DirectDraw provides services through COM-based interfaces. In the most recent iteration, these interfaces are IDirectDraw, IDirectDrawSurface, and IDirectDrawClipper.
For more information about COM in Windows Embedded CE, see Component Services (COM and DCOM).
The DirectDraw object represents the display adapter and exposes its methods through the IDirectDraw interface. The DirectDrawCreate function is used to create a DirectDraw object.
After creating a DirectDraw object, you can create surfaces for it by calling the IDirectDraw::CreateSurface method. Surfaces represent the memory on the display hardware, but can exist on either video memory or system memory.