View Full Version : Overhead with glEnable / glDisable ?
10-14-2005, 10:20 PM
Simple question: is there any signicant overhead in calling glEnable or glDisable? As in, if I am enabliing or disabling many times per frame, is this just setting a flag or is it doing much more each call?
10-15-2005, 01:47 AM
That depends on your hardware, you should try to minimize any state changes as much as possible, one example is to try to collect many things that use the same attributes and render them all at the same time, so just as an example:
render stuff that does not use lighting
render everything that does depend on lighting
Some times is of course not possible, and many state change does not take much time at all, I guess that also depnds on what you are disabling/enabling.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.