Microsoft DirectX 8.0 (Visual Basic) |
To enable texture wrapping, call the Direct3DDevice8.SetRenderState method as shown in the code example below.
m_D3D.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 which 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.