Partager via


Using Texture Wrapping

To enable texture wrapping, call the IDirect3DDevice8::SetRenderState method as shown in the code example below.

d3dDevice->SetRenderState(D3DRS_WRAP0, D3DWRAPCOORD_0);

The first parameter accepted by SetRenderState is a render state to set. Specify one of the D3DRS_WRAP0 through D3DRS_WRAP7 enumerated values that specify which texture level to set the wrapping for. Specify the D3DWRAPCOORD_0 through D3DWRAPCOORD_3 flags in the second parameter to enable texture wrapping in the corresponding direction, or combine them to enable wrapping in multiple directions. If you omit a flag, texture wrapping in the corresponding direction is disabled. To disable texture wrapping for a set of texture coordinates, set the value for the corresponding render state to 0.

See Also

Texture Wrapping

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.