DDCAPS

typedef struct _DDCAPS{

DWORD dwSize;

DWORD dwCaps;

DWORD dwCaps2;

DWORD dwCKeyCaps;

DWORD dwFXCaps;

DWORD dwFXAlphaCaps;

DWORD dwPalCaps;

DWORD dwSVCaps;

DWORD dwAlphaBltConstBitDepths;

DWORD dwAlphaBltPixelBitDepths;

DWORD dwAlphaBltSurfaceBitDepths;

DWORD dwAlphaOverlayConstBitDepths;

DWORD dwAlphaOverlayPixelBitDepths;

DWORD dwAlphaOverlaySurfaceBitDepths;

DWORD dwZBufferBitDepths;

DWORD dwVidMemTotal;

DWORD dwVidMemFree;

DWORD dwMaxVisibleOverlays;

DWORD dwCurrVisibleOverlays;

DWORD dwNumFourCCCodes;

DWORD dwAlignBoundarySrc;

DWORD dwAlignSizeSrc;

DWORD dwAlignBoundaryDest;

DWORD dwAlignSizeDest;

DWORD dwAlignStrideAlign;

DWORD dwRops[DD_ROP_SPACE];

DDSCAPS ddsCaps;

DWORD dwMinOverlayStretch;

DWORD dwMaxOverlayStretch;

DWORD dwMinLiveVideoStretch;

DWORD dwMaxLiveVideoStretch;

DWORD dwMinHwCodecStretch;

DWORD dwMaxHwCodecStretch;

DWORD dwReserved1;

DWORD dwReserved2;

DWORD dwReserved3;

DWORD dwSVBCaps;

DWORD dwSVBCKeyCaps;

DWORD dwSVBFXCaps;

DWORD dwSVBRops[DD_ROP_SPACE];

DWORD dwVSBCaps;

DWORD dwVSBCKeyCaps;

DWORD dwVSBFXCaps;

DWORD dwVSBRops[DD_ROP_SPACE];

DWORD dwSSBCaps;

DWORD dwSSBCKeyCaps;

DWORD dwSSBCFXCaps;

DWORD dwSSBRops[DD_ROP_SPACE];

DWORD dwReserved4;

DWORD dwReserved5;

DWORD dwReserved6;

} DDCAPS,FAR* LPDDCAPS;

Represents the capabilities of the hardware exposed through the DirectDraw object. It contains a DDSCAPS structure used in this context to describe what kinds of DirectDrawSurfaces can be created. It may not be possible to simultaneously create all of the surfaces described by these capabilities.

dwSize

Size of the structure. This must be initialized before the structure is used.

dwCaps

Specifies driver-specific capabilities.

DDCAPS_3D

Indicates the display hardware has 3D acceleration.

DDCAPS_ALIGNBOUNDARYDEST

Indicates that DirectDraw will support only those source rectangles with the x-axis aligned to the DDCAPS.dwAlignBoundaryDest boundaries of the surface.

DDCAPS_ALIGNBOUNDARYSRC

Indicates that DirectDraw will support only those source rectangles with the x-axis aligned to the DDCAPS.dwAlignBoundarySrc boundaries of the surface.

DDCAPS_ALIGNSIZEDEST

Indicates that DirectDraw will support only those source rectangles whose x-axis size, in bytes, are DDCAPS.dwAlignSizeDest multiples.

DDCAPS_ALIGNSIZESRC

Indicates that DirectDraw will support only those source rectangles whose x-axis size, in bytes, are DDCAPS.dwAlignSizeSrc multiples.

DDCAPS_ALIGNSTRIDE

Indicates that DirectDraw will create display memory surfaces that have a stride alignment equal to the DDCAPS.dwAlignStrideAlign value.

DDCAPS_ALPHA

Indicates the display hardware supports an alpha channel during blit operations.

DDCAPS_BANKSWITCHED

Indicates the display hardware is bank switched, and is potentially very slow at random access to VRAM.

DDCAPS_BLT

Indicates that display hardware is capable of blit operations.

DDCAPS_BLTCOLORFILL

Indicates that display hardware is capable of color filling with blitter.

DDCAPS_BLTDEPTHFILL

Indicates that display hardware is capable of depth filling z-buffers with blitter.

DDCAPS_BLTFOURCC

Indicates that display hardware is capable of color space conversions during blit operations.

DDCAPS_BLTQUEUE

Indicates that display hardware is capable of asynchronous blit operations.

DDCAPS_BLTSTRETCH

Indicates that display hardware is capable of stretching during blit operations.

