GetTransform() costly?

Started by
0 comments, last by circlesoft 18 years, 1 month ago
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?
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.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )

This topic is closed to new replies.

Advertisement