Reading out the currently active texture unit

Started by Qudus, January 19, 2008, 01:28:32

Previous topic - Next topic

Qudus

Is it possible to read out the currently activated texture unit?

It seems, that using DisplayLists changes this state, even though I didn't include this state change in the DL. So my state caching is messed up and I have to (unnecessarily) force TU-selection before I bind a texture.

I didn't find a getter function for that.

And another related question:
When do I have to call glActiveTexture() and when glClientActiveTexture()? It seems, that glActiveTexture() has to be called before a texture us bound. But I didn't find any docu about when I have to call the client method. So I always call both of them to ensure, everything will work, which is of course not the most high performance way.

Marvin

Qudus

Hmm... Now I think, I found the answer to my second question. Looks like only texture-coord-array states need the client-texture-state to be adjusted. All other calls will need the server states to be changes. Is this correct?

Marvin