DDCAPS (Compact 2013)

3/26/2014

This structure represents the capabilities of the hardware exposed through the DirectDraw object.

This structure contains a DDSCAPS structure used in this context to describe what kinds of DirectDrawSurface objects can be created. It may not be possible to simultaneously create all surfaces described by these capabilities.

This structure is used with the IDirectDraw::GetCaps method.

Syntax

typedef struct _DDCAPS { 
  DWORD dwSize;
  DWORD dwCKeyCaps;
  DWORD dwPalCaps;
  DWORD dwBltCaps;
  DWORD dwAlphaCaps;
  DWORD dwOverlayCaps;
  DWORD dwVidMemTotal;
  DWORD dwVidMemFree;
  DWORD dwVidMemStride;
  DWORD dwMaxVisibleOverlays;
  DWORD dwCurrVisibleOverlays;
  DWORD dwNumFourCCCodes;
  DWORD dwAlignBoundarySrc;
  DWORD dwAlignSizeSrc;
  DWORD dwAlignBoundaryDest;
  DWORD dwAlignSizeDest;
  DWORD dwRops[DD_ROP_SPACE];
  DWORD dwMinOverlayStretch;
  DWORD dwMaxOverlayStretch;
  DWORD dwMiscCaps;
} DDCAPS,FAR *LPDDCAPS;  

