Jump to content
  • Advertisement
Sign in to follow this  
martinperry

DX Matrix converting

This topic is 2705 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

Hi,

I am using my matrix class for transformations. Is got approach to do this ?

this->device->SetTransform(D3DTS_VIEW, reinterpret_cast<D3DMATRIX*> (&camera->GetViewMatrix()));


Or its slow doing it every frame ?

Share this post


Link to post
Share on other sites
Advertisement

Hi,

I am using my matrix class for transformations. Is got approach to do this ?

this->device->SetTransform(D3DTS_VIEW, reinterpret_cast<D3DMATRIX*> (&camera->GetViewMatrix()));


Or its slow doing it every frame ?
If you set the view matrix ONCE AND ONLY ONCE each frame then it is not slow. However, repeatedly rebuilding (I'm not sure whether your GetViewMatrix function caches already-made view matrices or rebuilds them each time you call it) and resetting the device transforms is not efficient when you do it unnecessarily multiple times per frame.

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!