Microsoft DirectX 9.0 |
This structure represents the capabilities of the hardware exposed through the DirectDraw object. It contains a DDSCAPS structure which is 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.
typedef struct _DDCAPS{
WORD 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;
} DDCAPS,FAR* LPDDCAPS;
Members
dwSize
Size of structure. Must be initialized before use.
dwCaps
Driver-specific capabilities.
Flag | Description |
DDCAPS_3D | Display hardware has 3D acceleration. |
DDCAPS_ALIGNBOUNDARYDEST | Indicates that DirectDraw will support only source rectangles whose x-axis is aligned on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively. |
DDCAPS_ALIGNSIZEDEST | Indicates that DirectDraw will support only source rectangles whose x-axis size in BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. |
DDCAPS_ALIGNBOUNDARYSRC | Indicates that DirectDraw will support only source rectangles whose x-axis is aligned on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively. |
DDCAPS_ALIGNSIZESRC | Indicates that DirectDraw will support only source rectangles whose x-axis size in BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. |
DDCAPS_ALIGNSTRIDE | Indicates that DirectDraw will create video memory surfaces that have a stride alignment equal to DIRECTDRAWCAPS.dwAlignStrideAlign. |
DDCAPS_BANKSWITCHED | Display hardware is bank switched, and potentially very slow at random access to VRAM. |
DDCAPS_BLT | Display hardware is capable of blit operations. |
DDCAPS_BLTCOLORFILL | Display hardware is capable of color fill with bltter. |
DDCAPS_BLTQUEUE | Display hardware is capable of asynchronous blit operations. |
DDCAPS_BLTFOURCC | Display hardware is capable of color space conversions during the blit operations. |
DDCAPS_BLTSTRETCH | Display hardware is capable of stretching during blit operations. |
DDCAPS_GDI | Display hardware is shared with GDI. |
DDCAPS_OVERLAY | Display hardware can overlay. |
DDCAPS_OVERLAYCANTCLIP | Hardware can overlay but can't clip. |
DDCAPS_OVERLAYFOURCC | Indicates that overlay hardware is capable of color space conversions during the overlay operation. |
DDCAPS_OVERLAYSTRETCH | Stretching can be done by the overlay hardware. |
DDCAPS_PALETTE | Indicates that DirectDraw is capable of creating and supporting DirectDrawPalette objects for more than the primary surface. |
DDCAPS_PALETTECANVSYNC | Indicates that DirectDraw is capable of updating the palette in sync with the vertical refresh. |
DDCAPS_READSCANLINE | Display hardware can return the current scan line. |
DDCAPS_STEREOVIEW | Display hardware has stereo vision capabilities. DDSCAPS_PRIMARYSURFACELEFT can be created. |
DDCAPS_VBI | 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 OverlayZOrder as a z value for overlays to control their layering. |
DDCAPS_COLORKEY | Obsolete flag that represents color key capabilities in either overlay hardware or blit hardware. Will be replaced with DDCAPS_OVERLAYCOLORKEY and DDCAPS_BLTCOLORKEY. |
DDCAPS_ALPHA | Display hardware supports alpha channel during blit operations. |
DDCAPS_COLORKEY_HWASSIST | Color key is hardware assisted. |
DDCAPS_NOHARDWARE | No hardware support at all. |
D
dwCaps2
More driver-specific capabilities.
Flag | Description |
DDCAPS2_CERTIFIED | Display hardware is certified. |
dwCKeyCaps
Color key capabilities.
Flag | Description |
DDCKEYCAPS_DESTBLT | Supports transparent blitting using a color key to identify the replaceable bits of the destination surface for RGB colors. |
DDCKEYCAPS_DESTBLTCLRSPACE | Supports transparent blitting using a color space to identify the replaceable bits of the destination surface for RGB colors. |
DDCKEYCAPS_DESTBLTCLRSPACEYUV | Supports transparent blitting using a color space to identify the replaceable bits of the destination surface for YUV colors. |
DDCKEYCAPS_DESTBLTYUV | Supports transparent blitting using a color key to identify the replaceable bits of the destination surface for YUV colors. |
DDCKEYCAPS_DESTOVERLAY | Supports overlaying using color keying of the replaceable bits of the surface being overlayed for RGB colors. |
DDCKEYCAPS_DESTOVERLAYCLRSPACE | Supports a color space as the color key for the destination for RGB colors. |
DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV | Supports a color space as the color key for the destination for 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 surface being overlayed 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. |
DDCKEYCAPS_SRCBLTYUV | Supports transparent blitting using the color key for the source with this surface for YUV colors. |
DDCKEYCAPS_SRCOVERLAY | Supports overlays using the color key for the source with this overlay surface for RGB colors. |
DDCKEYCAPS_SRCOVERLAYCLRSPACE | Supports overlays using a color space as the source color key for the overlay surface for RGB colors. |
DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV | Supports overlays 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 overlays using the color key for the source with this overlay surface for YUV colors. |
dwFXCaps
Driver-specific stretching and effects capabilities.
Flag | Description |
DDFXCAPS_BLTARITHSTRETCHY | Uses arithmetic operations to stretch and shrink surfaces during blit rather than pixel-doubling techniques. Along the y axis. |
DDFXCAPS_BLTARITHSTRETCHYN | Uses arithmetic operations to stretch and shrink surfaces during blit rather than pixel-doubling techniques. Along the y axis. Only works for x1, x2, and so on. |
DDFXCAPS_BLTMIRRORLEFTRIGHT | Supports mirroring left to right in blit. |
DDFXCAPS_BLTMIRRORUPDOWN | Supports mirroring top to bottom in blit. |
DDFXCAPS_BLTROTATION | Supports arbitrary rotation. |
DDFXCAPS_BLTROTATION90 | Supports 90 degree rotations. |
DDFXCAPS_BLTSHRINKX | Supports arbitrary shrinking of a surface along the x-axis (horizontal direction). This flag is only valid for blit operations. |
DDFXCAPS_BLTSHRINKXN | Supports integer shrinking (1x,2x,) of a surface along the x-axis (horizontal direction). This flag is only valid for blit operations. |
DDFXCAPS_BLTSHRINKY | Supports arbitrary shrinking of a surface along the y axis (vertical direction). This flag is only valid for blit operations. |
DDFXCAPS_BLTSHRINKYN | Supports integer shrinking (1x,2x,) of a surface along the y axis (vertical direction). This flag is only valid for blit operations. |
DDFXCAPS_BLTSTRETCHX | Supports arbitrary stretching of a surface along the x-axis (horizontal direction). This flag is only valid for blit operations. |
DDFXCAPS_BLTSTRETCHXN | Supports integer stretching (1x,2x,) of a surface along the x-axis (horizontal direction). This flag is only valid for blit operations. |
DDFXCAPS_BLTSTRETCHY | Supports arbitrary stretching of a surface along the y axis (vertical direction). This flag is only valid for blit operations. |
DDFXCAPS_BLTSTRETCHYN | Supports integer stretching (1x,2x,) of a surface along the y axis (vertical direction). This flag is only valid for blit operations. |
DDFXCAPS_OVERLAYARITHSTRETCHY | Uses arithmetic operations to stretch and shrink surfaces during overlay rather than pixel-doubling techniques. Along the y axis. |
DDFXCAPS_OVERLAYARITHSTRETCHYN | Uses arithmetic operations to stretch and shrink surfaces during overlay rather than pixel-doubling techniques. Along the y axis. Only works for x1, x2, and so on. |
DDFXCAPS_OVERLAYSHRINKX | Supports arbitrary shrinking of a surface along the x-axis (horizontal direction). 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 (1x,2x,) of a surface along the x-axis (horizontal direction). 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 (vertical direction). 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 (1x,2x,) of a surface along the y axis (vertical direction). 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 (horizontal direction). 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 (1x,2x,) of a surface along the x-axis (horizontal direction). 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 (vertical direction). 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 (1x,2x,) of a surface along the y axis (vertical direction). 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_OVERLAYMIRRORLEFTRIGHT | Supports mirroring of overlays across the vertical axis. |
DDFXCAPS_OVERLAYMIRRORUPDOWN | Supports mirroring of overlays across the horizontal axis. |
DDFXCAPS_BLTARITHSTRETCHY | Uses arithmetic operations to stretch and shrink surfaces during blit rather than pixel-doubling techniques. Along the y axis. |
dwFXAlphaCaps
Driver specific alpha capabilities.
Flag | Description |
DDFXALPHACAPS_BLTALPHAEDGEBLEND | Supports alpha blending around the edge of a source color-keyed surface. For Blt. |
DDFXALPHACAPS_BLTALPHAPIXELS | Supports alpha information in the 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. (0 is transparent.) For Blt. |
DDFXALPHACAPS_BLTALPHAPIXELSNEG | Supports alpha information in the 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. (0 is opaque.) This flag can only be set if DDCAPS_ALPHA is set. For Blt. |
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. (0 is transparent.) For Blt. |
DDFXALPHACAPS_BLTALPHASURFACESNEG | The depth of the alpha channel data can range can be 1,2,4, or 8. The NEG suffix indicates that this alpha channel becomes more transparent as the alpha value increases. (0 is opaque.) This flag can only be set if DDFXCAPS_ALPHASURFACES is set. For Blt. |
DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND | Supports alpha blending around the edge of a source color keyed surface. For Overlays. |
DDFXALPHACAPS_OVERLAYALPHAPIXELS | Supports alpha information in the 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. (0 is transparent.) For Overlays. |
DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG | Supports alpha information in the 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. (0 is opaque.) This flag can only be set if DDFXCAPS_ALPHAPIXELS is set. 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. (0 is transparent.) For Overlays. |
DDFXALPHACAPS_OVERLAYALPHASURFACESNEG | The depth of the alpha channel data can range can be 1,2,4, or 8. The NEG suffix indicates that this alpha channel becomes more transparent as the alpha value increases. (0 is opaque.) This flag can only be set if DDFXCAPS_ALPHASURFACES is set. For Overlays. |
dwPalCaps
Palette capabilities.
Flag | Description |
DDPCAPS_4BIT | Index is 4 bits. There are sixteen color entries in the palette table. |
DDPCAPS_8BITENTRIES | Index is onto an 8-bit color index. This member is only valid with the DDPCAPS_4BIT capability and the target surface is in 8bpp. Each color entry is one byte long and is an index into destination surface's 8bpp palette. |
DDPCAPS_8BIT | Index is 8 bits. There are 256 color entries in the palette table. |
DDPCAPS_ALLOW256 | This palette can have all 256 entries defined. |
DDPCAPS_INITIALIZE | Indicates that this DirectDrawPalette should use the palette color array passed into the lpDDColorArray parameter to initialize the DirectDrawPalette object. |
DDPCAPS_PRIMARYSURFACE | This palette is the one attached to the primary surface. |
DDPCAPS_PRIMARYSURFACELEFT | This palette is the one attached to the primary surface left. Changing this table has immediate effect on the display unless DDPAL_VSYNC is specified and supported. |
DDPCAPS_VSYNC | This palette can have modifications to it synced with the monitor's refresh rate. |
dwSVCaps
Stereo vision capabilities.
Flag | Description |
DDSVCAPS_ENIGMA | The stereo view is accomplished via Enigma encoding. |
DDSVCAPS_FLICKER | The stereo view is accomplished via high frequency flickering. |
DDSVCAPS_REDBLUE | The stereo view is accomplished via red and blue filters applied to the left and right eyes. All images must adapt their color spaces for this process. |
DDSVCAPS_SPLIT | 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 video memory.
dwVidMemFree
Amount of free video 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]
ROPS supported.
ddsCaps
DDSCAPS structure with general capabilities.
dwMinOverlayStretch
Minimum overlay stretch factor multiplied by 1000.
dwMaxOverlayStretch
Maximum overlay stretch factor multiplied by 1000.
dwMinLiveVideoStretch
Minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3.
dwMaxLiveVideoStretch
Maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3.
dwMinHwCodecStretch
Minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 = 1.3.
dwMaxHwCodecStretch;
Maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 = 1.3.
dwReserved1,dwReserved2,dwReserved3
Reserved.
dw...BitDepths
See Also