Microsoft DirectX 8.1 (C++)

CAggDirectDraw Class

CAggDirectDraw Class Hierarchy

The CAggDirectDraw class aggregates an IDirectDraw interface. Although Microsoft® DirectDraw® interfaces (IDirectDraw and IDirectDrawSurface) potentially have the ability to be aggregated, this feature is not yet implemented. Various parts of Microsoft DirectShow® require aggregation of the DirectDraw interfaces. In particular, the video renderer passes out media samples that expose IDirectDraw and IDirectDrawSurface. This class and the CAggDrawSurface class republish the methods of the DirectDraw class so that they can be aggregated.

Each member function in this class, with the exception of the constructor and SetDirectDraw, simply calls the corresponding method on the IDirectDraw interface with the parameters passed to it.

Protected Data Members

Data Member Description
m_pDirectDraw DirectDraw object.

Member Functions

Member Function Description
CAggDirectDraw Constructs a CAggDirectDraw object.
SetDirectDraw Sets the DirectDraw object to be aggregated by this class.

Implemented IDirectDraw Methods

The following IDirectDraw methods are implemented. For more information, refer to the DirectDraw documentation.

Method Description
Compact Moves all the pieces of surface memory on the video card to a contiguous block to make the largest chunk of free memory available.
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 the display modes the hardware exposes through the DirectDraw object that are compatible with a provided surface description.
EnumSurfaces Enumerates all 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 Retrieves the current display mode.
GetFourCCCodes Retrieves the FOURCC codes supported by the DirectDraw object.
GetGDISurface Retrieves the DirectDrawSurface object that currently represents the surface memory that GDI treats as the primary surface.
GetMonitorFrequency Retrieves the frequency of the monitor being driven by the DirectDraw object.
GetScanLine Retrieves the scan line that the monitor is currently updating to the display.
GetVerticalBlankStatus Retrieves 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 CAggDirectDraw::SetDisplayMode member function was called.
SetCooperativeLevel Determines the top-level behavior of the application.
SetDisplayMode Sets the mode of the display device hardware.
WaitForVerticalBlank Helps the caller synchronize itself with the vertical blank interval.