Active texture unit number?

I’m having a hard time keeping track of the active texture in my app. Is there a Cinder function for get-active-texture-unit-number?

I’m also looking for a ScopedActiveTexture example, if you know of one.

Thanks

You can do this in OpenGL:

GLint activeTexture;
glGetIntegerv( GL_ACTIVE_TEXTURE, &activeTexture );

This will return GL_TEXTUREi, so you can get the texture unit number with
activeTexture - GL_TEXTURE0.

-Gabor

_edit: just found that there’s a cinder function for this:

gl::context()->getActiveTexture()