How can I load and use multiple textures? For example cube that has six different textures.
That is really simple:
1.) Set up six storages for your textures:
GLuint texture[6];
2.) Load images in to them(hope you know how!)
3.)Enable GL_Texture in your init sequence:
glEnable(GL_TEXTURE_2D);
4.) Draw your cube:
glBindTexture(GL_TEXTURE_2D, texture[0]);
draw quad 1
glBindTexture(GL_TEXTURE_2D, texture[1]);
draw quad 2
glBindTexture(GL_TEXTURE_2D, texture[2]);
draw quad 3
glBindTexture(GL_TEXTURE_2D, texture[3]);
draw quad 4
glBindTexture(GL_TEXTURE_2D, texture[4]);
draw quad 5
glBindTexture(GL_TEXTURE_2D, texture[5]);
draw quad 6
That’s all, hope it helps!
[This message has been edited by Simon (edited 07-09-2000).]