Setting Transformations (Windows Embedded CE 6.0)
1/6/2010
Transformations are applied by using the IDirect3DMobileDevice::SetTransform method. For example, you can use the following code example to set the view transformation.
HRESULT hr;
D3DMATRIX view;
// Fill in the view matrix.
hr = pDev->SetTransform(D3MDTS_VIEW, &view);
if(FAILED(hr))
{
// Code to handle the error goes here.
}
There are several possible settings for the first parameter in a call to SetTransform. The most common are D3DMTS_WORLD, D3DMTS_VIEW, and D3DMTS_PROJECTION. These transformation states are defined by the D3DMTRANSFORMSTATETYPE enumerated type. This enumeration also contains the states D3MDTS_TEXTURE1 through D3MDTS_TEXTURE3, which you can use to apply transformations to texture coordinates.