Types of DirectDraw Objects

The DirectDraw object represents the display device. Multiple DirectDraw objects can be created for each logical display device. Each unique DirectDraw object can create surface, palette, and clipper objects that are independent of all other DirectDraw objects.

A DirectDrawSurface object represents a linear region of display memory that can be directly accessed and manipulated. These display memory addresses may point to visible frame buffer memory (primary surface) or to non-visible buffers (off-screen or overlay surfaces). These non-visible buffers usually reside in display memory, but they can be created in system memory if required by the hardware design or if DirectDraw is performing software emulation.

A DirectDrawPalette object represents either a 16- or a 256-color indexed palette. Palettes are provided for textures, off-screen surfaces, and overlay surfaces, none of which are required to have the same palette as the primary surface.

The DirectDraw object creates DirectDrawSurface, DirectDrawPalette, and DirectDrawClipper objects. DirectDrawPalette and DirectDrawClipper objects must be attached to the DirectDrawSurface objects they affect. A DirectDrawSurface object may refuse the request to attach a DirectDrawPalette object to it. This is not unusual, because most hardware does not support multiple palettes.