Original Post
Hi all, I'm having some weird issues with SetTransform - it appears to be having no effect! I have an empty shell of an application (test app), with this as the render loop: Whatever I enter in to my view matrix, I get the same thing on the screen, a triangle in the top left quarter. This is the same result if I miss out the SetTransform line all together! Comparing my code to that of anothers, I see no significant differences.. any ideas why this might be screwing up? Help would be apreciated, Thanks, Dachande
D3DXMATRIX out;
D3DXVECTOR3 eye(20000,30000,30000);
D3DXVECTOR3 at(0,0,0);
D3DXVECTOR3 up(0,1,0);
D3DXMatrixLookAtLH(&out, &eye, &at, &up);
//Set the "Camera"
pD3DDevice->SetTransform(D3DTS_VIEW, &out)
pD3DDevice->Clear(0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB(0,0,255), 1.0f, 0);
if( SUCCEEDED(pD3DDevice->BeginScene()))
{
//Draw a triangle to see if our view has changed...
pD3DDevice->SetStreamSource( 0, pVBuff, 0, sizeof(CUSTOMVERTEX) );
pD3DDevice->SetFVF( D3DFVF_CUSTOMVERTEX );
pD3DDevice->DrawPrimitive( D3DPT_TRIANGLELIST, 0, 1 );
pD3DDevice->EndScene();
}
//Present the scene to the display
pD3DDevice->Present(NULL, NULL, NULL, NULL);