다음을 통해 공유


D3DMRENDERSTATE_WRAPBIAS (Windows CE 5.0)

Send Feedback

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

#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

OS Versions: Windows CE 5.0 and later.
Header: D3dmtypes.h.

See Also

Direct3D Mobile Macros

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.