Microsoft Windows CE 3.0  

DDSURFACEDESC

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 DDSURFACEDESCstructure contains a description of a surface. This structure is passed to the IDirectDraw2::CreateSurfacemethod. The relevant members differ for each potential type of surface.

When using the IDirectDraw4interface, this structure is superseded by the DDSURFACEDESC2structure.

typedef struct _DDSURFACEDESC {
DWORD
dwSize
;
DWORD
dwFlags
;
DWORD
dwHeight
;
DWORD
dwWidth
;
union
{
LONG
lPitch
;
DWORD
dwLinearSize
;
};
DWORD
dwBackBufferCount
;
union
{
DWORD
dwMipMapCount
;
DWORD
dwZBufferBitDepth
;
DWORD
dwRefreshRate
;
};
DWORD
dwAlphaBitDepth
;
DWORD
dwReserved
;
LPVOID
lpSurface
;
DDCOLORKEY
ddckCKDestOverlay
;
DDCOLORKEY
ddckCKDestBlt
;
DDCOLORKEY
ddckCKSrcOverlay
;
DDCOLORKEY
ddckCKSrcBlt
;
DDPIXELFORMAT
ddpfPixelFormat
;
DDSCAPS
ddsCaps
;
} DDSURFACEDESC, FAR* LPDDSURFACEDESC;

Members

dwSize
Size of the structure, in bytes. This member must be initialized before the structure is used.
dwFlags
Optional control flags. One or more of the following flags:
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 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_WIDTH Indicates that the dwWidthmember is valid.
DDSD_ZBUFFERBITDEPTH Indicates that the dwZBufferBitDepthmember is valid.
dwHeightand dwWidth
Dimensions, in pixels, of the surface to be created.
lPitch
Distance, in bytes, to the start of next line. When used with the IDirectDrawSurface5::GetSurfaceDescmethod, this is a return value. When creating a surface from existing memory or when calling the IDirectDrawSurface5::SetSurfaceDescmethod, this is an input value that must be a DWORDmultiple.
dwLinearSize
The size of the buffer. Currently returned only for compressed texture surfaces.
dwBackBufferCount
Number of back buffers.
dwMipMapCount
Number of mipmap levels.
dwZBufferBitDepth
Depth of Z-buffer. This member is obsolete for DirectX 6.0 and later. Use the IDirect3D3::EnumZBufferFormatsto retrieve information about supported depth buffer formats.
dwRefreshRate
Refresh rate (used when the display mode is described). The value of 0 indicates an adapter fault.
dwAlphaBitDepth
Depth of alpha buffer.
dwReserved
Reserved.
lpSurface
Address of the associated surface memory. When calling IDirectDrawSurface5::Lock, this member contains a valid pointer to surface memory after the call returns. When creating a surface from existing memory or when using the IDirectDrawSurface5::SetSurfaceDescmethod, this member is an input value that is the address of system memory allocated by the calling application. Do not set this member if your application needs DirectDraw to allocate and manage surface memory.
ddckCKDestOverlay
DDCOLORKEYstructure that describes the destination color key to be used for an overlay surface.
ddckCKDestBlt
DDCOLORKEYstructure that describes the destination color key for blit operations.
ddckCKSrcOverlay
DDCOLORKEYstructure that describes the source color key to be used for an overlay surface.
ddckCKSrcBlt
DDCOLORKEYstructure that describes the source color key for blit operations.
ddpfPixelFormat
DDPIXELFORMATstructure that describes the surface's pixel format.
ddsCaps
DDSCAPSstructure containing the surface's capabilities.

Remarks

This structure is similar to the DDSURFACEDESC2structure, but contains a DDSCAPSstructure as the ddsCapsmember, rather than a DDSCAPS2structure. Unlike DDSURFACEDESC2, this structure contains the dwZBufferBitDepthmember.

Requirements

Runs on Versions Declared in
Windows CE OS 2.12 or later. Version 2.12 requires DXPAK 1.0 or later. ddraw.h