Usually, we draw a triangle with texture like this:
And when we use Combined Texture which have two units:Code :glBindTexture(GL_TEXTURE_2D,texturename); glEnable(GL_TEXTURE_2D); glBegin(GL_TRIANGLES); glTexCoord2f(0.0, 0.0); glVertex3f(0.0, 0.0, 0.0); ... glEnd();
The problem is how could we tell the triangle to use the combined texture?Code :glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, texname0); ... glActiveTexture(GL_TEXUTRE1); glBindTexture(GL_TEXUTRE_2D, texname1); ...
glBindTexture()



