Sign in to follow this  
bloodshot

Weird projection matrix problem

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this