DDCAPS_CANBLTSYSMEM

Indicates that display hardware is capable of blitting to or from system memory.

DDCAPS_CANCLIP

Indicates that display hardware is capable of clipping with blitting.

DDCAPS_CANCLIPSTRETCHED

Indicates that display hardware is capable of clipping while stretch blitting.

DDCAPS_COLORKEY

Supports some form of color key in either overlay or blit operations. More specific color key capability information can be found in the dwCKeyCaps member.

DDCAPS_COLORKEYHWASSIST

Indicates the color key is hardware assisted.

DDCAPS_GDI

Indicates that display hardware is shared with GDI.

DDCAPS_NOHARDWARE

Indicates no hardware support.

DDCAPS_OVERLAY

Indicates that display hardware supports overlays.

DDCAPS_OVERLAYCANTCLIP

Indicates that display hardware supports overlays but cannot clip them.

DDCAPS_OVERLAYFOURCC

Indicates that overlay hardware is capable of color space conversions during overlay operations.

DDCAPS_OVERLAYSTRETCH

Indicates that overlay hardware is capable of stretching.

DDCAPS_PALETTE

Indicates that DirectDraw is capable of creating and supporting DirectDrawPalette objects for more surfaces than only the primary surface.

DDCAPS_PALETTEVSYNC

Indicates that DirectDraw is capable of updating a palette synchronized with the vertical refresh.

DDCAPS_READSCANLINE

Indicates that display hardware is capable of returning the current scan line.

DDCAPS_STEREOVIEW

Indicates that display hardware has stereo vision capabilities.

DDCAPS_VBI

Indicates that display hardware is capable of generating a vertical blank interrupt.

DDCAPS_ZBLTS

Supports the use of z-buffers with blit operations.

DDCAPS_ZOVERLAYS

Supports the use of IDirectDrawSurface::UpdateOverlayZOrder as a z-value for overlays to control their layering.

dwCaps2

Specifies more driver-specific capabilities.

DDCAPS2_CERTIFIED

Indicates that display hardware is certified.

DDCAPS2_NO2DDURING3DSCENE

Indicates that 2D operations such as IDirectDrawSurface::Blt and IDirectDrawSurface::Lock cannot be performed on any surfaces that Direct3D is using between IDirect3DDevice::BeginScene and IDirect3DDevice::EndScene method calls.

dwCKeyCaps

Color key capabilities.

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_DESTBLTYUV

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

DDCKEYCAPS_DESTOVERLAY

Supports overlaying with color keying of the replaceable bits of the destination surface being overlaid for RGB colors.

DDCKEYCAPS_DESTOVERLAYCLRSPACE

Supports a color space as the color key for the destination of RGB colors.

DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV

Supports a color space as the color key for the destination of YUV colors.

DDCKEYCAPS_DESTOVERLAYONEACTIVE

Supports only one active destination color key value for visible overlay surfaces.

DDCKEYCAPS_DESTOVERLAYYUV

Supports overlaying using color keying of the replaceable bits of the destination surface being overlaid for YUV colors.

DDCKEYCAPS_NOCOSTOVERLAY

Indicates there are no bandwidth trade-offs for using color key with an overlay.

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.

DDCKEYCAPS_SRCBLTYUV

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

DDCKEYCAPS_SRCOVERLAY

Supports overlaying using the color key for the source with this overlay surface for RGB colors.

DDCKEYCAPS_SRCOVERLAYCLRSPACE

Supports overlaying using a color space as the source color key for the overlay surface for RGB colors.

DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV

Supports overlaying using a color space as the source color key for the overlay surface for YUV colors.

DDCKEYCAPS_SRCOVERLAYONEACTIVE

Supports only one active source color key value for visible overlay surfaces.

DDCKEYCAPS_SRCOVERLAYYUV

Supports overlaying using the color key for the source with this overlay surface for YUV colors.

dwFXCaps

Specifies driver-specific stretching and effects capabilities.

DDFXCAPS_BLTARITHSTRETCHY

Uses arithmetic operations, rather than pixel-doubling techniques, to stretch and shrink surfaces during a blit operation. Occurs along the y-axis (vertically).

DDFXCAPS_BLTARITHSTRETCHYN

Uses arithmetic operations, rather than pixel-doubling techniques, to stretch and shrink surfaces during a blit operation. Occurs along the y-axis (vertically), and only works for integer stretching (´1, ´2, and so on).

DDFXCAPS_BLTMIRRORLEFTRIGHT

