D3DCAPS8
Represents the capabilities of the hardware exposed through the Microsoft® Direct3D® object.
Type D3DCAPS8
AdapterOrdinal As Long
AlphaCmpCaps As Long
caps As Long
Caps2 As Long
Caps3 As Long
CubeTextureFilterCaps As Long
CursorCaps As Long
DestBlendCaps As Long
DevCaps As Long
DeviceType As Long
ExtentsAdjust As Single
FVFCaps As Long
GuardBandBottom As Single
GuardBandLeft As Single
GuardBandRight As Single
GuardBandTop As Single
LineCaps As Long
MaxActiveLights As Long
MaxAnisotropy As Long
MaxPixelShaderValue As Single
MaxPointSize As Single
MaxPrimitiveCount As Long
MaxSimultaneousTextures As Long
MaxStreams As Long
MaxStreamStride As Long
MaxTextureAspectRatio As Long
MaxTextureBlendStages As Long
MaxTextureHeight As Long
MaxTextureRepeat As Long
MaxTextureWidth As Long
MaxUserClipPlanes As Long
MaxVertexBlendMatrices As Long
MaxVertexBlendMatrixIndex As Long
MaxVertexIndex As Long
MaxVertexShaderConst As Long
MaxVertexW As Single
MaxVolumeExtent As Long
PixelShaderVersion As Long
PresentationIntervals As Long
PrimitiveMiscCaps As Long
RasterCaps As Long
ShadeCaps As Long
SrcBlendCaps As Long
StencilCaps As Long
TextureAddressCaps As Long
TextureCaps As Long
TextureFilterCaps As Long
TextureOpCaps As Long
VertexProcessingCaps As Long
VertexShaderVersion As Long
VolumeTextureAddressCaps As Long
VolumeTextureFilterCaps As Long
ZCmpCaps As Long
End Type
Members
- AdapterOrdinal
- Adapter on which this Direct3DDevice object was created. This ordinal is valid only to pass to methods of the Direct3D8 class that created this Direct3DDevice object. The Direct3D8 class can always be retrieved by calling Direct3DDevice8.GetDirect3D.
- AlphaCmpCaps
- Alpha-test comparison capabilities. If this member contains only the D3DPCMPCAPS_ALWAYS capability or only the D3DPCMPCAPS_NEVER capability, the driver does not support alpha tests. Otherwise, the flags defined by the CONST_D3DPCMPCAPSFLAGS enumeration identify the individual comparisons that are supported for alpha testing.
- caps
- Driver-specific capability, defined by the CONST_D3DCAPSFLAGS enumeration.
- Caps2
- Driver-specific capabilities. Possible values are defined by the CONST_D3DCAPS2FLAGS enumeration.
- Caps3
- Driver-specific capability.
- D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD
- The device will work as expected with the D3DRS_ALPHABLENDENABLE render state when a full-screen application uses D3DSWAPEFFECT_FLIP or D3DRS_SWAPEFFECT_DISCARD. D3DRS_ALPHABLENDENABLE works as expected when using D3DSWAPEFFECT_COPY and D3DSWAPEFFECT_COPYSYNC.
- CubeTextureFilterCaps
- Texture-filtering capabilities for a Direct3DCubeTexture object. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending with the Direct3DDevice8 class. This member can be any combination of the general and per-stage texture-filtering flags defined by the CONST_D3DPTFILTERCAPSFLAGS enumeration.
- CursorCaps
- Bit mask indicating what hardware support is available for cursors. Possible values are defined by the CONST_D3DCURSORCAPSFLAGS.
- DestBlendCaps
- Destination-blending capabilities. This member can be one or more of the flags defined by the CONST_D3DPBLENDCAPSFLAGS enumeration.
- DevCaps
- Flags identifying the capabilities of the device. Possible values are defined by the CONST_D3DDEVCAPSFLAGS enumeration.
- DeviceType
- Member of the CONST_D3DDEVTYPE enumeration. Denotes the amount of emulated functionality for this device. The value of this parameter mirrors the value passed to the Direct3D8.CreateDevice call that created this device.
- ExtentsAdjust
- Number of pixels to adjust the extents rectangle outward to accommodate antialiasing kernels.
- FVFCaps
- Flexible vertex format capabilities. Possible values are defined by the CONST_D3DFVFCAPSFLAGS enumeration.
- GuardBandBottom, GuardBandLeft, GuardBandRight, and GuardBandTop
- Screen-space coordinates of the guard-band clipping region. Coordinates inside this rectangle but outside the viewport rectangle are automatically clipped.
- LineCaps
- Defines the capabilities for line-drawing primitives. Possible values are defined by the CONST_D3DLINECAPS enumeration.
- MaxActiveLights
- Maximum number of lights that can be active simultaneously. For a given physical device, this capability might vary across Direct3D Device Objects depending on the parameters supplied to Direct3D8.CreateDevice.
- MaxAnisotropy
- Maximum valid value for the D3DTSS_MAXANISOTROPY texture-stage state.
- MaxPixelShaderValue
- Maximum value of pixel shader arithmetic component. This value indicates the internal range of values supported for pixel color blending operations. Implementations must allow data within the range that they report to pass through pixel processing unmodified (unclamped). Normally, the value of this member is an absolute value. For example, a 1.0 indicates that the range is -1.0 to 1, and an 8.0 indicates that the range is -8.0 to 8.0. The value must be >= 1.0 for any hardware that supports pixel shaders.Note that the value 0.0 indicates that no signed range is supported; therefore, the range is 0 to 1.0 as in Microsoft® DirectX® versions 6.0 and 7.0.
- MaxPointSize
- Maximum size of a point primitive. If set to 1.0f then device does not support point size control. The range is greater than or equal to 1.0.
- MaxPrimitiveCount
- Maximum number of primitives, or vertices for each DrawPrimitive call. Note that when Direct3D is working with a DirectX 6 or DirectX 7 driver, this field is set to 0xFFFF. This means that not only the number of primitives but also the number of vertices is limited by this value.
- MaxSimultaneousTextures
- Maximum number of textures that can be simultaneously bound to the texture blending stages. This value indicates the number of textures that can be used in a single pass. If the same texture is used in two blending stages, it counts as two when compared against the MaxSimultaneousTextures value. In the programmable pipeline, this indicates the number of texture registers supported by pixel shaders on this particular piece of hardware, and the number of texture declaration instructions that can be present.
- MaxStreams
- The maximum number of concurrent data streams for Direct3DDevice8.SetStreamSource. The valid range is 1 to 16. Note that if this value is 0, then the driver is not a DirectX 8.x driver.
- MaxStreamStride
- Maximum stride for Direct3DDevice8.SetStreamSource.
- MaxTextureAspectRatio
- Maximum texture aspect ratio supported by the hardware; this is typically a power of 2.
- MaxTextureBlendStages
- Maximum number of texture-blending stages supported. This value is the number of blenders available. In the DirectX 8.x programmable pixel pipeline, this should correspond to the number of instructions supported by pixel shaders on this particular implementation.
- MaxTextureHeight and MaxTextureWidth
- Maximum texture height and width for this device.
- MaxTextureRepeat
- 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.
If D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE is set, then the exact number of times a texture can be wrapped is MaxTextureRepeat. If D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE is not set, then the exact number of times a texture can be wrapped is (MaxTextureRepeat * texture size). For example, the device has D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE set, MaxTextureRepeat is 32k, and the maximum texture size is 4k. The device uses 27 integer bits (plus 5 fraction bits in a 32 bit (signed) integer), and thus has enough to wrap a 4k texture 32k times (assuming the texture coordinates equally span the positive and negative texture coordinate range). Alternately, the device could not set D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE and set MaxTextureRepeat to 2**27.
- MaxUserClipPlanes
- Maximum number of user-defined clipping planes supported. This member can range from 0 through D3DMAXUSERCLIPPLANES. For a given physical device, this capability might vary across Direct3D Device Objects depending on the parameters supplied to Direct3D8.CreateDevice.
- MaxVertexBlendMatrices
- Maximum number of matrices that this device can apply when performing multimatrix vertex blending. For a given physical device, this capability might vary across Direct3D Device Objects depending on the parameters supplied to Direct3D8.CreateDevice.
- MaxVertexBlendMatrixIndex
- Value that specifies the maximum matrix index that can be indexed into using the per vertex indices. The number of matrices is MaxVertexBlendMatrixIndex + 1, which is the size of the matrix palette. If normals are present in the vertex data that needs to be blended for lighting, then the number of matrices is half the number specified by this capability flag. If MaxVertexBlendMatrixIndex is set to zero, the driver does not support indexed vertex blending. If this value is not zero then the valid range of indices is zero through MaxVertexBlendMatrixIndex.
A zero value for MaxVertexBlendMatrixIndex indicates that the driver does not support indexed matrices.
When software vertex processing is used, 256 matrices could be used for indexed vertex blending, with or without normal blending.
For a given physical device, this capability might vary across Direct3D Device Objects depending on the parameters supplied to Direct3D8.CreateDevice.
- MaxVertexIndex
- Maximum size of indices supported for hardware vertex processing. It is possible to create 32-bit index buffers by specifying D3DFMT_INDEX32; however, you will not be able to render with the index buffer unless this value is greater than &HFFFF.
- MaxVertexW
- Maximum W-based depth value that the device supports.
- MaxVolumeExtent
- The maximum volume extent.
- MaxVertexShaderConst
- Number of vertex shader constant registers.
- PixelShaderVersion
- The pixel shader version, indicating the level of pixel shader supported by the device. Only pixel shaders with version numbers equal to or less than this will succeed in calls to Direct3DDevice8.CreatePixelShader.
- DirectX 8.x functionality is 01
The main version number is encoded in the second byte. The low byte contains a sub-version number.
- PresentationIntervals
- A bit mask of values representing what presentation swap intervals are available. Possible values are defined by the CONST_D3DPRESENT_INTERVAL_FLAGS enumeration.
- PrimitiveMiscCaps
- General capabilities for this primitive. Possible values are defined by the CONST_D3DPMISCCAPSFLAGS enumeration.
- RasterCaps
- Information on raster-drawing capabilities. This member can be one or more of the flags defined by the CONST_D3DPRASTERCAPSFLAGS enumeration.
- ShadeCaps
- Shading operations capabilities. It is assumed, in general, that if a device supports a given command at all, it supports the D3DSHADE_FLAT mode (as specified in the CONST_D3DSHADEMODE enumeration). This flag specifies whether the driver can also support Gouraud shading and whether are supported. When alpha components are not supported, the alpha value of colors generated is implicitly 255. This is the maximum possible alpha (that is, the alpha component is at full intensity).
The color, specular highlights, fog, and alpha interpolants of a triangle each have capability flags that an application can use to find out how they are implemented by the device driver.
This member can be one or more of the flags defined by the CONST_D3DPSHADECAPSFLAGS enumeration.
- SrcBlendCaps
- Source-blending capabilities. This member can be one or more of the flags defined by the CONST_D3DPBLENDCAPSFLAGS enumeration.
- StencilCaps
- Flags specifying supported stencil-buffer operations. Stencil operations are assumed to be valid for all three stencil-buffer operation render states (D3DRS_STENCILFAIL, D3DRS_STENCILPASS, and D3DRS_STENCILFAILZFAIL). Possible values are defined by the CONST_D3DSTENCILCAPFLAGS enumeration.
For more information, see the CONST_D3DSTENCILOP enumeration.
- TextureAddressCaps
- Texture-addressing capabilities for a Direct3DTexture object. This member can be one or more of the flags defined by the CONST_D3DPTADDRESSCAPSFLAGS enumeration.
- TextureCaps
- Miscellaneous texture-mapping capabilities. This member can be one or more of the flags defined by the CONST_D3DPTEXTURECAPSFLAGS enumeration.
- TextureFilterCaps
- Texture-filtering capabilities for a Direct3DTexture object. General texture-filtering flags reflect which texture-filtering modes are supported and can be set for the D3DTSS_MAGFILTER, D3DTSS_MINFILTER, or D3DTSS_MIPFILTER texture-stage states. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending with the Direct3DDevice8 class. This member can be any combination of the general and per-stage texture-filtering flags defined by the CONST_D3DPTFILTERCAPSFLAGS enumeration.
- TextureOpCaps
- Combination of flags describing the texture operations supported by this device. Possible values are defined by the CONST_D3DTEXOPCAPSFLAGS enumeration.
For more information, see the CONST_D3DTEXTUREOP enumeration.
- VertexProcessingCaps
- Vertex processing capabilities. Possible values are defined by the CONST_D3DVTXPCAPSFLAGS enumeration. For a given physical device, this capability might vary across Direct3D Device Objects depending on the parameters supplied to Direct3D8.CreateDevice.
- VertexShaderVersion
- The vertex shader version, indicating the level of vertex shader supported by the device. Only vertex shaders with version numbers equal to or less than this will succeed in calls to Direct3DDevice8.CreateVertexShader. The level of shader is specified to CreateVertexShader as the first token in the vertex shader token stream.
- DirectX 7.0 functionality is 0
- DirectX 8.x functionality is 01
The main version number is encoded in the second byte. The low byte contains a sub-version number.
- VolumeTextureAddressCaps
- Texture-addressing capabilities for Direct3DVolumeTexture objects. This member can be one or more of the flags defined by the CONST_D3DPTADDRESSCAPSFLAGS enumeration.
- VolumeTextureFilterCaps
- Texture-filtering capabilities for a Direct3DVolumeTexture object. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending with the Direct3DDevice8 class. This member can be any combination of the per-stage texture-filtering flags defined for the TextureFilterCaps member. This member can be any combination of the general and per-stage texture-filtering flags defined by the CONST_D3DPTFILTERCAPSFLAGS enumeration.
- ZCmpCaps
- Z-buffer comparison capabilities. This member can include the same capability flags defined for the AlphaCmpCaps member. The flags for this member are defined by the CONST_D3DPCMPCAPSFLAGS enumeration.
Remarks
The MaxTextureBlendStages and MaxSimultaneousTextures members might seem very similar, but they contain different information. The MaxTextureBlendStages member contains the total number of texture-blending stages supported by the current device, and the MaxSimultaneousTextures member describes how many of those stages can have textures bound to them by using the Direct3DDevice8.SetTexture method.
When the driver fills this type, it can set values for execute-buffer capabilities, even when the class being used to retrieve the capabilities (such as Direct3DDevice8) does not support execute buffers.
The following flags concerning mipmapped textures are not supported in DirectX 8.x.
- D3DPTFILTERCAPS_NEAREST
- D3DPTFILTERCAPS_LINEAR
- D3DPTFILTERCAPS_MIPNEAREST
- D3DPTFILTERCAPS_MIPLINEAR
- D3DPTFILTERCAPS_LINEARMIPNEAREST
- D3DPTFILTERCAPS_LINEARMIPLINEAR
See Also
Direct3D8.GetDeviceCaps