D3DCAPS8
Represents the capabilities of the hardware exposed through the Microsoft® Direct3D® object.
typedef struct _D3DCAPS8 {
D3DDEVTYPE DeviceType;
UINT AdapterOrdinal;
DWORD Caps;
DWORD Caps2;
DWORD Caps3;
DWORD PresentationIntervals;
DWORD CursorCaps;
DWORD DevCaps;
DWORD PrimitiveMiscCaps;
DWORD RasterCaps;
DWORD ZCmpCaps;
DWORD SrcBlendCaps;
DWORD DestBlendCaps;
DWORD AlphaCmpCaps;
DWORD ShadeCaps;
DWORD TextureCaps;
DWORD TextureFilterCaps;
DWORD CubeTextureFilterCaps;
DWORD VolumeTextureFilterCaps;
DWORD TextureAddressCaps;
DWORD VolumeTextureAddressCaps;
DWORD LineCaps;
DWORD MaxTextureWidth, MaxTextureHeight;
DWORD MaxVolumeExtent;
DWORD MaxTextureRepeat;
DWORD MaxTextureAspectRatio;
DWORD MaxAnisotropy;
float MaxVertexW;
float GuardBandLeft;
float GuardBandTop;
float GuardBandRight;
float GuardBandBottom;
float ExtentsAdjust;
DWORD StencilCaps;
DWORD FVFCaps;
DWORD TextureOpCaps;
DWORD MaxTextureBlendStages;
DWORD MaxSimultaneousTextures;
DWORD VertexProcessingCaps;
DWORD MaxActiveLights;
DWORD MaxUserClipPlanes;
DWORD MaxVertexBlendMatrices;
DWORD MaxVertexBlendMatrixIndex;
float MaxPointSize;
DWORD MaxPrimitiveCount;
DWORD MaxVertexIndex;
DWORD MaxStreams;
DWORD MaxStreamStride;
DWORD VertexShaderVersion;
DWORD MaxVertexShaderConst;
DWORD PixelShaderVersion;
float MaxPixelShaderValue;
} D3DCAPS8;
Members
- DeviceType
- Member of the D3DDEVTYPE enumerated type, which identifies what type of resources are used for processing vertices.
- AdapterOrdinal
- Adapter on which this Direct3DDevice object was created. This ordinal is valid only to pass to methods of the IDirect3D8 interface that created this Direct3DDevice object. The IDirect3D8 interface can always be retrieved by calling IDirect3DDevice8::GetDirect3D.
- Caps
- The following driver-specific capability.
- D3DCAPS_READ_SCANLINE
- Display hardware is capable of returning the current scan line.
- Caps2
- The following driver-specific capabilities.
- D3DCAPS2_CANCALIBRATEGAMMA
- The system has a calibrator installed that can automatically adjust the gamma ramp so that the result is identical on all systems that have a calibrator. To invoke the calibrator when setting new gamma levels, use the D3DSGR_CALIBRATE flag when calling the IDirect3DDevice8::SetGammaRamp method. Calibrating gamma ramps incurs some processing overhead and should not be used frequently.
- D3DCAPS2_CANRENDERWINDOWED
- The driver is capable of rendering in windowed mode.
- D3DCAPS2_CANMANAGERESOURCE
- The driver is capable of managing resources. On such drivers, D3DPOOL_MANAGED resources will be managed by the driver. To have Direct3D override the driver so that Direct3D manages resources, use the D3DCREATE_DISABLE_DRIVER_MANAGEMENT flag when calling IDirect3D8::CreateDevice
- D3DCAPS2_DYNAMICTEXTURES
- The driver supports dynamic textures.
- D3DCAPS2_FULLSCREENGAMMA
- The driver supports dynamic gamma ramp adjustment in full-screen mode.
- D3DCAPS2_NO2DDURING3DSCENE
- When the D3DCAPS2_NO2DDURING3DSCENE capability is set by the driver, it means that 2-D operations cannot be performed between calls to IDirect3DDevice8::BeginScene and IDirect3DDevice8::EndScene.
Typically, this capability is set by hardware that partitions the scene and then renders each partition in sequence. The partitioning is performed in the driver, and the hardware contains a small color and depth buffer that corresponds to the size of the image partition. Typically, on this type of rendering hardware, once each part of the image is rendered, the data in the color buffers are written to video memory and the contents of the depth buffer are discarded. Also, note that 3-D rendering does not start until EndScene is encountered. Next, the scene is processed in regions. Therefore, the processing order cannot be guaranteed. For example, the first region that is processed, typically the upper left corner of the window, might include the last triangle in the frame. This differs from more traditional graphics systems in which each command is processed sequentially in the order that it was sent. The 2-D operations are implied to occur at some fixed point in the processing. In the systems that set D3DCAPS2_NO2DDURING3DSCENE, the processing order is not guaranteed. Therefore, the display adapter might discard 2-D operations that are encountered during 3-D rendering.
In general, it is recommended that 2-D operations be performed outside of a BeginScene and EndScene pair. If 2-D operations are to be performed between a BeginScene and EndScene pair, then it is necessary to check the D3DCAPS2_NO2DDURING3DSCENE capability. If it is set, the application must expect that any 2-D operation that occurs between BeginScene and EndScene will be discarded. For more information on writing applications for systems that set D3DCAPS2_NO2DDURING3DSCENE, see Remarks.
- D3DCAPS2_RESERVED
- Reserved; not used.
- Caps3
- The following driver-specific capabilities.
- 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.
- D3DCAPS3_RESERVED
- Reserved; not used.
- PresentationIntervals
- Bit mask of values representing what presentation swap intervals are available.
- D3DPRESENT_INTERVAL_IMMEDIATE
- The driver supports an immediate presentation swap interval.
- D3DPRESENT_INTERVAL_ONE
- The driver supports a presentation swap interval of every screen refresh.
- D3DPRESENT_INTERVAL_TWO
- The driver supports a presentation swap interval of every second screen refresh.
- D3DPRESENT_INTERVAL_THREE
- The driver supports a presentation swap interval of every third screen refresh.
- D3DPRESENT_INTERVAL_FOUR
- The driver supports a presentation swap interval of every fourth screen refresh.
- CursorCaps
- Bit mask indicating what hardware support is available for cursors.
- D3DCURSORCAPS_COLOR
- A full-color cursor is supported in hardware. Specifically, this flag indicates that the driver supports at least a hardware color cursor in high-resolution modes (with scan lines greater than or equal to 400).
- D3DCURSORCAPS_LOWRES
- A full-color cursor is supported in hardware. Specifically, this flag indicates that the driver supports a hardware color cursor in both high-resolution and low-resolution modes (with scan lines less than 400).
Direct3D does not define alpha-blending cursor capabilities.
- DevCaps
- Flags identifying the capabilities of the device.
- D3DDEVCAPS_CANBLTSYSTONONLOCAL
- Device supports blits from system-memory textures to nonlocal video-memory textures.
- 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.
- D3DDEVCAPS_DRAWPRIMTLVERTEX
- Device exports a DrawPrimitive-aware hardware abstraction layer (HAL).
- D3DDEVCAPS_EXECUTESYSTEMMEMORY
- Device can use from system memory.
- D3DDEVCAPS_EXECUTEVIDEOMEMORY
- Device can use from video memory.
- D3DDEVCAPS_HWRASTERIZATION
- Device has hardware acceleration for scene rasterization.
- D3DDEVCAPS_HWTRANSFORMANDLIGHT
- Device can support transformation and lighting in hardware.
- D3DDEVCAPS_NPATCHES
- Device supports N-patches.
- D3DDEVCAPS_PUREDEVICE
- Device can support rasterization, transform, lighting, and shading in hardware.
- D3DDEVCAPS_QUINTICRTPATCHES
- Device supports quintic Bézier curves and B-splines.
- D3DDEVCAPS_RTPATCHES
- Device supports rectangular and triangular patches.
- D3DDEVCAPS_RTPATCHHANDLEZERO
- When this device capability is set, the hardware architecture does not require caching of any information, and uncached patches (handle zero) will be drawn as efficiently as cached ones. Note that setting D3DDEVCAPS_RTPATCHHANDLEZERO does not mean that a patch with handle zero can be drawn. A handle-zero patch can always be drawn whether this cap is set or not.
- D3DDEVCAPS_SEPARATETEXTUREMEMORIES
- Device is texturing from separate memory pools.
- D3DDEVCAPS_TEXTURENONLOCALVIDMEM
- Device can retrieve textures from non-local video memory.
- 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.
- PrimitiveMiscCaps
- General capabilities for this primitive. This member can be one or more of the following flags.
- D3DPMISCCAPS_BLENDOP
- Device supports the alpha-blending operations defined in the D3DBLENDOP enumerated type.
- D3DPMISCCAPS_CLIPPLANESCALEDPOINTS
- Device correctly clips scaled points of size greater than 1.0 to user-defined clipping planes.
- D3DPMISCCAPS_CLIPTLVERTS
- Device clips post-transformed vertex primitives.
- D3DPMISCCAPS_COLORWRITEENABLE
- Device supports per-channel writes for the render target color buffer through the D3DRS_COLORWRITEENABLE state.
- D3DPMISCCAPS_CULLCCW
- The driver supports counterclockwise culling through the D3DRS_CULLMODE state. (This applies only to triangle primitives.) This flag corresponds to the D3DCULL_CCW member of the D3DCULL enumerated type.
- D3DPMISCCAPS_CULLCW
- The driver supports clockwise triangle culling through the D3DRS_CULLMODE state. (This applies only to triangle primitives.) This flag corresponds to the D3DCULL_CW member of the D3DCULL enumerated type.
- D3DPMISCCAPS_CULLNONE
- The driver does not perform triangle culling. This corresponds to the D3DCULL_NONE member of the D3DCULL enumerated type.
- D3DPMISCCAPS_LINEPATTERNREP
- The driver can handle values other than 1 in the wRepeatFactor member of the D3DLINEPATTERN structure. (This applies only to line-drawing primitives.)
- D3DPMISCCAPS_MASKZ
- Device can enable and disable modification of the depth buffer on pixel operations.
- D3DPMISCCAPS_TSSARGTEMP
- Device supports D3DTA_TEMP for temporary register.
- RasterCaps
- Information on raster-drawing capabilities. This member can be one or more of the following flags.
- D3DPRASTERCAPS_ANISOTROPY
- Device supports anisotropic filtering.
- D3DPRASTERCAPS_ANTIALIASEDGES
- Device can antialias lines forming the convex outline of objects. For more information, see D3DRS_EDGEANTIALIAS.
- D3DPRASTERCAPS_COLORPERSPECTIVE
- Device iterates colors perspective correct.
- D3DPRASTERCAPS_DITHER
- Device can dither to improve color resolution.
- D3DPRASTERCAPS_FOGRANGE
- Device supports range-based fog. In range-based fog, the distance of an object from the viewer is used to compute fog effects, not the depth of the object (that is, the z-coordinate) in the scene.
- D3DPRASTERCAPS_FOGTABLE
- Device calculates the fog value by referring to a lookup table containing fog values that are indexed to the depth of a given pixel.
- D3DPRASTERCAPS_FOGVERTEX
- Device calculates the fog value during the lighting operation, and interpolates the fog value during rasterization.
- D3DPRASTERCAPS_MIPMAPLODBIAS
- Device supports level-of-detail (LOD) bias adjustments. These bias adjustments enable an application to make a mipmap appear crisper or less sharp than it normally would. For more information about LOD bias in mipmaps, see D3DTSS_MIPMAPLODBIAS.
- D3DPRASTERCAPS_PAT
- The driver can perform patterned drawing lines or fills with D3DRS_LINEPATTERN for the primitive being queried.
- D3DPRASTERCAPS_STRETCHBLTMULTISAMPLE
- Device provides limited multisample support through a stretch-blt implementation. When this capability is set, D3DRS_MULTISAMPLEANTIALIAS cannot be turned on and off in the middle of a scene. Multisample masking cannot be performed if this flag is set.
- D3DPRASTERCAPS_WBUFFER
- Device supports depth buffering using w.
- D3DPRASTERCAPS_WFOG
- Device supports w-based fog. W-based fog is used when a perspective projection matrix is specified, but affine projections still use z-based fog. The system considers a projection matrix that contains a nonzero value in the [3][4] element to be a perspective projection matrix.
- D3DPRASTERCAPS_ZBIAS
- Device supports z-bias values. These are integer values assigned to polygons that allow physically coplanar polygons to appear separate. For more information, see D3DRS_ZBIAS.
- D3DPRASTERCAPS_ZBUFFERLESSHSR
- Device can perform hidden-surface removal (HSR) without requiring the application to sort polygons and without requiring the allocation of a depth buffer. This leaves more video memory for textures. The method used to perform HSR is hardware-dependent and is transparent to the application.
Z-bufferless HSR is performed if no depth-buffer surface is associated with the rendering-target surface and the depth-buffer comparison test is enabled (that is, when the state value associated with the D3DRS_ZENABLE enumeration constant is set to TRUE).
- D3DPRASTERCAPS_ZFOG
- Device supports z-based fog.
- D3DPRASTERCAPS_ZTEST
- Device can perform z-test operations. This effectively renders a primitive and indicates whether any z pixels have been rendered.
- ZCmpCaps
- Z-buffer comparison capabilities. This member can be one or more of the following flags.
- D3DPCMPCAPS_ALWAYS
- Always pass the z test.
- D3DPCMPCAPS_EQUAL
- Pass the z test if the new z equals the current z.
- D3DPCMPCAPS_GREATER
- Pass the z test if the new z is greater than the current z.
- D3DPCMPCAPS_GREATEREQUAL
- Pass the z test if the new z is greater than or equal to the current z.
- D3DPCMPCAPS_LESS
- Pass the z test if the new z is less than the current z.
- D3DPCMPCAPS_LESSEQUAL
- Pass the z test if the new z is less than or equal to the current z.
- D3DPCMPCAPS_NEVER
- Always fail the z test.
- D3DPCMPCAPS_NOTEQUAL
- Pass the z test if the new z does not equal the current z.
- SrcBlendCaps
- Source-blending capabilities. This member can be one or more of the following flags. (The RGBA values of the source and destination are indicated by the subscripts s and d.)
- D3DPBLENDCAPS_BOTHINVSRCALPHA
- Source is (1–As, 1–As, 1–As, 1–As), and destination blend factor is (As, As, As, As); the destination blend selection is overridden.
- D3DPBLENDCAPS_BOTHSRCALPHA
- The driver supports the D3DBLEND_BOTHSRCALPHA blend mode. (This blend mode is obsolete. For more information, see D3DBLEND.)
- D3DPBLENDCAPS_DESTALPHA
- Blend factor is (Ad, Ad, Ad, Ad).
- D3DPBLENDCAPS_DESTCOLOR
- Blend factor is (Rd, Gd, Bd, Ad).
- D3DPBLENDCAPS_INVDESTALPHA
- Blend factor is (1–Ad, 1–Ad, 1–Ad, 1–Ad).
- D3DPBLENDCAPS_INVDESTCOLOR
- Blend factor is (1–Rd, 1–Gd, 1–Bd, 1–Ad).
- D3DPBLENDCAPS_INVSRCALPHA
- Blend factor is (1–As, 1–As, 1–As, 1–As).
- D3DPBLENDCAPS_INVSRCCOLOR
- Blend factor is (1–Rd, 1–Gd, 1–Bd, 1–Ad).
- D3DPBLENDCAPS_ONE
- Blend factor is (1, 1, 1, 1).
- D3DPBLENDCAPS_SRCALPHA
- Blend factor is (As, As, As, As).
- D3DPBLENDCAPS_SRCALPHASAT
- Blend factor is (f, f, f, 1); f = min(As, 1-Ad).
- D3DPBLENDCAPS_SRCCOLOR
- Blend factor is (Rs, Gs, Bs, As).
- D3DPBLENDCAPS_ZERO
- Blend factor is (0, 0, 0, 0).
- DestBlendCaps
- Destination-blending capabilities. This member can be the same capabilities that are defined for the SrcBlendCaps member.
- AlphaCmpCaps
- Alpha-test comparison capabilities. This member can include the same capability flags defined for the ZCmpCaps member. 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 identify the individual comparisons that are supported for alpha testing.
- 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 D3DSHADEMODE enumerated type). 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 following flags.
- D3DPSHADECAPS_ALPHAGOURAUDBLEND
- Device can support an alpha component for Gouraud-blended transparency (the D3DSHADE_GOURAUD state for the D3DSHADEMODE enumerated type). In this mode, the of a primitive is provided at vertices and interpolated across a face, along with the other color components.
- D3DPSHADECAPS_COLORGOURAUDRGB
- Device supports Gouraud shading. In this mode, the red, green, and blue components for a primitive are provided at vertices and interpolated across a face.
- D3DPSHADECAPS_FOGGOURAUD
- Device supports Gouraud shading of fog.
- D3DPSHADECAPS_SPECULARGOURAUDRGB
- Device supports Gouraud shading of specular highlights.
- TextureCaps
- Miscellaneous texture-mapping capabilities. This member can be one or more of the following flags.
- D3DPTEXTURECAPS_ALPHA
- Alpha in texture pixels is supported.
- D3DPTEXTURECAPS_ALPHAPALETTE
- Device can draw alpha from texture palettes.
- D3DPTEXTURECAPS_CUBEMAP
- Supports cube textures
- D3DPTEXTURECAPS_CUBEMAP_POW2
- Device requires that cube texture maps have dimensions specified as powers of 2.
- D3DPTEXTURECAPS_MIPCUBEMAP
- Device supports mipmapped cube textures.
- D3DPTEXTURECAPS_MIPMAP
- Device supports mipmapped textures.
- D3DPTEXTURECAPS_MIPVOLUMEMAP
- Device supports mipmapped volume textures.
- D3DPTEXTURECAPS_NONPOW2CONDITIONAL
- Conditionally supports the use of textures with dimensions that are not powers of 2. A device that exposes this capability can use such a texture if all of the following requirements are met.
- The texture addressing mode for the texture stage is set to D3DTADDRESS_CLAMP.
- Texture wrapping for the texture stage is disabled (D3DRS_WRAPn set to 0).
- Mipmapping is not in use (use magnification filter only).
- Texture formats must not be DXT1-5
A texture that is not a power of two cannot be set at a stage that will be read based on a shader computation (such as the bem, beml, or texm3x3 instructions in pixel shaders versions 1.0 to 1.3). For example, these textures can be used to store bumps that will be fed into texture reads, but not the environment maps that are used in texbem, texbeml, or texm3x3spec. This means that a texture with dimensions that are not powers of two cannot be addressed or sampled using texture coordinates computed within the shader. This type of operation is known as a dependent read and cannot be performed on these kinds of textures.
- D3DPTEXTURECAPS_PERSPECTIVE
- texturing is supported.
- D3DPTEXTURECAPS_POW2
- All textures must have widths and heights specified as powers of 2. This requirement does not apply to either cube textures or volume textures.
- D3DPTEXTURECAPS_PROJECTED
- Supports the D3DTTFF_PROJECTED texture transformation flag. When applied, the device divides transformed texture coordinates by the last texture coordinate. If this capability is present, then the projective divide occurs per pixel. If this capability is not present, but the projective divide needs to occur anyway, then it is performed on a per-vertex basis by the Direct3D runtime.
- D3DPTEXTURECAPS_SQUAREONLY
- All textures must be square.
- D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE
- Texture indices are not scaled by the texture size prior to interpolation.
- D3DPTEXTURECAPS_VOLUMEMAP
- Device supports volume textures.
- D3DPTEXTURECAPS_VOLUMEMAP_POW2
- Device requires that volume texture maps have dimensions specified as powers of 2.
- TextureFilterCaps
- Texture-filtering capabilities for a Direct3DTexture object. Per-stage filtering capabilities reflect which filtering modes are supported for texture stages when performing multiple-texture blending with the IDirect3DDevice8 interface. This member can be any combination of the following per-stage texture-filtering flags.
- D3DPTFILTERCAPS_MAGFAFLATCUBIC
- Device supports per-stage flat cubic filtering for magnifying textures. The flat cubic magnification filter is represented by the D3DTEXF_FLATCUBIC member of the D3DTEXTUREFILTERTYPE enumerated type.
- D3DPTFILTERCAPS_MAGFANISOTROPIC
- Device supports per-stage anisotropic filtering for magnifying textures. The anisotropic magnification filter is represented by the D3DTEXF_ANISOTROPIC member of the D3DTEXTUREFILTERTYPE enumerated type.
- D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC
- Device supports the per-stage Gaussian cubic filtering for magnifying textures. The Gaussian cubic magnification filter is represented by the D3DTEXF_GAUSSIANCUBIC member of the D3DTEXTUREFILTERTYPE enumerated type.
- D3DPTFILTERCAPS_MAGFLINEAR
- Device supports per-stage bilinear interpolation filtering for magnifying textures. The bilinear interpolation magnification filter is represented by the D3DTEXF_LINEAR member of the D3DTEXTUREFILTERTYPE enumerated type.
- D3DPTFILTERCAPS_MAGFPOINT
- Device supports per-stage point-sample filtering for magnifying textures. The point-sample magnification filter is represented by the D3DTEXF_POINT member of the D3DTEXTUREFILTERTYPE enumerated type.
- D3DPTFILTERCAPS_MINFANISOTROPIC
- Device supports per-stage anisotropic filtering for minifying textures. The anisotropic minification filter is represented by the D3DTEXF_ANISOTROPIC member of the D3DTEXTUREFILTERTYPE enumerated type.
- D3DPTFILTERCAPS_MINFLINEAR
- Device supports per-stage bilinear interpolation filtering for minifying textures. The bilinear minification filter is represented by the D3DTEXF_LINEAR member of the D3DTEXTUREFILTERTYPE enumerated type.
- D3DPTFILTERCAPS_MINFPOINT
- Device supports per-stage point-sample filtering for minifying textures. The point-sample minification filter is represented by the D3DTEXF_POINT member of the D3DTEXTUREFILTERTYPE enumerated type.
- D3DPTFILTERCAPS_MIPFLINEAR
- Device supports per-stage trilinear interpolation filtering for mipmaps. The trilinear interpolation mipmapping filter is represented by the D3DTEXF_LINEAR member of the D3DTEXTUREFILTERTYPE enumerated type.
- D3DPTFILTERCAPS_MIPFPOINT
- Device supports per-stage point-sample filtering for mipmaps. The point-sample mipmapping filter is represented by the D3DTEXF_POINT member of the D3DTEXTUREFILTERTYPE enumerated type.
- 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 IDirect3DDevice8 interface. This member can be any combination of the per-stage texture-filtering flags defined for the TextureFilterCaps member.
- 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 IDirect3DDevice8 interface. This member can be any combination of the per-stage texture-filtering flags defined for the TextureFilterCaps member.
- TextureAddressCaps
- Texture-addressing capabilities for Direct3DTexture objects. This member can be one or more of the following flags.
- D3DPTADDRESSCAPS_BORDER
- Device supports setting coordinates outside the range [0.0, 1.0] to the border color, as specified by the D3DTSS_BORDERCOLOR texture-stage state.
- D3DPTADDRESSCAPS_CLAMP
- Device can clamp textures to addresses.
- D3DPTADDRESSCAPS_INDEPENDENTUV
- Device can separate the texture-addressing modes of the u and v coordinates of the texture. This ability corresponds to the D3DTSS_ADDRESSU and D3DTSS_ADDRESSV render-state values.
- D3DPTADDRESSCAPS_MIRROR
- Device can mirror textures to addresses.
- D3DPTADDRESSCAPS_MIRRORONCE
- Device can take the absolute value of the texture coordinate (thus, mirroring around 0), and then clamp to the maximum value.
- D3DPTADDRESSCAPS_WRAP
- Device can wrap textures to addresses.
- VolumeTextureAddressCaps
- Texture-addressing capabilities for Direct3DVolumeTexture objects. This member can be one or more of the flags defined for the TextureAddressCaps member.
- LineCaps
- Defines the capabilities for line-drawing primitives.
- D3DLINECAPS_ALPHACMP
- Supports alpha-test comparisons.
- D3DLINECAPS_BLEND
- Supports source-blending.
- D3DLINECAPS_FOG
- Supports fog.
- D3DLINECAPS_TEXTURE
- Supports texture-mapping.
- D3DLINECAPS_ZTEST
- Supports z-buffer comparisons.
- MaxTextureWidth and MaxTextureHeight
- Maximum texture width and height for this device.
- MaxVolumeExtent
- Maximum volume extent.
- MaxTextureRepeat
- This number represents the maximum range of the integer bits of the post-normalized texture coordinates. A texture coordinate is stored as a 32-bit signed integer using 27 bits to store the integer part and 5 bits for the floating point fraction. The maximum integer index, 227, is used to determine the maximum texture coordinate, depending on how the hardware does texture-coordinate scaling.
Some hardware reports the cap D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE. For this case, the device defers scaling texture coordinates by the texture size until after interpolation and application of the texture address mode, so the number of times a texture can be wrapped is given by the integer value in MaxTextureRepeat.
Less desirably, on some hardware D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE is not set and the device scales the texture coordinates by the texture size (using the highest level of detail) prior to interpolation. This limits the number of times a texture can be wrapped to MaxTextureRepeat / textureSize.
Example:
Given MaxTextureRepeat = 32k and texture size = 4 KB:
if the hardware sets D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE
# of times a texture can be wrapped = MaxTextureRepeat
// which is 32k in this example
else
# of times a texture can be wrapped = MaxTextureRepeat / textureSize
// which is 227/4k
- MaxTextureAspectRatio
- Maximum texture aspect ratio supported by the hardware, typically a power of 2.
- MaxAnisotropy
- Maximum valid value for the D3DTSS_MAXANISOTROPY texture-stage state.
- MaxVertexW
- Maximum W-based depth value that the device supports.
- GuardBandLeft, GuardBandTop, GuardBandRight, and GuardBandBottom
- Screen space coordinates of the guard-band clipping region. Coordinates inside this rectangle but outside the viewport rectangle are automatically clipped.
- ExtentsAdjust
- Number of pixels to adjust the extents rectangle outward to accommodate antialiasing kernels.
- 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).
- 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.
For more information, see the D3DSTENCILOP enumerated type.
- FVFCaps
- 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_PSIZE
- Point size is determined by either the render state or the vertex data.
- If D3DFVFCAPS_PSIZE is set, point size can come from D3DFVF_PSIZE data in the FVF vertex declaration.
- Otherwise, point size is determined by the render state D3DRS_POINTSIZE.
- If the application provides point size in both (the render state and the FVF data), the vertex data overrides the render-state data.
- D3DFVFCAPS_TEXCOORDCOUNTMASK
- Masks the low WORD of FVFCaps. 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 blend using only the specified number of texture coordinate sets.)
- TextureOpCaps
- 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_LERP
- The D3DTOP_LERP 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_MULTIPLYADD
- The D3DTOP_MULTIPLYADD 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.
- MaxTextureBlendStages
- Maximum number of texture-blending stages supported. This value is the number of blenders available. In the DirectX 8.x programmable pipeline, this corresponds to the number of instructions supported by pixel shaders on this particular implementation.
- MaxSimultaneousTextures
- Maximum number of textures that can be simultaneously bound to the texture blending stages. This value is 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.
- VertexProcessingCaps
- Vertex processing capabilities. For a given physical device, this capability might vary across Direct3DDevice objects depending on the parameters supplied to IDirect3D8::CreateDevice.
- D3DVTXPCAPS_DIRECTIONALLIGHTS
- Device supports directional lights.
- D3DVTXPCAPS_LOCALVIEWER
- Device supports local viewer.
- D3DVTXPCAPS_MATERIALSOURCE7
- Device supports selectable vertex color sources.
- D3DVTXPCAPS_POSITIONALLIGHTS
- Device supports positional lights (including point lights and spotlights).
- D3DVTXPCAPS_TEXGEN
- Device can generate texture coordinates.
- D3DVTXPCAPS_TWEENING
- Device supports vertex tweening.
- D3DVTXPCAPS_NO_VSDT_UBYTE4
- Device does not support the D3DVSDT_UBYTE4 vertex declaration type.
- MaxActiveLights
- Maximum number of lights that can be active simultaneously. For a given physical device, this capability might vary across Direct3DDevice objects depending on the parameters supplied to IDirect3D8::CreateDevice.
- MaxUserClipPlanes
- Maximum number of user-defined clipping planes supported. This member can range from 0 through D3DMAXUSERCLIPPLANES. For a given physical device, this capability may vary across Direct3DDevice objects depending on the parameters supplied to IDirect3D8::CreateDevice.
- MaxVertexBlendMatrices
- Maximum number of matrices that this device can apply when performing multimatrix vertex blending. For a given physical device, this capability may vary across Direct3DDevice objects depending on the parameters supplied to IDirect3D8::CreateDevice.
- MaxVertexBlendMatrixIndex
- DWORD 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 may vary across Direct3DDevice objects depending on the parameters supplied to IDirect3D8::CreateDevice.
- 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.0f.
- MaxPrimitiveCount
- Maximum number of primitives, or vertices for each DrawPrimitive call. Note that when Direct3D is working with a DirectX 6.0 or DirectX 7.0 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.
- 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 0x0000FFFF.
- MaxStreams
- Maximum number of concurrent data streams for IDirect3DDevice8::SetStreamSource. The valid range is 1–16. Note that if this value is 0, the driver is not a DirectX 8 driver.
- MaxStreamStride
- Maximum stride for IDirect3DDevice8::SetStreamSource.
- VertexShaderVersion
- 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 IDirect3DDevice8::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.
- MaxVertexShaderConst
- The number of vertex shader input registers that are reserved for constants.
- PixelShaderVersion
- Two numbers that represent the pixel shader main and sub versions. For more information about the versions supported in DirectX 8.x, see the pixel shader version instruction.
- MaxPixelShaderValue
- Maximum value of pixel shader arithmetic component. This value indicates the internal range of values supported for pixel color blending operations. Within the range that they report to, implementations must allow data 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.
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 IDirect3DDevice8::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 IDirect3DDevice8) does not support execute buffers.
For systems that set the D3DCAPS2_NO2DDURING3DSCENE capability flag, performance problems may occur if you use a texture and then modify it during a scene. This is true on all hardware, but it is more severe on hardware that exposes the D3DCAPS2_NO2DDURING3DSCENE capability. If D3DCAPS2_NO2DDURING3DSCENE is present on the hardware, application-based texture management should ensure that no texture used in the current BeginScene and EndScene block is evicted unless absolutely necessary. In the case of extremely high texture usage within a scene, the results are undefined. This occurs when you modify a texture that you have used in the scene and there is no spare texture memory available. For such systems, the contents of the z buffer become invalid at EndScene. Applications should not call IDirect3DDevice8::CopyRects to or from the back buffer on this type of hardware inside a BeginScene and EndScene pair. In addition, applications should not try to access the z buffer if the D3DPRASTERCAPS_ZBUFFERLESSHSR capability flag is set. Finally, applications should not lock the back buffer or the z buffer inside a BeginScene and EndScene pair.
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
Requirements
Header: Declared in D3d8caps.h.
See Also
IDirect3D8::GetDeviceCaps, IDirect3DDevice8::GetDeviceCaps