I know it is considered beneficial to keep track of various states yourself. This includes currently bound texture, blending mode, texture mode, depth testing mode, etc. Would it also be beneficial to keep track of my matrices?
Here is my train of thought… I am currently writing a nice GL wrapper class that manages window creation/destruction and wraps other GL calls (primitive drawing, matrix ops). I’m doing this because one day, I might decide to port this to another graphics library (DirectX, PS2, who knows). My view frustum culling stuff, currently uses glGetFloatv() to retrieve both the modelview and projection matrices from OpenGL so that it can “do its magic”. Would it be better if I keep copies of these matrices myself? I could easily do this in my wrapper class. Also doing this would allow me to only call glLoadMatrix() and glMultMatrix() when absolutely necessary (just before rendering) I could simply set a dirty flag when my wrapper functions are called. Do the hardware drivers already keep copies of the matrices in system ram? If not, why? Thanks in advance!
Oh, and this question is directed primarily at you, Matt because I’m currently only targeting GeForce cards
[This message has been edited by BwB (edited 03-17-2001).]