次の方法で共有


D3DMRENDERSTATE_WRAPBIAS (Windows Embedded CE 6.0)

1/6/2010

This macro is a value that helps convert a texture stage number to the wrapping render state for that stage.

Syntax

#define D3DMRENDERSTATE_WRAPBIAS 32

Remarks

The D3DRENDERSTATE_WRAPBIAS constant is a convenience for applications to enable or disable texture wrapping, based on the zero-based integer of a texture coordinate set (rather than explicitly using one of the D3DRS_WRAPn state values).

Add the D3DRENDERSTATE_WRAPBIAS value to the zero-based index of a texture coordinate set to calculate the D3DRS_WRAPn value that corresponds to that index, as shown in the following example.

// Enable U/V wrapping for textures that use the texture
// coordinate set at the index within the dwIndex variable.
HRESULT hr = pd3dmDevice->SetRenderState(
    dwIndex + D3DMRENDERSTATE_WRAPBIAS,  
    D3DMWRAPCOORD_0 | D3DMWRAPCOORD_1);
// If dwIndex is 3, the value that results from 
// the addition equals D3DMRS_WRAP3 (131).

Requirements

Header d3dmtypes.h
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

Direct3D Mobile Macros