Supports mirroring left to right in a blit operation.

DDFXCAPS_BLTMIRRORUPDOWN

Supports mirroring top to bottom in a blit operation.

DDFXCAPS_BLTROTATION

Supports arbitrary rotation in a blit operation.

DDFXCAPS_BLTROTATION90

Supports 90 degree rotations in a blit operation.

DDFXCAPS_BLTSHRINKX

Supports arbitrary shrinking of a surface along the x-axis (horizontally). This flag is only valid for blit operations.

DDFXCAPS_BLTSHRINKXN

Supports integer shrinking (´1, ´2, and so on) of a surface along the x-axis (horizontally). This flag is only valid for blit operations.

DDFXCAPS_BLTSHRINKY

Supports arbitrary shrinking of a surface along the y-axis (vertically). This flag is only valid for blit operations.

DDFXCAPS_BLTSHRINKYN

Supports integer shrinking (´1, ´2, and so on) of a surface along the y-axis (vertically). This flag is only valid for blit operations.

DDFXCAPS_BLTSTRETCHX

Supports arbitrary stretching of a surface along the x-axis (horizontally). This flag is only valid for blit operations.

DDFXCAPS_BLTSTRETCHXN

Supports integer stretching (´1, ´2, and so on) of a surface along the x-axis (horizontally). This flag is only valid for blit operations.

DDFXCAPS_BLTSTRETCHY

Supports arbitrary stretching of a surface along the y-axis (vertically). This flag is only valid for blit operations.

DDFXCAPS_BLTSTRETCHYN

Supports integer stretching (´1, ´2, and so on) of a surface along the y-axis (vertically). This flag is only valid for blit operations.

DDFXCAPS_OVERLAYARITHSTRETCHY

Uses arithmetic operations, rather than pixel-doubling techniques, to stretch and shrink surfaces during an overlay operation. Occurs along the y-axis (vertically).

DDFXCAPS_OVERLAYARITHSTRETCHYN

Uses arithmetic operations, rather than pixel-doubling techniques, to stretch and shrink surfaces during an overlay operation. Occurs along the y-axis (vertically), and only works for integer stretching (´1, ´2, and so on).

DDFXCAPS_OVERLAYMIRRORLEFTRIGHT

Supports mirroring of overlays around the vertical axis.

DDFXCAPS_OVERLAYMIRRORUPDOWN

Supports mirroring of overlays across the horizontal axis.

DDFXCAPS_OVERLAYSHRINKX

Supports arbitrary shrinking of a surface along the x-axis (horizontally). This flag is only valid for DDSCAPS_OVERLAY surfaces. This flag only indicates the capabilities of a surface; it does not indicate that shrinking is available.

DDFXCAPS_OVERLAYSHRINKXN

Supports integer shrinking (´1, ´2, and so on) of a surface along the x-axis (horizontally). This flag is only valid for DDSCAPS_OVERLAY surfaces. This flag only indicates the capabilities of a surface; it does not indicate that shrinking is available.

DDFXCAPS_OVERLAYSHRINKY

Supports arbitrary shrinking of a surface along the y-axis (vertically). This flag is only valid for DDSCAPS_OVERLAY surfaces. This flag only indicates the capabilities of a surface; it does not indicate that shrinking is available.

DDFXCAPS_OVERLAYSHRINKYN

Supports integer shrinking (x1, x2, and so on) of a surface along the y-axis (vertically). This flag is only valid for DDSCAPS_OVERLAY surfaces. This flag only indicates the capabilities of a surface; it does not indicate that shrinking is available.

DDFXCAPS_OVERLAYSTRETCHX

Supports arbitrary stretching of a surface along the x-axis (horizontally). This flag is only valid for DDSCAPS_OVERLAY surfaces. This flag only indicates the capabilities of a surface; it does not indicate that stretching is available.

DDFXCAPS_OVERLAYSTRETCHXN

Supports integer stretching (x1, x2, and so on) of a surface along the x-axis (horizontally). This flag is only valid for DDSCAPS_OVERLAY surfaces. This flag only indicates the capabilities of a surface; it does not indicate that stretching is available.

DDFXCAPS_OVERLAYSTRETCHY

Supports arbitrary stretching of a surface along the y-axis (vertically). This flag is only valid for DDSCAPS_OVERLAY surfaces. This flag only indicates the capabilities of a surface; it does not indicate that stretching is available.

DDFXCAPS_OVERLAYSTRETCHYN

