Sign in to follow this  

GetTransform ? ? ?

Recommended Posts

Hi all, I'm needing to get the view matrix, so I'm using the following :
CSGDirect3DManager::GetInstance()->GetDevice()->GetTransform( D3DTS_VIEW, &matView );

But this isn't giving me back the correct view matrix within my object render class ? The view is set each time the camera moves, any ideas what I could be doing wrong ? Any help is really appreciated. Steve

Share this post

Link to post
Share on other sites
A pure device is a device that doesn't help you store set matrices and other states.

It relies on you to keep those. Not needing to store those will give a (small) speed boost as it doesn't need to check when setting a state/transform.

Share this post

Link to post
Share on other sites
Original post by steg
Many thanks Pipo,

I was using a pure device (D3DCREATE_PUREDEVICE), what is this anyway ?

Best regards,

When D3DCREATE_PUREDEVICE is specified, D3D passes all calls and data you make directly through to the graphics device driver without doing anything else. With a traditional, non-PURE device, the D3D runtime does things like state caching (so you can use the Get* calls), software vertex processing, data reformatting, some feature emulation, etc.

With a PURE device, *everything* your application requires from D3D MUST be supported by your graphics hardware (or provided by it's driver).

In a well tuned, well behaved and bug free application, with a PURE device you can sometimes get a small performance boost because D3D does less work.

Only use PURE once your application works properly, AND when you definately don't require something from the D3D runtime.

As a side note, since you're calling SetTransform() somewhere, it's likely more efficient to store that matrix in a variable and use that rather than making GetTransform().

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