Compartir a través de


DDSCAPS2 (Windows CE 5.0)

Send Feedback

This structure defines the capabilities of a DirectDrawSurface object. This structure is part of the DDSURFACEDESC2 structure.

typedef struct _DDSCAPS2 {DWORD dwCaps; DWORD dwCaps2;DWORD dwCaps3;DWORD dwCaps4;} DDSCAPS2, FAR* LPDDSCAPS2; 

Members

  • dwCaps
    One or more flag values representing the capabilities of the surface. The flags in this member are identical to those in the corresponding member of the DDSCAPS structure.

    The following table shows the possible flags.

    Flag Description
    DDSCAPS_3D Unsupported.

    Use DDSCAPS_3DDEVICE.

    DDSCAPS_3DDEVICE Indicates that this surface can be used for 3-D rendering.

    Applications can use this flag to ensure that a device that can only render to a certain heap has off-screen surfaces allocated from the correct heap.

    If this flag is set for a heap, the surface is not allocated from that heap.

    DDSCAPS_ALLOCONLOAD Indicates that memory for the surface is not allocated until the surface is loaded.
    DDSCAPS_ALPHA Indicates that this surface contains alpha-only information.
    DDSCAPS_BACKBUFFER Indicates that this surface is the back buffer of a surface flipping structure.

    Typically, this capability is set by the CreateSurface method when the DDSCAPS_FLIP flag is used.

    Only the surface that immediately precedes the DDSCAPS_FRONTBUFFER surface has this capability set.

    The other surfaces are identified as back buffers by the presence of the DDSCAPS_FLIP flag, their attachment order, and the absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER capabilities.

    If this capability is sent to the CreateSurface method, a stand-alone back buffer is being created.

    After this method is called, this surface could be attached to a front buffer, another back buffer, or both to form a flipping surface structure.

    For more information, see IDirectDrawSurface5::AddAttachedSurface. DirectDraw supports an arbitrary number of surfaces in a flipping structure.

    DDSCAPS_COMPLEX Indicates that a complex surface is being described.

    A complex surface results in the creation of more than one surface.

    The additional surfaces are attached to the root surface.

    The complex structure can be destroyed only by destroying the root.

    DDSCAPS_FLIP Indicates that this surface is a part of a surface flipping structure.

    When this capability is passed to the CreateSurface method, a front buffer and one or more back buffers are created.

    DirectDraw sets the DDSCAPS_FRONTBUFFER bit on the front-buffer surface and the DDSCAPS_BACKBUFFER bit on the surface adjacent to the front-buffer surface.

    The dwBackBufferCount member of the DDSURFACEDESC structure must be set to at least 1 for the method call to succeed.

    The DDSCAPS_COMPLEX capability must always be set when creating multiple surfaces by using the CreateSurface method.

    DDSCAPS_FRONTBUFFER Indicates that this surface is the front buffer of a surface flipping structure.

    This flag is typically set by the CreateSurface method when the DDSCAPS_FLIP capability is set.

    If this capability is sent to the CreateSurface method, a stand-alone front buffer is created.

    This surface will not have the DDSCAPS_FLIP capability.

    It can be attached to other back buffers to form a flipping structure by using IDirectDrawSurface5::AddAttachedSurface.

    DDSCAPS_HWCODEC Indicates that this surface should be able to have a stream decompressed to it by the hardware.
    DDSCAPS_LIVEVIDEO Indicates that this surface should be able to receive live video.
    DDSCAPS_LOCALVIDMEM Indicates that this surface exists in true, local video memory rather than non-local video memory.

    If this flag is specified, then DDSCAPS_VIDEOMEMORY must be specified as well.

    This flag cannot be used with the DDSCAPS_NONLOCALVIDMEM flag.

    DDSCAPS_MIPMAP Indicates that this surface is one level of a mipmap.

    This surface will be attached to other DDSCAPS_MIPMAP surfaces to form the mipmap.

    This can be done explicitly by creating a number of surfaces and attaching them by using the IDirectDrawSurface5::AddAttachedSurface method, or implicitly by the CreateSurface method.

    If this capability is set, DDSCAPS_TEXTURE must also be set.

    DDSCAPS_MODEX Indicates that this surface is either a 320×200 or a 320×240 Mode X surface.
    DDSCAPS_NONLOCALVIDMEM Indicates that this surface exists in non-local video memory rather than true, local video memory.

    If this flag is specified, then DDSCAPS_VIDEOMEMORY flag must be specified as well.

    This cannot be used with the DDSCAPS_LOCALVIDMEM flag.

    DDSCAPS_OFFSCREENPLAIN Indicates that this surface is any off-screen surface that is not an overlay, texture, front-buffer, back-buffer, or alpha surface.

    It is used to identify plain surfaces.

    DDSCAPS_OPTIMIZED Not implemented.

    Indicates that this surface will be an optimized surface and will be created with no underlying video memory until loaded.

    This flag must be used with the DDSCAPS_TEXTURE flag.

    DDSCAPS_OVERLAY Indicates that this surface is an overlay.

    It may or may not be directly visible depending on whether it is being overlaid onto the primary surface.

    DDSCAPS_VISIBLE can be used to determine if it is being overlaid at the moment.

    DDSCAPS_OWNDC Indicates that this surface will have a device context (DC) association for a long period.
    DDSCAPS_PALETTE Indicates that this device driver allows unique DirectDrawPalette objects to be created and attached to this surface.
    DDSCAPS_PRIMARYSURFACE Indicates the surface is the primary surface.

    It represents what is visible to the user at the moment.

    DDSCAPS_PRIMARYSURFACELEFT Indicates that this surface is the primary surface for the left eye.

    It represents what is visible to the user's left eye at the moment.

    When this surface is created, the surface with the DDSCAPS_PRIMARYSURFACE capability represents what is seen by the user's right eye.

    DDSCAPS_STANDARDVGAMODE Indicates that this surface is a standard VGA mode surface, and not a Mode X surface. This flag cannot be used in combination with the DDSCAPS_MODEX flag.
    DDSCAPS_SYSTEMMEMORY Indicates that this surface memory was allocated in system memory.
    DDSCAPS_TEXTURE Indicates that this surface can be used as a 3-D texture.

    It does not indicate if the surface is being used for that purpose.

    DDSCAPS_VIDEOMEMORY Indicates that this surface exists in display memory.
    DDSCAPS_VIDEOPORT Indicates that this surface can receive data from a video port.
    DDSCAPS_VISIBLE Indicates that changes made to this surface are immediately visible.

    It is always set for the primary surface, as well as for overlays while they are being overlaid and texture maps while they are being textured.

    DDSCAPS_WRITEONLY Indicates that only write access is permitted to the surface. Read access from the surface may generate a general protection (GP) fault, but the read results from this surface will not be meaningful.
    DDSCAPS_ZBUFFER Not supported.
  • dwCaps2
    Additional surface capabilities. This member can contain one or more of the following capability flags. When using this structure with the IDirectDrawSurface5::SetSurfaceDesc method, this member can contain an additional flag to indicate how the surface memory was allocated.

    The following table shows the possible capability flags.

    Flag Description
    DDSCAPS2_HARDWAREDEINTERLACE Indicates that this surface will receive data from a video port using the de-interlacing hardware.

    This allows the driver to allocate memory for any extra buffers that may be required.

    The DDSCAPS_VIDEOPORT and DDSCAPS_OVERLAY flags must also be set.

    DDSCAPS2_HINTANTIALIASING Indicates that the application intends to use the anti-aliasing feature.

    Only valid if DDSCAPS_3DDEVICE is also set.

    DDSCAPS2_HINTDYNAMIC Indicates to the driver that this surface will be locked very frequently (for procedural textures, dynamic light maps, and so on).

    This flag can only be used for texture surfaces (DDSCAPS_TEXTURE flag set in the dwCaps member).

    This flag cannot be used with the DDSCAPS2_HINTSTATIC or DDSCAPS2_OPAQUE flags.

    DDSCAPS2_HINTSTATIC Indicates to the driver that this surface can be reordered or retiled on load.

    This operation will not change the size of the texture.

    It is relatively fast and symmetrical, because the application may lock these bits (although it will take a performance hit when doing so).

    This flag can only be used for texture surfaces (DDSCAPS_TEXTURE flag set in the dwCaps member).

    This flag cannot be used with the DDSCAPS2_HINTDYNAMIC or DDSCAPS2_OPAQUE flags.

    DDSCAPS2_OPAQUE Indicates to the driver that this surface will not be locked again.

    The driver is free to optimize this surface by retiling and actual compression.

    Such a surface cannot be locked or used in blit operations, and any attempts to lock or blit a surface with this capability will fail.

    This flag can only be used for texture surfaces (DDSCAPS_TEXTURE flag set in the dwCaps member).

    This flag cannot be used with the DDSCAPS2_HINTDYNAMIC or DDSCAPS2_HINTSTATIC flags.

    DDSCAPS2_TEXTUREMANAGE Indicates that the client would like this texture surface to be managed by DirectDraw and Direct3D® Mobile.

    This flag can only be used for texture surfaces (DDSCAPS_TEXTURE flag set in the dwCaps member).

  • dwCaps3
    Not currently used.

  • dwCaps4
    The following table shows the possible flag.

    Flag Description
    DDSCAPS4_NONGDIPRIMARY This flag is not supported by the desktop version of DirectDraw.

    Can be set together with DDSCAPS_PRIMARYSURFACE to indicate that a newly created surface should become a new visible surface.

    GDI will continue to use previous primary surfaces that will not be visible anymore.

    Newly created surfaces may specify new surface parameters for non-GDI primary surfaces.

    In this case, appropriate implicit mode changes may be done by DirectDraw as a side effect of the CreateSurface call.

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.