Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The DDSURFACEDESC2structure contains a description of a surface. This structure is used to pass surface parameters to the IDirectDraw4::CreateSurfaceand IDirectDrawSurface5::SetSurfaceDescmethods. It is also used to retrieve information about a surface in calls to IDirectDrawSurface5::Lockand IDirectDrawSurface5::GetSurfaceDesc. The relevant members differ for each potential type of surface.
typedef struct _DDSURFACEDESC2 { DWORD dwSize ; DWORD dwFlags ; DWORD dwHeight ; DWORD dwWidth ; union { LONG lPitch ; DWORD dwLinearSize ; } DUMMYUNIONNAMEN(1); DWORD dwBackBufferCount ; union { DWORD dwMipMapCount ; DWORD dwRefreshRate ; } DUMMYUNIONNAMEN(2); DWORD dwAlphaBitDepth ; DWORD dwReserved ; LPVOID lpSurface ; DDCOLORKEY ddckCKDestOverlay ; DDCOLORKEY ddckCKDestBlt ; DDCOLORKEY ddckCKSrcOverlay ; DDCOLORKEY ddckCKSrcBlt ; DDPIXELFORMAT ddpfPixelFormat ; DDSCAPS2 ddsCaps ; DWORD dwTextureStage ; } DDSURFACEDESC2, FAR* LPDDSURFACEDESC2;
Members
DDSD_ALL | Indicates that all input members are valid. |
DDSD_ALPHABITDEPTH | Indicates that the dwAlphaBitDepthmember is valid. |
DDSD_BACKBUFFERCOUNT | Indicates that the dwBackBufferCountmember is valid. |
DDSD_CAPS | Indicates that the ddsCapsmember is valid. |
DDSD_CKDESTBLT | Indicates that the ddckCKDestBltmember is valid. |
DDSD_CKDESTOVERLAY | Indicates that the ddckCKDestOverlaymember is valid. |
DDSD_CKSRCBLT | Indicates that the ddckCKSrcBltmember is valid. |
DDSD_CKSRCOVERLAY | Indicates that the ddckCKSrcOverlaymember is valid. |
DDSD_HEIGHT | Indicates that the dwHeightmember is valid. |
DDSD_LINEARSIZE | Indicates that the dwLinearSizemember is valid. |
DDSD_LPSURFACE | Indicates that the lpSurfacemember is valid. |
DDSD_MIPMAPCOUNT | Indicates that the dwMipMapCountmember is valid. |
DDSD_PITCH | Indicates that the lPitchmember is valid. |
DDSD_PIXELFORMAT | Indicates that the ddpfPixelFormatmember is valid. |
DDSD_REFRESHRATE | Indicates that the dwRefreshRatemember is valid. |
DDSD_TEXTURESTAGE | Indicates that the dwTextureStagemember is valid. |
DDSD_WIDTH | Indicates that the dwWidthmember is valid. |
DDSD_ZBUFFERBITDEPTH | Obsolete; see remarks. |
Remarks
The lPitchand lpSurfacemembers are output values when calling the IDirectDrawSurface5::GetSurfaceDescmethod. When creating surfaces from existing memory, or updating surface characteristics, these members are input values that describe the pitch and location of memory allocated by the calling application for use by DirectDraw. DirectDraw does not attempt to manage or free memory allocated by the application.
This structure is nearly identical to the DDSURFACEDESCstructure, but contains a DDSCAPS2structure as the ddsCapsmember. Unlike DDSURFACEDESC, this structure doesn't contain the dwZBufferBitDepthmember. Z-buffer depth is provided in the ddpfPixelFormatmember.
The unions in this structure were written to work with compilers that don't support nameless unions. If your compiler doesn't support nameless unions, define the NONAMELESSUNION token before including the Ddraw.h header file.
Requirements
Runs on | Versions | Declared in |
---|---|---|
Windows CE OS | 2.12 or later. Version 2.12 requires DXPAK 1.0 or later. | ddraw.h |