I have a question about how to set the texture by glUniform1i. I have seen code like below.
glUniform1i
glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_
Yes, you are correct. The uniform value for a sampler refers to the texture unit, not the texture id.