How expensive is glPushAttrib(GL_ENABLE_BIT) / glPopAttrib()

Hi,

Just wanted to know are the above calls efficient enough to be called in realtime applications or should we manage the checks for lighting enable/disable and correspondingly enable/disable Lighting.

Fastian

Hi !

It depends on the OpenGL driver, but you should count on the fact that it has severe impact on speed…

Reading any value back from OpenGL is normally very expensive, so try the best you can to avoid it.

Mikael