D3DDEVICEDESC7
The D3DDEVICEDESC7 structure contains a description of the current device. This structure is used to query the current device by such methods as IDirect3DDevice7::GetCaps.
This structure supersedes the D3DDEVICEDESC structure for all device interfaces later than IDirect3DDevice3.
typedef struct _D3DDeviceDesc7 {
DWORD dwDevCaps;
D3DPRIMCAPS dpcLineCaps;
D3DPRIMCAPS dpcTriCaps;
DWORD dwDeviceRenderBitDepth;
DWORD dwDeviceZBufferBitDepth;
DWORD dwMinTextureWidth, dwMinTextureHeight;
DWORD dwMaxTextureWidth, dwMaxTextureHeight;
DWORD dwMaxTextureRepeat;
DWORD dwMaxTextureAspectRatio;
DWORD dwMaxAnisotropy;
D3DVALUE dvGuardBandLeft;
D3DVALUE dvGuardBandTop;
D3DVALUE dvGuardBandRight;
D3DVALUE dvGuardBandBottom;
D3DVALUE dvExtentsAdjust;
DWORD dwStencilCaps;
DWORD dwFVFCaps;
DWORD dwTextureOpCaps;
WORD wMaxTextureBlendStages;
WORD wMaxSimultaneousTextures;
DWORD dwMaxActiveLights;
D3DVALUE dvMaxVertexW;
GUID deviceGUID;
WORD wMaxUserClipPlanes;
WORD wMaxVertexBlendMatrices;
DWORD dwVertexProcessingCaps;
DWORD dwReserved1;
DWORD dwReserved2;
DWORD dwReserved3;
DWORD dwReserved4;
} D3DDEVICEDESC7, *LPD3DDEVICEDESC7;
Members
- dwDevCaps
- Flags identifying the capabilities of the device.
- D3DDEVCAPS_CANBLTSYSTONONLOCAL
- Device supports blits from system-memory textures to nonlocal video-memory textures.
This flag was introduced with DirectX 7.0
- D3DDEVCAPS_CANRENDERAFTERFLIP
- Device can queue rendering commands after a page flip. Applications do not change their behavior if this flag is set; this capability simply means that the device is relatively fast.
This flag was introduced in DirectX 5.0.
- D3DDEVCAPS_DRAWPRIMTLVERTEX
- Device exports a DrawPrimitive-aware hardware abstraction layer (HAL).
This flag was introduced in DirectX 5.0.
- D3DDEVCAPS_EXECUTESYSTEMMEMORY
- Device can use execute buffers from system memory.
- D3DDEVCAPS_EXECUTEVIDEOMEMORY
- Device can use execute buffers from video memory.
- D3DDEVCAPS_FLOATTLVERTEX
- Device accepts floating point for post-transform vertex data.
- D3DDEVCAPS_HWRASTERIZATION
- Device has hardware acceleration for scene rasterization.
- D3DDEVCAPS_HWTRANSFORMANDLIGHT
- Device supports transformation and lighting in hardware.
This flag was introduced with DirectX 7.0.
- D3DDEVCAPS_SEPARATETEXTUREMEMORIES
- Device uses discrete texture memory pools for each stage. Textures must be assigned to texture stages explicitly at the time of creation by setting the dwTextureStage member of the DDSURFACEDESC2 structure to the appropriate stage identifier.
- D3DDEVCAPS_SORTDECREASINGZ
- Device needs data sorted for decreasing depth.
- D3DDEVCAPS_SORTEXACT
- Device needs data sorted exactly.
- D3DDEVCAPS_SORTINCREASINGZ
- Device needs data sorted for increasing depth.
- D3DDEVCAPS_STRIDEDVERTICES
- Device supports strided vertex data for transformation and lighting in hardware.
This flag was introduced with DirectX 7.0
- D3DDEVCAPS_TEXTURENONLOCALVIDMEM
- Device can retrieve textures from nonlocal video (AGP) memory.
This flag was introduced in DirectX 5.0. For more information about AGP memory, see Using Non-local Video Memory Surfaces in the DirectDraw documentation.
- D3DDEVCAPS_TEXTURESYSTEMMEMORY
- Device can retrieve textures from system memory.
- D3DDEVCAPS_TEXTUREVIDEOMEMORY
- Device can retrieve textures from device memory.
- D3DDEVCAPS_TLVERTEXSYSTEMMEMORY
- Device can use buffers from system memory for transformed and lit vertices.
- D3DDEVCAPS_TLVERTEXVIDEOMEMORY
- Device can use buffers from video memory for transformed and lit vertices.
- dpcLineCaps and dpcTriCaps
- D3DPRIMCAPS structures defining the device's support for line-drawing and triangle primitives.
- dwDeviceRenderBitDepth
- Device's rendering bit depth. This can be one or more of the following DirectDraw bit-depth constants: DDBD_8, DDBD_16, DDBD_24, or DDBD_32.
- dwDeviceZBufferBitDepth
- Bit depth of the device's depth-buffer. This can be one of the following DirectDraw bit-depth constants: DDBD_8, DDBD_16, DDBD_24, or DDBD_32.
- dwMinTextureWidth, dwMinTextureHeight
- Minimum texture width and height for this device.
- dwMaxTextureWidth, dwMaxTextureHeight
- Maximum texture width and height for this device.
- dwMaxTextureRepeat
- Full range of the integer bits of the post-normalized texture indices. If the D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE bit is set, the device defers scaling by the texture size until after the texture address mode is applied. If not set, the device scales the texture indices by the texture size (largest level of detail) prior to interpolation.
- dwMaxTextureAspectRatio
- Maximum texture aspect ratio supported by the hardware; this is typically a power of 2.
- dwMaxAnisotropy
- Maximum valid value for the D3DTSS_MAXANISOTROPY texture-stage state.
- dvGuardBandLeft, dvGuardBandTop, dvGuardBandRight, and dvGuardBandBottom
- The screen-space coordinates of the guard-band clipping region. Coordinates inside this rectangle but outside the viewport rectangle are automatically clipped.
- dvExtentsAdjust
- Number of pixels to adjust the extents rectangle outward to accommodate antialiasing kernels.
- dwStencilCaps
- Flags specifying supported stencil-buffer operations. Stencil operations are assumed to be valid for all three stencil-buffer operation render states (D3DRENDERSTATE_STENCILFAIL, D3DRENDERSTATE_STENCILPASS, and D3DRENDERSTATE_STENCILFAILZFAIL).
- D3DSTENCILCAPS_DECR
- The D3DSTENCILOP_DECR operation is supported.
- D3DSTENCILCAPS_DECRSAT
- The D3DSTENCILOP_DECRSAT operation is supported.
- D3DSTENCILCAPS_INCR
- The D3DSTENCILOP_INCR operation is supported.
- D3DSTENCILCAPS_INCRSAT
- The D3DSTENCILOP_INCRSAT operation is supported.
- D3DSTENCILCAPS_INVERT
- The D3DSTENCILOP_INVERT operation is supported.
- D3DSTENCILCAPS_KEEP
- The D3DSTENCILOP_KEEP operation is supported.
- D3DSTENCILCAPS_REPLACE
- The D3DSTENCILOP_REPLACE operation is supported.
- D3DSTENCILCAPS_ZERO
- The D3DSTENCILOP_ZERO operation is supported.
- dwFVFCaps
- Flexible vertex format capabilities:
- D3DFVFCAPS_DONOTSTRIPELEMENTS
- It is preferable that vertex elements not be stripped. That is, if the vertex format contains elements that are not used with the current render states, there is no need to regenerate the vertices. If this capability flag is not present, stripping extraneous elements from the vertex format provides better performance.
- D3DFVFCAPS_TEXCOORDCOUNTMASK
- Masks the low WORD of dwFVFCaps. These bits, cast to the WORD data type, describe the total number of texture coordinate sets that the device can simultaneously use for multiple texture blending. (You can use up to eight texture coordinate sets for any vertex, but the device can only blend using the specified number of texture coordinate sets.)
- dwTextureOpCaps
- Combination of flags describing the texture operations supported by this device. The following flags are defined:
- D3DTEXOPCAPS_ADD
- The D3DTOP_ADD texture-blending operation is supported.
- D3DTEXOPCAPS_ADDSIGNED
- The D3DTOP_ADDSIGNED texture-blending operation is supported.
- D3DTEXOPCAPS_ADDSIGNED2X
- The D3DTOP_ADDSIGNED2X texture-blending operation is supported.
- D3DTEXOPCAPS_ADDSMOOTH
- The D3DTOP_ADDSMOOTH texture-blending operation is supported.
- D3DTEXOPCAPS_BLENDCURRENTALPHA
- The D3DTOP_BLENDCURRENTALPHA texture-blending operation is supported.
- D3DTEXOPCAPS_BLENDDIFFUSEALPHA
- The D3DTOP_BLENDDIFFUSEALPHA texture-blending operation is supported.
- D3DTEXOPCAPS_BLENDFACTORALPHA
- The D3DTOP_BLENDFACTORALPHA texture-blending operation is supported.
- D3DTEXOPCAPS_BLENDTEXTUREALPHA
- The D3DTOP_BLENDTEXTUREALPHA texture-blending operation is supported.
- D3DTEXOPCAPS_BLENDTEXTUREALPHAPM
- The D3DTOP_BLENDTEXTUREALPHAPM texture-blending operation is supported.
- D3DTEXOPCAPS_BUMPENVMAP
- The D3DTOP_BUMPENVMAP texture-blending operation is supported.
- D3DTEXOPCAPS_BUMPENVMAPLUMINANCE
- The D3DTOP_BUMPENVMAPLUMINANCE texture-blending operation is supported.
- D3DTEXOPCAPS_DISABLE
- The D3DTOP_DISABLE texture-blending operation is supported.
- D3DTEXOPCAPS_DOTPRODUCT3
- The D3DTOP_DOTPRODUCT3 texture-blending operation is supported.
- D3DTEXOPCAPS_MODULATE
- The D3DTOP_MODULATE texture-blending operation is supported.
- D3DTEXOPCAPS_MODULATE2X
- The D3DTOP_MODULATE2X texture-blending operation is supported.
- D3DTEXOPCAPS_MODULATE4X
- The D3DTOP_MODULATE4X texture-blending operation is supported.
- D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR
- The D3DTOP_MODULATEALPHA_ADDCOLOR texture-blending operation is supported.
- D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA
- The D3DTOP_MODULATECOLOR_ADDALPHA texture-blending operation is supported.
- D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR
- The D3DTOP_MODULATEINVALPHA_ADDCOLOR texture-blending operation is supported.
- D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA
- The D3DTOP_MODULATEINVCOLOR_ADDALPHA texture-blending operation is supported.
- D3DTEXOPCAPS_PREMODULATE
- The D3DTOP_PREMODULATE texture-blending operation is supported.
- D3DTEXOPCAPS_SELECTARG1
- The D3DTOP_SELECTARG1 texture-blending operation is supported.
- D3DTEXOPCAPS_SELECTARG2
- The D3DTOP_SELECTARG2 texture-blending operation is supported.
- D3DTEXOPCAPS_SUBTRACT
- The D3DTOP_SUBTRACT texture-blending operation is supported.
- wMaxTextureBlendStages
- Maximum number of texture-blending stages supported.
- wMaxSimultaneousTextures
- Maximum number of textures that can be simultaneously bound to the texture blending stages. See remarks.
- dwMaxActiveLights
- Maximum number of lights that can be active simultaneously.
- dvMaxVertexW
- Maximum W-based depth value that the device supports.
- deviceGUID
- Globally unique identifier (GUID) of this device: IID_IDirect3DHALDevice, IID_IDirect3DTnLHalDevice, or IID_IDirect3DRGBDevice.
- wMaxUserClipPlanes
- Maximum number of user-defined clipping planes supported. This member can range from 0 through D3DMAXUSERCLIPPLANES.
User-defined clipping planes are manipulated by using the IDirect3DDevice7::GetClipPlane and IDirect3DDevice7::SetClipPlane methods.
- wMaxVertexBlendMatrices
- Maximum number of matrices that this device can apply when performing multimatrix vertex blending.
- dwVertexProcessingCaps
- Vertex processing capabilities.
- D3DVTXPCAPS_TEXGEN
- Device can generate texture coordinates.
- D3DVTXPCAPS_MATERIALSOURCE7
- Device supports selectable vertex color sources. For more information, see Light Color Types and Sources.
- D3DVTXPCAPS_VERTEXFOG
- Device supports vertex fog.
- D3DVTXPCAPS_DIRECTIONALLIGHTS
- Device supports directional lights.
- D3DVTXPCAPS_POSITIONALLIGHTS
- Device supports positional lights (including point lights and spotlights).
- D3DVTXPCAPS_NONLOCALVIEWER
- Device supports orthogonal specular highlights, enabled by setting the D3DRENDERSTATE_LOCALVIEWER render state to FALSE.
- dwReserved1 through dwReserved4
- Reserved.
Remarks
The wMaxTextureBlendStages and wMaxSimultaneousTextures members might seem very similar, but they contain different information. The wMaxTextureBlendStages member contains the total number of texture-blending stages supported by the current device, and the wMaxSimultaneousTextures member describes how many of those stages can have textures bound to them by using the IDirect3DDevice7::SetTexture method.
When the driver fills this structure, it can set values for execute-buffer capabilities, even when the interface being used to retrieve the capabilities (such as IDirect3DDevice7) does not support execute buffers.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Version: Requires DirectX 7.0.
Header: Declared in d3dcaps.h.
See Also
D3DCOLORMODEL, D3DLIGHTINGCAPS, D3DPRIMCAPS