is glClientActiveTextureARB heavy?

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?

I think you need to use glActiveTexture to set texture stage data and glClientActiveTexture for the tex coordinate arrays.

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.

glActiveTextureARB & glClientActiveTextureARB…
sorry I’ve made such a foolish mistake. :frowning: