set the texture for by glUniform1i

后端 未结 1 1382
小蘑菇
小蘑菇 2021-01-31 13:57

I have a question about how to set the texture by glUniform1i. I have seen code like below.

glActiveTexture(GL_TEXTURE0); 
glBindTexture(GL_TEXTURE_         


        
1条回答
  •  时光说笑
    2021-01-31 14:28

    Yes, you are correct. The uniform value for a sampler refers to the texture unit, not the texture id.

    0 讨论(0)
提交回复
热议问题