Jump to content
  • Advertisement
Sign in to follow this  
xDan

how many matrices needed for a transformation

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

Say I have a 3d model, I want to translate it into the world, then rotate it and possibly scale it. using gltranslate, rotate etc. I then want to save the matrix(s) and later perform the tranformation using glmultmatrix. Do I need 3 separate matrices (translation, rotation, scale) or can I just apply the transformations to a single one? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Just the one. All glRotate, glTranslate and friends do is update the current matrix (ie: top of the stack for whatever was last set with glMatrixMode)

Share this post


Link to post
Share on other sites
Just a note: saving the matrix and re-applying it later using glMultMatrix can be signicficantly slower than just re-using the same sequence of glRotate/glTranslate/glScale calls (assuming that we're talking about a relativly small number of calls).

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!