Hello Guest

Reading out the currently active texture unit

  • 1 Replies
  • 6285 Views
*

Offline Qudus

  • ***
  • 123
Reading out the currently active texture unit
« on: January 19, 2008, 01:28:32 »
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
« Last Edit: January 19, 2008, 01:30:43 by Qudus »

*

Offline Qudus

  • ***
  • 123
Re: Reading out the currently active texture unit
« Reply #1 on: January 19, 2008, 01:51:29 »
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