how do i optimize my 3d rotations?

Started by
9 comments, last by Moe 24 years, 2 months ago
A) 3D cards don''t perform sin/cos/tan etc. in hardware. This is wrong. Calling sin/cos are scalar functions in MSVCRT.DLL if using MSVC. You can take a look at the the developer.intel.com pages for fast libs for math/matrix stuff but _only_ bother if you really know what you are doing.

B) The easiest code opt to what you posted is the most obvious. You calculate the sin and cos of X twice each time. Instead calculate each once and throw into a local and then use that local for the mults.

This topic is closed to new replies.

Advertisement