View Full Version : is glClientActiveTextureARB heavy?

09-14-2004, 12:47 AM
I am using a rendering env setup function to setup texture environment parameters, using glClientActiveTextureARB for each texture stage setting. And in another function, call it again to setup vertex array data. I am wondering if this is efficient? or should i put env setting and vertex array setting together so only need to call glClientActiveTextureARB once?

09-14-2004, 02:25 PM
I think you need to use glActiveTexture to set texture stage data and glClientActiveTexture for the tex coordinate arrays.

09-14-2004, 06:03 PM
It is correct that ActiveTexture() sets the target for texture and texture env parameters, and ClientActiveTexture() sets the target for texture coordinate array state (there is no other client texture state, IIRC).

Neither of these calls is expensive on their own. The state you choose to change may or may not be heavy, as in inducing stalls or causing large texture uploads. It's always a good idea to not set a state that you already know to be set, so mirror and sort your states if you care about highest performance.

09-14-2004, 06:50 PM
glActiveTextureARB & glClientActiveTextureARB...
sorry I've made such a foolish mistake. :(