Microsoft DirectX 8.0 (Visual Basic) |
Like the matrices that your application uses for geometry, you set and retrieve texture coordinate transformations by calling the Direct3DDevice8.SetTransform and Direct3DDevice8.GetTransform methods. These methods accept the D3DTS_TEXTURE0 through D3DTS_TEXTURE7 members of the CONST_D3DTRANSFORMSTATETYPE enumeration to identify the transformation matrices for texture stages 0 through 7, respectively.
The following code sets a matrix to apply to the texture coordinates for texture stage 0.
' For this example, the D3DDevice variable contains a ' valid reference to a Direct3DDevice8 object, and ' dx contains a valid reference to a DirectX8 object. Dim matTrans As D3DMATRIX Call D3DXMatrixIdentity( matTrans ) ' Set-up the matrix for the desired transformation. D3dDevice.SetTransform( D3DTS_TEXTURE0, matTrans )