Microsoft DirectX 9.0 |
The IDirectDraw interface is exposed on DirectDraw objects used in the DirectShow multimedia streaming APIs and is included in the DirectShow documentation for convenience.
The DirectDraw object represents the display hardware. The object is hardware-accelerated if the display device for which it was instantiated has hardware acceleration. The three objects which can be created by a DirectDraw object are the DirectDrawSurface, DirectDrawPalette, and DirectDrawClipper objects.
The DirectDraw object manages all of the objects it creates. It controls the default palette if the primary surface is in 8-bpp mode, the default color key values, and the hardware's display mode. It knows what resources have been allocated and what resources remain to be allocated.
Changing the display mode is an important piece of the functionality of DirectDraw. The display mode resolution can be changed at any time unless another application has obtained exclusive access to DirectDraw. The pixel depth of the display mode can only be changed if the application requesting the change has obtained exclusive access to the DirectDraw object. All DirectDrawSurface objects lose their surface memory and become inoperative when the mode is changed. These surfaces' memory must be reallocated using the Restore method
In addition to the methods inherited from IUnknown, the IDirectDraw interface includes the following methods.
Method | Description |
Compact | Not yet implemented. |
CreateClipper | Creates a DirectDrawClipper object. |
CreatePalette | Creates a DirectDrawPalette object for this DirectDraw object. |
CreateSurface | Creates a DirectDrawSurface object for this DirectDraw object. |
DuplicateSurface | Duplicates a DirectDrawSurface object. |
EnumDisplayModes | Enumerates all of the display modes the hardware exposes through the DirectDraw object that are compatible with a provided surface description. |
EnumSurfaces | Enumerates all of the existing or possible surfaces that meet the search criterion specified. |
FlipToGDISurface | Makes the surface that GDI writes to the primary surface. |
GetCaps | Fills in the raw (not remaining) capabilities of the device driver (the hardware) and/or the Hardware Emulation Layer (HEL). |
GetDisplayMode | Returns the current display mode. |
GetFourCCCodes | Gets the FourCCCodes supported by the DirectDraw object. |
GetGDISurface | Returns the DirectDrawSurface object that currently represents the surface memory that GDI treats as the primary surface. |
GetMonitorFrequency | Returns the frequency of the monitor being driven by the DirectDraw object. |
GetScanLine | Returns the scan line that the monitor is currently updating to the display. |
GetVerticalBlankStatus | Returns the status of the vertical blank. |
Initialize | Initializes the DirectDraw object. |
RestoreDisplayMode | Resets the mode of the display device hardware for the primary surface to what it was before the SetDisplayMode method was called to change it. |
SetCooperativeLevel | Determines the top-level behavior of the application. |
SetDisplayMode | Sets the mode of the display device hardware. SetCooperativeLevel must be used to set exclusive level access before the mode can be changed. |
WaitForVerticalBlank | Used to help the caller synchronize itself with the vertical blank interval. |