다음을 통해 공유


DDSURFACEDESC (Windows CE 5.0)

Send Feedback

This structure contains a description of a surface. This structure is passed to the IDirectDraw2::CreateSurface method. The relevant members differ for each potential type of surface.

When using the IDirectDraw4 interface, this structure is superseded by the DDSURFACEDESC2 structure.

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.

    The following table shows the possible flags.

    Flag Description
    DDSD_ALL Indicates that all input members are valid.
    DDSD_ALPHABITDEPTH Indicates that the dwAlphaBitDepth member is valid.
    DDSD_BACKBUFFERCOUNT Indicates that the dwBackBufferCount member is valid.
    DDSD_CAPS Indicates that the ddsCaps member is valid.
    DDSD_CKDESTBLT Indicates that the ddckCKDestBlt member is valid.
    DDSD_CKDESTOVERLAY Indicates that the ddckCKDestOverlay member is valid.
    DDSD_CKSRCBLT Indicates that the ddckCKSrcBlt member is valid.
    DDSD_CKSRCOVERLAY Indicates that the ddckCKSrcOverlay member is valid.
    DDSD_HEIGHT Indicates that the dwHeight member is valid.
    DDSD_LINEARSIZE Indicates that dwLinearSize member is valid.
    DDSD_LPSURFACE Indicates that the lpSurface member is valid.
    DDSD_MIPMAPCOUNT Indicates that the dwMipMapCount member is valid.
    DDSD_PITCH Indicates that the lPitch member is valid.
    DDSD_PIXELFORMAT Indicates that the ddpfPixelFormat member is valid.
    DDSD_REFRESHRATE Indicates that the dwRefreshRate member is valid.
    DDSD_WIDTH Indicates that the dwWidth member is valid.
    DDSD_ZBUFFERBITDEPTH Not supported.
  • dwHeight and 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::GetSurfaceDesc method, this is a return value.

    When creating a surface from existing memory or when calling the IDirectDrawSurface5::SetSurfaceDesc method, this is an input value that must be a DWORD multiple.

  • dwLinearSize
    The size of the buffer. Currently returned only for compressed texture surfaces.

  • dwBackBufferCount
    Number of back buffers.

  • dwMipMapCount
    Number of mipmap levels.

  • dwZBufferBitDepth
    Not supported.

  • dwRefreshRate
    Refresh rate (used when the display mode is described).

    The value of 0 indicates that the adapter is using its default refresh rate.

    It is not possible to change an adapter's refresh rate in Windows CE, therefore dwRefreshRate will always be 0.

  • 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::SetSurfaceDesc method, 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
    DDCOLORKEY structure that describes the destination color key to be used for an overlay surface.

  • ddckCKDestBlt
    DDCOLORKEY structure that describes the destination color key for blit operations.

  • ddckCKSrcOverlay
    DDCOLORKEY structure that describes the source color key to be used for an overlay surface.

  • ddckCKSrcBlt
    DDCOLORKEY structure that describes the source color key for blit operations.

  • ddpfPixelFormat
    DDPIXELFORMAT structure that describes the surface's pixel format.

  • ddsCaps
    DDSCAPS structure containing the surface's capabilities.

Remarks

This structure is similar to the DDSURFACEDESC2 structure, but contains a DDSCAPS structure as the ddsCaps member, rather than a DDSCAPS2 structure.

Unlike DDSURFACEDESC2, this structure contains the dwZBufferBitDepth member, which is not supported.

Requirements

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header: Ddraw.h.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.