Reputation: 287
I am writing a small engine in C++ and I am trying to write a batch renderer I can use glBindTextureUnit for systems with 4.5 but systems like those of Apples don't have it because they don't want to update OpenGL but you can still use 4.1. So what is the Alternative for those lower than 4.5?
Upvotes: 2
Views: 3275
Reputation: 22167
glBindTextureUnit(unit, texture)
is almost identical to
glActiveTexture(GL_TEXTURE0 + unit);
glBindTexture(GL_TEXTURE_2D, texture);
The only difference is that the second version will alter the active texture global state.
When using something else than a 2D texture, the first parameter of glBindTexture
might have to be adjusted.
Upvotes: 6