   Skipping OpenGL's matrices entirely
  I'm using entirely Cg shaders, which requires me to pass the modelViewProjection matrix as a parameter. Additionally, I calculate matrices manually (for other purposes), without using OpenGL's matrix functions, and in my shaders I use 3x4 matrices anyway, because I don't ever need the bottom row.Are there any disadvantages to just completely avoiding OpenGL's matrices? That is, completely avoiding glMatrixMode(), gluPerspective(), gluLookAt(), glPushMatrix(), glPopMatrix(), glLoadMatrix(), glMultMatrix(), etc.What about the near and far planes? The only way I know how to set those is using gluPerspective(), but since I'm computing the projection matrix manually, there's no need for that.   
Quote:Are there any disadvantages to just completely avoiding OpenGL's matrices? That is, completely avoiding glMatrixMode(), gluPerspective(), gluLookAt(), glPushMatrix(), glPopMatrix(), glLoadMatrix(), glMultMatrix(), etc.Considering that all of these functions are deprecated in the most recent version of OpenGL (or at least that's my understanding), I doubt anyone would consider it disadvantageous to forgo their use.Quote:What about the near and far planes? The only way I know how to set those is using gluPerspective(), but since I'm computing the projection matrix manually, there's no need for that.If you're computing the projection matrix manually, then you are in fact (implicitly) setting the near and far plane distances.   ;Quote:I'm using entirely Cg shaders, which requires me to pass the modelViewProjection matrix as a parameter. Additionally, I calculate matrices manually (for other purposes), without using OpenGL's matrix functions, and in my shaders I use 3x4 matrices anyway, because I don't ever need the bottom row.One other quick comment. Typically, projection matrices make use of the 4th row/column, so how are you incorporating the projection transform if you only use 3x4 matrices?   ;  Actually, I just implemented passing the projection matrix to the shaders and realized that I did in fact need a 4x4 matrix. However, this is the only place, everywhere else I use 3x4 (with the bottom row implicitly [0, 0, 0, 1]).I did not realize the built in matrices were now deprecated, but that definitely answers my question! Thanks.(My initial concern was that OpenGL needed the built in matrices do compute certain things, such as the near and far planes. In my graphics class we learned a more... "mathematical" version of projection matrices, so to speak, as opposed to what you'd actually implement, so I didn't realize the near and far plane were part of that matrix. Anyway, this makes sense now, thanks for clarifying!)   ;  I strongly recommend you use a good math library.  Ones built with template metaprogramming are very fast.  I use CML which has a lot of functionality that makes it excellent for graphics, including all the usual matrix and vector stuff you'd need in graphics programming and more, plus it's lightweight, being header only, and it's damn fast with proper compiler optimization settings; the expression expansion is great and at least with Intel compiler most stuff auto-vectorizes nicely.  www.cmldev.netIf you're really hardcore and you need a lot more math stuff, say you're writing  your own physics library, check out Blitz++, it's just as fast, but much larger project and not so lightweight.   ;http://www.opengl.org/wiki/FAQ#glTranslate.2C_glRotate.2C_glScale