Weird projection matrix problem
Hi all,
I've been developing a game (VC++, DX9) and although it ran fine on the development pc when I tried it on another pc it didn't render the level meshes. (It seems to be an nVidia issue, well on the 4 pc's I've tried). I've narrowed it down to the following problem.
Basically if I do nothing else but render a D3DMesh object and put the following few lines of code in it doesn't render..
D3DXMATRIX proj;
m_pd3dDevice->GetTransform(D3DTS_PROJECTION, &proj);
m_pd3dDevice->SetTransform(D3DTS_PROJECTION, &proj);
m_pMesh->Render(m_pd3dDevice);
I've a feeling I'm doing something silly but how come the code above doesnt work? If the matrix returned from GetTransform() is the current matrix how come setting it to be the matrix causes problems? Should these calls not cancel each other out so to speak?
Thanks for reading.
Are you creating a pure device? Pure devices are a little faster by bypassing the D3D runtime, but they do not save state like trnasforms--so most Get*() methods won't work.
If you're relying on D3D to hold state you can retrieve, be sure to not specify pure in device creation.
If you're relying on D3D to hold state you can retrieve, be sure to not specify pure in device creation.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement