PDA

View Full Version : glGetFloatv and MODELVIEW_MATR performance issues?



ultimatecodewarrior
07-26-2009, 03:27 AM
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!

scratt
07-26-2009, 05:09 AM
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.

Jan
07-27-2009, 07:13 AM
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.

Jan.