View Full Version : with or without glIsEnabled
01-09-2004, 02:04 PM
What is faster to use ?
Check with glIsEnabled(GL_TEXTURE_2D)and then either glEnable or glDisable or just glEnable or glDisable according to condition(like textured : true or false)?
01-09-2004, 06:14 PM
Short : avoid glIsEnabled
Best is to keep track of the state yourself, as the glIsEnabled might stall the 3d card. Not sure, but it should not be too slow to glEnable or glDisable even if not needed.
01-11-2004, 08:37 AM
Always keep track of your rendering state yourself. And see that you make it right. This has (at least) the following reason beside the speed:
If you don't keep track of what you're rendering in which state (and order) you're bound to encounter erratic behaviour once your renderer gets more complex. Imagine adding a new geometry structure like tesselated surfaces (which will require you to build a new renderer) and integrating it with a not well-managed state system. You'll be surprised how fast you get to whole scenes using erratic alpha values.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.