Supports integer stretching (x1, x2, and so on) of a surface along the y-axis (vertically). This flag is only valid for DDSCAPS_OVERLAY surfaces. This flag only indicates the capabilities of a surface; it does not indicate that stretching is available.

dwFXAlphaCaps

Specifies driver-specific alpha capabilities.

DDFXALPHACAPS_BLTALPHAEDGEBLEND

Supports alpha blending around the edge of a source color keyed surface. Used for blit operations.

DDFXALPHACAPS_BLTALPHAPIXELS

Supports alpha information in pixel format. The bit depth of alpha information in the pixel format can be 1, 2, 4, or 8. The alpha value becomes more opaque as the alpha value increases. Regardless of the depth of the alpha information, 0 is always the fully transparent value. Used for blit operations.

DDFXALPHACAPS_BLTALPHAPIXELSNEG

Supports alpha information in pixel format. The bit depth of alpha information in the pixel format can be 1, 2, 4, or 8. The alpha value becomes more transparent as the alpha value increases. Regardless of the depth of the alpha information, 0 is always the fully opaque value. This flag can only be set if DDCAPS_ALPHA is set. Used for blit operations.

DDFXALPHACAPS_BLTALPHASURFACES

Supports alpha-only surfaces. The bit depth of an alpha-only surface can be 1, 2, 4, or 8. The alpha value becomes more opaque as the alpha value increases. Regardless of the depth of the alpha information, 0 is always the fully transparent value. Used for blit operations.

DDFXALPHACAPS_BLTALPHASURFACESNEG

Indicates the depth of the alpha channel data can be 1, 2, 4, or 8. The NEG suffix indicates this alpha channel becomes more transparent as the alpha value increases. Regardless of the depth of the alpha information, 0 is always the fully opaque value. This flag can only be set if DDFXCAPS_ALPHASURFACES has been set. Used for blit operations.

DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND

Supports alpha blending around the edge of a source color keyed surface. Used for overlays.

DDFXALPHACAPS_OVERLAYALPHAPIXELS

Supports alpha information in pixel format. The bit depth of alpha information in pixel format can be 1, 2, 4, or 8. The alpha value becomes more opaque as the alpha value increases. Regardless of the depth of the alpha information, 0 is always the fully transparent value. Used for overlays.

DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG

Supports alpha information in pixel format. The bit depth of alpha information in pixel format can be 1, 2, 4, or 8. The alpha value becomes more transparent as the alpha value increases. Regardless of the depth of the alpha information, 0 is always the fully opaque value. This flag can only be set if DDFXCAPS_ALPHAPIXELS has been set. Used for overlays.

DDFXALPHACAPS_OVERLAYALPHASURFACES

Supports alpha-only surfaces. The bit depth of an alpha-only surface can be 1, 2, 4, or 8. The alpha value becomes more opaque as the alpha value increases. Regardless of the depth of the alpha information, 0 is always the fully transparent value. Used for overlays.

DDFXALPHACAPS_OVERLAYALPHASURFACESNEG

Indicates the depth of the alpha channel data can be 1, 2, 4, or 8. The NEG suffix indicates this alpha channel becomes more transparent as the alpha value increases. Regardless of the depth of the alpha information, 0 is always the fully opaque value. This flag can only be set if DDFXCAPS_ALPHASURFACES has been set. Used for overlays.

dwPalCaps

Specifies palette capabilities.

DDPCAPS_1BIT

The index is 1 bit. There are two entries in the palette table.

DDPCAPS_2BIT

The index is 2 bits. There are four entries in the palette table.

DDPCAPS_4BIT

The index is 4 bits. There are sixteen entries in the palette table.

DDPCAPS_8BIT

The index is 8 bits. There are 256 entries in the palette table.

DDPCAPS_8BITENTRIES

An index to an 8-bit color index. This field is only valid when used with the DDPCAPS_1BIT, DDPCAPS_2BIT, or DDPCAPS_4BIT capability and when the target surface is in 8 bits per pixel (bpp). Each color entry is one byte long and is an index to an 8-bpp palette on the destination surface.

DDPCAPS_ALLOW256

Indicates this palette can have all 256 entries defined.

DDPCAPS_PRIMARYSURFACE

Indicates the palette is attached to the primary surface. Changing this table has an immediate effect on the display unless the DDPCAPS_VSYNC capability is specified and supported.

DDPCAPS_PRIMARYSURFACELEFT

Indicates the palette is attached to the primary surface on the left. Changing this table has an immediate effect on the display unless the DDPCAPS_VSYNC capability is specified and supported.