Members

  • dwSize
    Size of the structure, in bytes. This member must be initialized before the structure is used.
  • dwCKeyCaps
    Color-key capabilities. The following table shows the possible flags.

    Flag

    Description

    DDCKEYCAPS_BOTHBLT

    Supports transparent blitting with for both source and destination surfaces.

    DDCKEYCAPS_DESTBLT

    Supports transparent blitting with a color key that identifies the replaceable bits of the destination surface for RGB colors.

    DDCKEYCAPS_DESTBLTCLRSPACE

    Supports transparent blitting with a color space that identifies the replaceable bits of the destination surface for RGB colors.

    DDCKEYCAPS_DESTBLTCLRSPACEYUV

    Supports transparent blitting with a color space that identifies the replaceable bits of the destination surface for YUV colors.

    DDCKEYCAPS_SRCBLT

    Supports transparent blitting using the color key for the source with this surface for RGB colors.

    DDCKEYCAPS_SRCBLTCLRSPACE

    Supports transparent blitting using a color space for the source with this surface for RGB colors.

    DDCKEYCAPS_SRCBLTCLRSPACEYUV

    Supports transparent blitting using a color space for the source with this surface for YUV colors.

  • dwPalCaps
    Palette capabilities.

    The following table shows the possible flags.

    Flag

    Description

    DDPCAPS_ALPHA

    Supports palettes that include an alpha component.

    For alpha-capable palettes, the peFlags member of for each PALETTEENTRY structure the palette contains is to be interpreted as a single 8-bit alpha value (in addition to the color data in the peRed, peGreen, and peBlue members).

    A palette created with this flag can only be attached to a texture surface.

    DDPCAPS_PRIMARYSURFACE

    Indicates that the palette is attached to the primary surface.

    Changing the palette has an immediate effect on the display unless the DDPCAPS_VSYNC capability is specified and supported.

  • dwBltCaps
    Driver specific blitting capabilities.

    The following table shows the possible flags.

    Flag

    Description

    DDBLTCAPS_READSYSMEM

    Supports blitting from system memory.

    DDBLTCAPS_WRITESYSMEM

    Supports blitting to system memory.

    DDBLTCAPS_FOURCCTORGB

    Supports blitting from a surface with a FOURCC pixel format to a surface with an RGB pixel format.

    DDBLTCAPS_COPYFOURCC

    Supports blitting from a surface with a FOURCC pixel format to another surface with the same pixel format, or to the same surface.

    DDBLTCAPS_FILLFOURCC

    Supports color-fill blitting to a surface with a FOURCC pixel format.

  • dwAlphaCaps
    Alpha blitting capabilities.

    The following table shows the possible flags.

    Flag

    Description

    DDALPHACAPS_ALPHAPIXELS

    Supports per-pixel alpha values specified alongside with the RGB values in the pixel structure.

    DDALPHACAPS_ALPHASURFACE

    Unsupported.

    DDALPHACAPS_ALPHAPALETTE

    Unsupported.

    DDALPHACAPS_ALPHACONSTANT

    Unsupported.

    DDALPHACAPS_ARGBSCALE

    Unsupported.

    DDALPHACAPS_SATURATE

    Unsupported.

    DDALPHACAPS_PREMULT

    Supports pixel formats with premultiplied alpha values.

    DDALPHACAPS_NONPREMULT

    Supports pixel formats with non-premultiplied alpha values.

    DDALPHACAPS_ALPHAFILL

    Supports color-fill blitting using an alpha value.

    DDALPHACAPS_ALPHANEG

    Supports inverted-alpha pixel formats, where 0 indicates fully opaque and 255 indicates fully transparent.

  • dwOverlayCaps
    General overlay capabilities.

    The following table shows the possible flags.

    Flag

    Description

    DDOVERLAYCAPS_FLIP

    Supports surface flipping with overlays.

    DDOVERLAYCAPS_FOURCC

    Supports FOURCC pixel formats with overlays. Use IDirectDraw::GetFourCCCodes to determine which FOURCC formats are supported.

    DDOVERLAYCAPS_ZORDER

    Supports changing Z order of overlays.

    DDOVERLAYCAPS_MIRRORLEFTRIGHT

    Supports surface mirroring in the left-to-right direction for overlays.

    DDOVERLAYCAPS_MIRRORUPDOWN

    Supports surface mirroring in the up-to-down direction for overlays.

    DDOVERLAYCAPS_CKEYSRC

    Supports source color keying for overlays.

    DDOVERLAYCAPS_CKEYSRCCLRSPACE

    Supports source color-space keying for overlays.

    DDOVERLAYCAPS_CKEYSRCCLRSPACEYUV

    Supports source color-space keying for overlays with FOURCC pixel formats.

    DDOVERLAYCAPS_CKEYDEST

    Supports destination color keying for overlays.

    DDOVERLAYCAPS_CKEYDESTCLRSPACE

    Supports destination colo-space keying for overlays.

    DDOVERLAYCAPS_CKEYDESTCLRSPACEYUV

    Supports destination color-space keying for overlays with FOURCC pixel formats.

    DDOVERLAYCAPS_CKEYBOTH

    Supports simultaneous source and destination color keying for overlays.

    DDOVERLAYCAPS_ALPHADEST

    Supports destination alpha blending for overlays.

    DDOVERLAYCAPS_ALPHASRC

    Supports source alpha blending for overlays.

    DDOVERLAYCAPS_ALPHADESTNEG

    Supports inverted destination alpha blending for overlays.

    DDOVERLAYCAPS_ALPHASRCNEG

    Supports inverted source alpha blending for overlays.

    DDOVERLAYCAPS_ALPHACONSTANT

    Supports constant alpha blending for overlays (specified in the DDOVERLAYFX structure).

    DDOVERLAYCAPS_ALPHAPREMULT

    Supports premultiplied alpha pixel formats for overlay alpha blending.

    DDOVERLAYCAPS_ALPHANONPREMULT

    Supports non-premultiplied alpha pixel formats for overlay alpha blending.

    DDOVERLAYCAPS_ALPHAANDKEYDEST

    Supports simultaneous source alpha blending with a destination color key for overlays.

    DDOVERLAYCAPS_OVERLAYSUPPORT

    Supports overlay surfaces.

  • dwVidMemTotal
    Total amount of display memory on the device, in bytes, minus the memory reserved for the primary surface and any private data structures reserved by the driver.

    (This value is the same as the total video memory reported by the IDirectDraw::GetAvailableVidMem method.)

  • dwVidMemFree
    Free display memory.

    This value equals the value in dwVidMemTotal, minus any memory currently allocated by the application for surfaces.

    Unlike the GetAvailableVidMem method, which reports the memory available for a particular type of surface, such as a texture, this value reflects the memory available for any type of surface.

  • dwVidMemStride
    Video memory stride. This value is 0 if the stride is linear.
  • dwMaxVisibleOverlays
    Maximum number of visible overlays or overlay sprites.
  • dwCurrVisibleOverlays
    Current number of visible overlays or overlay sprites.
  • dwNumFourCCCodes
    Number of FourCC codes.
  • dwAlignBoundarySrc
    Source rectangle alignment, in pixels, for an overlay surface.
  • dwAlignSizeSrc
    Source rectangle size alignment, in pixels, for an overlay surface.

    Overlay source rectangles must have a pixel width that is a multiple of this value.

  • dwAlignBoundaryDest
    Destination rectangle alignment, in pixels, for an overlay surface.
  • dwAlignSizeDest
    Destination rectangle size alignment, in pixels, for an overlay surface.

    Overlay destination rectangles must have a pixel width that is a multiple of this value.

  • dwRops[DD_ROP_SPACE]
    Raster operations supported.
  • dwMinOverlayStretchand dwMaxOverlayStretch
    Minimum and maximum overlay stretch factors multiplied by 1000.

    For example, 1.3 x 1000 = 1300.

  • dwMiscCaps
    Miscellaneous video capabilities.

    The following table shows the possible flags.

    Flag

    Description

    DDMISCCAPS_READSCANLINE

    Supports reading the current scanline being drawn.

    DDMISCCAPS_READMONITORFREQ

    Unsupported.

    DDMISCCAPS_READVBLANKSTATUS

    Supports reading the current V-Blank status of the hardware.

    DDMISCCAPS_FLIPINTERVAL

    Supports interval flipping.

    DDMISCCAPS_FLIPODDEVEN

    Supports Even/Odd flipping.

    DDMISCCAPS_FLIPVSYNCWITHVBI

    Supports V-Sync-coordinated flipping.

    DDMISCCAPS_COLORCONTROLOVERLAY

    Supports color controls on overlay surfaces.

    DDMISCCAPS_COLORCONTROLPRIMARY

    Supports color controls on primary surfaces.

    DDMISCCAPS_GAMMACONTROLOVERLAY

    Supports gamma controls on overlay surfaces.

    DDMISCCAPS_GAMMACONTROLPRIMARY

    Supports gamma controls on primary surfaces.

    DDMISCCAPS_AUTOFLIPOVERLAY

    Indicates that the hardware can automatically flip the overlay to the next surface in the flip chain each time a video port V-sync occurs, enabling the video port and the overlay to double buffer the video without CPU overhead. This option is only valid when the surface is receiving data from a video port. If the video port data is noninterlaced or noninterleaved, it flips on every V-sync. If the data is being interleaved in memory, it flips on every other V-sync.

    DDMISCCAPS_VIDEOPORT

    Indicates that the display hardware contains a video port.

    DDMISCCAPS_BOBINTERLEAVED

    Indicates that the overlay hardware can display each field of an interlaced video stream individually while it is interleaved in memory without causing any artifacts that might normally occur without special hardware support. This option is only valid when the surface is receiving data from a video port and when the video is zoomed at least 200 percent in the vertical direction.

    DDMISCCAPS_BOBNONINTERLEAVED

    Indicates that the overlay hardware can display each field of an interlaced video stream individually while it is not interleaved in memory without causing any artifacts that might normally occur without special hardware support. This option is only valid when the surface is receiving data from a video port and when the video is zoomed at least 200 percent in the vertical direction.

    DDMISCCAPS_BOBHARDWARE

    Indicates that the overlay hardware can display each field of an interlaced video stream individually.

Requirements

Header

ddraw.h

See Also

Reference

DirectDraw Structures
DirectDraw Reference

Other Resources

DirectDraw