PDA

View Full Version : Survey question



starman
05-01-2003, 08:02 AM
Quick question for you all. To handle your transformations do you:

1) Use glRotate/Translate/Scale exclusively

2) Use matrices and glMultMatrix() exclusively

3) A combination of 1) and 2)

What advantages are there in using one method over another?

Watcher
05-01-2003, 11:20 AM
It depends on the situation. Normally, glRotate/Translate/Scale operates faster than multiplying the same matrix manually simply because of internal optmizations OpenGL can do when it knows exactly what you're intending. However, sometimes handling your modelview matrix manually can increase speed, such as when using quaternions for rotation. I'd say I use the gl* commands far more often, although I don't know if that is the norm because I'm more or less an openGL newbie.

Obli
05-01-2003, 11:40 PM
I also like to go for (1). The other requires to understand exaclty how matrices work and I'm still a newbie here.

starman
05-02-2003, 02:51 AM
I'm an OpenGL newbie as well. I was, however, intrigued by the writings and internet postings of one Steve Baker, who says that you need to understand matrices before truly mastering OpenGL/3D, so I decided to re-learn them (after learning in college 15 years ago ;-)).

Anyway, here is one of his articles. I'd be interested in hearing what you all think of this, especially the more seasoned GL'ers.
http://sjbaker.org/steve/omniv/matrices_can_be_your_friends.html

147-2
05-02-2003, 07:09 AM
I use both, depending on what's going on. Usually I store matricies in arrays of floats, so rather than load, manipulate, then get the matrix, I figure it's more efficient for me to manipulate them by hand, but then again, Im not quite new to OpenGL anymore.