Jump to content
  • Advertisement
Sign in to follow this  
DarkZoulz

GetTransform() costly?

This topic is 4500 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is it a heavy operation to get and set transformation matrices in D3D? I mean, can I throughout the engine use a device->GetTransform(D3DTS_WORLD, &matrix) to retrieve the world transform, or should I store it locally and get that copy every time I need it?

Share this post


Link to post
Share on other sites
Advertisement
SetTransform() is pretty costly, as this entails a state change - GetTransform(), not so much. Remember that if you have a pure device, you can't use most IDirect3DDevice::Get*() calls. Generally, it is more flexible (and better design) to store the transforms yourself. Otherwise, you could be calling GetTransform() multiple times per frame, ect.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!