Microsoft DirectX 8.1 (Visual Basic) |
In Microsoft® Visual Basic®, transformations are applied by using the Direct3DDevice8.SetTransform method. For example, you could use code like the following to set the view transformation.
On Local Error Resume Next Dim view As D3DMATRIX ' Fill in the view matrix. Call d3dDevice.SetTransform(D3DTS_VIEW, view) If Err.Number <> DD_OK Then ' Code to handle the error goes here. End If
There are several possible settings for the first parameter in a call to SetTransform. The most common are D3DTS_WORLD, D3DTS_VIEW, and D3DTS_PROJECTION. These transformation states are defined by the CONST_D3DTRANSFORMSTATETYPE enumeration. This enumeration also contains the states D3DTS_TEXTURE1 through D3DTS_TEXTURE7, which you can use to apply transformations to texture coordinates.