![]() |
|
is glPushAttrib still expensive? - Printable Version +- iDevGames Forums (http://www.idevgames.com/forums) +-- Forum: Development Zone (/forum-3.html) +--- Forum: Graphics & Audio Programming (/forum-9.html) +--- Thread: is glPushAttrib still expensive? (/thread-5998.html) |
is glPushAttrib still expensive? - TomorrowPlusX - Jan 3, 2005 05:33 AM All I recently started using glPushAttrib/glPopAttrib to clean up some of the state changes for my engine, after spending a couple days tracking down a really, *really* subtle error that was causing my menus to sporadically lose ( and sporadically regain ) alpha blending. That was a serious hair-puller. I had reason to believe at first it was a memory smasher bug ( since I didn't notice the bug until after implementing a c++ system to complement Objective-C's autorelease mechanism)... anyway I spent a whole afternoon with MallocDebug and friends trying to track it down before I was able to determine it was just a state change issue. Anyway, glPushAttrib makes everything so much easier... but googling for performance implications shows that -- at least in the old days -- glPushAttrib was pretty expensive. Is it still? I don't see any performance hit for using it, but I'm only using it in a few spots at the moment. I'd like to move over to it more liberally, but I'd like to know from those who know if this is a good idea. is glPushAttrib still expensive? - NCarter - Jan 3, 2005 10:39 AM I couldn't tell you exactly how expensive it is, but there are a couple of rules-of-thumb you might want to bear in mind:
|