DDPCAPS_VSYNC

Indicates the palette can be modified synchronously with the monitor's refresh rate.

dwSVCaps

Specifies stereo vision capabilities.

DDSVCAPS_ENIGMA

Indicates the stereo view is accomplished using Enigma encoding.

DDSVCAPS_FLICKER

Indicates the stereo view is accomplished using high-frequency flickering.

DDSVCAPS_REDBLUE

Indicates the stereo view is accomplished using red and blue filters applied to the left and right eyes. All images must adapt their color spaces for this process.

DDSVCAPS_SPLIT

Indicates the stereo view is accomplished with split-screen technology.

dwAlphaBltConstBitDepths

DDBD_2,4,8

dwAlphaBltPixelBitDepths

DDBD_1,2,4,8

dwAlphaBltSurfaceBitDepths

DDBD_1,2,4,8

dwAlphaOverlayConstBitDepths

DDBD_2,4,8

dwAlphaOverlayPixelBitDepths

DDBD_1,2,4,8

dwAlphaOverlaySurfaceBitDepths

DDBD_1,2,4,8

dwZBufferBitDepths

DDBD_8,16,24,32

dwVidMemTotal

Total amount of display memory.

dwVidMemFree

Amount of free display memory.

dwMaxVisibleOverlays

Maximum number of visible overlays.

dwCurrVisibleOverlays

Current number of visible overlays.

dwNumFourCCCodes

Number of FourCC codes.

dwAlignBoundarySrc

Source rectangle alignment.

dwAlignSizeSrc

Source rectangle byte size.

dwAlignBoundaryDest

Destination rectangle alignment.

dwAlignSizeDest

Destination rectangle byte size.

dwAlignStrideAlign

Stride alignment.

dwRops[DD_ROP_SPACE]

Raster operations supported.

ddsCaps

Indicates a DDSCAPS structure with general capabilities.

dwMinOverlayStretch

Minimum overlay stretch factor multiplied by 1000. For example, 1.0 = 1000, 1.3 = 1300.

dwMaxOverlayStretch

Maximum overlay stretch factor multiplied by 1000. For example, 1.0 = 1000, 1.3 = 1300.

dwMinLiveVideoStretch

Minimum live video stretch factor multiplied by 1000. For example, 1.0 = 1000, 1.3 = 1300.

dwMaxLiveVideoStretch

Maximum live video stretch factor multiplied by 1000. For example, 1.0 = 1000, 1.3 = 1300.

dwMinHwCodecStretch

Minimum hardware codec stretch factor multiplied by 1000. For example 1.0 = 1000, 1.3 = 1300.

dwMaxHwCodecStretch

Maximum hardware codec stretch factor multiplied by 1000. For example, 1.0 = 1000, 1.3 = 1300.

dwReserved1,dwReserved2,dwReserved3

Reserved for future use.

dwSVBCaps

Specifies the driver-specific capabilities for system memory to display memory blits.

dwSVBCKeyCaps

Specifies the driver color key capabilities for system memory to display memory blits.

dwSVBFXCaps

Specifies the driver FX capabilities for system memory to display memory blits.

dwSVBRops[DD_ROP_SPACE]

Specifies the raster operations supported for system memory to display memory blits.

dwVSBCaps

Specifies the driver-specific capabilities for display memory to system memory blits.

dwVSBCKeyCaps

Specifies the driver color key capabilities for display memory to system memory blits.

dwVSBFXCaps

Specifies the driver FX capabilities for display memory to system memory blits.

dwVSBRops[DD_ROP_SPACE]

Supports raster operations for display memory to system memory blits.

dwSSBCaps

Specifies the driver-specific capabilities for system memory to system memory blits.

dwSSBCKeyCaps

Specifies the driver color key capabilities for system memory to system memory blits.

dwSSBCFXCaps

Specifies the driver FX capabilities for system memory to system memory blits.

dwSSBRops[DD_ROP_SPACE]

Raster operations supported for system memory to system memory blits.

dwReserved4, dwReserved5, dwReserved6

Reserved for future use.

The values for the dw...BitDepths members (dwAlphaBltConstBitDepths, dwAlphaBltPixelBitDepths, dwAlphBltSurfaceBitDepths, and so on) are:

DDBD_1 1 bit per pixel.

DDBD_2 2 bits per pixel.

DDBD_4 4 bits per pixel.

DDBD_8 8 bits per pixel.

DDBD_16 16 bits per pixel.

DDBD_24 24 bits per pixel.

DDBD_32 32 bits per pixel.