James
James

Reputation: 2999

What order do I call glActiveTexture and glBindTexture

I am wondering about when I have a texture named tex which I create with glBindTexture(...) and glTexImage2D(...).

If I want to bind it to a specific texture unit, when do I call glActiveTexture(GL_TEXTURE0); ?

Upvotes: 1

Views: 1854

Answers (1)

Cat Plus Plus
Cat Plus Plus

Reputation: 129964

All texture state functions operate on the current texture unit, so first you call glActiveTexture, then glBindTexture and friends.

Upvotes: 6

Related Questions