glGetFloatv and MODELVIEW_MATR performance issues?

Hi all,
is there any performance penalty by using glGetFloatv to get back the current modelview matrix? Is there the risk of stalling the GL pipeline (just like glReadPixels or so)? And, again, can problems of this type happen with glMultMatrix/glLoadMatrix?

Thank you in advance!

Nope, not really in the sense that you are worried. They don’t affect the pipeline the same way that glTexSubImage, glGetError and so on do…

However, it’s a good idea to try and manage your matrices yourself so as to reduce the amount of times you request it from the GL pipeline.

I replaced all my glGetFloat code by managing all matrices myself. I didn’t notice any performance difference. Neither on a desktop GPU (Geforce 9600) nor on a Quadro card.

Anyway, for best performance across all GPUs and all use-cases and to be future-proof, doing such stuff yourself is still not such a bad idea.