So… I know that using BindTexture after GlActiveTexture will bind that texture to whatever texture unit specified as an argument (ie. GL_TEXTURE0 + 2, or whatever…)… but if one doesn’t call GlActiveTexture prior to binding a texture, is an active texture name still silently used in the background?
I ask because I’m doing some work on some already heavily developed code, a little shader work that requires me to make a little GlActiveTexture calling and such, where some textures have already been generated by the time I’ll be making this call and I’m trying to make sure I don’t grab an already taken texture unit…
If I use the id from glGenTextures and add that to GL_TEXTURE0, shouldn’t that guarantee me a free texture? (ie:
glGenTextures( 1, &id );
glActiveTexture(GL_TEXTURE0 + id);
that should keep me from having to worry about overwriting any prior texture units, right?