D3DDEVICEDESC
The D3DDEVICEDESC structure contains a description of the current device. This structure is used to query the current device by such methods as IDirect3DDevice3::GetCaps.
typedef struct _D3DDeviceDesc {
DWORD dwSize;
DWORD dwFlags;
D3DCOLORMODEL dcmColorModel;
DWORD dwDevCaps;
D3DTRANSFORMCAPS dtcTransformCaps;
BOOL bClipping;
D3DLIGHTINGCAPS dlcLightingCaps;
D3DPRIMCAPS dpcLineCaps;
D3DPRIMCAPS dpcTriCaps;
DWORD dwDeviceRenderBitDepth;
DWORD dwDeviceZBufferBitDepth;
DWORD dwMaxBufferSize;
DWORD dwMaxVertexCount;
DWORD dwMinTextureWidth, dwMinTextureHeight;
DWORD dwMaxTextureWidth, dwMaxTextureHeight;
DWORD dwMinStippleWidth, dwMaxStippleWidth;
DWORD dwMinStippleHeight, dwMaxStippleHeight;
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;
} D3DDEVICEDESC, *LPD3DDEVICEDESC;
Members
- dwSize
- Size, in bytes, of this structure. You can use the D3DDEVICEDESCSIZE constant for this value. This member must be initialized before the structure is used.
- dwFlags
- Flags identifying the members of this structure that contain valid data.
- D3DDD_BCLIPPING
- The bClipping member is valid.
- D3DDD_COLORMODEL
- The dcmColorModel member is valid.
- D3DDD_DEVCAPS
- The dwDevCaps member is valid.
- D3DDD_DEVICERENDERBITDEPTH
- The dwDeviceRenderBitDepth member is valid.
- D3DDD_DEVICEZBUFFERBITDEPTH
- The dwDeviceZBufferBitDepth member is valid.
- D3DDD_LIGHTINGCAPS
- The dlcLightingCaps member is valid.
- D3DDD_LINECAPS
- The dpcLineCaps member is valid.
- D3DDD_MAXBUFFERSIZE
- The dwMaxBufferSize member is valid.
- D3DDD_MAXVERTEXCOUNT
- The dwMaxVertexCount member is valid.
- D3DDD_TRANSFORMCAPS
- The dtcTransformCaps member is valid.
- D3DDD_TRICAPS
- The dpcTriCaps member is valid.
- dcmColorModel
- One of the values of the D3DCOLORMODEL data type, specifying the color model for the device.
- dwDevCaps
- Flags identifying the capabilities of the device.
- D3DDEVCAPS_CANRENDERAFTERFLIP
- Device can queue rendering commands after a page flip. Applications should 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 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 buffer from video memory.
- D3DDEVCAPS_FLOATTLVERTEX
- Device accepts floating point for post-transform vertex data.
- D3DDEVCAPS_SEPARATETEXTUREMEMORIES
- Device uses discrete texture memory pools for each stage. Textures must be assigned to texture stages explicitly at creation-time 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_TEXREPEATNOTSCALEDBYSIZE
- Device defers scaling of texture indices by the texture size until after the texture address mode is applied.
- D3DDEVCAPS_TEXTURENONLOCALVIDMEM
- Device can retrieve textures from non-local 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.
- dtcTransformCaps
- One of the members of the D3DTRANSFORMCAPS structure, specifying the transformation capabilities of the device.
- bClipping
- TRUE if the device can perform 3-D clipping.
- dlcLightingCaps
- One of the members of the D3DLIGHTINGCAPS structure, specifying the lighting capabilities of the device.
- 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
- Device's depth-buffer bit-depth. This can be one of the following DirectDraw bit-depth constants: DDBD_8, DDBD_16, DDBD_24, or DDBD_32.
- dwMaxBufferSize
- Maximum size of the execute buffer for this device. If this member is 0, the application can use any size.
- dwMaxVertexCount
- Maximum number of vertices supported by an execute buffer for this device. (The DrawPrimitive rendering methods support up to 65,536 vertices.)
- dwMinTextureWidth, dwMinTextureHeight
- Minimum texture width and height for this device.
- dwMaxTextureWidth, dwMaxTextureHeight
- Maximum texture width and height for this device.
- dwMinStippleWidth, dwMaxStippleWidth
- Minimum and maximum width of the stipple pattern for this device.
- dwMinStippleHeight, dwMaxStippleHeight
- Minimum and maximum height of the stipple pattern for this device.
- dwMaxTextureRepeat
- Full range of the integer (non-fractional) bits of the post-normalized texture indices. If the D3DDEVCAPS_TEXREPEATNOTSCALEDBYSIZE bit is set, the device defers scaling by the texture size until after the texture address mode is applied. If it isn't 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 will typically be a power of 2.
- dwMaxAnisotropy
- Maximum valid value for the D3DRENDERSTATE_ANISOTROPY render 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 will automatically be 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
- Device prefers that vertex elements not be stripped. That is, if the vertex format contains elements that will not be 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 will provide 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 by this device.
- D3DTEXOPCAPS_ADDSIGNED
- The D3DTOP_ADDSIGNED texture blending operation is supported by this device.
- D3DTEXOPCAPS_ADDSIGNED2X
- The D3DTOP_ADDSIGNED2X texture blending operation is supported by this device.
- D3DTEXOPCAPS_ADDSMOOTH
- The D3DTOP_ADDSMOOTH texture blending operation is supported by this device.
- D3DTEXOPCAPS_BLENDCURRENTALPHA
- The D3DTOP_BLENDCURRENTALPHA texture blending operation is supported by this device.
- D3DTEXOPCAPS_BLENDDIFFUSEALPHA
- The D3DTOP_BLENDDIFFUSEALPHA texture blending operation is supported by this device.
- D3DTEXOPCAPS_BLENDFACTORALPHA
- The D3DTOP_BLENDFACTORALPHA texture blending operation is supported by this device.
- D3DTEXOPCAPS_BLENDTEXTUREALPHA
- The D3DTOP_BLENDTEXTUREALPHA texture blending operation is supported by this device.
- D3DTEXOPCAPS_BLENDTEXTUREALPHAPM
- The D3DTOP_BLENDTEXTUREALPHAPM texture blending operation is supported by this device.
- D3DTEXOPCAPS_BUMPENVMAP
- The D3DTOP_BUMPENVMAP texture blending operation is supported by this device.
- D3DTEXOPCAPS_BUMPENVMAPLUMINANCE
- The D3DTOP_BUMPENVMAPLUMINANCE texture blending operation is supported by this device.
- D3DTEXOPCAPS_DISABLE
- The D3DTOP_DISABLE texture blending operation is supported by this device.
- D3DTEXOPCAPS_DOTPRODUCT3
- The D3DTOP_DOTPRODUCT3 texture blending operation is supported by this device.
- D3DTEXOPCAPS_MODULATE
- The D3DTOP_MODULATE texture blending operation is supported by this device.
- D3DTEXOPCAPS_MODULATE2X
- The D3DTOP_MODULATE2X texture blending operation is supported by this device.
- D3DTEXOPCAPS_MODULATE4X
- The D3DTOP_MODULATE4X texture blending operation is supported by this device.
- D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR
- The D3DTOP_MODULATEALPHA_ADDCOLOR texture blending operation is supported by this device.
- D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA
- The D3DTOP_MODULATEALPHA_ADDCOLOR texture blending operation is supported by this device.
- D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR
- The D3DTOP_MODULATEINVALPHA_ADDCOLOR texture blending operation is supported by this device.
- D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA
- The D3DTOP_MODULATEINVCOLOR_ADDALPHA texture blending operation is supported by this device.
- D3DTEXOPCAPS_PREMODULATE
- The D3DTOP_PREMODULATE texture blending operation is supported by this device.
- D3DTEXOPCAPS_SELECTARG1
- The D3DTOP_SELECTARG1 texture blending operation is supported by this device.
- D3DTEXOPCAPS_SELECTARG2
- The D3DTOP_SELECTARG2 texture blending operation is supported by this device.
- D3DTEXOPCAPS_SUBTRACT
- The D3DTOP_SUBTRACT texture blending operation is supported by this device.
- wMaxTextureBlendStages
- Maximum number of texture blending stages supported by this device.
- wMaxSimultaneousTextures
- Maximum number of textures that can be simultaneously bound to the texture blending stages for this device. See remarks.
Remarks
The wMaxTextureBlendStages and wMaxSimultaneousTextures members might seem very similar at first glance, 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 IDirect3DDevice3::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 IDirect3DDevice3) doesn't support execute buffers.
Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in d3dcaps.h.
See Also
D3DCOLORMODEL, D3DFINDDEVICERESULT, D3DLIGHTINGCAPS, D3DPRIMCAPS, D3DTRANSFORMCAPS